More log to help debug
This commit is contained in:
parent
71f19b4e5e
commit
5f417039f6
@ -636,11 +636,15 @@ if (!empty($usemargins) && $user->rights->margins->creer)
|
|||||||
{
|
{
|
||||||
console.log("We are in a price per qty context, we do not call ajax/product");
|
console.log("We are in a price per qty context, we do not call ajax/product");
|
||||||
} else {
|
} else {
|
||||||
|
<?php if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { ?>
|
||||||
|
if (isNaN(pbq)) { console.log("We use experimental option PRODUIT_CUSTOMER_PRICES_BY_QTY or PRODUIT_CUSTOMER_PRICES_BY_QTY but we are not yet able to get the id of pbq from product combo list, so load of price may be 0 if product has differet prices"); }
|
||||||
|
<?php } ?>
|
||||||
// Get the HT price for the product and display it
|
// Get the HT price for the product and display it
|
||||||
console.log("Load price without tax and set it into #price_ht for id="+$(this).val()+" socid=<?php print $object->socid; ?>");
|
console.log("Load unit price without tax and set it into #price_ht for product id="+$(this).val()+" socid=<?php print $object->socid; ?>");
|
||||||
$.post('<?php echo DOL_URL_ROOT; ?>/product/ajax/products.php?action=fetch',
|
$.post('<?php echo DOL_URL_ROOT; ?>/product/ajax/products.php?action=fetch',
|
||||||
{ 'id': $(this).val(), 'socid': <?php print $object->socid; ?> },
|
{ 'id': $(this).val(), 'socid': <?php print $object->socid; ?> },
|
||||||
function(data) {
|
function(data) {
|
||||||
|
console.log("Load unit price end, we got value "+data.price_ht);
|
||||||
jQuery("#price_ht").val(data.price_ht);
|
jQuery("#price_ht").val(data.price_ht);
|
||||||
},
|
},
|
||||||
'json'
|
'json'
|
||||||
@ -658,6 +662,7 @@ if (!empty($usemargins) && $user->rights->margins->creer)
|
|||||||
$("#fournprice_predef").find("option").remove();
|
$("#fournprice_predef").find("option").remove();
|
||||||
$("#fournprice_predef").hide();
|
$("#fournprice_predef").hide();
|
||||||
$("#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() }, function(data) {
|
||||||
if (data && data.length > 0)
|
if (data && data.length > 0)
|
||||||
@ -715,7 +720,7 @@ if (!empty($usemargins) && $user->rights->margins->creer)
|
|||||||
});
|
});
|
||||||
options += '<option value="inputprice" price="'+defaultprice+'"><?php echo $langs->trans("InputPrice"); ?></option>';
|
options += '<option value="inputprice" price="'+defaultprice+'"><?php echo $langs->trans("InputPrice"); ?></option>';
|
||||||
|
|
||||||
console.log("finally selected defaultkey="+defaultkey+" defaultprice="+defaultprice);
|
console.log("finally selected defaultkey="+defaultkey+" defaultprice for buying price="+defaultprice);
|
||||||
|
|
||||||
$("#fournprice_predef").html(options).show();
|
$("#fournprice_predef").html(options).show();
|
||||||
if (defaultkey != '')
|
if (defaultkey != '')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user