Modifying customer receipts
When you are customizing a Point of Sale application, a common request you get from customers is to modify customer receipts. In this recipe, you will learn how to modify customer receipts.
Getting ready
In this recipe, we will be using the pos_demo
module created in the Modifying existing business logic recipe. We will add one line to the Point of Sale receipt to show how much money the customer saved in the order.
How to do it...
Follow these steps to modify a customer receipt in the Point of Sale application:
- Add the following code to the
/static/src/js/pos_demo.js
file. This will add extra data in the receipt environment:var models = require('point_of_sale.models'); var _super_order = models.Order.prototype; models.Order = models.Order.extend({ export_for_printing: function () { var result = _super_order.export_for_printing.apply(this, arguments); &...