Can set a dedicated message on payment forms

This commit is contained in:
Laurent Destailleur 2017-09-09 10:54:30 +02:00
parent c7537732d2
commit 026f9d8e2a
13 changed files with 23 additions and 18 deletions

View File

@ -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";
}

View File

@ -802,7 +802,7 @@ print '</div>'."\n";
print '<br>';
htmlPrintOnlinePaymentFooter($mysoc,$langs,1);
htmlPrintOnlinePaymentFooter($mysoc,$langs,1,$suffix);
llxFooter('', 'public');

View File

@ -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');

View File

@ -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');

View File

@ -1447,7 +1447,7 @@ if (preg_match('/^dopayment/',$action))
htmlPrintOnlinePaymentFooter($mysoc,$langs,1);
htmlPrintOnlinePaymentFooter($mysoc,$langs,1,$suffix);
llxFooter('', 'public');

View File

@ -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');

View File

@ -443,7 +443,7 @@ else
print "\n</div>\n";
htmlPrintOnlinePaymentFooter($mysoc,$langs);
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
llxFooter('', 'public');

View File

@ -1015,7 +1015,7 @@ print '<br>';
htmlPrintOnlinePaymentFooter($mysoc,$langs,1);
htmlPrintOnlinePaymentFooter($mysoc,$langs,1,$suffix);
llxFooter('', 'public');

View File

@ -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');

View File

@ -328,7 +328,7 @@ else
print "\n</div>\n";
htmlPrintOnlinePaymentFooter($mysoc,$langs);
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
llxFooter('', 'public');

View File

@ -1229,7 +1229,7 @@ if (preg_match('/^dopayment/',$action))
htmlPrintOnlinePaymentFooter($mysoc,$langs,1);
htmlPrintOnlinePaymentFooter($mysoc,$langs,1,$suffix);
llxFooter('', 'public');

View File

@ -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');

View File

@ -193,7 +193,7 @@ if ($ispaymentok)
print "\n</div>\n";
htmlPrintOnlinePaymentFooter($mysoc,$langs);
htmlPrintOnlinePaymentFooter($mysoc,$langs,0,$suffix);
llxFooter('', 'public');