This commit is contained in:
2026-02-21 12:18:29 +03:30
parent f682465d4c
commit 1acae30b75
6 changed files with 31 additions and 9 deletions
+3 -1
View File
@@ -58,6 +58,8 @@ export class InvoiceService {
discount,
paidAmount: 0,
balance: 0,
attachments: [],
paymentMethod: dto.paymentMethod
});
em.persist(invoice);
@@ -125,7 +127,7 @@ export class InvoiceService {
if (!item) {
throw new NotFoundException('Invoice item not found');
}
if(item.confirmedAt){
if (item.confirmedAt) {
throw new BadRequestException('Invoice item already confirmed');
}
item.confirmedAt = new Date();