NEW Can set a dedicated message on payment forms

This commit is contained in:
Laurent Destailleur 2017-09-09 10:03:09 +02:00
parent 591834a807
commit c7537732d2
13 changed files with 46 additions and 22 deletions

View File

@ -95,9 +95,10 @@ function payment_supplier_prepare_head(Paiement $object) {
* *
* @param Societe $fromcompany Third party * @param Societe $fromcompany Third party
* @param Translate $langs Output language * @param Translate $langs Output language
* @param int $addformmessage Add the payment form message
* @return void * @return void
*/ */
function htmlPrintOnlinePaymentFooter($fromcompany,$langs) function htmlPrintOnlinePaymentFooter($fromcompany,$langs,$addformmessage=0)
{ {
global $conf; global $conf;
@ -149,8 +150,16 @@ function htmlPrintOnlinePaymentFooter($fromcompany,$langs)
$line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$fromcompany->tva_intra; $line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$fromcompany->tva_intra;
} }
print '<br><br><hr>'."\n"; print '<br>';
print '<div class="center"><font style="font-size: 10px;">'."\n"; print '<div class="center"><font style="font-size: 10px;">'."\n";
if ($addformmessage)
{
$key='ONLINE_PAYMENT_MESSAGE_FORM';
if (! empty($conf->global->$key)) print '<br>'.$conf->global->$key;
}
print '<br><hr>'."\n";
print $fromcompany->name.'<br>'; print $fromcompany->name.'<br>';
print $line1.'<br>'; print $line1.'<br>';
print $line2; print $line2;

View File

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

View File

@ -156,7 +156,8 @@ print '<div id="dolpaymentdiv" align="center">'."\n";
print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>\n"; print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>\n";
if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_KO)) print $conf->global->ONLINE_PAYMENT_MESSAGE_KO; $key='ONLINE_PAYMENT_MESSAGE_KO';
if (! empty($conf->global->$key)) print $conf->global->$key;
print "\n</div>\n"; print "\n</div>\n";

View File

@ -115,7 +115,8 @@ dol_syslog("Call newpaymentok with token=".$onlinetoken." paymentType=".$payment
print $langs->trans("YourPaymentHasBeenRecorded")."<br><br>\n"; print $langs->trans("YourPaymentHasBeenRecorded")."<br><br>\n";
if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_OK)) print $conf->global->ONLINE_PAYMENT_MESSAGE_OK; $key='ONLINE_PAYMENT_MESSAGE_OK';
if (! empty($conf->global->$key)) print $conf->global->$key;
// Appel des triggers // Appel des triggers

View File

@ -1264,6 +1264,7 @@ else
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '</table>'."\n"; print '</table>'."\n";
print '</form>'."\n"; print '</form>'."\n";
print '</div>'."\n"; print '</div>'."\n";
print '<br>'; print '<br>';
@ -1446,7 +1447,7 @@ if (preg_match('/^dopayment/',$action))
htmlPrintOnlinePaymentFooter($mysoc,$langs); htmlPrintOnlinePaymentFooter($mysoc,$langs,1);
llxFooter('', 'public'); llxFooter('', 'public');

View File

@ -238,7 +238,9 @@ if ($urllogo)
print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>"; print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>";
if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_KO)) print $conf->global->ONLINE_PAYMENT_MESSAGE_KO; $key='ONLINE_PAYMENT_MESSAGE_KO';
if (! empty($conf->global->$key)) print $conf->global->$key;
print "\n</div>\n"; print "\n</div>\n";

View File

@ -285,7 +285,9 @@ if ($ispaymentok)
print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n"; print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n";
print $langs->trans("ThisIsTransactionId",$TRANSACTIONID)."<br><br>\n"; print $langs->trans("ThisIsTransactionId",$TRANSACTIONID)."<br><br>\n";
if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_OK)) print $conf->global->ONLINE_PAYMENT_MESSAGE_OK;
$key='ONLINE_PAYMENT_MESSAGE_OK';
if (! empty($conf->global->$key)) print $conf->global->$key;
$sendemail = ''; $sendemail = '';
if (! empty($conf->global->ONLINE_PAYMENT_SENDEMAIL)) $sendemail=$conf->global->ONLINE_PAYMENT_SENDEMAIL; if (! empty($conf->global->ONLINE_PAYMENT_SENDEMAIL)) $sendemail=$conf->global->ONLINE_PAYMENT_SENDEMAIL;

View File

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

View File

@ -166,7 +166,9 @@ print '<span id="dolpaymentspan"></span>'."\n";
print '<div id="dolpaymentdiv" align="center">'."\n"; print '<div id="dolpaymentdiv" align="center">'."\n";
print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>"; print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>";
if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_KO)) print $conf->global->ONLINE_PAYMENT_MESSAGE_KO; $key='ONLINE_PAYMENT_MESSAGE_KO';
if (! empty($conf->global->$key)) print $conf->global->$key;
print "\n</div>\n"; print "\n</div>\n";

View File

@ -170,7 +170,9 @@ if ($PAYPALTOKEN)
print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n"; print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n";
print $langs->trans("ThisIsTransactionId",$TRANSACTIONID)."<br><br>\n"; print $langs->trans("ThisIsTransactionId",$TRANSACTIONID)."<br><br>\n";
if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_OK)) print $conf->global->ONLINE_PAYMENT_MESSAGE_OK;
$key='ONLINE_PAYMENT_MESSAGE_OK';
if (! empty($conf->global->$key)) print $conf->global->$key;
// Appel des triggers // Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';

View File

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

View File

@ -153,7 +153,9 @@ print '<span id="dolpaymentspan"></span>'."\n";
print '<div id="dolpaymentdiv" align="center">'."\n"; print '<div id="dolpaymentdiv" align="center">'."\n";
print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>"; print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>";
if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_KO)) print $conf->global->ONLINE_PAYMENT_MESSAGE_KO; $key='ONLINE_PAYMENT_MESSAGE_KO';
if (! empty($conf->global->$key)) print $conf->global->$key;
print "\n</div>\n"; print "\n</div>\n";

View File

@ -120,7 +120,9 @@ if ($ispaymentok)
print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n"; print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n";
print $langs->trans("ThisIsTransactionId",$TRANSACTIONID)."<br><br>\n"; print $langs->trans("ThisIsTransactionId",$TRANSACTIONID)."<br><br>\n";
if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_OK)) print $conf->global->ONLINE_PAYMENT_MESSAGE_OK;
$key='ONLINE_PAYMENT_MESSAGE_OK';
if (! empty($conf->global->$key)) print $conf->global->$key;
$sendemail = ''; $sendemail = '';
if (! empty($conf->global->ONLINE_PAYMENT_SENDEMAIL)) $sendemail=$conf->global->ONLINE_PAYMENT_SENDEMAIL; if (! empty($conf->global->ONLINE_PAYMENT_SENDEMAIL)) $sendemail=$conf->global->ONLINE_PAYMENT_SENDEMAIL;