Class CustomReceiptFormatter
Implements
Namespace: SIX.TimApi.Receipts
Assembly: TimApi.dll
Syntax
public class CustomReceiptFormatter : object, ReceiptFormatter
Fields
AutoAddHeader
Declaration
protected bool AutoAddHeader
Field Value
Type | Description |
---|---|
System. |
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 |
---|---|---|
Receipt |
receiptItems | |
Recipient | recipient |
Returns
Type | Description |
---|---|
List<Receipt |
formatReceipt(Terminal, ReceiptItems)
Declaration
public virtual List<Receipt> formatReceipt(Terminal terminal, ReceiptItems receiptItems)
Parameters
Type | Name | Description |
---|---|---|
Terminal | terminal | |
Receipt |
receiptItems |
Returns
Type | Description |
---|---|
List<Receipt> |
formatReceiptAddLine(Recipient, StringBuilder, Terminal, Int32, List<PrintFlag>, CustomReceiptFormatter.LineFormat, List<ReceiptItem>, ReceiptType)
Declaration
protected void formatReceiptAddLine(Recipient recipient, StringBuilder builder, Terminal terminal, int width, List<PrintFlag> flags, CustomReceiptFormatter.LineFormat lineFormat, List<ReceiptItem> receiptItems, ReceiptType receiptType)
Parameters
Type | Name | Description |
---|---|---|
Recipient | recipient | |
String |
builder | |
Terminal | terminal | |
System. |
width | |
List<Print |
flags | |
Custom |
lineFormat | |
List<Receipt |
receiptItems | |
Receipt |
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 |
---|---|---|
String |
builder | |
System. |
width | |
String | left | |
String | center | |
String | right | |
Char | paddingChar |
formatReceiptText(Recipient, StringBuilder, Terminal, Int32, List<PrintFlag>, List<ReceiptItem>, ReceiptType, List<CustomReceiptFormatter.LineFormat>)
Declaration
protected void formatReceiptText(Recipient recipient, StringBuilder builder, Terminal terminal, int width, List<PrintFlag> flags, List<ReceiptItem> receiptItems, ReceiptType receiptType, List<CustomReceiptFormatter.LineFormat> lineFormats)
Parameters
Type | Name | Description |
---|---|---|
Recipient | recipient | |
String |
builder | |
Terminal | terminal | |
System. |
width | |
List<Print |
flags | |
List<Receipt |
receiptItems | |
Receipt |
receiptType | |
List<Custom |
lineFormats |
getPrintOption(Terminal, Recipient)
Declaration
protected PrintOption getPrintOption(Terminal terminal, Recipient recipient)
Parameters
Returns
Type | Description |
---|---|
Print |
hasField(List<ReceiptItem>, ReceiptItemType)
Declaration
protected bool hasField(List<ReceiptItem> receiptItems, ReceiptItemType field)
Parameters
Type | Name | Description |
---|---|---|
List<Receipt |
receiptItems | |
Receipt |
field |
Returns
Type | Description |
---|---|
System. |
hasReceiptItemType(List<ReceiptItem>, ReceiptItemType)
Declaration
protected bool hasReceiptItemType(List<ReceiptItem> receiptItems, ReceiptItemType type)
Parameters
Type | Name | Description |
---|---|---|
List<Receipt |
receiptItems | |
Receipt |
type |
Returns
Type | Description |
---|---|
System. |
resolveField(List<ReceiptItem>, ReceiptItemType, CustomReceiptFormatter.Counters)
Declaration
protected String resolveField(List<ReceiptItem> receiptItems, ReceiptItemType field, CustomReceiptFormatter.Counters counters)
Parameters
Type | Name | Description |
---|---|---|
List<Receipt |
receiptItems | |
Receipt |
field | |
Custom |
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<Receipt |
receiptItems | |
Receipt |
field | |
Custom |
counters | |
System. |
padLen | |
System. |
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<Receipt |
receiptItems | |
Receipt |
field | |
Custom |
counters | |
System. |
padLen | |
System. |
padChar | |
System. |
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<Receipt |
receiptItems | |
Receipt |
field | |
Custom |
counters | |
System. |
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<Receipt |
receiptItems | |
Receipt |
field | |
System. |
defaultValue |
Returns
Type | Description |
---|---|
System. |
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<Receipt |
receiptItems | |
Receipt |
fieldAmount | |
Receipt |
fieldCurrency | |
Receipt |
fieldExponent | |
Custom |
counters | |
System. |
padLen | |
System. |
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<Receipt |
receiptItems | |
Receipt |
field | |
Custom |
counters | |
System. |
padLen | |
System. |
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<Receipt |
receiptItems | |
Receipt |
field | |
Custom |
counters | |
System. |
padLen | |
System. |
padChar |
Returns
Type | Description |
---|---|
String |
setLineFormatsCardholder(List<CustomReceiptFormatter.LineFormat>)
Declaration
public void setLineFormatsCardholder(List<CustomReceiptFormatter.LineFormat> lines)
Parameters
Type | Name | Description |
---|---|---|
List<Custom |
lines |
setLineFormatsMerchant(List<CustomReceiptFormatter.LineFormat>)
Declaration
public void setLineFormatsMerchant(List<CustomReceiptFormatter.LineFormat> lines)
Parameters
Type | Name | Description |
---|---|---|
List<Custom |
lines |
setLineFormatsSaldo(List<CustomReceiptFormatter.LineFormat>)
Declaration
public void setLineFormatsSaldo(List<CustomReceiptFormatter.LineFormat> lines)
Parameters
Type | Name | Description |
---|---|---|
List<Custom |
lines |