This commit is contained in:
@@ -27,15 +27,6 @@ namespace AyaNova.Models
|
|||||||
public string UserViz { get; set; }
|
public string UserViz { get; set; }
|
||||||
public bool ChargeToCustomer { get; set; } = false;
|
public bool ChargeToCustomer { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
//TAX AND TOTAL FIELDS
|
|
||||||
public string TaxName { get; set; }
|
|
||||||
[Required]
|
|
||||||
public decimal TaxAPct { get; set; }
|
|
||||||
[Required]
|
|
||||||
public decimal TaxBPct { get; set; }
|
|
||||||
[Required]
|
|
||||||
public bool TaxOnTax { get; set; }
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal TaxAViz { get; set; }
|
public decimal TaxAViz { get; set; }
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
@@ -44,6 +35,10 @@ namespace AyaNova.Models
|
|||||||
public decimal LineTotalViz { get; set; }
|
public decimal LineTotalViz { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//UTILITY FIELDS
|
//UTILITY FIELDS
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public bool IsDirty { get; set; } = false;//never dirty coming from the server
|
public bool IsDirty { get; set; } = false;//never dirty coming from the server
|
||||||
|
|||||||
@@ -21,27 +21,47 @@ namespace AyaNova.Models
|
|||||||
public decimal Quantity { get; set; }
|
public decimal Quantity { get; set; }
|
||||||
public long? TaxPartSaleId { get; set; }
|
public long? TaxPartSaleId { get; set; }
|
||||||
|
|
||||||
//PRICE FIELDS
|
// //PRICE FIELDS
|
||||||
[Required]
|
// [Required]
|
||||||
public decimal Cost { get; set; }
|
// public decimal Cost { get; set; }
|
||||||
[Required]
|
// [Required]
|
||||||
public decimal ListPrice { get; set; }
|
// public decimal ListPrice { get; set; }
|
||||||
[Required]
|
// [Required]
|
||||||
public decimal Price { get; set; }
|
// public decimal Price { get; set; }
|
||||||
[Required]
|
// [Required]
|
||||||
public string TaxName { get; set; }
|
// public string TaxName { get; set; }
|
||||||
[Required]
|
// [Required]
|
||||||
public decimal TaxAPct { get; set; }
|
// public decimal TaxAPct { get; set; }
|
||||||
[Required]
|
// [Required]
|
||||||
public decimal TaxBPct { get; set; }
|
// public decimal TaxBPct { get; set; }
|
||||||
[Required]
|
// [Required]
|
||||||
public bool TaxOnTax { 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; }
|
||||||
|
|
||||||
|
//Standard pricing fields (mostly to support printed reports though some show in UI)
|
||||||
|
//some not to be sent with record depending on role (i.e. cost and charge in some cases)
|
||||||
|
public decimal? PriceOverride { get; set; }//user entered manually overridden price, if null then ignored in calcs otherwise this *is* the price even if zero
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal TaxAViz { get; set; }
|
public decimal CostViz { get; set; }//cost from source record (e.g. serviceRate) or zero if no cost entered
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal TaxBViz { get; set; }
|
public decimal ListPriceViz { get; set; }//List price from source record (e.g. serviceRate) or zero if no cost entered
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal LineTotalViz { get; set; }
|
public string UnitOfMeasureViz { get; set; }//"each", "hour" etc
|
||||||
|
[NotMapped]
|
||||||
|
public decimal PriceViz { get; set; }//per unit price used in calcs after discounts or manual price if non-null or just ListPrice if no discount or manual override
|
||||||
|
[NotMapped]
|
||||||
|
public decimal NetViz { get; set; }//quantity * price (before taxes line total essentially)
|
||||||
|
[NotMapped]
|
||||||
|
public decimal TaxAViz { get; set; }//total amount of taxA
|
||||||
|
[NotMapped]
|
||||||
|
public decimal TaxBViz { get; set; }//total amount of taxB
|
||||||
|
[NotMapped]
|
||||||
|
public decimal LineTotalViz { get; set; }//line total netViz + taxes
|
||||||
|
|
||||||
//UTILITY FIELDS
|
//UTILITY FIELDS
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
|
|||||||
@@ -22,31 +22,48 @@ namespace AyaNova.Models
|
|||||||
public long? TaxCodeSaleId { get; set; }
|
public long? TaxCodeSaleId { get; set; }
|
||||||
public decimal Distance { get; set; }
|
public decimal Distance { 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
|
// //PRICE FIELDS
|
||||||
// public decimal ManualDiscountPct { get; set; }// (V7 "Discount") ad-hoc / % off of the contractprice (which is always set regardless if contract or not) entered manually
|
// [Required]
|
||||||
|
// public decimal Cost { get; set; }
|
||||||
|
// [Required]
|
||||||
|
// public decimal ListPrice { get; set; }
|
||||||
|
// [Required]
|
||||||
|
// public decimal Price { get; set; }
|
||||||
|
// [Required]
|
||||||
|
// public string TaxName { get; set; }
|
||||||
|
// [Required]
|
||||||
|
// public decimal TaxAPct { get; set; }
|
||||||
|
// [Required]
|
||||||
|
// public decimal TaxBPct { get; set; }
|
||||||
|
// [Required]
|
||||||
|
// public bool TaxOnTax { get; set; }
|
||||||
|
// [NotMapped]
|
||||||
|
// public decimal TaxAViz { get; set; }
|
||||||
|
// [NotMapped]
|
||||||
|
// public decimal TaxBViz { get; set; }
|
||||||
|
// [NotMapped]
|
||||||
|
// public decimal LineTotalViz { get; set; }
|
||||||
|
|
||||||
//PRICE FIELDS
|
//Standard pricing fields (mostly to support printed reports though some show in UI)
|
||||||
[Required]
|
//some not to be sent with record depending on role (i.e. cost and charge in some cases)
|
||||||
public decimal Cost { get; set; }
|
public decimal? PriceOverride { get; set; }//user entered manually overridden price, if null then ignored in calcs otherwise this *is* the price even if zero
|
||||||
[Required]
|
|
||||||
public decimal ListPrice { get; set; }
|
|
||||||
[Required]
|
|
||||||
public decimal Price { get; set; }
|
|
||||||
[Required]
|
|
||||||
public string TaxName { get; set; }
|
|
||||||
[Required]
|
|
||||||
public decimal TaxAPct { get; set; }
|
|
||||||
[Required]
|
|
||||||
public decimal TaxBPct { get; set; }
|
|
||||||
[Required]
|
|
||||||
public bool TaxOnTax { get; set; }
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal TaxAViz { get; set; }
|
public decimal CostViz { get; set; }//cost from source record (e.g. serviceRate) or zero if no cost entered
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal TaxBViz { get; set; }
|
public decimal ListPriceViz { get; set; }//List price from source record (e.g. serviceRate) or zero if no cost entered
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal LineTotalViz { get; set; }
|
public string UnitOfMeasureViz { get; set; }//"each", "hour" etc
|
||||||
|
[NotMapped]
|
||||||
|
public decimal PriceViz { get; set; }//per unit price used in calcs after discounts or manual price if non-null or just ListPrice if no discount or manual override
|
||||||
|
[NotMapped]
|
||||||
|
public decimal NetViz { get; set; }//quantity * price (before taxes line total essentially)
|
||||||
|
[NotMapped]
|
||||||
|
public decimal TaxAViz { get; set; }//total amount of taxA
|
||||||
|
[NotMapped]
|
||||||
|
public decimal TaxBViz { get; set; }//total amount of taxB
|
||||||
|
[NotMapped]
|
||||||
|
public decimal LineTotalViz { get; set; }//line total netViz + taxes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -778,8 +778,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
//WORKORDERITEM EXPENSE
|
//WORKORDERITEM EXPENSE
|
||||||
await ExecQueryAsync("CREATE TABLE aworkorderitemexpense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
|
await ExecQueryAsync("CREATE TABLE aworkorderitemexpense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
|
||||||
+ "description TEXT, name TEXT, totalcost DECIMAL(38,18) NOT NULL default 0, chargeamount DECIMAL(38,18) NOT NULL default 0, taxpaid DECIMAL(38,18) NOT NULL default 0, "
|
+ "description TEXT, name TEXT, totalcost DECIMAL(38,18) NOT NULL default 0, chargeamount DECIMAL(38,18) NOT NULL default 0, taxpaid DECIMAL(38,18) NOT NULL default 0, "
|
||||||
+ "chargetaxcodeid BIGINT REFERENCES ataxcode, reimburseuser BOOL NOT NULL, userid BIGINT REFERENCES auser, chargetocustomer BOOL NOT NULL, "
|
+ "chargetaxcodeid BIGINT REFERENCES ataxcode, reimburseuser BOOL NOT NULL, userid BIGINT REFERENCES auser, chargetocustomer BOOL NOT NULL "
|
||||||
+ "taxapct DECIMAL(8,5) NOT NULL default 0, taxbpct DECIMAL(8,5) NOT NULL default 0, taxontax BOOL NOT NULL default false, taxname TEXT "
|
|
||||||
+ ")");
|
+ ")");
|
||||||
|
|
||||||
//WORKORDERITEM LABOR
|
//WORKORDERITEM LABOR
|
||||||
|
|||||||
Reference in New Issue
Block a user