#12268 - max of 31 days to generate invoices
This commit is contained in:
parent
dcc597ee61
commit
9651273022
@ -111,7 +111,7 @@ class AdminInvoicesControllerCore extends AdminController
|
|||||||
'maxlength' => 10,
|
'maxlength' => 10,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'hint' => $this->l('Format: 2012-12-31 (inclusive).'),
|
'hint' => $this->l('Format: 2012-12-31 (inclusive).'),
|
||||||
'desc' => $this->l('Intervalle de 32 jours maximum entre les 2 dates.')
|
'desc' => $this->l('Intervalle de 31 jours maximum entre les 2 dates.')
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'submit' => array(
|
'submit' => array(
|
||||||
@ -231,8 +231,8 @@ class AdminInvoicesControllerCore extends AdminController
|
|||||||
$d_from = new DateTime($date_from);
|
$d_from = new DateTime($date_from);
|
||||||
$d_to = new DateTime($date_to);
|
$d_to = new DateTime($date_to);
|
||||||
$interval = $d_from->diff($d_to);
|
$interval = $d_from->diff($d_to);
|
||||||
if ($interval->days>32) {
|
if ($interval->days>31) {
|
||||||
$this->errors[] = $this->l('Les factures ne peuvent être générées que pour une période de 32 jours maximum.');
|
$this->errors[] = $this->l('Les factures ne peuvent être générées que pour une période de 31 jours maximum.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!count($this->errors))
|
if (!count($this->errors))
|
||||||
|
Loading…
Reference in New Issue
Block a user