FIX: unit price divided by quantity when accepting supplier price proposal
This commit is contained in:
parent
593f3b81e5
commit
215085e0e6
@ -1810,7 +1810,7 @@ class SupplierProposal extends CommonObject
|
||||
if(!empty($conf->multicurrency->enabled) && !empty($product->multicurrency_code)) list($fk_multicurrency, $multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $product->multicurrency_code);
|
||||
$productsupplier->id = $product->fk_product;
|
||||
|
||||
$productsupplier->update_buyprice($product->qty, $product->subprice, $user, 'HT', $this->thirdparty, '', $ref_fourn, $product->tva_tx, 0, 0, 0, $product->info_bits, '', '', array(), '', $product->multicurrency_subprice, 'HT', $multicurrency_tx, $product->multicurrency_code, '', '', '');
|
||||
$productsupplier->update_buyprice($product->qty, $product->total_ht, $user, 'HT', $this->thirdparty, '', $ref_fourn, $product->tva_tx, 0, 0, 0, $product->info_bits, '', '', array(), '', $product->multicurrency_total_ht, 'HT', $multicurrency_tx, $product->multicurrency_code, '', '', '' );
|
||||
}
|
||||
|
||||
return 1;
|
||||
@ -1849,7 +1849,7 @@ class SupplierProposal extends CommonObject
|
||||
public function createPriceFournisseur($product, $user)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
$price=price2num($product->subprice*$product->qty, 'MU');
|
||||
$qty=price2num($product->qty);
|
||||
$unitPrice = price2num($product->subprice, 'MU');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user