diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 49a475b9e..a1811df4e 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -130,7 +130,7 @@ export default { log: 'Log', sms: 'Sms', creditManagement: 'Credit management', - others: 'Other', + others: 'Others', }, list: { phone: 'Phone', diff --git a/src/pages/Customer/Defaulter/CustomerBalanceDueTotal.vue b/src/pages/Customer/Defaulter/CustomerBalanceDueTotal.vue new file mode 100644 index 000000000..dfbaf8ad4 --- /dev/null +++ b/src/pages/Customer/Defaulter/CustomerBalanceDueTotal.vue @@ -0,0 +1,54 @@ + + + + + {{ t('Total') }} + + {{ t('Balance due') }}: + + {{ toCurrency($props.amount) }} + + + + + + + + +es: + Total: Total + Balance due: Saldo vencido + diff --git a/src/pages/Customer/Defaulter/CustomerDefaulter.vue b/src/pages/Customer/Defaulter/CustomerDefaulter.vue index b35980416..15bfd84eb 100644 --- a/src/pages/Customer/Defaulter/CustomerDefaulter.vue +++ b/src/pages/Customer/Defaulter/CustomerDefaulter.vue @@ -4,11 +4,12 @@ import { useI18n } from 'vue-i18n'; import { QBtn, QCheckbox } from 'quasar'; +import { toCurrency, toDate } from 'filters/index'; import { useArrayData } from 'composables/useArrayData'; import { useStateStore } from 'stores/useStateStore'; -import { toCurrency, toDate } from 'filters/index'; import CustomerNotificationsFilter from './CustomerDefaulterFilter.vue'; +import CustomerBalanceDueTotal from './CustomerBalanceDueTotal.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; @@ -16,6 +17,7 @@ const { t } = useI18n(); const stateStore = useStateStore(); const arrayData = ref(null); +const balanceDueTotal = ref(0); onBeforeMount(async () => { arrayData.value = useArrayData('CustomerDefaulter', { @@ -23,6 +25,13 @@ onBeforeMount(async () => { limit: 0, }); await arrayData.value.fetch({ append: false }); + balanceDueTotal.value = arrayData.value.store.data.reduce( + (accumulator, currentValue) => { + return accumulator + (currentValue['amount'] || 0); + }, + 0 + ); + console.log(balanceDueTotal.value); stateStore.rightDrawer = true; }); @@ -188,7 +197,9 @@ const selectAuthorId = (id) => { - + + + @@ -204,11 +215,6 @@ const selectAuthorId = (id) => { selection="multiple" v-model:selected="selected" > - - - {{ `${rows.length} ${t('route.cmr.list.results')}` }} - - diff --git a/src/pages/Customer/Notifications/CustomerNotifications.vue b/src/pages/Customer/Notifications/CustomerNotifications.vue index f9ff66a7b..ce194eb06 100644 --- a/src/pages/Customer/Notifications/CustomerNotifications.vue +++ b/src/pages/Customer/Notifications/CustomerNotifications.vue @@ -121,11 +121,6 @@ const selectCustomerId = (id) => { selection="multiple" v-model:selected="selected" > - - - {{ `${rows.length} ${t('route.cmr.list.results')}` }} - - diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js index a79ab8a6b..3c8445f42 100644 --- a/src/router/modules/customer.js +++ b/src/router/modules/customer.js @@ -135,7 +135,7 @@ export default { name: 'CustomerFiscalData', meta: { title: 'fiscalData', - icon: 'vn:settings', + icon: 'vn:dfiscales', }, component: () => import('src/pages/Customer/Card/CustomerFiscalData.vue'), @@ -145,7 +145,7 @@ export default { name: 'CustomerBillingData', meta: { title: 'billingData', - icon: 'vn:settings', + icon: 'vn:payment', }, component: () => import('src/pages/Customer/Card/CustomerBillingData.vue'), @@ -155,7 +155,7 @@ export default { name: 'CustomerConsignees', meta: { title: 'consignees', - icon: 'vn:settings', + icon: 'vn:delivery', }, component: () => import('src/pages/Customer/Card/CustomerConsignees.vue'), @@ -165,7 +165,7 @@ export default { name: 'CustomerNotes', meta: { title: 'notes', - icon: 'vn:settings', + icon: 'vn:notes', }, component: () => import('src/pages/Customer/Card/CustomerNotes.vue'), }, @@ -174,7 +174,7 @@ export default { name: 'CustomerCredits', meta: { title: 'credits', - icon: 'vn:settings', + icon: 'vn:credit', }, component: () => import('src/pages/Customer/Card/CustomerCredits.vue'), @@ -184,7 +184,7 @@ export default { name: 'CustomerGreuges', meta: { title: 'greuges', - icon: 'vn:settings', + icon: 'vn:greuge', }, component: () => import('src/pages/Customer/Card/CustomerGreuges.vue'), @@ -194,7 +194,7 @@ export default { name: 'CustomerBalance', meta: { title: 'balance', - icon: 'vn:settings', + icon: 'vn:invoice', }, component: () => import('src/pages/Customer/Card/CustomerBalance.vue'), @@ -204,7 +204,7 @@ export default { name: 'CustomerRecoveries', meta: { title: 'recoveries', - icon: 'vn:settings', + icon: 'vn:recovery', }, component: () => import('src/pages/Customer/Card/CustomerRecoveries.vue'), @@ -214,7 +214,7 @@ export default { name: 'CustomerWebAccess', meta: { title: 'webAccess', - icon: 'vn:settings', + icon: 'vn:web', }, component: () => import('src/pages/Customer/Card/CustomerWebAccess.vue'), @@ -224,7 +224,7 @@ export default { name: 'CustomerLog', meta: { title: 'log', - icon: 'vn:settings', + icon: 'vn:History', }, component: () => import('src/pages/Customer/Card/CustomerLog.vue'), }, @@ -233,7 +233,7 @@ export default { name: 'CustomerSms', meta: { title: 'sms', - icon: 'vn:settings', + icon: 'sms', }, component: () => import('src/pages/Customer/Card/CustomerSms.vue'), }, @@ -242,7 +242,7 @@ export default { name: 'CustomerCreditManagement', meta: { title: 'creditManagement', - icon: 'vn:settings', + icon: 'paid', }, component: () => import('src/pages/Customer/Card/CustomerCreditManagement.vue'), @@ -252,7 +252,7 @@ export default { name: 'CustomerOthers', meta: { title: 'others', - icon: 'vn:settings', + icon: 'pending', }, component: () => import('src/pages/Customer/Card/CustomerOthers.vue'), },
{{ t('Balance due') }}: