refactor: adjust field

This commit is contained in:
Methapon Metanipat 2024-10-15 09:42:16 +07:00
parent fdc72a7caf
commit a24bf4fb4b
5 changed files with 14 additions and 3 deletions

View file

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Product" ADD COLUMN "calcVat" BOOLEAN NOT NULL DEFAULT true;

View file

@ -0,0 +1,8 @@
/*
Warnings:
- You are about to drop the column `actorName` on the `Quotation` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Quotation" DROP COLUMN "actorName";

View file

@ -976,6 +976,8 @@ model Product {
vatIncluded Boolean?
expenseType String?
calcVat Boolean @default(true)
status Status @default(CREATED)
statusOrder Int @default(0)
@ -1097,7 +1099,6 @@ model Quotation {
code String
actorName String
workName String
contactName String
contactTel String

View file

@ -70,6 +70,7 @@ type ProductCreate = {
agentPrice: number;
serviceCharge: number;
vatIncluded?: boolean;
calcVat?: boolean;
expenseType?: string;
selectedImage?: string;
shared?: boolean;
@ -87,6 +88,7 @@ type ProductUpdate = {
serviceCharge?: number;
remark?: string;
vatIncluded?: boolean;
calcVat?: boolean;
expenseType?: string;
selectedImage?: string;
shared?: boolean;

View file

@ -28,7 +28,6 @@ import { precisionRound } from "../utils/arithmetic";
type QuotationCreate = {
status?: Status;
actorName: string;
workName: string;
contactName: string;
contactTel: string;
@ -83,7 +82,6 @@ type QuotationCreate = {
type QuotationUpdate = {
status?: "ACTIVE" | "INACTIVE";
actorName?: string;
workName?: string;
contactName?: string;
contactTel?: string;