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:
puriphatt 2024-12-06 11:01:52 +07:00 committed by GitHub
parent 57aabf1deb
commit 1b4c06b182
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 357 additions and 77 deletions

View file

@ -342,17 +342,7 @@ export type QuotationFull = {
};
export type QuotationPayload = {
productServiceList: {
workerIndex: number[];
vat?: number;
pricePerUnit?: number;
discount?: number;
amount: number;
product: ProductRelation;
installmentNo?: number;
work?: WorkRelation | null;
service?: ServiceRelation | null;
}[];
productServiceList: ProductServiceList[];
customerBranchId: string;
registeredBranchId: string;
urgent: boolean;
@ -437,3 +427,23 @@ export type PaymentPayload = {
date: Date;
amount: number;
};
export type ProductServiceList = {
workerIndex: number[];
vat?: number;
pricePerUnit?: number;
discount?: number;
amount: number;
product: ProductRelation;
installmentNo?: number;
work?: WorkRelation | null;
service?: ServiceRelation | null;
};
export type PaySplit = {
no: number;
amount: number;
name?: string;
invoice?: boolean;
invoiceId?: string;
};