mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
FIX inconsistency in margin recording with option "Force to sale price"
This commit is contained in:
@@ -7122,7 +7122,7 @@ abstract class CommonObject
|
||||
|
||||
$buyPrice = 0;
|
||||
|
||||
if (($unitPrice > 0) && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) // In most cases, test here is false
|
||||
if (($unitPrice > 0) && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull > 0)) // In most cases, test here is false
|
||||
{
|
||||
$buyPrice = $unitPrice * (1 - $discountPercent / 100);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user