fix: wrongn condition
This commit is contained in:
parent
2e38ea22d5
commit
87d9f39290
1 changed files with 11 additions and 8 deletions
|
|
@ -418,17 +418,20 @@ export class CreditNoteController extends Controller {
|
|||
|
||||
const requestWork = await prisma.requestWork.findMany({
|
||||
where: {
|
||||
OR: [{ creditNote: null }, { creditNoteId }],
|
||||
request: {
|
||||
quotation: {
|
||||
id: body.quotationId,
|
||||
},
|
||||
quotation: { id: body.quotationId },
|
||||
},
|
||||
stepStatus: {
|
||||
some: {
|
||||
workStatus: RequestWorkStatus.Canceled,
|
||||
AND: [
|
||||
{
|
||||
OR: [{ creditNote: null }, { creditNoteId }],
|
||||
},
|
||||
},
|
||||
{
|
||||
OR: [
|
||||
{ request: { requestDataStatus: RequestDataStatus.Canceled } },
|
||||
{ stepStatus: { some: { workStatus: RequestWorkStatus.Canceled } } },
|
||||
],
|
||||
},
|
||||
],
|
||||
id: { in: body.requestWorkId },
|
||||
},
|
||||
include: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue