added pdf generation for all orders

This commit is contained in:
2025-12-03 17:41:19 +01:00
parent bee1cfb0e3
commit e440dcd2b5
10 changed files with 403 additions and 1 deletions

View File

@@ -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);
}
}

View File

@@ -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);
}
}