@@ -2176,7 +2176,9 @@ discard block |
||
| 2176 | 2176 | } |
| 2177 | 2177 | } |
| 2178 | 2178 | } |
| 2179 | - if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 2179 | + if ($nbMandated > 0 ) { |
|
| 2180 | + $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 2181 | + } |
|
| 2180 | 2182 | |
| 2181 | 2183 | if (getDolGlobalInt('SALE_ORDER_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) { |
| 2182 | 2184 | // This is a hidden option: |
@@ -2841,9 +2843,12 @@ discard block |
||
| 2841 | 2843 | $parameters = array(); |
| 2842 | 2844 | // Note that $action and $object may be modified by hook |
| 2843 | 2845 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); |
| 2844 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 2845 | - if (empty($reshook)) |
|
| 2846 | - $object->formAddObjectLine(1, $mysoc, $soc); |
|
| 2846 | + if ($reshook < 0) { |
|
| 2847 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 2848 | + } |
|
| 2849 | + if (empty($reshook)) { |
|
| 2850 | + $object->formAddObjectLine(1, $mysoc, $soc); |
|
| 2851 | + } |
|
| 2847 | 2852 | } else { |
| 2848 | 2853 | $parameters = array(); |
| 2849 | 2854 | $reshook = $hookmanager->executeHooks('formEditObjectLine', $parameters, $object, $action); |
@@ -4205,7 +4205,9 @@ discard block |
||
| 4205 | 4205 | } |
| 4206 | 4206 | } |
| 4207 | 4207 | } |
| 4208 | - if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 4208 | + if ($nbMandated > 0 ) { |
|
| 4209 | + $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 4210 | + } |
|
| 4209 | 4211 | |
| 4210 | 4212 | |
| 4211 | 4213 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); |
@@ -5485,9 +5487,12 @@ discard block |
||
| 5485 | 5487 | |
| 5486 | 5488 | $parameters = array(); |
| 5487 | 5489 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 5488 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 5489 | - if (empty($reshook)) |
|
| 5490 | - $object->formAddObjectLine(1, $mysoc, $soc); |
|
| 5490 | + if ($reshook < 0) { |
|
| 5491 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 5492 | + } |
|
| 5493 | + if (empty($reshook)) { |
|
| 5494 | + $object->formAddObjectLine(1, $mysoc, $soc); |
|
| 5495 | + } |
|
| 5491 | 5496 | } else { |
| 5492 | 5497 | $parameters = array(); |
| 5493 | 5498 | $reshook = $hookmanager->executeHooks('formEditObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |