Skip to content

Commit

Permalink
Fix #4239
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 10, 2016
1 parent f13df0f commit 801e2bc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion htdocs/core/tpl/objectline_edit.tpl.php
Expand Up @@ -308,7 +308,13 @@ function checkEditLine(e, npRate)
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

Expand Down

0 comments on commit 801e2bc

Please sign in to comment.