Merge pull request #7202 from atm-florian/dev_depositinvoicemoreexplicit
NEW : Deposit invoice more explicit in invoice line description
This commit is contained in:
commit
764b47cf47
@ -1121,8 +1121,17 @@ if (empty($reshook))
|
||||
|
||||
foreach ($amountdeposit as $tva => $amount)
|
||||
{
|
||||
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
|
||||
$descline = $langs->trans('Deposit');
|
||||
$descline.= ' - '.$langs->trans($arraylist[$typeamount]);
|
||||
if ($typeamount=='amount') {
|
||||
$descline.= ' ('. price($valuedeposit, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).')';
|
||||
} elseif ($typeamount=='variable') {
|
||||
$descline.= ' ('. $valuedeposit.'%)';
|
||||
}
|
||||
$descline.= ' - '.$srcobject->ref;
|
||||
$result = $object->addline(
|
||||
$langs->trans('Deposit'),
|
||||
$descline,
|
||||
$amount, // subprice
|
||||
1, // quantity
|
||||
$tva, // vat rate
|
||||
@ -1144,8 +1153,8 @@ if (empty($reshook))
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
$langs->trans('Deposit')
|
||||
0
|
||||
//,$langs->trans('Deposit') //Deprecated
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user