@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha'); |
85 | 85 | $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha'); |
86 | 86 | $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); |
87 | -$search_status = GETPOST('search_status', 'intcomma'); // Can be '' or a numeric |
|
87 | +$search_status = GETPOST('search_status', 'intcomma'); // Can be '' or a numeric |
|
88 | 88 | $search_paymentmode = GETPOST('search_paymentmode', 'intcomma'); |
89 | 89 | $search_paymentcond = GETPOST('search_paymentcond', 'intcomma'); |
90 | 90 | $search_town = GETPOST('search_town', 'alpha'); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | $object->fields = dol_sort_array($object->fields, 'position'); |
218 | 218 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
219 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
219 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
220 | 220 | |
221 | 221 | if (!isModEnabled('supplier_invoice')) { |
222 | 222 | accessforbidden(); |
@@ -624,16 +624,16 @@ discard block |
||
624 | 624 | $sql .= " AND f.fk_cond_reglement = ".((int) $search_paymentcond); |
625 | 625 | } |
626 | 626 | if ($search_date_start) { |
627 | - $sql .= " AND f.datef >= '" . $db->idate($search_date_start) . "'"; |
|
627 | + $sql .= " AND f.datef >= '".$db->idate($search_date_start)."'"; |
|
628 | 628 | } |
629 | 629 | if ($search_date_end) { |
630 | - $sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'"; |
|
630 | + $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'"; |
|
631 | 631 | } |
632 | 632 | if ($search_datelimit_start) { |
633 | - $sql .= " AND f.date_lim_reglement >= '" . $db->idate($search_datelimit_start) . "'"; |
|
633 | + $sql .= " AND f.date_lim_reglement >= '".$db->idate($search_datelimit_start)."'"; |
|
634 | 634 | } |
635 | 635 | if ($search_datelimit_end) { |
636 | - $sql .= " AND f.date_lim_reglement <= '" . $db->idate($search_datelimit_end) . "'"; |
|
636 | + $sql .= " AND f.date_lim_reglement <= '".$db->idate($search_datelimit_end)."'"; |
|
637 | 637 | } |
638 | 638 | if ($option == 'late') { |
639 | 639 | $sql .= " AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->fournisseur->warning_delay)."'"; |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | if ($searchCategorySupplierOperator == 0) { |
663 | 663 | $searchCategorySupplierSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = ".((int) $searchCategorySupplier).")"; |
664 | 664 | } else { |
665 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategorySupplier); |
|
665 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategorySupplier); |
|
666 | 666 | } |
667 | 667 | } |
668 | 668 | } |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | if ($searchCategoryProductOperator == 0) { |
693 | 693 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."facture_fourn_det as fd WHERE fd.fk_facture_fourn = f.rowid AND fd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
694 | 694 | } else { |
695 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
695 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
696 | 696 | } |
697 | 697 | } |
698 | 698 | } |
@@ -1068,7 +1068,7 @@ discard block |
||
1068 | 1068 | } |
1069 | 1069 | |
1070 | 1070 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
1071 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1071 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1072 | 1072 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
1073 | 1073 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1074 | 1074 | |
@@ -1509,8 +1509,8 @@ discard block |
||
1509 | 1509 | $totalarray['val']['f.total_localtax1'] = 0; |
1510 | 1510 | $totalarray['val']['f.total_localtax1'] = 0; |
1511 | 1511 | $totalarray['val']['f.total_ttc'] = 0; |
1512 | -$totalarray['val']['totalam']=0; |
|
1513 | -$totalarray['val']['rtp']=0; |
|
1512 | +$totalarray['val']['totalam'] = 0; |
|
1513 | +$totalarray['val']['rtp'] = 0; |
|
1514 | 1514 | |
1515 | 1515 | $imaxinloop = ($limit ? min($num, $limit) : $num); |
1516 | 1516 | while ($i < $imaxinloop) { |
@@ -1921,7 +1921,7 @@ discard block |
||
1921 | 1921 | $totalarray['pos'][$totalarray['nbfield']] = 'totalam'; |
1922 | 1922 | } |
1923 | 1923 | if (empty($totalarray['val']['totalam'])) { |
1924 | - $totalarray['val']['totalam'] = 0; // avoid PHP Warning: Undefined array key "totalam" on line 1891 |
|
1924 | + $totalarray['val']['totalam'] = 0; // avoid PHP Warning: Undefined array key "totalam" on line 1891 |
|
1925 | 1925 | } |
1926 | 1926 | $totalarray['val']['totalam'] += $totalpay; |
1927 | 1927 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | $object->fields = dol_sort_array($object->fields, 'position'); |
143 | 143 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
144 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
144 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
145 | 145 | |
146 | 146 | $permissiontoread = $user->hasRight('variants', 'read'); |
147 | 147 | $permissiontoadd = $user->hasRight('variants', 'write'); |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | $hasgroupby = true; |
311 | 311 | $sql .= " GROUP BY "; |
312 | 312 | foreach ($object->fields as $key => $val) { |
313 | - $sql .= "t." . $key . ", "; |
|
313 | + $sql .= "t.".$key.", "; |
|
314 | 314 | } |
315 | 315 | // Add fields from extrafields |
316 | 316 | //if (!empty($extrafields->attributes[$object->table_element]['label'])) { |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | //} |
321 | 321 | // Add where from hooks |
322 | 322 | $parameters = array(); |
323 | -$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook |
|
323 | +$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook |
|
324 | 324 | $sql .= $hookmanager->resPrint; |
325 | 325 | $sql = preg_replace("/,\s*$/", "", $sql); |
326 | 326 | |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) { |
386 | 386 | $obj = $db->fetch_object($resql); |
387 | 387 | $id = $obj->rowid; |
388 | - header("Location: " . dol_buildpath('/variants/card.php', 2) . '?id=' . $id); |
|
388 | + header("Location: ".dol_buildpath('/variants/card.php', 2).'?id='.$id); |
|
389 | 389 | exit; |
390 | 390 | } |
391 | 391 | |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | } |
510 | 510 | |
511 | 511 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
512 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
512 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
513 | 513 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
514 | 514 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
515 | 515 | |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
614 | 614 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
615 | 615 | } |
616 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
616 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
617 | 617 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
618 | 618 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
619 | 619 | $totalarray['nbfield']++; |
@@ -711,23 +711,23 @@ discard block |
||
711 | 711 | foreach ($object->fields as $key => $val) { |
712 | 712 | $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); |
713 | 713 | if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { |
714 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
714 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
715 | 715 | } elseif ($key == 'status') { |
716 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
716 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
717 | 717 | } |
718 | 718 | |
719 | 719 | if (in_array($val['type'], array('timestamp'))) { |
720 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap'; |
|
720 | + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; |
|
721 | 721 | } elseif ($key == 'ref') { |
722 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap'; |
|
722 | + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; |
|
723 | 723 | } |
724 | 724 | |
725 | 725 | if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) { |
726 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
|
726 | + $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
|
727 | 727 | } |
728 | 728 | //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; |
729 | 729 | |
730 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
730 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
731 | 731 | print '<td'.($cssforfield ? ' class="'.$cssforfield.(preg_match('/tdoverflow/', $cssforfield) ? ' classfortooltip' : '').'"' : ''); |
732 | 732 | if (preg_match('/tdoverflow/', $cssforfield) && !is_numeric($object->$key)) { |
733 | 733 | print ' title="'.dol_escape_htmltag($object->$key).'"'; |
@@ -746,15 +746,15 @@ discard block |
||
746 | 746 | } |
747 | 747 | if (!empty($val['isameasure']) && $val['isameasure'] == 1) { |
748 | 748 | if (!$i) { |
749 | - $totalarray['pos'][$totalarray['nbfield']] = 't.' . $key; |
|
749 | + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; |
|
750 | 750 | } |
751 | 751 | if (!isset($totalarray['val'])) { |
752 | 752 | $totalarray['val'] = array(); |
753 | 753 | } |
754 | - if (!isset($totalarray['val']['t.' . $key])) { |
|
755 | - $totalarray['val']['t.' . $key] = 0; |
|
754 | + if (!isset($totalarray['val']['t.'.$key])) { |
|
755 | + $totalarray['val']['t.'.$key] = 0; |
|
756 | 756 | } |
757 | - $totalarray['val']['t.' . $key] += $object->$key; |
|
757 | + $totalarray['val']['t.'.$key] += $object->$key; |
|
758 | 758 | } |
759 | 759 | } |
760 | 760 | } |
@@ -801,14 +801,14 @@ discard block |
||
801 | 801 | // Move |
802 | 802 | print '<td class="center linecolmove tdlineupdown">'; |
803 | 803 | if ($i > 0) { |
804 | - print '<a class="lineupdown" href="' . $_SERVER['PHP_SELF'] . '?action=up&rowid=' . $obj->rowid . '">' . img_up('default', 0, 'imgupforline') . '</a>'; |
|
804 | + print '<a class="lineupdown" href="'.$_SERVER['PHP_SELF'].'?action=up&rowid='.$obj->rowid.'">'.img_up('default', 0, 'imgupforline').'</a>'; |
|
805 | 805 | } |
806 | 806 | if ($i < $num - 1) { |
807 | - print '<a class="lineupdown" href="' . $_SERVER['PHP_SELF'] . '?action=down&rowid=' . $obj->rowid . '">' . img_down('default', 0, 'imgdownforline') . '</a>'; |
|
807 | + print '<a class="lineupdown" href="'.$_SERVER['PHP_SELF'].'?action=down&rowid='.$obj->rowid.'">'.img_down('default', 0, 'imgdownforline').'</a>'; |
|
808 | 808 | } |
809 | 809 | print '</td>'; |
810 | 810 | |
811 | - print '</tr>' . "\n"; |
|
811 | + print '</tr>'."\n"; |
|
812 | 812 | } |
813 | 813 | |
814 | 814 | $i++; |
@@ -37,15 +37,15 @@ discard block |
||
37 | 37 | $langs->loadLangs(array('other')); |
38 | 38 | |
39 | 39 | // Get Parameters |
40 | -$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
41 | -$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
42 | -$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
|
43 | -$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
44 | -$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
45 | -$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
46 | -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'targetlist'; // To manage different context of search |
|
47 | -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
48 | -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
40 | +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
41 | +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
42 | +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
|
43 | +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
44 | +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
45 | +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
46 | +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'targetlist'; // To manage different context of search |
|
47 | +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
48 | +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
49 | 49 | $mode = GETPOST('mode', 'aZ'); |
50 | 50 | if (empty($mode)) { |
51 | 51 | $mode = 'modulesetup'; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | // Default sort order (if not yet defined by previous GETPOST) |
82 | 82 | if (!$sortfield) { |
83 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
83 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
84 | 84 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
85 | 85 | } |
86 | 86 | if (!$sortorder) { |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | } |
513 | 513 | |
514 | 514 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
515 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
515 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
516 | 516 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
517 | 517 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
518 | 518 | |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
607 | 607 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
608 | 608 | } |
609 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
609 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
610 | 610 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
611 | 611 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
612 | 612 | $totalarray['nbfield']++; |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | |
173 | 173 | $parameters = array(); |
174 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
174 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
175 | 175 | if ($reshook < 0) { |
176 | 176 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
177 | 177 | } |
@@ -186,9 +186,9 @@ discard block |
||
186 | 186 | $bankaccount = GETPOSTINT('accountid'); |
187 | 187 | } else { |
188 | 188 | if ($pay == 'LIQ') { |
189 | - $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
189 | + $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
190 | 190 | } elseif ($pay == "CHQ") { |
191 | - $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
191 | + $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
192 | 192 | } else { |
193 | 193 | $accountname = "CASHDESK_ID_BANKACCOUNT_".$pay.$_SESSION["takeposterminal"]; |
194 | 194 | $bankaccount = getDolGlobalInt($accountname); |
@@ -253,10 +253,10 @@ discard block |
||
253 | 253 | $savconst = getDolGlobalString('STOCK_CALCULATE_ON_BILL'); |
254 | 254 | |
255 | 255 | if (isModEnabled('productbatch') && !getDolGlobalInt('CASHDESK_FORCE_DECREASE_STOCK')) { |
256 | - $conf->global->STOCK_CALCULATE_ON_BILL = 0; // To not change the stock (this will be done later) |
|
256 | + $conf->global->STOCK_CALCULATE_ON_BILL = 0; // To not change the stock (this will be done later) |
|
257 | 257 | } else { |
258 | 258 | // Deprecated: CASHDESK_FORCE_DECREASE_STOCK is now always false. No more required/used. |
259 | - $conf->global->STOCK_CALCULATE_ON_BILL = 1; // To force the change of stock |
|
259 | + $conf->global->STOCK_CALCULATE_ON_BILL = 1; // To force the change of stock |
|
260 | 260 | } |
261 | 261 | |
262 | 262 | $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | // Update stock for batch products |
333 | 333 | if (!$error && $res >= 0) { |
334 | 334 | if (isModEnabled('stock') && isModEnabled('productbatch')) { // The case !isModEnabled('productbatch') was processed few lines before. |
335 | - require_once DOL_DOCUMENT_ROOT . "/product/stock/class/mouvementstock.class.php"; |
|
335 | + require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"; |
|
336 | 336 | $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; |
337 | 337 | $inventorycode = dol_print_date(dol_now(), 'dayhourlog'); |
338 | 338 | $labeltakeposmovement = 'TakePOS - '.$langs->trans("Invoice").' '.$invoice->ref; |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | $creditnote->socid = $invoice->socid; |
378 | 378 | $creditnote->date = dol_now(); |
379 | 379 | $creditnote->module_source = 'takepos'; |
380 | - $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; |
|
380 | + $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''; |
|
381 | 381 | $creditnote->type = Facture::TYPE_CREDIT_NOTE; |
382 | 382 | $creditnote->fk_facture_source = $placeid; |
383 | 383 | //$creditnote->remise_absolue = $invoice->remise_absolue; |
@@ -534,9 +534,9 @@ discard block |
||
534 | 534 | // If we add a line and no invoice yet, we create the invoice |
535 | 535 | if (($action == "addline" || $action == "freezone") && $placeid == 0 && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) { |
536 | 536 | $invoice->socid = getDolGlobalInt($constforcompanyid); |
537 | - $invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved. |
|
537 | + $invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved. |
|
538 | 538 | $invoice->module_source = 'takepos'; |
539 | - $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; |
|
539 | + $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''; |
|
540 | 540 | $invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity; |
541 | 541 | |
542 | 542 | if ($invoice->socid <= 0) { |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | |
747 | 747 | // complete line by hook |
748 | 748 | $parameters = array('prod' => $prod, 'line' => $line); |
749 | - $reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks |
|
749 | + $reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks |
|
750 | 750 | if ($reshook < 0) { |
751 | 751 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
752 | 752 | } |
@@ -941,7 +941,7 @@ discard block |
||
941 | 941 | } |
942 | 942 | if (!$permissiontoupdateline) { |
943 | 943 | dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos").' - No permission to updateprice', null, 1); |
944 | - } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { |
|
944 | + } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { |
|
945 | 945 | $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
946 | 946 | } else { |
947 | 947 | $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
@@ -1005,7 +1005,7 @@ discard block |
||
1005 | 1005 | |
1006 | 1006 | if ($action == "setbatch" && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) { |
1007 | 1007 | $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; |
1008 | - $warehouseid = getDolGlobalInt($constantforkey); // TODO Get the wrehouse id from GETPOSTINT('warehouseid'); |
|
1008 | + $warehouseid = getDolGlobalInt($constantforkey); // TODO Get the wrehouse id from GETPOSTINT('warehouseid'); |
|
1009 | 1009 | $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET batch = '".$db->escape($batch)."', fk_warehouse = ".((int) $warehouseid); |
1010 | 1010 | $sql .= " WHERE rowid=".((int) $idoflineadded); |
1011 | 1011 | $db->query($sql); |
@@ -1153,7 +1153,7 @@ discard block |
||
1153 | 1153 | |
1154 | 1154 | $sectionwithinvoicelink .= '</span><br>'; |
1155 | 1155 | if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) { |
1156 | - $sectionwithinvoicelink .= ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">Invoice</a>'; |
|
1156 | + $sectionwithinvoicelink .= ' <a target="_blank" class="button" href="'.DOL_URL_ROOT.'/document.php?token='.newToken().'&modulepart=facture&file='.$invoice->ref.'/'.$invoice->ref.'.pdf">Invoice</a>'; |
|
1157 | 1157 | } elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { |
1158 | 1158 | if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) { |
1159 | 1159 | $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposConnector('.$placeid.')">'.$langs->trans('PrintTicket').'</button>'; |
@@ -1192,7 +1192,7 @@ discard block |
||
1192 | 1192 | if ((getDolGlobalString('TAKEPOS_PHONE_BASIC_LAYOUT') == 1 && $conf->browser->layout == 'phone') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { |
1193 | 1193 | $title = 'TakePOS - Dolibarr '.DOL_VERSION; |
1194 | 1194 | if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { |
1195 | - $title = 'TakePOS - ' . getDolGlobalString('MAIN_APPLICATION_TITLE'); |
|
1195 | + $title = 'TakePOS - '.getDolGlobalString('MAIN_APPLICATION_TITLE'); |
|
1196 | 1196 | } |
1197 | 1197 | $head = '<meta name="apple-mobile-web-app-title" content="TakePOS"/> |
1198 | 1198 | <meta name="apple-mobile-web-app-capable" content="yes"> |
@@ -1417,7 +1417,7 @@ discard block |
||
1417 | 1417 | if ($contactid > 0) { |
1418 | 1418 | $contact = new Contact($db); |
1419 | 1419 | $contact->fetch($contactid); |
1420 | - $s .= " - " . $contact->getFullName($langs); |
|
1420 | + $s .= " - ".$contact->getFullName($langs); |
|
1421 | 1421 | } |
1422 | 1422 | } |
1423 | 1423 | } |
@@ -1478,10 +1478,10 @@ discard block |
||
1478 | 1478 | $s = ''; |
1479 | 1479 | |
1480 | 1480 | $idwarehouse = 0; |
1481 | - $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1481 | + $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1482 | 1482 | if (isModEnabled('stock')) { |
1483 | 1483 | if (getDolGlobalString($constantforkey) != "1") { |
1484 | - $constantforkey = 'CASHDESK_ID_WAREHOUSE'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1484 | + $constantforkey = 'CASHDESK_ID_WAREHOUSE'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1485 | 1485 | $idwarehouse = getDolGlobalString($constantforkey); |
1486 | 1486 | if ($idwarehouse > 0) { |
1487 | 1487 | $s = '<span class="small">'; |
@@ -1629,7 +1629,7 @@ discard block |
||
1629 | 1629 | |
1630 | 1630 | // Complete header by hook |
1631 | 1631 | $parameters = array(); |
1632 | -$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1632 | +$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1633 | 1633 | if ($reshook < 0) { |
1634 | 1634 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1635 | 1635 | } |
@@ -1643,16 +1643,16 @@ discard block |
||
1643 | 1643 | print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>'; |
1644 | 1644 | if (getDolGlobalString('TAKEPOS_SHOW_HT')) { |
1645 | 1645 | print '<td class="linecolht right nowraponall">'; |
1646 | - print '<span class="opacitymedium small">' . $langs->trans('TotalHTShort') . '</span><br>'; |
|
1646 | + print '<span class="opacitymedium small">'.$langs->trans('TotalHTShort').'</span><br>'; |
|
1647 | 1647 | // In phone version only show when it is invoice page |
1648 | 1648 | if (empty($mobilepage) || $mobilepage == "invoice") { |
1649 | - print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">' . price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency) . '</span>'; |
|
1649 | + print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">'.price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency).'</span>'; |
|
1650 | 1650 | if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]) && $conf->currency != $_SESSION["takeposcustomercurrency"]) { |
1651 | 1651 | //Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency |
1652 | - include_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php'; |
|
1652 | + include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; |
|
1653 | 1653 | $multicurrency = new MultiCurrency($db); |
1654 | 1654 | $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); |
1655 | - print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
1655 | + print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">('.price($invoice->total_ht * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
1656 | 1656 | } |
1657 | 1657 | } |
1658 | 1658 | print '</td>'; |
@@ -1796,7 +1796,7 @@ discard block |
||
1796 | 1796 | |
1797 | 1797 | // complete line by hook |
1798 | 1798 | $parameters = array('line' => $line); |
1799 | - $reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1799 | + $reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1800 | 1800 | if ($reshook < 0) { |
1801 | 1801 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1802 | 1802 | } |
@@ -1851,7 +1851,7 @@ discard block |
||
1851 | 1851 | } |
1852 | 1852 | } |
1853 | 1853 | if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) { |
1854 | - $htmlforlines .= $form->textwithpicto($line->product_label ? '<b>' . $line->product_ref . '</b> - ' . $line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
|
1854 | + $htmlforlines .= $form->textwithpicto($line->product_label ? '<b>'.$line->product_ref.'</b> - '.$line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
|
1855 | 1855 | } elseif (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 2) { |
1856 | 1856 | $htmlforlines .= $form->textwithpicto($line->product_ref ? '<b>'.$line->product_ref.'<b>' : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
1857 | 1857 | } else { |
@@ -1898,7 +1898,7 @@ discard block |
||
1898 | 1898 | |
1899 | 1899 | // complete line by hook |
1900 | 1900 | $parameters = array('line' => $line); |
1901 | - $reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1901 | + $reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1902 | 1902 | if ($reshook < 0) { |
1903 | 1903 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1904 | 1904 | } |
@@ -2004,7 +2004,7 @@ discard block |
||
2004 | 2004 | if (($action == "valid" || $action == "history") && $invoice->type != Facture::TYPE_CREDIT_NOTE && !getDolGlobalString('TAKEPOS_NO_CREDITNOTE')) { |
2005 | 2005 | print '<button id="buttonprint" type="button" onclick="ModalBox(\'ModalCreditNote\')">'.$langs->trans('CreateCreditNote').'</button>'; |
2006 | 2006 | if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) { |
2007 | - print ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">Invoice</a>'; |
|
2007 | + print ' <a target="_blank" class="button" href="'.DOL_URL_ROOT.'/document.php?token='.newToken().'&modulepart=facture&file='.$invoice->ref.'/'.$invoice->ref.'.pdf">Invoice</a>'; |
|
2008 | 2008 | } |
2009 | 2009 | } |
2010 | 2010 |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) { |
529 | 529 | // Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency |
530 | 530 | $showothercurrency = 1; |
531 | - include_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php'; |
|
531 | + include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; |
|
532 | 532 | $multicurrency = new MultiCurrency($db); |
533 | 533 | $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); |
534 | 534 | } |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | <span class="takepospay colorwhite"><?php echo $langs->trans('TotalTTC'); ?>: <span id="totaldisplay" class="colorwhite"><?php |
540 | 540 | echo price($invoice->total_ttc, 1, '', 1, -1, -1, $conf->currency); |
541 | 541 | if ($showothercurrency) { |
542 | - print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
542 | + print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">('.price($invoice->total_ht * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
543 | 543 | } |
544 | 544 | ?></span></span> |
545 | 545 | </div> |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | <span class="takepospay colorwhite"><?php echo $langs->trans('RemainToPay'); ?>: <span id="remaintopaydisplay" class="colorwhite"><?php |
549 | 549 | echo price($remaintopay, 1, '', 1, -1, -1, $invoice->multicurrency_code); |
550 | 550 | if ($showothercurrency) { |
551 | - print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price($remaintopay * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
551 | + print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">('.price($remaintopay * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
552 | 552 | } |
553 | 553 | ?></span></span> |
554 | 554 | </div> |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | <span class="takepospay colorwhite"><?php echo $langs->trans("Received"); ?>: <span class="change1 colorred"><?php |
558 | 558 | echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); |
559 | 559 | if ($showothercurrency) { |
560 | - print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price(0 * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
560 | + print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">('.price(0 * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
561 | 561 | } |
562 | 562 | ?></span><input type="hidden" id="change1" class="change1" value="0"></span> |
563 | 563 | </div> |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | <span class="takepospay colorwhite"><?php echo $langs->trans("Change"); ?>: <span class="change2 colorwhite"><?php |
566 | 566 | echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); |
567 | 567 | if ($showothercurrency) { |
568 | - print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price(0 * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
568 | + print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">('.price(0 * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
569 | 569 | } |
570 | 570 | ?></span><input type="hidden" id="change2" class="change2" value="0"></span> |
571 | 571 | </div> |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | } else { |
175 | 175 | //Checking error |
176 | 176 | $error = 0; |
177 | - $listofSalries = array(); |
|
177 | + $listofSalries = array(); |
|
178 | 178 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
179 | 179 | foreach ($arrayofselected as $toselectid) { |
180 | 180 | $objecttmp = new Salary($db); |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | // Output page |
436 | 436 | // -------------------------------------------------------------------- |
437 | 437 | |
438 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
438 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
439 | 439 | |
440 | 440 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
441 | 441 | |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | } |
563 | 563 | |
564 | 564 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
565 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
565 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
566 | 566 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
567 | 567 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
568 | 568 | |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | $userstatic->login = $obj->login; |
730 | 730 | $userstatic->email = $obj->email; |
731 | 731 | $userstatic->socid = $obj->fk_soc; |
732 | - $userstatic->statut = $obj->status; // deprecated |
|
732 | + $userstatic->statut = $obj->status; // deprecated |
|
733 | 733 | $userstatic->status = $obj->status; |
734 | 734 | $userstatic->photo = $obj->photo; |
735 | 735 |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $object->fields = dol_sort_array($object->fields, 'position'); |
141 | 141 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
142 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
142 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
143 | 143 | |
144 | 144 | // Security check |
145 | 145 | if ($search_type == '0') { |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | } |
432 | 432 | |
433 | 433 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
434 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
434 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
435 | 435 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
436 | 436 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
437 | 437 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function __construct($db) |
43 | 43 | { |
44 | - global $langs, $conf; // $langs may be used by the tpl files. |
|
44 | + global $langs, $conf; // $langs may be used by the tpl files. |
|
45 | 45 | |
46 | 46 | $this->db = $db; |
47 | 47 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | |
149 | 149 | // Permissions |
150 | 150 | $this->rights = array(); // Permission array used by this module |
151 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
151 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
152 | 152 | |
153 | 153 | $this->rights[$r][0] = 63001; |
154 | 154 | $this->rights[$r][1] = 'Read resources'; |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $pdf->SetFont(pdf_getPDFFont($outputlangs)); |
212 | 212 | // Set path to the background PDF File |
213 | 213 | if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { |
214 | - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
214 | + $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
215 | 215 | $tplidx = $pdf->importPage(1); |
216 | 216 | } |
217 | 217 | |
@@ -249,10 +249,10 @@ discard block |
||
249 | 249 | |
250 | 250 | // Show notes |
251 | 251 | if (!empty($object->note_public)) { |
252 | - $tab_top = 65; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
252 | + $tab_top = 65; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
253 | 253 | |
254 | 254 | $pdf->SetFont('', 'B', $default_font_size); |
255 | - $pdf->MultiCell(190, 4, $outputlangs->transnoentities("Notes") . ":", 0, 'L', 0, '', 12, $tab_top); |
|
255 | + $pdf->MultiCell(190, 4, $outputlangs->transnoentities("Notes").":", 0, 'L', 0, '', 12, $tab_top); |
|
256 | 256 | $tab_top += 4; |
257 | 257 | $pdf->SetFont('', '', $default_font_size - 1); |
258 | 258 | $pdf->writeHTMLCell(190, 3, $this->posxnotes + 1, $tab_top + 1, dol_htmlentitiesbr($object->note_public), 0, 1); |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | // No fill color |
485 | 485 | $pdf->SetFillColor(255, 255, 255); |
486 | 486 | } |
487 | - $result = (($objectligne->required_rank != 0 && $objectligne->rankorder != 0) ? $objectligne->rankorder . "/" . $objectligne->required_rank : "-"); |
|
487 | + $result = (($objectligne->required_rank != 0 && $objectligne->rankorder != 0) ? $objectligne->rankorder."/".$objectligne->required_rank : "-"); |
|
488 | 488 | $pdf->MultiCell($this->posxresult - 210 - 0.8 - 4, 4, $result, 0, 'C', 1); |
489 | 489 | |
490 | 490 | |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | $comment = $skill->label; |
504 | 504 | |
505 | 505 | if (!empty($skill->description)) { |
506 | - $comment .= '<br>' . $outputlangs->trans("Description").': '.$skill->description; |
|
506 | + $comment .= '<br>'.$outputlangs->trans("Description").': '.$skill->description; |
|
507 | 507 | } |
508 | 508 | $pdf->writeHTMLCell($this->posxrankemp - $this->posxskill - 0.8, 4, $this->posxskill - 1, $curY, $comment, 0, 1); |
509 | 509 | |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | // employee information |
588 | 588 | $employee = new User($this->db); |
589 | 589 | $employee->fetch($object->fk_user); |
590 | - $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities('Employee').' : '.$outputlangs->convToOutputCharset(ucfirst($employee->firstname) . ' ' . strtoupper($employee->lastname)); |
|
590 | + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities('Employee').' : '.$outputlangs->convToOutputCharset(ucfirst($employee->firstname).' '.strtoupper($employee->lastname)); |
|
591 | 591 | |
592 | 592 | // Position |
593 | 593 | include_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |