feat: añado Dtos para el invoices{id}

para que pueda devolver todas sus lineas de factura.

Tambien las respectivas Respuestas de Dolibarr que hay que sanear.
This commit is contained in:
javiermengual 2025-12-29 19:18:04 +01:00
parent 5081d71f69
commit b2427a3276
5 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,7 @@
namespace DoliMiddlewareApi.Dtos.Dolibarr;
public class InvoiceDetailResponse : InvoiceResponse
{
public List<InvoiceLineResponse>? Lines { get; set; }
}

View File

@ -0,0 +1,12 @@
namespace DoliMiddlewareApi.Dtos.Dolibarr;
public class InvoiceLineResponse
{
public string? id { get; set; }
public string? desc { get; set; }
public string? description { get; set; }
public string? qty { get; set; }
public string? subprice { get; set; }
public string? tva_tx { get; set; }
public string? total_ttc { get; set; }
}

View File

@ -1,4 +1,4 @@
namespace DoliMiddlewareApi.Services;
namespace DoliMiddlewareApi.Dtos.Dolibarr;
public class InvoiceResponse
{

View File

@ -0,0 +1,14 @@
namespace DoliMiddlewareApi.Dtos;
public class InvoiceDetailDto
{
public int Id { get; set; }
public string Number { get; set; }
public DateTime? Date { get; set; }
public DateTime? ExpireDate { get; set; }
public int ClientId { get; set; }
public decimal? Total { get; set; }
public decimal? RemainToPay { get; set; }
public string Status { get; set; }
public List<InvoiceLineDto>? Lines { get; set; }
}

View File

@ -0,0 +1,11 @@
namespace DoliMiddlewareApi.Dtos;
public class InvoiceLineDto
{
public int Id { get; set; }
public string Description { get; set; }
public decimal Quantity { get; set; }
public decimal UnitPrice { get; set; }
public decimal TaxRate { get; set; }
public decimal Total { get; set; }
}