New: Change term date if lower than invoice date when editing invoice date.
This commit is contained in:
parent
7b9286d273
commit
64b7b5a218
@ -239,6 +239,15 @@ if ($_POST['action'] == 'setmode')
|
|||||||
if ($result < 0) dol_print_error($object->db,$object->error);
|
if ($result < 0) dol_print_error($object->db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_POST['action'] == 'setinvoicedate')
|
||||||
|
{
|
||||||
|
$object->fetch($facid);
|
||||||
|
$object->date=dol_mktime(12,0,0,$_POST['invoicedatemonth'],$_POST['invoicedateday'],$_POST['invoicedateyear']);
|
||||||
|
if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement=$object->date;
|
||||||
|
$result=$object->update($user);
|
||||||
|
if ($result < 0) dol_print_error($object->db,$object->error);
|
||||||
|
}
|
||||||
|
|
||||||
if ($_POST['action'] == 'setpaymentterm')
|
if ($_POST['action'] == 'setpaymentterm')
|
||||||
{
|
{
|
||||||
$object->fetch($facid);
|
$object->fetch($facid);
|
||||||
@ -247,14 +256,6 @@ if ($_POST['action'] == 'setpaymentterm')
|
|||||||
if ($result < 0) dol_print_error($object->db,$object->error);
|
if ($result < 0) dol_print_error($object->db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['action'] == 'setinvoicedate')
|
|
||||||
{
|
|
||||||
$object->fetch($facid);
|
|
||||||
$object->date=dol_mktime(12,0,0,$_POST['invoicedatemonth'],$_POST['invoicedateday'],$_POST['invoicedateyear']);
|
|
||||||
$result=$object->update($user);
|
|
||||||
if ($result < 0) dol_print_error($object->db,$object->error);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_POST['action'] == 'setconditions')
|
if ($_POST['action'] == 'setconditions')
|
||||||
{
|
{
|
||||||
$object->fetch($facid);
|
$object->fetch($facid);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user