Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ytabeloved/ordervista/llms.txt

Use this file to discover all available pages before exploring further.

The Receipts feature in Ordervista allows Operators and Admins to produce operational vouchers for completed orders. A receipt presents a clean, printable summary of an order — the order number, the date it was placed, every item with its quantity and unit price, each line’s subtotal, the order total, and the recorded payment method. Receipts are generated on-demand from live order data, giving staff an accurate record without requiring a dedicated storage table.

What a Receipt Contains

Each receipt is assembled from three related database tables:
DataSource tableFields used
Order headerPEDIDOSid_pedido, fecha_pedido, total, observacion, id_tipo_pedido
Line itemsDETALLE_PEDIDOid_detalle, cantidad, precio_unitario, subtotal
Product namesPRODUCTOSnombre, descripcion
A fully rendered receipt includes:
  • Order number (id_pedido) and date (fecha_pedido)
  • Order type (Delivery, Retiro, or Consumo Local)
  • Item list — product name, quantity ordered, unit price, and line subtotal for each item
  • Order total — the server-validated total from the PEDIDOS record
  • Observations/notes — any special instructions from the observacion field
  • Payment method — recorded locally via receiptLocalService (see below)

Who Can Generate Receipts

Receipt generation is available to Operator and Admin roles. These users access the feature through the /receipts frontend route. Customers do not have access to the Receipts screen; they can review their own order history through the customer order history view instead.

Payment Method Storage

The receiptLocalService (src/services/receiptLocalService.js) manages payment method data in the browser’s localStorage under the key ordervista_receipt_payments. It does not assemble receipt layout — its sole responsibility is persisting and retrieving payment information for each order. The service exposes three functions: saveReceiptPayment(idPedido, paymentMethod) — records the payment method for an order. The stored object has the following shape:
{
  "id_pedido": 47,
  "metodo_pago": "Efectivo",
  "estado_pago": "PAGADO",
  "fecha_pago": "2025-01-15T14:35:00.000Z"
}
getReceiptPayment(idPedido) — retrieves the stored payment record for a given order ID, or null if none has been saved. getReceiptPayments() — returns the full payments map from localStorage, keyed by id_pedido. Because payment data is stored in localStorage, it is browser-local and device-specific. If the operator clears their browser storage or uses a different device, previously saved payment records will not be available.

Workflow

1

Navigate to the Receipts screen

Log in as an Operator or Admin and open the Receipts screen at /receipts. The page loads a list of orders eligible for receipt generation.
2

Find the completed order

Locate the target order by order number, date, or customer name. Receipts are most relevant for orders in Entregado status (id_estado: 4), though the screen can display any order.
3

Record the payment method

Select a payment method for the order. The frontend calls saveReceiptPayment(idPedido, paymentMethod) to persist the payment record in localStorage.
4

View the receipt preview

Select the order to open the receipt preview. The frontend assembles the receipt layout from the order data fetched from the API, supplemented by the payment record retrieved via getReceiptPayment(idPedido).
5

Print or save

Click the Print button to open the browser’s native print dialog. The receipt layout is optimized for standard paper sizes and hides navigation elements during printing.

Note on Storage

Receipts in Ordervista are generated on-demand from live order data — there is no dedicated receipts table in the database schema. The order line items and totals always reflect the current state of PEDIDOS, DETALLE_PEDIDO, and PRODUCTOS. This means a receipt can be re-generated at any time as long as the underlying order data has not been deleted.
Receipt printing uses the browser’s native print dialog. There is no PDF export or email delivery feature in the current version of Ordervista. For a saved copy, use the browser’s “Save as PDF” option within the print dialog.

Build docs developers (and LLMs) love