Fix: no way to change the payment term date
This commit is contained in:
parent
f1870ae37d
commit
8b13f2ab81
@ -265,6 +265,15 @@ else if ($action == 'setinvoicedate' && $user->rights->facture->creer)
|
|||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if ($action == 'setpaymentterm' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
|
$object->fetch($id);
|
||||||
|
$object->date_lim_reglement=dol_mktime(12,0,0,$_POST['paymenttermmonth'],$_POST['paymenttermday'],$_POST['paymenttermyear']);
|
||||||
|
if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement=$object->date;
|
||||||
|
$result=$object->update($user);
|
||||||
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
|
}
|
||||||
|
|
||||||
else if ($action == 'setconditions' && $user->rights->facture->creer)
|
else if ($action == 'setconditions' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user