feat: i18n payment condition en
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
2b9c8aa613
commit
8a0340f588
1 changed files with 10 additions and 9 deletions
|
|
@ -23,22 +23,23 @@ const templates = {
|
|||
installments?: {
|
||||
no: number;
|
||||
amount: number;
|
||||
name?: string;
|
||||
}[];
|
||||
}) => {
|
||||
if (context?.paymentType === 'Full') {
|
||||
return [
|
||||
'**** เงื่อนไขเพิ่มเติม',
|
||||
'- เงื่อนไขการชำระเงิน แบบเต็มจำนวน',
|
||||
` จำนวน ${formatNumberDecimal(context?.amount || 0, 2)}`,
|
||||
`**** ${i18n.global.t('general.additional')}`,
|
||||
`- ${i18n.global.t('quotation.paymentCondition')} ${i18n.global.t('quotation.type.Full')}`,
|
||||
` ${i18n.global.t('general.amount')} ${formatNumberDecimal(context?.amount || 0, 2)}`,
|
||||
].join('<br/>');
|
||||
} else {
|
||||
return [
|
||||
'**** เงื่อนไขเพิ่มเติม',
|
||||
`- เงื่อนไขการชำระเงิน แบบแบ่งจ่าย${context?.paymentType === 'SplitCustom' ? ' กำหนดเอง ' : ' '}${context?.installments?.length} งวด`,
|
||||
...(context?.installments?.map(
|
||||
(v) =>
|
||||
` งวดที่ ${v.no} จำนวน ${formatNumberDecimal(v.amount, 2)}`,
|
||||
) || []),
|
||||
`**** ${i18n.global.t('general.additional')}`,
|
||||
`- ${i18n.global.t('quotation.paymentCondition')} ${i18n.global.t('quotation.type.Split')}${context?.paymentType === 'SplitCustom' ? ` (${i18n.global.t('general.specify')}) ` : ' '}${context?.installments?.length} ${i18n.global.t('quotation.receiptDialog.installments')}`,
|
||||
...(context?.installments?.map((v) => {
|
||||
const installmentName = v.name ? ` (${v.name})` : '';
|
||||
return ` ${i18n.global.t('quotation.periodNo')} ${v.no}${installmentName} ${i18n.global.t('general.amount')} ${formatNumberDecimal(v.amount, 2)}`;
|
||||
}) || []),
|
||||
].join('<br />');
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue