mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for paypal fees
This commit is contained in:
parent
52197bef68
commit
7bd7996d7a
@ -179,7 +179,7 @@ class PayPalExpressPaymentDriver extends BaseDriver
|
|||||||
$_invoice = collect($this->payment_hash->data->invoices)->first();
|
$_invoice = collect($this->payment_hash->data->invoices)->first();
|
||||||
$invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id));
|
$invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id));
|
||||||
|
|
||||||
$this->fee = $this->feeCalc($invoice, $data['total']['amount_with_fee']);
|
// $this->fee = $this->feeCalc($invoice, $data['total']['amount_with_fee']);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'currency' => $this->client->getCurrencyCode(),
|
'currency' => $this->client->getCurrencyCode(),
|
||||||
@ -218,18 +218,6 @@ class PayPalExpressPaymentDriver extends BaseDriver
|
|||||||
'quantity' => 1,
|
'quantity' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
// if($this->fee > 0.1){
|
|
||||||
|
|
||||||
// $items[] = new Item([
|
|
||||||
// 'name' => " ",
|
|
||||||
// 'description' => ctrans('texts.gateway_fee_description'),
|
|
||||||
// 'price' => $this->fee,
|
|
||||||
// 'quantity' => 1,
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
return $items;
|
return $items;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ trait ChartQueries
|
|||||||
GROUP BY invoices.date
|
GROUP BY invoices.date
|
||||||
HAVING currency_id = :currency_id
|
HAVING currency_id = :currency_id
|
||||||
"), [
|
"), [
|
||||||
'company_currency' => $this->company->settings->currency_id,
|
'company_currency' => (int)$this->company->settings->currency_id,
|
||||||
'currency_id' => $currency_id,
|
'currency_id' => $currency_id,
|
||||||
'company_id' => $this->company->id,
|
'company_id' => $this->company->id,
|
||||||
'start_date' => $start_date,
|
'start_date' => $start_date,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user