This commit is contained in:
2021-05-27 19:26:07 +00:00
parent c1d63d495d
commit 914c22d89f
4 changed files with 53 additions and 10 deletions

View File

@@ -1355,8 +1355,8 @@ namespace AyaNova.Util
tc.Notes = "Example sales only tax";
tc.Active = true;
tc.Tags = RandomTags();
tc.TaxAPct = 0;
tc.TaxBPct = 7m;
tc.TaxAPct = 5m;
tc.TaxBPct = 0m;
tc.TaxOnTax = false;
using (AyContext ct = ServiceProviderProvider.DBContext)
{
@@ -1378,8 +1378,9 @@ namespace AyaNova.Util
tc.Active = true;
tc.Notes = "Example goods only tax";
tc.Tags = RandomTags();
tc.TaxBPct = 0;
tc.TaxAPct = 7m;
tc.TaxBPct = 0;
tc.TaxOnTax = false;
using (AyContext ct = ServiceProviderProvider.DBContext)
{
@@ -1401,7 +1402,7 @@ namespace AyaNova.Util
tc.Active = true;
tc.Notes = "Example sales and goods tax";
tc.Tags = RandomTags();
tc.TaxAPct = 7m;
tc.TaxAPct = 5m;
tc.TaxBPct = 7m;
tc.TaxOnTax = false;
using (AyContext ct = ServiceProviderProvider.DBContext)
@@ -2577,7 +2578,7 @@ namespace AyaNova.Util
};
woItem.Units.Add(woItemUnit);
woItemUnit = new WorkOrderItemUnit()
woItemUnit = new WorkOrderItemUnit()
{
UnitId = Fake.Random.Long(1, TotalSeededUnits),
Notes = Fake.Lorem.Sentence()
@@ -2799,6 +2800,48 @@ namespace AyaNova.Util
woItem.Expenses.Add(woItemExpense);
//OUTSIDE SERVICES
var ShippingCost = Fake.Random.Decimal(5, 20);
var RepairCost = Fake.Random.Decimal(50, 1000);
var woItemOutsideService = new WorkOrderItemOutsideService()
{
UnitId = Fake.Random.Long(1, TotalSeededUnits),
Notes = Fake.Lorem.Sentence(),
VendorSentToId = Fake.Random.Long(1, TotalSeededVendors),
VendorSentViaId = Fake.Random.Long(1, TotalSeededVendors),
RMANumber = "RMA" + Fake.Finance.Account(6),
TrackingNumber = "TR" + Fake.Finance.Account(8),
RepairCost = RepairCost,
RepairPrice = RepairCost * 1.5m,
ShippingCost = ShippingCost,
ShippingPrice = ShippingCost * 1.5m,
SentDate = woDate,
ETADate = woDate.AddDays(7),
ReturnDate = woDate.AddDays(8),
TaxCodeId = 1
};
woItem.OutsideServices.Add(woItemOutsideService);
ShippingCost = Fake.Random.Decimal(5, 20);
RepairCost = Fake.Random.Decimal(50, 1000);
woItemOutsideService = new WorkOrderItemOutsideService()
{
UnitId = Fake.Random.Long(1, TotalSeededUnits),
Notes = Fake.Lorem.Sentence(),
VendorSentToId = Fake.Random.Long(1, TotalSeededVendors),
VendorSentViaId = Fake.Random.Long(1, TotalSeededVendors),
RMANumber = "RMA" + Fake.Finance.Account(6),
TrackingNumber = "TR" + Fake.Finance.Account(8),
RepairCost = RepairCost,
RepairPrice = RepairCost * 1.5m,
ShippingCost = ShippingCost,
ShippingPrice = ShippingCost * 1.5m,
SentDate = woDate,
ETADate = woDate.AddDays(7),
ReturnDate = woDate.AddDays(8),
TaxCodeId = 1
};
woItem.OutsideServices.Add(woItemOutsideService);
o.Items.Add(woItem);
}