mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Use correct formula when adjust_fee_percent=true
This commit is contained in:
parent
0be452e144
commit
039544e753
@ -287,7 +287,11 @@ class CompanyGateway extends BaseModel
|
||||
}
|
||||
|
||||
if ($fees_and_limits->fee_percent) {
|
||||
if ($fees_and_limits->adjust_fee_percent) {
|
||||
$fee += round(($amount / (1 - $fees_and_limits->fee_percent / 100) - $amount),2);
|
||||
} else {
|
||||
$fee += round(($amount * $fees_and_limits->fee_percent / 100),2);
|
||||
}
|
||||
info("fee after adding fee percent = {$fee}");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user