public QuoteLineItem() { this.item = new Item(); this.job = new Job(); this.lineitemTax = new ItemTaxesType(); this.lineitemAccount = new ChartOfAccount(); this.quote = new Quote(); this.priceLevel = new PriceLevel(); }
public override bool Equals(object obj) { PriceLevel level = obj as PriceLevel; if (level == null) { return(false); } return(this.id == level.id); }
public SaleOrderlineItem() { this.item = new Item(); this.job = new Job(); this.lineitemTax = new ItemTaxesType(); this.lineitemAccount = new ChartOfAccount(); this.saleorder = new SaleOrder(); this.priceLevel = new PriceLevel(); this.FrameColor = new AttributeLineItem(); }
public SaleInvoiceLineItem(SaleInLineItemType lineItemType) { this.saleInvoiceLineItemType = lineItemType; this.item = new Item(); this.job = new Job(); this.lineitemTax = new ItemTaxesType(); this.lineitemAccount = new ChartOfAccount(); this.priceLevel = new PriceLevel(); this.saleInvoice = new SaleInvoice(); this.usedPriceLevel = new PriceLevel(); this.FrameColor = new AttributeLineItem(); }
public Customer() { this.priceLevel = new PriceLevel(); this.billtoAddress = new Address(); this.shiptoAddresses = new List <ShipAddress>(); this.customerDefault = new CustomerDefault(); this.saletaxCode = new SalesTaxCode(); this.saleRep = new SalesPerson(); this.shipVia = new ShipVia(); this.term = new Term(); this.Contacts = new List <Contact>(); }
public PriceLevel ConvertfromPTpriceCalc(PriceLevel prlvl) { string str = ""; if (prlvl.calculationText == "NC") { prlvl.calculationText = "No Calculation"; prlvl.addSubLevel = 0; prlvl.addSubValue = 0M; if (prlvl.id > 1) { prlvl.useLevel = 3; return(prlvl); } prlvl.useLevel = 2; return(prlvl); } if (prlvl.calculationText.StartsWith("PL1")) { str = "Price Level 1 " + prlvl.calculationText.Substring(3, 1) + " "; prlvl.useLevel = 0; if (str.Trim().EndsWith("+")) { prlvl.addSubLevel = 1; prlvl.addSubValue = Convert.ToDecimal(prlvl.calculationText.Substring(4)); prlvl.calculationText = str + prlvl.addSubValue.ToString("0.00"); return(prlvl); } if (str.Trim().EndsWith("-")) { prlvl.addSubLevel = 3; prlvl.addSubValue = Convert.ToDecimal(prlvl.calculationText.Substring(4)); prlvl.calculationText = str + prlvl.addSubValue.ToString("0.00"); return(prlvl); } if (str.Trim().EndsWith("*")) { if (Convert.ToDecimal(prlvl.calculationText.Substring(4)) >= 1M) { prlvl.addSubLevel = 0; prlvl.addSubValue = (100M * Convert.ToDecimal(prlvl.calculationText.Substring(4))) - 100M; prlvl.calculationText = str + Convert.ToDecimal(prlvl.calculationText.Substring(4)).ToString("0.00"); return(prlvl); } prlvl.addSubLevel = 2; prlvl.addSubValue = 100M - (100M * Convert.ToDecimal(prlvl.calculationText.Substring(4))); prlvl.calculationText = str + Convert.ToDecimal(prlvl.calculationText.Substring(4)).ToString("0.00"); } return(prlvl); } if (prlvl.calculationText.StartsWith("LC")) { str = "Last Cost " + prlvl.calculationText.Substring(2, 1) + " "; if (prlvl.id > 1) { prlvl.useLevel = 3; } else { prlvl.useLevel = 2; } if (str.Trim().EndsWith("+")) { prlvl.addSubLevel = 1; prlvl.addSubValue = Convert.ToDecimal(prlvl.calculationText.Substring(3)); prlvl.calculationText = str + prlvl.addSubValue.ToString("0.00"); return(prlvl); } if (str.Trim().EndsWith("-")) { prlvl.addSubLevel = 3; prlvl.addSubValue = Convert.ToDecimal(prlvl.calculationText.Substring(3)); prlvl.calculationText = str + prlvl.addSubValue.ToString("0.00"); return(prlvl); } if (!str.Trim().EndsWith("*")) { return(prlvl); } if (Convert.ToDecimal(prlvl.calculationText.Substring(3)) >= 1M) { prlvl.addSubLevel = 0; prlvl.addSubValue = Convert.ToDecimal(prlvl.calculationText.Substring(3)); prlvl.calculationText = str + prlvl.addSubValue.ToString("0.00"); return(prlvl); } prlvl.addSubLevel = 2; prlvl.addSubValue = Convert.ToDecimal(prlvl.calculationText.Substring(3)); prlvl.calculationText = str + prlvl.addSubValue.ToString("0.00"); } return(prlvl); }