fix(05): total padi remain display condition

This commit is contained in:
puriphatt 2024-10-24 11:38:41 +07:00
parent 200cce9e7e
commit b58ed78929

View file

@ -448,22 +448,14 @@ watch(
{{ $t('quotation.receiptDialog.remain') }} {{ $t('quotation.receiptDialog.remain') }}
<span class="q-ml-auto"> <span class="q-ml-auto">
{{ {{
data.payCondition === 'BillSplit' || formatNumberDecimal(
data.payCondition === 'Split' paymentData.reduce(
? formatNumberDecimal( (c, i) =>
paymentData.reduce( i.paymentStatus !== 'PaymentSuccess' ? c + i.amount : c,
(c, i) => 0,
i.paymentStatus !== 'PaymentSuccess' ),
? c + i.amount 2,
: c, )
0,
),
2,
)
: data.quotationStatus === 'PaymentPending'
? paymentData[0]?.amount &&
formatNumberDecimal(paymentData[0]?.amount, 2)
: '0.00'
}} }}
</span> </span>
</span> </span>
@ -516,23 +508,6 @@ watch(
}} }}
</span> </span>
</span> </span>
<!-- <div
class="q-ml-auto items-center flex q-py-xs q-px-sm rounded"
:class="{
'payment-success': p.paymentStatus === 'PaymentSuccess',
'payment-wait':
p.paymentStatus === 'PaymentWait' ||
p.paymentStatus === 'PaymentPending',
}"
>
<q-icon size="6px" class="q-mr-sm" name="mdi-circle" />
{{
p.paymentStatus === 'PaymentWait' ||
p.paymentStatus === 'PaymentPending'
? $t('quotation.receiptDialog.notYetPaid')
: $t('quotation.receiptDialog.alreadyPaid')
}}
</div> -->
<q-btn <q-btn
@click.stop @click.stop