mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on gateway fees
This commit is contained in:
parent
21166a3be7
commit
63096aaae1
@ -41,8 +41,6 @@ class AccountRepository
|
|||||||
$account->ip = Request::getClientIp();
|
$account->ip = Request::getClientIp();
|
||||||
$account->account_key = str_random(RANDOM_KEY_LENGTH);
|
$account->account_key = str_random(RANDOM_KEY_LENGTH);
|
||||||
$account->company_id = $company->id;
|
$account->company_id = $company->id;
|
||||||
$account->invoice_taxes = false;
|
|
||||||
$account->invoice_item_taxes = true;
|
|
||||||
|
|
||||||
// Track referal code
|
// Track referal code
|
||||||
if ($referralCode = Session::get(SESSION_REFERRAL_CODE)) {
|
if ($referralCode = Session::get(SESSION_REFERRAL_CODE)) {
|
||||||
|
@ -2405,7 +2405,7 @@ $LANG = array(
|
|||||||
'fees_tax_help' => 'Enable line item taxes to set fee tax rates.',
|
'fees_tax_help' => 'Enable line item taxes to set fee tax rates.',
|
||||||
'fees_sample' => 'The fee for a :amount invoice would be :total.',
|
'fees_sample' => 'The fee for a :amount invoice would be :total.',
|
||||||
'no_fees' => 'No Fees',
|
'no_fees' => 'No Fees',
|
||||||
'gateway_fees_disclaimer' => 'Warning: not all payment gateways allow adding fees, please review their terms of service.',
|
'gateway_fees_disclaimer' => 'Warning: not all states/payment gateways allow adding fees, please review local laws/terms of service.',
|
||||||
'percent' => 'Percent',
|
'percent' => 'Percent',
|
||||||
'location' => 'Location',
|
'location' => 'Location',
|
||||||
'line_item' => 'Line Item',
|
'line_item' => 'Line Item',
|
||||||
|
@ -236,12 +236,15 @@
|
|||||||
|
|
||||||
{!! Former::text('custom_invoice_label1')
|
{!! Former::text('custom_invoice_label1')
|
||||||
->label(trans('texts.field_label'))
|
->label(trans('texts.field_label'))
|
||||||
|
->placeholder($account->gateway_fee_location == FEE_LOCATION_CHARGE1 ? trans('texts.surcharge') : ' ')
|
||||||
->addGroupClass('pad-checkbox')
|
->addGroupClass('pad-checkbox')
|
||||||
->append(Former::checkbox('custom_invoice_taxes1')
|
->append(Former::checkbox('custom_invoice_taxes1')
|
||||||
->value(1)
|
->value(1)
|
||||||
->raw() . trans('texts.charge_taxes')) !!}
|
->raw() . trans('texts.charge_taxes')) !!}
|
||||||
|
|
||||||
{!! Former::text('custom_invoice_label2')
|
{!! Former::text('custom_invoice_label2')
|
||||||
->label(trans('texts.field_label'))
|
->label(trans('texts.field_label'))
|
||||||
|
->placeholder($account->gateway_fee_location == FEE_LOCATION_CHARGE2 ? trans('texts.surcharge') : ' ')
|
||||||
->addGroupClass('pad-checkbox')
|
->addGroupClass('pad-checkbox')
|
||||||
->append(Former::checkbox('custom_invoice_taxes2')
|
->append(Former::checkbox('custom_invoice_taxes2')
|
||||||
->value(1)
|
->value(1)
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
{!! Former::select('gateway_fee_location')
|
{!! Former::select('gateway_fee_location')
|
||||||
->addOption(trans('texts.disabled'), '')
|
->addOption(trans('texts.disabled'), '')
|
||||||
->addOption(trans('texts.first_surcharge') . ($account->custom_invoice_label1 ? ': ' . $account->custom_invoice_label1 : ''), FEE_LOCATION_CHARGE1)
|
->addOption(trans('texts.first_surcharge') . ($account->custom_invoice_label1 ? ' | ' . $account->custom_invoice_label1 : ''), FEE_LOCATION_CHARGE1)
|
||||||
->addOption(trans('texts.second_surcharge') . ($account->custom_invoice_label2 ? ': ' . $account->custom_invoice_label2 : '' ), FEE_LOCATION_CHARGE2)
|
->addOption(trans('texts.second_surcharge') . ($account->custom_invoice_label2 ? ' | ' . $account->custom_invoice_label2 : '' ), FEE_LOCATION_CHARGE2)
|
||||||
//->addOption(trans('texts.line_item'), FEE_LOCATION_ITEM)
|
//->addOption(trans('texts.line_item'), FEE_LOCATION_ITEM)
|
||||||
->label('gateway_fees')!!}
|
->label('gateway_fees')!!}
|
||||||
|
|
||||||
@ -246,6 +246,11 @@
|
|||||||
$('#fee_percent').val(settings.fee_percent);
|
$('#fee_percent').val(settings.fee_percent);
|
||||||
setTaxRate(1, settings.fee_tax_name1, settings.fee_tax_rate1);
|
setTaxRate(1, settings.fee_tax_name1, settings.fee_tax_rate1);
|
||||||
setTaxRate(2, settings.fee_tax_name2, settings.fee_tax_rate2);
|
setTaxRate(2, settings.fee_tax_name2, settings.fee_tax_rate2);
|
||||||
|
} else {
|
||||||
|
$('#fee_amount').val('');
|
||||||
|
$('#fee_percent').val('');
|
||||||
|
setTaxRate(1, '', '');
|
||||||
|
setTaxRate(2, '', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#paymentLimitsModal').modal('show');
|
$('#paymentLimitsModal').modal('show');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user