1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Show ‘Discount’ for negative online payment surcharges

This commit is contained in:
Hillel Coren 2017-03-23 17:17:05 +02:00
parent fe3710fe4b
commit 34776b2eb2
2 changed files with 3 additions and 2 deletions

View File

@ -1072,8 +1072,8 @@ class InvoiceRepository extends BaseRepository
$fee = $invoice->calcGatewayFee($gatewayTypeId);
$item = [];
$item['product_key'] = trans('texts.surcharge');
$item['notes'] = trans('texts.online_payment_surcharge');
$item['product_key'] = $fee >= 0 ? trans('texts.surcharge') : trans('texts.discount');
$item['notes'] = $fee >= 0 ? trans('texts.online_payment_surcharge') : trans('texts.online_payment_discount');
$item['qty'] = 1;
$item['cost'] = $fee;
$item['tax_rate1'] = $settings->fee_tax_rate1;

View File

@ -2434,6 +2434,7 @@ $LANG = array(
'next_reset' => 'Next Reset',
'reset_counter_help' => 'Automatically reset the invoice and quote counters.',
'auto_bill_failed' => 'Auto-billing for invoice :invoice_number failed',
'online_payment_discount' => 'Online Payment Discount',
);