Fix Price by qty for multiprices
This commit is contained in:
parent
534db40d87
commit
cef9a8e8d4
@ -187,7 +187,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
|
||||
$("#'.$htmlnamejquery.'").attr("data-ref-customer", ui.item.ref_customer);
|
||||
$("#'.$htmlnamejquery.'").attr("data-tvatx", ui.item.tva_tx);
|
||||
';
|
||||
if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) {
|
||||
if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) {
|
||||
$script .= '
|
||||
// For customer price when PRODUIT_CUSTOMER_PRICES_BY_QTY is on
|
||||
$("#'.$htmlnamejquery.'").attr("data-pbq", ui.item.pbq);
|
||||
|
||||
@ -911,7 +911,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) {
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) {?>
|
||||
if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) {?>
|
||||
/* To process customer price per quantity (PRODUIT_CUSTOMER_PRICES_BY_QTY works only if combo product is not an ajax after x key pressed) */
|
||||
var pbq = parseInt($('option:selected', this).attr('data-pbq')); // When select is done from HTML select
|
||||
if (isNaN(pbq)) { pbq = jQuery('#idprod').attr('data-pbq'); } // When select is done from HTML input with autocomplete
|
||||
|
||||
Loading…
Reference in New Issue
Block a user