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 Add a warning if invoice payment is Credit Transfer on newpayment.php #29685

Merged
Merged
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
1 change: 1 addition & 0 deletions htdocs/langs/en_US/other.lang
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,4 @@ EmailContent=Email content
Pre-Prompt=Pre-prompt
Post-Prompt=Post-prompt
AIProcessingPleaseWait=AI (%s) is processing your request, please wait...
PayOfBankTransferInvoice=You will make an online payment for this invoice. However, this invoice has been set up to be paid in "Bank Transfer" mode, so to avoid paying twice, please verify that no current bank transfer has already been initiated before continuing.
8 changes: 8 additions & 0 deletions htdocs/public/payment/newpayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,7 @@
if ($source == 'invoice') {
$found = true;
$langs->load("bills");
$form->load_cache_types_paiements();

require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

Expand Down Expand Up @@ -1267,6 +1268,13 @@
print '<input type="hidden" name="tag" value="'.(empty($tag) ? '' : $tag).'">';
print '<input type="hidden" name="fulltag" value="'.$fulltag.'">';
print '</td></tr>'."\n";
if ($invoice->mode_reglement_id > 0 && $form->cache_types_paiements[$invoice->mode_reglement_id]["code"] == "VIR") {
print '<tr class="CTableRow2 center"><td class="CTableRow2" colspan="2">';
print '<div class="warning">';
print $langs->trans("PayOfBankTransferInvoice");
print '</div>';
print '</td></tr>'."\n";
}

// Shipping address
$shipToName = $invoice->thirdparty->name;
Expand Down
Loading