feat: add sellerId in quotation
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s
This commit is contained in:
parent
859a1e3def
commit
e0be1f6ab5
1 changed files with 6 additions and 0 deletions
|
|
@ -84,6 +84,8 @@ type QuotationCreate = {
|
|||
installmentNo?: number;
|
||||
workerIndex?: number[];
|
||||
}[];
|
||||
|
||||
sellerId?: string;
|
||||
};
|
||||
|
||||
type QuotationUpdate = {
|
||||
|
|
@ -142,6 +144,8 @@ type QuotationUpdate = {
|
|||
installmentNo?: number;
|
||||
workerIndex?: number[];
|
||||
}[];
|
||||
|
||||
sellerId?: string;
|
||||
};
|
||||
|
||||
const VAT_DEFAULT = config.vat;
|
||||
|
|
@ -211,6 +215,7 @@ export class QuotationController extends Controller {
|
|||
@Query() query = "",
|
||||
@Query() startDate?: Date,
|
||||
@Query() endDate?: Date,
|
||||
@Query() sellerId?: string,
|
||||
) {
|
||||
const where = {
|
||||
OR: queryOrNot<Prisma.QuotationWhereInput[]>(query, [
|
||||
|
|
@ -259,6 +264,7 @@ export class QuotationController extends Controller {
|
|||
}
|
||||
: undefined,
|
||||
...whereDateQuery(startDate, endDate),
|
||||
sellerId: sellerId ? sellerId : null,
|
||||
} satisfies Prisma.QuotationWhereInput;
|
||||
|
||||
const [result, total] = await prisma.$transaction([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue