🚀 Elite Accountant Hub: Foundation & Trojan Horse deployment

This commit is contained in:
Hamza-Ayed
2026-04-22 01:05:25 +03:00
parent 2e2d76c0a8
commit 444097814d
23 changed files with 796 additions and 88 deletions

View File

@@ -1,6 +1,9 @@
/**
* ════════════════════════════════════════════════════════════
* مُصادَق (Musadaq) — Invoices Controller
* مُصادَق (Musadaq) — Invoices Controller / متحكم الفواتير
* ════════════════════════════════════════════════════════════
* Handles HTTP requests related to invoice management.
* يتعامل مع طلبات HTTP المتعلقة بإدارة الفواتير.
* ════════════════════════════════════════════════════════════
*/
@@ -31,6 +34,7 @@ export class InvoicesController {
/**
* قائمة جميع الفواتير للمكتب
* List all invoices for the entire accounting office (tenant)
*/
@Get()
async findAllByTenant(@CurrentUser() user: any) {
@@ -39,6 +43,7 @@ export class InvoicesController {
/**
* رفع فاتورة لشركة محددة
* Upload an invoice file for a specific company
*/
@Post('upload/:companyId')
@Roles(UserRole.ADMIN, UserRole.ACCOUNTANT)
@@ -53,6 +58,7 @@ export class InvoicesController {
/**
* قائمة الفواتير لشركة محددة
* List all invoices for a specific company
*/
@Get('company/:companyId')
async findAll(
@@ -64,6 +70,7 @@ export class InvoicesController {
/**
* تفاصيل فاتورة محددة
* Get details of a specific invoice
*/
@Get(':id')
async findOne(
@@ -78,6 +85,7 @@ export class InvoicesController {
*/
/**
* إرسال الفاتورة إلى بوابة جو فوترة الحكومية
* Submit an invoice to the official JoFotara portal
*/
@Post(':id/submit')
@Roles(UserRole.ADMIN, UserRole.ACCOUNTANT)
@@ -87,6 +95,7 @@ export class InvoicesController {
/**
* حذف الفاتورة نهائياً
* Permanently delete an invoice
*/
@Post(':id/delete') // Using POST for delete to match frontend request style or use standard DELETE
@Roles(UserRole.ADMIN, UserRole.ACCOUNTANT)
@@ -96,6 +105,7 @@ export class InvoicesController {
/**
* الحصول على الملف الأصلي للفاتورة
* Download/Stream the original invoice file
*/
@Get(':id/file')
async getFile(