This commit is contained in:
Laurent Destailleur 2020-01-05 19:59:14 +01:00
parent d077a1ca60
commit 012e916c4b

View File

@ -843,7 +843,11 @@ if (!$source)
{
$found = true;
$tag = GETPOST("tag", 'alpha');
$fulltag = "TAG=".$tag;
if (GETPOST('fulltag', 'alpha')) {
$fulltag = GETPOST('fulltag', 'alpha');
} else {
$fulltag = "TAG=".$tag;
}
// Creditor
print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Creditor");
@ -910,8 +914,12 @@ if ($source == 'order')
$amount = price2num($amount);
}
$fulltag = 'ORD='.$order->id.'.CUS='.$order->thirdparty->id;
if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; }
if (GETPOST('fulltag', 'alpha')) {
$fulltag = GETPOST('fulltag', 'alpha');
} else {
$fulltag = 'ORD='.$order->id.'.CUS='.$order->thirdparty->id;
if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; }
}
$fulltag = dol_string_unaccent($fulltag);
// Creditor
@ -1029,9 +1037,12 @@ if ($source == 'invoice')
$amount = price2num($amount);
}
$fulltag = 'INV='.$invoice->id.'.CUS='.$invoice->thirdparty->id;
//$fulltag.='.NAM='.strtr($invoice->thirdparty->name,"-"," ");
if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; }
if (GETPOST('fulltag', 'alpha')) {
$fulltag = GETPOST('fulltag', 'alpha');
} else {
$fulltag = 'INV='.$invoice->id.'.CUS='.$invoice->thirdparty->id;
if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; }
}
$fulltag = dol_string_unaccent($fulltag);
// Creditor
@ -1202,9 +1213,12 @@ if ($source == 'contractline')
$amount = price2num($amount);
}
$fulltag = 'COL='.$contractline->id.'.CON='.$contract->id.'.CUS='.$contract->thirdparty->id.'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S');
//$fulltag.='.NAM='.strtr($contract->thirdparty->name,"-"," ");
if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; }
if (GETPOST('fulltag', 'alpha')) {
$fulltag = GETPOST('fulltag', 'alpha');
} else {
$fulltag = 'COL='.$contractline->id.'.CON='.$contract->id.'.CUS='.$contract->thirdparty->id.'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S');
if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; }
}
$fulltag = dol_string_unaccent($fulltag);
$qty = 1;
@ -1367,8 +1381,12 @@ if ($source == 'membersubscription')
$amount = price2num($amount);
}
$fulltag = 'MEM='.$member->id.'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S');
if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; }
if (GETPOST('fulltag', 'alpha')) {
$fulltag = GETPOST('fulltag', 'alpha');
} else {
$fulltag = 'MEM='.$member->id.'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S');
if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; }
}
$fulltag = dol_string_unaccent($fulltag);
// Creditor
@ -1531,8 +1549,12 @@ if ($source == 'donation')
$amount = price2num($amount);
}
$fulltag = 'DON='.$don->ref.'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S');
if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; }
if (GETPOST('fulltag', 'alpha')) {
$fulltag = GETPOST('fulltag', 'alpha');
} else {
$fulltag = 'DON='.$don->ref.'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S');
if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; }
}
$fulltag = dol_string_unaccent($fulltag);
// Creditor