Merge pull request 'feat(sales): exponer aprobación por ítem en QuoteDto para precarga documental.' (#34) from feature/leandro/33-quote-approved-items-dto into master
All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 5m12s

Reviewed-on: http://saludlab.com.ar:3000/leandro/phronCare/pulls/34
This commit is contained in:
Leandro Hernan Rojas 2026-03-22 21:07:47 +00:00
commit 6d3ad6aef2
3 changed files with 32 additions and 3 deletions

View File

@ -36,5 +36,25 @@
/// Total del ítem (Subtotal + TaxAmount).
/// </summary>
public decimal Total { get; set; }
/// <summary>
/// Indica si el renglón fue aprobado durante el proceso de autorización.
/// </summary>
public bool Approved { get; set; }
/// <summary>
/// Cantidad aprobada para el renglón. Puede diferir de la cantidad originalmente cotizada.
/// </summary>
public int? ApprovedQuantity { get; set; }
/// <summary>
/// Precio unitario aprobado para el renglón.
/// </summary>
public decimal? ApprovedUnitPrice { get; set; }
/// <summary>
/// Importe total aprobado para el renglón.
/// </summary>
public decimal? ApprovedAmount { get; set; }
}
}

View File

@ -97,7 +97,7 @@ namespace Models.Repositories
return await (
from q in _context.PhSQuoteHeaders
join c in _context.PhSCustomers on q.CustomerId equals c.Id
where q.Status == "Emitido" &&
where q.Status == "Aprobado" &&
(q.Quotenumber.Contains(filter) || c.Name.Contains(filter))
orderby q.Issuedate descending
select new ELookUpItem

View File

@ -175,12 +175,17 @@ namespace Models.Repositories
var itemTax = totalTaxAmount * itemBase / netBase;
return new QuoteItemDto
{
Id = d.Id,
Description = d.ProductDescription,
Quantity = d.Quantity,
UnitPrice = d.Unitprice,
Subtotal = itemBase,
TaxAmount = itemTax,
Total = itemBase + itemTax
Total = itemBase + itemTax,
Approved = d.Approved,
ApprovedQuantity = d.Approvedquantity,
ApprovedUnitPrice = d.Approvedunitprice,
ApprovedAmount = d.Approvedamount
};
}).ToList(),
@ -303,7 +308,11 @@ namespace Models.Repositories
UnitPrice = d.Unitprice,
Subtotal = itemBase,
TaxAmount = itemTax,
Total = itemBase + itemTax
Total = itemBase + itemTax,
Approved = d.Approved,
ApprovedQuantity = d.Approvedquantity,
ApprovedUnitPrice = d.Approvedunitprice,
ApprovedAmount = d.Approvedamount
};
}).ToList(),