mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 11:24:28 -04:00
Working on gateway fees
This commit is contained in:
parent
0791e6fbc5
commit
3883c3d4f6
@ -28,15 +28,14 @@ trait ChargesFees
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($settings->fee_percent) {
|
if ($settings->fee_percent) {
|
||||||
|
$amount = $this->partial > 0 ? $this->partial : $this->balance;
|
||||||
|
|
||||||
// prevent charging taxes twice on the surcharge
|
// prevent charging taxes twice on the surcharge
|
||||||
if ($location == FEE_LOCATION_ITEM) {
|
if ($location != FEE_LOCATION_ITEM) {
|
||||||
$amount = $this->partial > 0 ? $this->partial : $this->balance;
|
|
||||||
} else {
|
|
||||||
$amount = $this->amount;
|
|
||||||
if ($this->$taxField) {
|
if ($this->$taxField) {
|
||||||
$taxAmount = 0;
|
$taxAmount = 0;
|
||||||
foreach ($this->getTaxes() as $key => $tax) {
|
foreach ($this->getTaxes() as $key => $tax) {
|
||||||
$taxAmount += $tax['amount'];
|
$taxAmount += $tax['amount'] - $tax['paid'];
|
||||||
}
|
}
|
||||||
$amount -= $taxAmount;
|
$amount -= $taxAmount;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user