feat(sales): exponer aprobación por ítem en QuoteDto para precarga documental. #34
@ -36,5 +36,25 @@
|
|||||||
/// Total del ítem (Subtotal + TaxAmount).
|
/// Total del ítem (Subtotal + TaxAmount).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public decimal Total { get; set; }
|
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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,7 +97,7 @@ namespace Models.Repositories
|
|||||||
return await (
|
return await (
|
||||||
from q in _context.PhSQuoteHeaders
|
from q in _context.PhSQuoteHeaders
|
||||||
join c in _context.PhSCustomers on q.CustomerId equals c.Id
|
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))
|
(q.Quotenumber.Contains(filter) || c.Name.Contains(filter))
|
||||||
orderby q.Issuedate descending
|
orderby q.Issuedate descending
|
||||||
select new ELookUpItem
|
select new ELookUpItem
|
||||||
|
|||||||
@ -175,12 +175,17 @@ namespace Models.Repositories
|
|||||||
var itemTax = totalTaxAmount * itemBase / netBase;
|
var itemTax = totalTaxAmount * itemBase / netBase;
|
||||||
return new QuoteItemDto
|
return new QuoteItemDto
|
||||||
{
|
{
|
||||||
|
Id = d.Id,
|
||||||
Description = d.ProductDescription,
|
Description = d.ProductDescription,
|
||||||
Quantity = d.Quantity,
|
Quantity = d.Quantity,
|
||||||
UnitPrice = d.Unitprice,
|
UnitPrice = d.Unitprice,
|
||||||
Subtotal = itemBase,
|
Subtotal = itemBase,
|
||||||
TaxAmount = itemTax,
|
TaxAmount = itemTax,
|
||||||
Total = itemBase + itemTax
|
Total = itemBase + itemTax,
|
||||||
|
Approved = d.Approved,
|
||||||
|
ApprovedQuantity = d.Approvedquantity,
|
||||||
|
ApprovedUnitPrice = d.Approvedunitprice,
|
||||||
|
ApprovedAmount = d.Approvedamount
|
||||||
};
|
};
|
||||||
}).ToList(),
|
}).ToList(),
|
||||||
|
|
||||||
@ -303,7 +308,11 @@ namespace Models.Repositories
|
|||||||
UnitPrice = d.Unitprice,
|
UnitPrice = d.Unitprice,
|
||||||
Subtotal = itemBase,
|
Subtotal = itemBase,
|
||||||
TaxAmount = itemTax,
|
TaxAmount = itemTax,
|
||||||
Total = itemBase + itemTax
|
Total = itemBase + itemTax,
|
||||||
|
Approved = d.Approved,
|
||||||
|
ApprovedQuantity = d.Approvedquantity,
|
||||||
|
ApprovedUnitPrice = d.Approvedunitprice,
|
||||||
|
ApprovedAmount = d.Approvedamount
|
||||||
};
|
};
|
||||||
}).ToList(),
|
}).ToList(),
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user