refactor: show total pay split

This commit is contained in:
Thanaphon Frappet 2024-11-01 10:50:39 +07:00
parent 2264686a34
commit 88d0e1df14
2 changed files with 6 additions and 2 deletions

View file

@ -1458,13 +1458,14 @@ const view = ref<View>(View.Quotation);
</div>
</q-expansion-item>
</template>
<QuotationFormReceipt
v-if="view === View.Receipt"
v-for="v in receiptList"
v-for="(v, i) in receiptList"
:amount="v.amount"
:date="v.date"
:pay-type="quotationFormData.payCondition"
:index="i"
:pay-split-count="quotationFormData.paySplitCount || 0"
/>
</div>
</section>

View file

@ -7,6 +7,8 @@ withDefaults(
payType: string;
amount: number;
date: string | Date;
index: number;
paySplitCount: number;
}>(),
{ payType: 'Full', amount: 0, date: () => new Date() },
);
@ -22,6 +24,7 @@ withDefaults(
</span>
<span class="row items-center">
{{ $t(`quotation.type.${payType}`) }}
{{ payType !== 'Full' ? `${index + 1} / ${paySplitCount}` : `` }}
<q-icon name="mdi-minus" class="q-px-xs" />
<article class="app-text-positive text-weight-medium">
{{ $t('quotation.receiptDialog.PaymentSuccess') }}