Test Failed
Push — main ( 1f99c7...ac1cad )
by Rafael
61:18
created
htdocs/fourn/facture/card.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
             $error++;
777 777
         }
778 778
 
779
-        $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver');   // If we enter the 02 january, we need to save the 02 january for server
779
+        $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server
780 780
         $datedue = dol_mktime(0, 0, 0, GETPOSTINT('echmonth'), GETPOSTINT('echday'), GETPOSTINT('echyear'), 'tzserver');
781 781
         //var_dump($dateinvoice.' '.dol_print_date($dateinvoice, 'dayhour'));
782 782
         //var_dump(dol_now('tzuserrel').' '.dol_get_last_hour(dol_now('tzuserrel')).' '.dol_print_date(dol_now('tzuserrel'),'dayhour').' '.dol_print_date(dol_get_last_hour(dol_now('tzuserrel')), 'dayhour'));
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
                 $object->ref                = GETPOST('ref', 'alphanohtml');
1059 1059
                 $object->ref_supplier       = GETPOST('ref_supplier', 'alphanohtml');
1060 1060
                 $object->socid              = GETPOSTINT('socid');
1061
-                $object->libelle            = GETPOST('label', 'alphanohtml');  // deprecated
1061
+                $object->libelle            = GETPOST('label', 'alphanohtml'); // deprecated
1062 1062
                 $object->label              = GETPOST('label', 'alphanohtml');
1063 1063
                 $object->date               = $dateinvoice;
1064 1064
                 $object->date_echeance      = $datedue;
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
         // Edit line
1415 1415
         $db->begin();
1416 1416
 
1417
-        if (! $object->fetch($id) > 0) {
1417
+        if (!$object->fetch($id) > 0) {
1418 1418
             dol_print_error($db);
1419 1419
         }
1420 1420
         $object->fetch_thirdparty();
@@ -1558,7 +1558,7 @@  discard block
 block discarded – undo
1558 1558
             $idprod = GETPOSTINT('idprod');
1559 1559
         }
1560 1560
 
1561
-        $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);      // Can be '1.2' or '1.2 (CODE)'
1561
+        $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
1562 1562
 
1563 1563
         $price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
1564 1564
         $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2);
@@ -2257,7 +2257,7 @@  discard block
 block discarded – undo
2257 2257
     print '<form name="add" action="' . $_SERVER['PHP_SELF'] . '" method="post">';
2258 2258
     print '<input type="hidden" name="token" value="' . newToken() . '">';
2259 2259
     print '<input type="hidden" name="action" value="add">';
2260
-    print '<input type="hidden" name="changecompany" value="0">';   // will be set to 1 by javascript so we know post is done after a company change
2260
+    print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change
2261 2261
 
2262 2262
     if (!empty($societe->id) && $societe->id > 0) {
2263 2263
         print '<input type="hidden" name="socid" value="' . $societe->id . '">' . "\n";
@@ -4147,7 +4147,7 @@  discard block
 block discarded – undo
4147 4147
                 }
4148 4148
 
4149 4149
                 // Clone as predefined / Create template
4150
-                if (($object->type ==  FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut == 0 && $usercancreate) {
4150
+                if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut == 0 && $usercancreate) {
4151 4151
                     if (!$objectidnext && count($object->lines) > 0) {
4152 4152
                         print '<a class="butAction" href="' . DOL_URL_ROOT . '/fourn/facture/card-rec.php?facid=' . $object->id . '&amp;action=create">' . $langs->trans("ChangeIntoRepeatableInvoice") . '</a>';
4153 4153
                     }
Please login to merge, or discard this patch.
htdocs/fourn/facture/contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     $socid = $user->socid;
50 50
 }
51 51
 $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
52
-$hookmanager->initHooks(array('invoicesuppliercardcontact','invoicesuppliercontactcard', 'globalcard'));
52
+$hookmanager->initHooks(array('invoicesuppliercardcontact', 'invoicesuppliercontactcard', 'globalcard'));
53 53
 
54 54
 $object = new FactureFournisseur($db);
55 55
 
Please login to merge, or discard this patch.
htdocs/fourn/paiement/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 $search_date_endday     = GETPOSTINT('search_date_endday');
61 61
 $search_date_endmonth   = GETPOSTINT('search_date_endmonth');
62 62
 $search_date_endyear    = GETPOSTINT('search_date_endyear');
63
-$search_date_start      = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);  // Use tzserver
63
+$search_date_start      = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
64 64
 $search_date_end        = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
