forked from sanchezvem/PyroFetes
added pdf generation for all orders
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using Ardalis.Specification;
|
||||
using PyroFetes.Models;
|
||||
|
||||
namespace PyroFetes.Specifications.DeliveryNotes;
|
||||
|
||||
public class GetDeliveryNoteByIdWithProductsSpec : Specification<DeliveryNote>
|
||||
{
|
||||
public GetDeliveryNoteByIdWithProductsSpec(int deliveryNoteId)
|
||||
{
|
||||
Query
|
||||
.Where(d => d.Id == deliveryNoteId)
|
||||
.Include(d => d.ProductDeliveries!)
|
||||
.ThenInclude(dp => dp.Product);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Ardalis.Specification;
|
||||
using PyroFetes.Models;
|
||||
|
||||
namespace PyroFetes.Specifications.PurchaseOrders;
|
||||
|
||||
public class GetPurchaseOrderByIdWithProductsSpec : Specification<PurchaseOrder>
|
||||
{
|
||||
public GetPurchaseOrderByIdWithProductsSpec(int purchaseOrderId)
|
||||
{
|
||||
Query
|
||||
.Where(p => p.Id == purchaseOrderId)
|
||||
.Include(p => p.PurchaseProducts!)
|
||||
.ThenInclude(pp => pp.Product);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user