fix/refactor: quotation installment (#121)
* refactor/feat: i18n * chore: clean log * refactor: type * refactor: installment and product table state relation * refactor: handle split custom --------- Co-authored-by: Thanaphon Frappet <thanaphon@frappet.com>
This commit is contained in:
parent
57aabf1deb
commit
1b4c06b182
10 changed files with 357 additions and 77 deletions
|
|
@ -24,13 +24,13 @@ const templates = {
|
|||
}) => {
|
||||
if (context?.paymentType === 'Full') {
|
||||
return [
|
||||
`**** เงื่อนไขเพิ่มเติม`,
|
||||
`- เงื่อนไขการชำระเงิน แบบเต็มจำนวน`,
|
||||
'**** เงื่อนไขเพิ่มเติม',
|
||||
'- เงื่อนไขการชำระเงิน แบบเต็มจำนวน',
|
||||
` จำนวน ${formatNumberDecimal(context?.amount || 0, 2)}`,
|
||||
].join('<br/>');
|
||||
} else {
|
||||
return [
|
||||
`**** เงื่อนไขเพิ่มเติม`,
|
||||
'**** เงื่อนไขเพิ่มเติม',
|
||||
`- เงื่อนไขการชำระเงิน แบบแบ่งจ่าย${context?.paymentType === 'SplitCustom' ? ' กำหนดเอง ' : ' '}${context?.installments?.length} งวด`,
|
||||
...(context?.installments?.map(
|
||||
(v) =>
|
||||
|
|
@ -63,7 +63,7 @@ export function convertTemplate(
|
|||
? template.converter(context?.[name as TemplateName] as any)
|
||||
: template.converter,
|
||||
);
|
||||
console.log(ret);
|
||||
// console.log(ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue