forked from Wavyzz/dolibarr
Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -3173,6 +3173,8 @@ class Form
|
||||
'type'=>$outtype,
|
||||
'price_ht'=>price2num($outprice_ht),
|
||||
'price_ttc'=>price2num($outprice_ttc),
|
||||
'price_ht_locale'=>price(price2num($outprice_ht)),
|
||||
'price_ttc_locale'=>price(price2num($outprice_ttc)),
|
||||
'pricebasetype'=>$outpricebasetype,
|
||||
'tva_tx'=>$outtva_tx,
|
||||
'default_vat_code'=>$outdefault_vat_code,
|
||||
@@ -3274,9 +3276,9 @@ class Form
|
||||
$sql .= " pfp.supplier_reputation";
|
||||
// if we use supplier description of the products
|
||||
if (!empty($conf->global->PRODUIT_FOURN_TEXTS)) {
|
||||
$sql .= " ,pfp.desc_fourn as description";
|
||||
$sql .= ", pfp.desc_fourn as description";
|
||||
} else {
|
||||
$sql .= " ,p.description";
|
||||
$sql .= ", p.description";
|
||||
}
|
||||
// Units
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
@@ -3558,7 +3560,13 @@ class Form
|
||||
$optstart .= ' disabled';
|
||||
}
|
||||
if (!empty($objp->idprodfournprice) && $objp->idprodfournprice > 0) {
|
||||
$optstart .= ' data-product-id="'.$objp->rowid.'" data-price-id="'.$objp->idprodfournprice.'" data-qty="'.$objp->quantity.'" data-up="'.$objp->unitprice.'" data-discount="'.$outdiscount.'" data-tvatx="'.$objp->tva_tx.'"';
|
||||
$opt .= ' data-product-id="'.dol_escape_htmltag($objp->rowid).'"';
|
||||
$opt .= ' data-price-id="'.dol_escape_htmltag($objp->idprodfournprice).'"';
|
||||
$opt .= ' data-qty="'.dol_escape_htmltag($objp->quantity).'"';
|
||||
$opt .= ' data-up="'.dol_escape_htmltag($objp->unitprice).'"';
|
||||
$opt .= ' data-up-locale="'.dol_escape_htmltag(price($objp->unitprice)).'"';
|
||||
$opt .= ' data-discount="'.dol_escape_htmltag($outdiscount).'"';
|
||||
$opt .= ' data-tvatx="'.dol_escape_htmltag($objp->tva_tx).'"';
|
||||
}
|
||||
$optstart .= ' data-description="'.dol_escape_htmltag($objp->description, 0, 1).'"';
|
||||
|
||||
@@ -3594,8 +3602,27 @@ class Form
|
||||
// "key" value of json key array is used by jQuery automatically as selected value. Example: 'type' = product or service, 'price_ht' = unit price without tax
|
||||
// "label" value of json key array is used by jQuery automatically as text for combo box
|
||||
$out .= $optstart . ' data-html="'.dol_escape_htmltag($optlabel).'">' . $optlabel . "</option>\n";;
|
||||
array_push($outarray, $outarrayentry);
|
||||
|
||||
array_push(
|
||||
$outarray,
|
||||
array('key'=>$outkey,
|
||||
'value'=>$outref,
|
||||
'label'=>$outval,
|
||||
'qty'=>$outqty,
|
||||
'price_qty_ht'=>price2num($objp->fprice, 'MU'), // Keep higher resolution for price for the min qty
|
||||
'price_unit_ht'=>price2num($objp->unitprice, 'MU'), // This is used to fill the Unit Price
|
||||
'price_ht'=>price2num($objp->unitprice, 'MU'), // This is used to fill the Unit Price (for compatibility)
|
||||
'price_qty_ht_locale'=>price($objp->fprice),
|
||||
'price_unit_ht_locale'=>price($objp->unitprice),
|
||||
'tva_tx'=>$objp->tva_tx,
|
||||
'default_vat_code'=>$objp->default_vat_code,
|
||||
'discount'=>$outdiscount,
|
||||
'type'=>$outtype,
|
||||
'duration_value'=>$outdurationvalue,
|
||||
'duration_unit'=>$outdurationunit,
|
||||
'disabled'=>(empty($objp->idprodfournprice) ? true : false),
|
||||
'description'=>$objp->description
|
||||
)
|
||||
);
|
||||
// Exemple of var_dump $outarray
|
||||
// array(1) {[0]=>array(6) {[key"]=>string(1) "2" ["value"]=>string(3) "ppp"
|
||||
// ["label"]=>string(76) "ppp (<strong>f</strong>ff2) - ppp - 20,00 Euros/1unité (20,00 Euros/unité)"
|
||||
|
||||
Reference in New Issue
Block a user