@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | if ($sortorder) { |
426 | 426 | $backtopage .= '&sortorder=' . urlencode($sortorder); |
427 | 427 | } |
428 | -include DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
428 | +include DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
429 | 429 | |
430 | 430 | $backtopage = $savbacktopage; |
431 | 431 | //var_dump($backtopage); |
@@ -1188,7 +1188,7 @@ discard block |
||
1188 | 1188 | $content = ''; |
1189 | 1189 | if (GETPOSTISSET('content')) { |
1190 | 1190 | //$content = GETPOST('content', 'restricthtmlallowunvalid'); // @TODO Use a restricthtmlallowunvalidwithphp |
1191 | - $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
1191 | + $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
1192 | 1192 | |
1193 | 1193 | $objectpage->content = make_substitutions($content, $substitutionarray); |
1194 | 1194 | } else { |
@@ -1561,7 +1561,7 @@ discard block |
||
1561 | 1561 | $error++; |
1562 | 1562 | setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors'); |
1563 | 1563 | } |
1564 | - if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
1564 | + if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
1565 | 1565 | $error++; |
1566 | 1566 | setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors'); |
1567 | 1567 | } |
@@ -1573,7 +1573,7 @@ discard block |
||
1573 | 1573 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
1574 | 1574 | $action = 'preview'; |
1575 | 1575 | if ($backtopage) { |
1576 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1576 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1577 | 1577 | header("Location: " . $backtopage); |
1578 | 1578 | exit; |
1579 | 1579 | } |
@@ -1606,7 +1606,7 @@ discard block |
||
1606 | 1606 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1607 | 1607 | |
1608 | 1608 | // Security analysis |
1609 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1609 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1610 | 1610 | |
1611 | 1611 | if (!$errorphpcheck) { |
1612 | 1612 | $htmlheadercontent = ''; |
@@ -1644,7 +1644,7 @@ discard block |
||
1644 | 1644 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1645 | 1645 | |
1646 | 1646 | // Security analysis |
1647 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1647 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1648 | 1648 | |
1649 | 1649 | if (!$errorphpcheck) { |
1650 | 1650 | $csscontent = ''; |
@@ -1687,7 +1687,7 @@ discard block |
||
1687 | 1687 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1688 | 1688 | |
1689 | 1689 | // Security analysis |
1690 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1690 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1691 | 1691 | |
1692 | 1692 | if (!$errorphpcheck) { |
1693 | 1693 | $jscontent = ''; |
@@ -1725,7 +1725,7 @@ discard block |
||
1725 | 1725 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1726 | 1726 | |
1727 | 1727 | // Security analysis |
1728 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1728 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1729 | 1729 | |
1730 | 1730 | if (!$errorphpcheck) { |
1731 | 1731 | $robotcontent = ''; |
@@ -1763,7 +1763,7 @@ discard block |
||
1763 | 1763 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1764 | 1764 | |
1765 | 1765 | // Security analysis |
1766 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1766 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1767 | 1767 | |
1768 | 1768 | if (!$errorphpcheck) { |
1769 | 1769 | $htaccesscontent = ''; |
@@ -1787,7 +1787,7 @@ discard block |
||
1787 | 1787 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1788 | 1788 | |
1789 | 1789 | // Security analysis |
1790 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1790 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1791 | 1791 | |
1792 | 1792 | if (!$errorphpcheck) { |
1793 | 1793 | $manifestjsoncontent = ''; |
@@ -1826,7 +1826,7 @@ discard block |
||
1826 | 1826 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1827 | 1827 | |
1828 | 1828 | // Security analysis |
1829 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1829 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1830 | 1830 | |
1831 | 1831 | if (!$errorphpcheck) { |
1832 | 1832 | $readmecontent = ''; |
@@ -1865,7 +1865,7 @@ discard block |
||
1865 | 1865 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1866 | 1866 | |
1867 | 1867 | // Security analysis |
1868 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1868 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1869 | 1869 | |
1870 | 1870 | if (!$errorphpcheck) { |
1871 | 1871 | $licensecontent = ''; |
@@ -1907,7 +1907,7 @@ discard block |
||
1907 | 1907 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
1908 | 1908 | $action = 'preview'; |
1909 | 1909 | if ($backtopage) { |
1910 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1910 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1911 | 1911 | header("Location: " . $backtopage); |
1912 | 1912 | exit; |
1913 | 1913 | } |
@@ -1926,7 +1926,7 @@ discard block |
||
1926 | 1926 | |
1927 | 1927 | $object->fk_default_home = $pageid; |
1928 | 1928 | $res = $object->update($user); |
1929 | - if (! ($res > 0)) { |
|
1929 | + if (!($res > 0)) { |
|
1930 | 1930 | $error++; |
1931 | 1931 | setEventMessages($object->error, $object->errors, 'errors'); |
1932 | 1932 | } |
@@ -2540,7 +2540,7 @@ discard block |
||
2540 | 2540 | $fileofzip = ''; |
2541 | 2541 | if (GETPOSTISSET('templateuserfile')) { |
2542 | 2542 | // Case we selected one template |
2543 | - $fileofzip = DOL_DATA_ROOT . '/doctemplates/websites/' . GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
2543 | + $fileofzip = DOL_DATA_ROOT . '/doctemplates/websites/' . GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
2544 | 2544 | } elseif (!empty($_FILES) && is_array($_FILES['userfile'])) { |
2545 | 2545 | // Case we upload a new template |
2546 | 2546 | if (is_array($_FILES['userfile']['tmp_name'])) { |
@@ -2622,7 +2622,7 @@ discard block |
||
2622 | 2622 | if ($website->virtualhost) { |
2623 | 2623 | $domainname = $website->virtualhost; |
2624 | 2624 | } |
2625 | - if (! preg_match('/^http/i', $domainname)) { |
|
2625 | + if (!preg_match('/^http/i', $domainname)) { |
|
2626 | 2626 | $domainname = 'https://' . $domainname; |
2627 | 2627 | } |
2628 | 2628 | |
@@ -2688,7 +2688,7 @@ discard block |
||
2688 | 2688 | $url->appendChild($lastmod); |
2689 | 2689 | // Add suggested frequency for refresh |
2690 | 2690 | if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
2691 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2691 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2692 | 2692 | $url->appendChild($changefreq); |
2693 | 2693 | } |
2694 | 2694 | // Add higher priority for home page |
@@ -2793,7 +2793,7 @@ discard block |
||
2793 | 2793 | $url->appendChild($lastmod); |
2794 | 2794 | // Add suggested frequency for refresh |
2795 | 2795 | if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
2796 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2796 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2797 | 2797 | $url->appendChild($changefreq); |
2798 | 2798 | } |
2799 | 2799 | |
@@ -3618,7 +3618,7 @@ discard block |
||
3618 | 3618 | } else { |
3619 | 3619 | $disabled = ''; |
3620 | 3620 | $title = ''; |
3621 | - $url = $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&pageid=' . ((int) $websitepage->id) . '&website=' . urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
3621 | + $url = $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&pageid=' . ((int) $websitepage->id) . '&website=' . urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
3622 | 3622 | } |
3623 | 3623 | print '<a href="' . $url . '" class="button buttonDelete bordertransp' . ($disabled ? ' disabled' : '') . '"' . $disabled . ' title="' . dol_escape_htmltag($title) . '">' . img_picto('', 'delete', 'class=""') . '<span class="hideonsmartphone paddingleft">' . $langs->trans("Delete") . '</span></a>'; |
3624 | 3624 | print '</span>'; |
@@ -3838,7 +3838,7 @@ discard block |
||
3838 | 3838 | // Clean the php htaccesscontent file to remove php code and get only html part |
3839 | 3839 | $htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htaccesscontent); |
3840 | 3840 | } else { |
3841 | - $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
3841 | + $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
3842 | 3842 | } |
3843 | 3843 | if (!trim($htaccesscontent)) { |
3844 | 3844 | $htaccesscontent .= "# Order allow,deny\n"; |
@@ -3939,7 +3939,7 @@ discard block |
||
3939 | 3939 | $maxfilesizearray = getMaxFileSizeArray(); |
3940 | 3940 | $maxmin = $maxfilesizearray['maxmin']; |
3941 | 3941 | if ($maxmin > 0) { |
3942 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
3942 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
3943 | 3943 | } |
3944 | 3944 | print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>'; |
3945 | 3945 | |
@@ -4196,7 +4196,7 @@ discard block |
||
4196 | 4196 | $maxfilesizearray = getMaxFileSizeArray(); |
4197 | 4197 | $maxmin = $maxfilesizearray['maxmin']; |
4198 | 4198 | if ($maxmin > 0) { |
4199 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
4199 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
4200 | 4200 | } |
4201 | 4201 | print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">'; |
4202 | 4202 | print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="' . dol_escape_htmltag($langs->trans("Upload")) . '">'; |
@@ -4854,7 +4854,7 @@ discard block |
||
4854 | 4854 | |
4855 | 4855 | |
4856 | 4856 | $module = 'medias'; |
4857 | - $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php |
|
4857 | + $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php |
|
4858 | 4858 | if (empty($url)) { |
4859 | 4859 | $url = constant('BASE_URL') . '/website/index.php'; // Must be an url without param |
4860 | 4860 | } |
@@ -5089,8 +5089,8 @@ discard block |
||
5089 | 5089 | print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; |
5090 | 5090 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
5091 | 5091 | print getTitleFieldOfList("UserCreation", 0, $_SERVER['PHP_SELF'], 'fk_user_creat', '', $param, '', $sortfield, $sortorder, '') . "\n"; |
5092 | - print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date creation |
|
5093 | - print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date last modif |
|
5092 | + print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date creation |
|
5093 | + print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date last modif |
|
5094 | 5094 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
5095 | 5095 | // Action column |
5096 | 5096 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
@@ -100,7 +100,7 @@ |
||
100 | 100 | * @param string $password Password to validate for $username |
101 | 101 | * @return bool True if login ok, false if not |
102 | 102 | */ |
103 | - static function ($username, $password) { |
|
103 | + static function($username, $password) { |
|
104 | 104 | global $user, $conf; |
105 | 105 | global $dolibarr_main_authentication, $dolibarr_auto_user; |
106 | 106 |
@@ -33,9 +33,9 @@ |
||
33 | 33 | |
34 | 34 | // If socid provided by ajax company selector |
35 | 35 | if (GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha')) { |
36 | - $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ? |
|
37 | - $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ? |
|
38 | - $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ? |
|
36 | + $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ? |
|
37 | + $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ? |
|
38 | + $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ? |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // Security check |
@@ -58,7 +58,7 @@ discard block |
||
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 |
||
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'; |
@@ -163,15 +163,15 @@ discard block |
||
163 | 163 | <th class="right"><?php print $langs->trans("Qty"); ?></th> |
164 | 164 | <th class="right"><?php if ($gift != 1) { |
165 | 165 | print $langs->trans("Price"); |
166 | - } ?></th> |
|
166 | + } ?></th> |
|
167 | 167 | <?php if (getDolGlobalString('TAKEPOS_SHOW_HT_RECEIPT')) { ?> |
168 | 168 | <th class="right"><?php if ($gift != 1) { |
169 | 169 | print $langs->trans("TotalHT"); |
170 | - } ?></th> |
|
170 | + } ?></th> |
|
171 | 171 | <?php } ?> |
172 | 172 | <th class="right"><?php if ($gift != 1) { |
173 | 173 | print $langs->trans("TotalTTC"); |
174 | - } ?></th> |
|
174 | + } ?></th> |
|
175 | 175 | </tr> |
176 | 176 | </thead> |
177 | 177 | <tbody> |
@@ -201,17 +201,17 @@ discard block |
||
201 | 201 | <td class="right"><?php echo $line->qty; ?></td> |
202 | 202 | <td class="right"><?php if ($gift != 1) { |
203 | 203 | echo price(price2num($line->total_ttc / $line->qty, 'MT'), 1); |
204 | - } ?></td> |
|
204 | + } ?></td> |
|
205 | 205 | <?php |
206 | 206 | if (getDolGlobalString('TAKEPOS_SHOW_HT_RECEIPT')) { ?> |
207 | 207 | <td class="right"><?php if ($gift != 1) { |
208 | 208 | echo price($line->total_ht, 1); |
209 | - } ?></td> |
|
209 | + } ?></td> |
|
210 | 210 | <?php |
211 | 211 | } ?> |
212 | 212 | <td class="right"><?php if ($gift != 1) { |
213 | 213 | echo price($line->total_ttc, 1); |
214 | - } ?></td> |
|
214 | + } ?></td> |
|
215 | 215 | </tr> |
216 | 216 | <?php |
217 | 217 | } |
@@ -224,10 +224,10 @@ discard block |
||
224 | 224 | <tr> |
225 | 225 | <th class="right"><?php if ($gift != 1) { |
226 | 226 | echo $langs->trans("TotalHT"); |
227 | - } ?></th> |
|
227 | + } ?></th> |
|
228 | 228 | <td class="right"><?php if ($gift != 1) { |
229 | 229 | echo price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . "\n"; |
230 | - } ?></td> |
|
230 | + } ?></td> |
|
231 | 231 | </tr> |
232 | 232 | <?php if (getDolGlobalString('TAKEPOS_TICKET_VAT_GROUPPED')) { |
233 | 233 | $vat_groups = array(); |
@@ -243,10 +243,10 @@ discard block |
||
243 | 243 | <tr> |
244 | 244 | <th align="right"><?php if ($gift != 1) { |
245 | 245 | echo $langs->trans("VAT") . ' ' . vatrate($key, 1); |
246 | - } ?></th> |
|
246 | + } ?></th> |
|
247 | 247 | <td align="right"><?php if ($gift != 1) { |
248 | 248 | echo price($val, 1, '', 1, - 1, - 1, $conf->currency) . "\n"; |
249 | - } ?></td> |
|
249 | + } ?></td> |
|
250 | 250 | </tr> |
251 | 251 | <?php |
252 | 252 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | <tr> |
255 | 255 | <th class="right"><?php if ($gift != 1) { |
256 | 256 | echo $langs->trans("TotalVAT") . '</th><td class="right">' . price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency) . "\n"; |
257 | - } ?></td> |
|
257 | + } ?></td> |
|
258 | 258 | </tr> |
259 | 259 | <?php } |
260 | 260 | |
@@ -264,20 +264,20 @@ discard block |
||
264 | 264 | <tr> |
265 | 265 | <th class="right"><?php if ($gift != 1) { |
266 | 266 | echo '' . $langs->trans("TotalLT1") . '</th><td class="right">' . price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency) . "\n"; |
267 | - } ?></td> |
|
267 | + } ?></td> |
|
268 | 268 | </tr> |
269 | 269 | <?php } ?> |
270 | 270 | <?php if (price2num($object->total_localtax2, 'MU') || $mysoc->useLocalTax(2)) { ?> |
271 | 271 | <tr> |
272 | 272 | <th class="right"><?php if ($gift != 1) { |
273 | 273 | echo '' . $langs->trans("TotalLT2") . '</th><td class="right">' . price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency) . "\n"; |
274 | - } ?></td> |
|
274 | + } ?></td> |
|
275 | 275 | </tr> |
276 | 276 | <?php } ?> |
277 | 277 | <tr> |
278 | 278 | <th class="right"><?php if ($gift != 1) { |
279 | 279 | echo '' . $langs->trans("TotalTTC") . '</th><td class="right">' . price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency) . "\n"; |
280 | - } ?></td> |
|
280 | + } ?></td> |
|
281 | 281 | </tr> |
282 | 282 | <?php |
283 | 283 | if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) { |
@@ -341,7 +341,7 @@ |
||
341 | 341 | if ((!isModEnabled('multicurrency') || $object->multicurrency_tx == 1) && $row->code == "LIQ" && $row->pos_change > 0) { |
342 | 342 | echo '<tr>'; |
343 | 343 | echo '<td class="right">'; |
344 | - echo $langs->trans("Change"); // ChangeBack ? |
|
344 | + echo $langs->trans("Change"); // ChangeBack ? |
|
345 | 345 | echo '</td>'; |
346 | 346 | echo '<td class="right">'; |
347 | 347 | echo price($row->pos_change, 1, '', 1, - 1, - 1, $currency); |
@@ -39,8 +39,8 @@ |
||
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")) { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | */ |
174 | 174 | |
175 | 175 | $parameters = array(); |
176 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
176 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
177 | 177 | if ($reshook < 0) { |
178 | 178 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
179 | 179 | } |
@@ -188,9 +188,9 @@ discard block |
||
188 | 188 | $bankaccount = GETPOSTINT('accountid'); |
189 | 189 | } else { |
190 | 190 | if ($pay == 'LIQ') { |
191 | - $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CASH' . $_SESSION["takeposterminal"]); // For backward compatibility |
|
191 | + $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CASH' . $_SESSION["takeposterminal"]); // For backward compatibility |
|
192 | 192 | } elseif ($pay == "CHQ") { |
193 | - $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CHEQUE' . $_SESSION["takeposterminal"]); // For backward compatibility |
|
193 | + $bankaccount = getDolGlobalInt('CASHDESK_ID_BANKACCOUNT_CHEQUE' . $_SESSION["takeposterminal"]); // For backward compatibility |
|
194 | 194 | } else { |
195 | 195 | $accountname = "CASHDESK_ID_BANKACCOUNT_" . $pay . $_SESSION["takeposterminal"]; |
196 | 196 | $bankaccount = getDolGlobalInt($accountname); |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | $creditnote->socid = $invoice->socid; |
380 | 380 | $creditnote->date = dol_now(); |
381 | 381 | $creditnote->module_source = 'takepos'; |
382 | - $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; |
|
382 | + $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''; |
|
383 | 383 | $creditnote->type = Facture::TYPE_CREDIT_NOTE; |
384 | 384 | $creditnote->fk_facture_source = $placeid; |
385 | 385 | //$creditnote->remise_absolue = $invoice->remise_absolue; |
@@ -536,9 +536,9 @@ discard block |
||
536 | 536 | // If we add a line and no invoice yet, we create the invoice |
537 | 537 | if (($action == "addline" || $action == "freezone") && $placeid == 0 && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) { |
538 | 538 | $invoice->socid = getDolGlobalInt($constforcompanyid); |
539 | - $invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved. |
|
539 | + $invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved. |
|
540 | 540 | $invoice->module_source = 'takepos'; |
541 | - $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; |
|
541 | + $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''; |
|
542 | 542 | $invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity; |
543 | 543 | |
544 | 544 | if ($invoice->socid <= 0) { |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | |
749 | 749 | // complete line by hook |
750 | 750 | $parameters = array('prod' => $prod, 'line' => $line); |
751 | - $reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks |
|
751 | + $reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks |
|
752 | 752 | if ($reshook < 0) { |
753 | 753 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
754 | 754 | } |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | } |
944 | 944 | if (!$permissiontoupdateline) { |
945 | 945 | dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos") . ' - No permission to updateprice', null, 1); |
946 | - } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { |
|
946 | + } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { |
|
947 | 947 | $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
948 | 948 | } else { |
949 | 949 | $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
@@ -1007,7 +1007,7 @@ discard block |
||
1007 | 1007 | |
1008 | 1008 | if ($action == "setbatch" && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) { |
1009 | 1009 | $constantforkey = 'CASHDESK_ID_WAREHOUSE' . $_SESSION["takeposterminal"]; |
1010 | - $warehouseid = getDolGlobalInt($constantforkey); // TODO Get the wrehouse id from GETPOSTINT('warehouseid'); |
|
1010 | + $warehouseid = getDolGlobalInt($constantforkey); // TODO Get the wrehouse id from GETPOSTINT('warehouseid'); |
|
1011 | 1011 | $sql = "UPDATE " . MAIN_DB_PREFIX . "facturedet SET batch = '" . $db->escape($batch) . "', fk_warehouse = " . ((int) $warehouseid); |
1012 | 1012 | $sql .= " WHERE rowid=" . ((int) $idoflineadded); |
1013 | 1013 | $db->query($sql); |
@@ -1631,7 +1631,7 @@ discard block |
||
1631 | 1631 | |
1632 | 1632 | // Complete header by hook |
1633 | 1633 | $parameters = array(); |
1634 | -$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1634 | +$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1635 | 1635 | if ($reshook < 0) { |
1636 | 1636 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1637 | 1637 | } |
@@ -1798,7 +1798,7 @@ discard block |
||
1798 | 1798 | |
1799 | 1799 | // complete line by hook |
1800 | 1800 | $parameters = array('line' => $line); |
1801 | - $reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1801 | + $reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1802 | 1802 | if ($reshook < 0) { |
1803 | 1803 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1804 | 1804 | } |
@@ -1911,7 +1911,7 @@ discard block |
||
1911 | 1911 | |
1912 | 1912 | // complete line by hook |
1913 | 1913 | $parameters = array('line' => $line); |
1914 | - $reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1914 | + $reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1915 | 1915 | if ($reshook < 0) { |
1916 | 1916 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1917 | 1917 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | <script> |
168 | 168 | function Split(selectedline, split) { |
169 | 169 | $.ajax({ |
170 | - url: "split.php?action=split&token=<?php echo newToken(); ?>&line="+selectedline+"&split="+split+"&place=<?php echo $place;?>", |
|
170 | + url: "split.php?action=split&token=<?php echo newToken(); ?>&line="+selectedline+"&split="+split+"&place=<?php echo $place; ?>", |
|
171 | 171 | context: document.body |
172 | 172 | }).done(function() { |
173 | 173 | $("#currentplace").load("invoice.php?place="+parent.place+"&invoiceid="+parent.invoiceid, function() { |
@@ -204,8 +204,8 @@ discard block |
||
204 | 204 | |
205 | 205 | |
206 | 206 | |
207 | - $("#headersplit1").html("<?php echo $langs->trans("Place");?> "+parent.place); |
|
208 | - $("#headersplit2").html("<?php echo $langs->trans("SplitSale");?>"); |
|
207 | + $("#headersplit1").html("<?php echo $langs->trans("Place"); ?> "+parent.place); |
|
208 | + $("#headersplit2").html("<?php echo $langs->trans("SplitSale"); ?>"); |
|
209 | 209 | |
210 | 210 | }); |
211 | 211 | </script> |
@@ -228,9 +228,9 @@ |
||
228 | 228 | $floor--; |
229 | 229 | echo $floor; |
230 | 230 | $floor++; |
231 | - } else { |
|
232 | - echo "1"; |
|
233 | - } ?>';"> |
|
231 | + } else { |
|
232 | + echo "1"; |
|
233 | + } ?>';"> |
|
234 | 234 | <?php } ?> |
235 | 235 | <span class="valignmiddle"><?php echo $langs->trans("Floor") . " " . $floor; ?></span> |
236 | 236 | <img src="./img/arrow-next.png" class="valignmiddle" width="5%" onclick="location.href='floors.php?floor=<?php $floor++; |
@@ -180,7 +180,7 @@ |
||
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>'); |