Compare commits

...

140 Commits
2.3.4 ... 2.4.0

Author SHA1 Message Date
FrancescoUK
54455213a8 Release files update 2016-04-02 09:33:37 +01:00
FrancescoUK
dda468291a Update codeigniter_version.txt to contain 3.0.5 (#292)
change the order of access prevent in .htaccess
2016-04-01 22:17:13 +01:00
jekkos
bef7a2da25 Add release notes for 2.4 2016-04-01 18:43:05 +02:00
jekkos
953307cbc7 Remove F-key shortcuts for modules (#425) 2016-03-31 08:08:12 +02:00
jekkos
4d04cdd65f Fix error message when searching for nonexistant supplier in receivings
(#430)
2016-03-29 17:41:16 +02:00
jekkos
51b776354a Fix error message when searching for nonexistant customer in sales
(#430)
2016-03-29 08:43:58 +02:00
jekkos
d51d1b458a Regenerate invoice number on sale unsuspend if no custom format is used
(#423)
2016-03-29 08:29:43 +02:00
FrancescoUK
faac1d6a10 fix bulk_edit: don't remove category, supplier and taxes if left empty; save when a value is set (#393 #381) 2016-03-26 15:12:51 +00:00
jekkos
6ffec444d6 show serialnumber and description on invoice underneath name and qty
resp. (#405)
2016-03-23 18:44:15 +01:00
jekkos
4f3a845702 Prevent user to update employee without selecting at least one grant
(#420)
2016-03-23 08:38:13 +01:00
jekkos
a3af051d43 Minor improvements for sales tax bulk edit (#381) 2016-03-23 08:14:15 +01:00
jekkos
79a4414a13 Disable second tax field if first is not filled (#381)
Add extra warning if first tax is modified
2016-03-22 08:55:43 +01:00
jekkos
98ad6f3db0 Ignore giftcard numbering test as it makes the build unstable (#114) 2016-03-21 21:51:59 +01:00
jekkos
258c95f02e Remove sync ajax calls in validation callback for forms (#413)
Remove jquery-bgiframe (not used anynmore) (#328)
Fix bug in receiving form save if supplier was empty

Conflicts:

	application/controllers/Items.php
	application/views/customers/form.php
	application/views/items/form.php
	application/views/partial/header.php
	application/views/receivings/form.php
	application/views/sales/form.php
	bower.json
	dist/opensourcepos.js
	dist/opensourcepos.min.js
	templates/spacelab/views/partial/header.php
2016-03-21 21:43:52 +01:00
FrancescoUK
e6472d525d add rule to .htaccess to protect generate_language.php (#311) 2016-03-21 19:26:31 +00:00
jekkos
07e372a787 Properly fix for item search bug (remove duplicated rows due to left
outer join)
2016-03-21 17:43:59 +01:00
FrancescoUK
b9c088314b fix is_deleted issue on some installation (#406) 2016-03-21 16:36:10 +00:00
jekkos
611237ec86 Fix search resultset when no filters applied 2016-03-21 08:39:24 +01:00
jekkos
b5e07c9245 Move print_hide to outer div (#394) 2016-03-18 19:02:10 +01:00
jekkos
c6c6a1b4cf Fix print button for receipt and invoice (#394) 2016-03-18 19:00:08 +01:00
jekkos
8cdb30fd25 Show item name on invoice if serialized and description empty (#405) 2016-03-18 18:43:23 +01:00
FrancescoUK
91041bd7a9 Add navigation buttons to invoice, receipt and takings + enable jsPrint (#394) 2016-03-18 18:43:07 +01:00
jekkos
bc53f544f4 Replace custom csv parse function with PHP builtin (>=5.3) (#311) 2016-03-18 14:12:46 +01:00
jekkos
d29176158b Strip eol characters at end of last column (#311) 2016-03-18 08:16:52 +01:00
jekkos
8fc24219fb Strip eol characters from imported csv line (#311) 2016-03-17 12:20:28 +01:00
jekkos
09dd7eca58 Make invoice header responsive, remove fixed height and make font size
relative. (#116)
2016-03-15 17:52:43 +01:00
FrancescoUK
7937e880c0 Merge branch 'ais-one-master' 2016-03-13 15:30:40 +00:00
FrancescoUK
c52b5b5118 hide links, change print button id and add it to stylesheet, hide the print div (#160) 2016-03-13 15:29:39 +00:00
FrancescoUK
e47e80c69c Merge branch 'master' of git://github.com/ais-one/opensourcepos into ais-one-master 2016-03-13 14:39:37 +00:00
Aaron Gong
6208569c7e Fix for issue 160
https://github.com/jekkos/opensourcepos/issues/160

I try to interfere as little as possible
2016-03-13 22:04:39 +08:00
FrancescoUK
4ad0d62f42 Upgrade to CI3.0.5 (#292) 2016-03-13 11:26:51 +00:00
FrancescoUK
0bd5bbec77 remove encode/decode base64 causing issues with web hosting providers (#374) 2016-03-13 10:52:32 +00:00
jekkos
d510ab031d Update README.md with FAQ and answer to common setup problem (#387, #97, 2016-03-10 08:43:07 +01:00
jekkos
9c39f62b1e Fix sale search form submission on enter (#386)
Add php5-apcu to Dockerfile (#320, 284)
Fix countrycode parameter for nominatim address lookup
2016-03-10 08:25:32 +01:00
FrancescoUK
bf2c6bfa1f fix issue with sale edit 2016-03-08 21:53:29 +00:00
FrancescoUK
5588c1e22e set a ospos_session cookie name 2016-03-08 21:30:25 +00:00
FrancescoUK
525fb7dcf9 fix issue blocking searching suggestion 2016-03-08 21:28:41 +00:00
FrancescoUK
e182c9d9f6 regenerate dist files 2016-03-08 21:23:05 +00:00
FrancescoUK
76639f6da1 remove misleading comment from code 2016-03-08 19:50:46 +00:00
FrancescoUK
d7df291b9a Merge branch develop/2.4 into master 2016-03-08 19:14:36 +00:00
FrancescoUK
1a1266a20c touched version to be 2.4.0, updated README.md, enabled Cross Site Request Forgery in config.php 2016-03-08 18:19:28 +00:00
jekkos
f366757476 Add group operator to giftcard query 2016-03-08 18:18:27 +00:00
jekkos
741843586d Remove duplicated cookie cleanup hack (CI 2.x issue) 2016-03-08 18:18:27 +00:00
FrancescoUK
fafdfd9afd fix php error on suggestion typing when in sale register return mode (#331) 2016-03-08 18:18:27 +00:00
FrancescoUK
a156ad8087 Fix issue in Sales/Takings and apply same fix to other controller to avoid similar issues in the future (#337) 2016-03-08 18:16:31 +00:00
FrancescoUK
b36a03c4bc Fix to sales edit server error when customer is '' (#337) 2016-03-08 18:16:31 +00:00
jekkos
028bdb074b Add caching hints for mod_expires (#340) 2016-03-08 18:16:31 +00:00
jekkos
643ceb25b5 Fix spacing in autocomplete suggestion 2016-03-08 18:16:31 +00:00
jekkos
5f8eface28 Properly save company_name in customer form 2016-03-08 18:16:31 +00:00
jekkos
8a5177f14c Fix base url for testcases (#305)
Fix legacy ubuntu repository urls (#284)
2016-03-08 18:16:31 +00:00
jekkos
02c8a89bbe Use curl to wait for apache start (#305) 2016-03-08 18:13:24 +00:00
jekkos
c67acaa6ec Make 2.4 version string npm compatible 2016-03-08 18:04:15 +00:00
FrancescoUK
4bbacf6923 Code reformatting 2016-03-08 18:04:15 +00:00
FrancescoUK
38ea682c88 Add favicon 2016-03-08 18:00:33 +00:00
FrancescoUK
0f1208d4d9 Fix package.json version to be 2.4 (#284) 2016-03-08 17:51:16 +00:00
jekkos
69942283e5 Make docker work with 2.4 branch 2016-03-08 17:50:17 +00:00
FrancescoUK
d13e034940 Update database/tables.sql script with new sessions table (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
72059184df Update Copyright notice (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
4d9dc0111e Make the data blob NOT NULL in the SQL upgrade script (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
b9262230d1 Change sessions to be stored in database and add SQL upgrade script 2.3.4 to 2.4 (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
df4cea3228 Fix to custom fields that cannot be null on Items save (#120) 2016-03-08 17:44:59 +00:00
jekkos
0f27348924 Add (temp) fix for cur_page conuter in CI pagination libary (#284)
Fix .htaccess file
2016-03-08 17:44:59 +00:00
FrancescoUK
dd5aa1e241 Restore padding in pagination links, now it uses css (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
5df62610d2 Upgrade to CI 3.0.4 (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
9dcbef988a Added comments to some controller functions and improved spacing to improve readibility of code (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
d1a973564f Make NULL to be null all over the code for consistency purposes (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
da52ff99c1 Further review and fixes to input->post(...) (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
ee07676193 Fix to items search not working due to input->post returning null (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
007598df6a Fix merge miss in constants.php (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
9a71bbc620 Complete CI 3.0.3 upgrade since it wasn't done in full (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
a5041a3a41 Remove application/errors, upgrade Step 8 (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
36d3717bd6 EXT constant deprecated, upgrade Step 20 (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
abd63731be Follow upgrade guideline Step 9 (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
b7c0e32cd0 Fix reports error due to report.php now being Report.php (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
c512d7167d Change config language to be 'en' consistent with the OSPOS language identifiers (#120)
However language support doesn't work properly at the moment.
2016-03-08 17:44:59 +00:00
FrancescoUK
6ccfc8ba7d Improve .htaccess with some security rules (#120) 2016-03-08 17:44:59 +00:00
FrancescoUK
b27d3c04c9 Upgrade config.php and database.php.tmpl to CI 3.0.3 versions (#120)
Apparently the upgrade wasn't complete.
2016-03-08 17:44:59 +00:00
FrancescoUK
aa3948b9a2 Remove application/config.php and database.php (#120) 2016-03-08 17:41:16 +00:00
Toni Haryanto
75fa1a8167 Upgrade to Code Igniter 3.0.3 (#120) 2016-03-08 17:41:16 +00:00
jekkos
9cd42e0614 Add group operator to giftcard query 2016-03-08 08:12:23 +01:00
Aaron Gong
ff63adecdc Fix For #339
https://github.com/jekkos/opensourcepos/issues/339

We should also rollout the fixes to  develop/2.4 if necessary. This fix
was adapted from BootstrapUI which fixed the PHP 7 error regarding
classes.
2016-03-07 22:26:07 +08:00
jekkos
f0af6f8927 Correct spanish translations for reorder level warning (#365) 2016-03-06 13:39:11 +01:00
jekkos
a201d18938 Add specific warning when stock goes below reorder level in sales (#365, #336) 2016-03-02 08:28:50 +01:00
jekkos
d4f456d868 Bump version strings to 2.3.5 2016-02-29 22:36:25 +01:00
FrancescoUK
af2736e462 Reverse PHP7 fix causing issues with DB functionality (#351) 2016-02-27 10:15:58 +00:00
jekkos
3cb9aaa055 Remove duplicated cookie cleanup hack (CI 2.x issue) 2016-02-25 23:28:19 +01:00
FrancescoUK
831dc7a0b8 fix php error on suggestion typing when in sale register return mode (#331) 2016-02-25 15:44:13 +00:00
FrancescoUK
03146d9e3b Fix issue in Sales/Takings and apply same fix to other controller to avoid similar issues in the future (#337) 2016-02-22 17:52:29 +00:00
FrancescoUK
45c0163a9d Fix to sales edit server error when customer is '' (#337) 2016-02-22 08:51:18 +00:00
jekkos
5f0028a983 Add caching hints for mod_expires (#340) 2016-02-20 21:40:06 +01:00
jekkos
f9c882bf24 Fix spacing in autocomplete suggestion 2016-02-08 17:01:37 +01:00
FrancescoUK
445222bcdd Merge branch 'master' into ci3 2016-02-07 18:03:44 +00:00
FrancescoUK
8d47faadd7 Merge branch 'master' into ci3
# Conflicts:
#	package.json
2016-02-05 17:01:07 +00:00
FrancescoUK
d07ed0c09f Merge remote-tracking branch 'jekkos/develop/2.4' into ci3 2016-02-05 16:57:27 +00:00
jekkos
36cf19b1b9 Properly save company_name in customer form 2016-02-04 23:09:03 +01:00
jekkos
5c16c2a21a Use grep and wait for mysql to come up properly (#305) 2016-02-03 17:42:44 +01:00
jekkos
e598817287 Set correct version for npm package 2016-02-03 17:18:28 +01:00
jekkos
35d53e2fae Fix base url for testcases (#305)
Fix legacy ubuntu repository urls (#284)
2016-02-03 11:09:45 +01:00
jekkos
fa3d77299e Use curl to wait for apache start (#305) 2016-02-03 11:04:09 +01:00
jekkos
67d9ca1e41 Merge branch 'master' into develop/2.4
Conflicts:
	Dockerfile
2016-01-29 17:34:53 +01:00
FrancescoUK
3425920cb6 Merge branch 'master' into ci3 2016-01-28 09:05:35 +00:00
jekkos
93460daadf Make 2.4 version string npm compatible 2016-01-27 11:00:18 +01:00
FrancescoUK
8e5b8712c0 Merge branch 'master' into ci3 2016-01-25 09:20:04 +00:00
FrancescoUK
d48dc8b87b Merge branch 'master' into ci3 2016-01-24 22:44:45 +00:00
FrancescoUK
68b28a17e4 Merge branch 'master' into ci3 2016-01-24 10:38:26 +00:00
FrancescoUK
4dd3c64e9d Code reformatting 2016-01-22 22:16:50 +00:00
FrancescoUK
b400393a90 Code reformatting 2016-01-22 22:14:42 +00:00
FrancescoUK
1f9cb92697 Add favicon 2016-01-22 19:14:57 +00:00
FrancescoUK
59fe366479 Add favicon 2016-01-22 19:05:07 +00:00
FrancescoUK
8eba67ceb8 Merge branch 'master' into ci3 (#284) 2016-01-22 14:57:25 +00:00
FrancescoUK
95f6738d5b Fix package.json version to be 2.4 (#284) 2016-01-22 11:31:13 +00:00
FrancescoUK
0cde54e985 Merge branch 'master' into ci3 (#284) 2016-01-22 08:39:24 +00:00
FrancescoUK
b89e9c56cc Merge branch 'master' into ci3 (#284) 2016-01-21 18:38:48 +00:00
jekkos
195c8a0601 Make docker work with 2.4 branch 2016-01-21 16:23:54 +01:00
FrancescoUK
de2d034377 Update database/tables.sql script with new sessions table (#120) 2016-01-19 12:00:51 +00:00
FrancescoUK
f941a45d13 Update Copyright notice (#120) 2016-01-19 11:21:08 +00:00
FrancescoUK
4280e05679 Make the data blob NOT NULL in the SQL upgrade script (#120) 2016-01-19 08:24:58 +00:00
FrancescoUK
830f714a44 Change sessions to be stored in database and add SQL upgrade script 2.3.4 to 2.4 (#120) 2016-01-18 23:01:42 +00:00
FrancescoUK
f8c9acd88f Fix to custom fields that cannot be null on Items save (#120) 2016-01-18 20:15:24 +00:00
jekkos
d67f08d842 Add (temp) fix for cur_page conuter in CI pagination libary (#120)
Fix .htaccess file
2016-01-18 19:23:44 +00:00
jekkos
72fc36c8f5 Add (temp) fix for cur_page conuter in CI pagination libary (#284)
Fix .htaccess file
2016-01-18 20:13:07 +01:00
FrancescoUK
3c22f9069b Restore padding in pagination links, now it uses css (#120) 2016-01-17 19:02:08 +00:00
FrancescoUK
c2eaf88d74 Upgrade to CI 3.0.4 (#120) 2016-01-17 18:33:26 +00:00
FrancescoUK
b72d620b15 Added comments to some controller functions and improved spacing to improve readibility of code (#120) 2016-01-17 17:56:54 +00:00
FrancescoUK
dce413631c Make NULL to be null all over the code for consistency purposes (#120) 2016-01-16 22:08:43 +00:00
FrancescoUK
5468127e2f Further review and fixes to input->post(...) (#120) 2016-01-16 22:04:12 +00:00
FrancescoUK
d66e6ab6ef Fix to items search not working due to input->post returning null (#120) 2016-01-15 22:53:09 +00:00
FrancescoUK
a3929d2c6f Merge remote-tracking branch 'jekkos/master' into ci3
# Conflicts:
#	application/config/database.php.tmpl
2016-01-15 18:57:11 +00:00
FrancescoUK
5b01e60ed2 Merge branch 'master' #274 change into ci3 2016-01-10 13:13:55 +00:00
FrancescoUK
b470fbfb3d Fix merge miss in constants.php (#120) 2016-01-07 20:57:57 +00:00
FrancescoUK
1f86842757 Complete CI 3.0.3 upgrade since it wasn't done in full (#120) 2016-01-07 20:16:59 +00:00
FrancescoUK
de47b11880 Remove application/errors, upgrade Step 8 (#120) 2016-01-07 19:09:53 +00:00
FrancescoUK
6b2b3969ec EXT constant deprecated, upgrade Step 20 (#120) 2016-01-07 19:09:53 +00:00
FrancescoUK
14c5a0823b Follow upgrade guideline Step 9 (#120) 2016-01-07 19:09:53 +00:00
FrancescoUK
98b5c8da28 Fix reports error due to report.php now being Report.php (#120) 2016-01-07 19:09:53 +00:00
FrancescoUK
cd7060afed Change config language to be 'en' consistent with the OSPOS language identifiers (#120)
However language support doesn't work properly at the moment.
2016-01-07 19:09:53 +00:00
FrancescoUK
0787264f71 Improve .htaccess with some security rules (#120) 2016-01-07 19:09:53 +00:00
FrancescoUK
347609d20c Upgrade config.php and database.php.tmpl to CI 3.0.3 versions (#120)
Apparently the upgrade wasn't complete.
2016-01-07 19:09:53 +00:00
FrancescoUK
0340dc7ffc Remove application/config.php and database.php (#120) 2016-01-07 19:06:35 +00:00
Toni Haryanto
d8057830c6 Upgrade to Code Igniter 3.0.3 (#120) 2016-01-07 19:06:35 +00:00
438 changed files with 44770 additions and 27411 deletions

2
.gitignore vendored
View File

@@ -17,3 +17,5 @@ git-svn-diff.py
*~
*.~
*.log
dist/*_bower.*
application/sessions/*

50
.htaccess Executable file
View File

@@ -0,0 +1,50 @@
RewriteEngine On
# Option 2: To rewrite "domain.com -> www.domain.com" uncomment the following lines.
# RewriteCond %{HTTPS} !=on
# RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
# RewriteCond %{HTTP_HOST} (.+)$ [NC]
# RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
# disable directory browsing
# For security reasons, Option all cannot be overridden.
#Options All -Indexes
Options +ExecCGI +Includes +IncludesNOEXEC +SymLinksIfOwnerMatch -Indexes
# prevent folder listing
IndexIgnore *
# secure htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
# prevent access to PHP error log
<Files error_log>
order allow,deny
deny from all
satisfy All
</Files>
# prevent access to generate_languages.php
<Files generate_languages.php>
order deny,allow
deny from all
allow from 127.0.0.1
# My IP(s)
# allow from xxx.xxx.xxx.xx
</Files>
<IfModule mod_expires.c>
<FilesMatch "\.(jpe?g|png|gif|js|css)$">
ExpiresActive On
ExpiresDefault "access plus 1 week"
</FilesMatch>
</IfModule>

View File

@@ -1,5 +1,5 @@
sudo: false
language: node_js
node_js:

View File

@@ -5,9 +5,10 @@ Copyright (c) 2012 Alain
Copyright (c) 2013 Rob Garrison
Copyright (c) 2013 Parq
Copyright (c) 2013 Ramel
Copyright (c) 2014-2015 jekkos
Copyright (c) 2015 FrancescoUK (aka daN4cat)
Copyright (c) 2014-2016 jekkos
Copyright (c) 2015-2016 FrancescoUK (aka daN4cat)
Copyright (c) 2015 Aamir Shahzad (aka asakpke), RoshanTech.com
Copyright (c) 2015 Toni Haryanto (aka yllumi)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

View File

@@ -3,7 +3,7 @@ MAINTAINER jekkos
RUN sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y upgrade
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server apache2 libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php5-gd nodejs npm curl
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server apache2 libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php5-gd php5-apcu nodejs npm curl
RUN easy_install supervisor
ADD ./docker/foreground.sh /etc/apache2/foreground.sh
ADD ./docker/supervisord.conf /etc/supervisord.conf
@@ -18,10 +18,9 @@ RUN git clone https://github.com/jekkos/opensourcepos.git /app
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN cd app && npm install
RUN npm install -g grunt-cli
RUn ln -s /usr/local/bin/grunt /usr/bin/grunt
RUN ln -s /usr/local/bin/grunt /usr/bin/grunt
RUN ln -fs /app/* /var/www/html
RUN rm /var/www/html/index.html
ADD ./docker/start_container.sh /start_container.sh
RUN chmod 755 /start_container.sh
EXPOSE 80 3306

View File

@@ -1,5 +1,11 @@
Introduction
------------
Open Source Point of Sale is a web based point of sale system written in the PHP language. It uses MySQL as the data storage back-end and has a simple user interface.
Badges
------
[![Build Status](https://travis-ci.org/jekkos/opensourcepos.svg?branch=master)](https://travis-ci.org/jekkos/opensourcepos)
How to Install
@@ -16,7 +22,11 @@ username: admin
password:pointofsale
9. Enjoy
13/01/2016: Intall using Docker
FAQ
---
If a blank page (HTTP status 500) shows after search completion or receipt generation, then double check php5-gd presence in your php installation. On windows check in php.ini whether the lib is installed. On Ubuntu issue `sudo apt-get install php5-gd`. Also have a look at the Dockerfile for a complete list of recommended packages.
13/01/2016: Install using Docker
-------------------------------
From now on ospos can be deployed using Docker on Linux, Mac or Windows. This setup dramatically reduces the number of possible issues as all setup is now done in a Dockerfile. Docker runs natively on mac and linux, but will require more overhead on windows. Please refer to the docker documentation for instructions on how to set it up on your platform.

View File

@@ -1,4 +1,14 @@
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. Backup all your current database and OSPOS code
2. Make sure you have a copy of application/config/config.php and application/config/database.php
3. Remove all directories
4. Install tne new OSPOS
5. Run the database upgrade scripts from database/ (check which ones you need according to the version you are upgrading from)
6. Take the saved old config.php and upgrade the new config.php with any additional changes you made in the old.
Take time to understand if new config rules require some changes (e.g. encryption keys)
7. Copy application/config/database.php.tmpl to application/config/database.php
8. Take the saved old database.php and change the new database.php to contain all the configuration you had in the old setup.
Please try not to use the old layout, use the new one and just copy the content of the config variables
9. Once new code is in place, database is updated and config files are sorted you are good to start the new OSPOS
10. If any issue please check GitHub issues as somebody else might have had your problem already or post a question

View File

@@ -1,3 +1,20 @@
Version 2.4
-----------
+ *CodeIgniter 3.0.5* Upgrade (please read UPGRADE.txt)
+ Fix for spurious logouts
+ Apache .htaccess mod_expiry caching and security optimizations
+ Bulk item edit fixes (category, tax and supplier fields)
+ Remove f-key shortcuts used for module navigation
+ Allow to use custom invoice numbers when suspending sale
+ PHP7 fixes
+ Specific warnings to distinguish between reorder level and out of stock situation in sales
+ Fix malware detection issues due to usage of base64 encoding for storing session variables
+ Improve language generation scripts (use PHP builtin functionality)
+ Add extra buttons for navigation and printing to receipt and invoice
+ Improve print layout for invoices
+ Make layout consistent for items between receipt and invoice templates
+ Minor bugfixes
Version 2.3.4
-------------
+ Migration script fixes

View File

@@ -1 +1,6 @@
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>

View File

@@ -1 +1,6 @@
deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -7,4 +8,4 @@
<p>Directory access is forbidden.</p>
</body>
</html>
</html>

View File

@@ -1,4 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
@@ -20,40 +22,58 @@
|
| 1. Packages
| 2. Libraries
| 3. Helper files
| 4. Custom config files
| 5. Language files
| 6. Models
| 3. Drivers
| 4. Helper files
| 5. Custom config files
| 6. Language files
| 7. Models
|
*/
/*
| -------------------------------------------------------------------
| Auto-load Packges
| Auto-load Packages
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
*/
$autoload['packages'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in the system/libraries folder
| or in your application/libraries folder.
| These are the classes located in system/libraries/ or your
| application/libraries/ directory, with the addition of the
| 'database' library, which is somewhat of a special case.
|
| Prototype:
|
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
| $autoload['libraries'] = array('database', 'email', 'session');
|
| You can also supply an alternative library name to be assigned
| in the controller:
|
| $autoload['libraries'] = array('user_agent' => 'ua');
*/
$autoload['libraries'] = array('database', 'form_validation', 'session', 'user_agent', 'pagination');
$autoload['libraries'] = array('database','form_validation','session','user_agent', 'pagination');
/*
| -------------------------------------------------------------------
| Auto-load Drivers
| -------------------------------------------------------------------
| These classes are located in system/libraries/ or in your
| application/libraries/ directory, but are also placed inside their
| own subdirectory and they extend the CI_Driver_Library class. They
| offer multiple interchangeable driver options.
|
| Prototype:
|
| $autoload['drivers'] = array('cache');
*/
$autoload['drivers'] = array();
/*
| -------------------------------------------------------------------
@@ -63,9 +83,7 @@ $autoload['libraries'] = array('database','form_validation','session','user_agen
|
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('form','url','table','text','currency', 'html', 'download', 'directory', 'dateformat_helper');
$autoload['helper'] = array('form', 'url', 'table', 'text', 'currency', 'html', 'download', 'directory', 'dateformat_helper');
/*
| -------------------------------------------------------------------
@@ -79,10 +97,8 @@ $autoload['helper'] = array('form','url','table','text','currency', 'html', 'dow
| config files. Otherwise, leave it blank.
|
*/
$autoload['config'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Language files
@@ -95,22 +111,19 @@ $autoload['config'] = array();
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/
$autoload['language'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Models
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['model'] = array('model1', 'model2');
| $autoload['model'] = array('first_model', 'second_model');
|
| You can also supply an alternative model name to be assigned
| in the controller:
|
| $autoload['model'] = array('first_model' => 'first');
*/
$autoload['model'] = array('Appconfig','Person','Customer','Employee','Module','Item', 'Item_taxes', 'Sale', 'Sale_suspended', 'Supplier','Inventory','Receiving','Giftcard', 'Item_kit', 'Item_kit_items','Stock_location','Item_quantity');
/* End of file autoload.php */
/* Location: ./application/config/autoload.php */
$autoload['model'] = array('Appconfig', 'Person', 'Customer', 'Employee', 'Module', 'Item', 'Item_taxes', 'Sale', 'Sale_suspended', 'Supplier', 'Inventory', 'Receiving', 'Giftcard', 'Item_kit', 'Item_kit_items', 'Stock_location', 'Item_quantity');

View File

@@ -1,4 +1,5 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
@@ -9,7 +10,7 @@
|
|
*/
$config['application_version'] = '2.3.4';
$config['application_version'] = '2.4.0';
/*
|--------------------------------------------------------------------------
@@ -21,8 +22,16 @@ $config['application_version'] = '2.3.4';
|
| http://example.com/
|
| If this is not set then CodeIgniter will guess the protocol, domain and
| path to your installation.
| WARNING: You MUST set this value!
|
| If it is not set, then CodeIgniter will try guess the protocol and path
| your installation, but due to security concerns the hostname will be set
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
| The auto-detection mechanism exists only for convenience during
| development and MUST NOT be used in production!
|
| If you need to allow multiple domains, remember that this file is still
| a PHP script and you can easily do that on your own.
|
*/
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
@@ -47,17 +56,16 @@ $config['index_page'] = 'index.php';
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string. The default setting of 'AUTO' works for most servers.
| URI string. The default setting of 'REQUEST_URI' 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
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
$config['uri_protocol'] = 'AUTO';
$config['uri_protocol'] = 'REQUEST_URI';
/*
|--------------------------------------------------------------------------
@@ -67,9 +75,8 @@ $config['uri_protocol'] = 'AUTO';
| 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
| https://codeigniter.com/user_guide/general/urls.html
*/
$config['url_suffix'] = '';
/*
@@ -92,6 +99,8 @@ $config['language'] = 'en';
| This determines which character set is used by default in various methods
| that require a character set to be provided.
|
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
*/
$config['charset'] = 'UTF-8';
@@ -106,7 +115,6 @@ $config['charset'] = 'UTF-8';
*/
$config['enable_hooks'] = TRUE;
/*
|--------------------------------------------------------------------------
| Class Extension Prefix
@@ -115,33 +123,56 @@ $config['enable_hooks'] = TRUE;
| 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
| https://codeigniter.com/user_guide/general/core_classes.html
| https://codeigniter.com/user_guide/general/creating_libraries.html
|
*/
$config['subclass_prefix'] = 'MY_';
/*
|--------------------------------------------------------------------------
| Composer auto-loading
|--------------------------------------------------------------------------
|
| Enabling this setting will tell CodeIgniter to look for a Composer
| package auto-loader script in application/vendor/autoload.php.
|
| $config['composer_autoload'] = TRUE;
|
| Or if you have your vendor/ directory located somewhere else, you
| can opt to set a specific path as well:
|
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
| For more information about Composer, please visit http://getcomposer.org/
|
| Note: This will NOT disable or override the CodeIgniter-specific
| autoloading (application/config/autoload.php)
*/
$config['composer_autoload'] = FALSE;
/*
|--------------------------------------------------------------------------
| 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.
| This lets you specify 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.
|
| The configured value is actually a regular expression character group
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
/*
|--------------------------------------------------------------------------
| Enable Query Strings
@@ -167,19 +198,17 @@ $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
| use segment based URLs.
|
*/
$config['allow_get_array'] = TRUE;
$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd';
/*
|--------------------------------------------------------------------------
| 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:
|
@@ -189,6 +218,10 @@ $config['directory_trigger'] = 'd'; // experimental not currently in use
| 3 = Informational Messages
| 4 = All Messages
|
| You can also pass an array with threshold levels to show individual error types
|
| array(2) = Debug Messages, without Error Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
@@ -201,11 +234,37 @@ $config['log_threshold'] = 0;
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/logs/ folder. Use a full server path with trailing slash.
| application/logs/ directory. Use a full server path with trailing slash.
|
*/
$config['log_path'] = '';
/*
|--------------------------------------------------------------------------
| Log File Extension
|--------------------------------------------------------------------------
|
| The default filename extension for log files. The default 'php' allows for
| protecting the log files via basic scripting, when they are to be stored
| under a publicly accessible directory.
|
| Note: Leaving it blank will default to 'php'.
|
*/
$config['log_file_extension'] = '';
/*
|--------------------------------------------------------------------------
| Log File Permissions
|--------------------------------------------------------------------------
|
| The file system permissions to be applied on newly created log files.
|
| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
| integer notation (i.e. 0700, 0644, etc.)
*/
$config['log_file_permissions'] = 0644;
/*
|--------------------------------------------------------------------------
| Date Format for Logs
@@ -217,71 +276,152 @@ $config['log_path'] = '';
*/
$config['log_date_format'] = 'Y-m-d H:i:s';
/*
|--------------------------------------------------------------------------
| Error Views Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/views/errors/ directory. Use a full server path with trailing slash.
|
*/
$config['error_views_path'] = '';
/*
|--------------------------------------------------------------------------
| 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.
| application/cache/ directory. Use a full server path with trailing slash.
|
*/
$config['cache_path'] = '';
/*
|--------------------------------------------------------------------------
| Cache Include Query String
|--------------------------------------------------------------------------
|
| Whether to take the URL query string into consideration when generating
| output cache files. Valid options are:
|
| FALSE = Disabled
| TRUE = Enabled, take all query parameters into account.
| Please be aware that this may result in numerous cache
| files generated for the same page over and over again.
| array('q') = Enabled, but only take into account the specified list
| of query parameters.
|
*/
$config['cache_query_string'] = FALSE;
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| If you use the Encryption class or the Session class you
| MUST set an encryption key. See the user guide for info.
| If you use the Encryption class, you must set an encryption key.
| See the user guide for more info.
|
| https://codeigniter.com/user_guide/libraries/encryption.html
|
*/
$config['encryption_key'] = 'PUT_YOUR_ENCRYPTION_KEY_HERE';
$config['encryption_key'] = '';
/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'sess_cookie_name' = the name you want for the cookie
| 'sess_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.
| 'sess_expire_on_close' = Whether to cause the session to expire automatically
| when the browser window is closed
| 'sess_encrypt_cookie' = Whether to encrypt the cookie
| 'sess_use_database' = Whether to save the session data to a database
| 'sess_table_name' = The name of the session database table
| 'sess_match_ip' = Whether to match the user's IP address when reading the session data
| 'sess_match_useragent' = Whether to match the User Agent when reading the session data
| 'sess_time_to_update' = how many seconds between CI refreshing Session Information
| 'sess_driver'
|
| The storage driver to use: files, database, redis, memcached
|
| 'sess_cookie_name'
|
| The session cookie name, must contain only [0-9a-z_-] characters
|
| 'sess_expiration'
|
| The number of SECONDS you want the session to last.
| Setting to 0 (zero) means expire when the browser is closed.
|
| 'sess_save_path'
|
| The location to save sessions to, driver dependent.
|
| For the 'files' driver, it's a path to a writable directory.
| WARNING: Only absolute paths are supported!
|
| For the 'database' driver, it's a table name.
| Please read up the manual for the format with other session drivers.
|
| IMPORTANT: You are REQUIRED to set a valid save path!
|
| 'sess_match_ip'
|
| Whether to match the user's IP address when reading the session data.
|
| WARNING: If you're using the database driver, don't forget to update
| your session table's PRIMARY KEY when changing this setting.
|
| 'sess_time_to_update'
|
| How many seconds between CI regenerating the session ID.
|
| 'sess_regenerate_destroy'
|
| Whether to destroy session data associated with the old session ID
| when auto-regenerating the session ID. When set to FALSE, the data
| will be later deleted by the garbage collector.
|
| Other session cookie settings are shared with the rest of the application,
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = FALSE;
$config['sess_time_to_update'] = 120;
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ospos_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
/*
|--------------------------------------------------------------------------
| 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
| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.
| 'cookie_prefix' = Set a cookie name 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
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
| Note: These settings (with the exception of 'cookie_prefix' and
| 'cookie_httponly') will also affect sessions.
|
*/
$config['cookie_prefix'] = "";
$config['cookie_domain'] = "";
$config['cookie_path'] = "/";
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;
/*
|--------------------------------------------------------------------------
| Standardize newlines
|--------------------------------------------------------------------------
|
| Determines whether to standardize newline characters in input data,
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
| This is particularly useful for portability between UNIX-based OSes,
| (usually \n) and Windows (\r\n).
|
*/
$config['standardize_newlines'] = FALSE;
/*
|--------------------------------------------------------------------------
@@ -291,6 +431,9 @@ $config['cookie_secure'] = FALSE;
| Determines whether the XSS filter is always active when GET, POST or
| COOKIE data is encountered
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['global_xss_filtering'] = FALSE;
@@ -305,11 +448,15 @@ $config['global_xss_filtering'] = FALSE;
| 'csrf_token_name' = The token name
| 'csrf_cookie_name' = The cookie name
| 'csrf_expire' = The number in seconds the token should expire.
| 'csrf_regenerate' = Regenerate token on every submission
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
*/
$config['csrf_protection'] = FALSE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_token_name'] = 'csrf_ospos_v24';
$config['csrf_cookie_name'] = 'csrf_cookie_ospos_v24';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array();
/*
|--------------------------------------------------------------------------
@@ -321,6 +468,9 @@ $config['csrf_expire'] = 7200;
| Even if it does, however, not all browsers support compression
| so enable only if you are reasonably sure your visitors can handle it.
|
| Only used if zlib.output_compression is turned off in your php.ini.
| Please do not use it together with httpd-level output compression.
|
| 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
@@ -335,15 +485,14 @@ $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.
| Options are 'local' or any PHP supported timezone. This preference tells
| the system whether to use your server's local time as the master 'now'
| reference, or convert it to the configured one timezone. See the 'date
| helper' page of the user guide for information regarding date handling.
|
*/
$config['time_reference'] = 'local';
/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
@@ -353,23 +502,25 @@ $config['time_reference'] = 'local';
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
| in your view files. Options are TRUE or FALSE (boolean)
|
| Note: You need to have eval() enabled for this to work.
|
*/
$config['rewrite_short_tags'] = FALSE;
/*
|--------------------------------------------------------------------------
| Reverse Proxy IPs
|--------------------------------------------------------------------------
|
| If your server is behind a reverse proxy, you must whitelist the proxy IP
| addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
| header in order to properly identify the visitor's IP address.
| Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
| If your server is behind a reverse proxy, you must whitelist the proxy
| IP addresses from which CodeIgniter should trust headers such as
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
| the visitor's IP address.
|
| You can use both an array or a comma-separated list of proxy addresses,
| as well as specifying whole subnets. Here are a few examples:
|
| Comma-separated: '10.0.1.200,192.168.5.0/24'
| Array: array('10.0.1.200', '192.168.5.0/24')
*/
$config['proxy_ips'] = '';
/* End of file config.php */
/* Location: ./application/config/config.php */

View File

@@ -1,4 +1,17 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Display Debug backtrace
|--------------------------------------------------------------------------
|
| If set to TRUE, a backtrace will be displayed along with php errors. If
| error_reporting is disabled, the backtrace will not display, regardless
| of this setting
|
*/
defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);
/*
|--------------------------------------------------------------------------
@@ -13,10 +26,10 @@
| 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);
defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);
/*
|--------------------------------------------------------------------------
@@ -26,20 +39,52 @@ define('DIR_WRITE_MODE', 0777);
| These modes are used when working with fopen()/popen()
|
*/
defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
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');
/*
|--------------------------------------------------------------------------
| Exit Status Codes
|--------------------------------------------------------------------------
|
| Used to indicate the conditions under which the script is exit()ing.
| While there is no universal standard for error codes, there are some
| broad conventions. Three such conventions are mentioned below, for
| those who wish to make use of them. The CodeIgniter defaults were
| chosen for the least overlap with these conventions, while still
| leaving room for others to be defined in future versions and user
| applications.
|
| The three main conventions used for determining exit status codes
| are as follows:
|
| Standard C/C++ Library (stdlibc):
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
| (This link also contains other GNU-specific conventions)
| BSD sysexits.h:
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
| Bash scripting:
| http://tldp.org/LDP/abs/html/exitcodes.html
|
*/
defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
/*
| Precision for calculations performed on decimals
*/
define("PRECISION", 5);
/* End of file constants.php */
/* Location: ./application/config/constants.php */

View File

@@ -1,4 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
@@ -12,14 +14,17 @@
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| ['dsn'] The full DSN string describe a connection to the database.
| ['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
| ['dbdriver'] The database driver. e.g.: mysqli.
| Currently supported:
| cubrid, ibase, mssql, mysql, mysqli, oci8,
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['dbprefix'] You can add an optional prefix, which will be added
| to the table name when using the Active Record class
| to the table name when using the Query Builder 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
@@ -34,36 +39,58 @@
| multi-byte character set and are running versions lower than these.
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
| ['autoinit'] Whether or not to automatically initialize the database.
| ['encrypt'] Whether or not to use an encrypted connection.
|
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
| 'ssl_key' - Path to the private key file
| 'ssl_cert' - Path to the public key certificate file
| 'ssl_ca' - Path to the certificate authority file
| 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only)
|
| ['compress'] Whether or not to use client compression (MySQL only)
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
| NOTE: Disabling this will also effectively disable both
| $this->db->last_query() and profiling of DB queries.
| When you run a query, with this setting set to TRUE (default),
| CodeIgniter will store the SQL statement for debugging purposes.
| However, this may cause high memory usage, especially if you run
| a lot of SQL queries ... disable this to avoid that problem.
|
| 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
| The $query_builder variables lets you determine whether or not to load
| the query builder class.
*/
$active_group = 'default';
$active_record = TRUE;
$query_builder = TRUE;
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'ospos';
$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = 'ospos_';
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
/* End of file database.php */
/* Location: ./application/config/database.php */
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => '',
'password' => '',
'database' => '',
'dbdriver' => 'mysqli',
'dbprefix' => 'ospos_',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);

View File

@@ -1,15 +1,24 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$_doctypes = array(
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'html5' => '<!DOCTYPE html>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'
);
/* End of file doctypes.php */
/* Location: ./application/config/doctypes.php */
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
'html5' => '<!DOCTYPE html>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">'
);

View File

@@ -1,4 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| Foreign Characters
@@ -14,51 +16,88 @@ $foreign_characters = array(
'/Ä/' => 'Ae',
'/Ü/' => 'Ue',
'/Ö/' => 'Oe',
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A',
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a',
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A',
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a',
'/Б/' => 'B',
'/б/' => 'b',
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
'/ç|ć|ĉ|ċ|č/' => 'c',
'/Ð|Ď|Đ/' => 'D',
'/ð|ď|đ/' => 'd',
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E',
'/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e',
'/Ĝ|Ğ|Ġ|Ģ/' => 'G',
'/ĝ|ğ|ġ|ģ/' => 'g',
'/Д/' => 'D',
'/д/' => 'd',
'/Ð|Ď|Đ|Δ/' => 'Dj',
'/ð|ď|đ|δ/' => 'dj',
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е/' => 'E',
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е/' => 'e',
'/Ф/' => 'F',
'/ф/' => 'f',
'/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G',
'/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g',
'/Ĥ|Ħ/' => 'H',
'/ĥ|ħ/' => 'h',
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I',
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i',
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I',
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i',
'/Ĵ/' => 'J',
'/ĵ/' => 'j',
'/Ķ/' => 'K',
'/ķ/' => 'k',
'/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L',
'/ĺ|ļ|ľ|ŀ|ł/' => 'l',
'/Ñ|Ń|Ņ|Ň/' => 'N',
'/ñ|ń|ņ|ň|ʼn/' => 'n',
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O',
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o',
'/Ŕ|Ŗ|Ř/' => 'R',
'/ŕ|ŗ|ř/' => 'r',
'/Ś|Ŝ|Ş|Š/' => 'S',
'/ś|ŝ|ş|š|ſ/' => 's',
'/Ţ|Ť|Ŧ/' => 'T',
'/ţ|ť|ŧ/' => 't',
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U',
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u',
'/Ý|Ÿ|Ŷ/' => 'Y',
'/ý|ÿ|ŷ/' => 'y',
'/Ķ|Κ|К/' => 'K',
'/ķ|κ|к/' => 'k',
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L',
'/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l',
'/М/' => 'M',
'/м/' => 'm',
'/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N',
'/ñ|ń|ņ|ň|ʼn|ν/' => 'n',
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O',
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o',
'/П/' => 'P',
'/п/' => 'p',
'/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R',
'/ŕ|ŗ|ř|ρ|р/' => 'r',
'/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S',
'/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's',
'/Ț|Ţ|Ť|Ŧ|τ|Т/' => 'T',
'/ț|ţ|ť|ŧ|т/' => 't',
'/Þ|þ/' => 'th',
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U',
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u',
'/Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y',
'/ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y',
'/В/' => 'V',
'/в/' => 'v',
'/Ŵ/' => 'W',
'/ŵ/' => 'w',
'/Ź|Ż|Ž/' => 'Z',
'/ź|ż|ž/' => 'z',
'/Ź|Ż|Ž|Ζ|З/' => 'Z',
'/ź|ż|ž|ζ|з/' => 'z',
'/Æ|Ǽ/' => 'AE',
'/ß/'=> 'ss',
'/ß/' => 'ss',
'/IJ/' => 'IJ',
'/ij/' => 'ij',
'/Œ/' => 'OE',
'/ƒ/' => 'f'
'/ƒ/' => 'f',
'/ξ/' => 'ks',
'/π/' => 'p',
'/β/' => 'v',
'/μ/' => 'm',
'/ψ/' => 'ps',
'/Ё/' => 'Yo',
'/ё/' => 'yo',
'/Є/' => 'Ye',
'/є/' => 'ye',
'/Ї/' => 'Yi',
'/Ж/' => 'Zh',
'/ж/' => 'zh',
'/Х/' => 'Kh',
'/х/' => 'kh',
'/Ц/' => 'Ts',
'/ц/' => 'ts',
'/Ч/' => 'Ch',
'/ч/' => 'ch',
'/Ш/' => 'Sh',
'/ш/' => 'sh',
'/Щ/' => 'Shch',
'/щ/' => 'shch',
'/Ъ|ъ|Ь|ь/' => '',
'/Ю/' => 'Yu',
'/ю/' => 'yu',
'/Я/' => 'Ya',
'/я/' => 'ya'
);
/* End of file foreign_chars.php */
/* Location: ./application/config/foreign_chars.php */

View File

@@ -1,4 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Hooks
@@ -6,7 +8,7 @@
| 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
| https://codeigniter.com/user_guide/general/hooks.html
|
*/
$hook['post_controller_constructor'] = array(
@@ -15,5 +17,3 @@ $hook['post_controller_constructor'] = array(
'filename' => 'load_config.php',
'filepath' => 'hooks'
);
/* End of file hooks.php */
/* Location: ./application/config/hooks.php */

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -7,4 +8,4 @@
<p>Directory access is forbidden.</p>
</body>
</html>
</html>

View File

@@ -0,0 +1,19 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Memcached settings
| -------------------------------------------------------------------------
| Your Memcached servers can be specified below.
|
| See: https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
*/
$config = array(
'default' => array(
'hostname' => '127.0.0.1',
'port' => '11211',
'weight' => '1',
),
);

View File

@@ -1,40 +1,84 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Enable/Disable Migrations
|--------------------------------------------------------------------------
|
| Migrations are disabled by default but should be enabled
| whenever you intend to do a schema migration.
|
*/
$config['migration_enabled'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migrations version
|--------------------------------------------------------------------------
|
| This is used to set migration version that the file system should be on.
| If you run $this->migration->latest() this is the version that schema will
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 0;
/*
|--------------------------------------------------------------------------
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
|
*/
$config['migration_path'] = APPPATH . 'migrations/';
/* End of file migration.php */
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Enable/Disable Migrations
|--------------------------------------------------------------------------
|
| Migrations are disabled by default for security reasons.
| You should enable migrations whenever you intend to do a schema migration
| and disable it back when you're done.
|
*/
$config['migration_enabled'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migration Type
|--------------------------------------------------------------------------
|
| Migration file names may be based on a sequential identifier or on
| a timestamp. Options are:
|
| 'sequential' = Sequential migration naming (001_add_blog.php)
| 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
| Use timestamp format YYYYMMDDHHIISS.
|
| Note: If this configuration value is missing the Migration library
| defaults to 'sequential' for backward compatibility with CI2.
|
*/
$config['migration_type'] = 'timestamp';
/*
|--------------------------------------------------------------------------
| Migrations table
|--------------------------------------------------------------------------
|
| This is the name of the table that will store the current migrations state.
| When migrations runs it will store in a database table which migration
| level the system is at. It then compares the migration level in this
| table to the $config['migration_version'] if they are not the same it
| will migrate up. This must be set.
|
*/
$config['migration_table'] = 'migrations';
/*
|--------------------------------------------------------------------------
| Auto Migrate To Latest
|--------------------------------------------------------------------------
|
| If this is set to TRUE when you load the migrations class and have
| $config['migration_enabled'] set to TRUE the system will auto migrate
| to your latest migration (whatever $config['migration_version'] is
| set to). This way you do not have to call migrations anywhere else
| in your code to have the latest migration.
|
*/
$config['migration_auto_latest'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migrations version
|--------------------------------------------------------------------------
|
| This is used to set migration version that the file system should be on.
| If you run $this->migration->current() this is the version that schema will
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 0;
/*
|--------------------------------------------------------------------------
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
|
*/
$config['migration_path'] = APPPATH.'migrations/';

View File

@@ -1,4 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| MIME TYPES
@@ -7,100 +9,159 @@
| 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', 'application/x-csv', 'text/x-csv', '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' => array('application/octet-stream', 'application/x-msdownload'),
'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', 'application/msexcel'),
'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' => array('application/x-tar', 'application/x-gzip-compressed'),
'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', 'audio/mpeg3', 'audio/mp3'),
'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' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
'bmp' => array('image/bmp', 'image/x-windows-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',
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json')
);
/* End of file mimes.php */
/* Location: ./application/config/mimes.php */
return array(
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => array('application/octet-stream', 'application/x-msdownload'),
'class' => 'application/octet-stream',
'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
'ai' => array('application/pdf', 'application/postscript'),
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
'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',
'gzip' => 'application/x-gzip',
'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => array('application/x-javascript', 'text/plain'),
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
'aif' => array('audio/x-aiff', 'audio/aiff'),
'aiff' => array('audio/x-aiff', 'audio/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' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
'gif' => 'image/gif',
'jpeg' => array('image/jpeg', 'image/pjpeg'),
'jpg' => array('image/jpeg', 'image/pjpeg'),
'jpe' => array('image/jpeg', 'image/pjpeg'),
'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'png' => array('image/png', 'image/x-png'),
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => array('text/css', 'text/plain'),
'html' => array('text/html', 'text/plain'),
'htm' => array('text/html', 'text/plain'),
'shtml' => array('text/html', 'text/plain'),
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => array('text/plain', 'text/x-log'),
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => array('application/xml', 'text/xml', 'text/plain'),
'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
'movie' => 'video/x-sgi-movie',
'doc' => array('application/msword', 'application/vnd.ms-office'),
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
'dot' => array('application/msword', 'application/vnd.ms-office'),
'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json'),
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature',
'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature',
'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp',
'gpg' => 'application/gpg-keys',
'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7',
'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
'3g2' => 'video/3gpp2',
'3gp' => array('video/3gp', 'video/3gpp'),
'mp4' => 'video/mp4',
'm4a' => 'audio/x-m4a',
'f4v' => array('video/mp4', 'video/x-f4v'),
'flv' => 'video/x-flv',
'webm' => 'video/webm',
'aac' => 'audio/x-acc',
'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan',
'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
'au' => 'audio/x-au',
'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac',
'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
'ics' => 'text/calendar',
'ical' => 'text/calendar',
'zsh' => 'text/x-scriptzsh',
'7zip' => array('application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
'vcf' => 'text/x-vcard',
'srt' => array('text/srt', 'text/plain'),
'vtt' => array('text/vtt', 'text/plain'),
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon')
);

View File

@@ -1,4 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Profiler Sections
@@ -7,11 +9,6 @@
| data are displayed when the Profiler is enabled.
| Please see the user guide for info:
|
| http://codeigniter.com/user_guide/general/profiling.html
| https://codeigniter.com/user_guide/general/profiling.html
|
*/
/* End of file profiler.php */
/* Location: ./application/config/profiler.php */

View File

@@ -1,4 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
@@ -17,13 +19,13 @@
|
| Please see the user guide for complete details:
|
| http://codeigniter.com/user_guide/general/routing.html
| https://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
| There are three reserved routes:
|
| $route['default_controller'] = 'welcome';
|
@@ -33,38 +35,44 @@
|
| $route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
| $route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route['default_controller'] = "login";
$route['no_access/(:any)'] = "no_access/index/$1";
$route['no_access/(:any)/(:any)'] = "no_access/index/$1/$2";
$route['sales/index/(:any)'] = "sales/manage/$1";
$route['sales/index/(:any)/(:any)'] = "sales/manage/$1/$2";
$route['sales/index/(:any)/(:any)/(:any)'] = "sales/manage/$1/$2/$3";
$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/inventory_summary'] = "reports/inventory_summary_input";
$route['reports/(inventory_summary)/(:any)/(:any)/(:any)'] = "reports/$1/$2/$3/$4";
$route['default_controller'] = 'login';
$route['no_access/([^/]+)'] = 'no_access/index/$1';
$route['no_access/([^/]+)/([^/]+)'] = 'no_access/index/$1/$2';
$route['sales/index/([^/]+)'] = 'sales/manage/$1';
$route['sales/index/([^/]+)/([^/]+)'] = 'sales/manage/$1/$2';
$route['sales/index/([^/]+)/([^/]+)/([^/]+)'] = 'sales/manage/$1/$2/$3';
$route['reports/(summary_:any)/([^/]+)/([^/]+)'] = 'reports/$1/$2/$3';
$route['reports/summary_:any'] = 'reports/date_input_excel_export';
$route['reports/(graphical_:any)/([^/]+)/([^/]+)'] = 'reports/$1/$2/$3';
$route['reports/graphical_:any'] = 'reports/date_input';
$route['reports/(inventory_:any)/([^/]+)'] = 'reports/$1/$2';
$route['reports/inventory_:any'] = 'reports/excel_export';
$route['reports/inventory_summary'] = 'reports/inventory_summary_input';
$route['reports/(inventory_summary)/([^/]+)/([^/]+)/([^/]+)'] = 'reports/$1/$2/$3/$4';
$route['reports/(detailed_sales)/(:any)/(:any)/(:any)'] = "reports/$1/$2/$3$/$4";
$route['reports/detailed_sales'] = "reports/date_input_sales";
$route['reports/(detailed_receivings)/(:any)/(:any)/(:any)'] = "reports/$1/$2/$3/$4";
$route['reports/detailed_receivings'] = "reports/date_input_recv";
$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['reports/specific_discount'] = "reports/specific_discount_input";
$route['reports/(detailed_sales)/([^/]+)/([^/]+)/([^/]+)'] = 'reports/$1/$2/$3$/$4';
$route['reports/detailed_sales'] = 'reports/date_input_sales';
$route['reports/(detailed_receivings)/([^/]+)/([^/]+)/([^/]+)'] = 'reports/$1/$2/$3/$4';
$route['reports/detailed_receivings'] = 'reports/date_input_recv';
$route['reports/(specific_:any)/([^/]+)/([^/]+)/([^/]+)'] = 'reports/$1/$2/$3/$4';
$route['reports/specific_customer'] = 'reports/specific_customer_input';
$route['reports/specific_employee'] = 'reports/specific_employee_input';
$route['reports/specific_discount'] = 'reports/specific_discount_input';
$route['scaffolding_trigger'] = "";
$route['404_override'] = "";
/* End of file routes.php */
/* Location: ./application/config/routes.php */
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

View File

@@ -1,17 +1,18 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR 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:
| Individual images can be used to replace multiple smileys. For example:
| :-) and :) use the same image replacement.
|
| Please see user guide for more info:
| http://codeigniter.com/user_guide/helpers/smiley_helper.html
| https://codeigniter.com/user_guide/helpers/smiley_helper.html
|
*/
$smileys = array(
// smiley image name width height alt
@@ -57,10 +58,7 @@ $smileys = array(
':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
':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'),
':question:' => array('question.gif', '19', '19', 'question')
);
/* End of file smileys.php */
/* Location: ./application/config/smileys.php */
);

View File

@@ -1,178 +1,211 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| USER AGENT TYPES
| -------------------------------------------------------------------
| This file contains four arrays of user agent data. It is used by the
| 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
| 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'
);
$platforms = array(
'windows nt 10.0' => 'Windows 10',
'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',
'windows nt 5.1' => 'Windows XP',
'windows nt 5.0' => 'Windows 2000',
'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 phone' => 'Windows Phone',
'windows' => 'Unknown Windows OS',
'android' => 'Android',
'blackberry' => 'BlackBerry',
'iphone' => 'iOS',
'ipad' => 'iOS',
'ipod' => 'iOS',
'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',
'symbian' => 'Symbian 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(
'Flock' => 'Flock',
'Chrome' => 'Chrome',
'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',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse'
);
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => 'Spartan',
'Chrome' => 'Chrome',
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
'Opera.*?Version' => 'Opera',
'Opera' => 'Opera',
'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer',
'Trident.* rv' => 'Internet Explorer',
'Shiira' => 'Shiira',
'Firefox' => 'Firefox',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse',
'Maxthon' => 'Maxthon',
'Ubuntu' => 'Ubuntu Web Browser'
);
$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'
// 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",
'ipad' => "iPad",
'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",
// Phones and Manufacturers
'motorola' => 'Motorola',
'nokia' => 'Nokia',
'palm' => 'Palm',
'iphone' => 'Apple iPhone',
'ipad' => 'iPad',
'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',
'playstation 3' => 'PlayStation 3',
'playstation vita' => 'PlayStation Vita',
'hiptop' => 'Danger Hiptop',
'nec-' => 'NEC',
'panasonic' => 'Panasonic',
'philips' => 'Philips',
'sagem' => 'Sagem',
'sanyo' => 'Sanyo',
'spv' => 'SPV',
'zte' => 'ZTE',
'sendo' => 'Sendo',
'nintendo dsi' => 'Nintendo DSi',
'nintendo ds' => 'Nintendo DS',
'nintendo 3ds' => 'Nintendo 3DS',
'wii' => 'Nintendo Wii',
'open web' => 'Open Web',
'openweb' => 'OpenWeb',
// Operating Systems
'symbian' => "Symbian",
'SymbianOS' => "SymbianOS",
'elaine' => "Palm",
'palm' => "Palm",
'series60' => "Symbian S60",
'windows ce' => "Windows CE",
// Operating Systems
'android' => 'Android',
'symbian' => 'Symbian',
'SymbianOS' => 'SymbianOS',
'elaine' => '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",
// Browsers
'obigo' => 'Obigo',
'netfront' => 'Netfront Browser',
'openwave' => 'Openwave Browser',
'mobilexplorer' => 'Mobile Explorer',
'operamini' => 'Opera Mini',
'opera mini' => 'Opera Mini',
'opera mobi' => 'Opera Mobile',
'fennec' => 'Firefox Mobile',
// Other
'digital paths' => "Digital Paths",
'avantgo' => "AvantGo",
'xiino' => "Xiino",
'novarra' => "Novarra Transcoder",
'vodafone' => "Vodafone",
'docomo' => "NTT DoCoMo",
'o2' => "O2",
// 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"
);
// 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'
);
// There are hundreds of bots but these are the most common.
$robots = array(
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo',
'askjeeves' => 'AskJeeves',
'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos'
);
/* End of file user_agents.php */
/* Location: ./application/config/user_agents.php */
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider',
'bingbot' => 'Bing',
'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo',
'ask jeeves' => 'Ask Jeeves',
'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos',
'yandex' => 'YandexBot',
'mediapartners-google' => 'MediaPartners Google',
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
'adsbot-google' => 'AdsBot Google',
'feedfetcher-google' => 'Feedfetcher Google',
'curious george' => 'Curious George'
);

View File

@@ -1,5 +1,5 @@
<?php
require_once ("secure_area.php");
require_once ("Secure_area.php");
class Barcode extends Secure_area
{
function __construct()

View File

@@ -1,5 +1,5 @@
<?php
require_once ("secure_area.php");
require_once ("Secure_area.php");
class Config extends Secure_area
{
function __construct()
@@ -14,7 +14,6 @@ class Config extends Secure_area
$data['stock_locations'] = $this->Stock_location->get_all()->result_array();
$data['support_barcode'] = $this->barcode_lib->get_list_barcodes();
$this->load->view("configs/manage", $data);
$this->_remove_duplicate_cookies();
}
function save()
@@ -23,7 +22,7 @@ class Config extends Secure_area
$upload_data = $this->upload->data();
$batch_save_data=array(
'company'=>$this->input->post('company'),
'company'=>$this->input->post('company'),
'address'=>$this->input->post('address'),
'phone'=>$this->input->post('phone'),
'email'=>$this->input->post('email'),
@@ -34,10 +33,10 @@ class Config extends Secure_area
'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'),
'default_tax_2_name'=>$this->input->post('default_tax_2_name'),
'return_policy'=>$this->input->post('return_policy'),
'tax_included'=>$this->input->post('tax_included'),
'tax_included'=>$this->input->post('tax_included') != null,
'recv_invoice_format'=>$this->input->post('recv_invoice_format'),
'sales_invoice_format'=>$this->input->post('sales_invoice_format'),
'receiving_calculate_average_price'=>$this->input->post('receiving_calculate_average_price'),
'receiving_calculate_average_price'=>$this->input->post('receiving_calculate_average_price') != null,
'lines_per_page'=>$this->input->post('lines_per_page'),
'default_sales_discount'=>$this->input->post('default_sales_discount'),
'custom1_name'=>$this->input->post('custom1_name'),
@@ -62,14 +61,13 @@ class Config extends Secure_area
$message = $this->lang->line('config_saved_' . ($success ? '' : 'un') . 'successfully');
$message = $upload_success ? $message : $this->upload->display_errors();
echo json_encode(array('success'=>$success,'message'=>$message));
$this->_remove_duplicate_cookies();
}
function save_locale()
{
$batch_save_data=array(
'currency_symbol'=>$this->input->post('currency_symbol'),
'currency_side'=>$this->input->post('currency_side'),
'currency_side'=>$this->input->post('currency_side') != null,
'language'=>$this->input->post('language'),
'timezone'=>$this->input->post('timezone'),
'dateformat'=>$this->input->post('dateformat'),
@@ -81,8 +79,7 @@ class Config extends Secure_area
$result = $this->Appconfig->batch_save( $batch_save_data );
$success = $result ? true : false;
echo json_encode(array('success'=>$success, 'message'=>$this->lang->line('config_saved_' . ($success ? '' : 'un') . 'successfully')));
$this->_remove_duplicate_cookies();
}
}
function stock_locations()
{
@@ -127,7 +124,6 @@ class Config extends Secure_area
}
$success = $this->db->trans_complete();
echo json_encode(array('success'=>$success,'message'=>$this->lang->line('config_saved_' . ($success ? '' : 'un') . 'successfully')));
$this->_remove_duplicate_cookies();
}
function save_barcode()
@@ -145,7 +141,7 @@ class Config extends Secure_area
'barcode_num_in_row'=>$this->input->post('barcode_num_in_row'),
'barcode_page_width'=>$this->input->post('barcode_page_width'),
'barcode_page_cellspacing'=>$this->input->post('barcode_page_cellspacing'),
'barcode_generate_if_empty'=>$this->input->post('barcode_generate_if_empty'),
'barcode_generate_if_empty'=>$this->input->post('barcode_generate_if_empty') != null,
'barcode_content'=>$this->input->post('barcode_content')
);
@@ -157,18 +153,18 @@ class Config extends Secure_area
function save_receipt()
{
$batch_save_data = array (
'use_invoice_template' => $this->input->post ( 'use_invoice_template' ),
'use_invoice_template' => $this->input->post ( 'use_invoice_template' ) != null,
'invoice_default_comments' => $this->input->post ( 'invoice_default_comments' ),
'invoice_email_message' => $this->input->post ( 'invoice_email_message' ),
'receipt_show_taxes' => $this->input->post ( 'receipt_show_taxes' ),
'print_silently' => $this->input->post ( 'print_silently' ),
'print_header' => $this->input->post ( 'print_header' ),
'print_footer' => $this->input->post ( 'print_footer' ),
'receipt_show_taxes' => $this->input->post ( 'receipt_show_taxes' ) != null,
'print_silently' => $this->input->post ( 'print_silently' ) != null,
'print_header' => $this->input->post ( 'print_header' ) != null,
'print_footer' => $this->input->post ( 'print_footer' ) != null,
'print_top_margin' => $this->input->post ( 'print_top_margin' ),
'print_left_margin' => $this->input->post ( 'print_left_margin' ),
'print_bottom_margin' => $this->input->post ( 'print_bottom_margin' ),
'print_right_margin' => $this->input->post ( 'print_right_margin' ),
'show_total_discount' => $this->input->post( 'show_total_discount' )
'show_total_discount' => $this->input->post( 'show_total_discount' ) != null
);
$result = $this->Appconfig->batch_save( $batch_save_data );
$success = $result ? true : false;

View File

@@ -1,5 +1,6 @@
<?php
require_once ("person_controller.php");
require_once ("Person_controller.php");
class Customers extends Person_controller
{
function __construct()
@@ -9,27 +10,29 @@ class Customers extends Person_controller
function index($limit_from=0)
{
$data['controller_name']=$this->get_controller_name();
$data['form_width']=$this->get_form_width();
$data['controller_name'] = $this->get_controller_name();
$data['form_width'] = $this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$customers = $this->Customer->get_all($lines_per_page,$limit_from);
$data['links'] = $this->_initialize_pagination($this->Customer,$lines_per_page,$limit_from);
$data['manage_table']=get_people_manage_table($customers,$this);
$this->load->view('people/manage',$data);
$customers = $this->Customer->get_all($lines_per_page, $limit_from);
$data['links'] = $this->_initialize_pagination($this->Customer, $lines_per_page, $limit_from);
$data['manage_table'] = get_people_manage_table($customers, $this);
$this->load->view('people/manage', $data);
}
/*
Returns customer table data rows. This will be called with AJAX.
Returns customer table data rows. This will be called with AJAX.
*/
function search()
{
$search = $this->input->post('search');
$search = $this->input->post('search') != '' ? $this->input->post('search') : null;
$limit_from = $this->input->post('limit_from');
$lines_per_page = $this->Appconfig->get('lines_per_page');
$customers = $this->Customer->search($search, $lines_per_page, $limit_from);
$total_rows = $this->Customer->get_found_rows($search);
$links = $this->_initialize_pagination($this->Customer,$lines_per_page, $limit_from, $total_rows);
$data_rows=get_people_manage_table_data_rows($customers,$this);
$data_rows = get_people_manage_table_data_rows($customers, $this);
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
}
@@ -57,25 +60,25 @@ class Customers extends Person_controller
function save($customer_id=-1)
{
$person_data = array(
'first_name'=>$this->input->post('first_name'),
'last_name'=>$this->input->post('last_name'),
'gender'=>$this->input->post('gender'),
'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')
'first_name'=>$this->input->post('first_name'),
'last_name'=>$this->input->post('last_name'),
'gender'=>$this->input->post('gender'),
'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'),
'company_name'=>$this->input->post('company_name')=='' ? null:$this->input->post('company_name'),
'taxable'=>$this->input->post('taxable')=='' ? 0:1,
'account_number'=>$this->input->post('account_number') == '' ? null : $this->input->post('account_number'),
'company_name'=>$this->input->post('company_name') == '' ? null : $this->input->post('company_name'),
'taxable'=>$this->input->post('taxable') != null
);
if($this->Customer->save($person_data,$customer_data,$customer_id))
if($this->Customer->save_customer($person_data,$customer_data,$customer_id))
{
//New customer
if($customer_id==-1)
@@ -99,7 +102,7 @@ class Customers extends Person_controller
function check_account_number()
{
$exists = $this->Customer->account_number_exists($this->input->post('account_number'),$this->input->post('person_id'));
echo json_encode(array('success'=>!$exists,'message'=>$this->lang->line('customers_account_number_duplicate')));
echo !$exists ? 'true' : 'false';
}
/*
@@ -179,7 +182,7 @@ class Customers extends Person_controller
$invalidated = $this->Customer->account_number_exists($account_number);
}
if($invalidated || !$this->Customer->save($person_data,$customer_data))
if($invalidated || !$this->Customer->save_customer($person_data,$customer_data))
{
$failCodes[] = $i;
}

View File

@@ -1,5 +1,6 @@
<?php
require_once ("person_controller.php");
require_once ("Person_controller.php");
class Employees extends Person_controller
{
function __construct()
@@ -9,12 +10,12 @@ class Employees extends Person_controller
function index($limit_from=0)
{
$data['controller_name']=$this->get_controller_name();
$data['form_width']=$this->get_form_width();
$data['controller_name'] = $this->get_controller_name();
$data['form_width'] = $this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$suppliers = $this->Employee->get_all($lines_per_page,$limit_from);
$data['links'] = $this->_initialize_pagination($this->Employee,$lines_per_page,$limit_from);
$data['manage_table']=get_people_manage_table($suppliers,$this);
$suppliers = $this->Employee->get_all($lines_per_page, $limit_from);
$data['links'] = $this->_initialize_pagination($this->Employee, $lines_per_page, $limit_from);
$data['manage_table'] = get_people_manage_table($suppliers, $this);
$this->load->view('suppliers/manage',$data);
}
@@ -23,13 +24,15 @@ class Employees extends Person_controller
*/
function search()
{
$search = $this->input->post('search');
$search = $this->input->post('search') != '' ? $this->input->post('search') : null;
$limit_from = $this->input->post('limit_from');
$lines_per_page = $this->Appconfig->get('lines_per_page');
$employees = $this->Employee->search($search, $limit_from, $lines_per_page);
$total_rows = $this->Employee->get_found_rows($search);
$links = $this->_initialize_pagination($this->Employee, $lines_per_page, $limit_from, $total_rows);
$data_rows=get_people_manage_table_data_rows($employees,$this);
$data_rows = get_people_manage_table_data_rows($employees, $this);
echo json_encode(array('rows' => $data_rows, 'pagination' => $links));
}
@@ -59,27 +62,27 @@ class Employees extends Person_controller
function save($employee_id=-1)
{
$person_data = array(
'first_name'=>$this->input->post('first_name'),
'last_name'=>$this->input->post('last_name'),
'gender'=>$this->input->post('gender'),
'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')
'first_name'=>$this->input->post('first_name'),
'last_name'=>$this->input->post('last_name'),
'gender'=>$this->input->post('gender'),
'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')
);
$grants_data = $this->input->post("grants")!=FALSE ? $this->input->post("grants"):array();
$grants_data = $this->input->post('grants') != null ? $this->input->post('grants') : array();
//Password has been changed OR first time password set
if($this->input->post('password')!='')
if ( $this->input->post('password') != '' )
{
$employee_data=array(
'username'=>$this->input->post('username'),
'password'=>md5($this->input->post('password'))
'username'=>$this->input->post('username'),
'password'=>md5($this->input->post('password'))
);
}
else //Password not changed
@@ -87,7 +90,7 @@ class Employees extends Person_controller
$employee_data=array('username'=>$this->input->post('username'));
}
if($this->Employee->save($person_data,$employee_data,$grants_data,$employee_id))
if($this->Employee->save_employee($person_data,$employee_data,$grants_data,$employee_id))
{
//New employee
if($employee_id==-1)

View File

@@ -1,6 +1,6 @@
<?php
require_once ("secure_area.php");
require_once ("interfaces/idata_controller.php");
require_once ("Secure_area.php");
require_once ("interfaces/Idata_controller.php");
class Giftcards extends Secure_area implements iData_controller
{
@@ -20,15 +20,20 @@ class Giftcards extends Secure_area implements iData_controller
$this->load->view('giftcards/manage', $data);
}
/*
Returns Giftcards table data rows. This will be called with AJAX.
*/
function search()
{
$search = $this->input->post('search');
$search = $this->input->post('search') != '' ? $this->input->post('search') : null;
$limit_from = $this->input->post('limit_from');
$lines_per_page = $this->Appconfig->get('lines_per_page');
$giftcards = $this->Giftcard->search($search, $lines_per_page, $limit_from);
$total_rows = $this->Giftcard->get_found_rows($search);
$links = $this->_initialize_pagination($this->Giftcard, $lines_per_page, $limit_from, $total_rows);
$data_rows = get_giftcards_manage_table_data_rows($giftcards, $this);
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
}
@@ -73,7 +78,7 @@ class Giftcards extends Secure_area implements iData_controller
'record_time' => date('Y-m-d H:i:s'),
'giftcard_number'=>$this->input->post('giftcard_number', TRUE),
'value'=>$this->input->post('value', TRUE),
'person_id'=>$this->input->post('person_id', TRUE) ? $this->input->post('person_id') : NULL
'person_id'=>$this->input->post('person_id', TRUE) ? $this->input->post('person_id') : null
);
if( $this->Giftcard->save( $giftcard_data, $giftcard_id ) )

View File

@@ -1,5 +1,5 @@
<?php
require_once ("secure_area.php");
require_once ("Secure_area.php");
class Home extends Secure_area
{

View File

@@ -1,6 +1,7 @@
<?php
require_once ("secure_area.php");
require_once ("interfaces/idata_controller.php");
require_once ("Secure_area.php");
require_once ("interfaces/Idata_controller.php");
class Item_kits extends Secure_area implements iData_controller
{
function __construct()
@@ -42,14 +43,17 @@ class Item_kits extends Secure_area implements iData_controller
$data['manage_table'] = get_item_kits_manage_table($item_kits, $this);
$this->load->view('item_kits/manage', $data);
$this->_remove_duplicate_cookies();
}
/*
Returns Item kits table data rows. This will be called with AJAX.
*/
function search()
{
$search = $this->input->post('search');
$search = $this->input->post('search') != '' ? $this->input->post('search') : null;
$limit_from = $this->input->post('limit_from');
$lines_per_page = $this->Appconfig->get('lines_per_page');
$item_kits = $this->Item_kit->search($search, $lines_per_page, $limit_from);
$total_rows = $this->Item_kit->get_found_rows($search);
$links = $this->_initialize_pagination($this->Item_kit, $lines_per_page, $limit_from, $total_rows, 'search');
@@ -61,7 +65,6 @@ class Item_kits extends Secure_area implements iData_controller
}
$data_rows = get_item_kits_manage_table_data_rows($item_kits, $this);
$this->_remove_duplicate_cookies();
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
}
@@ -84,7 +87,6 @@ class Item_kits extends Secure_area implements iData_controller
$item_kit = $this->add_totals_to_item_kit($this->Item_kit->get_info($item_kit_id));
echo (get_item_kit_data_row($item_kit, $this));
$this->_remove_duplicate_cookies();
}
function view($item_kit_id=-1)
@@ -118,7 +120,7 @@ class Item_kits extends Secure_area implements iData_controller
'item_kit_id'=>$item_kit_id));
}
if ($this->input->post('item_kit_item'))
if ( $this->input->post('item_kit_item') != null )
{
$item_kit_items = array();
foreach($this->input->post('item_kit_item') as $item_id => $quantity)

View File

@@ -1,6 +1,6 @@
<?php
require_once ("secure_area.php");
require_once ("interfaces/idata_controller.php");
require_once ("Secure_area.php");
require_once ("interfaces/Idata_controller.php");
class Items extends Secure_area implements iData_controller
{
@@ -21,13 +21,13 @@ class Items extends Secure_area implements iData_controller
$items = $this->Item->get_all($stock_location, $lines_per_page, $limit_from);
$data['links'] = $this->_initialize_pagination($this->Item, $lines_per_page, $limit_from);
// assume year 2010 as starting date for OSPOS
// set 01/01/2010 as starting date for OSPOS
$start_of_time = date($this->config->item('dateformat'), mktime(0,0,0,1,1,2010));
$today = date($this->config->item('dateformat'));
$start_date = $this->input->post('start_date') != NULL ? $this->input->post('start_date', TRUE) : $start_of_time;
$start_date = $this->input->post('start_date') != null ? $this->input->post('start_date') : $start_of_time;
$start_date_formatter = date_create_from_format($this->config->item('dateformat'), $start_date);
$end_date = $this->input->post('end_date') != NULL ? $this->input->post('end_date', TRUE) : $today;
$end_date = $this->input->post('end_date') != null ? $this->input->post('end_date') : $today;
$end_date_formatter = date_create_from_format($this->config->item('dateformat'), $end_date);
$data['start_date'] = $start_date_formatter->format($this->config->item('dateformat'));
@@ -38,51 +38,51 @@ class Items extends Secure_area implements iData_controller
$data['manage_table'] = get_items_manage_table( $this->Item->get_all($stock_location, $lines_per_page, $limit_from), $this );
$this->load->view('items/manage', $data);
$this->_remove_duplicate_cookies();
}
function find_item_info()
{
$item_number=$this->input->post('scan_item_number');
$item_number = $this->input->post('scan_item_number');
echo json_encode($this->Item->find_item_info($item_number));
}
/*
Returns Items table data rows. This will be called with AJAX.
*/
function search()
{
$search = $this->input->post('search');
$this->item_lib->set_item_location($this->input->post('stock_location'));
$data['search_section_state'] = $this->input->post('search_section_state');
$search = $this->input->post('search') != '' ? $this->input->post('search') : null;
$limit_from = $this->input->post('limit_from');
$lines_per_page = $this->Appconfig->get('lines_per_page');
$this->item_lib->set_item_location($this->input->post('stock_location'));
// assume year 2010 as starting date for OSPOS
// set 01/01/2010 as starting date for OSPOS
$start_of_time = date($this->config->item('dateformat'), mktime(0,0,0,1,1,2010));
$today = date($this->config->item('dateformat'));
$start_date = $this->input->post('start_date') != NULL ? $this->input->post('start_date', TRUE) : $start_of_time;
$start_date = $this->input->post('start_date') != null ? $this->input->post('start_date') : $start_of_time;
$start_date_formatter = date_create_from_format($this->config->item('dateformat'), $start_date);
$end_date = $this->input->post('end_date') != NULL ? $this->input->post('end_date', TRUE) : $today;
$end_date = $this->input->post('end_date') != null ? $this->input->post('end_date') : $today;
$end_date_formatter = date_create_from_format($this->config->item('dateformat'), $end_date);
$filters = array('start_date' => $start_date_formatter->format('Y-m-d'),
'end_date' => $end_date_formatter->format('Y-m-d'),
'stock_location_id' => $this->item_lib->get_item_location(),
'empty_upc' => $this->input->post('empty_upc'),
'low_inventory' => $this->input->post('low_inventory'),
'is_serialized' => $this->input->post('is_serialized'),
'no_description' => $this->input->post('no_description'),
'search_custom' => $this->input->post('search_custom'),
'is_deleted' => $this->input->post('is_deleted'));
'empty_upc' => $this->input->post('empty_upc') != null,
'low_inventory' => $this->input->post('low_inventory') != null,
'is_serialized' => $this->input->post('is_serialized') != null,
'no_description' => $this->input->post('no_description') != null,
'search_custom' => $this->input->post('search_custom') != null,
'is_deleted' => $this->input->post('is_deleted') != null);
$items = $this->Item->search($search, $filters, $lines_per_page, $limit_from);
$data_rows = get_items_manage_table_data_rows($items, $this);
$total_rows = $this->Item->get_found_rows($search, $filters);
$links = $this->_initialize_pagination($this->Item, $lines_per_page, $limit_from, $total_rows, 'search');
$data_rows = get_items_manage_table_data_rows($items, $this);
// do not move this line to be after the json_encode otherwise the searhc function won't work!!
$this->_remove_duplicate_cookies();
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
}
@@ -120,7 +120,7 @@ class Items extends Secure_area implements iData_controller
function suggest()
{
$suggestions = $this->Item->get_search_suggestions($this->input->post('q'), $this->input->post('limit'),
$this->input->post('search_custom'), $this->input->post('is_deleted'));
$this->input->post('search_custom'), !empty($this->input->post('is_deleted')));
echo implode("\n",$suggestions);
}
@@ -263,7 +263,6 @@ class Items extends Secure_area implements iData_controller
echo $data_row;
$this->_remove_duplicate_cookies();
}
function view($item_id=-1)
@@ -386,30 +385,30 @@ class Items extends Secure_area implements iData_controller
{
$upload_success = $this->_handle_image_upload();
$upload_data = $this->upload->data();
//Save item data
//Save item data
$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'),
'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'),
'reorder_level'=>$this->input->post('reorder_level'),
'receiving_quantity'=>$this->input->post('receiving_quantity'),
'allow_alt_description'=>$this->input->post('allow_alt_description'),
'is_serialized'=>$this->input->post('is_serialized'),
'deleted'=>$this->input->post('is_deleted'),
'custom1'=>$this->input->post('custom1'),
'custom2'=>$this->input->post('custom2'),
'custom3'=>$this->input->post('custom3'),
'custom4'=>$this->input->post('custom4'),
'custom5'=>$this->input->post('custom5'),
'custom6'=>$this->input->post('custom6'),
'custom7'=>$this->input->post('custom7'),
'custom8'=>$this->input->post('custom8'),
'custom9'=>$this->input->post('custom9'),
'custom10'=>$this->input->post('custom10')
'allow_alt_description'=>$this->input->post('allow_alt_description') != null,
'is_serialized'=>$this->input->post('is_serialized') != null,
'deleted'=>$this->input->post('is_deleted') != null,
'custom1'=>$this->input->post('custom1') == null ? '' : $this->input->post('custom1'),
'custom2'=>$this->input->post('custom2') == null ? '' : $this->input->post('custom2'),
'custom3'=>$this->input->post('custom3') == null ? '' : $this->input->post('custom3'),
'custom4'=>$this->input->post('custom4') == null ? '' : $this->input->post('custom4'),
'custom5'=>$this->input->post('custom5') == null ? '' : $this->input->post('custom5'),
'custom6'=>$this->input->post('custom6') == null ? '' : $this->input->post('custom6'),
'custom7'=>$this->input->post('custom7') == null ? '' : $this->input->post('custom7'),
'custom8'=>$this->input->post('custom8') == null ? '' : $this->input->post('custom8'),
'custom9'=>$this->input->post('custom9') == null ? '' : $this->input->post('custom9'),
'custom10'=>$this->input->post('custom10') == null ? '' : $this->input->post('custom10')
);
if (!empty($upload_data['orig_name']))
@@ -467,13 +466,12 @@ class Items extends Secure_area implements iData_controller
$success &= $this->Inventory->insert($inv_data);
}
}
if ($success && $upload_success)
}
if ($success && $upload_success)
{
$success_message = $this->lang->line('items_successful_' . ($new_item ? 'adding' : 'updating')) .' '. $item_data['name'];
echo json_encode(array('success'=>true,'message'=>$success_message,'item_id'=>$item_id));
echo json_encode(array('success'=>true, 'message'=>$success_message, 'item_id'=>$item_id));
}
else
{
@@ -481,23 +479,20 @@ class Items extends Secure_area implements iData_controller
$this->lang->line('items_error_adding_updating') .' '. $item_data['name'] :
$this->upload->display_errors();
echo json_encode(array('success'=>false,
'message'=>$error_message,'item_id'=>$item_id));
echo json_encode(array('success'=>false, 'message'=>$error_message, 'item_id'=>$item_id));
}
}
else//failure
{
echo json_encode(array('success'=>false,
'message'=>$this->lang->line('items_error_adding_updating').' '
.$item_data['name'],'item_id'=>-1));
echo json_encode(array('success'=>false, 'message'=>$this->lang->line('items_error_adding_updating').' '.$item_data['name'], 'item_id'=>-1));
}
}
function check_item_number()
{
$exists = $this->Item->item_number_exists($this->input->post('item_number'),$this->input->post('item_id'));
echo json_encode(array('success'=>!$exists,'message'=>$this->lang->line('items_item_number_duplicate')));
echo !$exists ? 'true' : 'false';
}
function _handle_image_upload()
@@ -563,11 +558,11 @@ class Items extends Secure_area implements iData_controller
foreach($_POST as $key=>$value)
{
//This field is nullable, so treat it differently
if ($key == 'supplier_id')
{
$item_data["$key"]=$value == '' ? null : $value;
if($key == 'supplier_id' && $value != '')
{
$item_data["$key"] = $value;
}
elseif($value!='' and !(in_array($key, array('submit', 'item_ids', 'tax_names', 'tax_percents', 'category'))))
elseif($value != '' && !(in_array($key, array('submit', 'item_ids', 'tax_names', 'tax_percents'))))
{
$item_data["$key"]=$value;
}
@@ -579,14 +574,21 @@ class Items extends Secure_area implements iData_controller
$items_taxes_data = array();
$tax_names = $this->input->post('tax_names');
$tax_percents = $this->input->post('tax_percents');
$tax_updated = false;
for($k=0;$k<count($tax_percents);$k++)
{
if (is_numeric($tax_percents[$k]))
if (!empty($tax_names[$k]) && is_numeric($tax_percents[$k]))
{
$tax_updated = true;
$items_taxes_data[] = array('name'=>$tax_names[$k], 'percent'=>$tax_percents[$k] );
}
}
$this->Item_taxes->save_multiple($items_taxes_data, $items_to_update);
if($tax_updated)
{
$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')));
}

View File

@@ -62,7 +62,7 @@ class Languagecheck extends CI_Controller {
foreach( $references as $reference )
{
// skip non-language files in the language directory
if ( strpos($reference, '_lang'.EXT) === FALSE )
if ( strpos($reference, '_lang.php') === FALSE )
{
continue;
}

View File

@@ -30,13 +30,15 @@ class Login extends CI_Controller
function login_check($username)
{
$password = $this->input->post("password");
$password = $this->input->post('password');
if(!$this->Employee->login($username,$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;
}
}

View File

@@ -1,6 +1,6 @@
<?php
require_once ("interfaces/iperson_controller.php");
require_once ("secure_area.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)
@@ -31,14 +31,14 @@ abstract class Person_controller extends Secure_area implements iPerson_controll
echo '#';
}
/*
Gives search suggestions based on what is being searched for
*/
function suggest()
{
$suggestions = $this->Person->get_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()
{
$suggestions = $this->Person->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
echo implode("\n",$suggestions);
}
/*
Gets one row for a person manage table. This is called using AJAX to update one row.

View File

@@ -1,5 +1,5 @@
<?php
require_once ("secure_area.php");
require_once ("Secure_area.php");
class Receivings extends Secure_area
{
function __construct()
@@ -29,20 +29,23 @@ class Receivings extends Secure_area
function select_supplier()
{
$supplier_id = $this->input->post("supplier");
$this->receiving_lib->set_supplier($supplier_id);
$supplier_id = $this->input->post('supplier');
if ($this->Supplier->exists($supplier_id))
{
$this->receiving_lib->set_supplier($supplier_id);
}
$this->_reload();
}
function change_mode()
{
$stock_destination = $this->input->post('stock_destination');
$stock_source = $this->input->post("stock_source");
$stock_source = $this->input->post('stock_source');
if ((!$stock_source || $stock_source == $this->receiving_lib->get_stock_source()) &&
(!$stock_destination || $stock_destination == $this->receiving_lib->get_stock_destination()))
{
$this->receiving_lib->clear_invoice_number();
$mode = $this->input->post("mode");
$mode = $this->input->post('mode');
$this->receiving_lib->set_mode($mode);
}
else if ($this->Stock_location->is_allowed_location($stock_source, 'receivings'))
@@ -77,7 +80,7 @@ class Receivings extends Secure_area
{
$data=array();
$mode = $this->receiving_lib->get_mode();
$item_id_or_number_or_item_kit_or_receipt = $this->input->post("item");
$item_id_or_number_or_item_kit_or_receipt = $this->input->post('item');
$quantity = ($mode=="receive" or $mode=="requisition") ? 1:-1;
$item_location = $this->receiving_lib->get_stock_source();
if($mode=='return' && $this->receiving_lib->is_valid_receipt($item_id_or_number_or_item_kit_or_receipt))
@@ -104,12 +107,12 @@ class Receivings extends Secure_area
$this->form_validation->set_rules('quantity', 'lang:items_quantity', 'required|numeric');
$this->form_validation->set_rules('discount', 'lang:items_discount', '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");
$item_location = $this->input->post("location");
$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');
$item_location = $this->input->post('location');
if ($this->form_validation->run() != FALSE)
{
@@ -190,7 +193,7 @@ class Receivings extends Secure_area
$emp_info=$this->Employee->get_info($employee_id);
$payment_type=$this->input->post('payment_type');
$data['stock_location']=$this->receiving_lib->get_stock_source();
if ($this->input->post('amount_tendered'))
if ( $this->input->post('amount_tendered') != null )
{
$data['amount_tendered'] = $this->input->post('amount_tendered');
$data['amount_change'] = to_currency($data['amount_tendered'] - round($data['total'], 2));
@@ -210,7 +213,7 @@ class Receivings extends Secure_area
}
else
{
$invoice_number = $this->receiving_lib->is_invoice_number_enabled() ? $invoice_number : NULL;
$invoice_number = $this->receiving_lib->is_invoice_number_enabled() ? $invoice_number : null;
$data['invoice_number']=$invoice_number;
$data['payment_type']=$this->input->post('payment_type');
//SAVE receiving to database
@@ -225,7 +228,6 @@ class Receivings extends Secure_area
$this->load->view("receivings/receipt",$data);
$this->receiving_lib->clear_all();
}
$this->_remove_duplicate_cookies();
}
private function _substitute_variable($text, $variable, $object, $function)
@@ -320,7 +322,6 @@ class Receivings extends Secure_area
$data['print_after_sale'] = FALSE;
$this->load->view("receivings/receipt",$data);
$this->receiving_lib->clear_all();
$this->_remove_duplicate_cookies();
}
private function _reload($data=array())
@@ -361,7 +362,6 @@ class Receivings extends Secure_area
$data['invoice_number_enabled']=$this->receiving_lib->is_invoice_number_enabled();
$data['print_after_sale']=$this->receiving_lib->is_print_after_sale();
$this->load->view("receivings/receiving",$data);
$this->_remove_duplicate_cookies();
}
function save($receiving_id)
@@ -370,10 +370,10 @@ class Receivings extends Secure_area
$receiving_data = array(
'receiving_time' => $date_formatter->format('Y-m-d H:i:s'),
'supplier_id' => $this->input->post('supplier_id') ? $this->input->post('supplier_id') : null,
'supplier_id' => empty($this->input->post('supplier_id')) ? NULL : $this->input->post('supplier_id'),
'employee_id' => $this->input->post('employee_id'),
'comment' => $this->input->post('comment'),
'invoice_number' => $this->input->post('invoice_number') != '' ? $this->input->post('invoice_number') : null
'invoice_number' => $this->input->post('invoice_number')
);
if ($this->Receiving->update($receiving_data, $receiving_id))
@@ -405,7 +405,7 @@ class Receivings extends Secure_area
$receiving_id=$this->input->post('receiving_id');
$invoice_number=$this->input->post('invoice_number');
$exists=!empty($invoice_number) && $this->Receiving->invoice_number_exists($invoice_number,$receiving_id);
echo json_encode(array('success'=>!$exists,'message'=>$this->lang->line('recvs_invoice_number_duplicate')));
echo !$exists ? 'true' : 'false';
}
}
?>

View File

@@ -1,6 +1,6 @@
<?php
require_once ("secure_area.php");
require_once (APPPATH."libraries/ofc-library/open-flash-chart.php");
require_once ("Secure_area.php");
require_once (APPPATH."libraries/ofc-library/Open-flash-chart.php");
define("FORM_WIDTH", "400");
@@ -97,7 +97,7 @@ class Reports extends Secure_area
echo get_detailed_data_row($summary_data, $this);
}
function get_summary_data($start_date, $end_date = NULL, $sale_type=0)
function get_summary_data($start_date, $end_date = null, $sale_type=0)
{
$end_date = $end_date ? $end_date : $start_date;
$this->load->model('reports/Summary_sales');

View File

@@ -1,5 +1,6 @@
<?php
require_once ("secure_area.php");
require_once ("Secure_area.php");
class Sales extends Secure_area
{
function __construct()
@@ -26,34 +27,34 @@ class Sales extends Secure_area
{
$this->Sale->create_sales_items_temp_table();
$data['controller_name'] = strtolower($this->uri->segment(1));
$data['only_invoices'] = array($this->lang->line('sales_no_filter'), $this->lang->line('sales_invoice'));
$data['search_section_state'] = $this->input->post('search_section_state');
$data['controller_name'] = $this->get_controller_name();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$today = date($this->config->item('dateformat'));
$start_date = $this->input->post('start_date') != NULL ? $this->input->post('start_date', TRUE) : $today;
$start_date = $this->input->post('start_date') != null ? $this->input->post('start_date') : $today;
$start_date_formatter = date_create_from_format($this->config->item('dateformat'), $start_date);
$end_date = $this->input->post('end_date') != NULL ? $this->input->post('end_date', TRUE) : $today;
$end_date = $this->input->post('end_date') != null ? $this->input->post('end_date') : $today;
$end_date_formatter = date_create_from_format($this->config->item('dateformat'), $end_date);
$sale_type = 'all';
$sale_type = 'all';
$location_id = 'all';
$is_valid_receipt = FALSE;
$search = null;
$filters = array('sale_type' => $sale_type,
'location_id' => $location_id,
'start_date' => $start_date_formatter->format('Y-m-d'),
'end_date' => $end_date_formatter->format('Y-m-d'),
'only_invoices' => $only_invoices,
'only_cash' => $only_cash,
'is_valid_receipt' => $is_valid_receipt);
'location_id' => $location_id,
'start_date' => $start_date_formatter->format('Y-m-d'),
'end_date' => $end_date_formatter->format('Y-m-d'),
'only_invoices' => $only_invoices,
'only_cash' => $only_cash,
'is_valid_receipt' => $is_valid_receipt);
$sales = $this->Sale->search($search, $filters, $lines_per_page, $limit_from)->result_array();
$payments = $this->Sale->get_payments_summary($search, $filters);
$total_rows = $this->Sale->get_found_rows($search, $filters);
$data['only_invoices'] = $only_invoices;
$data['only_cash '] = $only_cash;
$data['start_date'] = $start_date_formatter->format($this->config->item('dateformat'));
$data['end_date'] = $end_date_formatter->format($this->config->item('dateformat'));
$data['links'] = $this->_initialize_pagination($this->Sale, $lines_per_page, $limit_from, $total_rows, 'manage', $only_invoices);
@@ -63,7 +64,6 @@ class Sales extends Secure_area
$this->load->view($data['controller_name'] . '/manage', $data);
}
$this->_remove_duplicate_cookies();
}
function get_row()
@@ -86,27 +86,31 @@ class Sales extends Secure_area
{
return 400;
}
/*
Returns Sales table data rows. This will be called with AJAX.
*/
function search()
{
$this->Sale->create_sales_items_temp_table();
$only_invoices = $this->input->post('only_invoices', TRUE);
$only_cash = $this->input->post('only_cash', TRUE);
$search = $this->input->post('search') != '' ? $this->input->post('search') : null;
$limit_from = $this->input->post('limit_from');
$lines_per_page = $this->Appconfig->get('lines_per_page');
$limit_from = $this->input->post('limit_from', TRUE);
$search = $this->input->post('search', TRUE);
$today = date($this->config->item('dateformat'));
$start_date = $this->input->post('start_date') != NULL ? $this->input->post('start_date', TRUE) : $today;
$start_date = $this->input->post('start_date') != null ? $this->input->post('start_date') : $today;
$start_date_formatter = date_create_from_format($this->config->item('dateformat'), $start_date);
$end_date = $this->input->post('end_date') != NULL ? $this->input->post('end_date', TRUE) : $today;
$end_date = $this->input->post('end_date') != null ? $this->input->post('end_date') : $today;
$end_date_formatter = date_create_from_format($this->config->item('dateformat'), $end_date);
$is_valid_receipt = isset($search) ? $this->sale_lib->is_valid_receipt($search) : FALSE;
$sale_type = 'all';
$location_id = 'all';
$only_invoices = $this->input->post('only_invoices') != null;
$only_cash = $this->input->post('only_cash') != null;
$filters = array('sale_type' => $sale_type,
'location_id' => $location_id,
@@ -122,45 +126,52 @@ class Sales extends Secure_area
$links = $this->_initialize_pagination($this->Sale, $lines_per_page, $limit_from, $total_rows, 'search', $only_invoices);
$sale_rows = get_sales_manage_table_data_rows($sales, $this);
$payment_summary = get_sales_manage_payments_summary($payments, $sales, $this);
$this->_remove_duplicate_cookies();
echo json_encode(array('total_rows' => $total_rows, 'rows' => $sale_rows, 'pagination' => $links, 'payment_summary' => $payment_summary));
}
function item_search()
{
$suggestions = array();
$search = $this->input->post('q');
$limit = $this->input->post('limit');
if ($this->sale_lib->get_mode() == 'return')
if ($this->sale_lib->get_mode() == 'return' && $this->sale_lib->is_valid_receipt($search) )
{
$this->sale_lib->is_valid_receipt($this->input->post('q')) && $suggestions[] = $this->input->post('q');
$suggestions[] = $search;
}
$suggestions = array_merge($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')));
$suggestions = array_merge($suggestions, $this->Item->get_item_search_suggestions($search , $limit));
$suggestions = array_merge($suggestions, $this->Item_kit->get_item_kit_search_suggestions($search, $limit));
echo implode("\n", $suggestions);
}
function customer_search()
{
$suggestions = $this->Customer->get_customer_search_suggestions($this->input->post('q'),$this->input->post('limit'));
$search = $this->input->post('q');
$limit = $this->input->post('limit');
$suggestions = $this->Customer->get_customer_search_suggestions($search, $limit);
echo implode("\n",$suggestions);
echo implode("\n", $suggestions);
}
function suggest()
{
$search = $this->input->post('q', TRUE);
$limit = $this->input->post('limit', TRUE);
$search = $this->input->post('q');
$limit = $this->input->post('limit');
$suggestions = $this->Sale->get_search_suggestions($search, $limit);
echo implode("\n",$suggestions);
echo implode("\n", $suggestions);
}
function select_customer()
{
$customer_id = $this->input->post("customer");
$this->sale_lib->set_customer($customer_id);
$customer_id = $this->input->post('customer');
if ($this->Customer->exists($customer_id))
{
$this->sale_lib->set_customer($customer_id);
}
$this->_reload();
}
@@ -208,11 +219,11 @@ class Sales extends Secure_area
function add_payment()
{
$data = array();
$this->form_validation->set_rules( 'amount_tendered', 'lang:sales_amount_tendered', 'trim|required|numeric' );
$this->form_validation->set_rules('amount_tendered', 'lang:sales_amount_tendered', 'trim|required|numeric');
if ( $this->form_validation->run() == FALSE )
{
if ( $this->input->post( 'payment_type' ) == $this->lang->line( 'sales_gift_card' ) )
if ( $this->input->post('payment_type') == $this->lang->line('sales_gift_card') )
{
$data['error']=$this->lang->line('sales_must_enter_numeric_giftcard');
}
@@ -226,34 +237,34 @@ class Sales extends Secure_area
return;
}
$payment_type = $this->input->post( 'payment_type' );
if ( $payment_type == $this->lang->line( 'sales_giftcard' ) )
$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;
$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'] = $this->lang->line('giftcards_remaining_balance', $this->input->post( 'amount_tendered' ), to_currency( $this->Giftcard->get_giftcard_value( $this->input->post( 'amount_tendered' ))));
$data['error'] = $this->lang->line('giftcards_remaining_balance', $this->input->post('amount_tendered'), to_currency( $this->Giftcard->get_giftcard_value( $this->input->post('amount_tendered'))));
$this->_reload( $data );
return;
}
$new_giftcard_value = $this->Giftcard->get_giftcard_value( $this->input->post( 'amount_tendered' ) ) - $this->sale_lib->get_amount_due( );
$new_giftcard_value = $this->Giftcard->get_giftcard_value( $this->input->post('amount_tendered') ) - $this->sale_lib->get_amount_due();
$new_giftcard_value = ( $new_giftcard_value >= 0 ) ? $new_giftcard_value : 0;
$this->sale_lib->set_giftcard_remainder($new_giftcard_value);
$data['warning'] = $this->lang->line('giftcards_remaining_balance', $this->input->post( 'amount_tendered' ), to_currency( $new_giftcard_value, TRUE ));
$payment_amount = min( $this->sale_lib->get_amount_due( ), $this->Giftcard->get_giftcard_value( $this->input->post( 'amount_tendered' ) ) );
$data['warning'] = $this->lang->line('giftcards_remaining_balance', $this->input->post('amount_tendered'), to_currency( $new_giftcard_value, TRUE ));
$payment_amount = min( $this->sale_lib->get_amount_due( ), $this->Giftcard->get_giftcard_value( $this->input->post('amount_tendered') ) );
}
else
{
$payment_amount = $this->input->post( 'amount_tendered' );
$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!';
$data['error'] = 'Unable to Add Payment! Please try again!';
}
$this->_reload($data);
@@ -268,10 +279,10 @@ class Sales extends Secure_area
function add()
{
$data=array();
$data = array();
$mode = $this->sale_lib->get_mode();
$item_id_or_number_or_item_kit_or_receipt = $this->input->post("item");
$quantity = ($mode=="return")? -1:1;
$item_id_or_number_or_item_kit_or_receipt = $this->input->post('item');
$quantity = ($mode == "return") ? -1 : 1;
$item_location = $this->sale_lib->get_sale_location();
if($mode == 'return' && $this->sale_lib->is_valid_receipt($item_id_or_number_or_item_kit_or_receipt))
@@ -284,13 +295,11 @@ class Sales extends Secure_area
}
else if(!$this->sale_lib->add_item($item_id_or_number_or_item_kit_or_receipt,$quantity,$item_location,$this->config->item('default_sales_discount')))
{
$data['error']=$this->lang->line('sales_unable_to_add_item');
$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,$item_location))
{
$data['warning'] = $this->lang->line('sales_quantity_less_than_zero');
}
$data['warning'] = $this->sale_lib->out_of_stock($item_id_or_number_or_item_kit_or_receipt,$item_location);
$this->_reload($data);
}
@@ -302,12 +311,12 @@ class Sales extends Secure_area
$this->form_validation->set_rules('quantity', 'lang:items_quantity', 'required|numeric');
$this->form_validation->set_rules('discount', 'lang:items_discount', '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");
$item_location = $this->input->post("location");
$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');
$item_location = $this->input->post('location');
if ($this->form_validation->run() != FALSE)
{
@@ -317,11 +326,7 @@ class Sales extends Secure_area
{
$data['error'] = $this->lang->line('sales_error_editing_item');
}
if($this->sale_lib->out_of_stock($this->sale_lib->get_item_id($line),$item_location))
{
$data['warning'] = $this->lang->line('sales_quantity_less_than_zero');
}
$data['warning'] = $this->sale_lib->out_of_stock($this->sale_lib->get_item_id($line),$item_location);
$this->_reload($data);
}
@@ -366,8 +371,8 @@ class Sales extends Secure_area
$this->config->item('phone'),
$this->config->item('account_number')
));
$cust_info = '';
if($customer_id!=-1)
$cust_info = '';
if($customer_id != -1)
{
$cust_info = $this->Customer->get_info($customer_id);
if (isset($cust_info->company_name))
@@ -396,9 +401,9 @@ class Sales extends Secure_area
}
else
{
$invoice_number = $this->sale_lib->is_invoice_number_enabled() ? $invoice_number : NULL;
$invoice_number = $this->sale_lib->is_invoice_number_enabled() ? $invoice_number : null;
$data['invoice_number'] = $invoice_number;
$data['sale_id'] = 'POS '.$this->Sale->save($data['cart'], $customer_id, $employee_id, $data['comments'], $invoice_number, $data['payments']);
$data['sale_id'] = 'POS ' . $this->Sale->save($data['cart'], $customer_id, $employee_id, $data['comments'], $invoice_number, $data['payments']);
if ($data['sale_id'] == 'POS -1')
{
$data['error_message'] = $this->lang->line('sales_transaction_failed');
@@ -418,7 +423,7 @@ class Sales extends Secure_area
$this->email->subject($this->lang->line('sales_receipt'));
if ($this->config->item('use_invoice_template') && $this->sale_lib->is_invoice_number_enabled())
{
$data['image_prefix']="";
$data['image_prefix'] = "";
$filename = $this->_invoice_email_pdf($data);
$this->email->attach($filename);
$text = $this->config->item('invoice_email_message');
@@ -429,7 +434,7 @@ class Sales extends Secure_area
}
else
{
$this->email->message($this->load->view("sales/receipt_email",$data, true));
$this->email->message($this->load->view("sales/receipt_email", $data, true));
}
$this->email->send();
}
@@ -438,16 +443,16 @@ class Sales extends Secure_area
$data['print_after_sale'] = $this->sale_lib->is_print_after_sale();
if ($this->sale_lib->is_invoice_number_enabled() && $this->config->item('use_invoice_template'))
{
$this->load->view("sales/invoice",$data);
$this->load->view("sales/invoice", $data);
}
else
{
$this->load->view("sales/receipt",$data);
$this->load->view("sales/receipt", $data);
}
$this->sale_lib->clear_all();
}
$this->_remove_duplicate_cookies();
}
private function _invoice_email_pdf($data)
@@ -469,7 +474,6 @@ class Sales extends Secure_area
$sale_data['image_prefix'] = base_url();
$this->load->view('sales/invoice_email', $sale_data);
$this->sale_lib->clear_all();
$this->_remove_duplicate_cookies();
}
function send_invoice($sale_id)
@@ -492,13 +496,8 @@ class Sales extends Secure_area
$result = $this->email->send();
$message = $this->lang->line($result ? 'sales_invoice_sent' : 'sales_invoice_unsent') . ' ' . $sale_data["customer_email"];
}
echo json_encode(array(
'success'=>$result,
'message'=>$message,
'id'=>$sale_id)
);
echo json_encode(array('success'=>$result, 'message'=>$message, 'id'=>$sale_id));
$this->sale_lib->clear_all();
$this->_remove_duplicate_cookies();
}
private function _substitute_variable($text, $variable, $object, $function)
@@ -516,28 +515,36 @@ class Sales extends Secure_area
private function _substitute_customer($text, $cust_info)
{
// substitute customer info
$customer_id=$this->sale_lib->get_customer();
if($customer_id!=-1 && $cust_info!='')
$customer_id = $this->sale_lib->get_customer();
if($customer_id != -1 && $cust_info != '')
{
$text=str_replace('$CU',$cust_info->first_name . ' ' . $cust_info->last_name,$text);
$text = str_replace('$CU',$cust_info->first_name . ' ' . $cust_info->last_name,$text);
$words = preg_split("/\s+/", trim($cust_info->first_name . ' ' . $cust_info->last_name));
$acronym = "";
foreach ($words as $w) {
foreach ($words as $w)
{
$acronym .= $w[0];
}
$text=str_replace('$CI',$acronym,$text);
$text = str_replace('$CI',$acronym,$text);
}
return $text;
}
private function _is_custom_invoice_number($cust_info)
{
$invoice_number = $this->config->config['sales_invoice_format'];
$invoice_number = $this->_substitute_variables($invoice_number, $cust_info);
return $this->sale_lib->get_invoice_number() != $invoice_number;
}
private function _substitute_variables($text, $cust_info)
{
$text=$this->_substitute_variable($text, '$YCO', $this->Sale, 'get_invoice_number_for_year');
$text=$this->_substitute_variable($text, '$CO', $this->Sale , 'get_invoice_count');
$text=$this->_substitute_variable($text, '$SCO', $this->Sale_suspended, 'get_invoice_count');
$text=strftime($text);
$text=$this->_substitute_customer($text, $cust_info);
$text = $this->_substitute_variable($text, '$YCO', $this->Sale, 'get_invoice_number_for_year');
$text = $this->_substitute_variable($text, '$CO', $this->Sale , 'get_invoice_count');
$text = $this->_substitute_variable($text, '$SCO', $this->Sale_suspended, 'get_invoice_count');
$text = strftime($text);
$text = $this->_substitute_customer($text, $cust_info);
return $text;
}
@@ -566,7 +573,7 @@ class Sales extends Secure_area
$data['total'] = $this->sale_lib->get_total();
$data['discount'] = $this->sale_lib->get_discount();
$data['receipt_title'] = $this->lang->line('sales_receipt');
$data['transaction_time'] = date($this->config->item('dateformat').' '.$this->config->item('timeformat'), strtotime($sale_info['sale_time']));
$data['transaction_time'] = date($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), strtotime($sale_info['sale_time']));
$data['transaction_date'] = date($this->config->item('dateformat'), strtotime($sale_info['sale_time']));
$data['show_stock_locations'] = $this->Stock_location->show_locations('sales');
$customer_id = $this->sale_lib->get_customer();
@@ -574,9 +581,9 @@ class Sales extends Secure_area
$emp_info = $this->Employee->get_info($employee_id);
$data['amount_change'] = $this->sale_lib->get_amount_due() * -1;
$data['amount_due'] = $this->sale_lib->get_amount_due();
$data['employee'] = $emp_info->first_name.' '.$emp_info->last_name;
$data['employee'] = $emp_info->first_name . ' ' . $emp_info->last_name;
if($customer_id!=-1)
if($customer_id != -1)
{
$cust_info = $this->Customer->get_info($customer_id);
if (isset($cust_info->company_name))
@@ -617,9 +624,8 @@ class Sales extends Secure_area
function receipt($sale_id)
{
$data = $this->_load_sale_data($sale_id);
$this->load->view("sales/receipt",$data);
$this->load->view("sales/receipt", $data);
$this->sale_lib->clear_all();
$this->_remove_duplicate_cookies();
}
function invoice($sale_id, $sale_info='')
@@ -629,7 +635,6 @@ class Sales extends Secure_area
}
$this->load->view("sales/invoice",$sale_info);
$this->sale_lib->clear_all();
$this->_remove_duplicate_cookies();
}
function edit($sale_id)
@@ -653,47 +658,39 @@ class Sales extends Secure_area
function delete($sale_id = -1, $update_inventory=TRUE)
{
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
$sale_ids= $sale_id == -1 ? $this->input->post('ids') : array($sale_id);
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
$sale_ids = $sale_id == -1 ? $this->input->post('ids') : array($sale_id);
if($this->Sale->delete_list($sale_ids, $employee_id, $update_inventory))
{
echo json_encode(array('success'=>true,'message'=>$this->lang->line('sales_successfully_deleted').' '.
count($sale_ids).' '.$this->lang->line('sales_one_or_multiple'),'ids'=>$sale_ids));
echo json_encode(array('success'=>true, 'message'=>$this->lang->line('sales_successfully_deleted').' '.
count($sale_ids).' '.$this->lang->line('sales_one_or_multiple'), 'ids'=>$sale_ids));
}
else
{
echo json_encode(array('success'=>false,'message'=>$this->lang->line('sales_unsuccessfully_deleted')));
echo json_encode(array('success'=>false, 'message'=>$this->lang->line('sales_unsuccessfully_deleted')));
}
}
function save($sale_id)
{
$start_date_formatter = date_create_from_format($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), $this->input->post('date', TRUE));
$start_date_formatter = date_create_from_format($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), $this->input->post('date'));
$sale_data = array(
'sale_time' => $start_date_formatter->format('Y-m-d H:i:s'),
'customer_id' => $this->input->post('customer_id') ? $this->input->post('customer_id') : NULL,
'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'),
'invoice_number' => $this->input->post('invoice_number') ? $this->input->post('invoice_number') : NULL
'invoice_number' => $this->input->post('invoice_number') != '' ? $this->input->post('invoice_number') : null
);
if ($this->Sale->update($sale_data, $sale_id))
{
echo json_encode(array(
'success'=>true,
'message'=>$this->lang->line('sales_successfully_updated'),
'id'=>$sale_id)
);
echo json_encode(array('success'=>true, 'message'=>$this->lang->line('sales_successfully_updated'), 'id'=>$sale_id));
}
else
{
echo json_encode(array(
'success'=>false,
'message'=>$this->lang->line('sales_unsuccessfully_updated'),
'id'=>$sale_id)
);
echo json_encode(array('success'=>false, 'message'=>$this->lang->line('sales_unsuccessfully_updated'), 'id'=>$sale_id));
}
}
@@ -720,11 +717,11 @@ class Sales extends Secure_area
{
$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['modes'] = array('sale'=>$this->lang->line('sales_sale'), 'return'=>$this->lang->line('sales_return'));
$data['mode'] = $this->sale_lib->get_mode();
$data['stock_locations'] = $this->Stock_location->get_allowed_locations('sales');
$data['stock_location'] = $this->sale_lib->get_sale_location();
$data['stock_locations'] = $this->Stock_location->get_allowed_locations('sales');
$data['stock_location'] = $this->sale_lib->get_sale_location();
$data['subtotal'] = $this->sale_lib->get_subtotal(TRUE);
$data['tax_exclusive_subtotal'] = $this->sale_lib->get_subtotal(TRUE, TRUE);
@@ -747,10 +744,10 @@ class Sales extends Secure_area
$customer_id = $this->sale_lib->get_customer();
$cust_info = '';
if($customer_id!=-1)
if($customer_id != -1)
{
$cust_info = $this->Customer->get_info($customer_id);
$data['customer'] = $cust_info->first_name.' '.$cust_info->last_name;
$data['customer'] = $cust_info->first_name . ' ' . $cust_info->last_name;
$data['customer_email'] = $cust_info->email;
}
$data['invoice_number'] = $this->_substitute_invoice_number($cust_info);
@@ -758,16 +755,15 @@ class Sales extends Secure_area
$data['print_after_sale'] = $this->sale_lib->is_print_after_sale();
$data['payments_cover_total'] = $this->_payments_cover_total();
$this->load->view("sales/register",$data);
$this->load->view("sales/register", $data);
$this->_remove_duplicate_cookies();
}
function cancel_sale()
{
$this->sale_lib->clear_all();
$this->_reload();
}
function cancel_sale()
{
$this->sale_lib->clear_all();
$this->_reload();
}
function suspend()
{
@@ -776,7 +772,7 @@ class Sales extends Secure_area
$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($this->config->item('dateformat').' '.$this->config->item('timeformat'));
$data['transaction_time'] = date($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'));
$customer_id = $this->sale_lib->get_customer();
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
$comment = $this->sale_lib->get_comment();
@@ -789,7 +785,8 @@ class Sales extends Secure_area
$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 = '';
if($customer_id != -1)
{
$cust_info = $this->Customer->get_info($customer_id);
if (isset($cust_info->company_name))
@@ -802,6 +799,9 @@ class Sales extends Secure_area
}
}
$is_set = $this->_is_custom_invoice_number($cust_info);
$invoice_number = $is_set ? $invoice_number : NULL;
$total_payments = 0;
foreach($data['payments'] as $payment)
@@ -810,7 +810,7 @@ class Sales extends Secure_area
}
//SAVE sale to database
$data['sale_id'] = 'POS '.$this->Sale_suspended->save($data['cart'], $customer_id, $employee_id, $comment, $invoice_number, $data['payments']);
$data['sale_id'] = 'POS ' . $this->Sale_suspended->save($data['cart'], $customer_id, $employee_id, $comment, $invoice_number, $data['payments']);
if ($data['sale_id'] == 'POS -1')
{
$data['error_message'] = $this->lang->line('sales_transaction_failed');
@@ -834,15 +834,15 @@ class Sales extends Secure_area
$this->sale_lib->clear_all();
$this->sale_lib->copy_entire_suspended_sale($sale_id);
$this->Sale_suspended->delete($sale_id);
$this->_reload();
$this->_reload();
}
function check_invoice_number()
{
$sale_id=$this->input->post('sale_id');
$invoice_number=$this->input->post('invoice_number');
$exists=!empty($invoice_number) && $this->Sale->invoice_number_exists($invoice_number,$sale_id);
echo json_encode(array('success'=>!$exists, 'message'=>$this->lang->line('sales_invoice_number_duplicate')));
$sale_id = $this->input->post('sale_id');
$invoice_number = $this->input->post('invoice_number');
$exists = !empty($invoice_number) && $this->Sale->invoice_number_exists($invoice_number,$sale_id);
echo !$exists ? 'true' : 'false';
}
}
?>

View File

@@ -1,7 +1,6 @@
<?php
class Secure_area extends CI_Controller
{
private $controller_name;
/*
@@ -37,13 +36,15 @@ class Secure_area extends CI_Controller
$this->load->vars($data);
}
function get_controller_name() {
function get_controller_name()
{
return strtolower($this->controller_name);
}
function _initialize_pagination($object, $lines_per_page, $limit_from = 0, $total_rows = -1, $function='index', $filter='')
{
$this->load->library('pagination');
$config['base_url'] = site_url($this->get_controller_name() . "/$function/" . $filter);
$config['total_rows'] = $total_rows > -1 ? $total_rows : call_user_func(array($object, 'get_total_rows'));
$config['per_page'] = $lines_per_page;
@@ -54,62 +55,11 @@ class Secure_area extends CI_Controller
$config['cur_page'] = $limit_from > 0 ? $limit_from : 0;
$config['page_query_string'] = FALSE;
$config['uri_segment'] = 0;
$this->pagination->initialize($config);
return $this->pagination->create_links();
}
function _remove_duplicate_cookies ()
{
//php < 5.3 doesn't have header remove so this function will fatal error otherwise
if (function_exists('header_remove'))
{
$CI = &get_instance();
// clean up all the cookies that are set...
$headers = headers_list();
$cookies_to_output = array ();
$header_session_cookie = '';
$session_cookie_name = $CI->config->item('sess_cookie_name');
foreach ($headers as $header)
{
list ($header_type, $data) = explode (':', $header, 2);
$header_type = trim ($header_type);
$data = trim ($data);
if (strtolower ($header_type) == 'set-cookie')
{
header_remove ('Set-Cookie');
$cookie_value = current(explode (';', $data));
list ($key, $val) = explode ('=', $cookie_value);
$key = trim ($key);
if ($key == $session_cookie_name)
{
// OVERWRITE IT (yes! do it!)
$header_session_cookie = $data;
continue;
}
else
{
// Not a session related cookie, add it as normal. Might be a CSRF or some other cookie we are setting
$cookies_to_output[] = array ('header_type' => $header_type, 'data' => $data);
}
}
}
if ( ! empty ($header_session_cookie))
{
$cookies_to_output[] = array ('header_type' => 'Set-Cookie', 'data' => $header_session_cookie);
}
foreach ($cookies_to_output as $cookie)
{
header ("{$cookie['header_type']}: {$cookie['data']}", false);
}
}
}
}
?>

View File

@@ -1,5 +1,6 @@
<?php
require_once ("person_controller.php");
require_once ("Person_controller.php");
class Suppliers extends Person_controller
{
function __construct()
@@ -9,28 +10,30 @@ class Suppliers extends Person_controller
function index($limit_from=0)
{
$data['controller_name']=$this->get_controller_name();
$data['form_width']=$this->get_form_width();
$data['controller_name'] = $this->get_controller_name();
$data['form_width'] = $this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$suppliers = $this->Supplier->get_all($lines_per_page);
$data['links'] = $this->_initialize_pagination($this->Supplier,$lines_per_page,$limit_from);
$data['manage_table']=get_supplier_manage_table($suppliers,$this);
$this->load->view('suppliers/manage',$data);
$data['links'] = $this->_initialize_pagination($this->Supplier, $lines_per_page, $limit_from);
$data['manage_table'] = get_supplier_manage_table($suppliers, $this);
$this->load->view('suppliers/manage', $data);
}
/*
Returns supplier table data rows. This will be called with AJAX.
Returns Supplier table data rows. This will be called with AJAX.
*/
function search()
{
$search = $this->input->post('search');
$search = $this->input->post('search') != '' ? $this->input->post('search') : null;
$limit_from = $this->input->post('limit_from');
$lines_per_page = $this->Appconfig->get('lines_per_page');
$suppliers = $this->Supplier->search($search, $lines_per_page, $limit_from);
$total_rows = $this->Supplier->get_found_rows($search);
$links = $this->_initialize_pagination($this->Supplier, $lines_per_page, $limit_from, $total_rows);
$data_rows=get_supplier_manage_table_data_rows($suppliers,$this);
$data_rows = get_supplier_manage_table_data_rows($suppliers, $this);
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
}
@@ -58,25 +61,25 @@ class Suppliers extends Person_controller
function save($supplier_id=-1)
{
$person_data = array(
'first_name'=>$this->input->post('first_name'),
'last_name'=>$this->input->post('last_name'),
'gender'=>$this->input->post('gender'),
'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')
'first_name'=>$this->input->post('first_name'),
'last_name'=>$this->input->post('last_name'),
'gender'=>$this->input->post('gender'),
'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'),
'agency_name'=>$this->input->post('agency_name'),
'account_number'=>$this->input->post('account_number')=='' ? null:$this->input->post('account_number'),
'company_name'=>$this->input->post('company_name'),
'agency_name'=>$this->input->post('agency_name'),
'account_number'=>$this->input->post('account_number') == '' ? null : $this->input->post('account_number')
);
if($this->Supplier->save($person_data,$supplier_data,$supplier_id))
if($this->Supplier->save_supplier($person_data,$supplier_data,$supplier_id))
{
//New supplier
if($supplier_id==-1)

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -7,4 +8,4 @@
<p>Directory access is forbidden.</p>
</body>
</html>
</html>

View File

@@ -3,7 +3,7 @@
This interface is implemented by any controller that keeps track of people, such
as customers and employees.
*/
require_once("idata_controller.php");
require_once("Idata_controller.php");
interface iPerson_controller extends iData_controller
{
public function mailto();

View File

@@ -32,7 +32,7 @@ class MY_Lang extends CI_Lang
* @access public
* @return mixed false if not found or the language string
*/
function line($line = '')
function line($line = '', $log_errors = true)
{
//get the arguments passed to the function
$args = func_get_args();

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -7,4 +8,4 @@
<p>Directory access is forbidden.</p>
</body>
</html>
</html>

View File

@@ -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>

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -7,4 +8,4 @@
<p>Directory access is forbidden.</p>
</body>
</html>
</html>

View File

@@ -67,7 +67,7 @@ function get_sales_manage_sale_data_row($sale, $controller)
$width = $controller->get_form_width();
$table_data_row='<tr>';
$table_data_row.='<td width="3%"><input type="checkbox" id="sale_' . $sale['sale_id'] . '" value="' . $sale['sale_id']. '" /></td>';
$table_data_row.='<td width="3%"><input class="print_hide" type="checkbox" id="sale_' . $sale['sale_id'] . '" value="' . $sale['sale_id']. '" /></td>';
$table_data_row.='<td width="15%">'.'POS ' . $sale['sale_id'] . '</td>';
$table_data_row.='<td width="17%">'.date( $CI->config->item('dateformat') . ' ' . $CI->config->item('timeformat'), strtotime($sale['sale_time']) ).'</td>';
$table_data_row.='<td width="23%">'.character_limiter( $sale['customer_name'], 25).'</td>';
@@ -76,12 +76,12 @@ function get_sales_manage_sale_data_row($sale, $controller)
$table_data_row.='<td width="8%">'.to_currency( $sale['change_due'] ).'</td>';
$table_data_row.='<td width="12%">'.$sale['payment_type'].'</td>';
$table_data_row.='<td width="8%">'.$sale['invoice_number'].'</td>';
$table_data_row.='<td width="8%">';
$table_data_row.=anchor($controller_name."/edit/" . $sale['sale_id'] . "/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update')));
$table_data_row.='<td width="8%" class="print_hide">';
$table_data_row.=anchor($controller_name."/edit/" . $sale['sale_id'] . "/width:$width", $CI->lang->line('common_edit'), array('class'=>'thickbox print_hide', 'title'=>$CI->lang->line('common_edit')));
$table_data_row.='&nbsp;&nbsp;&nbsp;&nbsp;';
$table_data_row.='<a href="'.site_url($controller_name. "/receipt/" . $sale['sale_id']) . '">' . $CI->lang->line('sales_show_receipt') . '</a>';
$table_data_row.=anchor($controller_name."/receipt/" . $sale['sale_id'], $CI->lang->line('sales_show_receipt'), array('class'=>'print_hide', 'title'=>$CI->lang->line('sales_show_receipt')));
$table_data_row.='&nbsp;&nbsp;&nbsp;&nbsp;';
$table_data_row.='<a href="'.site_url($controller_name. "/invoice/" . $sale['sale_id']) . '">' . $CI->lang->line('sales_show_invoice') . '</a>';
$table_data_row.=anchor($controller_name."/invoice/" . $sale['sale_id'], $CI->lang->line('sales_show_invoice'), array('class'=>'print_hide', 'title'=>$CI->lang->line('sales_show_invoice')));
$table_data_row.='</td>';
$table_data_row.='</tr>';

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -7,4 +8,4 @@
<p>Directory access is forbidden.</p>
</body>
</html>
</html>

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -7,4 +8,4 @@
<p>Directory access is forbidden.</p>
</body>
</html>
</html>

View File

@@ -111,6 +111,7 @@ $lang["config_stock_location"] = "Lagerort";
$lang["config_stock_location_duplicate"] = "Bitte verwenden Sie einen eindeutigen Lagerort";
$lang["config_stock_location_invalid_chars"] = "Der Lagerort kann keine Unterstriche enthalten";
$lang["config_stock_location_required"] = "Lagerort Nummer ist erforderlich";
$lang["config_takings_printer"] = "Takings Printer";
$lang["config_tax_included"] = "MWSt inbegriffen";
$lang["config_thousands_separator"] = "Tausendertrennzeichen";
$lang["config_timezone"] = "Zeitzone";

View File

@@ -16,6 +16,7 @@ $lang["items_change_all_to_not_allow_allow_desc"] = "Ändere alle zu NICHT Erlau
$lang["items_change_all_to_serialized"] = "Ändere alle zu serialisiert";
$lang["items_change_all_to_unserialized"] = "Ändere alle zu nicht serialisiert";
$lang["items_confirm_bulk_edit"] = "Wollen Sie alle gewählten Artikel ändern?";
$lang["items_confirm_bulk_edit_wipe_taxes"] = "All item tax information will be replaced!";
$lang["items_confirm_delete"] = "Wollen Sie alle gewählten Artikel löschen?";
$lang["items_cost_price"] = "Einstandspreis";
$lang["items_cost_price_number"] = "Einstandspresi muss eine Zahl sein";

View File

@@ -78,6 +78,7 @@ $lang["sales_price"] = "Preis";
$lang["sales_print_after_sale"] = "Drucke Bon nach Verkauf";
$lang["sales_quantity"] = "Menge";
$lang["sales_quantity_less_than_zero"] = "Warnung: Gewünschte Menge ist nicht verfügbar. Sie können den Verkauf fortsetzen, dennoch prüfen Sie bitte den Lagerbestand.";
$lang["sales_quantity_less_than_reorder_level"] = "Warnung: Gewünschte Menge ist nicht verfügbar.";
$lang["sales_receipt"] = "Quittung";
$lang["sales_receipt_number"] = "Quittung Nr.";
$lang["sales_register"] = "Kasse";

View File

@@ -111,6 +111,7 @@ $lang["config_stock_location"] = "Stock location";
$lang["config_stock_location_duplicate"] = "Please use an unique location name";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
$lang["config_stock_location_required"] = "Stock location number is a required field";
$lang["config_takings_printer"] = "Takings Printer";
$lang["config_tax_included"] = "Tax Included";
$lang["config_thousands_separator"] = "Thousands Separator";
$lang["config_timezone"] = "Timezone";

View File

@@ -1,10 +1,11 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@@ -16,6 +16,7 @@ $lang["items_change_all_to_not_allow_allow_desc"] = "Not Allow Alt Desc For All"
$lang["items_change_all_to_serialized"] = "Change All To Serialized";
$lang["items_change_all_to_unserialized"] = "Change All To Unserialized";
$lang["items_confirm_bulk_edit"] = "Are you sure you want to edit all the items selected?";
$lang["items_confirm_bulk_edit_wipe_taxes"] = "All item tax information will be replaced!";
$lang["items_confirm_delete"] = "Are you sure you want to delete the selected items?";
$lang["items_cost_price"] = "Cost Price";
$lang["items_cost_price_number"] = "Cost price must be a number";

View File

@@ -78,6 +78,7 @@ $lang["sales_price"] = "Price";
$lang["sales_print_after_sale"] = "Print after sale";
$lang["sales_quantity"] = "Qty.";
$lang["sales_quantity_less_than_zero"] = "Warning, Desired Quantity is Insufficient. You can still process the sale, but check your inventory";
$lang["sales_quantity_less_than_reorder_level"] = "Warning, Desired Quantity is below reorder level";
$lang["sales_receipt"] = "Sales Receipt";
$lang["sales_receipt_number"] = "Sale #";
$lang["sales_register"] = "Sales Register";

View File

@@ -111,6 +111,7 @@ $lang["config_stock_location"] = "Ubicación de Inventario";
$lang["config_stock_location_duplicate"] = "Por favor use un nombre de inventario único";
$lang["config_stock_location_invalid_chars"] = "Nombre de la Ubicación de Inventario no debe contener '_'";
$lang["config_stock_location_required"] = "Número de Ubicación de Inventario es requerido";
$lang["config_takings_printer"] = "Takings Printer";
$lang["config_tax_included"] = "Impuestos incluidos";
$lang["config_thousands_separator"] = "Separador de miles";
$lang["config_timezone"] = "Zona Horaria";

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Prohibido</title>

View File

@@ -16,6 +16,7 @@ $lang["items_change_all_to_not_allow_allow_desc"] = "Denegar Descripción Altern
$lang["items_change_all_to_serialized"] = "Cambiar Todo A Serializado";
$lang["items_change_all_to_unserialized"] = "Cambiar Todo A Deserializado";
$lang["items_confirm_bulk_edit"] = "¿Estás seguro(a) de querer editar los artículos seleccionados?";
$lang["items_confirm_bulk_edit_wipe_taxes"] = "All item tax information will be replaced!";
$lang["items_confirm_delete"] = "¿Estás seguro(a) de querer borrar los artículos seleccionados?";
$lang["items_cost_price"] = "Precio de Compra";
$lang["items_cost_price_number"] = "Precio de Compra debe ser número";

View File

@@ -78,6 +78,7 @@ $lang["sales_price"] = "Precio";
$lang["sales_print_after_sale"] = "Imprimir recibo después de una venta";
$lang["sales_quantity"] = "Cant.";
$lang["sales_quantity_less_than_zero"] = "Advertencia. La cantidad deseada es insuficiente. Puedes procesar la venta pero verifica el inventario.";
$lang["sales_quantity_less_than_reorder_level"] = "Advertencia. La cantidad deseada es insuficiente";
$lang["sales_receipt"] = "Recibo de Venta";
$lang["sales_receipt_number"] = "POS #";
$lang["sales_register"] = "Registro de Ventas";

View File

@@ -111,6 +111,7 @@ $lang["config_stock_location"] = "Stock location";
$lang["config_stock_location_duplicate"] = "Please use an unique location name";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
$lang["config_stock_location_required"] = "Stock location number is a required field";
$lang["config_takings_printer"] = "Takings Printer";
$lang["config_tax_included"] = "Tax Included";
$lang["config_thousands_separator"] = "Thousands Separator";
$lang["config_timezone"] = "Fuseau Horaire";

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Interdit</title>

View File

@@ -16,6 +16,7 @@ $lang["items_change_all_to_not_allow_allow_desc"] = "Interdire Desc Alt Pour Tou
$lang["items_change_all_to_serialized"] = "Tout Sérialiser";
$lang["items_change_all_to_unserialized"] = "Tout désérialiser";
$lang["items_confirm_bulk_edit"] = "Etes vous sûre de vouloir éditer toute la sélection?";
$lang["items_confirm_bulk_edit_wipe_taxes"] = "All item tax information will be replaced!";
$lang["items_confirm_delete"] = "Etes vous sûre de vouloir supprimer la sélection?";
$lang["items_cost_price"] = "Prix de Gros";
$lang["items_cost_price_number"] = "Le Prix d\'achat doit etre un nombre";

View File

@@ -78,6 +78,7 @@ $lang["sales_price"] = "Prix";
$lang["sales_print_after_sale"] = "Imprimer un recu après vente";
$lang["sales_quantity"] = "Qté.";
$lang["sales_quantity_less_than_zero"] = "Avertissement, Quantité Demandée Insuffisante. Vous pouvez accomplir la ventre, mais veuillez vérifier votre inventaire";
$lang["sales_quantity_less_than_reorder_level"] = "Avertissement, Quantité Demandée Insuffisante";
$lang["sales_receipt"] = "Recu de Ventes";
$lang["sales_receipt_number"] = "# Caisse";
$lang["sales_register"] = "Registre des Ventes";

View File

@@ -111,6 +111,7 @@ $lang["config_stock_location"] = "Lokasi Stock";
$lang["config_stock_location_duplicate"] = "Please use an unique location name";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
$lang["config_stock_location_required"] = "Stock location number is a required field";
$lang["config_takings_printer"] = "Takings Printer";
$lang["config_tax_included"] = "Dikenakan Pajak";
$lang["config_thousands_separator"] = "Pemisah Ribuan";
$lang["config_timezone"] = "Zona Waktu";

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Dilarang</title>

View File

@@ -16,6 +16,7 @@ $lang["items_change_all_to_not_allow_allow_desc"] = "Tidak Diijinkan Deskripsi a
$lang["items_change_all_to_serialized"] = "Ubah semua menggunakan nomor serial";
$lang["items_change_all_to_unserialized"] = "Ubah semua tanpa nomor serial";
$lang["items_confirm_bulk_edit"] = "Apakah Anda yakin ingin merubah semua item yang dipilih?";
$lang["items_confirm_bulk_edit_wipe_taxes"] = "All item tax information will be replaced!";
$lang["items_confirm_delete"] = "Apakah Anda yakin ingin menghapus item yang dipilih?";
$lang["items_cost_price"] = "Harga Pokok";
$lang["items_cost_price_number"] = "Biaya Item harus angka";

View File

@@ -78,6 +78,7 @@ $lang["sales_price"] = "Harga";
$lang["sales_print_after_sale"] = "Cetak Faktur setelah penjualan";
$lang["sales_quantity"] = "Jumlah.";
$lang["sales_quantity_less_than_zero"] = "Peringatan!... Stok Inventori Kosong. Proses penjualan masih dapat dilanjutkan, Periksa Inventori.";
$lang["sales_quantity_less_than_reorder_level"] = "Peringatan!... Stok Inventori Kosong.";
$lang["sales_receipt"] = "Faktur Penjualan";
$lang["sales_receipt_number"] = "POS #";
$lang["sales_register"] = "Transaksi Penjualan";

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -7,4 +8,4 @@
<p>Directory access is forbidden.</p>
</body>
</html>
</html>

View File

@@ -111,6 +111,7 @@ $lang["config_stock_location"] = "Stock locatie";
$lang["config_stock_location_duplicate"] = "Vul een unieke naam in";
$lang["config_stock_location_invalid_chars"] = "De bedrijfsnaam moet ingevuld worden";
$lang["config_stock_location_required"] = "Naam van de stock locatie is een verplicht veld";
$lang["config_takings_printer"] = "Takings Printer";
$lang["config_tax_included"] = "VAT Inbegrepen";
$lang["config_thousands_separator"] = "Thousands Separator";
$lang["config_timezone"] = "Tijdzone";

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>

View File

@@ -16,6 +16,7 @@ $lang["items_change_all_to_not_allow_allow_desc"] = "Vaste omschrijvingen";
$lang["items_change_all_to_serialized"] = "Genummerd";
$lang["items_change_all_to_unserialized"] = "Niet genummerd";
$lang["items_confirm_bulk_edit"] = "Bent u zeker dat u de geselecteerde producten wil aanpassen?";
$lang["items_confirm_bulk_edit_wipe_taxes"] = "Alle taxgegevens zullen overschreven worden!";
$lang["items_confirm_delete"] = "Bent u zeker dat u de geselecteerde producten wil verwijderen?";
$lang["items_cost_price"] = "Aankoopprijs";
$lang["items_cost_price_number"] = "Kostprijs moet een cijfer zijn";

View File

@@ -78,6 +78,7 @@ $lang["sales_price"] = "Prijs";
$lang["sales_print_after_sale"] = "Print Ticket";
$lang["sales_quantity"] = "Aantal";
$lang["sales_quantity_less_than_zero"] = "Waarschuwing, de gewenste hoeveelheid is onvoldoende. U kunt deze aankoop verwerken, maar kijk toch even de voorraad na.";
$lang["sales_quantity_less_than_reorder_level"] = "Waarschuwing, de gewenste hoeveelheid stock is overgeschreden.";
$lang["sales_receipt"] = "Ticket #";
$lang["sales_receipt_number"] = "Ticket #";
$lang["sales_register"] = "Kassa";

View File

@@ -111,6 +111,7 @@ $lang["config_stock_location"] = "Stock location";
$lang["config_stock_location_duplicate"] = "Please use an unique location name";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
$lang["config_stock_location_required"] = "Stock location number is a required field";
$lang["config_takings_printer"] = "Takings Printer";
$lang["config_tax_included"] = "Tax Included";
$lang["config_thousands_separator"] = "Thousands Separator";
$lang["config_timezone"] = "Часовой пояс";

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>

View File

@@ -16,6 +16,7 @@ $lang["items_change_all_to_not_allow_allow_desc"] = "Не разрешить а
$lang["items_change_all_to_serialized"] = "Изменить все в сериализованную";
$lang["items_change_all_to_unserialized"] = "Изменить все в несериализованную";
$lang["items_confirm_bulk_edit"] = "Вы уверены, что хотите редактировать все товари выбраны?";
$lang["items_confirm_bulk_edit_wipe_taxes"] = "All item tax information will be replaced!";
$lang["items_confirm_delete"] = "Вы уверены, что хотите удалить выбранные товари?";
$lang["items_cost_price"] = "Оптовая Цена";
$lang["items_cost_price_number"] = "Оптовая цена должно быть число";

View File

@@ -78,6 +78,7 @@ $lang["sales_price"] = "цена";
$lang["sales_print_after_sale"] = "Распечатать квитанцию ​​после продажи";
$lang["sales_quantity"] = "Кол-во.";
$lang["sales_quantity_less_than_zero"] = "Внимание Желаемое количество является недостаточным. Вы все еще можете обрабатывать продажи, но проверить ваш инвентарь";
$lang["sales_quantity_less_than_reorder_level"] = "Внимание Желаемое количество является недостаточным.";
$lang["sales_receipt"] = "товарный чек";
$lang["sales_receipt_number"] = "POS #";
$lang["sales_register"] = "Продажи журнала";

View File

@@ -111,6 +111,7 @@ $lang["config_stock_location"] = "สถานที่เก็บ";
$lang["config_stock_location_duplicate"] = "";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
$lang["config_stock_location_required"] = "จำเป็นต้องระบุสถานที่เก็บ";
$lang["config_takings_printer"] = "Takings Printer";
$lang["config_tax_included"] = "รวมภาษีแล้ว";
$lang["config_thousands_separator"] = "ตัวคั่นหลักพัน";
$lang["config_timezone"] = "โซนเวลา";

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -8,13 +9,4 @@
</body>
</html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@@ -16,6 +16,7 @@ $lang["items_change_all_to_not_allow_allow_desc"] = "Not Allow Alt Desc For All"
$lang["items_change_all_to_serialized"] = "เปลี่ยนแปลงรหัสสินค้าทั้งหมด";
$lang["items_change_all_to_unserialized"] = "ลบรหัสสินค้าทั้งหมด";
$lang["items_confirm_bulk_edit"] = "แน่ใจหรือไม่ที่จะแก้ใขสินค้าทั้งหมดที่คุณเลือก?";
$lang["items_confirm_bulk_edit_wipe_taxes"] = "All item tax information will be replaced!";
$lang["items_confirm_delete"] = "โปรดยืนยันการลบสินค้าที่ถูกเลือก?";
$lang["items_cost_price"] = "ราคาทุน";
$lang["items_cost_price_number"] = "ราคาทุนต้องเป็นตัวเลข";

View File

@@ -78,6 +78,7 @@ $lang["sales_price"] = "ราคา";
$lang["sales_print_after_sale"] = "พิมพ์บิลหลังการขาย";
$lang["sales_quantity"] = "จำนวน";
$lang["sales_quantity_less_than_zero"] = "คำเตือน ถ้าจำนวนของไม่เพียงพอกับความต้องการหรือไม่ตรงกับยอดในบันชี ก็สามารถทำการขายได้ แต่ต้องเชคปริมานสินค้าคงคลัง";
$lang["sales_quantity_less_than_reorder_level"] = "คำเตือน ถ้าจำนวนของไม่เพียงพอกับความต้องการหรือไม่ตรงกับยอดในบันชี ก็สามารถทำการขายได้ แต่ต้องเชคปริมานสินค้าคงคลัง";
$lang["sales_receipt"] = "บิลขาย";
$lang["sales_receipt_number"] = "จุดขาย#";
$lang["sales_register"] = "ลงทะเบียนขาย";

View File

@@ -111,6 +111,7 @@ $lang["config_stock_location"] = "Mağaza Yeri";
$lang["config_stock_location_duplicate"] = "Please use an unique location name";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
$lang["config_stock_location_required"] = "Mağaza Yeri numarası zorunlu alandır";
$lang["config_takings_printer"] = "Takings Printer";
$lang["config_tax_included"] = "Tax Included";
$lang["config_thousands_separator"] = "Thousands Separator";
$lang["config_timezone"] = "Saat Dilimi";

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>

View File

@@ -16,6 +16,7 @@ $lang["items_change_all_to_not_allow_allow_desc"] = "Tümünde dip nota izin ver
$lang["items_change_all_to_serialized"] = "Tümünü seri numaralı yap";
$lang["items_change_all_to_unserialized"] = "Tümünü seri numarasız yap";
$lang["items_confirm_bulk_edit"] = "Seçili tüm ürünleri düzenlemek istediğinize emin misiniz?";
$lang["items_confirm_bulk_edit_wipe_taxes"] = "All item tax information will be replaced!";
$lang["items_confirm_delete"] = "Seçili ürünleri silmek istediğinize emin misiniz?";
$lang["items_cost_price"] = "Maliyet Fiyatı";
$lang["items_cost_price_number"] = "Fiyat sayı olmalıdır (9.90)";

View File

@@ -78,6 +78,7 @@ $lang["sales_price"] = "Fiyat";
$lang["sales_print_after_sale"] = "Satıştan sonra yazdır";
$lang["sales_quantity"] = "Adet";
$lang["sales_quantity_less_than_zero"] = "Dikkat, İstenen stok yetersiz. Satışa devam edebilirsiniz ama stoğunuzu kontrol ediniz";
$lang["sales_quantity_less_than_reorder_level"] = "Dikkat, İstenen stok yetersiz.";
$lang["sales_receipt"] = "Satış Faturası";
$lang["sales_receipt_number"] = "";
$lang["sales_register"] = "Satış Kaydı";

View File

@@ -111,6 +111,7 @@ $lang["config_stock_location"] = "Stock location";
$lang["config_stock_location_duplicate"] = "Please use an unique location name";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
$lang["config_stock_location_required"] = "Stock location number is a required field";
$lang["config_takings_printer"] = "Takings Printer";
$lang["config_tax_included"] = "Tax Included";
$lang["config_thousands_separator"] = "Thousands Separator";
$lang["config_timezone"] = "時區";

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>

View File

@@ -16,6 +16,7 @@ $lang["items_change_all_to_not_allow_allow_desc"] = "不允許全部ALT倒序";
$lang["items_change_all_to_serialized"] = "全部更改序號至序列化";
$lang["items_change_all_to_unserialized"] = "全部更改序號至非序列化";
$lang["items_confirm_bulk_edit"] = "您確定您要編輯的所有選定的產品嗎?";
$lang["items_confirm_bulk_edit_wipe_taxes"] = "All item tax information will be replaced!";
$lang["items_confirm_delete"] = "你確定你要刪除選定的產品嗎?";
$lang["items_cost_price"] = "成本價";
$lang["items_cost_price_number"] = "成本價必需是數值";

View File

@@ -78,6 +78,7 @@ $lang["sales_price"] = "價格";
$lang["sales_print_after_sale"] = "出貨時打印收據";
$lang["sales_quantity"] = "數量.";
$lang["sales_quantity_less_than_zero"] = "警告!產品的庫存數量是不足的。您仍然可以處理銷售,但檢查您的庫存";
$lang["sales_quantity_less_than_reorder_level"] = "警告!產品的庫存數量是不足的。您仍然可以處理銷售,但檢查您的庫存";
$lang["sales_receipt"] = "銷貨單";
$lang["sales_receipt_number"] = "POS #";
$lang["sales_register"] = "銷售登記";

View File

@@ -200,8 +200,8 @@ class Receiving_lib
'item_location'=>$item_location,
'stock_name'=>$this->CI->Stock_location->get_location_name($item_location),
'line'=>$insertkey,
'name'=>base64_encode($item_info->name),
'description'=>base64_encode($description!=null ? $description: $item_info->description),
'name'=>$item_info->name,
'description'=>$description!=null ? $description: $item_info->description,
'serialnumber'=>$serialnumber!=null ? $serialnumber: '',
'allow_alt_description'=>$item_info->allow_alt_description,
'is_serialized'=>$item_info->is_serialized,
@@ -236,7 +236,7 @@ class Receiving_lib
if(isset($items[$line]))
{
$line = &$items[$line];
$line['description'] = base64_encode($description);
$line['description'] = $description;
$line['serialnumber'] = $serialnumber;
$line['quantity'] = $quantity;
$line['discount'] = $discount;

View File

@@ -305,9 +305,9 @@ class Sale_lib
'item_location'=>$item_location,
'stock_name'=>$this->CI->Stock_location->get_location_name($item_location),
'line'=>$insertkey,
'name'=>base64_encode($item_info->name),
'name'=>$item_info->name,
'item_number'=>$item_info->item_number,
'description'=>base64_encode($description!=null ? $description: $item_info->description),
'description'=>$description!=null ? $description: $item_info->description,
'serialnumber'=>$serialnumber!=null ? $serialnumber: '',
'allow_alt_description'=>$item_info->allow_alt_description,
'is_serialized'=>$item_info->is_serialized,
@@ -343,16 +343,19 @@ class Sale_lib
return false;
}
$item_info = $this->CI->Item->get_info($item_id);
//$item = $this->CI->Item->get_info($item_id);
$item_quantity = $this->CI->Item_quantity->get_item_quantity($item_id,$item_location)->quantity;
$quantity_added = $this->get_quantity_already_added($item_id,$item_location);
if ($item_quantity - $quantity_added < 0)
{
return true;
return $this->CI->lang->line('sales_quantity_less_than_zero');
}
else if ($item_quantity - $quantity_added < $item_info->reorder_level)
{
return $this->CI->lang->line('sales_quantity_less_than_reorder_level');
}
return false;
}
@@ -392,7 +395,7 @@ class Sale_lib
if(isset($items[$line]))
{
$line = &$items[$line];
$line['description'] = base64_encode($description);
$line['description'] = $description;
$line['serialnumber'] = $serialnumber;
$line['quantity'] = $quantity;
$line['discount'] = $discount;

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -7,4 +8,4 @@
<p>Directory access is forbidden.</p>
</body>
</html>
</html>

Some files were not shown because too many files have changed in this diff Show More