✨ Feat: Invoice viewing, JoFotara UBL refinements, delete functionality, and tax rate validation
This commit is contained in:
@@ -84,4 +84,24 @@ export class InvoicesController {
|
||||
async submit(@CurrentUser() user: any, @Param('id', ParseUUIDPipe) id: string) {
|
||||
return this.invoicesService.submitToJoFotara(user.tenantId, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* حذف الفاتورة نهائياً
|
||||
*/
|
||||
@Post(':id/delete') // Using POST for delete to match frontend request style or use standard DELETE
|
||||
@Roles(UserRole.ADMIN, UserRole.ACCOUNTANT)
|
||||
async remove(@CurrentUser() user: any, @Param('id', ParseUUIDPipe) id: string) {
|
||||
return this.invoicesService.remove(user.tenantId, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* الحصول على الملف الأصلي للفاتورة
|
||||
*/
|
||||
@Get(':id/file')
|
||||
async getFile(
|
||||
@CurrentUser() user: any,
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
) {
|
||||
return this.invoicesService.getFile(user.tenantId, id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user