order
This commit is contained in:
@@ -13,7 +13,10 @@ namespace Back.Data.Models
|
||||
public string ApprovalDate { get; set; }
|
||||
public decimal PreDiscount { get { return OrderItems.Sum(s => s.Total); } }
|
||||
public decimal TDiscount { get; set; } = 0;
|
||||
public decimal TPrice { get { return OrderItems.Sum(s => s.Total) - TDiscount; } }
|
||||
public decimal lstDiscount { get { return OrderItems.Sum(s => s.Total) - TDiscount; } }
|
||||
public decimal TTax { get { return OrderItems.Sum(s => s.Tax); } }
|
||||
public decimal TPrice { get { return lstDiscount - TTax; } }
|
||||
|
||||
|
||||
#region Navigation
|
||||
[ForeignKey("CompanyID")]
|
||||
|
@@ -6,8 +6,8 @@ namespace Back.Data.Models
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public int OrderID { get; set; }
|
||||
public int PermissionID { get; set; }
|
||||
public int CalculationTypeID { get; set; }
|
||||
public int? PermissionID { get; set; }
|
||||
public int? PromotionID { get; set; }
|
||||
public int CreditAmount { get; set; }
|
||||
public decimal APrice { get; set; }
|
||||
public decimal Discount { get; set; }
|
||||
@@ -18,9 +18,9 @@ namespace Back.Data.Models
|
||||
[ForeignKey("OrderID")]
|
||||
public virtual Order Order { get; set; }
|
||||
[ForeignKey("PermissionID")]
|
||||
public virtual Permission Permission { get; set; }
|
||||
[ForeignKey("CalculationTypeID")]
|
||||
public virtual CalculationType CalculationType { get; set; }
|
||||
public virtual Permission? Permission { get; set; }
|
||||
[ForeignKey("PromotionID")]
|
||||
public virtual Promotion? Promotion { get; set; }
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@@ -6,10 +6,9 @@ namespace Back.Data.Models
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool Satus { get; set; }
|
||||
public bool Status { get; set; }
|
||||
|
||||
|
||||
public IEnumerable<PromotionDetails> PromotionDetails { get; set; }
|
||||
public virtual IEnumerable<PromotionDetails> PromotionDetails { get; set; }
|
||||
}
|
||||
public class PromotionDetails
|
||||
{
|
||||
@@ -21,9 +20,9 @@ namespace Back.Data.Models
|
||||
public decimal TPrice { get { return APrice * CreditAmount; } }
|
||||
|
||||
[ForeignKey("PermissionID")]
|
||||
public Permission Permission { get; set; }
|
||||
public virtual Permission Permission { get; set; }
|
||||
[ForeignKey("PromotionID")]
|
||||
public Promotion Promotion { get; set; }
|
||||
public virtual Promotion Promotion { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user