mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-03-27 19:32:46 -04:00
Upgrading to CI 2.1.0
git-svn-id: svn+ssh://jekkos@svn.code.sf.net/p/opensourcepos/code/@23 c3eb156b-1dc0-44e1-88ae-e38439141b53
This commit is contained in:
12
README.txt
12
README.txt
@@ -1,12 +0,0 @@
|
||||
How to Install
|
||||
-------------------------
|
||||
1. Create/locate a new mysql database to install open source point of sale into
|
||||
2. Execute the file database/database.sql to create the tables needed
|
||||
3. unzip and upload Open Source Point of Sale files to web server
|
||||
4. Copy application/config/database.php.tmpl to application/config/database.php
|
||||
5. Modify application/config/database.php to connect to your database
|
||||
6. Go to your point of sale install via the browser
|
||||
7. LOGIN using
|
||||
username: admin
|
||||
password:pointofsale
|
||||
8. Enjoy
|
||||
@@ -1,4 +0,0 @@
|
||||
How to Upgrade
|
||||
-------------------------
|
||||
1. Replace all code from your point of sale installation with the code downloaded
|
||||
2. Run the necessary database upgrades from the database folder
|
||||
@@ -1,5 +0,0 @@
|
||||
* E-Mail Receipt support
|
||||
* Currency Symbol support
|
||||
* Fixed a bug where comment would disappear after typing it and then doing something different in a sale.
|
||||
* Fixed bug where Low Inventory items wouldn't display correct items
|
||||
* Fixed bug where an item couldn't be imported with a location
|
||||
@@ -1,127 +0,0 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| AUTO-LOADER
|
||||
| -------------------------------------------------------------------
|
||||
| This file specifies which systems should be loaded by default.
|
||||
|
|
||||
| In order to keep the framework as light-weight as possible only the
|
||||
| absolute minimal resources are loaded by default. For example,
|
||||
| the database is not connected to automatically since no assumption
|
||||
| is made regarding whether you intend to use it. This file lets
|
||||
| you globally define which systems you would like loaded with every
|
||||
| request.
|
||||
|
|
||||
| -------------------------------------------------------------------
|
||||
| Instructions
|
||||
| -------------------------------------------------------------------
|
||||
|
|
||||
| These are the things you can load automatically:
|
||||
|
|
||||
| 1. Libraries
|
||||
| 2. Helper files
|
||||
| 3. Plugins
|
||||
| 4. Custom config files
|
||||
| 5. Language files
|
||||
| 6. Models
|
||||
|
|
||||
*/
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Libraries
|
||||
| -------------------------------------------------------------------
|
||||
| These are the classes located in the system/libraries folder
|
||||
| or in your system/application/libraries folder.
|
||||
|
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
|
||||
*/
|
||||
|
||||
$autoload['libraries'] = array('database','form_validation','session','user_agent', 'pagination');
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Helper Files
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['helper'] = array('url', 'file');
|
||||
*/
|
||||
|
||||
//sale
|
||||
$autoload['helper'] = array('form','url','table','text','currency', 'html', 'download');
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Plugins
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['plugin'] = array('captcha', 'js_calendar');
|
||||
*/
|
||||
|
||||
$autoload['plugin'] = array();
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Config files
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['config'] = array('config1', 'config2');
|
||||
|
|
||||
| NOTE: This item is intended for use ONLY if you have created custom
|
||||
| config files. Otherwise, leave it blank.
|
||||
|
|
||||
*/
|
||||
|
||||
$autoload['config'] = array();
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Language files
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['language'] = array('lang1', 'lang2');
|
||||
|
|
||||
| NOTE: Do not include the "_lang" part of your file. For example
|
||||
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
||||
|
|
||||
*/
|
||||
$autoload['language'] = array('common', 'config', 'customers', 'employees', 'error', 'items', 'login', 'module', 'reports', 'sales','suppliers','receivings','giftcards', 'item_kits');
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Models
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['model'] = array('model1', 'model2');
|
||||
|
|
||||
*/
|
||||
|
||||
$autoload['model'] = array('Appconfig','Person','Customer','Employee','Module','Item', 'Item_taxes', 'Sale', 'Sale_suspended', 'Supplier','Inventory','Receiving','Giftcard', 'Item_kit', 'Item_kit_items');
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Core Libraries
|
||||
| -------------------------------------------------------------------
|
||||
|
|
||||
| DEPRECATED: Use $autoload['libraries'] above instead.
|
||||
|
|
||||
*/
|
||||
// $autoload['core'] = array();
|
||||
|
||||
|
||||
|
||||
/* End of file autoload.php */
|
||||
/* Location: ./application/config/autoload.php */
|
||||
@@ -1,328 +0,0 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Code Version
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the version of Open Source Point of Sale you're running
|
||||
|
|
||||
|
|
||||
*/
|
||||
$config['application_version'] = 1.1;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Base Site URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| URL to your CodeIgniter root. Typically this will be your base URL,
|
||||
| WITH a trailing slash:
|
||||
|
|
||||
| http://example.com/
|
||||
|
|
||||
*/
|
||||
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
|
||||
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
|
||||
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Index File
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Typically this will be your index.php file, unless you've renamed it to
|
||||
| something else. If you are using mod_rewrite to remove the page set this
|
||||
| variable so that it is blank.
|
||||
|
|
||||
*/
|
||||
$config['index_page'] = "index.php";
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| URI PROTOCOL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This item determines which server global should be used to retrieve the
|
||||
| URI string. The default setting of "AUTO" works for most servers.
|
||||
| If your links do not seem to work, try one of the other delicious flavors:
|
||||
|
|
||||
| 'AUTO' Default - auto detects
|
||||
| 'PATH_INFO' Uses the PATH_INFO
|
||||
| 'QUERY_STRING' Uses the QUERY_STRING
|
||||
| 'REQUEST_URI' Uses the REQUEST_URI
|
||||
| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
|
||||
|
|
||||
*/
|
||||
$config['uri_protocol'] = "AUTO";
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| URL suffix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
|
||||
| For more information please see the user guide:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/urls.html
|
||||
*/
|
||||
|
||||
$config['url_suffix'] = "";
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Language
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This determines which set of language files should be used. Make sure
|
||||
| there is an available translation if you intend to use something other
|
||||
| than english.
|
||||
|
|
||||
*/
|
||||
$config['language'] = "english";
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Character Set
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This determines which character set is used by default in various methods
|
||||
| that require a character set to be provided.
|
||||
|
|
||||
*/
|
||||
$config['charset'] = "UTF-8";
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable/Disable System Hooks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you would like to use the "hooks" feature you must enable it by
|
||||
| setting this variable to TRUE (boolean). See the user guide for details.
|
||||
|
|
||||
*/
|
||||
$config['enable_hooks'] = TRUE;
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Extension Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This item allows you to set the filename/classname prefix when extending
|
||||
| native libraries. For more information please see the user guide:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/core_classes.html
|
||||
| http://codeigniter.com/user_guide/general/creating_libraries.html
|
||||
|
|
||||
*/
|
||||
$config['subclass_prefix'] = 'MY_';
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Allowed URL Characters
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This lets you specify with a regular expression which characters are permitted
|
||||
| within your URLs. When someone tries to submit a URL with disallowed
|
||||
| characters they will get a warning message.
|
||||
|
|
||||
| As a security measure you are STRONGLY encouraged to restrict URLs to
|
||||
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
||||
|
|
||||
| Leave blank to allow all characters -- but only if you are insane.
|
||||
|
|
||||
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
||||
|
|
||||
*/
|
||||
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable Query Strings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default CodeIgniter uses search-engine friendly segment based URLs:
|
||||
| example.com/who/what/where/
|
||||
|
|
||||
| You can optionally enable standard query string based URLs:
|
||||
| example.com?who=me&what=something&where=here
|
||||
|
|
||||
| Options are: TRUE or FALSE (boolean)
|
||||
|
|
||||
| The other items let you set the query string "words" that will
|
||||
| invoke your controllers and its functions:
|
||||
| example.com/index.php?c=controller&m=function
|
||||
|
|
||||
| Please note that some of the helpers won't work as expected when
|
||||
| this feature is enabled, since CodeIgniter is designed primarily to
|
||||
| use segment based URLs.
|
||||
|
|
||||
*/
|
||||
$config['enable_query_strings'] = TRUE;
|
||||
$config['directory_trigger'] = 'd'; // experimental not currently in use
|
||||
$config['controller_trigger'] = 'c';
|
||||
$config['function_trigger'] = 'm';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Error Logging Threshold
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you have enabled error logging, you can set an error threshold to
|
||||
| determine what gets logged. Threshold options are:
|
||||
| You can enable error logging by setting a threshold over zero. The
|
||||
| threshold determines what gets logged. Threshold options are:
|
||||
|
|
||||
| 0 = Disables logging, Error logging TURNED OFF
|
||||
| 1 = Error Messages (including PHP errors)
|
||||
| 2 = Debug Messages
|
||||
| 3 = Informational Messages
|
||||
| 4 = All Messages
|
||||
|
|
||||
| For a live site you'll usually only enable Errors (1) to be logged otherwise
|
||||
| your log files will fill up very fast.
|
||||
|
|
||||
*/
|
||||
$config['log_threshold'] = 0;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Error Logging Directory Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Leave this BLANK unless you would like to set something other than the default
|
||||
| system/logs/ folder. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['log_path'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Date Format for Logs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Each item that is logged has an associated date. You can use PHP date
|
||||
| codes to set your own date formatting
|
||||
|
|
||||
*/
|
||||
$config['log_date_format'] = 'Y-m-d H:i:s';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Directory Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Leave this BLANK unless you would like to set something other than the default
|
||||
| system/cache/ folder. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['cache_path'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you use the Encryption class or the Sessions class with encryption
|
||||
| enabled you MUST set an encryption key. See the user guide for info.
|
||||
|
|
||||
*/
|
||||
$config['encryption_key'] = "";
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Variables
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'session_cookie_name' = the name you want for the cookie
|
||||
| 'encrypt_sess_cookie' = TRUE/FALSE (boolean). Whether to encrypt the cookie
|
||||
| 'session_expiration' = the number of SECONDS you want the session to last.
|
||||
| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
|
||||
| 'time_to_update' = how many seconds between CI refreshing Session Information
|
||||
|
|
||||
*/
|
||||
$config['sess_cookie_name'] = 'ci_session';
|
||||
$config['sess_expiration'] = 0;
|
||||
$config['sess_encrypt_cookie'] = FALSE;
|
||||
$config['sess_use_database'] = TRUE;
|
||||
$config['sess_table_name'] = 'sessions';
|
||||
$config['sess_match_ip'] = FALSE;
|
||||
$config['sess_match_useragent'] = TRUE;
|
||||
$config['sess_time_to_update'] = PHP_INT_MAX;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cookie Related Variables
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'cookie_prefix' = Set a prefix if you need to avoid collisions
|
||||
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
|
||||
| 'cookie_path' = Typically will be a forward slash
|
||||
|
|
||||
*/
|
||||
$config['cookie_prefix'] = "";
|
||||
$config['cookie_domain'] = "";
|
||||
$config['cookie_path'] = "/";
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global XSS Filtering
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Determines whether the XSS filter is always active when GET, POST or
|
||||
| COOKIE data is encountered
|
||||
|
|
||||
*/
|
||||
$config['global_xss_filtering'] = TRUE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Output Compression
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enables Gzip output compression for faster page loads. When enabled,
|
||||
| the output class will test whether your server supports Gzip.
|
||||
| Even if it does, however, not all browsers support compression
|
||||
| so enable only if you are reasonably sure your visitors can handle it.
|
||||
|
|
||||
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
|
||||
| means you are prematurely outputting something to your browser. It could
|
||||
| even be a line of whitespace at the end of one of your scripts. For
|
||||
| compression to work, nothing can be sent before the output buffer is called
|
||||
| by the output class. Do not "echo" any values with compression enabled.
|
||||
|
|
||||
*/
|
||||
$config['compress_output'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Master Time Reference
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Options are "local" or "gmt". This pref tells the system whether to use
|
||||
| your server's local time as the master "now" reference, or convert it to
|
||||
| GMT. See the "date helper" page of the user guide for information
|
||||
| regarding date handling.
|
||||
|
|
||||
*/
|
||||
$config['time_reference'] = 'local';
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Rewrite PHP Short Tags
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your PHP installation does not have short tag support enabled CI
|
||||
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
|
||||
| in your view files. Options are TRUE or FALSE (boolean)
|
||||
|
|
||||
*/
|
||||
$config['rewrite_short_tags'] = FALSE;
|
||||
|
||||
|
||||
|
||||
/* End of file config.php */
|
||||
/* Location: ./application/config/config.php */
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File and Directory Modes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These prefs are used when checking and setting modes when working
|
||||
| with the file system. The defaults are fine on servers with proper
|
||||
| security, but you may wish (or even need) to change the values in
|
||||
| certain environments (Apache running a separate process for each
|
||||
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
|
||||
| always be used to set the mode correctly.
|
||||
|
|
||||
*/
|
||||
define('FILE_READ_MODE', 0644);
|
||||
define('FILE_WRITE_MODE', 0666);
|
||||
define('DIR_READ_MODE', 0755);
|
||||
define('DIR_WRITE_MODE', 0777);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File Stream Modes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These modes are used when working with fopen()/popen()
|
||||
|
|
||||
*/
|
||||
|
||||
define('FOPEN_READ', 'rb');
|
||||
define('FOPEN_READ_WRITE', 'r+b');
|
||||
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
|
||||
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
|
||||
define('FOPEN_WRITE_CREATE', 'ab');
|
||||
define('FOPEN_READ_WRITE_CREATE', 'a+b');
|
||||
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
|
||||
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
|
||||
|
||||
|
||||
/* End of file constants.php */
|
||||
/* Location: ./application/config/constants.php */
|
||||
@@ -1,55 +0,0 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| DATABASE CONNECTIVITY SETTINGS
|
||||
| -------------------------------------------------------------------
|
||||
| This file will contain the settings needed to access your database.
|
||||
|
|
||||
| For complete instructions please consult the "Database Connection"
|
||||
| page of the User Guide.
|
||||
|
|
||||
| -------------------------------------------------------------------
|
||||
| EXPLANATION OF VARIABLES
|
||||
| -------------------------------------------------------------------
|
||||
|
|
||||
| ['hostname'] The hostname of your database server.
|
||||
| ['username'] The username used to connect to the database
|
||||
| ['password'] The password used to connect to the database
|
||||
| ['database'] The name of the database you want to connect to
|
||||
| ['dbdriver'] The database type. ie: mysql. Currently supported:
|
||||
mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
|
||||
| ['dbprefix'] You can add an optional prefix, which will be added
|
||||
| to the table name when using the Active Record class
|
||||
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
|
||||
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
|
||||
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
|
||||
| ['cachedir'] The path to the folder where cache files should be stored
|
||||
| ['char_set'] The character set used in communicating with the database
|
||||
| ['dbcollat'] The character collation used in communicating with the database
|
||||
|
|
||||
| The $active_group variable lets you choose which connection group to
|
||||
| make active. By default there is only one group (the "default" group).
|
||||
|
|
||||
| The $active_record variables lets you determine whether or not to load
|
||||
| the active record class
|
||||
*/
|
||||
|
||||
$active_group = "default";
|
||||
$active_record = TRUE;
|
||||
|
||||
$db['default']['hostname'] = "localhost";
|
||||
$db['default']['username'] = "";
|
||||
$db['default']['password'] = "";
|
||||
$db['default']['database'] = "";
|
||||
$db['default']['dbdriver'] = "mysql";
|
||||
$db['default']['dbprefix'] = "ospos_";
|
||||
$db['default']['pconnect'] = FALSE;
|
||||
$db['default']['db_debug'] = FALSE;
|
||||
$db['default']['cache_on'] = FALSE;
|
||||
$db['default']['cachedir'] = "";
|
||||
$db['default']['char_set'] = "utf8";
|
||||
$db['default']['dbcollat'] = "utf8_general_ci";
|
||||
|
||||
|
||||
/* End of file database.php */
|
||||
/* Location: ./application/config/database.php */
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| Hooks
|
||||
| -------------------------------------------------------------------------
|
||||
| This file lets you define "hooks" to extend CI without hacking the core
|
||||
| files. Please see the user guide for info:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/hooks.html
|
||||
|
|
||||
*/
|
||||
$hook['post_controller_constructor'] = array(
|
||||
'class' => '',
|
||||
'function' => 'load_config',
|
||||
'filename' => 'load_config.php',
|
||||
'filepath' => 'hooks'
|
||||
);
|
||||
|
||||
|
||||
|
||||
/* End of file hooks.php */
|
||||
/* Location: ./application/config/hooks.php */
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,104 +0,0 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| MIME TYPES
|
||||
| -------------------------------------------------------------------
|
||||
| This file contains an array of mime types. It is used by the
|
||||
| Upload class to help identify allowed file types.
|
||||
|
|
||||
*/
|
||||
|
||||
$mimes = array( 'hqx' => 'application/mac-binhex40',
|
||||
'cpt' => 'application/mac-compactpro',
|
||||
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
|
||||
'bin' => 'application/macbinary',
|
||||
'dms' => 'application/octet-stream',
|
||||
'lha' => 'application/octet-stream',
|
||||
'lzh' => 'application/octet-stream',
|
||||
'exe' => 'application/octet-stream',
|
||||
'class' => 'application/octet-stream',
|
||||
'psd' => 'application/x-photoshop',
|
||||
'so' => 'application/octet-stream',
|
||||
'sea' => 'application/octet-stream',
|
||||
'dll' => 'application/octet-stream',
|
||||
'oda' => 'application/oda',
|
||||
'pdf' => array('application/pdf', 'application/x-download'),
|
||||
'ai' => 'application/postscript',
|
||||
'eps' => 'application/postscript',
|
||||
'ps' => 'application/postscript',
|
||||
'smi' => 'application/smil',
|
||||
'smil' => 'application/smil',
|
||||
'mif' => 'application/vnd.mif',
|
||||
'xls' => array('application/excel', 'application/vnd.ms-excel'),
|
||||
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'),
|
||||
'wbxml' => 'application/wbxml',
|
||||
'wmlc' => 'application/wmlc',
|
||||
'dcr' => 'application/x-director',
|
||||
'dir' => 'application/x-director',
|
||||
'dxr' => 'application/x-director',
|
||||
'dvi' => 'application/x-dvi',
|
||||
'gtar' => 'application/x-gtar',
|
||||
'gz' => 'application/x-gzip',
|
||||
'php' => 'application/x-httpd-php',
|
||||
'php4' => 'application/x-httpd-php',
|
||||
'php3' => 'application/x-httpd-php',
|
||||
'phtml' => 'application/x-httpd-php',
|
||||
'phps' => 'application/x-httpd-php-source',
|
||||
'js' => 'application/x-javascript',
|
||||
'swf' => 'application/x-shockwave-flash',
|
||||
'sit' => 'application/x-stuffit',
|
||||
'tar' => 'application/x-tar',
|
||||
'tgz' => 'application/x-tar',
|
||||
'xhtml' => 'application/xhtml+xml',
|
||||
'xht' => 'application/xhtml+xml',
|
||||
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
|
||||
'mid' => 'audio/midi',
|
||||
'midi' => 'audio/midi',
|
||||
'mpga' => 'audio/mpeg',
|
||||
'mp2' => 'audio/mpeg',
|
||||
'mp3' => array('audio/mpeg', 'audio/mpg'),
|
||||
'aif' => 'audio/x-aiff',
|
||||
'aiff' => 'audio/x-aiff',
|
||||
'aifc' => 'audio/x-aiff',
|
||||
'ram' => 'audio/x-pn-realaudio',
|
||||
'rm' => 'audio/x-pn-realaudio',
|
||||
'rpm' => 'audio/x-pn-realaudio-plugin',
|
||||
'ra' => 'audio/x-realaudio',
|
||||
'rv' => 'video/vnd.rn-realvideo',
|
||||
'wav' => 'audio/x-wav',
|
||||
'bmp' => 'image/bmp',
|
||||
'gif' => 'image/gif',
|
||||
'jpeg' => array('image/jpeg', 'image/pjpeg'),
|
||||
'jpg' => array('image/jpeg', 'image/pjpeg'),
|
||||
'jpe' => array('image/jpeg', 'image/pjpeg'),
|
||||
'png' => array('image/png', 'image/x-png'),
|
||||
'tiff' => 'image/tiff',
|
||||
'tif' => 'image/tiff',
|
||||
'css' => 'text/css',
|
||||
'html' => 'text/html',
|
||||
'htm' => 'text/html',
|
||||
'shtml' => 'text/html',
|
||||
'txt' => 'text/plain',
|
||||
'text' => 'text/plain',
|
||||
'log' => array('text/plain', 'text/x-log'),
|
||||
'rtx' => 'text/richtext',
|
||||
'rtf' => 'text/rtf',
|
||||
'xml' => 'text/xml',
|
||||
'xsl' => 'text/xml',
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpg' => 'video/mpeg',
|
||||
'mpe' => 'video/mpeg',
|
||||
'qt' => 'video/quicktime',
|
||||
'mov' => 'video/quicktime',
|
||||
'avi' => 'video/x-msvideo',
|
||||
'movie' => 'video/x-sgi-movie',
|
||||
'doc' => 'application/msword',
|
||||
'word' => array('application/msword', 'application/octet-stream'),
|
||||
'xl' => 'application/excel',
|
||||
'eml' => 'message/rfc822'
|
||||
);
|
||||
|
||||
|
||||
|
||||
/* End of file mimes.php */
|
||||
/* Location: ./application/config/mimes.php */
|
||||
@@ -1,64 +0,0 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| URI ROUTING
|
||||
| -------------------------------------------------------------------------
|
||||
| This file lets you re-map URI requests to specific controller functions.
|
||||
|
|
||||
| Typically there is a one-to-one relationship between a URL string
|
||||
| and its corresponding controller class/method. The segments in a
|
||||
| URL normally follow this pattern:
|
||||
|
|
||||
| example.com/class/method/id/
|
||||
|
|
||||
| In some instances, however, you may want to remap this relationship
|
||||
| so that a different class/function is called than the one
|
||||
| corresponding to the URL.
|
||||
|
|
||||
| Please see the user guide for complete details:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/routing.html
|
||||
|
|
||||
| -------------------------------------------------------------------------
|
||||
| RESERVED ROUTES
|
||||
| -------------------------------------------------------------------------
|
||||
|
|
||||
| There are two reserved routes:
|
||||
|
|
||||
| $route['default_controller'] = 'welcome';
|
||||
|
|
||||
| This route indicates which controller class should be loaded if the
|
||||
| URI contains no data. In the above example, the "welcome" class
|
||||
| would be loaded.
|
||||
|
|
||||
| $route['scaffolding_trigger'] = 'scaffolding';
|
||||
|
|
||||
| This route lets you set a "secret" word that will trigger the
|
||||
| scaffolding feature for added security. Note: Scaffolding must be
|
||||
| enabled in the controller in which you intend to use it. The reserved
|
||||
| routes must come before any wildcard or regular expression routes.
|
||||
|
|
||||
*/
|
||||
|
||||
$route['default_controller'] = "login";
|
||||
$route['no_access/(:any)'] = "no_access/index/$1";
|
||||
$route['reports/(summary_:any)/(:any)/(:any)'] = "reports/$1/$2/$3";
|
||||
$route['reports/summary_:any'] = "reports/date_input_excel_export";
|
||||
$route['reports/(graphical_:any)/(:any)/(:any)'] = "reports/$1/$2/$3";
|
||||
$route['reports/graphical_:any'] = "reports/date_input";
|
||||
$route['reports/(inventory_:any)/(:any)'] = "reports/$1/$2";
|
||||
$route['reports/inventory_:any'] = "reports/excel_export";
|
||||
|
||||
$route['reports/(detailed_sales)/(:any)/(:any)'] = "reports/$1/$2/$3";
|
||||
$route['reports/detailed_sales'] = "reports/date_input";
|
||||
$route['reports/(detailed_receivings)/(:any)/(:any)'] = "reports/$1/$2/$3";
|
||||
$route['reports/detailed_receivings'] = "reports/date_input";
|
||||
$route['reports/(specific_:any)/(:any)/(:any)/(:any)'] = "reports/$1/$2/$3/$4";
|
||||
$route['reports/specific_customer'] = "reports/specific_customer_input";
|
||||
$route['reports/specific_employee'] = "reports/specific_employee_input";
|
||||
|
||||
$route['scaffolding_trigger'] = "";
|
||||
|
||||
|
||||
/* End of file routes.php */
|
||||
/* Location: ./application/config/routes.php */
|
||||
@@ -1,66 +0,0 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| SMILEYS
|
||||
| -------------------------------------------------------------------
|
||||
| This file contains an array of smileys for use with the emoticon helper.
|
||||
| Individual images can be used to replace multiple simileys. For example:
|
||||
| :-) and :) use the same image replacement.
|
||||
|
|
||||
| Please see user guide for more info:
|
||||
| http://codeigniter.com/user_guide/helpers/smiley_helper.html
|
||||
|
|
||||
*/
|
||||
|
||||
$smileys = array(
|
||||
|
||||
// smiley image name width height alt
|
||||
|
||||
':-)' => array('grin.gif', '19', '19', 'grin'),
|
||||
':lol:' => array('lol.gif', '19', '19', 'LOL'),
|
||||
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
|
||||
':)' => array('smile.gif', '19', '19', 'smile'),
|
||||
';-)' => array('wink.gif', '19', '19', 'wink'),
|
||||
';)' => array('wink.gif', '19', '19', 'wink'),
|
||||
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
|
||||
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
|
||||
':-S' => array('confused.gif', '19', '19', 'confused'),
|
||||
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
|
||||
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
|
||||
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
|
||||
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
|
||||
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
|
||||
':P' => array('rasberry.gif', '19', '19', 'rasberry'),
|
||||
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
|
||||
':long:' => array('longface.gif', '19', '19', 'long face'),
|
||||
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
|
||||
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
|
||||
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
|
||||
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
|
||||
':down:' => array('downer.gif', '19', '19', 'downer'),
|
||||
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
|
||||
':sick:' => array('sick.gif', '19', '19', 'sick'),
|
||||
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
|
||||
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
|
||||
'>:(' => array('mad.gif', '19', '19', 'mad'),
|
||||
':mad:' => array('mad.gif', '19', '19', 'mad'),
|
||||
'>:-(' => array('angry.gif', '19', '19', 'angry'),
|
||||
':angry:' => array('angry.gif', '19', '19', 'angry'),
|
||||
':zip:' => array('zip.gif', '19', '19', 'zipper'),
|
||||
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
|
||||
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
|
||||
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
|
||||
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
|
||||
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
|
||||
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
|
||||
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
|
||||
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
|
||||
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
|
||||
':snake:' => array('snake.gif', '19', '19', 'snake'),
|
||||
':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'),
|
||||
':question:' => array('question.gif', '19', '19', 'question') // no comma after last item
|
||||
|
||||
);
|
||||
|
||||
/* End of file smileys.php */
|
||||
/* Location: ./application/config/smileys.php */
|
||||
@@ -1,163 +0,0 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| USER AGENT TYPES
|
||||
| -------------------------------------------------------------------
|
||||
| This file contains four arrays of user agent data. It is used by the
|
||||
| User Agent Class to help identify browser, platform, robot, and
|
||||
| mobile device data. The array keys are used to identify the device
|
||||
| and the array values are used to set the actual name of the item.
|
||||
|
|
||||
*/
|
||||
|
||||
$platforms = array (
|
||||
'windows nt 6.0' => 'Windows Longhorn',
|
||||
'windows nt 5.2' => 'Windows 2003',
|
||||
'windows nt 5.0' => 'Windows 2000',
|
||||
'windows nt 5.1' => 'Windows XP',
|
||||
'windows nt 4.0' => 'Windows NT 4.0',
|
||||
'winnt4.0' => 'Windows NT 4.0',
|
||||
'winnt 4.0' => 'Windows NT',
|
||||
'winnt' => 'Windows NT',
|
||||
'windows 98' => 'Windows 98',
|
||||
'win98' => 'Windows 98',
|
||||
'windows 95' => 'Windows 95',
|
||||
'win95' => 'Windows 95',
|
||||
'windows' => 'Unknown Windows OS',
|
||||
'os x' => 'Mac OS X',
|
||||
'ppc mac' => 'Power PC Mac',
|
||||
'freebsd' => 'FreeBSD',
|
||||
'ppc' => 'Macintosh',
|
||||
'linux' => 'Linux',
|
||||
'debian' => 'Debian',
|
||||
'sunos' => 'Sun Solaris',
|
||||
'beos' => 'BeOS',
|
||||
'apachebench' => 'ApacheBench',
|
||||
'aix' => 'AIX',
|
||||
'irix' => 'Irix',
|
||||
'osf' => 'DEC OSF',
|
||||
'hp-ux' => 'HP-UX',
|
||||
'netbsd' => 'NetBSD',
|
||||
'bsdi' => 'BSDi',
|
||||
'openbsd' => 'OpenBSD',
|
||||
'gnu' => 'GNU/Linux',
|
||||
'unix' => 'Unknown Unix OS'
|
||||
);
|
||||
|
||||
|
||||
// The order of this array should NOT be changed. Many browsers return
|
||||
// multiple browser types so we want to identify the sub-type first.
|
||||
$browsers = array(
|
||||
'Opera' => 'Opera',
|
||||
'MSIE' => 'Internet Explorer',
|
||||
'Internet Explorer' => 'Internet Explorer',
|
||||
'Shiira' => 'Shiira',
|
||||
'Firefox' => 'Firefox',
|
||||
'Chimera' => 'Chimera',
|
||||
'Phoenix' => 'Phoenix',
|
||||
'Firebird' => 'Firebird',
|
||||
'Camino' => 'Camino',
|
||||
'Netscape' => 'Netscape',
|
||||
'OmniWeb' => 'OmniWeb',
|
||||
'Mozilla' => 'Mozilla',
|
||||
'Safari' => 'Safari',
|
||||
'Konqueror' => 'Konqueror',
|
||||
'icab' => 'iCab',
|
||||
'Lynx' => 'Lynx',
|
||||
'Links' => 'Links',
|
||||
'hotjava' => 'HotJava',
|
||||
'amaya' => 'Amaya',
|
||||
'IBrowse' => 'IBrowse'
|
||||
);
|
||||
|
||||
$mobiles = array(
|
||||
// legacy array, old values commented out
|
||||
'mobileexplorer' => 'Mobile Explorer',
|
||||
// 'openwave' => 'Open Wave',
|
||||
// 'opera mini' => 'Opera Mini',
|
||||
// 'operamini' => 'Opera Mini',
|
||||
// 'elaine' => 'Palm',
|
||||
'palmsource' => 'Palm',
|
||||
// 'digital paths' => 'Palm',
|
||||
// 'avantgo' => 'Avantgo',
|
||||
// 'xiino' => 'Xiino',
|
||||
'palmscape' => 'Palmscape',
|
||||
// 'nokia' => 'Nokia',
|
||||
// 'ericsson' => 'Ericsson',
|
||||
// 'blackberry' => 'BlackBerry',
|
||||
// 'motorola' => 'Motorola'
|
||||
|
||||
// Phones and Manufacturers
|
||||
'motorola' => "Motorola",
|
||||
'nokia' => "Nokia",
|
||||
'palm' => "Palm",
|
||||
'iphone' => "Apple iPhone",
|
||||
'ipod' => "Apple iPod Touch",
|
||||
'sony' => "Sony Ericsson",
|
||||
'ericsson' => "Sony Ericsson",
|
||||
'blackberry' => "BlackBerry",
|
||||
'cocoon' => "O2 Cocoon",
|
||||
'blazer' => "Treo",
|
||||
'lg' => "LG",
|
||||
'amoi' => "Amoi",
|
||||
'xda' => "XDA",
|
||||
'mda' => "MDA",
|
||||
'vario' => "Vario",
|
||||
'htc' => "HTC",
|
||||
'samsung' => "Samsung",
|
||||
'sharp' => "Sharp",
|
||||
'sie-' => "Siemens",
|
||||
'alcatel' => "Alcatel",
|
||||
'benq' => "BenQ",
|
||||
'ipaq' => "HP iPaq",
|
||||
'mot-' => "Motorola",
|
||||
'playstation portable' => "PlayStation Portable",
|
||||
'hiptop' => "Danger Hiptop",
|
||||
'nec-' => "NEC",
|
||||
'panasonic' => "Panasonic",
|
||||
'philips' => "Philips",
|
||||
'sagem' => "Sagem",
|
||||
'sanyo' => "Sanyo",
|
||||
'spv' => "SPV",
|
||||
'zte' => "ZTE",
|
||||
'sendo' => "Sendo",
|
||||
|
||||
// Operating Systems
|
||||
'symbian' => "Symbian",
|
||||
'elaine' => "Palm",
|
||||
'palm' => "Palm",
|
||||
'series60' => "Symbian S60",
|
||||
'windows ce' => "Windows CE",
|
||||
|
||||
// Browsers
|
||||
'obigo' => "Obigo",
|
||||
'netfront' => "Netfront Browser",
|
||||
'openwave' => "Openwave Browser",
|
||||
'mobilexplorer' => "Mobile Explorer",
|
||||
'operamini' => "Opera Mini",
|
||||
'opera mini' => "Opera Mini",
|
||||
|
||||
// Other
|
||||
'digital paths' => "Digital Paths",
|
||||
'avantgo' => "AvantGo",
|
||||
'xiino' => "Xiino",
|
||||
'novarra' => "Novarra Transcoder",
|
||||
'vodafone' => "Vodafone",
|
||||
'docomo' => "NTT DoCoMo",
|
||||
'o2' => "O2",
|
||||
|
||||
// Fallback
|
||||
'mobile' => "Generic Mobile",
|
||||
'wireless' => "Generic Mobile",
|
||||
'j2me' => "Generic Mobile",
|
||||
'midp' => "Generic Mobile",
|
||||
'cldc' => "Generic Mobile",
|
||||
'up.link' => "Generic Mobile",
|
||||
'up.browser' => "Generic Mobile",
|
||||
'smartphone' => "Generic Mobile",
|
||||
'cellphone' => "Generic Mobile"
|
||||
);
|
||||
|
||||
|
||||
/* End of file user_agents.php */
|
||||
/* Location: ./application/config/user_agents.php */
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
class Barcode extends Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->load->view('barcode');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,46 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
class Config extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('config');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->load->view("config");
|
||||
}
|
||||
|
||||
function save()
|
||||
{
|
||||
$batch_save_data=array(
|
||||
'company'=>$this->input->post('company'),
|
||||
'address'=>$this->input->post('address'),
|
||||
'phone'=>$this->input->post('phone'),
|
||||
'email'=>$this->input->post('email'),
|
||||
'fax'=>$this->input->post('fax'),
|
||||
'website'=>$this->input->post('website'),
|
||||
'default_tax_1_rate'=>$this->input->post('default_tax_1_rate'),
|
||||
'default_tax_1_name'=>$this->input->post('default_tax_1_name'),
|
||||
'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'),
|
||||
'default_tax_2_name'=>$this->input->post('default_tax_2_name'),
|
||||
'currency_symbol'=>$this->input->post('currency_symbol'),
|
||||
'return_policy'=>$this->input->post('return_policy'),
|
||||
'language'=>$this->input->post('language'),
|
||||
'timezone'=>$this->input->post('timezone'),
|
||||
'print_after_sale'=>$this->input->post('print_after_sale')
|
||||
);
|
||||
|
||||
if($_SERVER['HTTP_HOST'] !='ospos.pappastech.com' && $this->Appconfig->batch_save($batch_save_data))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('config_saved_successfully')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('config_saved_unsuccessfully')));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,200 +0,0 @@
|
||||
<?php
|
||||
require_once ("person_controller.php");
|
||||
class Customers extends Person_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('customers');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('?c=customers&m=index');
|
||||
$config['total_rows'] = $this->Customer->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_people_manage_table($this->Customer->get_all($config['per_page'], $this->input->get('per_page')),$this);
|
||||
$this->load->view('people/manage',$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns customer table data rows. This will be called with AJAX.
|
||||
*/
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_people_manage_table_data_rows($this->Customer->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Customer->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Loads the customer edit form
|
||||
*/
|
||||
function view($customer_id=-1)
|
||||
{
|
||||
$data['person_info']=$this->Customer->get_info($customer_id);
|
||||
$this->load->view("customers/form",$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Inserts/updates a customer
|
||||
*/
|
||||
function save($customer_id=-1)
|
||||
{
|
||||
$person_data = array(
|
||||
'first_name'=>$this->input->post('first_name'),
|
||||
'last_name'=>$this->input->post('last_name'),
|
||||
'email'=>$this->input->post('email'),
|
||||
'phone_number'=>$this->input->post('phone_number'),
|
||||
'address_1'=>$this->input->post('address_1'),
|
||||
'address_2'=>$this->input->post('address_2'),
|
||||
'city'=>$this->input->post('city'),
|
||||
'state'=>$this->input->post('state'),
|
||||
'zip'=>$this->input->post('zip'),
|
||||
'country'=>$this->input->post('country'),
|
||||
'comments'=>$this->input->post('comments')
|
||||
);
|
||||
$customer_data=array(
|
||||
'account_number'=>$this->input->post('account_number')=='' ? null:$this->input->post('account_number'),
|
||||
'taxable'=>$this->input->post('taxable')=='' ? 0:1,
|
||||
);
|
||||
if($this->Customer->save($person_data,$customer_data,$customer_id))
|
||||
{
|
||||
//New customer
|
||||
if($customer_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('customers_successful_adding').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>$customer_data['person_id']));
|
||||
}
|
||||
else //previous customer
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('customers_successful_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>$customer_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('customers_error_adding_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>-1));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
This deletes customers from the customers table
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
$customers_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Customer->delete_list($customers_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('customers_successful_deleted').' '.
|
||||
count($customers_to_delete).' '.$this->lang->line('customers_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('customers_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
function excel()
|
||||
{
|
||||
$data = file_get_contents("import_customers.csv");
|
||||
$name = 'import_customers.csv';
|
||||
force_download($name, $data);
|
||||
}
|
||||
|
||||
function excel_import()
|
||||
{
|
||||
$this->load->view("customers/excel_import", null);
|
||||
}
|
||||
|
||||
function do_excel_import()
|
||||
{
|
||||
$msg = 'do_excel_import';
|
||||
$failCodes = array();
|
||||
if ($_FILES['file_path']['error']!=UPLOAD_ERR_OK)
|
||||
{
|
||||
$msg = $this->lang->line('items_excel_import_failed');
|
||||
echo json_encode( array('success'=>false,'message'=>$msg) );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($handle = fopen($_FILES['file_path']['tmp_name'], "r")) !== FALSE)
|
||||
{
|
||||
//Skip first row
|
||||
fgetcsv($handle);
|
||||
|
||||
$i=1;
|
||||
while (($data = fgetcsv($handle)) !== FALSE)
|
||||
{
|
||||
$person_data = array(
|
||||
'first_name'=>$data[0],
|
||||
'last_name'=>$data[1],
|
||||
'email'=>$data[2],
|
||||
'phone_number'=>$data[3],
|
||||
'address_1'=>$data[4],
|
||||
'address_2'=>$data[5],
|
||||
'city'=>$data[6],
|
||||
'state'=>$data[7],
|
||||
'zip'=>$data[8],
|
||||
'country'=>$data[9],
|
||||
'comments'=>$data[10]
|
||||
);
|
||||
|
||||
$customer_data=array(
|
||||
'account_number'=>$data[11]=='' ? null:$data[11],
|
||||
'taxable'=>$data[12]=='' ? 0:1,
|
||||
);
|
||||
|
||||
if(!$this->Customer->save($person_data,$customer_data))
|
||||
{
|
||||
$failCodes[] = $i;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode( array('success'=>false,'message'=>'Your upload file has no data or not in supported format.') );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$success = true;
|
||||
if(count($failCodes) > 1)
|
||||
{
|
||||
$msg = "Most customers imported. But some were not, here is list of their CODE (" .count($failCodes) ."): ".implode(", ", $failCodes);
|
||||
$success = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = "Import Customers successful";
|
||||
}
|
||||
|
||||
echo json_encode( array('success'=>$success,'message'=>$msg) );
|
||||
}
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 350;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,142 +0,0 @@
|
||||
<?php
|
||||
require_once ("person_controller.php");
|
||||
class Employees extends Person_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('employees');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('?c=employees&m=index');
|
||||
$config['total_rows'] = $this->Employee->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_people_manage_table($this->Employee->get_all($config['per_page'], $this->input->get('per_page')),$this);
|
||||
$this->load->view('people/manage',$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns employee table data rows. This will be called with AJAX.
|
||||
*/
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_people_manage_table_data_rows($this->Employee->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Employee->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Loads the employee edit form
|
||||
*/
|
||||
function view($employee_id=-1)
|
||||
{
|
||||
$data['person_info']=$this->Employee->get_info($employee_id);
|
||||
$data['all_modules']=$this->Module->get_all_modules();
|
||||
$this->load->view("employees/form",$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Inserts/updates an employee
|
||||
*/
|
||||
function save($employee_id=-1)
|
||||
{
|
||||
$person_data = array(
|
||||
'first_name'=>$this->input->post('first_name'),
|
||||
'last_name'=>$this->input->post('last_name'),
|
||||
'email'=>$this->input->post('email'),
|
||||
'phone_number'=>$this->input->post('phone_number'),
|
||||
'address_1'=>$this->input->post('address_1'),
|
||||
'address_2'=>$this->input->post('address_2'),
|
||||
'city'=>$this->input->post('city'),
|
||||
'state'=>$this->input->post('state'),
|
||||
'zip'=>$this->input->post('zip'),
|
||||
'country'=>$this->input->post('country'),
|
||||
'comments'=>$this->input->post('comments')
|
||||
);
|
||||
$permission_data = $this->input->post("permissions")!=false ? $this->input->post("permissions"):array();
|
||||
|
||||
//Password has been changed OR first time password set
|
||||
if($this->input->post('password')!='')
|
||||
{
|
||||
$employee_data=array(
|
||||
'username'=>$this->input->post('username'),
|
||||
'password'=>md5($this->input->post('password'))
|
||||
);
|
||||
}
|
||||
else //Password not changed
|
||||
{
|
||||
$employee_data=array('username'=>$this->input->post('username'));
|
||||
}
|
||||
|
||||
if ($_SERVER['HTTP_HOST'] == 'ospos.pappastech.com' && $employee_id == 1)
|
||||
{
|
||||
//failure
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('employees_error_updating_demo_admin').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>-1));
|
||||
}
|
||||
elseif($this->Employee->save($person_data,$employee_data,$permission_data,$employee_id))
|
||||
{
|
||||
//New employee
|
||||
if($employee_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('employees_successful_adding').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>$employee_data['person_id']));
|
||||
}
|
||||
else //previous employee
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('employees_successful_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>$employee_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('employees_error_adding_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>-1));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
This deletes employees from the employees table
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
$employees_to_delete=$this->input->post('ids');
|
||||
|
||||
if ($_SERVER['HTTP_HOST'] == 'ospos.pappastech.com' && in_array(1,$employees_to_delete))
|
||||
{
|
||||
//failure
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('employees_error_deleting_demo_admin')));
|
||||
}
|
||||
elseif($this->Employee->delete_list($employees_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('employees_successful_deleted').' '.
|
||||
count($employees_to_delete).' '.$this->lang->line('employees_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('employees_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 650;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,107 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
require_once ("interfaces/idata_controller.php");
|
||||
class Giftcards extends Secure_area implements iData_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('giftcards');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('?c=giftcards&m=index');
|
||||
$config['total_rows'] = $this->Giftcard->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_giftcards_manage_table($this->Giftcard->get_all($config['per_page'], $this->input->get('per_page')),$this);
|
||||
$this->load->view('giftcards/manage',$data);
|
||||
}
|
||||
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_giftcards_manage_table_data_rows($this->Giftcard->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Giftcard->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function get_row()
|
||||
{
|
||||
$giftcard_id = $this->input->post('row_id');
|
||||
$data_row=get_giftcard_data_row($this->Giftcard->get_info($giftcard_id),$this);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
function view($giftcard_id=-1)
|
||||
{
|
||||
$data['giftcard_info']=$this->Giftcard->get_info($giftcard_id);
|
||||
|
||||
$this->load->view("giftcards/form",$data);
|
||||
}
|
||||
|
||||
function save($giftcard_id=-1)
|
||||
{
|
||||
$giftcard_data = array(
|
||||
'giftcard_number'=>$this->input->post('giftcard_number'),
|
||||
'value'=>$this->input->post('value')
|
||||
);
|
||||
|
||||
if( $this->Giftcard->save( $giftcard_data, $giftcard_id ) )
|
||||
{
|
||||
//New giftcard
|
||||
if($giftcard_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('giftcards_successful_adding').' '.
|
||||
$giftcard_data['giftcard_number'],'giftcard_id'=>$giftcard_data['giftcard_id']));
|
||||
$giftcard_id = $giftcard_data['giftcard_id'];
|
||||
}
|
||||
else //previous giftcard
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('giftcards_successful_updating').' '.
|
||||
$giftcard_data['giftcard_number'],'giftcard_id'=>$giftcard_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('giftcards_error_adding_updating').' '.
|
||||
$giftcard_data['giftcard_number'],'giftcard_id'=>-1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
$giftcards_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Giftcard->delete_list($giftcards_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('giftcards_successful_deleted').' '.
|
||||
count($giftcards_to_delete).' '.$this->lang->line('giftcards_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('giftcards_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 360;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
class Home extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->load->view("home");
|
||||
}
|
||||
|
||||
function logout()
|
||||
{
|
||||
$this->Employee->logout();
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
This interface is implemented by any controller that keeps track of data items, such
|
||||
as the customers, employees, and items controllers.
|
||||
*/
|
||||
interface iData_controller
|
||||
{
|
||||
public function index();
|
||||
public function search();
|
||||
public function suggest();
|
||||
public function get_row();
|
||||
public function view($data_item_id=-1);
|
||||
public function save($data_item_id=-1);
|
||||
public function delete();
|
||||
public function get_form_width();
|
||||
}
|
||||
?>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
This interface is implemented by any controller that keeps track of people, such
|
||||
as customers and employees.
|
||||
*/
|
||||
require_once("idata_controller.php");
|
||||
interface iPerson_controller extends iData_controller
|
||||
{
|
||||
public function mailto();
|
||||
}
|
||||
?>
|
||||
@@ -1,137 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
require_once ("interfaces/idata_controller.php");
|
||||
class Item_kits extends Secure_area implements iData_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('item_kits');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('?c=item_kits&m=index');
|
||||
$config['total_rows'] = $this->Item_kit->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_item_kits_manage_table( $this->Item_kit->get_all($config['per_page'], $this->input->get('per_page')),$this);
|
||||
$this->load->view('item_kits/manage',$data);
|
||||
}
|
||||
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_item_kits_manage_table_data_rows($this->Item_kit->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Item_kit->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function get_row()
|
||||
{
|
||||
$item_kit_id = $this->input->post('row_id');
|
||||
$data_row=get_item_kit_data_row($this->Item_kit->get_info($item_kit_id),$this);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
function view($item_kit_id=-1)
|
||||
{
|
||||
$data['item_kit_info']=$this->Item_kit->get_info($item_kit_id);
|
||||
$this->load->view("item_kits/form",$data);
|
||||
}
|
||||
|
||||
function save($item_kit_id=-1)
|
||||
{
|
||||
$item_kit_data = array(
|
||||
'name'=>$this->input->post('name'),
|
||||
'description'=>$this->input->post('description')
|
||||
);
|
||||
|
||||
if($this->Item_kit->save($item_kit_data,$item_kit_id))
|
||||
{
|
||||
//New item kit
|
||||
if($item_kit_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_adding').' '.
|
||||
$item_kit_data['name'],'item_kit_id'=>$item_kit_data['item_kit_id']));
|
||||
$item_kit_id = $item_kit_data['item_kit_id'];
|
||||
}
|
||||
else //previous item
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_updating').' '.
|
||||
$item_kit_data['name'],'item_kit_id'=>$item_kit_id));
|
||||
}
|
||||
|
||||
if ($this->input->post('item_kit_item'))
|
||||
{
|
||||
$item_kit_items = array();
|
||||
foreach($this->input->post('item_kit_item') as $item_id => $quantity)
|
||||
{
|
||||
$item_kit_items[] = array(
|
||||
'item_id' => $item_id,
|
||||
'quantity' => $quantity
|
||||
);
|
||||
}
|
||||
|
||||
$this->Item_kit_items->save($item_kit_items, $item_kit_id);
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('item_kits_error_adding_updating').' '.
|
||||
$item_kit_data['name'],'item_kit_id'=>-1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
$item_kits_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Item_kit->delete_list($item_kits_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_deleted').' '.
|
||||
count($item_kits_to_delete).' '.$this->lang->line('item_kits_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('item_kits_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
function generate_barcodes($item_kit_ids)
|
||||
{
|
||||
$result = array();
|
||||
|
||||
$item_kit_ids = explode(',', $item_kit_ids);
|
||||
foreach ($item_kit_ids as $item_kid_id)
|
||||
{
|
||||
$item_kit_info = $this->Item_kit->get_info($item_kid_id);
|
||||
|
||||
$result[] = array('name' =>$item_kit_info->name, 'id'=> 'KIT '.$item_kid_id);
|
||||
}
|
||||
|
||||
$data['items'] = $result;
|
||||
$this->load->view("barcode_sheet", $data);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 360;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,427 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
require_once ("interfaces/idata_controller.php");
|
||||
class Items extends Secure_area implements iData_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('items');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('?c=items&m=index');
|
||||
$config['total_rows'] = $this->Item->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_items_manage_table($this->Item->get_all($config['per_page'], $this->input->get('per_page')),$this);
|
||||
$this->load->view('items/manage',$data);
|
||||
}
|
||||
|
||||
function refresh()
|
||||
{
|
||||
$low_inventory=$this->input->post('low_inventory');
|
||||
$is_serialized=$this->input->post('is_serialized');
|
||||
$no_description=$this->input->post('no_description');
|
||||
|
||||
$data['search_section_state']=$this->input->post('search_section_state');
|
||||
$data['low_inventory']=$this->input->post('low_inventory');
|
||||
$data['is_serialized']=$this->input->post('is_serialized');
|
||||
$data['no_description']=$this->input->post('no_description');
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_items_manage_table($this->Item->get_all_filtered($low_inventory,$is_serialized,$no_description),$this);
|
||||
$this->load->view('items/manage',$data);
|
||||
}
|
||||
|
||||
function find_item_info()
|
||||
{
|
||||
$item_number=$this->input->post('scan_item_number');
|
||||
echo json_encode($this->Item->find_item_info($item_number));
|
||||
}
|
||||
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_items_manage_table_data_rows($this->Item->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Item->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function item_search()
|
||||
{
|
||||
$suggestions = $this->Item->get_item_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_category()
|
||||
{
|
||||
$suggestions = $this->Item->get_category_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function get_row()
|
||||
{
|
||||
$item_id = $this->input->post('row_id');
|
||||
$data_row=get_item_data_row($this->Item->get_info($item_id),$this);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
function view($item_id=-1)
|
||||
{
|
||||
$data['item_info']=$this->Item->get_info($item_id);
|
||||
$data['item_tax_info']=$this->Item_taxes->get_info($item_id);
|
||||
$suppliers = array('' => $this->lang->line('items_none'));
|
||||
foreach($this->Supplier->get_all()->result_array() as $row)
|
||||
{
|
||||
$suppliers[$row['person_id']] = $row['company_name'] .' ('.$row['first_name'] .' '. $row['last_name'].')';
|
||||
}
|
||||
|
||||
$data['suppliers']=$suppliers;
|
||||
$data['selected_supplier'] = $this->Item->get_info($item_id)->supplier_id;
|
||||
$data['default_tax_1_rate']=($item_id==-1) ? $this->Appconfig->get('default_tax_1_rate') : '';
|
||||
$data['default_tax_2_rate']=($item_id==-1) ? $this->Appconfig->get('default_tax_2_rate') : '';
|
||||
$this->load->view("items/form",$data);
|
||||
}
|
||||
|
||||
//Ramel Inventory Tracking
|
||||
function inventory($item_id=-1)
|
||||
{
|
||||
$data['item_info']=$this->Item->get_info($item_id);
|
||||
$this->load->view("items/inventory",$data);
|
||||
}
|
||||
|
||||
function count_details($item_id=-1)
|
||||
{
|
||||
$data['item_info']=$this->Item->get_info($item_id);
|
||||
$this->load->view("items/count_details",$data);
|
||||
} //------------------------------------------- Ramel
|
||||
|
||||
function generate_barcodes($item_ids)
|
||||
{
|
||||
$result = array();
|
||||
|
||||
$item_ids = explode(',', $item_ids);
|
||||
foreach ($item_ids as $item_id)
|
||||
{
|
||||
$item_info = $this->Item->get_info($item_id);
|
||||
|
||||
$result[] = array('name' =>$item_info->name, 'id'=> $item_id);
|
||||
}
|
||||
|
||||
$data['items'] = $result;
|
||||
$this->load->view("barcode_sheet", $data);
|
||||
}
|
||||
|
||||
function bulk_edit()
|
||||
{
|
||||
$data = array();
|
||||
$suppliers = array('' => $this->lang->line('items_none'));
|
||||
foreach($this->Supplier->get_all()->result_array() as $row)
|
||||
{
|
||||
$suppliers[$row['person_id']] = $row['first_name'] .' '. $row['last_name'];
|
||||
}
|
||||
$data['suppliers'] = $suppliers;
|
||||
$data['allow_alt_desciption_choices'] = array(
|
||||
''=>$this->lang->line('items_do_nothing'),
|
||||
1 =>$this->lang->line('items_change_all_to_allow_alt_desc'),
|
||||
0 =>$this->lang->line('items_change_all_to_not_allow_allow_desc'));
|
||||
|
||||
$data['serialization_choices'] = array(
|
||||
''=>$this->lang->line('items_do_nothing'),
|
||||
1 =>$this->lang->line('items_change_all_to_serialized'),
|
||||
0 =>$this->lang->line('items_change_all_to_unserialized'));
|
||||
$this->load->view("items/form_bulk", $data);
|
||||
}
|
||||
|
||||
function save($item_id=-1)
|
||||
{
|
||||
$item_data = array(
|
||||
'name'=>$this->input->post('name'),
|
||||
'description'=>$this->input->post('description'),
|
||||
'category'=>$this->input->post('category'),
|
||||
'supplier_id'=>$this->input->post('supplier_id')=='' ? null:$this->input->post('supplier_id'),
|
||||
'item_number'=>$this->input->post('item_number')=='' ? null:$this->input->post('item_number'),
|
||||
'cost_price'=>$this->input->post('cost_price'),
|
||||
'unit_price'=>$this->input->post('unit_price'),
|
||||
'quantity'=>$this->input->post('quantity'),
|
||||
'reorder_level'=>$this->input->post('reorder_level'),
|
||||
'location'=>$this->input->post('location'),
|
||||
'allow_alt_description'=>$this->input->post('allow_alt_description'),
|
||||
'is_serialized'=>$this->input->post('is_serialized')
|
||||
);
|
||||
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$cur_item_info = $this->Item->get_info($item_id);
|
||||
|
||||
|
||||
if($this->Item->save($item_data,$item_id))
|
||||
{
|
||||
//New item
|
||||
if($item_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_adding').' '.
|
||||
$item_data['name'],'item_id'=>$item_data['item_id']));
|
||||
$item_id = $item_data['item_id'];
|
||||
}
|
||||
else //previous item
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_updating').' '.
|
||||
$item_data['name'],'item_id'=>$item_id));
|
||||
}
|
||||
|
||||
$inv_data = array
|
||||
(
|
||||
'trans_date'=>date('Y-m-d H:i:s'),
|
||||
'trans_items'=>$item_id,
|
||||
'trans_user'=>$employee_id,
|
||||
'trans_comment'=>$this->lang->line('items_manually_editing_of_quantity'),
|
||||
'trans_inventory'=>$cur_item_info ? $this->input->post('quantity') - $cur_item_info->quantity : $this->input->post('quantity')
|
||||
);
|
||||
$this->Inventory->insert($inv_data);
|
||||
$items_taxes_data = array();
|
||||
$tax_names = $this->input->post('tax_names');
|
||||
$tax_percents = $this->input->post('tax_percents');
|
||||
for($k=0;$k<count($tax_percents);$k++)
|
||||
{
|
||||
if (is_numeric($tax_percents[$k]))
|
||||
{
|
||||
$items_taxes_data[] = array('name'=>$tax_names[$k], 'percent'=>$tax_percents[$k] );
|
||||
}
|
||||
}
|
||||
$this->Item_taxes->save($items_taxes_data, $item_id);
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('items_error_adding_updating').' '.
|
||||
$item_data['name'],'item_id'=>-1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Ramel Inventory Tracking
|
||||
function save_inventory($item_id=-1)
|
||||
{
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$cur_item_info = $this->Item->get_info($item_id);
|
||||
$inv_data = array
|
||||
(
|
||||
'trans_date'=>date('Y-m-d H:i:s'),
|
||||
'trans_items'=>$item_id,
|
||||
'trans_user'=>$employee_id,
|
||||
'trans_comment'=>$this->input->post('trans_comment'),
|
||||
'trans_inventory'=>$this->input->post('newquantity')
|
||||
);
|
||||
$this->Inventory->insert($inv_data);
|
||||
|
||||
//Update stock quantity
|
||||
$item_data = array(
|
||||
'quantity'=>$cur_item_info->quantity + $this->input->post('newquantity')
|
||||
);
|
||||
if($this->Item->save($item_data,$item_id))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_updating').' '.
|
||||
$cur_item_info->name,'item_id'=>$item_id));
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('items_error_adding_updating').' '.
|
||||
$cur_item_info->name,'item_id'=>-1));
|
||||
}
|
||||
|
||||
}//---------------------------------------------------------------------Ramel
|
||||
|
||||
function bulk_update()
|
||||
{
|
||||
$items_to_update=$this->input->post('item_ids');
|
||||
$item_data = array();
|
||||
|
||||
foreach($_POST as $key=>$value)
|
||||
{
|
||||
//This field is nullable, so treat it differently
|
||||
if ($key == 'supplier_id')
|
||||
{
|
||||
$item_data["$key"]=$value == '' ? null : $value;
|
||||
}
|
||||
elseif($value!='' and !(in_array($key, array('item_ids', 'tax_names', 'tax_percents'))))
|
||||
{
|
||||
$item_data["$key"]=$value;
|
||||
}
|
||||
}
|
||||
|
||||
//Item data could be empty if tax information is being updated
|
||||
if(empty($item_data) || $this->Item->update_multiple($item_data,$items_to_update))
|
||||
{
|
||||
$items_taxes_data = array();
|
||||
$tax_names = $this->input->post('tax_names');
|
||||
$tax_percents = $this->input->post('tax_percents');
|
||||
for($k=0;$k<count($tax_percents);$k++)
|
||||
{
|
||||
if (is_numeric($tax_percents[$k]))
|
||||
{
|
||||
$items_taxes_data[] = array('name'=>$tax_names[$k], 'percent'=>$tax_percents[$k] );
|
||||
}
|
||||
}
|
||||
$this->Item_taxes->save_multiple($items_taxes_data, $items_to_update);
|
||||
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_bulk_edit')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('items_error_updating_multiple')));
|
||||
}
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
$items_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Item->delete_list($items_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_deleted').' '.
|
||||
count($items_to_delete).' '.$this->lang->line('items_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('items_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
function excel()
|
||||
{
|
||||
$data = file_get_contents("import_items.csv");
|
||||
$name = 'import_items.csv';
|
||||
force_download($name, $data);
|
||||
}
|
||||
|
||||
function excel_import()
|
||||
{
|
||||
$this->load->view("items/excel_import", null);
|
||||
}
|
||||
|
||||
function do_excel_import()
|
||||
{
|
||||
$msg = 'do_excel_import';
|
||||
$failCodes = array();
|
||||
if ($_FILES['file_path']['error']!=UPLOAD_ERR_OK)
|
||||
{
|
||||
$msg = $this->lang->line('items_excel_import_failed');
|
||||
echo json_encode( array('success'=>false,'message'=>$msg) );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($handle = fopen($_FILES['file_path']['tmp_name'], "r")) !== FALSE)
|
||||
{
|
||||
//Skip first row
|
||||
fgetcsv($handle);
|
||||
|
||||
$i=1;
|
||||
while (($data = fgetcsv($handle)) !== FALSE)
|
||||
{
|
||||
$item_data = array(
|
||||
'name' => $data[1],
|
||||
'description' => $data[13],
|
||||
'location' => $data[12],
|
||||
'category' => $data[2],
|
||||
'cost_price' => $data[4],
|
||||
'unit_price' => $data[5],
|
||||
'quantity' => $data[10],
|
||||
'reorder_level' => $data[11],
|
||||
'supplier_id' => $this->Supplier->exists($data[3]) ? $data[3] : null,
|
||||
'allow_alt_description'=> $data[14] != '' ? '1' : '0',
|
||||
'is_serialized'=>$data[15] != '' ? '1' : '0'
|
||||
);
|
||||
$item_number = $data[0];
|
||||
|
||||
if ($item_number != "")
|
||||
{
|
||||
$item_data['item_number'] = $item_number;
|
||||
}
|
||||
|
||||
if($this->Item->save($item_data))
|
||||
{
|
||||
$items_taxes_data = null;
|
||||
//tax 1
|
||||
if( is_numeric($data[7]) && $data[6]!='' )
|
||||
{
|
||||
$items_taxes_data[] = array('name'=>$data[6], 'percent'=>$data[7] );
|
||||
}
|
||||
|
||||
//tax 2
|
||||
if( is_numeric($data[9]) && $data[8]!='' )
|
||||
{
|
||||
$items_taxes_data[] = array('name'=>$data[8], 'percent'=>$data[9] );
|
||||
}
|
||||
|
||||
// save tax values
|
||||
if(count($items_taxes_data) > 0)
|
||||
{
|
||||
$this->Item_taxes->save($items_taxes_data, $item_data['item_id']);
|
||||
}
|
||||
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$emp_info=$this->Employee->get_info($employee_id);
|
||||
$comment ='Qty CSV Imported';
|
||||
$excel_data = array
|
||||
(
|
||||
'trans_items'=>$item_data['item_id'],
|
||||
'trans_user'=>$employee_id,
|
||||
'trans_comment'=>$comment,
|
||||
'trans_inventory'=>$data[10]
|
||||
);
|
||||
$this->db->insert('inventory',$excel_data);
|
||||
//------------------------------------------------Ramel
|
||||
}
|
||||
else//insert or update item failure
|
||||
{
|
||||
$failCodes[] = $i;
|
||||
}
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode( array('success'=>false,'message'=>'Your upload file has no data or not in supported format.') );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$success = true;
|
||||
if(count($failCodes) > 1)
|
||||
{
|
||||
$msg = "Most items imported. But some were not, here is list of their CODE (" .count($failCodes) ."): ".implode(", ", $failCodes);
|
||||
$success = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = "Import items successful";
|
||||
}
|
||||
|
||||
echo json_encode( array('success'=>$success,'message'=>$msg) );
|
||||
}
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 360;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,192 +0,0 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
// ---------------------------------------------------------------------
|
||||
class Languagecheck extends Controller {
|
||||
|
||||
/*
|
||||
* use this language as comparison reference.
|
||||
* this should be the one that is complete.
|
||||
*/
|
||||
private $reference = 'english';
|
||||
|
||||
private $lang_path = 'language';
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* controller constructor
|
||||
*/
|
||||
function Languagecheck()
|
||||
{
|
||||
parent::Controller();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* use remap to capture all calls to this controller
|
||||
*/
|
||||
function _remap()
|
||||
{
|
||||
// load the required helpers
|
||||
$this->load->helper('directory');
|
||||
|
||||
// for simplicity, we don't use views
|
||||
$this->output('h1', 'Open Source Point of Sale - Language file checking and validation');
|
||||
|
||||
// determine the language file path
|
||||
if ( ! is_dir($this->lang_path) )
|
||||
{
|
||||
$this->lang_path = APPPATH . $this->lang_path;
|
||||
|
||||
if ( ! is_dir($this->lang_path) )
|
||||
{
|
||||
$this->output('h2', 'Defined language path "'.$this->lang_path.'" not found!', TRUE);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// fetch the languages directory map
|
||||
$languages = directory_map( $this->lang_path, TRUE );
|
||||
|
||||
// is our reference language present?
|
||||
if ( ! in_array($this->reference, $languages ) )
|
||||
{
|
||||
$this->output('h2', 'Reference language "'.$this->reference.'" not found!', TRUE);
|
||||
exit;
|
||||
}
|
||||
|
||||
// load the list of language files for the reference language
|
||||
$references = directory_map( $this->lang_path . '/' . $this->reference, TRUE );
|
||||
|
||||
// now process the list
|
||||
foreach( $references as $reference )
|
||||
{
|
||||
// skip non-language files in the language directory
|
||||
if ( strpos($reference, '_lang'.EXT) === FALSE )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// process it
|
||||
$this->output('h2', 'Processing '.$this->reference . ' » ' .$reference);
|
||||
|
||||
// load the language file
|
||||
include $this->lang_path . '/' . $this->reference . '/' . $reference;
|
||||
|
||||
// did the file contain any language strings?
|
||||
if ( empty($lang) )
|
||||
{
|
||||
// language file was empty or not properly defined
|
||||
$this->output('h3', 'Language file doesn\'t contain any language strings. Skipping file!', TRUE);
|
||||
continue;
|
||||
}
|
||||
|
||||
// store the loaded language strings
|
||||
$lang_ref = $lang;
|
||||
unset($lang);
|
||||
|
||||
// now loop through the available languages
|
||||
foreach ( $languages as $language )
|
||||
{
|
||||
// skip the reference language
|
||||
if ( $language == $this->reference )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// language file to check
|
||||
$file = $this->lang_path . '/' . $language . '/' . $reference;
|
||||
|
||||
// check if the language file exists for this language
|
||||
if ( ! file_exists( $file ) )
|
||||
{
|
||||
// file not found
|
||||
$this->output('h3', 'Language file doesn\'t exist for the language '.$language.'!', TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// load the file to compare
|
||||
include $file;
|
||||
|
||||
// did the file contain any language strings?
|
||||
if ( empty($lang) )
|
||||
{
|
||||
// language file was empty or not properly defined
|
||||
$this->output('h3', 'Language file for the language '.$language.' doesn\'t contain any language strings!', TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// start comparing
|
||||
$this->output('h3', 'Comparing with the '.$language.' version:');
|
||||
|
||||
// assume all goes well
|
||||
$failures = 0;
|
||||
|
||||
// start comparing language keys
|
||||
foreach( $lang_ref as $key => $value )
|
||||
{
|
||||
if ( ! isset($lang[$key]) )
|
||||
{
|
||||
// report the missing key
|
||||
$this->output('', 'Missing language string "'.$key.'"', TRUE);
|
||||
|
||||
// increment the failure counter
|
||||
$failures++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $failures )
|
||||
{
|
||||
$this->output('', 'The two language files have matching strings.');
|
||||
}
|
||||
}
|
||||
|
||||
// make sure the lang array is deleted before the next check
|
||||
if ( isset($lang) )
|
||||
{
|
||||
unset($lang);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->output('h2', 'Language file checking and validation completed');
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
private function output($type = '', $line = '', $highlight = FALSE)
|
||||
{
|
||||
switch ($type)
|
||||
{
|
||||
case 'h1':
|
||||
$html = "<h1>{line}</h1>\n<hr />\n";
|
||||
break;
|
||||
|
||||
case 'h2':
|
||||
$html = "<h2>{line}</h2>\n";
|
||||
break;
|
||||
|
||||
case 'h3':
|
||||
$html = "<h3> {line}</h3>\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
$html = " » {line}<br />";
|
||||
break;
|
||||
}
|
||||
|
||||
if ( $highlight )
|
||||
{
|
||||
$line = '<span style="color:red;font-weight:bold;">' . $line . '</span>';
|
||||
}
|
||||
|
||||
echo str_replace('{line}', $line, $html);
|
||||
}
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
}
|
||||
|
||||
/* End of file languagecheck.php */
|
||||
/* Location: ./application/controllers/languagecheck.php */
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
class Login extends Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
if($this->Employee->is_logged_in())
|
||||
{
|
||||
redirect('home');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->form_validation->set_rules('username', 'lang:login_undername', 'callback_login_check');
|
||||
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$this->load->view('login');
|
||||
}
|
||||
else
|
||||
{
|
||||
redirect('home');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function login_check($username)
|
||||
{
|
||||
$password = $this->input->post("password");
|
||||
|
||||
if(!$this->Employee->login($username,$password))
|
||||
{
|
||||
$this->form_validation->set_message('login_check', $this->lang->line('login_invalid_username_and_password'));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
class No_Access extends Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function index($module_id='')
|
||||
{
|
||||
$data['module_name']=$this->Module->get_module_name($module_id);
|
||||
$this->load->view('no_access',$data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
require_once ("interfaces/iperson_controller.php");
|
||||
require_once ("secure_area.php");
|
||||
abstract class Person_controller extends Secure_area implements iPerson_controller
|
||||
{
|
||||
function __construct($module_id=null)
|
||||
{
|
||||
parent::__construct($module_id);
|
||||
}
|
||||
|
||||
/*
|
||||
This returns a mailto link for persons with a certain id. This is called with AJAX.
|
||||
*/
|
||||
function mailto()
|
||||
{
|
||||
$people_to_email=$this->input->post('ids');
|
||||
|
||||
if($people_to_email!=false)
|
||||
{
|
||||
$mailto_url='mailto:';
|
||||
foreach($this->Person->get_multiple_info($people_to_email)->result() as $person)
|
||||
{
|
||||
$mailto_url.=$person->email.',';
|
||||
}
|
||||
//remove last comma
|
||||
$mailto_url=substr($mailto_url,0,strlen($mailto_url)-1);
|
||||
|
||||
echo $mailto_url;
|
||||
exit;
|
||||
}
|
||||
echo '#';
|
||||
}
|
||||
|
||||
/*
|
||||
Gets one row for a person manage table. This is called using AJAX to update one row.
|
||||
*/
|
||||
function get_row()
|
||||
{
|
||||
$person_id = $this->input->post('row_id');
|
||||
$data_row=get_person_data_row($this->Person->get_info($person_id),$this);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -1,197 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
class Receivings extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('receivings');
|
||||
$this->load->library('receiving_lib');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function item_search()
|
||||
{
|
||||
$suggestions = $this->Item->get_item_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
$suggestions = array_merge($suggestions, $this->Item_kit->get_item_kit_search_suggestions($this->input->post('q'),$this->input->post('limit')));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function supplier_search()
|
||||
{
|
||||
$suggestions = $this->Supplier->get_suppliers_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function select_supplier()
|
||||
{
|
||||
$supplier_id = $this->input->post("supplier");
|
||||
$this->receiving_lib->set_supplier($supplier_id);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function change_mode()
|
||||
{
|
||||
$mode = $this->input->post("mode");
|
||||
$this->receiving_lib->set_mode($mode);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function add()
|
||||
{
|
||||
$data=array();
|
||||
$mode = $this->receiving_lib->get_mode();
|
||||
$item_id_or_number_or_item_kit_or_receipt = $this->input->post("item");
|
||||
$quantity = $mode=="receive" ? 1:-1;
|
||||
|
||||
if($this->receiving_lib->is_valid_receipt($item_id_or_number_or_item_kit_or_receipt) && $mode=='return')
|
||||
{
|
||||
$this->receiving_lib->return_entire_receiving($item_id_or_number_or_item_kit_or_receipt);
|
||||
}
|
||||
elseif($this->receiving_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
|
||||
{
|
||||
$this->receiving_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt);
|
||||
}
|
||||
elseif(!$this->receiving_lib->add_item($item_id_or_number_or_item_kit_or_receipt,$quantity))
|
||||
{
|
||||
$data['error']=$this->lang->line('recvs_unable_to_add_item');
|
||||
}
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
function edit_item($item_id)
|
||||
{
|
||||
$data= array();
|
||||
|
||||
$this->form_validation->set_rules('price', 'lang:items_price', 'required|numeric');
|
||||
$this->form_validation->set_rules('quantity', 'lang:items_quantity', 'required|integer');
|
||||
$this->form_validation->set_rules('discount', 'lang:items_discount', 'required|integer');
|
||||
|
||||
$description = $this->input->post("description");
|
||||
$serialnumber = $this->input->post("serialnumber");
|
||||
$price = $this->input->post("price");
|
||||
$quantity = $this->input->post("quantity");
|
||||
$discount = $this->input->post("discount");
|
||||
|
||||
if ($this->form_validation->run() != FALSE)
|
||||
{
|
||||
$this->receiving_lib->edit_item($item_id,$description,$serialnumber,$quantity,$discount,$price);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['error']=$this->lang->line('recvs_error_editing_item');
|
||||
}
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
function delete_item($item_number)
|
||||
{
|
||||
$this->receiving_lib->delete_item($item_number);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function delete_supplier()
|
||||
{
|
||||
$this->receiving_lib->delete_supplier();
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function complete()
|
||||
{
|
||||
$data['cart']=$this->receiving_lib->get_cart();
|
||||
$data['total']=$this->receiving_lib->get_total();
|
||||
$data['receipt_title']=$this->lang->line('recvs_receipt');
|
||||
$data['transaction_time']= date('m/d/Y h:i:s a');
|
||||
$supplier_id=$this->receiving_lib->get_supplier();
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$comment = $this->input->post('comment');
|
||||
$emp_info=$this->Employee->get_info($employee_id);
|
||||
$payment_type = $this->input->post('payment_type');
|
||||
$data['payment_type']=$this->input->post('payment_type');
|
||||
|
||||
if ($this->input->post('amount_tendered'))
|
||||
{
|
||||
$data['amount_tendered'] = $this->input->post('amount_tendered');
|
||||
$data['amount_change'] = to_currency($data['amount_tendered'] - round($data['total'], 2));
|
||||
}
|
||||
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
|
||||
|
||||
if($supplier_id!=-1)
|
||||
{
|
||||
$suppl_info=$this->Supplier->get_info($supplier_id);
|
||||
$data['supplier']=$suppl_info->first_name.' '.$suppl_info->last_name;
|
||||
}
|
||||
|
||||
//SAVE receiving to database
|
||||
$data['receiving_id']='RECV '.$this->Receiving->save($data['cart'], $supplier_id,$employee_id,$comment,$payment_type);
|
||||
|
||||
if ($data['receiving_id'] == 'RECV -1')
|
||||
{
|
||||
$data['error_message'] = $this->lang->line('receivings_transaction_failed');
|
||||
}
|
||||
|
||||
$this->load->view("receivings/receipt",$data);
|
||||
$this->receiving_lib->clear_all();
|
||||
}
|
||||
|
||||
function receipt($receiving_id)
|
||||
{
|
||||
$receiving_info = $this->Receiving->get_info($receiving_id)->row_array();
|
||||
$this->receiving_lib->copy_entire_receiving($receiving_id);
|
||||
$data['cart']=$this->receiving_lib->get_cart();
|
||||
$data['total']=$this->receiving_lib->get_total();
|
||||
$data['receipt_title']=$this->lang->line('recvs_receipt');
|
||||
$data['transaction_time']= date('m/d/Y h:i:s a', strtotime($receiving_info['receiving_time']));
|
||||
$supplier_id=$this->receiving_lib->get_supplier();
|
||||
$emp_info=$this->Employee->get_info($receiving_info['employee_id']);
|
||||
$data['payment_type']=$receiving_info['payment_type'];
|
||||
|
||||
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
|
||||
|
||||
if($supplier_id!=-1)
|
||||
{
|
||||
$supplier_info=$this->Supplier->get_info($supplier_id);
|
||||
$data['supplier']=$supplier_info->first_name.' '.$supplier_info->last_name;
|
||||
}
|
||||
$data['receiving_id']='RECV '.$receiving_id;
|
||||
$this->load->view("receivings/receipt",$data);
|
||||
$this->receiving_lib->clear_all();
|
||||
|
||||
}
|
||||
|
||||
function _reload($data=array())
|
||||
{
|
||||
$person_info = $this->Employee->get_logged_in_employee_info();
|
||||
$data['cart']=$this->receiving_lib->get_cart();
|
||||
$data['modes']=array('receive'=>$this->lang->line('recvs_receiving'),'return'=>$this->lang->line('recvs_return'));
|
||||
$data['mode']=$this->receiving_lib->get_mode();
|
||||
$data['total']=$this->receiving_lib->get_total();
|
||||
$data['items_module_allowed'] = $this->Employee->has_permission('items', $person_info->person_id);
|
||||
$data['payment_options']=array(
|
||||
$this->lang->line('sales_cash') => $this->lang->line('sales_cash'),
|
||||
$this->lang->line('sales_check') => $this->lang->line('sales_check'),
|
||||
$this->lang->line('sales_debit') => $this->lang->line('sales_debit'),
|
||||
$this->lang->line('sales_credit') => $this->lang->line('sales_credit')
|
||||
);
|
||||
|
||||
$supplier_id=$this->receiving_lib->get_supplier();
|
||||
if($supplier_id!=-1)
|
||||
{
|
||||
$info=$this->Supplier->get_info($supplier_id);
|
||||
$data['supplier']=$info->first_name.' '.$info->last_name;
|
||||
}
|
||||
$this->load->view("receivings/receiving",$data);
|
||||
}
|
||||
|
||||
function cancel_receiving()
|
||||
{
|
||||
$this->receiving_lib->clear_all();
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -1,827 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
require_once (APPPATH."libraries/ofc-library/open-flash-chart.php");
|
||||
class Reports extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('reports');
|
||||
$this->load->helper('report');
|
||||
}
|
||||
|
||||
//Initial report listing screen
|
||||
function index()
|
||||
{
|
||||
$this->load->view("reports/listing",array());
|
||||
}
|
||||
|
||||
function _get_common_report_data()
|
||||
{
|
||||
$data = array();
|
||||
$data['report_date_range_simple'] = get_simple_date_ranges();
|
||||
$data['months'] = get_months();
|
||||
$data['days'] = get_days();
|
||||
$data['years'] = get_years();
|
||||
$data['selected_month']=date('n');
|
||||
$data['selected_day']=date('d');
|
||||
$data['selected_year']=date('Y');
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
//Input for reports that require only a date range and an export to excel. (see routes.php to see that all summary reports route here)
|
||||
function date_input_excel_export()
|
||||
{
|
||||
$data = $this->_get_common_report_data();
|
||||
$this->load->view("reports/date_input_excel_export",$data);
|
||||
}
|
||||
|
||||
//Summary sales report
|
||||
function summary_sales($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_sales');
|
||||
$model = $this->Summary_sales;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['sale_date'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_sales_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary categories report
|
||||
function summary_categories($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_categories');
|
||||
$model = $this->Summary_categories;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['category'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_categories_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary customers report
|
||||
function summary_customers($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_customers');
|
||||
$model = $this->Summary_customers;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['customer'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_customers_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary suppliers report
|
||||
function summary_suppliers($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_suppliers');
|
||||
$model = $this->Summary_suppliers;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['supplier'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_suppliers_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary items report
|
||||
function summary_items($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_items');
|
||||
$model = $this->Summary_items;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array(character_limiter($row['name'], 16), $row['quantity_purchased'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_items_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary employees report
|
||||
function summary_employees($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_employees');
|
||||
$model = $this->Summary_employees;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['employee'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_employees_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary taxes report
|
||||
function summary_taxes($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_taxes');
|
||||
$model = $this->Summary_taxes;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['percent'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_taxes_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary discounts report
|
||||
function summary_discounts($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_discounts');
|
||||
$model = $this->Summary_discounts;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['discount_percent'],$row['count']);
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_discounts_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
function summary_payments($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_payments');
|
||||
$model = $this->Summary_payments;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['payment_type'],to_currency($row['payment_amount']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_payments_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Input for reports that require only a date range. (see routes.php to see that all graphical summary reports route here)
|
||||
function date_input()
|
||||
{
|
||||
$data = $this->_get_common_report_data();
|
||||
$this->load->view("reports/date_input",$data);
|
||||
}
|
||||
|
||||
//Graphical summary sales report
|
||||
function graphical_summary_sales($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_sales');
|
||||
$model = $this->Summary_sales;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_sales_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_sales_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_sales_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_sales');
|
||||
$model = $this->Summary_sales;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[date('m/d/Y', strtotime($row['sale_date']))]= $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_sales_summary_report'),
|
||||
"yaxis_label"=>$this->lang->line('reports_revenue'),
|
||||
"xaxis_label"=>$this->lang->line('reports_date'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/line",$data);
|
||||
|
||||
}
|
||||
|
||||
//Graphical summary items report
|
||||
function graphical_summary_items($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_items');
|
||||
$model = $this->Summary_items;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_items_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_items_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_items_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_items');
|
||||
$model = $this->Summary_items;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['name']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_items_summary_report'),
|
||||
"xaxis_label"=>$this->lang->line('reports_revenue'),
|
||||
"yaxis_label"=>$this->lang->line('reports_items'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/hbar",$data);
|
||||
}
|
||||
|
||||
//Graphical summary customers report
|
||||
function graphical_summary_categories($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_categories');
|
||||
$model = $this->Summary_categories;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_categories_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_categories_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_categories_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_categories');
|
||||
$model = $this->Summary_categories;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['category']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_categories_summary_report'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/pie",$data);
|
||||
}
|
||||
|
||||
function graphical_summary_suppliers($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_suppliers');
|
||||
$model = $this->Summary_suppliers;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_suppliers_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_suppliers_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_suppliers_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_suppliers');
|
||||
$model = $this->Summary_suppliers;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['supplier']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_suppliers_summary_report'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/pie",$data);
|
||||
}
|
||||
|
||||
function graphical_summary_employees($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_employees');
|
||||
$model = $this->Summary_employees;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_employees_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_employees_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_employees_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_employees');
|
||||
$model = $this->Summary_employees;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['employee']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_employees_summary_report'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/pie",$data);
|
||||
}
|
||||
|
||||
function graphical_summary_taxes($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_taxes');
|
||||
$model = $this->Summary_taxes;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_taxes_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_taxes_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_taxes_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_taxes');
|
||||
$model = $this->Summary_taxes;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['percent']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_taxes_summary_report'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/pie",$data);
|
||||
}
|
||||
|
||||
//Graphical summary customers report
|
||||
function graphical_summary_customers($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_customers');
|
||||
$model = $this->Summary_customers;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_customers_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_customers_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_customers_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_customers');
|
||||
$model = $this->Summary_customers;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['customer']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_customers_summary_report'),
|
||||
"xaxis_label"=>$this->lang->line('reports_revenue'),
|
||||
"yaxis_label"=>$this->lang->line('reports_customers'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/hbar",$data);
|
||||
}
|
||||
|
||||
//Graphical summary discounts report
|
||||
function graphical_summary_discounts($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_discounts');
|
||||
$model = $this->Summary_discounts;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_discounts_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_discounts_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_discounts_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_discounts');
|
||||
$model = $this->Summary_discounts;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['discount_percent']] = $row['count'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_discounts_summary_report'),
|
||||
"yaxis_label"=>$this->lang->line('reports_count'),
|
||||
"xaxis_label"=>$this->lang->line('reports_discount_percent'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/bar",$data);
|
||||
}
|
||||
|
||||
function graphical_summary_payments($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_payments');
|
||||
$model = $this->Summary_payments;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_payments_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_payments_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_payments_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_payments');
|
||||
$model = $this->Summary_payments;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['payment_type']] = $row['payment_amount'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_payments_summary_report'),
|
||||
"yaxis_label"=>$this->lang->line('reports_revenue'),
|
||||
"xaxis_label"=>$this->lang->line('reports_payment_type'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/pie",$data);
|
||||
}
|
||||
function specific_customer_input()
|
||||
{
|
||||
$data = $this->_get_common_report_data();
|
||||
$data['specific_input_name'] = $this->lang->line('reports_customer');
|
||||
|
||||
$customers = array();
|
||||
foreach($this->Customer->get_all()->result() as $customer)
|
||||
{
|
||||
$customers[$customer->person_id] = $customer->first_name .' '.$customer->last_name;
|
||||
}
|
||||
$data['specific_input_data'] = $customers;
|
||||
$this->load->view("reports/specific_input",$data);
|
||||
}
|
||||
|
||||
function specific_customer($start_date, $end_date, $customer_id, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Specific_customer');
|
||||
$model = $this->Specific_customer;
|
||||
|
||||
$headers = $model->getDataColumns();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'customer_id' =>$customer_id, 'sale_type' => $sale_type));
|
||||
|
||||
$summary_data = array();
|
||||
$details_data = array();
|
||||
|
||||
foreach($report_data['summary'] as $key=>$row)
|
||||
{
|
||||
$summary_data[] = array(anchor('sales/edit/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']);
|
||||
|
||||
foreach($report_data['details'][$key] as $drow)
|
||||
{
|
||||
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),to_currency($drow['profit']), $drow['discount_percent'].'%');
|
||||
}
|
||||
}
|
||||
|
||||
$customer_info = $this->Customer->get_info($customer_id);
|
||||
$data = array(
|
||||
"title" => $customer_info->first_name .' '. $customer_info->last_name.' '.$this->lang->line('reports_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"summary_data" => $summary_data,
|
||||
"details_data" => $details_data,
|
||||
"overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date,'customer_id' =>$customer_id, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular_details",$data);
|
||||
}
|
||||
|
||||
function specific_employee_input()
|
||||
{
|
||||
$data = $this->_get_common_report_data();
|
||||
$data['specific_input_name'] = $this->lang->line('reports_employee');
|
||||
|
||||
$employees = array();
|
||||
foreach($this->Employee->get_all()->result() as $employee)
|
||||
{
|
||||
$employees[$employee->person_id] = $employee->first_name .' '.$employee->last_name;
|
||||
}
|
||||
$data['specific_input_data'] = $employees;
|
||||
$this->load->view("reports/specific_input",$data);
|
||||
}
|
||||
|
||||
function specific_employee($start_date, $end_date, $employee_id, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Specific_employee');
|
||||
$model = $this->Specific_employee;
|
||||
|
||||
$headers = $model->getDataColumns();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'employee_id' =>$employee_id, 'sale_type' => $sale_type));
|
||||
|
||||
$summary_data = array();
|
||||
$details_data = array();
|
||||
|
||||
foreach($report_data['summary'] as $key=>$row)
|
||||
{
|
||||
$summary_data[] = array(anchor('sales/edit/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']);
|
||||
|
||||
foreach($report_data['details'][$key] as $drow)
|
||||
{
|
||||
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),to_currency($drow['profit']), $drow['discount_percent'].'%');
|
||||
}
|
||||
}
|
||||
|
||||
$employee_info = $this->Employee->get_info($employee_id);
|
||||
$data = array(
|
||||
"title" => $employee_info->first_name .' '. $employee_info->last_name.' '.$this->lang->line('reports_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"summary_data" => $summary_data,
|
||||
"details_data" => $details_data,
|
||||
"overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date,'employee_id' =>$employee_id, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular_details",$data);
|
||||
}
|
||||
|
||||
function detailed_sales($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Detailed_sales');
|
||||
$model = $this->Detailed_sales;
|
||||
|
||||
$headers = $model->getDataColumns();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$summary_data = array();
|
||||
$details_data = array();
|
||||
|
||||
foreach($report_data['summary'] as $key=>$row)
|
||||
{
|
||||
$summary_data[] = array(anchor('sales/edit/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']);
|
||||
|
||||
foreach($report_data['details'][$key] as $drow)
|
||||
{
|
||||
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),to_currency($drow['profit']), $drow['discount_percent'].'%');
|
||||
}
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" =>$this->lang->line('reports_detailed_sales_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"summary_data" => $summary_data,
|
||||
"details_data" => $details_data,
|
||||
"overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular_details",$data);
|
||||
}
|
||||
|
||||
function detailed_receivings($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Detailed_receivings');
|
||||
$model = $this->Detailed_receivings;
|
||||
|
||||
$headers = $model->getDataColumns();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$summary_data = array();
|
||||
$details_data = array();
|
||||
|
||||
foreach($report_data['summary'] as $key=>$row)
|
||||
{
|
||||
$summary_data[] = array(anchor('receivings/receipt/'.$row['receiving_id'], 'RECV '.$row['receiving_id'], array('target' => '_blank')), $row['receiving_date'], $row['items_purchased'], $row['employee_name'], $row['supplier_name'], to_currency($row['total']), $row['payment_type'], $row['comment']);
|
||||
|
||||
foreach($report_data['details'][$key] as $drow)
|
||||
{
|
||||
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['quantity_purchased'], to_currency($drow['total']), $drow['discount_percent'].'%');
|
||||
}
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" =>$this->lang->line('reports_detailed_receivings_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"summary_data" => $summary_data,
|
||||
"details_data" => $details_data,
|
||||
"overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular_details",$data);
|
||||
}
|
||||
|
||||
function excel_export()
|
||||
{
|
||||
$this->load->view("reports/excel_export",array());
|
||||
}
|
||||
|
||||
function inventory_low($export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Inventory_low');
|
||||
$model = $this->Inventory_low;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array());
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['name'], $row['item_number'], $row['description'], $row['quantity'], $row['reorder_level']);
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_low_inventory_report'),
|
||||
"subtitle" => '',
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array()),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
function inventory_summary($export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Inventory_summary');
|
||||
$model = $this->Inventory_summary;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array());
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['name'], $row['item_number'], $row['description'], $row['quantity'], $row['reorder_level']);
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_inventory_summary_report'),
|
||||
"subtitle" => '',
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array()),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -1,430 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
class Sales extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('sales');
|
||||
$this->load->library('sale_lib');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function item_search()
|
||||
{
|
||||
$suggestions = $this->Item->get_item_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
$suggestions = array_merge($suggestions, $this->Item_kit->get_item_kit_search_suggestions($this->input->post('q'),$this->input->post('limit')));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function customer_search()
|
||||
{
|
||||
$suggestions = $this->Customer->get_customer_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function select_customer()
|
||||
{
|
||||
$customer_id = $this->input->post("customer");
|
||||
$this->sale_lib->set_customer($customer_id);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function change_mode()
|
||||
{
|
||||
$mode = $this->input->post("mode");
|
||||
$this->sale_lib->set_mode($mode);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function set_comment()
|
||||
{
|
||||
$this->sale_lib->set_comment($this->input->post('comment'));
|
||||
}
|
||||
|
||||
function set_email_receipt()
|
||||
{
|
||||
$this->sale_lib->set_email_receipt($this->input->post('email_receipt'));
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function add_payment()
|
||||
{
|
||||
$data=array();
|
||||
$this->form_validation->set_rules('amount_tendered', 'lang:sales_amount_tendered', 'numeric');
|
||||
|
||||
if ($this->form_validation->run() == FALSE)
|
||||
{
|
||||
if ( $this->input->post('payment_type') == $this->lang->line('sales_gift_card') )
|
||||
$data['error']=$this->lang->line('sales_must_enter_numeric_giftcard');
|
||||
else
|
||||
$data['error']=$this->lang->line('sales_must_enter_numeric');
|
||||
|
||||
$this->_reload($data);
|
||||
return;
|
||||
}
|
||||
|
||||
$payment_type=$this->input->post('payment_type');
|
||||
if ( $payment_type == $this->lang->line('sales_giftcard') )
|
||||
{
|
||||
$payments = $this->sale_lib->get_payments();
|
||||
$payment_type=$this->input->post('payment_type').':'.$payment_amount=$this->input->post('amount_tendered');
|
||||
$current_payments_with_giftcard = isset($payments[$payment_type]) ? $payments[$payment_type]['payment_amount'] : 0;
|
||||
$cur_giftcard_value = $this->Giftcard->get_giftcard_value( $this->input->post('amount_tendered') ) - $current_payments_with_giftcard;
|
||||
if ( $cur_giftcard_value <= 0 )
|
||||
{
|
||||
$data['error']='Giftcard balance is '.to_currency( $this->Giftcard->get_giftcard_value( $this->input->post('amount_tendered') ) ).' !';
|
||||
$this->_reload($data);
|
||||
return;
|
||||
}
|
||||
elseif ( ( $this->Giftcard->get_giftcard_value( $this->input->post('amount_tendered') ) - $this->sale_lib->get_total() ) > 0 )
|
||||
{
|
||||
$data['warning']='Giftcard balance is '.to_currency( $this->Giftcard->get_giftcard_value( $this->input->post('amount_tendered') ) - $this->sale_lib->get_total() ).' !';
|
||||
}
|
||||
$payment_amount=min( $this->sale_lib->get_total(), $this->Giftcard->get_giftcard_value( $this->input->post('amount_tendered') ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$payment_amount=$this->input->post('amount_tendered');
|
||||
}
|
||||
|
||||
if( !$this->sale_lib->add_payment( $payment_type, $payment_amount ) )
|
||||
{
|
||||
$data['error']='Unable to Add Payment! Please try again!';
|
||||
}
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function delete_payment($payment_id)
|
||||
{
|
||||
$this->sale_lib->delete_payment($payment_id);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function add()
|
||||
{
|
||||
$data=array();
|
||||
$mode = $this->sale_lib->get_mode();
|
||||
$item_id_or_number_or_item_kit_or_receipt = $this->input->post("item");
|
||||
$quantity = $mode=="sale" ? 1:-1;
|
||||
|
||||
if($this->sale_lib->is_valid_receipt($item_id_or_number_or_item_kit_or_receipt) && $mode=='return')
|
||||
{
|
||||
$this->sale_lib->return_entire_sale($item_id_or_number_or_item_kit_or_receipt);
|
||||
}
|
||||
elseif($this->sale_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
|
||||
{
|
||||
$this->sale_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt);
|
||||
}
|
||||
elseif(!$this->sale_lib->add_item($item_id_or_number_or_item_kit_or_receipt,$quantity))
|
||||
{
|
||||
$data['error']=$this->lang->line('sales_unable_to_add_item');
|
||||
}
|
||||
|
||||
if($this->sale_lib->out_of_stock($item_id_or_number_or_item_kit_or_receipt))
|
||||
{
|
||||
$data['warning'] = $this->lang->line('sales_quantity_less_than_zero');
|
||||
}
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
function edit_item($line)
|
||||
{
|
||||
$data= array();
|
||||
|
||||
$this->form_validation->set_rules('price', 'lang:items_price', 'required|numeric');
|
||||
$this->form_validation->set_rules('quantity', 'lang:items_quantity', 'required|numeric');
|
||||
|
||||
$description = $this->input->post("description");
|
||||
$serialnumber = $this->input->post("serialnumber");
|
||||
$price = $this->input->post("price");
|
||||
$quantity = $this->input->post("quantity");
|
||||
$discount = $this->input->post("discount");
|
||||
|
||||
|
||||
if ($this->form_validation->run() != FALSE)
|
||||
{
|
||||
$this->sale_lib->edit_item($line,$description,$serialnumber,$quantity,$discount,$price);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['error']=$this->lang->line('sales_error_editing_item');
|
||||
}
|
||||
|
||||
if($this->sale_lib->out_of_stock($this->sale_lib->get_item_id($line)))
|
||||
{
|
||||
$data['warning'] = $this->lang->line('sales_quantity_less_than_zero');
|
||||
}
|
||||
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
function delete_item($item_number)
|
||||
{
|
||||
$this->sale_lib->delete_item($item_number);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function remove_customer()
|
||||
{
|
||||
$this->sale_lib->remove_customer();
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function complete()
|
||||
{
|
||||
$data['cart']=$this->sale_lib->get_cart();
|
||||
$data['subtotal']=$this->sale_lib->get_subtotal();
|
||||
$data['taxes']=$this->sale_lib->get_taxes();
|
||||
$data['total']=$this->sale_lib->get_total();
|
||||
$data['receipt_title']=$this->lang->line('sales_receipt');
|
||||
$data['transaction_time']= date('m/d/Y h:i:s a');
|
||||
$customer_id=$this->sale_lib->get_customer();
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$comment = $this->sale_lib->get_comment();
|
||||
$emp_info=$this->Employee->get_info($employee_id);
|
||||
$data['payments']=$this->sale_lib->get_payments();
|
||||
$data['amount_change']=to_currency($this->sale_lib->get_amount_due() * -1);
|
||||
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
|
||||
|
||||
if($customer_id!=-1)
|
||||
{
|
||||
$cust_info=$this->Customer->get_info($customer_id);
|
||||
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
|
||||
}
|
||||
|
||||
//SAVE sale to database
|
||||
$data['sale_id']='POS '.$this->Sale->save($data['cart'], $customer_id,$employee_id,$comment,$data['payments']);
|
||||
if ($data['sale_id'] == 'POS -1')
|
||||
{
|
||||
$data['error_message'] = $this->lang->line('sales_transaction_failed');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->sale_lib->get_email_receipt() && !empty($cust_info->email))
|
||||
{
|
||||
$this->load->library('email');
|
||||
$config['mailtype'] = 'html';
|
||||
$this->email->initialize($config);
|
||||
$this->email->from($this->config->item('email'), $this->config->item('company'));
|
||||
$this->email->to($cust_info->email);
|
||||
|
||||
$this->email->subject($this->lang->line('sales_receipt'));
|
||||
$this->email->message($this->load->view("sales/receipt_email",$data, true));
|
||||
$this->email->send();
|
||||
}
|
||||
}
|
||||
$this->load->view("sales/receipt",$data);
|
||||
$this->sale_lib->clear_all();
|
||||
}
|
||||
|
||||
function receipt($sale_id)
|
||||
{
|
||||
$sale_info = $this->Sale->get_info($sale_id)->row_array();
|
||||
$this->sale_lib->copy_entire_sale($sale_id);
|
||||
$data['cart']=$this->sale_lib->get_cart();
|
||||
$data['payments']=$this->sale_lib->get_payments();
|
||||
$data['subtotal']=$this->sale_lib->get_subtotal();
|
||||
$data['taxes']=$this->sale_lib->get_taxes();
|
||||
$data['total']=$this->sale_lib->get_total();
|
||||
$data['receipt_title']=$this->lang->line('sales_receipt');
|
||||
$data['transaction_time']= date('m/d/Y h:i:s a', strtotime($sale_info['sale_time']));
|
||||
$customer_id=$this->sale_lib->get_customer();
|
||||
$emp_info=$this->Employee->get_info($sale_info['employee_id']);
|
||||
$data['payment_type']=$sale_info['payment_type'];
|
||||
$data['amount_change']=to_currency($this->sale_lib->get_amount_due() * -1);
|
||||
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
|
||||
|
||||
if($customer_id!=-1)
|
||||
{
|
||||
$cust_info=$this->Customer->get_info($customer_id);
|
||||
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
|
||||
}
|
||||
$data['sale_id']='POS '.$sale_id;
|
||||
$this->load->view("sales/receipt",$data);
|
||||
$this->sale_lib->clear_all();
|
||||
|
||||
}
|
||||
|
||||
function edit($sale_id)
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$data['customers'] = array('' => 'No Customer');
|
||||
foreach ($this->Customer->get_all()->result() as $customer)
|
||||
{
|
||||
$data['customers'][$customer->person_id] = $customer->first_name . ' '. $customer->last_name;
|
||||
}
|
||||
|
||||
$data['employees'] = array();
|
||||
foreach ($this->Employee->get_all()->result() as $employee)
|
||||
{
|
||||
$data['employees'][$employee->person_id] = $employee->first_name . ' '. $employee->last_name;
|
||||
}
|
||||
|
||||
$data['sale_info'] = $this->Sale->get_info($sale_id)->row_array();
|
||||
|
||||
|
||||
$this->load->view('sales/edit', $data);
|
||||
}
|
||||
|
||||
function delete($sale_id)
|
||||
{
|
||||
$data = array();
|
||||
|
||||
if ($this->Sale->delete($sale_id))
|
||||
{
|
||||
$data['success'] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['success'] = false;
|
||||
}
|
||||
|
||||
$this->load->view('sales/delete', $data);
|
||||
|
||||
}
|
||||
|
||||
function save($sale_id)
|
||||
{
|
||||
$sale_data = array(
|
||||
'sale_time' => date('Y-m-d', strtotime($this->input->post('date'))),
|
||||
'customer_id' => $this->input->post('customer_id') ? $this->input->post('customer_id') : null,
|
||||
'employee_id' => $this->input->post('employee_id'),
|
||||
'comment' => $this->input->post('comment')
|
||||
);
|
||||
|
||||
if ($this->Sale->update($sale_data, $sale_id))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('sales_successfully_updated')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('sales_unsuccessfully_updated')));
|
||||
}
|
||||
}
|
||||
|
||||
function _payments_cover_total()
|
||||
{
|
||||
$total_payments = 0;
|
||||
|
||||
foreach($this->sale_lib->get_payments() as $payment)
|
||||
{
|
||||
$total_payments += $payment['payment_amount'];
|
||||
}
|
||||
|
||||
/* Changed the conditional to account for floating point rounding */
|
||||
if ( ( $this->sale_lib->get_mode() == 'sale' ) && ( ( to_currency_no_money( $this->sale_lib->get_total() ) - $total_payments ) > 1e-6 ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function _reload($data=array())
|
||||
{
|
||||
$person_info = $this->Employee->get_logged_in_employee_info();
|
||||
$data['cart']=$this->sale_lib->get_cart();
|
||||
$data['modes']=array('sale'=>$this->lang->line('sales_sale'),'return'=>$this->lang->line('sales_return'));
|
||||
$data['mode']=$this->sale_lib->get_mode();
|
||||
$data['subtotal']=$this->sale_lib->get_subtotal();
|
||||
$data['taxes']=$this->sale_lib->get_taxes();
|
||||
$data['total']=$this->sale_lib->get_total();
|
||||
$data['items_module_allowed'] = $this->Employee->has_permission('items', $person_info->person_id);
|
||||
$data['comment'] = $this->sale_lib->get_comment();
|
||||
$data['email_receipt'] = $this->sale_lib->get_email_receipt();
|
||||
$data['payments_total']=$this->sale_lib->get_payments_total();
|
||||
$data['amount_due']=$this->sale_lib->get_amount_due();
|
||||
$data['payments']=$this->sale_lib->get_payments();
|
||||
$data['payment_options']=array(
|
||||
$this->lang->line('sales_cash') => $this->lang->line('sales_cash'),
|
||||
$this->lang->line('sales_check') => $this->lang->line('sales_check'),
|
||||
$this->lang->line('sales_giftcard') => $this->lang->line('sales_giftcard'),
|
||||
$this->lang->line('sales_debit') => $this->lang->line('sales_debit'),
|
||||
$this->lang->line('sales_credit') => $this->lang->line('sales_credit')
|
||||
);
|
||||
|
||||
$customer_id=$this->sale_lib->get_customer();
|
||||
if($customer_id!=-1)
|
||||
{
|
||||
$info=$this->Customer->get_info($customer_id);
|
||||
$data['customer']=$info->first_name.' '.$info->last_name;
|
||||
$data['customer_email']=$info->email;
|
||||
}
|
||||
$data['payments_cover_total'] = $this->_payments_cover_total();
|
||||
$this->load->view("sales/register",$data);
|
||||
}
|
||||
|
||||
function cancel_sale()
|
||||
{
|
||||
$this->sale_lib->clear_all();
|
||||
$this->_reload();
|
||||
|
||||
}
|
||||
|
||||
function suspend()
|
||||
{
|
||||
$data['cart']=$this->sale_lib->get_cart();
|
||||
$data['subtotal']=$this->sale_lib->get_subtotal();
|
||||
$data['taxes']=$this->sale_lib->get_taxes();
|
||||
$data['total']=$this->sale_lib->get_total();
|
||||
$data['receipt_title']=$this->lang->line('sales_receipt');
|
||||
$data['transaction_time']= date('m/d/Y h:i:s a');
|
||||
$customer_id=$this->sale_lib->get_customer();
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$comment = $this->input->post('comment');
|
||||
$emp_info=$this->Employee->get_info($employee_id);
|
||||
$payment_type = $this->input->post('payment_type');
|
||||
$data['payment_type']=$this->input->post('payment_type');
|
||||
//Alain Multiple payments
|
||||
$data['payments']=$this->sale_lib->get_payments();
|
||||
$data['amount_change']=to_currency($this->sale_lib->get_amount_due() * -1);
|
||||
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
|
||||
|
||||
if($customer_id!=-1)
|
||||
{
|
||||
$cust_info=$this->Customer->get_info($customer_id);
|
||||
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
|
||||
}
|
||||
|
||||
$total_payments = 0;
|
||||
|
||||
foreach($data['payments'] as $payment)
|
||||
{
|
||||
$total_payments += $payment['payment_amount'];
|
||||
}
|
||||
|
||||
//SAVE sale to database
|
||||
$data['sale_id']='POS '.$this->Sale_suspended->save($data['cart'], $customer_id,$employee_id,$comment,$data['payments']);
|
||||
if ($data['sale_id'] == 'POS -1')
|
||||
{
|
||||
$data['error_message'] = $this->lang->line('sales_transaction_failed');
|
||||
}
|
||||
$this->sale_lib->clear_all();
|
||||
$this->_reload(array('success' => $this->lang->line('sales_successfully_suspended_sale')));
|
||||
}
|
||||
|
||||
function suspended()
|
||||
{
|
||||
$data = array();
|
||||
$data['suspended_sales'] = $this->Sale_suspended->get_all()->result_array();
|
||||
$this->load->view('sales/suspended', $data);
|
||||
}
|
||||
|
||||
function unsuspend()
|
||||
{
|
||||
$sale_id = $this->input->post('suspended_sale_id');
|
||||
$this->sale_lib->clear_all();
|
||||
$this->sale_lib->copy_entire_suspended_sale($sale_id);
|
||||
$this->Sale_suspended->delete($sale_id);
|
||||
$this->_reload();
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
class Secure_area extends Controller
|
||||
{
|
||||
/*
|
||||
Controllers that are considered secure extend Secure_area, optionally a $module_id can
|
||||
be set to also check if a user can access a particular module in the system.
|
||||
*/
|
||||
function __construct($module_id=null)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('Employee');
|
||||
if(!$this->Employee->is_logged_in())
|
||||
{
|
||||
redirect('login');
|
||||
}
|
||||
|
||||
if(!$this->Employee->has_permission($module_id,$this->Employee->get_logged_in_employee_info()->person_id))
|
||||
{
|
||||
redirect('no_access/'.$module_id);
|
||||
}
|
||||
|
||||
//load up global data
|
||||
$logged_in_employee_info=$this->Employee->get_logged_in_employee_info();
|
||||
$data['allowed_modules']=$this->Module->get_allowed_modules($logged_in_employee_info->person_id);
|
||||
$data['user_info']=$logged_in_employee_info;
|
||||
$this->load->vars($data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,130 +0,0 @@
|
||||
<?php
|
||||
require_once ("person_controller.php");
|
||||
class Suppliers extends Person_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('suppliers');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('?c=suppliers&m=index');
|
||||
$config['total_rows'] = $this->Supplier->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_supplier_manage_table($this->Supplier->get_all($config['per_page'], $this->input->get('per_page')),$this);
|
||||
$this->load->view('suppliers/manage',$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns supplier table data rows. This will be called with AJAX.
|
||||
*/
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_supplier_manage_table_data_rows($this->Supplier->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Supplier->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Loads the supplier edit form
|
||||
*/
|
||||
function view($supplier_id=-1)
|
||||
{
|
||||
$data['person_info']=$this->Supplier->get_info($supplier_id);
|
||||
$this->load->view("suppliers/form",$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Inserts/updates a supplier
|
||||
*/
|
||||
function save($supplier_id=-1)
|
||||
{
|
||||
$person_data = array(
|
||||
'first_name'=>$this->input->post('first_name'),
|
||||
'last_name'=>$this->input->post('last_name'),
|
||||
'email'=>$this->input->post('email'),
|
||||
'phone_number'=>$this->input->post('phone_number'),
|
||||
'address_1'=>$this->input->post('address_1'),
|
||||
'address_2'=>$this->input->post('address_2'),
|
||||
'city'=>$this->input->post('city'),
|
||||
'state'=>$this->input->post('state'),
|
||||
'zip'=>$this->input->post('zip'),
|
||||
'country'=>$this->input->post('country'),
|
||||
'comments'=>$this->input->post('comments')
|
||||
);
|
||||
$supplier_data=array(
|
||||
'company_name'=>$this->input->post('company_name'),
|
||||
'account_number'=>$this->input->post('account_number')=='' ? null:$this->input->post('account_number'),
|
||||
);
|
||||
if($this->Supplier->save($person_data,$supplier_data,$supplier_id))
|
||||
{
|
||||
//New supplier
|
||||
if($supplier_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('suppliers_successful_adding').' '.
|
||||
$supplier_data['company_name'],'person_id'=>$supplier_data['person_id']));
|
||||
}
|
||||
else //previous supplier
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('suppliers_successful_updating').' '.
|
||||
$supplier_data['company_name'],'person_id'=>$supplier_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('suppliers_error_adding_updating').' '.
|
||||
$supplier_data['company_name'],'person_id'=>-1));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
This deletes suppliers from the suppliers table
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
$suppliers_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Supplier->delete_list($suppliers_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('suppliers_successful_deleted').' '.
|
||||
count($suppliers_to_delete).' '.$this->lang->line('suppliers_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('suppliers_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Gets one row for a supplier manage table. This is called using AJAX to update one row.
|
||||
*/
|
||||
function get_row()
|
||||
{
|
||||
$person_id = $this->input->post('row_id');
|
||||
$data_row=get_supplier_data_row($this->Supplier->get_info($person_id),$this);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 360;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,34 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>404 Page Not Found</title>
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font-family: Lucida Grande, Verdana, Sans-serif;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#content {
|
||||
border: #999 1px solid;
|
||||
background-color: #fff;
|
||||
padding: 20px 20px 12px 20px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
color: #990000;
|
||||
margin: 0 0 4px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,34 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Database Error</title>
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font-family: Lucida Grande, Verdana, Sans-serif;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#content {
|
||||
border: #999 1px solid;
|
||||
background-color: #fff;
|
||||
padding: 20px 20px 12px 20px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
color: #990000;
|
||||
margin: 0 0 4px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,34 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Error</title>
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font-family: Lucida Grande, Verdana, Sans-serif;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#content {
|
||||
border: #999 1px solid;
|
||||
background-color: #fff;
|
||||
padding: 20px 20px 12px 20px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
color: #990000;
|
||||
margin: 0 0 4px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,10 +0,0 @@
|
||||
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
||||
|
||||
<h4>A PHP Error was encountered</h4>
|
||||
|
||||
<p>Severity: <?php echo $severity; ?></p>
|
||||
<p>Message: <?php echo $message; ?></p>
|
||||
<p>Filename: <?php echo $filepath; ?></p>
|
||||
<p>Line Number: <?php echo $line; ?></p>
|
||||
|
||||
</div>
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
function to_currency($number)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$currency_symbol = $CI->config->item('currency_symbol') ? $CI->config->item('currency_symbol') : '$';
|
||||
if($number >= 0)
|
||||
{
|
||||
return $currency_symbol.number_format($number, 2, '.', '');
|
||||
}
|
||||
else
|
||||
{
|
||||
return '-'.$currency_symbol.number_format(abs($number), 2, '.', '');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function to_currency_no_money($number)
|
||||
{
|
||||
return number_format($number, 2, '.', '');
|
||||
}
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,87 +0,0 @@
|
||||
<?php
|
||||
function get_simple_date_ranges()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI->load->language('reports');
|
||||
$today = date('Y-m-d');
|
||||
$yesterday = date('Y-m-d', mktime(0,0,0,date("m"),date("d")-1,date("Y")));
|
||||
$six_days_ago = date('Y-m-d', mktime(0,0,0,date("m"),date("d")-6,date("Y")));
|
||||
$start_of_this_month = date('Y-m-d', mktime(0,0,0,date("m"),1,date("Y")));
|
||||
$end_of_this_month = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00'))));
|
||||
$start_of_last_month = date('Y-m-d', mktime(0,0,0,date("m")-1,1,date("Y")));
|
||||
$end_of_last_month = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime((date('m') - 1).'/01/'.date('Y').' 00:00:00'))));
|
||||
$start_of_this_year = date('Y-m-d', mktime(0,0,0,1,1,date("Y")));
|
||||
$end_of_this_year = date('Y-m-d', mktime(0,0,0,12,31,date("Y")));
|
||||
$start_of_last_year = date('Y-m-d', mktime(0,0,0,1,1,date("Y")-1));
|
||||
$end_of_last_year = date('Y-m-d', mktime(0,0,0,12,31,date("Y")-1));
|
||||
$start_of_time = date('Y-m-d', 0);
|
||||
|
||||
return array(
|
||||
$today. '/' . $today => $CI->lang->line('reports_today'),
|
||||
$yesterday. '/' . $yesterday => $CI->lang->line('reports_yesterday'),
|
||||
$six_days_ago. '/' . $today => $CI->lang->line('reports_last_7'),
|
||||
$start_of_this_month . '/' . $end_of_this_month => $CI->lang->line('reports_this_month'),
|
||||
$start_of_last_month . '/' . $end_of_last_month => $CI->lang->line('reports_last_month'),
|
||||
$start_of_this_year . '/' . $end_of_this_year => $CI->lang->line('reports_this_year'),
|
||||
$start_of_last_year . '/' . $end_of_last_year => $CI->lang->line('reports_last_year'),
|
||||
$start_of_time . '/' . $today => $CI->lang->line('reports_all_time'),
|
||||
);
|
||||
}
|
||||
|
||||
function get_months()
|
||||
{
|
||||
$months = array();
|
||||
for($k=1;$k<=12;$k++)
|
||||
{
|
||||
$cur_month = mktime(0, 0, 0, $k, 1, 2000);
|
||||
$months[date("m", $cur_month)] = date("M",$cur_month);
|
||||
}
|
||||
|
||||
return $months;
|
||||
}
|
||||
|
||||
function get_days()
|
||||
{
|
||||
$days = array();
|
||||
|
||||
for($k=1;$k<=31;$k++)
|
||||
{
|
||||
$cur_day = mktime(0, 0, 0, 1, $k, 2000);
|
||||
$days[date('d',$cur_day)] = date('j',$cur_day);
|
||||
}
|
||||
|
||||
return $days;
|
||||
}
|
||||
|
||||
function get_years()
|
||||
{
|
||||
$years = array();
|
||||
for($k=0;$k<10;$k++)
|
||||
{
|
||||
$years[date("Y")-$k] = date("Y")-$k;
|
||||
}
|
||||
|
||||
return $years;
|
||||
}
|
||||
|
||||
function get_random_colors($how_many)
|
||||
{
|
||||
$colors = array();
|
||||
|
||||
for($k=0;$k<$how_many;$k++)
|
||||
{
|
||||
$colors[] = '#'.random_color();
|
||||
}
|
||||
|
||||
return $colors;
|
||||
}
|
||||
|
||||
function random_color()
|
||||
{
|
||||
mt_srand((double)microtime()*1000000);
|
||||
$c = '';
|
||||
while(strlen($c)<6){
|
||||
$c .= sprintf("%02X", mt_rand(0, 255));
|
||||
}
|
||||
return $c;
|
||||
}
|
||||
@@ -1,344 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
Gets the html table to manage people.
|
||||
*/
|
||||
function get_people_manage_table($people,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('common_last_name'),
|
||||
$CI->lang->line('common_first_name'),
|
||||
$CI->lang->line('common_email'),
|
||||
$CI->lang->line('common_phone_number'),
|
||||
' ');
|
||||
|
||||
$table.='<thead><tr>';
|
||||
foreach($headers as $header)
|
||||
{
|
||||
$table.="<th>$header</th>";
|
||||
}
|
||||
$table.='</tr></thead><tbody>';
|
||||
$table.=get_people_manage_table_data_rows($people,$controller);
|
||||
$table.='</tbody></table>';
|
||||
return $table;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html data rows for the people.
|
||||
*/
|
||||
function get_people_manage_table_data_rows($people,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table_data_rows='';
|
||||
|
||||
foreach($people->result() as $person)
|
||||
{
|
||||
$table_data_rows.=get_person_data_row($person,$controller);
|
||||
}
|
||||
|
||||
if($people->num_rows()==0)
|
||||
{
|
||||
$table_data_rows.="<tr><td colspan='6'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('common_no_persons_to_display')."</div></tr></tr>";
|
||||
}
|
||||
|
||||
return $table_data_rows;
|
||||
}
|
||||
|
||||
function get_person_data_row($person,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$width = $controller->get_form_width();
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='5%'><input type='checkbox' id='person_$person->person_id' value='".$person->person_id."'/></td>";
|
||||
$table_data_row.='<td width="20%">'.character_limiter($person->last_name,13).'</td>';
|
||||
$table_data_row.='<td width="20%">'.character_limiter($person->first_name,13).'</td>';
|
||||
$table_data_row.='<td width="30%">'.mailto($person->email,character_limiter($person->email,22)).'</td>';
|
||||
$table_data_row.='<td width="20%">'.character_limiter($person->phone_number,13).'</td>';
|
||||
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$person->person_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
|
||||
$table_data_row.='</tr>';
|
||||
|
||||
return $table_data_row;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html table to manage suppliers.
|
||||
*/
|
||||
function get_supplier_manage_table($suppliers,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('suppliers_company_name'),
|
||||
$CI->lang->line('common_last_name'),
|
||||
$CI->lang->line('common_first_name'),
|
||||
$CI->lang->line('common_email'),
|
||||
$CI->lang->line('common_phone_number'),
|
||||
' ');
|
||||
|
||||
$table.='<thead><tr>';
|
||||
foreach($headers as $header)
|
||||
{
|
||||
$table.="<th>$header</th>";
|
||||
}
|
||||
$table.='</tr></thead><tbody>';
|
||||
$table.=get_supplier_manage_table_data_rows($suppliers,$controller);
|
||||
$table.='</tbody></table>';
|
||||
return $table;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html data rows for the supplier.
|
||||
*/
|
||||
function get_supplier_manage_table_data_rows($suppliers,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table_data_rows='';
|
||||
|
||||
foreach($suppliers->result() as $supplier)
|
||||
{
|
||||
$table_data_rows.=get_supplier_data_row($supplier,$controller);
|
||||
}
|
||||
|
||||
if($suppliers->num_rows()==0)
|
||||
{
|
||||
$table_data_rows.="<tr><td colspan='7'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('common_no_persons_to_display')."</div></tr></tr>";
|
||||
}
|
||||
|
||||
return $table_data_rows;
|
||||
}
|
||||
|
||||
function get_supplier_data_row($supplier,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$width = $controller->get_form_width();
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='5%'><input type='checkbox' id='person_$supplier->person_id' value='".$supplier->person_id."'/></td>";
|
||||
$table_data_row.='<td width="17%">'.character_limiter($supplier->company_name,13).'</td>';
|
||||
$table_data_row.='<td width="17%">'.character_limiter($supplier->last_name,13).'</td>';
|
||||
$table_data_row.='<td width="17%">'.character_limiter($supplier->first_name,13).'</td>';
|
||||
$table_data_row.='<td width="22%">'.mailto($supplier->email,character_limiter($supplier->email,22)).'</td>';
|
||||
$table_data_row.='<td width="17%">'.character_limiter($supplier->phone_number,13).'</td>';
|
||||
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$supplier->person_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
|
||||
$table_data_row.='</tr>';
|
||||
|
||||
return $table_data_row;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html table to manage items.
|
||||
*/
|
||||
function get_items_manage_table($items,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('items_item_number'),
|
||||
$CI->lang->line('items_name'),
|
||||
$CI->lang->line('items_category'),
|
||||
$CI->lang->line('items_cost_price'),
|
||||
$CI->lang->line('items_unit_price'),
|
||||
$CI->lang->line('items_tax_percents'),
|
||||
$CI->lang->line('items_quantity'),
|
||||
' ',
|
||||
$CI->lang->line('items_inventory')
|
||||
);
|
||||
|
||||
$table.='<thead><tr>';
|
||||
foreach($headers as $header)
|
||||
{
|
||||
$table.="<th>$header</th>";
|
||||
}
|
||||
$table.='</tr></thead><tbody>';
|
||||
$table.=get_items_manage_table_data_rows($items,$controller);
|
||||
$table.='</tbody></table>';
|
||||
return $table;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html data rows for the items.
|
||||
*/
|
||||
function get_items_manage_table_data_rows($items,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table_data_rows='';
|
||||
|
||||
foreach($items->result() as $item)
|
||||
{
|
||||
$table_data_rows.=get_item_data_row($item,$controller);
|
||||
}
|
||||
|
||||
if($items->num_rows()==0)
|
||||
{
|
||||
$table_data_rows.="<tr><td colspan='11'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('items_no_items_to_display')."</div></tr></tr>";
|
||||
}
|
||||
|
||||
return $table_data_rows;
|
||||
}
|
||||
|
||||
function get_item_data_row($item,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$item_tax_info=$CI->Item_taxes->get_info($item->item_id);
|
||||
$tax_percents = '';
|
||||
foreach($item_tax_info as $tax_info)
|
||||
{
|
||||
$tax_percents.=$tax_info['percent']. '%, ';
|
||||
}
|
||||
$tax_percents=substr($tax_percents, 0, -2);
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$width = $controller->get_form_width();
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='3%'><input type='checkbox' id='item_$item->item_id' value='".$item->item_id."'/></td>";
|
||||
$table_data_row.='<td width="15%">'.$item->item_number.'</td>';
|
||||
$table_data_row.='<td width="20%">'.$item->name.'</td>';
|
||||
$table_data_row.='<td width="14%">'.$item->category.'</td>';
|
||||
$table_data_row.='<td width="14%">'.to_currency($item->cost_price).'</td>';
|
||||
$table_data_row.='<td width="14%">'.to_currency($item->unit_price).'</td>';
|
||||
$table_data_row.='<td width="14%">'.$tax_percents.'</td>';
|
||||
$table_data_row.='<td width="14%">'.$item->quantity.'</td>';
|
||||
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item->item_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
|
||||
|
||||
//Ramel Inventory Tracking
|
||||
$table_data_row.='<td width="10%">'.anchor($controller_name."/inventory/$item->item_id/width:$width", $CI->lang->line('common_inv'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_count')))./*'</td>';//inventory count
|
||||
$table_data_row.='<td width="5%">'*/' '.anchor($controller_name."/count_details/$item->item_id/width:$width", $CI->lang->line('common_det'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_details_count'))).'</td>';//inventory details
|
||||
|
||||
$table_data_row.='</tr>';
|
||||
return $table_data_row;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html table to manage giftcards.
|
||||
*/
|
||||
function get_giftcards_manage_table( $giftcards, $controller )
|
||||
{
|
||||
$CI =& get_instance();
|
||||
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('giftcards_giftcard_number'),
|
||||
$CI->lang->line('giftcards_card_value'),
|
||||
' ',
|
||||
);
|
||||
|
||||
$table.='<thead><tr>';
|
||||
foreach($headers as $header)
|
||||
{
|
||||
$table.="<th>$header</th>";
|
||||
}
|
||||
$table.='</tr></thead><tbody>';
|
||||
$table.=get_giftcards_manage_table_data_rows( $giftcards, $controller );
|
||||
$table.='</tbody></table>';
|
||||
return $table;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html data rows for the giftcard.
|
||||
*/
|
||||
function get_giftcards_manage_table_data_rows( $giftcards, $controller )
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table_data_rows='';
|
||||
|
||||
foreach($giftcards->result() as $giftcard)
|
||||
{
|
||||
$table_data_rows.=get_giftcard_data_row( $giftcard, $controller );
|
||||
}
|
||||
|
||||
if($giftcards->num_rows()==0)
|
||||
{
|
||||
$table_data_rows.="<tr><td colspan='11'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('giftcards_no_giftcards_to_display')."</div></tr></tr>";
|
||||
}
|
||||
|
||||
return $table_data_rows;
|
||||
}
|
||||
|
||||
function get_giftcard_data_row($giftcard,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$width = $controller->get_form_width();
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='3%'><input type='checkbox' id='giftcard_$giftcard->giftcard_id' value='".$giftcard->giftcard_id."'/></td>";
|
||||
$table_data_row.='<td width="15%">'.$giftcard->giftcard_number.'</td>';
|
||||
$table_data_row.='<td width="20%">'.to_currency($giftcard->value).'</td>';
|
||||
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$giftcard->giftcard_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
|
||||
|
||||
$table_data_row.='</tr>';
|
||||
return $table_data_row;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html table to manage item kits.
|
||||
*/
|
||||
function get_item_kits_manage_table( $item_kits, $controller )
|
||||
{
|
||||
$CI =& get_instance();
|
||||
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('item_kits_name'),
|
||||
$CI->lang->line('item_kits_description'),
|
||||
' ',
|
||||
);
|
||||
|
||||
$table.='<thead><tr>';
|
||||
foreach($headers as $header)
|
||||
{
|
||||
$table.="<th>$header</th>";
|
||||
}
|
||||
$table.='</tr></thead><tbody>';
|
||||
$table.=get_item_kits_manage_table_data_rows( $item_kits, $controller );
|
||||
$table.='</tbody></table>';
|
||||
return $table;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html data rows for the item kits.
|
||||
*/
|
||||
function get_item_kits_manage_table_data_rows( $item_kits, $controller )
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table_data_rows='';
|
||||
|
||||
foreach($item_kits->result() as $item_kit)
|
||||
{
|
||||
$table_data_rows.=get_item_kit_data_row( $item_kit, $controller );
|
||||
}
|
||||
|
||||
if($item_kits->num_rows()==0)
|
||||
{
|
||||
$table_data_rows.="<tr><td colspan='11'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('item_kits_no_item_kits_to_display')."</div></tr></tr>";
|
||||
}
|
||||
|
||||
return $table_data_rows;
|
||||
}
|
||||
|
||||
function get_item_kit_data_row($item_kit,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$width = $controller->get_form_width();
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='3%'><input type='checkbox' id='item_kit_$item_kit->item_kit_id' value='".$item_kit->item_kit_id."'/></td>";
|
||||
$table_data_row.='<td width="15%">'.$item_kit->name.'</td>';
|
||||
$table_data_row.='<td width="20%">'.character_limiter($item_kit->description, 25).'</td>';
|
||||
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item_kit->item_kit_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
|
||||
|
||||
$table_data_row.='</tr>';
|
||||
return $table_data_row;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?php
|
||||
//Loads configuration from database into global CI config
|
||||
function load_config()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
foreach($CI->Appconfig->get_all()->result() as $app_config)
|
||||
{
|
||||
$CI->config->set_item($app_config->key,$app_config->value);
|
||||
}
|
||||
|
||||
if ($CI->config->item('language'))
|
||||
{
|
||||
$CI->lang->switch_to($CI->config->item('language'));
|
||||
}
|
||||
|
||||
if ($CI->config->item('timezone'))
|
||||
{
|
||||
date_default_timezone_set($CI->config->item('timezone'));
|
||||
}
|
||||
else
|
||||
{
|
||||
date_default_timezone_set('America/New_York');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
$lang['common_common']='common';
|
||||
$lang['common_submit']='Submit';
|
||||
$lang['common_or']='OR';
|
||||
$lang['common_powered_by']='Powered by';
|
||||
$lang['common_welcome']='Welcome';
|
||||
$lang['common_logout']='Logout';
|
||||
$lang['common_list_of']='List of';
|
||||
$lang['common_first_name']='First Name';
|
||||
$lang['common_last_name']='Last Name';
|
||||
$lang['common_email']='E-Mail';
|
||||
$lang['common_phone_number']='Phone Number';
|
||||
$lang['common_address_1']='Address 1';
|
||||
$lang['common_address_2']='Address 2';
|
||||
$lang['common_city']='City';
|
||||
$lang['common_state']='State';
|
||||
$lang['common_zip']='Zip';
|
||||
$lang['common_country']='Country';
|
||||
$lang['common_comments']='Comments';
|
||||
$lang['common_edit']='edit';
|
||||
$lang['common_search']='Search';
|
||||
$lang['common_delete']='Delete';
|
||||
$lang['common_remove']='Remove';
|
||||
$lang['common_view_recent_sales']='View Recent Sales';
|
||||
$lang['common_you_are_using_ospos']='You are using Open Source Point Of Sale Version';
|
||||
$lang['common_please_visit_my']='Please visit my';
|
||||
$lang['common_website']='website';
|
||||
$lang['common_fields_required_message']='Fields in red are required';
|
||||
$lang['common_learn_about_project']='to learn the lastest information about the project';
|
||||
$lang['common_searched_for']='Searched for';
|
||||
$lang['common_first_name_required']='The first name is a required field.';
|
||||
$lang['common_last_name_required']='The last name is a required field';
|
||||
$lang['common_email_invalid_format']='The e-mail address is not in the proper format';
|
||||
$lang['common_confirm_search']='You have selected one or more rows, these will no longer be selected after your search. Are you sure you want to submit this search?';
|
||||
$lang['common_no_persons_to_display']='There are no people to display';
|
||||
$lang['common_return_policy']='Return Policy';
|
||||
$lang['common_price']='Price';
|
||||
$lang['common_welcome_message']= 'Welcome to Open Source Point Of Sale, click a module below to get started!';
|
||||
$lang['common_inv']='inv';
|
||||
$lang['common_det']='details';
|
||||
?>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
$lang['config_info']='Store Configuration Information';
|
||||
$lang['config_company']='Company Name';
|
||||
$lang['config_address']='Company Address';
|
||||
$lang['config_phone']='Company Phone';
|
||||
$lang['config_website']='Website';
|
||||
$lang['config_fax']='Fax';
|
||||
$lang['config_default_tax_rate']='Default Tax Rate %';
|
||||
$lang['config_default_tax_rate_1']='Tax 1 Rate';
|
||||
$lang['config_default_tax_rate_2']='Tax 2 Rate';
|
||||
$lang['config_company_required']='Company name is a required field';
|
||||
$lang['config_address_required']='Company address is a required field';
|
||||
$lang['config_phone_required']='Company phone is a required field';
|
||||
$lang['config_default_tax_rate_required']='The default tax rate is a required field';
|
||||
$lang['config_default_tax_rate_number']='The default tax rate must be a number';
|
||||
$lang['config_company_website_url']='Company website is not a valid URL (http://...)';
|
||||
$lang['config_saved_successfully']='Configuration saved successfully';
|
||||
$lang['config_saved_unsuccessfully']='Configuration saved unsuccessfully';
|
||||
$lang['config_return_policy_required']='Return policy is a required field';
|
||||
$lang['config_print_after_sale']='Print receipt after sale';
|
||||
$lang['config_language'] = 'Language';
|
||||
$lang['config_timezone'] = 'Timezone';
|
||||
$lang['config_currency_symbol'] = 'Currency Symbol';
|
||||
?>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
$lang['customers_new']='New Customer';
|
||||
$lang['customers_customer']='Customer';
|
||||
$lang['customers_update']='Update Customer';
|
||||
$lang['customers_confirm_delete']='Are you sure you want to delete the selected customers?';
|
||||
$lang['customers_none_selected']='You have not selected any customers to delete';
|
||||
$lang['customers_error_adding_updating'] = 'Error adding/updating customer';
|
||||
$lang['customers_successful_adding']='You have successfully added customer';
|
||||
$lang['customers_successful_updating']='You have successfully updated customer';
|
||||
$lang['customers_successful_deleted']='You have successfully deleted';
|
||||
$lang['customers_one_or_multiple']='customer(s)';
|
||||
$lang['customers_cannot_be_deleted']='Could not deleted selected customers, one or more of the selected customers has sales.';
|
||||
$lang['customers_basic_information']='Customer Information';
|
||||
$lang['customers_account_number']='Account #';
|
||||
$lang['customers_taxable']='Taxable';
|
||||
?>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
$lang['employees_employee']='Employee';
|
||||
$lang['employees_new']='New Employee';
|
||||
$lang['employees_update']='Update Employee';
|
||||
$lang['employees_confirm_delete']='Are you sure you want to delete the selected employees?';
|
||||
$lang['employees_none_selected']='You have not selected any employees to delete';
|
||||
$lang['employees_error_adding_updating'] = 'Error adding/updating employee';
|
||||
$lang['employees_successful_adding']='You have successfully added employee';
|
||||
$lang['employees_successful_updating']='You have successfully updated employee';
|
||||
$lang['employees_successful_deleted']='You have successfully deleted';
|
||||
$lang['employees_one_or_multiple']='employee(s)';
|
||||
$lang['employees_cannot_be_deleted']='Could not deleted selected employees, one or more of the employees has processed sales or you are trying to delete yourself :)';
|
||||
$lang['employees_username']='Username';
|
||||
$lang['employees_password']='Password';
|
||||
$lang['employees_repeat_password']='Password Again';
|
||||
$lang['employees_username_required']='Username is a required field';
|
||||
$lang['employees_username_minlength']='The username must be at least 5 characters';
|
||||
$lang['employees_password_required']='Password is required';
|
||||
$lang['employees_password_minlength']='Passwords must be at least 8 characters';
|
||||
$lang['employees_password_must_match']='Passwords do not match';
|
||||
$lang['employees_basic_information']='Employee Basic Information';
|
||||
$lang['employees_login_info']='Employee Login Info';
|
||||
$lang['employees_permission_info']='Employee Permissions and Access';
|
||||
$lang['employees_permission_desc']='Check the boxes below to grant access to modules';
|
||||
$lang['employees_error_updating_demo_admin'] = 'You can not change the demo admin user';
|
||||
$lang['employees_error_deleting_demo_admin'] = 'You can not delete the demo admin user';
|
||||
?>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
$lang['error_no_permission_module']='You do not have permission to access the module named';
|
||||
$lang['error_unknown']='unknown';
|
||||
?>
|
||||
@@ -1,69 +0,0 @@
|
||||
<?php
|
||||
$lang['giftcards_giftcard_number']='Giftcard Number';
|
||||
$lang['giftcards_card_value']='Value';
|
||||
$lang['giftcards_basic_information']='Giftcard Information';
|
||||
$lang['giftcards_number_required']='Giftcard Number is a required field';
|
||||
$lang['giftcards_value_required']='Giftcard Value is a required field';
|
||||
$lang['giftcards_number']='Giftcard Number must be a number';
|
||||
$lang['giftcards_value']='Giftcard Value must be a number';
|
||||
|
||||
$lang['giftcards_retrive_giftcard_info']='Retrive Giftcard Info';
|
||||
$lang['giftcards_description']='Description';
|
||||
$lang['giftcards_amazon']='Amazon';
|
||||
$lang['giftcards_upc_database']='UPC Database';
|
||||
$lang['giftcards_cannot_find_giftcard']='Cannot find any information about giftcard';
|
||||
$lang['giftcards_info_provided_by']='Info provided by';
|
||||
$lang['giftcards_number_information']='Giftcard Number';
|
||||
$lang['giftcards_new']='New Giftcard';
|
||||
$lang['giftcards_update']='Update Giftcard';
|
||||
$lang['giftcards_giftcard']='Giftcard';
|
||||
$lang['giftcards_edit_multiple_giftcards']='Editing Multiple Giftcards';
|
||||
$lang['giftcards_category']='Category';
|
||||
$lang['giftcards_cost_price']='Cost Price';
|
||||
$lang['giftcards_unit_price']='Unit Price';
|
||||
$lang['giftcards_tax_1']='Tax 1';
|
||||
$lang['giftcards_tax_2']='Tax 2';
|
||||
$lang['giftcards_sales_tax_1'] = 'Sales Tax';
|
||||
$lang['giftcards_sales_tax_2'] = 'Sales Tax 2';
|
||||
$lang['giftcards_tax_percent']='Tax Percent';
|
||||
$lang['giftcards_tax_percents']='Tax Percent(s)';
|
||||
$lang['giftcards_reorder_level']='Reorder Level';
|
||||
$lang['giftcards_quantity']='Quantity';
|
||||
$lang['giftcards_no_giftcards_to_display']='No Giftcards to display';
|
||||
$lang['giftcards_bulk_edit']='Bulk Edit';
|
||||
$lang['giftcards_confirm_delete']='Are you sure you want to delete the selected giftcards?';
|
||||
$lang['giftcards_none_selected']='You have not selected any giftcards to edit';
|
||||
$lang['giftcards_confirm_bulk_edit']='Are you sure you want to edit all the giftcards selected?';
|
||||
$lang['giftcards_successful_bulk_edit']='You have successfully updated the selected giftcards';
|
||||
$lang['giftcards_error_updating_multiple']='Error updating giftcards';
|
||||
$lang['giftcards_edit_fields_you_want_to_update']='Edit the fields you want to edit for ALL selected giftcards';
|
||||
$lang['giftcards_error_adding_updating'] = 'Error adding/updating giftcard';
|
||||
$lang['giftcards_successful_adding']='You have successfully added giftcard';
|
||||
$lang['giftcards_successful_updating']='You have successfully updated giftcard';
|
||||
$lang['giftcards_successful_deleted']='You have successfully deleted';
|
||||
$lang['giftcards_one_or_multiple']='giftcard(s)';
|
||||
$lang['giftcards_cannot_be_deleted']='Could not deleted selected giftcards, one or more of the selected giftcards has sales.';
|
||||
$lang['giftcards_none'] = 'None';
|
||||
$lang['giftcards_supplier'] = 'Supplier';
|
||||
$lang['giftcards_generate_barcodes'] = 'Generate Barcodes';
|
||||
$lang['giftcards_must_select_giftcard_for_barcode'] = 'You must select at least 1 giftcard to generate barcodes';
|
||||
$lang['giftcards_excel_import_failed'] = 'Excel import failed';
|
||||
$lang['giftcards_allow_alt_desciption'] = 'Allow Alt Description';
|
||||
$lang['giftcards_is_serialized'] = 'Giftcard has Serial Number';
|
||||
$lang['giftcards_low_inventory_giftcards'] = 'Low Inventory Giftcards';
|
||||
$lang['giftcards_serialized_giftcards'] = 'Serialized Giftcards';
|
||||
$lang['giftcards_no_description_giftcards'] = 'No Description Giftcards';
|
||||
$lang['giftcards_inventory_comments']='Comments';
|
||||
$lang['giftcards_count']='Update Inventory';
|
||||
$lang['giftcards_details_count']='Inventory Count Details';
|
||||
$lang['giftcards_add_minus']='Inventory to add/subtract';
|
||||
$lang['giftcards_current_quantity']='Current Quantity';
|
||||
$lang['giftcards_quantity_required']='Quantity is a required field. Please Close ( X ) to cancel';
|
||||
$lang['giftcards_do_nothing'] = 'Do Nothing';
|
||||
$lang['giftcards_change_all_to_serialized'] = 'Change All To Serialized';
|
||||
$lang['giftcards_change_all_to_unserialized'] = 'Change All To Unserialized';
|
||||
$lang['giftcards_change_all_to_allow_alt_desc'] = 'Allow Alt Desc For All';
|
||||
$lang['giftcards_change_all_to_not_allow_allow_desc'] = 'Not Allow Alt Desc For All';
|
||||
$lang['giftcards_use_inventory_menu'] = 'Use Inv. Menu';
|
||||
$lang['giftcards_manually_editing_of_quantity'] = 'Manual Edit of Quantity';
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
$lang['item_kits_name'] = 'Item Kit Name';
|
||||
$lang['item_kits_description'] = 'Item Kit Description';
|
||||
$lang['item_kits_no_item_kits_to_display'] = 'No item kits to display';
|
||||
$lang['item_kits_update'] = 'Update Item Kit';
|
||||
$lang['item_kits_new'] = 'New Item Kit';
|
||||
$lang['item_kits_none_selected'] = "You have not selected any item kits";
|
||||
$lang['item_kits_info'] = 'Item Kit Info';
|
||||
$lang['item_kits_successful_adding'] = 'You have successfully added Item Kit';
|
||||
$lang['item_kits_successful_updating'] = 'You have successfully updated Item Kit';
|
||||
$lang['item_kits_error_adding_updating'] = 'Error adding/updating Item Kit';
|
||||
$lang['item_kits_successful_deleted'] = 'You have successfully deleted';
|
||||
$lang['item_kits_confirm_delete'] = 'Are you sure you want to delete the selected item kits?';
|
||||
$lang['item_kits_one_or_multiple'] = 'Item Kit(s)';
|
||||
$lang['item_kits_cannot_be_deleted'] = 'Could not delete item kit(s)';
|
||||
$lang['item_kits_add_item'] = 'Add Item';
|
||||
$lang['item_kits_items'] = 'Items';
|
||||
$lang['item_kits_item'] = 'Item';
|
||||
$lang['item_kits_quantity'] = 'Quantity';
|
||||
?>
|
||||
@@ -1,79 +0,0 @@
|
||||
<?php
|
||||
$lang['items_item_number']='UPC/EAN/ISBN';
|
||||
$lang['items_retrive_item_info']='Retrive Item Info';
|
||||
$lang['items_description']='Description';
|
||||
$lang['items_amazon']='Amazon';
|
||||
$lang['items_upc_database']='UPC Database';
|
||||
$lang['items_cannot_find_item']='Cannot find any information about item';
|
||||
$lang['items_info_provided_by']='Info provided by';
|
||||
$lang['items_basic_information']='Item Information';
|
||||
$lang['items_number_information']='Item Number';
|
||||
$lang['items_new']='New Item';
|
||||
$lang['items_update']='Update Item';
|
||||
$lang['items_item']='Item';
|
||||
$lang['items_edit_multiple_items']='Editing Multiple Items';
|
||||
$lang['items_name']='Item Name';
|
||||
$lang['items_category']='Category';
|
||||
$lang['items_cost_price']='Cost Price';
|
||||
$lang['items_unit_price']='Unit Price';
|
||||
$lang['items_tax_1']='Tax 1';
|
||||
$lang['items_tax_2']='Tax 2';
|
||||
$lang['items_sales_tax_1'] = 'Sales Tax';
|
||||
$lang['items_sales_tax_2'] = 'Sales Tax 2';
|
||||
$lang['items_tax_percent']='Tax Percent';
|
||||
$lang['items_tax_percents']='Tax Percent(s)';
|
||||
$lang['items_reorder_level']='Reorder Level';
|
||||
$lang['items_quantity']='Quantity';
|
||||
$lang['items_reorder_level']='Reorder Level';
|
||||
$lang['items_no_items_to_display']='No Items to display';
|
||||
$lang['items_bulk_edit']='Bulk Edit';
|
||||
$lang['items_confirm_delete']='Are you sure you want to delete the selected items?';
|
||||
$lang['items_none_selected']='You have not selected any items to edit';
|
||||
$lang['items_confirm_bulk_edit']='Are you sure you want to edit all the items selected?';
|
||||
$lang['items_successful_bulk_edit']='You have successfully updated the selected items';
|
||||
$lang['items_error_updating_multiple']='Error updating items';
|
||||
$lang['items_edit_fields_you_want_to_update']='Edit the fields you want to edit for ALL selected items';
|
||||
$lang['items_error_adding_updating'] = 'Error adding/updating item';
|
||||
$lang['items_successful_adding']='You have successfully added item';
|
||||
$lang['items_successful_updating']='You have successfully updated item';
|
||||
$lang['items_successful_deleted']='You have successfully deleted';
|
||||
$lang['items_one_or_multiple']='item(s)';
|
||||
$lang['items_cannot_be_deleted']='Could not deleted selected items, one or more of the selected items has sales.';
|
||||
$lang['items_name_required']='Item Name is a required field';
|
||||
$lang['items_category_required']='Category is a required field';
|
||||
$lang['items_buy_price_required']='Buy price is a required field';
|
||||
$lang['items_unit_price_required']='Selling Price is a required field';
|
||||
$lang['items_cost_price_required']='Cost Price is a required field';
|
||||
$lang['items_tax_percent_required']='Tax Percent is a required field';
|
||||
$lang['items_quantity_required']='Quantity is a required field';
|
||||
$lang['items_reorder_level_required']='Reorder level is a required field';
|
||||
$lang['items_unit_price_number']='Unit price must be a number';
|
||||
$lang['items_cost_price_number']='Cost price must be a number';
|
||||
$lang['items_quantity_number']='Quantity must be a number';
|
||||
$lang['items_reorder_level_number']='Reorder level must be a number';
|
||||
$lang['items_none'] = 'None';
|
||||
$lang['items_supplier'] = 'Supplier';
|
||||
$lang['items_generate_barcodes'] = 'Generate Barcodes';
|
||||
$lang['items_must_select_item_for_barcode'] = 'You must select at least 1 item to generate barcodes';
|
||||
$lang['items_excel_import_failed'] = 'Excel import failed';
|
||||
$lang['items_allow_alt_desciption'] = 'Allow Alt Description';
|
||||
$lang['items_is_serialized'] = 'Item has Serial Number';
|
||||
$lang['items_low_inventory_items'] = 'Low Inventory Items';
|
||||
$lang['items_serialized_items'] = 'Serialized Items';
|
||||
$lang['items_no_description_items'] = 'No Description Items';
|
||||
$lang['items_inventory_comments']='Comments';
|
||||
$lang['items_count']='Update Inventory';
|
||||
$lang['items_details_count']='Inventory Count Details';
|
||||
$lang['items_add_minus']='Inventory to add/subtract';
|
||||
$lang['items_current_quantity']='Current Quantity';
|
||||
$lang['items_quantity_required']='Quantity is a required field. Please Close ( X ) to cancel';
|
||||
$lang['items_do_nothing'] = 'Do Nothing';
|
||||
$lang['items_change_all_to_serialized'] = 'Change All To Serialized';
|
||||
$lang['items_change_all_to_unserialized'] = 'Change All To Unserialized';
|
||||
$lang['items_change_all_to_allow_alt_desc'] = ' Allow Alt Desc For All';
|
||||
$lang['items_change_all_to_not_allow_allow_desc'] = 'Not Allow Alt Desc For All';
|
||||
$lang['items_use_inventory_menu'] = 'Use Inv. Menu';
|
||||
$lang['items_manually_editing_of_quantity'] = 'Manual Edit of Quantity';
|
||||
$lang['items_inventory'] = 'Inventory';
|
||||
$lang['items_location'] = 'Location';
|
||||
?>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
$lang['login_login']='Login';
|
||||
$lang['login_username']='Username';
|
||||
$lang['login_password']='Password';
|
||||
$lang['login_go']='Go';
|
||||
$lang['login_invalid_username_and_password']='Invalid username/password';
|
||||
$lang['login_welcome_message']='Welcome to the Open Source Point of Sale System. To continue, please login using your username and password below.';
|
||||
?>
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
$lang['module_home']='Home';
|
||||
|
||||
$lang['module_customers']='Customers';
|
||||
$lang['module_customers_desc']='Add, Update, Delete, and Search customers';
|
||||
|
||||
$lang['module_suppliers']='Suppliers';
|
||||
$lang['module_suppliers_desc']='Add, Update, Delete, and Search suppliers';
|
||||
|
||||
$lang['module_employees']='Employees';
|
||||
$lang['module_employees_desc']='Add, Update, Delete, and Search employees';
|
||||
|
||||
$lang['module_sales']='Sales';
|
||||
$lang['module_sales_desc']='Process sales and returns';
|
||||
|
||||
$lang['module_reports']='Reports';
|
||||
$lang['module_reports_desc']='View and generate reports';
|
||||
|
||||
$lang['module_items']='Items';
|
||||
$lang['module_items_desc']='Add, Update, Delete, and Search items';
|
||||
|
||||
$lang['module_config']='Store Config';
|
||||
$lang['module_config_desc']='Change the store\'s configuration';
|
||||
|
||||
$lang['module_receivings']='Receivings';
|
||||
$lang['module_receivings_desc']='Process Purchase orders';
|
||||
|
||||
$lang['module_giftcards']='Gift Cards';
|
||||
$lang['module_giftcards_desc']='Add, Update, Delete and Search gift cards';
|
||||
|
||||
$lang['module_item_kits']='Item Kits';
|
||||
$lang['module_item_kits_desc']='Add, Update, Delete and Search Item Kits';
|
||||
|
||||
?>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
$lang['recvs_register']='Items Receiving';
|
||||
$lang['recvs_mode']='Receiving Mode';
|
||||
$lang['recvs_receiving']='Receive';
|
||||
$lang['recvs_return']='Return';
|
||||
$lang['recvs_total']='Total';
|
||||
$lang['recvs_cost']='Cost';
|
||||
$lang['recvs_quantity']='Qty.';
|
||||
$lang['recvs_discount']='Disc %';
|
||||
$lang['recvs_edit']='Edit';
|
||||
$lang['recvs_new_supplier'] = 'New Supplier';
|
||||
$lang['recvs_supplier'] = 'Supplier';
|
||||
$lang['recvs_select_supplier']='Select Supplier (Optional)';
|
||||
$lang['recvs_start_typing_supplier_name']='Start Typing supplier\'s name...';
|
||||
$lang['recvs_unable_to_add_item']='Unable to add item to receiving';
|
||||
$lang['recvs_error_editing_item']='Error editing item';
|
||||
$lang['recvs_receipt']='Receivings Receipt';
|
||||
$lang['recvs_complete_receiving']='Finish';
|
||||
$lang['recvs_confirm_finish_receiving'] = 'Are you sure you want to submit this receiving? This cannot be undone.';
|
||||
$lang['recvs_confirm_cancel_receiving'] = 'Are you sure you want to clear this receiving? All items will cleared.';
|
||||
$lang['recvs_find_or_scan_item']='Find/Scan Item';
|
||||
$lang['recvs_find_or_scan_item_or_receipt']='Find/Scan Item OR Receipt';
|
||||
$lang['recvs_id']='Receiving ID';
|
||||
$lang['recvs_item_name'] = 'Item Name';
|
||||
$lang['receivings_transaction_failed'] = 'Receivings Transactions Failed';
|
||||
?>
|
||||
@@ -1,87 +0,0 @@
|
||||
<?php
|
||||
$lang['reports_reports'] = 'Reports';
|
||||
$lang['reports_report'] = 'Report';
|
||||
$lang['reports_welcome_message'] = 'Welcome to the reports panel. Please select a report to view.';
|
||||
$lang['reports_sales_summary_report'] = 'Sales Summary Report';
|
||||
$lang['reports_categories_summary_report'] = 'Categories Summary Report';
|
||||
$lang['reports_customers_summary_report'] = 'Customers Summary Report';
|
||||
$lang['reports_suppliers_summary_report'] = 'Suppliers Summary Report';
|
||||
$lang['reports_items_summary_report'] = 'Items Summary Report';
|
||||
$lang['reports_employees_summary_report'] = 'Employees Summary Report';
|
||||
$lang['reports_taxes_summary_report'] = 'Taxes Summary Report';
|
||||
$lang['reports_date'] = 'Date';
|
||||
$lang['reports_name'] = 'Name';
|
||||
$lang['reports_quantity_purchased'] = 'Quantity Purchased';
|
||||
$lang['reports_sale_id'] = 'Sale ID';
|
||||
$lang['reports_items_purchased'] = 'Items Purchased';
|
||||
$lang['reports_sold_by'] = 'Sold By';
|
||||
$lang['reports_sold_to'] = 'Sold To';
|
||||
$lang['reports_category'] = 'Category';
|
||||
$lang['reports_customer'] = 'Customer';
|
||||
$lang['reports_employee'] = 'Employee';
|
||||
$lang['reports_item'] = 'Item';
|
||||
$lang['reports_items'] = 'Items';
|
||||
$lang['reports_supplier'] = 'Supplier';
|
||||
$lang['reports_employees'] = 'Employees';
|
||||
$lang['reports_subtotal'] = 'Subtotal';
|
||||
$lang['reports_total'] = 'Total';
|
||||
$lang['reports_tax'] = 'Tax';
|
||||
$lang['reports_profit'] = 'Profit';
|
||||
$lang['reports_report_input'] = 'Report Input';
|
||||
$lang['reports_type'] = 'Type';
|
||||
$lang['reports_date_range'] = 'Date Range';
|
||||
$lang['reports_today'] = 'Today';
|
||||
$lang['reports_yesterday'] = 'Yesterday';
|
||||
$lang['reports_last_7'] = 'Last 7 Days';
|
||||
$lang['reports_this_month'] = 'This Month';
|
||||
$lang['reports_last_month'] = 'Last Month';
|
||||
$lang['reports_this_year'] = 'This Year';
|
||||
$lang['reports_last_year'] = 'Last Year';
|
||||
$lang['reports_all_time'] = 'All Time';
|
||||
$lang['reports_detailed_sales_report'] = 'Detailed Sales Report';
|
||||
$lang['reports_comments'] = 'Comments';
|
||||
$lang['reports_discount'] = 'Discount';
|
||||
$lang['reports_payment_type'] = 'Payment Type';
|
||||
$lang['reports_sales'] = 'Sales';
|
||||
$lang['reports_categories'] = 'Categories';
|
||||
$lang['reports_customers'] = 'Customers';
|
||||
$lang['reports_suppliers'] = 'Suppliers';
|
||||
$lang['reports_items'] = 'Items';
|
||||
$lang['reports_employees'] = 'Employees';
|
||||
$lang['reports_taxes'] = 'Taxes';
|
||||
$lang['reports_customer'] = 'Customer';
|
||||
$lang['reports_employee'] = 'Employee';
|
||||
$lang['reports_tax_percent'] = 'Tax Percent';
|
||||
$lang['reports_quantity_purchased'] = 'Quantity Purchased';
|
||||
$lang['reports_serial_number'] = 'Serial #';
|
||||
$lang['reports_description'] = 'Description';
|
||||
$lang['reports_date'] = 'Date';
|
||||
$lang['reports_sales_amount'] = 'Sales amount';
|
||||
$lang['reports_revenue'] = 'Revenue';
|
||||
$lang['reports_discounts'] = 'Discounts';
|
||||
$lang['reports_discounts_summary_report'] = 'Discounts Summary Report';
|
||||
$lang['reports_discount_percent'] = 'Discount Percent';
|
||||
$lang['reports_count'] = 'Count';
|
||||
$lang['reports_summary_reports'] = 'Summary Reports';
|
||||
$lang['reports_graphical_reports'] = 'Graphical Reports';
|
||||
$lang['reports_detailed_reports'] = 'Detailed Reports';
|
||||
$lang['reports_inventory_reports'] = 'Inventory Reports';
|
||||
$lang['reports_low_inventory'] = 'Low Inventory';
|
||||
$lang['reports_inventory_summary'] = ' Inventory Summary';
|
||||
$lang['reports_item_number'] = 'Item Number';
|
||||
$lang['reports_reorder_level'] = 'Reorder Level';
|
||||
$lang['reports_low_inventory_report'] = 'Low Inventory Report';
|
||||
$lang['reports_item_name'] = 'Item Name';
|
||||
$lang['reports_inventory_summary_report'] = 'Inventory Summary Report';
|
||||
$lang['reports_payment_type'] = 'Payment Type';
|
||||
$lang['reports_payments_summary_report'] = 'Payments Summary Report';
|
||||
$lang['reports_payments'] = 'Payments';
|
||||
$lang['reports_receivings'] = 'Receivings';
|
||||
$lang['reports_received_by'] = 'Received By';
|
||||
$lang['reports_supplied_by'] = 'Supplied by';
|
||||
$lang['reports_items_received'] = 'Items Received';
|
||||
$lang['reports_detailed_receivings_report'] = 'Detailed Receivings Report';
|
||||
$lang['reports_sale_type'] = 'Sale Type';
|
||||
$lang['reports_all'] = 'All';
|
||||
$lang['reports_returns'] = 'Returns';
|
||||
?>
|
||||
@@ -1,79 +0,0 @@
|
||||
<?php
|
||||
$lang['sales_giftcard_number']='Gift Card Number';
|
||||
$lang['sales_giftcard']='Gift Card';
|
||||
$lang['sales_register']='Sales Register';
|
||||
$lang['sales_mode']='Register Mode';
|
||||
$lang['sales_new_item'] = 'New Item';
|
||||
$lang['sales_item_name'] = 'Item Name';
|
||||
$lang['sales_item_number'] = 'Item #';
|
||||
$lang['sales_new_customer'] = 'New Customer';
|
||||
$lang['sales_customer'] = 'Customer';
|
||||
$lang['sales_no_items_in_cart']='There are no items in the cart';
|
||||
$lang['sales_total']='Total';
|
||||
$lang['sales_tax_percent']='Tax %';
|
||||
$lang['sales_price']='Price';
|
||||
$lang['sales_quantity']='Qty.';
|
||||
$lang['sales_discount']='Disc %';
|
||||
$lang['sales_edit']='Edit';
|
||||
$lang['sales_payment']='Payment Type';
|
||||
$lang['sales_edit_item']='Edit Item';
|
||||
$lang['sales_find_or_scan_item']='Find/Scan Item';
|
||||
$lang['sales_find_or_scan_item_or_receipt']='Find/Scan Item OR Receipt';
|
||||
$lang['sales_select_customer']='Select Customer (Optional)';
|
||||
$lang['sales_start_typing_item_name']='Start Typing item\'s name or scan barcode...';
|
||||
$lang['sales_start_typing_customer_name']='Start Typing customer\'s name...';
|
||||
$lang['sales_sub_total']='Sub Total';
|
||||
$lang['sales_tax']='Tax';
|
||||
$lang['sales_comment']='Comment';
|
||||
$lang['sales_unable_to_add_item']='Unable to add item to sale';
|
||||
$lang['sales_sale_for_customer']='Customer:';
|
||||
$lang['sales_remove_customer']='Remove Customer';
|
||||
$lang['sales_error_editing_item']='Error editing item';
|
||||
$lang['sales_complete_sale']='Complete Sale';
|
||||
$lang['sales_cancel_sale']='Cancel Sale';
|
||||
$lang['sales_add_payment']='Add Payment';
|
||||
$lang['sales_receipt']='Sales Receipt';
|
||||
$lang['sales_id']='Sale ID';
|
||||
$lang['sales_sale']='Sale';
|
||||
$lang['sales_return']='Return';
|
||||
$lang['sales_confirm_finish_sale'] = 'Are you sure you want to submit this sale? This cannot be undone.';
|
||||
$lang['sales_confirm_cancel_sale'] = 'Are you sure you want to clear this sale? All items will cleared.';
|
||||
$lang['sales_cash'] = 'Cash';
|
||||
$lang['sales_check'] = 'Check';
|
||||
$lang['sales_debit'] = 'Debit Card';
|
||||
$lang['sales_credit'] = 'Credit Card';
|
||||
$lang['sales_giftcard'] = 'Gift Card';
|
||||
$lang['sales_amount_tendered'] = 'Amount Tendered';
|
||||
$lang['sales_change_due'] = 'Change Due';
|
||||
$lang['sales_payment_not_cover_total'] = 'Payment Amount does not cover Total';
|
||||
$lang['sales_transaction_failed'] = 'Sales Transaction Failed';
|
||||
$lang['sales_must_enter_numeric'] = 'Must enter numeric value for amount tendered';
|
||||
$lang['sales_must_enter_numeric_giftcard'] = 'Must enter numeric value for giftcard number';
|
||||
$lang['sales_serial'] = 'Serial';
|
||||
$lang['sales_description_abbrv'] = 'Desc';
|
||||
$lang['sales_item_out_of_stock'] = 'Item is Out of Stock';
|
||||
$lang['sales_item_insufficient_of_stock'] = 'Item is Insufficient of Stock';
|
||||
$lang['sales_quantity_less_than_zero'] = 'Warning, Desired Quantity is Insufficient. You can still process the sale, but check your inventory';
|
||||
$lang['sales_successfully_updated'] = 'Sale successfully updated';
|
||||
$lang['sales_unsuccessfully_updated'] = 'Sale unsuccessfully updated';
|
||||
$lang['sales_edit_sale'] = 'Edit Sale';
|
||||
$lang['sales_employee'] = 'Employee';
|
||||
$lang['sales_successfully_deleted'] = 'Sale successfully deleted';
|
||||
$lang['sales_unsuccessfully_deleted'] = 'Sale unsuccessfully deleted';
|
||||
$lang['sales_delete_entire_sale'] = 'Delete entire sale';
|
||||
$lang['sales_delete_confirmation'] = 'Are you sure you want to delete this sale, this action cannot be undone';
|
||||
$lang['sales_date'] = 'Sale Date';
|
||||
$lang['sales_delete_successful'] = 'You have successfully deleted a sale';
|
||||
$lang['sales_delete_unsuccessful'] = 'You have unsuccessfully deleted a sale';
|
||||
$lang['sales_suspend_sale'] = 'Suspend Sale';
|
||||
$lang['sales_confirm_suspend_sale'] = 'Are you sure you want to suspend this sale?';
|
||||
$lang['sales_suspended_sales'] = 'Suspended Sales';
|
||||
$lang['sales_suspended_sale_id'] = 'Suspended Sale ID';
|
||||
$lang['sales_date'] = 'Date';
|
||||
$lang['sales_customer'] = 'Customer';
|
||||
$lang['sales_comments'] = 'Comments';
|
||||
$lang['sales_unsuspend_and_delete'] = 'Unsuspend and Delete';
|
||||
$lang['sales_unsuspend'] = 'Unsuspend';
|
||||
$lang['sales_successfully_suspended_sale'] = 'Your sale has been successfully suspended';
|
||||
$lang['sales_email_receipt'] = 'E-Mail Receipt';
|
||||
?>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
$lang['suppliers_new']='New Supplier';
|
||||
$lang['suppliers_supplier']='Supplier';
|
||||
$lang['suppliers_update']='Update Supplier';
|
||||
$lang['suppliers_confirm_delete']='Are you sure you want to delete the selected suppliers?';
|
||||
$lang['suppliers_none_selected']='You have not selected any suppliers to delete';
|
||||
$lang['suppliers_error_adding_updating'] = 'Error adding/updating supplier';
|
||||
$lang['suppliers_successful_adding']='You have successfully added supplier';
|
||||
$lang['suppliers_successful_updating']='You have successfully updated supplier';
|
||||
$lang['suppliers_successful_deleted']='You have successfully deleted';
|
||||
$lang['suppliers_one_or_multiple']='supplier(s)';
|
||||
$lang['suppliers_cannot_be_deleted']='Could not deleted selected suppliers, one or more of the selected suppliers has sales.';
|
||||
$lang['suppliers_basic_information']='Supplier Information';
|
||||
$lang['suppliers_account_number']='Account #';
|
||||
$lang['suppliers_company_name']='Company Name';
|
||||
$lang['suppliers_company_name_required'] = 'Company Name is a required field';
|
||||
?>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
$lang['common_common']='biasa';
|
||||
$lang['common_submit']='Kirim';
|
||||
$lang['common_or']='ATAU';
|
||||
$lang['common_powered_by']='Disponsori oleh';
|
||||
$lang['common_welcome']='Selamat Datang';
|
||||
$lang['common_logout']='Logout';
|
||||
$lang['common_list_of']='Daftar';
|
||||
$lang['common_first_name']='Nama Pertama';
|
||||
$lang['common_last_name']='Nama Belakang';
|
||||
$lang['common_email']='E-Mail';
|
||||
$lang['common_phone_number']='Telepon';
|
||||
$lang['common_address_1']='Alamat 1';
|
||||
$lang['common_address_2']='Alamat 2';
|
||||
$lang['common_city']='Kota';
|
||||
$lang['common_state']='Provinsi';
|
||||
$lang['common_state']='Provinsi';
|
||||
$lang['common_zip']='KODEPOS';
|
||||
$lang['common_country']='Negara';
|
||||
$lang['common_comments']='Catatan';
|
||||
$lang['common_edit']='ubah';
|
||||
$lang['common_search']='Cari';
|
||||
$lang['common_delete']='Hapus';
|
||||
$lang['common_view_recent_sales']='Lihat Penjualan Terkini';
|
||||
$lang['common_you_are_using_ospos']='Anda menggunakan Open Source Point Of Sale Versi';
|
||||
$lang['common_please_visit_my']='SIlakan kunjungi';
|
||||
$lang['common_website']='situs';
|
||||
$lang['common_fields_required_message']='bagian yang ditandai merah wajib diisi';
|
||||
$lang['common_learn_about_project']='untuk belajar informasi terbaru tentang proyek ini';
|
||||
$lang['common_searched_for']='Mencari untuk';
|
||||
$lang['common_first_name_required']='Nama pertama wajib diisi.';
|
||||
$lang['common_last_name_required']='Nama belakang wajib diisi.';
|
||||
$lang['common_email_invalid_format']='Format alamat e-mail tidak benar';
|
||||
$lang['common_confirm_search']='Anda telah memilih satu atau lebih baris, ini tidak akan lagi dipilih setelah pencarian Anda. Apakah Anda yakin ingin mengirimkan pencarian ini?';
|
||||
$lang['common_no_persons_to_display']='Tidak ada orang untuk ditampilkan';
|
||||
$lang['common_return_policy']='Kebijakan Retur';
|
||||
$lang['common_price']='Harga';
|
||||
$lang['common_welcome_message']= 'Selamat Datang di Open Source Point Of Sale, klik modul di bawah ini untuk memulai!';
|
||||
$lang['common_inv']='inv';
|
||||
$lang['common_det']='details';
|
||||
?>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
$lang['config_info']='Informasi Konfigurasi Toko';
|
||||
$lang['config_company']='Nama Perusahaan';
|
||||
$lang['config_address']='Alamat Perusahaan';
|
||||
$lang['config_phone']='Telepon Perusahaan';
|
||||
$lang['config_website']='Situs Perusahaan';
|
||||
$lang['config_fax']='Fax';
|
||||
$lang['config_default_tax_rate']='Tarif Pajak Biasa%';
|
||||
$lang['config_default_tax_rate_1']='Tarif Pajak 1';
|
||||
$lang['config_default_tax_rate_2']='Tarif Pajak 2';
|
||||
$lang['config_company_required']='Nama Perusahaan wajib diisi';
|
||||
$lang['config_address_required']='Alamat Perusahaan wajib diisi';
|
||||
$lang['config_phone_required']='Telepon Perusahaan wajib diisi';
|
||||
$lang['config_default_tax_rate_required']='Tarif Pajak Biasa wajib diisi';
|
||||
$lang['config_default_tax_rate_number']='Tarif Pajak Biasa harus angka';
|
||||
$lang['config_company_website_url']='Situs Perusahaan bukan URL yang benar(http://...)';
|
||||
$lang['config_saved_successfully']='Konfigurasi berhasil disimpan';
|
||||
$lang['config_saved_unsuccessfully']='Konfigurasi tidak berhasil disimpan';
|
||||
$lang['config_return_policy_required']='Kebiajak retur wajib diisi';
|
||||
$lang['config_print_after_sale']='Cetak bon setelah penjualan';
|
||||
$lang['config_language'] = 'Language';
|
||||
$lang['config_timezone'] = 'Timezone';
|
||||
$lang['config_currency_symbol'] = 'Currency Symbol';
|
||||
?>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
$lang['customers_new']='Pelanggan Baru';
|
||||
$lang['customers_customer']='Pelanggan';
|
||||
$lang['customers_update']='Ubah Pelanggan';
|
||||
$lang['customers_confirm_delete']='Apakah Anda yakin ingin menghapus pelanggan yang dipilih?';
|
||||
$lang['customers_none_selected']='Anda belum memilih pelanggan untuk dihapus';
|
||||
$lang['customers_error_adding_updating'] = 'Error menambah / memperbarui pelanggan';
|
||||
$lang['customers_successful_adding']='Anda telah berhasil menambah pelanggan';
|
||||
$lang['customers_successful_updating']='Anda telah berhasil memperbarui pelanggan';
|
||||
$lang['customers_successful_deleted']='Anda telah berhasil menghapus';
|
||||
$lang['customers_one_or_multiple']='pelanggan';
|
||||
$lang['customers_cannot_be_deleted']='pelanggan terpilih tidak bisa dihapus; satu atau lebih dari pelanggan yang dipilih memiliki penjualan.';
|
||||
$lang['customers_basic_information']='Informasi Pelanggan';
|
||||
$lang['customers_account_number']='Nomor Akun';
|
||||
$lang['customers_taxable']='Dapat dikenakan pajak';
|
||||
?>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
$lang['employees_employee']='Karyawan';
|
||||
$lang['employees_new']='Karyawan Baru';
|
||||
$lang['employees_update']='Ubah Karyawan';
|
||||
$lang['employees_confirm_delete']='Apakah Anda yakin ingin menghapus karyawan yang dipilih?';
|
||||
$lang['employees_none_selected']='Anda belum memilih karyawan untuk menghapus';
|
||||
$lang['employees_error_adding_updating'] = 'Error menambah / memperbarui karyawan';
|
||||
$lang['employees_successful_adding']='Anda telah berhasil menambahkan karyawan';
|
||||
$lang['employees_successful_updating']='Anda telah berhasil memperbarui karyawan';
|
||||
$lang['employees_successful_deleted']='Anda telah berhasil menghapus';
|
||||
$lang['employees_one_or_multiple']='karyawan';
|
||||
$lang['employees_cannot_be_deleted']='karyawan terpilih tidak bisa dihapus; satu atau lebih dari para pekerja telah memproses penjualan atau Anda mencoba untuk menghapus diri Anda sendiri:)';
|
||||
$lang['employees_username']='Username';
|
||||
$lang['employees_password']='Password';
|
||||
$lang['employees_repeat_password']='Password Lagi';
|
||||
$lang['employees_username_required']='Username wajib diisi';
|
||||
$lang['employees_username_minlength']='Username minimal 5 huruf';
|
||||
$lang['employees_password_required']='Password wajib diisi';
|
||||
$lang['employees_password_minlength']='Passwords minimal 8 huruf/angka';
|
||||
$lang['employees_password_must_match']='Passwords tidak cocok';
|
||||
$lang['employees_basic_information']='Informasi Karyawan';
|
||||
$lang['employees_login_info']='Info Login Karyawan';
|
||||
$lang['employees_permission_info']='Hak Akses Karyawan';
|
||||
$lang['employees_permission_desc']='Tandai kotak di bawah ini untuk memberikan akses ke modul';
|
||||
$lang['employees_error_updating_demo_admin'] = 'You can not change the demo admin user';
|
||||
$lang['employees_error_deleting_demo_admin'] = 'You can not delete the demo admin user';
|
||||
?>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
$lang['error_no_permission_module']='Anda tidak memiliki izin untuk mengakses modul ini';
|
||||
$lang['error_unknown']='tidak dikenal';
|
||||
?>
|
||||
@@ -1,71 +0,0 @@
|
||||
<?php
|
||||
$lang['giftcards_giftcard_number']='Giftcard Number';
|
||||
$lang['giftcards_card_value']='Value';
|
||||
$lang['giftcards_basic_information']='Giftcard Information';
|
||||
$lang['giftcards_number_required']='Giftcard Number is a required field';
|
||||
$lang['giftcards_value_required']='Giftcard Value is a required field';
|
||||
$lang['giftcards_number']='Giftcard Number must be a number';
|
||||
$lang['giftcards_value']='Giftcard Value must be a number';
|
||||
|
||||
|
||||
$lang['giftcards_retrive_giftcard_info']='Retrive Giftcard Info';
|
||||
$lang['giftcards_description']='Description';
|
||||
$lang['giftcards_amazon']='Amazon';
|
||||
$lang['giftcards_upc_database']='UPC Database';
|
||||
$lang['giftcards_cannot_find_giftcard']='Cannot find any information about giftcard';
|
||||
$lang['giftcards_info_provided_by']='Info provided by';
|
||||
$lang['giftcards_number_information']='Giftcard Number';
|
||||
$lang['giftcards_new']='New Giftcard';
|
||||
$lang['giftcards_update']='Update Giftcard';
|
||||
$lang['giftcards_giftcard']='Giftcard';
|
||||
$lang['giftcards_edit_multiple_giftcards']='Editing Multiple Giftcards';
|
||||
$lang['giftcards_category']='Category';
|
||||
$lang['giftcards_cost_price']='Cost Price';
|
||||
$lang['giftcards_unit_price']='Unit Price';
|
||||
$lang['giftcards_tax_1']='Tax 1';
|
||||
$lang['giftcards_tax_2']='Tax 2';
|
||||
$lang['giftcards_sales_tax_1'] = 'Sales Tax';
|
||||
$lang['giftcards_sales_tax_2'] = 'Sales Tax 2';
|
||||
$lang['giftcards_tax_percent']='Tax Percent';
|
||||
$lang['giftcards_tax_percents']='Tax Percent(s)';
|
||||
$lang['giftcards_reorder_level']='Reorder Level';
|
||||
$lang['giftcards_quantity']='Quantity';
|
||||
$lang['giftcards_reorder_level']='Reorder Level';
|
||||
$lang['giftcards_no_giftcards_to_display']='No Giftcards to display';
|
||||
$lang['giftcards_bulk_edit']='Bulk Edit';
|
||||
$lang['giftcards_confirm_delete']='Are you sure you want to delete the selected giftcards?';
|
||||
$lang['giftcards_none_selected']='You have not selected any giftcards to edit';
|
||||
$lang['giftcards_confirm_bulk_edit']='Are you sure you want to edit all the giftcards selected?';
|
||||
$lang['giftcards_successful_bulk_edit']='You have successfully updated the selected giftcards';
|
||||
$lang['giftcards_error_updating_multiple']='Error updating giftcards';
|
||||
$lang['giftcards_edit_fields_you_want_to_update']='Edit the fields you want to edit for ALL selected giftcards';
|
||||
$lang['giftcards_error_adding_updating'] = 'Error adding/updating giftcard';
|
||||
$lang['giftcards_successful_adding']='You have successfully added giftcard';
|
||||
$lang['giftcards_successful_updating']='You have successfully updated giftcard';
|
||||
$lang['giftcards_successful_deleted']='You have successfully deleted';
|
||||
$lang['giftcards_one_or_multiple']='giftcard(s)';
|
||||
$lang['giftcards_cannot_be_deleted']='Could not deleted selected giftcards, one or more of the selected giftcards has sales.';
|
||||
$lang['giftcards_none'] = 'None';
|
||||
$lang['giftcards_supplier'] = 'Supplier';
|
||||
$lang['giftcards_generate_barcodes'] = 'Generate Barcodes';
|
||||
$lang['giftcards_must_select_giftcard_for_barcode'] = 'You must select at least 1 giftcard to generate barcodes';
|
||||
$lang['giftcards_excel_import_failed'] = 'Excel import failed';
|
||||
$lang['giftcards_allow_alt_desciption'] = 'Allow Alt Description';
|
||||
$lang['giftcards_is_serialized'] = 'Giftcard has Serial Number';
|
||||
$lang['giftcards_low_inventory_giftcards'] = 'Low Inventory Giftcards';
|
||||
$lang['giftcards_serialized_giftcards'] = 'Serialized Giftcards';
|
||||
$lang['giftcards_no_description_giftcards'] = 'No Description Giftcards';
|
||||
$lang['giftcards_inventory_comments']='Comments';
|
||||
$lang['giftcards_count']='Update Inventory';
|
||||
$lang['giftcards_details_count']='Inventory Count Details';
|
||||
$lang['giftcards_add_minus']='Inventory to add/subtract';
|
||||
$lang['giftcards_current_quantity']='Current Quantity';
|
||||
$lang['giftcards_quantity_required']='Quantity is a required field. Please Close ( X ) to cancel';
|
||||
$lang['giftcards_do_nothing'] = 'Do Nothing';
|
||||
$lang['giftcards_change_all_to_serialized'] = 'Change All To Serialized';
|
||||
$lang['giftcards_change_all_to_unserialized'] = 'Change All To Unserialized';
|
||||
$lang['giftcards_change_all_to_allow_alt_desc'] = ' Allow Alt Desc For All';
|
||||
$lang['giftcards_change_all_to_not_allow_allow_desc'] = 'Not Allow Alt Desc For All';
|
||||
$lang['giftcards_use_inventory_menu'] = 'Use Inv. Menu';
|
||||
$lang['giftcards_manually_editing_of_quantity'] = 'Manual Edit of Quantity';
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Dilarang</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Akses direktori dilarang.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
$lang['item_kits_name'] = 'Item Kit Name';
|
||||
$lang['item_kits_description'] = 'Item Kit Description';
|
||||
$lang['item_kits_no_item_kits_to_display'] = 'No item kits to display';
|
||||
$lang['item_kits_update'] = 'Update Item Kit';
|
||||
$lang['item_kits_new'] = 'New Item Kit';
|
||||
$lang['item_kits_none_selected'] = "You have not selected any item kits";
|
||||
$lang['item_kits_info'] = 'Item Kit Info';
|
||||
$lang['item_kits_successful_adding'] = 'You have successfully added Item Kit';
|
||||
$lang['item_kits_successful_updating'] = 'You have successfully updated Item Kit';
|
||||
$lang['item_kits_error_adding_updating'] = 'Error adding/updating Item Kit';
|
||||
$lang['item_kits_successful_deleted'] = 'You have successfully deleted';
|
||||
$lang['item_kits_confirm_delete'] = 'Are you sure you want to delete the selected item kits?';
|
||||
$lang['item_kits_one_or_multiple'] = 'Item Kit(s)';
|
||||
$lang['item_kits_cannot_be_deleted'] = 'Could not delete item kit(s)';
|
||||
$lang['item_kits_add_item'] = 'Add Item';
|
||||
$lang['item_kits_items'] = 'Items';
|
||||
$lang['item_kits_item'] = 'Item';
|
||||
$lang['item_kits_quantity'] = 'Quantity';
|
||||
?>
|
||||
@@ -1,78 +0,0 @@
|
||||
<?php
|
||||
$lang['items_item_number']='UPC/EAN/ISBN';
|
||||
$lang['items_retrive_item_info']='Dapatkan Info Produk/Item';
|
||||
$lang['items_description']='Deskripsi';
|
||||
$lang['items_amazon']='Amazon';
|
||||
$lang['items_upc_database']='Database UPC';
|
||||
$lang['items_cannot_find_item']='Tidak dapat menemukan informasi apapun tentang item';
|
||||
$lang['items_info_provided_by']='Info disediakan oleh';
|
||||
$lang['items_basic_information']='Informasi Item';
|
||||
$lang['items_number_information']='Nomor Item';
|
||||
$lang['items_new']='Item Baru';
|
||||
$lang['items_update']='Ubah Item';
|
||||
$lang['items_item']='Item';
|
||||
$lang['items_edit_multiple_items']='Ubah Beberapa Item';
|
||||
$lang['items_name']='Nama Item';
|
||||
$lang['items_category']='Kategori';
|
||||
$lang['items_cost_price']='Biaya Item';
|
||||
$lang['items_unit_price']='Harga Satuan';
|
||||
$lang['items_tax_1']='Pajak 1';
|
||||
$lang['items_tax_2']='Pajak 2';
|
||||
$lang['items_sales_tax_1'] = 'Pajak Penjualan';
|
||||
$lang['items_sales_tax_2'] = 'Pajak Penjualan2';
|
||||
$lang['items_tax_percent']='Tarif Pajak';
|
||||
$lang['items_tax_percents']='Tarif Pajak';
|
||||
$lang['items_reorder_level']='Batas pesan ulang';
|
||||
$lang['items_quantity']='Jumlah';
|
||||
$lang['items_reorder_level']='Batas pesan ulang';
|
||||
$lang['items_no_items_to_display']='Tidak ada item untuk ditampilkan';
|
||||
$lang['items_bulk_edit']='Ubah Massal';
|
||||
$lang['items_confirm_delete']='Apakah Anda yakin ingin menghapus item yang dipilih?';
|
||||
$lang['items_none_selected']='Anda belum memilih item untuk diubah';
|
||||
$lang['items_confirm_bulk_edit']='Apakah Anda yakin ingin mengubah semua item yang dipilih?';
|
||||
$lang['items_successful_bulk_edit']='Anda telah berhasil memperbarui item yang dipilih';
|
||||
$lang['items_error_updating_multiple']='Error ketika memperbaharui item';
|
||||
$lang['items_edit_fields_you_want_to_update']='Ubah bagian yang ingin Anda edit untuk SEMUA item yang dipilih';
|
||||
$lang['items_error_adding_updating'] = 'Error ketika menambahkan/memperbaharui item';
|
||||
$lang['items_successful_adding']='Anda telah berhasil menambahkan item';
|
||||
$lang['items_successful_updating']='Anda telah berhasil memperbarui item';
|
||||
$lang['items_successful_deleted']='Anda telah berhasil menghapus';
|
||||
$lang['items_one_or_multiple']='item';
|
||||
$lang['items_cannot_be_deleted']='Tidak dapat menghapus item terpilih, satu atau lebih item yang dipilih memiliki penjualan.';
|
||||
$lang['items_name_required']='Nama item wajib diisi';
|
||||
$lang['items_category_required']='Kategori wajib diisi';
|
||||
$lang['items_buy_price_required']='Harga Beli wajib diisi';
|
||||
$lang['items_unit_price_required']='Harga Jual wajib diisi';
|
||||
$lang['items_cost_price_required']='Biaya Item wajib diisi';
|
||||
$lang['items_tax_percent_required']='Tarif Pajak wajib diisi';
|
||||
$lang['items_quantity_required']='Jumlah wajib diisi';
|
||||
$lang['items_reorder_level_required']='Batas pesan ulang wajib diisi';
|
||||
$lang['items_unit_price_number']='Harga satuan harus angka';
|
||||
$lang['items_cost_price_number']='Biaya Item harus angka';
|
||||
$lang['items_quantity_number']='Jumlah harus angka';
|
||||
$lang['items_reorder_level_number']='Batas pesan ulang harus angka';
|
||||
$lang['items_none'] = 'Kosong';
|
||||
$lang['items_supplier'] = 'Pemasok';
|
||||
$lang['items_generate_barcodes'] = 'Hasilkan Barcode';
|
||||
$lang['items_must_select_item_for_barcode'] = 'Anda harus memilih setidaknya 1 item untuk menghasilkan barcode';
|
||||
$lang['items_excel_import_failed'] = 'Excel import failed';
|
||||
$lang['items_allow_alt_desciption'] = 'Allow Alternate Description';
|
||||
$lang['items_is_serialized'] = 'Item has Serial Number';
|
||||
$lang['items_low_inventory_items'] = 'Low Inventory Items';
|
||||
$lang['items_serialized_items'] = 'Serialized Items';
|
||||
$lang['items_no_description_items'] = 'No Description Items';
|
||||
$lang['items_inventory_comments']='Comments';
|
||||
$lang['items_count']='Update Inventory';
|
||||
$lang['items_details_count']='Inventory Count Details';
|
||||
$lang['items_add_minus']='Inventory to add/subtract';
|
||||
$lang['items_current_quantity']='Current Quantity';
|
||||
$lang['items_do_nothing'] = 'Do Nothing';
|
||||
$lang['items_change_all_to_serialized'] = 'Change All To Serialized';
|
||||
$lang['items_change_all_to_unserialized'] = 'Change All To Unserialized';
|
||||
$lang['items_change_all_to_allow_alt_desc'] = ' Allow Alt Desc For All';
|
||||
$lang['items_change_all_to_not_allow_allow_desc'] = 'Not Allow Alt Desc For All';
|
||||
$lang['items_use_inventory_menu'] = 'Use Inv. Menu';
|
||||
$lang['items_manually_editing_of_quantity'] = 'Manual Edit of Quantity';
|
||||
$lang['items_inventory'] = 'Inventory';
|
||||
$lang['items_location'] = 'Location';
|
||||
?>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
$lang['login_login']='Masuk';
|
||||
$lang['login_username']='Nama pengguna';
|
||||
$lang['login_password']='Kata kunci';
|
||||
$lang['login_go']='Lanjutkan';
|
||||
$lang['login_invalid_username_and_password']='nama pengguna/kata kunci salah';
|
||||
$lang['login_welcome_message']='Selamat datang di Open Source Point of Sale System. Untuk melanjutkan, silakan login menggunakan form nama pengguna dan kata kunci di bawah ini.';
|
||||
?>
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
$lang['module_home']='Beranda';
|
||||
|
||||
$lang['module_customers']='Pelanggan';
|
||||
$lang['module_customers_desc']='Tambah, Update, Hapus, dan Cari pelanggan ';
|
||||
|
||||
$lang['module_suppliers']='Pemasok';
|
||||
$lang['module_suppliers_desc']='Tambah, Update, Hapus, dan Cari pemasok';
|
||||
|
||||
$lang['module_employees']='Karyawan';
|
||||
$lang['module_employees_desc']='Tambah, Update, Hapus, dan Cari karyawan';
|
||||
|
||||
$lang['module_sales']='Penjualan';
|
||||
$lang['module_sales_desc']='Proses penjualan dan retur';
|
||||
|
||||
$lang['module_reports']='Laporan';
|
||||
$lang['module_reports_desc']='Lihat dan Hasilkan laporan';
|
||||
|
||||
$lang['module_items']='Produk/Item';
|
||||
$lang['module_items_desc']='Tambah, Update, Hapus, dan Cari produk/items';
|
||||
|
||||
$lang['module_config']='Konfigurasi Toko';
|
||||
$lang['module_config_desc']='Ubah konfigurasi toko';
|
||||
|
||||
$lang['module_receivings']='Receivings';
|
||||
$lang['module_receivings_desc']='Process Purchase orders';
|
||||
|
||||
$lang['module_giftcards']='Gift Cards';
|
||||
$lang['module_giftcards_desc']='Add, Update, Delete and Search gift cards';
|
||||
|
||||
$lang['module_item_kits']='Item Kits';
|
||||
$lang['module_item_kits_desc']='Add, Update, Delete and Search Item Kits';
|
||||
?>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
$lang['recvs_register']='Items Receiving';
|
||||
$lang['recvs_mode']='Receiving Mode';
|
||||
$lang['recvs_receiving']='Receive';
|
||||
$lang['recvs_return']='Return';
|
||||
$lang['recvs_total']='Total';
|
||||
$lang['recvs_cost']='Cost';
|
||||
$lang['recvs_quantity']='Qty.';
|
||||
$lang['recvs_discount']='Disc %';
|
||||
$lang['recvs_edit']='Edit';
|
||||
$lang['recvs_new_supplier'] = 'New Supplier';
|
||||
$lang['recvs_supplier'] = 'Supplier';
|
||||
$lang['recvs_select_supplier']='Select Supplier (Optional)';
|
||||
$lang['recvs_start_typing_supplier_name']='Start Typing supplier\'s name...';
|
||||
$lang['recvs_unable_to_add_item']='Unable to add item to receiving';
|
||||
$lang['recvs_error_editing_item']='Error editing item';
|
||||
$lang['recvs_receipt']='Receivings Receipt';
|
||||
$lang['recvs_complete_receiving']='Finish';
|
||||
$lang['recvs_confirm_finish_receiving'] = 'Are you sure you want to submit this receiving? This cannot be undone.';
|
||||
$lang['recvs_confirm_cancel_receiving'] = 'Are you sure you want to clear this receiving? All items will cleared.';
|
||||
$lang['recvs_find_or_scan_item']='Find/Scan Item';
|
||||
$lang['recvs_find_or_scan_item_or_receipt']='Find/Scan Item OR Receipt';
|
||||
$lang['recvs_id']='Receiving ID';
|
||||
$lang['recvs_item_name'] = 'Item Name';
|
||||
$lang['receivings_transaction_failed'] = 'Receivings Transactions Failed';
|
||||
?>
|
||||
@@ -1,85 +0,0 @@
|
||||
<?php
|
||||
$lang['reports_reports'] = 'Laporan';
|
||||
$lang['reports_report'] = 'Laporan';
|
||||
$lang['reports_welcome_message'] = 'Selamat Datang ke panel laporan. Silakan pilih laporan untuk melihat.';
|
||||
$lang['reports_sales_summary_report'] = 'Laporan Ringkasan Penjualan';
|
||||
$lang['reports_categories_summary_report'] = 'Laporan Ringkasan Kategori';
|
||||
$lang['reports_customers_summary_report'] = 'Laporan Ringkasan Pelanggan';
|
||||
$lang['reports_suppliers_summary_report'] = 'Laporan Ringkasan Pemasok';
|
||||
$lang['reports_items_summary_report'] = 'Laporan Ringkasan Produk/Item';
|
||||
$lang['reports_employees_summary_report'] = 'Laporan Ringkasan Karyawan';
|
||||
$lang['reports_taxes_summary_report'] = 'Taxes Summary Report';
|
||||
$lang['reports_date'] = 'Tanggal';
|
||||
$lang['reports_name'] = 'Nama';
|
||||
$lang['reports_quantity_purchased'] = 'Jumlah Dibeli';
|
||||
$lang['reports_serial_number'] = 'Serial #';
|
||||
$lang['reports_description'] = 'Description';
|
||||
$lang['reports_sale_id'] = 'ID Penjualan ';
|
||||
$lang['reports_items_purchased'] = 'Produk Dibeli';
|
||||
$lang['reports_sold_by'] = 'Dijual Oleh';
|
||||
$lang['reports_sold_to'] = 'Dijual Kepada';
|
||||
$lang['reports_category'] = 'Kategori';
|
||||
$lang['reports_customer'] = 'Pelanggan';
|
||||
$lang['reports_employee'] = 'Karyawan';
|
||||
$lang['reports_item'] = 'Produk/Item';
|
||||
$lang['reports_items'] = 'Produk/Item';
|
||||
$lang['reports_supplier'] = 'Pemasok';
|
||||
$lang['reports_employees'] = 'Karyawan';
|
||||
$lang['reports_taxes'] = 'Taxes';
|
||||
$lang['reports_subtotal'] = 'Subtotal';
|
||||
$lang['reports_total'] = 'Total';
|
||||
$lang['reports_tax'] = 'Pajak';
|
||||
$lang['reports_profit'] = 'Profit';
|
||||
$lang['reports_report_input'] = 'Input Laporan';
|
||||
$lang['reports_type'] = 'Tipe';
|
||||
$lang['reports_date_range'] = 'Rentang Tanggal';
|
||||
$lang['reports_today'] = 'Hari ini';
|
||||
$lang['reports_yesterday'] = 'Kemarin';
|
||||
$lang['reports_last_7'] = '7 Hari Terakhir';
|
||||
$lang['reports_this_month'] = 'Bulan ini';
|
||||
$lang['reports_last_month'] = 'Bulan lalu';
|
||||
$lang['reports_this_year'] = 'Tahun ini';
|
||||
$lang['reports_last_year'] = 'Tahun lalu';
|
||||
$lang['reports_all_time'] = 'Semua Waktu';
|
||||
$lang['reports_detailed_sales_report'] = 'Laporan Penjualan Rinci';
|
||||
$lang['reports_comments'] = 'Catatan';
|
||||
$lang['reports_discount'] = 'Diskon';
|
||||
$lang['reports_payment_type'] = 'Tipe Pembayaran';
|
||||
$lang['reports_sales'] = 'Penjualan';
|
||||
$lang['reports_categories'] = 'Kategori';
|
||||
$lang['reports_customers'] = 'Pelanggan';
|
||||
$lang['reports_suppliers'] = 'Pemasok';
|
||||
$lang['reports_items'] = 'Item';
|
||||
$lang['reports_employees'] = 'Karyawan';
|
||||
$lang['reports_customer'] = 'Pelanggan';
|
||||
$lang['reports_employee'] = 'Karyawan';
|
||||
$lang['reports_tax_percent'] = 'Tax Percent';
|
||||
$lang['reports_sales_amount'] = 'Sales amount';
|
||||
$lang['reports_revenue'] = 'Revenue';
|
||||
$lang['reports_discounts'] = 'Discounts';
|
||||
$lang['reports_discounts_summary_report'] = 'Discounts Summary Report';
|
||||
$lang['reports_discount_percent'] = 'Discount Percent';
|
||||
$lang['reports_count'] = 'Count';
|
||||
$lang['reports_summary_reports'] = 'Summary Reports';
|
||||
$lang['reports_graphical_reports'] = 'Graphical Reports';
|
||||
$lang['reports_detailed_reports'] = 'Detailed Reports';
|
||||
$lang['reports_inventory_reports'] = 'Inventory Reports';
|
||||
$lang['reports_low_inventory'] = 'Low Inventory';
|
||||
$lang['reports_inventory_summary'] = ' Inventory Summary';
|
||||
$lang['reports_item_number'] = 'Item Number';
|
||||
$lang['reports_reorder_level'] = 'Reorder Level';
|
||||
$lang['reports_low_inventory_report'] = 'Low Inventory Report';
|
||||
$lang['reports_item_name'] = 'Item Name';
|
||||
$lang['reports_inventory_summary_report'] = 'Inventory Summary Report';
|
||||
$lang['reports_payment_type'] = 'Payment Type';
|
||||
$lang['reports_payments_summary_report'] = 'Payments Summary Report';
|
||||
$lang['reports_payments'] = 'Payments';
|
||||
$lang['reports_receivings'] = 'Receivings';
|
||||
$lang['reports_received_by'] = 'Received By';
|
||||
$lang['reports_supplied_by'] = 'Supplied by';
|
||||
$lang['reports_items_received'] = 'Items Received';
|
||||
$lang['reports_detailed_receivings_report'] = 'Detailed Receivings Report';
|
||||
$lang['reports_sale_type'] = 'Sale Type';
|
||||
$lang['reports_all'] = 'All';
|
||||
$lang['reports_returns'] = 'Returns';
|
||||
?>
|
||||
@@ -1,78 +0,0 @@
|
||||
<?php
|
||||
$lang['sales_giftcard_number']='Gift Card Number';
|
||||
$lang['sales_giftcard']='Gift Card';
|
||||
$lang['sales_register']='Daftar Penjualan';
|
||||
$lang['sales_mode']='Mode Daftar';
|
||||
$lang['sales_new_item'] = 'Item baru';
|
||||
$lang['sales_item_name'] = 'Nama item ';
|
||||
$lang['sales_item_number'] = 'Item #';
|
||||
$lang['sales_new_customer'] = 'Pelanggan Baru';
|
||||
$lang['sales_customer'] = 'Pelanggan';
|
||||
$lang['sales_no_items_in_cart']='Tidak ada item dalam keranjang';
|
||||
$lang['sales_total']='Total';
|
||||
$lang['sales_tax_percent']='Pajak %';
|
||||
$lang['sales_price']='Harga';
|
||||
$lang['sales_quantity']='Jumlah.';
|
||||
$lang['sales_discount']='Diskon %';
|
||||
$lang['sales_edit']='Ubah';
|
||||
$lang['sales_payment']='Jenis Pembayaran';
|
||||
$lang['sales_edit_item']='Ubah Item';
|
||||
$lang['sales_find_or_scan_item']='Cari/Scan Item';
|
||||
$lang['sales_find_or_scan_item_or_receipt']='Cari/Scan Item ATAU Bon';
|
||||
$lang['sales_select_customer']='Pilih Pelanggan (Opsional)';
|
||||
$lang['sales_start_typing_item_name']='Mulai ketik nama item atau scan barcode...';
|
||||
$lang['sales_start_typing_customer_name']='Mulai ketik nama pelanggan...';
|
||||
$lang['sales_sub_total']='Sub Total';
|
||||
$lang['sales_tax']='Pajak';
|
||||
$lang['sales_comment']='Catatan';
|
||||
$lang['sales_unable_to_add_item']='Tidak dapat menambahkan item dengan penjualan';
|
||||
$lang['sales_sale_for_customer']='Pelanggan:';
|
||||
$lang['sales_remove_customer']='Hapus Pelanggan';
|
||||
$lang['sales_error_editing_item']='Error mengubah item';
|
||||
$lang['sales_complete_sale']='Entri penjualan';
|
||||
$lang['sales_cancel_sale']='Cancel Sale';
|
||||
$lang['sales_add_payment']='Add Payment';
|
||||
$lang['sales_receipt']='Bon penjualan';
|
||||
$lang['sales_id']='ID Penjualan';
|
||||
$lang['sales_sale']='Penjualan';
|
||||
$lang['sales_return']='Retur';
|
||||
$lang['sales_confirm_finish_sale'] = 'Anda yakin Anda ingin mengirimkan penjualan ini? Proses tidak dapat dibatalkan.';
|
||||
$lang['sales_confirm_cancel_sale'] = 'Anda yakin Anda ingin menghapus transaksi penjualan ini? Semua item akan dihapus';
|
||||
$lang['sales_cash'] = 'Tunai';
|
||||
$lang['sales_check'] = 'Cek';
|
||||
$lang['sales_debit'] = 'Kartu Debit';
|
||||
$lang['sales_credit'] = 'Kartu Credit';
|
||||
$lang['sales_amount_tendered'] = 'Nilai Pembayaran';
|
||||
$lang['sales_change_due'] = 'Piutang';
|
||||
$lang['sales_payment_not_cover_total'] = 'Payment Amount does not cover Total';
|
||||
$lang['sales_transaction_failed'] = 'Sales Transaction Failed';
|
||||
$lang['sales_must_enter_numeric'] = 'Must enter numeric value for amount tendered';
|
||||
$lang['sales_must_enter_numeric_giftcard'] = 'Must enter numeric value for giftcard number';
|
||||
$lang['sales_serial'] = 'Serial';
|
||||
$lang['sales_description_abbrv'] = 'Desc';
|
||||
$lang['sales_item_out_of_stock'] = 'Item is Out of Stock';
|
||||
$lang['sales_item_insufficient_of_stock'] = 'Item is Insufficient of Stock';
|
||||
$lang['sales_quantity_less_than_zero'] = 'Warning, Desired Quantity is Insufficient. You can still process the sale, but check your inventory';
|
||||
$lang['sales_successfully_updated'] = 'Sale sucessfully updated';
|
||||
$lang['sales_unsuccessfully_updated'] = 'Sale unsucessfully updated';
|
||||
$lang['sales_edit_sale'] = 'Edit Sale';
|
||||
$lang['sales_employee'] = 'Employee';
|
||||
$lang['sales_successfully_deleted'] = 'Sale sucessfully deleted';
|
||||
$lang['sales_unsuccessfully_deleted'] = 'Sale unsucessfully deleted';
|
||||
$lang['sales_delete_entire_sale'] = 'Delete entire sale';
|
||||
$lang['sales_delete_confirmation'] = 'Are you sure you want to delete this sale, this action cannot be undone';
|
||||
$lang['sales_date'] = 'Sale Date';
|
||||
$lang['sales_delete_successful'] = 'You have successfully deleted a sale';
|
||||
$lang['sales_delete_unsuccessful'] = 'You have unsuccessfully deleted a sale';
|
||||
$lang['sales_suspend_sale'] = 'Suspend Sale';
|
||||
$lang['sales_confirm_suspend_sale'] = 'Are you sure you want to suspend this sale?';
|
||||
$lang['sales_suspended_sales'] = 'Suspended Sales';
|
||||
$lang['sales_suspended_sale_id'] = 'Suspended Sale ID';
|
||||
$lang['sales_date'] = 'Date';
|
||||
$lang['sales_customer'] = 'Customer';
|
||||
$lang['sales_comments'] = 'Comments';
|
||||
$lang['sales_unsuspend_and_delete'] = 'Unsuspend and Delete';
|
||||
$lang['sales_unsuspend'] = 'Unsuspend';
|
||||
$lang['sales_successfully_suspended_sale'] = 'Your sale has been successfully suspended';
|
||||
$lang['sales_email_receipt'] = 'E-Mail Receipt';
|
||||
?>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
$lang['suppliers_new']='Pemasok Baru';
|
||||
$lang['suppliers_supplier']='Pemasok';
|
||||
$lang['suppliers_update']='Update Pemasok';
|
||||
$lang['suppliers_confirm_delete']='Apakah Anda yakin ingin menghapus pemasok yang dipilih?';
|
||||
$lang['suppliers_none_selected']='Anda belum memilih pemasok untuk menghapus';
|
||||
$lang['suppliers_error_adding_updating'] = 'Error menambah / memperbarui pemasok';
|
||||
$lang['suppliers_successful_adding']='Anda telah berhasil menambahkan pemasok';
|
||||
$lang['suppliers_successful_updating']='Anda telah berhasil memperbarui pemasok';
|
||||
$lang['suppliers_successful_deleted']='Anda telah berhasil menghapus pemasok';
|
||||
$lang['suppliers_one_or_multiple']='pemasok';
|
||||
$lang['suppliers_cannot_be_deleted']='Tidak bisa dihapus pemasok yang dipilih, satu atau lebih dari pemasok yang dipilih memiliki penjualan.';
|
||||
$lang['suppliers_basic_information']='Informasi Pemasok ';
|
||||
$lang['suppliers_account_number']='Nomor Akun';
|
||||
$lang['suppliers_company_name']='Company Name';
|
||||
$lang['suppliers_company_name_required'] = 'Company Name is a required field';
|
||||
?>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
$lang['common_common']='común';
|
||||
$lang['common_submit']='Enviar';
|
||||
$lang['common_or']='Ó';
|
||||
$lang['common_powered_by']='Empoderado por';
|
||||
$lang['common_welcome']='Bienvenido(a)';
|
||||
$lang['common_logout']='Salir';
|
||||
$lang['common_list_of']='Lista de';
|
||||
$lang['common_first_name']='Nombre';
|
||||
$lang['common_last_name']='Apellidos';
|
||||
$lang['common_email']='E-Mail';
|
||||
$lang['common_phone_number']='Teléfono';
|
||||
$lang['common_address_1']='Dirección 1';
|
||||
$lang['common_address_2']='Dirección 2';
|
||||
$lang['common_city']='Ciudad';
|
||||
$lang['common_state']='Estado';
|
||||
$lang['common_zip']='C.P.';
|
||||
$lang['common_country']='País';
|
||||
$lang['common_comments']='Comentarios';
|
||||
$lang['common_edit']='editar';
|
||||
$lang['common_search']='Buscar';
|
||||
$lang['common_delete']='Borrar';
|
||||
$lang['common_view_recent_sales']='Ver Ventas Recientes';
|
||||
$lang['common_you_are_using_ospos']='Estás usando Open Source Point Of Sale Versión';
|
||||
$lang['common_please_visit_my']='Por favor, visita mi';
|
||||
$lang['common_website']='sitio';
|
||||
$lang['common_fields_required_message']='Los campos en rojo son requeridos';
|
||||
$lang['common_learn_about_project']='para leer la información más reciente acerca del proyecto';
|
||||
$lang['common_searched_for']='Buscaste';
|
||||
$lang['common_first_name_required']='Nombre es un campo requerido';
|
||||
$lang['common_last_name_required']='Apellidos es un campo requerido';
|
||||
$lang['common_email_invalid_format']='El e-mail no está en el formato requerido';
|
||||
$lang['common_confirm_search']='Has seleccionado una o más filas. Éstas no estarán seleccionadas después de tu búsqueda. ¿Seguro(a) que quieres hacer esta búsqueda?';
|
||||
$lang['common_no_persons_to_display']='No hay gente que mostrar';
|
||||
$lang['common_return_policy']='Política de reintegro';
|
||||
$lang['common_price']='Precio';
|
||||
$lang['common_welcome_message']= 'Bienvenido(a) a Open Source Point Of Sale. ¡Haz click en algún módulo; debajo, para empezar!';
|
||||
$lang['common_inv']='inv';
|
||||
$lang['common_det']='detalles';
|
||||
?>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
$lang['config_info']='Guarda Información de Configuración';
|
||||
$lang['config_company']='Nombre de la Compañía';
|
||||
$lang['config_address']='Dirección de la Compañía';
|
||||
$lang['config_phone']='Teléfono de la Compañía';
|
||||
$lang['config_website']='Sitio Web';
|
||||
$lang['config_fax']='Fax';
|
||||
$lang['config_default_tax_rate']='% de Impuestos Predeterminada';
|
||||
$lang['config_default_tax_rate_1']='Tasa de Impuestos 1';
|
||||
$lang['config_default_tax_rate_2']='Tasa de Impuestos 2';
|
||||
$lang['config_company_required']='Nombre de la Compañía es requerido';
|
||||
$lang['config_address_required']='Dirección de la Compañía es requerida';
|
||||
$lang['config_phone_required']='Teléfono de la Compañía es requerido';
|
||||
$lang['config_default_tax_rate_required']='La Tasa de Impuestos Predeterminada es requerida';
|
||||
$lang['config_default_tax_rate_number']='La Taza de Impuestos Predeterminada debe ser un número';
|
||||
$lang['config_company_website_url']='Sitio Web no es un URL estándard (http://...)';
|
||||
$lang['config_saved_successfully']='Configuración guardada satisfactoriamente';
|
||||
$lang['config_saved_unsuccessfully']='Configuración no guardada';
|
||||
$lang['config_return_policy_required']='Política de Reintegro es requerida';
|
||||
$lang['config_print_after_sale']='Imprimir recibo después de una venta';
|
||||
$lang['config_language'] = 'Idioma';
|
||||
$lang['config_timezone'] = 'Zona Horaria';
|
||||
$lang['config_currency_symbol'] = 'Currency Symbol';
|
||||
?>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
$lang['customers_new']='Nuevo Cliente';
|
||||
$lang['customers_customer']='Cliente';
|
||||
$lang['customers_update']='Actualizar Cliente';
|
||||
$lang['customers_confirm_delete']='¿Estás seguro(a) de que quieres borrar a los clientes seleccionados?';
|
||||
$lang['customers_none_selected']='No has selccionado clientes para ser borrados';
|
||||
$lang['customers_error_adding_updating'] = 'Error agregando/actualizando cliente';
|
||||
$lang['customers_successful_adding']='Has agregado satisfactoriamente al cliente';
|
||||
$lang['customers_successful_updating']='No se ha podido agregar al cliente';
|
||||
$lang['customers_successful_deleted']='Has borrado satisfactoriamente a';
|
||||
$lang['customers_one_or_multiple']='cliente(s)';
|
||||
$lang['customers_cannot_be_deleted']='No se pudo borrar a los clientes seleccionados. Uno o más de éstos tiene ventas.';
|
||||
$lang['customers_basic_information']='Información de Clientes';
|
||||
$lang['customers_account_number']='Cuenta #';
|
||||
$lang['customers_taxable']='Gravable';
|
||||
?>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
$lang['employees_employee']='Empleado';
|
||||
$lang['employees_new']='Nuevo Empleado';
|
||||
$lang['employees_update']='Actualizar Empleado';
|
||||
$lang['employees_confirm_delete']='¿Estás seguro(a) quie quieres borrar a los empleados seleccionados?';
|
||||
$lang['employees_none_selected']='No has seleccionado empleados para borrar';
|
||||
$lang['employees_error_adding_updating'] = 'Error al agregar/actualizar empleado';
|
||||
$lang['employees_successful_adding']='Has agregado al empleado satisfactoriamente';
|
||||
$lang['employees_successful_updating']='Has actualizado al empleado satisfactoriamente';
|
||||
$lang['employees_successful_deleted']='Has borrado satisfactoriamente a';
|
||||
$lang['employees_one_or_multiple']='empleado(s)';
|
||||
$lang['employees_cannot_be_deleted']='No se pudieron borrar empleados. Uno o másempleados tiene ventas procesadas o estás tratando de borrarte a tí mismo(a).';
|
||||
$lang['employees_username']='Usuario';
|
||||
$lang['employees_password']='Contraseña';
|
||||
$lang['employees_repeat_password']='Contraseña Otra Vez';
|
||||
$lang['employees_username_required']='Usuario es requerido';
|
||||
$lang['employees_username_minlength']='El Usuario debe tener, por lo menos, 5 caracteres';
|
||||
$lang['employees_password_required']='La Contraseña es requerida';
|
||||
$lang['employees_password_minlength']='La contraseña debe tener, por lo menos, 8 caracteres';
|
||||
$lang['employees_password_must_match']='Las Contraseñas no coinciden';
|
||||
$lang['employees_basic_information']='Información Básica de Empleados';
|
||||
$lang['employees_login_info']='Información de Ingreso del Empleado';
|
||||
$lang['employees_permission_info']='Permisos y Acceso del Empleado';
|
||||
$lang['employees_permission_desc']='Activa las cajas debajo para permitir el acceso a los módulos';
|
||||
$lang['employees_error_updating_demo_admin'] = 'No puedes cambiar el usuario admin del demo';
|
||||
$lang['employees_error_deleting_demo_admin'] = 'No puedes borrar el usuario admin del demo';
|
||||
?>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
$lang['error_no_permission_module']='No tienes permiso para accesar el módulo llamado';
|
||||
$lang['error_unknown']='desconocido';
|
||||
?>
|
||||
@@ -1,69 +0,0 @@
|
||||
<?php
|
||||
$lang['giftcards_giftcard_number']='Número de Tarjeta de Regalo';
|
||||
$lang['giftcards_card_value']='Valor';
|
||||
$lang['giftcards_basic_information']='Información de Tarjeta de Regalo';
|
||||
$lang['giftcards_number_required']='Número de Tarjeta de Regalo es requerido';
|
||||
$lang['giftcards_value_required']='Valor de Tarjeta de Regalo es requerido';
|
||||
$lang['giftcards_number']='Número de Tarjeta de Regalo debe ser un número';
|
||||
$lang['giftcards_value']='Valor de Tarjeta de Regalo debe ser un número';
|
||||
|
||||
$lang['giftcards_retrive_giftcard_info']='Obtener Info de Tarjeta de Regalo';
|
||||
$lang['giftcards_description']='Descripción';
|
||||
$lang['giftcards_amazon']='Amazon';
|
||||
$lang['giftcards_upc_database']='Base de Datos UPC';
|
||||
$lang['giftcards_cannot_find_giftcard']='No puedo encontrar información acerca de la tarjeta de regalo';
|
||||
$lang['giftcards_info_provided_by']='Info provista por';
|
||||
$lang['giftcards_number_information']='Número de Tarjeta de Regalo';
|
||||
$lang['giftcards_new']='Nueva Tarjeta de Regalo';
|
||||
$lang['giftcards_update']='Actualizar Tarjeta de Regalo';
|
||||
$lang['giftcards_giftcard']='Tarjeta de Regalo';
|
||||
$lang['giftcards_edit_multiple_giftcards']='Editando Múltiples Tarjetas de Regalo';
|
||||
$lang['giftcards_category']='Categoría';
|
||||
$lang['giftcards_cost_price']='Precio de Costo';
|
||||
$lang['giftcards_unit_price']='Precio Unitario';
|
||||
$lang['giftcards_tax_1']='Impuesto 1';
|
||||
$lang['giftcards_tax_2']='Impuesto 2';
|
||||
$lang['giftcards_sales_tax_1'] = 'Impuesto de Venta 1';
|
||||
$lang['giftcards_sales_tax_2'] = 'Impuesto de Venta 2';
|
||||
$lang['giftcards_tax_percent']='Porcentaje de Impuesto';
|
||||
$lang['giftcards_tax_percents']='Porcentaje de Impuesto(s)';
|
||||
$lang['giftcards_reorder_level']='Nivel de Reordenamiento';
|
||||
$lang['giftcards_quantity']='Cantidad';
|
||||
$lang['giftcards_no_giftcards_to_display']='No Giftcards to display';
|
||||
$lang['giftcards_bulk_edit']='Edición Múltiple';
|
||||
$lang['giftcards_confirm_delete']='¿Estás seguro(a) de querer eliminar las tarjetas de regalo seleccionadas?';
|
||||
$lang['giftcards_none_selected']='No has seleccionado tarjetas de regalo para editar';
|
||||
$lang['giftcards_confirm_bulk_edit']='¿Estás seguro(a) de querer editar las tarjetas de regalo seleccionadas?';
|
||||
$lang['giftcards_successful_bulk_edit']='Has actualizado satisfactoriamente las tarjetas de regalo seleccionadas';
|
||||
$lang['giftcards_error_updating_multiple']='Error actualizando tarjetas de regalo';
|
||||
$lang['giftcards_edit_fields_you_want_to_update']='Edita los campos que quieras actualizar en TODAS las tarjetas de regalo seleccionadas';
|
||||
$lang['giftcards_error_adding_updating'] = 'Error agregando/actualizando tarjeta de regalo';
|
||||
$lang['giftcards_successful_adding']='Has agregado satisfactoriamente una tarjeta de regalo';
|
||||
$lang['giftcards_successful_updating']='Has actualizado satisfactoriamente una tarjeta de regalo';
|
||||
$lang['giftcards_successful_deleted']='Has borrado satisfactoriamente';
|
||||
$lang['giftcards_one_or_multiple']='tarjeta(s) de regalo';
|
||||
$lang['giftcards_cannot_be_deleted']='No pude borrar las tarjetas seleccionadas. Una o más tiene ventas.';
|
||||
$lang['giftcards_none'] = 'Ninguno(a)';
|
||||
$lang['giftcards_supplier'] = 'Proveedor';
|
||||
$lang['giftcards_generate_barcodes'] = 'Generar Códigos de Barras';
|
||||
$lang['giftcards_must_select_giftcard_for_barcode'] = 'Debes seleccionar por lo menos 1 tarjeta para generar códigos de barras';
|
||||
$lang['giftcards_excel_import_failed'] = 'Falló la exportación a Excel';
|
||||
$lang['giftcards_allow_alt_desciption'] = 'Permitir Descripción Alterna';
|
||||
$lang['giftcards_is_serialized'] = 'La Tarjeta de Regalo tiene Número de Serie';
|
||||
$lang['giftcards_low_inventory_giftcards'] = 'Tarjetas con Bajo Inventario';
|
||||
$lang['giftcards_serialized_giftcards'] = 'Tarjetas Serializadas';
|
||||
$lang['giftcards_no_description_giftcards'] = 'Tarjetas de Regalo sin Descripción';
|
||||
$lang['giftcards_inventory_comments']='Comentarios';
|
||||
$lang['giftcards_count']='Actualizar Inventario';
|
||||
$lang['giftcards_details_count']='Detalles del Levantamiento de Inventario';
|
||||
$lang['giftcards_add_minus']='Inventario a agregar/substraer';
|
||||
$lang['giftcards_current_quantity']='Cantidad Actual';
|
||||
$lang['giftcards_quantity_required']='Cantidad es requerido. Por favor, haz click en ( X ) para cancelar';
|
||||
$lang['giftcards_do_nothing'] = 'No hacer nada';
|
||||
$lang['giftcards_change_all_to_serialized'] = 'Cambiar Todo A Serializado';
|
||||
$lang['giftcards_change_all_to_unserialized'] = 'Cambiar Todo A Deserializado';
|
||||
$lang['giftcards_change_all_to_allow_alt_desc'] = 'Permitir Descripción Alternativa En Todos';
|
||||
$lang['giftcards_change_all_to_not_allow_allow_desc'] = 'No Permitir Descripción Alternativa Para Todos';
|
||||
$lang['giftcards_use_inventory_menu'] = 'Usar Menú de Inventario';
|
||||
$lang['giftcards_manually_editing_of_quantity'] = 'Edición Manual de Cantidad';
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Prohibido</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>El acceso a los directorios está prohibido.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
$lang['item_kits_name'] = 'Nombre del Kit de Artículos';
|
||||
$lang['item_kits_description'] = 'Descripción del Kit de Artículos';
|
||||
$lang['item_kits_no_item_kits_to_display'] = 'No hay kits de artículos para mostrar';
|
||||
$lang['item_kits_update'] = 'Actualizar Kit de Artículos';
|
||||
$lang['item_kits_new'] = 'Nuevo Kit de Artículos';
|
||||
$lang['item_kits_none_selected'] = "No has seleccionado kits de artículos";
|
||||
$lang['item_kits_info'] = 'Info de Kit de Artículos';
|
||||
$lang['item_kits_successful_adding'] = 'Has agregado satisfactoriamente un Kit de Artículos';
|
||||
$lang['item_kits_successful_updating'] = 'Has actualizado satisfactoriamente un Kit de Artículos';
|
||||
$lang['item_kits_error_adding_updating'] = 'Error agregando/actualizando el Kit de Artículos';
|
||||
$lang['item_kits_successful_deleted'] = 'Has borrado satisfactoriamente';
|
||||
$lang['item_kits_confirm_delete'] = '¿Estás seguro(a) de querer borrar los kits seleccionados?';
|
||||
$lang['item_kits_one_or_multiple'] = 'Kit(s) de Artículos';
|
||||
$lang['item_kits_cannot_be_deleted'] = 'No pude borrar el/los Kit(s) de Artículos';
|
||||
$lang['item_kits_add_item'] = 'Agregar Artículo';
|
||||
$lang['item_kits_items'] = 'Artículos';
|
||||
$lang['item_kits_item'] = 'Artículo';
|
||||
$lang['item_kits_quantity'] = 'Cantidad';
|
||||
?>
|
||||
@@ -1,77 +0,0 @@
|
||||
<?php
|
||||
$lang['items_item_number']='UPC/EAN/ISBN';
|
||||
$lang['items_retrive_item_info']='Obtener Info de Artículo';
|
||||
$lang['items_description']='Descripción';
|
||||
$lang['items_amazon']='Amazon';
|
||||
$lang['items_upc_database']='Base de datos UPC';
|
||||
$lang['items_cannot_find_item']='No puedo encontrar información acerca del artículo';
|
||||
$lang['items_info_provided_by']='Info provista por';
|
||||
$lang['items_basic_information']='Infomación del Artículo';
|
||||
$lang['items_number_information']='Número del Artículo';
|
||||
$lang['items_new']='Nuevo Artículo';
|
||||
$lang['items_update']='Actualizar Artículo';
|
||||
$lang['items_item']='Artículo';
|
||||
$lang['items_edit_multiple_items']='Editando Artículos Múltiples';
|
||||
$lang['items_name']='Nombre del Artículo';
|
||||
$lang['items_category']='Categoría';
|
||||
$lang['items_cost_price']='Costo';
|
||||
$lang['items_unit_price']='Precio Unitario';
|
||||
$lang['items_tax_1']='Impuesto 1';
|
||||
$lang['items_tax_2']='Impuesto 2';
|
||||
$lang['items_sales_tax_1'] = 'Impuesto de Ventas 1';
|
||||
$lang['items_sales_tax_2'] = 'Impuesto de Ventas 2';
|
||||
$lang['items_tax_percent']='Porcentaje de Impuesto';
|
||||
$lang['items_tax_percents']='Porcentaje de Impuesto(s)';
|
||||
$lang['items_reorder_level']='Nivel de Reordenamiento';
|
||||
$lang['items_quantity']='Cantidad';
|
||||
$lang['items_no_items_to_display']='No hay artículos que mostrar';
|
||||
$lang['items_bulk_edit']='Edición Múltiple';
|
||||
$lang['items_confirm_delete']='¿Estás seguro(a) de querer borrar los artículos seleccionados?';
|
||||
$lang['items_none_selected']='No has seleccionado artículos para editar';
|
||||
$lang['items_confirm_bulk_edit']='¿Estás seguro(a) de querer editar los artículos seleccionados?';
|
||||
$lang['items_successful_bulk_edit']='Has actualizado satisfactoriamente los artículos seleccionados';
|
||||
$lang['items_error_updating_multiple']='Error actualizando artículos';
|
||||
$lang['items_edit_fields_you_want_to_update']='Edita los campos que quieras actualizar en TODOS los artículos seleccionados';
|
||||
$lang['items_error_adding_updating'] = 'Error agregando/actualizando artículo';
|
||||
$lang['items_successful_adding']='Has agregado satisfactoriamente un artículo';
|
||||
$lang['items_successful_updating']='Has actualizando satisfactoriamente un artículo';
|
||||
$lang['items_successful_deleted']='Has borrado satisfactoriamente';
|
||||
$lang['items_one_or_multiple']='articulo(s)';
|
||||
$lang['items_cannot_be_deleted']='No pude borrar los artículos seleccionados. Uno o más tiene(n) ventas.';
|
||||
$lang['items_name_required']='Nombre de Artículo es requerido';
|
||||
$lang['items_category_required']='Categoría es requerido';
|
||||
$lang['items_buy_price_required']='Precio de Compra es requerido';
|
||||
$lang['items_unit_price_required']='Precio Unitario es requerido';
|
||||
$lang['items_cost_price_required']='Costo es requerido';
|
||||
$lang['items_tax_percent_required']='Porcentaje de Impuesto es requerido';
|
||||
$lang['items_quantity_required']='Cantidad es requerido';
|
||||
$lang['items_reorder_level_required']='Nivel de Reordenamiento es requerido';
|
||||
$lang['items_unit_price_number']='Precio unitario debe ser número';
|
||||
$lang['items_cost_price_number']='Costo debe ser número';
|
||||
$lang['items_quantity_number']='Cantidad debe ser número';
|
||||
$lang['items_reorder_level_number']='Nivel de Reordenamiento debe ser número';
|
||||
$lang['items_none'] = 'Ninguno';
|
||||
$lang['items_supplier'] = 'Proveedor';
|
||||
$lang['items_generate_barcodes'] = 'Generar Códigos de Barras';
|
||||
$lang['items_must_select_item_for_barcode'] = 'Debes seleccionar al menos 1 artículo para generar códigos de barras';
|
||||
$lang['items_excel_import_failed'] = 'Falló la importación de Excel';
|
||||
$lang['items_allow_alt_desciption'] = 'Permitir Descripción Alterna';
|
||||
$lang['items_is_serialized'] = 'El Artículo tiene Número de Serie';
|
||||
$lang['items_low_inventory_items'] = 'Artículos de Inventario Escaso';
|
||||
$lang['items_serialized_items'] = 'Artículos Serializados';
|
||||
$lang['items_no_description_items'] = 'Artículos sin Descripción';
|
||||
$lang['items_inventory_comments']='Comentarios';
|
||||
$lang['items_count']='Actualizar Inventario';
|
||||
$lang['items_details_count']='Detalles de Cuenta de Inventario';
|
||||
$lang['items_add_minus']='Inventario a agregar/substraer';
|
||||
$lang['items_current_quantity']='Cantidad Actual';
|
||||
$lang['items_do_nothing'] = 'Hacer Nada';
|
||||
$lang['items_change_all_to_serialized'] = 'Cambiar Todo A Serializado';
|
||||
$lang['items_change_all_to_unserialized'] = 'Cambiar Todo A Deserializado';
|
||||
$lang['items_change_all_to_allow_alt_desc'] = 'Permitir Descripción Alterna Para Todos';
|
||||
$lang['items_change_all_to_not_allow_allow_desc'] = 'Denegar Descripción Alterna Para Todos';
|
||||
$lang['items_use_inventory_menu'] = 'Usar Menú de Inv.';
|
||||
$lang['items_manually_editing_of_quantity'] = 'Edición Manual de Cantidad';
|
||||
$lang['items_inventory'] = 'Inventario';
|
||||
$lang['items_location'] = 'Locación';
|
||||
?>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
$lang['login_login']='Iniciar Sesión';
|
||||
$lang['login_username']='Usuario';
|
||||
$lang['login_password']='Contraseña';
|
||||
$lang['login_go']='Ir';
|
||||
$lang['login_invalid_username_and_password']='Usuario/Contraseña inválidos';
|
||||
$lang['login_welcome_message']='Bienvenido(a) al Sistema Open Source Point of Sale. Para continuar, inicia sesión usando tu Usuario y Contraseña.';
|
||||
?>
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
$lang['module_home']='Inicio';
|
||||
|
||||
$lang['module_customers']='Clientes';
|
||||
$lang['module_customers_desc']='Agregar, Actualizar, Borrar y Buscar clientes';
|
||||
|
||||
$lang['module_suppliers']='Proveedores';
|
||||
$lang['module_suppliers_desc']='Agregar, Actualizar, Borrar y Buscar proveedores';
|
||||
|
||||
$lang['module_employees']='Empleados';
|
||||
$lang['module_employees_desc']='Agregar, Actualizar, Borrar y Buscar empleados';
|
||||
|
||||
$lang['module_sales']='Ventas';
|
||||
$lang['module_sales_desc']='Procesar ventas y reintegros';
|
||||
|
||||
$lang['module_reports']='Reportes';
|
||||
$lang['module_reports_desc']='Ver y generar reportes';
|
||||
|
||||
$lang['module_items']='Artículos';
|
||||
$lang['module_items_desc']='Agregar, Actualizar, Borrar y Buscar artículos';
|
||||
|
||||
$lang['module_config']='Configuración de la Tienda';
|
||||
$lang['module_config_desc']='Cambiar la configuración de la tienda';
|
||||
|
||||
$lang['module_receivings']='Receivings';
|
||||
$lang['module_receivings_desc']='Process Purchase orders';
|
||||
|
||||
$lang['module_giftcards']='Tarjetas de Regalo';
|
||||
$lang['module_giftcards_desc']='Agregar, Actualizar, Borrar y Buscar Tarjetas de Regalo';
|
||||
|
||||
$lang['module_item_kits']='Kits de Artículos';
|
||||
$lang['module_item_kits_desc']='Agregar, Actualizar, Borrar y Buscar Kits de Artículos';
|
||||
?>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
$lang['recvs_register']='Entrada de Artículos';
|
||||
$lang['recvs_mode']='Modo de Entradas';
|
||||
$lang['recvs_receiving']='Recibir';
|
||||
$lang['recvs_return']='Regresar';
|
||||
$lang['recvs_total']='Total';
|
||||
$lang['recvs_cost']='Costo';
|
||||
$lang['recvs_quantity']='Cant.';
|
||||
$lang['recvs_discount']='Desc %';
|
||||
$lang['recvs_edit']='Editar';
|
||||
$lang['recvs_new_supplier'] = 'Nuevo Proveedor';
|
||||
$lang['recvs_supplier'] = 'Proveedor';
|
||||
$lang['recvs_select_supplier']='Seleccionar Proveedor (Opcional)';
|
||||
$lang['recvs_start_typing_supplier_name']='Empieza a escribir el nombre del proveedor...';
|
||||
$lang['recvs_unable_to_add_item']='No pude agregar el artículo a la entrada';
|
||||
$lang['recvs_error_editing_item']='Error al editar artículo';
|
||||
$lang['recvs_receipt']='Recibo de Entrada';
|
||||
$lang['recvs_complete_receiving']='Terminar';
|
||||
$lang['recvs_confirm_finish_receiving'] = '¿Estás seguro(a) de querer procesar esta entrada? Ésto no puede ser des-hecho.';
|
||||
$lang['recvs_confirm_cancel_receiving'] = '¿Estás seguro(a) de querer limpiar esta entrada? Todos los artículos serán limpiados.';
|
||||
$lang['recvs_find_or_scan_item']='Encontrar/Escanear Artículo';
|
||||
$lang['recvs_find_or_scan_item_or_receipt']='Encontrar/Escanear Artículo o Entrada';
|
||||
$lang['recvs_id']='ID de Entrada';
|
||||
$lang['recvs_item_name'] = 'Nombre del Artículo';
|
||||
$lang['receivings_transaction_failed'] = 'Las Transacciones de Entrada Fallaron';
|
||||
?>
|
||||
@@ -1,85 +0,0 @@
|
||||
<?php
|
||||
$lang['reports_reports'] = 'Reportes';
|
||||
$lang['reports_report'] = 'Reporte';
|
||||
$lang['reports_welcome_message'] = 'Bienvenido(a) al panel de reportes. Selecciona un reporte para verlo.';
|
||||
$lang['reports_sales_summary_report'] = 'Reporte de Resumen de Ventas';
|
||||
$lang['reports_categories_summary_report'] = 'Reporte de Resumen de Categorías';
|
||||
$lang['reports_customers_summary_report'] = 'Reporte de Resumen de Clientes';
|
||||
$lang['reports_suppliers_summary_report'] = 'Reporte de Resumen de Proveedores';
|
||||
$lang['reports_items_summary_report'] = 'Reporte de Resumen de Artículos';
|
||||
$lang['reports_employees_summary_report'] = 'Reporte de Resumen de Empleados';
|
||||
$lang['reports_taxes_summary_report'] = 'Reporte de Resumen de Impuestos';
|
||||
$lang['reports_date'] = 'Fecha';
|
||||
$lang['reports_name'] = 'Nombre';
|
||||
$lang['reports_quantity_purchased'] = 'Cantidad Comprada';
|
||||
$lang['reports_serial_number'] = 'Serial #';
|
||||
$lang['reports_description'] = 'Descripción';
|
||||
$lang['reports_sale_id'] = 'ID de Venta';
|
||||
$lang['reports_items_purchased'] = 'Artículos Comprados';
|
||||
$lang['reports_sold_by'] = 'Vendido Por';
|
||||
$lang['reports_sold_to'] = 'Vendido A';
|
||||
$lang['reports_category'] = 'Categoría';
|
||||
$lang['reports_customer'] = 'Cliente';
|
||||
$lang['reports_employee'] = 'Empleado';
|
||||
$lang['reports_item'] = 'Artículo';
|
||||
$lang['reports_items'] = 'Artículos';
|
||||
$lang['reports_supplier'] = 'Proveedor';
|
||||
$lang['reports_employees'] = 'Empleados';
|
||||
$lang['reports_taxes'] = 'Impuestos';
|
||||
$lang['reports_subtotal'] = 'Subtotal';
|
||||
$lang['reports_total'] = 'Total';
|
||||
$lang['reports_tax'] = 'Impuesto';
|
||||
$lang['reports_profit'] = 'Ganancia';
|
||||
$lang['reports_report_input'] = 'Entrada de Reporte';
|
||||
$lang['reports_type'] = 'Tipo';
|
||||
$lang['reports_date_range'] = 'Rango de Fecha';
|
||||
$lang['reports_today'] = 'Hoy';
|
||||
$lang['reports_yesterday'] = 'Ayer';
|
||||
$lang['reports_last_7'] = 'Últimos 7 Días';
|
||||
$lang['reports_this_month'] = 'Este Mes';
|
||||
$lang['reports_last_month'] = 'Mes Pasado';
|
||||
$lang['reports_this_year'] = 'Este Año';
|
||||
$lang['reports_last_year'] = 'Año Pasado';
|
||||
$lang['reports_all_time'] = 'Todos los Tiempos';
|
||||
$lang['reports_detailed_sales_report'] = 'Reporte de Ventas Detallado';
|
||||
$lang['reports_comments'] = 'Comentarios';
|
||||
$lang['reports_discount'] = 'Descuento';
|
||||
$lang['reports_payment_type'] = 'Tipo de Pago';
|
||||
$lang['reports_sales'] = 'Ventas';
|
||||
$lang['reports_categories'] = 'Categorías';
|
||||
$lang['reports_customers'] = 'Clientes';
|
||||
$lang['reports_suppliers'] = 'Proveedores';
|
||||
$lang['reports_items'] = 'Artículos';
|
||||
$lang['reports_employees'] = 'Empleados';
|
||||
$lang['reports_customer'] = 'Cliente';
|
||||
$lang['reports_employee'] = 'Empleado';
|
||||
$lang['reports_tax_percent'] = 'Porcentaje de Impuestos';
|
||||
$lang['reports_sales_amount'] = 'Monto de ventas';
|
||||
$lang['reports_revenue'] = 'Ingresos';
|
||||
$lang['reports_discounts'] = 'Descuentos';
|
||||
$lang['reports_discounts_summary_report'] = 'Reporte de Resumen de Descuentos';
|
||||
$lang['reports_discount_percent'] = 'Porcentaje de Decuento';
|
||||
$lang['reports_count'] = 'Cuenta';
|
||||
$lang['reports_summary_reports'] = 'Reportes de Resumen';
|
||||
$lang['reports_graphical_reports'] = 'Reportes Gráficos';
|
||||
$lang['reports_detailed_reports'] = 'Reportes Detallados';
|
||||
$lang['reports_inventory_reports'] = 'Reportes de Inventario';
|
||||
$lang['reports_low_inventory'] = 'Inventario Escaso';
|
||||
$lang['reports_inventory_summary'] = 'Resumen de Inventario';
|
||||
$lang['reports_item_number'] = 'Número de Artículo';
|
||||
$lang['reports_reorder_level'] = 'Nivel de Reordenamiento';
|
||||
$lang['reports_low_inventory_report'] = 'Reporte de Inventario Escaso';
|
||||
$lang['reports_item_name'] = 'Nombre del Artículo';
|
||||
$lang['reports_inventory_summary_report'] = 'Reporte de Resumen de Inventario';
|
||||
$lang['reports_payment_type'] = 'Tipo de Pago';
|
||||
$lang['reports_payments_summary_report'] = 'Reporte de Resumen de Pagos';
|
||||
$lang['reports_payments'] = 'Pagos';
|
||||
$lang['reports_receivings'] = 'Entradas';
|
||||
$lang['reports_received_by'] = 'Recibido por';
|
||||
$lang['reports_supplied_by'] = 'Provisto por';
|
||||
$lang['reports_items_received'] = 'Artículos Recibidos';
|
||||
$lang['reports_detailed_receivings_report'] = 'Reporte Detallado de Entradas';
|
||||
$lang['reports_sale_type'] = 'Tipo de Venta';
|
||||
$lang['reports_all'] = 'Todo';
|
||||
$lang['reports_returns'] = 'Devoluciones';
|
||||
?>
|
||||
@@ -1,78 +0,0 @@
|
||||
<?php
|
||||
$lang['sales_giftcard_number']='Número de Tarjeta de Regalo';
|
||||
$lang['sales_giftcard']='Tarjeta de Regalo';
|
||||
$lang['sales_register']='Registro de Ventas';
|
||||
$lang['sales_mode']='Modo de Registro';
|
||||
$lang['sales_new_item'] = 'Artículo Nuevo';
|
||||
$lang['sales_item_name'] = 'Nombre del Artículo';
|
||||
$lang['sales_item_number'] = '# del Artículo';
|
||||
$lang['sales_new_customer'] = 'Cliente Nuevo';
|
||||
$lang['sales_customer'] = 'cliente';
|
||||
$lang['sales_no_items_in_cart']='No hay artículos en el carrito';
|
||||
$lang['sales_total']='Total';
|
||||
$lang['sales_tax_percent']='% de Impuesto';
|
||||
$lang['sales_price']='Precio';
|
||||
$lang['sales_quantity']='Cant.';
|
||||
$lang['sales_discount']='Desc %';
|
||||
$lang['sales_edit']='Editar';
|
||||
$lang['sales_payment']='Tipo de Pago';
|
||||
$lang['sales_edit_item']='Editar Artículo';
|
||||
$lang['sales_find_or_scan_item']='Encontrar/Escanear Artículo';
|
||||
$lang['sales_find_or_scan_item_or_receipt']='Encontrar/Escanear Artículo O Entrada';
|
||||
$lang['sales_select_customer']='Seleccionar Cliente (Opcional)';
|
||||
$lang['sales_start_typing_item_name']='Empieza a escribir el nombre del artículo o escanea el código de barras...';
|
||||
$lang['sales_start_typing_customer_name']='Empieza a escribir el nombre del cliente...';
|
||||
$lang['sales_sub_total']='Sub Total';
|
||||
$lang['sales_tax']='Impuesto';
|
||||
$lang['sales_comment']='Comentario';
|
||||
$lang['sales_unable_to_add_item']='No pude agregar el artículo a la venta';
|
||||
$lang['sales_sale_for_customer']='Cliente:';
|
||||
$lang['sales_remove_customer']='Borrar Cliente';
|
||||
$lang['sales_error_editing_item']='Error editando artículo';
|
||||
$lang['sales_complete_sale']='Completar Venta';
|
||||
$lang['sales_cancel_sale']='Cancelar Venta';
|
||||
$lang['sales_add_payment']='Agregar Pago';
|
||||
$lang['sales_receipt']='Recibo de Venta';
|
||||
$lang['sales_id']='ID de Venta';
|
||||
$lang['sales_sale']='Venta';
|
||||
$lang['sales_return']='Regresar';
|
||||
$lang['sales_confirm_finish_sale'] = '¿Estás seguro(a) de querer procesar esta venta? Ésto no se puede deshacer.';
|
||||
$lang['sales_confirm_cancel_sale'] = '¿Estás seguro(a) de querer limpiar esta venta? Todos los artículos serán limpiados.';
|
||||
$lang['sales_cash'] = 'Efectivo';
|
||||
$lang['sales_check'] = 'Cheque';
|
||||
$lang['sales_debit'] = 'Tarjeta de Débito';
|
||||
$lang['sales_credit'] = 'Tarjeta de Crédito';
|
||||
$lang['sales_amount_tendered'] = 'Cantidad Recibida';
|
||||
$lang['sales_change_due'] = 'Cambio';
|
||||
$lang['sales_payment_not_cover_total'] = 'La Cantidad Recibida no cubre el pago total';
|
||||
$lang['sales_transaction_failed'] = 'La transacción de venta falló';
|
||||
$lang['sales_must_enter_numeric'] = 'Cantidad Recibida debe ser número';
|
||||
$lang['sales_must_enter_numeric_giftcard'] = 'Número de Tarjeta de Regalo debe ser número';
|
||||
$lang['sales_serial'] = 'Serial';
|
||||
$lang['sales_description_abbrv'] = 'Desc';
|
||||
$lang['sales_item_out_of_stock'] = 'El artículo está agotado';
|
||||
$lang['sales_item_insufficient_of_stock'] = 'Hay un número insuficiente de Artículos en existencia';
|
||||
$lang['sales_quantity_less_than_zero'] = 'Advertencia. La cantidad deseada es insuficiente. Puedes procesar la venta pero checa tu inventario.';
|
||||
$lang['sales_successfully_updated'] = 'La venta ha sido actualizada satisfactoriamente';
|
||||
$lang['sales_unsuccessfully_updated'] = 'Ha fallado la actualización de la venta';
|
||||
$lang['sales_edit_sale'] = 'Editar Venta';
|
||||
$lang['sales_employee'] = 'Empleado';
|
||||
$lang['sales_successfully_deleted'] = 'La Venta ha sido borrada satisfactoriamente';
|
||||
$lang['sales_unsuccessfully_deleted'] = 'Ha fallado la eliminación de la Venta';
|
||||
$lang['sales_delete_entire_sale'] = 'Borrar la venta completa';
|
||||
$lang['sales_delete_confirmation'] = '¿Estás seguro(a) de querer borrar esta venta? Esta acción no se puede deshacer.';
|
||||
$lang['sales_date'] = 'Fecha de Venta';
|
||||
$lang['sales_delete_successful'] = 'Has borrado satisfactoriamente una venta';
|
||||
$lang['sales_delete_unsuccessful'] = 'No he podido borrar la venta satisfactoriamente';
|
||||
$lang['sales_suspend_sale'] = 'Suspender Venta';
|
||||
$lang['sales_confirm_suspend_sale'] = '¿Estás seguro(a) de querer suspender esta venta?';
|
||||
$lang['sales_suspended_sales'] = 'Ventas Suspendidas';
|
||||
$lang['sales_suspended_sale_id'] = 'ID de Venta Suspendida';
|
||||
$lang['sales_date'] = 'Fecha';
|
||||
$lang['sales_customer'] = 'Cliente';
|
||||
$lang['sales_comments'] = 'Comentarios';
|
||||
$lang['sales_unsuspend_and_delete'] = 'Desuspender y Borrar';
|
||||
$lang['sales_unsuspend'] = 'Desuspender';
|
||||
$lang['sales_successfully_suspended_sale'] = 'La venta ha sido suspendida satisfactoriamente';
|
||||
$lang['sales_email_receipt'] = 'E-Mail Receipt';
|
||||
?>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
$lang['suppliers_new']='Nuevo Proveedor';
|
||||
$lang['suppliers_supplier']='Proveedor';
|
||||
$lang['suppliers_update']='Actualizar Proveedor';
|
||||
$lang['suppliers_confirm_delete']='Estás seguro(a) de querer borrar a los proveedores seleccionados?';
|
||||
$lang['suppliers_none_selected']='No has seleccionado proveedores para borrar';
|
||||
$lang['suppliers_error_adding_updating'] = 'Error agregando/actualizando proveedor';
|
||||
$lang['suppliers_successful_adding']='Has agregado al proveedor satisfactoriamente';
|
||||
$lang['suppliers_successful_updating']='Has actualizado al proveedor satisfactoriamente';
|
||||
$lang['suppliers_successful_deleted']='Has borrado satisfactoriamente a';
|
||||
$lang['suppliers_one_or_multiple']='proveedor(es)';
|
||||
$lang['suppliers_cannot_be_deleted']='No se pudo borrar a los proveedores seleccionados. Uno o más de los seleccionadostiene ventas.';
|
||||
$lang['suppliers_basic_information']='Información de Proveedores';
|
||||
$lang['suppliers_account_number']='Cuenta #';
|
||||
$lang['suppliers_company_name']='Nombre de la Compañía';
|
||||
$lang['suppliers_company_name_required'] = 'Nombre de la Compañía es requerido';
|
||||
?>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
class MY_Language extends CI_Language
|
||||
{
|
||||
function MY_Language()
|
||||
{
|
||||
parent::CI_Language();
|
||||
}
|
||||
|
||||
function switch_to($idiom)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
if(is_string($idiom))
|
||||
{
|
||||
$CI->config->set_item('language',$idiom);
|
||||
$loaded = $this->is_loaded;
|
||||
$this->is_loaded = array();
|
||||
|
||||
foreach($loaded as $file)
|
||||
{
|
||||
$this->load(str_replace('_lang.php','',$file));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,251 +0,0 @@
|
||||
<?php
|
||||
class Receiving_lib
|
||||
{
|
||||
var $CI;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->CI =& get_instance();
|
||||
}
|
||||
|
||||
function get_cart()
|
||||
{
|
||||
if(!$this->CI->session->userdata('cartRecv'))
|
||||
$this->set_cart(array());
|
||||
|
||||
return $this->CI->session->userdata('cartRecv');
|
||||
}
|
||||
|
||||
function set_cart($cart_data)
|
||||
{
|
||||
$this->CI->session->set_userdata('cartRecv',$cart_data);
|
||||
}
|
||||
|
||||
function get_supplier()
|
||||
{
|
||||
if(!$this->CI->session->userdata('supplier'))
|
||||
$this->set_supplier(-1);
|
||||
|
||||
return $this->CI->session->userdata('supplier');
|
||||
}
|
||||
|
||||
function set_supplier($supplier_id)
|
||||
{
|
||||
$this->CI->session->set_userdata('supplier',$supplier_id);
|
||||
}
|
||||
|
||||
function get_mode()
|
||||
{
|
||||
if(!$this->CI->session->userdata('recv_mode'))
|
||||
$this->set_mode('receive');
|
||||
|
||||
return $this->CI->session->userdata('recv_mode');
|
||||
}
|
||||
|
||||
function set_mode($mode)
|
||||
{
|
||||
$this->CI->session->set_userdata('recv_mode',$mode);
|
||||
}
|
||||
|
||||
function add_item($item_id,$quantity=1,$discount=0,$price=null,$description=null,$serialnumber=null)
|
||||
{
|
||||
//make sure item exists in database.
|
||||
if(!$this->CI->Item->exists($item_id))
|
||||
{
|
||||
//try to get item id given an item_number
|
||||
$item_id = $this->CI->Item->get_item_id($item_id);
|
||||
|
||||
if(!$item_id)
|
||||
return false;
|
||||
}
|
||||
|
||||
//Get items in the receiving so far.
|
||||
$items = $this->get_cart();
|
||||
|
||||
//We need to loop through all items in the cart.
|
||||
//If the item is already there, get it's key($updatekey).
|
||||
//We also need to get the next key that we are going to use in case we need to add the
|
||||
//item to the list. Since items can be deleted, we can't use a count. we use the highest key + 1.
|
||||
|
||||
$maxkey=0; //Highest key so far
|
||||
$itemalreadyinsale=FALSE; //We did not find the item yet.
|
||||
$insertkey=0; //Key to use for new entry.
|
||||
$updatekey=0; //Key to use to update(quantity)
|
||||
|
||||
foreach ($items as $item)
|
||||
{
|
||||
//We primed the loop so maxkey is 0 the first time.
|
||||
//Also, we have stored the key in the element itself so we can compare.
|
||||
//There is an array function to get the associated key for an element, but I like it better
|
||||
//like that!
|
||||
|
||||
if($maxkey <= $item['line'])
|
||||
{
|
||||
$maxkey = $item['line'];
|
||||
}
|
||||
|
||||
if($item['item_id']==$item_id)
|
||||
{
|
||||
$itemalreadyinsale=TRUE;
|
||||
$updatekey=$item['line'];
|
||||
}
|
||||
}
|
||||
|
||||
$insertkey=$maxkey+1;
|
||||
|
||||
//array records are identified by $insertkey and item_id is just another field.
|
||||
$item = array(($insertkey)=>
|
||||
array(
|
||||
'item_id'=>$item_id,
|
||||
'line'=>$insertkey,
|
||||
'name'=>$this->CI->Item->get_info($item_id)->name,
|
||||
'description'=>$description!=null ? $description: $this->CI->Item->get_info($item_id)->description,
|
||||
'serialnumber'=>$serialnumber!=null ? $serialnumber: '',
|
||||
'allow_alt_description'=>$this->CI->Item->get_info($item_id)->allow_alt_description,
|
||||
'is_serialized'=>$this->CI->Item->get_info($item_id)->is_serialized,
|
||||
'quantity'=>$quantity,
|
||||
'discount'=>$discount,
|
||||
'price'=>$price!=null ? $price: $this->CI->Item->get_info($item_id)->cost_price
|
||||
)
|
||||
);
|
||||
|
||||
//Item already exists
|
||||
if($itemalreadyinsale)
|
||||
{
|
||||
$items[$updatekey]['quantity']+=$quantity;
|
||||
}
|
||||
else
|
||||
{
|
||||
//add to existing array
|
||||
$items+=$item;
|
||||
}
|
||||
|
||||
$this->set_cart($items);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
function edit_item($line,$description,$serialnumber,$quantity,$discount,$price)
|
||||
{
|
||||
$items = $this->get_cart();
|
||||
if(isset($items[$line]))
|
||||
{
|
||||
$items[$line]['description'] = $description;
|
||||
$items[$line]['serialnumber'] = $serialnumber;
|
||||
$items[$line]['quantity'] = $quantity;
|
||||
$items[$line]['discount'] = $discount;
|
||||
$items[$line]['price'] = $price;
|
||||
$this->set_cart($items);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_valid_receipt($receipt_receiving_id)
|
||||
{
|
||||
//RECV #
|
||||
$pieces = explode(' ',$receipt_receiving_id);
|
||||
|
||||
if(count($pieces)==2)
|
||||
{
|
||||
return $this->CI->Receiving->exists($pieces[1]);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_valid_item_kit($item_kit_id)
|
||||
{
|
||||
//KIT #
|
||||
$pieces = explode(' ',$item_kit_id);
|
||||
|
||||
if(count($pieces)==2)
|
||||
{
|
||||
return $this->CI->Item_kit->exists($pieces[1]);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function return_entire_receiving($receipt_receiving_id)
|
||||
{
|
||||
//POS #
|
||||
$pieces = explode(' ',$receipt_receiving_id);
|
||||
$receiving_id = $pieces[1];
|
||||
|
||||
$this->empty_cart();
|
||||
$this->delete_supplier();
|
||||
|
||||
foreach($this->CI->Receiving->get_receiving_items($receiving_id)->result() as $row)
|
||||
{
|
||||
$this->add_item($row->item_id,-$row->quantity_purchased,$row->discount_percent,$row->item_unit_price,$row->description,$row->serialnumber);
|
||||
}
|
||||
$this->set_supplier($this->CI->Receiving->get_supplier($receiving_id)->person_id);
|
||||
}
|
||||
|
||||
function add_item_kit($external_item_kit_id)
|
||||
{
|
||||
//KIT #
|
||||
$pieces = explode(' ',$external_item_kit_id);
|
||||
$item_kit_id = $pieces[1];
|
||||
|
||||
foreach ($this->CI->Item_kit_items->get_info($item_kit_id) as $item_kit_item)
|
||||
{
|
||||
$this->add_item($item_kit_item['item_id'], $item_kit_item['quantity']);
|
||||
}
|
||||
}
|
||||
|
||||
function copy_entire_receiving($receiving_id)
|
||||
{
|
||||
$this->empty_cart();
|
||||
$this->delete_supplier();
|
||||
|
||||
foreach($this->CI->Receiving->get_receiving_items($receiving_id)->result() as $row)
|
||||
{
|
||||
$this->add_item($row->item_id,$row->quantity_purchased,$row->discount_percent,$row->item_unit_price,$row->description,$row->serialnumber);
|
||||
}
|
||||
$this->set_supplier($this->CI->Receiving->get_supplier($receiving_id)->person_id);
|
||||
|
||||
}
|
||||
|
||||
function delete_item($line)
|
||||
{
|
||||
$items=$this->get_cart();
|
||||
unset($items[$line]);
|
||||
$this->set_cart($items);
|
||||
}
|
||||
|
||||
function empty_cart()
|
||||
{
|
||||
$this->CI->session->unset_userdata('cartRecv');
|
||||
}
|
||||
|
||||
function delete_supplier()
|
||||
{
|
||||
$this->CI->session->unset_userdata('supplier');
|
||||
}
|
||||
|
||||
function clear_mode()
|
||||
{
|
||||
$this->CI->session->unset_userdata('receiving_mode');
|
||||
}
|
||||
|
||||
function clear_all()
|
||||
{
|
||||
$this->clear_mode();
|
||||
$this->empty_cart();
|
||||
$this->delete_supplier();
|
||||
}
|
||||
|
||||
function get_total()
|
||||
{
|
||||
$total = 0;
|
||||
foreach($this->get_cart() as $item)
|
||||
{
|
||||
$total+=($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100);
|
||||
}
|
||||
|
||||
return $total;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,498 +0,0 @@
|
||||
<?php
|
||||
class Sale_lib
|
||||
{
|
||||
var $CI;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->CI =& get_instance();
|
||||
}
|
||||
|
||||
function get_cart()
|
||||
{
|
||||
if(!$this->CI->session->userdata('cart'))
|
||||
$this->set_cart(array());
|
||||
|
||||
return $this->CI->session->userdata('cart');
|
||||
}
|
||||
|
||||
function set_cart($cart_data)
|
||||
{
|
||||
$this->CI->session->set_userdata('cart',$cart_data);
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function get_payments()
|
||||
{
|
||||
if(!$this->CI->session->userdata('payments'))
|
||||
$this->set_payments(array());
|
||||
|
||||
return $this->CI->session->userdata('payments');
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function set_payments($payments_data)
|
||||
{
|
||||
$this->CI->session->set_userdata('payments',$payments_data);
|
||||
}
|
||||
|
||||
function get_comment()
|
||||
{
|
||||
return $this->CI->session->userdata('comment');
|
||||
}
|
||||
|
||||
function set_comment($comment)
|
||||
{
|
||||
$this->CI->session->set_userdata('comment', $comment);
|
||||
}
|
||||
|
||||
function clear_comment()
|
||||
{
|
||||
$this->CI->session->unset_userdata('comment');
|
||||
}
|
||||
|
||||
function get_email_receipt()
|
||||
{
|
||||
return $this->CI->session->userdata('email_receipt');
|
||||
}
|
||||
|
||||
function set_email_receipt($email_receipt)
|
||||
{
|
||||
$this->CI->session->set_userdata('email_receipt', $email_receipt);
|
||||
}
|
||||
|
||||
function clear_email_receipt()
|
||||
{
|
||||
$this->CI->session->unset_userdata('email_receipt');
|
||||
}
|
||||
|
||||
function add_payment($payment_id,$payment_amount)
|
||||
{
|
||||
$payments=$this->get_payments();
|
||||
$payment = array($payment_id=>
|
||||
array(
|
||||
'payment_type'=>$payment_id,
|
||||
'payment_amount'=>$payment_amount
|
||||
)
|
||||
);
|
||||
|
||||
//payment_method already exists, add to payment_amount
|
||||
if(isset($payments[$payment_id]))
|
||||
{
|
||||
$payments[$payment_id]['payment_amount']+=$payment_amount;
|
||||
}
|
||||
else
|
||||
{
|
||||
//add to existing array
|
||||
$payments+=$payment;
|
||||
}
|
||||
|
||||
$this->set_payments($payments);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function edit_payment($payment_id,$payment_amount)
|
||||
{
|
||||
$payments = $this->get_payments();
|
||||
if(isset($payments[$payment_id]))
|
||||
{
|
||||
$payments[$payment_id]['payment_type'] = $payment_id;
|
||||
$payments[$payment_id]['payment_amount'] = $payment_amount;
|
||||
$this->set_payments($payment_id);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function delete_payment($payment_id)
|
||||
{
|
||||
$payments=$this->get_payments();
|
||||
unset($payments[$payment_id]);
|
||||
$this->set_payments($payments);
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function empty_payments()
|
||||
{
|
||||
$this->CI->session->unset_userdata('payments');
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function get_payments_total()
|
||||
{
|
||||
$subtotal = 0;
|
||||
foreach($this->get_payments() as $payments)
|
||||
{
|
||||
$subtotal+=$payments['payment_amount'];
|
||||
}
|
||||
return to_currency_no_money($subtotal);
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function get_amount_due()
|
||||
{
|
||||
$amount_due=0;
|
||||
$payment_total = $this->get_payments_total();
|
||||
$sales_total=$this->get_total();
|
||||
$amount_due=to_currency_no_money($sales_total - $payment_total);
|
||||
return $amount_due;
|
||||
}
|
||||
|
||||
function get_customer()
|
||||
{
|
||||
if(!$this->CI->session->userdata('customer'))
|
||||
$this->set_customer(-1);
|
||||
|
||||
return $this->CI->session->userdata('customer');
|
||||
}
|
||||
|
||||
function set_customer($customer_id)
|
||||
{
|
||||
$this->CI->session->set_userdata('customer',$customer_id);
|
||||
}
|
||||
|
||||
function get_mode()
|
||||
{
|
||||
if(!$this->CI->session->userdata('sale_mode'))
|
||||
$this->set_mode('sale');
|
||||
|
||||
return $this->CI->session->userdata('sale_mode');
|
||||
}
|
||||
|
||||
function set_mode($mode)
|
||||
{
|
||||
$this->CI->session->set_userdata('sale_mode',$mode);
|
||||
}
|
||||
|
||||
function add_item($item_id,$quantity=1,$discount=0,$price=null,$description=null,$serialnumber=null)
|
||||
{
|
||||
//make sure item exists
|
||||
if(!$this->CI->Item->exists($item_id))
|
||||
{
|
||||
//try to get item id given an item_number
|
||||
$item_id = $this->CI->Item->get_item_id($item_id);
|
||||
|
||||
if(!$item_id)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//Alain Serialization and Description
|
||||
|
||||
//Get all items in the cart so far...
|
||||
$items = $this->get_cart();
|
||||
|
||||
//We need to loop through all items in the cart.
|
||||
//If the item is already there, get it's key($updatekey).
|
||||
//We also need to get the next key that we are going to use in case we need to add the
|
||||
//item to the cart. Since items can be deleted, we can't use a count. we use the highest key + 1.
|
||||
|
||||
$maxkey=0; //Highest key so far
|
||||
$itemalreadyinsale=FALSE; //We did not find the item yet.
|
||||
$insertkey=0; //Key to use for new entry.
|
||||
$updatekey=0; //Key to use to update(quantity)
|
||||
|
||||
foreach ($items as $item)
|
||||
{
|
||||
//We primed the loop so maxkey is 0 the first time.
|
||||
//Also, we have stored the key in the element itself so we can compare.
|
||||
|
||||
if($maxkey <= $item['line'])
|
||||
{
|
||||
$maxkey = $item['line'];
|
||||
}
|
||||
|
||||
if($item['item_id']==$item_id)
|
||||
{
|
||||
$itemalreadyinsale=TRUE;
|
||||
$updatekey=$item['line'];
|
||||
}
|
||||
}
|
||||
|
||||
$insertkey=$maxkey+1;
|
||||
|
||||
//array/cart records are identified by $insertkey and item_id is just another field.
|
||||
$item = array(($insertkey)=>
|
||||
array(
|
||||
'item_id'=>$item_id,
|
||||
'line'=>$insertkey,
|
||||
'name'=>$this->CI->Item->get_info($item_id)->name,
|
||||
'item_number'=>$this->CI->Item->get_info($item_id)->item_number,
|
||||
'description'=>$description!=null ? $description: $this->CI->Item->get_info($item_id)->description,
|
||||
'serialnumber'=>$serialnumber!=null ? $serialnumber: '',
|
||||
'allow_alt_description'=>$this->CI->Item->get_info($item_id)->allow_alt_description,
|
||||
'is_serialized'=>$this->CI->Item->get_info($item_id)->is_serialized,
|
||||
'quantity'=>$quantity,
|
||||
'discount'=>$discount,
|
||||
'price'=>$price!=null ? $price: $this->CI->Item->get_info($item_id)->unit_price
|
||||
)
|
||||
);
|
||||
|
||||
//Item already exists and is not serialized, add to quantity
|
||||
if($itemalreadyinsale && ($this->CI->Item->get_info($item_id)->is_serialized ==0) )
|
||||
{
|
||||
$items[$updatekey]['quantity']+=$quantity;
|
||||
}
|
||||
else
|
||||
{
|
||||
//add to existing array
|
||||
$items+=$item;
|
||||
}
|
||||
|
||||
$this->set_cart($items);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
function out_of_stock($item_id)
|
||||
{
|
||||
//make sure item exists
|
||||
if(!$this->CI->Item->exists($item_id))
|
||||
{
|
||||
//try to get item id given an item_number
|
||||
$item_id = $this->CI->Item->get_item_id($item_id);
|
||||
|
||||
if(!$item_id)
|
||||
return false;
|
||||
}
|
||||
|
||||
$item = $this->CI->Item->get_info($item_id);
|
||||
$quanity_added = $this->get_quantity_already_added($item_id);
|
||||
|
||||
if ($item->quantity - $quanity_added < 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_quantity_already_added($item_id)
|
||||
{
|
||||
$items = $this->get_cart();
|
||||
$quanity_already_added = 0;
|
||||
foreach ($items as $item)
|
||||
{
|
||||
if($item['item_id']==$item_id)
|
||||
{
|
||||
$quanity_already_added+=$item['quantity'];
|
||||
}
|
||||
}
|
||||
|
||||
return $quanity_already_added;
|
||||
}
|
||||
|
||||
function get_item_id($line_to_get)
|
||||
{
|
||||
$items = $this->get_cart();
|
||||
|
||||
foreach ($items as $line=>$item)
|
||||
{
|
||||
if($line==$line_to_get)
|
||||
{
|
||||
return $item['item_id'];
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
function edit_item($line,$description,$serialnumber,$quantity,$discount,$price)
|
||||
{
|
||||
$items = $this->get_cart();
|
||||
if(isset($items[$line]))
|
||||
{
|
||||
$items[$line]['description'] = $description;
|
||||
$items[$line]['serialnumber'] = $serialnumber;
|
||||
$items[$line]['quantity'] = $quantity;
|
||||
$items[$line]['discount'] = $discount;
|
||||
$items[$line]['price'] = $price;
|
||||
$this->set_cart($items);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_valid_receipt($receipt_sale_id)
|
||||
{
|
||||
//POS #
|
||||
$pieces = explode(' ',$receipt_sale_id);
|
||||
|
||||
if(count($pieces)==2)
|
||||
{
|
||||
return $this->CI->Sale->exists($pieces[1]);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_valid_item_kit($item_kit_id)
|
||||
{
|
||||
//KIT #
|
||||
$pieces = explode(' ',$item_kit_id);
|
||||
|
||||
if(count($pieces)==2)
|
||||
{
|
||||
return $this->CI->Item_kit->exists($pieces[1]);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function return_entire_sale($receipt_sale_id)
|
||||
{
|
||||
//POS #
|
||||
$pieces = explode(' ',$receipt_sale_id);
|
||||
$sale_id = $pieces[1];
|
||||
|
||||
$this->empty_cart();
|
||||
$this->remove_customer();
|
||||
|
||||
foreach($this->CI->Sale->get_sale_items($sale_id)->result() as $row)
|
||||
{
|
||||
$this->add_item($row->item_id,-$row->quantity_purchased,$row->discount_percent,$row->item_unit_price,$row->description,$row->serialnumber);
|
||||
}
|
||||
$this->set_customer($this->CI->Sale->get_customer($sale_id)->person_id);
|
||||
}
|
||||
|
||||
function add_item_kit($external_item_kit_id)
|
||||
{
|
||||
//KIT #
|
||||
$pieces = explode(' ',$external_item_kit_id);
|
||||
$item_kit_id = $pieces[1];
|
||||
|
||||
foreach ($this->CI->Item_kit_items->get_info($item_kit_id) as $item_kit_item)
|
||||
{
|
||||
$this->add_item($item_kit_item['item_id'], $item_kit_item['quantity']);
|
||||
}
|
||||
}
|
||||
|
||||
function copy_entire_sale($sale_id)
|
||||
{
|
||||
$this->empty_cart();
|
||||
$this->remove_customer();
|
||||
|
||||
foreach($this->CI->Sale->get_sale_items($sale_id)->result() as $row)
|
||||
{
|
||||
$this->add_item($row->item_id,$row->quantity_purchased,$row->discount_percent,$row->item_unit_price,$row->description,$row->serialnumber);
|
||||
}
|
||||
foreach($this->CI->Sale->get_sale_payments($sale_id)->result() as $row)
|
||||
{
|
||||
$this->add_payment($row->payment_type,$row->payment_amount);
|
||||
}
|
||||
$this->set_customer($this->CI->Sale->get_customer($sale_id)->person_id);
|
||||
|
||||
}
|
||||
|
||||
function copy_entire_suspended_sale($sale_id)
|
||||
{
|
||||
$this->empty_cart();
|
||||
$this->remove_customer();
|
||||
|
||||
foreach($this->CI->Sale_suspended->get_sale_items($sale_id)->result() as $row)
|
||||
{
|
||||
$this->add_item($row->item_id,$row->quantity_purchased,$row->discount_percent,$row->item_unit_price,$row->description,$row->serialnumber);
|
||||
}
|
||||
foreach($this->CI->Sale_suspended->get_sale_payments($sale_id)->result() as $row)
|
||||
{
|
||||
$this->add_payment($row->payment_type,$row->payment_amount);
|
||||
}
|
||||
$this->set_customer($this->CI->Sale_suspended->get_customer($sale_id)->person_id);
|
||||
$this->set_comment($this->CI->Sale_suspended->get_comment($sale_id));
|
||||
}
|
||||
|
||||
function delete_item($line)
|
||||
{
|
||||
$items=$this->get_cart();
|
||||
unset($items[$line]);
|
||||
$this->set_cart($items);
|
||||
}
|
||||
|
||||
function empty_cart()
|
||||
{
|
||||
$this->CI->session->unset_userdata('cart');
|
||||
}
|
||||
|
||||
function remove_customer()
|
||||
{
|
||||
$this->CI->session->unset_userdata('customer');
|
||||
}
|
||||
|
||||
function clear_mode()
|
||||
{
|
||||
$this->CI->session->unset_userdata('sale_mode');
|
||||
}
|
||||
|
||||
function clear_all()
|
||||
{
|
||||
$this->clear_mode();
|
||||
$this->empty_cart();
|
||||
$this->clear_comment();
|
||||
$this->clear_email_receipt();
|
||||
$this->empty_payments();
|
||||
$this->remove_customer();
|
||||
}
|
||||
|
||||
function get_taxes()
|
||||
{
|
||||
$customer_id = $this->get_customer();
|
||||
$customer = $this->CI->Customer->get_info($customer_id);
|
||||
|
||||
//Do not charge sales tax if we have a customer that is not taxable
|
||||
if (!$customer->taxable and $customer_id!=-1)
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
$taxes = array();
|
||||
foreach($this->get_cart() as $line=>$item)
|
||||
{
|
||||
$tax_info = $this->CI->Item_taxes->get_info($item['item_id']);
|
||||
|
||||
foreach($tax_info as $tax)
|
||||
{
|
||||
$name = $tax['percent'].'% ' . $tax['name'];
|
||||
$tax_amount=($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100)*(($tax['percent'])/100);
|
||||
|
||||
|
||||
if (!isset($taxes[$name]))
|
||||
{
|
||||
$taxes[$name] = 0;
|
||||
}
|
||||
$taxes[$name] += $tax_amount;
|
||||
}
|
||||
}
|
||||
|
||||
return $taxes;
|
||||
}
|
||||
|
||||
function get_subtotal()
|
||||
{
|
||||
$subtotal = 0;
|
||||
foreach($this->get_cart() as $item)
|
||||
{
|
||||
$subtotal+=($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100);
|
||||
}
|
||||
return to_currency_no_money($subtotal);
|
||||
}
|
||||
|
||||
function get_total()
|
||||
{
|
||||
$total = 0;
|
||||
foreach($this->get_cart() as $item)
|
||||
{
|
||||
$total+=($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100);
|
||||
}
|
||||
|
||||
foreach($this->get_taxes() as $tax)
|
||||
{
|
||||
$total+=$tax;
|
||||
}
|
||||
|
||||
return to_currency_no_money($total);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,806 +0,0 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* Converts to and from JSON format.
|
||||
*
|
||||
* JSON (JavaScript Object Notation) is a lightweight data-interchange
|
||||
* format. It is easy for humans to read and write. It is easy for machines
|
||||
* to parse and generate. It is based on a subset of the JavaScript
|
||||
* Programming Language, Standard ECMA-262 3rd Edition - December 1999.
|
||||
* This feature can also be found in Python. JSON is a text format that is
|
||||
* completely language independent but uses conventions that are familiar
|
||||
* to programmers of the C-family of languages, including C, C++, C#, Java,
|
||||
* JavaScript, Perl, TCL, and many others. These properties make JSON an
|
||||
* ideal data-interchange language.
|
||||
*
|
||||
* This package provides a simple encoder and decoder for JSON notation. It
|
||||
* is intended for use with client-side Javascript applications that make
|
||||
* use of HTTPRequest to perform server communication functions - data can
|
||||
* be encoded into JSON notation for use in a client-side javascript, or
|
||||
* decoded from incoming Javascript requests. JSON format is native to
|
||||
* Javascript, and can be directly eval()'ed with no further parsing
|
||||
* overhead
|
||||
*
|
||||
* All strings should be in ASCII or UTF-8 format!
|
||||
*
|
||||
* LICENSE: Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met: Redistributions of source code must retain the
|
||||
* above copyright notice, this list of conditions and the following
|
||||
* disclaimer. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||
* NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
* DAMAGE.
|
||||
*
|
||||
* @category
|
||||
* @package Services_JSON
|
||||
* @author Michal Migurski <mike-json@teczno.com>
|
||||
* @author Matt Knapp <mdknapp[at]gmail[dot]com>
|
||||
* @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
|
||||
* @copyright 2005 Michal Migurski
|
||||
* @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $
|
||||
* @license http://www.opensource.org/licenses/bsd-license.php
|
||||
* @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
|
||||
*/
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_SLICE', 1);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_STR', 2);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_ARR', 3);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_OBJ', 4);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_CMT', 5);
|
||||
|
||||
/**
|
||||
* Behavior switch for Services_JSON::decode()
|
||||
*/
|
||||
define('SERVICES_JSON_LOOSE_TYPE', 16);
|
||||
|
||||
/**
|
||||
* Behavior switch for Services_JSON::decode()
|
||||
*/
|
||||
define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
|
||||
|
||||
/**
|
||||
* Converts to and from JSON format.
|
||||
*
|
||||
* Brief example of use:
|
||||
*
|
||||
* <code>
|
||||
* // create a new instance of Services_JSON
|
||||
* $json = new Services_JSON();
|
||||
*
|
||||
* // convert a complexe value to JSON notation, and send it to the browser
|
||||
* $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
|
||||
* $output = $json->encode($value);
|
||||
*
|
||||
* print($output);
|
||||
* // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
|
||||
*
|
||||
* // accept incoming POST data, assumed to be in JSON notation
|
||||
* $input = file_get_contents('php://input', 1000000);
|
||||
* $value = $json->decode($input);
|
||||
* </code>
|
||||
*/
|
||||
class Services_JSON
|
||||
{
|
||||
/**
|
||||
* constructs a new JSON instance
|
||||
*
|
||||
* @param int $use object behavior flags; combine with boolean-OR
|
||||
*
|
||||
* possible values:
|
||||
* - SERVICES_JSON_LOOSE_TYPE: loose typing.
|
||||
* "{...}" syntax creates associative arrays
|
||||
* instead of objects in decode().
|
||||
* - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
|
||||
* Values which can't be encoded (e.g. resources)
|
||||
* appear as NULL instead of throwing errors.
|
||||
* By default, a deeply-nested resource will
|
||||
* bubble up with an error, so all return values
|
||||
* from encode() should be checked with isError()
|
||||
*/
|
||||
function Services_JSON($use = 0)
|
||||
{
|
||||
$this->use = $use;
|
||||
}
|
||||
|
||||
/**
|
||||
* convert a string from one UTF-16 char to one UTF-8 char
|
||||
*
|
||||
* Normally should be handled by mb_convert_encoding, but
|
||||
* provides a slower PHP-only method for installations
|
||||
* that lack the multibye string extension.
|
||||
*
|
||||
* @param string $utf16 UTF-16 character
|
||||
* @return string UTF-8 character
|
||||
* @access private
|
||||
*/
|
||||
function utf162utf8($utf16)
|
||||
{
|
||||
// oh please oh please oh please oh please oh please
|
||||
if(function_exists('mb_convert_encoding')) {
|
||||
return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
|
||||
}
|
||||
|
||||
$bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
|
||||
|
||||
switch(true) {
|
||||
case ((0x7F & $bytes) == $bytes):
|
||||
// this case should never be reached, because we are in ASCII range
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0x7F & $bytes);
|
||||
|
||||
case (0x07FF & $bytes) == $bytes:
|
||||
// return a 2-byte UTF-8 character
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0xC0 | (($bytes >> 6) & 0x1F))
|
||||
. chr(0x80 | ($bytes & 0x3F));
|
||||
|
||||
case (0xFFFF & $bytes) == $bytes:
|
||||
// return a 3-byte UTF-8 character
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0xE0 | (($bytes >> 12) & 0x0F))
|
||||
. chr(0x80 | (($bytes >> 6) & 0x3F))
|
||||
. chr(0x80 | ($bytes & 0x3F));
|
||||
}
|
||||
|
||||
// ignoring UTF-32 for now, sorry
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* convert a string from one UTF-8 char to one UTF-16 char
|
||||
*
|
||||
* Normally should be handled by mb_convert_encoding, but
|
||||
* provides a slower PHP-only method for installations
|
||||
* that lack the multibye string extension.
|
||||
*
|
||||
* @param string $utf8 UTF-8 character
|
||||
* @return string UTF-16 character
|
||||
* @access private
|
||||
*/
|
||||
function utf82utf16($utf8)
|
||||
{
|
||||
// oh please oh please oh please oh please oh please
|
||||
if(function_exists('mb_convert_encoding')) {
|
||||
return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
|
||||
}
|
||||
|
||||
switch(strlen($utf8)) {
|
||||
case 1:
|
||||
// this case should never be reached, because we are in ASCII range
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return $utf8;
|
||||
|
||||
case 2:
|
||||
// return a UTF-16 character from a 2-byte UTF-8 char
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0x07 & (ord($utf8{0}) >> 2))
|
||||
. chr((0xC0 & (ord($utf8{0}) << 6))
|
||||
| (0x3F & ord($utf8{1})));
|
||||
|
||||
case 3:
|
||||
// return a UTF-16 character from a 3-byte UTF-8 char
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr((0xF0 & (ord($utf8{0}) << 4))
|
||||
| (0x0F & (ord($utf8{1}) >> 2)))
|
||||
. chr((0xC0 & (ord($utf8{1}) << 6))
|
||||
| (0x7F & ord($utf8{2})));
|
||||
}
|
||||
|
||||
// ignoring UTF-32 for now, sorry
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* encodes an arbitrary variable into JSON format
|
||||
*
|
||||
* @param mixed $var any number, boolean, string, array, or object to be encoded.
|
||||
* see argument 1 to Services_JSON() above for array-parsing behavior.
|
||||
* if var is a strng, note that encode() always expects it
|
||||
* to be in ASCII or UTF-8 format!
|
||||
*
|
||||
* @return mixed JSON string representation of input var or an error if a problem occurs
|
||||
* @access public
|
||||
*/
|
||||
function encode($var)
|
||||
{
|
||||
switch (gettype($var)) {
|
||||
case 'boolean':
|
||||
return $var ? 'true' : 'false';
|
||||
|
||||
case 'NULL':
|
||||
return 'null';
|
||||
|
||||
case 'integer':
|
||||
return (int) $var;
|
||||
|
||||
case 'double':
|
||||
case 'float':
|
||||
return (float) $var;
|
||||
|
||||
case 'string':
|
||||
// STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
|
||||
$ascii = '';
|
||||
$strlen_var = strlen($var);
|
||||
|
||||
/*
|
||||
* Iterate over every character in the string,
|
||||
* escaping with a slash or encoding to UTF-8 where necessary
|
||||
*/
|
||||
for ($c = 0; $c < $strlen_var; ++$c) {
|
||||
|
||||
$ord_var_c = ord($var{$c});
|
||||
|
||||
switch (true) {
|
||||
case $ord_var_c == 0x08:
|
||||
$ascii .= '\b';
|
||||
break;
|
||||
case $ord_var_c == 0x09:
|
||||
$ascii .= '\t';
|
||||
break;
|
||||
case $ord_var_c == 0x0A:
|
||||
$ascii .= '\n';
|
||||
break;
|
||||
case $ord_var_c == 0x0C:
|
||||
$ascii .= '\f';
|
||||
break;
|
||||
case $ord_var_c == 0x0D:
|
||||
$ascii .= '\r';
|
||||
break;
|
||||
|
||||
case $ord_var_c == 0x22:
|
||||
case $ord_var_c == 0x2F:
|
||||
case $ord_var_c == 0x5C:
|
||||
// double quote, slash, slosh
|
||||
$ascii .= '\\'.$var{$c};
|
||||
break;
|
||||
|
||||
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
|
||||
// characters U-00000000 - U-0000007F (same as ASCII)
|
||||
$ascii .= $var{$c};
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xE0) == 0xC0):
|
||||
// characters U-00000080 - U-000007FF, mask 110XXXXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c, ord($var{$c + 1}));
|
||||
$c += 1;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xF0) == 0xE0):
|
||||
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}));
|
||||
$c += 2;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xF8) == 0xF0):
|
||||
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}),
|
||||
ord($var{$c + 3}));
|
||||
$c += 3;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xFC) == 0xF8):
|
||||
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}),
|
||||
ord($var{$c + 3}),
|
||||
ord($var{$c + 4}));
|
||||
$c += 4;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xFE) == 0xFC):
|
||||
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}),
|
||||
ord($var{$c + 3}),
|
||||
ord($var{$c + 4}),
|
||||
ord($var{$c + 5}));
|
||||
$c += 5;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return '"'.$ascii.'"';
|
||||
|
||||
case 'array':
|
||||
/*
|
||||
* As per JSON spec if any array key is not an integer
|
||||
* we must treat the the whole array as an object. We
|
||||
* also try to catch a sparsely populated associative
|
||||
* array with numeric keys here because some JS engines
|
||||
* will create an array with empty indexes up to
|
||||
* max_index which can cause memory issues and because
|
||||
* the keys, which may be relevant, will be remapped
|
||||
* otherwise.
|
||||
*
|
||||
* As per the ECMA and JSON specification an object may
|
||||
* have any string as a property. Unfortunately due to
|
||||
* a hole in the ECMA specification if the key is a
|
||||
* ECMA reserved word or starts with a digit the
|
||||
* parameter is only accessible using ECMAScript's
|
||||
* bracket notation.
|
||||
*/
|
||||
|
||||
// treat as a JSON object
|
||||
if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
|
||||
$properties = array_map(array($this, 'name_value'),
|
||||
array_keys($var),
|
||||
array_values($var));
|
||||
|
||||
foreach($properties as $property) {
|
||||
if(Services_JSON::isError($property)) {
|
||||
return $property;
|
||||
}
|
||||
}
|
||||
|
||||
return '{' . join(',', $properties) . '}';
|
||||
}
|
||||
|
||||
// treat it like a regular array
|
||||
$elements = array_map(array($this, 'encode'), $var);
|
||||
|
||||
foreach($elements as $element) {
|
||||
if(Services_JSON::isError($element)) {
|
||||
return $element;
|
||||
}
|
||||
}
|
||||
|
||||
return '[' . join(',', $elements) . ']';
|
||||
|
||||
case 'object':
|
||||
$vars = get_object_vars($var);
|
||||
|
||||
$properties = array_map(array($this, 'name_value'),
|
||||
array_keys($vars),
|
||||
array_values($vars));
|
||||
|
||||
foreach($properties as $property) {
|
||||
if(Services_JSON::isError($property)) {
|
||||
return $property;
|
||||
}
|
||||
}
|
||||
|
||||
return '{' . join(',', $properties) . '}';
|
||||
|
||||
default:
|
||||
return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
|
||||
? 'null'
|
||||
: new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* array-walking function for use in generating JSON-formatted name-value pairs
|
||||
*
|
||||
* @param string $name name of key to use
|
||||
* @param mixed $value reference to an array element to be encoded
|
||||
*
|
||||
* @return string JSON-formatted name-value pair, like '"name":value'
|
||||
* @access private
|
||||
*/
|
||||
function name_value($name, $value)
|
||||
{
|
||||
$encoded_value = $this->encode($value);
|
||||
|
||||
if(Services_JSON::isError($encoded_value)) {
|
||||
return $encoded_value;
|
||||
}
|
||||
|
||||
return $this->encode(strval($name)) . ':' . $encoded_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* reduce a string by removing leading and trailing comments and whitespace
|
||||
*
|
||||
* @param $str string string value to strip of comments and whitespace
|
||||
*
|
||||
* @return string string value stripped of comments and whitespace
|
||||
* @access private
|
||||
*/
|
||||
function reduce_string($str)
|
||||
{
|
||||
$str = preg_replace(array(
|
||||
|
||||
// eliminate single line comments in '// ...' form
|
||||
'#^\s*//(.+)$#m',
|
||||
|
||||
// eliminate multi-line comments in '/* ... */' form, at start of string
|
||||
'#^\s*/\*(.+)\*/#Us',
|
||||
|
||||
// eliminate multi-line comments in '/* ... */' form, at end of string
|
||||
'#/\*(.+)\*/\s*$#Us'
|
||||
|
||||
), '', $str);
|
||||
|
||||
// eliminate extraneous space
|
||||
return trim($str);
|
||||
}
|
||||
|
||||
/**
|
||||
* decodes a JSON string into appropriate variable
|
||||
*
|
||||
* @param string $str JSON-formatted string
|
||||
*
|
||||
* @return mixed number, boolean, string, array, or object
|
||||
* corresponding to given JSON input string.
|
||||
* See argument 1 to Services_JSON() above for object-output behavior.
|
||||
* Note that decode() always returns strings
|
||||
* in ASCII or UTF-8 format!
|
||||
* @access public
|
||||
*/
|
||||
function decode($str)
|
||||
{
|
||||
$str = $this->reduce_string($str);
|
||||
|
||||
switch (strtolower($str)) {
|
||||
case 'true':
|
||||
return true;
|
||||
|
||||
case 'false':
|
||||
return false;
|
||||
|
||||
case 'null':
|
||||
return null;
|
||||
|
||||
default:
|
||||
$m = array();
|
||||
|
||||
if (is_numeric($str)) {
|
||||
// Lookie-loo, it's a number
|
||||
|
||||
// This would work on its own, but I'm trying to be
|
||||
// good about returning integers where appropriate:
|
||||
// return (float)$str;
|
||||
|
||||
// Return float or int, as appropriate
|
||||
return ((float)$str == (integer)$str)
|
||||
? (integer)$str
|
||||
: (float)$str;
|
||||
|
||||
} elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {
|
||||
// STRINGS RETURNED IN UTF-8 FORMAT
|
||||
$delim = substr($str, 0, 1);
|
||||
$chrs = substr($str, 1, -1);
|
||||
$utf8 = '';
|
||||
$strlen_chrs = strlen($chrs);
|
||||
|
||||
for ($c = 0; $c < $strlen_chrs; ++$c) {
|
||||
|
||||
$substr_chrs_c_2 = substr($chrs, $c, 2);
|
||||
$ord_chrs_c = ord($chrs{$c});
|
||||
|
||||
switch (true) {
|
||||
case $substr_chrs_c_2 == '\b':
|
||||
$utf8 .= chr(0x08);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\t':
|
||||
$utf8 .= chr(0x09);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\n':
|
||||
$utf8 .= chr(0x0A);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\f':
|
||||
$utf8 .= chr(0x0C);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\r':
|
||||
$utf8 .= chr(0x0D);
|
||||
++$c;
|
||||
break;
|
||||
|
||||
case $substr_chrs_c_2 == '\\"':
|
||||
case $substr_chrs_c_2 == '\\\'':
|
||||
case $substr_chrs_c_2 == '\\\\':
|
||||
case $substr_chrs_c_2 == '\\/':
|
||||
if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
|
||||
($delim == "'" && $substr_chrs_c_2 != '\\"')) {
|
||||
$utf8 .= $chrs{++$c};
|
||||
}
|
||||
break;
|
||||
|
||||
case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):
|
||||
// single, escaped unicode character
|
||||
$utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))
|
||||
. chr(hexdec(substr($chrs, ($c + 4), 2)));
|
||||
$utf8 .= $this->utf162utf8($utf16);
|
||||
$c += 5;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
|
||||
$utf8 .= $chrs{$c};
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xE0) == 0xC0:
|
||||
// characters U-00000080 - U-000007FF, mask 110XXXXX
|
||||
//see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 2);
|
||||
++$c;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xF0) == 0xE0:
|
||||
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 3);
|
||||
$c += 2;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xF8) == 0xF0:
|
||||
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 4);
|
||||
$c += 3;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xFC) == 0xF8:
|
||||
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 5);
|
||||
$c += 4;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xFE) == 0xFC:
|
||||
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 6);
|
||||
$c += 5;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $utf8;
|
||||
|
||||
} elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
|
||||
// array, or object notation
|
||||
|
||||
if ($str{0} == '[') {
|
||||
$stk = array(SERVICES_JSON_IN_ARR);
|
||||
$arr = array();
|
||||
} else {
|
||||
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
||||
$stk = array(SERVICES_JSON_IN_OBJ);
|
||||
$obj = array();
|
||||
} else {
|
||||
$stk = array(SERVICES_JSON_IN_OBJ);
|
||||
$obj = new stdClass();
|
||||
}
|
||||
}
|
||||
|
||||
array_push($stk, array('what' => SERVICES_JSON_SLICE,
|
||||
'where' => 0,
|
||||
'delim' => false));
|
||||
|
||||
$chrs = substr($str, 1, -1);
|
||||
$chrs = $this->reduce_string($chrs);
|
||||
|
||||
if ($chrs == '') {
|
||||
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
||||
return $arr;
|
||||
|
||||
} else {
|
||||
return $obj;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//print("\nparsing {$chrs}\n");
|
||||
|
||||
$strlen_chrs = strlen($chrs);
|
||||
|
||||
for ($c = 0; $c <= $strlen_chrs; ++$c) {
|
||||
|
||||
$top = end($stk);
|
||||
$substr_chrs_c_2 = substr($chrs, $c, 2);
|
||||
|
||||
if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
|
||||
// found a comma that is not inside a string, array, etc.,
|
||||
// OR we've reached the end of the character list
|
||||
$slice = substr($chrs, $top['where'], ($c - $top['where']));
|
||||
array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
|
||||
//print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
||||
// we are in an array, so just push an element onto the stack
|
||||
array_push($arr, $this->decode($slice));
|
||||
|
||||
} elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
|
||||
// we are in an object, so figure
|
||||
// out the property name and set an
|
||||
// element in an associative array,
|
||||
// for now
|
||||
$parts = array();
|
||||
|
||||
if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
|
||||
// "name":value pair
|
||||
$key = $this->decode($parts[1]);
|
||||
$val = $this->decode($parts[2]);
|
||||
|
||||
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
||||
$obj[$key] = $val;
|
||||
} else {
|
||||
$obj->$key = $val;
|
||||
}
|
||||
} elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
|
||||
// name:value pair, where name is unquoted
|
||||
$key = $parts[1];
|
||||
$val = $this->decode($parts[2]);
|
||||
|
||||
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
||||
$obj[$key] = $val;
|
||||
} else {
|
||||
$obj->$key = $val;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
|
||||
// found a quote, and we are not inside a string
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
|
||||
//print("Found start of string at {$c}\n");
|
||||
|
||||
} elseif (($chrs{$c} == $top['delim']) &&
|
||||
($top['what'] == SERVICES_JSON_IN_STR) &&
|
||||
((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
|
||||
// found a quote, we're in a string, and it's not escaped
|
||||
// we know that it's not escaped becase there is _not_ an
|
||||
// odd number of backslashes at the end of the string so far
|
||||
array_pop($stk);
|
||||
//print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
|
||||
|
||||
} elseif (($chrs{$c} == '[') &&
|
||||
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
||||
// found a left-bracket, and we are in an array, object, or slice
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
|
||||
//print("Found start of array at {$c}\n");
|
||||
|
||||
} elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
|
||||
// found a right-bracket, and we're in an array
|
||||
array_pop($stk);
|
||||
//print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
} elseif (($chrs{$c} == '{') &&
|
||||
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
||||
// found a left-brace, and we are in an array, object, or slice
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
|
||||
//print("Found start of object at {$c}\n");
|
||||
|
||||
} elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
|
||||
// found a right-brace, and we're in an object
|
||||
array_pop($stk);
|
||||
//print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
} elseif (($substr_chrs_c_2 == '/*') &&
|
||||
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
||||
// found a comment start, and we are in an array, object, or slice
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
|
||||
$c++;
|
||||
//print("Found start of comment at {$c}\n");
|
||||
|
||||
} elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
|
||||
// found a comment end, and we're in one now
|
||||
array_pop($stk);
|
||||
$c++;
|
||||
|
||||
for ($i = $top['where']; $i <= $c; ++$i)
|
||||
$chrs = substr_replace($chrs, ' ', $i, 1);
|
||||
|
||||
//print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
||||
return $arr;
|
||||
|
||||
} elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
|
||||
return $obj;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Ultimately, this should just call PEAR::isError()
|
||||
*/
|
||||
function isError($data, $code = null)
|
||||
{
|
||||
if (class_exists('pear')) {
|
||||
return PEAR::isError($data, $code);
|
||||
} elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
|
||||
is_subclass_of($data, 'services_json_error'))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (class_exists('PEAR_Error')) {
|
||||
|
||||
class Services_JSON_Error extends PEAR_Error
|
||||
{
|
||||
function Services_JSON_Error($message = 'unknown error', $code = null,
|
||||
$mode = null, $options = null, $userinfo = null)
|
||||
{
|
||||
parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
/**
|
||||
* @todo Ultimately, this class shall be descended from PEAR_Error
|
||||
*/
|
||||
class Services_JSON_Error
|
||||
{
|
||||
function Services_JSON_Error($message = 'unknown error', $code = null,
|
||||
$mode = null, $options = null, $userinfo = null)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,16 +0,0 @@
|
||||
Open Flash Chart - PHP libraries. These help create data files for Open Flash Chart.
|
||||
Copyright (C) 2007
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
@@ -1,231 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* A private class. All the other line-dots inherit from this.
|
||||
* Gives them all some common methods.
|
||||
*/
|
||||
class dot_base
|
||||
{
|
||||
/**
|
||||
* @param $type string
|
||||
* @param $value integer
|
||||
*/
|
||||
function dot_base($type, $value=null)
|
||||
{
|
||||
$this->type = $type;
|
||||
if( isset( $value ) )
|
||||
$this->value( $value );
|
||||
}
|
||||
|
||||
/**
|
||||
* For line charts that only require a Y position
|
||||
* for each point.
|
||||
* @param $value as integer, the Y position
|
||||
*/
|
||||
function value( $value )
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* For scatter charts that require an X and Y position for
|
||||
* each point.
|
||||
*
|
||||
* @param $x as integer
|
||||
* @param $y as integer
|
||||
*/
|
||||
function position( $x, $y )
|
||||
{
|
||||
$this->x = $x;
|
||||
$this->y = $y;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $colour is a string, HEX colour, e.g. '#FF0000' red
|
||||
*/
|
||||
function colour($colour)
|
||||
{
|
||||
$this->colour = $colour;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The tooltip for this dot.
|
||||
*/
|
||||
function tooltip( $tip )
|
||||
{
|
||||
$this->tip = $tip;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $size is an integer. Size of the dot.
|
||||
*/
|
||||
function size($size)
|
||||
{
|
||||
$tmp = 'dot-size';
|
||||
$this->$tmp = $size;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* a private method
|
||||
*/
|
||||
function type( $type )
|
||||
{
|
||||
$this->type = $type;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $size is an integer. The size of the hollow 'halo' around the dot that masks the line.
|
||||
*/
|
||||
function halo_size( $size )
|
||||
{
|
||||
$tmp = 'halo-size';
|
||||
$this->$tmp = $size;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $do as string. One of three options (examples):
|
||||
* - "http://example.com" - browse to this URL
|
||||
* - "https://example.com" - browse to this URL
|
||||
* - "trace:message" - print this message in the FlashDevelop debug pane
|
||||
* - all other strings will be called as Javascript functions, so a string "hello_world"
|
||||
* will call the JS function "hello_world(index)". It passes in the index of the
|
||||
* point.
|
||||
*/
|
||||
function on_click( $do )
|
||||
{
|
||||
$tmp = 'on-click';
|
||||
$this->$tmp = $do;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a hollow dot
|
||||
*/
|
||||
class hollow_dot extends dot_base
|
||||
{
|
||||
function hollow_dot($value=null)
|
||||
{
|
||||
parent::dot_base( 'hollow-dot', $value );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a star
|
||||
*/
|
||||
class star extends dot_base
|
||||
{
|
||||
/**
|
||||
* The constructor, takes an optional $value
|
||||
*/
|
||||
function star($value=null)
|
||||
{
|
||||
parent::dot_base( 'star', $value );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $angle is an integer.
|
||||
*/
|
||||
function rotation($angle)
|
||||
{
|
||||
$this->rotation = $angle;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $is_hollow is a boolean.
|
||||
*/
|
||||
function hollow($is_hollow)
|
||||
{
|
||||
$this->hollow = $is_hollow;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a 'bow tie' shape.
|
||||
*/
|
||||
class bow extends dot_base
|
||||
{
|
||||
/**
|
||||
* The constructor, takes an optional $value
|
||||
*/
|
||||
function bow($value=null)
|
||||
{
|
||||
parent::dot_base( 'bow', $value );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate the anchor object.
|
||||
* @param $angle is an integer.
|
||||
*/
|
||||
function rotation($angle)
|
||||
{
|
||||
$this->rotation = $angle;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An <i><b>n</b></i> sided shape.
|
||||
*/
|
||||
class anchor extends dot_base
|
||||
{
|
||||
/**
|
||||
* The constructor, takes an optional $value
|
||||
*/
|
||||
function anchor($value=null)
|
||||
{
|
||||
parent::dot_base( 'anchor', $value );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate the anchor object.
|
||||
* @param $angle is an integer.
|
||||
*/
|
||||
function rotation($angle)
|
||||
{
|
||||
$this->rotation = $angle;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $sides is an integer. Number of sides this shape has.
|
||||
*/
|
||||
function sides($sides)
|
||||
{
|
||||
$this->sides = $sides;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple dot
|
||||
*/
|
||||
class dot extends dot_base
|
||||
{
|
||||
/**
|
||||
* The constructor, takes an optional $value
|
||||
*/
|
||||
function dot($value=null)
|
||||
{
|
||||
parent::dot_base( 'dot', $value );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple dot
|
||||
*/
|
||||
class solid_dot extends dot_base
|
||||
{
|
||||
/**
|
||||
* The constructor, takes an optional $value
|
||||
*/
|
||||
function solid_dot($value=null)
|
||||
{
|
||||
parent::dot_base( 'solid-dot', $value );
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
<?php
|
||||
|
||||
// Pretty print some JSON
|
||||
function json_format($json)
|
||||
{
|
||||
$tab = " ";
|
||||
$new_json = "";
|
||||
$indent_level = 0;
|
||||
$in_string = false;
|
||||
|
||||
/*
|
||||
commented out by monk.e.boy 22nd May '08
|
||||
because my web server is PHP4, and
|
||||
json_* are PHP5 functions...
|
||||
|
||||
$json_obj = json_decode($json);
|
||||
|
||||
if($json_obj === false)
|
||||
return false;
|
||||
|
||||
$json = json_encode($json_obj);
|
||||
*/
|
||||
$len = strlen($json);
|
||||
|
||||
for($c = 0; $c < $len; $c++)
|
||||
{
|
||||
$char = $json[$c];
|
||||
switch($char)
|
||||
{
|
||||
case '{':
|
||||
case '[':
|
||||
if(!$in_string)
|
||||
{
|
||||
$new_json .= $char . "\n" . str_repeat($tab, $indent_level+1);
|
||||
$indent_level++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_json .= $char;
|
||||
}
|
||||
break;
|
||||
case '}':
|
||||
case ']':
|
||||
if(!$in_string)
|
||||
{
|
||||
$indent_level--;
|
||||
$new_json .= "\n" . str_repeat($tab, $indent_level) . $char;
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_json .= $char;
|
||||
}
|
||||
break;
|
||||
case ',':
|
||||
if(!$in_string)
|
||||
{
|
||||
$new_json .= ",\n" . str_repeat($tab, $indent_level);
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_json .= $char;
|
||||
}
|
||||
break;
|
||||
case ':':
|
||||
if(!$in_string)
|
||||
{
|
||||
$new_json .= ": ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_json .= $char;
|
||||
}
|
||||
break;
|
||||
case '"':
|
||||
if($c > 0 && $json[$c-1] != '\\')
|
||||
{
|
||||
$in_string = !$in_string;
|
||||
}
|
||||
default:
|
||||
$new_json .= $char;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $new_json;
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* inherits from line
|
||||
*/
|
||||
class area extends line
|
||||
{
|
||||
function area()
|
||||
{
|
||||
$this->type = "area";
|
||||
}
|
||||
|
||||
/**
|
||||
* the fill colour
|
||||
*/
|
||||
function set_fill_colour( $colour )
|
||||
{
|
||||
$this->fill = $colour;
|
||||
}
|
||||
|
||||
/**
|
||||
* sugar: see set_fill_colour
|
||||
*/
|
||||
function fill_colour( $colour )
|
||||
{
|
||||
$this->set_fill_colour( $colour );
|
||||
return $this;
|
||||
}
|
||||
|
||||
function set_fill_alpha( $alpha )
|
||||
{
|
||||
$tmp = "fill-alpha";
|
||||
$this->$tmp = $alpha;
|
||||
}
|
||||
|
||||
function set_loop()
|
||||
{
|
||||
$this->loop = true;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user