From 22a634e7eb32c6856f6e9621b34372718a87e070 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 11 Dec 2023 13:49:50 +0100 Subject: [PATCH] refs #5835 refactor taxRate --- src/pages/InvoiceIn/Card/InvoiceInSummary.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue index b3b4f37b6..d7039fe3d 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue @@ -187,11 +187,8 @@ function setData(entity) { intrastatTotals.value = { ...getIntrastatTotals(entity.invoiceInIntrastat) }; } -function taxRate(taxableBase, rate) { - if (rate && taxableBase) { - return (rate / 100) * taxableBase; - } - return 0; +function taxRate(taxableBase = 0, rate = 0) { + return (rate / 100) * taxableBase; } function getLink(param) {