Implement Invoices fetching and uploading

This commit is contained in:
Hamza-Ayed
2026-04-18 00:55:07 +03:00
parent 77434fa815
commit 93591c75e2
3 changed files with 277 additions and 93 deletions

View File

@@ -89,6 +89,17 @@ export class InvoicesService {
});
}
/**
* قائمة جميع الفواتير للمكتب
*/
async findAllByTenant(tenantId: string): Promise<Invoice[]> {
return this.invoiceRepository.find({
where: { tenant_id: tenantId },
relations: ['company'],
order: { created_at: 'DESC' },
});
}
/**
* تفاصيل فاتورة
*/