FIX: deposit payment terms: adapt Form::form_conditions_reglement() calls to new parameter added in between PRs

This commit is contained in:
Marc de Lima Lucio 2021-10-13 11:39:09 +02:00
parent 29768a1c6e
commit 9a963da77c
5 changed files with 8 additions and 8 deletions

View File

@ -411,9 +411,9 @@ if ($object->id > 0) {
print '</tr></table>';
print '</td><td>';
if ($action == 'editconditions') {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id', 1, 1, $object->deposit_percent);
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id', 1, '', 1, $object->deposit_percent);
} else {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_id, 'none', 0, 1, $object->deposit_percent);
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent);
}
print "</td>";
print '</tr>';

View File

@ -2329,9 +2329,9 @@ if ($action == 'create') {
print '</tr></table>';
print '</td><td class="valuefield">';
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editconditions' && $usercancreate) {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id', 0, 1, $object->deposit_percent);
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id', 0, '', 1, $object->deposit_percent);
} else {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none', 0, 1, $object->deposit_percent);
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent);
}
print '</td>';
print '</tr>';

View File

@ -1673,7 +1673,7 @@ if ($resql) {
// Payment terms
if (!empty($arrayfields['p.fk_cond_reglement']['checked'])) {
print '<td>';
$form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', 0, 1, $obj->deposit_percent);
$form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', 0, '', 1, $obj->deposit_percent);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;

View File

@ -2374,9 +2374,9 @@ if ($action == 'create' && $usercancreate) {
print $form->editfieldkey("PaymentConditionsShort", 'conditions', '', $object, $editenable);
print '</td><td class="valuefield">';
if ($action == 'editconditions') {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id', 1, 1, $object->deposit_percent);
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id', 1, '', 1, $object->deposit_percent);
} else {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none', 1, 1, $object->deposit_percent);
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none', 1, '', 1, $object->deposit_percent);
}
print '</td>';

View File

@ -1592,7 +1592,7 @@ if ($resql) {
// Payment terms
if (!empty($arrayfields['c.fk_cond_reglement']['checked'])) {
print '<td>';
$form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', 0, 1, $obj->deposit_percent);
$form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', 0, '', 1, $obj->deposit_percent);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;