Configuring Input Formats
| Configuration files |
|
InputDomainsConfig.inputDomains.23.id=GIFT_CERTIFICATE_PAYMENT_NUMBER
InputDomainsConfig.inputDomains.23.name=gift certificate payment number domain
InputDomainsConfig.inputDomains.23.dataType=GIFT_CERTIFICATE_PAYMENT_NUMBER
You could configure:
- Entry fields
- Defined sections of the receipt layout
To do so, further settings are necessary.
Configuring Entry Fields
For entry fields, a differentiation is made between masks with one entry field and masks with several entry fields.
Mask with One Entry Field
The configuration is set in the file promptUserDialogConfigs.properties : Behind inputDomain, there is the respective dataType resulting from the file inputDomains.properties .
PromptUserDialogConfigs.promptForGiftCertificateSale=include\:PromptUserDialogConfigs.Default
PromptUserDialogConfigs.promptForGiftCertificateSale.inputDomain=INTEGER_NUMBER
PromptUserDialogConfigs.promptForGiftCertificateSale.labelTextKey=prompt.gift_certificate.sale.labelText
PromptUserDialogConfigs.promptForGiftCertificateSale.titleKey=prompt.gift_certificate.sale.title
The example shows the entry format for gift card numbers for a payment with gift card. First, a mask with only one entry field is called to enter the gift card number. Use integers only.
Mask with Several Entry Fields
The configuration is defined in the function related XML file of the UI configuration under ..\ui\layouts\tpos\simple\
Behind inputDomain, there is the respective dataType resulting from the file inputDomains.properties .
The example shows an entry taken from the file inputGcDataForCompletionPayment.xml :
<form name="gcForm"> <!-- INPUTS --> <div id="leftContentCenterArea" slot="true" class="centerArea inputArea" layout="wrapLayout"> <div id="gcNumberFieldLabel" class="fieldLabel inputContainerFrame" bean="fieldLabel"> <input id="gcNumberInput" type="text" inputDomain="GIFT_CERTIFICATE_PAYMENT_NUMBER" /> <label id="mainTextLabel" valueKey="giftCertificate.payment.number" /> </div> <div id="amountFieldLabel" class="fieldLabel inputContainerFrame" bean="fieldLabel"> <input id="amountInput" type="text" inputDomain="GIFT_CERTIFICATE_PAYMENT_AMOUNT" /> <label id="mainTextLabel" valueKey="giftCertificate.payment.amount" /> </div>
The example refers to the mask in the case of payment with a gift card. After entering the number during the gift card payment, a mask with two entry fields appears:
- The field for the gift card number shows inputDomain="GIFT_CERTIFICATE_PAYMENT_NUMBER". This means that the gift card number is displayed as an integer.
- The field for the amount shows inputDomain="GIFT_CERTIFICATE_PAYMENT_AMOUNT". This means that the gift card amount is displayed as an amount with two decimal places.
Receipt layout configuration
General
Within the receipt layout, it is possible to configure different formats. Depending on the printer, the configuration is defined in the XML files under:
- ..\parameter\client\reports_ibm_wn\
- ..\parameter\client\reports\
Behind display_mask='ID: dataType ', there is the respective dataType resulting from the file inputDomains.properties . See the following example taken from the file transaction.xml :
<ENTRY id='fld_number' type='datafield' argument='TS.TENDER_LINE_ITEM.RETAIL_TRANSACTION_LINE_ITEM_FREQUENT_SHOPPER_POINTS_REDEMPTION.FREQUENT_SHOPPER_POINTS_REDEEMED_COUNT' representation='character-text' posX='15' posY='0' width='20' height='1' alignmentH='left' alignmentV='top' display_mask='ID:BONUS_POINTS' underline='false'/>
In this example, the bonus points are printed in the format BONUS_POINTS.
Country-Specific Settings
There are different date and time specifications for different countries. The concrete date and time formats are defined in the file services-client.properties . The format used depends on the system language.
LocalizationServiceConfig.localeConfigs.0.locale=en_US
# The fallback locales
#LocalizationServiceConfig.localeConfigs.0.fallbackLocales=
LocalizationServiceConfig.localeConfigs.0.localeOverrides.dateFormatShort=MMyy
LocalizationServiceConfig.localeConfigs.0.localeOverrides.dateFormatMedium=MM/dd/yy
In this example, the date format MM/dd/yy is used for a system with the system language en_US.
<ENTRY id='fld_date' type='query' argument='TS.TRANSACTION_FOOTER.END_DATE_TIMESTAMP' datatype='java.lang.String' representation='character-text' posX='0' posY='1' width='8' height='1' alignmentH='left' alignmentV='top' sample_value='' display_mask='ID:DATE_MEDIUM' wrap='false' can_expand='false' underline='false' font='NORMAL, PLAIN, 12'/>In this example, the time is printed in the format DATE_MEDIUM on the receipt. DATE_MEDIUM is defined in the file inputDomains.properties . dateFormatMedium defined in the file services-client.properties is used.