Passed
Push — main ( 324b47...7af4bb )
by Rafael
43:55
created
htdocs/takepos/ajax/ajax.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
59 59
 $hookmanager->initHooks(array('takeposproductsearch')); // new context for product search hooks
60 60
 
61
-$pricelevel = 1;    // default price level if PRODUIT_MULTIPRICES. TODO Get price level from thirdparty.
61
+$pricelevel = 1; // default price level if PRODUIT_MULTIPRICES. TODO Get price level from thirdparty.
62 62
 
63 63
 
64 64
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         }
262 262
     }
263 263
 
264
-    $sql = 'SELECT p.rowid, p.ref, p.label, p.tosell, p.tobuy, p.barcode, p.price, p.price_ttc' ;
264
+    $sql = 'SELECT p.rowid, p.ref, p.label, p.tosell, p.tobuy, p.barcode, p.price, p.price_ttc';
265 265
     if (getDolGlobalInt('TAKEPOS_PRODUCT_IN_STOCK') == 1) {
266 266
         if (getDolGlobalInt('CASHDESK_ID_WAREHOUSE' . $_SESSION['takeposterminal'])) {
267 267
             $sql .= ', ps.reel';
Please login to merge, or discard this patch.
htdocs/takepos/public/auto_order.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
     accessforbidden('Auto order is not allwed'); // If Auto Order is disabled never allow access to this page (that is a NO LOGIN access)
40 40
 }
41 41
 
42
-$_SESSION["basiclayout"] = 1;   // For the simple layout for public submission
43
-$_SESSION["takeposterminal"] = getDolGlobalInt('TAKEPOS_TERMINAL_NB_FOR_PUBLIC', 1);    // Default terminal for public submission is 1
42
+$_SESSION["basiclayout"] = 1; // For the simple layout for public submission
43
+$_SESSION["takeposterminal"] = getDolGlobalInt('TAKEPOS_TERMINAL_NB_FOR_PUBLIC', 1); // Default terminal for public submission is 1
44 44
 
45 45
 define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1);
