@@ -790,8 +790,9 @@ |
||
790 | 790 | if (isset($line->fk_product) && $line->fk_product > 0) { |
791 | 791 | $tmpproduct = new Product($this->db); |
792 | 792 | $tmpproduct->fetch($line->fk_product); |
793 | - foreach ($tmpproduct->array_options as $key=>$label) |
|
794 | - $resarray["line_product_".$key] = $label; |
|
793 | + foreach ($tmpproduct->array_options as $key=>$label) { |
|
794 | + $resarray["line_product_".$key] = $label; |
|
795 | + } |
|
795 | 796 | } |
796 | 797 | |
797 | 798 | return $resarray; |
@@ -110,7 +110,9 @@ |
||
110 | 110 | accessforbidden(); |
111 | 111 | } |
112 | 112 | //$result = restrictedArea($user, 'productbatch'); |
113 | -if (!$permissiontoread) accessforbidden(); |
|
113 | +if (!$permissiontoread) { |
|
114 | + accessforbidden(); |
|
115 | +} |
|
114 | 116 | |
115 | 117 | |
116 | 118 | /* |
@@ -110,7 +110,9 @@ |
||
110 | 110 | accessforbidden(); |
111 | 111 | } |
112 | 112 | //$result = restrictedArea($user, 'productbatch'); |
113 | -if (!$permissiontoread) accessforbidden(); |
|
113 | +if (!$permissiontoread) { |
|
114 | + accessforbidden(); |
|
115 | +} |
|
114 | 116 | |
115 | 117 | |
116 | 118 | /* |
@@ -46,8 +46,12 @@ |
||
46 | 46 | // 'ZAPIERFORDOLIBARR_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1) |
47 | 47 | ); |
48 | 48 | |
49 | -if (empty($conf->zapier->enabled)) accessforbidden(); |
|
50 | -if (empty($user->admin)) accessforbidden(); |
|
49 | +if (empty($conf->zapier->enabled)) { |
|
50 | + accessforbidden(); |
|
51 | +} |
|
52 | +if (empty($user->admin)) { |
|
53 | + accessforbidden(); |
|
54 | +} |
|
51 | 55 | |
52 | 56 | |
53 | 57 | /* |
@@ -489,8 +489,11 @@ discard block |
||
489 | 489 | print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>'; |
490 | 490 | |
491 | 491 | // Payment date |
492 | - if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>'; |
|
493 | - else print '<td></td>'; |
|
492 | + if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') { |
|
493 | + print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>'; |
|
494 | + } else { |
|
495 | + print '<td></td>'; |
|
496 | + } |
|
494 | 497 | |
495 | 498 | // Company name |
496 | 499 | print '<td class="tdmaxoverflow150">'; |
@@ -620,8 +623,11 @@ discard block |
||
620 | 623 | print '<tr class="liste_titre liste_titre_topborder">'; |
621 | 624 | print '<td class="left">'.$elementsup.'</td>'; |
622 | 625 | print '<td class="left">'.$langs->trans("DateInvoice").'</td>'; |
623 | - if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') print '<td class="left">'.$langs->trans("DatePayment").'</td>'; |
|
624 | - else print '<td></td>'; |
|
626 | + if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') { |
|
627 | + print '<td class="left">'.$langs->trans("DatePayment").'</td>'; |
|
628 | + } else { |
|
629 | + print '<td></td>'; |
|
630 | + } |
|
625 | 631 | print '<td class="left">'.$namesup.'</td>'; |
626 | 632 | print '<td class="left">'.$productsup.'</td>'; |
627 | 633 | if ($modetax != 1) { |
@@ -92,10 +92,18 @@ |
||
92 | 92 | global $langs; |
93 | 93 | $langs->load("admin"); |
94 | 94 | |
95 | - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); |
|
96 | - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); |
|
97 | - if ($this->version == 'dolibarr') return DOL_VERSION; |
|
98 | - if ($this->version) return $this->version; |
|
95 | + if ($this->version == 'development') { |
|
96 | + return $langs->trans("VersionDevelopment"); |
|
97 | + } |
|
98 | + if ($this->version == 'experimental') { |
|
99 | + return $langs->trans("VersionExperimental"); |
|
100 | + } |
|
101 | + if ($this->version == 'dolibarr') { |
|
102 | + return DOL_VERSION; |
|
103 | + } |
|
104 | + if ($this->version) { |
|
105 | + return $this->version; |
|
106 | + } |
|
99 | 107 | return $langs->trans("NotAvailable"); |
100 | 108 | } |
101 | 109 | } |
@@ -560,7 +560,9 @@ |
||
560 | 560 | $formmail = new FormMail($this->db); |
561 | 561 | $arraydefaultmessage = null; |
562 | 562 | |
563 | - if (!empty($labeltouse)) $arraydefaultmessage = $formmail->getEMailTemplate($this->db, $object_type.'_send', $user, $outputlangs, 0, 1, $labeltouse); |
|
563 | + if (!empty($labeltouse)) { |
|
564 | + $arraydefaultmessage = $formmail->getEMailTemplate($this->db, $object_type.'_send', $user, $outputlangs, 0, 1, $labeltouse); |
|
565 | + } |
|
564 | 566 | if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { |
565 | 567 | $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); |
566 | 568 | complete_substitutions_array($substitutionarray, $outputlangs, $object); |
@@ -568,7 +568,9 @@ discard block |
||
568 | 568 | |
569 | 569 | // Type |
570 | 570 | print '<td>'; |
571 | - if (!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code); |
|
571 | + if (!empty($obj->payment_code)) { |
|
572 | + print $langs->trans("PaymentTypeShort".$obj->payment_code); |
|
573 | + } |
|
572 | 574 | print '</td>'; |
573 | 575 | if (!$i) { |
574 | 576 | $totalarray['nbfield']++; |
@@ -621,7 +623,9 @@ discard block |
||
621 | 623 | $totalarray['val']['totalttcfield'] += $obj->amount; |
622 | 624 | |
623 | 625 | print '<td class="nowrap right">'.$salstatic->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>'; |
624 | - if (!$i) $totalarray['nbfield']++; |
|
626 | + if (!$i) { |
|
627 | + $totalarray['nbfield']++; |
|
628 | + } |
|
625 | 629 | |
626 | 630 | // Extra fields |
627 | 631 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; |
@@ -481,7 +481,9 @@ discard block |
||
481 | 481 | // Type |
482 | 482 | if (!empty($arrayfields['t.fk_typepayment']['checked'])) { |
483 | 483 | print '<td>'; |
484 | - if (!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code); |
|
484 | + if (!empty($obj->payment_code)) { |
|
485 | + print $langs->trans("PaymentTypeShort".$obj->payment_code); |
|
486 | + } |
|
485 | 487 | print '</td>'; |
486 | 488 | if (!$i) { |
487 | 489 | $totalarray['nbfield']++; |
@@ -508,7 +510,9 @@ discard block |
||
508 | 510 | print $bankstatic->getNomUrl(1); |
509 | 511 | } |
510 | 512 | print '</td>'; |
511 | - if (!$i) $totalarray['nbfield']++; |
|
513 | + if (!$i) { |
|
514 | + $totalarray['nbfield']++; |
|
515 | + } |
|
512 | 516 | } |
513 | 517 | |
514 | 518 | // Amount |