diff --git a/resources/scripts-v2/features/company/estimates/views/EstimateCreateView.vue b/resources/scripts-v2/features/company/estimates/views/EstimateCreateView.vue index ad5ddd91..d32a43de 100644 --- a/resources/scripts-v2/features/company/estimates/views/EstimateCreateView.vue +++ b/resources/scripts-v2/features/company/estimates/views/EstimateCreateView.vue @@ -202,9 +202,9 @@ async function submitForm(): Promise { const data: Record = { ...cloneDeep(estimateStore.newEstimate), - sub_total: estimateStore.getSubTotal, - total: estimateStore.getTotal, - tax: estimateStore.getTotalTax, + sub_total: Math.round(estimateStore.getSubTotal), + total: Math.round(estimateStore.getTotal), + tax: Math.round(estimateStore.getTotalTax), } const items = data.items as Array> diff --git a/resources/scripts-v2/features/company/invoices/views/InvoiceCreateView.vue b/resources/scripts-v2/features/company/invoices/views/InvoiceCreateView.vue index 19cd2080..7607de70 100644 --- a/resources/scripts-v2/features/company/invoices/views/InvoiceCreateView.vue +++ b/resources/scripts-v2/features/company/invoices/views/InvoiceCreateView.vue @@ -309,9 +309,9 @@ async function submitForm(): Promise { customFields: invoiceData.customFields, // Calculated totals - sub_total: invoiceStore.getSubTotal, - total: invoiceStore.getTotal, - tax: invoiceStore.getTotalTax, + sub_total: Math.round(invoiceStore.getSubTotal), + total: Math.round(invoiceStore.getTotal), + tax: Math.round(invoiceStore.getTotalTax), } let response @@ -325,9 +325,9 @@ async function submitForm(): Promise { } else { const data: Record = { ...cloneDeep(invoiceStore.newInvoice), - sub_total: invoiceStore.getSubTotal, - total: invoiceStore.getTotal, - tax: invoiceStore.getTotalTax, + sub_total: Math.round(invoiceStore.getSubTotal), + total: Math.round(invoiceStore.getTotal), + tax: Math.round(invoiceStore.getTotalTax), } const items = data.items as Array> diff --git a/resources/scripts-v2/features/shared/document-form/DocumentTotals.vue b/resources/scripts-v2/features/shared/document-form/DocumentTotals.vue index 67a942c2..8bac81c9 100644 --- a/resources/scripts-v2/features/shared/document-form/DocumentTotals.vue +++ b/resources/scripts-v2/features/shared/document-form/DocumentTotals.vue @@ -192,6 +192,9 @@ :store-prop="storeProp" :store="store" :type="taxPopupType" + :tax-types="availableTaxTypes" + :company-currency="companyCurrency" + :can-create-tax-type="canCreateTaxType" @select:tax-type="onSelectTax" /> @@ -228,10 +231,13 @@