diff --git a/Admin/Install/Media.install.json b/Admin/Install/Media.install.json new file mode 100644 index 0000000..ba3947a --- /dev/null +++ b/Admin/Install/Media.install.json @@ -0,0 +1,31 @@ +[ + { + "type": "collection", + "name": "Billing", + "virtualPath": "/Modules", + "user": 1 + }, + { + "type": "collection", + "name": "Templates", + "virtualPath": "/Modules/Billing", + "user": 1 + }, + { + "type": "collection", + "name": "Bills", + "virtualPath": "/Modules/Billing", + "user": 1 + }, + { + "type": "upload", + "create_collection": true, + "name": "Default", + "virtualPath": "/Modules/Billing/Templates", + "path": "/Modules/Media/Files/Modules/Billing/Templates/Default", + "files": [ + "/Modules/Billing/Admin/Install/Media" + ], + "user": 1 + } +] \ No newline at end of file diff --git a/Admin/Install/Media.php b/Admin/Install/Media.php new file mode 100644 index 0000000..c4f4b30 --- /dev/null +++ b/Admin/Install/Media.php @@ -0,0 +1,43 @@ + __DIR__ . '/Media.install.json']); + } +} diff --git a/Admin/Install/Media/bill.pdf.php b/Admin/Install/Media/bill.pdf.php new file mode 100644 index 0000000..b4994de --- /dev/null +++ b/Admin/Install/Media/bill.pdf.php @@ -0,0 +1,287 @@ +getData('bill'); + +$mpdf = new Mpdf([ + 'mode' => 'utf-8', + 'format' => 'A4-L', + 'orientation' => 'L', + 'margin_left' => 0, + 'margin_right' => 0, + 'margin_top' => 0, + 'margin_bottom' => 0, + 'margin_header' => 0, + 'margin_footer' => 0, +]); + +$mpdf->SetDisplayMode('fullpage'); +$mpdf->SetTitle($bill->getNumber()); +$mpdf->SetAuthor('Orange Management'); + +$mpdf->AddPage(); + +$mpdf->SetHTMLHeader(' +'); + +$mpdf->SetHTMLFooter(' +'); + +$mpdf->WriteHTML(' + +
+ + + + +| SOLD TO: 345 Anotherstreet Little Village Their City CB22 6SO |
++ | SHIP TO: 345 Anotherstreet Little Village Their City CB22 6SO |
+
| Ref. No. | +Quantity | +Description | +Unit Price | +Amount | +
| MF1234567 | +10 | +Large pack Hoover bags | +£2.56 | +£25.60 | +
| MX37801982 | +1 | +Womans waterproof jacket Options - Red and charcoal. |
+£102.11 | +£102.11 | +
| MR7009298 | +25 | +Steel nails; oval head; 30mm x 3mm. Packs of 1000. | +£12.26 | +£325.60 | +
| MF1234567 | +10 | +Large pack Hoover bags | +£2.56 | +£25.60 | +
| MX37801982 | +1 | +Womans waterproof jacket Options - Red and charcoal. |
+£102.11 | +£102.11 | +
| MR7009298 | +25 | +Steel nails; oval head; 30mm x 3mm. Packs of 1000. | +£12.26 | +£325.60 | +
| MF1234567 | +10 | +Large pack Hoover bags | +£2.56 | +£25.60 | +
| MX37801982 | +1 | +Womans waterproof jacket Options - Red and charcoal. |
+£102.11 | +£102.11 | +
| MR7009298 | +25 | +Steel nails; oval head; 30mm x 3mm. Packs of 1000. | +£12.26 | +£325.60 | +
| MF1234567 | +10 | +Large pack Hoover bags | +£2.56 | +£25.60 | +
| MX37801982 | +1 | +Womans waterproof jacket Options - Red and charcoal. |
+£102.11 | +£102.11 | +
| MR7009298 | +25 | +Steel nails; oval head; 30mm x 3mm. Packs of 1000. | +£12.26 | +£325.60 | +
| MF1234567 | +10 | +Large pack Hoover bags | +£2.56 | +£25.60 | +
| MX37801982 | +1 | +Womans waterproof jacket Options - Red and charcoal. |
+£102.11 | +£102.11 | +
| MF1234567 | +10 | +Large pack Hoover bags | +£2.56 | +£25.60 | +
| MX37801982 | +1 | +Womans waterproof jacket Options - Red and charcoal. |
+£102.11 | +£102.11 | +
| MR7009298 | +25 | +Steel nails; oval head; 30mm x 3mm. Packs of 1000. | +£12.26 | +£325.60 | +
| MR7009298 | +25 | +Steel nails; oval head; 30mm x 3mm. Packs of 1000. | +£12.26 | +£325.60 | +
| MF1234567 | +10 | +Large pack Hoover bags | +£2.56 | +£25.60 | +
| MX37801982 | +1 | +Womans waterproof jacket Options - Red and charcoal. |
+£102.11 | +£102.11 | +
| MR7009298 | +25 | +Steel nails; oval head; 30mm x 3mm. Packs of 1000. | +£12.26 | +£325.60 | +
| + | Subtotal: | +£1825.60 | +||
| Tax: | +£18.25 | +|||
| Shipping: | +£42.56 | +|||
| TOTAL: | +£1882.56 | +|||
| Deposit: | +£100.00 | +|||
| Balance due: | +£1782.56 | +|||