Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW: Addition of a constant to not truncate the IBAN when generating the PDF of invoices with direct debit order #29669

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions htdocs/admin/pdf_other.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@
if (GETPOSTISSET('BARCODE_ON_STOCKTRANSFER_PDF')) {
dolibarr_set_const($db, "BARCODE_ON_STOCKTRANSFER_PDF", GETPOSTINT("BARCODE_ON_STOCKTRANSFER_PDF"), 'chaine', 0, '', $conf->entity);
}
if (GETPOSTISSET('INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICES')) {
dolibarr_set_const($db, "INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICES", GETPOSTINT("INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICES"), 'chaine', 0, '', $conf->entity);
if (GETPOSTINT('INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICES') == 1) {
dolibarr_del_const($db, "INVOICE_ADD_SWISS_QR_CODE", $conf->entity);
}
}

setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');

Expand Down Expand Up @@ -318,6 +324,17 @@
}
print '</td></tr>';

print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICES"), $langs->trans("INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICESMore"));
print '</td><td>';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICES');
} else {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
print $form->selectarray("INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICES", $arrval, getDolGlobalString('INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICES'));
}
print '</td></tr>';

print '</table>';
print '</div>';
}
Expand Down
3 changes: 2 additions & 1 deletion htdocs/core/modules/facture/doc/pdf_sponge.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,8 @@ protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs, $outputlan
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$bac->fetch(0, '', $object->thirdparty->id);
$iban = $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
$lib_mode_reg .= ' '.$outputlangs->trans("PaymentTypePREdetails", dol_trunc($iban, 6, 'right', 'UTF-8', 1));
if (getDolGlobalInt('INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICES') === 1) $lib_mode_reg .= ' ' . $outputlangs->trans("PaymentTypePREfulldetails", $iban);
else $lib_mode_reg .= ' ' . $outputlangs->trans("PaymentTypePREdetails", dol_trunc($iban, 6, 'right', 'UTF-8', 1));
}

$pdf->MultiCell($posxend - $posxval, 5, $lib_mode_reg, 0, 'L');
Expand Down
2 changes: 2 additions & 0 deletions htdocs/langs/en_US/admin.lang
Original file line number Diff line number Diff line change
Expand Up @@ -2379,6 +2379,8 @@ INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR C
INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code.
INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address
INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...)
INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICES = Do not truncate the IBAN when generating the PDF of invoices with direct debit order
INVOICE_NO_TRUNCATE_IBAN_FOR_PDF_INVOICESMore = Some companies want to have the full IBAN on their invoices
UrlSocialNetworksDesc=Url link of social network. Use {socialid} for the variable part that contains the social network ID.
IfThisCategoryIsChildOfAnother=If this category is a child of another one
DarkThemeMode=Dark theme mode
Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/en_US/bills.lang
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ PaymentTypeVIR=Bank transfer
PaymentTypeShortVIR=Bank transfer
PaymentTypePRE=Direct debit payment order
PaymentTypePREdetails=(on account %s...)
PaymentTypePREfulldetails=(on account %s)
PaymentTypeShortPRE=Debit payment order
PaymentTypeLIQ=Cash
PaymentTypeShortLIQ=Cash
Expand Down