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?: {
|
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})` : '';
|
||||||
` งวดที่ ${v.no} จำนวน ${formatNumberDecimal(v.amount, 2)}`,
|
return ` ${i18n.global.t('quotation.periodNo')} ${v.no}${installmentName} ${i18n.global.t('general.amount')} ${formatNumberDecimal(v.amount, 2)}`;
|
||||||
) || []),
|
}) || []),
|
||||||
].join('<br />');
|
].join('<br />');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue