public class CloseCashFormatter extends Object
Constructor and Description |
---|
CloseCashFormatter(PaymentsModel oPayments)
CloseCashFormatter defines all methods that can be referenced in Printer.CloseCash.xml and
and Printer.CurrentCash.xml through the $payments variable.
|
Modifier and Type | Method and Description |
---|---|
List<AccountingLineFormatter> |
getAccountingLines(int levelMask)
Retrieves a list of all accounting line formatters.
|
Integer |
getCashCloseNr()
Get the serial number of the active cashregister for the current host.
|
String |
getCompanyData(String element)
Retrieve elements from the CompanyData.xml ressource.
|
Integer |
getCurrentRegister(String host)
Get the serial number of the current register for host.
|
Date |
getDateEnd()
Get the closing date for cash close.
|
Date |
getDateStart()
Start date of the active cash register.
|
List<DiscountLineFormatter> |
getDiscountLines()
Retrieves a list of all discount line formatters.
|
String |
getHost()
Host name of the current host.
|
HashMap<String,PaymentsLineFormatter[]> |
getPaymentGroups()
Returns a hash with key value pairs where the key represents a payment method
and the value represents a vector of PaymentLines
|
List<PaymentsLineFormatter> |
getPaymentLines()
Retrieves a list of all payment lines.
|
List<PaymentsLineFormatter> |
getPaymentLinesByHost(String hosts)
Get a list of PaymentLineFormatters for the listed hosts.
|
List<PaymentsLineFormatter> |
getPaymentLinesByUser()
Get a list of PaymentLineFormatters grouped by users and payment methods.
|
int |
getPayments()
Number of payments
|
StatisticsFormatter |
getRegisterStatistics() |
List<SalesLineFormatter> |
getSaleLines()
Retrieves the list of sales line formatters.
|
int |
getSales()
Return the number of sales transactions
|
DiscountLineFormatter |
getSalesByAccountingLevel(int levelsMask)
Get the statistics for products having defined accounting levels
|
double |
getTotal()
Total of all payments made.
|
Set<String> |
getUserNames()
Retrieve the distinct list of user names for users who were ever logged in during the
current cash register period.
|
String |
printDateEnd()
End date of the current cash register formatted as timestamp string.
|
String |
printDateStart()
Start date of the current cash register formatted as timestamp string.
|
String |
printHost()
same as getHost()
|
String |
printMaxTicketNum()
Print the last ticket number of this sales period
|
String |
printMinTicketNum()
Print the first ticket number of this sales period
|
String |
printPayments()
Returns the total number of payments including top up's as string.
|
String |
printPaymentsTotal()
Return the total of payments formatted as string (excluding top up's).
|
String |
printSales()
Return the string formatted number of sales transactions.
|
String |
printSalesSubtotal()
Net sum of all sales calculated from the ticketlines formatted as currency.
|
String |
printSalesTaxTotal()
Net sum of all sales calculated from the ticketlines, currency formatted string
with 2 decimals.
|
String |
printSalesTotal()
Gross sum of all sales calculated from the ticketlines formatted as currency.
|
String |
printsSalesSubtotal()
Net sum of all sales calculated from the ticketlines formatted string
with 2 decimals.
|
String |
printsSalesTaxTotal()
Net sum of all sales calculated from the ticketlines, formatted string
with 2 decimals.
|
String |
printsSalesTotal()
Gross sum of all sales calculated from the ticketlines formatted with 2 decimals .
|
void |
refreshCompanyData()
Reread the company data resource.
|
public CloseCashFormatter(PaymentsModel oPayments)
oPayments
- public Integer getCashCloseNr()
public String getCompanyData(String element)
element
- public void refreshCompanyData()
public Integer getCurrentRegister(String host)
host
- hostname to get the current serial number from.public Date getDateEnd()
public Date getDateStart()
public List<DiscountLineFormatter> getDiscountLines()
public List<AccountingLineFormatter> getAccountingLines(int levelMask)
levelMask
- public String getHost()
public HashMap<String,PaymentsLineFormatter[]> getPaymentGroups()
public List<PaymentsLineFormatter> getPaymentLines()
public int getPayments()
public List<SalesLineFormatter> getSaleLines()
public int getSales()
public double getTotal()
public List<PaymentsLineFormatter> getPaymentLinesByHost(String hosts)
hosts
- comma separated list of hostnames. If hosts is empty,
localhost is assumed.public List<PaymentsLineFormatter> getPaymentLinesByUser()
public String printDateEnd()
public String printDateStart()
public String printHost()
public String printPayments()
public String printPaymentsTotal()
public String printSales()
public String printSalesSubtotal()
public String printsSalesSubtotal()
public String printsSalesTaxTotal()
public String printSalesTaxTotal()
public String printSalesTotal()
public String printsSalesTotal()
public DiscountLineFormatter getSalesByAccountingLevel(int levelsMask)
levelsMask
- public String printMinTicketNum()
public String printMaxTicketNum()
public Set<String> getUserNames()
public StatisticsFormatter getRegisterStatistics()
Copyright © 2021. All rights reserved.