This commit is contained in:
34
server/AyaNova/models/ViewRestockRequired.cs
Normal file
34
server/AyaNova/models/ViewRestockRequired.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
//Note this is how to define a View backed model with no key (id)
|
||||
|
||||
[Microsoft.EntityFrameworkCore.Keyless]
|
||||
public class ViewRestockRequired
|
||||
{
|
||||
public long PartId { get; set; }
|
||||
public long PartWarehouseId { get; set; }
|
||||
public string PartNumber { get; set; }
|
||||
public string DisplayWarehouse { get; set; }
|
||||
public long ManufacturerId { get; set; }
|
||||
public string DisplayManufacturer { get; set; }
|
||||
public long WholesalerId { get; set; }
|
||||
public string DisplayWholesaler { get; set; }
|
||||
public long AlternativeWholesalerId { get; set; }
|
||||
public string DisplayAlternativeWholesaler { get; set; }
|
||||
public decimal MinimumQuantity { get; set; }
|
||||
public decimal Balance { get; set; }
|
||||
public decimal OnOrderQuantity { get; set; }
|
||||
public decimal RequiredQuantity { get; set; }
|
||||
|
||||
}//eoc
|
||||
|
||||
}//eons
|
||||
|
||||
/*
|
||||
SELECT apart.id AS partid, apartwarehouse.id AS partwarehouseid, apart.partnumber, apartwarehouse.name AS displaywarehouse, "
|
||||
+ "amanufacturer.id AS manufacturerid, amanufacturer.name AS displaymanufacturer, awholesaler.id AS wholesalerid, awholesaler.name AS displaywholesaler, "
|
||||
+ "aalternativewholesaler.id AS alternativewholesalerid, aalternativewholesaler.name AS displayalternativewholesaler,"
|
||||
+ "apartstocklevel.minimumquantity, vpartinventorynow.balance, COALESCE(vpartsonorderuncommitted.quantityonorder,0) AS onorderquantity, "
|
||||
+ "apartstocklevel.minimumquantity - (COALESCE(vpartinventorynow.balance, 0) + COALESCE(vpartsonorderuncommitted.quantityonorder, 0)) AS requiredquantity "
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user