Class CustomReceiptFormatter
Inheritance
System.Object
CustomReceiptFormatter
Implements
Namespace: SIX.TimApi.Receipts
Assembly: TimApi.dll
Syntax
public class CustomReceiptFormatter : object, ReceiptFormatter
Fields
EmptyValueString
Declaration
public String EmptyValueString
Field Value
Type | Description |
---|---|
String |
Methods
filterRecipient(ReceiptItems, Recipient)
Declaration
protected List<ReceiptItem> filterRecipient(ReceiptItems receiptItems, Recipient recipient)
Parameters
Type | Name | Description |
---|---|---|
ReceiptItems | receiptItems | |
Recipient | recipient |
Returns
Type | Description |
---|---|
List<ReceiptItem> |
formatReceipt(Terminal, ReceiptItems)
Declaration
public List<Receipt> formatReceipt(Terminal terminal, ReceiptItems receiptItems)
Parameters
Type | Name | Description |
---|---|---|
Terminal | terminal | |
ReceiptItems | receiptItems |
Returns
Type | Description |
---|---|
List<Receipt> |
formatReceiptAddLine(StringBuilder, Terminal, Int32, List<PrintFlag>, CustomReceiptFormatter.LineFormat, List<ReceiptItem>, ReceiptType)
Declaration
protected void formatReceiptAddLine(StringBuilder builder, Terminal terminal, int width, List<PrintFlag> flags, CustomReceiptFormatter.LineFormat lineFormat, List<ReceiptItem> receiptItems, ReceiptType receiptType)
Parameters
Type | Name | Description |
---|---|---|
StringBuilder | builder | |
Terminal | terminal | |
System.Int32 | width | |
List<PrintFlag> | flags | |
CustomReceiptFormatter.LineFormat | lineFormat | |
List<ReceiptItem> | receiptItems | |
ReceiptType | receiptType |
formatReceiptAddLine(StringBuilder, Int32, String, String, String, Char)
Declaration
protected void formatReceiptAddLine(StringBuilder builder, int width, String left, String center, String right, Char paddingChar)
Parameters
Type | Name | Description |
---|---|---|
StringBuilder | builder | |
System.Int32 | width | |
String | left | |
String | center | |
String | right | |
Char | paddingChar |
formatReceiptText(StringBuilder, Terminal, Int32, List<PrintFlag>, List<ReceiptItem>, ReceiptType, List<CustomReceiptFormatter.LineFormat>)
Declaration
protected void formatReceiptText(StringBuilder builder, Terminal terminal, int width, List<PrintFlag> flags, List<ReceiptItem> receiptItems, ReceiptType receiptType, List<CustomReceiptFormatter.LineFormat> lineFormats)
Parameters
Type | Name | Description |
---|---|---|
StringBuilder | builder | |
Terminal | terminal | |
System.Int32 | width | |
List<PrintFlag> | flags | |
List<ReceiptItem> | receiptItems | |
ReceiptType | receiptType | |
List<CustomReceiptFormatter.LineFormat> | lineFormats |
getPrintOption(Terminal, Recipient)
Declaration
protected PrintOption getPrintOption(Terminal terminal, Recipient recipient)
Parameters
Type | Name | Description |
---|---|---|
Terminal | terminal | |
Recipient | recipient |
Returns
Type | Description |
---|---|
PrintOption |
hasField(List<ReceiptItem>, ReceiptItemType)
Declaration
protected bool hasField(List<ReceiptItem> receiptItems, ReceiptItemType field)
Parameters
Type | Name | Description |
---|---|---|
List<ReceiptItem> | receiptItems | |
ReceiptItemType | field |
Returns
Type | Description |
---|---|
System.Boolean |
hasReceiptItemType(List<ReceiptItem>, ReceiptItemType)
Declaration
protected bool hasReceiptItemType(List<ReceiptItem> receiptItems, ReceiptItemType type)
Parameters
Type | Name | Description |
---|---|---|
List<ReceiptItem> | receiptItems | |
ReceiptItemType | type |
Returns
Type | Description |
---|---|
System.Boolean |
resolveField(List<ReceiptItem>, ReceiptItemType, CustomReceiptFormatter.Counters)
Declaration
protected String resolveField(List<ReceiptItem> receiptItems, ReceiptItemType field, CustomReceiptFormatter.Counters counters)
Parameters
Type | Name | Description |
---|---|---|
List<ReceiptItem> | receiptItems | |
ReceiptItemType | field | |
CustomReceiptFormatter.Counters | counters |
Returns
Type | Description |
---|---|
String |
resolveField(List<ReceiptItem>, ReceiptItemType, CustomReceiptFormatter.Counters, Int32, Char)
Declaration
protected String resolveField(List<ReceiptItem> receiptItems, ReceiptItemType field, CustomReceiptFormatter.Counters counters, int padLen, char padChar)
Parameters
Type | Name | Description |
---|---|---|
List<ReceiptItem> | receiptItems | |
ReceiptItemType | field | |
CustomReceiptFormatter.Counters | counters | |
System.Int32 | padLen | |
System.Char | padChar |
Returns
Type | Description |
---|---|
String |
resolveField(List<ReceiptItem>, ReceiptItemType, CustomReceiptFormatter.Counters, Int32, Char, String)
Declaration
protected String resolveField(List<ReceiptItem> receiptItems, ReceiptItemType field, CustomReceiptFormatter.Counters counters, int padLen, char padChar, string emptyValue)
Parameters
Type | Name | Description |
---|---|---|
List<ReceiptItem> | receiptItems | |
ReceiptItemType | field | |
CustomReceiptFormatter.Counters | counters | |
System.Int32 | padLen | |
System.Char | padChar | |
System.String | emptyValue |
Returns
Type | Description |
---|---|
String |
resolveField(List<ReceiptItem>, ReceiptItemType, CustomReceiptFormatter.Counters, String)
Declaration
protected String resolveField(List<ReceiptItem> receiptItems, ReceiptItemType field, CustomReceiptFormatter.Counters counters, string emptyValue)
Parameters
Type | Name | Description |
---|---|---|
List<ReceiptItem> | receiptItems | |
ReceiptItemType | field | |
CustomReceiptFormatter.Counters | counters | |
System.String | emptyValue |
Returns
Type | Description |
---|---|
String |
resolveField(List<ReceiptItem>, ReceiptItemType, String)
Declaration
protected string resolveField(List<ReceiptItem> receiptItems, ReceiptItemType field, string defaultValue)
Parameters
Type | Name | Description |
---|---|---|
List<ReceiptItem> | receiptItems | |
ReceiptItemType | field | |
System.String | defaultValue |
Returns
Type | Description |
---|---|
System.String |
resolveFieldAmount(List<ReceiptItem>, ReceiptItemType, ReceiptItemType, ReceiptItemType, CustomReceiptFormatter.Counters, Int32, Char)
Declaration
protected String resolveFieldAmount(List<ReceiptItem> receiptItems, ReceiptItemType fieldAmount, ReceiptItemType fieldCurrency, ReceiptItemType fieldExponent, CustomReceiptFormatter.Counters counters, int padLen = 0, char padChar = ' ')
Parameters
Type | Name | Description |
---|---|---|
List<ReceiptItem> | receiptItems | |
ReceiptItemType | fieldAmount | |
ReceiptItemType | fieldCurrency | |
ReceiptItemType | fieldExponent | |
CustomReceiptFormatter.Counters | counters | |
System.Int32 | padLen | |
System.Char | padChar |
Returns
Type | Description |
---|---|
String |
resolveFieldDate(List<ReceiptItem>, ReceiptItemType, CustomReceiptFormatter.Counters, Int32, Char)
Declaration
protected String resolveFieldDate(List<ReceiptItem> receiptItems, ReceiptItemType field, CustomReceiptFormatter.Counters counters, int padLen = 0, char padChar = ' ')
Parameters
Type | Name | Description |
---|---|---|
List<ReceiptItem> | receiptItems | |
ReceiptItemType | field | |
CustomReceiptFormatter.Counters | counters | |
System.Int32 | padLen | |
System.Char | padChar |
Returns
Type | Description |
---|---|
String |
resolveFieldTime(List<ReceiptItem>, ReceiptItemType, CustomReceiptFormatter.Counters, Int32, Char)
Declaration
protected String resolveFieldTime(List<ReceiptItem> receiptItems, ReceiptItemType field, CustomReceiptFormatter.Counters counters, int padLen = 0, char padChar = ' ')
Parameters
Type | Name | Description |
---|---|---|
List<ReceiptItem> | receiptItems | |
ReceiptItemType | field | |
CustomReceiptFormatter.Counters | counters | |
System.Int32 | padLen | |
System.Char | padChar |
Returns
Type | Description |
---|---|
String |
setLineFormatsCardholder(List<CustomReceiptFormatter.LineFormat>)
Declaration
public void setLineFormatsCardholder(List<CustomReceiptFormatter.LineFormat> lines)
Parameters
Type | Name | Description |
---|---|---|
List<CustomReceiptFormatter.LineFormat> | lines |
setLineFormatsMerchant(List<CustomReceiptFormatter.LineFormat>)
Declaration
public void setLineFormatsMerchant(List<CustomReceiptFormatter.LineFormat> lines)
Parameters
Type | Name | Description |
---|---|---|
List<CustomReceiptFormatter.LineFormat> | lines |
setLineFormatsSaldo(List<CustomReceiptFormatter.LineFormat>)
Declaration
public void setLineFormatsSaldo(List<CustomReceiptFormatter.LineFormat> lines)
Parameters
Type | Name | Description |
---|---|---|
List<CustomReceiptFormatter.LineFormat> | lines |