FIX: deposit payment terms: getDictvalue() renamed to getDictionaryValue()
This commit is contained in:
parent
668088a63f
commit
03c24b2274
@ -687,7 +687,7 @@ if (empty($reshook)) {
|
||||
$deposit = null;
|
||||
$locationTarget = $_SERVER['PHP_SELF'] . '?id=' . $object->id;
|
||||
|
||||
$deposit_percent_from_payment_terms = getDictvalue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
$deposit_percent_from_payment_terms = getDictionaryValue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
|
||||
if (
|
||||
!$error && GETPOST('statut', 'int') == $object::STATUS_SIGNED && GETPOST('generate_deposit', 'alpha') == 'on'
|
||||
@ -1408,7 +1408,7 @@ if (empty($reshook)) {
|
||||
$result = $object->set_demand_reason($user, GETPOST('demand_reason_id', 'int'));
|
||||
} elseif ($action == 'setconditions' && $usercancreate) {
|
||||
// Terms of payment
|
||||
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'), GETPOST('cond_reglement_id_deposit_percent', 'int'));
|
||||
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'), GETPOST('cond_reglement_id_deposit_percent', 'alpha'));
|
||||
} elseif ($action == 'setremisepercent' && $usercancreate) {
|
||||
$result = $object->set_remise_percent($user, price2num(GETPOST('remise_percent'), '', 2));
|
||||
} elseif ($action == 'setremiseabsolue' && $usercancreate) {
|
||||
@ -1980,7 +1980,7 @@ if ($action == 'create') {
|
||||
array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => '') // Field to complete private note (not replace)
|
||||
);
|
||||
|
||||
$deposit_percent_from_payment_terms = getDictvalue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
$deposit_percent_from_payment_terms = getDictionaryValue(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';
|
||||
|
||||
@ -1161,7 +1161,7 @@ if (empty($reshook)) {
|
||||
$error = 0;
|
||||
$deposit = null;
|
||||
|
||||
$deposit_percent_from_payment_terms = getDictvalue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
$deposit_percent_from_payment_terms = getDictionaryValue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
|
||||
if (
|
||||
GETPOST('generate_deposit', 'alpha') == 'on' && ! empty($deposit_percent_from_payment_terms)
|
||||
@ -1993,7 +1993,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
|
||||
|
||||
|
||||
$deposit_percent_from_payment_terms = getDictvalue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
$deposit_percent_from_payment_terms = getDictionaryValue(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';
|
||||
|
||||
@ -3269,7 +3269,7 @@ if ($action == 'create') {
|
||||
$typedeposit = GETPOST('typedeposit', 'aZ09');
|
||||
$valuedeposit = GETPOST('valuedeposit', 'int');
|
||||
if (empty($typedeposit) && ! empty($objectsrc->deposit_percent)) {
|
||||
$origin_payment_conditions_deposit_percent = getDictvalue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $objectsrc->cond_reglement_id);
|
||||
$origin_payment_conditions_deposit_percent = getDictionaryValue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $objectsrc->cond_reglement_id);
|
||||
if (! empty($origin_payment_conditions_deposit_percent)) {
|
||||
$typedeposit = 'variable';
|
||||
}
|
||||
|
||||
@ -1444,7 +1444,7 @@ class Facture extends CommonInvoice
|
||||
return null;
|
||||
}
|
||||
|
||||
$payment_conditions_deposit_percent = getDictvalue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $origin->cond_reglement_id);
|
||||
$payment_conditions_deposit_percent = getDictionaryValue(MAIN_DB_PREFIX . 'c_payment_term', 'deposit_percent', $origin->cond_reglement_id);
|
||||
|
||||
if (empty($payment_conditions_deposit_percent)) {
|
||||
$origin->error = 'ErrorPaymentConditionsNotEligibleToDepositCreation';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user