46 46
 if (GETPOSTISSET("mobilepage")) {
Please login to merge, or discard this patch.
htdocs/takepos/index.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();');
Please login to merge, or discard this patch.
htdocs/takepos/floors.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
 
181 181
 
182 182
 $( document ).ready(function() {
183
-    $.getJSON('./floors.php?action=getTables&token=<?php echo newToken();?>&floor=<?php echo $floor; ?>', function(data) {
183
+    $.getJSON('./floors.php?action=getTables&token=<?php echo newToken(); ?>&floor=<?php echo $floor; ?>', function(data) {
184 184
         $.each(data, function(key, val) {
185 185
             <?php if ($mode == "edit") {?>
186 186
             $('body').append('<div class="tablediv" contenteditable onblur="updatename('+val.rowid+');" style="position: absolute; left: '+val.leftpos+'%; top: '+val.toppos+'%;" id="tablename'+val.rowid+'">'+val.label+'</div>');
Please login to merge, or discard this patch.
htdocs/societe/list.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -130,20 +130,20 @@  discard block
 block discarded – undo
130 130
 $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth');
131 131
 $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear');
132 132
 $search_date_creation_startday = GETPOSTINT('search_date_creation_startday');
133
-$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear);   // Use tzserver
133
+$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver
134 134
 $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth');
135 135
 $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear');
136 136
 $search_date_creation_endday = GETPOSTINT('search_date_creation_endday');
137
-$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear);    // Use tzserver
137
+$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver
138 138
 
139 139
 $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth');
140 140
 $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear');
141 141
 $search_date_modif_startday = GETPOSTINT('search_date_modif_startday');
142
-$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear);   // Use tzserver
142
+$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver
143 143
 $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth');
144 144
 $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear');
145 145
 $search_date_modif_endday = GETPOSTINT('search_date_modif_endday');
146
-$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear);    // Use tzserver
146
+$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver
147 147
 
148 148
 
149 149
 $type = GETPOST('type', 'alpha');
@@ -1140,7 +1140,7 @@  discard block
 block discarded – undo
1140 1140
     if (!empty($socid)) {
1141 1141
         $url .= '&socid=' . $socid;
1142 1142
     }
1143
-    $newcardbutton   = '';
1143
+    $newcardbutton = '';
1144 1144
     $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER['PHP_SELF'] . '?mode=common' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
1145 1145
     $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER['PHP_SELF'] . '?mode=kanban' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
1146 1146
     $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->hasRight('societe', 'creer'));
@@ -1682,19 +1682,19 @@  discard block
 block discarded – undo
1682 1682
 print $hookmanager->resPrint;
1683 1683
 if (!empty($arrayfields['s.datec']['checked'])) {
1684 1684
     print_liste_field_titre($arrayfields['s.datec']['label'], $_SERVER['PHP_SELF'], "s.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1685
-    $totalarray['nbfield']++;   // For the column action
1685
+    $totalarray['nbfield']++; // For the column action
1686 1686
 }
1687 1687
 if (!empty($arrayfields['s.tms']['checked'])) {
1688 1688
     print_liste_field_titre($arrayfields['s.tms']['label'], $_SERVER['PHP_SELF'], "s.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1689
-    $totalarray['nbfield']++;   // For the column action
1689
+    $totalarray['nbfield']++; // For the column action
1690 1690
 }
1691 1691
 if (!empty($arrayfields['s.status']['checked'])) {
1692 1692
     print_liste_field_titre($arrayfields['s.status']['label'], $_SERVER['PHP_SELF'], "s.status", "", $param, '', $sortfield, $sortorder, 'center ');
1693
-    $totalarray['nbfield']++;   // For the column action
1693
+    $totalarray['nbfield']++; // For the column action
1694 1694
 }
1695 1695
 if (!empty($arrayfields['s.import_key']['checked'])) {
1696 1696
     print_liste_field_titre($arrayfields['s.import_key']['label'], $_SERVER['PHP_SELF'], "s.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
1697
-    $totalarray['nbfield']++;   // For the column action
1697
+    $totalarray['nbfield']++; // For the column action
1698 1698
 }
1699 1699
 // Action column
1700 1700
 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
Please login to merge, or discard this patch.
htdocs/societe/paymentmodes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
             // Ajout
295 295
             $companybankaccount = new CompanyBankAccount($db);
296 296
 
297
-            $companybankaccount->socid           = $object->id;
297
+            $companybankaccount->socid = $object->id;
298 298
 
299 299
             $companybankaccount->fetch_thirdparty();
300 300
 
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
         }
593 593
         if ($action == 'syncsepatostripe') {
594 594
             // Create the bank account on current Stripe env
595
-            $companypaymentmode = new CompanyPaymentMode($db);  // Get record in llx_societe_rib
595
+            $companypaymentmode = new CompanyPaymentMode($db); // Get record in llx_societe_rib
596 596
             $companypaymentmode->fetch($id);
597 597
 
598 598
             if ($companypaymentmode->type != 'ban') {
@@ -1193,7 +1193,7 @@  discard block
 block discarded – undo
1193 1193
         print '<table class="liste centpercent">' . "\n";
1194 1194
         print '<tr class="liste_titre">';
1195 1195
         print '<td>' . $langs->trans('Label') . '</td>';
1196
-        print '<td>' . $form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")) . '</td>';   // external system ID
1196
+        print '<td>' . $form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")) . '</td>'; // external system ID
1197 1197
         print '<td>' . $langs->trans('Type') . '</td>';
1198 1198
         print '<td>' . $langs->trans('Informations') . '</td>';
1199 1199
         print '<td></td>';
@@ -1552,7 +1552,7 @@  discard block
 block discarded – undo
1552 1552
 
1553 1553
         print '<tr class="liste_titre">';
1554 1554
         print_liste_field_titre("Label");
1555
-        print_liste_field_titre($form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")));       // external system ID
1555
+        print_liste_field_titre($form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem"))); // external system ID
1556 1556
         print_liste_field_titre("Bank");
1557 1557
         print_liste_field_titre("RIB");
1558 1558
         print_liste_field_titre("IBAN");
Please login to merge, or discard this patch.
htdocs/societe/checkvat/checkVatPopup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
  *      \brief      Popup screen to validate VAT
23 23
  */
24 24
 
25
-if (! defined('NOTOKENRENEWAL')) {
25
+if (!defined('NOTOKENRENEWAL')) {
26 26
     define('NOTOKENRENEWAL', '1');
27 27
 }       // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
28 28
 
Please login to merge, or discard this patch.
htdocs/societe/canvas/actions_card_common.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@
 block discarded – undo
299 299
             $this->tpl['country'] = ($img ? $img . ' ' : '') . $this->object->country;
300 300
 
301 301
             $this->tpl['phone']     = dol_print_phone($this->object->phone, $this->object->country_code, 0, $this->object->id, 'AC_TEL');
302
-            $this->tpl['phone_mobile']  = dol_print_phone($this->object->phone_mobile, $this->object->country_code, 0, $this->object->id, 'AC_MOB');
302
+            $this->tpl['phone_mobile'] = dol_print_phone($this->object->phone_mobile, $this->object->country_code, 0, $this->object->id, 'AC_MOB');
303 303
             $this->tpl['fax']       = dol_print_phone($this->object->fax, $this->object->country_code, 0, $this->object->id, 'AC_FAX');
304 304
             $this->tpl['email']     = dol_print_email($this->object->email, 0, $this->object->id, 1);
305 305
             $this->tpl['url']       = dol_print_url($this->object->url);
Please login to merge, or discard this patch.
htdocs/societe/admin/societe.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 $action = GETPOST('action', 'aZ09');
39 39
 $value = GETPOST('value', 'alpha');
40
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
40
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
41 41
 
42 42
 if (!$user->admin) {
43 43
     accessforbidden();
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
 print '<td class="center">' . $langs->trans("MustBeInvoiceMandatory") . '</td>';
666 666
 print "</tr>\n";
667 667
 
668
-$profid = array('IDPROF1' => array(), 'IDPROF2' => array(), 'IDPROF3' => array(), 'IDPROF4' => array(), 'IDPROF5' => array(),'IDPROF6' => array(), 'EMAIL' => array());
668
+$profid = array('IDPROF1' => array(), 'IDPROF2' => array(), 'IDPROF3' => array(), 'IDPROF4' => array(), 'IDPROF5' => array(), 'IDPROF6' => array(), 'EMAIL' => array());
669 669
 $profid['IDPROF1'][0] = $langs->trans("ProfId1");
670 670
 $profid['IDPROF1'][1] = $langs->transcountry('ProfId1', $mysoc->country_code);
671 671
 $profid['IDPROF2'][0] = $langs->trans("ProfId2");
Please login to merge, or discard this patch.