mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 21:44:51 +00:00
* 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.
55 lines
1.3 KiB
Vue
55 lines
1.3 KiB
Vue
<template>
|
|
<div
|
|
v-if="store[storeProp].tax_included"
|
|
class="flex items-center justify-between w-full"
|
|
>
|
|
<BaseContentPlaceholders v-if="isLoading">
|
|
<BaseContentPlaceholdersText :lines="1" class="w-16 h-5" />
|
|
</BaseContentPlaceholders>
|
|
<label
|
|
v-else
|
|
class="text-sm font-semibold leading-5 text-gray-500 uppercase"
|
|
>
|
|
{{ $t('estimates.net_total') }}
|
|
</label>
|
|
|
|
<BaseContentPlaceholders v-if="isLoading">
|
|
<BaseContentPlaceholdersText :lines="1" class="w-16 h-5" />
|
|
</BaseContentPlaceholders>
|
|
|
|
<label
|
|
v-else
|
|
class="flex items-center justify-center m-0 text-lg text-black uppercase "
|
|
>
|
|
<BaseFormatMoney
|
|
:amount="store.getNetTotal"
|
|
:currency="currency"
|
|
/>
|
|
</label>
|
|
</div>
|
|
</template>
|
|
<script setup>
|
|
import BaseContentPlaceholdersText from '@/scripts/components/base/BaseContentPlaceholdersText.vue'
|
|
import BaseContentPlaceholders from '@/scripts/components/base/BaseContentPlaceholders.vue'
|
|
import BaseFormatMoney from '@/scripts/components/base/BaseFormatMoney.vue'
|
|
|
|
const props = defineProps({
|
|
store: {
|
|
type: Object,
|
|
default: null,
|
|
},
|
|
storeProp: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
currency: {
|
|
type: [Object, String],
|
|
default: '',
|
|
},
|
|
isLoading: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
})
|
|
</script>
|