mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-14 08:54:21 +01:00
Merge pull request #1237 from altairis-fr/3.4
Fix: Supplier price displayed on document lines and margin infos didnt take discount
This commit is contained in:
@@ -25,7 +25,7 @@ Fix: Edit propal line was losing product supplier price id
|
||||
Fix: Delete linked element to supplier invoice when deleted
|
||||
Fix: [ bug #1061 ] Bad info shipped products
|
||||
Fix: [ bug #1062 ] Documents lost in propals and contracts validating
|
||||
Fix: Supplier price displayed on document lines didnt take discount
|
||||
Fix: Supplier price displayed on document lines and margin infos didnt take discount
|
||||
Qual: Add travis-ci integration
|
||||
|
||||
|
||||
|
||||
@@ -3104,7 +3104,7 @@ abstract class CommonObject
|
||||
if (empty($line->pa_ht) && isset($line->fk_fournprice) && !$force_price) {
|
||||
$product = new ProductFournisseur($this->db);
|
||||
if ($product->fetch_product_fournisseur_price($line->fk_fournprice))
|
||||
$line->pa_ht = $product->fourn_unitprice;
|
||||
$line->pa_ht = $product->fourn_unitprice * (1 - $product->fourn_remise_percent / 100);
|
||||
if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == "2" && $product->fourn_unitcharges > 0)
|
||||
$line->pa_ht += $product->fourn_unitcharges;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localta
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$product = new ProductFournisseur($db);
|
||||
if ($product->fetch_product_fournisseur_price($fk_pa)) {
|
||||
$paht_ret = $product->fourn_unitprice;
|
||||
$paht_ret = $product->fourn_unitprice * (1 - $product->fourn_remise_percent / 100);
|
||||
if ($conf->global->MARGIN_TYPE == "2" && $product->fourn_unitcharges > 0)
|
||||
$paht_ret += $product->fourn_unitcharges;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user