65 65
 $search_company         = GETPOST('search_company', 'alpha');
66 66
 $search_payment_type    = GETPOST('search_payment_type');
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'facture_fourn AS f ON f.rowid = pf.fk_facturefourn';
205 205
 $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON s.rowid = f.fk_soc';
206 206
 
207
-$sql .= ' WHERE f.entity IN (' . getEntity('supplier_invoice') . ')';       // TODO We should use p.entity that does not exists yet in this table
207
+$sql .= ' WHERE f.entity IN (' . getEntity('supplier_invoice') . ')'; // TODO We should use p.entity that does not exists yet in this table
208 208
 if ($socid > 0) {
209 209
     $sql .= " AND EXISTS (SELECT f.fk_soc FROM " . MAIN_DB_PREFIX . "facture_fourn as f, " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as pf";
210 210
     $sql .= " WHERE p.rowid = pf.fk_paiementfourn AND pf.fk_facturefourn = f.rowid AND f.fk_soc = " . ((int) $socid) . ")";
Please login to merge, or discard this patch.
htdocs/fourn/paiement/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 // Load object
56 56
 include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
57 57
 
58
-$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', '');    // This also test permission on read invoice
58
+$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); // This also test permission on read invoice
59 59
 
60 60
 // Security check
61 61
 if ($user->socid) {
Please login to merge, or discard this patch.
htdocs/fourn/ajax/getSupplierPrices.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
             }
116 116
         }
117 117
 
118
-        $prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency));  // For price field, we must use price2num(), for label or title, price()
118
+        $prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency)); // For price field, we must use price2num(), for label or title, price()
119 119
     }
120 120
 
121 121
     // Add price for costprice (at end)
Please login to merge, or discard this patch.
htdocs/fourn/commande/list.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 $search_date_order_endday = GETPOSTINT('search_date_order_endday');
66 66
 $search_date_order_endmonth = GETPOSTINT('search_date_order_endmonth');
67 67
 $search_date_order_endyear = GETPOSTINT('search_date_order_endyear');
68
-$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear);   // Use tzserver
68
+$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver
69 69
 $search_date_order_end = dol_mktime(23, 59, 59, $search_date_order_endmonth, $search_date_order_endday, $search_date_order_endyear);
70 70
 
71 71
 $search_date_delivery_startday = GETPOSTINT('search_date_delivery_startday');
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 $search_date_delivery_endday = GETPOSTINT('search_date_delivery_endday');
75 75
 $search_date_delivery_endmonth = GETPOSTINT('search_date_delivery_endmonth');
76 76
 $search_date_delivery_endyear = GETPOSTINT('search_date_delivery_endyear');
77
-$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear);   // Use tzserver
77
+$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver
78 78
 $search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear);
79 79
 
80 80
 $search_date_valid_startday = GETPOSTINT('search_date_valid_startday');
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 $search_date_valid_endday = GETPOSTINT('search_date_valid_endday');
84 84
 $search_date_valid_endmonth = GETPOSTINT('search_date_valid_endmonth');
85 85
 $search_date_valid_endyear = GETPOSTINT('search_date_valid_endyear');
86
-$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear);   // Use tzserver
86
+$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver
87 87
 $search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear);
88 88
 
89 89
 $search_date_approve_startday = GETPOSTINT('search_date_approve_startday');
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 $search_date_approve_endday = GETPOSTINT('search_date_approve_endday');
93 93
 $search_date_approve_endmonth = GETPOSTINT('search_date_approve_endmonth');
94 94
 $search_date_approve_endyear = GETPOSTINT('search_date_approve_endyear');
95
-$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear);   // Use tzserver
95
+$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear); // Use tzserver
96 96
 $search_date_approve_end = dol_mktime(23, 59, 59, $search_date_approve_endmonth, $search_date_approve_endday, $search_date_approve_endyear);
97 97
 
98 98
 $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
@@ -1236,7 +1236,7 @@  discard block
 block discarded – undo
1236 1236
 
1237 1237
     $topicmail = "SendOrderRef";
1238 1238
     $modelmail = "order_supplier_send";
