Show price and item on the same line instead of a new line
To use less printer paper when printing, there could be an option to print not have to print Qty x Price in a new line.
Instead of:
ProductName
2 x 5.00 (-XX%) 10.00
Do:
2 ProductName (-XX%) 10.00
or 2 ProductName (Qty x UnitPrice -XX%) 9.00
(In code:)
for each item{
// variables set
if (sameLine)
{
string line;
if (discount) {
string discountValue = orderItemDiscountValue
string discountText = (DiscountType == null) ? (discountValue + "%") : orderItemDiscountValue
line = $"{quantity} {productName} ({pricePerUnit} -{discountText}) {total}";
} else {
line = $"{quantity} {productName} {pricePerUnit} {total}";
}
stringBuilder.AppendLine(line);
} else {
// Old code
}
}
Please sign in to leave a comment.
Comments
2 comments