feat: add installment no to quotation data
This is for when issue invoice.
This commit is contained in:
parent
af463ee509
commit
73ec9bd323
3 changed files with 8 additions and 0 deletions
2
prisma/migrations/20241025020102_add_field/migration.sql
Normal file
2
prisma/migrations/20241025020102_add_field/migration.sql
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "QuotationProductServiceList" ADD COLUMN "installmentNo" INTEGER;
|
||||||
|
|
@ -1208,6 +1208,8 @@ model QuotationProductServiceList {
|
||||||
discount Float
|
discount Float
|
||||||
pricePerUnit Float
|
pricePerUnit Float
|
||||||
|
|
||||||
|
installmentNo Int?
|
||||||
|
|
||||||
productId String
|
productId String
|
||||||
product Product @relation(fields: [productId], references: [id])
|
product Product @relation(fields: [productId], references: [id])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ type QuotationCreate = {
|
||||||
productId: string;
|
productId: string;
|
||||||
amount: number;
|
amount: number;
|
||||||
discount?: number;
|
discount?: number;
|
||||||
|
installmentNo?: number;
|
||||||
workerIndex?: number[];
|
workerIndex?: number[];
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
|
|
@ -130,6 +131,7 @@ type QuotationUpdate = {
|
||||||
productId: string;
|
productId: string;
|
||||||
amount: number;
|
amount: number;
|
||||||
discount?: number;
|
discount?: number;
|
||||||
|
installmentNo?: number;
|
||||||
workerIndex?: number[];
|
workerIndex?: number[];
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
|
|
@ -412,6 +414,7 @@ export class QuotationController extends Controller {
|
||||||
pricePerUnit,
|
pricePerUnit,
|
||||||
amount: v.amount,
|
amount: v.amount,
|
||||||
discount: v.discount || 0,
|
discount: v.discount || 0,
|
||||||
|
installmentNo: v.installmentNo,
|
||||||
vat,
|
vat,
|
||||||
worker: {
|
worker: {
|
||||||
create: sortedEmployeeId
|
create: sortedEmployeeId
|
||||||
|
|
@ -667,6 +670,7 @@ export class QuotationController extends Controller {
|
||||||
pricePerUnit,
|
pricePerUnit,
|
||||||
amount: v.amount,
|
amount: v.amount,
|
||||||
discount: v.discount || 0,
|
discount: v.discount || 0,
|
||||||
|
installmentNo: v.installmentNo,
|
||||||
vat,
|
vat,
|
||||||
worker: {
|
worker: {
|
||||||
create: sortedEmployeeId
|
create: sortedEmployeeId
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue