fix: wrong canceled count
This commit is contained in:
parent
a9cf88d6d4
commit
8d27fdfae0
1 changed files with 19 additions and 6 deletions
|
|
@ -282,20 +282,33 @@ export class QuotationController extends Controller {
|
||||||
select: {
|
select: {
|
||||||
requestWork: {
|
requestWork: {
|
||||||
where: {
|
where: {
|
||||||
|
OR: [
|
||||||
|
{ request: { requestDataStatus: RequestDataStatus.Canceled } },
|
||||||
|
{ stepStatus: { some: { workStatus: RequestWorkStatus.Canceled } } },
|
||||||
|
],
|
||||||
creditNoteId: null,
|
creditNoteId: null,
|
||||||
stepStatus: { some: { workStatus: RequestWorkStatus.Canceled } },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
where: {
|
where: {
|
||||||
requestWork: {
|
OR: [
|
||||||
some: {
|
{
|
||||||
creditNoteId: null,
|
requestDataStatus: RequestDataStatus.Canceled,
|
||||||
stepStatus: { some: { workStatus: RequestWorkStatus.Canceled } },
|
requestWork: {
|
||||||
|
some: { creditNoteId: null },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
|
requestWork: {
|
||||||
|
some: {
|
||||||
|
creditNoteId: null,
|
||||||
|
stepStatus: { some: { workStatus: RequestWorkStatus.Canceled } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
quotationId: { in: result.map((v) => v.id) },
|
quotationId: { in: result.map((v) => v.id) },
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue