feat: i18n payment condition en
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s

This commit is contained in:
Aif 2025-10-14 16:04:33 +07:00
parent 2b9c8aa613
commit 8a0340f588

View file

@ -23,22 +23,23 @@ const templates = {
installments?: { installments?: {
no: number; no: number;
amount: number; amount: number;
name?: string;
}[]; }[];
}) => { }) => {
if (context?.paymentType === 'Full') { if (context?.paymentType === 'Full') {
return [ return [
'**** เงื่อนไขเพิ่มเติม', `**** ${i18n.global.t('general.additional')}`,
'- เงื่อนไขการชำระเงิน แบบเต็มจำนวน', `- ${i18n.global.t('quotation.paymentCondition')} ${i18n.global.t('quotation.type.Full')}`,
`  จำนวน ${formatNumberDecimal(context?.amount || 0, 2)}`, `  ${i18n.global.t('general.amount')} ${formatNumberDecimal(context?.amount || 0, 2)}`,
].join('<br/>'); ].join('<br/>');
} else { } else {
return [ return [
'**** เงื่อนไขเพิ่มเติม', `**** ${i18n.global.t('general.additional')}`,
`- เงื่อนไขการชำระเงิน แบบแบ่งจ่าย${context?.paymentType === 'SplitCustom' ? ' กำหนดเอง ' : ' '}${context?.installments?.length} งวด`, `- ${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( ...(context?.installments?.map((v) => {
(v) => const installmentName = v.name ? ` (${v.name})` : '';
`&nbsp; งวดที่ ${v.no} จำนวน ${formatNumberDecimal(v.amount, 2)}`, return `&nbsp; ${i18n.global.t('quotation.periodNo')} ${v.no}${installmentName} ${i18n.global.t('general.amount')} ${formatNumberDecimal(v.amount, 2)}`;
) || []), }) || []),
].join('<br />'); ].join('<br />');
} }
}, },