1 Closed tickets

Tickets ended, tickets closed successfully

The most important parameters of the tickets closed are:

  • Number: It is unique, it is composed of the store, the series of the document type and a sequential numerator.
  • Store code: The code of the store that made the ticket.
  • Terminal identifier: The identifier of terminal that made the ticket.
  • Employee identifier: The identifier of the employee that made the ticket.
  • Customer identifier: The identifier of the customer that made the ticket. In mode EPOS it's optional, in moe ECOM is required.
  • ticket discount: Global discount percentage of the ticket.
  • Identifier of promotion: Related to main promotions.
  • Taxes: Total amount of ticket-taxes.
  • Total: Total amount of ticket with taxes.
  • Type: type of document, related to 'Document types' (Sale,Return, Reservation...)
  • State: [2] Ended, [3] Canceled, [4] Historified
  • Processed: Used only in server side to mark a ticket as processed.
  • Accounted: Indicative ticket is accounted.
  • Cashaudit: Indicative ticket is cashaudit.
  • Date start: Initial date of ticket.
  • Date end: Ended date of ticket.
  • Message: Used at validation process to allow or not ending the ticket, if message is informed by XUDP: pos_ticket_validate, then the ticket can't be ended showing the message.
  • Source document: The origin ticket-number. In Returns the source is the origin sale.

Aditional info:

Object also show extended info as:

  • Invoice: When an invoice ticket is requested. Show the invoice number and the customer.
  • Products: Products purchased with the ticket.
  • Payments: Payments used with the ticket. Cash, cards and vouchers.
  • Taxfree: When an taxfree ticket is requested. Show taxfree information.


Closed tickets can't be modified or deleted from system.

Only the parameters accounted, processed, cash audit can be modified.

Label Description
Ticket ID
Terminal ID Terminal identification
Ticket Type
Ticket Number
Employee Id Identifier of the employee who made the ticket. In Ecom mode this data is not reported.
Customer ID Ticket customer identifier
Promotion ID Identifier of the promotion that this ticket is linked to.
Source document Reference ticket number (in returnings it indicates the origin ticket)
Start date
End date
Status Receipt status: 1 - Open 2 - Paused 3- Finished 4 - Canceled 5 - Historized

  • Default: 0
  • Values:
    • 0: Open. Open
    • 1: Paused. Paused
    • 2: Ended. Ended
    • 3: Cancelled. Cancelled
    • 4: Historified.
Processed Indicates if the receipt has already been procesed

  • Default: 0
  • Values:
    • 0: false.
    • 1: true.
Modified by employee Flag that indicates that the employee modified the global ticket discount

  • Values:
    • 0: false.
    • 1: true.
Cashaudit Inside of cashaudit process

  • Default: 0
  • Values:
    • 0: false.
    • 1: true.
Notes Field to add notes to the ticket
Hash key Hash key generated for the document
Ticket discount
Taxes Ticket total taxes
Ticket Total

2 Before closing ticket

Before closing a ticket, system allow to customize a procedure as a validating ticket.

Procedure: pos_ticket_validate

<!-- ======================================================================= -->
<!--                                                                         -->
<!--   XUDP: pos_ticket_validate                                             -->
<!--                                                                         -->
<!--   Customizable XUDP.                                                    -->
<!-- Executed before closing the ticket and printing.                        -->
<!--   At the end we call the pos_get_ticket_status function                 -->
<!--   to know if there are messages at ticketh_open and ticketl_open tables.-->
<!--                                                                         -->
<!--   Write errors to pos_ticketl_open.line_message or                      -->
<!--   pos_ticketh_open.ticket_message columns and                           -->
<!--   the function pos_get_ticket_status will retrieve them in the call     -->
<!--   before close.                                                         -->
<!-- ======================================================================= -->
<procedure name='pos_ticket_validate'>
        <arg name='p_ticket_id'       like='pos_ticketh_open.ticket_id' mode='in'  />
        <arg name='o_ticket_status'   type='integer'                    mode='out' />

        <variable name='m_linid'          like='pos_ticketl_open.linid'  />
        <variable name='m_product_id'     like='pos_ticketl_open.product_id'  />
        <variable name='m_product_active' like='pos_product.product_active'   />

        <!-- ================================== -->
        <!-- ================================== -->
        <!-- ================================ -->
        <!-- ================================ -->
        <execute-function name='pos_get_ticket_status' into='o_ticket_status'>