Merge pull request #15084 from FHenry/12.0_fix_tokenCheck_GetSupplierPrice
12.0 fix token check get supplier price
This commit is contained in:
commit
732f236c32
@ -667,7 +667,7 @@ if (!empty($usemargins) && $user->rights->margins->creer)
|
|||||||
$("#buying_price").val("").show();
|
$("#buying_price").val("").show();
|
||||||
|
|
||||||
/* Call post to load content of combo list fournprice_predef */
|
/* Call post to load content of combo list fournprice_predef */
|
||||||
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php?bestpricefirst=1', { 'idprod': $(this).val() }, function(data) {
|
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php?bestpricefirst=1', { 'idprod': $(this).val(), 'token': '<?php echo newToken(); ?>' }, function(data) {
|
||||||
if (data && data.length > 0)
|
if (data && data.length > 0)
|
||||||
{
|
{
|
||||||
var options = ''; var defaultkey = ''; var defaultprice = ''; var bestpricefound = 0;
|
var options = ''; var defaultkey = ''; var defaultprice = ''; var bestpricefound = 0;
|
||||||
|
|||||||
@ -430,7 +430,7 @@ jQuery(document).ready(function()
|
|||||||
});
|
});
|
||||||
|
|
||||||
/* Init field buying_price and fournprice */
|
/* Init field buying_price and fournprice */
|
||||||
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', {'idprod': <?php echo $line->fk_product ? $line->fk_product : 0; ?>}, function(data) {
|
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', {'idprod': <?php echo $line->fk_product ? $line->fk_product : 0; ?>, 'token': '<?php echo newToken(); ?>'}, function(data) {
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
var options = '';
|
var options = '';
|
||||||
var trouve=false;
|
var trouve=false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user