mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Use invoice tax settings for edit UI
This commit is contained in:
parent
e0b05abac3
commit
5122a2114c
@ -912,6 +912,8 @@ class Account extends Eloquent
|
|||||||
$invoice->start_date = Utils::today();
|
$invoice->start_date = Utils::today();
|
||||||
$invoice->invoice_design_id = $this->invoice_design_id;
|
$invoice->invoice_design_id = $this->invoice_design_id;
|
||||||
$invoice->client_id = $clientId;
|
$invoice->client_id = $clientId;
|
||||||
|
$invoice->custom_taxes1 = $this->custom_invoice_taxes1;
|
||||||
|
$invoice->custom_taxes2 = $this->custom_invoice_taxes2;
|
||||||
|
|
||||||
if ($entityType === ENTITY_RECURRING_INVOICE) {
|
if ($entityType === ENTITY_RECURRING_INVOICE) {
|
||||||
$invoice->invoice_number = microtime(true);
|
$invoice->invoice_number = microtime(true);
|
||||||
|
@ -418,7 +418,7 @@
|
|||||||
<td style="text-align: right"><span data-bind="text: totals.discounted"/></td>
|
<td style="text-align: right"><span data-bind="text: totals.discounted"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@if ($account->showCustomField('custom_invoice_label1', $invoice) && $account->custom_invoice_taxes1)
|
@if ($account->showCustomField('custom_invoice_label1', $invoice) && $invoice->custom_taxes1)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hide-border" colspan="3"/>
|
<td class="hide-border" colspan="3"/>
|
||||||
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||||
@ -427,7 +427,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($account->showCustomField('custom_invoice_label2', $invoice) && $account->custom_invoice_taxes2)
|
@if ($account->showCustomField('custom_invoice_label2', $invoice) && $invoice->custom_taxes2)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hide-border" colspan="3"/>
|
<td class="hide-border" colspan="3"/>
|
||||||
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||||
@ -475,7 +475,7 @@
|
|||||||
<td style="text-align: right"><span data-bind="text: totals.taxAmount"/></td>
|
<td style="text-align: right"><span data-bind="text: totals.taxAmount"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@if ($account->showCustomField('custom_invoice_label1', $invoice) && !$account->custom_invoice_taxes1)
|
@if ($account->showCustomField('custom_invoice_label1', $invoice) && !$invoice->custom_taxes1)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hide-border" colspan="3"/>
|
<td class="hide-border" colspan="3"/>
|
||||||
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||||
@ -484,7 +484,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($account->showCustomField('custom_invoice_label2', $invoice) && !$account->custom_invoice_taxes2)
|
@if ($account->showCustomField('custom_invoice_label2', $invoice) && !$invoice->custom_taxes2)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hide-border" colspan="3"/>
|
<td class="hide-border" colspan="3"/>
|
||||||
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
<td style="display:none" class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||||
@ -883,8 +883,6 @@
|
|||||||
}
|
}
|
||||||
model.invoice().addItem(); // add blank item
|
model.invoice().addItem(); // add blank item
|
||||||
@else
|
@else
|
||||||
model.invoice().custom_taxes1({{ $account->custom_invoice_taxes1 ? 'true' : 'false' }});
|
|
||||||
model.invoice().custom_taxes2({{ $account->custom_invoice_taxes2 ? 'true' : 'false' }});
|
|
||||||
// set the default account tax rate
|
// set the default account tax rate
|
||||||
@if ($account->invoice_taxes && ! empty($defaultTax))
|
@if ($account->invoice_taxes && ! empty($defaultTax))
|
||||||
var defaultTax = {!! $defaultTax->toJson() !!};
|
var defaultTax = {!! $defaultTax->toJson() !!};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user