diff --git a/src/pages/08_request-list/RequestListView.vue b/src/pages/08_request-list/RequestListView.vue
index b753a907..6c3a0199 100644
--- a/src/pages/08_request-list/RequestListView.vue
+++ b/src/pages/08_request-list/RequestListView.vue
@@ -276,11 +276,38 @@ const successAll = computed(() => {
});
});
+function getInstallmentInfo() {
+ if (
+ data.value?.quotation.payCondition === 'Full' ||
+ data.value?.quotation.payCondition === 'BillFull'
+ ) {
+ return null;
+ }
+
+ const total = data.value?.quotation.paySplitCount || 0;
+ const paid = data.value?.quotation.invoice?.reduce((a, c) => {
+ if (c.payment?.paymentStatus === 'PaymentSuccess') {
+ a += c.installments.length || 0;
+ }
+ return a;
+ }, 0);
+
+ return { total, paid };
+}
+
function isInstallmentPaySuccess(installmentNo: number) {
- const invoice = data.value?.quotation.invoice?.find((lhs) =>
- lhs.installements.some((rhs) => rhs.no === installmentNo),
- );
- return !!(invoice?.payment?.paymentStatus === 'Success');
+ if (
+ data.value?.quotation.payCondition === 'Full' ||
+ data.value?.quotation.payCondition === 'BillFull'
+ ) {
+ return true;
+ }
+
+ const invoice = data.value?.quotation.invoice?.find((lhs) => {
+ return lhs.installments?.some((rhs) => rhs.no === installmentNo);
+ });
+
+ return !!(invoice?.payment?.paymentStatus === 'PaymentSuccess');
}
@@ -587,7 +614,13 @@ function isInstallmentPaySuccess(installmentNo: number) {
)"
:key="value"
>
+ {{ getInstallmentInfo() }}