This commit is contained in:
@@ -54,7 +54,7 @@ namespace AyaNova.DataList
|
|||||||
TKey = "TaxCodeTaxA",
|
TKey = "TaxCodeTaxA",
|
||||||
FieldKey = "TaxCodeTaxA",
|
FieldKey = "TaxCodeTaxA",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Decimal,
|
UiFieldDataType = (int)UiFieldDataType.Decimal,
|
||||||
SqlValueColumnName = "ataxcode.taxa"
|
SqlValueColumnName = "ataxcode.taxapct"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
|
|||||||
@@ -280,8 +280,8 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item.Override == 0)
|
if (item.OverridePct == 0)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].Override");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverridePct");
|
||||||
if (item.OverrideType == ContractOverrideType.NotSet)
|
if (item.OverrideType == ContractOverrideType.NotSet)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverrideType");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverrideType");
|
||||||
}
|
}
|
||||||
@@ -312,8 +312,8 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item.Override == 0)
|
if (item.OverridePct == 0)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].Override");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverridePct");
|
||||||
if (item.OverrideType == ContractOverrideType.NotSet)
|
if (item.OverrideType == ContractOverrideType.NotSet)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverrideType");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverrideType");
|
||||||
}
|
}
|
||||||
@@ -344,8 +344,8 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item.Override == 0)
|
if (item.OverridePct == 0)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].Override");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverridePct");
|
||||||
if (item.OverrideType == ContractOverrideType.NotSet)
|
if (item.OverrideType == ContractOverrideType.NotSet)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverrideType");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverrideType");
|
||||||
}
|
}
|
||||||
@@ -385,8 +385,8 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item.Override == 0)
|
if (item.OverridePct == 0)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].Override");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverridePct");
|
||||||
if (item.OverrideType == ContractOverrideType.NotSet)
|
if (item.OverrideType == ContractOverrideType.NotSet)
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverrideType");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, $"ContractPartOverrideItems[{i}].OverrideType");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,13 +192,13 @@ namespace AyaNova.Biz
|
|||||||
if (tax != null)
|
if (tax != null)
|
||||||
{
|
{
|
||||||
//Tax A is always just tax A percent times net...
|
//Tax A is always just tax A percent times net...
|
||||||
dTaxA = tax.TaxA * dNet;
|
dTaxA = (tax.TaxAPct/100) * dNet;
|
||||||
|
|
||||||
//Tax B on the other hand could be simple or tax on tax...
|
//Tax B on the other hand could be simple or tax on tax...
|
||||||
if (!tax.TaxOnTax)
|
if (!tax.TaxOnTax)
|
||||||
dTaxB = tax.TaxB * dNet;//simple
|
dTaxB = (tax.TaxBPct/100) * dNet;//simple
|
||||||
else
|
else
|
||||||
dTaxB = (dNet + dTaxA) * tax.TaxB;//tax on tax
|
dTaxB = (dNet + dTaxA) * (tax.TaxBPct/100);//tax on tax
|
||||||
}
|
}
|
||||||
//set line total and taxes display values
|
//set line total and taxes display values
|
||||||
item.TaxAViz = dTaxA;
|
item.TaxAViz = dTaxA;
|
||||||
|
|||||||
@@ -215,8 +215,8 @@ namespace AyaNova.Biz
|
|||||||
.AddText(obj.Name)
|
.AddText(obj.Name)
|
||||||
.AddText(obj.Wiki)
|
.AddText(obj.Wiki)
|
||||||
.AddText(obj.Tags)
|
.AddText(obj.Tags)
|
||||||
.AddText(obj.TaxA)
|
.AddText(obj.TaxAPct)
|
||||||
.AddText(obj.TaxB)
|
.AddText(obj.TaxBPct)
|
||||||
.AddCustomFields(obj.CustomFields);
|
.AddCustomFields(obj.CustomFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,8 +236,8 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
if (!isNew)
|
if (!isNew)
|
||||||
if (proposedObj.Name != currentObj.Name
|
if (proposedObj.Name != currentObj.Name
|
||||||
|| proposedObj.TaxA != currentObj.TaxA
|
|| proposedObj.TaxAPct != currentObj.TaxAPct
|
||||||
|| proposedObj.TaxB != currentObj.TaxB
|
|| proposedObj.TaxBPct != currentObj.TaxBPct
|
||||||
|| proposedObj.TaxOnTax != currentObj.TaxOnTax)
|
|| proposedObj.TaxOnTax != currentObj.TaxOnTax)
|
||||||
{
|
{
|
||||||
//MIGRATE_OUTSTANDING - check workorder records once wo is coded here for this tax code in use
|
//MIGRATE_OUTSTANDING - check workorder records once wo is coded here for this tax code in use
|
||||||
|
|||||||
@@ -30,15 +30,15 @@ namespace AyaNova.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public bool ContractTravelRatesOnly { get; set; }
|
public bool ContractTravelRatesOnly { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public decimal PartsOverride { get; set; }
|
public decimal PartsOverridePct { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public ContractOverrideType PartsOverrideType { get; set; }
|
public ContractOverrideType PartsOverrideType { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public decimal ServiceRatesOverride { get; set; }
|
public decimal ServiceRatesOverridePct { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public ContractOverrideType ServiceRatesOverrideType { get; set; }
|
public ContractOverrideType ServiceRatesOverrideType { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public decimal TravelRatesOverride { get; set; }
|
public decimal TravelRatesOverridePct { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public ContractOverrideType TravelRatesOverrideType { get; set; }
|
public ContractOverrideType TravelRatesOverrideType { get; set; }
|
||||||
public string AlertNotes { get; set; }//alert on workorder etc
|
public string AlertNotes { get; set; }//alert on workorder etc
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace AyaNova.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public long ContractId { get; set; }
|
public long ContractId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public decimal Override { get; set; }
|
public decimal OverridePct { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public ContractOverrideType OverrideType { get; set; }
|
public ContractOverrideType OverrideType { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace AyaNova.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public long ContractId { get; set; }
|
public long ContractId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public decimal Override { get; set; }
|
public decimal OverridePct { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public ContractOverrideType OverrideType { get; set; }
|
public ContractOverrideType OverrideType { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace AyaNova.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public long ContractId { get; set; }
|
public long ContractId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public decimal Override { get; set; }
|
public decimal OverridePct { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public ContractOverrideType OverrideType { get; set; }
|
public ContractOverrideType OverrideType { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ namespace AyaNova.Models
|
|||||||
public List<string> Tags { get; set; }
|
public List<string> Tags { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public decimal TaxA { get; set; }
|
public decimal TaxAPct { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public decimal TaxB { get; set; }
|
public decimal TaxBPct { get; set; }
|
||||||
public bool TaxOnTax { get; set; }
|
public bool TaxOnTax { get; set; }
|
||||||
|
|
||||||
public TaxCode()
|
public TaxCode()
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ namespace AyaNova.Util
|
|||||||
|
|
||||||
CURRENCY: DECIMAL(38,18) (to support potential of cryptocurrencies) largest Etherium value fits in this (36bytes)
|
CURRENCY: DECIMAL(38,18) (to support potential of cryptocurrencies) largest Etherium value fits in this (36bytes)
|
||||||
TAX/PERCENTAGES/PDF PAGE SCALE: DECIMAL(8,5) largest tax I could find would fit in this, that's 3 digits to left and 5 to right
|
TAX/PERCENTAGES/PDF PAGE SCALE: DECIMAL(8,5) largest tax I could find would fit in this, that's 3 digits to left and 5 to right
|
||||||
|
Taxes are in face value not fractional value, i.e. "7" not .07 in db
|
||||||
Inventory/incidents general numbers (19,5)
|
Inventory/incidents general numbers (19,5)
|
||||||
Latitude/longitude 9,6
|
Latitude/longitude 9,6
|
||||||
|
|
||||||
@@ -596,7 +597,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
//TAXCODE
|
//TAXCODE
|
||||||
await ExecQueryAsync("CREATE TABLE ataxcode (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, active BOOL NOT NULL, "
|
await ExecQueryAsync("CREATE TABLE ataxcode (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, active BOOL NOT NULL, "
|
||||||
+ "notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, "
|
+ "notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, "
|
||||||
+ "taxa DECIMAL(8,5) NOT NULL default 0, taxb DECIMAL(8,5) NOT NULL default 0, taxontax BOOL NOT NULL default false)");
|
+ "taxapct DECIMAL(8,5) NOT NULL default 0, taxbpct DECIMAL(8,5) NOT NULL default 0, taxontax BOOL NOT NULL default false)");
|
||||||
|
|
||||||
//MEMO
|
//MEMO
|
||||||
await ExecQueryAsync("CREATE TABLE amemo (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL, "
|
await ExecQueryAsync("CREATE TABLE amemo (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL, "
|
||||||
@@ -660,8 +661,8 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
//CONTRACT
|
//CONTRACT
|
||||||
await ExecQueryAsync("CREATE TABLE acontract (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, active BOOL NOT NULL, "
|
await ExecQueryAsync("CREATE TABLE acontract (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, active BOOL NOT NULL, "
|
||||||
+ "notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, "
|
+ "notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, "
|
||||||
+ "responsetime INTERVAL NOT NULL, contractserviceratesonly BOOL NOT NULL, contracttravelratesonly BOOL NOT NULL, partsoverride DECIMAL(8,5) NOT NULL, partsoverridetype INTEGER NOT NULL, "
|
+ "responsetime INTERVAL NOT NULL, contractserviceratesonly BOOL NOT NULL, contracttravelratesonly BOOL NOT NULL, partsoverridepct DECIMAL(8,5) NOT NULL, partsoverridetype INTEGER NOT NULL, "
|
||||||
+ "serviceratesoverride DECIMAL(8,5) NOT NULL, serviceratesoverridetype INTEGER NOT NULL, travelratesoverride DECIMAL(8,5) NOT NULL, travelratesoverridetype INTEGER NOT NULL, "
|
+ "serviceratesoverridepct DECIMAL(8,5) NOT NULL, serviceratesoverridetype INTEGER NOT NULL, travelratesoverridepct DECIMAL(8,5) NOT NULL, travelratesoverridetype INTEGER NOT NULL, "
|
||||||
+ "alertnotes text "
|
+ "alertnotes text "
|
||||||
+ ")");
|
+ ")");
|
||||||
await ExecQueryAsync("ALTER TABLE acustomer ADD column contractid BIGINT NULL REFERENCES acontract");
|
await ExecQueryAsync("ALTER TABLE acustomer ADD column contractid BIGINT NULL REFERENCES acontract");
|
||||||
@@ -678,15 +679,15 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
|
|
||||||
//CONTRACTPARTOVERRIDE
|
//CONTRACTPARTOVERRIDE
|
||||||
await ExecQueryAsync("CREATE TABLE acontractpartoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
await ExecQueryAsync("CREATE TABLE acontractpartoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
||||||
+ " override DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL, tags VARCHAR(255) ARRAY)");
|
+ " overridepct DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL, tags VARCHAR(255) ARRAY)");
|
||||||
|
|
||||||
//CONTRACTSERVICERATEOVERRIDE
|
//CONTRACTSERVICERATEOVERRIDE
|
||||||
await ExecQueryAsync("CREATE TABLE acontractservicerateoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
await ExecQueryAsync("CREATE TABLE acontractservicerateoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
||||||
+ " override DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL, tags VARCHAR(255) ARRAY)");
|
+ " overridepct DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL, tags VARCHAR(255) ARRAY)");
|
||||||
|
|
||||||
//CONTRACTTRAVELRATEOVERRIDE
|
//CONTRACTTRAVELRATEOVERRIDE
|
||||||
await ExecQueryAsync("CREATE TABLE acontracttravelrateoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
await ExecQueryAsync("CREATE TABLE acontracttravelrateoverride (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, contractid BIGINT NOT NULL REFERENCES acontract ON DELETE CASCADE, "
|
||||||
+ " override DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL, tags VARCHAR(255) ARRAY)");
|
+ " overridepct DECIMAL(8,5) NOT NULL, overridetype INTEGER NOT NULL, tags VARCHAR(255) ARRAY)");
|
||||||
|
|
||||||
|
|
||||||
//HEADOFFICE
|
//HEADOFFICE
|
||||||
|
|||||||
@@ -571,20 +571,20 @@ namespace AyaNova.Util
|
|||||||
c.Active = true;
|
c.Active = true;
|
||||||
c.Notes = "These are notes providing additional information when users view the contract";
|
c.Notes = "These are notes providing additional information when users view the contract";
|
||||||
c.AlertNotes = "These are alert notes displayed on workorders about this contract";
|
c.AlertNotes = "These are alert notes displayed on workorders about this contract";
|
||||||
c.PartsOverride = .05m;
|
c.PartsOverridePct = 5m;
|
||||||
c.PartsOverrideType = ContractOverrideType.PriceDiscount;
|
c.PartsOverrideType = ContractOverrideType.PriceDiscount;
|
||||||
c.ServiceRatesOverride = 0m;
|
c.ServiceRatesOverridePct = 0m;
|
||||||
c.ServiceRatesOverrideType = ContractOverrideType.PriceDiscount;
|
c.ServiceRatesOverrideType = ContractOverrideType.PriceDiscount;
|
||||||
c.TravelRatesOverride = 0;
|
c.TravelRatesOverridePct = 0;
|
||||||
c.TravelRatesOverrideType = ContractOverrideType.PriceDiscount;
|
c.TravelRatesOverrideType = ContractOverrideType.PriceDiscount;
|
||||||
c.ResponseTime = TimeSpan.Zero;
|
c.ResponseTime = TimeSpan.Zero;
|
||||||
c.ContractServiceRatesOnly = true;
|
c.ContractServiceRatesOnly = true;
|
||||||
c.ServiceRateItems.Add(new ContractServiceRate() { ServiceRateId = 1 });
|
c.ServiceRateItems.Add(new ContractServiceRate() { ServiceRateId = 1 });
|
||||||
c.ContractTravelRatesOnly = true;
|
c.ContractTravelRatesOnly = true;
|
||||||
c.TravelRateItems.Add(new ContractTravelRate() { TravelRateId = 1 });
|
c.TravelRateItems.Add(new ContractTravelRate() { TravelRateId = 1 });
|
||||||
c.ContractServiceRateOverrideItems.Add(new ContractServiceRateOverride() { Tags = new string[] { "blue" }.ToList(), Override = .05m, OverrideType = ContractOverrideType.PriceDiscount });
|
c.ContractServiceRateOverrideItems.Add(new ContractServiceRateOverride() { Tags = new string[] { "blue" }.ToList(), OverridePct = 5m, OverrideType = ContractOverrideType.PriceDiscount });
|
||||||
c.ContractTravelRateOverrideItems.Add(new ContractTravelRateOverride() { Tags = new string[] { "blue" }.ToList(), Override = .05m, OverrideType = ContractOverrideType.PriceDiscount });
|
c.ContractTravelRateOverrideItems.Add(new ContractTravelRateOverride() { Tags = new string[] { "blue" }.ToList(), OverridePct = 5m, OverrideType = ContractOverrideType.PriceDiscount });
|
||||||
c.ContractPartOverrideItems.Add(new ContractPartOverride() { Tags = new string[] { "blue" }.ToList(), Override = .01m, OverrideType = ContractOverrideType.PriceDiscount });
|
c.ContractPartOverrideItems.Add(new ContractPartOverride() { Tags = new string[] { "blue" }.ToList(), OverridePct = 10m, OverrideType = ContractOverrideType.PriceDiscount });
|
||||||
|
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
@@ -606,20 +606,20 @@ namespace AyaNova.Util
|
|||||||
c.Active = true;
|
c.Active = true;
|
||||||
c.Notes = "These are notes providing additional information when users view the contract";
|
c.Notes = "These are notes providing additional information when users view the contract";
|
||||||
c.AlertNotes = "These are alert notes displayed on workorders about this contract";
|
c.AlertNotes = "These are alert notes displayed on workorders about this contract";
|
||||||
c.PartsOverride = .1m;
|
c.PartsOverridePct = .1m;
|
||||||
c.PartsOverrideType = ContractOverrideType.PriceDiscount;
|
c.PartsOverrideType = ContractOverrideType.PriceDiscount;
|
||||||
c.ServiceRatesOverride = 0m;
|
c.ServiceRatesOverridePct = 0m;
|
||||||
c.ServiceRatesOverrideType = ContractOverrideType.PriceDiscount;
|
c.ServiceRatesOverrideType = ContractOverrideType.PriceDiscount;
|
||||||
c.TravelRatesOverride = 0;
|
c.TravelRatesOverridePct = 0;
|
||||||
c.TravelRatesOverrideType = ContractOverrideType.PriceDiscount;
|
c.TravelRatesOverrideType = ContractOverrideType.PriceDiscount;
|
||||||
c.ResponseTime = TimeSpan.Zero;
|
c.ResponseTime = TimeSpan.Zero;
|
||||||
c.ContractServiceRatesOnly = true;
|
c.ContractServiceRatesOnly = true;
|
||||||
c.ServiceRateItems.Add(new ContractServiceRate() { ServiceRateId = 2 });
|
c.ServiceRateItems.Add(new ContractServiceRate() { ServiceRateId = 2 });
|
||||||
c.ContractTravelRatesOnly = true;
|
c.ContractTravelRatesOnly = true;
|
||||||
c.TravelRateItems.Add(new ContractTravelRate() { TravelRateId = 2 });
|
c.TravelRateItems.Add(new ContractTravelRate() { TravelRateId = 2 });
|
||||||
c.ContractServiceRateOverrideItems.Add(new ContractServiceRateOverride() { Tags = new string[] { "red" }.ToList(), Override = .1m, OverrideType = ContractOverrideType.PriceDiscount });
|
c.ContractServiceRateOverrideItems.Add(new ContractServiceRateOverride() { Tags = new string[] { "red" }.ToList(), OverridePct = 10m, OverrideType = ContractOverrideType.PriceDiscount });
|
||||||
c.ContractTravelRateOverrideItems.Add(new ContractTravelRateOverride() { Tags = new string[] { "red" }.ToList(), Override = .1m, OverrideType = ContractOverrideType.PriceDiscount });
|
c.ContractTravelRateOverrideItems.Add(new ContractTravelRateOverride() { Tags = new string[] { "red" }.ToList(), OverridePct = 10m, OverrideType = ContractOverrideType.PriceDiscount });
|
||||||
c.ContractPartOverrideItems.Add(new ContractPartOverride() { Tags = new string[] { "red" }.ToList(), Override = .05m, OverrideType = ContractOverrideType.PriceDiscount });
|
c.ContractPartOverrideItems.Add(new ContractPartOverride() { Tags = new string[] { "red" }.ToList(), OverridePct = 5m, OverrideType = ContractOverrideType.PriceDiscount });
|
||||||
|
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
@@ -641,20 +641,20 @@ namespace AyaNova.Util
|
|||||||
c.Active = true;
|
c.Active = true;
|
||||||
c.Notes = "These are notes providing additional information when users view the contract";
|
c.Notes = "These are notes providing additional information when users view the contract";
|
||||||
c.AlertNotes = "These are alert notes displayed on workorders about this contract";
|
c.AlertNotes = "These are alert notes displayed on workorders about this contract";
|
||||||
c.PartsOverride = .2m;
|
c.PartsOverridePct = .2m;
|
||||||
c.PartsOverrideType = ContractOverrideType.PriceDiscount;
|
c.PartsOverrideType = ContractOverrideType.PriceDiscount;
|
||||||
c.ServiceRatesOverride = .2m;
|
c.ServiceRatesOverridePct = .2m;
|
||||||
c.ServiceRatesOverrideType = ContractOverrideType.PriceDiscount;
|
c.ServiceRatesOverrideType = ContractOverrideType.PriceDiscount;
|
||||||
c.TravelRatesOverride = .2m;
|
c.TravelRatesOverridePct = .2m;
|
||||||
c.TravelRatesOverrideType = ContractOverrideType.PriceDiscount;
|
c.TravelRatesOverrideType = ContractOverrideType.PriceDiscount;
|
||||||
c.ResponseTime = new TimeSpan(24, 0, 0);//24 hour response time
|
c.ResponseTime = new TimeSpan(24, 0, 0);//24 hour response time
|
||||||
c.ContractServiceRatesOnly = false;
|
c.ContractServiceRatesOnly = false;
|
||||||
c.ServiceRateItems.Add(new ContractServiceRate() { ServiceRateId = 3 });
|
c.ServiceRateItems.Add(new ContractServiceRate() { ServiceRateId = 3 });
|
||||||
c.ContractTravelRatesOnly = false;
|
c.ContractTravelRatesOnly = false;
|
||||||
c.TravelRateItems.Add(new ContractTravelRate() { TravelRateId = 3 });
|
c.TravelRateItems.Add(new ContractTravelRate() { TravelRateId = 3 });
|
||||||
c.ContractServiceRateOverrideItems.Add(new ContractServiceRateOverride() { Tags = new string[] { "green" }.ToList(), Override = .1m, OverrideType = ContractOverrideType.PriceDiscount });
|
c.ContractServiceRateOverrideItems.Add(new ContractServiceRateOverride() { Tags = new string[] { "green" }.ToList(), OverridePct = 10m, OverrideType = ContractOverrideType.PriceDiscount });
|
||||||
c.ContractTravelRateOverrideItems.Add(new ContractTravelRateOverride() { Tags = new string[] { "green" }.ToList(), Override = .1m, OverrideType = ContractOverrideType.PriceDiscount });
|
c.ContractTravelRateOverrideItems.Add(new ContractTravelRateOverride() { Tags = new string[] { "green" }.ToList(), OverridePct = 10m, OverrideType = ContractOverrideType.PriceDiscount });
|
||||||
c.ContractPartOverrideItems.Add(new ContractPartOverride() { Tags = new string[] { "green" }.ToList(), Override = .1m, OverrideType = ContractOverrideType.PriceDiscount });
|
c.ContractPartOverrideItems.Add(new ContractPartOverride() { Tags = new string[] { "green" }.ToList(), OverridePct = 10m, OverrideType = ContractOverrideType.PriceDiscount });
|
||||||
|
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
@@ -849,8 +849,8 @@ namespace AyaNova.Util
|
|||||||
tc.Notes = "Example sales only tax";
|
tc.Notes = "Example sales only tax";
|
||||||
tc.Active = true;
|
tc.Active = true;
|
||||||
tc.Tags = RandomTags();
|
tc.Tags = RandomTags();
|
||||||
tc.TaxA = 0;
|
tc.TaxAPct = 0;
|
||||||
tc.TaxB = 0.07m;
|
tc.TaxBPct = 7m;
|
||||||
tc.TaxOnTax = false;
|
tc.TaxOnTax = false;
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
@@ -872,8 +872,8 @@ namespace AyaNova.Util
|
|||||||
tc.Active = true;
|
tc.Active = true;
|
||||||
tc.Notes = "Example goods only tax";
|
tc.Notes = "Example goods only tax";
|
||||||
tc.Tags = RandomTags();
|
tc.Tags = RandomTags();
|
||||||
tc.TaxB = 0;
|
tc.TaxBPct = 0;
|
||||||
tc.TaxA = 0.07m;
|
tc.TaxAPct = 7m;
|
||||||
tc.TaxOnTax = false;
|
tc.TaxOnTax = false;
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
@@ -895,8 +895,8 @@ namespace AyaNova.Util
|
|||||||
tc.Active = true;
|
tc.Active = true;
|
||||||
tc.Notes = "Example sales and goods tax";
|
tc.Notes = "Example sales and goods tax";
|
||||||
tc.Tags = RandomTags();
|
tc.Tags = RandomTags();
|
||||||
tc.TaxA = 0.07m;
|
tc.TaxAPct = 7m;
|
||||||
tc.TaxB = 0.07m;
|
tc.TaxBPct = 7m;
|
||||||
tc.TaxOnTax = false;
|
tc.TaxOnTax = false;
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user