Compare commits

...

351 Commits
2.3.2 ... 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
jekkos
7180e7e9ed Update changelog for 2.3.4 2016-02-08 07:42:04 +01:00
FrancescoUK
445222bcdd Merge branch 'master' into ci3 2016-02-07 18:03:44 +00:00
jekkos
40ddfdc2ab Merge pull request #319 from daN4cat/master
Remove dbbackup on logout #318
2016-02-07 15:09:02 +01:00
FrancescoUK
345d2d95d8 Remove dbbackup on logout (#318) 2016-02-05 18:42:04 +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
24b4c98d94 Merge pull request #317 from daN4cat/master
Fixes to phppos to ospos 2.3.4 migration script #258
2016-02-05 17:36:16 +01:00
FrancescoUK
ea6fffc525 Add version liner so we remember which version the script works with (#258) 2016-02-05 09:06:54 +00:00
FrancescoUK
a0b422be34 Fix source script phppos_migrate.sql too (#258) 2016-02-05 09:05:57 +00:00
FrancescoUK
6599ea6678 Fix and add data copy rules. Tested script (#258) 2016-02-04 23:04:13 +00:00
jekkos
36cf19b1b9 Properly save company_name in customer form 2016-02-04 23:09:03 +01:00
FrancescoUK
9d056b2765 Remove invoice_number from phppos SQL migration script (#258) 2016-02-03 18:14:00 +00:00
jekkos
5c16c2a21a Use grep and wait for mysql to come up properly (#305) 2016-02-03 17:42:44 +01:00
jekkos
acd9beae73 Set npm package version number 2016-02-03 17:29:01 +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
48a16d65e1 Fix base url for testcases (#305)
Fix legacy ubuntu repository urls (#284)
2016-02-03 10:49:20 +01:00
jekkos
89f126ab04 Use curl to wait for apache start (#305) 2016-01-31 16:03:19 +01:00
jekkos
67d9ca1e41 Merge branch 'master' into develop/2.4
Conflicts:
	Dockerfile
2016-01-29 17:34:53 +01:00
jekkos
8f9d80a809 Wait for container before running integration tests (#305)
Add integratoin test for quantity units (#305)
2016-01-29 17:24:28 +01:00
FrancescoUK
3425920cb6 Merge branch 'master' into ci3 2016-01-28 09:05:35 +00:00
jekkos
85c6da4346 Add integration test for making receiving (#305)
Update docker scripts to work with data volumes (#284)
2016-01-27 20:11:21 +01:00
jekkos
93460daadf Make 2.4 version string npm compatible 2016-01-27 11:00:18 +01:00
jekkos
574548f360 Merge branch 'master' of https://github.com/jekkos/opensourcepos 2016-01-26 20:27:58 +01:00
jekkos
847c4a67c9 Add integration test for making sale (#305) 2016-01-26 20:27:07 +01:00
jekkos
8aab154a9f Disable sudo for travis tests, omit nodejs version 2016-01-26 16:27:06 +01:00
jekkos
a3119d1993 Add integration test for creating new item 2016-01-26 08:44:48 +01:00
jekkos
0a159c803f Add testcase for creating new item
Optimise CI setup
2016-01-25 21:14:48 +01:00
jekkos
22a7231d8f Run docker container in background + launch tests once ready 2016-01-25 19:16:13 +01:00
jekkos
c36f6b603d Run docker interactively in travis script step 2016-01-25 17:53:47 +01:00
FrancescoUK
8e5b8712c0 Merge branch 'master' into ci3 2016-01-25 09:20:04 +00:00
jekkos
f063aa16a8 Launch webdriver test in docker container 2016-01-25 09:34:10 +01:00
jekkos
2520970698 Fix comment for autogenerated sql files (#301, #258) 2016-01-25 08:42:15 +01:00
jekkos
a21a825aac Merge pull request #299 from daN4cat/master
Add a live clock functionality (#298) and fix Gruntfile.js (#297)
2016-01-25 08:36:43 +01:00
FrancescoUK
d48dc8b87b Merge branch 'master' into ci3 2016-01-24 22:44:45 +00:00
FrancescoUK
8f72756737 Add a live clock functionality (#298) fix Gruntfile.js (#297) 2016-01-24 22:34:05 +00:00
FrancescoUK
68b28a17e4 Merge branch 'master' into ci3 2016-01-24 10:38:26 +00:00
jekkos
463af45e73 Remove test run in pre_install (travis-ci) 2016-01-24 10:28:00 +00:00
FrancescoUK
4ccab6b8b5 Code reformatting (#296) 2016-01-24 10:27:41 +00:00
FrancescoUK
1849ee807c Add favicon (#296) 2016-01-24 10:27:15 +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
jekkos
1148ef1595 Install grunt-cli in docker container (#284) 2016-01-22 14:43:53 +01:00
jekkos
bcbdee3a50 Fix test execution for travis-ci (grunt invocation) 2016-01-22 13:37:30 +01:00
jekkos
cfbb700f0c Add symlink for node in Dockerfile 2016-01-22 13:10:23 +01: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
jekkos
a3d3cfad61 Use Dockerfile in travis-ci setup (#284)
Set version in package.json
2016-01-22 08:18:40 +01:00
FrancescoUK
b89e9c56cc Merge branch 'master' into ci3 (#284) 2016-01-21 18:38:48 +00:00
jekkos
192955b33d Fix receipt barcode generation for docker (add php5-gd lib to Dockerfile) (#284)
Make setup scripts with CI3
2016-01-21 18:30:06 +01:00
jekkos
195c8a0601 Make docker work with 2.4 branch 2016-01-21 16:23:54 +01:00
jekkos
9048d68baf Make docker work wig 2016-01-21 16:23:17 +01:00
jekkos
2b70762b7a Use ubuntu trusty for Docker container + add startup scripts (#284)
Add Grunt concatenate for sql scripts (migrate + db init) (#289)
2016-01-20 18:47:44 +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
jekkos
b5cc1542b6 Merge branch 'master' of https://github.com/jekkos/opensourcepos 2016-01-13 18:58:40 +01:00
jekkos
1a77960daa Update README.md with instructions for Docker setup 2016-01-13 18:57:44 +01:00
jekkos
301fbf4427 Merge pull request #283 from ais-one/ais-one-php7-fix
php7 fixes
2016-01-13 17:59:01 +01:00
Aaron Gong
2f0666325f PHP7 Fix
Use __construct as constructor instead of Class name
2016-01-13 15:59:37 +08:00
Aaron Gong
d0c765ce20 PHP7 fix
Change driver from mysql to mysqli
2016-01-13 15:58:20 +08:00
jekkos
a1ad99cc0d Add Dockerfile. Ospos is now containerized. Pull image from
docker build -t me/ospos git://github.com/jekkos/opensourcepos.git

then run

    docker run -it me/opensourcepos

And head to port 80 to login to a new ospos install.
2016-01-13 08:45:10 +01:00
jekkos
2d0b20499e Set correct locale for Dutch (Belgium) 2016-01-11 18:53:57 +01:00
FrancescoUK
5b01e60ed2 Merge branch 'master' #274 change into ci3 2016-01-10 13:13:55 +00:00
jekkos
26ff81ab71 Generate languages for German (Swiss) #274 2016-01-09 17:29:57 +01:00
Thorsten
da3349765a Add de_CH language (by nano-riff #274) 2016-01-09 16:46:00 +01: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
jekkos
4ddde65b41 Bump version to 2.3.4
Update dutch translation for company_name
Fix timeformat for date filtering in items module
2016-01-07 19:53:52 +01:00
jekkos
c408afad67 Cleanup migration script, mostly working now (#262) 2016-01-05 17:41:43 +01:00
jekkos
b1ba7d0afe Split up database.sql in scripts for tables and contraints.
Use both new scripts in phppos_migrate.sql
2016-01-05 07:41:49 +01:00
FrancescoUK
31a223cece Merge pull request #272 from daN4cat/master
#271 fix to error witn xampp due to a spurious "git"
2016-01-04 22:13:29 +00:00
FrancescoUK
3bd778737f #271 fix to error witn xampp due to a spurious "git" 2016-01-04 22:09:38 +00:00
jekkos
648251978e Merge pull request #270 from daN4cat/master
Fixes to #265, #267 and #269
2016-01-04 22:13:25 +01:00
FrancescoUK
240c96a185 #267 remove warning due to junk dirs being inside a language/xx one 2016-01-04 19:44:15 +00:00
FrancescoUK
810000e37c #265 do not override 404 handler in routes.php 2016-01-04 18:23:16 +00:00
FrancescoUK
6aa5126bf0 #269 fix https error issue 2016-01-04 17:55:00 +00:00
jekkos
90591382ce Further cleanup phppos migration script (#262) 2016-01-04 17:26:42 +01:00
jekkos
9e2d89c528 Show discounted price instead of discount itself on receipt 2016-01-04 17:19:50 +01:00
jekkos
1601d679fd Takings not using proper permission (#262) 2016-01-04 17:04:33 +01:00
jekkos
aa0409af48 Add phppos migration script (untested) #258 2016-01-01 17:10:43 +01:00
jekkos
ad194bd4c0 Fix typo in english translation (#260) 2016-01-01 16:46:58 +01:00
jekkos
1779685d31 Encode text before storing it as session variable (#254) 2015-12-30 08:10:14 +01:00
jekkos
51df82f35e Update WHATS_NEW 2015-12-30 07:42:27 +01:00
jekkos
bf0622d7fa Show discounted price per item line 2015-12-26 15:26:32 +01:00
jekkos
da25281df9 Show discounted price per item line 2015-12-26 15:21:54 +01:00
jekkos
2f52d083e8 Update changelog for 2.3.3 2015-12-26 13:13:47 +01:00
jekkos
eb63f49db7 Add barcode generation for EAN8 and EAN13 (#111, #246)
Add config option to use generation when generating barcodes for an
Generate propery barcode with configured format if item_number empty
2015-12-26 11:42:58 +01:00
jekkos
c007513fc8 Fix barcode generation error for empty item numbers 2015-12-13 15:57:03 +01:00
jekkos
9f5782e0ba Add validation for barcode types (#111, #246)
Fallback to code128 if invalid EAN8 or EAN13 is detected
2015-12-13 15:51:25 +01:00
jekkos
2f14a0f868 Fix typo in store language line (#247) 2015-12-13 14:15:43 +01:00
jekkos
fb924daa81 Show reoder level in items form when editing (#241) 2015-12-04 18:13:05 +01:00
jekkos
1bb9acdc37 Fix for adding/deleting stock locations (#242) 2015-12-04 18:09:51 +01:00
jekkos
16d5dfce77 Merge pull request #244 from kamaroly/master
Fixed Severity: Notice Message: Only variable references should be returned by reference Filename: core/Common.php Line Number: 257
2015-12-03 23:06:22 +01:00
Kamaro Lambert
afa203e73c Fixed error Only variable references should be returned by reference
Severity: Notice Message: Only variable references should be returned by reference Filename: core/Common.php Line Number: 257
2015-11-30 23:30:56 +02:00
jekkos
bc85391734 Submit form when hitting enter in search field for items module (#187) 2015-11-09 11:15:42 +01:00
jekkos
7c2cc9646d Don't override custom invoice numbers (#223) 2015-11-09 10:46:35 +01:00
jekkos
c0303cc873 Merge branch 'master' of https://github.com/asakpke/RoshanTech.com-POS 2015-10-20 22:01:37 +02:00
jekkos
0ddd80dc2c Regenerate thai language (#205) 2015-10-20 22:00:18 +02:00
songwutk
af582056d7 update sales_lang.csv : Thai
"sales_suspend_sale" too long in button, so change word fit.
2015-10-20 22:00:18 +02:00
jekkos
56859a77ab Fix path for jquery-ui icons (#207) 2015-10-20 13:23:20 +02:00
jekkos
ec5846e1eb Make receivings datetimepicker consistent with sales form (#169) 2015-10-18 21:37:49 +02:00
jekkos
6d5c192447 Add jquery-ui slider for datepicker #169 2015-10-17 00:22:57 +02:00
FrancescoUK
1b90ac14d2 #169 regenerate dist/ js scripts adding datetimepicker jQuery plugin 2015-10-15 19:12:50 +01:00
FrancescoUK
9c775ca44b #169 Add date and time picker to receivings/form
Some code indentation for better readibility.
2015-10-15 18:03:46 +01:00
FrancescoUK
0d87fc51d9 #169 Add a date time picker to sales/form such user can edit transaction date not in a manual manner
Needs more testing with different date & time formats and sorting out of min.js
2015-10-14 11:40:59 +01:00
jekkos
c4c7d9d792 Merge pull request #169 from marteserede/master
Fix dateformat value in SQL-Query app_config
2015-10-12 09:36:37 +02:00
jekkos
455a5f59d1 Merge pull request #199 from souparno/bug-condition-statement
if condition statement missing, may result in server error
2015-10-10 15:09:10 +02:00
souparno
9cf5d5734f if condition statement missing, may result in server error 2015-10-10 13:11:32 +05:30
jekkos
43b8d32efc Don't use empty on php expression (#196)
Signed-off-by: jekkos <jeroen.peelaerts@gmail.com>
2015-10-09 17:11:24 +02:00
jekkos
0c25b01666 Add default line endings 2015-10-09 11:43:19 +02:00
jekkos
1fd7fda645 Fix totals calculation when adding item multiple times (issue #165)
Fix typo in script comments
2015-10-09 10:24:38 +02:00
jekkos
3eb798917d Clear out empty sales and receivings comments on database upgrade
(#192)
2015-10-08 18:43:52 +02:00
jekkos
64023f6eec Avoid comments coercion to 0 when suspending sales (#192)
Invoice number in suspended sales should not be unique
2015-10-08 18:29:55 +02:00
jekkos
d8a369f39d Remove unique constriant from invoice_number column in suspended_sales 2015-10-08 18:29:55 +02:00
jekkos
98b0df9e80 Merge pull request #194 from daN4cat/master
#192 Remove 0 from comments
2015-10-07 13:11:18 +02:00
FrancescoUK
763a9e73fa #192 Remove 0 from comments
Checked in library get_comment if the string is null and return a '' if that's the case. That removes the 0 from sale comments
2015-10-07 09:37:27 +01:00
jekkos
df5a0448aa Merge pull request #193 from daN4cat/master
#192 Fix to comment not saved when suspending a Sale
2015-10-07 10:07:31 +02:00
Aamir Shahzad
76365afbd2 Added my name, ID and website in COPING 2015-10-06 22:58:37 +05:00
Aamir Shahzad
6e27b4c9ec Extra comments removed 2015-10-06 22:52:00 +05:00
FrancescoUK
a7e2ea5fa7 #192 Fix to comment not saved when suspending a Sale
The issue was that for a strange reason the comment was fetched directly from the form instead of using the sale_lib->get_comment like in the rest of the code.
2015-10-06 17:55:58 +01:00
Aamir Shahzad
986bbc9b36 Better Navigation with TAB key on Sales page 2015-10-06 03:31:57 +05:00
FrancescoUK
03f6d234bc #175 Fix inverted sorting issue 2015-09-28 22:47:16 +01:00
FrancescoUK
79361c976c Refactoring around items and sales search 2015-09-28 19:21:35 +01:00
FrancescoUK
1296f393d7 #175 Add pagination links 2015-09-28 18:24:02 +01:00
FrancescoUK
e49dd4e0b9 #179 Make Items Kit icon visible on home page
Remove the if statement that was in the end preventing any module having a _ to be displayed in the home page.
This solution is consistent with navigation bar one.

Also done some indentation in header and footer to improve readibility.
2015-09-28 13:12:22 +01:00
FrancescoUK
319545b989 #180 Fix to allowing a sale suspend before any payment
Reformatted the register code to increase readibility.
Please note that the real change is just moving the Suspend Sale button from finish_sale_form to cancel_sale_form, adding float:left style to Cancel button and changing the javascript for Suspend sale to address the correct form.
2015-09-28 08:59:22 +01:00
FrancescoUK
4a3e9ef79d #167 Limit description and serialnumber to 30 char before saving item to sale or suspended sale tables 2015-09-27 18:08:10 +01:00
FrancescoUK
e566223db9 #168 Items Kit: search by KIT id 2015-09-27 16:49:50 +01:00
FrancescoUK
22406d0c3a Merge pull request #176 from daN4cat/master
#165 Fix invoice wrong date on sale completion
2015-09-27 16:39:52 +01:00
FrancescoUK
8bb108503c #165 Fix invoice wrong date on sale completion 2015-09-25 19:02:03 +01:00
jekkos
1eb43d2a74 Merge branch 'master' of https://github.com/jekkos/opensourcepos 2015-09-24 22:02:23 +02:00
jekkos
56f7be21ae Merge pull request #171 from souparno/bug-fix-reset-database
reset database syntax contains check, so as it can be used to create…
2015-09-23 22:57:46 +02:00
FrancescoUK
ba6ecf0319 #132 Fix date range missing end date items 2015-09-23 18:04:04 +01:00
souparno
47c8d6c0bd reset database syntax contains check, so as it ccan be used to create the database for the first time 2015-09-23 21:29:17 +05:30
FrancescoUK
d9c49c1a72 #132 revert a modification in item model 2015-09-23 13:00:34 +01:00
FrancescoUK
5af7473769 #132 Set 1-1-2010 as starting date for the date range 2015-09-22 19:01:40 +01:00
FrancescoUK
aa9cd1fe6a #132 Make sure we don't show multiple times the same item given a range 2015-09-22 18:38:21 +01:00
FrancescoUK
58899ca4cf #132 Added date range in item model. Smoke test fine, more to test 2015-09-22 18:38:20 +01:00
FrancescoUK
404bc47e96 #132 Added date picker to Items manage, added date range to controller + model 2015-09-22 18:38:19 +01:00
jekkos
7dfcec394f Substitute invoice numbers on complete once again (#163, #150) 2015-09-22 18:21:19 +02:00
jekkos
0646200f6c Increase colspan for suppliers list
Multiple item kit price with quantity at hand
2015-09-22 07:40:48 +02:00
Martes Erede
2bc7b688ff Fix dateformat value in SQL-Query app_config 2015-09-22 07:17:57 +02:00
FrancescoUK
9309d7f15b Fix to COPYING file to follow correct license & copyright format (see http://mit-license.org/) 2015-09-20 21:48:23 +01:00
FrancescoUK
87153fc70e Add time ranges for quick report searches 2015-09-20 15:03:16 +01:00
FrancescoUK
ff12531b42 Revert "#159 Fixed typo in comment"
This reverts commit f18b54a758.
2015-09-20 14:54:54 +01:00
FrancescoUK
f18b54a758 #159 Fixed typo in comment 2015-09-20 09:18:57 +01:00
FrancescoUK
9a47b448ac #153 Set private internal functions 2015-09-20 09:18:03 +01:00
FrancescoUK
569bf4db69 #111 Change databse.sql barcode defaults 2015-09-19 17:52:14 +01:00
FrancescoUK
f97e02c3d4 Items: allow custom field suggestion and search if checkbox is ticked 2015-09-19 17:46:28 +01:00
FrancescoUK
893345d334 #111 Change barcode types from numbers to strings for better code readability 2015-09-19 17:44:43 +01:00
FrancescoUK
80fcede1ca #152 Remove Alain name and add it to the COPYING under the Copyright section 2015-09-19 17:40:00 +01:00
FrancescoUK
461de2f048 #162 fix further issues due to cost & retail prices added to the table 2015-09-19 15:23:16 +01:00
FrancescoUK
4106378a6c Changed CONCAT and use of " & ' 2015-09-19 13:19:49 +01:00
FrancescoUK
dfb556b27b Fixed typo in comment 2015-09-19 12:43:08 +01:00
FrancescoUK
41607c23bd Fix to #161 when searching a Kit by name in Sales 2015-09-19 12:38:21 +01:00
FrancescoUK
a29b8c2a62 Added Kit prices to table view and barcode #162
Some spacing and retouching here and there.
2015-09-19 12:05:44 +01:00
FrancescoUK
dc45b77573 Fix to Gift card totals issue #159
Various indentation adjustments
2015-09-19 09:22:24 +01:00
FrancescoUK
ad948ac81e Fix to rebase/merge mistake with Barcode_lib 2015-09-18 18:05:43 +01:00
FrancescoUK
eee7f137ef Fix to rebase/merge mistake with Barcode_lib 2015-09-18 18:33:32 +02:00
jekkos
2237c332b9 Derive barcode id from item array 2015-09-18 18:33:22 +02:00
FrancescoUK
d5cf608bac Fix to #152 remove name of people from code comment and add them to COPYING license file 2015-09-18 18:33:22 +02:00
FrancescoUK
96973da280 Item kits issue #155 fix
Added Kit Id column to table view
2015-09-18 18:33:22 +02:00
FrancescoUK
bca4386aed Fix to sale and receiving receipt barcode 2015-09-18 18:33:22 +02:00
FrancescoUK
27f89a63be remove the - from language/id/common_lang.php 2015-09-17 22:00:06 +02:00
FrancescoUK
3f5d0b781b Fix to $lang["common_last_page"] issue #156 2015-09-17 22:00:06 +02:00
FrancescoUK
0984cdbfc4 Fix to sale and receiving receipt barcode 2015-09-17 22:00:06 +02:00
FrancescoUK
c48106f2f5 Fix items view search issue having a ' in the string. Bug #149 2015-09-17 21:59:34 +02:00
jekkos
e1ddcbbb5b Rename Item_quantities model to Item_quantity
Rename Stock_locations model to Stock_location
Fix barcode generation in receipts (sales + receivings)
2015-09-17 21:59:33 +02:00
FrancescoUK
2b7ceb4228 Move Print button in sale/manage (Takings) to top right 2015-09-17 21:59:33 +02:00
jekkos
3c89416b83 Update languages 2015-09-15 23:21:59 +02:00
jekkos
290aee4671 Merge branch 'patch-13' of https://github.com/songwutk/opensourcepos 2015-09-15 23:01:10 +02:00
FrancescoUK
10ea821b2a Leave item_number empty if Code39/128 is selected
Added Empty UPC checkbox in Items view to easily select empty items that need barcode code generation and in case of EAN8/13 fill in item_number
Added language for Empty UPC string
Indentation/spacing adjustment
2015-09-15 17:49:51 +01:00
FrancescoUK
cf0276c772 If item_number (UPC/EAN/ISBN) is empty and a new barcode is generated save it in the item_number field and update the item entry
Refactoring of barcode_lib
Some code alignment adjustment here and there
2015-09-15 11:13:58 +01:00
FrancescoUK
8f2740d349 Centred barcode image
Moved $data to base class and added getData
Fixed indentation
2015-09-14 23:20:20 +01:00
FrancescoUK
eb71dbc300 Fix EAN 13 typos + set pix per bar
Add EAN 8 support
2015-09-14 23:20:19 +01:00
FrancescoUK
68915dd28c Ean13 code generation implementation 2015-09-14 23:20:19 +01:00
FrancescoUK
93d8775ac5 Remove extra comma from end of array 2015-09-14 23:20:18 +01:00
FrancescoUK
807d48ac7b Add EAN13 in Barcode lib
Sketched EAN13 class code
Fix typo
2015-09-14 23:20:17 +01:00
FrancescoUK
79fd666bff Add Ean13 file and class
Fixed typos
2015-09-14 23:20:16 +01:00
FrancescoUK
393ac9bb97 Fixed some minor issues 2015-09-14 23:20:15 +01:00
songwutk
ac95e1f7d8 Update common_lang.csv
Fill thai blank topic.
2015-09-14 16:30:40 +07:00
jekkos
c843c174ed Initialize table sorting if this didn't happen when the page was loaded
initially (#139)
2015-09-14 08:26:41 +02:00
jekkos
d6f052f082 Add default translation in other languages as well (#142) 2015-09-12 20:55:54 +02:00
jekkos
a78ef2fb08 Merge branch 'master' of https://github.com/marteserede/opensourcepos 2015-09-12 20:16:46 +02:00
Martes Erede
4cbbd3a6f7 [#32] using to_currency for currency values in table-data 2015-09-11 16:16:34 +08:00
Martes Erede
4a8c3a83b3 [#32] adding new language-strings and running generate_languages.php 2015-09-11 15:59:27 +08:00
Martes Erede
308be8079f [#32] improving the inventory summary report, including total inventory value 2015-09-11 15:58:57 +08:00
jekkos
335ced948e Remove unneeded fields from sales_temp table 2015-09-09 23:20:31 +02:00
jekkos
b41a006a79 Fix duplicated payment amounts (#136) 2015-09-09 23:09:28 +02:00
jekkos
506aced23e amount_due and change_due were incorrect if multiple items in sale
(#136)
2015-09-09 19:25:44 +02:00
jekkos
e9ea2ba792 Create temp table when necessary 2015-09-07 22:53:19 +02:00
jekkos
2c5f3ee759 Add grunt-cache-breaker plugin (#137)
Fix tax inclusive pricing for daily sales overview (#136)
Fix table sorting when using search in daily sales overview (#131)
2015-09-07 22:15:41 +02:00
jekkos
b680cdff36 Fix table sorting after loading search results 2015-09-07 08:35:59 +02:00
jekkos
80f7966d1c Add default dateformat and timeformat in data scripts 2015-09-06 15:53:11 +02:00
jekkos
e62df579f1 Keep last row in position even after filtering 2015-09-06 13:33:12 +02:00
jekkos
2b6b3914a7 Mark totals row as static (keep it at bottom of the table issue #131) 2015-09-06 13:19:32 +02:00
jekkos
756b675e2b use configured dateformat for jquery ui date parser
disable sorting on columns 0 and 9 (no data there)
default sorting enabled on column 1
2015-09-05 15:05:20 +02:00
jekkos
1d65ceaccf Merge branch 'master' of https://github.com/daN4cat/opensourcepos 2015-09-05 09:52:48 +02:00
jekkos
0c92cc661f Remove date field type for filters 2015-09-05 09:52:30 +02:00
FrancescoUK
c87a936e22 Fix language issue 2015-09-04 23:24:53 +01:00
FrancescoUK
c041a18624 Added Print button to print the current view 2015-09-04 22:51:12 +01:00
jekkos
ac3aab51fa Fix payment summary update on search 2015-09-04 23:35:23 +02:00
jekkos
9281995029 Fix payment summary update on search
Merge branch 'master' of https://github.com/daN4cat/opensourcepos into daN4cat-master
2015-09-04 23:14:06 +02:00
jekkos
f36c700129 Add date filtering in sales overview
Add jquery-ui datepicker
Format dates in sale and receiving forms according to configured
dateformat and timeformat settings
Add missing translations in sale (click delete when not selecting
anything)
Add search box back to search for customer sales and ticket numbers
2015-09-04 22:09:24 +02:00
FrancescoUK
d35ef071bb - Added cash only filter
- Set to 'all' the sale_type so even returns are shown (we might want to add a drop down filter for this too)
2015-09-04 19:30:43 +01:00
FrancescoUK
852f83a8f6 Rename Overview to be Takings (normally used word in retail world) 2015-09-04 10:31:02 +01:00
FrancescoUK
7bbd651779 Remove commented out lines 2015-09-04 10:11:02 +01:00
jekkos
a624d21fcd Fix sale detail edit
Make last row in sale table bold (css)
Add default date range between yesterday and today
Temporarily comment out payment type listing in table itself (tbd)
2015-09-04 08:44:20 +02:00
jekkos
9a2cafc1b1 Review payment type overview
Add some padding to bottom of content area
Fix invoice only searching
Make start and end dates optional
2015-09-03 23:35:57 +02:00
FrancescoUK
b226a40efc Make Gift Card one payment item and not multiple ones in Sale/Overview and in Summary Payment report.
Fixed also the colspan and set to 10.
2015-09-03 19:18:15 +01:00
FrancescoUK
0b8a263443 Sale Overview change:
- set today as view date and comment out the debug dates
2015-09-02 23:22:44 +01:00
FrancescoUK
75fa706299 Sale Overview change
- Refactor and optimise payments part (added now amount to detail sale report too)
- fix some </tr> that should have been </td>
- minor indentation fixes

NOTE: The only_invoices checkbox is not responsive
2015-09-02 23:16:26 +01:00
FrancescoUK
c88f37f8e7 Change Sale Overview to become a daily takings view with totals. 2015-09-01 23:37:26 +01:00
jekkos
3e24b9caff Remove non working datepicker icon
Remove in_array check for duplicated company_name
2015-08-24 21:52:41 +02:00
jekkos
517363b485 Fix deleted checkbox in items form
Clear suggestion cache when toggling deleted filter
2015-08-18 18:10:00 +02:00
jekkos
011caf375f Apply is_deleted in item suggestion search 2015-08-18 08:35:21 +02:00
FrancescoUK
9f1485cfe5 Added Cost & Count to reports, improved Items suggest, added copyrights and some fixes
Added cost and count to reports

- Added cost in temp table, reports at bottom of page and in each
summary and detailed report
- Added count in all the reports
- Renamed some report fields name to make it generic and consistent
across views
- Fixed few issues here and there
- Adjusted some code indentation

NOTE: Proper translation of word Cost is required in all the languages
but English

Improved Items suggestion

- Added select to restrict results fields
- Added distinct in suppliers instead of the array match
- Added $is_deleted in model part but is not still effective

Add copyright statements in COPYING license file

- Added jekkos and FrancescoUK / daN4cat

Other people that contributed should add their statements.
2015-08-17 11:13:04 +01:00
jekkos
0336fe6298 Stop showing duplicate suggestions for company_name 2015-08-16 15:52:25 +02:00
jekkos
4ab2ec1b5b Add supplier attribute search for items (pull request #106)
Add company name to supplier column in summary report
2015-08-16 15:41:39 +02:00
jekkos
eb3657e76f Fix upgrade script (2) 2015-08-13 22:53:52 +02:00
jekkos
61206547cb FIll in empty location_ids for existing data 2015-08-12 15:10:08 +02:00
songwutk
9ae6e3242b Update Thai translate (Pull requests #98, #99, #100, #101, #102) 2015-08-11 18:49:28 +02:00
jekkos
7f5fe9efde Upgrade grunt-mocha-webdriver 2015-08-10 15:32:00 +02:00
jekkos
9e189a503e Merge pull request #105 from gabrielperezs/master
Solved to issues in this request. Spanish support, and temp table creation.
2015-08-10 11:03:58 +02:00
Gabriel Pérez S
da41aec0d1 Spanish traslation 2015-08-10 10:26:11 +02:00
Gabriel Pérez S
03b9924d57 Create table if not exists 2015-08-10 10:14:03 +02:00
jekkos
87222611e6 Remove duplicated last name for suppliers 2015-08-10 09:30:01 +02:00
FrancescoUK
cc06d93d30 Remove LICENSE file (use COPYING now instead)
Update agency_name constraint in update script
Show supplier_id in suppliers for use with item excel import
2015-08-09 12:01:09 +02:00
jekkos
7926a05948 Regenerate language files
Remove committed merge conflict in giftcard_numbering.js
Add sql upgrade script for 2.3.3
2015-08-07 17:17:53 +02:00
FrancescoUK
d7ff4a371c Fix to the License naming clash issue
- Instead of LICENSE used COPYING (it's accepted see:
http://www.theregister.co.uk/2013/04/18/github_licensing_study)
- removed license.txt inside license dir to avoid unnecessary
duplications or clash of license of the ospos code. COPYING is anyway a
rename of LICENSE that was a newer version than the one in
license/license.txt
2015-08-07 15:02:15 +02:00
FrancescoUK
aa144b43eb Fixed invoice date bug
The invoice date was not showing the correct date and neither following
the selected format
2015-08-07 15:02:15 +02:00
FrancescoUK
f806ea84b3 Update to Suppliers feature
- added Agency name to identify agent or distributor behind a brand
- updated view to show supplier ID useful for item imports via excel
sheet
- update database table
- updated language although missing translations
- various bit an pieces missing due to failed rebase
2015-08-07 15:02:15 +02:00
jekkos
17ac5b1837 Bump version number to 2.3.3 2015-07-25 12:03:04 +02:00
FrancescoUK
8bcd2a69dc Add better locale config support (pull request #93)
I've added in this commit the following:

- the means to configure date and time format
- date and time is shown with the selected formats
- a locale tab in the configuration page
- changed location tab to be stock tab and the same for the file names
- translation strings (only English) for the case

NOTE 1: Not related to Locale support but I removed an extra <div
class="field_row clearfix"> from general_config.php

NOTE 2: There is no rules in the submit checks of Locale. Probably this
is something to iron out a bit

NOTE 3: It would be probably nice to add a button in the Locale tab to
regenerate all the translation files in case somebody updates the
translations .csv

Fixed Local config

- Removed text in Red as really not mandatory configuration
- Added time format in 24h and 12h

Updated General Config tab

- reorganised the layout grouping things like company info, taxes and
invoice formating
- increased the limit of max lines per page to 1000 because 50 is too
little. People can do what they want with up to 1000
2015-07-25 12:02:10 +02:00
jekkos
4916f98bcb Fix currency symbol when no dollars are chosen 2015-04-14 13:04:46 +02:00
580 changed files with 88883 additions and 48584 deletions

1
.gitattributes vendored
View File

@@ -1,2 +1,3 @@
dist/ merge=ours
application/language/**/*.php merge=ours
text=auto

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,22 +1,16 @@
language: php
php:
- 5.5
install: npm install
before_script:
- npm update -g npm
- npm install grunt-cli
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-fastcgi
# enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f travis-ci-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
- sudo service apache2 restart
- mysql -e "create database IF NOT EXISTS ospos;" -uroot
- mysql -e "use ospos; source database/database.sql;" -uroot
- cp application/config/database.php.tmpl application/config/database.php
script: grunt mochaWebdriver:test
sudo: false
language: node_js
node_js:
- "4.1"
services:
- docker
before_install:
- docker build -t jekkos/opensourcepos .
- docker run -d jekkos/opensourcepos
script:
- docker exec -t -i $(docker ps | tail -n 1 | cut -d' ' -f1) /bin/sh -c "while ! curl http://localhost/index.php | grep username; do sleep 1; done; cd app && grunt mochaWebdriver:test"

View File

@@ -1,6 +1,14 @@
The MIT License (MIT)
Copyright (c) 2014 pappastech
Copyright (c) 2012-2014 pappastech
Copyright (c) 2012 Alain
Copyright (c) 2013 Rob Garrison
Copyright (c) 2013 Parq
Copyright (c) 2013 Ramel
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
@@ -17,4 +25,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
FROM ubuntu:utopic
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 php5-apcu nodejs npm curl
RUN easy_install supervisor
ADD ./docker/foreground.sh /etc/apache2/foreground.sh
ADD ./docker/supervisord.conf /etc/supervisord.conf
RUN chmod 755 /etc/apache2/foreground.sh
# Install dependencies
RUN apt-get install -y --no-install-recommends software-properties-common
RUN apt-get install -y python git
# Get latest Ospos source from Git
RUN git clone https://github.com/jekkos/opensourcepos.git /app
# RUN cd app && git checkout develop/2.4
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 -fs /app/* /var/www/html
ADD ./docker/start_container.sh /start_container.sh
RUN chmod 755 /start_container.sh
EXPOSE 80 3306
CMD ["/bin/bash", "/start_container.sh"]

View File

@@ -3,21 +3,33 @@ module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
dist: {
src: ['js/jquery*', 'js/*.js'],
dest: 'dist/<%= pkg.name %>.js'
}
js: {
options: {
separator: ';'
},
dist: {
src: ['js/jquery*', 'js/*.js'],
dest: 'dist/<%= pkg.name %>.js'
}
},
sql: {
options: {
banner: '-- >> This file is autogenerated from tables.sql and constraints.sql. Do not modify directly << --'
},
files: {
'database/database.sql': ['database/tables.sql', 'database/constraints.sql'],
'database/migrate_phppos_dist.sql': ['database/tables.sql', 'database/phppos_migrate.sql', 'database/constraints.sql']
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
'dist/<%= pkg.name %>.min.js': ['<%= concat.js.dist.dest %>']
}
}
},
@@ -74,6 +86,20 @@ module.exports = function(grunt) {
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint']
},
cachebreaker: {
dev: {
options: {
match: ['opensourcepos.min.js'],
src: {
path: 'dist/opensourcepos.min.js'
},
replacement: 'md5'
},
files: {
src: ['application/views/partial/header.php']
}
}
}
});
@@ -83,7 +109,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-script-link-tags');
grunt.loadNpmTasks('grunt-mocha-webdriver');
grunt.loadNpmTasks('grunt-cache-breaker');
grunt.registerTask('default', ['tags:js', 'concat', 'uglify', 'tags:minjs']);
grunt.registerTask('default', ['tags:js', 'concat', 'uglify', 'tags:minjs', 'cachebreaker']);
};

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,11 +22,31 @@ username: admin
password:pointofsale
9. Enjoy
A more extensive setup guide can be found at [this site](http://www.opensourceposguide.com/guide/gettingstarted/installation)
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.
To build and run the image, issue following commands in a terminal with docker installed
docker build -t me/ospos https://github.com/jekkos/opensourcepos.git
docker run -d -p 80:80 me/ospos
Docker will clone the latest master into the image and start a LAMP stack with the application configured. If you like to persist your changes in this install, then you can use two docker data containers to store database and filesystem changes. In this case you will need following command (first time only)
docker run -d -v /app --name="ospos" -v /var/lib/mysql --name="ospos-sql" -p 127.0.0.1:80:80 me/ospos
After stopping the created container for the first time, this command will be replaced with
docker run -d -v /app --volumes-from="ospos" -v /var/lib/mysql --volumes-from="ospos-sql" -p 127.0.0.1:80:80 me/ospos
Both the data and mysql directories will be persisted in a separate docker container and can be mounted within any other container using the last command. A more extensive setup guide can be found at [this site](http://www.opensourceposguide.com/guide/gettingstarted/installation)
If you like the project, and you are making money out of it on a daily basis, then consider to buy me a coffee so I can keep adding features.
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MUN6AEG7NY6H8)
Or send some coins to **19kwPpAwrUTxbNEs5D6cRR1k4mf5HNa4v2**

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,54 @@
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
+ Improved continuous integration setup
+ More integration tests
+ Virtualized container setup (docker install)
+ Live clock functionality + favicon
+ Improved PHP 7 compatbility
+ Added de_CH (German) as language
+ Minor code cleanup
+ Removal of annoying backup prompt on logout
Version 2.3.3
-------------
+ Item kit fixes (search, list, ..)
+ Add datepicker widgets in sale/receiving edit forms
+ Add date filter in items module
+ Add barcode generation logic for EAN8, EAN13
+ Add barcode validation + fallback logic for EAN8, EAN13
+ New config option to generate barcodes if item_number empty
+ Add cost + count to inventory reports
+ Giftcard fixes
+ Refactor sales overview (added date filtering + search options)
+ Better locale config support
+ Improve php compatibility
+ Fix invoice numbering bug on suspend
+ Add configurable locale-dependent dateformat
+ Add grunt-cache-breaker plugin
+ Suspend button appeaers before adding a payment
+ Searching of deleted items, filtering part is removed
+ Remove infamous "0" after leaving sale or receiving comments empty
+ Add SQL script to clean zeroes in sales/receivings comments
+ Numerous other bug fixes
Version 2.3.2
-------------
+ Nominatim (OpenStreetMap) customer address autocompletion

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');
$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_locations','Item_quantities');
/* 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.2';
$config['application_version'] = '2.4.0';
/*
|--------------------------------------------------------------------------
@@ -21,8 +22,16 @@ $config['application_version'] = '2.3.2';
|
| 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'] = 'mysql';
$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,35 +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['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['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'] = 'errors/page_missing';
/* 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

@@ -0,0 +1,216 @@
<?php
require_once ("Secure_area.php");
class Config extends Secure_area
{
function __construct()
{
parent::__construct('config');
$this->load->library('barcode_lib');
}
function index()
{
$location_names = array();
$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);
}
function save()
{
$upload_success = $this->_handle_logo_upload();
$upload_data = $this->upload->data();
$batch_save_data=array(
'company'=>$this->input->post('company'),
'address'=>$this->input->post('address'),
'phone'=>$this->input->post('phone'),
'email'=>$this->input->post('email'),
'fax'=>$this->input->post('fax'),
'website'=>$this->input->post('website'),
'default_tax_1_rate'=>$this->input->post('default_tax_1_rate'),
'default_tax_1_name'=>$this->input->post('default_tax_1_name'),
'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'),
'default_tax_2_name'=>$this->input->post('default_tax_2_name'),
'return_policy'=>$this->input->post('return_policy'),
'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') != 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'),
'custom2_name'=>$this->input->post('custom2_name'),
'custom3_name'=>$this->input->post('custom3_name'),
'custom4_name'=>$this->input->post('custom4_name'),
'custom5_name'=>$this->input->post('custom5_name'),
'custom6_name'=>$this->input->post('custom6_name'),
'custom7_name'=>$this->input->post('custom7_name'),
'custom8_name'=>$this->input->post('custom8_name'),
'custom9_name'=>$this->input->post('custom9_name'),
'custom10_name'=>$this->input->post('custom10_name')
);
if (!empty($upload_data['orig_name']))
{
$batch_save_data['company_logo'] = $upload_data['raw_name'] . $upload_data['file_ext'];
}
$result = $this->Appconfig->batch_save( $batch_save_data );
$success = $upload_success && $result ? true : false;
$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));
}
function save_locale()
{
$batch_save_data=array(
'currency_symbol'=>$this->input->post('currency_symbol'),
'currency_side'=>$this->input->post('currency_side') != null,
'language'=>$this->input->post('language'),
'timezone'=>$this->input->post('timezone'),
'dateformat'=>$this->input->post('dateformat'),
'timeformat'=>$this->input->post('timeformat'),
'thousands_separator'=>$this->input->post('thousands_separator'),
'decimal_point'=>$this->input->post('decimal_point')
);
$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')));
}
function stock_locations()
{
$stock_locations = $this->Stock_location->get_all()->result_array();
$this->load->view('partial/stock_locations', array('stock_locations' => $stock_locations));
}
function _clear_session_state()
{
$this->load->library('sale_lib');
$this->sale_lib->clear_sale_location();
$this->sale_lib->clear_all();
$this->load->library('receiving_lib');
$this->receiving_lib->clear_stock_source();
$this->receiving_lib->clear_stock_destination();
$this->receiving_lib->clear_all();
}
function save_locations()
{
$this->db->trans_start();
$deleted_locations = $this->Stock_location->get_allowed_locations();
foreach($this->input->post() as $key => $value)
{
if (strstr($key, 'stock_location'))
{
$location_id = preg_replace("/.*?_(\d+)$/", "$1", $key);
unset($deleted_locations[$location_id]);
// save or update
$location_data = array('location_name' => $value);
if ($this->Stock_location->save($location_data, $location_id))
{
$this->_clear_session_state();
}
}
}
// all locations not available in post will be deleted now
foreach ($deleted_locations as $location_id => $location_name)
{
$this->Stock_location->delete($location_id);
}
$success = $this->db->trans_complete();
echo json_encode(array('success'=>$success,'message'=>$this->lang->line('config_saved_' . ($success ? '' : 'un') . 'successfully')));
}
function save_barcode()
{
$batch_save_data=array(
'barcode_type'=>$this->input->post('barcode_type'),
'barcode_quality'=>$this->input->post('barcode_quality'),
'barcode_width'=>$this->input->post('barcode_width'),
'barcode_height'=>$this->input->post('barcode_height'),
'barcode_font'=>$this->input->post('barcode_font'),
'barcode_font_size'=>$this->input->post('barcode_font_size'),
'barcode_first_row'=>$this->input->post('barcode_first_row'),
'barcode_second_row'=>$this->input->post('barcode_second_row'),
'barcode_third_row'=>$this->input->post('barcode_third_row'),
'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') != null,
'barcode_content'=>$this->input->post('barcode_content')
);
$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')));
}
function save_receipt()
{
$batch_save_data = array (
'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' ) != 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' ) != null
);
$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')));
}
function _handle_logo_upload()
{
$this->load->helper('directory');
// load upload library
$config = array('upload_path' => './uploads/',
'allowed_types' => 'gif|jpg|png',
'max_size' => '1024',
'max_width' => '800',
'max_height' => '680',
'file_name' => 'company_logo');
$this->load->library('upload', $config);
$this->upload->do_upload('company_logo');
return strlen($this->upload->display_errors()) == 0 || !strcmp($this->upload->display_errors(), '<p>'.$this->lang->line('upload_no_file_selected').'</p>');
}
function backup_db()
{
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
if($this->Employee->has_module_grant('config',$employee_id))
{
$this->load->dbutil();
$prefs = array(
'format' => 'zip',
'filename' => 'ospos.sql'
);
$backup =& $this->dbutil->backup($prefs);
$file_name = 'ospos-' . date("Y-m-d-H-i-s") .'.zip';
$save = 'uploads/'.$file_name;
$this->load->helper('download');
while (ob_get_level()) {
ob_end_clean();
}
force_download($file_name, $backup);
}
else
{
redirect('no_access/config');
}
}
}
?>

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,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 Giftcards extends Secure_area implements iData_controller
{
function __construct()
@@ -10,24 +11,29 @@ class Giftcards extends Secure_area implements iData_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');
$giftcards = $this->Giftcard->get_all($lines_per_page,$limit_from);
$data['links'] = $this->_initialize_pagination($this->Giftcard,$lines_per_page,$limit_from);
$data['manage_table']=get_giftcards_manage_table($giftcards,$this);
$this->load->view('giftcards/manage',$data);
$giftcards = $this->Giftcard->get_all($lines_per_page, $limit_from);
$data['links'] = $this->_initialize_pagination($this->Giftcard, $lines_per_page, $limit_from);
$data['manage_table'] = get_giftcards_manage_table($giftcards, $this);
$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);
$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));
}
@@ -36,23 +42,23 @@ class Giftcards extends Secure_area implements iData_controller
*/
function suggest()
{
$suggestions = $this->Giftcard->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
$suggestions = $this->Giftcard->get_search_suggestions($this->input->post('q'), $this->input->post('limit'));
echo implode("\n",$suggestions);
}
/** GARRISON ADDED 5/3/2013 **/
/*
Gives search suggestions for person_id based on what is being searched for
*/
function person_search()
{
$suggestions = $this->Customer->get_customer_search_suggestions($this->input->post('q'),$this->input->post('limit'));
$suggestions = $this->Customer->get_customer_search_suggestions($this->input->post('q'), $this->input->post('limit'));
echo implode("\n",$suggestions);
}
/** END GARRISON ADDED **/
function get_row()
{
$giftcard_id = $this->input->post('row_id');
$data_row=get_giftcard_data_row($this->Giftcard->get_info($giftcard_id),$this);
$data_row = get_giftcard_data_row($this->Giftcard->get_info($giftcard_id), $this);
echo $data_row;
}
@@ -61,7 +67,7 @@ class Giftcards extends Secure_area implements iData_controller
$giftcard_info = $this->Giftcard->get_info($giftcard_id);
$person_name=$giftcard_id > 0? $giftcard_info->first_name . ' ' . $giftcard_info->last_name : '';
$data['selected_person'] = $giftcard_id > 0 && isset($giftcard_info->person_id) ? $giftcard_info->person_id . "|" . $person_name : "";
$data['giftcard_number']= $giftcard_id > 0 ? $giftcard_info->giftcard_number : $this->Giftcard->get_max_number()->giftcard_number + 1;
$data['giftcard_number'] = $giftcard_id > 0 ? $giftcard_info->giftcard_number : $this->Giftcard->get_max_number()->giftcard_number + 1;
$data['giftcard_info'] = $giftcard_info;
$this->load->view("giftcards/form",$data);
}
@@ -70,9 +76,9 @@ class Giftcards extends Secure_area implements iData_controller
{
$giftcard_data = array(
'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
'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
);
if( $this->Giftcard->save( $giftcard_data, $giftcard_id ) )
@@ -80,20 +86,20 @@ class Giftcards extends Secure_area implements iData_controller
//New giftcard
if($giftcard_id==-1)
{
echo json_encode(array('success'=>true,'message'=>$this->lang->line('giftcards_successful_adding').' '.
$giftcard_data['giftcard_number'],'giftcard_id'=>$giftcard_data['giftcard_id']));
echo json_encode(array('success'=>true, 'message'=>$this->lang->line('giftcards_successful_adding').' '.
$giftcard_data['giftcard_number'], 'giftcard_id'=>$giftcard_data['giftcard_id']));
$giftcard_id = $giftcard_data['giftcard_id'];
}
else //previous giftcard
{
echo json_encode(array('success'=>true,'message'=>$this->lang->line('giftcards_successful_updating').' '.
$giftcard_data['giftcard_number'],'giftcard_id'=>$giftcard_id));
echo json_encode(array('success'=>true, 'message'=>$this->lang->line('giftcards_successful_updating').' '.
$giftcard_data['giftcard_number'], 'giftcard_id'=>$giftcard_id));
}
}
else//failure
{
echo json_encode(array('success'=>false,'message'=>$this->lang->line('giftcards_error_adding_updating').' '.
$giftcard_data['giftcard_number'],'giftcard_id'=>-1));
$giftcard_data['giftcard_number'], 'giftcard_id'=>-1));
}
}
@@ -103,12 +109,12 @@ class Giftcards extends Secure_area implements iData_controller
if($this->Giftcard->delete_list($giftcards_to_delete))
{
echo json_encode(array('success'=>true,'message'=>$this->lang->line('giftcards_successful_deleted').' '.
count($giftcards_to_delete).' '.$this->lang->line('giftcards_one_or_multiple')));
echo json_encode(array('success'=>true, 'message'=>$this->lang->line('giftcards_successful_deleted').' '.
count($giftcards_to_delete).' '.$this->lang->line('giftcards_one_or_multiple')));
}
else
{
echo json_encode(array('success'=>false,'message'=>$this->lang->line('giftcards_cannot_be_deleted')));
echo json_encode(array('success'=>false, 'message'=>$this->lang->line('giftcards_cannot_be_deleted')));
}
}

View File

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

View File

@@ -0,0 +1,195 @@
<?php
require_once ("Secure_area.php");
require_once ("interfaces/Idata_controller.php");
class Item_kits extends Secure_area implements iData_controller
{
function __construct()
{
parent::__construct('item_kits');
}
// add the total cost and retail price to a passed items kit retrieving the data from each singolar item part of the kit
private function add_totals_to_item_kit($item_kit)
{
$item_kit->total_cost_price = 0;
$item_kit->total_unit_price = 0;
foreach ($this->Item_kit_items->get_info($item_kit->item_kit_id) as $item_kit_item)
{
$item_info = $this->Item->get_info($item_kit_item['item_id']);
$item_kit->total_cost_price += $item_info->cost_price * $item_kit_item['quantity'];
$item_kit->total_unit_price += $item_info->unit_price * $item_kit_item['quantity'];
}
return $item_kit;
}
function index($limit_from=0)
{
$data['controller_name'] = $this->get_controller_name();
$data['form_width'] = $this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$item_kits = $this->Item_kit->get_all($lines_per_page, $limit_from);
foreach($item_kits->result() as $item_kit)
{
// calculate the total cost and retail price of the Kit so it can be printed out in the manage table
$item_kit = $this->add_totals_to_item_kit($item_kit);
}
$data['links'] = $this->_initialize_pagination($this->Item_kit, $lines_per_page, $limit_from);
$data['manage_table'] = get_item_kits_manage_table($item_kits, $this);
$this->load->view('item_kits/manage', $data);
}
/*
Returns Item kits table data rows. This will be called with AJAX.
*/
function 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');
foreach($item_kits->result() as $item_kit)
{
// calculate the total cost and retail price of the Kit so it can be printed out in the manage table
$item_kit = $this->add_totals_to_item_kit($item_kit);
}
$data_rows = get_item_kits_manage_table_data_rows($item_kits, $this);
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
}
/*
Gives search suggestions based on what is being searched for
*/
function suggest()
{
$suggestions = $this->Item_kit->get_search_suggestions($this->input->post('q'), $this->input->post('limit'));
echo implode("\n", $suggestions);
}
function get_row()
{
$item_kit_id = $this->input->post('row_id');
// calculate the total cost and retail price of the Kit so it can be added to the table refresh
$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));
}
function view($item_kit_id=-1)
{
$data['item_kit_info'] = $this->Item_kit->get_info($item_kit_id);
$this->load->view("item_kits/form", $data);
}
function save($item_kit_id=-1)
{
$item_kit_data = array(
'name' => $this->input->post('name'),
'description' => $this->input->post('description')
);
if ($this->Item_kit->save($item_kit_data, $item_kit_id))
{
//New item kit
if ($item_kit_id==-1)
{
$item_kit_id = $item_kit_data['item_kit_id'];
echo json_encode(array('success'=>true,
'message'=>$this->lang->line('item_kits_successful_adding').' '.$item_kit_data['name'],
'item_kit_id'=>$item_kit_id));
}
else //previous item
{
echo json_encode(array('success'=>true,
'message'=>$this->lang->line('item_kits_successful_updating').' '.$item_kit_data['name'],
'item_kit_id'=>$item_kit_id));
}
if ( $this->input->post('item_kit_item') != null )
{
$item_kit_items = array();
foreach($this->input->post('item_kit_item') as $item_id => $quantity)
{
$item_kit_items[] = array(
'item_id' => $item_id,
'quantity' => $quantity
);
}
$this->Item_kit_items->save($item_kit_items, $item_kit_id);
}
}
else//failure
{
echo json_encode(array('success'=>false,
'message'=>$this->lang->line('item_kits_error_adding_updating').' '.$item_kit_data['name'],
'item_kit_id'=>-1));
}
}
function delete()
{
$item_kits_to_delete = $this->input->post('ids');
if ($this->Item_kit->delete_list($item_kits_to_delete))
{
echo json_encode(array('success'=>true,
'message'=>$this->lang->line('item_kits_successful_deleted').' '.count($item_kits_to_delete).' '.$this->lang->line('item_kits_one_or_multiple')));
}
else
{
echo json_encode(array('success'=>false,
'message'=>$this->lang->line('item_kits_cannot_be_deleted')));
}
}
function generate_barcodes($item_kit_ids)
{
$this->load->library('barcode_lib');
$result = array();
$item_kit_ids = explode(':', $item_kit_ids);
foreach ($item_kit_ids as $item_kid_id)
{
// calculate the total cost and retail price of the Kit so it can be added to the barcode text at the bottom
$item_kit = $this->add_totals_to_item_kit($this->Item_kit->get_info($item_kid_id));
$result[] = array('name'=>$item_kit->name, 'item_id'=>'KIT '.$item_kid_id, 'item_number'=>'KIT '.$item_kid_id, 'cost_price'=>$item_kit->total_cost_price, 'unit_price'=>$item_kit->total_unit_price);
}
$data['items'] = $result;
$barcode_config = $this->barcode_lib->get_barcode_config();
// in case the selected barcode type is not Code39 or Code128 we set by default Code128
// the rationale for this is that EAN codes cannot have strings as seed, so 'KIT ' is not allowed
if($barcode_config['barcode_type'] != 'Code39' && $barcode_config['barcode_type'] != 'Code128')
{
$barcode_config['barcode_type'] = 'Code128';
}
$data['barcode_config'] = $barcode_config;
$this->load->view("barcode_sheet", $data);
}
/*
get the width for the add/edit form
*/
function get_form_width()
{
return 400;
}
}
?>

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 Items extends Secure_area implements iData_controller
{
function __construct()
@@ -11,47 +12,77 @@ class Items extends Secure_area implements iData_controller
function index($limit_from=0)
{
$stock_location=$this->item_lib->get_item_location();
$stock_locations=$this->Stock_locations->get_allowed_locations();
$stock_location = $this->item_lib->get_item_location();
$stock_locations = $this->Stock_location->get_allowed_locations();
$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');
$items = $this->Item->get_all($stock_location,$lines_per_page,$limit_from);
$data['links'] = $this->_initialize_pagination($this->Item,$lines_per_page,$limit_from);
$items = $this->Item->get_all($stock_location, $lines_per_page, $limit_from);
$data['links'] = $this->_initialize_pagination($this->Item, $lines_per_page, $limit_from);
$data['stock_location']=$stock_location;
$data['stock_locations']=$stock_locations;
$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();
// 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') : $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') : $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'));
$data['end_date'] = $end_date_formatter->format($this->config->item('dateformat'));
$data['stock_location'] = $stock_location;
$data['stock_locations'] = $stock_locations;
$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);
}
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'));
$stock_location=$this->item_lib->get_item_location();
$data['search_section_state'] = $this->input->post('search_section_state');
$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'); // Parq 131215
$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');
$items = $this->Item->search($search,$stock_location,$low_inventory,$is_serialized,$no_description,$search_custom,$is_deleted,$lines_per_page,$limit_from);
$data_rows=get_items_manage_table_data_rows($items,$this);
$total_rows = $this->Item->get_found_rows($search,$stock_location,$low_inventory,$is_serialized,$no_description,$search_custom,$is_deleted);
$this->item_lib->set_item_location($this->input->post('stock_location'));
// 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') : $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') : $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') != 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);
$this->_remove_duplicate_cookies();
$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!!
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
}
@@ -88,13 +119,16 @@ class Items extends Secure_area implements iData_controller
*/
function suggest()
{
$suggestions = $this->Item->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
$suggestions = $this->Item->get_search_suggestions($this->input->post('q'), $this->input->post('limit'),
$this->input->post('search_custom'), !empty($this->input->post('is_deleted')));
echo implode("\n",$suggestions);
}
function item_search()
{
$suggestions = $this->Item->get_item_search_suggestions($this->input->post('q'),$this->input->post('limit'),'warehouse');
$suggestions = $this->Item->get_item_search_suggestions($this->input->post('q'), $this->input->post('limit'));
echo implode("\n",$suggestions);
}
@@ -104,16 +138,17 @@ class Items extends Secure_area implements iData_controller
function suggest_category()
{
$suggestions = $this->Item->get_category_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
/**GARRISON ADDED 5/18/2013**/
/*
Gives search suggestions based on what is being searched for
*/
function suggest_location()
{
$suggestions = $this->Item->get_location_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
@@ -123,6 +158,7 @@ class Items extends Secure_area implements iData_controller
function suggest_custom1()
{
$suggestions = $this->Item->get_custom1_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
@@ -132,6 +168,7 @@ class Items extends Secure_area implements iData_controller
function suggest_custom2()
{
$suggestions = $this->Item->get_custom2_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
@@ -141,6 +178,7 @@ class Items extends Secure_area implements iData_controller
function suggest_custom3()
{
$suggestions = $this->Item->get_custom3_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
@@ -150,6 +188,7 @@ class Items extends Secure_area implements iData_controller
function suggest_custom4()
{
$suggestions = $this->Item->get_custom4_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
@@ -159,6 +198,7 @@ class Items extends Secure_area implements iData_controller
function suggest_custom5()
{
$suggestions = $this->Item->get_custom5_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
@@ -168,6 +208,7 @@ class Items extends Secure_area implements iData_controller
function suggest_custom6()
{
$suggestions = $this->Item->get_custom6_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
@@ -177,6 +218,7 @@ class Items extends Secure_area implements iData_controller
function suggest_custom7()
{
$suggestions = $this->Item->get_custom7_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
@@ -186,6 +228,7 @@ class Items extends Secure_area implements iData_controller
function suggest_custom8()
{
$suggestions = $this->Item->get_custom8_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
@@ -195,6 +238,7 @@ class Items extends Secure_area implements iData_controller
function suggest_custom9()
{
$suggestions = $this->Item->get_custom9_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
@@ -204,22 +248,21 @@ class Items extends Secure_area implements iData_controller
function suggest_custom10()
{
$suggestions = $this->Item->get_custom10_suggestions($this->input->post('q'));
echo implode("\n",$suggestions);
}
/**END GARRISON ADDED**/
function get_row()
{
$item_id = $this->input->post('row_id');
$item_info = $this->Item->get_info($item_id);
$stock_location = $this->item_lib->get_item_location();
$item_quantity = $this->Item_quantities->get_item_quantity($item_id,$stock_location);
$item_quantity = $this->Item_quantity->get_item_quantity($item_id,$stock_location);
$item_info->quantity = $item_quantity->quantity;
$data_row=get_item_data_row($item_info,$this);
$data_row = get_item_data_row($item_info,$this);
echo $data_row;
$this->_remove_duplicate_cookies();
}
function view($item_id=-1)
@@ -237,33 +280,31 @@ class Items extends Secure_area implements iData_controller
$data['default_tax_1_rate']=($item_id==-1) ? $this->Appconfig->get('default_tax_1_rate') : '';
$data['default_tax_2_rate']=($item_id==-1) ? $this->Appconfig->get('default_tax_2_rate') : '';
$locations_data = $this->Stock_locations->get_undeleted_all()->result_array();
$locations_data = $this->Stock_location->get_undeleted_all()->result_array();
foreach($locations_data as $location)
{
$quantity = $this->Item_quantities->get_item_quantity($item_id,$location['location_id'])->quantity;
$quantity = $this->Item_quantity->get_item_quantity($item_id,$location['location_id'])->quantity;
$quantity = ($item_id == -1) ? null: $quantity;
$location_array[$location['location_id']] = array('location_name'=>$location['location_name'],
'quantity'=>$quantity);
$data['stock_locations']= $location_array;
$location_array[$location['location_id']] = array('location_name'=>$location['location_name'], 'quantity'=>$quantity);
$data['stock_locations'] = $location_array;
}
$this->load->view("items/form",$data);
}
$this->load->view("items/form", $data);
}
//Ramel Inventory Tracking
function inventory($item_id=-1)
{
$data['item_info']=$this->Item->get_info($item_id);
$data['stock_locations'] = array();
$stock_locations = $this->Stock_locations->get_undeleted_all()->result_array();
$stock_locations = $this->Stock_location->get_undeleted_all()->result_array();
foreach($stock_locations as $location_data)
{
$data['stock_locations'][$location_data['location_id']] = $location_data['location_name'];
$data['item_quantities'][$location_data['location_id']] = $this->Item_quantities->get_item_quantity($item_id,$location_data['location_id'])->quantity;
$data['item_quantities'][$location_data['location_id']] = $this->Item_quantity->get_item_quantity($item_id,$location_data['location_id'])->quantity;
}
$this->load->view("items/inventory",$data);
$this->load->view("items/inventory", $data);
}
function count_details($item_id=-1)
@@ -271,15 +312,15 @@ class Items extends Secure_area implements iData_controller
$data['item_info']=$this->Item->get_info($item_id);
$data['stock_locations'] = array();
$stock_locations = $this->Stock_locations->get_undeleted_all()->result_array();
$stock_locations = $this->Stock_location->get_undeleted_all()->result_array();
foreach($stock_locations as $location_data)
{
$data['stock_locations'][$location_data['location_id']] = $location_data['location_name'];
$data['item_quantities'][$location_data['location_id']] = $this->Item_quantities->get_item_quantity($item_id,$location_data['location_id'])->quantity;
$data['item_quantities'][$location_data['location_id']] = $this->Item_quantity->get_item_quantity($item_id,$location_data['location_id'])->quantity;
}
$this->load->view("items/count_details",$data);
} //------------------------------------------- Ramel
$this->load->view("items/count_details", $data);
}
function generate_barcodes($item_ids)
{
@@ -288,10 +329,34 @@ class Items extends Secure_area implements iData_controller
$item_ids = explode(':', $item_ids);
$result = $this->Item->get_multiple_info($item_ids)->result_array();
$config = $this->barcode_lib->get_barcode_config();
$data['barcode_config'] = $config;
// check the list of items to see if any item_number field is empty
foreach($result as &$item)
{
// update the UPC/EAN/ISBN field if empty / null with the newly generated barcode
if (empty($item['item_number']) && $this->Appconfig->get('barcode_generate_if_empty'))
{
// get the newly generated barcode
$barcode_instance = Barcode_lib::barcode_instance($item, $config);
$item['item_number'] = $barcode_instance->getData();
// remove from item any suppliers table info to avoid save failure because of unknown fields
// WARNING: if suppliers table is changed this list needs to be upgraded, which makes the matter a bit tricky to maintain
unset($item['person_id']);
unset($item['company_name']);
unset($item['account_number']);
unset($item['agency_name']);
// update the item in the database in order to save the UPC/EAN/ISBN field
$this->Item->save($item, $item['item_id']);
}
}
$data['items'] = $result;
$data['barcode_config'] = $this->barcode_lib->get_barcode_config();
// display barcodes
$this->load->view("barcode_sheet", $data);
}
function bulk_edit()
@@ -300,7 +365,7 @@ class Items extends Secure_area implements iData_controller
$suppliers = array('' => $this->lang->line('items_none'));
foreach($this->Supplier->get_all()->result_array() as $row)
{
$suppliers[$row['person_id']] = $row['first_name'] .' '. $row['last_name'];
$suppliers[$row['person_id']] = $row['company_name'];
}
$data['suppliers'] = $suppliers;
$data['allow_alt_description_choices'] = array(
@@ -312,6 +377,7 @@ class Items extends Secure_area implements iData_controller
''=>$this->lang->line('items_do_nothing'),
1 =>$this->lang->line('items_change_all_to_serialized'),
0 =>$this->lang->line('items_change_all_to_unserialized'));
$this->load->view("items/form_bulk", $data);
}
@@ -319,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'),
'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'), /** Parq 131215 **/
'custom1'=>$this->input->post('custom1'), /**GARRISON ADDED 4/21/2013**/
'custom2'=>$this->input->post('custom2'),/**GARRISON ADDED 4/21/2013**/
'custom3'=>$this->input->post('custom3'),/**GARRISON ADDED 4/21/2013**/
'custom4'=>$this->input->post('custom4'),/**GARRISON ADDED 4/21/2013**/
'custom5'=>$this->input->post('custom5'),/**GARRISON ADDED 4/21/2013**/
'custom6'=>$this->input->post('custom6'),/**GARRISON ADDED 4/21/2013**/
'custom7'=>$this->input->post('custom7'),/**GARRISON ADDED 4/21/2013**/
'custom8'=>$this->input->post('custom8'),/**GARRISON ADDED 4/21/2013**/
'custom9'=>$this->input->post('custom9'),/**GARRISON ADDED 4/21/2013**/
'custom10'=>$this->input->post('custom10')/**GARRISON ADDED 4/21/2013**/
'name'=>$this->input->post('name'),
'description'=>$this->input->post('description'),
'category'=>$this->input->post('category'),
'supplier_id'=>$this->input->post('supplier_id') == '' ? null : $this->input->post('supplier_id'),
'item_number'=>$this->input->post('item_number') == '' ? null : $this->input->post('item_number'),
'cost_price'=>$this->input->post('cost_price'),
'unit_price'=>$this->input->post('unit_price'),
'reorder_level'=>$this->input->post('reorder_level'),
'receiving_quantity'=>$this->input->post('receiving_quantity'),
'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']))
@@ -350,7 +416,7 @@ class Items extends Secure_area implements iData_controller
$item_data['pic_id'] = $upload_data['raw_name'];
}
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
$cur_item_info = $this->Item->get_info($item_id);
if($this->Item->save($item_data,$item_id))
@@ -358,7 +424,7 @@ class Items extends Secure_area implements iData_controller
$success = TRUE;
$new_item = FALSE;
//New item
if($item_id==-1)
if ($item_id==-1)
{
$item_id = $item_data['item_id'];
$new_item = TRUE;
@@ -375,23 +441,21 @@ class Items extends Secure_area implements iData_controller
}
}
$success &= $this->Item_taxes->save($items_taxes_data, $item_id);
//Save item quantity
$stock_locations = $this->Stock_locations->get_undeleted_all()->result_array();
$stock_locations = $this->Stock_location->get_undeleted_all()->result_array();
foreach($stock_locations as $location_data)
{
$updated_quantity = $this->input->post($location_data['location_id'].'_quantity');
$location_detail = array('item_id'=>$item_id,
'location_id'=>$location_data['location_id'],
'quantity'=>$updated_quantity);
$item_quantity = $this->Item_quantities->get_item_quantity($item_id, $location_data['location_id']);
$item_quantity = $this->Item_quantity->get_item_quantity($item_id, $location_data['location_id']);
if ($item_quantity->quantity != $updated_quantity || $new_item)
{
$success &= $this->Item_quantities->save($location_detail, $item_id, $location_data['location_id']);
$success &= $this->Item_quantity->save($location_detail, $item_id, $location_data['location_id']);
$inv_data = array
(
$inv_data = array(
'trans_date'=>date('Y-m-d H:i:s'),
'trans_items'=>$item_id,
'trans_user'=>$employee_id,
@@ -399,38 +463,36 @@ class Items extends Secure_area implements iData_controller
'trans_comment'=>$this->lang->line('items_manually_editing_of_quantity'),
'trans_inventory'=>$updated_quantity - $item_quantity->quantity
);
$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
{
$error_message = $upload_success ?
$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()
@@ -445,20 +507,19 @@ class Items extends Secure_area implements iData_controller
'max_height' => '480',
'file_name' => sizeof($map));
$this->load->library('upload', $config);
$this->upload->do_upload('item_image');
$this->upload->do_upload('item_image');
return strlen($this->upload->display_errors()) == 0 ||
!strcmp($this->upload->display_errors(),
'<p>'.$this->lang->line('upload_no_file_selected').'</p>');
}
//Ramel Inventory Tracking
function save_inventory($item_id=-1)
{
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
$cur_item_info = $this->Item->get_info($item_id);
$location_id = $this->input->post('stock_location');
$inv_data = array
(
$inv_data = array(
'trans_date'=>date('Y-m-d H:i:s'),
'trans_items'=>$item_id,
'trans_user'=>$employee_id,
@@ -466,17 +527,18 @@ class Items extends Secure_area implements iData_controller
'trans_comment'=>$this->input->post('trans_comment'),
'trans_inventory'=>$this->input->post('newquantity')
);
$this->Inventory->insert($inv_data);
//Update stock quantity
$item_quantity= $this->Item_quantities->get_item_quantity($item_id,$location_id);
$item_quantity= $this->Item_quantity->get_item_quantity($item_id,$location_id);
$item_quantity_data = array(
'item_id'=>$item_id,
'location_id'=>$location_id,
'quantity'=>$item_quantity->quantity + $this->input->post('newquantity')
'item_id'=>$item_id,
'location_id'=>$location_id,
'quantity'=>$item_quantity->quantity + $this->input->post('newquantity')
);
if($this->Item_quantities->save($item_quantity_data,$item_id,$location_id))
if($this->Item_quantity->save($item_quantity_data,$item_id,$location_id))
{
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_updating').' '.
$cur_item_info->name,'item_id'=>$item_id));
@@ -486,8 +548,7 @@ class Items extends Secure_area implements iData_controller
echo json_encode(array('success'=>false,'message'=>$this->lang->line('items_error_adding_updating').' '.
$cur_item_info->name,'item_id'=>-1));
}
}//---------------------------------------------------------------------Ramel
}
function bulk_update()
{
@@ -497,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;
}
@@ -513,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')));
}
@@ -565,6 +633,7 @@ class Items extends Secure_area implements iData_controller
{
$msg = $this->lang->line('items_excel_import_failed');
echo json_encode( array('success'=>false,'message'=>$msg) );
return;
}
else
@@ -588,16 +657,16 @@ class Items extends Secure_area implements iData_controller
'supplier_id' => $this->Supplier->exists($data[3]) ? $data[3] : null,
'allow_alt_description' => $data[12] != '' ? '1' : '0',
'is_serialized' => $data[13] != '' ? '1' : '0',
'custom1' => $data[14], /** GARRISON ADDED 5/6/2013 **/
'custom2' => $data[15], /** GARRISON ADDED 5/6/2013 **/
'custom3' => $data[16], /** GARRISON ADDED 5/6/2013 **/
'custom4' => $data[17], /** GARRISON ADDED 5/6/2013 **/
'custom5' => $data[18], /** GARRISON ADDED 5/6/2013 **/
'custom6' => $data[19], /** GARRISON ADDED 5/6/2013 **/
'custom7' => $data[20], /** GARRISON ADDED 5/6/2013 **/
'custom8' => $data[21], /** GARRISON ADDED 5/6/2013 **/
'custom9' => $data[22], /** GARRISON ADDED 5/6/2013 **/
'custom10' => $data[23] /** GARRISON ADDED 5/6/2013 **/
'custom1' => $data[14],
'custom2' => $data[15],
'custom3' => $data[16],
'custom4' => $data[17],
'custom5' => $data[18],
'custom6' => $data[19],
'custom7' => $data[20],
'custom8' => $data[21],
'custom9' => $data[22],
'custom10' => $data[23]
);
$item_number = $data[0];
$invalidated = false;
@@ -640,7 +709,7 @@ class Items extends Secure_area implements iData_controller
$cols = count($data);
// array to store information if location got a quantity
$allowed_locations = $this->Stock_locations->get_allowed_locations();
$allowed_locations = $this->Stock_location->get_allowed_locations();
for ($col = 24; $col < $cols; $col = $col + 2)
{
$location_id = $data[$col];
@@ -651,15 +720,16 @@ class Items extends Secure_area implements iData_controller
'location_id' => $location_id,
'quantity' => $data[$col + 1],
);
$this->Item_quantities->save($item_quantity_data, $item_data['item_id'], $location_id);
$this->Item_quantity->save($item_quantity_data, $item_data['item_id'], $location_id);
$excel_data = array (
$excel_data = array(
'trans_items'=>$item_data['item_id'],
'trans_user'=>$employee_id,
'trans_comment'=>$comment,
'trans_location'=>$data[$col],
'trans_inventory'=>$data[$col + 1]
);
$this->Inventory->insert($excel_data);
unset($allowed_locations[$location_id]);
}
@@ -677,7 +747,7 @@ class Items extends Secure_area implements iData_controller
'location_id' => $location_id,
'quantity' => 0,
);
$this->Item_quantities->save($item_quantity_data, $item_data['item_id'], $data[$col]);
$this->Item_quantity->save($item_quantity_data, $item_data['item_id'], $data[$col]);
$excel_data = array
(
@@ -699,7 +769,8 @@ class Items extends Secure_area implements iData_controller
}
else
{
echo json_encode( array('success'=>false,'message'=>'Your upload file has no data or not in supported format.') );
echo json_encode( array('success'=>false, 'message'=>'Your upload file has no data or not in supported format.') );
return;
}
}
@@ -715,7 +786,7 @@ class Items extends Secure_area implements iData_controller
$msg = "Import items successful";
}
echo json_encode( array('success'=>$success,'message'=>$msg) );
echo json_encode( array('success'=>$success, 'message'=>$msg) );
}
/*
@@ -725,6 +796,5 @@ class Items extends Secure_area implements iData_controller
{
return 450;
}
}
?>

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)
@@ -30,15 +30,15 @@ abstract class Person_controller extends Secure_area implements iPerson_controll
}
echo '#';
}
/** GARRISON ADDED 4/25/2013 IN PROGRESS **/
/*
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.
@@ -49,6 +49,5 @@ abstract class Person_controller extends Secure_area implements iPerson_controll
$data_row=get_person_data_row($this->Person->get_info($person_id),$this);
echo $data_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,23 +29,26 @@ 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_locations->is_allowed_location($stock_source, 'receivings'))
else if ($this->Stock_location->is_allowed_location($stock_source, 'receivings'))
{
$this->receiving_lib->set_stock_source($stock_source);
$this->receiving_lib->set_stock_destination($stock_destination);
@@ -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)
{
@@ -181,16 +184,16 @@ class Receivings extends Secure_area
$data['cart']=$this->receiving_lib->get_cart();
$data['total']=$this->receiving_lib->get_total();
$data['receipt_title']=$this->lang->line('recvs_receipt');
$data['transaction_time']= date('m/d/Y h:i:s a');
$data['transaction_time']= date($this->config->item('dateformat').' '.$this->config->item('timeformat'));
$data['mode']=$this->receiving_lib->get_mode();
$data['show_stock_locations']=$this->Stock_locations->show_locations('receivings');
$data['show_stock_locations']=$this->Stock_location->show_locations('receivings');
$supplier_id=$this->receiving_lib->get_supplier();
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
$comment = $this->input->post('comment');
$emp_info=$this->Employee->get_info($employee_id);
$payment_type=$this->input->post('payment_type');
$data['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
@@ -220,16 +223,14 @@ class Receivings extends Secure_area
{
$data['error_message'] = $this->lang->line('receivings_transaction_failed');
}
$barcode_config=array('barcode_type'=>2,'barcode_width'=>200, 'barcode_height'=>30, 'barcode_quality'=>100);
$data['barcode']=$this->barcode_lib->generate_barcode($data['receiving_id'],$barcode_config);
$data['barcode']=$this->barcode_lib->generate_receipt_barcode($data['receiving_id']);
$data['print_after_sale'] = $this->receiving_lib->is_print_after_sale();
$this->load->view("receivings/receipt",$data);
$this->receiving_lib->clear_all();
}
$this->_remove_duplicate_cookies();
}
function _substitute_variable($text, $variable, $object, $function)
private function _substitute_variable($text, $variable, $object, $function)
{
// don't query if this variable isn't used
if (strstr($text, $variable))
@@ -240,7 +241,7 @@ class Receivings extends Secure_area
return $text;
}
function _substitute_variables($text,$supplier_info)
private function _substitute_variables($text,$supplier_info)
{
$text=$this->_substitute_variable($text, '$YCO', $this->Receiving, 'get_invoice_number_for_year');
$text=$this->_substitute_variable($text, '$CO', $this->Receiving , 'get_invoice_count');
@@ -250,7 +251,7 @@ class Receivings extends Secure_area
}
function _substitute_supplier($text,$supplier_info)
private function _substitute_supplier($text,$supplier_info)
{
$supplier_id=$this->receiving_lib->get_supplier();
if($supplier_id!=-1)
@@ -266,16 +267,13 @@ class Receivings extends Secure_area
return $text;
}
function _substitute_invoice_number($supplier_info='')
private function _substitute_invoice_number($supplier_info='')
{
$invoice_number=$this->receiving_lib->get_invoice_number();
if (empty($invoice_number))
{
$invoice_number=$this->config->config['recv_invoice_format'];
}
$invoice_number=$this->config->config['recv_invoice_format'];
$invoice_number = $this->_substitute_variables($invoice_number,$supplier_info);
$this->receiving_lib->set_invoice_number($invoice_number);
return $invoice_number;
return $this->receiving_lib->get_invoice_number();
}
function requisition_complete()
@@ -306,15 +304,14 @@ class Receivings extends Secure_area
$data['total']=$this->receiving_lib->get_total();
$data['mode']=$this->receiving_lib->get_mode();
$data['receipt_title']=$this->lang->line('recvs_receipt');
$data['transaction_time']= date('m/d/Y h:i:s a', strtotime($receiving_info['receiving_time']));
$data['show_stock_locations']=$this->Stock_locations->show_locations('receivings');
$data['transaction_time']= date($this->config->item('dateformat').' '.$this->config->item('timeformat'), strtotime($receiving_info['receiving_time']));
$data['show_stock_locations']=$this->Stock_location->show_locations('receivings');
$supplier_id=$this->receiving_lib->get_supplier();
$emp_info=$this->Employee->get_info($receiving_info['employee_id']);
$data['payment_type']=$receiving_info['payment_type'];
$data['invoice_number']=$this->receiving_lib->get_invoice_number();
$data['receiving_id']='RECV '.$receiving_id;
$barcode_config=array('barcode_type'=>2,'barcode_width'=>200, 'barcode_height'=>30, 'barcode_quality'=>100);
$data['barcode']=$this->barcode_lib->generate_barcode($data['receiving_id'],$barcode_config);
$data['barcode']=$this->barcode_lib->generate_receipt_barcode($data['receiving_id']);
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
if($supplier_id!=-1)
@@ -325,17 +322,16 @@ 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();
}
function _reload($data=array())
private function _reload($data=array())
{
$person_info = $this->Employee->get_logged_in_employee_info();
$data['cart']=$this->receiving_lib->get_cart();
$data['modes']=array('receive'=>$this->lang->line('recvs_receiving'),'return'=>$this->lang->line('recvs_return'));
$data['mode']=$this->receiving_lib->get_mode();
$data['stock_locations']=$this->Stock_locations->get_allowed_locations('receivings');
$data['stock_locations']=$this->Stock_location->get_allowed_locations('receivings');
$show_stock_locations = count($data['stock_locations']) > 1;
if ($show_stock_locations)
{
@@ -366,33 +362,34 @@ 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)
{
$date_formatter = date_create_from_format($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), $this->input->post('date', TRUE));
$receiving_data = array(
'receiving_time' => date('Y-m-d H:i:s', strtotime($this->input->post('date'))),
'supplier_id' => $this->input->post('supplier_id') ? $this->input->post('supplier_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
'receiving_time' => $date_formatter->format('Y-m-d H:i:s'),
'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')
);
if ($this->Receiving->update($receiving_data, $receiving_id))
{
echo json_encode(array(
'success'=>true,
'message'=>$this->lang->line('recvs_successfully_updated'),
'id'=>$receiving_id)
'success'=>true,
'message'=>$this->lang->line('recvs_successfully_updated'),
'id'=>$receiving_id)
);
}
else
{
echo json_encode(array(
'success'=>false,
'message'=>$this->lang->line('recvs_unsuccessfully_updated'),
'id'=>$receiving_id)
'success'=>false,
'message'=>$this->lang->line('recvs_unsuccessfully_updated'),
'id'=>$receiving_id)
);
}
}
@@ -408,8 +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");
@@ -69,6 +69,7 @@ class Reports extends Secure_area
to_currency($report_data['subtotal']),
to_currency($report_data['total']),
to_currency($report_data['tax']),
to_currency($report_data['cost']),
to_currency($report_data['profit']),
$report_data['payment_type'],
$report_data['comment']);
@@ -96,9 +97,9 @@ 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 ?: $start_date;
$end_date = $end_date ? $end_date : $start_date;
$this->load->model('reports/Summary_sales');
$model = $this->Summary_sales;
$summary = $model->getSummaryData(array(
@@ -118,12 +119,12 @@ class Reports extends Secure_area
foreach($report_data as $row)
{
$tabular_data[] = array($row['sale_date'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
$tabular_data[] = array($row['sale_date'], $row['quantity_purchased'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']));
}
$data = array(
"title" => $this->lang->line('reports_sales_summary_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"data" => $tabular_data,
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
@@ -143,12 +144,12 @@ class Reports extends Secure_area
foreach($report_data as $row)
{
$tabular_data[] = array($row['category'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
$tabular_data[] = array($row['category'], $row['quantity_purchased'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']));
}
$data = array(
"title" => $this->lang->line('reports_categories_summary_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"data" => $tabular_data,
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
@@ -168,12 +169,12 @@ class Reports extends Secure_area
foreach($report_data as $row)
{
$tabular_data[] = array($row['customer'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
$tabular_data[] = array($row['customer'], $row['quantity_purchased'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']));
}
$data = array(
"title" => $this->lang->line('reports_customers_summary_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"data" => $tabular_data,
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
@@ -193,12 +194,12 @@ class Reports extends Secure_area
foreach($report_data as $row)
{
$tabular_data[] = array($row['supplier'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
$tabular_data[] = array($row['supplier'], $row['quantity_purchased'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']));
}
$data = array(
"title" => $this->lang->line('reports_suppliers_summary_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"data" => $tabular_data,
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
@@ -218,12 +219,12 @@ class Reports extends Secure_area
foreach($report_data as $row)
{
$tabular_data[] = array(character_limiter($row['name'], 16), $row['quantity_purchased'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
$tabular_data[] = array(character_limiter($row['name'], 40), $row['quantity_purchased'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']));
}
$data = array(
"title" => $this->lang->line('reports_items_summary_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"data" => $tabular_data,
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
@@ -243,12 +244,12 @@ class Reports extends Secure_area
foreach($report_data as $row)
{
$tabular_data[] = array($row['employee'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
$tabular_data[] = array($row['employee'], $row['quantity_purchased'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']));
}
$data = array(
"title" => $this->lang->line('reports_employees_summary_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"data" => $tabular_data,
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
@@ -268,12 +269,12 @@ class Reports extends Secure_area
foreach($report_data as $row)
{
$tabular_data[] = array($row['percent'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']));
$tabular_data[] = array($row['percent'], $row['count'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']));
}
$data = array(
"title" => $this->lang->line('reports_taxes_summary_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"data" => $tabular_data,
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
@@ -293,12 +294,12 @@ class Reports extends Secure_area
foreach($report_data as $row)
{
$tabular_data[] = array($row['discount_percent'],$row['count']);
$tabular_data[] = array($row['discount_percent'], $row['count']);
}
$data = array(
"title" => $this->lang->line('reports_discounts_summary_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"data" => $tabular_data,
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
@@ -308,6 +309,7 @@ class Reports extends Secure_area
$this->load->view("reports/tabular",$data);
}
//Summary payments report
function summary_payments($start_date, $end_date, $sale_type, $export_excel=0)
{
$this->load->model('reports/Summary_payments');
@@ -317,12 +319,12 @@ class Reports extends Secure_area
foreach($report_data as $row)
{
$tabular_data[] = array($row['payment_type'],to_currency($row['payment_amount']));
$tabular_data[] = array($row['payment_type'], $row['count'], to_currency($row['payment_amount']));
}
$data = array(
"title" => $this->lang->line('reports_payments_summary_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"data" => $tabular_data,
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
@@ -344,7 +346,7 @@ class Reports extends Secure_area
function date_input_sales()
{
$data = $this->_get_common_report_data();
$stock_locations = $this->Stock_locations->get_allowed_locations('sales');
$stock_locations = $this->Stock_location->get_allowed_locations('sales');
$stock_locations['all'] = $this->lang->line('reports_all');
$data['stock_locations'] = array_reverse($stock_locations, TRUE);
$data['mode'] = 'sale';
@@ -354,7 +356,7 @@ class Reports extends Secure_area
function date_input_recv()
{
$data = $this->_get_common_report_data();
$stock_locations = $this->Stock_locations->get_allowed_locations('receivings');
$stock_locations = $this->Stock_location->get_allowed_locations('receivings');
$stock_locations['all'] = $this->lang->line('reports_all');
$data['stock_locations'] = array_reverse($stock_locations, TRUE);
$data['mode'] = 'receiving';
@@ -370,7 +372,7 @@ class Reports extends Secure_area
$data = array(
"title" => $this->lang->line('reports_sales_summary_report'),
"data_file" => site_url("reports/graphical_summary_sales_graph/$start_date/$end_date/$sale_type"),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
);
@@ -387,7 +389,7 @@ class Reports extends Secure_area
$graph_data = array();
foreach($report_data as $row)
{
$graph_data[date('m/d/Y', strtotime($row['sale_date']))]= $row['total'];
$graph_data[date($this->config->item('dateformat'), strtotime($row['sale_date']))]= $row['total'];
}
$data = array(
@@ -410,7 +412,7 @@ class Reports extends Secure_area
$data = array(
"title" => $this->lang->line('reports_items_summary_report'),
"data_file" => site_url("reports/graphical_summary_items_graph/$start_date/$end_date/$sale_type"),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
);
@@ -449,7 +451,7 @@ class Reports extends Secure_area
$data = array(
"title" => $this->lang->line('reports_categories_summary_report'),
"data_file" => site_url("reports/graphical_summary_categories_graph/$start_date/$end_date/$sale_type"),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
);
@@ -477,6 +479,7 @@ class Reports extends Secure_area
$this->load->view("reports/graphs/pie",$data);
}
//Graphical summary suppliers report
function graphical_summary_suppliers($start_date, $end_date, $sale_type)
{
$this->load->model('reports/Summary_suppliers');
@@ -485,7 +488,7 @@ class Reports extends Secure_area
$data = array(
"title" => $this->lang->line('reports_suppliers_summary_report'),
"data_file" => site_url("reports/graphical_summary_suppliers_graph/$start_date/$end_date/$sale_type"),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
);
@@ -513,6 +516,7 @@ class Reports extends Secure_area
$this->load->view("reports/graphs/pie",$data);
}
//Graphical summary employees report
function graphical_summary_employees($start_date, $end_date, $sale_type)
{
$this->load->model('reports/Summary_employees');
@@ -521,7 +525,7 @@ class Reports extends Secure_area
$data = array(
"title" => $this->lang->line('reports_employees_summary_report'),
"data_file" => site_url("reports/graphical_summary_employees_graph/$start_date/$end_date/$sale_type"),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
);
@@ -549,6 +553,7 @@ class Reports extends Secure_area
$this->load->view("reports/graphs/pie",$data);
}
//Graphical summary taxes report
function graphical_summary_taxes($start_date, $end_date, $sale_type)
{
$this->load->model('reports/Summary_taxes');
@@ -557,7 +562,7 @@ class Reports extends Secure_area
$data = array(
"title" => $this->lang->line('reports_taxes_summary_report'),
"data_file" => site_url("reports/graphical_summary_taxes_graph/$start_date/$end_date/$sale_type"),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
);
@@ -594,7 +599,7 @@ class Reports extends Secure_area
$data = array(
"title" => $this->lang->line('reports_customers_summary_report'),
"data_file" => site_url("reports/graphical_summary_customers_graph/$start_date/$end_date/$sale_type"),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
);
@@ -633,7 +638,7 @@ class Reports extends Secure_area
$data = array(
"title" => $this->lang->line('reports_discounts_summary_report'),
"data_file" => site_url("reports/graphical_summary_discounts_graph/$start_date/$end_date/$sale_type"),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
);
@@ -663,6 +668,7 @@ class Reports extends Secure_area
$this->load->view("reports/graphs/bar",$data);
}
//Graphical summary payments report
function graphical_summary_payments($start_date, $end_date, $sale_type)
{
$this->load->model('reports/Summary_payments');
@@ -671,7 +677,7 @@ class Reports extends Secure_area
$data = array(
"title" => $this->lang->line('reports_payments_summary_report'),
"data_file" => site_url("reports/graphical_summary_payments_graph/$start_date/$end_date/$sale_type"),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
);
@@ -700,6 +706,7 @@ class Reports extends Secure_area
$this->load->view("reports/graphs/pie",$data);
}
function specific_customer_input()
{
$data = $this->_get_common_report_data();
@@ -727,18 +734,18 @@ class Reports extends Secure_area
foreach($report_data['summary'] as $key=>$row)
{
$summary_data[] = array(anchor('sales/receipt/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']);
$summary_data[] = array(anchor('sales/receipt/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']), $row['payment_type'], $row['comment']);
foreach($report_data['details'][$key] as $drow)
{
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),to_currency($drow['profit']), $drow['discount_percent'].'%');
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']), to_currency($drow['cost']), to_currency($drow['profit']), $drow['discount_percent'].'%');
}
}
$customer_info = $this->Customer->get_info($customer_id);
$data = array(
"title" => $customer_info->first_name .' '. $customer_info->last_name.' '.$this->lang->line('reports_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"summary_data" => $summary_data,
"details_data" => $details_data,
@@ -777,18 +784,18 @@ class Reports extends Secure_area
foreach($report_data['summary'] as $key=>$row)
{
$summary_data[] = array(anchor('sales/receipt/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']);
$summary_data[] = array(anchor('sales/receipt/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']), $row['payment_type'], $row['comment']);
foreach($report_data['details'][$key] as $drow)
{
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),to_currency($drow['profit']), $drow['discount_percent'].'%');
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']), to_currency($drow['cost']), to_currency($drow['profit']), $drow['discount_percent'].'%');
}
}
$employee_info = $this->Employee->get_info($employee_id);
$data = array(
"title" => $employee_info->first_name .' '. $employee_info->last_name.' '.$this->lang->line('reports_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"summary_data" => $summary_data,
"details_data" => $details_data,
@@ -831,13 +838,13 @@ class Reports extends Secure_area
foreach($report_data['details'][$key] as $drow)
{
$details_data[$key][] = array($drow['name'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),/*to_currency($drow['profit']),*/ $drow['discount_percent'].'%');
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),/*to_currency($drow['profit']),*/ $drow['discount_percent'].'%');
}
}
$data = array(
"title" => $discount. '% '.$this->lang->line('reports_discount') . ' ' . $this->lang->line('reports_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $headers,
"summary_data" => $summary_data,
"details_data" => $details_data,
@@ -861,26 +868,26 @@ class Reports extends Secure_area
$summary_data = array();
$details_data = array();
$show_locations = $this->Stock_locations->multiple_locations();
$show_locations = $this->Stock_location->multiple_locations();
foreach($report_data['summary'] as $key=>$row)
{
$summary_data[] = array(anchor('sales/edit/'.$row['sale_id'] . '/width:'.FORM_WIDTH, 'POS '.$row['sale_id'], array('class' => 'thickbox')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']);
$summary_data[] = array(anchor('sales/edit/'.$row['sale_id'] . '/width:'.FORM_WIDTH, 'POS '.$row['sale_id'], array('class' => 'thickbox')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']), to_currency($row['cost']), to_currency($row['profit']), $row['payment_type'], $row['comment']);
foreach($report_data['details'][$key] as $drow)
{
$quantity_purchased = $drow['quantity_purchased'];
if ($show_locations)
{
$quantity_purchased .= ' [' . $this->Stock_locations->get_location_name($drow['item_location']) . ']';
$quantity_purchased .= ' [' . $this->Stock_location->get_location_name($drow['item_location']) . ']';
}
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $quantity_purchased, to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),to_currency($drow['profit']), $drow['discount_percent'].'%');
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $quantity_purchased, to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']), to_currency($drow['cost']), to_currency($drow['profit']), $drow['discount_percent'].'%');
}
}
$data = array(
"title" =>$this->lang->line('reports_detailed_sales_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"editable" => "sales",
"summary_data" => $summary_data,
@@ -904,7 +911,7 @@ class Reports extends Secure_area
$summary_data = array();
$details_data = array();
$show_locations = $this->Stock_locations->multiple_locations();
$show_locations = $this->Stock_location->multiple_locations();
foreach($report_data['summary'] as $key=>$row)
{
@@ -915,7 +922,7 @@ class Reports extends Secure_area
$quantity_purchased = $drow['receiving_quantity'] > 1 ? $drow['quantity_purchased'] . ' x ' . $drow['receiving_quantity'] : $drow['quantity_purchased'];
if ($show_locations)
{
$quantity_purchased .= ' [' . $this->Stock_locations->get_location_name($drow['item_location']) . ']';
$quantity_purchased .= ' [' . $this->Stock_location->get_location_name($drow['item_location']) . ']';
}
$details_data[$key][] = array($drow['item_number'], $drow['name'], $drow['category'], $quantity_purchased, to_currency($drow['total']), $drow['discount_percent'].'%');
}
@@ -923,7 +930,7 @@ class Reports extends Secure_area
$data = array(
"title" =>$this->lang->line('reports_detailed_receivings_report'),
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
"subtitle" => date($this->config->item('dateformat'), strtotime($start_date)) .'-'.date($this->config->item('dateformat'), strtotime($end_date)),
"headers" => $model->getDataColumns(),
"header_width" => intval(100 / count($headers['summary'])),
"editable" => "receivings",
@@ -965,15 +972,38 @@ class Reports extends Secure_area
$this->load->view("reports/tabular",$data);
}
function inventory_summary($export_excel=0)
function inventory_summary_input()
{
$data = array();
$this->load->model('reports/Inventory_Summary');
$model = $this->Inventory_Summary;
$data['item_count'] = $model->getItemCountDropdownArray();
$stock_locations = $this->Stock_location->get_allowed_locations();
$stock_locations['all'] = $this->lang->line('reports_all');
$data['stock_locations'] = array_reverse($stock_locations, TRUE);
$this->load->view("reports/inventory_summary_input", $data);
}
function inventory_summary($export_excel=0, $location_id = 'all', $item_count = 'all')
{
$this->load->model('reports/Inventory_summary');
$model = $this->Inventory_summary;
$tabular_data = array();
$report_data = $model->getData(array());
$report_data = $model->getData(array('location_id'=>$location_id,'item_count'=>$item_count));
foreach($report_data as $row)
{
$tabular_data[] = array($row['name'], $row['item_number'], $row['description'], $row['quantity'], $row['reorder_level'],$row['location_name']);
$tabular_data[] = array($row['name'],
$row['item_number'],
$row['description'],
$row['quantity'],
$row['reorder_level'],
$row['location_name'],
to_currency($row['cost_price']),
to_currency($row['unit_price']),
to_currency($row['sub_total_value']));
}
$data = array(
@@ -981,7 +1011,7 @@ class Reports extends Secure_area
"subtitle" => '',
"headers" => $model->getDataColumns(),
"data" => $tabular_data,
"summary_data" => $model->getSummaryData(array()),
"summary_data" => $model->getSummaryData($report_data),
"export_excel" => $export_excel
);

View File

@@ -0,0 +1,848 @@
<?php
require_once ("Secure_area.php");
class Sales extends Secure_area
{
function __construct()
{
parent::__construct('sales');
$this->load->library('sale_lib');
$this->load->library('barcode_lib');
}
function index()
{
$this->_reload();
}
function manage($only_invoices = FALSE, $only_cash = FALSE, $limit_from = 0)
{
$person_id = $this->session->userdata('person_id');
if (!$this->Employee->has_grant('reports_sales', $person_id))
{
redirect('no_access/sales/reports_sales');
}
else
{
$this->Sale->create_sales_items_temp_table();
$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') : $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') : $today;
$end_date_formatter = date_create_from_format($this->config->item('dateformat'), $end_date);
$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);
$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);
$data['manage_table'] = get_sales_manage_table($sales, $this);
$data['payments_summary'] = get_sales_manage_payments_summary($payments, $sales, $this);
$this->load->view($data['controller_name'] . '/manage', $data);
}
}
function get_row()
{
$this->Sale->create_sales_items_temp_table();
$sale_id = $this->input->post('row_id');
$sale_info = $this->Sale->get_info($sale_id)->result_array();
$data_row = get_sales_manage_sale_data_row($sale_info[0], $this);
echo $data_row;
}
/**
*
* Get the width for the add/edit form.
* @return number The form width
*/
function get_form_width()
{
return 400;
}
/*
Returns Sales table data rows. This will be called with AJAX.
*/
function search()
{
$this->Sale->create_sales_items_temp_table();
$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');
$today = date($this->config->item('dateformat'));
$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') : $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,
'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);
$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);
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' && $this->sale_lib->is_valid_receipt($search) )
{
$suggestions[] = $search;
}
$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()
{
$search = $this->input->post('q');
$limit = $this->input->post('limit');
$suggestions = $this->Customer->get_customer_search_suggestions($search, $limit);
echo implode("\n", $suggestions);
}
function suggest()
{
$search = $this->input->post('q');
$limit = $this->input->post('limit');
$suggestions = $this->Sale->get_search_suggestions($search, $limit);
echo implode("\n", $suggestions);
}
function select_customer()
{
$customer_id = $this->input->post('customer');
if ($this->Customer->exists($customer_id))
{
$this->sale_lib->set_customer($customer_id);
}
$this->_reload();
}
function change_mode()
{
$stock_location = $this->input->post("stock_location");
if (!$stock_location || $stock_location == $this->sale_lib->get_sale_location())
{
$mode = $this->input->post("mode");
$this->sale_lib->set_mode($mode);
}
else if ($this->Stock_location->is_allowed_location($stock_location, 'sales'))
{
$this->sale_lib->set_sale_location($stock_location);
}
$this->_reload();
}
function set_comment()
{
$this->sale_lib->set_comment($this->input->post('comment'));
}
function set_invoice_number()
{
$this->sale_lib->set_invoice_number($this->input->post('sales_invoice_number'));
}
function set_invoice_number_enabled()
{
$this->sale_lib->set_invoice_number_enabled($this->input->post('sales_invoice_number_enabled'));
}
function set_print_after_sale()
{
$this->sale_lib->set_print_after_sale($this->input->post('sales_print_after_sale'));
}
function set_email_receipt()
{
$this->sale_lib->set_email_receipt($this->input->post('email_receipt'));
}
// Multiple Payments
function add_payment()
{
$data = array();
$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') )
{
$data['error']=$this->lang->line('sales_must_enter_numeric_giftcard');
}
else
{
$data['error']=$this->lang->line('sales_must_enter_numeric');
}
$this->_reload( $data );
return;
}
$payment_type = $this->input->post('payment_type');
if ( $payment_type == $this->lang->line('sales_giftcard') )
{
$payments = $this->sale_lib->get_payments();
$payment_type = $this->input->post('payment_type') . ':' . $payment_amount = $this->input->post('amount_tendered');
$current_payments_with_giftcard = isset($payments[$payment_type]) ? $payments[$payment_type]['payment_amount'] : 0;
$cur_giftcard_value = $this->Giftcard->get_giftcard_value($this->input->post('amount_tendered')) - $current_payments_with_giftcard;
if ( $cur_giftcard_value <= 0 )
{
$data['error'] = $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 = ( $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') ) );
}
else
{
$payment_amount = $this->input->post('amount_tendered');
}
if( !$this->sale_lib->add_payment( $payment_type, $payment_amount ) )
{
$data['error'] = 'Unable to Add Payment! Please try again!';
}
$this->_reload($data);
}
// Multiple Payments
function delete_payment( $payment_id )
{
$this->sale_lib->delete_payment( $payment_id );
$this->_reload();
}
function add()
{
$data = array();
$mode = $this->sale_lib->get_mode();
$item_id_or_number_or_item_kit_or_receipt = $this->input->post('item');
$quantity = ($mode == "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))
{
$this->sale_lib->return_entire_sale($item_id_or_number_or_item_kit_or_receipt);
}
else if($this->sale_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
{
$this->sale_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt,$item_location);
}
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['warning'] = $this->sale_lib->out_of_stock($item_id_or_number_or_item_kit_or_receipt,$item_location);
$this->_reload($data);
}
function edit_item($line)
{
$data = array();
$this->form_validation->set_rules('price', 'lang:items_price', 'required|numeric');
$this->form_validation->set_rules('quantity', 'lang:items_quantity', 'required|numeric');
$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');
if ($this->form_validation->run() != FALSE)
{
$this->sale_lib->edit_item($line, $description, $serialnumber, $quantity, $discount, $price);
}
else
{
$data['error'] = $this->lang->line('sales_error_editing_item');
}
$data['warning'] = $this->sale_lib->out_of_stock($this->sale_lib->get_item_id($line),$item_location);
$this->_reload($data);
}
function delete_item($item_number)
{
$this->sale_lib->delete_item($item_number);
$this->_reload();
}
function remove_customer()
{
$this->sale_lib->clear_giftcard_remainder();
$this->sale_lib->clear_invoice_number();
$this->sale_lib->remove_customer();
$this->_reload();
}
function complete()
{
$data['cart'] = $this->sale_lib->get_cart();
$data['subtotal'] = $this->sale_lib->get_subtotal();
$data['discounted_subtotal'] = $this->sale_lib->get_subtotal(TRUE);
$data['tax_exclusive_subtotal'] = $this->sale_lib->get_subtotal(TRUE, TRUE);
$data['taxes'] = $this->sale_lib->get_taxes();
$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'));
$data['transaction_date'] = date($this->config->item('dateformat'));
$data['show_stock_locations'] = $this->Stock_location->show_locations('sales');
$customer_id = $this->sale_lib->get_customer();
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
$data['comments'] = $this->sale_lib->get_comment();
$emp_info=$this->Employee->get_info($employee_id);
$data['payments'] = $this->sale_lib->get_payments();
$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['company_info'] = implode("\n", array(
$this->config->item('address'),
$this->config->item('phone'),
$this->config->item('account_number')
));
$cust_info = '';
if($customer_id != -1)
{
$cust_info = $this->Customer->get_info($customer_id);
if (isset($cust_info->company_name))
{
$data['customer'] = $cust_info->company_name;
}
else
{
$data['customer'] = $cust_info->first_name.' '.$cust_info->last_name;
}
$data['customer_address'] = $cust_info->address_1;
$data['customer_location'] = $cust_info->zip . ' ' . $cust_info->city;
$data['account_number'] = $cust_info->account_number;
$data['customer_info'] = implode("\n", array(
$data['customer'],
$data['customer_address'],
$data['customer_location'],
$data['account_number']
));
}
$invoice_number = $this->_substitute_invoice_number($cust_info);
if ($this->sale_lib->is_invoice_number_enabled() && $this->Sale->invoice_number_exists($invoice_number))
{
$data['error'] = $this->lang->line('sales_invoice_number_duplicate');
$this->_reload($data);
}
else
{
$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']);
if ($data['sale_id'] == 'POS -1')
{
$data['error_message'] = $this->lang->line('sales_transaction_failed');
}
else
{
$data['barcode'] = $this->barcode_lib->generate_receipt_barcode($data['sale_id']);
// if we want to email. .. just attach the pdf in there?
if ($this->sale_lib->get_email_receipt() && !empty($cust_info->email))
{
$this->load->library('email');
$config['mailtype'] = 'html';
$this->email->initialize($config);
$this->email->from($this->config->item('email'), $this->config->item('company'));
$this->email->to($cust_info->email);
$this->email->subject($this->lang->line('sales_receipt'));
if ($this->config->item('use_invoice_template') && $this->sale_lib->is_invoice_number_enabled())
{
$data['image_prefix'] = "";
$filename = $this->_invoice_email_pdf($data);
$this->email->attach($filename);
$text = $this->config->item('invoice_email_message');
$text = str_replace('$INV', $invoice_number, $text);
$text = str_replace('$CO', $data['sale_id'], $text);
$text = $this->_substitute_customer($text, $cust_info);
$this->email->message($text);
}
else
{
$this->email->message($this->load->view("sales/receipt_email", $data, true));
}
$this->email->send();
}
}
$data['cur_giftcard_value'] = $this->sale_lib->get_giftcard_remainder();
$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);
}
else
{
$this->load->view("sales/receipt", $data);
}
$this->sale_lib->clear_all();
}
}
private function _invoice_email_pdf($data)
{
$data['image_prefix'] = "";
$html = $this->load->view('sales/invoice_email', $data, true);
// load pdf helper
$this->load->helper(array('dompdf', 'file'));
$file_content = pdf_create($html, '', false);
$filename = sys_get_temp_dir() . '/'. $this->lang->line('sales_invoice') .'-' . str_replace('/', '-' , $data["invoice_number"]) . '.pdf';
write_file($filename, $file_content);
return $filename;
}
function invoice_email($sale_id)
{
$sale_data = $this->_load_sale_data($sale_id);
$sale_data['image_prefix'] = base_url();
$this->load->view('sales/invoice_email', $sale_data);
$this->sale_lib->clear_all();
}
function send_invoice($sale_id)
{
$sale_data = $this->_load_sale_data($sale_id);
$text = $this->config->item('invoice_email_message');
$text = str_replace('$INV', $sale_data['invoice_number'], $text);
$text = str_replace('$CO', 'POS ' . $sale_data['sale_id'], $text);
$text = $this->_substitute_customer($text,(object) $sale_data);
$result = FALSE;
$message = $this->lang->line('sales_invoice_no_email');
if (isset($sale_data["customer_email"]) && !empty( $sale_data["customer_email"])) {
$this->load->library('email');
$this->email->from($this->config->item('email'), $this->config->item('company'));
$this->email->to($sale_data['customer_email']);
$this->email->subject($this->lang->line('sales_invoice') . ' ' . $sale_data['invoice_number']);
$this->email->message($text);
$filename = $this->_invoice_email_pdf($sale_data);
$this->email->attach($filename);
$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));
$this->sale_lib->clear_all();
}
private function _substitute_variable($text, $variable, $object, $function)
{
// don't query if this variable isn't used
if (strstr($text, $variable))
{
$value = call_user_func(array($object, $function));
$text = str_replace($variable, $value, $text);
}
return $text;
}
private function _substitute_customer($text, $cust_info)
{
// substitute customer 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);
$words = preg_split("/\s+/", trim($cust_info->first_name . ' ' . $cust_info->last_name));
$acronym = "";
foreach ($words as $w)
{
$acronym .= $w[0];
}
$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);
return $text;
}
private function _substitute_invoice_number($cust_info)
{
$invoice_number = $this->config->config['sales_invoice_format'];
$invoice_number = $this->_substitute_variables($invoice_number, $cust_info);
$this->sale_lib->set_invoice_number($invoice_number, TRUE);
return $this->sale_lib->get_invoice_number();
}
private function _load_sale_data($sale_id)
{
$this->Sale->create_sales_items_temp_table();
$this->sale_lib->clear_all();
$sale_info = $this->Sale->get_info($sale_id)->row_array();
$this->sale_lib->copy_entire_sale($sale_id);
$data['cart'] = $this->sale_lib->get_cart();
$data['payments'] = $this->sale_lib->get_payments();
$data['subtotal'] = $this->sale_lib->get_subtotal();
$data['discounted_subtotal'] = $this->sale_lib->get_subtotal(TRUE);
$data['tax_exclusive_subtotal'] = $this->sale_lib->get_subtotal(TRUE, TRUE);
$data['taxes'] = $this->sale_lib->get_taxes();
$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_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();
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
$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;
if($customer_id != -1)
{
$cust_info = $this->Customer->get_info($customer_id);
if (isset($cust_info->company_name))
{
$data['customer'] = $cust_info->company_name;
}
else
{
$data['customer'] = $cust_info->first_name.' '.$cust_info->last_name;
}
$data['first_name'] = $cust_info->first_name;
$data['last_name'] = $cust_info->last_name;
$data['customer_address'] = $cust_info->address_1;
$data['customer_location'] = $cust_info->zip . ' ' . $cust_info->city;
$data['customer_email'] = $cust_info->email;
$data['account_number'] = $cust_info->account_number;
$data['customer_info'] = implode("\n", array(
$data['customer'],
$data['customer_address'],
$data['customer_location'],
$data['account_number']
));
}
$data['sale_id'] = 'POS '.$sale_id;
$data['comments'] = $sale_info['comment'];
$data['invoice_number'] = $sale_info['invoice_number'];
$data['company_info'] = implode("\n", array(
$this->config->item('address'),
$this->config->item('phone'),
$this->config->item('account_number')
));
$data['barcode'] = $this->barcode_lib->generate_receipt_barcode($data['sale_id']);
$data['print_after_sale'] = FALSE;
return $data;
}
function receipt($sale_id)
{
$data = $this->_load_sale_data($sale_id);
$this->load->view("sales/receipt", $data);
$this->sale_lib->clear_all();
}
function invoice($sale_id, $sale_info='')
{
if ($sale_info == '') {
$sale_info = $this->_load_sale_data($sale_id);
}
$this->load->view("sales/invoice",$sale_info);
$this->sale_lib->clear_all();
}
function edit($sale_id)
{
$data = array();
$data['employees'] = array();
foreach ($this->Employee->get_all()->result() as $employee)
{
$data['employees'][$employee->person_id] = $employee->first_name . ' '. $employee->last_name;
}
$this->Sale->create_sales_items_temp_table();
$sale_info = $this->Sale->get_info($sale_id)->row_array();
$person_name = $sale_info['first_name'] . " " . $sale_info['last_name'];
$data['selected_customer'] = !empty($sale_info['customer_id']) ? $sale_info['customer_id'] . "|" . $person_name : "";
$data['sale_info'] = $sale_info;
$this->load->view('sales/form', $data);
}
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);
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));
}
else
{
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'));
$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,
'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
);
if ($this->Sale->update($sale_data, $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));
}
}
private function _payments_cover_total()
{
$total_payments = 0;
foreach($this->sale_lib->get_payments() as $payment)
{
$total_payments += $payment['payment_amount'];
}
/* Changed the conditional to account for floating point rounding */
if ( ($this->sale_lib->get_mode() == 'sale') &&
( ( to_currency_no_money( $this->sale_lib->get_total() ) - $total_payments ) > 1e-6 ) )
{
return false;
}
return true;
}
private function _reload($data=array())
{
$person_info = $this->Employee->get_logged_in_employee_info();
$data['cart'] = $this->sale_lib->get_cart();
$data['modes'] = array('sale'=>$this->lang->line('sales_sale'), 'return'=>$this->lang->line('sales_return'));
$data['mode'] = $this->sale_lib->get_mode();
$data['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);
$data['taxes'] = $this->sale_lib->get_taxes();
$data['discount'] = $this->sale_lib->get_discount();
$data['total'] = $this->sale_lib->get_total();
$data['items_module_allowed'] = $this->Employee->has_grant('items', $person_info->person_id);
$data['comment'] = $this->sale_lib->get_comment();
$data['email_receipt'] = $this->sale_lib->get_email_receipt();
$data['payments_total'] = $this->sale_lib->get_payments_total();
$data['amount_due'] = $this->sale_lib->get_amount_due();
$data['payments'] = $this->sale_lib->get_payments();
$data['payment_options'] = array(
$this->lang->line('sales_cash') => $this->lang->line('sales_cash'),
$this->lang->line('sales_check') => $this->lang->line('sales_check'),
$this->lang->line('sales_giftcard') => $this->lang->line('sales_giftcard'),
$this->lang->line('sales_debit') => $this->lang->line('sales_debit'),
$this->lang->line('sales_credit') => $this->lang->line('sales_credit')
);
$customer_id = $this->sale_lib->get_customer();
$cust_info = '';
if($customer_id != -1)
{
$cust_info = $this->Customer->get_info($customer_id);
$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);
$data['invoice_number_enabled'] = $this->sale_lib->is_invoice_number_enabled();
$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);
}
function cancel_sale()
{
$this->sale_lib->clear_all();
$this->_reload();
}
function suspend()
{
$data['cart'] = $this->sale_lib->get_cart();
$data['subtotal'] = $this->sale_lib->get_subtotal();
$data['taxes'] = $this->sale_lib->get_taxes();
$data['total'] = $this->sale_lib->get_total();
$data['receipt_title'] = $this->lang->line('sales_receipt');
$data['transaction_time'] = date($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();
$invoice_number = $this->sale_lib->get_invoice_number();
$emp_info = $this->Employee->get_info($employee_id);
$data['payment_type'] = $this->input->post('payment_type');
// Multiple payments
$data['payments'] = $this->sale_lib->get_payments();
$data['amount_change'] = to_currency($this->sale_lib->get_amount_due() * -1);
$data['employee'] = $emp_info->first_name.' '.$emp_info->last_name;
$cust_info = '';
if($customer_id != -1)
{
$cust_info = $this->Customer->get_info($customer_id);
if (isset($cust_info->company_name))
{
$data['customer'] = $cust_info->company_name;
}
else
{
$data['customer'] = $cust_info->first_name.' '.$cust_info->last_name;
}
}
$is_set = $this->_is_custom_invoice_number($cust_info);
$invoice_number = $is_set ? $invoice_number : NULL;
$total_payments = 0;
foreach($data['payments'] as $payment)
{
$total_payments = bcadd($total_payments, $payment['payment_amount'], PRECISION);
}
//SAVE sale to database
$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');
}
$this->sale_lib->clear_all();
$this->_reload(array('success' => $this->lang->line('sales_successfully_suspended_sale')));
}
function suspended()
{
$data = array();
$data['suspended_sales'] = $this->Sale_suspended->get_all()->result_array();
$this->load->view('sales/suspended', $data);
}
function unsuspend()
{
$sale_id = $this->input->post('suspended_sale_id');
$this->sale_lib->clear_all();
$this->sale_lib->copy_entire_suspended_sale($sale_id);
$this->Sale_suspended->delete($sale_id);
$this->_reload();
}
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 !$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,24 +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'),
'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)
@@ -131,5 +135,5 @@ class Suppliers extends Person_controller
{
return 360;
}
}
}
?>

View File

@@ -1,209 +0,0 @@
<?php
require_once ("secure_area.php");
class Config extends Secure_area
{
function __construct()
{
parent::__construct('config');
$this->load->library('barcode_lib');
}
function index()
{
$location_names = array();
$data['stock_locations'] = $this->Stock_locations->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()
{
$upload_success = $this->_handle_logo_upload();
$upload_data = $this->upload->data();
$batch_save_data=array(
'company'=>$this->input->post('company'),
'address'=>$this->input->post('address'),
'phone'=>$this->input->post('phone'),
'email'=>$this->input->post('email'),
'fax'=>$this->input->post('fax'),
'website'=>$this->input->post('website'),
'default_tax_1_rate'=>$this->input->post('default_tax_1_rate'),
'default_tax_1_name'=>$this->input->post('default_tax_1_name'),
'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'),
'default_tax_2_name'=>$this->input->post('default_tax_2_name'),
'currency_symbol'=>$this->input->post('currency_symbol'),
'currency_side'=>$this->input->post('currency_side'),/**GARRISON ADDED 4/20/2013**/
'return_policy'=>$this->input->post('return_policy'),
'language'=>$this->input->post('language'),
'timezone'=>$this->input->post('timezone'),
'tax_included'=>$this->input->post('tax_included'),
'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'),
'thousands_separator'=>$this->input->post('thousands_separator'),
'decimal_point'=>$this->input->post('decimal_point'),
'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'),/**GARRISON ADDED 4/20/2013**/
'custom2_name'=>$this->input->post('custom2_name'),/**GARRISON ADDED 4/20/2013**/
'custom3_name'=>$this->input->post('custom3_name'),/**GARRISON ADDED 4/20/2013**/
'custom4_name'=>$this->input->post('custom4_name'),/**GARRISON ADDED 4/20/2013**/
'custom5_name'=>$this->input->post('custom5_name'),/**GARRISON ADDED 4/20/2013**/
'custom6_name'=>$this->input->post('custom6_name'),/**GARRISON ADDED 4/20/2013**/
'custom7_name'=>$this->input->post('custom7_name'),/**GARRISON ADDED 4/20/2013**/
'custom8_name'=>$this->input->post('custom8_name'),/**GARRISON ADDED 4/20/2013**/
'custom9_name'=>$this->input->post('custom9_name'),/**GARRISON ADDED 4/20/2013**/
'custom10_name'=>$this->input->post('custom10_name')/**GARRISON ADDED 4/20/2013**/
);
if (!empty($upload_data['orig_name']))
{
$batch_save_data['company_logo'] = $upload_data['raw_name'] . $upload_data['file_ext'];
}
$result = $this->Appconfig->batch_save( $batch_save_data );
$success = $upload_success && $result ? true : false;
$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 stock_locations()
{
$stock_locations = $this->Stock_locations->get_all()->result_array();
$this->load->view('partial/stock_locations', array('stock_locations' => $stock_locations));
}
function _clear_session_state()
{
$this->load->library('sale_lib');
$this->sale_lib->clear_sale_location();
$this->sale_lib->clear_all();
$this->load->library('receiving_lib');
$this->receiving_lib->clear_stock_source();
$this->receiving_lib->clear_stock_destination();
$this->receiving_lib->clear_all();
}
function save_locations()
{
$this->db->trans_start();
$deleted_locations = $this->Stock_locations->get_allowed_locations();
foreach($this->input->post() as $key => $value)
{
if (strstr($key, 'stock_location'))
{
$location_id = preg_replace("/.*?_(\d+)$/", "$1", $key);
unset($deleted_locations[$location_id]);
// save or update
$location_data = array('location_name' => $value);
if ($this->Stock_locations->save($location_data, $location_id))
{
$this->_clear_session_state();
}
}
}
// all locations not available in post will be deleted now
foreach ($deleted_locations as $location_id => $location_name)
{
$this->Stock_locations->delete($location_id);
}
$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()
{
$batch_save_data=array(
'barcode_type'=>$this->input->post('barcode_type'),
'barcode_quality'=>$this->input->post('barcode_quality'),
'barcode_width'=>$this->input->post('barcode_width'),
'barcode_height'=>$this->input->post('barcode_height'),
'barcode_font'=>$this->input->post('barcode_font'),
'barcode_font_size'=>$this->input->post('barcode_font_size'),
'barcode_first_row'=>$this->input->post('barcode_first_row'),
'barcode_second_row'=>$this->input->post('barcode_second_row'),
'barcode_third_row'=>$this->input->post('barcode_third_row'),
'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_content'=>$this->input->post('barcode_content'),
);
$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')));
}
function save_receipt()
{
$batch_save_data = array (
'use_invoice_template' => $this->input->post ( 'use_invoice_template' ),
'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' ),
'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' )
);
$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')));
}
function _handle_logo_upload()
{
$this->load->helper('directory');
// load upload library
$config = array('upload_path' => './uploads/',
'allowed_types' => 'gif|jpg|png',
'max_size' => '1024',
'max_width' => '800',
'max_height' => '680',
'file_name' => 'company_logo');
$this->load->library('upload', $config);
$this->upload->do_upload('company_logo');
return strlen($this->upload->display_errors()) == 0 ||
!strcmp($this->upload->display_errors(),
'<p>'.$this->lang->line('upload_no_file_selected').'</p>');
}
function backup_db()
{
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
if($this->Employee->has_module_grant('config',$employee_id))
{
$this->load->dbutil();
$prefs = array(
'format' => 'zip',
'filename' => 'ospos.sql'
);
$backup =& $this->dbutil->backup($prefs);
$file_name = 'ospos-' . date("Y-m-d-H-i-s") .'.zip';
$save = 'uploads/'.$file_name;
$this->load->helper('download');
while (ob_get_level()) {
ob_end_clean();
}
force_download($file_name, $backup);
}
else
{
redirect('no_access/config');
}
}
}
?>

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

@@ -1,143 +0,0 @@
<?php
require_once ("secure_area.php");
require_once ("interfaces/idata_controller.php");
class Item_kits extends Secure_area implements iData_controller
{
function __construct()
{
parent::__construct('item_kits');
}
function index($limit_from=0)
{
$data['controller_name']=$this->get_controller_name();
$data['form_width']=$this->get_form_width();
$lines_per_page = $this->Appconfig->get('lines_per_page');
$item_kits = $this->Item_kit->get_all($lines_per_page,$limit_from);
$data['links'] = $this->_initialize_pagination($this->Item_kit,$lines_per_page,$limit_from);
$data['manage_table']=get_item_kits_manage_table($item_kits,$this);
$this->load->view('item_kits/manage',$data);
}
function search()
{
$search = $this->input->post('search');
$limit_from = $this->input->post('limit_from');
$lines_per_page = $this->Appconfig->get('lines_per_page');
$customers = $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);
$data_rows=get_item_kits_manage_table_data_rows($customers,$this);
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
}
/*
Gives search suggestions based on what is being searched for
*/
function suggest()
{
$suggestions = $this->Item_kit->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
echo implode("\n",$suggestions);
}
function get_row()
{
$item_kit_id = $this->input->post('row_id');
$data_row=get_item_kit_data_row($this->Item_kit->get_info($item_kit_id),$this);
echo $data_row;
}
function view($item_kit_id=-1)
{
$data['item_kit_info']=$this->Item_kit->get_info($item_kit_id);
$this->load->view("item_kits/form",$data);
}
function save($item_kit_id=-1)
{
$item_kit_data = array(
'name'=>$this->input->post('name'),
'description'=>$this->input->post('description')
);
if($this->Item_kit->save($item_kit_data,$item_kit_id))
{
//New item kit
if($item_kit_id==-1)
{
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_adding').' '.
$item_kit_data['name'],'item_kit_id'=>$item_kit_data['item_kit_id']));
$item_kit_id = $item_kit_data['item_kit_id'];
}
else //previous item
{
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_updating').' '.
$item_kit_data['name'],'item_kit_id'=>$item_kit_id));
}
if ($this->input->post('item_kit_item'))
{
$item_kit_items = array();
foreach($this->input->post('item_kit_item') as $item_id => $quantity)
{
$item_kit_items[] = array(
'item_id' => $item_id,
'quantity' => $quantity
);
}
$this->Item_kit_items->save($item_kit_items, $item_kit_id);
}
}
else//failure
{
echo json_encode(array('success'=>false,'message'=>$this->lang->line('item_kits_error_adding_updating').' '.
$item_kit_data['name'],'item_kit_id'=>-1));
}
}
function delete()
{
$item_kits_to_delete=$this->input->post('ids');
if($this->Item_kit->delete_list($item_kits_to_delete))
{
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_deleted').' '.
count($item_kits_to_delete).' '.$this->lang->line('item_kits_one_or_multiple')));
}
else
{
echo json_encode(array('success'=>false,'message'=>$this->lang->line('item_kits_cannot_be_deleted')));
}
}
function generate_barcodes($item_kit_ids)
{
$this->load->library('barcode_lib');
$result = array();
$item_kit_ids = explode(':', $item_kit_ids);
foreach ($item_kit_ids as $item_kid_id)
{
$item_kit_info = $this->Item_kit->get_info($item_kid_id);
$result[] = array('name' =>$item_kit_info->name, 'item_id'=> 'KIT '.$item_kid_id, 'item_number'=>'KIT '.$item_kid_id);
}
$data['items'] = $result;
$data['configs'] = $this->Appconfig->get_all();
$data['barcode_config'] = $this->barcode_lib->get_barcode_config();
$this->load->view("barcode_sheet", $data);
}
/*
get the width for the add/edit form
*/
function get_form_width()
{
return 400;
}
}
?>

View File

@@ -1,783 +0,0 @@
<?php
require_once ("secure_area.php");
class Sales extends Secure_area
{
function __construct()
{
parent::__construct('sales');
$this->load->library('sale_lib');
$this->load->library('barcode_lib');
}
function index()
{
$this->_reload();
}
function manage($payment_type = 0, $limit_from = 0)
{
$data['controller_name']=strtolower($this->uri->segment(1));
$data['payment_types'] = array($this->lang->line('sales_no_filter'), $this->lang->line('sales_invoice'));
$data['search_section_state']=$this->input->post('search_section_state');
$lines_per_page = $this->Appconfig->get('lines_per_page');
$sales = $this->Sale->get_all($payment_type,$lines_per_page,$limit_from);
$total_rows = $this->Sale->get_found_rows($payment_type);
$data['payment_type'] = $payment_type;
$data['links'] = $this->_initialize_pagination($this->Sale, $lines_per_page, $limit_from, -1, 'manage', $payment_type);
$data['manage_table']=get_sales_manage_table($sales,$this);
$this->load->view($data['controller_name'] . '/manage',$data);
$this->_remove_duplicate_cookies();
}
function get_row()
{
$sale_id = $this->input->post('row_id');
$sale_info = $this->Sale->get_info($sale_id)->result_array();
$data_row=get_sale_data_row($sale_info[0],$this);
echo $data_row;
}
/**
*
* Get the width for the add/edit form.
* @return number The form width
*/
function get_form_width()
{
return 400;
}
function search()
{
$payment_type = $this->input->post('payment_type', TRUE);
$limit_from = $this->input->post('limit_from', TRUE);
$search = $this->input->post('search', TRUE);
$lines_per_page = $this->Appconfig->get('lines_per_page');
$sales = $this->Sale->search($search, $payment_type, $lines_per_page, $limit_from, $search);
$total_rows = $this->Sale->get_found_rows($search);
$links = $this->_initialize_pagination($this->Sale,$lines_per_page,$limit_from,$total_rows,'search',$payment_type);
$data_rows=get_sales_manage_table_data_rows($sales,$this);
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
$this->_remove_duplicate_cookies();
}
function item_search()
{
$suggestions = array();
if ($this->sale_lib->get_mode() == 'return')
{
$this->sale_lib->is_valid_receipt($this->input->post('q')) && $suggestions[] = $this->input->post('q');
}
$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')));
echo implode("\n",$suggestions);
}
function customer_search()
{
$suggestions = $this->Customer->get_customer_search_suggestions($this->input->post('q'),$this->input->post('limit'));
echo implode("\n",$suggestions);
}
function suggest()
{
$search = $this->input->post('q', TRUE);
$limit = $this->input->post('limit', TRUE);
$suggestions = $this->Sale->get_search_suggestions($search, $limit);
echo implode("\n",$suggestions);
}
function select_customer()
{
$customer_id = $this->input->post("customer");
$this->sale_lib->set_customer($customer_id);
$this->_reload();
}
function change_mode()
{
$stock_location = $this->input->post("stock_location");
if (!$stock_location || $stock_location == $this->sale_lib->get_sale_location())
{
$mode = $this->input->post("mode");
$this->sale_lib->set_mode($mode);
}
else if ($this->Stock_locations->is_allowed_location($stock_location, 'sales'))
{
$this->sale_lib->set_sale_location($stock_location);
}
$this->_reload();
}
function set_comment()
{
$this->sale_lib->set_comment($this->input->post('comment'));
}
function set_invoice_number()
{
$this->sale_lib->set_invoice_number($this->input->post('sales_invoice_number'));
}
function set_invoice_number_enabled()
{
$this->sale_lib->set_invoice_number_enabled($this->input->post('sales_invoice_number_enabled'));
}
function set_print_after_sale()
{
$this->sale_lib->set_print_after_sale($this->input->post('sales_print_after_sale'));
}
function set_email_receipt()
{
$this->sale_lib->set_email_receipt($this->input->post('email_receipt'));
}
//Alain Multiple Payments
function add_payment()
{
$data = array();
$this->form_validation->set_rules( 'amount_tendered', 'lang:sales_amount_tendered', 'trim|required|numeric' );
if ( $this->form_validation->run() == FALSE )
{
if ( $this->input->post( 'payment_type' ) == $this->lang->line( 'sales_gift_card' ) )
$data['error']=$this->lang->line('sales_must_enter_numeric_giftcard');
else
$data['error']=$this->lang->line('sales_must_enter_numeric');
$this->_reload( $data );
return;
}
$payment_type = $this->input->post( 'payment_type' );
if ( $payment_type == $this->lang->line( 'sales_giftcard' ) )
{
$payments = $this->sale_lib->get_payments();
$payment_type = $this->input->post( 'payment_type' ) . ':' . $payment_amount = $this->input->post( 'amount_tendered' );
$current_payments_with_giftcard = isset( $payments[$payment_type] ) ? $payments[$payment_type]['payment_amount'] : 0;
$cur_giftcard_value = $this->Giftcard->get_giftcard_value( $this->input->post( 'amount_tendered' ) ) - $current_payments_with_giftcard;
if ( $cur_giftcard_value <= 0 )
{
$data['error'] = $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 = ( $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' ) ) );
}
else
{
$payment_amount = $this->input->post( 'amount_tendered' );
}
if( !$this->sale_lib->add_payment( $payment_type, $payment_amount ) )
{
$data['error']='Unable to Add Payment! Please try again!';
}
$this->_reload($data);
}
//Alain Multiple Payments
function delete_payment( $payment_id )
{
$this->sale_lib->delete_payment( $payment_id );
$this->_reload();
}
function add()
{
$data=array();
$mode = $this->sale_lib->get_mode();
$item_id_or_number_or_item_kit_or_receipt = $this->input->post("item");
$quantity = ($mode=="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))
{
$this->sale_lib->return_entire_sale($item_id_or_number_or_item_kit_or_receipt);
}
elseif($this->Sale_suspended->invoice_number_exists($item_id_or_number_or_item_kit_or_receipt))
{
$this->sale_lib->clear_all();
$sale_id=$this->Sale_suspended->get_sale_by_invoice_number($item_id_or_number_or_item_kit_or_receipt)->row()->sale_id;
$this->sale_lib->copy_entire_suspended_sale($sale_id);
$this->Sale_suspended->delete($sale_id);
}
elseif($this->sale_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
{
$this->sale_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt,$item_location);
}
elseif(!$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');
}
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');
}
$this->_reload($data);
}
function edit_item($line)
{
$data= array();
$this->form_validation->set_rules('price', 'lang:items_price', 'required|numeric');
$this->form_validation->set_rules('quantity', 'lang:items_quantity', 'required|numeric');
$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");
if ($this->form_validation->run() != FALSE)
{
$this->sale_lib->edit_item($line,$description,$serialnumber,$quantity,$discount,$price);
}
else
{
$data['error']=$this->lang->line('sales_error_editing_item');
}
if($this->sale_lib->out_of_stock($this->sale_lib->get_item_id($line),$item_location))
{
$data['warning'] = $this->lang->line('sales_quantity_less_than_zero');
}
$this->_reload($data);
}
function delete_item($item_number)
{
$this->sale_lib->delete_item($item_number);
$this->_reload();
}
function remove_customer()
{
$this->sale_lib->clear_giftcard_remainder();
$this->sale_lib->clear_invoice_number();
$this->sale_lib->remove_customer();
$this->_reload();
}
function complete()
{
$data['cart']=$this->sale_lib->get_cart();
$data['subtotal']=$this->sale_lib->get_subtotal();
$data['discounted_subtotal']=$this->sale_lib->get_subtotal(TRUE);
$data['tax_exclusive_subtotal']=$this->sale_lib->get_subtotal(TRUE, TRUE);
$data['taxes']=$this->sale_lib->get_taxes();
$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('m/d/Y h:i:s a');
$data['transaction_date']= date('d/m/Y', strtotime($data['transaction_time']));
$data['show_stock_locations']=$this->Stock_locations->show_locations('sales');
$customer_id=$this->sale_lib->get_customer();
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
$comment=$this->sale_lib->get_comment();
$data['comments']=$comment;
$emp_info=$this->Employee->get_info($employee_id);
$data['payments']=$this->sale_lib->get_payments();
$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['company_info'] = implode("\n", array(
$this->config->item('address'),
$this->config->item('phone'),
$this->config->item('account_number')
));
$cust_info='';
if($customer_id!=-1)
{
$cust_info=$this->Customer->get_info($customer_id);
if (isset($cust_info->company_name))
{
$data['customer']=$cust_info->company_name;
}
else
{
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
}
$data['customer_address'] = $cust_info->address_1;
$data['customer_location'] = $cust_info->zip . ' ' . $cust_info->city;
$data['account_number'] = $cust_info->account_number;
$data['customer_info'] = implode("\n", array(
$data['customer'],
$data['customer_address'],
$data['customer_location'],
$data['account_number']
));
}
$invoice_number=$this->_substitute_invoice_number($cust_info);
if ($this->sale_lib->is_invoice_number_enabled() && $this->Sale->invoice_number_exists($invoice_number))
{
$data['error']=$this->lang->line('sales_invoice_number_duplicate');
$this->_reload($data);
}
else
{
$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,$comment,$invoice_number,$data['payments']);
if ($data['sale_id'] == 'POS -1')
{
$data['error_message'] = $this->lang->line('sales_transaction_failed');
}
else
{
$barcode_config=array('barcode_type'=>2,'barcode_width'=>200, 'barcode_height'=>30, 'barcode_quality'=>100);
$data['barcode']=$this->barcode_lib->generate_barcode($data['sale_id'],$barcode_config);
// if we want to email. .. just attach the pdf in there?
if ($this->sale_lib->get_email_receipt() && !empty($cust_info->email))
{
$this->load->library('email');
$config['mailtype'] = 'html';
$this->email->initialize($config);
$this->email->from($this->config->item('email'), $this->config->item('company'));
$this->email->to($cust_info->email);
$this->email->subject($this->lang->line('sales_receipt'));
if ($this->config->item('use_invoice_template') && $this->sale_lib->is_invoice_number_enabled())
{
$data['image_prefix']="";
$filename = $this->_invoice_email_pdf($data);
$this->email->attach($filename);
$text = $this->config->item('invoice_email_message');
$text = str_replace('$INV', $invoice_number, $text);
$text = str_replace('$CO', $data['sale_id'], $text);
$text = $this->_substitute_customer($text, $cust_info);
$this->email->message($text);
}
else
{
$this->email->message($this->load->view("sales/receipt_email",$data, true));
}
$this->email->send();
}
}
$data['cur_giftcard_value']=$this->sale_lib->get_giftcard_remainder();
$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);
}
else
{
$this->load->view("sales/receipt",$data);
}
$this->sale_lib->clear_all();
}
$this->_remove_duplicate_cookies();
}
function _invoice_email_pdf($data)
{
$data['image_prefix'] = "";
$html = $this->load->view('sales/invoice_email', $data, true);
// load pdf helper
$this->load->helper(array('dompdf', 'file'));
$file_content = pdf_create($html, '', false);
$filename = sys_get_temp_dir() . '/'. $this->lang->line('sales_invoice') .'-' . str_replace('/', '-' , $data["invoice_number"]) . '.pdf';
write_file($filename, $file_content);
return $filename;
}
function invoice_email($sale_id) {
$sale_data = $this->_load_sale_data($sale_id);
$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) {
$sale_data = $this->_load_sale_data($sale_id);
$text = $this->config->item('invoice_email_message');
$text = str_replace('$INV', $sale_data['invoice_number'], $text);
$text = str_replace('$CO', 'POS ' . $sale_data['sale_id'], $text);
$text = $this->_substitute_customer($text,(object) $sale_data);
$result = FALSE;
$message = $this->lang->line('sales_invoice_no_email');
if (isset($sale_data["customer_email"]) && !empty( $sale_data["customer_email"])) {
$this->load->library('email');
$this->email->from($this->config->item('email'), $this->config->item('company'));
$this->email->to($sale_data['customer_email']);
$this->email->subject($this->lang->line('sales_invoice') . ' ' . $sale_data['invoice_number']);
$this->email->message($text);
$filename = $this->_invoice_email_pdf($sale_data);
$this->email->attach($filename);
$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)
);
$this->sale_lib->clear_all();
$this->_remove_duplicate_cookies();
}
function _substitute_variable($text, $variable, $object, $function)
{
// don't query if this variable isn't used
if (strstr($text, $variable))
{
$value = call_user_func(array($object, $function));
$text = str_replace($variable, $value, $text);
}
return $text;
}
function _substitute_customer($text, $cust_info)
{
// substitute customer 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);
$words = preg_split("/\s+/", trim($cust_info->first_name . ' ' . $cust_info->last_name));
$acronym = "";
foreach ($words as $w) {
$acronym .= $w[0];
}
$text=str_replace('$CI',$acronym,$text);
}
return $text;
}
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);
return $text;
}
function _substitute_invoice_number($cust_info)
{
$invoice_number=$this->sale_lib->get_invoice_number();
if (empty($invoice_number))
{
$invoice_number=$this->config->config['sales_invoice_format'];
}
$invoice_number = $this->_substitute_variables($invoice_number, $cust_info);
$this->sale_lib->set_invoice_number($invoice_number);
return $invoice_number;
}
function _load_sale_data($sale_id) {
$this->sale_lib->clear_all();
$sale_info = $this->Sale->get_info($sale_id)->row_array();
$this->sale_lib->copy_entire_sale($sale_id);
$data['cart']=$this->sale_lib->get_cart();
$data['payments']=$this->sale_lib->get_payments();
$data['subtotal']=$this->sale_lib->get_subtotal();
$data['discounted_subtotal']=$this->sale_lib->get_subtotal(TRUE);
$data['tax_exclusive_subtotal']=$this->sale_lib->get_subtotal(TRUE, TRUE);
$data['taxes']=$this->sale_lib->get_taxes();
$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('d/m/Y H:i:s', strtotime($sale_info['sale_time']));
$data['show_stock_locations']=$this->Stock_locations->show_locations('sales');
$data['transaction_date']= date('d/m/Y', strtotime($sale_info['sale_time']));
$customer_id=$this->sale_lib->get_customer();
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
$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;
if($customer_id!=-1)
{
$cust_info=$this->Customer->get_info($customer_id);
if (isset($cust_info->company_name))
{
$data['customer']=$cust_info->company_name;
}
else
{
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
}
$data['first_name']=$cust_info->first_name;
$data['last_name']=$cust_info->last_name;
$data['customer_address'] = $cust_info->address_1;
$data['customer_location'] = $cust_info->zip . ' ' . $cust_info->city;
$data['customer_email'] = $cust_info->email;
$data['account_number'] = $cust_info->account_number;
$data['customer_info'] = implode("\n", array(
$data['customer'],
$data['customer_address'],
$data['customer_location'],
$data['account_number']
));
}
$data['sale_id']='POS '.$sale_id;
$data['comments'] = $sale_info[ 'comment' ];
$data['invoice_number'] = $sale_info['invoice_number'];
$data['company_info'] = implode("\n", array(
$this->config->item('address'),
$this->config->item('phone'),
$this->config->item('account_number')
));
// static barcode config for receipts + invoices
$barcode_config=array('barcode_type'=>2,'barcode_width'=>200, 'barcode_height'=>30, 'barcode_quality'=>100);
$data['barcode']=$this->barcode_lib->generate_barcode($data['sale_id'],$barcode_config);
$data['print_after_sale'] = FALSE;
return $data;
}
function receipt($sale_id)
{
$data = $this->_load_sale_data($sale_id);
$this->load->view("sales/receipt",$data);
$this->sale_lib->clear_all();
$this->_remove_duplicate_cookies();
}
function invoice($sale_id, $sale_info='')
{
if ($sale_info == '') {
$sale_info = $this->_load_sale_data($sale_id);
}
$this->load->view("sales/invoice",$sale_info);
$this->sale_lib->clear_all();
$this->_remove_duplicate_cookies();
}
function edit($sale_id)
{
$data = array();
$data['employees'] = array();
foreach ($this->Employee->get_all()->result() as $employee)
{
$data['employees'][$employee->person_id] = $employee->first_name . ' '. $employee->last_name;
}
$sale_info = $this->Sale->get_info($sale_id)->row_array();
$person_name = $sale_info['first_name'] . " " . $sale_info['last_name'];
$data['selected_customer'] = !empty($sale_info['customer_id']) ? $sale_info['customer_id'] . "|" . $person_name : "";
$data['sale_info'] = $sale_info;
$this->load->view('sales/form', $data);
}
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);
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));
}
else
{
echo json_encode(array('success'=>false,'message'=>$this->lang->line('sales_unsuccessfully_deleted')));
}
}
function save($sale_id)
{
$sale_data = array(
'sale_time' => date('Y-m-d H:i:s', strtotime($this->input->post('date'))),
'customer_id' => $this->input->post('customer_id') ? $this->input->post('customer_id') : NULL,
'employee_id' => $this->input->post('employee_id'),
'comment' => $this->input->post('comment'),
'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)
);
}
else
{
echo json_encode(array(
'success'=>false,
'message'=>$this->lang->line('sales_unsuccessfully_updated'),
'id'=>$sale_id)
);
}
}
function _payments_cover_total()
{
$total_payments = 0;
foreach($this->sale_lib->get_payments() as $payment)
{
$total_payments += $payment['payment_amount'];
}
/* Changed the conditional to account for floating point rounding */
if ( ($this->sale_lib->get_mode() == 'sale') &&
( ( to_currency_no_money( $this->sale_lib->get_total() ) - $total_payments ) > 1e-6 ) )
{
return false;
}
return true;
}
function _reload($data=array())
{
$person_info = $this->Employee->get_logged_in_employee_info();
$data['cart']=$this->sale_lib->get_cart();
$data['modes']=array('sale'=>$this->lang->line('sales_sale'),'return'=>$this->lang->line('sales_return'));
$data['mode']=$this->sale_lib->get_mode();
$data['stock_locations']=$this->Stock_locations->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);
$data['taxes']=$this->sale_lib->get_taxes();
$data['discount']=$this->sale_lib->get_discount();
$data['total']=$this->sale_lib->get_total();
$data['items_module_allowed']=$this->Employee->has_grant('items', $person_info->person_id);
$data['comment']=$this->sale_lib->get_comment();
$data['email_receipt']=$this->sale_lib->get_email_receipt();
$data['payments_total']=$this->sale_lib->get_payments_total();
$data['amount_due']=$this->sale_lib->get_amount_due();
$data['payments']=$this->sale_lib->get_payments();
$data['payment_options']=array(
$this->lang->line('sales_cash') => $this->lang->line('sales_cash'),
$this->lang->line('sales_check') => $this->lang->line('sales_check'),
$this->lang->line('sales_giftcard') => $this->lang->line('sales_giftcard'),
$this->lang->line('sales_debit') => $this->lang->line('sales_debit'),
$this->lang->line('sales_credit') => $this->lang->line('sales_credit')
);
$customer_id=$this->sale_lib->get_customer();
$cust_info='';
if($customer_id!=-1)
{
$cust_info=$this->Customer->get_info($customer_id);
$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);
$data['invoice_number_enabled']=$this->sale_lib->is_invoice_number_enabled();
$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->_remove_duplicate_cookies();
}
function cancel_sale()
{
$this->sale_lib->clear_all();
$this->_reload();
}
function suspend()
{
$data['cart']=$this->sale_lib->get_cart();
$data['subtotal']=$this->sale_lib->get_subtotal();
$data['taxes']=$this->sale_lib->get_taxes();
$data['total']=$this->sale_lib->get_total();
$data['receipt_title']=$this->lang->line('sales_receipt');
$data['transaction_time']= date('m/d/Y h:i:s a');
$customer_id=$this->sale_lib->get_customer();
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
$comment = $this->input->post('comment');
$invoice_number=$this->sale_lib->get_invoice_number();
$emp_info=$this->Employee->get_info($employee_id);
$payment_type = $this->input->post('payment_type');
$data['payment_type']=$this->input->post('payment_type');
//Alain Multiple payments
$data['payments']=$this->sale_lib->get_payments();
$data['amount_change']=to_currency($this->sale_lib->get_amount_due() * -1);
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
if ($this->Sale_suspended->invoice_number_exists($invoice_number))
{
$this->_reload(array('error' => $data['error']=$this->lang->line('sales_invoice_number_duplicate')));
}
else
{
if($customer_id!=-1)
{
$cust_info=$this->Customer->get_info($customer_id);
if (isset($cust_info->company_name))
{
$data['customer']=$cust_info->company_name;
}
else
{
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
}
}
$total_payments = 0;
foreach($data['payments'] as $payment)
{
$total_payments = bcadd($total_payments, $payment['payment_amount'], PRECISION);
}
//SAVE sale to database
$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');
}
$this->sale_lib->clear_all();
$this->_reload(array('success' => $this->lang->line('sales_successfully_suspended_sale')));
}
}
function suspended()
{
$data = array();
$data['suspended_sales'] = $this->Sale_suspended->get_all()->result_array();
$this->load->view('sales/suspended', $data);
}
function unsuspend()
{
$sale_id = $this->input->post('suspended_sale_id');
$this->sale_lib->clear_all();
$this->sale_lib->copy_entire_suspended_sale($sale_id);
$this->Sale_suspended->delete($sale_id);
$this->_reload();
}
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')));
}
}
?>

View File

@@ -3,7 +3,7 @@
class MY_Lang extends CI_Lang
{
function MY_Lang()
function __construct()
{
parent::__construct();
}
@@ -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,5 +1,4 @@
<?php
/** GARRISON MODIFIED 4/20/2013 **/
function to_currency($number,$escape=FALSE)
{
$CI =& get_instance();
@@ -22,7 +21,6 @@ function to_currency($number,$escape=FALSE)
return '-'.number_format(abs($number), 2, $decimal_point, $thousands_separator).$currency_symbol;
}
}
/** END MODIFIED **/
function to_currency_no_money($number)
{

View File

@@ -0,0 +1,69 @@
<?php
/*
* Matches each symbol of PHP date format standard
* with jQuery equivalent codeword
* @author Tristan Jahier
*/
function dateformat_jquery($php_format)
{
$SYMBOLS_MATCHING = array(
// Day
'd' => 'dd',
'D' => 'D',
'j' => 'd',
'l' => 'DD',
'N' => '',
'S' => '',
'w' => '',
'z' => 'o',
// Week
'W' => '',
// Month
'F' => 'MM',
'm' => 'mm',
'M' => 'M',
'n' => 'm',
't' => '',
// Year
'L' => '',
'o' => '',
'Y' => 'yy',
'y' => 'y',
// Time
'a' => 'tt',
'A' => 'TT',
'B' => '',
'g' => 'h',
'G' => 'H',
'h' => 'hh',
'H' => 'HH',
'i' => 'mm',
's' => 'ss',
'u' => ''
);
$jqueryui_format = "";
$escaping = false;
for($i = 0; $i < strlen($php_format); $i++)
{
$char = $php_format[$i];
if($char === '\\') // PHP date format escaping character
{
$i++;
if($escaping) $jqueryui_format .= $php_format[$i];
else $jqueryui_format .= '\'' . $php_format[$i];
$escaping = true;
}
else
{
if($escaping) { $jqueryui_format .= "'"; $escaping = false; }
if(isset($SYMBOLS_MATCHING[$char]))
$jqueryui_format .= $SYMBOLS_MATCHING[$char];
else
$jqueryui_format .= $char;
}
}
return $jqueryui_format;
}
?>

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,36 +1,45 @@
<?php
function get_simple_date_ranges()
{
$CI =& get_instance();
$CI->load->language('reports');
$today = date('Y-m-d');
$yesterday = date('Y-m-d', mktime(0,0,0,date("m"),date("d")-1,date("Y")));
$six_days_ago = date('Y-m-d', mktime(0,0,0,date("m"),date("d")-6,date("Y")));
$start_of_this_month = date('Y-m-d', mktime(0,0,0,date("m"),1,date("Y")));
$end_of_this_month = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00'))));
$start_of_last_month = date('Y-m-d', mktime(0,0,0,date("m")-1,1,date("Y")));
$end_of_last_month = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime((date('m') - 1).'/01/'.date('Y').' 00:00:00'))));
$start_of_this_year = date('Y-m-d', mktime(0,0,0,1,1,date("Y")));
$end_of_this_year = date('Y-m-d', mktime(0,0,0,12,31,date("Y")));
$start_of_last_year = date('Y-m-d', mktime(0,0,0,1,1,date("Y")-1));
$end_of_last_year = date('Y-m-d', mktime(0,0,0,12,31,date("Y")-1));
$start_of_time = date('Y-m-d', 0);
$CI =& get_instance();
$CI->load->language('reports');
return array(
$today. '/' . $today => $CI->lang->line('reports_today'),
$yesterday. '/' . $yesterday => $CI->lang->line('reports_yesterday'),
$six_days_ago. '/' . $today => $CI->lang->line('reports_last_7'),
$start_of_this_month . '/' . $end_of_this_month => $CI->lang->line('reports_this_month'),
$start_of_last_month . '/' . $end_of_last_month => $CI->lang->line('reports_last_month'),
$start_of_this_year . '/' . $end_of_this_year => $CI->lang->line('reports_this_year'),
$start_of_last_year . '/' . $end_of_last_year => $CI->lang->line('reports_last_year'),
$start_of_time . '/' . $today => $CI->lang->line('reports_all_time'),
);
$today = date('Y-m-d');
$today_last_year = date('Y-m-d', mktime(0,0,0,date("m"),date("d"),date("Y")-1));
$yesterday = date('Y-m-d', mktime(0,0,0,date("m"),date("d")-1,date("Y")));
$six_days_ago = date('Y-m-d', mktime(0,0,0,date("m"),date("d")-6,date("Y")));
$start_of_this_month = date('Y-m-d', mktime(0,0,0,date("m"),1,date("Y")));
$end_of_this_month = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00'))));
$start_of_this_month_last_year = date('Y-m-d', mktime(0,0,0,date("m"),1,date("Y")-1));
$end_of_this_month_last_year = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.(date('Y')-1).' 00:00:00'))));
$start_of_last_month = date('Y-m-d', mktime(0,0,0,date("m")-1,1,date("Y")));
$end_of_last_month = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime((date('m') - 1).'/01/'.date('Y').' 00:00:00'))));
$start_of_this_year = date('Y-m-d', mktime(0,0,0,1,1,date("Y")));
$end_of_this_year = date('Y-m-d', mktime(0,0,0,12,31,date("Y")));
$start_of_last_year = date('Y-m-d', mktime(0,0,0,1,1,date("Y")-1));
$end_of_last_year = date('Y-m-d', mktime(0,0,0,12,31,date("Y")-1));
$start_of_time = date('Y-m-d', 0);
return array(
$today . '/' . $today => $CI->lang->line('reports_today'),
$today_last_year . '/' . $today_last_year => $CI->lang->line('reports_today_last_year'),
$yesterday . '/' . $yesterday => $CI->lang->line('reports_yesterday'),
$six_days_ago . '/' . $today => $CI->lang->line('reports_last_7'),
$start_of_this_month . '/' . $today => $CI->lang->line('reports_this_month_to_today'),
$start_of_this_month . '/' . $end_of_this_month => $CI->lang->line('reports_this_month'),
$start_of_this_month_last_year . '/' . $today_last_year => $CI->lang->line('reports_this_month_to_today_last_year'),
$start_of_this_month_last_year . '/' . $end_of_this_month_last_year => $CI->lang->line('reports_this_month_last_year'),
$start_of_last_month . '/' . $end_of_last_month => $CI->lang->line('reports_last_month'),
$start_of_this_year . '/' . $end_of_this_year => $CI->lang->line('reports_this_year'),
$start_of_last_year . '/' . $end_of_last_year => $CI->lang->line('reports_last_year'),
$start_of_time . '/' . $today => $CI->lang->line('reports_all_time')
);
}
function get_months()
{
$months = array();
for($k=1;$k<=12;$k++)
{
$cur_month = mktime(0, 0, 0, $k, 1, 2000);
@@ -56,6 +65,7 @@ function get_days()
function get_years()
{
$years = array();
for($k=0;$k<10;$k++)
{
$years[date("Y")-$k] = date("Y")-$k;
@@ -83,6 +93,7 @@ function random_color()
while(strlen($c)<6){
$c .= sprintf("%02X", mt_rand(0, 255));
}
return $c;
}

View File

@@ -1,16 +1,18 @@
<?php
function get_sales_manage_table($sales,$controller)
function get_sales_manage_table($sales, $controller)
{
$CI =& get_instance();
$table='<table class="tablesorter" id="sortable_table">';
$headers = array('&nbsp;',
$CI->lang->line('sales_receipt_number'),
$CI->lang->line('sales_sale_time'),
$CI->lang->line('customers_customer'),
$CI->lang->line('sales_amount_tendered'),
$CI->lang->line('sales_amount_due'),
$CI->lang->line('sales_receipt_number'),
$CI->lang->line('sales_change_due'),
$CI->lang->line('sales_payment'),
$CI->lang->line('sales_invoice_number'),
'&nbsp');
@@ -20,58 +22,99 @@ function get_sales_manage_table($sales,$controller)
$table.="<th>$header</th>";
}
$table.='</tr></thead><tbody>';
$table.=get_sales_manage_table_data_rows($sales,$controller);
$table.=get_sales_manage_table_data_rows($sales, $controller);
$table.='</tbody></table>';
return $table;
}
/*
Gets the html data rows for the people.
Gets the html data rows for the sales.
*/
function get_sales_manage_table_data_rows($sales,$controller)
function get_sales_manage_table_data_rows($sales, $controller)
{
$CI =& get_instance();
$table_data_rows='';
$table_data_rows = '';
$sum_amount_tendered = 0;
$sum_amount_due = 0;
$sum_change_due = 0;
foreach($sales->result_array() as $sale)
foreach($sales as $key=>$sale)
{
$table_data_rows.=get_sale_data_row($sale,$controller);
$table_data_rows .= get_sales_manage_sale_data_row($sale, $controller);
$sum_amount_tendered += $sale['amount_tendered'];
$sum_amount_due += $sale['amount_due'];
$sum_change_due += $sale['change_due'];
}
if($sales->num_rows()==0)
if($table_data_rows == '')
{
$table_data_rows.="<tr><td colspan='8'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('sales_no_sales_to_display')."</div></tr></tr>";
$table_data_rows .= "<tr><td colspan='10'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('sales_no_sales_to_display')."</div></td></tr>";
}
else
{
$table_data_rows .= "<tr class='static-last'><td>&nbsp;</td><td>".$CI->lang->line('sales_total')."</td><td>&nbsp;</td><td>&nbsp;</td><td>".to_currency($sum_amount_tendered)."</td><td>".to_currency($sum_amount_due)."</td><td>".to_currency($sum_change_due)."</td><td colspan=\"3\"></td></tr>";
}
return $table_data_rows;
}
function get_sale_data_row($sale,$controller)
function get_sales_manage_sale_data_row($sale, $controller)
{
$CI =& get_instance();
$controller_name=$CI->uri->segment(1);
$controller_name = $CI->uri->segment(1);
$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="17%">'.date('d/m/Y H:i' , strtotime($sale[ 'sale_time' ])).'</td>';
$table_data_row.='<td width="23%">'.character_limiter( $sale[ 'last_name' ] . " " . $sale[ 'first_name' ] ,25).'</td>';
$table_data_row.='<td width="10%">'.to_currency( $sale[ 'amount_tendered' ] ).'</td>';
$table_data_row.='<td width="10%">'.to_currency( $sale[ 'amount_due' ] ).'</td>';
$table_data_row.='<td width="15%">'.'Ticket ' . $sale[ 'sale_id' ]. '</td>';
$table_data_row.='<td width="10%">'.$sale[ 'invoice_number' ].'</td>';
$table_data_row.='<td width="12%">';
$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="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>';
$table_data_row.='<td width="8%">'.to_currency( $sale['amount_tendered'] ).'</td>';
$table_data_row.='<td width="8%">'.to_currency( $sale['amount_due'] ).'</td>';
$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%" 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>';
return $table_data_row;
}
/*
Get the sales payments summary
*/
function get_sales_manage_payments_summary($payments, $sales, $controller)
{
$CI =& get_instance();
$table='<div id="report_summary">';
foreach($payments as $key=>$payment)
{
$amount = $payment['payment_amount'];
// WARNING: the strong assumption here is that if a change is due it was a cash transaction always
// therefore we remove from the total cash amount any change due
if( $payment['payment_type'] == $CI->lang->line('sales_cash') )
{
foreach($sales as $key=>$sale)
{
$amount -= $sale['change_due'];
}
}
$table.='<div class="summary_row">'.$payment['payment_type'].': '.to_currency( $amount ) . '</div>';
}
$table.='</div>';
return $table;
}
/*
Gets the html table to manage people.
*/
@@ -95,6 +138,7 @@ function get_people_manage_table($people,$controller)
$table.='</tr></thead><tbody>';
$table.=get_people_manage_table_data_rows($people,$controller);
$table.='</tbody></table>';
return $table;
}
@@ -148,6 +192,7 @@ function get_detailed_data_row($row, $controller)
$table_data_row.='</td>';
}
$table_data_row.='</tr>';
return $table_data_row;
}
@@ -161,10 +206,12 @@ function get_supplier_manage_table($suppliers,$controller)
$headers = array('<input type="checkbox" id="select_all" />',
$CI->lang->line('suppliers_company_name'),
$CI->lang->line('suppliers_agency_name'),
$CI->lang->line('common_last_name'),
$CI->lang->line('common_first_name'),
$CI->lang->line('common_email'),
$CI->lang->line('common_phone_number'),
$CI->lang->line('suppliers_supplier_id'),
'&nbsp');
$table.='<thead><tr>';
@@ -175,6 +222,7 @@ function get_supplier_manage_table($suppliers,$controller)
$table.='</tr></thead><tbody>';
$table.=get_supplier_manage_table_data_rows($suppliers,$controller);
$table.='</tbody></table>';
return $table;
}
@@ -193,7 +241,7 @@ function get_supplier_manage_table_data_rows($suppliers,$controller)
if($suppliers->num_rows()==0)
{
$table_data_rows.="<tr><td colspan='7'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('common_no_persons_to_display')."</div></tr></tr>";
$table_data_rows.="<tr><td colspan='9'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('common_no_persons_to_display')."</div></td></tr>";
}
return $table_data_rows;
@@ -208,11 +256,13 @@ function get_supplier_data_row($supplier,$controller)
$table_data_row='<tr>';
$table_data_row.="<td width='5%'><input type='checkbox' id='person_$supplier->person_id' value='".$supplier->person_id."'/></td>";
$table_data_row.='<td width="17%">'.character_limiter($supplier->company_name,13).'</td>';
$table_data_row.='<td width="17%">'.character_limiter($supplier->agency_name,13).'</td>';
$table_data_row.='<td width="17%">'.character_limiter($supplier->last_name,13).'</td>';
$table_data_row.='<td width="17%">'.character_limiter($supplier->first_name,13).'</td>';
$table_data_row.='<td width="22%">'.mailto($supplier->email,character_limiter($supplier->email,22)).'</td>';
$table_data_row.='<td width="17%">'.character_limiter($supplier->phone_number,13).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$supplier->person_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="17%">'.character_limiter($supplier->phone_number,13).'</td>';
$table_data_row.='<td width="5%">'.character_limiter($supplier->person_id,5).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$supplier->person_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
@@ -230,6 +280,7 @@ function get_items_manage_table($items,$controller)
$CI->lang->line('items_item_number'),
$CI->lang->line('items_name'),
$CI->lang->line('items_category'),
$CI->lang->line('suppliers_company_name'),
$CI->lang->line('items_cost_price'),
$CI->lang->line('items_unit_price'),
$CI->lang->line('items_quantity'),
@@ -247,6 +298,7 @@ function get_items_manage_table($items,$controller)
$table.='</tr></thead><tbody>';
$table.=get_items_manage_table_data_rows($items,$controller);
$table.='</tbody></table>';
return $table;
}
@@ -265,7 +317,7 @@ function get_items_manage_table_data_rows($items,$controller)
if($items->num_rows()==0)
{
$table_data_rows.="<tr><td colspan='12'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('items_no_items_to_display')."</div></tr></tr>";
$table_data_rows.="<tr><td colspan='12'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('items_no_items_to_display')."</div></td></tr>";
}
return $table_data_rows;
@@ -291,6 +343,7 @@ function get_item_data_row($item,$controller)
$table_data_row.='<td width="15%">'.$item->item_number.'</td>';
$table_data_row.='<td width="20%">'.$item->name.'</td>';
$table_data_row.='<td width="14%">'.$item->category.'</td>';
$table_data_row.='<td width="14%">'.$item->company_name.'</td>';
$table_data_row.='<td width="14%">'.to_currency($item->cost_price).'</td>';
$table_data_row.='<td width="14%">'.to_currency($item->unit_price).'</td>';
$table_data_row.='<td width="14%">'.$item->quantity.'</td>';
@@ -306,12 +359,12 @@ function get_item_data_row($item,$controller)
}
$table_data_row.='<td align="center" width="55px">' . $image . '</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item->item_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
//Ramel Inventory Tracking
$table_data_row.='<td width="10%">'.anchor($controller_name."/inventory/$item->item_id/width:$width", $CI->lang->line('common_inv'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_count')))./*'</td>';//inventory count
$table_data_row.='<td width="5%">'*/'&nbsp;&nbsp;&nbsp;&nbsp;'.anchor($controller_name."/count_details/$item->item_id/width:$width", $CI->lang->line('common_det'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_details_count'))).'</td>';//inventory details
$table_data_row.='</tr>';
return $table_data_row;
}
@@ -321,7 +374,6 @@ Gets the html table to manage giftcards.
function get_giftcards_manage_table( $giftcards, $controller )
{
$CI =& get_instance();
$table='<table class="tablesorter" id="sortable_table">';
$headers = array('<input type="checkbox" id="select_all" />',
@@ -340,6 +392,7 @@ function get_giftcards_manage_table( $giftcards, $controller )
$table.='</tr></thead><tbody>';
$table.=get_giftcards_manage_table_data_rows( $giftcards, $controller );
$table.='</tbody></table>';
return $table;
}
@@ -358,13 +411,12 @@ function get_giftcards_manage_table_data_rows( $giftcards, $controller )
if($giftcards->num_rows()==0)
{
$table_data_rows.="<tr><td colspan='11'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('giftcards_no_giftcards_to_display')."</div></tr></tr>";
$table_data_rows.="<tr><td colspan='11'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('giftcards_no_giftcards_to_display')."</div></td></tr>";
}
return $table_data_rows;
}
/** GARRISON MODIFIED 4/25/2013 **/
function get_giftcard_data_row($giftcard,$controller)
{
$CI =& get_instance();
@@ -377,12 +429,11 @@ function get_giftcard_data_row($giftcard,$controller)
$table_data_row.='<td width="15%">'.$giftcard->first_name.'</td>';
$table_data_row.='<td width="15%">'.$giftcard->giftcard_number.'</td>';
$table_data_row.='<td width="20%">'.to_currency($giftcard->value).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$giftcard->giftcard_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$giftcard->giftcard_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
}
/** END GARRISON MODIFIED **/
/*
Gets the html table to manage item kits.
@@ -390,12 +441,14 @@ Gets the html table to manage item kits.
function get_item_kits_manage_table( $item_kits, $controller )
{
$CI =& get_instance();
$table='<table class="tablesorter" id="sortable_table">';
$headers = array('<input type="checkbox" id="select_all" />',
$CI->lang->line('item_kits_kit'),
$CI->lang->line('item_kits_name'),
$CI->lang->line('item_kits_description'),
$CI->lang->line('items_cost_price'),
$CI->lang->line('items_unit_price'),
'&nbsp',
);
@@ -407,31 +460,32 @@ function get_item_kits_manage_table( $item_kits, $controller )
$table.='</tr></thead><tbody>';
$table.=get_item_kits_manage_table_data_rows( $item_kits, $controller );
$table.='</tbody></table>';
return $table;
}
/*
Gets the html data rows for the item kits.
*/
function get_item_kits_manage_table_data_rows( $item_kits, $controller )
function get_item_kits_manage_table_data_rows($item_kits, $controller)
{
$CI =& get_instance();
$table_data_rows='';
foreach($item_kits->result() as $item_kit)
{
$table_data_rows.=get_item_kit_data_row( $item_kit, $controller );
$table_data_rows .= get_item_kit_data_row($item_kit, $controller);
}
if($item_kits->num_rows()==0)
{
$table_data_rows.="<tr><td colspan='11'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('item_kits_no_item_kits_to_display')."</div></tr></tr>";
$table_data_rows .= "<tr><td colspan='11'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('item_kits_no_item_kits_to_display')."</div></td></tr>";
}
return $table_data_rows;
}
function get_item_kit_data_row($item_kit,$controller)
function get_item_kit_data_row($item_kit, $controller)
{
$CI =& get_instance();
$controller_name=strtolower(get_class($CI));
@@ -439,12 +493,15 @@ function get_item_kit_data_row($item_kit,$controller)
$table_data_row='<tr>';
$table_data_row.="<td width='3%'><input type='checkbox' id='item_kit_$item_kit->item_kit_id' value='".$item_kit->item_kit_id."'/></td>";
$table_data_row.='<td width="15%">'.'KIT '.$item_kit->item_kit_id.'</td>';
$table_data_row.='<td width="15%">'.$item_kit->name.'</td>';
$table_data_row.='<td width="20%">'.character_limiter($item_kit->description, 25).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item_kit->item_kit_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="15%">'.to_currency($item_kit->total_cost_price).'</td>';
$table_data_row.='<td width="15%">'.to_currency($item_kit->total_unit_price).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item_kit->item_kit_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
}
?>
?>

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

@@ -24,7 +24,7 @@ function load_config()
$map = directory_map('./application/language/' . $language);
foreach($map as $file)
{
if ( substr(strrchr($file,'.'),1) == "php")
if ( !is_array($file) && substr(strrchr($file,'.'), 1) == "php")
{
$CI->lang->load( str_replace( '_lang.php', '', $file ), $language);
}

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,57 @@
<?php
$lang["common_address_1"] = "Adresse 1";
$lang["common_address_2"] = "Adresse 2";
$lang["common_city"] = "Stadt";
$lang["common_comments"] = "Kommentare";
$lang["common_common"] = "Allgemein";
$lang["common_confirm_search"] = "Sie haben einen oder mehrere Zeilen gewählt. Nach der Verarbeitung werden diese nicht mehr selektiert sein. Wollen Sie die Suche dennoch verarbeiten?";
$lang["common_country"] = "Land";
$lang["common_date"] = "Datum";
$lang["common_delete"] = "Löschen";
$lang["common_print"] = "Drucken";
$lang["common_det"] = "Details";
$lang["common_edit"] = "Ändern";
$lang["common_email"] = "Email";
$lang["common_email_invalid_format"] = "Das Email Format ist nicht korrekt";
$lang["common_fields_required_message"] = "Die Felder in rot sind erforderlich";
$lang["common_first_name"] = "Vorname";
$lang["common_first_name_required"] = "Vorname ist erforderlich";
$lang["common_first_page"] = "Erste";
$lang["common_gender"] = "Geschlecht";
$lang["common_gender_female"] = "F";
$lang["common_gender_male"] = "M";
$lang["common_inv"] = "Lag";
$lang["common_last_name"] = "Nachname";
$lang["common_last_name_required"] = "Nachname ist erforderlich";
$lang["common_last_page"] = "Letzte";
$lang["common_learn_about_project"] = "für neueste Nachrichten zum Projekt";
$lang["common_list_of"] = "Liste von";
$lang["common_logout"] = "Logout";
$lang["common_new"] = "Neu";
$lang["common_no_persons_to_display"] = "Keine Personen zum Anzeigen";
$lang["common_or"] = "Oder";
$lang["common_phone_number"] = "Telefon";
$lang["common_phone_number_required"] = "Telefon ist erforderlich";
$lang["common_please_visit_my"] = "Bitte beuschen Sie ";
$lang["common_powered_by"] = "Powered by";
$lang["common_price"] = "Preis";
$lang["common_remove"] = "Annulieren";
$lang["common_return_policy"] = "Rücknahmepolitik";
$lang["common_search"] = "Suche";
$lang["common_search_options"] = "Suchkriterien";
$lang["common_searched_for"] = "Gescuht nach";
$lang["common_state"] = "BL/Kanton";
$lang["common_submit"] = "Senden";
$lang["common_view_recent_sales"] = "Letzte Verkäufe";
$lang["common_website"] = "Website";
$lang["common_welcome"] = "Willkommen";
$lang["common_welcome_message"] = "Willkommen bei PHP Point Of Sales, zum Beginnen auf ein Modul klicken";
$lang["common_you_are_using_ospos"] = "Sie verwenden Open Source Point Of Sales Version";
$lang["common_zip"] = "PLZ";
$lang["common_import"] = "Import";
$lang["common_download_import_template"] = "Download Import Excel Voralge (CSV)";
$lang["common_import_file_path"] = "Dateipfad";
$lang["common_import_excel"] = "Excel Import";
$lang["common_import_full_path"] = "Voller Dateipfad zum Excel File notwendig";
$lang["common_required"] = "Erforderlich";

View File

@@ -0,0 +1,122 @@
<?php
$lang["config_address"] = "Adresse";
$lang["config_address_required"] = "Adresse ist erforderlich";
$lang["config_backup_button"] = "Sicherung";
$lang["config_backup_database"] = "Sicherungs-Datenbank";
$lang["config_barcode_company"] = "Firmenname";
$lang["config_barcode_configuration"] = "Barcodes";
$lang["config_barcode_content"] = "Barcode Inhalt";
$lang["config_barcode_first_row"] = "Erste Zeile";
$lang["config_barcode_font"] = "Schrift";
$lang["config_barcode_height"] = "Höhe";
$lang["config_barcode_id"] = "Artikel-Nr/Name";
$lang["config_barcode_info"] = "Barcode Einstellung";
$lang["config_barcode_layout"] = "Barcode Layout";
$lang["config_barcode_name"] = "Name";
$lang["config_barcode_number"] = "UPC/EAN/ISBN";
$lang["config_barcode_number_in_row"] = "Nummer in Zeile";
$lang["config_barcode_page_cellspacing"] = "Zellenabstand auf Seite";
$lang["config_barcode_page_width"] = "Seitenbreite";
$lang["config_barcode_price"] = "Preis";
$lang["config_barcode_quality"] = "Qualität (1-100)";
$lang["config_barcode_second_row"] = "Zeile 2";
$lang["config_barcode_third_row"] = "Zeile 3";
$lang["config_barcode_type"] = "Barcode Typ";
$lang["config_barcode_width"] = "Breite (px)";
$lang["config_barcode_generate_if_empty"] = "Generiere Barcode wenn leer";
$lang["config_company"] = "Firmenname";
$lang["config_company_logo"] = "Logo";
$lang["config_company_required"] = "Firmenname ist erforderlich";
$lang["config_company_website_url"] = "Webseite ist nicht in korrektem Format";
$lang["config_currency_side"] = "Pos. rechts";
$lang["config_currency_symbol"] = "Währungssymbol";
$lang["config_custom1"] = "Zusatzfeld 1";
$lang["config_custom10"] = "Zusatzfeld 10";
$lang["config_custom2"] = "Zusatzfeld 2";
$lang["config_custom3"] = "Zusatzfeld 3";
$lang["config_custom4"] = "Zusatzfeld 4";
$lang["config_custom5"] = "Zusatzfeld 5";
$lang["config_custom6"] = "Zusatzfeld 6";
$lang["config_custom7"] = "Zusatzfeld 7";
$lang["config_custom8"] = "Zusatzfeld 8";
$lang["config_custom9"] = "Zusatzfeld 9";
$lang["config_decimal_point"] = "Dezimaltrennzeichen";
$lang["config_default_barcode_font_size_number"] = "Die Barcode Schriftgrösse muss eine Zahl sein";
$lang["config_default_barcode_font_size_required"] = "Die Barcode Schriftgrösse ist erforderlich";
$lang["config_default_barcode_height_number"] = "Die Barcode Höhe muss eine Zahl sein";
$lang["config_default_barcode_height_required"] = "Die Barcode Höhe ist erforderlich";
$lang["config_default_barcode_num_in_row_number"] = "Die Barcode Num muss eine Zahl sein";
$lang["config_default_barcode_num_in_row_required"] = "Die Barcode Num ist erforderlich";
$lang["config_default_barcode_page_cellspacing_number"] = "Der Barcode Zellabstand muss eine Zahl sein";
$lang["config_default_barcode_page_cellspacing_required"] = "Der Barcode Zellabstand ist erforderlich";
$lang["config_default_barcode_page_width_number"] = "Die Barcode Seitenbreite muss eine Zahl sein";
$lang["config_default_barcode_page_width_required"] = "Die Barcode Seitenbreite ist erforderlich";
$lang["config_default_barcode_quality_number"] = "Die Barcode Qualität muss eine Zahl sein";
$lang["config_default_barcode_quality_required"] = "Die Barcode Qualität ist erforderlich";
$lang["config_default_barcode_width_number"] = "Die Barcode Breite muss eine Zahl sein";
$lang["config_default_barcode_width_required"] = "Die Barcode Breite ist erforderlich";
$lang["config_default_sales_discount"] = "Standard Verkaufsrabatt";
$lang["config_default_sales_discount_number"] = "Der Standard Verkaufsrabatt muss eine Zahl sein";
$lang["config_default_sales_discount_required"] = "Der Standard Verkaufsrabatt ist erforderlich";
$lang["config_default_tax_rate"] = "MWSt %";
$lang["config_default_tax_rate_1"] = "MWSt 1";
$lang["config_default_tax_rate_2"] = "MWSt 2";
$lang["config_default_tax_rate_number"] = "MWSt Rate";
$lang["config_default_tax_rate_required"] = "MWSt ist erforderlich";
$lang["config_fax"] = "Fax";
$lang["config_general_configuration"] = "Einstellungen";
$lang["config_info"] = "Systemeinstellungen";
$lang["config_invoice_default_comments"] = "Rechnungskommentar";
$lang["config_invoice_email_message"] = "Rechnungsvorlage (Email)";
$lang["config_invoice_printer"] = "Rechnungsdrucker";
$lang["config_jsprintsetup_required"] = "Warnung! Diese Funktion ist nur funktionsfähig";
$lang["config_language"] = "Sprache";
$lang["config_lines_per_page"] = "Zeilen pro Seite";
$lang["config_lines_per_page_number"] = "Zeilen pro Seite muss eine Zahl sein";
$lang["config_lines_per_page_required"] = "Zeilen pro Seite ist erforderlich";
$lang["config_location_configuration"] = "Lagerort";
$lang["config_location_info"] = "Lagerort-Information";
$lang["config_logout"] = "Wollen Sie eine Sicherung machen vor dem Beenden? Klicke [OK] für Sicherung";
$lang["config_number_format"] = "Zahlenformat";
$lang["config_phone"] = "Telefon";
$lang["config_phone_required"] = "Telefon ist erforderlich";
$lang["config_print_bottom_margin"] = "Unterer Rand";
$lang["config_print_bottom_margin_number"] = "Unterer Rand muss eine Zahl sein";
$lang["config_print_bottom_margin_required"] = "Unterer Rand ist erforderlich";
$lang["config_print_footer"] = "Drucke Browser Fusszeile";
$lang["config_print_header"] = "Drucke Browser Kopfzeile";
$lang["config_print_left_margin"] = "Rand links";
$lang["config_print_left_margin_number"] = "Rand links muss eine Zahl sein";
$lang["config_print_left_margin_required"] = "Rand links ist erforderlich";
$lang["config_print_right_margin"] = "Rand rechts";
$lang["config_print_right_margin_number"] = "Rand rechts muss eine Zahl sein";
$lang["config_print_right_margin_required"] = "Rand rechts ist erforderlich";
$lang["config_print_silently"] = "Zeige Druckdialog";
$lang["config_print_top_margin"] = "Rand oben";
$lang["config_print_top_margin_number"] = "Rand oben muss eine Zahl sein";
$lang["config_print_top_margin_required"] = "Rand oben ist erforderlich";
$lang["config_receipt_configuration"] = "Druckereinstellungen";
$lang["config_receipt_info"] = "Quittungsinformation";
$lang["config_receipt_printer"] = "Quittungsdrucker";
$lang["config_receipt_show_taxes"] = "Zeige MWSt";
$lang["config_receiving_calculate_average_price"] = "Berechne Durchschnittseinkaufspreis";
$lang["config_recv_invoice_format"] = "Format Eingangsrechnung";
$lang["config_return_policy_required"] = "Rücknahmepolitik erforderlich";
$lang["config_sales_invoice_format"] = "Format Verkaufsrechnung";
$lang["config_saved_successfully"] = "Einstellungen erfolgreich gesichert";
$lang["config_saved_unsuccessfully"] = "Einstellungen konnten nicht gesichert werden";
$lang["config_show_total_discount"] = "Zeige Gesamtrabatt";
$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";
$lang["config_use_invoice_template"] = "Verwende Rechnungsvorlage";
$lang["config_website"] = "Website";
$lang["config_locale_configuration"] = "Länderkonfiguration";
$lang["config_locale_info"] = "Info Länderkonfiguration";
$lang["config_datetimeformat"] = "Datum und Zeit";

View File

@@ -0,0 +1,19 @@
<?php
$lang["customers_account_number"] = "Konto-Nr.";
$lang["customers_account_number_duplicate"] = "Diese Konto-Nr. existiert bereits";
$lang["customers_basic_information"] = "Kundeninformation";
$lang["customers_cannot_be_deleted"] = "Kunde kann nicht gelöscht werden, ein oder mehrere Kunden weisen Verkäufe auf";
$lang["customers_company_name"] = "Firmenname";
$lang["customers_confirm_delete"] = "Wollen Sie die gewählten Kunden wirklich löschen?";
$lang["customers_customer"] = "Kunde";
$lang["customers_error_adding_updating"] = "Fehler beim Hinzufügen/Ändern";
$lang["customers_new"] = "Neuer Kunde";
$lang["customers_none_selected"] = "Sie haben keinen Kunde zum Löschen gewählt";
$lang["customers_one_or_multiple"] = "Kunde(n)";
$lang["customers_successful_adding"] = "Kunde erfolgreich hinzugefügt";
$lang["customers_successful_deleted"] = "Löschung erfolgreich";
$lang["customers_successful_updating"] = "Änderung erfolgreich";
$lang["customers_taxable"] = "Steuerpflichtig";
$lang["customers_update"] = "Kunde ändern";
$lang["customers_import_items_excel"] = "Importiere Kunden via Excel";

View File

@@ -0,0 +1,28 @@
<?php
$lang["employees_basic_information"] = "Mitarbeiter-Information";
$lang["employees_cannot_be_deleted"] = "Konnte gewählten Mitarbeiter nicht löschen, einer oder mehrere weisen Verkäufe aus.";
$lang["employees_confirm_delete"] = "Wollen Sie diesen Mitarbeiter wirklich löschen?";
$lang["employees_employee"] = "Mitarbeiter";
$lang["employees_error_adding_updating"] = "Fehler beim Hinzufügen/Ändern";
$lang["employees_error_deleting_demo_admin"] = "Sie können den Admin nicht löschen";
$lang["employees_error_updating_demo_admin"] = "Sie können den Admin nicht ändern";
$lang["employees_login_info"] = "Mitarbeiter Login";
$lang["employees_new"] = "Neuer Mitarbeiter";
$lang["employees_none_selected"] = "Sie haben keinen Mitarbeiter zum Löschen gewählt";
$lang["employees_one_or_multiple"] = "Mitarbeiter";
$lang["employees_password"] = "Passwort";
$lang["employees_password_minlength"] = "Passwort muss mindestens 8 Zeichen lang sein";
$lang["employees_password_must_match"] = "Passwörter passen nicht überein";
$lang["employees_password_required"] = "Passwort ist erforderlich";
$lang["employees_permission_desc"] = "Klicken Sie unten, um die jeweiligen Zugangsrechte zu aktivieren";
$lang["employees_permission_info"] = "Mitarbeiter Zugangsrechte";
$lang["employees_repeat_password"] = "Wiederhole Passwort";
$lang["employees_successful_adding"] = "Hinzufügen erfolgreich";
$lang["employees_successful_deleted"] = "Löschung erfolgreich";
$lang["employees_successful_updating"] = "Änderung erfolgreich";
$lang["employees_update"] = "Mitarbeiter ändern";
$lang["employees_username"] = "Benutzername";
$lang["employees_username_minlength"] = "Benutzername muss mindestens 5 Zeichen lang sein";
$lang["employees_username_required"] = "Benutzername ist erforderlich";
$lang["employees_subpermission_required"] = "Fügen Sie mindestens ein Zugangsrecht pro Modul hinzu";

View File

@@ -0,0 +1,4 @@
<?php
$lang["error_no_permission_module"] = "Sie haben nicht die Zugangsrechte für das gewählte Modul";
$lang["error_unknown"] = "Unbekannter Fehler";

View File

@@ -0,0 +1,70 @@
<?php
$lang["giftcards_add_minus"] = "Bestandsänderung";
$lang["giftcards_allow_alt_description"] = "Erlaube Alternative Bezeichnung";
$lang["giftcards_amazon"] = "Amazon";
$lang["giftcards_remaining_balance"] = "Restwert von Gutschein %1 ist %2!";
$lang["giftcards_basic_information"] = "Gutschein Information";
$lang["giftcards_bulk_edit"] = "Sammeländerung";
$lang["giftcards_cannot_be_deleted"] = "Konnte gewählte Gutscheine nicht löschen, einer oder mehrere weisen Verkäufe auf";
$lang["giftcards_cannot_find_giftcard"] = "Konnte keinen Gutschein finden";
$lang["giftcards_card_value"] = "Wert";
$lang["giftcards_category"] = "Kategorie";
$lang["giftcards_change_all_to_allow_alt_desc"] = "Erlaube Alt. Bez. für ALLE";
$lang["giftcards_change_all_to_not_allow_allow_desc"] = "Erlaube Alt. Bez. für KEINEN";
$lang["giftcards_change_all_to_serialized"] = "Ändere alle zu serialisiert";
$lang["giftcards_change_all_to_unserialized"] = "Ändere alle zu NICHT serialisiert";
$lang["giftcards_confirm_bulk_edit"] = "Wollen Sie alle gewählten Gutscheine ändern?";
$lang["giftcards_confirm_delete"] = "Wollen Sie alle gewählten Gutscheine löschen?";
$lang["giftcards_cost_price"] = "Einstandspreis";
$lang["giftcards_count"] = "Bestandsänderung";
$lang["giftcards_current_quantity"] = "Aktuelle Menge";
$lang["giftcards_description"] = "Bezeichnung";
$lang["giftcards_details_count"] = "Bestandsdetails";
$lang["giftcards_do_nothing"] = "Tue nichts";
$lang["giftcards_edit_fields_you_want_to_update"] = "Wollen Sie die Felder für ALLE gewählten Gutscheine ändern?";
$lang["giftcards_edit_multiple_giftcards"] = "Sammeländerung";
$lang["giftcards_error_adding_updating"] = "Fehler beim Hinzufügen/Ändern";
$lang["giftcards_error_updating_multiple"] = "Fehler beim Ändern";
$lang["giftcards_excel_import_failed"] = "Excel Import fehlerhaft";
$lang["giftcards_generate_barcodes"] = "Generiere Barcodes";
$lang["giftcards_giftcard"] = "Gutschein";
$lang["giftcards_giftcard_number"] = "Gutschein-Nr.";
$lang["giftcards_info_provided_by"] = "Info provided by";
$lang["giftcards_inventory_comments"] = "Kommentare";
$lang["giftcards_is_serialized"] = "Gutschein hat Seriennummer";
$lang["giftcards_low_inventory_giftcards"] = "Gutscheine mit Minderbestand";
$lang["giftcards_manually_editing_of_quantity"] = "Manuelle Bestandesänderung";
$lang["giftcards_must_select_giftcard_for_barcode"] = "Sie müssen einen Gutschein wählen, um Barcodes zu generieren";
$lang["giftcards_new"] = "Neuer Gutschein";
$lang["giftcards_no_description_giftcards"] = "Gutscheine ohne Beschreibung";
$lang["giftcards_no_giftcards_to_display"] = "Keine Gutscheine zum Anzeigen";
$lang["giftcards_none"] = "Nichts";
$lang["giftcards_none_selected"] = "Sie haben keine Gutscheine zum Ändern gewählt";
$lang["giftcards_number"] = "Gutschein-Nr. muss eine Zahl sein";
$lang["giftcards_number_information"] = "Gutschein Nummer";
$lang["giftcards_number_required"] = "Gutschein Nummer muss eine Zahl sein";
$lang["giftcards_one_or_multiple"] = "Gutschein(e)";
$lang["giftcards_person_id"] = "Kunde";
$lang["giftcards_quantity"] = "Menge";
$lang["giftcards_quantity_required"] = "Menge ist erforderlich";
$lang["giftcards_reorder_level"] = "Mindestbestand";
$lang["giftcards_retrive_giftcard_info"] = "Gutschein Information";
$lang["giftcards_sales_tax_1"] = "Umsatzsteuer 1";
$lang["giftcards_sales_tax_2"] = "Umsatzsteuer 2";
$lang["giftcards_serialized_giftcards"] = "Serialisierte Gutscheine";
$lang["giftcards_successful_adding"] = "Hinzufügen erfolgreich";
$lang["giftcards_successful_bulk_edit"] = "Sie haben die gewählten Gutscheine erfolgreich geändert";
$lang["giftcards_successful_deleted"] = "Löschung erfolgreich";
$lang["giftcards_successful_updating"] = "Änderung erfolgreich";
$lang["giftcards_supplier"] = "Lieferant";
$lang["giftcards_tax_1"] = "MWSt 1";
$lang["giftcards_tax_2"] = "MWSt 2";
$lang["giftcards_tax_percent"] = "Prozent";
$lang["giftcards_tax_percents"] = "Prozente";
$lang["giftcards_unit_price"] = "Preis";
$lang["giftcards_upc_database"] = "UPC Datenbank";
$lang["giftcards_update"] = "Gutschein ändern";
$lang["giftcards_use_inventory_menu"] = "Verwende Lager Menu";
$lang["giftcards_value"] = "Gutschein-Wert muss eine Zahl sein";
$lang["giftcards_value_required"] = "Gutschein-Wert erforderlich";

View File

@@ -0,0 +1,21 @@
<?php
$lang["item_kits_add_item"] = "Neuer Artikel";
$lang["item_kits_cannot_be_deleted"] = "Konnte Artikel-Set(s) nicht löschen";
$lang["item_kits_confirm_delete"] = "Wollen Sie die gewählten Artikel-Sets wirklich löschen?";
$lang["item_kits_description"] = "Beschreibung Artikel-Set";
$lang["item_kits_error_adding_updating"] = "Fehler beim Hinzufügen/Ändern";
$lang["item_kits_info"] = "Artikel-Set Information";
$lang["item_kits_item"] = "Artikel";
$lang["item_kits_items"] = "Artikel";
$lang["item_kits_kit"] = "Set-ID";
$lang["item_kits_name"] = "Name";
$lang["item_kits_new"] = "Neues Artikel-Set";
$lang["item_kits_no_item_kits_to_display"] = "Keine Artikel-Sets zum Anzeigen";
$lang["item_kits_none_selected"] = "Sie haben keine Artikel-Sets ausgewählt";
$lang["item_kits_one_or_multiple"] = "Artikel-Set(s)";
$lang["item_kits_quantity"] = "Menge";
$lang["item_kits_successful_adding"] = "Artikel-Set erfolgreich hinzugefügt";
$lang["item_kits_successful_deleted"] = "Löschung erfolgreich";
$lang["item_kits_successful_updating"] = "Änderung erfolgreich";
$lang["item_kits_update"] = "Artikel-Set ändern";

View File

@@ -0,0 +1,88 @@
<?php
$lang["items_add_minus"] = "Bestandsänderung";
$lang["items_allow_alt_desciption"] = "Erlaube Alt. Bez.";
$lang["items_allow_alt_description"] = "Erlaube Alt. Bez.";
$lang["items_amazon"] = "Amazon";
$lang["items_basic_information"] = "Artikelinformation";
$lang["items_bulk_edit"] = "Sammeländerung";
$lang["items_buy_price_required"] = "Einkaufspreis ist erforderlich";
$lang["items_cannot_be_deleted"] = "Gewählte Artikel können nicht gelöscht werden, einer odere mehrere weisen Verkäufe auf";
$lang["items_cannot_find_item"] = "Konnte Artikel nicht finden";
$lang["items_category"] = "Kategorie";
$lang["items_category_required"] = "Kategorie ist erforderlich";
$lang["items_change_all_to_allow_alt_desc"] = "Ändere alle zu Erlaube Alt. Bez.";
$lang["items_change_all_to_not_allow_allow_desc"] = "Ändere alle zu NICHT Erlaube Alt. Bez.";
$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";
$lang["items_cost_price_required"] = "Einstandspreis ist erforderlich";
$lang["items_count"] = "Ändere Bestand";
$lang["items_current_quantity"] = "Aktuelle Menge";
$lang["items_description"] = "Bezeichnung";
$lang["items_details_count"] = "Lagerbestandsdetails";
$lang["items_do_nothing"] = "Tue nichts";
$lang["items_edit_fields_you_want_to_update"] = "Ändern Sie die Felder für ALLE gewählten Artikel?";
$lang["items_edit_multiple_items"] = "Sammeländerung";
$lang["items_error_adding_updating"] = "Fehler beim Hinzufügen/Ändern";
$lang["items_error_updating_multiple"] = "Fehler beim Ändern";
$lang["items_excel_import_failed"] = "Excel Import fehlerhaft";
$lang["items_generate_barcodes"] = "Generiere Barcodes";
$lang["items_image"] = "Bild";
$lang["items_info_provided_by"] = "Info provided by";
$lang["items_inventory"] = "Lagerbestand";
$lang["items_inventory_comments"] = "Bemerkungen";
$lang["items_is_deleted"] = "Gelöscht";
$lang["items_is_serialized"] = "Artikel hat Serien-Nr.";
$lang["items_item"] = "Artikel";
$lang["items_item_number"] = "UPC/EAN/ISBN";
$lang["items_item_number_duplicate"] = "Die Artikelnummer existiert bereits in der Datenbank";
$lang["items_location"] = "Ort";
$lang["items_empty_upc_items"] = "Leere UPC Artikel";
$lang["items_low_inventory_items"] = "nicht am Lager";
$lang["items_manually_editing_of_quantity"] = "Manuelle Bestandesänderung";
$lang["items_must_select_item_for_barcode"] = "Sie müssen mindestens einen Artikel wählen, um Barcodes zu generieren";
$lang["items_name"] = "Artikelname";
$lang["items_name_required"] = "Artikelname ist erforderlich";
$lang["items_new"] = "Neuer Artikel";
$lang["items_no_description_items"] = "Artikel ohne Bezeichnung";
$lang["items_no_items_to_display"] = "Keine Artikel zum Anzeigen";
$lang["items_none"] = "Nichts";
$lang["items_none_selected"] = "Sie haben keine Artikel zum Ändern gewählt";
$lang["items_number_information"] = "Artikelnummer";
$lang["items_number_required"] = "UPC/EAN/ISBN ist erforderlich";
$lang["items_one_or_multiple"] = "Artikel";
$lang["items_quantity"] = "Menge";
$lang["items_quantity_number"] = "Menge muss eine Zahl sein";
$lang["items_quantity_required"] = "Menge ist erforderlich";
$lang["items_receiving_quantity"] = "Eingangsmenge";
$lang["items_reorder_level"] = "Mindestbestand";
$lang["items_reorder_level_number"] = "Mindestbestand muss eine Zahl sein";
$lang["items_reorder_level_required"] = "Mindestbestand ist erforderlich";
$lang["items_retrive_item_info"] = "Artikelinformation";
$lang["items_sales_tax_1"] = "Umsatzsteuer 1";
$lang["items_sales_tax_2"] = "Umsatzsteuer 2";
$lang["items_search_custom_items"] = "Suche in Zusatzfeldern";
$lang["items_serialized_items"] = "Serialisierte Artikel";
$lang["items_stock_location"] = "Lagerort";
$lang["items_successful_adding"] = "Artikel erfolgreich hinzugefügt";
$lang["items_successful_bulk_edit"] = "Die gewählten Artikel wurden erforlgreich geändert";
$lang["items_successful_deleted"] = "Löschung erfolgreich";
$lang["items_successful_updating"] = "Änderung erfolgreich";
$lang["items_supplier"] = "Lieferant";
$lang["items_tax_1"] = "MWSt 1";
$lang["items_tax_2"] = "MWSt 2";
$lang["items_tax_percent"] = "MWSt %";
$lang["items_tax_percent_required"] = "MWSt % ist erforderlich";
$lang["items_tax_percents"] = "Steuerprozent(e)";
$lang["items_unit_price"] = "Preis";
$lang["items_unit_price_number"] = "Preis muss eine Zahl sein";
$lang["items_unit_price_required"] = "Preis ist erforderlich";
$lang["items_upc_database"] = "UPC Datenbank";
$lang["items_update"] = "Ändere Artikel";
$lang["items_use_inventory_menu"] = "Verwende Bestandesmenu";
$lang["items_import_items_excel"] = "Importiere Artikel mit Excel Datei";

View File

@@ -0,0 +1,8 @@
<?php
$lang["login_go"] = "Start";
$lang["login_invalid_username_and_password"] = "Ungültiger Benutzername/Passwort";
$lang["login_login"] = "Login";
$lang["login_password"] = "Passwort";
$lang["login_username"] = "Benutzername";
$lang["login_welcome_message"] = "Willkommen bei Open Source Point Of Sales. Zum Starten bitte auf ein Modul klicken";

View File

@@ -0,0 +1,23 @@
<?php
$lang["module_config"] = "Einstellungen";
$lang["module_config_desc"] = "Einstellungen ändern";
$lang["module_customers"] = "Kunden";
$lang["module_customers_desc"] = "Hinzufügen, Ändern, Löschen und Suchen";
$lang["module_employees"] = "Mitarbeiter";
$lang["module_employees_desc"] = "Hinzufügen, Ändern, Löschen und Suchen";
$lang["module_giftcards"] = "Gutscheine";
$lang["module_giftcards_desc"] = "Hinzufügen, Ändern, Löschen und Suchen";
$lang["module_home"] = "Home";
$lang["module_item_kits"] = "Artikel-Sets";
$lang["module_item_kits_desc"] = "Hinzufügen, Ändern, Löschen und Suchen";
$lang["module_items"] = "Artikel";
$lang["module_items_desc"] = "Hinzufügen, Ändern, Löschen und Suchen";
$lang["module_receivings"] = "Eingänge";
$lang["module_receivings_desc"] = "Hinzufügen, Ändern, Löschen und Suchen";
$lang["module_reports"] = "Berichte";
$lang["module_reports_desc"] = "Hinzufügen, Ändern, Löschen und Suchen";
$lang["module_sales"] = "Verkauf";
$lang["module_sales_desc"] = "Hinzufügen, Ändern, Löschen und Suchen";
$lang["module_suppliers"] = "Lieferanten";
$lang["module_suppliers_desc"] = "Hinzufügen, Ändern, Löschen und Suchen";

View File

@@ -0,0 +1,51 @@
<?php
$lang["receivings_transaction_failed"] = "Eingangstransaktion fehlerhaft";
$lang["recvs_basic_information"] = "Eingangsbestellung";
$lang["recvs_cancel_receiving"] = "Abbrechen";
$lang["recvs_cannot_be_deleted"] = "Eingangsbestellung(en) konnten nicht gelöscht werden";
$lang["recvs_comments"] = "Kommentare";
$lang["recvs_complete_receiving"] = "Abschliessen";
$lang["recvs_confirm_cancel_receiving"] = "Wollen Siesen Wareneingang annullieren? Alle Einträge werden gelöscht.";
$lang["recvs_confirm_finish_receiving"] = "Wollen Sie diesen Wareneingang verabeiten? Dieser Schritt kann nicht rückgängig gemacht werden.";
$lang["recvs_cost"] = "Kosten";
$lang["recvs_date"] = "Eingangsdatum";
$lang["recvs_date_required"] = "Ein korrektes Datum ist erforderlich";
$lang["recvs_date_type"] = "Datum ist erforderlich";
$lang["recvs_delete_confirmation"] = "Wollen Sie diesen Eingang wirklich löschen? Rückgängig nicht möglich";
$lang["recvs_delete_entire_sale"] = "Wareneingang löschen";
$lang["recvs_discount"] = "Rabatt %";
$lang["recvs_edit"] = "Ändern";
$lang["recvs_edit_sale"] = "Wareneingang ändern";
$lang["recvs_employee"] = "Mitarbeiter";
$lang["recvs_error_editing_item"] = "Fehler beim Ändern des Artikels";
$lang["recvs_error_requisition"] = "Kann Bestand nicht von oder zum gleichen Lagerort ändern";
$lang["recvs_find_or_scan_item"] = "Finde/Scanne Artikel";
$lang["recvs_find_or_scan_item_or_receipt"] = "Finde/Scanne Artikel oder Quittung";
$lang["recvs_id"] = "Eingangs-Nr.";
$lang["recvs_invoice_enable"] = "Erzeuge Rechnung";
$lang["recvs_invoice_number"] = "Rechnungs-Nr.";
$lang["recvs_invoice_number_duplicate"] = "Bitte geben Sie eine eindeutige Rechnungs-Nr. ein";
$lang["recvs_item_name"] = "Artikelname";
$lang["recvs_mode"] = "Eingangsmodus";
$lang["recvs_new_supplier"] = "Neuer Lieferant";
$lang["recvs_one_or_multiple"] = "Wareneingäng(e)";
$lang["recvs_print_after_sale"] = "Drucke Bon nach Verkauf";
$lang["recvs_quantity"] = "Menge";
$lang["recvs_receipt"] = "Eingangsquittung";
$lang["recvs_receipt_number"] = "Eingangs-Nr.";
$lang["recvs_receiving"] = "Eingang";
$lang["recvs_register"] = "Wareneingang";
$lang["recvs_requisition"] = "Bedarf";
$lang["recvs_return"] = "Retoure";
$lang["recvs_select_supplier"] = "Wählen Sie Lieferanten (optional)";
$lang["recvs_start_typing_supplier_name"] = "Lieferantenname eingeben";
$lang["recvs_stock_destination"] = "Lagerort (Ziel)";
$lang["recvs_stock_locaiton"] = "Lagerort";
$lang["recvs_stock_source"] = "Lagerort (Quelle)";
$lang["recvs_successfully_deleted"] = "Löschung erfolgreich";
$lang["recvs_successfully_updated"] = "Änderung erfolgreich";
$lang["recvs_supplier"] = "Lieferant";
$lang["recvs_total"] = "Total";
$lang["recvs_unable_to_add_item"] = "Kann Artikel nicht zum Eingang hinzufügen";
$lang["recvs_unsuccessfully_updated"] = "Eingang nicht erfolgreich geändert";

View File

@@ -0,0 +1,108 @@
<?php
$lang["reports_all"] = "Alle";
$lang["reports_all_time"] = "Von Beginn weg";
$lang["reports_categories"] = "Kategorien";
$lang["reports_categories_summary_report"] = "Bericht: Kategorien (summarisch)";
$lang["reports_category"] = "Kategorie";
$lang["reports_comments"] = "Kommentare";
$lang["reports_count"] = "Anzahl";
$lang["reports_customer"] = "Kunde";
$lang["reports_customers"] = "Kunden";
$lang["reports_customers_summary_report"] = "Bericht: Kunden (summarisch)";
$lang["reports_date"] = "Datum";
$lang["reports_date_range"] = "Zeitraum";
$lang["reports_description"] = "Bezeichnung";
$lang["reports_detailed_receivings_report"] = "Bericht: Wareneingänge (detailliert)";
$lang["reports_detailed_reports"] = "Berichte (detailliert)";
$lang["reports_detailed_requisition_report"] = "Bericht: Bedarf (detailliert)";
$lang["reports_detailed_sales_report"] = "Bericht: Verkäufe (detailliert)";
$lang["reports_discount"] = "Rabatt";
$lang["reports_discount_percent"] = "Rabatt %";
$lang["reports_discounts"] = "Rabatte";
$lang["reports_discounts_summary_report"] = "Bericht: Rabatte (summarisch)";
$lang["reports_employee"] = "Mitarbeiter";
$lang["reports_employees"] = "Mitarbeiter";
$lang["reports_employees_summary_report"] = "Bericht: Mitarbeiter (summarisch)";
$lang["reports_graphical_reports"] = "Grafische Berichte";
$lang["reports_inventory"] = "Lager";
$lang["reports_inventory_low"] = "Lager mit Unterbestand";
$lang["reports_inventory_low_report"] = "Bericht: Lager mit Unterbestand";
$lang["reports_inventory_reports"] = "Berichte: Lager";
$lang["reports_inventory_summary"] = "Lager (summarisch)";
$lang["reports_inventory_summary_report"] = "Bericht: Lager (summarisch)";
$lang["reports_item"] = "Artikel";
$lang["reports_item_name"] = "Artikelname";
$lang["reports_item_number"] = "Artikelnummer";
$lang["reports_items"] = "Artikel";
$lang["reports_items_purchased"] = "Gekaufte Artikel";
$lang["reports_items_received"] = "Erhaltene Artikel";
$lang["reports_items_summary_report"] = "Bericht: Artikel (summarisch)";
$lang["reports_last_7"] = "Letzte 7 Tage";
$lang["reports_last_month"] = "Letzter Monat";
$lang["reports_last_year"] = "Letztes Jahr";
$lang["reports_low_inventory"] = "Lager mit Unterbestand";
$lang["reports_low_inventory_report"] = "Bericht: Inventar";
$lang["reports_name"] = "Name";
$lang["reports_payment_type"] = "Zahlungsart";
$lang["reports_payments"] = "Zahlungen";
$lang["reports_payments_summary_report"] = "Bericht: Zahlungen (summarisch)";
$lang["reports_profit"] = "Gewinn";
$lang["reports_cost"] = "Kosten";
$lang["reports_quantity_purchased"] = "Menge gekauft";
$lang["reports_received_by"] = "Erhalten von";
$lang["reports_receiving_id"] = "Einangs-ID";
$lang["reports_receiving_type"] = "Eingangstyp";
$lang["reports_receivings"] = "Eingänge";
$lang["reports_reorder_level"] = "Mindestbestand";
$lang["reports_report"] = "Bericht";
$lang["reports_report_input"] = "Berichtsdefinition";
$lang["reports_reports"] = "Berichte";
$lang["reports_requisition"] = "Bedarf";
$lang["reports_requisition_by"] = "Bedarf durch";
$lang["reports_requisition_id"] = "Bedarfs-ID";
$lang["reports_requisition_item"] = "Artikel";
$lang["reports_requisition_item_quantity"] = "Menge";
$lang["reports_requisition_related_item"] = "Artikelverweis";
$lang["reports_requisition_related_item_total_quantity"] = "Gesamtmenge Bedarf";
$lang["reports_requisition_related_item_unit_quantity"] = "Bedarfsmenge";
$lang["reports_requisitions"] = "Bedarf";
$lang["reports_returns"] = "Retoure";
$lang["reports_revenue"] = "Einkommen";
$lang["reports_sale_id"] = "Verkaufs-ID";
$lang["reports_sale_type"] = "Verkaufs-Typ";
$lang["reports_sales"] = "Verkäufe";
$lang["reports_sales_amount"] = "Umsatz";
$lang["reports_sales_summary_report"] = "Bericht: Umsatz (summarisch)";
$lang["reports_serial_number"] = "Seriennummer";
$lang["reports_sold_by"] = "Verkauft durch";
$lang["reports_sold_to"] = "Verkauft an";
$lang["reports_stock_location"] = "Lagerort";
$lang["reports_subtotal"] = "Zwischensumme";
$lang["reports_summary_reports"] = "Berichte (summarisch)";
$lang["reports_supplied_by"] = "Geliefert von";
$lang["reports_supplier"] = "Lieferant";
$lang["reports_suppliers"] = "Lieferanten";
$lang["reports_suppliers_summary_report"] = "Bericht: Lieferanten (summarisch)";
$lang["reports_tax"] = "MWSt";
$lang["reports_tax_percent"] = "MWSt %";
$lang["reports_taxes"] = "Steuern";
$lang["reports_taxes_summary_report"] = "Bericht: Steuern (summarisch)";
$lang["reports_this_month"] = "Dieser Monat";
$lang["reports_this_month_last_year"] = "Dieser Monat letzten Jahres";
$lang["reports_this_month_to_today"] = "Dieser Monat bis heute";
$lang["reports_this_month_to_today_last_year"] = "Dieser Monat bis Heute letzten Jahres";
$lang["reports_this_year"] = "Dieses Jahr";
$lang["reports_today"] = "Heute";
$lang["reports_today_last_year"] = "Heute letzten Jahres";
$lang["reports_total"] = "Total";
$lang["reports_type"] = "Typ";
$lang["reports_welcome_message"] = "Willkommen bei Berichtsmodul";
$lang["reports_yesterday"] = "Gestern";
$lang["reports_item_count"] = "Filter nach Artikelzahl";
$lang["reports_cost_price"] = "Einstandspreis";
$lang["reports_unit_price"] = "Verkaufspreis";
$lang["reports_sub_total_value"] = "Zwischentotal";
$lang["reports_total_inventory_value"] = "Total Inventarwert";
$lang["reports_zero_and_less"] = "Null und weniger";
$lang["reports_more_than_zero"] = "Mehr als Null";

View File

@@ -0,0 +1,117 @@
<?php
$lang["sales_add_payment"] = "Zahlung";
$lang["sales_amount_due"] = "fälliger Betrag";
$lang["sales_amount_tendered"] = "Erhalten";
$lang["sales_basic_information"] = "Quittung";
$lang["sales_cancel_sale"] = "Annullieren";
$lang["sales_cash"] = "Bar";
$lang["sales_change_due"] = "Wechselgeld";
$lang["sales_check"] = "Scheck";
$lang["sales_check_balance"] = "Scheck-Differenz";
$lang["sales_comment"] = "Bemerkung";
$lang["sales_comments"] = "Bemerkungen";
$lang["sales_complete_sale"] = "Abschliessen";
$lang["sales_confirm_cancel_sale"] = "Wollen Sie diesen Verkauf abschliessen? Alle Artikeleinträge werden entfernt";
$lang["sales_confirm_delete"] = "Wollen Sie die gewählten Aufträge löschen?";
$lang["sales_confirm_finish_sale"] = "Wollen Sie diesen Auftrag verarbeiten? Rückgängig unmöglich";
$lang["sales_confirm_suspend_sale"] = "Wollen Sie diesen Auftrag pendent halten?";
$lang["sales_credit"] = "Kreditkarte";
$lang["sales_customer"] = "Kunde";
$lang["sales_date"] = "Datum";
$lang["sales_date_required"] = "Ein korrektas Datum ist erforderlich";
$lang["sales_date_type"] = "Datum ist erforderlich";
$lang["sales_debit"] = "Debitkarte";
$lang["sales_delete_confirmation"] = "Wollen Sie diesen Auftrag löschen? Rückgängig unmöglich";
$lang["sales_delete_entire_sale"] = "Auftrag löschen";
$lang["sales_delete_successful"] = "Löschung erfolgreich";
$lang["sales_delete_unsuccessful"] = "Löschung nicht erfolgreich";
$lang["sales_description_abbrv"] = "Bez.";
$lang["sales_discount"] = "%";
$lang["sales_discount_included"] = "Rabatt %";
$lang["sales_discount"] = "Rabatt";
$lang["sales_discount_short"] = "%";
$lang["sales_edit"] = "Ändern";
$lang["sales_edit_item"] = "Ändere Art.";
$lang["sales_edit_sale"] = "Auftrag ändern";
$lang["sales_email_receipt"] = "Quittung per E-Mail";
$lang["sales_employee"] = "Mitarbeiter";
$lang["sales_error_editing_item"] = "Fehler beim Ändern des Artikels";
$lang["sales_find_or_scan_item"] = "Finde/Scanne Artikel";
$lang["sales_find_or_scan_item_or_receipt"] = "Finde/Scanne Artikel oder Quittung";
$lang["sales_giftcard"] = "Gutschein";
$lang["sales_giftcard_balance"] = "Gutschein Restwert";
$lang["sales_giftcard_number"] = "Gutschein Nr.";
$lang["sales_id"] = "ID";
$lang["sales_invoice"] = "Rechnung";
$lang["sales_invoice_confirm"] = "Diese rechnung wird gesendet an";
$lang["sales_invoice_enable"] = "Erzeuge Rechnung";
$lang["sales_invoice_filter"] = "Rechnungen";
$lang["sales_cash_filter"] = "Bar";
$lang["sales_invoice_no_email"] = "Dieser Kunde hat keine gültige Email Adresse";
$lang["sales_invoice_number"] = "Rechnungs-Nr.";
$lang["sales_invoice_number_duplicate"] = "Bitte geben Sie eine eindeutige Rechnungsnummer ein";
$lang["sales_invoice_sent"] = "Rechnung gesendet an";
$lang["sales_invoice_unsent"] = "Rechnung nicht gesendet";
$lang["sales_invoice_update"] = "Aktualisieren";
$lang["sales_item_insufficient_of_stock"] = "Artikel hat Unterbestand";
$lang["sales_item_name"] = "Artikelname";
$lang["sales_item_number"] = "Artikel-Nr.";
$lang["sales_item_out_of_stock"] = "Artikel ist nicht am Lager";
$lang["sales_mode"] = "Verkaufstyp";
$lang["sales_must_enter_numeric"] = "Eingabe muss eine Zahl sein";
$lang["sales_must_enter_numeric_giftcard"] = "Gutschein-Nr. muss eine Zahl sein";
$lang["sales_new_customer"] = "Neuer Kunde";
$lang["sales_new_item"] = "Neuer Artikel";
$lang["sales_no_description"] = "nichts";
$lang["sales_no_filter"] = "Alle";
$lang["sales_no_items_in_cart"] = "Warenkorb ist leer";
$lang["sales_no_sales_to_display"] = "Keine Artikel zum Anzeigen";
$lang["sales_one_or_multiple"] = "Verkäufe";
$lang["sales_takings"] = "Einnahmen";
$lang["sales_payment"] = "Zahlungsart";
$lang["sales_payment_amount"] = "Betrag";
$lang["sales_payment_not_cover_total"] = "Betrag deckt Rechnungsbetrag nicht";
$lang["sales_payment_type"] = "Typ";
$lang["sales_payments_total"] = "Zahlung Total";
$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";
$lang["sales_remove_customer"] = "Entferne Kunde";
$lang["sales_return"] = "Retoure";
$lang["sales_sale"] = "Verkauf";
$lang["sales_sale_for_customer"] = "Kunde:";
$lang["sales_sale_time"] = "Zeit";
$lang["sales_select_customer"] = "Wähle Kunde (optional)";
$lang["sales_send_invoice"] = "Sende Rechnung";
$lang["sales_serial"] = "Seriennummer";
$lang["sales_show_invoice"] = "Rechnung";
$lang["sales_show_receipt"] = "Quittung";
$lang["sales_start_typing_customer_name"] = "Geben Sie den Kundennamen ein...";
$lang["sales_start_typing_item_name"] = "Geben Sie den Artikel ein oder scannen Sie ihn...";
$lang["sales_stock_location"] = "Lagerort";
$lang["sales_sub_total"] = "Zwischentotal";
$lang["sales_successfully_deleted"] = "Löschung erfolgreich";
$lang["sales_successfully_suspended_sale"] = "Auftrag wurde erfolgreich pendent gehalten";
$lang["sales_successfully_updated"] = "Änderung erfolgreich";
$lang["sales_suspend_sale"] = "->Pendent";
$lang["sales_suspended_sale_id"] = "ID";
$lang["sales_suspended_sales"] = "Pendente Aufträge";
$lang["sales_tax"] = "MWSt";
$lang["sales_tax_percent"] = "MWSt %";
$lang["sales_total"] = "Total";
$lang["sales_total_tax_exclusive"] = "Total exkl. MWSt.";
$lang["sales_transaction_failed"] = "Verarbeitung fehlerhaft";
$lang["sales_unable_to_add_item"] = "Kann Artikel nicht zum Auftrag hinzufügen";
$lang["sales_unsuccessfully_deleted"] = "Löschung nicht erfolgreich";
$lang["sales_unsuccessfully_updated"] = "Änderung nicht erfolgreich";
$lang["sales_unsuspend"] = "Aktivieren";
$lang["sales_unsuspend_and_delete"] = "Aktivieren und löschen";
$lang["sales_update"] = "Ändere Auftrag";
$lang["sales_date_range"] = "Zeitrahmen";
$lang["sales_none_selected"] = "Sie haben keinen Auftrag zum Löschen ausgewählt";

View File

@@ -0,0 +1,19 @@
<?php
$lang["suppliers_account_number"] = "Konto-Nr.";
$lang["suppliers_basic_information"] = "Lieferanten-Information";
$lang["suppliers_cannot_be_deleted"] = "Kann gewählte Lieferanten nicht löschen, einer oder mehrere weisen Verkäufe aus.";
$lang["suppliers_company_name"] = "Firmenname";
$lang["suppliers_company_name_required"] = "Firmenname ist erforderlich";
$lang["suppliers_agency_name"] = "Name der Agentur";
$lang["suppliers_confirm_delete"] = "Wollen Sie die gewählten Lieferanten löschen?";
$lang["suppliers_error_adding_updating"] = "Fehler beim Hinzufügen/Ändern";
$lang["suppliers_new"] = "Neuer Lieferant";
$lang["suppliers_none_selected"] = "Sie haben keinen Lieferanten zum Löschen ausgewählt";
$lang["suppliers_one_or_multiple"] = "Lieferanten";
$lang["suppliers_successful_adding"] = "Erfolgreich hinzugefügt";
$lang["suppliers_successful_deleted"] = "Löschung erfolgreich";
$lang["suppliers_successful_updating"] = "Änderung erfolgreich";
$lang["suppliers_supplier"] = "Lieferant";
$lang["suppliers_supplier_id"] = "ID";
$lang["suppliers_update"] = "Ändere Lieferant";

View File

@@ -9,6 +9,7 @@ $lang["common_confirm_search"] = "You have selected one or more rows, these will
$lang["common_country"] = "Country";
$lang["common_date"] = "Date";
$lang["common_delete"] = "Delete";
$lang["common_print"] = "Print";
$lang["common_det"] = "details";
$lang["common_edit"] = "edit";
$lang["common_email"] = "E-Mail";
@@ -24,7 +25,7 @@ $lang["common_inv"] = "inv";
$lang["common_last_name"] = "Last Name";
$lang["common_last_name_required"] = "The last name is a required field";
$lang["common_last_page"] = "Last";
$lang["common_learn_about_project"] = "to learn the lastest information about the project";
$lang["common_learn_about_project"] = "to learn the latest information about the project";
$lang["common_list_of"] = "List of";
$lang["common_logout"] = "Logout";
$lang["common_new"] = "New";

View File

@@ -24,6 +24,7 @@ $lang["config_barcode_second_row"] = "Row 2";
$lang["config_barcode_third_row"] = "Row 3";
$lang["config_barcode_type"] = "Barcode Type";
$lang["config_barcode_width"] = "Width (px)";
$lang["config_barcode_generate_if_empty"] = "Generate if empty";
$lang["config_company"] = "Company Name";
$lang["config_company_logo"] = "Company Logo";
$lang["config_company_required"] = "Company name is a required field";
@@ -110,8 +111,12 @@ $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";
$lang["config_use_invoice_template"] = "Use invoice template";
$lang["config_website"] = "Website";
$lang["config_locale_configuration"] = "Localisation Configuration";
$lang["config_locale_info"] = "Localisation Configuration Information";
$lang["config_datetimeformat"] = "Date and Time format";

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

@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "Error adding/updating Item Kit";
$lang["item_kits_info"] = "Item Kit Info";
$lang["item_kits_item"] = "Item";
$lang["item_kits_items"] = "Items";
$lang["item_kits_kit"] = "Kit Id";
$lang["item_kits_name"] = "Item Kit Name";
$lang["item_kits_new"] = "New Item Kit";
$lang["item_kits_no_item_kits_to_display"] = "No item kits to display";

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";
@@ -41,6 +42,7 @@ $lang["items_item"] = "Item";
$lang["items_item_number"] = "UPC/EAN/ISBN";
$lang["items_item_number_duplicate"] = "The item number is already present in the database";
$lang["items_location"] = "Location";
$lang["items_empty_upc_items"] = "Empty UPC Items";
$lang["items_low_inventory_items"] = "Out Of Stock Items";
$lang["items_manually_editing_of_quantity"] = "Manual Edit of Quantity";
$lang["items_must_select_item_for_barcode"] = "You must select at least 1 item to generate barcodes";

View File

@@ -1,7 +1,7 @@
<?php
$lang["module_config"] = "Store Config";
$lang["module_config_desc"] = "Change the store\'s configuration";
$lang["module_config_desc"] = "Change the store's configuration";
$lang["module_customers"] = "Customers";
$lang["module_customers_desc"] = "Add, Update, Delete, and Search customers";
$lang["module_employees"] = "Employees";

View File

@@ -48,6 +48,7 @@ $lang["reports_payment_type"] = "Payment Type";
$lang["reports_payments"] = "Payments";
$lang["reports_payments_summary_report"] = "Payments Summary Report";
$lang["reports_profit"] = "Profit";
$lang["reports_cost"] = "Cost";
$lang["reports_quantity_purchased"] = "Quantity Purchased";
$lang["reports_received_by"] = "Received By";
$lang["reports_receiving_id"] = "Receiving ID";
@@ -76,7 +77,7 @@ $lang["reports_sales_summary_report"] = "Sales Summary Report";
$lang["reports_serial_number"] = "Serial #";
$lang["reports_sold_by"] = "Sold By";
$lang["reports_sold_to"] = "Sold To";
$lang["reports_stock_location"] = "Stock location";
$lang["reports_stock_location"] = "Stock Location";
$lang["reports_subtotal"] = "Subtotal";
$lang["reports_summary_reports"] = "Summary Reports";
$lang["reports_supplied_by"] = "Supplied by";
@@ -88,9 +89,20 @@ $lang["reports_tax_percent"] = "Tax Percent";
$lang["reports_taxes"] = "Taxes";
$lang["reports_taxes_summary_report"] = "Taxes Summary Report";
$lang["reports_this_month"] = "This Month";
$lang["reports_this_month_last_year"] = "This Month Last Year";
$lang["reports_this_month_to_today"] = "This Month To Today";
$lang["reports_this_month_to_today_last_year"] = "This Month To Today Last Year";
$lang["reports_this_year"] = "This Year";
$lang["reports_today"] = "Today";
$lang["reports_today_last_year"] = "Today Last Year";
$lang["reports_total"] = "Total";
$lang["reports_type"] = "Type";
$lang["reports_welcome_message"] = "Welcome to the reports panel. Please select a report to view.";
$lang["reports_yesterday"] = "Yesterday";
$lang["reports_item_count"] = "Filter Item Count";
$lang["reports_cost_price"] = "Cost Price";
$lang["reports_unit_price"] = "Retail Price";
$lang["reports_sub_total_value"] = "Sub Total";
$lang["reports_total_inventory_value"] = "Total Inventory Value";
$lang["reports_zero_and_less"] = "Zero and less";
$lang["reports_more_than_zero"] = "More than zero";

View File

@@ -47,6 +47,7 @@ $lang["sales_invoice"] = "Invoice";
$lang["sales_invoice_confirm"] = "This invoice will be sent to";
$lang["sales_invoice_enable"] = "Create Invoice";
$lang["sales_invoice_filter"] = "Invoices";
$lang["sales_cash_filter"] = "Cash";
$lang["sales_invoice_no_email"] = "This customer does not have a valid email address";
$lang["sales_invoice_number"] = "Invoice #";
$lang["sales_invoice_number_duplicate"] = "Please enter an unique invoice number";
@@ -67,7 +68,7 @@ $lang["sales_no_filter"] = "All";
$lang["sales_no_items_in_cart"] = "There are no items in the cart";
$lang["sales_no_sales_to_display"] = "No sales to display";
$lang["sales_one_or_multiple"] = "sale(s)";
$lang["sales_overview"] = "Overview";
$lang["sales_takings"] = "Takings";
$lang["sales_payment"] = "Payment Type";
$lang["sales_payment_amount"] = "Amount";
$lang["sales_payment_not_cover_total"] = "Payment Amount does not cover Total";
@@ -77,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";
@@ -111,3 +113,5 @@ $lang["sales_unsuccessfully_updated"] = "Sale unsuccessfully updated";
$lang["sales_unsuspend"] = "Unsuspend";
$lang["sales_unsuspend_and_delete"] = "";
$lang["sales_update"] = "Edit Sale";
$lang["sales_date_range"] = "Date Range";
$lang["sales_none_selected"] = "You have not selected any sales to delete";

View File

@@ -5,6 +5,7 @@ $lang["suppliers_basic_information"] = "Supplier Information";
$lang["suppliers_cannot_be_deleted"] = "Could not deleted selected suppliers, one or more of the selected suppliers has sales.";
$lang["suppliers_company_name"] = "Company Name";
$lang["suppliers_company_name_required"] = "Company Name is a required field";
$lang["suppliers_agency_name"] = "Agency Name";
$lang["suppliers_confirm_delete"] = "Are you sure you want to delete the selected suppliers?";
$lang["suppliers_error_adding_updating"] = "Error adding/updating supplier";
$lang["suppliers_new"] = "New Supplier";
@@ -14,4 +15,5 @@ $lang["suppliers_successful_adding"] = "You have successfully added supplier";
$lang["suppliers_successful_deleted"] = "You have successfully deleted";
$lang["suppliers_successful_updating"] = "You have successfully updated supplier";
$lang["suppliers_supplier"] = "Supplier";
$lang["suppliers_supplier_id"] = "Id";
$lang["suppliers_update"] = "Update Supplier";

View File

@@ -9,6 +9,7 @@ $lang["common_confirm_search"] = "Has seleccionado una o más filas. Éstas no e
$lang["common_country"] = "País";
$lang["common_date"] = "Date";
$lang["common_delete"] = "Borrar";
$lang["common_print"] = "Print";
$lang["common_det"] = "detalles";
$lang["common_edit"] = "editar";
$lang["common_email"] = "E-Mail";
@@ -23,7 +24,7 @@ $lang["common_gender_male"] = "M";
$lang["common_inv"] = "inv";
$lang["common_last_name"] = "Apellidos";
$lang["common_last_name_required"] = "Apellidos es un campo requerido";
$lang["common_last_page"] = "Última";
$lang["common_last_page"] = "<EFBFBD>ltima";
$lang["common_learn_about_project"] = "para leer la información más reciente acerca del proyecto";
$lang["common_list_of"] = "Lista de";
$lang["common_logout"] = "Salir";

View File

@@ -24,6 +24,7 @@ $lang["config_barcode_second_row"] = "Fila 1";
$lang["config_barcode_third_row"] = "Fila 2";
$lang["config_barcode_type"] = "Tipo de Código de Barra";
$lang["config_barcode_width"] = "Ancho (px)";
$lang["config_barcode_generate_if_empty"] = "Generate if empty";
$lang["config_company"] = "Nombre del Comercio";
$lang["config_company_logo"] = "Logotipo del Comercio";
$lang["config_company_required"] = "Nombre del Comercio es requerido";
@@ -110,8 +111,12 @@ $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";
$lang["config_use_invoice_template"] = "Use plantilla de factura";
$lang["config_website"] = "Sitio Web";
$lang["config_locale_configuration"] = "Localisation Configuration";
$lang["config_locale_info"] = "Localisation Configuration Information";
$lang["config_datetimeformat"] = "Date and Time format";

View File

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

View File

@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "Error agregando/actualizando el Kit
$lang["item_kits_info"] = "Info de Kit de Artículos";
$lang["item_kits_item"] = "Artículo";
$lang["item_kits_items"] = "Artículos";
$lang["item_kits_kit"] = "Kit Id";
$lang["item_kits_name"] = "Nombre del Kit de Artículos";
$lang["item_kits_new"] = "Nuevo Kit de Artículos";
$lang["item_kits_no_item_kits_to_display"] = "No hay kits de artículos para mostrar";

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";
@@ -41,6 +42,7 @@ $lang["items_item"] = "Artículo";
$lang["items_item_number"] = "UPC/EAN/ISBN";
$lang["items_item_number_duplicate"] = "El número de artículo ya esta presente en la base de datos";
$lang["items_location"] = "Ubicación";
$lang["items_empty_upc_items"] = "Empty UPC Items";
$lang["items_low_inventory_items"] = "Artículos de Inventario Escaso";
$lang["items_manually_editing_of_quantity"] = "Edición Manual de Cantidad";
$lang["items_must_select_item_for_barcode"] = "Debes seleccionar al menos 1 artículo para generar códigos de barras";

View File

@@ -48,6 +48,7 @@ $lang["reports_payment_type"] = "Tipo de Pago";
$lang["reports_payments"] = "Pagos";
$lang["reports_payments_summary_report"] = "Reporte de Resumen de Pagos";
$lang["reports_profit"] = "Ganancia";
$lang["reports_cost"] = "Cost";
$lang["reports_quantity_purchased"] = "Cantidad Comprada";
$lang["reports_received_by"] = "Recibido por";
$lang["reports_receiving_id"] = "ID de Recepción";
@@ -88,9 +89,20 @@ $lang["reports_tax_percent"] = "Porcentaje de Impuestos";
$lang["reports_taxes"] = "Impuestos";
$lang["reports_taxes_summary_report"] = "Reporte de Resumen de Impuestos";
$lang["reports_this_month"] = "Este Mes";
$lang["reports_this_month_last_year"] = "This Month Last Year";
$lang["reports_this_month_to_today"] = "This Month To Today";
$lang["reports_this_month_to_today_last_year"] = "This Month To Today Last Year";
$lang["reports_this_year"] = "Este Año";
$lang["reports_today"] = "Hoy";
$lang["reports_today_last_year"] = "Today Last Year";
$lang["reports_total"] = "Total";
$lang["reports_type"] = "Tipo";
$lang["reports_welcome_message"] = "Bienvenido(a) al panel de reportes. Selecciona un reporte para verlo.";
$lang["reports_yesterday"] = "Ayer";
$lang["reports_item_count"] = "Filter Item Count";
$lang["reports_cost_price"] = "Precio de Compra";
$lang["reports_unit_price"] = "Precio de Venta";
$lang["reports_sub_total_value"] = "Subtotal";
$lang["reports_total_inventory_value"] = "Total Inventory Value";
$lang["reports_zero_and_less"] = "Zero and less";
$lang["reports_more_than_zero"] = "More than zero";

View File

@@ -47,6 +47,7 @@ $lang["sales_invoice"] = "tarjeta de Crédito";
$lang["sales_invoice_confirm"] = "Esta factura sera enviada a";
$lang["sales_invoice_enable"] = "Crear factura";
$lang["sales_invoice_filter"] = "Facturas";
$lang["sales_cash_filter"] = "Efectivo";
$lang["sales_invoice_no_email"] = "Este cliente no tiene un email válido";
$lang["sales_invoice_number"] = "Factura #";
$lang["sales_invoice_number_duplicate"] = "Por favor ingrese un número de factura único";
@@ -67,7 +68,7 @@ $lang["sales_no_filter"] = "Todos";
$lang["sales_no_items_in_cart"] = "No hay artículos en el carrito";
$lang["sales_no_sales_to_display"] = "No hay ventas que mostrar";
$lang["sales_one_or_multiple"] = "venta(s)";
$lang["sales_overview"] = "Resumen";
$lang["sales_takings"] = "Resumen";
$lang["sales_payment"] = "Tipo de Pago";
$lang["sales_payment_amount"] = "Cantidad";
$lang["sales_payment_not_cover_total"] = "La Cantidad Recibida no cubre el pago total";
@@ -77,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";
@@ -111,3 +113,5 @@ $lang["sales_unsuccessfully_updated"] = "Ha fallado la actualización de la vent
$lang["sales_unsuspend"] = "Retomar";
$lang["sales_unsuspend_and_delete"] = "Retomar y Borrar";
$lang["sales_update"] = "Editar Venta";
$lang["sales_date_range"] = "Rango de Fecha";
$lang["sales_none_selected"] = "No has seleccionado venta para editar";

View File

@@ -5,6 +5,7 @@ $lang["suppliers_basic_information"] = "Información de Proveedores";
$lang["suppliers_cannot_be_deleted"] = "No se pudo borrar los proveedores seleccionados. Uno o más de los seleccionados tiene ventas.";
$lang["suppliers_company_name"] = "Nombre de la Compañía";
$lang["suppliers_company_name_required"] = "Nombre de la Compañía es requerido";
$lang["suppliers_agency_name"] = "Nombre de la Agency";
$lang["suppliers_confirm_delete"] = "¿Seguro(a) de querer borrar los proveedores seleccionados?";
$lang["suppliers_error_adding_updating"] = "Error agregando/actualizando proveedor";
$lang["suppliers_new"] = "Nuevo Proveedor";
@@ -14,4 +15,5 @@ $lang["suppliers_successful_adding"] = "Has agregado el proveedor satisfactoriam
$lang["suppliers_successful_deleted"] = "Has borrado satisfactoriamente a";
$lang["suppliers_successful_updating"] = "Has actualizado el proveedor satisfactoriamente";
$lang["suppliers_supplier"] = "Proveedor";
$lang["suppliers_supplier_id"] = "Id";
$lang["suppliers_update"] = "Actualizar Proveedor";

View File

@@ -9,6 +9,7 @@ $lang["common_confirm_search"] = "Vous avez sélectionné une ou plusieurs ligne
$lang["common_country"] = "Pays";
$lang["common_date"] = "Date";
$lang["common_delete"] = "Effacer";
$lang["common_print"] = "Imprimer";
$lang["common_det"] = "détails";
$lang["common_edit"] = "éditer";
$lang["common_email"] = "E-Mail";

View File

@@ -24,6 +24,7 @@ $lang["config_barcode_second_row"] = "Row 3";
$lang["config_barcode_third_row"] = "Row 4";
$lang["config_barcode_type"] = "Barcode Type";
$lang["config_barcode_width"] = "Width (px)";
$lang["config_barcode_generate_if_empty"] = "Generate if empty";
$lang["config_company"] = "Nome de l\'Entreprise";
$lang["config_company_logo"] = "Company Logo";
$lang["config_company_required"] = "Le nom d\'entreprise est requis";
@@ -110,8 +111,12 @@ $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";
$lang["config_use_invoice_template"] = "Use invoice template";
$lang["config_website"] = "Site-web";
$lang["config_locale_configuration"] = "Localisation Configuration";
$lang["config_locale_info"] = "Localisation Configuration Information";
$lang["config_datetimeformat"] = "Date and Time format";

View File

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

View File

@@ -8,6 +8,7 @@ $lang["item_kits_error_adding_updating"] = "Érreur d\'ajout/édition de Kit";
$lang["item_kits_info"] = "Détails du Kit";
$lang["item_kits_item"] = "Item";
$lang["item_kits_items"] = "Items";
$lang["item_kits_kit"] = "Kit Id";
$lang["item_kits_name"] = "Nom du Kit";
$lang["item_kits_new"] = "Nouveau Kit";
$lang["item_kits_no_item_kits_to_display"] = "Aucun kit à afficher";

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";
@@ -41,6 +42,7 @@ $lang["items_item"] = "Item";
$lang["items_item_number"] = "UPC/EAN/ISBN";
$lang["items_item_number_duplicate"] = "The item number is already present in the database";
$lang["items_location"] = "Location";
$lang["items_empty_upc_items"] = "Empty UPC Items";
$lang["items_low_inventory_items"] = "Items à Stock Faible";
$lang["items_manually_editing_of_quantity"] = "Édition Manuelle de Quantité";
$lang["items_must_select_item_for_barcode"] = "Vous devez sélectionner au moins un item";

View File

@@ -48,6 +48,7 @@ $lang["reports_payment_type"] = "Type Paiement";
$lang["reports_payments"] = "Paiements";
$lang["reports_payments_summary_report"] = "Rapport: Résumé des Paiements";
$lang["reports_profit"] = "Bénéfice";
$lang["reports_cost"] = "Cost";
$lang["reports_quantity_purchased"] = "Quantité Achetée";
$lang["reports_received_by"] = "Recu par";
$lang["reports_receiving_id"] = "";
@@ -88,9 +89,20 @@ $lang["reports_tax_percent"] = "Pourcentage d\'imposition";
$lang["reports_taxes"] = "Taxes";
$lang["reports_taxes_summary_report"] = "Rapport: Résumé Taxes";
$lang["reports_this_month"] = "Ce mois";
$lang["reports_this_month_last_year"] = "This Month Last Year";
$lang["reports_this_month_to_today"] = "This Month To Today";
$lang["reports_this_month_to_today_last_year"] = "This Month To Today Last Year";
$lang["reports_this_year"] = "Cette Année";
$lang["reports_today"] = "Aujourd\'hui";
$lang["reports_today_last_year"] = "Today Last Year";
$lang["reports_total"] = "Total";
$lang["reports_type"] = "Type";
$lang["reports_welcome_message"] = "Bienvenue à la page des rapports. Veuillez sélectionner un rapport à visualiser.";
$lang["reports_yesterday"] = "Hier";
$lang["reports_item_count"] = "Filter Item Count";
$lang["reports_cost_price"] = "Prix de Gros";
$lang["reports_unit_price"] = "Prix au Détail";
$lang["reports_sub_total_value"] = "Sous-Total";
$lang["reports_total_inventory_value"] = "Total Inventory Value";
$lang["reports_zero_and_less"] = "Zero and less";
$lang["reports_more_than_zero"] = "More than zero";

View File

@@ -47,6 +47,7 @@ $lang["sales_invoice"] = "Invoice";
$lang["sales_invoice_confirm"] = "This invoice will be sent to";
$lang["sales_invoice_enable"] = "Create Invoice";
$lang["sales_invoice_filter"] = "Invoices";
$lang["sales_cash_filter"] = "Cash";
$lang["sales_invoice_no_email"] = "This customer does not have a valid email address";
$lang["sales_invoice_number"] = "Invoice #";
$lang["sales_invoice_number_duplicate"] = "Please enter an unique invoice number";
@@ -67,7 +68,7 @@ $lang["sales_no_filter"] = "All";
$lang["sales_no_items_in_cart"] = "Il n\'y a rien dans votre panier";
$lang["sales_no_sales_to_display"] = "No sales to display";
$lang["sales_one_or_multiple"] = "";
$lang["sales_overview"] = "Overview";
$lang["sales_takings"] = "Takings";
$lang["sales_payment"] = "Type Paiement";
$lang["sales_payment_amount"] = "Somme";
$lang["sales_payment_not_cover_total"] = "Le Paiement ne couvre pas le Total";
@@ -77,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";
@@ -111,3 +113,5 @@ $lang["sales_unsuccessfully_updated"] = "Échec d\'édition";
$lang["sales_unsuspend"] = "Débloquer";
$lang["sales_unsuspend_and_delete"] = "";
$lang["sales_update"] = "Edit Sale";
$lang["sales_date_range"] = "Plage de dates";
$lang["sales_none_selected"] = "Vous n\\\'avez sélectionné aucun élément";

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