mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-19 19:24:03 +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:
@@ -38,6 +38,17 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="store[storeProp].tax_per_item === 'YES'"
|
||||
>
|
||||
<NetTotal
|
||||
:currency="currency"
|
||||
:store="store"
|
||||
:storeProp="storeProp"
|
||||
:isLoading="isLoading"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-for="tax in itemWiseTaxes"
|
||||
:key="tax.tax_type_id"
|
||||
@@ -135,6 +146,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
store[storeProp].tax_per_item === 'NO' ||
|
||||
store[storeProp].tax_per_item === null
|
||||
"
|
||||
class="flex items-center justify-between w-full mt-2"
|
||||
>
|
||||
<NetTotal
|
||||
:currency="currency"
|
||||
:store="store"
|
||||
:storeProp="storeProp"
|
||||
:isLoading="isLoading"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
store[storeProp].tax_per_item === 'NO' ||
|
||||
@@ -149,6 +175,7 @@
|
||||
:taxes="taxes"
|
||||
:currency="currency"
|
||||
:store="store"
|
||||
:storeProp="storeProp"
|
||||
@remove="removeTax"
|
||||
@update="updateTax"
|
||||
/>
|
||||
@@ -198,6 +225,7 @@
|
||||
<script setup>
|
||||
import { computed, inject, ref, watch } from 'vue'
|
||||
import Guid from 'guid'
|
||||
import NetTotal from './NetTotal.vue'
|
||||
import Tax from './CreateTotalTaxes.vue'
|
||||
import TaxStub from '@/scripts/admin/stub/abilities'
|
||||
import SelectTaxPopup from './SelectTaxPopup.vue'
|
||||
|
||||
Reference in New Issue
Block a user