public void BookingOutNetworkFlatAndPercentFeeAdd() { var customer = CUSTOMER; customer.OutNetworkFlatFee = 10m; customer.OutNetworkPercentFee = .10m; customer.OutNetworkFeeAdd = true; var load = LOAD; load.Scac = "EFGH"; var svc = new LoadshopFeeService(); svc.ApplyLoadshopFee(null, load, new List <CustomerEntity> { customer }); load.LineHaulRate.Should().Be(100m); load.FeeData.Should().BeEquivalentTo(new LoadshopFeeData { LoadshopFlatFee = 10m, LoadshopPercentFee = .10m, LoadshopFee = 20.5m, LoadshopFeeAdd = true }); }
public void UnbookedInNetworkPercentFeeSubtract() { var customer = CUSTOMER; customer.InNetworkPercentFee = .10m; var load = LOAD; var svc = new LoadshopFeeService(); svc.ApplyLoadshopFee(SCAC, load, new List <CustomerEntity> { customer }); load.LineHaulRate.Should().Be(89.5m); load.FeeData.Should().BeEquivalentTo(new LoadshopFeeData { LoadshopPercentFee = .10m, LoadshopFee = 10.5m }); }
public void UnbookedOutNetworkFlatFeeSubtract() { var customer = CUSTOMER; customer.OutNetworkFlatFee = 10m; var load = LOAD; var svc = new LoadshopFeeService(); svc.ApplyLoadshopFee("EFGH", load, new List <CustomerEntity> { customer }); load.LineHaulRate.Should().Be(90m); load.FeeData.Should().BeEquivalentTo(new LoadshopFeeData { LoadshopFlatFee = 10m, LoadshopFee = 10m }); }
public void BookingInNetworkFlatFeeSubtract() { var customer = CUSTOMER; customer.InNetworkFlatFee = 10m; var load = LOAD; load.Scac = SCAC; var svc = new LoadshopFeeService(); svc.ApplyLoadshopFee(null, load, new List <CustomerEntity> { customer }); load.LineHaulRate.Should().Be(90m); load.FeeData.Should().BeEquivalentTo(new LoadshopFeeData { LoadshopFlatFee = 10m, LoadshopFee = 10m }); }
public void UnbookedInNetworkFlatFeeAdd() { var customer = CUSTOMER; customer.InNetworkFlatFee = 10m; customer.InNetworkFeeAdd = true; var load = LOAD; var svc = new LoadshopFeeService(); svc.ApplyLoadshopFee(SCAC, load, new List <CustomerEntity> { customer }); load.LineHaulRate.Should().Be(100m); load.FeeData.Should().BeEquivalentTo(new LoadshopFeeData { LoadshopFlatFee = 10m, LoadshopFee = 10m, LoadshopFeeAdd = true }); }