refactor: remove date from installments
This commit is contained in:
parent
0570dc2677
commit
da8dc33b15
3 changed files with 18 additions and 60 deletions
|
|
@ -134,8 +134,14 @@ const workerList = ref<Employee[]>([]);
|
|||
const selectedProductGroup = ref('');
|
||||
const selectedInstallmentNo = ref<number[]>([]);
|
||||
const agentPrice = ref(false);
|
||||
const summaryPrice = computed(() =>
|
||||
productServiceList.value.reduce(
|
||||
|
||||
function getPrice(
|
||||
list: typeof productServiceList.value,
|
||||
filterHook?: (arg: (typeof productServiceList.value)[number]) => boolean,
|
||||
) {
|
||||
if (filterHook) list = list.filter(filterHook);
|
||||
|
||||
return list.reduce(
|
||||
(a, c) => {
|
||||
if (
|
||||
selectedInstallmentNo.value.length > 0 &&
|
||||
|
|
@ -172,8 +178,10 @@ const summaryPrice = computed(() =>
|
|||
vatExcluded: 0,
|
||||
finalPrice: 0,
|
||||
},
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
const summaryPrice = computed(() => getPrice(productServiceList.value));
|
||||
|
||||
const payBank = ref('');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue