This is a PHP command-line script to print out a receipt given an XML file as input.
It is intended for training purposes only.
Run:
php printer.php filename.xml
Gives:
----------------------------------------
Product 1 | £ 0.50
Product 2 | £ 0.72
Product 3 | £ 1.50
Product 4 | £ 0.72
Product 5 | £ 0.83
----------------------------------------
Sub-Total | £ 4.27
Discounts | £ 0.50
----------------------------------------
Grand Total | £ 3.77
Hopefully some other features will be added in future.