public override string ToString() { return($"TAX: {(int)(100 * TaxPercent)}%, TAX VAL: {BosUtils.GetCurrencyString(TaxValue.ToCurrencyNumber())}, REMAIN VAL: {BosUtils.GetCurrencyString(RemainValue.ToCurrencyNumber())}"); }
public TaxValueViewModel(TaxCategory[] allAvailableTaxCategories, JurisdictionGroup[] allAvailableJurisdictionGroups, TaxValue item) { AllAvailableTaxCategories = allAvailableTaxCategories; AllAvailableJurisdictionGroups = allAvailableJurisdictionGroups; InnerItem = item; InnerItem.PropertyChanged += InnerItem_PropertyChanged; }
public Tax(TaxType type, TaxValue value) { this.type = type; this.value = value; }
protected void Page_Load(object sender, EventArgs e) { if (EmptyCheck || Order == null) { return; } _currency = (Order.OrderCurrency ?? CurrencyService.Currency("USD")) ?? new Currency { IsCodeBefore = true, Iso3 = "USD", Name = "USD", PriceFormat = CurrencyService.DefaultPriceFormat, Symbol = "$", Value = 1 }; //var check = new Check_PaymentModule(); lCompanyName.Text = _Check.CompanyName; lAddress.Text = _Check.Adress; lCountry.Text = _Check.Country; lState.Text = _Check.State; lCity.Text = _Check.City; lCompanyPhone.Text = _Check.Phone; lInterPhone.Text = _Check.IntPhone; lCompanyFax.Text = _Check.Fax; lOrderDate.Text = AdvantShop.Localization.Culture.ConvertDate(Order.OrderDate); // AdvantShop.Localization.Culture.ConvertDate((DateTime)reader["OrderDate"]); lOrderId.Text = @"#" + Order.OrderID; lShippingMethod.Text = Order.ShippingMethodName; // reader["ShippingMethod"].ToString(); lName.Text = Order.BillingContact.Name; lPhone.Text = Order.OrderCustomer.MobilePhone; //lFax.Text = Order.BillingContact.Fax; //lEmail.Text = Order.BillingContact.Email; lEmail.Text = Order.OrderCustomer.Email; lBillingAddress.Text = Order.BillingContact.Address; lBillingCity.Text = Order.BillingContact.City; lBillingState.Text = Order.BillingContact.Zone; lBillingCountry.Text = Order.BillingContact.Country; lBillingZip.Text = Order.BillingContact.Zip; lShippingAddress.Text = Order.ShippingContact.Address; lShippingCity.Text = Order.ShippingContact.City; lShippingState.Text = Order.ShippingContact.Zone; lShippingCountry.Text = Order.ShippingContact.Country; lShippingZip.Text = Order.ShippingContact.Zip; lSubTotal.Text = EvalPrice((Order.Sum - Order.ShippingCost) * 100.0M / (100 - Order.OrderDiscount)); lShippingCost.Text = EvalPrice(Order.ShippingCost); lDiscount.Text = EvalPrice(Order.OrderDiscount * (Order.Sum - Order.ShippingCost / (100 - Order.OrderDiscount))); var shippingContact = new AdvantShop.Customers.CustomerContact { CountryId = CountryService.GetCountryIdByName(lShippingCountry.Text), RegionId = RegionService.GetRegionIdByName(lShippingState.Text) }; var billingContact = new AdvantShop.Customers.CustomerContact { CountryId = CountryService.GetCountryIdByName(lBillingCountry.Text), RegionId = RegionService.GetRegionIdByName(lBillingState.Text) }; rptOrderItems.DataBind(); IList <OrderItem> dtOrder = Order.OrderItems; var taxedItems = new List <TaxValue>(); foreach (OrderItem item in dtOrder) { ICollection <TaxElement> t = TaxServices.GetTaxesForProduct(item.EntityId, billingContact, shippingContact); foreach (TaxElement tax in t) { TaxValue taxedItem = taxedItems.Find(tv => tv.TaxID == tax.TaxId); if (taxedItem != null) { taxedItem.TaxSum += TaxServices.CalculateTax(item, tax); } else { taxedItems.Add(new TaxValue { TaxID = tax.TaxId, TaxName = tax.Name, TaxShowInPrice = tax.ShowInPrice, TaxSum = TaxServices.CalculateTax(item, tax) }); } } } literalTaxCost.Text = BuildTaxTable(taxedItems, _currency.Value, _currency.Iso3, Resource.Admin_ViewOrder_Taxes); lTotal.Text = EvalPrice(Order.Sum); }