Looking for help?
< All Topics
Print

How to Create an X-Report for a Register

At the end of a shift, most stores want a printed summary of what the register sold so the cashier can count the drawer and hand over to the next person or close for the day. OpenPOS includes sales and transaction reports, cash management and Z-reports so the drawer can be reconciled with the books at close. This article shows how to create the report template that a register prints at the end of a working session, and how to assign it to a register. In the OpenPOS admin this template type and the register field are called “x-report”.

The process has two parts: first you build the template under the POS receipt templates screen, then you tell each register which template to use. Because the template accepts HTML, CSS and JavaScript, you can make the printout match your receipt paper and your own layout.

Before you start

  • You need a WordPress user that can manage OpenPOS settings in the admin (usually an administrator).
  • At least one register should already exist under admin/pos/register.
  • If you plan to customise the layout heavily, a basic understanding of HTML and CSS helps. You do not need it if you only want to use the sample as it is.

Steps to create the x-report template

  1. Open the receipt templates screen. In the WordPress admin go to admin/pos/receipt template (the “Receipt Templates” item in the POS menu). This is the same place where your normal sale receipts are managed.
  2. Create a new template with type = “x-report”. Add a new template, set the type to x-report, give it a clear name (for example the name of the store or the register it is meant for) and save it. The type is what makes the template available later in the register’s x-report field, so double-check it before saving.
  3. Open the composer and load the sample. In the template list, click composer on the template you just created in step 2, then click Load sample. The sample gives you a working starting point that already contains the report variables, so you do not have to build the layout from an empty page.
  4. Customise the sample. Edit the sample with the available variables and change the layout as you want. The composer accepts HTML, CSS and JS, so you can adjust fonts, widths, logos, headings and the order of the sections. Keep the variables you need; removing a variable removes that value from the printout. Save your changes.
  5. Assign the template to a register. Go to admin/pos/register and edit the register that should print this report. Find the x-report field; the template you created in step 2 appears in its list. Choose it and save the register. Repeat this step for every register that should use the same template, or create a separate template per register if they need different layouts.
  6. Log out and log in to the POS again. Register settings are loaded when the cashier logs in, so the change takes effect only after you log out of the POS and log back in on each device that uses the register.

How to check that it works

  1. Log in to the POS with the register you edited.
  2. Ring up one or two test sales so the session has data.
  3. End the working session on the register and print the report.
  4. Compare the totals on the printout with the orders and transactions you just created. If they match and the layout looks right on your printer, the template is ready for daily use.

It is a good idea to run this test on a quiet day or with a test register first, then delete or refund the test orders in WooCommerce so they do not affect your real figures.

X-report and Z-report: what is the difference?

In general retail terminology, an X-report is a reading of the register totals that can be taken during the day without closing anything, while a Z-report is the end-of-day report that closes the period. Different POS systems and countries use the names slightly differently. In OpenPOS the register field described above is labelled “x-report” and holds the template printed at the end of a working session. If your business has a legal or fiscal requirement for a specific end-of-day report format, confirm the exact requirements with your accountant or tax adviser.

Troubleshooting

  • The template does not appear in the register’s x-report field. Open the template again and check that its type is “x-report” and that it was saved. Templates of other types (for example normal receipts) are not listed in this field.
  • The register still prints the old layout. Make sure you saved the register, then log out of the POS and log in again on every device. Clearing the browser cache on the POS device can also help.
  • The layout is broken or cut off on the printer. Check the widths and font sizes in your CSS against the width of your receipt paper, and remove any custom JavaScript you added to see whether it is the cause.
  • Some values are empty. Load the sample again in a new test template and compare it with yours; a variable may have been removed or mistyped during editing.

Related

Table of Contents