mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-20 03:34:06 +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:
@@ -1,4 +1,27 @@
|
||||
<template>
|
||||
<!-- Tax Included -->
|
||||
<div
|
||||
v-if="companyStore.selectedCompanySettings.tax_included === 'YES'"
|
||||
class="
|
||||
flex
|
||||
items-center
|
||||
justify-end
|
||||
w-full
|
||||
px-6
|
||||
text-base
|
||||
border border-b-0 border-gray-200 border-solid
|
||||
cursor-pointer
|
||||
text-primary-400
|
||||
bg-white
|
||||
"
|
||||
>
|
||||
<BaseSwitchSection
|
||||
v-model="taxIncludedField"
|
||||
:title="$t('settings.tax_types.tax_included')"
|
||||
:store="store"
|
||||
:store-prop="storeProp"
|
||||
/>
|
||||
</div>
|
||||
<table class="text-center item-table min-w-full">
|
||||
<colgroup>
|
||||
<col style="width: 40%; min-width: 280px" />
|
||||
@@ -191,4 +214,14 @@ const defaultCurrency = computed(() => {
|
||||
return companyStore.selectedCompanyCurrency
|
||||
}
|
||||
})
|
||||
|
||||
const taxIncludedField = computed({
|
||||
get: () => {
|
||||
return props.store[props.storeProp].tax_included
|
||||
},
|
||||
set: async (value) => {
|
||||
props.store[props.storeProp].tax_included = value
|
||||
},
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user