@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | } |
159 | 159 | |
160 | 160 | |
161 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
161 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
162 | 162 | /** |
163 | 163 | * Function to build pdf onto disk |
164 | 164 | * |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | public function write_file($object, $outputlangs = null, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
174 | 174 | { |
175 | - // phpcs:enable |
|
175 | + // phpcs:enable |
|
176 | 176 | global $user, $langs, $conf, $hookmanager, $mysoc, $nblines; |
177 | 177 | |
178 | 178 | if (!is_object($outputlangs)) { |
@@ -702,8 +702,8 @@ discard block |
||
702 | 702 | } |
703 | 703 | } |
704 | 704 | |
705 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
706 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
705 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
706 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
707 | 707 | /** |
708 | 708 | * Show payments table |
709 | 709 | * |
@@ -715,12 +715,12 @@ discard block |
||
715 | 715 | */ |
716 | 716 | protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs) |
717 | 717 | { |
718 | - // phpcs:enable |
|
718 | + // phpcs:enable |
|
719 | 719 | return 1; |
720 | 720 | } |
721 | 721 | |
722 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
723 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
722 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
723 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
724 | 724 | /** |
725 | 725 | * Show miscellaneous information (payment mode, payment term, ...) |
726 | 726 | * |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | */ |
733 | 733 | protected function _tableau_info(&$pdf, $object, $posy, $outputlangs) |
734 | 734 | { |
735 | - // phpcs:enable |
|
735 | + // phpcs:enable |
|
736 | 736 | global $conf, $mysoc; |
737 | 737 | $default_font_size = pdf_getPDFFontSize($outputlangs); |
738 | 738 | |
@@ -783,8 +783,8 @@ discard block |
||
783 | 783 | return $posy; |
784 | 784 | } |
785 | 785 | |
786 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
787 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
786 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
787 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
788 | 788 | /** |
789 | 789 | * Show total to pay |
790 | 790 | * |
@@ -797,7 +797,7 @@ discard block |
||
797 | 797 | */ |
798 | 798 | protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs) |
799 | 799 | { |
800 | - // phpcs:enable |
|
800 | + // phpcs:enable |
|
801 | 801 | global $conf, $mysoc; |
802 | 802 | |
803 | 803 | $default_font_size = pdf_getPDFFontSize($outputlangs); |
@@ -988,7 +988,7 @@ discard block |
||
988 | 988 | return ($tab2_top + ($tab2_hl * $index)); |
989 | 989 | } |
990 | 990 | |
991 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
991 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
992 | 992 | /** |
993 | 993 | * Show table for lines |
994 | 994 | * |
@@ -1088,7 +1088,7 @@ discard block |
||
1088 | 1088 | } |
1089 | 1089 | } |
1090 | 1090 | |
1091 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1091 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1092 | 1092 | /** |
1093 | 1093 | * Show top header of page. |
1094 | 1094 | * |
@@ -1357,7 +1357,7 @@ discard block |
||
1357 | 1357 | return $top_shift; |
1358 | 1358 | } |
1359 | 1359 | |
1360 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1360 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1361 | 1361 | /** |
1362 | 1362 | * Show footer of page. Need this->emetteur object |
1363 | 1363 | * |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | |
136 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
136 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
137 | 137 | /** |
138 | 138 | * Function to build pdf onto disk |
139 | 139 | * |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function write_file($object, $outputlangs = null, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
149 | 149 | { |
150 | - // phpcs:enable |
|
150 | + // phpcs:enable |
|
151 | 151 | global $user, $langs, $conf, $hookmanager, $mysoc, $nblines; |
152 | 152 | |
153 | 153 | if (!is_object($outputlangs)) { |
@@ -823,8 +823,8 @@ discard block |
||
823 | 823 | } |
824 | 824 | } |
825 | 825 | |
826 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
827 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
826 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
827 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
828 | 828 | /** |
829 | 829 | * Show payments table |
830 | 830 | * |
@@ -836,12 +836,12 @@ discard block |
||
836 | 836 | */ |
837 | 837 | protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs) |
838 | 838 | { |
839 | - // phpcs:enable |
|
839 | + // phpcs:enable |
|
840 | 840 | return 1; |
841 | 841 | } |
842 | 842 | |
843 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
844 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
843 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
844 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
845 | 845 | /** |
846 | 846 | * Show miscellaneous information (payment mode, payment term, ...) |
847 | 847 | * |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | */ |
854 | 854 | protected function _tableau_info(&$pdf, $object, $posy, $outputlangs) |
855 | 855 | { |
856 | - // phpcs:enable |
|
856 | + // phpcs:enable |
|
857 | 857 | global $conf, $mysoc; |
858 | 858 | $default_font_size = pdf_getPDFFontSize($outputlangs); |
859 | 859 | |
@@ -905,8 +905,8 @@ discard block |
||
905 | 905 | return $posy; |
906 | 906 | } |
907 | 907 | |
908 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
909 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
908 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
909 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
910 | 910 | /** |
911 | 911 | * Show total to pay |
912 | 912 | * |
@@ -919,7 +919,7 @@ discard block |
||
919 | 919 | */ |
920 | 920 | protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs) |
921 | 921 | { |
922 | - // phpcs:enable |
|
922 | + // phpcs:enable |
|
923 | 923 | global $conf, $mysoc, $hookmanager; |
924 | 924 | |
925 | 925 | $default_font_size = pdf_getPDFFontSize($outputlangs); |
@@ -1118,7 +1118,7 @@ discard block |
||
1118 | 1118 | return ($tab2_top + ($tab2_hl * $index)); |
1119 | 1119 | } |
1120 | 1120 | |
1121 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1121 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1122 | 1122 | /** |
1123 | 1123 | * Show table for lines |
1124 | 1124 | * |
@@ -1173,7 +1173,7 @@ discard block |
||
1173 | 1173 | } |
1174 | 1174 | } |
1175 | 1175 | |
1176 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1176 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1177 | 1177 | /** |
1178 | 1178 | * Show top header of page. |
1179 | 1179 | * |
@@ -1443,7 +1443,7 @@ discard block |
||
1443 | 1443 | return $top_shift; |
1444 | 1444 | } |
1445 | 1445 | |
1446 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1446 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1447 | 1447 | /** |
1448 | 1448 | * Show footer of page. Need this->emetteur object |
1449 | 1449 | * |
@@ -90,7 +90,7 @@ |
||
90 | 90 | $this->db = $db; |
91 | 91 | $this->name = "cornas"; |
92 | 92 | $this->description = $langs->trans('SuppliersCommandModel'); |
93 | - $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template |
|
93 | + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template |
|
94 | 94 | |
95 | 95 | // Page size for A4 format |
96 | 96 | $this->type = 'pdf'; |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | return $this->LibStatut($this->status, $mode); |
362 | 362 | } |
363 | 363 | |
364 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
364 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
365 | 365 | /** |
366 | 366 | * Return the status |
367 | 367 | * |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | */ |
372 | 372 | public function LibStatut($status, $mode = 0) |
373 | 373 | { |
374 | - // phpcs:enable |
|
374 | + // phpcs:enable |
|
375 | 375 | if (empty($this->labelStatus)) { |
376 | 376 | global $langs; |
377 | 377 | //$langs->load("emailcollector"); |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | return $this->LibStatut($this->status, $mode); |
639 | 639 | } |
640 | 640 | |
641 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
641 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
642 | 642 | /** |
643 | 643 | * Return the status |
644 | 644 | * |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | */ |
649 | 649 | public function LibStatut($status, $mode = 0) |
650 | 650 | { |
651 | - // phpcs:enable |
|
651 | + // phpcs:enable |
|
652 | 652 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
653 | 653 | global $langs; |
654 | 654 | //$langs->load("mymodule"); |
@@ -807,8 +807,8 @@ discard block |
||
807 | 807 | { |
808 | 808 | if (function_exists('mb_convert_encoding')) { |
809 | 809 | // change spaces by entropy because mb_convert fail with spaces |
810 | - $str = preg_replace("/ /", "xxxSPACExxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
811 | - $str = preg_replace("/\[Gmail\]/", "xxxGMAILxxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
810 | + $str = preg_replace("/ /", "xxxSPACExxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
811 | + $str = preg_replace("/\[Gmail\]/", "xxxGMAILxxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
812 | 812 | // if mb_convert work |
813 | 813 | if ($str = mb_convert_encoding($str, "UTF-7")) { |
814 | 814 | // change characters |
@@ -1413,7 +1413,7 @@ discard block |
||
1413 | 1413 | } |
1414 | 1414 | |
1415 | 1415 | if ($rule['type'] == 'from') { |
1416 | - $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1416 | + $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1417 | 1417 | if (count($tmprulevaluearray) >= 2) { |
1418 | 1418 | foreach ($tmprulevaluearray as $tmprulevalue) { |
1419 | 1419 | $search .= ($search ? ' ' : '') . $not . 'FROM "' . str_replace('"', '', $tmprulevalue) . '"'; |
@@ -1423,7 +1423,7 @@ discard block |
||
1423 | 1423 | } |
1424 | 1424 | } |
1425 | 1425 | if ($rule['type'] == 'to') { |
1426 | - $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1426 | + $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1427 | 1427 | if (count($tmprulevaluearray) >= 2) { |
1428 | 1428 | foreach ($tmprulevaluearray as $tmprulevalue) { |
1429 | 1429 | $search .= ($search ? ' ' : '') . $not . 'TO "' . str_replace('"', '', $tmprulevalue) . '"'; |
@@ -1586,7 +1586,7 @@ discard block |
||
1586 | 1586 | } |
1587 | 1587 | } |
1588 | 1588 | |
1589 | - $arrayofemailtodelete = array(); // Track email to delete to make the deletion at end. |
|
1589 | + $arrayofemailtodelete = array(); // Track email to delete to make the deletion at end. |
|
1590 | 1590 | |
1591 | 1591 | // Loop on each email found |
1592 | 1592 | if (!$error && !empty($arrayofemail) && count($arrayofemail) > 0) { |
@@ -2224,7 +2224,7 @@ discard block |
||
2224 | 2224 | |
2225 | 2225 | // Make Operation |
2226 | 2226 | dol_syslog("Execute action " . $operation['type'] . " actionparam=" . $operation['actionparam'] . ' thirdpartystatic->id=' . $thirdpartystatic->id . ' contactstatic->id=' . $contactstatic->id . ' projectstatic->id=' . $projectstatic->id); |
2227 | - dol_syslog("Execute action fk_element_id=" . $fk_element_id . " fk_element_type=" . $fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object |
|
2227 | + dol_syslog("Execute action fk_element_id=" . $fk_element_id . " fk_element_type=" . $fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object |
|
2228 | 2228 | |
2229 | 2229 | $actioncode = 'EMAIL_IN'; |
2230 | 2230 | // If we scan the Sent box, we use the code for out email |
@@ -2595,8 +2595,8 @@ discard block |
||
2595 | 2595 | $actioncomm->label = $langs->trans("ActionAC_" . $actioncode) . ' - ' . $langs->trans("MailFrom") . ' ' . $from; |
2596 | 2596 | $actioncomm->note_private = $descriptionfull; |
2597 | 2597 | $actioncomm->fk_project = $projectstatic->id; |
2598 | - $actioncomm->datep = $date; // date of email |
|
2599 | - $actioncomm->datef = $date; // date of email |
|
2598 | + $actioncomm->datep = $date; // date of email |
|
2599 | + $actioncomm->datef = $date; // date of email |
|
2600 | 2600 | $actioncomm->percentage = -1; // Not applicable |
2601 | 2601 | $actioncomm->socid = $thirdpartystatic->id; |
2602 | 2602 | $actioncomm->contact_id = $contactstatic->id; |
@@ -2803,7 +2803,7 @@ discard block |
||
2803 | 2803 | } |
2804 | 2804 | $hookmanager->initHooks(array('emailcolector')); |
2805 | 2805 | $parameters = array('arrayobject' => $arrayobject); |
2806 | - $reshook = $hookmanager->executeHooks('addmoduletoeamailcollectorjoinpiece', $parameters); // Note that $action and $object may have been modified by some hooks |
|
2806 | + $reshook = $hookmanager->executeHooks('addmoduletoeamailcollectorjoinpiece', $parameters); // Note that $action and $object may have been modified by some hooks |
|
2807 | 2807 | if ($reshook > 0) { |
2808 | 2808 | $arrayobject = $hookmanager->resArray; |
2809 | 2809 | } |
@@ -2892,7 +2892,7 @@ discard block |
||
2892 | 2892 | $percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent'); |
2893 | 2893 | |
2894 | 2894 | $projecttocreate->title = $subject; |
2895 | - $projecttocreate->date_start = $date; // date of email |
|
2895 | + $projecttocreate->date_start = $date; // date of email |
|
2896 | 2896 | $projecttocreate->date_end = 0; |
2897 | 2897 | $projecttocreate->opp_status = $id_opp_status; |
2898 | 2898 | $projecttocreate->opp_percent = $percent_opp_status; |
@@ -3155,7 +3155,7 @@ discard block |
||
3155 | 3155 | $candidaturetocreate->note_private = $descriptionfull; |
3156 | 3156 | $candidaturetocreate->entity = $conf->entity; |
3157 | 3157 | $candidaturetocreate->email_msgid = $msgid; |
3158 | - $candidaturetocreate->email_date = $date; // date of email |
|
3158 | + $candidaturetocreate->email_date = $date; // date of email |
|
3159 | 3159 | $candidaturetocreate->status = $candidaturetocreate::STATUS_DRAFT; |
3160 | 3160 | //$candidaturetocreate->fk_contact = $contactstatic->id; |
3161 | 3161 |
@@ -1655,7 +1655,7 @@ |
||
1655 | 1655 | 70 => array('lang' => 'interventions', 'enabled' => isModEnabled("intervention"), 'perm' => $user->hasRight('fichinter', 'creer'), 'label' => 'AddIntervention', 'url' => '/fichinter/card.php?action=create&projectid=' . $object->id . '&socid=' . $object->socid), |
1656 | 1656 | 80 => array('lang' => 'contracts', 'enabled' => isModEnabled("contract"), 'perm' => $user->hasRight('contrat', 'creer'), 'label' => 'AddContract', 'url' => '/contrat/card.php?action=create&projectid=' . $object->id . '&socid=' . $object->socid), |
1657 | 1657 | 90 => array('lang' => 'trips', 'enabled' => isModEnabled("expensereport"), 'perm' => $user->hasRight('expensereport', 'creer'), 'label' => 'AddTrip', 'url' => '/expensereport/card.php?action=create&projectid=' . $object->id . '&socid=' . $object->socid), |
1658 | - 100 => array('lang' => 'donations', 'enabled' => isModEnabled("don"), 'perm' => $user->hasRight('don', 'creer'), 'label' => 'AddDonation', 'url' => '/don/card.php?action=create&projectid=' . $object->id . '&socid=' . $object->socid), |
|
1658 | + 100 => array('lang' => 'donations', 'enabled' => isModEnabled("don"), 'perm' => $user->hasRight('don', 'creer'), 'label' => 'AddDonation', 'url' => '/don/card.php?action=create&projectid=' . $object->id . '&socid=' . $object->socid), |
|
1659 | 1659 | ); |
1660 | 1660 | |
1661 | 1661 | $params = array('backtopage' => $_SERVER['PHP_SELF'] . '?id=' . $object->id); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | $permissiontoadd = $user->hasRight('projet', 'creer'); |
113 | 113 | $permissiontodelete = $user->hasRight('projet', 'supprimer'); |
114 | -$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php |
|
114 | +$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php |
|
115 | 115 | |
116 | 116 | |
117 | 117 | /* |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $action = ''; |
163 | 163 | } |
164 | 164 | |
165 | - include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be include, not include_once |
|
165 | + include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be include, not include_once |
|
166 | 166 | |
167 | 167 | // Action setdraft object |
168 | 168 | if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | abstract class ModelePDFKnowledgeRecord extends CommonDocGenerator |
40 | 40 | { |
41 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
41 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
42 | 42 | /** |
43 | 43 | * Return list of active generation modules |
44 | 44 | * |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public static function liste_modeles($db, $maxfilenamelength = 0) |
50 | 50 | { |
51 | - // phpcs:enable |
|
51 | + // phpcs:enable |
|
52 | 52 | global $conf; |
53 | 53 | |
54 | 54 | $type = 'knowledgerecord'; |
@@ -903,7 +903,7 @@ discard block |
||
903 | 903 | return $this->LibStatut($this->status, $mode); |
904 | 904 | } |
905 | 905 | |
906 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
906 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
907 | 907 | /** |
908 | 908 | * Return the status |
909 | 909 | * |
@@ -913,7 +913,7 @@ discard block |
||
913 | 913 | */ |
914 | 914 | public function LibStatut($status, $mode = 0) |
915 | 915 | { |
916 | - // phpcs:enable |
|
916 | + // phpcs:enable |
|
917 | 917 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
918 | 918 | global $langs; |
919 | 919 | //$langs->load("knowledgemanagement"); |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | } |
342 | 342 | |
343 | 343 | |
344 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
344 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
345 | 345 | /** |
346 | 346 | * Clean sensible object datas |
347 | 347 | * |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | */ |
351 | 351 | protected function _cleanObjectDatas($object) |
352 | 352 | { |
353 | - // phpcs:enable |
|
353 | + // phpcs:enable |
|
354 | 354 | $object = parent::_cleanObjectDatas($object); |
355 | 355 | |
356 | 356 | unset($object->rowid); |
@@ -1496,11 +1496,11 @@ |
||
1496 | 1496 | ?> |
1497 | 1497 | <div class="wrapper" <?php if ($count == ($MAXCATEG - 2)) { |
1498 | 1498 | echo 'onclick="MoreCategories(\'less\')"'; |
1499 | - } elseif ($count == ($MAXCATEG - 1)) { |
|
1500 | - echo 'onclick="MoreCategories(\'more\')"'; |
|
1501 | - } else { |
|
1502 | - echo 'onclick="LoadProducts(' . $count . ')"'; |
|
1503 | - } ?> id="catdiv<?php echo $count; ?>"> |
|
1499 | + } elseif ($count == ($MAXCATEG - 1)) { |
|
1500 | + echo 'onclick="MoreCategories(\'more\')"'; |
|
1501 | + } else { |
|
1502 | + echo 'onclick="LoadProducts(' . $count . ')"'; |
|
1503 | + } ?> id="catdiv<?php echo $count; ?>"> |
|
1504 | 1504 | <?php |
1505 | 1505 | if ($count == ($MAXCATEG - 2)) { |
1506 | 1506 | //echo '<img class="imgwrapper" src="img/arrow-prev-top.png" height="100%" id="catimg'.$count.'" />'; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $arrayofcss = array('/takepos/css/pos.css.php', '/takepos/css/colorbox.css'); |
125 | 125 | |
126 | 126 | if (getDolGlobalInt('TAKEPOS_COLOR_THEME') == 1) { |
127 | - $arrayofcss[] = '/takepos/css/colorful.css'; |
|
127 | + $arrayofcss[] = '/takepos/css/colorful.css'; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | limit = maxproduct-1; |
352 | 352 | } |
353 | 353 | // Only show products for sale (tosell=1) |
354 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) { |
|
354 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken(); ?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) { |
|
355 | 355 | console.log("Call ajax.php (in LoadProducts) to get Products of category "+currentcat+" then loop on result to fill image thumbs"); |
356 | 356 | console.log(data); |
357 | 357 | |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | } |
470 | 470 | var offset = <?php echo($MAXPRODUCT - 2); ?> * pageproducts; |
471 | 471 | // Only show products for sale (tosell=1) |
472 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) { |
|
472 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken(); ?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) { |
|
473 | 473 | console.log("Call ajax.php (in MoreProducts) to get Products of category "+currentcat); |
474 | 474 | |
475 | 475 | if (typeof (data[0]) == "undefined" && moreorless=="more"){ // Return if no more pages |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | function ChangeThirdparty(idcustomer) { |
555 | 555 | console.log("ChangeThirdparty"); |
556 | 556 | // Call page list.php to change customer |
557 | - $("#poslines").load("<?php echo DOL_URL_ROOT ?>/societe/list.php?action=change&token=<?php echo newToken();?>&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() { |
|
557 | + $("#poslines").load("<?php echo DOL_URL_ROOT ?>/societe/list.php?action=change&token=<?php echo newToken(); ?>&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() { |
|
558 | 558 | }); |
559 | 559 | |
560 | 560 | ClearSearch(false); |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | |
648 | 648 | console.log("New with place = <?php echo $place; ?>, js place="+place+", invoiceid="+invoiceid); |
649 | 649 | |
650 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken();?>&id='+invoiceid, function(data) { |
|
650 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken(); ?>&id='+invoiceid, function(data) { |
|
651 | 651 | var r; |
652 | 652 | |
653 | 653 | if (parseInt(data['paye']) === 1) { |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | pageproducts = 0; |
719 | 719 | jQuery(".wrapper2 .catwatermark").hide(); |
720 | 720 | var nbsearchresults = 0; |
721 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken();?>&term=' + search_term + '&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) { |
|
721 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken(); ?>&term=' + search_term + '&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) { |
|
722 | 722 | for (i = 0; i < <?php echo $MAXPRODUCT ?>; i++) { |
723 | 723 | if (typeof (data[i]) == "undefined") { |
724 | 724 | $("#prowatermark" + i).html(""); |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | } |
814 | 814 | else { |
815 | 815 | $("#prodiv<?php echo $MAXPRODUCT - 2; ?> span").show(); |
816 | - var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2;?>)); |
|
816 | + var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2; ?>)); |
|
817 | 817 | $("#search_start_less").val(search_start_less); |
818 | 818 | } |
819 | 819 | if (nbsearchresults != <?php echo $MAXPRODUCT - 2; ?>) { |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | } |
822 | 822 | else { |
823 | 823 | $("#prodiv<?php echo $MAXPRODUCT - 1; ?> span").show(); |
824 | - var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2;?>); |
|
824 | + var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2; ?>); |
|
825 | 825 | $("#search_start_more").val(search_start_more); |
826 | 826 | } |
827 | 827 | }); |
@@ -918,14 +918,14 @@ discard block |
||
918 | 918 | |
919 | 919 | function TakeposPrintingOrder(){ |
920 | 920 | console.log("TakeposPrintingOrder"); |
921 | - $("#poslines").load("invoice.php?action=order&token=<?php echo newToken();?>&place="+place, function() { |
|
921 | + $("#poslines").load("invoice.php?action=order&token=<?php echo newToken(); ?>&place="+place, function() { |
|
922 | 922 | //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); |
923 | 923 | }); |
924 | 924 | } |
925 | 925 | |
926 | 926 | function TakeposPrintingTemp(){ |
927 | 927 | console.log("TakeposPrintingTemp"); |
928 | - $("#poslines").load("invoice.php?action=temp&token=<?php echo newToken();?>&place="+place, function() { |
|
928 | + $("#poslines").load("invoice.php?action=temp&token=<?php echo newToken(); ?>&place="+place, function() { |
|
929 | 929 | //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); |
930 | 930 | }); |
931 | 931 | } |
@@ -947,7 +947,7 @@ discard block |
||
947 | 947 | } |
948 | 948 | |
949 | 949 | function DolibarrOpenDrawer() { |
950 | - console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken();?>&term=<?php print urlencode($_SESSION["takeposterminal"]); ?>"); |
|
950 | + console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken(); ?>&term=<?php print urlencode($_SESSION["takeposterminal"]); ?>"); |
|
951 | 951 | $.ajax({ |
952 | 952 | type: "GET", |
953 | 953 | data: { token: '<?php echo currentToken(); ?>' }, |
@@ -1346,7 +1346,7 @@ discard block |
||
1346 | 1346 | $menus[$r++] = array('title' => '<span class="far fa-building paddingrightonly"></span><div class="trunc">' . $langs->trans("Customer") . '</div>', 'action' => 'Customer();'); |
1347 | 1347 | } |
1348 | 1348 | } |
1349 | -if (! getDolGlobalString('TAKEPOS_HIDE_HISTORY')) { |
|
1349 | +if (!getDolGlobalString('TAKEPOS_HIDE_HISTORY')) { |
|
1350 | 1350 | $menus[$r++] = array('title' => '<span class="fa fa-history paddingrightonly"></span><div class="trunc">' . $langs->trans("History") . '</div>', 'action' => 'History();'); |
1351 | 1351 | } |
1352 | 1352 | $menus[$r++] = array('title' => '<span class="fa fa-cube paddingrightonly"></span><div class="trunc">' . $langs->trans("FreeZone") . '</div>', 'action' => 'FreeZone();'); |