Can set a dedicated message on payment forms
This commit is contained in:
parent
c7537732d2
commit
026f9d8e2a
@ -96,9 +96,10 @@ function payment_supplier_prepare_head(Paiement $object) {
|
||||
* @param Societe $fromcompany Third party
|
||||
* @param Translate $langs Output language
|
||||
* @param int $addformmessage Add the payment form message
|
||||
* @param string $suffix Suffix to use on constants
|
||||
* @return void
|
||||
*/
|
||||
function htmlPrintOnlinePaymentFooter($fromcompany,$langs,$addformmessage=0)
|
||||
function htmlPrintOnlinePaymentFooter($fromcompany,$langs,$addformmessage=0,$suffix='')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@ -152,16 +153,20 @@ function htmlPrintOnlinePaymentFooter($fromcompany,$langs,$addformmessage=0)
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="center"><font style="font-size: 10px;">'."\n";
|
||||
print '<div class="center">'."\n";
|
||||
if ($addformmessage)
|
||||
{
|
||||
$key='ONLINE_PAYMENT_MESSAGE_FORM';
|
||||
if (! empty($conf->global->$key)) print '<br>'.$conf->global->$key;
|
||||
print '<br>';
|
||||
$parammessageform='ONLINE_PAYMENT_MESSAGE_FORM_'.$suffix;
|
||||
if (! empty($conf->global->$parammessageform)) print $conf->global->$parammessageform;
|
||||
else if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORM)) print $conf->global->ONLINE_PAYMENT_MESSAGE_FORM;
|
||||
}
|
||||
|
||||
print '<br><hr>'."\n";
|
||||
print '<font style="font-size: 10px;"><br><hr>'."\n";
|
||||
print $fromcompany->name.'<br>';
|
||||
print $line1.'<br>';
|
||||
print $line1;
|
||||
if (strlen($line1+$line2) > 50) print '<br>';
|
||||
else print ' - ';
|
||||
print $line2;
|
||||
print '</font></div>'."\n";
|
||||
}
|
||||
|
||||
@ -802,7 +802,7 @@ print '</div>'."\n";
|
||||
print '<br>';
|
||||
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,1);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,1,$suffix);
|
||||
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
@ -162,7 +162,7 @@ if (! empty($conf->global->$key)) print $conf->global->$key;
|
||||
print "\n</div>\n";
|
||||
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
|
||||
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
@ -193,7 +193,7 @@ if (! empty($conf->global->ONLINE_PAYMENT_SENDEMAIL))
|
||||
|
||||
print "\n</div>\n";
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
|
||||
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
@ -1447,7 +1447,7 @@ if (preg_match('/^dopayment/',$action))
|
||||
|
||||
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,1);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,1,$suffix);
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
|
||||
@ -244,7 +244,7 @@ if (! empty($conf->global->$key)) print $conf->global->$key;
|
||||
print "\n</div>\n";
|
||||
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
|
||||
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
@ -443,7 +443,7 @@ else
|
||||
print "\n</div>\n";
|
||||
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
|
||||
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
@ -1015,7 +1015,7 @@ print '<br>';
|
||||
|
||||
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,1);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,1,$suffix);
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
|
||||
@ -172,7 +172,7 @@ if (! empty($conf->global->$key)) print $conf->global->$key;
|
||||
print "\n</div>\n";
|
||||
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
|
||||
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
@ -328,7 +328,7 @@ else
|
||||
|
||||
print "\n</div>\n";
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
|
||||
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
@ -1229,7 +1229,7 @@ if (preg_match('/^dopayment/',$action))
|
||||
|
||||
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,1);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,1,$suffix);
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
|
||||
@ -159,7 +159,7 @@ if (! empty($conf->global->$key)) print $conf->global->$key;
|
||||
print "\n</div>\n";
|
||||
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
|
||||
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
@ -193,7 +193,7 @@ if ($ispaymentok)
|
||||
print "\n</div>\n";
|
||||
|
||||
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs);
|
||||
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
|
||||
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user