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
|
||||
pricePerUnit Float
|
||||
|
||||
installmentNo Int?
|
||||
|
||||
productId String
|
||||
product Product @relation(fields: [productId], references: [id])
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ type QuotationCreate = {
|
|||
productId: string;
|
||||
amount: number;
|
||||
discount?: number;
|
||||
installmentNo?: number;
|
||||
workerIndex?: number[];
|
||||
}[];
|
||||
};
|
||||
|
|
@ -130,6 +131,7 @@ type QuotationUpdate = {
|
|||
productId: string;
|
||||
amount: number;
|
||||
discount?: number;
|
||||
installmentNo?: number;
|
||||
workerIndex?: number[];
|
||||
}[];
|
||||
};
|
||||
|
|
@ -412,6 +414,7 @@ export class QuotationController extends Controller {
|
|||
pricePerUnit,
|
||||
amount: v.amount,
|
||||
discount: v.discount || 0,
|
||||
installmentNo: v.installmentNo,
|
||||
vat,
|
||||
worker: {
|
||||
create: sortedEmployeeId
|
||||
|
|
@ -667,6 +670,7 @@ export class QuotationController extends Controller {
|
|||
pricePerUnit,
|
||||
amount: v.amount,
|
||||
discount: v.discount || 0,
|
||||
installmentNo: v.installmentNo,
|
||||
vat,
|
||||
worker: {
|
||||
create: sortedEmployeeId
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue