fix: report not scope registered branch
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s

This commit is contained in:
Methapon2001 2025-03-04 11:43:28 +07:00
parent c004c516c6
commit ffa8095dcc

View file

@ -153,6 +153,9 @@ export class StatsController extends Controller {
_count: true,
by: "productId",
where: {
quotation: {
registeredBranch: { OR: permissionCondCompany(req.user) },
},
productId: { in: record.map((v) => v.id) },
requestWork: {
some: {