This commit is contained in:
Laurent Destailleur 2016-01-10 18:42:35 +01:00
parent f13df0f952
commit 801e2bca4b

View File

@ -308,7 +308,13 @@ if (! empty($conf->margin->enabled))
if (npRate == "np_marginRate")
price = ((bpjs * (1 + ratejs / 100)) / (1 - remisejs / 100));
else if (npRate == "np_markRate")
price = ((bpjs / (1 - ratejs / 100)) / (1 - remisejs / 100));
{
if (ratejs != 100) // If markRate is 100, it means buying price is 0, so it is not possible to retreive price from it and markRate. We keep it unchange
{
price = ((bpjs / (1 - (ratejs / 100))) / (1 - remisejs / 100));
}
else price=$("input[name='price_ht']:first").val();
}
}
$("input[name='price_ht']:first").val(price); // TODO Must use a function like php price to have here a formated value