Skip to content
Snippets Groups Projects
Commit 801e2bca authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix #4239

parent f13df0f9
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment