Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
365c442f70
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2023 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1058,8 +1059,10 @@ class BOM extends CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
$line->unit_cost = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : $tmpproduct->pmp);
|
$line->unit_cost = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : $tmpproduct->pmp);
|
||||||
if (empty($line->unit_cost)) {
|
if ((empty($line->unit_cost)) && ($productFournisseur->find_min_price_product_fournisseur($line->fk_product) > 0)) {
|
||||||
if ($productFournisseur->find_min_price_product_fournisseur($line->fk_product) > 0) {
|
if ($productFournisseur->fourn_remise_percent != "0") {
|
||||||
|
$line->unit_cost = $productFournisseur->fourn_unitprice_with_discount;
|
||||||
|
} else {
|
||||||
$line->unit_cost = $productFournisseur->fourn_unitprice;
|
$line->unit_cost = $productFournisseur->fourn_unitprice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2681,6 +2681,11 @@ class ExpenseReportLine extends CommonObjectLine
|
|||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Name of table without prefix where object is stored
|
||||||
|
*/
|
||||||
|
public $table_element = 'expensereport_det';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user