FIX: deposit payment terms: fatal error for lack of inclusion on class Facture
This commit is contained in:
parent
47deb64f09
commit
9d92260ec1
@ -693,6 +693,8 @@ if (empty($reshook)) {
|
||||
!$error && GETPOST('statut', 'int') == $object::STATUS_SIGNED && GETPOST('generate_deposit', 'alpha') == 'on'
|
||||
&& ! empty($deposit_percent_from_payment_terms) && ! empty($conf->facture->enabled) && ! empty($user->rights->facture->creer)
|
||||
) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
|
||||
$date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int'));
|
||||
$forceFields = array();
|
||||
|
||||
@ -1984,6 +1986,8 @@ if ($action == 'create') {
|
||||
$deposit_percent_from_payment_terms = getDictvalue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
|
||||
if (! empty($deposit_percent_from_payment_terms) && ! empty($conf->facture->enabled) && ! empty($user->rights->facture->creer)) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
|
||||
$object->fetchObjectLinked();
|
||||
|
||||
$eligibleForDepositGeneration = true;
|
||||
|
||||
@ -1167,6 +1167,8 @@ if (empty($reshook)) {
|
||||
GETPOST('generate_deposit', 'alpha') == 'on' && ! empty($deposit_percent_from_payment_terms)
|
||||
&& ! empty($conf->facture->enabled) && ! empty($user->rights->facture->creer)
|
||||
) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
|
||||
$date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int'));
|
||||
$forceFields = array();
|
||||
|
||||
@ -1994,6 +1996,8 @@ if ($action == 'create' && $usercancreate) {
|
||||
$deposit_percent_from_payment_terms = getDictvalue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
|
||||
if (! empty($deposit_percent_from_payment_terms) && ! empty($conf->facture->enabled) && ! empty($user->rights->facture->creer)) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
|
||||
$object->fetchObjectLinked();
|
||||
|
||||
$eligibleForDepositGeneration = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user