mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Fix payment suffix
This commit is contained in:
@@ -62,24 +62,24 @@ $action=GETPOST('action','aZ09');
|
|||||||
// tag (a free text, required if type is empty)
|
// tag (a free text, required if type is empty)
|
||||||
// currency (iso code)
|
// currency (iso code)
|
||||||
|
|
||||||
$suffix=GETPOST("suffix",'alpha');
|
$suffix=GETPOST("suffix",'aZ09');
|
||||||
$amount=price2num(GETPOST("amount"));
|
$amount=price2num(GETPOST("amount",'alpha'));
|
||||||
if (! GETPOST("currency",'alpha')) $currency=$conf->currency;
|
if (! GETPOST("currency",'alpha')) $currency=$conf->currency;
|
||||||
else $currency=GETPOST("currency",'alpha');
|
else $currency=GETPOST("currency",'alpha');
|
||||||
|
|
||||||
if (! $action)
|
if (! $action)
|
||||||
{
|
{
|
||||||
if (! GETPOST("amount") && ! GETPOST("source"))
|
if (! GETPOST("amount",'alpha') && ! GETPOST("source",'alpha'))
|
||||||
{
|
{
|
||||||
dol_print_error('',$langs->trans('ErrorBadParameters')." - amount or source");
|
dol_print_error('',$langs->trans('ErrorBadParameters')." - amount or source");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if (is_numeric($amount) && ! GETPOST("tag") && ! GETPOST("source"))
|
if (is_numeric($amount) && ! GETPOST("tag",'alpha') && ! GETPOST("source",'alpha'))
|
||||||
{
|
{
|
||||||
dol_print_error('',$langs->trans('ErrorBadParameters')." - tag or source");
|
dol_print_error('',$langs->trans('ErrorBadParameters')." - tag or source");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if (GETPOST("source") && ! GETPOST("ref"))
|
if (GETPOST("source",'alpha') && ! GETPOST("ref",'alpha'))
|
||||||
{
|
{
|
||||||
dol_print_error('',$langs->trans('ErrorBadParameters')." - ref");
|
dol_print_error('',$langs->trans('ErrorBadParameters')." - ref");
|
||||||
exit;
|
exit;
|
||||||
@@ -551,20 +551,21 @@ $width=0;
|
|||||||
// Define logo and logosmall
|
// Define logo and logosmall
|
||||||
$logosmall=$mysoc->logo_small;
|
$logosmall=$mysoc->logo_small;
|
||||||
$logo=$mysoc->logo;
|
$logo=$mysoc->logo;
|
||||||
$paramlogo='PAYMENT_LOGO_'.$suffix;
|
$paramlogo='ONLINE_PAYMENT_LOGO_'.$suffix;
|
||||||
if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo;
|
if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo;
|
||||||
else if (! empty($conf->global->PAYMENT_LOGO)) $logosmall=$conf->global->PAYMENT_LOGO;
|
else if (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO;
|
||||||
//print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
|
//print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
|
||||||
// Define urllogo
|
// Define urllogo
|
||||||
$urllogo='';
|
$urllogo='';
|
||||||
if (! empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall))
|
if (! empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall))
|
||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('thumbs/'.$logosmall);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('thumbs/'.$logosmall);
|
||||||
|
$width=128;
|
||||||
}
|
}
|
||||||
elseif (! empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
|
elseif (! empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
|
||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode($logo);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode($logo);
|
||||||
$width=96;
|
$width=128;
|
||||||
}
|
}
|
||||||
// Output html code for logo
|
// Output html code for logo
|
||||||
if ($urllogo)
|
if ($urllogo)
|
||||||
|
|||||||
Reference in New Issue
Block a user