mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Adjust OFX settings
This commit is contained in:
parent
4f5abe33e3
commit
ee0be053d7
@ -228,8 +228,11 @@
|
|||||||
{!! Former::text('po_number')->label($account->getLabel('po_number', 'po_number_short'))->data_bind("value: po_number, valueUpdate: 'afterkeydown'") !!}
|
{!! Former::text('po_number')->label($account->getLabel('po_number', 'po_number_short'))->data_bind("value: po_number, valueUpdate: 'afterkeydown'") !!}
|
||||||
{!! Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'")
|
{!! Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'")
|
||||||
->addGroupClass('discount-group')->type('number')->min('0')->step('any')->append(
|
->addGroupClass('discount-group')->type('number')->min('0')->step('any')->append(
|
||||||
Former::select('is_amount_discount')->addOption(trans('texts.discount_percent'), '0')
|
Former::select('is_amount_discount')
|
||||||
->addOption(trans('texts.discount_amount'), '1')->data_bind("value: is_amount_discount")->raw()
|
->addOption(trans('texts.discount_percent'), '0')
|
||||||
|
->addOption(trans('texts.discount_amount'), '1')
|
||||||
|
->data_bind("value: is_amount_discount, event:{ change: isAmountDiscountChanged}")
|
||||||
|
->raw()
|
||||||
) !!}
|
) !!}
|
||||||
|
|
||||||
@if ($account->showCustomField('custom_invoice_text_label2', $invoice))
|
@if ($account->showCustomField('custom_invoice_text_label2', $invoice))
|
||||||
@ -869,6 +872,15 @@
|
|||||||
model.invoice().tax_name2("{{ $account->tax_name2 }}");
|
model.invoice().tax_name2("{{ $account->tax_name2 }}");
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
// load previous isAmountDiscount setting
|
||||||
|
if (isStorageSupported()) {
|
||||||
|
var lastIsAmountDiscount = parseInt(localStorage.getItem('last:is_amount_discount'));
|
||||||
|
console.log('lastIsAmountDiscount: ' + lastIsAmountDiscount);
|
||||||
|
if (lastIsAmountDiscount) {
|
||||||
|
model.invoice().is_amount_discount(lastIsAmountDiscount);
|
||||||
|
}
|
||||||
|
}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (isset($tasks) && $tasks)
|
@if (isset($tasks) && $tasks)
|
||||||
|
@ -592,6 +592,18 @@ function InvoiceModel(data) {
|
|||||||
}
|
}
|
||||||
self.applyInclusivTax(taxRate);
|
self.applyInclusivTax(taxRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.isAmountDiscountChanged = function(obj, event) {
|
||||||
|
console.log('onIsAmountDiscountChange... ' + event.originalEvent);
|
||||||
|
if (event.originalEvent) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (! isStorageSupported()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var isAmountDiscount = $('#is_amount_discount').val();
|
||||||
|
localStorage.setItem('last:is_amount_discount', isAmountDiscount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClientModel(data) {
|
function ClientModel(data) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user