├── LICENSE ├── README.md └── Source ├── Escpos ├── CapabilityProfiles │ ├── AbstractCapabilityProfile.php │ ├── DefaultCapabilityProfile.php │ ├── EposTepCapabilityProfile.php │ ├── P822DCapabilityProfile.php │ ├── SimpleCapabilityProfile.php │ └── StarCapabilityProfile.php ├── CodePage.php ├── EscposImage.php ├── GdEscposImage.php ├── ImagickEscposImage.php ├── NativeEscposImage.php ├── PrintBuffers │ ├── EscposPrintBuffer.php │ ├── ImagePrintBuffer.php │ ├── PrintBuffer.php │ └── cache │ │ ├── Characters-DefaultCapabilityProfile.ser.z │ │ ├── Characters-EposTepCapabilityProfile.ser.z │ │ ├── Characters-P822DCapabilityProfile.ser.z │ │ ├── Characters-SimpleCapabilityProfile.ser.z │ │ └── Characters-StarCapabilityProfile.ser.z ├── PrintConnectors │ ├── CupsPrintConnector.php │ ├── DummyPrintConnector.php │ ├── FilePrintConnector.php │ ├── NetworkPrintConnector.php │ ├── PrintConnector.php │ └── WindowsPrintConnector.php ├── Printer.php └── autoload.php ├── css ├── defaultSelect2Theme │ ├── _multiple.scss │ ├── _single.scss │ └── layout.scss ├── images │ ├── loading_large.gif │ ├── ui-bg_glass_75_d0e5f5_1x400.png │ ├── ui-bg_glass_85_dfeffc_1x400.png │ ├── ui-bg_glass_95_fef1ec_1x400.png │ ├── ui-bg_gloss-wave_55_5c9ccc_500x100.png │ ├── ui-bg_inset-hard_100_f5f8f9_1x100.png │ ├── ui-bg_inset-hard_100_fcfdfd_1x100.png │ ├── ui-icons_217bc0_256x240.png │ ├── ui-icons_2e83ff_256x240.png │ ├── ui-icons_469bdd_256x240.png │ ├── ui-icons_6da8d5_256x240.png │ ├── ui-icons_cd0a0a_256x240.png │ ├── ui-icons_d8e7f3_256x240.png │ └── ui-icons_f9bd01_256x240.png ├── jTable │ ├── basic │ │ ├── close.png │ │ ├── column-asc.png │ │ ├── column-desc.png │ │ ├── column-sortable.png │ │ ├── delete.png │ │ ├── edit.png │ │ ├── jtable_basic.css │ │ ├── jtable_basic.less │ │ └── jtable_basic.min.css │ ├── jqueryui │ │ ├── add.png │ │ ├── bg-thead.png │ │ ├── close.png │ │ ├── column-asc.png │ │ ├── column-desc.png │ │ ├── column-sortable.png │ │ ├── delete.png │ │ ├── edit.png │ │ ├── jtable_jqueryui.css │ │ ├── jtable_jqueryui.less │ │ ├── jtable_jqueryui.min.css │ │ └── loading.gif │ ├── jtable_theme_base.less │ ├── lightcolor │ │ ├── add.png │ │ ├── bg-thead.png │ │ ├── blue │ │ │ ├── jtable.css │ │ │ ├── jtable.less │ │ │ ├── jtable.min.css │ │ │ └── loading.gif │ │ ├── close.png │ │ ├── column-asc.png │ │ ├── column-desc.png │ │ ├── column-sortable.png │ │ ├── delete.png │ │ ├── edit.png │ │ ├── gray │ │ │ ├── jtable.css │ │ │ ├── jtable.less │ │ │ ├── jtable.min.css │ │ │ └── loading.gif │ │ ├── green │ │ │ ├── jtable.css │ │ │ ├── jtable.less │ │ │ ├── jtable.min.css │ │ │ └── loading.gif │ │ ├── jtable_lightcolor_base.less │ │ ├── orange │ │ │ ├── jtable.css │ │ │ ├── jtable.less │ │ │ ├── jtable.min.css │ │ │ └── loading.gif │ │ └── red │ │ │ ├── jtable.css │ │ │ ├── jtable.less │ │ │ ├── jtable.min.css │ │ │ └── loading.gif │ └── metro │ │ ├── add.png │ │ ├── blue │ │ ├── jtable.css │ │ ├── jtable.less │ │ ├── jtable.min.css │ │ └── loading.gif │ │ ├── brown │ │ ├── jtable.css │ │ ├── jtable.less │ │ ├── jtable.min.css │ │ └── loading.gif │ │ ├── close.png │ │ ├── column-asc.png │ │ ├── column-desc.png │ │ ├── column-sortable.png │ │ ├── crimson │ │ ├── jtable.css │ │ ├── jtable.less │ │ ├── jtable.min.css │ │ └── loading.gif │ │ ├── darkgray │ │ ├── jtable.css │ │ ├── jtable.less │ │ ├── jtable.min.css │ │ └── loading.gif │ │ ├── darkorange │ │ ├── jtable.css │ │ ├── jtable.less │ │ ├── jtable.min.css │ │ └── loading.gif │ │ ├── delete.png │ │ ├── edit.png │ │ ├── green │ │ ├── jtable.css │ │ ├── jtable.less │ │ ├── jtable.min.css │ │ └── loading.gif │ │ ├── jtable_metro_base.css │ │ ├── jtable_metro_base.less │ │ ├── jtable_metro_base.min.css │ │ ├── lightgray │ │ ├── jtable.css │ │ ├── jtable.less │ │ ├── jtable.min.css │ │ └── loading.gif │ │ ├── pink │ │ ├── jtable.css │ │ ├── jtable.less │ │ ├── jtable.min.css │ │ └── loading.gif │ │ ├── purple │ │ ├── jtable.css │ │ ├── jtable.less │ │ ├── jtable.min.css │ │ └── loading.gif │ │ └── red │ │ ├── jtable.css │ │ ├── jtable.less │ │ ├── jtable.min.css │ │ └── loading.gif ├── jquery-ui-timepicker-addon.css ├── jquery-ui.css ├── jquery-ui.min.css ├── jquery-ui.structure.css ├── jquery-ui.structure.min.css ├── jquery-ui.theme.css ├── jquery-ui.theme.min.css ├── keyboard.css ├── keyboard.min.css ├── menuTicket.css ├── posButtons.css ├── posTerminal.css └── validationEngine.jquery.css ├── index.html ├── js ├── jquery-ui-timepicker-addon.js ├── jquery-ui.js ├── jquery-ui.min.js ├── jquery.js ├── jquery.jtable.js ├── jquery.keyboard.js ├── jquery.keyboard.min.js ├── jquery.validationEngine-en.js ├── jquery.validationEngine.js ├── jsTree │ ├── intro.js │ ├── jstree.changed.js │ ├── jstree.checkbox.js │ ├── jstree.conditionalselect.js │ ├── jstree.contextmenu.js │ ├── jstree.dnd.js │ ├── jstree.js │ ├── jstree.massload.js │ ├── jstree.min.js │ ├── jstree.search.js │ ├── jstree.sort.js │ ├── jstree.state.js │ ├── jstree.types.js │ ├── jstree.unique.js │ ├── jstree.wholerow.js │ ├── misc.js │ ├── outro.js │ ├── sample.js │ ├── themes │ │ ├── base.less │ │ ├── default-dark │ │ │ ├── 32px.png │ │ │ ├── 40px.png │ │ │ ├── style.css │ │ │ ├── style.less │ │ │ └── throbber.gif │ │ ├── default │ │ │ ├── 32px.png │ │ │ ├── 40px.png │ │ │ ├── style.css │ │ │ ├── style.less │ │ │ └── throbber.gif │ │ ├── main.less │ │ ├── mixins.less │ │ └── responsive.less │ └── vakata-jstree.js ├── menuData.js ├── posAddDropVendorEdit.js ├── posAddDropVendorMgr.js ├── posCashTender.js ├── posCloseReport.js ├── posCloseTillMgr.js ├── posCustomerInputMgr.js ├── posCustomerMgr.js ├── posCustomerSelectMgr.js ├── posDiscountMgr.js ├── posEmployeeMgr.js ├── posKeyboard.js ├── posMainMgr.js ├── posManagerMgr.js ├── posMenuOrderMgr.js ├── posMenuSetupMgr.js ├── posMenuTicketMenuMgr.js ├── posMenuTicketMgr.js ├── posNotInMenuMgr.js ├── posOpenTillMgr.js ├── posOptionsMgr.js ├── posOrderCommentsMgr.js ├── posPaymentMgr.js ├── posProductMgr.js ├── posPushMessages.js ├── posReportMgr.js ├── posTerminal.js ├── posVerifyMgrApproval.js ├── posViewOrderDetailMgr.js ├── posViewOrderEditMgr.js ├── posViewOrdersMgr.js └── sha1.js ├── license.txt ├── pages ├── posAddDropVendorEdit.html ├── posCustomerManager.html ├── posCustomerSelect.html ├── posEmployeeManager.html ├── posMain.html ├── posManager.html ├── posMenuDiscount.html ├── posMenuOrder.html ├── posMenuSetupManager.html ├── posMenuTicket.html ├── posMenuTicketMenu.html ├── posOptionsManager.html ├── posPayment.html ├── posProductManager.html └── posViewOrderManager.html └── scripts ├── TicketPrinter.php ├── archiveDB.php ├── backupDatabases.php ├── backupProgramsToCloud.php ├── backupToCloud.php ├── cashDrawerOpen.bat ├── connectPOS.php ├── createDBs.php ├── customerTable.php ├── desktop.ini ├── employeeTable.php ├── logMessages.php ├── menuTreeActions.php ├── messageManager.php ├── optionsTable.php ├── orderProcessor.php ├── posCloseReport.php ├── posCloseReportPrint.php ├── posTillReportPrint.php ├── printOrder.php ├── productsTable.php ├── reportProcessor.php ├── restoreDatabase.php ├── sampleDBs.php ├── sampleUpdatedDB.php ├── tillManager.php └── tillUsesTable.php /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 PatONeil 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # POS-Terminal 2 | A php, MySQL and Browser implementation of a Point of Sale Terminal 3 | 4 | This POS System is designed for small businesses that want a simple Point of Sale(POS) system. 5 | It is licensed under the terms of the MIT License http://www.opensource.org/licenses/mit-license.php 6 | 7 | It does not do: 8 | - Inventory management although it can track product sales 9 | - time keeping or track tips for employees 10 | - support an integrated credit card reader although it tracks credit card sales. 11 | 12 | It's primary purpose is to provide a simple low cost, high preformance implementation 13 | of a touch screen point of sale terminal and keep track of cash and credit card sales. 14 | 15 | The implementation uses PHP, MySQL and a browser. It is designed for a 1024x768 screen but 16 | is automatically scaled to any screen size in the browser. It can be used from a browser 17 | on a tablet or smart phone however its usability is limited by screen size. 18 | 19 | The report feature provides reports of sales by hour and sales by tracking product 20 | for various time periods and a summary of sales for the last 30 days. Someone familiar 21 | with MySQL could easily add additional reports specific to your company needs. 22 | 23 | It uses the following software packages: jQuery, jQuery-ui, js-tree, jtable, 24 | jQuery-ui timepicker addon, jQuery Validation Engine and escpos for ticket printing. 25 | 26 | While the server can be located a separate system, it is possible to implement 27 | both the server and client (chrome for example) on a POS terminal. 28 | 29 | The implementation is relatively simple: 30 | - Download the code from this web site. 31 | - Install PHP and MySQL on your server. 32 | - Modify connectPOS.php to connect to your database. 33 | - Create the POS database and associated tables using supplied script (createDB.php) 34 | - Start your server and enter the web address of POS folder in your browser. 35 | - Login to the management console using user=Admin and password=123456. 36 | - Enter your company name and other options from the management console 37 | - Enter your employees from the management console. 38 | - Enter the products you want to track from the management console. 39 | - Define the menu structure for your business from the management console 40 | 41 | A sample database is provided which can be loaded using sampleDB.php script. 42 | 43 | The sample system can be seen on http://www.pjoneil.net/POS It is refreshed daily so you are free to try changes you want thru the management console. 44 | -------------------------------------------------------------------------------- /Source/Escpos/CapabilityProfiles/AbstractCapabilityProfile.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\CapabilityProfiles; 14 | 15 | /** 16 | * Not all printers support the same subset of available Esc/POS commands. Profiles allow you to specify 17 | * which features are available on your printer, so that Escpos is less likely to send unsupported commands. 18 | */ 19 | abstract class AbstractCapabilityProfile 20 | { 21 | /** 22 | * Sub-classes must be retrieved via getInstance(), so that validation 23 | * can be attached to guarantee that dud profiles are not used on an Escpos object. 24 | */ 25 | final protected function __construct() 26 | { 27 | // This space intentionally left blank. 28 | } 29 | 30 | /** 31 | * If getSupportedCodePages contains custom code pages, their character maps must be provided here. 32 | */ 33 | abstract public function getCustomCodePages(); 34 | 35 | /** 36 | * Return a map of code page numbers to names for this printer. Names 37 | * should match iconv code page names where possible (non-matching names will not be used). 38 | */ 39 | abstract public function getSupportedCodePages(); 40 | 41 | /** 42 | * True to support barcode "function b", false to use only function A. 43 | */ 44 | abstract public function getSupportsBarcodeB(); 45 | 46 | /** 47 | * True for bitImage support, false for no bitImage support. 48 | */ 49 | abstract public function getSupportsBitImage(); 50 | 51 | /** 52 | * True for graphics support, false for no graphics support. 53 | */ 54 | abstract public function getSupportsGraphics(); 55 | 56 | /** 57 | * True for 'STAR original' commands, false for standard ESC/POS only. 58 | */ 59 | abstract public function getSupportsStarCommands(); 60 | 61 | /** 62 | * True if the printer renders its own QR codes, false to send an image. 63 | */ 64 | abstract public function getSupportsQrCode(); 65 | 66 | /** 67 | * True if printer renders its own PDF417 codes, false to send images 68 | */ 69 | abstract public function getSupportsPdf417Code(); 70 | 71 | /** 72 | * @return AbstractCapabilityProfile Instance of sub-class. 73 | */ 74 | final public static function getInstance() 75 | { 76 | static $profile = array(); 77 | $context = get_called_class(); 78 | if (!isset($profile[$context])) { 79 | $profile[$context] = new static(); 80 | } 81 | return $profile[$context]; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Source/Escpos/CapabilityProfiles/EposTepCapabilityProfile.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\CapabilityProfiles; 14 | 15 | class EposTepCapabilityProfile extends DefaultCapabilityProfile 16 | { 17 | // TODO override list of code pages 18 | } 19 | -------------------------------------------------------------------------------- /Source/Escpos/CapabilityProfiles/P822DCapabilityProfile.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\CapabilityProfiles; 14 | 15 | use Escpos\CodePage; 16 | 17 | /** 18 | * This capability profile is designed for the P-822D. 19 | * 20 | * See 21 | * https://github.com/mike42/escpos-php/issues/50 22 | */ 23 | class P822DCapabilityProfile extends DefaultCapabilityProfile 24 | { 25 | /** 26 | * Map of numbers to supported iconv code page names. 27 | */ 28 | public function getSupportedCodePages() 29 | { 30 | return array( 31 | 0 => CodePage::CP437, 32 | 1 => false, // Katakana 33 | 2 => CodePage::CP850, 34 | 3 => CodePage::CP860, 35 | 4 => CodePage::CP863, 36 | 5 => CodePage::CP865, 37 | 6 => false, // Western Europe 38 | 7 => false, // Greek 39 | 8 => false, // Hebrew 40 | 9 => false, // Eastern europe 41 | 10 => false, // Iran 42 | 16 => CodePage::CP1252 , 43 | 17 => CodePage::CP866 , 44 | 18 => CodePage::CP852 , 45 | 19 => CodePage::CP858, 46 | 20 => false, // Iran II 47 | 21 => false, // latvian 48 | 22 => false, //Arabic 49 | 23 => false, // PT151, 1251 50 | 24 => CodePage::CP747, 51 | 25 => CodePage::CP1257, 52 | 27 => false, // Vietnam, 53 | 28 => CodePage::CP864, 54 | 29 => CodePage::CP1001, 55 | 30 => false, // Uigur 56 | 31 => false, // Hebrew 57 | 32 => CodePage::CP1255, 58 | 33 => CodePage::CP720, 59 | 34 => CodePage::CP1256, 60 | 35 => CodePage::CP1257, 61 | 255 => false, // Thai 62 | 63 | 50 => CodePage::CP437, 64 | 51 => false, // Jatakana, 65 | 52 => CodePage::CP437, 66 | 53 => CodePage::CP858, 67 | 54 => CodePage::CP852, 68 | 55 => CodePage::CP860, 69 | 56 => CodePage::CP861, 70 | 57 => CodePage::CP863, 71 | 58 => CodePage::CP865, 72 | 59 => CodePage::CP866, 73 | 60 => CodePage::CP855, 74 | 61 => CodePage::CP857, 75 | 62 => CodePage::CP862, 76 | 63 => CodePage::CP864, 77 | 64 => CodePage::CP737, 78 | 65 => CodePage::CP851, 79 | 66 => CodePage::CP869, 80 | 67 => CodePage::CP928, 81 | 68 => CodePage::CP772, 82 | 69 => CodePage::CP774, 83 | 70 => CodePage::CP874, 84 | 71 => CodePage::CP1252, 85 | 72 => CodePage::CP1250, 86 | 73 => CodePage::CP1251, 87 | 74 => CodePage::CP3840, 88 | 75 => CodePage::CP3841, 89 | 76 => CodePage::CP3843, 90 | 77 => CodePage::CP3844, 91 | 78 => CodePage::CP3845, 92 | 79 => CodePage::CP3846, 93 | 80 => CodePage::CP3847, 94 | 81 => CodePage::CP3848, 95 | 82 => CodePage::CP1001, 96 | 83 => CodePage::CP2001, 97 | 84 => CodePage::CP3001, 98 | 85 => CodePage::CP3002, 99 | 86 => CodePage::CP3011, 100 | 87 => CodePage::CP3012, 101 | 88 => CodePage::CP3021, 102 | 89 => CodePage::CP3041 103 | ); 104 | } 105 | 106 | /** 107 | * Return true if graphics commands are supported, false if not. 108 | */ 109 | public function getSupportsGraphics() 110 | { 111 | /* Ask the driver to use bitImage wherever possible instead of graphics */ 112 | return false; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /Source/Escpos/CapabilityProfiles/SimpleCapabilityProfile.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\CapabilityProfiles; 14 | 15 | use Escpos\CodePage; 16 | 17 | /** 18 | * This capability profile is designed for non-Epson printers sold online. Without knowing 19 | * their character encoding table, only CP437 output is assumed, and graphics() calls will 20 | * be disabled, as it usually prints junk on these models. 21 | */ 22 | class SimpleCapabilityProfile extends DefaultCapabilityProfile 23 | { 24 | /** 25 | * Map of numbers to supported code pages. 26 | */ 27 | public function getSupportedCodePages() 28 | { 29 | /* Use only CP437 output */ 30 | return array(0 => CodePage::CP437); 31 | } 32 | 33 | /** 34 | * True for PDF417 code support, false if not support. 35 | */ 36 | public function getSupportsPdf417Code() 37 | { 38 | return false; 39 | } 40 | 41 | /** 42 | * True for graphics support, false if not supported. 43 | */ 44 | public function getSupportsGraphics() 45 | { 46 | /* Ask the driver to use bitImage wherever possible instead of graphics */ 47 | return false; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Source/Escpos/CapabilityProfiles/StarCapabilityProfile.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\CapabilityProfiles; 14 | 15 | use Escpos\CodePage; 16 | 17 | /** 18 | * Profile for Star-branded printers. 19 | */ 20 | class StarCapabilityProfile extends DefaultCapabilityProfile 21 | { 22 | /** 23 | * List of custom code pages. 24 | */ 25 | public function getCustomCodePages() 26 | { 27 | // Code table reference: http://www.starmicronics.com/support/mannualfolder/sp2000pm.pdf 28 | return array( 29 | 'CP3011' => "ÇüéâäàåçêëèïîìÄÅ" . 30 | "ÉæÆôöòûùÿÖÜ¢£¥₧ƒ" . 31 | "áíóúñѪº¿⌐¬½¼¡«»" . 32 | "░▒▓│┤Ā╢ņ╕╣║╗╝╜╛┐" . 33 | "└┴┬├─┼ā╟╚╔╩╦╠═╬╧" . 34 | "Š╤čČ╘╒ģĪī┘┌█▄ūŪ▀" . 35 | "αßΓπΣσµτΦΘΩδ∞φε∩" . 36 | "ĒēĢķĶļĻžŽ∙·√Ņš■ ", 37 | 'CP3012' => "АБВГДЕЖЗИЙКЛМНОП" . 38 | "РСТУФХЦЧШЩЪЫЬЭЮЯ" . 39 | "абвгдежзийклмноп" . 40 | "░▒▓│┤Ā╢ņ╕╣║╗╝Ō╛┐" . 41 | "└┴┬├─┼ā╟╚╔╩╦╠═╬╧" . 42 | "Š╤čČ╘╒ģĪī┘┌█▄ūŪ▀" . 43 | "рстуфхцчшщъыьэюя" . 44 | "ĒēĢķĶļĻžŽ∙·√Ņš■ " 45 | ); 46 | } 47 | 48 | /** 49 | * Return map of numbers to supported code page names. 50 | */ 51 | public function getSupportedCodePages() 52 | { 53 | return array( 54 | 0 => CodePage::CP437, // "Normal" 55 | 1 => CodePage::CP437, 56 | 2 => CodePage::CP932, 57 | 3 => CodePage::CP437, 58 | 4 => CodePage::CP858, 59 | 5 => CodePage::CP852, 60 | 6 => CodePage::CP860, 61 | 7 => CodePage::CP861, 62 | 8 => CodePage::CP863, 63 | 9 => CodePage::CP865, 64 | 10 => CodePage::CP866, 65 | 11 => CodePage::CP855, 66 | 12 => CodePage::CP857, 67 | 13 => CodePage::CP862, 68 | 14 => CodePage::CP864, 69 | 15 => CodePage::CP737, 70 | 16 => CodePage::CP851, 71 | 17 => CodePage::CP869, 72 | 18 => CodePage::CP928, 73 | 19 => CodePage::CP772, 74 | 20 => CodePage::CP774, 75 | 21 => CodePage::CP874, 76 | 32 => CodePage::CP1252, 77 | 33 => CodePage::CP1250, 78 | 34 => CodePage::CP1251, 79 | 64 => CodePage::CP3840, 80 | 65 => CodePage::CP3841, 81 | 66 => CodePage::CP3843, 82 | 67 => CodePage::CP3844, 83 | 68 => CodePage::CP3845, 84 | 69 => CodePage::CP3846, 85 | 70 => CodePage::CP3847, 86 | 71 => CodePage::CP3848, 87 | 72 => CodePage::CP1001, 88 | 73 => CodePage::CP2001, 89 | 74 => CodePage::CP3001, 90 | 75 => CodePage::CP3002, 91 | 76 => 'custom:CP3011', 92 | 77 => 'custom:CP3012', 93 | 78 => CodePage::CP3021, 94 | 79 => CodePage::CP3041, 95 | 96 => false, // Thai Character Code 42 96 | 97 => false, // Thai Character Code 11 97 | 98 => false, // Thai Character Code 13 98 | 99 => false, // Thai Character Code 14 99 | 100 => false, // Thai Character Code 16 100 | 101 => false, // Thai Character Code 17 101 | 102 => false, // Thai Character Code 18 102 | 255 => false); 103 | } 104 | 105 | /** 106 | * True for Star command extensions, false if not supported. 107 | */ 108 | public function getSupportsStarCommands() 109 | { 110 | /* Allows Escpos.php to substitute emulated ESC/POS commands with native ones for this printer. */ 111 | return true; 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /Source/Escpos/GdEscposImage.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos; 14 | 15 | use Escpos\EscposImage; 16 | use Exception; 17 | 18 | /** 19 | * Implementation of EscposImage using the GD PHP plugin. 20 | */ 21 | class GdEscposImage extends EscposImage 22 | { 23 | /** 24 | * Load an image from disk, into memory, using GD. 25 | * 26 | * @param string $filename The filename to load from 27 | * @throws Exception if the image format is not supported, 28 | * or the file cannot be opened. 29 | */ 30 | protected function loadImageData($filename = null) 31 | { 32 | if ($filename === null) { 33 | /* Set to blank image */ 34 | return parent::loadImageData($filename); 35 | } 36 | 37 | $ext = pathinfo($filename, PATHINFO_EXTENSION); 38 | switch ($ext) { 39 | case "png": 40 | $im = @imagecreatefrompng($filename); 41 | break; 42 | case "jpg": 43 | $im = @imagecreatefromjpeg($filename); 44 | break; 45 | case "gif": 46 | $im = @imagecreatefromgif($filename); 47 | break; 48 | default: 49 | throw new Exception("Image format not supported in GD"); 50 | } 51 | $this -> readImageFromGdResource($im); 52 | } 53 | 54 | /** 55 | * Load actual image pixels from GD resource. 56 | * 57 | * @param resource $im GD resource to use 58 | * @throws Exception Where the image can't be read. 59 | */ 60 | public function readImageFromGdResource($im) 61 | { 62 | if (!is_resource($im)) { 63 | throw new Exception("Failed to load image."); 64 | } elseif (!EscposImage::isGdLoaded()) { 65 | throw new Exception(__FUNCTION__ . " requires 'gd' extension."); 66 | } 67 | /* Make a string of 1's and 0's */ 68 | $imgHeight = imagesy($im); 69 | $imgWidth = imagesx($im); 70 | $imgData = str_repeat("\0", $imgHeight * $imgWidth); 71 | for ($y = 0; $y < $imgHeight; $y++) { 72 | for ($x = 0; $x < $imgWidth; $x++) { 73 | /* Faster to average channels, blend alpha and negate the image here than via filters (tested!) */ 74 | $cols = imagecolorsforindex($im, imagecolorat($im, $x, $y)); 75 | // 1 for white, 0 for black, ignoring transparency 76 | $greyness = (int)(($cols['red'] + $cols['green'] + $cols['blue']) / 3) >> 7; 77 | // 1 for black, 0 for white, taking into account transparency 78 | $black = (1 - $greyness) >> ($cols['alpha'] >> 6); 79 | $imgData[$y * $imgWidth + $x] = $black; 80 | } 81 | } 82 | $this -> setImgWidth($imgWidth); 83 | $this -> setImgHeight($imgHeight); 84 | $this -> setImgData($imgData); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Source/Escpos/NativeEscposImage.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos; 14 | 15 | use Escpos\EscposImage; 16 | 17 | /** 18 | * Implementation of EscposImage using only native PHP. 19 | * TODO: wbmp, pbm, bmp files. 20 | */ 21 | class NativeEscposImage extends EscposImage 22 | { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Source/Escpos/PrintBuffers/ImagePrintBuffer.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\PrintBuffers; 14 | 15 | use Exception; 16 | use LogicException; 17 | use Escpos\Printer; 18 | use Escpos\EscposImage; 19 | use Escpos\ImagickEscposImage; 20 | 21 | /** 22 | * This class renders text to small images on-the-fly. It attempts to mimic the 23 | * behaviour of text output, whilst supporting any fonts & character encodings 24 | * which your system can handle. This class currently requires Imagick. 25 | */ 26 | class ImagePrintBuffer implements PrintBuffer 27 | { 28 | private $printer; 29 | 30 | private $font; 31 | 32 | private $fontSize; 33 | 34 | public function __construct() 35 | { 36 | if (!EscposImage::isImagickLoaded()) { 37 | throw new Exception("ImagePrintBuffer requires the imagick extension"); 38 | } 39 | $this -> font = null; 40 | $this -> fontSize = 24; 41 | } 42 | 43 | public function flush() 44 | { 45 | if ($this -> printer == null) { 46 | throw new LogicException("Not attached to a printer."); 47 | } 48 | } 49 | 50 | public function getPrinter() 51 | { 52 | return $this -> printer; 53 | } 54 | 55 | public function setPrinter(Printer $printer = null) 56 | { 57 | $this -> printer = $printer; 58 | } 59 | 60 | public function writeText($text) 61 | { 62 | if ($this -> printer == null) { 63 | throw new LogicException("Not attached to a printer."); 64 | } 65 | if ($text == null) { 66 | return; 67 | } 68 | $text = trim($text, "\n"); 69 | /* Create Imagick objects */ 70 | $image = new \Imagick(); 71 | $draw = new \ImagickDraw(); 72 | $color = new \ImagickPixel('#000000'); 73 | $background = new \ImagickPixel('white'); 74 | 75 | /* Create annotation */ 76 | if ($this->font !== null) { 77 | // Allow fallback on defaults as necessary 78 | $draw->setFont($this->font); 79 | } 80 | /* In Arial, size 21 looks good as a substitute for FONT_B, 24 for FONT_A */ 81 | $draw -> setFontSize($this -> fontSize); 82 | $draw -> setFillColor($color); 83 | $draw -> setStrokeAntialias(true); 84 | $draw -> setTextAntialias(true); 85 | $metrics = $image -> queryFontMetrics($draw, $text); 86 | $draw -> annotation(0, $metrics['ascender'], $text); 87 | 88 | /* Create image & draw annotation on it */ 89 | $image -> newImage($metrics['textWidth'], $metrics['textHeight'], $background); 90 | $image -> setImageFormat('png'); 91 | $image -> drawImage($draw); 92 | // debugging if you want to view the images yourself 93 | //$image -> writeImage("test.png"); 94 | 95 | /* Save image */ 96 | $escposImage = new ImagickEscposImage(); 97 | $escposImage -> readImageFromImagick($image); 98 | $size = Printer::IMG_DEFAULT; 99 | $this -> printer -> bitImage($escposImage, $size); 100 | } 101 | 102 | public function writeTextRaw($text) 103 | { 104 | if ($this -> printer == null) { 105 | throw new LogicException("Not attached to a printer."); 106 | } 107 | $this -> printer -> getPrintConnector() -> write($data); 108 | } 109 | 110 | /** 111 | * Set path on disk to TTF font that will be used to render text to image, 112 | * or 'null' to use a default. 113 | * 114 | * ImageMagick will also accept a font name, but this will not port as well 115 | * between systems. 116 | * 117 | * @param string $font 118 | * Font name or a filename 119 | */ 120 | public function setFont($font) 121 | { 122 | $this->font = $font; 123 | } 124 | 125 | /** 126 | * Numeric font size for rendering text to image 127 | */ 128 | public function setFontSize($fontSize) 129 | { 130 | $this->fontSize = $fontSize; 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /Source/Escpos/PrintBuffers/PrintBuffer.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\PrintBuffers; 14 | 15 | use Escpos\Printer; 16 | 17 | /** 18 | * Print buffers manage newlines and character encoding for the target printer. 19 | * They are used as a swappable component: text or image-based output. 20 | * 21 | * - Text output (EscposPrintBuffer) is the fast default, and is recommended for 22 | * most people, as the text output can be more directly manipulated by ESC/POS 23 | * commands. 24 | * - Image output (ImagePrintBuffer) is designed to accept more encodings than the 25 | * physical printer supports, by rendering the text to small images on-the-fly. 26 | * This takes a lot more CPU than sending text, but is necessary for some users. 27 | * - If your use case fits outside these, then a further speed/flexibility trade-off 28 | * can be made by printing directly from generated HTML or PDF. 29 | */ 30 | interface PrintBuffer 31 | { 32 | /** 33 | * Cause the buffer to send any partial input and wait on a newline. 34 | * If the printer is already on a new line, this does nothing. 35 | */ 36 | public function flush(); 37 | 38 | /** 39 | * Used by Escpos to check if a printer is set. 40 | */ 41 | public function getPrinter(); 42 | 43 | /** 44 | * Used by Escpos to hook up one-to-one link between buffers and printers. 45 | * 46 | * @param Escpos $printer New printer 47 | */ 48 | public function setPrinter(Printer $printer = null); 49 | 50 | /** 51 | * Accept UTF-8 text for printing. 52 | * 53 | * @param string $text Text to print 54 | */ 55 | public function writeText($text); 56 | 57 | /** 58 | * Accept 8-bit text in the current encoding and add it to the buffer. 59 | * 60 | * @param string $text Text to print, already the target encoding. 61 | */ 62 | public function writeTextRaw($text); 63 | } 64 | -------------------------------------------------------------------------------- /Source/Escpos/PrintBuffers/cache/Characters-DefaultCapabilityProfile.ser.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/Escpos/PrintBuffers/cache/Characters-DefaultCapabilityProfile.ser.z -------------------------------------------------------------------------------- /Source/Escpos/PrintBuffers/cache/Characters-EposTepCapabilityProfile.ser.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/Escpos/PrintBuffers/cache/Characters-EposTepCapabilityProfile.ser.z -------------------------------------------------------------------------------- /Source/Escpos/PrintBuffers/cache/Characters-P822DCapabilityProfile.ser.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/Escpos/PrintBuffers/cache/Characters-P822DCapabilityProfile.ser.z -------------------------------------------------------------------------------- /Source/Escpos/PrintBuffers/cache/Characters-SimpleCapabilityProfile.ser.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/Escpos/PrintBuffers/cache/Characters-SimpleCapabilityProfile.ser.z -------------------------------------------------------------------------------- /Source/Escpos/PrintBuffers/cache/Characters-StarCapabilityProfile.ser.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/Escpos/PrintBuffers/cache/Characters-StarCapabilityProfile.ser.z -------------------------------------------------------------------------------- /Source/Escpos/PrintConnectors/DummyPrintConnector.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\PrintConnectors; 14 | 15 | /** 16 | * Print connector that writes to nowhere, but allows the user to retrieve the 17 | * buffered data. Used for testing. 18 | */ 19 | final class DummyPrintConnector implements PrintConnector 20 | { 21 | /** 22 | * @var array $buffer 23 | * Buffer of accumilated data. 24 | */ 25 | private $buffer; 26 | 27 | /** 28 | * @var string data which the printer will provide on next read 29 | */ 30 | private $readData; 31 | 32 | /** 33 | * Create new print connector 34 | */ 35 | public function __construct() 36 | { 37 | $this -> buffer = array(); 38 | } 39 | 40 | public function __destruct() 41 | { 42 | if ($this -> buffer !== null) { 43 | trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); 44 | } 45 | } 46 | 47 | public function finalize() 48 | { 49 | $this -> buffer = null; 50 | } 51 | 52 | /** 53 | * @return string Get the accumulated data that has been sent to this buffer. 54 | */ 55 | public function getData() 56 | { 57 | return implode($this -> buffer); 58 | } 59 | 60 | /** 61 | * {@inheritDoc} 62 | * @see PrintConnector::read() 63 | */ 64 | public function read($len) 65 | { 66 | return $len >= strlen($this -> readData) ? $this -> readData : substr($this -> readData, 0, $len); 67 | } 68 | 69 | public function write($data) 70 | { 71 | $this -> buffer[] = $data; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Source/Escpos/PrintConnectors/FilePrintConnector.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\PrintConnectors; 14 | 15 | use Exception; 16 | 17 | /** 18 | * PrintConnector for passing print data to a file. 19 | */ 20 | class FilePrintConnector implements PrintConnector 21 | { 22 | /** 23 | * @var resource $fp 24 | * The file pointer to send data to. 25 | */ 26 | protected $fp; 27 | 28 | /** 29 | * Construct new connector, given a filename 30 | * 31 | * @param string $filename 32 | */ 33 | public function __construct($filename) 34 | { 35 | $this -> fp = fopen($filename, "wb+"); 36 | if ($this -> fp === false) { 37 | throw new Exception("Cannot initialise FilePrintConnector."); 38 | } 39 | } 40 | 41 | public function __destruct() 42 | { 43 | if ($this -> fp !== false) { 44 | trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); 45 | } 46 | } 47 | 48 | /** 49 | * Close file pointer 50 | */ 51 | public function finalize() 52 | { 53 | fclose($this -> fp); 54 | $this -> fp = false; 55 | } 56 | 57 | /* (non-PHPdoc) 58 | * @see PrintConnector::read() 59 | */ 60 | public function read($len) 61 | { 62 | return fread($this -> fp, $len); 63 | } 64 | 65 | /** 66 | * Write data to the file 67 | * 68 | * @param string $data 69 | */ 70 | public function write($data) 71 | { 72 | fwrite($this -> fp, $data); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Source/Escpos/PrintConnectors/NetworkPrintConnector.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\PrintConnectors; 14 | 15 | use Exception; 16 | 17 | /** 18 | * PrintConnector for directly opening a network socket to a printer to send it commands. 19 | */ 20 | class NetworkPrintConnector extends FilePrintConnector 21 | { 22 | /** 23 | * Construct a new NetworkPrintConnector 24 | * 25 | * @param string $ip IP address or hostname to use. 26 | * @param string $port The port number to connect on. 27 | * @throws Exception Where the socket cannot be opened. 28 | */ 29 | public function __construct($ip, $port = "9100") 30 | { 31 | $this -> fp = @fsockopen($ip, $port, $errno, $errstr); 32 | if ($this -> fp === false) { 33 | throw new Exception("Cannot initialise NetworkPrintConnector: " . $errstr); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Source/Escpos/PrintConnectors/PrintConnector.php: -------------------------------------------------------------------------------- 1 | , 7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list. 8 | * 9 | * This software is distributed under the terms of the MIT license. See LICENSE.md 10 | * for details. 11 | */ 12 | 13 | namespace Escpos\PrintConnectors; 14 | 15 | /** 16 | * Interface passed to Escpos class for receiving print data. Print connectors 17 | * are responsible for transporting this to the actual printer. 18 | */ 19 | interface PrintConnector 20 | { 21 | /** 22 | * Print connectors should cause a NOTICE if they are deconstructed 23 | * when they have not been finalized. 24 | */ 25 | public function __destruct(); 26 | 27 | /** 28 | * Finish using this print connector (close file, socket, send 29 | * accumulated output, etc). 30 | */ 31 | public function finalize(); 32 | 33 | /** 34 | * Read data from the printer. 35 | * 36 | * @param string $len Length of data to read. 37 | * @return Data read from the printer, or false where reading is not possible. 38 | */ 39 | public function read($len); 40 | 41 | /** 42 | * Write data to the print connector. 43 | * 44 | * @param string $data The data to write 45 | */ 46 | public function write($data); 47 | } 48 | -------------------------------------------------------------------------------- /Source/Escpos/autoload.php: -------------------------------------------------------------------------------- 1 | Not in class, $class"; 20 | return; 21 | } 22 | 23 | /* Require the file if it exists */ 24 | $relative_class = substr ( $class, $len ); 25 | $file = $base_dir . str_replace ( '\\', '/', $relative_class ) . '.php'; 26 | if (file_exists ( $file )) { 27 | require $file; 28 | } 29 | } ); 30 | -------------------------------------------------------------------------------- /Source/css/defaultSelect2Theme/_multiple.scss: -------------------------------------------------------------------------------- 1 | .select2-selection--multiple { 2 | background-color: white; 3 | border: 1px solid #aaa; 4 | border-radius: 4px; 5 | cursor: text; 6 | 7 | .select2-selection__rendered { 8 | box-sizing: border-box; 9 | list-style: none; 10 | margin: 0; 11 | padding: 0 5px; 12 | width: 100%; 13 | 14 | li { 15 | list-style: none; 16 | } 17 | } 18 | 19 | .select2-selection__placeholder { 20 | color: #999; 21 | 22 | margin-top: 5px; 23 | 24 | float: left; 25 | } 26 | 27 | .select2-selection__clear { 28 | cursor: pointer; 29 | float: right; 30 | font-weight: bold; 31 | margin-top: 5px; 32 | margin-right: 10px; 33 | } 34 | 35 | .select2-selection__choice { 36 | background-color: #e4e4e4; 37 | 38 | border: 1px solid #aaa; 39 | border-radius: 4px; 40 | cursor: default; 41 | 42 | float: left; 43 | 44 | margin-right: 5px; 45 | margin-top: 5px; 46 | padding: 0 5px; 47 | } 48 | 49 | .select2-selection__choice__remove { 50 | color: #999; 51 | cursor: pointer; 52 | 53 | display: inline-block; 54 | font-weight: bold; 55 | 56 | margin-right: 2px; 57 | 58 | &:hover { 59 | color: #333; 60 | } 61 | } 62 | } 63 | 64 | &[dir="rtl"] { 65 | .select2-selection--multiple { 66 | .select2-selection__choice, .select2-selection__placeholder, .select2-search--inline { 67 | float: right; 68 | } 69 | 70 | .select2-selection__choice { 71 | margin-left: 5px; 72 | margin-right: auto; 73 | } 74 | 75 | .select2-selection__choice__remove { 76 | margin-left: 2px; 77 | margin-right: auto; 78 | } 79 | } 80 | } 81 | 82 | &.select2-container--focus { 83 | .select2-selection--multiple { 84 | border: solid black 1px; 85 | outline: 0; 86 | } 87 | } 88 | 89 | &.select2-container--disabled { 90 | .select2-selection--multiple { 91 | background-color: #eee; 92 | cursor: default; 93 | } 94 | 95 | .select2-selection__choice__remove { 96 | display: none; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Source/css/defaultSelect2Theme/_single.scss: -------------------------------------------------------------------------------- 1 | .select2-selection--single { 2 | background-color: #fff; 3 | border: 1px solid #aaa; 4 | border-radius: 4px; 5 | 6 | .select2-selection__rendered { 7 | color: #444; 8 | line-height: 28px; 9 | } 10 | 11 | .select2-selection__clear { 12 | cursor: pointer; 13 | float: right; 14 | font-weight: bold; 15 | } 16 | 17 | .select2-selection__placeholder { 18 | color: #999; 19 | } 20 | 21 | .select2-selection__arrow { 22 | height: 26px; 23 | 24 | position: absolute; 25 | 26 | top: 1px; 27 | right: 1px; 28 | 29 | width: 20px; 30 | 31 | b { 32 | border-color: #888 transparent transparent transparent; 33 | border-style: solid; 34 | border-width: 5px 4px 0 4px; 35 | 36 | height: 0; 37 | left: 50%; 38 | 39 | margin-left: -4px; 40 | margin-top: -2px; 41 | 42 | position: absolute; 43 | 44 | top: 50%; 45 | width: 0; 46 | } 47 | } 48 | } 49 | 50 | &[dir="rtl"] { 51 | .select2-selection--single { 52 | .select2-selection__clear { 53 | float: left; 54 | } 55 | 56 | .select2-selection__arrow { 57 | left: 1px; 58 | right: auto; 59 | } 60 | } 61 | } 62 | 63 | &.select2-container--disabled { 64 | .select2-selection--single { 65 | background-color: #eee; 66 | cursor: default; 67 | 68 | .select2-selection__clear { 69 | display: none; 70 | } 71 | } 72 | } 73 | 74 | &.select2-container--open { 75 | .select2-selection--single { 76 | .select2-selection__arrow { 77 | b { 78 | border-color: transparent transparent #888 transparent; 79 | border-width: 0 4px 5px 4px; 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Source/css/defaultSelect2Theme/layout.scss: -------------------------------------------------------------------------------- 1 | .select2-container--default { 2 | @import "single"; 3 | @import "multiple"; 4 | 5 | &.select2-container--open.select2-container--above { 6 | .select2-selection--single, .select2-selection--multiple { 7 | border-top-left-radius: 0; 8 | border-top-right-radius: 0; 9 | } 10 | } 11 | 12 | &.select2-container--open.select2-container--below { 13 | .select2-selection--single, .select2-selection--multiple { 14 | border-bottom-left-radius: 0; 15 | border-bottom-right-radius: 0; 16 | } 17 | } 18 | 19 | .select2-search--dropdown { 20 | .select2-search__field { 21 | border: 1px solid #aaa; 22 | } 23 | } 24 | 25 | .select2-search--inline { 26 | .select2-search__field { 27 | background: transparent; 28 | border: none; 29 | outline: 0; 30 | box-shadow: none; 31 | -webkit-appearance: textfield; 32 | } 33 | } 34 | 35 | .select2-results > .select2-results__options { 36 | max-height: 200px; 37 | overflow-y: auto; 38 | } 39 | 40 | .select2-results__option { 41 | &[role=group] { 42 | padding: 0; 43 | } 44 | 45 | &[aria-disabled=true] { 46 | color: #999; 47 | } 48 | 49 | &[aria-selected=true] { 50 | background-color: #ddd; 51 | } 52 | 53 | .select2-results__option { 54 | padding-left: 1em; 55 | 56 | .select2-results__group { 57 | padding-left: 0; 58 | } 59 | 60 | .select2-results__option { 61 | margin-left: -1em; 62 | padding-left: 2em; 63 | 64 | .select2-results__option { 65 | margin-left: -2em; 66 | padding-left: 3em; 67 | 68 | .select2-results__option { 69 | margin-left: -3em; 70 | padding-left: 4em; 71 | 72 | .select2-results__option { 73 | margin-left: -4em; 74 | padding-left: 5em; 75 | 76 | .select2-results__option { 77 | margin-left: -5em; 78 | padding-left: 6em; 79 | } 80 | } 81 | } 82 | } 83 | } 84 | } 85 | } 86 | 87 | .select2-results__option--highlighted[aria-selected] { 88 | background-color: #5897fb; 89 | color: white; 90 | } 91 | 92 | .select2-results__group { 93 | cursor: default; 94 | display: block; 95 | padding: 6px; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /Source/css/images/loading_large.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/loading_large.gif -------------------------------------------------------------------------------- /Source/css/images/ui-bg_glass_75_d0e5f5_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-bg_glass_75_d0e5f5_1x400.png -------------------------------------------------------------------------------- /Source/css/images/ui-bg_glass_85_dfeffc_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-bg_glass_85_dfeffc_1x400.png -------------------------------------------------------------------------------- /Source/css/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /Source/css/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png -------------------------------------------------------------------------------- /Source/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png -------------------------------------------------------------------------------- /Source/css/images/ui-bg_inset-hard_100_fcfdfd_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-bg_inset-hard_100_fcfdfd_1x100.png -------------------------------------------------------------------------------- /Source/css/images/ui-icons_217bc0_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-icons_217bc0_256x240.png -------------------------------------------------------------------------------- /Source/css/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /Source/css/images/ui-icons_469bdd_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-icons_469bdd_256x240.png -------------------------------------------------------------------------------- /Source/css/images/ui-icons_6da8d5_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-icons_6da8d5_256x240.png -------------------------------------------------------------------------------- /Source/css/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /Source/css/images/ui-icons_d8e7f3_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-icons_d8e7f3_256x240.png -------------------------------------------------------------------------------- /Source/css/images/ui-icons_f9bd01_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/images/ui-icons_f9bd01_256x240.png -------------------------------------------------------------------------------- /Source/css/jTable/basic/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/basic/close.png -------------------------------------------------------------------------------- /Source/css/jTable/basic/column-asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/basic/column-asc.png -------------------------------------------------------------------------------- /Source/css/jTable/basic/column-desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/basic/column-desc.png -------------------------------------------------------------------------------- /Source/css/jTable/basic/column-sortable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/basic/column-sortable.png -------------------------------------------------------------------------------- /Source/css/jTable/basic/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/basic/delete.png -------------------------------------------------------------------------------- /Source/css/jTable/basic/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/basic/edit.png -------------------------------------------------------------------------------- /Source/css/jTable/basic/jtable_basic.less: -------------------------------------------------------------------------------- 1 | /* These file is a start point for who wants to create a fully custom 2 | * theme for jTable. jtable_theme_base.less (or css) file is needed 3 | * for functionality of jTable. This file does not add any color or shape 4 | * modifications. It just shows how to set icons. You can change them too. 5 | * Halil ibrahim Kalkan / http://www.jtable.org 6 | */ 7 | 8 | @import "../jtable_theme_base.less"; 9 | 10 | .jtable_theme_base; 11 | 12 | div.jtable-main-container 13 | { 14 | div.jtable-title 15 | { 16 | div.jtable-title-text 17 | { 18 | font-size: 16px; 19 | font-weight: bold; 20 | } 21 | 22 | .jtable-close-button 23 | { 24 | background: url('close.png') no-repeat; 25 | width: 16px; 26 | height: 16px; 27 | } 28 | } 29 | 30 | table.jtable 31 | { 32 | thead 33 | { 34 | th 35 | { 36 | &.jtable-column-header-sortable div.jtable-column-header-container 37 | { 38 | background: url('column-sortable.png') no-repeat right; 39 | } 40 | 41 | &.jtable-column-header-sorted-asc div.jtable-column-header-container 42 | { 43 | background: url('column-asc.png') no-repeat right; 44 | } 45 | 46 | &.jtable-column-header-sorted-desc div.jtable-column-header-container 47 | { 48 | background: url('column-desc.png') no-repeat right; 49 | } 50 | } 51 | } 52 | 53 | tbody 54 | { 55 | > tr 56 | { 57 | > td 58 | { 59 | .jtable-edit-command-button 60 | { 61 | background: url('edit.png') no-repeat; 62 | width: 16px; 63 | height: 16px; 64 | } 65 | 66 | .jtable-delete-command-button 67 | { 68 | background: url('delete.png') no-repeat; 69 | width: 16px; 70 | height: 16px; 71 | } 72 | } 73 | } 74 | } 75 | } 76 | } 77 | 78 | div.jtable-busy-message 79 | { 80 | color: #000; 81 | background-color: #ddd; 82 | font-size: 1.25em; 83 | } 84 | -------------------------------------------------------------------------------- /Source/css/jTable/jqueryui/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/jqueryui/add.png -------------------------------------------------------------------------------- /Source/css/jTable/jqueryui/bg-thead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/jqueryui/bg-thead.png -------------------------------------------------------------------------------- /Source/css/jTable/jqueryui/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/jqueryui/close.png -------------------------------------------------------------------------------- /Source/css/jTable/jqueryui/column-asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/jqueryui/column-asc.png -------------------------------------------------------------------------------- /Source/css/jTable/jqueryui/column-desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/jqueryui/column-desc.png -------------------------------------------------------------------------------- /Source/css/jTable/jqueryui/column-sortable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/jqueryui/column-sortable.png -------------------------------------------------------------------------------- /Source/css/jTable/jqueryui/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/jqueryui/delete.png -------------------------------------------------------------------------------- /Source/css/jTable/jqueryui/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/jqueryui/edit.png -------------------------------------------------------------------------------- /Source/css/jTable/jqueryui/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/jqueryui/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/add.png -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/bg-thead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/bg-thead.png -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/blue/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable light color theme - Blue 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_lightcolor_base.less"; 7 | 8 | @theme-folder: 'blue'; 9 | 10 | .jtable_lightcolor_base(@theme-folder); 11 | 12 | div.jtable-main-container 13 | { 14 | div.jtable-title 15 | { 16 | .vertical-gradient(#78b1ed,#417bb5); 17 | border-color: #2B5177; 18 | 19 | div.jtable-title-text 20 | { 21 | .text-shadow(0 1px 0 #666); 22 | color: #fff; 23 | } 24 | 25 | div.jtable-toolbar 26 | { 27 | span.jtable-toolbar-item 28 | { 29 | color: white; 30 | 31 | &.jtable-toolbar-item-hover 32 | { 33 | background-color: #417bb5; 34 | } 35 | } 36 | } 37 | } 38 | 39 | table.jtable 40 | { 41 | tbody 42 | { 43 | > tr 44 | { 45 | @highlight-color:#5f9cdc; 46 | 47 | &.jtable-row-selected, 48 | &.jtable-row-selected:hover 49 | { 50 | background-color: @highlight-color; 51 | } 52 | 53 | &.jtable-row-created, 54 | &.jtable-row-updated, 55 | &.jtable-row-deleting 56 | { 57 | background-color: @highlight-color; 58 | } 59 | } 60 | } 61 | } 62 | 63 | div.jtable-bottom-panel 64 | { 65 | .jtable-page-list 66 | { 67 | .jtable-page-number-active,.jtable-page-number-active:hover 68 | { 69 | @bgcolor: #2B5177; 70 | 71 | background-color: @bgcolor; 72 | border-color: @bgcolor - #222; 73 | } 74 | } 75 | 76 | span.jtable-add-record 77 | { 78 | a 79 | { 80 | color: #2B5177; 81 | } 82 | } 83 | } 84 | } 85 | 86 | div.jtable-busy-message 87 | { 88 | border-color: #2B5177; 89 | background-color: #78B1ED; 90 | } -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/blue/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/blue/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/close.png -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/column-asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/column-asc.png -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/column-desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/column-desc.png -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/column-sortable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/column-sortable.png -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/delete.png -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/edit.png -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/gray/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable light color theme - Gray 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_lightcolor_base.less"; 7 | 8 | @theme-folder: 'gray'; 9 | 10 | .jtable_lightcolor_base(@theme-folder); 11 | 12 | div.jtable-main-container 13 | { 14 | div.jtable-title 15 | { 16 | .vertical-gradient(#e8e8e8,#bababa); 17 | border-color: #949494; 18 | 19 | div.jtable-title-text 20 | { 21 | .text-shadow(0 1px 0 #fff); 22 | color: #000; 23 | } 24 | 25 | div.jtable-toolbar 26 | { 27 | span.jtable-toolbar-item 28 | { 29 | color: black; 30 | 31 | &.jtable-toolbar-item-hover 32 | { 33 | background-color: #a8a8a8; 34 | } 35 | } 36 | } 37 | } 38 | 39 | table.jtable 40 | { 41 | tbody 42 | { 43 | > tr 44 | { 45 | @highlight-color:#8e8e8e; 46 | 47 | &.jtable-row-selected, 48 | &.jtable-row-selected:hover 49 | { 50 | background-color: @highlight-color; 51 | } 52 | 53 | &.jtable-row-created, 54 | &.jtable-row-updated, 55 | &.jtable-row-deleting 56 | { 57 | background-color: @highlight-color; 58 | } 59 | } 60 | } 61 | } 62 | 63 | div.jtable-bottom-panel 64 | { 65 | .jtable-page-list 66 | { 67 | .jtable-page-number-active,.jtable-page-number-active:hover 68 | { 69 | @bgcolor: #8e8e8e; 70 | 71 | background-color: @bgcolor; 72 | border-color: @bgcolor - #222; 73 | } 74 | } 75 | 76 | span.jtable-add-record 77 | { 78 | a 79 | { 80 | color: #5f5f5f; 81 | } 82 | } 83 | } 84 | } 85 | 86 | div.jtable-busy-message 87 | { 88 | border-color: #5f5f5f; 89 | background-color: #8e8e8e; 90 | } -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/gray/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/gray/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/green/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable light color theme - Green 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_lightcolor_base.less"; 7 | 8 | @theme-folder: 'green'; 9 | 10 | .jtable_lightcolor_base(@theme-folder); 11 | 12 | div.jtable-main-container 13 | { 14 | div.jtable-title 15 | { 16 | .vertical-gradient(#72eb65,#1e9d0d); 17 | border-color: #167509; 18 | 19 | div.jtable-title-text 20 | { 21 | .text-shadow(0 1px 0 #666); 22 | color: #fff; 23 | } 24 | 25 | div.jtable-toolbar 26 | { 27 | span.jtable-toolbar-item 28 | { 29 | color: white; 30 | 31 | &.jtable-toolbar-item-hover 32 | { 33 | background-color: #208b10; 34 | } 35 | } 36 | } 37 | } 38 | 39 | table.jtable 40 | { 41 | tbody 42 | { 43 | > tr 44 | { 45 | @highlight-color:#33b326; 46 | 47 | &.jtable-row-selected, 48 | &.jtable-row-selected:hover 49 | { 50 | background-color: @highlight-color; 51 | } 52 | 53 | &.jtable-row-created, 54 | &.jtable-row-updated, 55 | &.jtable-row-deleting 56 | { 57 | background-color: @highlight-color; 58 | } 59 | } 60 | } 61 | } 62 | 63 | div.jtable-bottom-panel 64 | { 65 | .jtable-page-list 66 | { 67 | .jtable-page-number-active,.jtable-page-number-active:hover 68 | { 69 | @bgcolor: #42d033; 70 | 71 | background-color: @bgcolor; 72 | border-color: @bgcolor - #222; 73 | } 74 | } 75 | 76 | span.jtable-add-record 77 | { 78 | a 79 | { 80 | color: #167509; 81 | } 82 | } 83 | } 84 | } 85 | 86 | div.jtable-busy-message 87 | { 88 | border-color: #167509; 89 | background-color: #42d033; 90 | } -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/green/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/green/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/orange/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable light color theme - Orange 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_lightcolor_base.less"; 7 | 8 | @theme-folder: 'orange'; 9 | 10 | .jtable_lightcolor_base(@theme-folder); 11 | 12 | div.jtable-main-container 13 | { 14 | div.jtable-title 15 | { 16 | .vertical-gradient(#ffa366,#da5700); 17 | border-color: #804620; 18 | 19 | div.jtable-title-text 20 | { 21 | .text-shadow(0 1px 0 #666); 22 | color: #fff; 23 | } 24 | 25 | div.jtable-toolbar 26 | { 27 | span.jtable-toolbar-item 28 | { 29 | color: white; 30 | 31 | &.jtable-toolbar-item-hover 32 | { 33 | background-color: #c45206; 34 | } 35 | } 36 | } 37 | } 38 | 39 | table.jtable 40 | { 41 | tbody 42 | { 43 | > tr 44 | { 45 | @highlight-color:#F36301; 46 | 47 | &.jtable-row-selected, 48 | &.jtable-row-selected:hover 49 | { 50 | background-color: @highlight-color; 51 | } 52 | 53 | &.jtable-row-created, 54 | &.jtable-row-updated, 55 | &.jtable-row-deleting 56 | { 57 | background-color: @highlight-color; 58 | } 59 | } 60 | } 61 | } 62 | 63 | div.jtable-bottom-panel 64 | { 65 | .jtable-page-list 66 | { 67 | .jtable-page-number-active,.jtable-page-number-active:hover 68 | { 69 | @bgcolor: #f36301; 70 | 71 | background-color: @bgcolor; 72 | border-color: @bgcolor - #222; 73 | } 74 | } 75 | 76 | span.jtable-add-record 77 | { 78 | a 79 | { 80 | color: #cc5200; 81 | } 82 | } 83 | } 84 | } 85 | 86 | div.jtable-busy-message 87 | { 88 | border-color: #a14100; 89 | background-color: #f36301; 90 | } -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/orange/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/orange/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/red/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable light color theme - Red 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_lightcolor_base.less"; 7 | 8 | @theme-folder: 'red'; 9 | 10 | .jtable_lightcolor_base(@theme-folder); 11 | 12 | div.jtable-main-container 13 | { 14 | div.jtable-title 15 | { 16 | .vertical-gradient(#eb6565,#9d0d0d); 17 | border-color: #772b2b; 18 | 19 | div.jtable-title-text 20 | { 21 | .text-shadow(0 1px 0 #666); 22 | color: #fff; 23 | } 24 | 25 | div.jtable-toolbar 26 | { 27 | span.jtable-toolbar-item 28 | { 29 | color: white; 30 | 31 | &.jtable-toolbar-item-hover 32 | { 33 | background-color: #9a1414; 34 | } 35 | } 36 | } 37 | } 38 | 39 | table.jtable 40 | { 41 | tbody 42 | { 43 | > tr 44 | { 45 | @highlight-color:#ea2a2a; 46 | 47 | &.jtable-row-selected, 48 | &.jtable-row-selected:hover 49 | { 50 | background-color: @highlight-color; 51 | } 52 | 53 | &.jtable-row-created, 54 | &.jtable-row-updated, 55 | &.jtable-row-deleting 56 | { 57 | background-color: @highlight-color; 58 | } 59 | } 60 | } 61 | } 62 | 63 | div.jtable-bottom-panel 64 | { 65 | .jtable-page-list 66 | { 67 | .jtable-page-number-active,.jtable-page-number-active:hover 68 | { 69 | @bgcolor: #b11515; 70 | 71 | background-color: @bgcolor; 72 | border-color: @bgcolor - #222; 73 | } 74 | } 75 | 76 | span.jtable-add-record 77 | { 78 | a 79 | { 80 | color: #772b2b; 81 | } 82 | } 83 | } 84 | } 85 | 86 | div.jtable-busy-message 87 | { 88 | border-color: #772b2b; 89 | background-color: #ea2a2a; 90 | } -------------------------------------------------------------------------------- /Source/css/jTable/lightcolor/red/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/lightcolor/red/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/metro/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/add.png -------------------------------------------------------------------------------- /Source/css/jTable/metro/blue/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable metro style theme - Blue 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_metro_base.less"; 7 | 8 | @theme-folder: 'blue'; 9 | @main-theme-color: #2D89EF; 10 | 11 | .jtable_metro_base(@theme-folder, @main-theme-color); -------------------------------------------------------------------------------- /Source/css/jTable/metro/blue/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/blue/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/metro/brown/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable metro style theme - Brown 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_metro_base.less"; 7 | 8 | @theme-folder:'brown'; 9 | @main-theme-color: #835a2c; 10 | 11 | .jtable_metro_base(@theme-folder, @main-theme-color); -------------------------------------------------------------------------------- /Source/css/jTable/metro/brown/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/brown/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/metro/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/close.png -------------------------------------------------------------------------------- /Source/css/jTable/metro/column-asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/column-asc.png -------------------------------------------------------------------------------- /Source/css/jTable/metro/column-desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/column-desc.png -------------------------------------------------------------------------------- /Source/css/jTable/metro/column-sortable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/column-sortable.png -------------------------------------------------------------------------------- /Source/css/jTable/metro/crimson/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable metro style theme - Crimson 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_metro_base.less"; 7 | 8 | @theme-folder:'crimson'; 9 | @main-theme-color: #c30000; 10 | 11 | .jtable_metro_base(@theme-folder, @main-theme-color); -------------------------------------------------------------------------------- /Source/css/jTable/metro/crimson/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/crimson/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/metro/darkgray/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable metro style theme - Dark gray 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_metro_base.less"; 7 | 8 | @theme-folder:'darkgray'; 9 | @main-theme-color: #454545; 10 | 11 | .jtable_metro_base(@theme-folder, @main-theme-color); -------------------------------------------------------------------------------- /Source/css/jTable/metro/darkgray/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/darkgray/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/metro/darkorange/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable metro style theme - Dark orange 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_metro_base.less"; 7 | 8 | @theme-folder:'darkorange'; 9 | @main-theme-color: #da532c; 10 | 11 | .jtable_metro_base(@theme-folder, @main-theme-color); -------------------------------------------------------------------------------- /Source/css/jTable/metro/darkorange/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/darkorange/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/metro/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/delete.png -------------------------------------------------------------------------------- /Source/css/jTable/metro/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/edit.png -------------------------------------------------------------------------------- /Source/css/jTable/metro/green/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable metro style theme - Green 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_metro_base.less"; 7 | 8 | @theme-folder:'green'; 9 | @main-theme-color: #00a300; 10 | 11 | .jtable_metro_base(@theme-folder, @main-theme-color); -------------------------------------------------------------------------------- /Source/css/jTable/metro/green/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/green/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/metro/jtable_metro_base.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Open Sans'; 3 | font-style: normal; 4 | font-weight: 300; 5 | src: local('Open Sans Light'), local('OpenSans-Light'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTRa1RVmPjeKy21_GQJaLlJI.woff) format('woff'); 6 | } 7 | @font-face { 8 | font-family: 'Open Sans'; 9 | font-style: italic; 10 | font-weight: 300; 11 | src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxrsuoFAk0leveMLeqYtnfAY.woff) format('woff'); 12 | } 13 | @font-face { 14 | font-family: 'Open Sans'; 15 | font-style: normal; 16 | font-weight: 400; 17 | src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/u-WUoqrET9fUeobQW7jkRT8E0i7KZn-EPnyo3HZu7kw.woff) format('woff'); 18 | } 19 | @font-face { 20 | font-family: 'Open Sans'; 21 | font-style: italic; 22 | font-weight: 400; 23 | src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/xjAJXh38I15wypJXxuGMBtIh4imgI8P11RFo6YPCPC0.woff) format('woff'); 24 | } 25 | @font-face { 26 | font-family: 'Open Sans'; 27 | font-style: normal; 28 | font-weight: 600; 29 | src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNSha1RVmPjeKy21_GQJaLlJI.woff) format('woff'); 30 | } 31 | @font-face { 32 | font-family: 'Open Sans'; 33 | font-style: italic; 34 | font-weight: 600; 35 | src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxmWeb5PoA5ztb49yLyUzH1A.woff) format('woff'); 36 | } 37 | @font-face { 38 | font-family: 'Open Sans'; 39 | font-style: normal; 40 | font-weight: 700; 41 | src: local('Open Sans Bold'), local('OpenSans-Bold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/k3k702ZOKiLJc3WVjuplzBa1RVmPjeKy21_GQJaLlJI.woff) format('woff'); 42 | } 43 | @font-face { 44 | font-family: 'Open Sans'; 45 | font-style: italic; 46 | font-weight: 700; 47 | src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxoUt79146ZFaIJxILcpzmhI.woff) format('woff'); 48 | } 49 | -------------------------------------------------------------------------------- /Source/css/jTable/metro/jtable_metro_base.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTRa1RVmPjeKy21_GQJaLlJI.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300;src:local('Open Sans Light Italic'),local('OpenSansLight-Italic'),url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxrsuoFAk0leveMLeqYtnfAY.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(http://themes.googleusercontent.com/static/fonts/opensans/v6/u-WUoqrET9fUeobQW7jkRT8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(http://themes.googleusercontent.com/static/fonts/opensans/v6/xjAJXh38I15wypJXxuGMBtIh4imgI8P11RFo6YPCPC0.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local('Open Sans Semibold'),local('OpenSans-Semibold'),url(http://themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNSha1RVmPjeKy21_GQJaLlJI.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:600;src:local('Open Sans Semibold Italic'),local('OpenSans-SemiboldItalic'),url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxmWeb5PoA5ztb49yLyUzH1A.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(http://themes.googleusercontent.com/static/fonts/opensans/v6/k3k702ZOKiLJc3WVjuplzBa1RVmPjeKy21_GQJaLlJI.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:700;src:local('Open Sans Bold Italic'),local('OpenSans-BoldItalic'),url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxoUt79146ZFaIJxILcpzmhI.woff) format('woff')} -------------------------------------------------------------------------------- /Source/css/jTable/metro/lightgray/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable metro style theme - Light gray 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_metro_base.less"; 7 | 8 | @theme-folder:'lightgray'; 9 | @main-theme-color: #707070; 10 | 11 | .jtable_metro_base(@theme-folder, @main-theme-color); -------------------------------------------------------------------------------- /Source/css/jTable/metro/lightgray/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/lightgray/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/metro/pink/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable metro style theme - Pink 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_metro_base.less"; 7 | 8 | @theme-folder:'pink'; 9 | @main-theme-color: #9f00a7; 10 | 11 | .jtable_metro_base(@theme-folder, @main-theme-color); -------------------------------------------------------------------------------- /Source/css/jTable/metro/pink/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/pink/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/metro/purple/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable metro style theme - Purple 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_metro_base.less"; 7 | 8 | @theme-folder:'purple'; 9 | @main-theme-color: #603cba; 10 | 11 | .jtable_metro_base(@theme-folder, @main-theme-color); -------------------------------------------------------------------------------- /Source/css/jTable/metro/purple/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/purple/loading.gif -------------------------------------------------------------------------------- /Source/css/jTable/metro/red/jtable.less: -------------------------------------------------------------------------------- 1 | /* jTable metro style theme - Red 2 | * Created by Halil İbrahim Kalkan 3 | * http://www.jtable.org 4 | */ 5 | 6 | @import "../jtable_metro_base.less"; 7 | 8 | @theme-folder:'red'; 9 | @main-theme-color: #e51400; 10 | 11 | .jtable_metro_base(@theme-folder, @main-theme-color); -------------------------------------------------------------------------------- /Source/css/jTable/metro/red/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/css/jTable/metro/red/loading.gif -------------------------------------------------------------------------------- /Source/css/jquery-ui-timepicker-addon.css: -------------------------------------------------------------------------------- 1 | .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } 2 | .ui-timepicker-div dl { text-align: left; } 3 | .ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; } 4 | .ui-timepicker-div dl dd { margin: 0 10px 10px 40%; } 5 | .ui-timepicker-div td { font-size: 90%; } 6 | .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; } 7 | .ui-timepicker-div .ui_tpicker_unit_hide{ display: none; } 8 | 9 | .ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input { background: none; color: inherit; border: none; outline: none; border-bottom: solid 1px #555; width: 95%; } 10 | .ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus { border-bottom-color: #aaa; } 11 | 12 | .ui-timepicker-rtl{ direction: rtl; } 13 | .ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; } 14 | .ui-timepicker-rtl dl dt{ float: right; clear: right; } 15 | .ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; } 16 | 17 | /* Shortened version style */ 18 | .ui-timepicker-div.ui-timepicker-oneLine { padding-right: 2px; } 19 | .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time, 20 | .ui-timepicker-div.ui-timepicker-oneLine dt { display: none; } 21 | .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label { display: block; padding-top: 2px; } 22 | .ui-timepicker-div.ui-timepicker-oneLine dl { text-align: right; } 23 | .ui-timepicker-div.ui-timepicker-oneLine dl dd, 24 | .ui-timepicker-div.ui-timepicker-oneLine dl dd > div { display:inline-block; margin:0; } 25 | .ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before, 26 | .ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before { content:':'; display:inline-block; } 27 | .ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before, 28 | .ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before { content:'.'; display:inline-block; } 29 | .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide, 30 | .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{ display: none; } -------------------------------------------------------------------------------- /Source/css/menuTicket.css: -------------------------------------------------------------------------------- 1 | #TableOfMenuItems { 2 | table-layout:fixed; 3 | } 4 | #TableOfMenuItems tr.selectable:hover{ 5 | background-color:#eef; 6 | } 7 | 8 | #TableOfMenuItems td { 9 | font-size:18px; 10 | } 11 | #TableOfMenuItems thead tr { 12 | font-weight:bold; 13 | background-color:lightyellow; 14 | } 15 | #TableOfMenuItems td:first-child { 16 | text-align:center; 17 | width:38px !important; 18 | } 19 | #TableOfMenuItems td:nth-child(2) { 20 | width:225px !important; 21 | } 22 | #TableOfMenuItems td:last-child { 23 | text-align:right; 24 | padding-right:10px; 25 | width:54px !important; 26 | } 27 | #RightSummaryOfTicket tbody tr td { 28 | font-size:18px; 29 | } 30 | #RightSummaryOfTicket tbody tr td:last-child { 31 | text-align:right; 32 | width: 70px; 33 | } 34 | #RightSummaryOfTicket tbody tr td:first-child { 35 | text-align:left; 36 | width: 90px; 37 | } 38 | #RightSummaryOfTicket tbody tr:nth-child(4) td { 39 | font-size:20px; 40 | font-weight:bold; 41 | border-top:2px solid black; 42 | } 43 | .selectable td { 44 | padding-top:5px; 45 | } 46 | -------------------------------------------------------------------------------- /Source/css/posTerminal.css: -------------------------------------------------------------------------------- 1 | body { 2 | -webkit-touch-callout: none; 3 | -webkit-user-select: none; 4 | -khtml-user-select: none; 5 | -moz-user-select: none; 6 | -ms-user-select: none; 7 | user-select: none; 8 | } 9 | 10 | .centered { 11 | position: fixed; 12 | top: 50%; 13 | left: 50%; 14 | margin-top: -100px; 15 | margin-left: -100px; 16 | } 17 | 18 | /* Background Colors for Page components */ 19 | .menuTicketPageHeader { 20 | background-color:#fffefa; 21 | } 22 | .menuTicketPageButtonArea { 23 | background-color:#fffefa; 24 | } 25 | .menuTicketPageTotalArea { 26 | background-color:#fffefa; 27 | } 28 | .menuTicketMenuPageHeader { 29 | background-color:#fffeF8; 30 | } 31 | .menuTicketMenuPageTable { 32 | background-color:#fffeF8; 33 | } 34 | .menuOrderPageButtonArea { 35 | background-color:#fffeF8; 36 | } 37 | 38 | /* tableCell class used for drop down list of optional/default menu items 39 | Only modify background color or border color */ 40 | .tableCell ul { 41 | background-color:rgb(225,75,75); 42 | border: 1px solid #5c9ccc; 43 | position:absolute; 44 | width:130px; 45 | padding-left:0px; 46 | } 47 | .tableCell li { 48 | background-color: #98c8ca; 49 | position:relative; 50 | margin:0px; 51 | padding: 12px 0px; 52 | padding-left:0px; 53 | display:block; 54 | border-bottom:solid 1px rgb(200,50,50); 55 | } 56 | .tableCell li:hover { 57 | background-color: #c1c1a4 58 | } 59 | /* tableCell class used for drop down list of optional/default menu items */ 60 | 61 | /* replacement for javascript alert!!! */ 62 | .confirmButton { 63 | width:90px; 64 | height:40px; 65 | z-index:2000; 66 | } 67 | 68 | /* text blinking used when in Edit Mode for orders */ 69 | .css_blink { 70 | -webkit-animation-name: blinker; 71 | -webkit-animation-duration: 2s; 72 | -webkit-animation-timing-function: linear; 73 | -webkit-animation-iteration-count: infinite; 74 | 75 | -moz-animation-name: blinker; 76 | -moz-animation-duration: 2s; 77 | -moz-animation-timing-function: linear; 78 | -moz-animation-iteration-count: infinite; 79 | 80 | animation-name: blinker; 81 | animation-duration: 2s; 82 | animation-timing-function: linear; 83 | animation-iteration-count: infinite; 84 | } 85 | @-moz-keyframes blinker { 86 | 0% { opacity: 1.0; } 87 | 50% { opacity: 0.3; } 88 | 100% { opacity: 1.0; } 89 | } 90 | 91 | @-webkit-keyframes blinker { 92 | 0% { opacity: 1.0; } 93 | 50% { opacity: 0.3; } 94 | 100% { opacity: 1.0; } 95 | } 96 | 97 | @keyframes blinker { 98 | 0% { opacity: 1.0; } 99 | 50% { opacity: 0.3; } 100 | 100% { opacity: 1.0; } 101 | } 102 | /* End blinking used when in Edit Mode for orders */ 103 | -------------------------------------------------------------------------------- /Source/css/validationEngine.jquery.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Z-INDEX */ 4 | .formError { z-index: 990; } 5 | .formError .formErrorContent { z-index: 991; } 6 | .formError .formErrorArrow { z-index: 996; } 7 | 8 | .ui-dialog .formError { z-index: 5000; } 9 | .ui-dialog .formError .formErrorContent { z-index: 5001; } 10 | .ui-dialog .formError .formErrorArrow { z-index: 5006; } 11 | 12 | 13 | 14 | 15 | .inputContainer { 16 | position: relative; 17 | float: left; 18 | } 19 | 20 | .formError { 21 | position: absolute; 22 | top: 300px; 23 | left: 300px; 24 | display: block; 25 | cursor: pointer; 26 | text-align: left; 27 | } 28 | 29 | .formError.inline { 30 | position: relative; 31 | top: 0; 32 | left: 0; 33 | display: inline-block; 34 | } 35 | 36 | .ajaxSubmit { 37 | padding: 20px; 38 | background: #55ea55; 39 | border: 1px solid #999; 40 | display: none; 41 | } 42 | 43 | .formError .formErrorContent { 44 | width: 100%; 45 | background: #ee0101; 46 | position:relative; 47 | color: #fff; 48 | min-width: 120px; 49 | font-size: 11px; 50 | border: 2px solid #ddd; 51 | box-shadow: 0 0 6px #000; 52 | -moz-box-shadow: 0 0 6px #000; 53 | -webkit-box-shadow: 0 0 6px #000; 54 | -o-box-shadow: 0 0 6px #000; 55 | padding: 4px 10px 4px 10px; 56 | border-radius: 6px; 57 | -moz-border-radius: 6px; 58 | -webkit-border-radius: 6px; 59 | -o-border-radius: 6px; 60 | } 61 | 62 | .formError.inline .formErrorContent { 63 | box-shadow: none; 64 | -moz-box-shadow: none; 65 | -webkit-box-shadow: none; 66 | -o-box-shadow: none; 67 | border: none; 68 | border-radius: 0; 69 | -moz-border-radius: 0; 70 | -webkit-border-radius: 0; 71 | -o-border-radius: 0; 72 | } 73 | 74 | .greenPopup .formErrorContent { 75 | background: #33be40; 76 | } 77 | 78 | .blackPopup .formErrorContent { 79 | background: #393939; 80 | color: #FFF; 81 | } 82 | 83 | .formError .formErrorArrow { 84 | width: 15px; 85 | margin: -2px 0 0 13px; 86 | position:relative; 87 | } 88 | body[dir='rtl'] .formError .formErrorArrow, 89 | body.rtl .formError .formErrorArrow { 90 | margin: -2px 13px 0 0; 91 | } 92 | 93 | .formError .formErrorArrowBottom { 94 | box-shadow: none; 95 | -moz-box-shadow: none; 96 | -webkit-box-shadow: none; 97 | -o-box-shadow: none; 98 | margin: 0px 0 0 12px; 99 | top:2px; 100 | } 101 | 102 | .formError .formErrorArrow div { 103 | border-left: 2px solid #ddd; 104 | border-right: 2px solid #ddd; 105 | box-shadow: 0 2px 3px #444; 106 | -moz-box-shadow: 0 2px 3px #444; 107 | -webkit-box-shadow: 0 2px 3px #444; 108 | -o-box-shadow: 0 2px 3px #444; 109 | font-size: 0px; 110 | height: 1px; 111 | background: #ee0101; 112 | margin: 0 auto; 113 | line-height: 0; 114 | font-size: 0; 115 | display: block; 116 | } 117 | 118 | .formError .formErrorArrowBottom div { 119 | box-shadow: none; 120 | -moz-box-shadow: none; 121 | -webkit-box-shadow: none; 122 | -o-box-shadow: none; 123 | } 124 | 125 | .greenPopup .formErrorArrow div { 126 | background: #33be40; 127 | } 128 | 129 | .blackPopup .formErrorArrow div { 130 | background: #393939; 131 | color: #FFF; 132 | } 133 | 134 | .formError .formErrorArrow .line10 { 135 | width: 13px; 136 | border: none; 137 | } 138 | 139 | .formError .formErrorArrow .line9 { 140 | width: 11px; 141 | border: none; 142 | } 143 | 144 | .formError .formErrorArrow .line8 { 145 | width: 11px; 146 | } 147 | 148 | .formError .formErrorArrow .line7 { 149 | width: 9px; 150 | } 151 | 152 | .formError .formErrorArrow .line6 { 153 | width: 7px; 154 | } 155 | 156 | .formError .formErrorArrow .line5 { 157 | width: 5px; 158 | } 159 | 160 | .formError .formErrorArrow .line4 { 161 | width: 3px; 162 | } 163 | 164 | .formError .formErrorArrow .line3 { 165 | width: 1px; 166 | border-left: 2px solid #ddd; 167 | border-right: 2px solid #ddd; 168 | border-bottom: 0 solid #ddd; 169 | } 170 | 171 | .formError .formErrorArrow .line2 { 172 | width: 3px; 173 | border: none; 174 | background: #ddd; 175 | } 176 | 177 | .formError .formErrorArrow .line1 { 178 | width: 1px; 179 | border: none; 180 | background: #ddd; 181 | } 182 | -------------------------------------------------------------------------------- /Source/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Point of Sale System 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 49 | 53 | 54 | 55 | 56 | 57 | 62 |
63 |
64 |
65 | 66 |
67 |
68 |
69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Source/js/jsTree/intro.js: -------------------------------------------------------------------------------- 1 | /*globals jQuery, define, module, exports, require, window, document, postMessage */ 2 | (function (factory) { 3 | "use strict"; 4 | if (typeof define === 'function' && define.amd) { 5 | define(['jquery'], factory); 6 | } 7 | else if(typeof module !== 'undefined' && module.exports) { 8 | module.exports = factory(require('jquery')); 9 | } 10 | else { 11 | factory(jQuery); 12 | } 13 | }(function ($, undefined) { 14 | "use strict"; 15 | -------------------------------------------------------------------------------- /Source/js/jsTree/jstree.changed.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ### Changed plugin 3 | * 4 | * This plugin adds more information to the `changed.jstree` event. The new data is contained in the `changed` event data property, and contains a lists of `selected` and `deselected` nodes. 5 | */ 6 | /*globals jQuery, define, exports, require, document */ 7 | (function (factory) { 8 | "use strict"; 9 | if (typeof define === 'function' && define.amd) { 10 | define('jstree.changed', ['jquery','jstree'], factory); 11 | } 12 | else if(typeof exports === 'object') { 13 | factory(require('jquery'), require('jstree')); 14 | } 15 | else { 16 | factory(jQuery, jQuery.jstree); 17 | } 18 | }(function ($, jstree, undefined) { 19 | "use strict"; 20 | 21 | if($.jstree.plugins.changed) { return; } 22 | 23 | $.jstree.plugins.changed = function (options, parent) { 24 | var last = []; 25 | this.trigger = function (ev, data) { 26 | var i, j; 27 | if(!data) { 28 | data = {}; 29 | } 30 | if(ev.replace('.jstree','') === 'changed') { 31 | data.changed = { selected : [], deselected : [] }; 32 | var tmp = {}; 33 | for(i = 0, j = last.length; i < j; i++) { 34 | tmp[last[i]] = 1; 35 | } 36 | for(i = 0, j = data.selected.length; i < j; i++) { 37 | if(!tmp[data.selected[i]]) { 38 | data.changed.selected.push(data.selected[i]); 39 | } 40 | else { 41 | tmp[data.selected[i]] = 2; 42 | } 43 | } 44 | for(i = 0, j = last.length; i < j; i++) { 45 | if(tmp[last[i]] === 1) { 46 | data.changed.deselected.push(last[i]); 47 | } 48 | } 49 | last = data.selected.slice(); 50 | } 51 | /** 52 | * triggered when selection changes (the "changed" plugin enhances the original event with more data) 53 | * @event 54 | * @name changed.jstree 55 | * @param {Object} node 56 | * @param {Object} action the action that caused the selection to change 57 | * @param {Array} selected the current selection 58 | * @param {Object} changed an object containing two properties `selected` and `deselected` - both arrays of node IDs, which were selected or deselected since the last changed event 59 | * @param {Object} event the event (if any) that triggered this changed event 60 | * @plugin changed 61 | */ 62 | parent.trigger.call(this, ev, data); 63 | }; 64 | this.refresh = function (skip_loading, forget_state) { 65 | last = []; 66 | return parent.refresh.apply(this, arguments); 67 | }; 68 | }; 69 | })); -------------------------------------------------------------------------------- /Source/js/jsTree/jstree.conditionalselect.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ### Conditionalselect plugin 3 | * 4 | * This plugin allows defining a callback to allow or deny node selection by user input (activate node method). 5 | */ 6 | /*globals jQuery, define, exports, require, document */ 7 | (function (factory) { 8 | "use strict"; 9 | if (typeof define === 'function' && define.amd) { 10 | define('jstree.conditionalselect', ['jquery','jstree'], factory); 11 | } 12 | else if(typeof exports === 'object') { 13 | factory(require('jquery'), require('jstree')); 14 | } 15 | else { 16 | factory(jQuery, jQuery.jstree); 17 | } 18 | }(function ($, jstree, undefined) { 19 | "use strict"; 20 | 21 | if($.jstree.plugins.conditionalselect) { return; } 22 | 23 | /** 24 | * a callback (function) which is invoked in the instance's scope and receives two arguments - the node and the event that triggered the `activate_node` call. Returning false prevents working with the node, returning true allows invoking activate_node. Defaults to returning `true`. 25 | * @name $.jstree.defaults.checkbox.visible 26 | * @plugin checkbox 27 | */ 28 | $.jstree.defaults.conditionalselect = function () { return true; }; 29 | $.jstree.plugins.conditionalselect = function (options, parent) { 30 | // own function 31 | this.activate_node = function (obj, e) { 32 | if(this.settings.conditionalselect.call(this, this.get_node(obj), e)) { 33 | parent.activate_node.call(this, obj, e); 34 | } 35 | }; 36 | }; 37 | 38 | })); -------------------------------------------------------------------------------- /Source/js/jsTree/jstree.sort.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ### Sort plugin 3 | * 4 | * Automatically sorts all siblings in the tree according to a sorting function. 5 | */ 6 | /*globals jQuery, define, exports, require */ 7 | (function (factory) { 8 | "use strict"; 9 | if (typeof define === 'function' && define.amd) { 10 | define('jstree.sort', ['jquery','jstree'], factory); 11 | } 12 | else if(typeof exports === 'object') { 13 | factory(require('jquery'), require('jstree')); 14 | } 15 | else { 16 | factory(jQuery, jQuery.jstree); 17 | } 18 | }(function ($, jstree, undefined) { 19 | "use strict"; 20 | 21 | if($.jstree.plugins.sort) { return; } 22 | 23 | /** 24 | * the settings function used to sort the nodes. 25 | * It is executed in the tree's context, accepts two nodes as arguments and should return `1` or `-1`. 26 | * @name $.jstree.defaults.sort 27 | * @plugin sort 28 | */ 29 | $.jstree.defaults.sort = function (a, b) { 30 | //return this.get_type(a) === this.get_type(b) ? (this.get_text(a) > this.get_text(b) ? 1 : -1) : this.get_type(a) >= this.get_type(b); 31 | return this.get_text(a) > this.get_text(b) ? 1 : -1; 32 | }; 33 | $.jstree.plugins.sort = function (options, parent) { 34 | this.bind = function () { 35 | parent.bind.call(this); 36 | this.element 37 | .on("model.jstree", $.proxy(function (e, data) { 38 | this.sort(data.parent, true); 39 | }, this)) 40 | .on("rename_node.jstree create_node.jstree", $.proxy(function (e, data) { 41 | this.sort(data.parent || data.node.parent, false); 42 | this.redraw_node(data.parent || data.node.parent, true); 43 | }, this)) 44 | .on("move_node.jstree copy_node.jstree", $.proxy(function (e, data) { 45 | this.sort(data.parent, false); 46 | this.redraw_node(data.parent, true); 47 | }, this)); 48 | }; 49 | /** 50 | * used to sort a node's children 51 | * @private 52 | * @name sort(obj [, deep]) 53 | * @param {mixed} obj the node 54 | * @param {Boolean} deep if set to `true` nodes are sorted recursively. 55 | * @plugin sort 56 | * @trigger search.jstree 57 | */ 58 | this.sort = function (obj, deep) { 59 | var i, j; 60 | obj = this.get_node(obj); 61 | if(obj && obj.children && obj.children.length) { 62 | obj.children.sort($.proxy(this.settings.sort, this)); 63 | if(deep) { 64 | for(i = 0, j = obj.children_d.length; i < j; i++) { 65 | this.sort(obj.children_d[i], false); 66 | } 67 | } 68 | } 69 | }; 70 | }; 71 | 72 | // include the sort plugin by default 73 | // $.jstree.defaults.plugins.push("sort"); 74 | })); -------------------------------------------------------------------------------- /Source/js/jsTree/jstree.state.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ### State plugin 3 | * 4 | * Saves the state of the tree (selected nodes, opened nodes) on the user's computer using available options (localStorage, cookies, etc) 5 | */ 6 | /*globals jQuery, define, exports, require */ 7 | (function (factory) { 8 | "use strict"; 9 | if (typeof define === 'function' && define.amd) { 10 | define('jstree.state', ['jquery','jstree'], factory); 11 | } 12 | else if(typeof exports === 'object') { 13 | factory(require('jquery'), require('jstree')); 14 | } 15 | else { 16 | factory(jQuery, jQuery.jstree); 17 | } 18 | }(function ($, jstree, undefined) { 19 | "use strict"; 20 | 21 | if($.jstree.plugins.state) { return; } 22 | 23 | var to = false; 24 | /** 25 | * stores all defaults for the state plugin 26 | * @name $.jstree.defaults.state 27 | * @plugin state 28 | */ 29 | $.jstree.defaults.state = { 30 | /** 31 | * A string for the key to use when saving the current tree (change if using multiple trees in your project). Defaults to `jstree`. 32 | * @name $.jstree.defaults.state.key 33 | * @plugin state 34 | */ 35 | key : 'jstree', 36 | /** 37 | * A space separated list of events that trigger a state save. Defaults to `changed.jstree open_node.jstree close_node.jstree`. 38 | * @name $.jstree.defaults.state.events 39 | * @plugin state 40 | */ 41 | events : 'changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree', 42 | /** 43 | * Time in milliseconds after which the state will expire. Defaults to 'false' meaning - no expire. 44 | * @name $.jstree.defaults.state.ttl 45 | * @plugin state 46 | */ 47 | ttl : false, 48 | /** 49 | * A function that will be executed prior to restoring state with one argument - the state object. Can be used to clear unwanted parts of the state. 50 | * @name $.jstree.defaults.state.filter 51 | * @plugin state 52 | */ 53 | filter : false 54 | }; 55 | $.jstree.plugins.state = function (options, parent) { 56 | this.bind = function () { 57 | parent.bind.call(this); 58 | var bind = $.proxy(function () { 59 | this.element.on(this.settings.state.events, $.proxy(function () { 60 | if(to) { clearTimeout(to); } 61 | to = setTimeout($.proxy(function () { this.save_state(); }, this), 100); 62 | }, this)); 63 | /** 64 | * triggered when the state plugin is finished restoring the state (and immediately after ready if there is no state to restore). 65 | * @event 66 | * @name state_ready.jstree 67 | * @plugin state 68 | */ 69 | this.trigger('state_ready'); 70 | }, this); 71 | this.element 72 | .on("ready.jstree", $.proxy(function (e, data) { 73 | this.element.one("restore_state.jstree", bind); 74 | if(!this.restore_state()) { bind(); } 75 | }, this)); 76 | }; 77 | /** 78 | * save the state 79 | * @name save_state() 80 | * @plugin state 81 | */ 82 | this.save_state = function () { 83 | var st = { 'state' : this.get_state(), 'ttl' : this.settings.state.ttl, 'sec' : +(new Date()) }; 84 | $.vakata.storage.set(this.settings.state.key, JSON.stringify(st)); 85 | }; 86 | /** 87 | * restore the state from the user's computer 88 | * @name restore_state() 89 | * @plugin state 90 | */ 91 | this.restore_state = function () { 92 | var k = $.vakata.storage.get(this.settings.state.key); 93 | if(!!k) { try { k = JSON.parse(k); } catch(ex) { return false; } } 94 | if(!!k && k.ttl && k.sec && +(new Date()) - k.sec > k.ttl) { return false; } 95 | if(!!k && k.state) { k = k.state; } 96 | if(!!k && $.isFunction(this.settings.state.filter)) { k = this.settings.state.filter.call(this, k); } 97 | if(!!k) { 98 | this.element.one("set_state.jstree", function (e, data) { data.instance.trigger('restore_state', { 'state' : $.extend(true, {}, k) }); }); 99 | this.set_state(k); 100 | return true; 101 | } 102 | return false; 103 | }; 104 | /** 105 | * clear the state on the user's computer 106 | * @name clear_state() 107 | * @plugin state 108 | */ 109 | this.clear_state = function () { 110 | return $.vakata.storage.del(this.settings.state.key); 111 | }; 112 | }; 113 | 114 | (function ($, undefined) { 115 | $.vakata.storage = { 116 | // simply specifying the functions in FF throws an error 117 | set : function (key, val) { return window.localStorage.setItem(key, val); }, 118 | get : function (key) { return window.localStorage.getItem(key); }, 119 | del : function (key) { return window.localStorage.removeItem(key); } 120 | }; 121 | }($)); 122 | 123 | // include the state plugin by default 124 | // $.jstree.defaults.plugins.push("state"); 125 | })); -------------------------------------------------------------------------------- /Source/js/jsTree/outro.js: -------------------------------------------------------------------------------- 1 | })); -------------------------------------------------------------------------------- /Source/js/jsTree/sample.js: -------------------------------------------------------------------------------- 1 | /*global jQuery */ 2 | // wrap in IIFE and pass jQuery as $ 3 | (function ($, undefined) { 4 | "use strict"; 5 | 6 | // some private plugin stuff if needed 7 | var private_var = null; 8 | 9 | // extending the defaults 10 | $.jstree.defaults.sample = { 11 | sample_option : 'sample_val' 12 | }; 13 | 14 | // the actual plugin code 15 | $.jstree.plugins.sample = function (options, parent) { 16 | // own function 17 | this.sample_function = function (arg) { 18 | // you can chain this method if needed and available 19 | if(parent.sample_function) { parent.sample_function.call(this, arg); } 20 | }; 21 | 22 | // *SPECIAL* FUNCTIONS 23 | this.init = function (el, options) { 24 | // do not forget parent 25 | parent.init.call(this, el, options); 26 | }; 27 | // bind events if needed 28 | this.bind = function () { 29 | // call parent function first 30 | parent.bind.call(this); 31 | // do(stuff); 32 | }; 33 | // unbind events if needed (all in jquery namespace are taken care of by the core) 34 | this.unbind = function () { 35 | // do(stuff); 36 | // call parent function last 37 | parent.unbind.call(this); 38 | }; 39 | this.teardown = function () { 40 | // do not forget parent 41 | parent.teardown.call(this); 42 | }; 43 | // state management - get and restore 44 | this.get_state = function () { 45 | // always get state from parent first 46 | var state = parent.get_state.call(this); 47 | // add own stuff to state 48 | state.sample = { 'var' : 'val' }; 49 | return state; 50 | }; 51 | this.set_state = function (state, callback) { 52 | // only process your part if parent returns true 53 | // there will be multiple times with false 54 | if(parent.set_state.call(this, state, callback)) { 55 | // check the key you set above 56 | if(state.sample) { 57 | // do(stuff); // like calling this.sample_function(state.sample.var); 58 | // remove your part of the state, call again and RETURN FALSE, the next cycle will be TRUE 59 | delete state.sample; 60 | this.set_state(state, callback); 61 | return false; 62 | } 63 | // return true if your state is gone (cleared in the previous step) 64 | return true; 65 | } 66 | // parent was false - return false too 67 | return false; 68 | }; 69 | // node transportation 70 | this.get_json = function (obj, options, flat) { 71 | // get the node from the parent 72 | var tmp = parent.get_json.call(this, obj, options, flat), i, j; 73 | if($.isArray(tmp)) { 74 | for(i = 0, j = tmp.length; i < j; i++) { 75 | tmp[i].sample = 'value'; 76 | } 77 | } 78 | else { 79 | tmp.sample = 'value'; 80 | } 81 | // return the original / modified node 82 | return tmp; 83 | }; 84 | }; 85 | 86 | // attach to document ready if needed 87 | $(function () { 88 | // do(stuff); 89 | }); 90 | 91 | // you can include the sample plugin in all instances by default 92 | $.jstree.defaults.plugins.push("sample"); 93 | })(jQuery); -------------------------------------------------------------------------------- /Source/js/jsTree/themes/default-dark/32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/js/jsTree/themes/default-dark/32px.png -------------------------------------------------------------------------------- /Source/js/jsTree/themes/default-dark/40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/js/jsTree/themes/default-dark/40px.png -------------------------------------------------------------------------------- /Source/js/jsTree/themes/default-dark/style.less: -------------------------------------------------------------------------------- 1 | /* jsTree default dark theme */ 2 | @theme-name: default-dark; 3 | @hovered-bg-color: #555; 4 | @hovered-shadow-color: #555; 5 | @disabled-color: #666666; 6 | @disabled-bg-color: #333333; 7 | @clicked-bg-color: #5fa2db; 8 | @clicked-shadow-color: #666666; 9 | @clicked-gradient-color-1: #5fa2db; 10 | @clicked-gradient-color-2: #5fa2db; 11 | @search-result-color: #ffffff; 12 | @mobile-wholerow-bg-color: #333333; 13 | @mobile-wholerow-shadow: #111111; 14 | @mobile-wholerow-bordert: #666; 15 | @mobile-wholerow-borderb: #000; 16 | @responsive: true; 17 | @image-path: ""; 18 | @base-height: 40px; 19 | 20 | @import "../mixins.less"; 21 | @import "../base.less"; 22 | @import "../main.less"; 23 | 24 | .jstree-@{theme-name} { 25 | background:#333; 26 | .jstree-anchor { color:#999; text-shadow:1px 1px 0 rgba(0,0,0,0.5); } 27 | .jstree-clicked, .jstree-checked { color:white; } 28 | .jstree-hovered { color:white; } 29 | #jstree-marker& { 30 | border-left-color:#999; 31 | background:transparent; 32 | } 33 | .jstree-anchor > .jstree-icon { opacity:0.75; } 34 | .jstree-clicked > .jstree-icon, 35 | .jstree-hovered > .jstree-icon, 36 | .jstree-checked > .jstree-icon { opacity:1; } 37 | } 38 | // theme variants 39 | .jstree-@{theme-name} { 40 | &.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); } 41 | &.jstree-rtl .jstree-last { background:transparent; } 42 | } 43 | .jstree-@{theme-name}-small { 44 | &.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); } 45 | &.jstree-rtl .jstree-last { background:transparent; } 46 | } 47 | .jstree-@{theme-name}-large { 48 | &.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); } 49 | &.jstree-rtl .jstree-last { background:transparent; } 50 | } -------------------------------------------------------------------------------- /Source/js/jsTree/themes/default-dark/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/js/jsTree/themes/default-dark/throbber.gif -------------------------------------------------------------------------------- /Source/js/jsTree/themes/default/32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/js/jsTree/themes/default/32px.png -------------------------------------------------------------------------------- /Source/js/jsTree/themes/default/40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/js/jsTree/themes/default/40px.png -------------------------------------------------------------------------------- /Source/js/jsTree/themes/default/style.less: -------------------------------------------------------------------------------- 1 | /* jsTree default theme */ 2 | @theme-name: default; 3 | @hovered-bg-color: #e7f4f9; 4 | @hovered-shadow-color: #cccccc; 5 | @disabled-color: #666666; 6 | @disabled-bg-color: #efefef; 7 | @clicked-bg-color: #beebff; 8 | @clicked-shadow-color: #999999; 9 | @clicked-gradient-color-1: #beebff; 10 | @clicked-gradient-color-2: #a8e4ff; 11 | @search-result-color: #8b0000; 12 | @mobile-wholerow-bg-color: #ebebeb; 13 | @mobile-wholerow-shadow: #666666; 14 | @mobile-wholerow-bordert: rgba(255,255,255,0.7); 15 | @mobile-wholerow-borderb: rgba(64,64,64,0.2); 16 | @responsive: true; 17 | @image-path: ""; 18 | @base-height: 40px; 19 | 20 | @import "../mixins.less"; 21 | @import "../base.less"; 22 | @import "../main.less"; -------------------------------------------------------------------------------- /Source/js/jsTree/themes/default/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatONeil/POS-Terminal/64b7f8b3726729b959a6f02a69df67303b5a6bbc/Source/js/jsTree/themes/default/throbber.gif -------------------------------------------------------------------------------- /Source/js/jsTree/themes/main.less: -------------------------------------------------------------------------------- 1 | .jstree-@{theme-name} { 2 | .jstree-node, 3 | .jstree-icon { background-repeat:no-repeat; background-color:transparent; } 4 | .jstree-anchor, 5 | .jstree-wholerow { transition:background-color 0.15s, box-shadow 0.15s; } 6 | .jstree-hovered { background:@hovered-bg-color; border-radius:2px; box-shadow:inset 0 0 1px @hovered-shadow-color; } 7 | .jstree-context { background:@hovered-bg-color; border-radius:2px; box-shadow:inset 0 0 1px @hovered-shadow-color; } 8 | .jstree-clicked { background:@clicked-bg-color; border-radius:2px; box-shadow:inset 0 0 1px @clicked-shadow-color; } 9 | .jstree-no-icons .jstree-anchor > .jstree-themeicon { display:none; } 10 | .jstree-disabled { 11 | background:transparent; color:@disabled-color; 12 | &.jstree-hovered { background:transparent; box-shadow:none; } 13 | &.jstree-clicked { background:@disabled-bg-color; } 14 | > .jstree-icon { opacity:0.8; filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); /* Firefox 10+ */ filter: gray; /* IE6-9 */ -webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */ } 15 | } 16 | // search 17 | .jstree-search { font-style:italic; color:@search-result-color; font-weight:bold; } 18 | // checkboxes 19 | .jstree-no-checkboxes .jstree-checkbox { display:none !important; } 20 | &.jstree-checkbox-no-clicked { 21 | .jstree-clicked { 22 | background:transparent; 23 | box-shadow:none; 24 | &.jstree-hovered { background:@hovered-bg-color; } 25 | } 26 | > .jstree-wholerow-ul .jstree-wholerow-clicked { 27 | background:transparent; 28 | &.jstree-wholerow-hovered { background:@hovered-bg-color; } 29 | } 30 | } 31 | // stripes 32 | > .jstree-striped { min-width:100%; display:inline-block; background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat; } 33 | // wholerow 34 | > .jstree-wholerow-ul .jstree-hovered, 35 | > .jstree-wholerow-ul .jstree-clicked { background:transparent; box-shadow:none; border-radius:0; } 36 | .jstree-wholerow { -moz-box-sizing:border-box; -webkit-box-sizing:border-box; box-sizing:border-box; } 37 | .jstree-wholerow-hovered { background:@hovered-bg-color; } 38 | .jstree-wholerow-clicked { .gradient(@clicked-gradient-color-1, @clicked-gradient-color-2); } 39 | } 40 | 41 | // theme variants 42 | .jstree-@{theme-name} { 43 | .jstree-theme(24px, "@{image-path}32px.png", 32px); 44 | &.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); } 45 | &.jstree-rtl .jstree-last { background:transparent; } 46 | } 47 | .jstree-@{theme-name}-small { 48 | .jstree-theme(18px, "@{image-path}32px.png", 32px); 49 | &.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); } 50 | &.jstree-rtl .jstree-last { background:transparent; } 51 | } 52 | .jstree-@{theme-name}-large { 53 | .jstree-theme(32px, "@{image-path}32px.png", 32px); 54 | &.jstree-rtl .jstree-node { background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); } 55 | &.jstree-rtl .jstree-last { background:transparent; } 56 | } 57 | 58 | // mobile theme attempt 59 | @media (max-width: 768px) { 60 | #jstree-dnd.jstree-dnd-responsive when (@responsive = true) { 61 | line-height:@base-height; font-weight:bold; font-size:1.1em; text-shadow:1px 1px white; 62 | > i { background:transparent; width:@base-height; height:@base-height; } 63 | > .jstree-ok { background-image:url("@{image-path}@{base-height}.png"); background-position:0 -(@base-height * 5); background-size:(@base-height * 3) (@base-height * 6); } 64 | > .jstree-er { background-image:url("@{image-path}@{base-height}.png"); background-position:-(@base-height * 1) -(@base-height * 5); background-size:(@base-height * 3) (@base-height * 6); } 65 | } 66 | #jstree-marker.jstree-dnd-responsive when (@responsive = true) { 67 | border-left-width:10px; 68 | border-top-width:10px; 69 | border-bottom-width:10px; 70 | margin-top:-10px; 71 | } 72 | } 73 | 74 | .jstree-@{theme-name}-responsive when (@responsive = true) { 75 | @import "responsive.less"; 76 | } 77 | -------------------------------------------------------------------------------- /Source/js/jsTree/themes/responsive.less: -------------------------------------------------------------------------------- 1 | @media (max-width: 768px) { 2 | // background image 3 | .jstree-icon { background-image:url("@{image-path}@{base-height}.png"); } 4 | 5 | .jstree-node, 6 | .jstree-leaf > .jstree-ocl { background:transparent; } 7 | 8 | .jstree-node { min-height:@base-height; line-height:@base-height; margin-left:@base-height; min-width:@base-height; white-space:nowrap; } 9 | .jstree-anchor { line-height:@base-height; height:@base-height; } 10 | .jstree-icon, .jstree-icon:empty { width:@base-height; height:@base-height; line-height:@base-height; } 11 | 12 | > .jstree-container-ul > .jstree-node { margin-left:0; } 13 | &.jstree-rtl .jstree-node { margin-left:0; margin-right:@base-height; background:transparent; } 14 | &.jstree-rtl .jstree-container-ul > .jstree-node { margin-right:0; } 15 | 16 | .jstree-ocl, 17 | .jstree-themeicon, 18 | .jstree-checkbox { background-size:(@base-height * 3) (@base-height * 6); } 19 | .jstree-leaf > .jstree-ocl, 20 | &.jstree-rtl .jstree-leaf > .jstree-ocl { background:transparent; } 21 | .jstree-open > .jstree-ocl { background-position:0 0px !important; } 22 | .jstree-closed > .jstree-ocl { background-position:0 -(@base-height * 1) !important; } 23 | &.jstree-rtl .jstree-closed > .jstree-ocl { background-position:-(@base-height * 1) 0px !important; } 24 | 25 | .jstree-themeicon { background-position:-(@base-height * 1) -(@base-height * 1); } 26 | 27 | .jstree-checkbox, .jstree-checkbox:hover { background-position:-(@base-height * 1) -(@base-height * 2); } 28 | &.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, 29 | &.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, 30 | .jstree-checked > .jstree-checkbox, 31 | .jstree-checked > .jstree-checkbox:hover { background-position:0 -(@base-height * 2); } 32 | .jstree-anchor > .jstree-undetermined, .jstree-anchor > .jstree-undetermined:hover { background-position:0 -(@base-height * 3); } 33 | 34 | .jstree-anchor { font-weight:bold; font-size:1.1em; text-shadow:1px 1px white; } 35 | 36 | > .jstree-striped { background:transparent; } 37 | .jstree-wholerow { border-top:1px solid @mobile-wholerow-bordert; border-bottom:1px solid @mobile-wholerow-borderb; background:@mobile-wholerow-bg-color; height:@base-height; } 38 | .jstree-wholerow-hovered { background:@hovered-bg-color; } 39 | .jstree-wholerow-clicked { background:@clicked-bg-color; } 40 | 41 | // thanks to PHOTONUI 42 | .jstree-children .jstree-last > .jstree-wholerow { box-shadow: inset 0 -6px 3px -5px @mobile-wholerow-shadow; } 43 | .jstree-children .jstree-open > .jstree-wholerow { box-shadow: inset 0 6px 3px -5px @mobile-wholerow-shadow; border-top:0; } 44 | .jstree-children .jstree-open + .jstree-open { box-shadow:none; } 45 | 46 | // experiment 47 | .jstree-node, 48 | .jstree-icon, 49 | .jstree-node > .jstree-ocl, 50 | .jstree-themeicon, 51 | .jstree-checkbox { background-image:url("@{image-path}@{base-height}.png"); background-size:(@base-height * 3) (@base-height * 6); } 52 | 53 | .jstree-node { background-position:-(@base-height * 2) 0; background-repeat:repeat-y; } 54 | .jstree-last { background:transparent; } 55 | .jstree-leaf > .jstree-ocl { background-position:-(@base-height * 1) -(@base-height * 3); } 56 | .jstree-last > .jstree-ocl { background-position:-(@base-height * 1) -(@base-height * 4); } 57 | /* 58 | .jstree-open > .jstree-ocl, 59 | .jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; } 60 | */ 61 | 62 | .jstree-themeicon-custom { background-color:transparent; background-image:none; background-position:0 0; } 63 | .jstree-file { background:url("@{image-path}@{base-height}.png") 0 -(@base-height * 4) no-repeat; background-size:(@base-height * 3) (@base-height * 6); } 64 | .jstree-folder { background:url("@{image-path}@{base-height}.png") -(@base-height * 1) -(@base-height * 1) no-repeat; background-size:(@base-height * 3) (@base-height * 6); } 65 | 66 | > .jstree-container-ul > .jstree-node { margin-left:0; margin-right:0; } 67 | } -------------------------------------------------------------------------------- /Source/js/jsTree/vakata-jstree.js: -------------------------------------------------------------------------------- 1 | (function (factory) { 2 | "use strict"; 3 | if (typeof define === 'function' && define.amd) { 4 | define('jstree.checkbox', ['jquery','jstree'], factory); 5 | } 6 | else if(typeof exports === 'object') { 7 | factory(require('jquery'), require('jstree')); 8 | } 9 | else { 10 | factory(jQuery); 11 | } 12 | }(function ($, undefined) { 13 | "use strict"; 14 | if(document.registerElement && Object && Object.create) { 15 | var proto = Object.create(HTMLElement.prototype); 16 | proto.createdCallback = function () { 17 | var c = { core : {}, plugins : [] }, i; 18 | for(i in $.jstree.plugins) { 19 | if($.jstree.plugins.hasOwnProperty(i) && this.attributes[i]) { 20 | c.plugins.push(i); 21 | if(this.getAttribute(i) && JSON.parse(this.getAttribute(i))) { 22 | c[i] = JSON.parse(this.getAttribute(i)); 23 | } 24 | } 25 | } 26 | for(i in $.jstree.defaults.core) { 27 | if($.jstree.defaults.core.hasOwnProperty(i) && this.attributes[i]) { 28 | c.core[i] = JSON.parse(this.getAttribute(i)) || this.getAttribute(i); 29 | } 30 | } 31 | $(this).jstree(c); 32 | }; 33 | // proto.attributeChangedCallback = function (name, previous, value) { }; 34 | try { 35 | document.registerElement("vakata-jstree", { prototype: proto }); 36 | } catch(ignore) { } 37 | } 38 | })); 39 | -------------------------------------------------------------------------------- /Source/js/posAddDropVendorEdit.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * POS Point of Sale System 3 | * http://www.pjoneil.net/POS 4 | * 5 | * Copyright c 2016 Patrick J. O'Neil http://www.pjoneil.net 6 | * 7 | * Licensed under the terms of the MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | */ 10 | posTerminal.posAddDropVendorEdit = { 11 | init: function() { 12 | // posTerminal is global varable 13 | this.setup(); 14 | }, 15 | destroy: function() { 16 | }, 17 | setup: function() { 18 | var self = this; 19 | $('#posAddDeleteVendorManager .actionButton').on('click',self,function(e) { 20 | var button = $(e.target).text().trim(); 21 | switch (button) { 22 | case "Done": 23 | $.when(posTerminal.loadTillUsesTable()).then(posTerminal.page.manager); 24 | break; 25 | default: 26 | alert(button+' pushed in posCustomerMgr'); 27 | break; 28 | } 29 | }); 30 | $('#AddDropVendorContainer').jtable({ 31 | title: 'Customer List', 32 | sorting: true, //Enable sorting 33 | defaultSorting: 'type ASC', 34 | actions: { 35 | listAction: 'scripts/tillUsesTable.php?action=list', 36 | createAction: 'scripts/tillUsesTable.php?action=create', 37 | updateAction: 'scripts/tillUsesTable.php?action=update', 38 | deleteAction: 'scripts/tillUsesTable.php?action=delete' 39 | }, 40 | fields: { 41 | id: { 42 | key: true, 43 | edit:false, 44 | create:false, 45 | list: false 46 | }, 47 | type: { 48 | title: 'Type', 49 | inputClass: 'validate[required]', 50 | options: { 51 | 'add':"Add Funds",'drop':"Drop Funds",'vendor':'Vendors' 52 | } 53 | }, 54 | name: { 55 | title: 'Name', 56 | inputClass: 'validate[required]' 57 | } 58 | }, 59 | //Initialize validation logic when a form is created 60 | formCreated: function (event, data) { 61 | data.form.validationEngine({promptPosition : "bottomLeft"}); 62 | }, 63 | //Validate form when it is being submitted 64 | formSubmitting: function (event, data) { 65 | return data.form.validationEngine('validate'); 66 | }, 67 | //Dispose validation logic when form is closed 68 | formClosed: function (event, data) { 69 | data.form.validationEngine('hide'); 70 | data.form.validationEngine('detach'); 71 | } 72 | 73 | }); 74 | $('#AddDropVendorContainer').jtable('load'); 75 | } 76 | }; 77 | -------------------------------------------------------------------------------- /Source/js/posCashTender.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * POS Point of Sale System 3 | * http://www.pjoneil.net/POS 4 | * 5 | * Copyright c 2016 Patrick J. O'Neil http://www.pjoneil.net 6 | * 7 | * Licensed under the terms of the MIT License 8 | * http://www.opensource.org/licenses/mit-license.php 9 | */ 10 | posTerminal.posCashTender = { 11 | returnFcn: null, 12 | caption: '', 13 | payAmount: 0, 14 | context: null, 15 | type: 'cash', 16 | dialog: null, 17 | $input: null, 18 | lastInput: [], 19 | init: function(_type,_caption, _payAmount, _context, _returnFcn) { 20 | // posTerminal is global varable 21 | this.type = _type; 22 | this.caption = _caption; 23 | this.returnFcn = _returnFcn; 24 | this.payAmount = _payAmount; 25 | this.context = _context; 26 | this.width=300; 27 | // if (this.type=='cash') this.width=300; 28 | // else this.width=255; 29 | //this.setupActionKeys(); 30 | this.setupDialog(); 31 | }, 32 | destroy: function() { 33 | this.dialog.dialog('destroy').remove(); 34 | }, 35 | setupDialog: function() { 36 | var html=this.setupHTML(),self = this; 37 | $(html).dialog({ 38 | modal: true, 39 | draggable: true, 40 | resizable: false, 41 | position:{ my: "center", at: "center", of: $('#posTerminal')[0] }, 42 | width: this.width, 43 | dialogClass: '', 44 | open: function( event, ui ) { 45 | var amt,tenderDialog=$(this); 46 | var keys= {cash:['$20{50} 25¢{50} \t 1 2 3', 47 | '$10{50} 10¢{50} \t 4 5 6', 48 | '$5{50} 5¢{50} \t 9 8 7', 49 | '$1{50} 1¢{50} \t 00 0 ⇐'] 50 | } 51 | if (parseFloat(self.payAmount)) { 52 | amt = '$'+parseFloat(self.payAmount.toString().replace('$','')).toFixed(2) 53 | keys.cash.push('\t{145} '+amt+'{115}') 54 | } 55 | self.dialog = tenderDialog; 56 | $('#posKeyboard').posKeyboard({ 57 | inputID:'vkTendered', 58 | keySet: 'cash', 59 | type: 'numeric', 60 | keys: keys 61 | }); 62 | }, 63 | close: function( event, ui ) { 64 | $(this).dialog('destroy').remove(); 65 | } 66 | }); 67 | this.setupButtons(); 68 | this.$input = $('#vkTendered'); 69 | }, 70 | setupButtons: function() { 71 | var self = this; 72 | $('#posCashTenderDialog .actionButton').on('click',self,function(e) { 73 | var button = $(e.target).text().trim(); 74 | var amt = $('#vkTendered').val().replace('$','') 75 | switch (button) { 76 | case 'OK': 77 | self.dialog.dialog('close'); 78 | self.returnFcn.call(self.context,amt); 79 | break; 80 | case 'Cancel': 81 | self.dialog.dialog('close'); 82 | break; 83 | } 84 | }); 85 | }, 86 | setupHTML: function() { 87 | var i,j,w,key,s=''; 88 | s+='
'; 89 | s+='
'; 90 | s+=' '+c.name+''; 97 | } 98 | $('#customerSelectDialog').find('#regularSelect').html(o); 99 | o='' 100 | for (i in cust) { 101 | c = cust[i]; 102 | if (c.type!='house') continue; 103 | o+='' 107 | for (i in cust) { 108 | c = cust[i]; 109 | if (c.type!='corporate') continue; 110 | o+=''; 93 | } 94 | s+='
'; 95 | s+= '
'; 96 | s+= '

Select Manager:

'; 97 | s+= ''; 100 | s+= '
'; 101 | s+= '
'; 102 | s+= '

Enter Manager Pin:

'; 103 | s+= '
'; 104 | s+= ' 2 |

Restaurant Add/Drop/Vendor Editor

3 |
4 |
5 |
6 |
7 | Done 8 |
9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /Source/pages/posCustomerManager.html: -------------------------------------------------------------------------------- 1 |
2 |

Restaurant Customer Management

3 |
4 |
5 |
6 |
7 | Done 8 |
9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /Source/pages/posCustomerSelect.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 |

Enter One Time Customer Name:

7 | 8 |
9 |
10 |
11 |
12 |
13 |
14 |

Select Regular Customer Name:

15 |
16 | 22 |
23 |
24 |
25 |

Select House Account Name:

26 |
27 | 33 |
34 |
35 |
36 |

Select Corporate Account Name:

37 |
38 | 44 |
45 |
46 |
47 |
48 | Add Customer 49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | OK 57 |
58 |
59 |
60 |
61 | Cancel 62 |
63 |
64 |
65 |
66 | -------------------------------------------------------------------------------- /Source/pages/posEmployeeManager.html: -------------------------------------------------------------------------------- 1 |
2 |

Restaurant Employee Management

3 |
4 |
5 |
6 |
7 | Done 8 |
9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /Source/pages/posMain.html: -------------------------------------------------------------------------------- 1 |

POS Terminal

2 |
3 |
4 | New Order 5 |
6 | (select cashier) 7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | View Orders 15 |
16 |
17 |
18 |
19 |
20 |
21 | Add to Cash Drawer 22 |
23 |
24 |
25 |
26 | Take from Cash Drawer 27 |
28 |
29 |
30 |
31 | Pay Out to Vendor 32 |
33 |
34 |
35 |
36 | Vendor Refund 37 |
38 |
39 |
40 |
41 |
42 |
43 | Manager 44 |
45 |
46 |
47 |
48 | Full Screen 49 |
50 |
51 |
52 | -------------------------------------------------------------------------------- /Source/pages/posManager.html: -------------------------------------------------------------------------------- 1 |

POS Manager Terminal

2 |
3 |
4 |
5 | Edit Tracking Products 6 |
7 |
8 |
9 |
10 | Edit Menu 11 |
12 |
13 |
14 |
15 | Edit Customers 16 |
17 |
18 |

19 |
20 |
21 | Edit Employees 22 |
23 |
24 |
25 |
26 | Edit Options 27 |
28 |
29 |
30 |
31 | Edit Drop/Add/Vendors 32 |
33 |
34 |

35 |

36 |
37 |
38 | Open Till 39 |
40 |
41 |
42 |
43 | Close Till 44 |
45 |
46 |
47 |
48 | Daily Close 49 |
50 |
51 |

52 |
53 |
54 | Reports 55 |
56 |
57 |
58 |
59 | Open Cash Drawer 60 |
61 |
62 |
63 |
64 | Toggle Full Screen 65 |
66 |
67 |

68 |

69 |
70 |
71 | Return to POS 72 |
73 |
74 |
75 | -------------------------------------------------------------------------------- /Source/pages/posMenuDiscount.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 |
Discount List
7 |
    8 |
  • Employee 10% discount
  • 9 |
  • Free Lunch Entree for Two
  • 10 |
  • Free Breakfast Entree for Two
  • 11 |
  • Fixed Total Price
  • 12 |
13 |
14 |
15 |
16 |
17 |
Qty
18 |
19 |
Description
20 |
Discount
21 |
22 |
Total
Price
23 |
Total
Discount
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | Select All 32 |
33 |
34 |
35 |
36 | Unselect All 37 |
38 |
39 |
40 |
41 | Clear Discounts 42 |
43 |
44 |
45 |
46 |
47 |
Subtotal
48 |
Discount
49 |
Tax
50 |
Total
51 |
52 |
53 |
1012.12
54 |
12.12
55 |
10.00
56 |
1000.00
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | Cancel 66 |
67 |
68 |
69 |
70 | OK 71 |
72 |
73 |
74 |
75 | -------------------------------------------------------------------------------- /Source/pages/posMenuOrder.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 6 |
7 | 36 | -------------------------------------------------------------------------------- /Source/pages/posOptionsManager.html: -------------------------------------------------------------------------------- 1 |
2 |

Restaurant Options Management

3 |
5 |
6 |
7 |
8 | Done 9 |
10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /Source/pages/posProductManager.html: -------------------------------------------------------------------------------- 1 |
2 |

Restaurant Product Management

3 |
4 |
5 |
6 |
7 | Done 8 |
9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /Source/pages/posViewOrderManager.html: -------------------------------------------------------------------------------- 1 | 7 |
8 |

Order Management

9 |
10 |
11 | Select View: 12 | 19 |
20 |
21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
TillNum.DateEmployeeCustomerStatusSubtotalDiscountTaxTotalPaid
38 |
39 |
40 |
41 |
42 | Done 43 |
44 |
45 |
46 |
47 | Pay 48 |
49 |
50 |
51 |
52 | Edit 53 |
54 |
55 |
56 |
57 | Print 58 |
59 |
60 |
61 |
62 | View 63 |
64 |
65 |
66 |
67 | -------------------------------------------------------------------------------- /Source/scripts/archiveDB.php: -------------------------------------------------------------------------------- 1 | $file was last modified: " . date ("F d Y H:i:s.", filemtime($file)); 18 | if ($now - filemtime($file) >= 60 * 60 * 24 * 30) { // 30 days 19 | //print "
- - - deleting $file"; 20 | unlink($file); 21 | } 22 | } 23 | } 24 | 25 | 26 | 27 | if (!$_REQUEST['action']) { 28 | print "Invalid use of script!"; 29 | exit; 30 | } 31 | if ($_REQUEST['action']!="archiveDB") { 32 | print "Invalid use of script!!"; 33 | exit; 34 | } 35 | // print "saving to "."../../log/" . $_REQUEST['filename']; 36 | if (move_uploaded_file($_FILES['file_contents']['tmp_name'], "../../log/" . $_REQUEST['filename'])) { 37 | print "OK"; 38 | exit; 39 | } 40 | print "NOK"; 41 | ?> -------------------------------------------------------------------------------- /Source/scripts/backupDatabases.php: -------------------------------------------------------------------------------- 1 | open($archiveFile, ZIPARCHIVE::CHECKCONS) !== TRUE) { 18 | $errMsg = "Unable to Open $archiveFile"; 19 | return 1; 20 | } 21 | } 22 | else { 23 | if($ziph->open($archiveFile, ZIPARCHIVE::CREATE) !== TRUE) { 24 | $errMsg = "Could not Create $archiveFile"; 25 | return 1; 26 | } 27 | } 28 | //if(!$ziph->addFile($data)) { 29 | if(!$ziph->addFromString($identifier, $data)) { 30 | $errMsg = "error archiving $file in $archiveFile"; 31 | return 2; 32 | } 33 | $ziph->close(); 34 | 35 | return 0; 36 | } 37 | function backupTable($tablename) { 38 | global $db; 39 | $s = "DROP TABLE IF EXISTS $tablename;\n"; 40 | $result = $db->query("SHOW CREATE TABLE $tablename;"); 41 | $c = $result->fetch_assoc()['Create Table'] . ";"; 42 | $s.= str_replace(array("\r","\n"),"",$c)."\n"; 43 | $result = $db->query("SELECT * from $tablename;"); 44 | while ($row = $result->fetch_assoc()) { 45 | $keys=[]; 46 | $values=[]; 47 | $s.= "INSERT INTO $tablename ("; 48 | foreach ($row as $key=>$value) { 49 | $keys[]="`$key`"; 50 | if (!isset($value)) $values[]="null"; 51 | else if (is_numeric($value)) $values[]=$value; 52 | else $values[]="'".addslashes($value)."'"; 53 | } 54 | $s.=implode(',',$keys); 55 | $s.=") VALUES("; 56 | $s.=implode(',',$values); 57 | $s.=");\n"; 58 | } 59 | return $s; 60 | } 61 | 62 | SQLConnect(); 63 | $tables=[]; 64 | $errMsg = ''; 65 | $dir = __DIR__; 66 | $dir = substr($dir,0,strlen($dir)-8); 67 | $archiveFile = "$dir/log/db_backup".date("Y-m-d_G_iA").'.zip'; 68 | $results = $db->query("SHOW TABLES"); 69 | while($row = $results->fetch_array()){ 70 | $tables[] = $row[0]; 71 | } 72 | foreach ($tables as $table) { 73 | $s =backupTable($table); 74 | print str_replace("\n","
",$s); 75 | $rc = archivebackup($archiveFile, $table.".sql", $s, $errMsg); 76 | if ($rc!==0) { 77 | print "

$errMsg"; 78 | exit; 79 | } 80 | } 81 | 82 | ?> -------------------------------------------------------------------------------- /Source/scripts/backupProgramsToCloud.php: -------------------------------------------------------------------------------- 1 | 'archiveDB', 25 | 'filename' => basename($filename), 26 | 'file_contents' => $cFile 27 | ]; 28 | 29 | $ch = curl_init($host); 30 | curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false); 31 | curl_setopt($ch, CURLOPT_POST, true); 32 | curl_setopt($ch, CURLOPT_POSTFIELDS, $post); 33 | // receive server response ... 34 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 35 | 36 | $server_output = curl_exec ($ch); 37 | 38 | curl_close ($ch); 39 | // further processing .... 40 | if ($server_output == "OK") { 41 | unlink($filename); 42 | } 43 | } 44 | 45 | function addFolder($zip, $folder, $newPath) { 46 | $zip->addEmptyDir($newPath); 47 | foreach(glob($folder . '/*') as $file) { 48 | $name = basename($file); 49 | $file = str_replace('\\', '/', $file); 50 | if(is_dir($file)) { 51 | $zip->addEmptyDir($newPath."/".$name); 52 | addFolder($zip,$file,$newPath."/".$name); 53 | } 54 | else { 55 | $zip->addFile($file,$newPath."/".$name); 56 | 57 | } 58 | } 59 | } 60 | SQLConnect(); 61 | $tables=[]; 62 | $errMsg = ''; 63 | 64 | $dir = __DIR__; 65 | $dir = substr($dir,0,strlen($dir)-8); 66 | $dir = str_replace("\\","/",$dir); 67 | // $tempDir="$dir/log/work"; 68 | // rrmdir($tempDir); 69 | // mkdir($tempDir); 70 | 71 | $archiveFile = "$dir/log/program_backup".date("Y-m-d_G_iA").'.zip'; 72 | $ziph = new ZipArchive(); 73 | if($ziph->open($archiveFile, ZIPARCHIVE::CREATE) !== TRUE) { 74 | exit; 75 | } 76 | foreach(glob($dir . '/*.*') as $file) { 77 | if (is_dir($file)) continue; 78 | $ziph->addFile($file,basename($file)); 79 | } 80 | addFolder($ziph, "$dir/js","js"); 81 | addFolder($ziph, "$dir/css","css"); 82 | addFolder($ziph, "$dir/scripts","scripts"); 83 | addFolder($ziph, "$dir/pages","pages"); 84 | addFolder($ziph, "$dir/Escpos","Escpos"); 85 | $ziph->close(); 86 | // rrmdir($tempDir); 87 | sendToCloud($archiveFile); 88 | ?> -------------------------------------------------------------------------------- /Source/scripts/backupToCloud.php: -------------------------------------------------------------------------------- 1 | 'archiveDB', 31 | 'filename' => basename($filename), 32 | 'file_contents' => $cFile 33 | ]; 34 | 35 | $ch = curl_init($host); 36 | curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false); 37 | curl_setopt($ch, CURLOPT_POST, true); 38 | curl_setopt($ch, CURLOPT_POSTFIELDS, $post); 39 | // receive server response ... 40 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 41 | 42 | $server_output = curl_exec ($ch); 43 | 44 | curl_close ($ch); 45 | // further processing .... 46 | if ($server_output == "OK") { 47 | unlink($filename); 48 | } 49 | } 50 | 51 | function archiveTable($filename,$tablename,$errMsg) { 52 | global $db; 53 | $myfile = fopen($filename, "w"); 54 | if (!$myfile) { 55 | $errMsg("Unable to open file ($filename)!"); 56 | return false; 57 | } 58 | fwrite($myfile, "DROP TABLE IF EXISTS $tablename;\n"); 59 | $result = $db->query("SHOW CREATE TABLE $tablename;"); 60 | $c = $result->fetch_assoc()['Create Table'] . ";"; 61 | fwrite($myfile, str_replace(array("\r","\n"),"",$c)."\n"); 62 | $result = $db->query("SELECT * from $tablename;"); 63 | while ($row = $result->fetch_assoc()) { 64 | $keys=[]; 65 | $values=[]; 66 | fwrite($myfile, "INSERT INTO $tablename ("); 67 | foreach ($row as $key=>$value) { 68 | $keys[]="`$key`"; 69 | if (!isset($value)) $values[]="null"; 70 | else if (is_numeric($value)) $values[]=$value; 71 | else $values[]="'".addslashes($value)."'"; 72 | } 73 | fwrite($myfile, implode(',',$keys)); 74 | fwrite($myfile, ") VALUES("); 75 | fwrite($myfile, implode(',',$values)); 76 | fwrite($myfile, ");\n"); 77 | } 78 | fclose($myfile); 79 | return true; 80 | } 81 | 82 | SQLConnect(); 83 | $tables=[]; 84 | $errMsg = ''; 85 | 86 | $dir = __DIR__; 87 | $dir = substr($dir,0,strlen($dir)-8); 88 | $dir = str_replace("\\","/",$dir); 89 | $tempDir="$dir/log/work"; 90 | rrmdir($tempDir); 91 | mkdir($tempDir); 92 | 93 | $archiveFile = "$dir/log/db_backup".date("Y-m-d_G_iA").'.zip'; 94 | 95 | $results = $db->query("SHOW TABLES"); 96 | while($row = $results->fetch_array()){ 97 | $tables[] = $row[0]; 98 | } 99 | foreach ($tables as $table) { 100 | $rc = archiveTable("$tempDir/$table.sql", $table, $errMsg); 101 | if ($rc=false) { 102 | exit; 103 | } 104 | } 105 | $ziph = new ZipArchive(); 106 | if($ziph->open($archiveFile, ZIPARCHIVE::CREATE) !== TRUE) { 107 | exit; 108 | } 109 | 110 | 111 | $dir = opendir ($tempDir); 112 | while ($file = readdir($dir)) { 113 | if ($file == '.' || $file == '..') continue; 114 | $ziph->addFile($tempDir."/".$file,$file); 115 | } 116 | $ziph->close(); 117 | rrmdir($tempDir); 118 | sendToCloud($archiveFile); 119 | ?> -------------------------------------------------------------------------------- /Source/scripts/cashDrawerOpen.bat: -------------------------------------------------------------------------------- 1 | echo hello %1: >test.txt 2 | exit -------------------------------------------------------------------------------- /Source/scripts/connectPOS.php: -------------------------------------------------------------------------------- 1 | connect_errno) { 23 | $db_err = "Failed to connect to MySQL: (" . $db->connect_errno . ") " . $db->connect_error; 24 | posLog($db_err,"SSBadLogin.txt"); 25 | return false; 26 | } 27 | $db_connected=true; 28 | $db->autocommit(true); // insure that unless requested, each query stands alone... 29 | return true; 30 | } 31 | /*----------------------------------------------------------------------------------------------------------- 32 | A couple of useful functions that will almost always be loaded, since SQLConnect 33 | are always needed 34 | ------------------------------------------------------------------------------------------------------------*/ 35 | $hDir = "../log"; 36 | error_reporting(E_ALL); 37 | ini_set('error_log',"$hDir/PHP_Errors.txt"); // insure all including cron jobs are logged to same place 38 | function myErrorHandler($errno, $errstr, $errfile, $errline) { 39 | global $hDir; 40 | error_reporting(0); // turn off error reporting 41 | set_error_handler(NULL); // turn off this error handler to avoid recursive entry. 42 | $backtrace=stackTrace(); 43 | posLog("Error in server side code: $errstr in $errfile($errline)\n$backtrace","SS_PHP_Errors.txt",true); 44 | 45 | print ""; 46 | 47 | die(); 48 | } 49 | 50 | $old_error_handler = set_error_handler("myErrorHandler"); 51 | 52 | function posLog($msg,$logfile="MessageLog.txt") { 53 | global $hDir; 54 | $msg = date("Y-m-d H:i:s")."$msg\r\n"; 55 | file_put_contents("$hDir/$logfile", $msg, FILE_APPEND ); 56 | } 57 | 58 | function posError($error,$logfile="MessageLog.txt") { 59 | posLog("Error reported by PHP Script\r\n$error\r\n".stackTrace(false),$logfile,true); 60 | } 61 | 62 | function stackTrace($skipFirst=true) { 63 | try { 64 | $stack = debug_backtrace(); 65 | } catch(Exception $e) { 66 | return "Stack trace not available"; 67 | } 68 | $output = ''; 69 | $stackLen = count($stack); 70 | for ($i = ($skipFirst?2:1); $i < $stackLen; $i++) { 71 | $entry = $stack[$i]; 72 | $func = $entry['function'] . '('; 73 | if (is_array($entry['args'])) $argsLen = count($entry['args']); 74 | else { 75 | $argsLen = 0; 76 | } 77 | $arrays=array(); 78 | for ($j =0 ; $j < $argsLen; $j++) { 79 | if (is_object($entry['args'][$j])) { 80 | $func.="object$j"; 81 | $arrays['object'.$j]=get_object_vars($entry['args'][$j]); 82 | } 83 | else if (is_array($entry['args'][$j])) { 84 | $func.="array$j"; 85 | $arrays['array'.$j]=$entry['args'][$j]; 86 | } 87 | else $func .= str_replace(array("\n","\r"),'',$entry['args'][$j]); 88 | if ($j < $argsLen - 1) $func .= ', '; 89 | } 90 | $func .= ')'; 91 | if (isset($entry['file'],$entry['line'],$func)) 92 | $output .= $entry['file'] . ':' . $entry['line'] . ' - ' . $func . PHP_EOL; 93 | foreach ($arrays as $k=>$a) { 94 | $output.=" \t$k=("; 95 | if (is_array($a)) foreach ($a as $kk=>$aa) { 96 | if (is_string($aa))$output.="$kk=>$aa,"; 97 | else $output.="$kk=>object/array"; 98 | } 99 | else if (is_string($a)) $output.="$k=>$a"; 100 | else $output.="$k=>object"; 101 | $output=rtrim($output, ","); 102 | $output.=')'.PHP_EOL; 103 | } 104 | } 105 | $output .= "REQUEST=".str_replace(array("\n","\r"),"",var_export($_REQUEST,true)); 106 | return $output; 107 | } 108 | 109 | ?> -------------------------------------------------------------------------------- /Source/scripts/desktop.ini: -------------------------------------------------------------------------------- 1 | [ViewState] 2 | Mode= 3 | Vid= 4 | FolderType=Generic 5 | -------------------------------------------------------------------------------- /Source/scripts/logMessages.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Source/scripts/posTillReportPrint.php: -------------------------------------------------------------------------------- 1 | query($query); 23 | $tillTotals = array('count'=>0); 24 | while($row = $result->fetch_assoc()) { 25 | $tillTotals[$row['entryType']] = $row['amount']; 26 | $tillTotals['count']+=1; 27 | } 28 | return $tillTotals; 29 | } 30 | function getTillDetail($till,$entryType) { 31 | global $db,$_date; 32 | $query = "select * from tills ". 33 | "where DATE(date) = '".$_date."' and tillName = 'till$till' ". 34 | "and entryType = '$entryType';"; 35 | $result = $db->query($query); 36 | return $result->fetch_all(MYSQLI_ASSOC); 37 | } 38 | function printTillDetail($tPrtr,$tillNumber,$tTotals,$entryType,$description,$detail=false){ 39 | if (isset($tTotals[$entryType])) $to = number_format($tTotals[$entryType],2); else $to = "0.00"; 40 | if ($detail and isset($tTotals[$entryType])) { 41 | $description .= ' Total'; 42 | $det = getTillDetail($tillNumber,$entryType); 43 | foreach ($det as $item) { 44 | $too = number_format($item['amount'],2); 45 | $tPrtr->text(" {$item['reference']} {$item['description']}",47,"left",Printer::FONT_B); 46 | $tPrtr->text($too,6,"right",Printer::FONT_B); 47 | $tPrtr->feed(1); 48 | } 49 | } 50 | $tPrtr->text($description,41,"left",Printer::FONT_A); 51 | $tPrtr->text($to,6,"right",Printer::FONT_A); 52 | $tPrtr->feed(1); 53 | } 54 | function printTill($tPrtr,$tTotals,$tillNumber) { 55 | $tPrtr->text("Till $tillNumber Report",47,"center",Printer::FONT_A); 56 | $tPrtr->feed(1); 57 | printTillDetail($tPrtr,$tillNumber,$tTotals,'tillOpen',"Open Till"); 58 | printTillDetail($tPrtr,$tillNumber,$tTotals,'order-cash',"Cash Payments"); 59 | printTillDetail($tPrtr,$tillNumber,$tTotals,'order-check',"Check Payments"); 60 | printTillDetail($tPrtr,$tillNumber,$tTotals,'order-gift',"Gift Card Payments"); 61 | printTillDetail($tPrtr,$tillNumber,$tTotals,'add',"Till Add",true); 62 | printTillDetail($tPrtr,$tillNumber,$tTotals,'drop[',"Till Drop",true); 63 | printTillDetail($tPrtr,$tillNumber,$tTotals,'vendor',"Till Vendor",true); 64 | if (isset($tTotal['tillClose'])) 65 | printTillDetail($tPrtr,$tillNumber,$tTotals,'tillClose',"Till Close"); 66 | $total=0; 67 | foreach ($tTotals as $key=>$item) { 68 | if ($key=='count') continue; 69 | $total+=floatval($item); 70 | } 71 | $tPrtr->text(' ',47,"left",Printer::FONT_A,true); 72 | $tPrtr->feed(1); 73 | $tPrtr->text("Till $tillNumber Total",41,"left",Printer::FONT_A); 74 | $tPrtr->text(number_format($total,2),6,"right",Printer::FONT_A); 75 | $tPrtr->feed(2); 76 | } 77 | if (!isset($_REQUEST['till'])) { 78 | posLog("No Till Specified on Till Print Request"); 79 | $jTableResult = array(); 80 | $jTableResult['Result'] = "ERROR"; 81 | $jTableResult['Message'] = "No Till Specified on Till Print Request"; 82 | print json_encode($jTableResult); 83 | exit; 84 | } 85 | $tillNumber = preg_replace("/[^0-9]/","",$_REQUEST['till']); 86 | if (!SQLConnect()) print "
SQLConnect Error"; 87 | if (isset($_REQUEST['date'])) $_date = date('Y-m-d',strtotime($_REQUEST['date'])); 88 | else $_date = date('Y-m-d'); 89 | $d = date("m/d/Y",strtotime($_date)); 90 | $posTerminal=call_user_func($optionsActions['getValue'],'tprtr1'); 91 | $tPrtr = new TicketPrinter("Daily Close Report for $d",$posTerminal); 92 | $tPrtr->feed(1); 93 | $tTotals = getTillTotals($tillNumber); 94 | if ($tTotals['count']==0) continue; 95 | printTill($tPrtr,$tTotals,$tillNumber); 96 | $jTableResult = array(); 97 | $jTableResult['Result'] = "OK"; 98 | print json_encode($jTableResult); 99 | 100 | ?> -------------------------------------------------------------------------------- /Source/scripts/restoreDatabase.php: -------------------------------------------------------------------------------- 1 | Beginning Restore"; 35 | foreach (glob("$dir/log/db*.zip") as $filename) { 36 | preg_match("/db_backup(?P([^\.]*))\.zip/",$filename,$matches); 37 | if (!isset($matches['date'])) { 38 | print "
Invalid file $filename"; 39 | continue; 40 | } 41 | $fileDate = $matches['date']; 42 | echo "
 - - - - - Processing $filename date=$fileDate"; 43 | if ($fileDate>$lastModified) { 44 | $lastDBBackup = $filename; 45 | $lastModified = $fileDate; 46 | print "
 - - - - --  Found newer file - $filename;"; 47 | } 48 | } 49 | if (!$lastDBBackup) $lastDBBackup = $filename; 50 | if (!$lastDBBackup) { 51 | print "No backup file available to restore!!!"; 52 | exit; 53 | } 54 | print "
Opening archive file $lastDBBackup"; 55 | $zip = new ZipArchive; 56 | if ($zip->open($lastDBBackup) === TRUE) { 57 | $zip->extractTo($tempDir); 58 | $zip->close(); 59 | } else { 60 | print '
Failed to open archive'; 61 | exit; 62 | } 63 | foreach (glob($tempDir . '/*') as $filename) { 64 | print "
Processing $filename"; 65 | if(is_dir($filename)) continue; 66 | $file = fopen($filename, "r"); 67 | $table = basename($filename, ".sql");; 68 | $first = new DateTime(); 69 | print "
- - Restoring $table"; 70 | if (!$file) { 71 | print "Unable to open file ($filename)!"; 72 | posError("Unable to open file ($filename)!"); 73 | exit; 74 | } 75 | while(! feof($file)) { 76 | $query = fgets($file); 77 | if (!$query) continue; 78 | //print "
$query"; 79 | if (!$db->query($query)){ 80 | print "Error on query=$query"; 81 | } 82 | } 83 | fclose($file); 84 | $second = new DateTime(); 85 | $diff = $first->diff( $second ); 86 | print "
- - Finished $table in ".$diff->format( '%I:%S' ); 87 | 88 | } 89 | rrmdir($tempDir); 90 | $second = new DateTime(); 91 | $diff = $start->diff( $second ); 92 | print "
Finished Restore in ".$diff->format( '%I:%S' ).""; 93 | ?> --------------------------------------------------------------------------------