@@ -382,7 +382,7 @@ |
||
382 | 382 | print '<td class="right">'.$val['nb'].'</td>'; |
383 | 383 | print '<td class="right opacitylow" style="'.((empty($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(!empty($val['nb_diff']) && $val['nb_diff'] < 0 ? '' : '+').round(!empty($val['nb_diff']) ? $val['nb_diff'] : 0).'%</td>'; |
384 | 384 | print '<td class="right"><span class="amount">'.price(price2num($val['total'], 'MT'), 1).'</span></td>'; |
385 | - print '<td class="right opacitylow" style="'.((empty($val['total_diff']) || $val['total_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.( !empty($val['total_diff']) && $val['total_diff'] < 0 ? '' : '+').round(!empty($val['total_diff']) ? $val['total_diff'] : 0).'%</td>'; |
|
385 | + print '<td class="right opacitylow" style="'.((empty($val['total_diff']) || $val['total_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(!empty($val['total_diff']) && $val['total_diff'] < 0 ? '' : '+').round(!empty($val['total_diff']) ? $val['total_diff'] : 0).'%</td>'; |
|
386 | 386 | print '<td class="right"><span class="amount">'.price(price2num($val['avg'], 'MT'), 1).'</span></td>'; |
387 | 387 | print '<td class="right opacitylow" style="'.((empty($val['avg_diff']) || $val['avg_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(!empty($val['avg_diff']) && $val['avg_diff'] < 0 ? '' : '+').round(!empty($val['avg_diff']) ? $val['avg_diff'] : 0).'%</td>'; |
388 | 388 | print '</tr>'; |
@@ -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 |
@@ -125,7 +125,7 @@ |
||
125 | 125 | if ($resql) { |
126 | 126 | while ($row = $db->fetch_array($resql)) { |
127 | 127 | $label = ''; |
128 | - if (! empty($conf->global->SOCIETE_ADD_REF_IN_LIST)) { |
|
128 | + if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST)) { |
|
129 | 129 | if (($row['client']) && (!empty($row['code_client']))) { |
130 | 130 | $label = $row['code_client'].' - '; |
131 | 131 | } |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | accessforbidden(); |
54 | 54 | } |
55 | 55 | |
56 | -if ($action=="split") { |
|
56 | +if ($action == "split") { |
|
57 | 57 | $line = GETPOST('line', 'int'); |
58 | 58 | $split = GETPOST('split', 'int'); |
59 | - if ($split==1) { // Split line |
|
59 | + if ($split == 1) { // Split line |
|
60 | 60 | $invoice = new Facture($db); |
61 | 61 | $ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-SPLIT)'); |
62 | 62 | if ($ret > 0) { |
@@ -82,9 +82,9 @@ discard block |
||
82 | 82 | } |
83 | 83 | $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set fk_facture=".$placeid." where rowid=".$line; |
84 | 84 | $db->query($sql); |
85 | - } elseif ($split==0) { // Unsplit line |
|
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") $place = "0"; // Avoid move line to the same place (from SPLIT to SPLIT place) |
|
88 | 88 | $ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')'); |
89 | 89 | if ($ret > 0) { |
90 | 90 | $placeid = $invoice->id; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | <script> |
167 | 167 | function Split(selectedline, split) { |
168 | 168 | $.ajax({ |
169 | - url: "split.php?action=split&line="+selectedline+"&split="+split+"&place=<?php echo $place;?>", |
|
169 | + url: "split.php?action=split&line="+selectedline+"&split="+split+"&place=<?php echo $place; ?>", |
|
170 | 170 | context: document.body |
171 | 171 | }).done(function() { |
172 | 172 | $("#currentplace").load("invoice.php?place="+parent.place+"&invoiceid="+parent.invoiceid, function() { |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | |
204 | 204 | |
205 | 205 | |
206 | - $("#headersplit1").html("<?php echo $langs->trans("Place");?> "+parent.place); |
|
207 | - $("#headersplit2").html("<?php echo $langs->trans("SplitSale");?>"); |
|
206 | + $("#headersplit1").html("<?php echo $langs->trans("Place"); ?> "+parent.place); |
|
207 | + $("#headersplit2").html("<?php echo $langs->trans("SplitSale"); ?>"); |
|
208 | 208 | |
209 | 209 | }); |
210 | 210 | </script> |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $search_date_endday = GETPOST('search_date_endday', 'int'); |
105 | 105 | $search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
106 | 106 | $search_date_endyear = GETPOST('search_date_endyear', 'int'); |
107 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
107 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
108 | 108 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
109 | 109 | $search_datelimit_startday = GETPOST('search_datelimit_startday', 'int'); |
110 | 110 | $search_datelimit_startmonth = GETPOST('search_datelimit_startmonth', 'int'); |
@@ -576,16 +576,16 @@ discard block |
||
576 | 576 | $sql .= " AND f.fk_cond_reglement = ".((int) $search_paymentcond); |
577 | 577 | } |
578 | 578 | if ($search_date_start) { |
579 | - $sql .= " AND f.datef >= '" . $db->idate($search_date_start) . "'"; |
|
579 | + $sql .= " AND f.datef >= '".$db->idate($search_date_start)."'"; |
|
580 | 580 | } |
581 | 581 | if ($search_date_end) { |
582 | - $sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'"; |
|
582 | + $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'"; |
|
583 | 583 | } |
584 | 584 | if ($search_datelimit_start) { |
585 | - $sql .= " AND f.date_lim_reglement >= '" . $db->idate($search_datelimit_start) . "'"; |
|
585 | + $sql .= " AND f.date_lim_reglement >= '".$db->idate($search_datelimit_start)."'"; |
|
586 | 586 | } |
587 | 587 | if ($search_datelimit_end) { |
588 | - $sql .= " AND f.date_lim_reglement <= '" . $db->idate($search_datelimit_end) . "'"; |
|
588 | + $sql .= " AND f.date_lim_reglement <= '".$db->idate($search_datelimit_end)."'"; |
|
589 | 589 | } |
590 | 590 | if ($option == 'late') { |
591 | 591 | $sql .= " AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->fournisseur->warning_delay)."'"; |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c_dep ON c_dep.rowid = t.fk_departement"; |
238 | 238 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as ccount ON ccount.rowid = t.fk_pays"; |
239 | 239 | if ($separatedPMP) { |
240 | - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as pa ON pa.fk_product = p.rowid AND pa.fk_product = ps.fk_product AND pa.entity = ". (int) $conf->entity; |
|
240 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as pa ON pa.fk_product = p.rowid AND pa.fk_product = ps.fk_product AND pa.entity = ".(int) $conf->entity; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | $sql .= " WHERE t.entity IN (".getEntity('stock').")"; |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), |
380 | 380 | ); |
381 | 381 | //if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']=img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); |
382 | -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { |
|
382 | +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { |
|
383 | 383 | $arrayofmassactions = array(); |
384 | 384 | } |
385 | 385 | if ($user->rights->stock->creer) { |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { |
475 | 475 | print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1); |
476 | 476 | } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { |
477 | - print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(!empty($search[$key])?$search[$key]:'').'">'; |
|
477 | + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(!empty($search[$key]) ? $search[$key] : '').'">'; |
|
478 | 478 | } |
479 | 479 | print '</td>'; |
480 | 480 | } |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
636 | 636 | include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; |
637 | 637 | |
638 | - $content=''; |
|
638 | + $content = ''; |
|
639 | 639 | $pathoffile = $this->getDescLongReadmeFound(); |
640 | 640 | |
641 | 641 | if ($pathoffile) { // Mostly for external modules |
@@ -1359,7 +1359,7 @@ discard block |
||
1359 | 1359 | |
1360 | 1360 | $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def"; |
1361 | 1361 | $sql .= " WHERE file = '".$this->db->escape($file)."'"; |
1362 | - $sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
1362 | + $sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
1363 | 1363 | |
1364 | 1364 | dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG); |
1365 | 1365 | $resql = $this->db->query($sql); |
@@ -1767,7 +1767,7 @@ discard block |
||
1767 | 1767 | |
1768 | 1768 | // If the module is active |
1769 | 1769 | foreach ($this->rights as $key => $value) { |
1770 | - $r_id = $this->rights[$key][0]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
1770 | + $r_id = $this->rights[$key][0]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
1771 | 1771 | $r_desc = $this->rights[$key][1]; |
1772 | 1772 | $r_type = isset($this->rights[$key][2]) ? $this->rights[$key][2] : ''; |
1773 | 1773 | $r_def = empty($this->rights[$key][3]) ? 0 : $this->rights[$key][3]; |
@@ -2345,9 +2345,9 @@ discard block |
||
2345 | 2345 | } |
2346 | 2346 | |
2347 | 2347 | if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { |
2348 | - $versionTitle = $langs->trans("Version").' '.$this->getVersion(1); |
|
2348 | + $versionTitle = $langs->trans("Version").' '.$this->getVersion(1); |
|
2349 | 2349 | if ($this->needUpdate) { |
2350 | - $versionTitle.= '<br>'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion; |
|
2350 | + $versionTitle .= '<br>'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion; |
|
2351 | 2351 | } |
2352 | 2352 | |
2353 | 2353 | print '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >'; |
@@ -2391,7 +2391,7 @@ discard block |
||
2391 | 2391 | { |
2392 | 2392 | require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; |
2393 | 2393 | if (!empty($this->url_last_version)) { |
2394 | - $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only |
|
2394 | + $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only |
|
2395 | 2395 | if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) { |
2396 | 2396 | // Security warning : be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . - |
2397 | 2397 | $this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']); |
@@ -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); |