diff --git a/database.mwb b/database.mwb index 76f0c20..7a16155 100644 Binary files a/database.mwb and b/database.mwb differ diff --git a/lang/en_us.php b/lang/en_us.php index c5473e6..350f114 100644 --- a/lang/en_us.php +++ b/lang/en_us.php @@ -139,5 +139,6 @@ define("STRINGS", [ "open drawer" => "Open Drawer", "no items" => "No items in transaction.", "delete transaction" => "Delete transaction", - "transaction discount" => "Transaction discount" + "transaction discount" => "Transaction discount", + "Online Sales" => "Online Sales", ]); diff --git a/pages.php b/pages.php index 89fc69a..40b48d9 100644 --- a/pages.php +++ b/pages.php @@ -35,6 +35,19 @@ define("PAGES", [ "static/js/pos.js", ] ], + "onlinesales" => [ + "title" => "Online Sales", + "navbar" => true, + "icon" => "fas fa-box", + "styles" => [ + "static/css/datatables.min.css", + "static/css/tables.css" + ], + "scripts" => [ + "static/js/datatables.min.js", + "static/js/onlinesales.js" + ], + ], "customers" => [ "title" => "customers", "navbar" => true, diff --git a/pages/onlinesales.php b/pages/onlinesales.php new file mode 100644 index 0000000..7cb7d3e --- /dev/null +++ b/pages/onlinesales.php @@ -0,0 +1,57 @@ +select('transactions', ['[>]customers' => 'customerid'], ['txid (id)', 'txdate', 'shipped', 'trackingnumber', 'customers.customerid', 'customers.name', 'customers.email', 'customers.phone', 'customers.address', 'customers.notes'], ['AND' => ['type' => 3, 'shipped' => null]]); +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
\ No newline at end of file diff --git a/static/js/onlinesales.js b/static/js/onlinesales.js new file mode 100644 index 0000000..af3733e --- /dev/null +++ b/static/js/onlinesales.js @@ -0,0 +1,38 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +var ordertable = $('#ordertable').DataTable({ + responsive: { + details: { + display: $.fn.dataTable.Responsive.display.modal({ + header: function (row) { + var data = row.data(); + return " " + data[2]; + } + }), + renderer: $.fn.dataTable.Responsive.renderer.tableAll({ + tableClass: 'table' + }), + type: "column" + } + }, + columnDefs: [ + { + targets: 0, + className: 'control', + orderable: false + }, + { + targets: 1, + orderable: false + }, + { + targets: 6, + orderable: false + } + ], + order: [ + [2, 'asc'] + ] +}); \ No newline at end of file