public string PrintOut() { StringBuilder str = new StringBuilder(); // str.AppendLine(new string('-', 35)); foreach (var p in productList) { string row = string.Format("{0} {1} {2}" , p.Quantity , ((p.IsImported) ? "Imported " : string.Empty) + p.Name, Formater.Decimal2Digit(p.GetPriceWithTax()) ); str.AppendLine(row); } str.AppendLine(new string('-', 5)); str.AppendFormat("Sales Tax: {0}\n", totalTax); str.AppendFormat("Total: {0}\n", totalAmount); str.AppendLine(new string('=', 35)); return(str.ToString()); }
public string PrintOut() { StringBuilder str = new StringBuilder(); foreach (var p in productList) { string row = string.Format("{0} {1} {2}" , p.Quantity , ((p.IsImported) ? "Imported " : string.Empty) + p.Name, Formater.Decimal2Digit(p.Price) ); str.AppendLine(row); } str.AppendLine(new string('*', 35)); return(str.ToString()); }
private double CalcImportDutyTax(double pPrice) { double tax = pPrice * Taxes.ImportDutyTax; return(Formater.Round005(tax)); }
private double CalcBaseTax(double pPrice, double pTax) { double tax = pPrice * pTax; return(Formater.Round005(tax)); }