@@ -100,7 +100,7 @@ |
||
100 | 100 | while ($line < $num) { |
101 | 101 | $objp = $this->db->fetch_object($result); |
102 | 102 | $date = $this->db->jdate($objp->date_movement); |
103 | - $journal = $objp->code_journal; |
|
103 | + $journal = $objp->code_journal; |
|
104 | 104 | $label = $objp->label_operation; |
105 | 105 | $amount = $objp->amount; |
106 | 106 |
@@ -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 | /* |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $sql .= preg_replace('/^,/', '', $hookmanager->resPrint); |
217 | 217 | $sql = preg_replace('/,\s*$/', '', $sql); |
218 | 218 | $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; |
219 | -if ( !empty($extrafields->attributes[$object->table_element]['label']) && ($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
|
219 | +if (!empty($extrafields->attributes[$object->table_element]['label']) && ($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
|
220 | 220 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; |
221 | 221 | } |
222 | 222 | if ($object->ismultientitymanaged == 1) { |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'"; |
248 | 248 | } |
249 | 249 | if (preg_match('/_dtend$/', $key)) { |
250 | - $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; |
|
250 | + $sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'"; |
|
251 | 251 | } |
252 | 252 | } |
253 | 253 | } |
@@ -449,9 +449,9 @@ discard block |
||
449 | 449 | if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { |
450 | 450 | print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); |
451 | 451 | } elseif (strpos($val['type'], 'integer:') === 0) { |
452 | - print $object->showInputField($val, $key, !empty($search[$key])?$search[$key]:0, '', '', 'search_', 'maxwidth150', 1); |
|
452 | + print $object->showInputField($val, $key, !empty($search[$key]) ? $search[$key] : 0, '', '', 'search_', 'maxwidth150', 1); |
|
453 | 453 | } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { |
454 | - print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(!empty($search[$key])?$search[$key]:'').'">'; |
|
454 | + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(!empty($search[$key]) ? $search[$key] : '').'">'; |
|
455 | 455 | } |
456 | 456 | print '</td>'; |
457 | 457 | } |
@@ -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 | /* |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $backurlforlist = dol_buildpath('/product/stock/productlot_list.php', 1); |
141 | 141 | |
142 | - if ($action == 'seteatby' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
142 | + if ($action == 'seteatby' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
143 | 143 | $newvalue = dol_mktime(12, 0, 0, GETPOST('eatbymonth', 'int'), GETPOST('eatbyday', 'int'), GETPOST('eatbyyear', 'int')); |
144 | 144 | $result = $object->setValueFrom('eatby', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
145 | 145 | if ($result < 0) { |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | } |
152 | 152 | |
153 | - if ($action == 'setsellby' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
153 | + if ($action == 'setsellby' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
154 | 154 | $newvalue = dol_mktime(12, 0, 0, GETPOST('sellbymonth', 'int'), GETPOST('sellbyday', 'int'), GETPOST('sellbyyear', 'int')); |
155 | 155 | $result = $object->setValueFrom('sellby', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
156 | 156 | if ($result < 0) { |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | } |
163 | 163 | |
164 | - if ($action == 'seteol_date' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
164 | + if ($action == 'seteol_date' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
165 | 165 | $newvalue = dol_mktime(12, 0, 0, GETPOST('eol_datemonth', 'int'), GETPOST('eol_dateday', 'int'), GETPOST('eol_dateyear', 'int')); |
166 | 166 | $result = $object->setValueFrom('eol_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
167 | 167 | if ($result < 0) { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | } |
173 | 173 | } |
174 | 174 | |
175 | - if ($action == 'setmanufacturing_date' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
175 | + if ($action == 'setmanufacturing_date' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
176 | 176 | $newvalue = dol_mktime(12, 0, 0, GETPOST('manufacturing_datemonth', 'int'), GETPOST('manufacturing_dateday', 'int'), GETPOST('manufacturing_dateyear', 'int')); |
177 | 177 | $result = $object->setValueFrom('manufacturing_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
178 | 178 | if ($result < 0) { |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
186 | - if ($action == 'setscrapping_date' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
186 | + if ($action == 'setscrapping_date' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
187 | 187 | $newvalue = dol_mktime(12, 0, 0, GETPOST('scrapping_datemonth', 'int'), GETPOST('scrapping_dateday', 'int'), GETPOST('scrapping_dateyear', 'int')); |
188 | 188 | $result = $object->setValueFrom('scrapping_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
189 | 189 | if ($result < 0) { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } |
206 | 206 | } */ |
207 | 207 | |
208 | - if ($action == 'setqc_frequency' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
208 | + if ($action == 'setqc_frequency' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
209 | 209 | $result = $object->setValueFrom('qc_frequency', GETPOST('qc_frequency'), '', null, 'int', '', $user, 'PRODUCT_MODIFY'); |
210 | 210 | if ($result < 0) { // Prévoir un test de format de durée |
211 | 211 | setEventMessages($object->error, null, 'errors'); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $object->date_ech = $dateech; |
167 | 167 | $object->periode = $dateperiod; |
168 | 168 | $object->amount = $amount; |
169 | - $object->fk_user = $fk_user; |
|
169 | + $object->fk_user = $fk_user; |
|
170 | 170 | $object->mode_reglement_id = (int) GETPOST('mode_reglement_id', 'int'); |
171 | 171 | $object->fk_account = (int) GETPOST('fk_account', 'int'); |
172 | 172 | $object->fk_project = (int) GETPOST('fk_project', 'int'); |
@@ -449,10 +449,10 @@ discard block |
||
449 | 449 | $userstatic = new User($db); |
450 | 450 | $result = $userstatic->fetch($object->fk_user); |
451 | 451 | if ($result > 0) { |
452 | - $morehtmlref .= '<br>' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(1); |
|
452 | + $morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$userstatic->getNomUrl(1); |
|
453 | 453 | } |
454 | 454 | } else { |
455 | - $morehtmlref .= '<br>' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); |
|
455 | + $morehtmlref .= '<br>'.$form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); |
|
456 | 456 | if (!empty($object->fk_user)) { |
457 | 457 | $userstatic = new User($db); |
458 | 458 | $result = $userstatic->fetch($object->fk_user); |
@@ -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) { |
@@ -406,13 +406,13 @@ discard block |
||
406 | 406 | if (is_array($x_both[$rate]['coll']['detail'])) { |
407 | 407 | // VAT Rate |
408 | 408 | print "<tr>"; |
409 | - print '<td class="tax_rate" colspan="' . ($span+1) . '">'; |
|
410 | - print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%'; |
|
409 | + print '<td class="tax_rate" colspan="'.($span + 1).'">'; |
|
410 | + print $langs->trans('Rate').' : '.vatrate($rate).'%'; |
|
411 | 411 | print ' - <a href="'.DOL_URL_ROOT.'/compta/tva/quadri_detail.php?invoice_type=customer'; |
412 | 412 | if ($invoice_type != 'customer' || !GETPOSTISSET('vat_rate_show') || GETPOST('vat_rate_show') != $rate) { |
413 | 413 | print '&vat_rate_show='.urlencode($rate); |
414 | 414 | } |
415 | - print '&date_startyear='.urlencode($date_start_year).'&date_startmonth='.urlencode($date_start_month).'&date_startday='.urlencode($date_start_day).'&date_endyear='.urlencode($date_end_year).'&date_endmonth='.urlencode($date_end_month).'&date_endday='.urlencode($date_end_day).'">' . img_picto('', 'chevron-down', 'class="paddingrightonly"') . $langs->trans('VATReportShowByRateDetails') . '</a>'; |
|
415 | + print '&date_startyear='.urlencode($date_start_year).'&date_startmonth='.urlencode($date_start_month).'&date_startday='.urlencode($date_start_day).'&date_endyear='.urlencode($date_end_year).'&date_endmonth='.urlencode($date_end_month).'&date_endday='.urlencode($date_end_day).'">'.img_picto('', 'chevron-down', 'class="paddingrightonly"').$langs->trans('VATReportShowByRateDetails').'</a>'; |
|
416 | 416 | print '</td>'; |
417 | 417 | print '</tr>'."\n"; |
418 | 418 | |
@@ -430,22 +430,22 @@ discard block |
||
430 | 430 | } |
431 | 431 | |
432 | 432 | // Payment |
433 | - $ratiopaymentinvoice=1; |
|
433 | + $ratiopaymentinvoice = 1; |
|
434 | 434 | if ($modetax != 1) { |
435 | 435 | if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') |
436 | 436 | || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) { |
437 | 437 | } else { |
438 | 438 | if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { |
439 | - $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); |
|
439 | + $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); |
|
440 | 440 | } |
441 | 441 | } |
442 | 442 | } |
443 | 443 | |
444 | 444 | // Total collected |
445 | - $temp_ht=$fields['totalht']*$ratiopaymentinvoice; |
|
445 | + $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; |
|
446 | 446 | |
447 | 447 | // VAT |
448 | - $temp_vat=$fields['vat']*$ratiopaymentinvoice; |
|
448 | + $temp_vat = $fields['vat'] * $ratiopaymentinvoice; |
|
449 | 449 | |
450 | 450 | $subtot_coll_total_ht += $temp_ht; |
451 | 451 | $subtot_coll_vat += $temp_vat; |
@@ -485,13 +485,13 @@ discard block |
||
485 | 485 | print '<tr class="oddeven">'; |
486 | 486 | |
487 | 487 | // Ref |
488 | - print '<td class="nowrap left">' . $fields['link'] . '</td>'; |
|
488 | + print '<td class="nowrap left">'.$fields['link'].'</td>'; |
|
489 | 489 | |
490 | 490 | // Invoice date |
491 | - print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>'; |
|
491 | + print '<td class="left">'.dol_print_date($fields['datef'], 'day').'</td>'; |
|
492 | 492 | |
493 | 493 | // Payment date |
494 | - 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>'; |
|
494 | + 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>'; |
|
495 | 495 | else print '<td></td>'; |
496 | 496 | |
497 | 497 | // Company name |
@@ -505,10 +505,10 @@ discard block |
||
505 | 505 | if ($fields['pid']) { |
506 | 506 | $product_static->id = $fields['pid']; |
507 | 507 | $product_static->ref = $fields['pref']; |
508 | - $product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered |
|
508 | + $product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered |
|
509 | 509 | print $product_static->getNomUrl(1); |
510 | 510 | if (dol_string_nohtmltag($fields['descr'])) { |
511 | - print ' - ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24); |
|
511 | + print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); |
|
512 | 512 | } |
513 | 513 | } else { |
514 | 514 | if ($type) { |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | $fields['descr'] = $langs->transnoentitiesnoconv($reg[1]); |
526 | 526 | } |
527 | 527 | } |
528 | - print $text . ' ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24); |
|
528 | + print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); |
|
529 | 529 | |
530 | 530 | // Show range |
531 | 531 | print_date_range($fields['ddate_start'], $fields['ddate_end']); |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | } |
564 | 564 | print price(price2num($fields['payment_amount'], 'MT')); |
565 | 565 | if (isset($fields['payment_amount'])) { |
566 | - print ' (' . round($ratiopaymentinvoice * 100, 2) . '%)'; |
|
566 | + print ' ('.round($ratiopaymentinvoice * 100, 2).'%)'; |
|
567 | 567 | } |
568 | 568 | } |
569 | 569 | print '</td>'; |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | } |
617 | 617 | |
618 | 618 | // Blank line |
619 | - print '<tr><td colspan="'.($span+2).'"> </td></tr>'; |
|
619 | + print '<tr><td colspan="'.($span + 2).'"> </td></tr>'; |
|
620 | 620 | |
621 | 621 | // Print table headers for this quadri - expenses |
622 | 622 | print '<tr class="liste_titre liste_titre_topborder">'; |
@@ -640,13 +640,13 @@ discard block |
||
640 | 640 | |
641 | 641 | if (is_array($x_both[$rate]['paye']['detail'])) { |
642 | 642 | print "<tr>"; |
643 | - print '<td class="tax_rate" colspan="' . ($span+1) . '">'; |
|
644 | - print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%'; |
|
643 | + print '<td class="tax_rate" colspan="'.($span + 1).'">'; |
|
644 | + print $langs->trans('Rate').' : '.vatrate($rate).'%'; |
|
645 | 645 | print ' - <a href="'.DOL_URL_ROOT.'/compta/tva/quadri_detail.php?invoice_type=supplier'; |
646 | 646 | if ($invoice_type != 'supplier' || !GETPOSTISSET('vat_rate_show') || GETPOST('vat_rate_show') != $rate) { |
647 | 647 | print '&vat_rate_show='.urlencode($rate); |
648 | 648 | } |
649 | - print '&date_startyear='.urlencode($date_start_year).'&date_startmonth='.urlencode($date_start_month).'&date_startday='.urlencode($date_start_day).'&date_endyear='.urlencode($date_end_year).'&date_endmonth='.urlencode($date_end_month).'&date_endday='.urlencode($date_end_day).'">' . img_picto('', 'chevron-down', 'class="paddingrightonly"') . $langs->trans('VATReportShowByRateDetails') . '</a>'; |
|
649 | + print '&date_startyear='.urlencode($date_start_year).'&date_startmonth='.urlencode($date_start_month).'&date_startday='.urlencode($date_start_day).'&date_endyear='.urlencode($date_end_year).'&date_endmonth='.urlencode($date_end_month).'&date_endday='.urlencode($date_end_day).'">'.img_picto('', 'chevron-down', 'class="paddingrightonly"').$langs->trans('VATReportShowByRateDetails').'</a>'; |
|
650 | 650 | print '</td>'; |
651 | 651 | print '</tr>'."\n"; |
652 | 652 | |
@@ -717,14 +717,14 @@ discard block |
||
717 | 717 | print '<tr class="oddeven">'; |
718 | 718 | |
719 | 719 | // Ref |
720 | - print '<td class="nowrap left">' . $fields['link'] . '</td>'; |
|
720 | + print '<td class="nowrap left">'.$fields['link'].'</td>'; |
|
721 | 721 | |
722 | 722 | // Invoice date |
723 | - print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>'; |
|
723 | + print '<td class="left">'.dol_print_date($fields['datef'], 'day').'</td>'; |
|
724 | 724 | |
725 | 725 | // Payment date |
726 | 726 | if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') { |
727 | - print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>'; |
|
727 | + print '<td class="left">'.dol_print_date($fields['datep'], 'day').'</td>'; |
|
728 | 728 | } else { |
729 | 729 | print '<td></td>'; |
730 | 730 | } |
@@ -740,10 +740,10 @@ discard block |
||
740 | 740 | if ($fields['pid']) { |
741 | 741 | $product_static->id = $fields['pid']; |
742 | 742 | $product_static->ref = $fields['pref']; |
743 | - $product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered |
|
743 | + $product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered |
|
744 | 744 | print $product_static->getNomUrl(1); |
745 | 745 | if (dol_string_nohtmltag($fields['descr'])) { |
746 | - print ' - ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24); |
|
746 | + print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); |
|
747 | 747 | } |
748 | 748 | } else { |
749 | 749 | if ($type) { |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | $fields['descr'] = $langs->transnoentitiesnoconv($reg[1]); |
761 | 761 | } |
762 | 762 | } |
763 | - print $text . ' ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24); |
|
763 | + print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); |
|
764 | 764 | |
765 | 765 | // Show range |
766 | 766 | print_date_range($fields['ddate_start'], $fields['ddate_end']); |
@@ -798,7 +798,7 @@ discard block |
||
798 | 798 | } |
799 | 799 | print price(price2num($fields['payment_amount'], 'MT')); |
800 | 800 | if (isset($fields['payment_amount'])) { |
801 | - print ' (' . round($ratiopaymentinvoice * 100, 2) . '%)'; |
|
801 | + print ' ('.round($ratiopaymentinvoice * 100, 2).'%)'; |
|
802 | 802 | } |
803 | 803 | } |
804 | 804 | print '</td>'; |
@@ -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); |