@@ -32,8 +32,8 @@ |
||
| 32 | 32 | //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language |
| 33 | 33 | //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); |
| 34 | 34 | //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); |
| 35 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 36 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 35 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 36 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 37 | 37 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 38 | 38 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
| 39 | 39 | |
@@ -26,8 +26,8 @@ |
||
| 26 | 26 | * \brief Page with the content for smpcb payment |
| 27 | 27 | */ |
| 28 | 28 | |
| 29 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 30 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 29 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 30 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 31 | 31 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 32 | 32 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
| 33 | 33 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | - use Alxarafe\Lib\Functions;use Dolibarr\Lib\ViewCss; |
|
| 25 | + use Alxarafe\Lib\Functions;use Dolibarr\Lib\ViewCss; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * \file htdocs/takepos/css/pos.css.php |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | - use Alxarafe\Lib\Functions;use Dolibarr\Lib\ViewCss; |
|
| 25 | + use Alxarafe\Lib\Functions; use Dolibarr\Lib\ViewCss; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * \file htdocs/takepos/css/pos.css.php |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language |
| 33 | 33 | //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. |
| 34 | -Functions::defineIfNotDefined('NOREQUIRESOC', 1); // No company needed |
|
| 34 | +Functions::defineIfNotDefined('NOREQUIRESOC', 1); // No company needed |
|
| 35 | 35 | //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations |
| 36 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 37 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 36 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 37 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 38 | 38 | //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We need top menu content |
| 39 | 39 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 40 | 40 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
@@ -36,8 +36,8 @@ discard block |
||
| 36 | 36 | // if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); |
| 37 | 37 | // if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); |
| 38 | 38 | |
| 39 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 40 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 39 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 40 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 41 | 41 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 42 | 42 | |
| 43 | 43 | // Load Dolibarr environment |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | function fetchConnectionToken() { |
| 123 | 123 | <?php |
| 124 | - $urlconnexiontoken = constant('BASE_URL') . '/stripe/ajax/ajax.php?action=getConnexionToken&token=' . newToken() . '&servicestatus=' . urlencode((string)($servicestatus)); |
|
| 124 | + $urlconnexiontoken = constant('BASE_URL') . '/stripe/ajax/ajax.php?action=getConnexionToken&token=' . newToken() . '&servicestatus=' . urlencode((string) ($servicestatus)); |
|
| 125 | 125 | if (getDolGlobalString('STRIPE_LOCATION')) { |
| 126 | 126 | $urlconnexiontoken .= '&location=' . urlencode(getDolGlobalString('STRIPE_LOCATION')); |
| 127 | 127 | } |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | function fetchPaymentIntentClientSecret(amount, invoiceid) { |
| 359 | 359 | const bodyContent = JSON.stringify({amount: amount, invoiceid: invoiceid}); |
| 360 | 360 | <?php |
| 361 | - $urlpaymentintent = constant('BASE_URL') . '/stripe/ajax/ajax.php?action=createPaymentIntent&token=' . newToken() . '&servicestatus=' . urlencode((string)$servicestatus); |
|
| 361 | + $urlpaymentintent = constant('BASE_URL') . '/stripe/ajax/ajax.php?action=createPaymentIntent&token=' . newToken() . '&servicestatus=' . urlencode((string) $servicestatus); |
|
| 362 | 362 | if (!empty($stripeacc)) { |
| 363 | 363 | $urlpaymentintent .= '&stripeacc=' . $stripeacc; |
| 364 | 364 | } |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | function capturePaymentIntent(paymentIntentId) { |
| 383 | 383 | const bodyContent = JSON.stringify({"id": paymentIntentId}) |
| 384 | 384 | <?php |
| 385 | - $urlpaymentintent = constant('BASE_URL') . '/stripe/ajax/ajax.php?action=capturePaymentIntent&token=' . newToken() . '&servicestatus=' . urlencode((string)($servicestatus)); |
|
| 385 | + $urlpaymentintent = constant('BASE_URL') . '/stripe/ajax/ajax.php?action=capturePaymentIntent&token=' . newToken() . '&servicestatus=' . urlencode((string) ($servicestatus)); |
|
| 386 | 386 | if (!empty($stripeacc)) { |
| 387 | 387 | $urlpaymentintent .= '&stripeacc=' . urlencode($stripeacc); |
| 388 | 388 | } |
@@ -34,8 +34,8 @@ |
||
| 34 | 34 | //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language |
| 35 | 35 | //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); |
| 36 | 36 | //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); |
| 37 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 38 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 37 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 38 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 39 | 39 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 40 | 40 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
| 41 | 41 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | // if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); |
| 37 | 37 | // if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); |
| 38 | 38 | |
| 39 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 39 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 40 | 40 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 41 | 41 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
| 42 | 42 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | if ($setterminal > 0) { |
| 62 | 62 | $_SESSION["takeposterminal"] = $setterminal; |
| 63 | - setcookie("takeposterminal", (string)$setterminal, (time() + (86400 * 354)), '/', '', (empty($dolibarr_main_force_https) ? false : true), true); // Permanent takeposterminal var in a cookie |
|
| 63 | + setcookie("takeposterminal", (string) $setterminal, (time() + (86400 * 354)), '/', '', (empty($dolibarr_main_force_https) ? false : true), true); // Permanent takeposterminal var in a cookie |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | if ($setcurrency != "") { |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | limit = maxproduct - 1; |
| 369 | 369 | } |
| 370 | 370 | // Only show products for sale (tosell=1) |
| 371 | - $.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) { |
|
| 371 | + $.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) { |
|
| 372 | 372 | console.log("Call ajax.php (in LoadProducts) to get Products of category " + currentcat + " then loop on result to fill image thumbs"); |
| 373 | 373 | console.log(data); |
| 374 | 374 | |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | var offset = <?php echo($MAXPRODUCT - 2); ?> * |
| 488 | 488 | pageproducts; |
| 489 | 489 | // Only show products for sale (tosell=1) |
| 490 | - $.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) { |
|
| 490 | + $.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) { |
|
| 491 | 491 | console.log("Call ajax.php (in MoreProducts) to get Products of category " + currentcat); |
| 492 | 492 | |
| 493 | 493 | if (typeof (data[0]) == "undefined" && moreorless == "more") { // Return if no more pages |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | function ChangeThirdparty(idcustomer) { |
| 573 | 573 | console.log("ChangeThirdparty"); |
| 574 | 574 | // Call page list.php to change customer |
| 575 | - $("#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 () { |
|
| 575 | + $("#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 () { |
|
| 576 | 576 | }); |
| 577 | 577 | |
| 578 | 578 | ClearSearch(false); |
@@ -733,7 +733,7 @@ discard block |
||
| 733 | 733 | |
| 734 | 734 | console.log("New with place = <?php echo $place; ?>, js place=" + place + ", invoiceid=" + invoiceid); |
| 735 | 735 | |
| 736 | - $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken();?>&id=' + invoiceid, function (data) { |
|
| 736 | + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken(); ?>&id=' + invoiceid, function (data) { |
|
| 737 | 737 | var r; |
| 738 | 738 | |
| 739 | 739 | if (parseInt(data['paye']) === 1) { |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | pageproducts = 0; |
| 807 | 807 | jQuery(".wrapper2 .catwatermark").hide(); |
| 808 | 808 | var nbsearchresults = 0; |
| 809 | - $.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) { |
|
| 809 | + $.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) { |
|
| 810 | 810 | for (i = 0; i < <?php echo $MAXPRODUCT ?>; i++) { |
| 811 | 811 | if (typeof (data[i]) == "undefined") { |
| 812 | 812 | $("#prowatermark" + i).html(""); |
@@ -897,14 +897,14 @@ discard block |
||
| 897 | 897 | $("#prodiv<?php echo $MAXPRODUCT - 2; ?> span").hide(); |
| 898 | 898 | } else { |
| 899 | 899 | $("#prodiv<?php echo $MAXPRODUCT - 2; ?> span").show(); |
| 900 | - var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2;?>)); |
|
| 900 | + var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2; ?>)); |
|
| 901 | 901 | $("#search_start_less").val(search_start_less); |
| 902 | 902 | } |
| 903 | 903 | if (nbsearchresults != <?php echo $MAXPRODUCT - 2; ?>) { |
| 904 | 904 | $("#prodiv<?php echo $MAXPRODUCT - 1; ?> span").hide(); |
| 905 | 905 | } else { |
| 906 | 906 | $("#prodiv<?php echo $MAXPRODUCT - 1; ?> span").show(); |
| 907 | - var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2;?>); |
|
| 907 | + var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2; ?>); |
|
| 908 | 908 | $("#search_start_more").val(search_start_more); |
| 909 | 909 | } |
| 910 | 910 | }); |
@@ -997,14 +997,14 @@ discard block |
||
| 997 | 997 | |
| 998 | 998 | function TakeposPrintingOrder() { |
| 999 | 999 | console.log("TakeposPrintingOrder"); |
| 1000 | - $("#poslines").load("invoice.php?action=order&token=<?php echo newToken();?>&place=" + place, function () { |
|
| 1000 | + $("#poslines").load("invoice.php?action=order&token=<?php echo newToken(); ?>&place=" + place, function () { |
|
| 1001 | 1001 | //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); |
| 1002 | 1002 | }); |
| 1003 | 1003 | } |
| 1004 | 1004 | |
| 1005 | 1005 | function TakeposPrintingTemp() { |
| 1006 | 1006 | console.log("TakeposPrintingTemp"); |
| 1007 | - $("#poslines").load("invoice.php?action=temp&token=<?php echo newToken();?>&place=" + place, function () { |
|
| 1007 | + $("#poslines").load("invoice.php?action=temp&token=<?php echo newToken(); ?>&place=" + place, function () { |
|
| 1008 | 1008 | //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); |
| 1009 | 1009 | }); |
| 1010 | 1010 | } |
@@ -1026,7 +1026,7 @@ discard block |
||
| 1026 | 1026 | } |
| 1027 | 1027 | |
| 1028 | 1028 | function DolibarrOpenDrawer() { |
| 1029 | - console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken();?>&term=<?php print urlencode(empty($_SESSION["takeposterminal"]) ? '' : $_SESSION["takeposterminal"]); ?>"); |
|
| 1029 | + console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken(); ?>&term=<?php print urlencode(empty($_SESSION["takeposterminal"]) ? '' : $_SESSION["takeposterminal"]); ?>"); |
|
| 1030 | 1030 | $.ajax({ |
| 1031 | 1031 | type: "GET", |
| 1032 | 1032 | data: {token: '<?php echo currentToken(); ?>'}, |
@@ -1127,8 +1127,8 @@ discard block |
||
| 1127 | 1127 | |
| 1128 | 1128 | if (getDolGlobalString('TAKEPOS_CONTROL_CASH_OPENING')) { |
| 1129 | 1129 | $sql = "SELECT rowid, status FROM " . MAIN_DB_PREFIX . "pos_cash_fence WHERE"; |
| 1130 | - $sql .= " entity = " . ((int)$conf->entity) . " AND "; |
|
| 1131 | - $sql .= " posnumber = " . ((int)$_SESSION["takeposterminal"]) . " AND "; |
|
| 1130 | + $sql .= " entity = " . ((int) $conf->entity) . " AND "; |
|
| 1131 | + $sql .= " posnumber = " . ((int) $_SESSION["takeposterminal"]) . " AND "; |
|
| 1132 | 1132 | $sql .= " date_creation > '" . $db->idate(dol_get_first_hour(dol_now())) . "'"; |
| 1133 | 1133 | $resql = $db->query($sql); |
| 1134 | 1134 | if ($resql) { |
@@ -1281,7 +1281,7 @@ discard block |
||
| 1281 | 1281 | ?> |
| 1282 | 1282 | <div class="login_block_user"> |
| 1283 | 1283 | <?php |
| 1284 | - print ViewMain::topMenuUser(1, constant('BASE_URL') . '/user/logout.php?token=' . newToken() . '&urlfrom=' . urlencode('/takepos/?setterminal=' . ((int)$term))); |
|
| 1284 | + print ViewMain::topMenuUser(1, constant('BASE_URL') . '/user/logout.php?token=' . newToken() . '&urlfrom=' . urlencode('/takepos/?setterminal=' . ((int) $term))); |
|
| 1285 | 1285 | ?> |
| 1286 | 1286 | </div> |
| 1287 | 1287 | </div> |
@@ -1530,8 +1530,8 @@ discard block |
||
| 1530 | 1530 | } |
| 1531 | 1531 | |
| 1532 | 1532 | $sql = "SELECT rowid, status, entity FROM " . MAIN_DB_PREFIX . "pos_cash_fence WHERE"; |
| 1533 | - $sql .= " entity = " . ((int)$conf->entity) . " AND "; |
|
| 1534 | - $sql .= " posnumber = " . ((int)empty($_SESSION["takeposterminal"]) ? 0 : $_SESSION["takeposterminal"]) . " AND "; |
|
| 1533 | + $sql .= " entity = " . ((int) $conf->entity) . " AND "; |
|
| 1534 | + $sql .= " posnumber = " . ((int) empty($_SESSION["takeposterminal"]) ? 0 : $_SESSION["takeposterminal"]) . " AND "; |
|
| 1535 | 1535 | $sql .= " date_creation > '" . $db->idate(dol_get_first_hour(dol_now())) . "'"; |
| 1536 | 1536 | |
| 1537 | 1537 | $resql = $db->query($sql); |
@@ -40,10 +40,10 @@ discard block |
||
| 40 | 40 | //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language |
| 41 | 41 | //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); |
| 42 | 42 | //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); |
| 43 | - Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 44 | - Functions::defineIfNotDefined('NOREQUIREMENU', 1); // No menu needed |
|
| 45 | - Functions::defineIfNotDefined('NOREQUIREHTML', 1); // No view needed |
|
| 46 | - Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // No AJAX needed |
|
| 43 | + Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 44 | + Functions::defineIfNotDefined('NOREQUIREMENU', 1); // No menu needed |
|
| 45 | + Functions::defineIfNotDefined('NOREQUIREHTML', 1); // No view needed |
|
| 46 | + Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // No AJAX needed |
|
| 47 | 47 | |
| 48 | 48 | require constant('DOL_DOCUMENT_ROOT') . '/main.inc.php'; // If this file is called from send.php avoid load again |
| 49 | 49 | } |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | $sql .= " cp.code"; |
| 310 | 310 | $sql .= " FROM " . MAIN_DB_PREFIX . "paiement_facture as pf, " . MAIN_DB_PREFIX . "facture as f, " . MAIN_DB_PREFIX . "paiement as p"; |
| 311 | 311 | $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_paiement as cp ON p.fk_paiement = cp.id"; |
| 312 | - $sql .= " WHERE pf.fk_facture = f.rowid AND pf.fk_paiement = p.rowid AND pf.fk_facture = " . ((int)$facid); |
|
| 312 | + $sql .= " WHERE pf.fk_facture = f.rowid AND pf.fk_paiement = p.rowid AND pf.fk_facture = " . ((int) $facid); |
|
| 313 | 313 | $sql .= " ORDER BY p.datep"; |
| 314 | 314 | |
| 315 | 315 | $resql = $db->query($sql); |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | if ((!isModEnabled('multicurrency') || $object->multicurrency_tx == 1) && $row->code == "LIQ" && $row->pos_change > 0) { |
| 341 | 341 | echo '<tr>'; |
| 342 | 342 | echo '<td class="right">'; |
| 343 | - echo $langs->trans("Change"); // ChangeBack ? |
|
| 343 | + echo $langs->trans("Change"); // ChangeBack ? |
|
| 344 | 344 | echo '</td>'; |
| 345 | 345 | echo '<td class="right">'; |
| 346 | 346 | echo price($row->pos_change, 1, '', 1, -1, -1, $currency); |
@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | * \brief Ajax search component for TakePos. It search products of a category. |
| 32 | 32 | */ |
| 33 | 33 | |
| 34 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 35 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 34 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 35 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 36 | 36 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 37 | 37 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
| 38 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 38 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 39 | 39 | |
| 40 | 40 | // Load Dolibarr environment |
| 41 | 41 | require constant('DOL_DOCUMENT_ROOT') . '/main.inc.php'; // Load $user and permissions |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks |
| 55 | 55 | $hookmanager->initHooks(array('takeposproductsearch')); // new context for product search hooks |
| 56 | 56 | |
| 57 | -$pricelevel = 1; // default price level if PRODUIT_MULTIPRICES. TODO Get price level from thirdparty. |
|
| 57 | +$pricelevel = 1; // default price level if PRODUIT_MULTIPRICES. TODO Get price level from thirdparty. |
|
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 | /* |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | if ($result > 0) { |
| 92 | 92 | $filter = ''; |
| 93 | 93 | if ($tosell != '') { |
| 94 | - $filter = '(o.tosell:=:' . ((int)$tosell) . ')'; |
|
| 94 | + $filter = '(o.tosell:=:' . ((int) $tosell) . ')'; |
|
| 95 | 95 | } |
| 96 | 96 | $prods = $object->getObjectsInCateg("product", 0, $limit, $offset, getDolGlobalString('TAKEPOS_SORTPRODUCTFIELD'), 'ASC', $filter); |
| 97 | 97 | // Removed properties we don't need |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | if (isset($barcode_value_list['qd'])) { |
| 209 | 209 | $qty_str .= '.' . $barcode_value_list['qd']; |
| 210 | 210 | } |
| 211 | - $qty = (float)$qty_str; |
|
| 211 | + $qty = (float) $qty_str; |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | $objProd = new Product($db); |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as ps'; |
| 286 | 286 | $sql .= ' ON (p.rowid = ps.fk_product'; |
| 287 | 287 | if (getDolGlobalString('CASHDESK_ID_WAREHOUSE' . $_SESSION['takeposterminal'])) { |
| 288 | - $sql .= " AND ps.fk_entrepot = " . ((int)getDolGlobalInt("CASHDESK_ID_WAREHOUSE" . $_SESSION['takeposterminal'])); |
|
| 288 | + $sql .= " AND ps.fk_entrepot = " . ((int) getDolGlobalInt("CASHDESK_ID_WAREHOUSE" . $_SESSION['takeposterminal'])); |
|
| 289 | 289 | } |
| 290 | 290 | $sql .= ')'; |
| 291 | 291 | } |
@@ -36,8 +36,8 @@ |
||
| 36 | 36 | //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language |
| 37 | 37 | //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); |
| 38 | 38 | //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); |
| 39 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 40 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 39 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 40 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 41 | 41 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 42 | 42 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
| 43 | 43 | |