This commit is contained in:
2021-05-11 22:34:49 +00:00
parent cbd7d2da8d
commit d54f833e63

View File

@@ -25,22 +25,39 @@ namespace AyaNova.Models
public decimal NoChargeQuantity { get; set; } public decimal NoChargeQuantity { get; set; }
public long? ServiceBankId { get; set; } public long? ServiceBankId { get; set; }
public long? TaxCodeSaleId { get; set; } public long? TaxCodeSaleId { get; set; }
[NotMapped]
public string TaxCodeSaleViz { get; set; }
/* /*
todo: //from case 3748
"BasePrice" - Cost, this is the entered Cost for the item at time of selection
add fields to reflect contract: - ListPrice, [REQUIRED] this is the un-discounted per unit price of the item be it labor, parts, loaner, travel etc. What is normally charged at that moment in time for this item if it wasn't discounted.
OverrideType - Price, [NULLABLE] this is the EFFECTIVE PRICE either contract determined price calculated from ListPrice, otherwise it's a copy of the list price. User with sufficient rights can can override it to enter a different amount which effectively supports manual discount feature in v7 which was by %. This is the *actual* price used in calculations.
OverrideViz - TaxName copied from selected tax code, not directly editable
OverridePct - TaxAPct copied from selected tax code, not directly editable
- TaxBPct copied from selected tax code, not directly editable
- TaxOnTax copied from selected tax code not directly editable
- TaxAViz, [calculated NOT persisted] (Price*Quantity)+TaxAPct
- TaxBViz, [calculated NOT persisted] (Price*Quantity)+TaxBPct OR if TaxOnTax = TaxAViz+TaxBPct
- LineTotalViz, [calculated NOT persisted] this is effectively Price * quantity + Taxes, handy for reports and viewing not editable as it's not stored
*/ */
//PRICE FIELDS
public decimal Cost { get; set; }
public decimal ListPrice { get; set; }
public decimal Price { get; set; }
public string TaxName { get; set; }
[Required]
public decimal TaxAPct { get; set; }
[Required]
public decimal TaxBPct { get; set; }
public bool TaxOnTax { get; set; }
[NotMapped]
public decimal TaxAViz { get; set; }
[NotMapped]
public decimal TaxBViz { get; set; }
[NotMapped]
public decimal LineTotalViz { get; set; }
public decimal BasePrice { get; set; }//Rate price per unit at time of entry
public decimal Price { get; set; }//contract adjusted price or a copy of BasePrice if no contract
public decimal ManualDiscountPct { get; set; }// (V7 "Discount") ad-hoc / % off of the contractprice (which is always set regardless if contract or not) entered manually
//UTILITY FIELDS //UTILITY FIELDS