fix: mobile app bugs - payment screen, remittance isolation, invoice sorting, ticket creation

- Fix record payment screen fetching invoice directly instead of relying on collection provider
- Fix getUnremittedPayments tenant isolation (remittance tenantId filter)
- Add invoice status filter and dueDate sort support in controller/service
- Allow technicians to create tickets (role decorator fix)
- Enhance seed data with 10 more pending-installation clients and installation tickets
This commit is contained in:
kevin-asprec
2026-05-06 03:13:32 +08:00
parent 58d77fc67f
commit 58c01d4580
5 changed files with 38 additions and 7 deletions

View File

@@ -159,7 +159,10 @@ export class PaymentService {
}
async getUnremittedPayments(tenantId: string, collectorId: string) {
const remittedIds = (await this.prisma.remittancePayment.findMany({ select: { paymentId: true } }))
const remittedIds = (await this.prisma.remittancePayment.findMany({
where: { remittance: { tenantId } },
select: { paymentId: true },
}))
.map((r) => r.paymentId);
return this.prisma.payment.findMany({