@@ -172,7 +172,9 @@ |
||
172 | 172 | // extrafields filter key to make it works |
173 | 173 | $filter['ef.resource'] = $sql; |
174 | 174 | |
175 | -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); |
|
175 | +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
|
176 | + $param .= '&contextpage='.urlencode($contextpage); |
|
177 | +} |
|
176 | 178 | |
177 | 179 | // Add $param from extra fields |
178 | 180 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
@@ -124,8 +124,8 @@ |
||
124 | 124 | $htmlname = 'activesynchro'; |
125 | 125 | } |
126 | 126 | |
127 | - $dolibarr2ldaplabel = $langs->trans("DolibarrToLDAP") . (($scriptonly == 1 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPExportScriptOnly").")" : ""); |
|
128 | - $ldap2dolibarrlabel = $langs->trans("LDAPToDolibarr") . (($scriptonly == 2 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPImportScriptOnly").")" : ""); |
|
127 | + $dolibarr2ldaplabel = $langs->trans("DolibarrToLDAP").(($scriptonly == 1 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPExportScriptOnly").")" : ""); |
|
128 | + $ldap2dolibarrlabel = $langs->trans("LDAPToDolibarr").(($scriptonly == 2 || $scriptonly == 3) ? " (".$langs->trans("SupportedForLDAPImportScriptOnly").")" : ""); |
|
129 | 129 | |
130 | 130 | $arraylist = array( |
131 | 131 | Ldap::SYNCHRO_NONE => $langs->trans("No"), |
@@ -175,10 +175,10 @@ |
||
175 | 175 | } |
176 | 176 | |
177 | 177 | $i = 1; |
178 | - $filepath = $path . $filename . '.' . $ext; |
|
178 | + $filepath = $path.$filename.'.'.$ext; |
|
179 | 179 | |
180 | 180 | while (file_exists($filepath)) { |
181 | - $filepath = $path . $filename . '(' . $i . ').' . $ext; |
|
181 | + $filepath = $path.$filename.'('.$i.').'.$ext; |
|
182 | 182 | $i++; |
183 | 183 | } |
184 | 184 | file_put_contents($filepath, $data); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $result = $db->query($sql); |
79 | 79 | if ($result) { |
80 | 80 | $nbline = $db->num_rows($result); |
81 | - for ($i=0; $i < $nbline; $i++) { |
|
81 | + for ($i = 0; $i < $nbline; $i++) { |
|
82 | 82 | $object = $db->fetch_object($result); |
83 | 83 | if (($mode == "barcode" && $barcode == $object->barcode) || ($mode == "lotserial" && $barcode == $object->batch)) { |
84 | 84 | $warehouse->fetch(0, $product["Warehouse"]); |
@@ -88,22 +88,22 @@ discard block |
||
88 | 88 | $fk_product = $object->fk_product; |
89 | 89 | $reelqty = $object->reel; |
90 | 90 | |
91 | - $objectreturn = array('fk_warehouse'=>$warehouseid,'fk_product'=>$fk_product,'reelqty'=>$reelqty); |
|
91 | + $objectreturn = array('fk_warehouse'=>$warehouseid, 'fk_product'=>$fk_product, 'reelqty'=>$reelqty); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | } |
95 | 95 | if ($warehousefound < 1) { |
96 | - $response = array('status'=>'error','errorcode'=>'NotFound','message'=>'No warehouse found for barcode'.$barcode); |
|
96 | + $response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>'No warehouse found for barcode'.$barcode); |
|
97 | 97 | } elseif ($warehousefound > 1) { |
98 | - $response = array('status'=>'error','errorcode'=>'TooManyWarehouse','message'=>'Too many warehouse found'); |
|
98 | + $response = array('status'=>'error', 'errorcode'=>'TooManyWarehouse', 'message'=>'Too many warehouse found'); |
|
99 | 99 | } else { |
100 | - $response = array('status'=>'success','message'=>'Warehouse found','object'=>$objectreturn); |
|
100 | + $response = array('status'=>'success', 'message'=>'Warehouse found', 'object'=>$objectreturn); |
|
101 | 101 | } |
102 | 102 | } else { |
103 | - $response = array('status'=>'error','errorcode'=>'NotFound','message'=>"No results found for barcode"); |
|
103 | + $response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>"No results found for barcode"); |
|
104 | 104 | } |
105 | 105 | } else { |
106 | - $response = array('status'=>'error','errorcode'=>'ActionError','message'=>"Error on action"); |
|
106 | + $response = array('status'=>'error', 'errorcode'=>'ActionError', 'message'=>"Error on action"); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | if ($action == "addnewlineproduct") { |
@@ -122,12 +122,12 @@ discard block |
||
122 | 122 | |
123 | 123 | $result = $inventoryline->create($user); |
124 | 124 | if ($result > 0) { |
125 | - $response = array('status'=>'success','message'=>'Success on creating line','id_line'=>$result); |
|
125 | + $response = array('status'=>'success', 'message'=>'Success on creating line', 'id_line'=>$result); |
|
126 | 126 | } else { |
127 | - $response = array('status'=>'error','errorcode'=>'ErrorCreation','message'=>"Error on line creation"); |
|
127 | + $response = array('status'=>'error', 'errorcode'=>'ErrorCreation', 'message'=>"Error on line creation"); |
|
128 | 128 | } |
129 | 129 | } else { |
130 | - $response = array('status'=>'error','errorcode'=>'NoIdForInventory','message'=>"No id for inventory"); |
|
130 | + $response = array('status'=>'error', 'errorcode'=>'NoIdForInventory', 'message'=>"No id for inventory"); |
|
131 | 131 | } |
132 | 132 | } |
133 | 133 |
@@ -84,7 +84,10 @@ |
||
84 | 84 | $db->query($sql); |
85 | 85 | } elseif ($split==0) { // Unsplit line |
86 | 86 | $invoice = new Facture($db); |
87 | - if ($place=="SPLIT") $place="0"; // Avoid move line to the same place (from SPLIT to SPLIT place) |
|
87 | + if ($place=="SPLIT") { |
|
88 | + $place="0"; |
|
89 | + } |
|
90 | + // Avoid move line to the same place (from SPLIT to SPLIT place) |
|
88 | 91 | $ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')'); |
89 | 92 | if ($ret > 0) { |
90 | 93 | $placeid = $invoice->id; |
@@ -56,17 +56,17 @@ discard block |
||
56 | 56 | * Actions |
57 | 57 | */ |
58 | 58 | |
59 | -if ($action=="split") { |
|
59 | +if ($action == "split") { |
|
60 | 60 | $line = GETPOST('line', 'int'); |
61 | 61 | $split = GETPOST('split', 'int'); |
62 | - if ($split==1) { // Split line |
|
62 | + if ($split == 1) { // Split line |
|
63 | 63 | $invoice = new Facture($db); |
64 | 64 | $ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-SPLIT)'); |
65 | 65 | if ($ret > 0) { |
66 | 66 | $placeid = $invoice->id; |
67 | 67 | } else { |
68 | 68 | $constforcompanyid = 'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]; |
69 | - $invoice->socid =getDolGlobalInt($constforcompanyid); |
|
69 | + $invoice->socid = getDolGlobalInt($constforcompanyid); |
|
70 | 70 | $invoice->date = dol_now(); |
71 | 71 | $invoice->module_source = 'takepos'; |
72 | 72 | $invoice->pos_source = $_SESSION["takeposterminal"]; |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | } |
86 | 86 | $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set fk_facture=".$placeid." where rowid=".$line; |
87 | 87 | $db->query($sql); |
88 | - } elseif ($split==0) { // Unsplit line |
|
88 | + } elseif ($split == 0) { // Unsplit line |
|
89 | 89 | $invoice = new Facture($db); |
90 | - if ($place=="SPLIT") $place="0"; // Avoid move line to the same place (from SPLIT to SPLIT place) |
|
90 | + if ($place == "SPLIT") $place = "0"; // Avoid move line to the same place (from SPLIT to SPLIT place) |
|
91 | 91 | $ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')'); |
92 | 92 | if ($ret > 0) { |
93 | 93 | $placeid = $invoice->id; |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | <script> |
165 | 165 | function Split(selectedline, split) { |
166 | 166 | $.ajax({ |
167 | - url: "split.php?action=split&token=<?php echo newToken(); ?>&line="+selectedline+"&split="+split+"&place=<?php echo $place;?>", |
|
167 | + url: "split.php?action=split&token=<?php echo newToken(); ?>&line="+selectedline+"&split="+split+"&place=<?php echo $place; ?>", |
|
168 | 168 | context: document.body |
169 | 169 | }).done(function() { |
170 | 170 | $("#currentplace").load("invoice.php?place="+parent.place+"&invoiceid="+parent.invoiceid, function() { |
@@ -201,8 +201,8 @@ discard block |
||
201 | 201 | |
202 | 202 | |
203 | 203 | |
204 | - $("#headersplit1").html("<?php echo $langs->trans("Place");?> "+parent.place); |
|
205 | - $("#headersplit2").html("<?php echo $langs->trans("SplitSale");?>"); |
|
204 | + $("#headersplit1").html("<?php echo $langs->trans("Place"); ?> "+parent.place); |
|
205 | + $("#headersplit2").html("<?php echo $langs->trans("SplitSale"); ?>"); |
|
206 | 206 | |
207 | 207 | }); |
208 | 208 | </script> |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $title = $langs->trans("Multicompanies"); |
82 | 82 | |
83 | 83 | // URL http://mydolibarr/core/multicompany_page?dol_use_jmobile=1 can be used for tests |
84 | -$head = '<!-- Multicompany selection -->'."\n"; // This is used by DoliDroid to know page is a multicompany selection page |
|
84 | +$head = '<!-- Multicompany selection -->'."\n"; // This is used by DoliDroid to know page is a multicompany selection page |
|
85 | 85 | $arrayofjs = array(); |
86 | 86 | $arrayofcss = array(); |
87 | 87 | top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $title = $langs->trans("Bookmarks"); |
59 | 59 | |
60 | 60 | // URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests |
61 | -$head = '<!-- Bookmarks -->'."\n"; // This is used by DoliDroid to know page is a bookmark selection page |
|
61 | +$head = '<!-- Bookmarks -->'."\n"; // This is used by DoliDroid to know page is a bookmark selection page |
|
62 | 62 | $arrayofjs = array(); |
63 | 63 | $arrayofcss = array(); |
64 | 64 | top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); |
@@ -84,7 +84,7 @@ |
||
84 | 84 | $title = $langs->trans("Menu"); |
85 | 85 | |
86 | 86 | // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests |
87 | -$head = '<!-- Menu -->'."\n"; // This is used by DoliDroid to know page is a menu page |
|
87 | +$head = '<!-- Menu -->'."\n"; // This is used by DoliDroid to know page is a menu page |
|
88 | 88 | $arrayofjs = array(); |
89 | 89 | $arrayofcss = array(); |
90 | 90 | top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | // Specify as export : update field date_validated on selected month/year |
88 | 88 | $sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping"; |
89 | 89 | $sql .= " SET date_validated = '".$db->idate($now)."'"; |
90 | - $sql .= " WHERE entity = " . ((int) $conf->entity); |
|
91 | - $sql .= " AND doc_date >= '" . $db->idate($date_start) . "'"; |
|
92 | - $sql .= " AND doc_date <= '" . $db->idate($date_end) . "'"; |
|
90 | + $sql .= " WHERE entity = ".((int) $conf->entity); |
|
91 | + $sql .= " AND doc_date >= '".$db->idate($date_start)."'"; |
|
92 | + $sql .= " AND doc_date <= '".$db->idate($date_end)."'"; |
|
93 | 93 | $sql .= " AND date_validated IS NULL"; |
94 | 94 | |
95 | 95 | dol_syslog("/accountancy/closure/index.php action=validate_movement_confirm -> Set movements as validated", LOG_DEBUG); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | $title = $langs->trans('Closure'); |
124 | 124 | |
125 | -$help_url ='EN:Module_Double_Entry_Accounting'; |
|
125 | +$help_url = 'EN:Module_Double_Entry_Accounting'; |
|
126 | 126 | |
127 | 127 | llxHeader('', $title, $help_url); |
128 | 128 |