From 3404bc6d0b2c943ad904184f3e98b7d06b2992e5 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 11 Nov 2024 15:59:05 +0100 Subject: [PATCH] feat: refs #7134 apply supplierBalanceFilter --- src/pages/Supplier/Card/SupplierBalance.vue | 30 +++-- .../Supplier/Card/SupplierBalanceFilter.vue | 123 ++++++++++++++++++ 2 files changed, 141 insertions(+), 12 deletions(-) create mode 100644 src/pages/Supplier/Card/SupplierBalanceFilter.vue diff --git a/src/pages/Supplier/Card/SupplierBalance.vue b/src/pages/Supplier/Card/SupplierBalance.vue index d9e79288d..9fb424220 100644 --- a/src/pages/Supplier/Card/SupplierBalance.vue +++ b/src/pages/Supplier/Card/SupplierBalance.vue @@ -6,6 +6,7 @@ import { useAcl } from 'src/composables/useAcl'; import axios from 'axios'; import { useQuasar } from 'quasar'; import { getSupplierRisk } from 'src/composables/getRisk'; +import RightMenu from 'src/components/common/RightMenu.vue'; import { toCurrency, toDate, toDateHourMin } from 'src/filters'; import { useState } from 'composables/useState'; @@ -20,6 +21,7 @@ import VnFilter from 'components/VnTable/VnFilter.vue'; import SupplierNewPayment from 'src/pages/Supplier/Card/SupplierNewPayment.vue'; import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue'; +import SupplierBalanceFilter from './SupplierBalanceFilter.vue'; const { openConfirmationModal } = useVnConfirm(); const { sendEmail, openReport } = usePrintService(); @@ -187,17 +189,18 @@ async function getCurrentBalance() { } async function onFetch(data) { - balances.value = []; - for (const [index, balance] of data.entries()) { - if (index === 0) { - balance.balance = await getCurrentBalance(); - continue; - } - const previousBalance = data[index - 1]; - balance.balance = - previousBalance?.balance - (previousBalance?.debit - previousBalance?.credit); - } - balances.value = data; + return; + // balances.value = []; + // for (const [index, balance] of data.entries()) { + // if (index === 0) { + // balance.balance = await getCurrentBalance(); + // continue; + // } + // const previousBalance = data[index - 1]; + // balance.balance = + // previousBalance?.balance - (previousBalance?.debit - previousBalance?.credit); + // } + // balances.value = data; } const showNewPaymentDialog = () => { @@ -241,9 +244,12 @@ const showBalancePdf = ({ id }) => { + + + +import { useI18n } from 'vue-i18n'; +import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; +import VnSelect from 'src/components/common/VnSelect.vue'; +import VnInput from 'src/components/common/VnInput.vue'; +import VnInputDate from 'src/components/common/VnInputDate.vue'; + +const { t } = useI18n(); +defineProps({ + dataKey: { + type: String, + required: true, + }, +}); + + + + + +en: + params: + search: General search + itemId: Item id + buyerId: Buyer + typeId: Type + categoryId: Category + from: From + to: To +es: + + params: + isConciliated: Conciliado + currencyFk: Moneda + New payment: AƱadir pago + Date: Fecha + Company: Empresa + bank: Caja + Amount: Importe + Reference: Referencia + Cash: Efectivo +