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({
|
const requestWork = await prisma.requestWork.findMany({
|
||||||
where: {
|
where: {
|
||||||
OR: [{ creditNote: null }, { creditNoteId }],
|
|
||||||
request: {
|
request: {
|
||||||
quotation: {
|
quotation: { id: body.quotationId },
|
||||||
id: body.quotationId,
|
|
||||||
},
|
},
|
||||||
|
AND: [
|
||||||
|
{
|
||||||
|
OR: [{ creditNote: null }, { creditNoteId }],
|
||||||
},
|
},
|
||||||
stepStatus: {
|
{
|
||||||
some: {
|
OR: [
|
||||||
workStatus: RequestWorkStatus.Canceled,
|
{ request: { requestDataStatus: RequestDataStatus.Canceled } },
|
||||||
},
|
{ stepStatus: { some: { workStatus: RequestWorkStatus.Canceled } } },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
|
],
|
||||||
id: { in: body.requestWorkId },
|
id: { in: body.requestWorkId },
|
||||||
},
|
},
|
||||||
include: {
|
include: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue