diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 096864e..034aa70 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -194,6 +194,7 @@ export class QuotationController extends Controller { @Query() urgentFirst?: boolean, @Query() includeRegisteredBranch?: boolean, @Query() hasCancel?: boolean, + @Query() forDebitNote?: boolean, @Query() code?: string, @Query() query = "", ) { @@ -218,7 +219,7 @@ export class QuotationController extends Controller { code, payCondition, registeredBranch: isSystem(req.user) ? undefined : { OR: permissionCond(req.user) }, - quotationStatus: status, + quotationStatus: forDebitNote ? { notIn: ["Issued", "Expired"] } : status, requestData: hasCancel ? { some: {