Update facture-rec.class.php
This commit is contained in:
parent
b67101c77c
commit
c377350c35
@ -1006,15 +1006,12 @@ class FactureRec extends CommonInvoice
|
|||||||
{
|
{
|
||||||
global $conf, $langs, $db, $user, $hookmanager;
|
global $conf, $langs, $db, $user, $hookmanager;
|
||||||
|
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$nb_create=0;
|
$nb_create=0;
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("main","bills"));
|
$langs->loadLangs(array("main","bills"));
|
||||||
|
|
||||||
$hookmanager->initHooks(array('createrecurringinvoices'));
|
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
$tmparray=dol_getdate($now);
|
$tmparray=dol_getdate($now);
|
||||||
$today = dol_mktime(23,59,59,$tmparray['mon'],$tmparray['mday'],$tmparray['year']); // Today is last second of current day
|
$today = dol_mktime(23,59,59,$tmparray['mon'],$tmparray['mday'],$tmparray['year']); // Today is last second of current day
|
||||||
@ -1035,7 +1032,7 @@ class FactureRec extends CommonInvoice
|
|||||||
'restrictioninvoiceid' => $restrictioninvoiceid,
|
'restrictioninvoiceid' => $restrictioninvoiceid,
|
||||||
'forcevalidation' => $forcevalidation,
|
'forcevalidation' => $forcevalidation,
|
||||||
);
|
);
|
||||||
$reshook = $hookmanager->executeHooks('writeSQL', $parameters, $sql); // note that $sql might be modified by hooks
|
$reshook = $hookmanager->executeHooks('beforeCreationOfRecurringInvoices', $parameters, $sql); // note that $sql might be modified by hooks
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -1136,7 +1133,7 @@ class FactureRec extends CommonInvoice
|
|||||||
'facturerec' => $facturerec, // it's an object which PHP passes by "reference", so modifiable by hooks.
|
'facturerec' => $facturerec, // it's an object which PHP passes by "reference", so modifiable by hooks.
|
||||||
'this' => $this, // it's an object which PHP passes by "reference", so modifiable by hooks.
|
'this' => $this, // it's an object which PHP passes by "reference", so modifiable by hooks.
|
||||||
);
|
);
|
||||||
$reshook = $hookmanager->executeHooks('generatedInvoice', $parameters, $facture); // note: $facture can be modified by hooks (warning: $facture can be null)
|
$reshook = $hookmanager->executeHooks('afterCreationOfRecurringInvoice', $parameters, $facture); // note: $facture can be modified by hooks (warning: $facture can be null)
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user