mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-26 01:05:07 -04:00
Compare commits
351 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54455213a8 | ||
|
|
dda468291a | ||
|
|
bef7a2da25 | ||
|
|
953307cbc7 | ||
|
|
4d04cdd65f | ||
|
|
51b776354a | ||
|
|
d51d1b458a | ||
|
|
faac1d6a10 | ||
|
|
6ffec444d6 | ||
|
|
4f3a845702 | ||
|
|
a3af051d43 | ||
|
|
79a4414a13 | ||
|
|
98ad6f3db0 | ||
|
|
258c95f02e | ||
|
|
e6472d525d | ||
|
|
07e372a787 | ||
|
|
b9c088314b | ||
|
|
611237ec86 | ||
|
|
b5e07c9245 | ||
|
|
c6c6a1b4cf | ||
|
|
8cdb30fd25 | ||
|
|
91041bd7a9 | ||
|
|
bc53f544f4 | ||
|
|
d29176158b | ||
|
|
8fc24219fb | ||
|
|
09dd7eca58 | ||
|
|
7937e880c0 | ||
|
|
c52b5b5118 | ||
|
|
e47e80c69c | ||
|
|
6208569c7e | ||
|
|
4ad0d62f42 | ||
|
|
0bd5bbec77 | ||
|
|
d510ab031d | ||
|
|
9c39f62b1e | ||
|
|
bf2c6bfa1f | ||
|
|
5588c1e22e | ||
|
|
525fb7dcf9 | ||
|
|
e182c9d9f6 | ||
|
|
76639f6da1 | ||
|
|
d7df291b9a | ||
|
|
1a1266a20c | ||
|
|
f366757476 | ||
|
|
741843586d | ||
|
|
fafdfd9afd | ||
|
|
a156ad8087 | ||
|
|
b36a03c4bc | ||
|
|
028bdb074b | ||
|
|
643ceb25b5 | ||
|
|
5f8eface28 | ||
|
|
8a5177f14c | ||
|
|
02c8a89bbe | ||
|
|
c67acaa6ec | ||
|
|
4bbacf6923 | ||
|
|
38ea682c88 | ||
|
|
0f1208d4d9 | ||
|
|
69942283e5 | ||
|
|
d13e034940 | ||
|
|
72059184df | ||
|
|
4d9dc0111e | ||
|
|
b9262230d1 | ||
|
|
df4cea3228 | ||
|
|
0f27348924 | ||
|
|
dd5aa1e241 | ||
|
|
5df62610d2 | ||
|
|
9dcbef988a | ||
|
|
d1a973564f | ||
|
|
da52ff99c1 | ||
|
|
ee07676193 | ||
|
|
007598df6a | ||
|
|
9a71bbc620 | ||
|
|
a5041a3a41 | ||
|
|
36d3717bd6 | ||
|
|
abd63731be | ||
|
|
b7c0e32cd0 | ||
|
|
c512d7167d | ||
|
|
6ccfc8ba7d | ||
|
|
b27d3c04c9 | ||
|
|
aa3948b9a2 | ||
|
|
75fa1a8167 | ||
|
|
9cd42e0614 | ||
|
|
ff63adecdc | ||
|
|
f0af6f8927 | ||
|
|
a201d18938 | ||
|
|
d4f456d868 | ||
|
|
af2736e462 | ||
|
|
3cb9aaa055 | ||
|
|
831dc7a0b8 | ||
|
|
03146d9e3b | ||
|
|
45c0163a9d | ||
|
|
5f0028a983 | ||
|
|
f9c882bf24 | ||
|
|
7180e7e9ed | ||
|
|
445222bcdd | ||
|
|
40ddfdc2ab | ||
|
|
345d2d95d8 | ||
|
|
8d47faadd7 | ||
|
|
d07ed0c09f | ||
|
|
24b4c98d94 | ||
|
|
ea6fffc525 | ||
|
|
a0b422be34 | ||
|
|
6599ea6678 | ||
|
|
36cf19b1b9 | ||
|
|
9d056b2765 | ||
|
|
5c16c2a21a | ||
|
|
acd9beae73 | ||
|
|
e598817287 | ||
|
|
35d53e2fae | ||
|
|
fa3d77299e | ||
|
|
48a16d65e1 | ||
|
|
89f126ab04 | ||
|
|
67d9ca1e41 | ||
|
|
8f9d80a809 | ||
|
|
3425920cb6 | ||
|
|
85c6da4346 | ||
|
|
93460daadf | ||
|
|
574548f360 | ||
|
|
847c4a67c9 | ||
|
|
8aab154a9f | ||
|
|
a3119d1993 | ||
|
|
0a159c803f | ||
|
|
22a7231d8f | ||
|
|
c36f6b603d | ||
|
|
8e5b8712c0 | ||
|
|
f063aa16a8 | ||
|
|
2520970698 | ||
|
|
a21a825aac | ||
|
|
d48dc8b87b | ||
|
|
8f72756737 | ||
|
|
68b28a17e4 | ||
|
|
463af45e73 | ||
|
|
4ccab6b8b5 | ||
|
|
1849ee807c | ||
|
|
4dd3c64e9d | ||
|
|
b400393a90 | ||
|
|
1f9cb92697 | ||
|
|
59fe366479 | ||
|
|
8eba67ceb8 | ||
|
|
1148ef1595 | ||
|
|
bcbdee3a50 | ||
|
|
cfbb700f0c | ||
|
|
95f6738d5b | ||
|
|
0cde54e985 | ||
|
|
a3d3cfad61 | ||
|
|
b89e9c56cc | ||
|
|
192955b33d | ||
|
|
195c8a0601 | ||
|
|
9048d68baf | ||
|
|
2b70762b7a | ||
|
|
de2d034377 | ||
|
|
f941a45d13 | ||
|
|
4280e05679 | ||
|
|
830f714a44 | ||
|
|
f8c9acd88f | ||
|
|
d67f08d842 | ||
|
|
72fc36c8f5 | ||
|
|
3c22f9069b | ||
|
|
c2eaf88d74 | ||
|
|
b72d620b15 | ||
|
|
dce413631c | ||
|
|
5468127e2f | ||
|
|
d66e6ab6ef | ||
|
|
a3929d2c6f | ||
|
|
b5cc1542b6 | ||
|
|
1a77960daa | ||
|
|
301fbf4427 | ||
|
|
2f0666325f | ||
|
|
d0c765ce20 | ||
|
|
a1ad99cc0d | ||
|
|
2d0b20499e | ||
|
|
5b01e60ed2 | ||
|
|
26ff81ab71 | ||
|
|
da3349765a | ||
|
|
b470fbfb3d | ||
|
|
1f86842757 | ||
|
|
de47b11880 | ||
|
|
6b2b3969ec | ||
|
|
14c5a0823b | ||
|
|
98b5c8da28 | ||
|
|
cd7060afed | ||
|
|
0787264f71 | ||
|
|
347609d20c | ||
|
|
0340dc7ffc | ||
|
|
d8057830c6 | ||
|
|
4ddde65b41 | ||
|
|
c408afad67 | ||
|
|
b1ba7d0afe | ||
|
|
31a223cece | ||
|
|
3bd778737f | ||
|
|
648251978e | ||
|
|
240c96a185 | ||
|
|
810000e37c | ||
|
|
6aa5126bf0 | ||
|
|
90591382ce | ||
|
|
9e2d89c528 | ||
|
|
1601d679fd | ||
|
|
aa0409af48 | ||
|
|
ad194bd4c0 | ||
|
|
1779685d31 | ||
|
|
51df82f35e | ||
|
|
bf0622d7fa | ||
|
|
da25281df9 | ||
|
|
2f52d083e8 | ||
|
|
eb63f49db7 | ||
|
|
c007513fc8 | ||
|
|
9f5782e0ba | ||
|
|
2f14a0f868 | ||
|
|
fb924daa81 | ||
|
|
1bb9acdc37 | ||
|
|
16d5dfce77 | ||
|
|
afa203e73c | ||
|
|
bc85391734 | ||
|
|
7c2cc9646d | ||
|
|
c0303cc873 | ||
|
|
0ddd80dc2c | ||
|
|
af582056d7 | ||
|
|
56859a77ab | ||
|
|
ec5846e1eb | ||
|
|
6d5c192447 | ||
|
|
1b90ac14d2 | ||
|
|
9c775ca44b | ||
|
|
0d87fc51d9 | ||
|
|
c4c7d9d792 | ||
|
|
455a5f59d1 | ||
|
|
9cf5d5734f | ||
|
|
43b8d32efc | ||
|
|
0c25b01666 | ||
|
|
1fd7fda645 | ||
|
|
3eb798917d | ||
|
|
64023f6eec | ||
|
|
d8a369f39d | ||
|
|
98b0df9e80 | ||
|
|
763a9e73fa | ||
|
|
df5a0448aa | ||
|
|
76365afbd2 | ||
|
|
6e27b4c9ec | ||
|
|
a7e2ea5fa7 | ||
|
|
986bbc9b36 | ||
|
|
03f6d234bc | ||
|
|
79361c976c | ||
|
|
1296f393d7 | ||
|
|
e49dd4e0b9 | ||
|
|
319545b989 | ||
|
|
4a3e9ef79d | ||
|
|
e566223db9 | ||
|
|
22406d0c3a | ||
|
|
8bb108503c | ||
|
|
1eb43d2a74 | ||
|
|
56f7be21ae | ||
|
|
ba6ecf0319 | ||
|
|
47c8d6c0bd | ||
|
|
d9c49c1a72 | ||
|
|
5af7473769 | ||
|
|
aa9cd1fe6a | ||
|
|
58899ca4cf | ||
|
|
404bc47e96 | ||
|
|
7dfcec394f | ||
|
|
0646200f6c | ||
|
|
2bc7b688ff | ||
|
|
9309d7f15b | ||
|
|
87153fc70e | ||
|
|
ff12531b42 | ||
|
|
f18b54a758 | ||
|
|
9a47b448ac | ||
|
|
569bf4db69 | ||
|
|
f97e02c3d4 | ||
|
|
893345d334 | ||
|
|
80fcede1ca | ||
|
|
461de2f048 | ||
|
|
4106378a6c | ||
|
|
dfb556b27b | ||
|
|
41607c23bd | ||
|
|
a29b8c2a62 | ||
|
|
dc45b77573 | ||
|
|
ad948ac81e | ||
|
|
eee7f137ef | ||
|
|
2237c332b9 | ||
|
|
d5cf608bac | ||
|
|
96973da280 | ||
|
|
bca4386aed | ||
|
|
27f89a63be | ||
|
|
3f5d0b781b | ||
|
|
0984cdbfc4 | ||
|
|
c48106f2f5 | ||
|
|
e1ddcbbb5b | ||
|
|
2b7ceb4228 | ||
|
|
3c89416b83 | ||
|
|
290aee4671 | ||
|
|
10ea821b2a | ||
|
|
cf0276c772 | ||
|
|
8f2740d349 | ||
|
|
eb71dbc300 | ||
|
|
68915dd28c | ||
|
|
93d8775ac5 | ||
|
|
807d48ac7b | ||
|
|
79fd666bff | ||
|
|
393ac9bb97 | ||
|
|
ac95e1f7d8 | ||
|
|
c843c174ed | ||
|
|
d6f052f082 | ||
|
|
a78ef2fb08 | ||
|
|
4cbbd3a6f7 | ||
|
|
4a8c3a83b3 | ||
|
|
308be8079f | ||
|
|
335ced948e | ||
|
|
b41a006a79 | ||
|
|
506aced23e | ||
|
|
e9ea2ba792 | ||
|
|
2c5f3ee759 | ||
|
|
b680cdff36 | ||
|
|
80f7966d1c | ||
|
|
e62df579f1 | ||
|
|
2b6b3914a7 | ||
|
|
756b675e2b | ||
|
|
1d65ceaccf | ||
|
|
0c92cc661f | ||
|
|
c87a936e22 | ||
|
|
c041a18624 | ||
|
|
ac3aab51fa | ||
|
|
9281995029 | ||
|
|
f36c700129 | ||
|
|
d35ef071bb | ||
|
|
852f83a8f6 | ||
|
|
7bbd651779 | ||
|
|
a624d21fcd | ||
|
|
9a2cafc1b1 | ||
|
|
b226a40efc | ||
|
|
0b8a263443 | ||
|
|
75fa706299 | ||
|
|
c88f37f8e7 | ||
|
|
3e24b9caff | ||
|
|
517363b485 | ||
|
|
011caf375f | ||
|
|
9f1485cfe5 | ||
|
|
0336fe6298 | ||
|
|
4ab2ec1b5b | ||
|
|
eb3657e76f | ||
|
|
61206547cb | ||
|
|
9ae6e3242b | ||
|
|
7f5fe9efde | ||
|
|
9e189a503e | ||
|
|
da41aec0d1 | ||
|
|
03b9924d57 | ||
|
|
87222611e6 | ||
|
|
cc06d93d30 | ||
|
|
7926a05948 | ||
|
|
d7ff4a371c | ||
|
|
aa144b43eb | ||
|
|
f806ea84b3 | ||
|
|
17ac5b1837 | ||
|
|
8bcd2a69dc | ||
|
|
4916f98bcb |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1,2 +1,3 @@
|
||||
dist/ merge=ours
|
||||
application/language/**/*.php merge=ours
|
||||
text=auto
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -17,3 +17,5 @@ git-svn-diff.py
|
||||
*~
|
||||
*.~
|
||||
*.log
|
||||
dist/*_bower.*
|
||||
application/sessions/*
|
||||
|
||||
50
.htaccess
Executable file
50
.htaccess
Executable 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>
|
||||
38
.travis.yml
38
.travis.yml
@@ -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"
|
||||
|
||||
@@ -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
27
Dockerfile
Normal 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"]
|
||||
45
Gruntfile.js
45
Gruntfile.js
@@ -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']);
|
||||
|
||||
};
|
||||
|
||||
30
README.md
30
README.md
@@ -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
|
||||
------
|
||||
|
||||
[](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.
|
||||
|
||||
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MUN6AEG7NY6H8)
|
||||
|
||||
Or send some coins to **19kwPpAwrUTxbNEs5D6cRR1k4mf5HNa4v2**
|
||||
|
||||
14
UPGRADE.txt
14
UPGRADE.txt
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
Deny from all
|
||||
<IfModule authz_core_module>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
<IfModule !authz_core_module>
|
||||
Deny from all
|
||||
</IfModule>
|
||||
7
application/cache/.htaccess
vendored
7
application/cache/.htaccess
vendored
@@ -1 +1,6 @@
|
||||
deny from all
|
||||
<IfModule authz_core_module>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
<IfModule !authz_core_module>
|
||||
Deny from all
|
||||
</IfModule>
|
||||
3
application/cache/index.html
vendored
3
application/cache/index.html
vendored
@@ -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>
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
@@ -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
|
||||
);
|
||||
|
||||
@@ -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">'
|
||||
);
|
||||
|
||||
@@ -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 */
|
||||
@@ -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 */
|
||||
@@ -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>
|
||||
|
||||
19
application/config/memcached.php
Normal file
19
application/config/memcached.php
Normal 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',
|
||||
),
|
||||
);
|
||||
@@ -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/';
|
||||
|
||||
@@ -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')
|
||||
);
|
||||
|
||||
@@ -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 */
|
||||
@@ -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;
|
||||
@@ -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 */
|
||||
);
|
||||
|
||||
@@ -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'
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
require_once ("Secure_area.php");
|
||||
class Barcode extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
216
application/controllers/Config.php
Normal file
216
application/controllers/Config.php
Normal 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');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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)
|
||||
@@ -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')));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
require_once ("Secure_area.php");
|
||||
|
||||
class Home extends Secure_area
|
||||
{
|
||||
195
application/controllers/Item_kits.php
Normal file
195
application/controllers/Item_kits.php
Normal 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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -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
|
||||
);
|
||||
|
||||
848
application/controllers/Sales.php
Normal file
848
application/controllers/Sales.php
Normal 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';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -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')));
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
||||
|
||||
<h4>A PHP Error was encountered</h4>
|
||||
|
||||
<p>Severity: <?php echo $severity; ?></p>
|
||||
<p>Message: <?php echo $message; ?></p>
|
||||
<p>Filename: <?php echo $filepath; ?></p>
|
||||
<p>Line Number: <?php echo $line; ?></p>
|
||||
|
||||
</div>
|
||||
@@ -1,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)
|
||||
{
|
||||
|
||||
69
application/helpers/dateformat_helper.php
Normal file
69
application/helpers/dateformat_helper.php
Normal 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;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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(' ',
|
||||
$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'),
|
||||
' ');
|
||||
|
||||
@@ -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> </td><td>".$CI->lang->line('sales_total')."</td><td> </td><td> </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.=' ';
|
||||
$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.=' ';
|
||||
$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'),
|
||||
' ');
|
||||
|
||||
$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%">'*/' '.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'),
|
||||
' ',
|
||||
);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
57
application/language/de-CH/common_lang.php
Normal file
57
application/language/de-CH/common_lang.php
Normal 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";
|
||||
122
application/language/de-CH/config_lang.php
Normal file
122
application/language/de-CH/config_lang.php
Normal 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";
|
||||
19
application/language/de-CH/customers_lang.php
Normal file
19
application/language/de-CH/customers_lang.php
Normal 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";
|
||||
28
application/language/de-CH/employees_lang.php
Normal file
28
application/language/de-CH/employees_lang.php
Normal 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";
|
||||
4
application/language/de-CH/error_lang.php
Normal file
4
application/language/de-CH/error_lang.php
Normal 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";
|
||||
70
application/language/de-CH/giftcards_lang.php
Normal file
70
application/language/de-CH/giftcards_lang.php
Normal 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";
|
||||
21
application/language/de-CH/item_kits_lang.php
Normal file
21
application/language/de-CH/item_kits_lang.php
Normal 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";
|
||||
88
application/language/de-CH/items_lang.php
Normal file
88
application/language/de-CH/items_lang.php
Normal 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";
|
||||
8
application/language/de-CH/login_lang.php
Normal file
8
application/language/de-CH/login_lang.php
Normal 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";
|
||||
23
application/language/de-CH/module_lang.php
Normal file
23
application/language/de-CH/module_lang.php
Normal 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";
|
||||
51
application/language/de-CH/receivings_lang.php
Normal file
51
application/language/de-CH/receivings_lang.php
Normal 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";
|
||||
108
application/language/de-CH/reports_lang.php
Normal file
108
application/language/de-CH/reports_lang.php
Normal 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";
|
||||
117
application/language/de-CH/sales_lang.php
Normal file
117
application/language/de-CH/sales_lang.php
Normal 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";
|
||||
19
application/language/de-CH/suppliers_lang.php
Normal file
19
application/language/de-CH/suppliers_lang.php
Normal 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";
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Prohibido</title>
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Interdit</title>
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user