public List <String> FormatTotals(ISalesDocument document) { int currentLine = GetCurrentLine(6); FormatLine(new Location(productNameLocation.X, CurrentPage.PageLines.Count + 1), String.Empty); FormatLine(new Location(productNameLocation.X, CurrentPage.PageLines.Count + 1), PosMessage.TAX_BOLD); FormatLine(new Location(productAmountLocation.X - maxAmountWidth - 2, CurrentPage.PageLines.Count), String.Format("²{0," + maxAmountWidth + "}³", "*" + new Number(document.TotalVAT).ToString("C"))); FormatLine(new Location(productNameLocation.X, CurrentPage.PageLines.Count + 1), PosMessage.SHORT_TOTAL_BOLD); FormatLine(new Location(productAmountLocation.X - maxAmountWidth - 2, CurrentPage.PageLines.Count), String.Format("²{0," + maxAmountWidth + "}³", "*" + new Number(document.TotalAmount).ToString("C"))); FormatLine(new Location(productNameLocation.X, CurrentPage.PageLines.Count + 1), String.Empty); String[] inWords = WordConversion.ConvertLetter(document.TotalAmount).Split(new char[] { '\n' }); //Empty entries!! TODO CF for (int i = 0; i < inWords.Length; i++) { FormatLine(new Location(productNameLocation.X, CurrentPage.PageLines.Count + 1), inWords[i]); } FormatLine(new Location(productNameLocation.X, CurrentPage.PageLines.Count + 1), String.Empty); return(CurrentPage.PageLines.GetRange(currentLine, CurrentPage.PageLines.Count - currentLine)); }
public static List <String> FormatTotals(decimal TotalAmount, decimal VATTotal) { currentLines = new List <string>(); FormatLine(new Location(productNameLocation.X, currentLines.Count + 1), String.Empty); FormatLine(new Location(productNameLocation.X, currentLines.Count + 1), PosMessage.TOTALTAX); FormatLine(new Location(productAmountLocation.X - maxAmountWidth, currentLines.Count), String.Format("{0," + maxAmountWidth + "}", "*" + new Number(VATTotal).ToString("C"))); FormatLine(new Location(productNameLocation.X, currentLines.Count + 1), PosMessage.TOTAL); FormatLine(new Location(productAmountLocation.X - maxAmountWidth, currentLines.Count), String.Format("{0," + maxAmountWidth + "}", "*" + new Number(TotalAmount).ToString("C"))); FormatLine(new Location(productNameLocation.X, currentLines.Count + 1), String.Empty); String[] inWords = WordConversion.ConvertLetter(TotalAmount).Split(new char[] { '\n' }); //Empty entries!! TODO CF for (int i = 0; i < inWords.Length; i++) { FormatLine(new Location(productNameLocation.X, currentLines.Count + 1), inWords[i]); } FormatLine(new Location(productNameLocation.X, currentLines.Count + 1), String.Empty); return(currentLines); }