mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
feat: Tax included (#370)
* feat: Tax included * Added a toggle switch in tax settings to enable the feature. * Database migration adding tax_included field into estimates, invoices and recurring invoices table. * Toggle switch to enable and store the tax_included by estimates, invoices and recurring invoices. * In case of tax included enabled, total taxes will be recalculated and the invoices, estimates and recurring invoices total won't be sum with taxes. * Apply tax included when discount_per_item/tax_per_item item is enabled. * Custom component to show the net total when tax included is enabled. * Update invoice and estimates pdfs with net total. * chore: Tax included by default A switch button inside the tax settings to enable the tax included by default in invoices, estimates and recurring invoices.
This commit is contained in:
@@ -101,7 +101,18 @@
|
||||
</tr>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
||||
@if ($estimate->tax_included)
|
||||
<tr>
|
||||
<td class="border-0 total-table-attribute-label">
|
||||
@lang('pdf_net_total')
|
||||
</td>
|
||||
<td class="py-2 border-0 item-cell total-table-attribute-value">
|
||||
{!! format_money_pdf($estimate->sub_total - $estimate->discount - $estimate->tax, $estimate->customer->currency) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($estimate->tax_per_item === 'YES')
|
||||
@foreach ($taxes as $tax)
|
||||
<tr>
|
||||
@@ -133,7 +144,7 @@
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="py-3"></td>
|
||||
<td class="py-3"></td>
|
||||
|
||||
@@ -121,6 +121,17 @@
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($invoice->tax_included)
|
||||
<tr>
|
||||
<td class="border-0 total-table-attribute-label">
|
||||
@lang('pdf_net_total')
|
||||
</td>
|
||||
<td class="py-2 border-0 item-cell total-table-attribute-value">
|
||||
{!! format_money_pdf($invoice->sub_total - $invoice->discount - $invoice->tax, $invoice->customer->currency) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($invoice->tax_per_item === 'YES')
|
||||
@foreach ($taxes as $tax)
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user