C# Класс pcAmerica.DesktopPOS.API.Client.SalesAPI

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ApplyCardPayment ( Context context, long invoiceNumber, int splitCheckNumber, CreditCardPaymentProcessingResponse response, int paymentIndex ) : AppliedPaymentResponse

Applies a credit card payment to the specified invoice

ApplyCashPayment ( Context context, long invoiceNumber, int splitCheckNumber, decimal amount ) : AppliedPaymentResponse

Applies a cash payment to the specified invoice

CombineSplits ( Context context, long invoiceNumber ) : Invoice

Combines the unpaid split checks back into a single check.

EmailReceipt ( Context context, long invoiceNumber, int splitCheckNumber, string emailAddress ) : bool

Emails a receipt for the specified invoice or split check to the specified email address

EndInvoice ( Context context, long invoiceNumber ) : bool

Marks the specified invoice as complete, only if it's fully paid. Also sends the order to the kitchen if it has not been printed yet.

EndSubCheck ( Context context, long invoiceNumber, short subCheckNumber ) : bool

Marks the specified subcheck as complete, only if it's fully paid. Also sends the order to the kitchen if it has not been printed yet.

GetAllOnHoldInvoices ( Context context ) : List

Retrieves a list of Invoice Numbers, Grand Total, CashierId, OnHoldID for the whole store/restaurant

GetInvoice ( Context context, long invoiceNumber ) : Invoice

Retrieves the invoice header and line item details for a specified invoice number in context.

GetInvoiceHeader ( Context context, long invoiceNumber ) : Invoice

Retrieves only the invoice header for a specified invoice number in context.

GetItemsSold ( System.DateTime startDateTime, System.DateTime endDateTime ) : List

Retrieves a list of invoice number, item name, item number, cashier, date sold, price, quantity, and discount amounts for each item record

GetOnHoldInvoicesForCashier ( Context context ) : List

Retrieves a list of Invoice Numbers, Grand Total, CashierId, OnHoldID for a specified Cashier/Employee

GetTotals ( System.DateTime startDateTime, System.DateTime endDateTime ) : SalesTotals

Retrieves the summary of Net Sales, Total Tax, and Grand Total between date/times

LockInvoice ( Context context, long invoiceNumber ) : bool

Locks an invoice so no other devices will attempt to open or modify it.

ModifyItems ( Context context, long invoiceNumber, List items ) : Invoice

Modifies an invoice to change the line item details based on EntityState. Items can be added/deleted/modified/unchanged. The API matches the line item id with the ObjectID in the CRE/RPE invoice, and does the specified operation to it. Line items with a modified status can change quantity and price. Deleted line items will remove the item from the invoice. Deleting an item that has child details will also remove the children. When adding a new line item, assign your own GUID as an id, and associate it as the parent to modifier items.

PrintReceipt ( Context context, long invoiceNumber, int splitCheckNumber ) : bool

Prints a receipt for the specified invoice or split check to the configured printer for the store id, station id

SendToKitchen ( Context context, long invoiceNumber ) : bool

Directs the API to send the order to the kitchen at this time. Only the items that have not previously been printed in the kitchen are printed.

SetPartySizeForInvoice ( Context context, long invoiceNumber, int partySize ) : bool

Sets the party size for the invoice

SplitInvoice ( Context context, long invoiceNumber, int numberOfWays ) : Invoice

Splits the invoice evenly into the specified number of ways

SplitInvoiceByGuest ( Context context, long invoiceNumber ) : Invoice

Splits the invoice evenly among the assigned guests

StartNewInvoice ( Context context, String onHoldID, String sectionID ) : Invoice

Begins a new invoice, saving it with the specified onHoldID, and automatically "locks" it so other devices cannot modify it. Always unlock the invoice when you are finished working with/modifying it.

UnLockInvoice ( Context context, long invoiceNumber ) : bool

Unlocks an invoice to make it available for other devices to open and work on it. Unlock should always be called when done working on an invoice on your device.

VoidInvoice ( Context context, long invoiceNumber, bool SendVoidToKitchen ) : bool

Voids the invoice the including removing all associated payments

Описание методов

ApplyCardPayment() публичный Метод

Applies a credit card payment to the specified invoice
public ApplyCardPayment ( Context context, long invoiceNumber, int splitCheckNumber, CreditCardPaymentProcessingResponse response, int paymentIndex ) : AppliedPaymentResponse
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be paid
splitCheckNumber int The split check number, 0-based. Provide -1 if there are no split checks.
response CreditCardPaymentProcessingResponse Provides the details of the card payment
paymentIndex int Index for a payment being updated(post authing Credit Cards). Provide -1 if not updating a payment
Результат AppliedPaymentResponse

ApplyCashPayment() публичный Метод

Applies a cash payment to the specified invoice
public ApplyCashPayment ( Context context, long invoiceNumber, int splitCheckNumber, decimal amount ) : AppliedPaymentResponse
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be paid
splitCheckNumber int The split check number, 0-based. Provide -1 if there are no split checks.
amount decimal The cash amount being applied
Результат AppliedPaymentResponse

CombineSplits() публичный Метод

