private void SetOutTheDoorItems() { if (OutTheDoorPrice <= 0) { return; } var calc = new OutTheDoorCalculator(); calc.BackgroundCheckFee = GetBackgroundCheckFee(); calc.RetailItems = CDS.ActiveRetail.RetailItems; calc.SalesTaxInfo = SalesTaxInfo; calc.ShippingAndHandlingCost = _shippinAndHandling; calc.Calculate(OutTheDoorPrice); _outTheDoorSubTotal = calc.GetCalculatedTotalNegotiatedPrice(); if (calc.HasItemWithNegotiatedPriceGreaterThanRetail) { MessageBox.Show("Discounted Price cannot be greater than Retail price for any of the items."); RaiseEnableDisableSaleAndLayaway(false); return; } else { RaiseEnableDisableSaleAndLayaway(true); } PublishUserControls(); CalculateAllTotals(); OutTheDoorPrice = 0.0m; }
public void Setup() { Calculator = new OutTheDoorCalculator(); RetailItems = new List <RetailItem>(); SalesTaxInfo = new SalesTaxInfo(); }