1239
-    $objecttmp = new CommandeFournisseur($db);  // in case $object is not the good object
1239
+    $objecttmp = new CommandeFournisseur($db); // in case $object is not the good object
1240 1240
     $trackid = 'sord' . $object->id;
1241 1241
     include DOL_DOCUMENT_ROOT . '/core/tpl/massactions_pre.tpl.php';
1242 1242
 
Please login to merge, or discard this patch.
htdocs/fourn/commande/note.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 // Permissions
58 58
 $permissionnote = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")); // Used by the include of actions_setnotes.inc.php
59 59
 $usercancreate  = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer"));
60
-$permissiontoadd    = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php
60
+$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php
61 61
 
62 62
 
63 63
 /*
Please login to merge, or discard this patch.
htdocs/fourn/commande/dispatch.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
     accessforbidden();
103 103
 }
104 104
 
105
-$usercancreate  = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer"));
106
-$permissiontoadd    = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php
105
+$usercancreate = ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer"));
106
+$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php
107 107
 
108 108
 
109 109
 /*
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
     if (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) {
630 630
         $disabled = 0;
631 631
     }*/
632
-    $disabled = 0;  // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0.
632
+    $disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0.
633 633
 
634 634
     // Line of orders
635 635
     if ($object->statut <= CommandeFournisseur::STATUS_ACCEPTED || $object->statut >= CommandeFournisseur::STATUS_CANCELED) {
Please login to merge, or discard this patch.
htdocs/fourn/commande/card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
             $idprod = GETPOSTINT('idprod');
437 437
         }
438 438
 
439
-        $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);      // Can be '1.2' or '1.2 (CODE)'
439
+        $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
440 440
 
441 441
         $price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
442 442
         $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2);
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
             $object->mode_reglement_id = GETPOSTINT('mode_reglement_id');
1240 1240
             $object->fk_account        = GETPOSTINT('fk_account');
1241 1241
             $object->note_private = GETPOST('note_private', 'restricthtml');
1242
-            $object->note_public    = GETPOST('note_public', 'restricthtml');
1242
+            $object->note_public = GETPOST('note_public', 'restricthtml');
1243 1243
             $object->delivery_date = $datelivraison;
1244 1244
             $object->fk_incoterms = GETPOSTINT('incoterm_id');
1245 1245
             $object->location_incoterms = GETPOST('location_incoterms', 'alpha');
@@ -1635,7 +1635,7 @@  discard block
 block discarded – undo
1635 1635
         $demand_reason_id = (!empty($objectsrc->demand_reason_id) ? $objectsrc->demand_reason_id : (!empty($soc->demand_reason_id) ? $soc->demand_reason_id : 0));
1636 1636
         //$remise_percent       = (!empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (!empty($soc->remise_supplier_percent) ? $soc->remise_supplier_percent : 0));
1637 1637
         //$remise_absolue       = (!empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0));
1638
-        $dateinvoice        = !getDolGlobalString('MAIN_AUTOFILL_DATE') ? -1 : '';
1638
+        $dateinvoice = !getDolGlobalString('MAIN_AUTOFILL_DATE') ? -1 : '';
1639 1639
 
1640 1640
         $datedelivery = (!empty($objectsrc->delivery_date) ? $objectsrc->delivery_date : '');
1641 1641
 
@@ -1750,7 +1750,7 @@  discard block
 block discarded – undo
1750 1750
         // Payment term
1751 1751
         print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td>';
1752 1752
         print img_picto('', 'payment', 'class="pictofixedwidth"');
1753
-        print $form->getSelectConditionsPaiements((GETPOSTISSET('cond_reglement_id') &&  GETPOST('cond_reglement_id') != 0) ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1);
1753
+        print $form->getSelectConditionsPaiements((GETPOSTISSET('cond_reglement_id') && GETPOST('cond_reglement_id') != 0) ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1);
1754 1754
         print '</td></tr>';
1755 1755
 
1756 1756
         // Payment mode
@@ -2000,7 +2000,7 @@  discard block
 block discarded – undo
2000 2000
                 'morecss' => 'minwidth300'
2001 2001
             )
2002 2002
         );
2003
-        $formconfirm  = $form->formconfirm($_SERVER['PHP_SELF'] . "?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1);
2003
+        $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . "?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1);
2004 2004
     }
2005 2005
 
2006 2006
     // Confirmation of cancellation
Please login to merge, or discard this patch.