@@ -241,12 +241,12 @@ |
||
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | /** |
| 244 | - * Delete a language for this member type |
|
| 245 | - * |
|
| 246 | - * @param string $langtodelete Language code to delete |
|
| 247 | - * @param User $user Object user making delete |
|
| 248 | - * @return int <0 if KO, >0 if OK |
|
| 249 | - */ |
|
| 244 | + * Delete a language for this member type |
|
| 245 | + * |
|
| 246 | + * @param string $langtodelete Language code to delete |
|
| 247 | + * @param User $user Object user making delete |
|
| 248 | + * @return int <0 if KO, >0 if OK |
|
| 249 | + */ |
|
| 250 | 250 | public function delMultiLangs($langtodelete, $user) |
| 251 | 251 | { |
| 252 | 252 | $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_type_lang"; |
@@ -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 | /* |
@@ -42,8 +42,12 @@ |
||
| 42 | 42 | $action = GETPOST('action', 'aZ09'); |
| 43 | 43 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 44 | 44 | |
| 45 | -if (empty($conf->zapier->enabled)) accessforbidden(); |
|
| 46 | -if (empty($user->admin)) accessforbidden(); |
|
| 45 | +if (empty($conf->zapier->enabled)) { |
|
| 46 | + accessforbidden(); |
|
| 47 | +} |
|
| 48 | +if (empty($user->admin)) { |
|
| 49 | + accessforbidden(); |
|
| 50 | +} |
|
| 47 | 51 | |
| 48 | 52 | |
| 49 | 53 | /* |
@@ -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); |