Combines the unpaid split checks back into a single check.
public CombineSplits ( Context context, long invoiceNumber ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be combined
Результат Invoice

EmailReceipt() публичный Метод

Emails a receipt for the specified invoice or split check to the specified email address
public EmailReceipt ( Context context, long invoiceNumber, int splitCheckNumber, string emailAddress ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be emailed
splitCheckNumber int The split check number, 0-based. Provide -1 if there are no split checks.
emailAddress string The email address to send the receipt to
Результат bool

EndInvoice() публичный Метод

Marks the specified invoice as complete, only if it's fully paid. Also sends the order to the kitchen if it has not been printed yet.
public EndInvoice ( Context context, long invoiceNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be ended
Результат bool

EndSubCheck() публичный Метод

Marks the specified subcheck as complete, only if it's fully paid. Also sends the order to the kitchen if it has not been printed yet.
public EndSubCheck ( Context context, long invoiceNumber, short subCheckNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be ended
subCheckNumber short The number for the subcheck to be ended
Результат bool

GetAllOnHoldInvoices() публичный Метод

Retrieves a list of Invoice Numbers, Grand Total, CashierId, OnHoldID for the whole store/restaurant
public GetAllOnHoldInvoices ( Context context ) : List
context Context The store id, station id, and cashier id the information should be restricted to.
Результат List

GetInvoice() публичный Метод

Retrieves the invoice header and line item details for a specified invoice number in context.
public GetInvoice ( Context context, long invoiceNumber ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be returned
Результат Invoice

GetInvoiceHeader() публичный Метод

Retrieves only the invoice header for a specified invoice number in context.
public GetInvoiceHeader ( Context context, long invoiceNumber ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be returned
Результат Invoice

GetItemsSold() публичный Метод

Retrieves a list of invoice number, item name, item number, cashier, date sold, price, quantity, and discount amounts for each item record
public GetItemsSold ( System.DateTime startDateTime, System.DateTime endDateTime ) : List
startDateTime System.DateTime The period start date/time
endDateTime System.DateTime The period end date/time
Результат List

GetOnHoldInvoicesForCashier() публичный Метод

Retrieves a list of Invoice Numbers, Grand Total, CashierId, OnHoldID for a specified Cashier/Employee
public GetOnHoldInvoicesForCashier ( Context context ) : List
context Context The store id, station id, and cashier id the information should be restricted to.
Результат List

GetTotals() публичный Метод

Retrieves the summary of Net Sales, Total Tax, and Grand Total between date/times
public GetTotals ( System.DateTime startDateTime, System.DateTime endDateTime ) : SalesTotals
startDateTime System.DateTime The period start date/time
endDateTime System.DateTime The period end date/time
Результат SalesTotals

LockInvoice() публичный Метод

Locks an invoice so no other devices will attempt to open or modify it.
public LockInvoice ( Context context, long invoiceNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be locked
Результат bool

ModifyItems() публичный Метод

Modifies an invoice to change the line item details based on EntityState. Items can be added/deleted/modified/unchanged. The API matches the line item id with the ObjectID in the CRE/RPE invoice, and does the specified operation to it. Line items with a modified status can change quantity and price. Deleted line items will remove the item from the invoice. Deleting an item that has child details will also remove the children. When adding a new line item, assign your own GUID as an id, and associate it as the parent to modifier items.
public ModifyItems ( Context context, long invoiceNumber, List items ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be modified
items List The list of modified items
Результат Invoice

PrintReceipt() публичный Метод

Prints a receipt for the specified invoice or split check to the configured printer for the store id, station id
public PrintReceipt ( Context context, long invoiceNumber, int splitCheckNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be printed
splitCheckNumber int The split check number, 0-based. Provide -1 if there are no split checks.
Результат bool

SendToKitchen() публичный Метод

Directs the API to send the order to the kitchen at this time. Only the items that have not previously been printed in the kitchen are printed.
public SendToKitchen ( Context context, long invoiceNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be sent the kitchen
Результат bool

SetPartySizeForInvoice() публичный Метод

Sets the party size for the invoice
public SetPartySizeForInvoice ( Context context, long invoiceNumber, int partySize ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be returned
partySize int The new number of guests in the party
Результат bool

SplitInvoice() публичный Метод

Splits the invoice evenly into the specified number of ways
public SplitInvoice ( Context context, long invoiceNumber, int numberOfWays ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be split
numberOfWays int The number of ways to split the check. E.g. Provide 2 to split the check 2 ways.
Результат Invoice

SplitInvoiceByGuest() публичный Метод

Splits the invoice evenly among the assigned guests
public SplitInvoiceByGuest ( Context context, long invoiceNumber ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be split
Результат Invoice

StartNewInvoice() публичный Метод

Begins a new invoice, saving it with the specified onHoldID, and automatically "locks" it so other devices cannot modify it. Always unlock the invoice when you are finished working with/modifying it.
public StartNewInvoice ( Context context, String onHoldID, String sectionID ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
onHoldID String The ID that should represent an invoice. If the ID matches a Table Number, the table will become reserved.
sectionID String The section for the invoice to be put into see TableAPI for section info
Результат Invoice

UnLockInvoice() публичный Метод

Unlocks an invoice to make it available for other devices to open and work on it. Unlock should always be called when done working on an invoice on your device.
public UnLockInvoice ( Context context, long invoiceNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be unlocked
Результат bool

VoidInvoice() публичный Метод

Voids the invoice the including removing all associated payments
public VoidInvoice ( Context context, long invoiceNumber, bool SendVoidToKitchen ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that is to be voided
SendVoidToKitchen bool
Результат bool