mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-25 08:44:42 -04:00
Compare commits
1709 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd66496ccc | ||
|
|
d2e21e18a1 | ||
|
|
d21bedd8c1 | ||
|
|
0a71cb3d4d | ||
|
|
7758d96e34 | ||
|
|
71ab84e30f | ||
|
|
b1c36b790f | ||
|
|
0723bd2922 | ||
|
|
f5716ab5a3 | ||
|
|
3208b83169 | ||
|
|
a2515cf922 | ||
|
|
1df3ed8b46 | ||
|
|
d6985853d4 | ||
|
|
dac61c498e | ||
|
|
badc108b2e | ||
|
|
b3efd5301d | ||
|
|
e21f25c15b | ||
|
|
2d8bd2d307 | ||
|
|
20a6c6ec0a | ||
|
|
0cb68d47cb | ||
|
|
04a77dff7d | ||
|
|
8732b0e69a | ||
|
|
fe193053f1 | ||
|
|
20279c3bc0 | ||
|
|
20e4a3b057 | ||
|
|
1723347359 | ||
|
|
3b578d41bc | ||
|
|
573367eddc | ||
|
|
c5986ea943 | ||
|
|
90efaf03ee | ||
|
|
8217b70984 | ||
|
|
fd50f6079e | ||
|
|
a9086cac49 | ||
|
|
3fbc53e9b8 | ||
|
|
2dddd1b7ee | ||
|
|
978cdee7be | ||
|
|
e9e2c877d4 | ||
|
|
3543321309 | ||
|
|
b1409f432b | ||
|
|
676948729b | ||
|
|
10ab3911dc | ||
|
|
24dcc3f680 | ||
|
|
64ba842730 | ||
|
|
83992cbf0d | ||
|
|
5a2bd9a569 | ||
|
|
2fcc473830 | ||
|
|
86de36d731 | ||
|
|
592f378d2a | ||
|
|
a87629000e | ||
|
|
15e84f9b37 | ||
|
|
a9963dcfd0 | ||
|
|
974744858f | ||
|
|
a1a6ede046 | ||
|
|
7bba5f9dd0 | ||
|
|
39dd29b3c8 | ||
|
|
10cac5496b | ||
|
|
d88aee1676 | ||
|
|
f2e2b5c91b | ||
|
|
b07631798e | ||
|
|
e7815a1251 | ||
|
|
9dfc186fe4 | ||
|
|
9c025c6feb | ||
|
|
fdbb158c1d | ||
|
|
c695505605 | ||
|
|
dea8683fd4 | ||
|
|
efc5996282 | ||
|
|
ec2aa52d85 | ||
|
|
7d7afd4904 | ||
|
|
8a3fa821d9 | ||
|
|
16958d3b99 | ||
|
|
5829dd8ba5 | ||
|
|
d0c86b8dc4 | ||
|
|
0d0ec68e60 | ||
|
|
cc4edaa468 | ||
|
|
ffbba16a08 | ||
|
|
f235b33959 | ||
|
|
fd9118887c | ||
|
|
5fddfe20d6 | ||
|
|
e42a4e843b | ||
|
|
3b00c5bf9e | ||
|
|
7f1b8a146b | ||
|
|
e05b2697d4 | ||
|
|
da0678f079 | ||
|
|
2ba7b000c2 | ||
|
|
548df573bb | ||
|
|
f1d8378bcb | ||
|
|
42121017b5 | ||
|
|
6fade459ad | ||
|
|
b2e85aa0d8 | ||
|
|
9f3ecb0866 | ||
|
|
6a29ebeff8 | ||
|
|
221a575e5c | ||
|
|
2afac17848 | ||
|
|
e381b3fea5 | ||
|
|
49ed750045 | ||
|
|
1e1cfec94e | ||
|
|
713b88bbc4 | ||
|
|
811fdf9bc0 | ||
|
|
d40a43e1ca | ||
|
|
386057d544 | ||
|
|
c60fcb171c | ||
|
|
11b1072151 | ||
|
|
036a711c53 | ||
|
|
ceaa378978 | ||
|
|
83b4f9f8a8 | ||
|
|
838df08eae | ||
|
|
7dd1c9791d | ||
|
|
fc2094a9c3 | ||
|
|
505ab59903 | ||
|
|
1f169d8fab | ||
|
|
ebc1237ddc | ||
|
|
b1aa16f7a9 | ||
|
|
3206bbb41d | ||
|
|
3b559b056d | ||
|
|
cd0ef34f75 | ||
|
|
f89315a298 | ||
|
|
4a4a7921d7 | ||
|
|
691fa674c4 | ||
|
|
fe55841187 | ||
|
|
18d3f7db52 | ||
|
|
e3c538dbaf | ||
|
|
d08b0b7ef4 | ||
|
|
003d4de6be | ||
|
|
b6bda3c3ed | ||
|
|
71e1cb8fd0 | ||
|
|
4139d53938 | ||
|
|
ffa5b4ddb7 | ||
|
|
068f426c9e | ||
|
|
6f62085ba6 | ||
|
|
08e8209446 | ||
|
|
ea7cc16cc9 | ||
|
|
e3c9cddacb | ||
|
|
aae1ce5329 | ||
|
|
7350f4dc76 | ||
|
|
da307fdfbd | ||
|
|
9012006e84 | ||
|
|
91b18d032f | ||
|
|
b5f6fb124c | ||
|
|
a5f16abbd5 | ||
|
|
d319c5a73d | ||
|
|
f3270a545e | ||
|
|
9e01ca2e43 | ||
|
|
c3316040bb | ||
|
|
17084d8a8f | ||
|
|
71e54d90bf | ||
|
|
eb59079fe5 | ||
|
|
35f9904dbe | ||
|
|
ce2c83b3f9 | ||
|
|
c88de60a9f | ||
|
|
2bf82e6472 | ||
|
|
3ce939ad20 | ||
|
|
96004f5699 | ||
|
|
a2d2965785 | ||
|
|
3d15148b80 | ||
|
|
31166c814e | ||
|
|
0ec94f1044 | ||
|
|
6e7b32cb1b | ||
|
|
775c0cebf2 | ||
|
|
d67b33d996 | ||
|
|
375408a7a7 | ||
|
|
7677c33ce1 | ||
|
|
a5b2c82395 | ||
|
|
13587908f5 | ||
|
|
9c3c283912 | ||
|
|
d290134a48 | ||
|
|
057fdaea5d | ||
|
|
f440ff5e89 | ||
|
|
7f65b9cf2b | ||
|
|
e8a96054ee | ||
|
|
ad19dbc5ed | ||
|
|
dc0245c4fb | ||
|
|
e25c330dff | ||
|
|
9a6bd6e000 | ||
|
|
e302086b13 | ||
|
|
45675b8f29 | ||
|
|
64d0483300 | ||
|
|
798246e589 | ||
|
|
2c1231ca61 | ||
|
|
d6b009fba8 | ||
|
|
ad8d0821ad | ||
|
|
a6ba67e2fc | ||
|
|
9e1afd3f2b | ||
|
|
43e7e353e7 | ||
|
|
e4fc2ac06b | ||
|
|
59bbe55215 | ||
|
|
6b63e381f9 | ||
|
|
af6b323013 | ||
|
|
919e478184 | ||
|
|
3f34775000 | ||
|
|
6e7da88f94 | ||
|
|
cf1eec761b | ||
|
|
b51022e93f | ||
|
|
2bda02dd74 | ||
|
|
01aeca579a | ||
|
|
2555203a54 | ||
|
|
4f5f875f1e | ||
|
|
b77d368885 | ||
|
|
4b569d093b | ||
|
|
51bdfc050e | ||
|
|
1b19fed206 | ||
|
|
3336d42245 | ||
|
|
6fdecbe619 | ||
|
|
55764d7625 | ||
|
|
dd8d848544 | ||
|
|
6203504976 | ||
|
|
059ec54c72 | ||
|
|
75567b9620 | ||
|
|
1b859a8726 | ||
|
|
1c02508759 | ||
|
|
4c337aa5c6 | ||
|
|
523714c26a | ||
|
|
28e776248b | ||
|
|
333067955c | ||
|
|
a0886caf2f | ||
|
|
31cc67ea52 | ||
|
|
8b08bf5daa | ||
|
|
597a5caee5 | ||
|
|
19403adde2 | ||
|
|
119476ca74 | ||
|
|
dd07b9fcb8 | ||
|
|
4a54dc7dc7 | ||
|
|
e1f796cf99 | ||
|
|
266610399d | ||
|
|
7602e77071 | ||
|
|
bd7dd4741d | ||
|
|
3ed454d1b3 | ||
|
|
2402da6e30 | ||
|
|
c76109ab0a | ||
|
|
fe5e99978c | ||
|
|
63a6706770 | ||
|
|
4ea056e3f7 | ||
|
|
5f1d9e7f45 | ||
|
|
9fa2676352 | ||
|
|
76630365e7 | ||
|
|
cbc42f7868 | ||
|
|
fba0915c42 | ||
|
|
ab075fd94f | ||
|
|
956f18e55c | ||
|
|
05628ddaff | ||
|
|
2519d0fb20 | ||
|
|
28129ef075 | ||
|
|
0727ae06af | ||
|
|
0efc49f713 | ||
|
|
352586531f | ||
|
|
745874f0b3 | ||
|
|
d8e4bf48d8 | ||
|
|
4be3c8f433 | ||
|
|
9a7061e9c5 | ||
|
|
2743e1353a | ||
|
|
75db191baf | ||
|
|
a66868651b | ||
|
|
68deca1537 | ||
|
|
1af612d18e | ||
|
|
cfdbd01dac | ||
|
|
d88b51794e | ||
|
|
c9d806bd26 | ||
|
|
39d678b977 | ||
|
|
a0e894895e | ||
|
|
09a3499069 | ||
|
|
86b32240d3 | ||
|
|
0924a0f433 | ||
|
|
55f7bef253 | ||
|
|
38d234fa5f | ||
|
|
120b2bbc6e | ||
|
|
a3704f9b12 | ||
|
|
c82e9e4929 | ||
|
|
7f169222d0 | ||
|
|
21f5e46488 | ||
|
|
ef2cd9d001 | ||
|
|
72efafdc50 | ||
|
|
0f88d6462d | ||
|
|
3af19daa0e | ||
|
|
f11c2d7a4d | ||
|
|
be2bac84f1 | ||
|
|
dc06119586 | ||
|
|
0cbd19353c | ||
|
|
3c969858cf | ||
|
|
fbba5ea2c5 | ||
|
|
6d8c3b94e0 | ||
|
|
b3a1259861 | ||
|
|
a74e7565bf | ||
|
|
df6f118a79 | ||
|
|
f04cbc9674 | ||
|
|
3cff918f81 | ||
|
|
5be0feafe9 | ||
|
|
4618af352c | ||
|
|
81d1aa7873 | ||
|
|
8002694c96 | ||
|
|
5de3f17af8 | ||
|
|
1b5105f3af | ||
|
|
7b674b2e3f | ||
|
|
01486fd41e | ||
|
|
a69194745e | ||
|
|
90660fd9e9 | ||
|
|
bb1a1ccd62 | ||
|
|
806c1b9986 | ||
|
|
0ba5cadbb7 | ||
|
|
5b81ee1b1d | ||
|
|
c136832db1 | ||
|
|
d8beedf1f7 | ||
|
|
4d6a665e04 | ||
|
|
201e26e521 | ||
|
|
b7cb5c5873 | ||
|
|
5cb755b0e3 | ||
|
|
43da232557 | ||
|
|
06c74045be | ||
|
|
ad54e759f0 | ||
|
|
163726abae | ||
|
|
6a108866f5 | ||
|
|
608b2ec075 | ||
|
|
7682f02222 | ||
|
|
7c65484ada | ||
|
|
163732b87f | ||
|
|
dd2dc7312c | ||
|
|
586c8f8db9 | ||
|
|
0293b6dbd8 | ||
|
|
d62af2a007 | ||
|
|
6466a71c0a | ||
|
|
d2d9aae9ce | ||
|
|
362b32357f | ||
|
|
4b64269905 | ||
|
|
e25ce12e55 | ||
|
|
b76d4526de | ||
|
|
1affe3c093 | ||
|
|
57759d2775 | ||
|
|
6744ad1891 | ||
|
|
d378cfdb5f | ||
|
|
6d012144db | ||
|
|
d911447b43 | ||
|
|
0bd74b9df5 | ||
|
|
725d447ab3 | ||
|
|
413fef4c6f | ||
|
|
6c9c28bd28 | ||
|
|
331d97b48f | ||
|
|
cf860be1fc | ||
|
|
2ca3911d56 | ||
|
|
67a2912537 | ||
|
|
9119c16c49 | ||
|
|
7e56617044 | ||
|
|
d72bddbd9d | ||
|
|
de9a4dac08 | ||
|
|
9bada9e18e | ||
|
|
b87f50aedf | ||
|
|
04fdbfb187 | ||
|
|
9a1def21cc | ||
|
|
0b423f5828 | ||
|
|
e4988d806f | ||
|
|
e9fe27a59e | ||
|
|
e56f418696 | ||
|
|
bb85a172a2 | ||
|
|
4cf1c31d4f | ||
|
|
15fd832705 | ||
|
|
17dcd3fdb2 | ||
|
|
8aa46126c5 | ||
|
|
6c791afffc | ||
|
|
6c6e41495c | ||
|
|
a4488ec090 | ||
|
|
c75675129b | ||
|
|
ac968e21e6 | ||
|
|
ad1b3aeaac | ||
|
|
8c5decee34 | ||
|
|
bbbf24c2a5 | ||
|
|
936c74211f | ||
|
|
fdb5e3406e | ||
|
|
359184934e | ||
|
|
776c819509 | ||
|
|
1c4f6f4fb3 | ||
|
|
28d3a3dce3 | ||
|
|
fb4dc5af84 | ||
|
|
26358620eb | ||
|
|
105eca20b2 | ||
|
|
9e675e81ec | ||
|
|
86b22e7987 | ||
|
|
c39e0a2ed4 | ||
|
|
1cadd2b06b | ||
|
|
6b5d61414c | ||
|
|
3890eaf162 | ||
|
|
4b0badfb30 | ||
|
|
1861f4f71f | ||
|
|
3129319efe | ||
|
|
1392055d44 | ||
|
|
4119d8d5a8 | ||
|
|
5d494fa08e | ||
|
|
3a5b88d51c | ||
|
|
11ad1c2476 | ||
|
|
17443a3d4f | ||
|
|
9dc7405eaa | ||
|
|
cd6277c1a8 | ||
|
|
73dc5a9f70 | ||
|
|
4da7285f38 | ||
|
|
b96ebeed22 | ||
|
|
edfd0319a8 | ||
|
|
facc25eb74 | ||
|
|
b7f54c0366 | ||
|
|
9f7ea6f1cb | ||
|
|
aae02dc060 | ||
|
|
e6c173dcdc | ||
|
|
0923ed0f80 | ||
|
|
1ad844fe74 | ||
|
|
9fb4d5ccd4 | ||
|
|
463938bc88 | ||
|
|
9d25520dbf | ||
|
|
03bfa43378 | ||
|
|
b72d1059c0 | ||
|
|
fc81e842c2 | ||
|
|
53b220b10b | ||
|
|
5129ebec0c | ||
|
|
a41a39aa0b | ||
|
|
0aa17d6374 | ||
|
|
bced04ca88 | ||
|
|
6d0ed7cc99 | ||
|
|
336e10d445 | ||
|
|
5cf23f2bd3 | ||
|
|
fe845692bf | ||
|
|
7980b12239 | ||
|
|
9248ffd044 | ||
|
|
da96edf304 | ||
|
|
b11377041d | ||
|
|
fa01e18e41 | ||
|
|
1453b5e21d | ||
|
|
7e6908b7bf | ||
|
|
eb9c04c774 | ||
|
|
fdb7cd9ac4 | ||
|
|
5e42684f27 | ||
|
|
f8ef4bb570 | ||
|
|
b6822b040c | ||
|
|
7c05b62cf0 | ||
|
|
d2f3497d1e | ||
|
|
998e9bbb8e | ||
|
|
8c6bba62c9 | ||
|
|
0a6b3d5785 | ||
|
|
9f7457e1de | ||
|
|
6e9830705f | ||
|
|
b904540aed | ||
|
|
fc5aa33d16 | ||
|
|
1968b598a4 | ||
|
|
6ad547049e | ||
|
|
5d66b9fbfd | ||
|
|
404fc5b548 | ||
|
|
6fe1e2a55a | ||
|
|
6e14dfb6d5 | ||
|
|
ce3e96ef5b | ||
|
|
1e7e73f482 | ||
|
|
a5f63d1cc0 | ||
|
|
e4cb04fd3e | ||
|
|
472ce16528 | ||
|
|
1b7bf0ed4f | ||
|
|
9f380bc083 | ||
|
|
8671a59b4b | ||
|
|
e9e5a3e475 | ||
|
|
9ae5957473 | ||
|
|
3c25a9ba8d | ||
|
|
ec5fbc16b5 | ||
|
|
5531f7fa9e | ||
|
|
9137c89fb7 | ||
|
|
5c42604fa7 | ||
|
|
fecb2163ea | ||
|
|
3e44c7caf5 | ||
|
|
719a0e6107 | ||
|
|
cd1ec7a5d6 | ||
|
|
0aadbc0467 | ||
|
|
63d6ac59df | ||
|
|
2475bfa609 | ||
|
|
609aef0a87 | ||
|
|
0a16ffcd39 | ||
|
|
457a1df478 | ||
|
|
3c0dcb20ac | ||
|
|
07fbffab08 | ||
|
|
bd208c6d0d | ||
|
|
41e4285d65 | ||
|
|
cfacf52a42 | ||
|
|
17bc62d94b | ||
|
|
fa84adc536 | ||
|
|
35b12df144 | ||
|
|
ec20eb96df | ||
|
|
41b3d00fb2 | ||
|
|
671f6d9e16 | ||
|
|
f2293297ce | ||
|
|
0d0ecd90d3 | ||
|
|
9b55205f0f | ||
|
|
5122dad996 | ||
|
|
7178f8b02b | ||
|
|
9762193ce0 | ||
|
|
2746a0ef03 | ||
|
|
ea77980bff | ||
|
|
bde97b3ec8 | ||
|
|
becab02bce | ||
|
|
fc2d5e89f0 | ||
|
|
31dd09e09b | ||
|
|
c83a46c726 | ||
|
|
20baece7c5 | ||
|
|
92b88bed20 | ||
|
|
45b498924c | ||
|
|
fc7735ab03 | ||
|
|
e07ee6a505 | ||
|
|
e0fdb7ed80 | ||
|
|
cbb562add2 | ||
|
|
7e8f0e1dc1 | ||
|
|
139100db35 | ||
|
|
19629cb05c | ||
|
|
87c55582b6 | ||
|
|
4c60b0f624 | ||
|
|
a56984a1a0 | ||
|
|
2a858b3f23 | ||
|
|
5312dba499 | ||
|
|
f7664616ec | ||
|
|
fdb826a8c4 | ||
|
|
53060397e5 | ||
|
|
349000bd8a | ||
|
|
358a9fc867 | ||
|
|
4b5d883c69 | ||
|
|
498f8a06b8 | ||
|
|
2171efcb7a | ||
|
|
ffd212da14 | ||
|
|
b210888dac | ||
|
|
3b4fbce6f6 | ||
|
|
c80b3e1c61 | ||
|
|
8fcc24db71 | ||
|
|
d78c871855 | ||
|
|
3cf018ac47 | ||
|
|
c3f2f41888 | ||
|
|
d94b1d921e | ||
|
|
4e17bb7a8c | ||
|
|
601fd10f4e | ||
|
|
ac765e4667 | ||
|
|
3451a70fe4 | ||
|
|
57fcd87ad4 | ||
|
|
f7ea83091c | ||
|
|
d9498964a0 | ||
|
|
16e6042c9c | ||
|
|
c11a9e000d | ||
|
|
a02a0c2a0b | ||
|
|
eca4b4ffb8 | ||
|
|
18764d5caf | ||
|
|
76560ca458 | ||
|
|
f207213474 | ||
|
|
9eb21137f6 | ||
|
|
488af06663 | ||
|
|
de711b82dd | ||
|
|
408774b14c | ||
|
|
e2f6bf283c | ||
|
|
c2f895c1d4 | ||
|
|
2adc096eeb | ||
|
|
b37f984eb6 | ||
|
|
130f749a48 | ||
|
|
e7a22e4e41 | ||
|
|
c568c08595 | ||
|
|
9caed90aee | ||
|
|
d5d96fa777 | ||
|
|
7e088348e0 | ||
|
|
c9142ca69b | ||
|
|
2dab5e0fe7 | ||
|
|
e7439c1616 | ||
|
|
4624665726 | ||
|
|
8cf32f4470 | ||
|
|
4c55da7229 | ||
|
|
48c49ddb74 | ||
|
|
9dfb2196e5 | ||
|
|
e09ebcaff9 | ||
|
|
bb95a120b1 | ||
|
|
46ad34548f | ||
|
|
3b9ae1d807 | ||
|
|
0cd45e275e | ||
|
|
873d14aac6 | ||
|
|
6f011da3ae | ||
|
|
2b03d3bfd7 | ||
|
|
af7b64a398 | ||
|
|
6e82c4904f | ||
|
|
a090ecb1a5 | ||
|
|
a745c52bd5 | ||
|
|
c9f8ca6771 | ||
|
|
10e2aa873c | ||
|
|
0eecaf4268 | ||
|
|
1f9c31da41 | ||
|
|
5fb73ce2cb | ||
|
|
2b9c9ce203 | ||
|
|
225a42be8a | ||
|
|
8042b6aa53 | ||
|
|
d01e9ffcfe | ||
|
|
cde401a078 | ||
|
|
ee237c3c2e | ||
|
|
0dca4b8906 | ||
|
|
e81bf14d91 | ||
|
|
d330472158 | ||
|
|
0d759ddd4e | ||
|
|
638e9ff535 | ||
|
|
3785cdb675 | ||
|
|
4ed63cc362 | ||
|
|
01d68ce3d5 | ||
|
|
8139d525cb | ||
|
|
34d09bc575 | ||
|
|
b88575b2a5 | ||
|
|
1cf3157089 | ||
|
|
ce2142add4 | ||
|
|
d1de7b67b9 | ||
|
|
9aa673448a | ||
|
|
9cfddaf2ab | ||
|
|
ae5d23f77d | ||
|
|
9f808dafde | ||
|
|
bb0989f6bd | ||
|
|
b177fe1dcf | ||
|
|
2948bb8a6b | ||
|
|
19d3a34bcc | ||
|
|
83d93464bc | ||
|
|
3b5be5cf97 | ||
|
|
7a3e09adb0 | ||
|
|
1ac0182867 | ||
|
|
fa084ec8d2 | ||
|
|
61a50577fa | ||
|
|
11e3cd63e0 | ||
|
|
0c47ec477d | ||
|
|
d9b007c1af | ||
|
|
c77fa6e5c4 | ||
|
|
fb16c4b65a | ||
|
|
e2ddb9388a | ||
|
|
a1311dca4c | ||
|
|
cf4fd0601f | ||
|
|
935e9f0bc8 | ||
|
|
031994f9b5 | ||
|
|
96701fad8e | ||
|
|
94e566bb89 | ||
|
|
1d3bcfc2ef | ||
|
|
c9b1e34035 | ||
|
|
910d846c21 | ||
|
|
62bcce369f | ||
|
|
ee319badc8 | ||
|
|
714c0ddead | ||
|
|
d27671ac3d | ||
|
|
4264ee763f | ||
|
|
2439055f01 | ||
|
|
ffd0f25e13 | ||
|
|
45bd6ece05 | ||
|
|
984f6c5cac | ||
|
|
cd102b7c2e | ||
|
|
d83c8051f6 | ||
|
|
2ffc7e2d2b | ||
|
|
4a3acd10e7 | ||
|
|
ea2a18c647 | ||
|
|
3b035aa204 | ||
|
|
3b1250afa7 | ||
|
|
2f07036940 | ||
|
|
db3f19770b | ||
|
|
570ca69c2f | ||
|
|
4ba4e38c1f | ||
|
|
16496d4a9c | ||
|
|
f88f19da71 | ||
|
|
8237825b4b | ||
|
|
7a05f13539 | ||
|
|
05ba84db37 | ||
|
|
95c4fe170b | ||
|
|
a7ad0cbecd | ||
|
|
3b1efdb9ad | ||
|
|
923f0e05fc | ||
|
|
c981bc7daa | ||
|
|
fc6c9f6d57 | ||
|
|
bca943bf34 | ||
|
|
49366ea5ab | ||
|
|
44dfb86230 | ||
|
|
f36e5ecef4 | ||
|
|
afcb1641b7 | ||
|
|
54455213a8 | ||
|
|
dda468291a | ||
|
|
3d7756f177 | ||
|
|
c5037c5725 | ||
|
|
bef7a2da25 | ||
|
|
12f4209055 | ||
|
|
76ff5da718 | ||
|
|
19bdcad78e | ||
|
|
6efdccfef0 | ||
|
|
97676f01a2 | ||
|
|
affefb44b4 | ||
|
|
62dea44922 | ||
|
|
da5c821de3 | ||
|
|
b2597df44c | ||
|
|
c8f6f6adf0 | ||
|
|
83edcaf955 | ||
|
|
2359af5fbb | ||
|
|
e3ddea07b9 | ||
|
|
953307cbc7 | ||
|
|
f303066039 | ||
|
|
22e38b6f2a | ||
|
|
68f5e73bff | ||
|
|
086d5b39f3 | ||
|
|
97d17da8c0 | ||
|
|
4d04cdd65f | ||
|
|
7d9013cb2d | ||
|
|
d996ff29cb | ||
|
|
51b776354a | ||
|
|
d51d1b458a | ||
|
|
7f44d379f5 | ||
|
|
69b3e9db52 | ||
|
|
faac1d6a10 | ||
|
|
2f5fd8e3d0 | ||
|
|
972f0e81f4 | ||
|
|
1e85edfef4 | ||
|
|
50e6739bad | ||
|
|
2322682014 | ||
|
|
16f438dea2 | ||
|
|
6ffec444d6 | ||
|
|
4e9731c59b | ||
|
|
4f3a845702 | ||
|
|
a3af051d43 | ||
|
|
f9f127e227 | ||
|
|
79a4414a13 | ||
|
|
96c4b57b18 | ||
|
|
98ad6f3db0 | ||
|
|
9cbbe111a7 | ||
|
|
258c95f02e | ||
|
|
fbd7465b03 | ||
|
|
e6472d525d | ||
|
|
fda45dd363 | ||
|
|
07e372a787 | ||
|
|
b9c088314b | ||
|
|
b72432a39e | ||
|
|
cb26c8cf33 | ||
|
|
611237ec86 | ||
|
|
3a4e9d9107 | ||
|
|
06420fa4b0 | ||
|
|
b57fc1f34d | ||
|
|
b5e07c9245 | ||
|
|
c6c6a1b4cf | ||
|
|
8cdb30fd25 | ||
|
|
91041bd7a9 | ||
|
|
f813780e15 | ||
|
|
bc53f544f4 | ||
|
|
d29176158b | ||
|
|
20fc9138e2 | ||
|
|
18857aca46 | ||
|
|
8fc24219fb | ||
|
|
38a2fb4ca1 | ||
|
|
a04b1d5803 | ||
|
|
06e7dcd471 | ||
|
|
d4dae9fd32 | ||
|
|
e3a10067f5 | ||
|
|
09dd7eca58 | ||
|
|
126f2254f6 | ||
|
|
64c7eb28b3 | ||
|
|
5e97358e90 | ||
|
|
eb838cdb9f | ||
|
|
983dad87af | ||
|
|
87853f0da4 | ||
|
|
e8e89f1c7e | ||
|
|
f6be7cdf23 | ||
|
|
7937e880c0 | ||
|
|
c52b5b5118 | ||
|
|
e47e80c69c | ||
|
|
6208569c7e | ||
|
|
1a41c6a360 | ||
|
|
38d52e4df0 | ||
|
|
1f56a8da8c | ||
|
|
4ad0d62f42 | ||
|
|
0bd5bbec77 | ||
|
|
340792cfc2 | ||
|
|
a817c8ae0a | ||
|
|
c124c08f89 | ||
|
|
d2565009d8 | ||
|
|
b38a5ca47a | ||
|
|
f32bba31b5 | ||
|
|
4b8f505625 | ||
|
|
4433edc552 | ||
|
|
019f93d98b | ||
|
|
98ebe1ff96 | ||
|
|
69c1af586e | ||
|
|
2df8645c5f | ||
|
|
f6b9ef16d0 | ||
|
|
399cc38eb9 | ||
|
|
652702f582 | ||
|
|
4913ffe114 | ||
|
|
668cd8d0f9 | ||
|
|
05a1dd561c | ||
|
|
5f0c9c282c | ||
|
|
de825f54e7 | ||
|
|
940a899231 | ||
|
|
70938f7b41 | ||
|
|
d510ab031d | ||
|
|
9c39f62b1e | ||
|
|
e175a96acb | ||
|
|
71a8dce949 | ||
|
|
747706e032 | ||
|
|
2a679ca2eb | ||
|
|
1f1b9c47ec | ||
|
|
ceac184c30 | ||
|
|
f9803cb4f5 | ||
|
|
626667b3fd | ||
|
|
bf2c6bfa1f | ||
|
|
5588c1e22e | ||
|
|
525fb7dcf9 | ||
|
|
e182c9d9f6 | ||
|
|
af69e83bda | ||
|
|
76639f6da1 | ||
|
|
01f59cc247 | ||
|
|
6f6f4354fd | ||
|
|
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 | ||
|
|
c414922167 | ||
|
|
38ecacc62f | ||
|
|
cc05f9b2df | ||
|
|
d7d2c8cb35 | ||
|
|
ea394a00b5 | ||
|
|
49b1eb3150 | ||
|
|
4a216f0a7c | ||
|
|
674dd90221 | ||
|
|
2436cf5da5 | ||
|
|
9cd42e0614 | ||
|
|
a6fa6c9cd6 | ||
|
|
4403a6775a | ||
|
|
dfbab194de | ||
|
|
fe2787217f | ||
|
|
554f2b32db | ||
|
|
36f825d0fe | ||
|
|
04b6ba21f7 | ||
|
|
ff63adecdc | ||
|
|
6c29faeba1 | ||
|
|
517f67a3a9 | ||
|
|
7f37ebf87e | ||
|
|
f0af6f8927 | ||
|
|
d78c4dec67 | ||
|
|
0831089790 | ||
|
|
8faf1285da | ||
|
|
d5b278217b | ||
|
|
a04101d756 | ||
|
|
3cb41c9fe3 | ||
|
|
2ab9404229 | ||
|
|
6cef7a124e | ||
|
|
f226c774df | ||
|
|
06a1f1a869 | ||
|
|
44dc300c63 | ||
|
|
edaa936766 | ||
|
|
6d9a53edba | ||
|
|
1d9a7eced3 | ||
|
|
f9971aabb6 | ||
|
|
1fe26afe4f | ||
|
|
6d547048c4 | ||
|
|
687b68f13e | ||
|
|
c49728e2fc | ||
|
|
a201d18938 | ||
|
|
d433866e39 | ||
|
|
45da78bbde | ||
|
|
c9238877fa | ||
|
|
d4f456d868 | ||
|
|
2833b7598e | ||
|
|
68c4c1cc56 | ||
|
|
bc8673d883 | ||
|
|
6b76e28ebb | ||
|
|
f2e02e4e06 | ||
|
|
2b257d21fb | ||
|
|
92bfd903dc | ||
|
|
69fedb3712 | ||
|
|
c4df1f3671 | ||
|
|
0cd7af7c4f | ||
|
|
c675a73fc6 | ||
|
|
7b09961075 | ||
|
|
d96fafa92f | ||
|
|
20daecf4b1 | ||
|
|
c0a048251e | ||
|
|
99c92e68a6 | ||
|
|
af5d39a394 | ||
|
|
fc74708bf5 | ||
|
|
0dce125f67 | ||
|
|
d3b87189e3 | ||
|
|
4a68ab13e1 | ||
|
|
0c1f67f391 | ||
|
|
fd87c59492 | ||
|
|
af2736e462 | ||
|
|
d7ff9bed1a | ||
|
|
e5e3b89c6d | ||
|
|
67bfe560c4 | ||
|
|
d04fec09d5 | ||
|
|
e814f8835a | ||
|
|
7769334372 | ||
|
|
959f7da876 | ||
|
|
a9902219ae | ||
|
|
3cb9aaa055 | ||
|
|
831dc7a0b8 | ||
|
|
75cf2997b8 | ||
|
|
abdf2a23d0 | ||
|
|
deb4a501d6 | ||
|
|
80d7079953 | ||
|
|
fcf303b2b3 | ||
|
|
932ead0d3c | ||
|
|
03146d9e3b | ||
|
|
45c0163a9d | ||
|
|
56826ab3c1 | ||
|
|
55d6237f93 | ||
|
|
349da7e7ad | ||
|
|
5f0028a983 | ||
|
|
1aa5c72db3 | ||
|
|
fc20b74b57 | ||
|
|
7236902143 | ||
|
|
cf92544600 | ||
|
|
ab87b30423 | ||
|
|
0ad30370ae | ||
|
|
30223c38e1 | ||
|
|
967ba99c12 | ||
|
|
d2a11cdb91 | ||
|
|
bb966feb8a | ||
|
|
ebaec8de26 | ||
|
|
ee4297e22c | ||
|
|
aae36bce00 | ||
|
|
4a7e0af9a2 | ||
|
|
808943f250 | ||
|
|
f19e7142cd | ||
|
|
82a3f9a3e2 | ||
|
|
66a5a159d8 | ||
|
|
a5107445f0 | ||
|
|
c99ef3f315 | ||
|
|
cd5094d389 | ||
|
|
d1a596b0be | ||
|
|
a97929f239 | ||
|
|
444ba37eb1 | ||
|
|
52487a4a78 | ||
|
|
b6adf916c4 | ||
|
|
f92082270d | ||
|
|
4667282966 | ||
|
|
5546700fee | ||
|
|
644a159d0a | ||
|
|
3156ce217b | ||
|
|
7c10a9a63a | ||
|
|
fc3aac58b5 | ||
|
|
d788320a9d | ||
|
|
0f4d5e8f1b | ||
|
|
c5ab15ca64 | ||
|
|
42312bcc20 | ||
|
|
d69a3c6130 | ||
|
|
d003239525 | ||
|
|
45cb6bc4f7 | ||
|
|
b361d78051 | ||
|
|
8438942b10 | ||
|
|
2be22d8e48 | ||
|
|
1be861cd8d | ||
|
|
e0745b5109 | ||
|
|
792f6c4154 | ||
|
|
23b086fbc2 | ||
|
|
e35bd81c8b | ||
|
|
3f12930223 | ||
|
|
5fad0e13e8 | ||
|
|
715eac28c8 | ||
|
|
d31e1cef8f | ||
|
|
9cd31c761a | ||
|
|
e99b9cbe41 | ||
|
|
2f1d0fd4f7 | ||
|
|
2aae378808 | ||
|
|
29cdb8103f | ||
|
|
2da08769b2 | ||
|
|
7a85d70139 | ||
|
|
e78d5ba461 | ||
|
|
5aefa2a116 | ||
|
|
32cbf109a4 | ||
|
|
d15f341f90 | ||
|
|
b6d57a8f0e | ||
|
|
c48252790e | ||
|
|
5c95e02eac | ||
|
|
b1b125d2a4 | ||
|
|
634e626717 | ||
|
|
eee87c7bc2 | ||
|
|
c6855712d0 | ||
|
|
b27d94e316 | ||
|
|
ca8b5a75ea | ||
|
|
cb5a4c774c | ||
|
|
7e269f1256 | ||
|
|
f9c882bf24 | ||
|
|
f6356dd9e6 | ||
|
|
d5e0230b19 | ||
|
|
1b0bcf4e0b | ||
|
|
7180e7e9ed | ||
|
|
09831faaf4 | ||
|
|
a5e66eabed | ||
|
|
25f8a34b23 | ||
|
|
eb0cf07f4a | ||
|
|
375f6860aa | ||
|
|
79f0961e09 | ||
|
|
9ddccc6592 | ||
|
|
6606535fa9 | ||
|
|
2ea14273b8 | ||
|
|
445222bcdd | ||
|
|
40ddfdc2ab | ||
|
|
345d2d95d8 | ||
|
|
8a22f1c889 | ||
|
|
8d47faadd7 | ||
|
|
d07ed0c09f | ||
|
|
24b4c98d94 | ||
|
|
ea6fffc525 | ||
|
|
a0b422be34 | ||
|
|
6599ea6678 | ||
|
|
36cf19b1b9 | ||
|
|
9d056b2765 | ||
|
|
5c16c2a21a | ||
|
|
acd9beae73 | ||
|
|
e598817287 | ||
|
|
35d53e2fae | ||
|
|
fa3d77299e | ||
|
|
48a16d65e1 | ||
|
|
89f126ab04 | ||
|
|
67d9ca1e41 | ||
|
|
8f9d80a809 | ||
|
|
8698026e86 | ||
|
|
ec5d0ab4f7 | ||
|
|
3425920cb6 | ||
|
|
85c6da4346 | ||
|
|
93460daadf | ||
|
|
574548f360 | ||
|
|
847c4a67c9 | ||
|
|
8aab154a9f | ||
|
|
a3119d1993 | ||
|
|
0a159c803f | ||
|
|
22a7231d8f | ||
|
|
c36f6b603d | ||
|
|
05ff49616d | ||
|
|
342b889371 | ||
|
|
8e5b8712c0 | ||
|
|
f063aa16a8 | ||
|
|
2520970698 | ||
|
|
a21a825aac | ||
|
|
d66829d62d | ||
|
|
f52c5b0843 | ||
|
|
d48dc8b87b | ||
|
|
8f72756737 | ||
|
|
4fd7948987 | ||
|
|
e76833d364 | ||
|
|
3cb0094dde | ||
|
|
946c50b222 | ||
|
|
1dccee389d | ||
|
|
875c0b31b7 | ||
|
|
8bf77e27dc | ||
|
|
a51352017a | ||
|
|
68b28a17e4 | ||
|
|
463af45e73 | ||
|
|
4ccab6b8b5 | ||
|
|
1849ee807c | ||
|
|
bd7b4a1c14 | ||
|
|
c20520c877 | ||
|
|
35aec3c34f | ||
|
|
d9e18551b5 | ||
|
|
144da1ed6b | ||
|
|
125ffe9f73 | ||
|
|
a94f32dc50 | ||
|
|
8c338fc223 | ||
|
|
ca764a3165 | ||
|
|
b58547f988 | ||
|
|
05fbe8b218 | ||
|
|
823f8f0be3 | ||
|
|
b40b06a18e | ||
|
|
513250cadf | ||
|
|
216432f4b6 | ||
|
|
2b5825f841 | ||
|
|
46987845b3 | ||
|
|
e1cead8241 | ||
|
|
63f72b046d | ||
|
|
3fe39bbf73 | ||
|
|
81646a00ff | ||
|
|
8edd6a2e49 | ||
|
|
4cc3eadb97 | ||
|
|
4b9d5113d3 | ||
|
|
206751de0e | ||
|
|
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 | ||
|
|
e0f80528f4 | ||
|
|
491d8d0b72 | ||
|
|
80dcc2f63f | ||
|
|
92da2749ad | ||
|
|
83a297cf15 | ||
|
|
70b7a03c63 | ||
|
|
b1f1feda48 | ||
|
|
48fe4aa4cf | ||
|
|
0788f4eef9 | ||
|
|
fc5f097820 | ||
|
|
df7907fb8f | ||
|
|
46b5c18aca | ||
|
|
5c1ecf4618 | ||
|
|
ccc2af2a26 | ||
|
|
872d6857cd | ||
|
|
658792c1fc | ||
|
|
4a324fbf4c | ||
|
|
97d268e323 | ||
|
|
ca05583ec3 | ||
|
|
7d0a6dc7ae | ||
|
|
3ba3a3dea0 | ||
|
|
1ad08c014f | ||
|
|
3936f2dcf3 | ||
|
|
fcc71a5f74 | ||
|
|
46f6824199 | ||
|
|
7c0f884872 | ||
|
|
15493ae58e | ||
|
|
ac7c0241e5 | ||
|
|
fd933e3ed6 | ||
|
|
6a2a5278b8 | ||
|
|
687d4c06c6 | ||
|
|
19f7c6aa57 | ||
|
|
ccf1a6209f | ||
|
|
4db6f28c76 | ||
|
|
3e08ec99a5 | ||
|
|
4142f0fc71 | ||
|
|
1d9a0bc8b6 | ||
|
|
a58510c541 | ||
|
|
b2a37b7ded | ||
|
|
69528baa21 | ||
|
|
c5defaab35 | ||
|
|
af7910a6a8 | ||
|
|
86eb397866 | ||
|
|
9b1785df01 | ||
|
|
8f09a32ef5 | ||
|
|
c6d9a8a994 | ||
|
|
54855849b3 | ||
|
|
7a9590359e | ||
|
|
11eed40718 | ||
|
|
bc7eeb5d30 | ||
|
|
4916f98bcb | ||
|
|
c85dd1660e | ||
|
|
08c0c2c63f | ||
|
|
81c24d7151 | ||
|
|
3d62a73c8c | ||
|
|
b8fba91244 | ||
|
|
80dbe6efa7 | ||
|
|
3f46f1aca9 | ||
|
|
26fddcf8d4 | ||
|
|
7a4df2a050 | ||
|
|
de3d7ce726 | ||
|
|
4ffc5351af | ||
|
|
3f14c51c97 | ||
|
|
e9b4e57c06 | ||
|
|
70bb02c753 | ||
|
|
6f7090d7ba | ||
|
|
43ecda44e0 | ||
|
|
04abb716fa | ||
|
|
95ae2766cd | ||
|
|
f45f75e458 | ||
|
|
b85b9d37a1 | ||
|
|
ebd473ea11 | ||
|
|
7d7ee83ef4 | ||
|
|
27c6f275d1 | ||
|
|
39edf5ccdb | ||
|
|
90c4df7f2a | ||
|
|
ae99555fec | ||
|
|
8ff742085a | ||
|
|
86bf8866f0 | ||
|
|
a8f353de9c | ||
|
|
9b98f15f69 | ||
|
|
138d1cbeef | ||
|
|
9ead6fcca9 | ||
|
|
ced5ca4e2e | ||
|
|
ca2c9a6ae4 | ||
|
|
cae9d3b67e | ||
|
|
aa65593ce3 | ||
|
|
c10860a005 | ||
|
|
a39e12e76d | ||
|
|
b29cb85b9b | ||
|
|
6faaec53d6 | ||
|
|
b29ec8ef31 | ||
|
|
4ac1a943eb | ||
|
|
0e357f14f6 | ||
|
|
e0fd35220e | ||
|
|
ffb8501276 | ||
|
|
8981efbd2a | ||
|
|
b2f76f3fe6 | ||
|
|
98cae8928b | ||
|
|
b02b16b63e | ||
|
|
81cb46bb8b | ||
|
|
b11bf919af | ||
|
|
9ee63294a4 | ||
|
|
dbddb34ed4 | ||
|
|
71c9294978 | ||
|
|
1226d217a6 | ||
|
|
3204391521 | ||
|
|
40ebba4252 | ||
|
|
9351a263ee | ||
|
|
cb1075e6c0 | ||
|
|
33cf0422a7 | ||
|
|
bd54a180d5 | ||
|
|
b752ec9952 | ||
|
|
e688a24326 | ||
|
|
468b3e3580 | ||
|
|
e96dd7883e | ||
|
|
8e221033bf | ||
|
|
17594f95f1 | ||
|
|
9e427485f3 | ||
|
|
c389e6030c | ||
|
|
0f77300131 | ||
|
|
9856f0bc65 | ||
|
|
378d45691b | ||
|
|
e7f9f29cd3 | ||
|
|
babddd524c | ||
|
|
6ff19cb3f3 | ||
|
|
42c30bf30b | ||
|
|
50006aeb6a | ||
|
|
8edff136d0 | ||
|
|
f6fb275dff | ||
|
|
4025883765 | ||
|
|
b9b8e2b4e5 | ||
|
|
13f6640576 | ||
|
|
aa969273db | ||
|
|
a809807288 | ||
|
|
2a07bbaef9 | ||
|
|
4bc1d87782 | ||
|
|
6710112f3d | ||
|
|
7ec4c21587 | ||
|
|
9b61e0ad67 | ||
|
|
40eef74aa0 | ||
|
|
c7c4ac15d6 | ||
|
|
cf2ca1e6c7 | ||
|
|
9d0fb43fb1 | ||
|
|
99c37ad9a7 | ||
|
|
a8e15f7db0 | ||
|
|
b5c33b4fcb | ||
|
|
9e9a9a80a9 | ||
|
|
fe081779c5 | ||
|
|
1267e92117 | ||
|
|
d6f27141af | ||
|
|
4b48a97166 | ||
|
|
ed70fdc40b | ||
|
|
ade913f0e4 | ||
|
|
cd92f85691 | ||
|
|
081bf77782 | ||
|
|
4e6a6d6434 | ||
|
|
57cbbdab56 | ||
|
|
4a6a69bdef | ||
|
|
88a9193d3a | ||
|
|
4b99252a83 | ||
|
|
8b1186c4f9 | ||
|
|
2e36b7e03b | ||
|
|
b7751bde1a | ||
|
|
f021215cbb | ||
|
|
9191eb4535 | ||
|
|
0fdb760d6f | ||
|
|
a46221ad04 | ||
|
|
da5c65e42e | ||
|
|
3594c348ee | ||
|
|
c40ad31ed0 | ||
|
|
4579f16518 | ||
|
|
49a0a4e127 | ||
|
|
d208e6dccb | ||
|
|
8b2a2f8074 | ||
|
|
84ffe5d4eb | ||
|
|
39301e7091 | ||
|
|
0a29809f7a | ||
|
|
4332bce401 | ||
|
|
42f4eb9c7b | ||
|
|
bd5e5b0b94 | ||
|
|
c763e8831f | ||
|
|
0616560e3e | ||
|
|
c7a898a89d | ||
|
|
377284f491 | ||
|
|
93968814db | ||
|
|
941ff4cd4a | ||
|
|
4d2de519a1 | ||
|
|
8fd315e389 | ||
|
|
fe786b5888 | ||
|
|
28711df45a | ||
|
|
f77f2e6e29 | ||
|
|
707114805d | ||
|
|
aebed9347b | ||
|
|
aa1c46738b | ||
|
|
080ae5df3a | ||
|
|
c04fa362b1 | ||
|
|
c7280e6018 | ||
|
|
374f9556d1 | ||
|
|
ec6455647f | ||
|
|
7081fe0338 | ||
|
|
8b6182dded | ||
|
|
f2fd360d23 | ||
|
|
8ccba57d98 | ||
|
|
7efb1428f5 | ||
|
|
46cfe0b18a | ||
|
|
2f74c400bd | ||
|
|
7c24682584 | ||
|
|
215a2104a1 | ||
|
|
aae02b7420 | ||
|
|
48867d44be | ||
|
|
d3b9bc08c9 | ||
|
|
1bf839601a | ||
|
|
bd763596b9 | ||
|
|
dc12c7bdd2 | ||
|
|
4ddec66d7b | ||
|
|
839849bf8d | ||
|
|
b4ac74aa55 | ||
|
|
8ac58a4612 | ||
|
|
08325c8cf7 | ||
|
|
43f4e9e790 | ||
|
|
f497ac54f1 | ||
|
|
f323bec9ca | ||
|
|
24a6c9c34f | ||
|
|
4f456c75f7 | ||
|
|
8705b91bd3 | ||
|
|
16814f2d12 | ||
|
|
b9ee7b6b01 | ||
|
|
344cb5c749 | ||
|
|
4556938154 | ||
|
|
a2b7ff688d | ||
|
|
df71cb9cf8 | ||
|
|
927dbbabb6 | ||
|
|
7544aae394 | ||
|
|
868721c6f5 | ||
|
|
1d9661d0b0 | ||
|
|
e7fd57afdf | ||
|
|
ad51278ba5 | ||
|
|
606eb01a67 | ||
|
|
94287ddec4 | ||
|
|
3d6d473145 | ||
|
|
565a143c71 | ||
|
|
c959d97fd1 | ||
|
|
62c122e7ee | ||
|
|
f3b3904b43 | ||
|
|
883237a41c | ||
|
|
dd369118c5 | ||
|
|
b0aa62b044 | ||
|
|
84a141d9c5 | ||
|
|
acb764a040 | ||
|
|
37be5c9446 | ||
|
|
cd8d9a4a3d | ||
|
|
b1baa5609a | ||
|
|
614b4d48b6 | ||
|
|
0b98050ea1 | ||
|
|
3e0a6d9ba6 | ||
|
|
94c4a0c909 | ||
|
|
ae454026dc | ||
|
|
e9e6290151 | ||
|
|
d7ed07f4f4 | ||
|
|
ed3234ff30 | ||
|
|
1ff7e271a5 | ||
|
|
5e4a6af3b7 | ||
|
|
34d8ef7637 | ||
|
|
cb760d9ed8 | ||
|
|
5af96fb082 | ||
|
|
248c47d94a | ||
|
|
1ee5b66a45 | ||
|
|
fc0e691569 | ||
|
|
2ad00de947 | ||
|
|
6445c463a4 | ||
|
|
1b8d40d7ed | ||
|
|
4d6a5189c1 | ||
|
|
326b074a22 | ||
|
|
ccbe227666 | ||
|
|
228b99ebbf | ||
|
|
9df3236176 | ||
|
|
546b94f1e9 | ||
|
|
dbec337742 | ||
|
|
e387ddaf1a | ||
|
|
2fc34a55b1 | ||
|
|
17b0f452ca | ||
|
|
0f34a6ace4 | ||
|
|
58dc5e3062 | ||
|
|
c00c604c21 | ||
|
|
0132c9092c | ||
|
|
efff9d20c1 | ||
|
|
07a32a0deb | ||
|
|
b546883d2a | ||
|
|
0569275c4e | ||
|
|
e3288ae759 | ||
|
|
64f1b4191a | ||
|
|
1c1b89db21 | ||
|
|
ee30b178b4 | ||
|
|
44b5404fe7 | ||
|
|
78ca94e036 | ||
|
|
d7a61080e2 | ||
|
|
27e1bfe871 | ||
|
|
7d70fa70a6 | ||
|
|
6bd6080ccc | ||
|
|
b311eca62e | ||
|
|
99a804c1ac | ||
|
|
5f3a81ee5c | ||
|
|
af8b88d030 | ||
|
|
08368b6279 | ||
|
|
97d37b5ad9 | ||
|
|
969abe1d34 | ||
|
|
5a40c31af3 | ||
|
|
62977bf89f | ||
|
|
f88baad4b7 | ||
|
|
27de99fe78 | ||
|
|
44515ee999 | ||
|
|
90c1934d92 | ||
|
|
bb3fbb03b1 | ||
|
|
d6926fee9f | ||
|
|
ba47d5e4ff | ||
|
|
fe14180ec5 | ||
|
|
15d15b9750 | ||
|
|
46af17845f | ||
|
|
2c706dc752 | ||
|
|
4893da0e43 | ||
|
|
26bee3e5a6 | ||
|
|
1b41c93441 | ||
|
|
1dd9a7ea2c | ||
|
|
6286f6cc11 | ||
|
|
094a293c78 | ||
|
|
8ae21bbcb7 | ||
|
|
035f2ad946 | ||
|
|
54fe0c4c30 | ||
|
|
d43015e8c9 | ||
|
|
7a46078734 | ||
|
|
3007173833 | ||
|
|
96c349b099 | ||
|
|
e5e74f3ffb | ||
|
|
851333b72c | ||
|
|
00045c3f97 | ||
|
|
cc9adeef47 | ||
|
|
37c80deb83 | ||
|
|
9d765efc94 | ||
|
|
4e071c9fbb | ||
|
|
fe6820920b | ||
|
|
08dcd9e384 | ||
|
|
31877528b1 | ||
|
|
7fad710277 | ||
|
|
7bcb1d7531 | ||
|
|
0863b4ebba | ||
|
|
20fed1d457 | ||
|
|
bc514889a8 | ||
|
|
868de15fcb | ||
|
|
dad16b7a71 | ||
|
|
de06b64e4e | ||
|
|
ac667a23dc | ||
|
|
54fbb4e7d7 | ||
|
|
cda41622e4 | ||
|
|
802a0e6a59 | ||
|
|
77222c1989 | ||
|
|
bb9ab9bd9c | ||
|
|
a1eb735d96 | ||
|
|
aee5f3d27e | ||
|
|
97ff190ba5 | ||
|
|
1afbc03304 | ||
|
|
5e8367681b | ||
|
|
bac80e3a92 | ||
|
|
5a4ac8dde3 | ||
|
|
e994cd5444 | ||
|
|
d486202c4f | ||
|
|
298135dabc | ||
|
|
eb51b680aa | ||
|
|
48acd204f1 | ||
|
|
2929dfe9dd | ||
|
|
290533612e | ||
|
|
13127c4dc7 | ||
|
|
5cf73130c5 | ||
|
|
4b16b68f24 | ||
|
|
e03611080e | ||
|
|
ff7b305058 | ||
|
|
0d76974e69 | ||
|
|
87c242b35f | ||
|
|
e43f7ac7bb | ||
|
|
c9c389e9f3 | ||
|
|
b06e103895 | ||
|
|
2cb322f88f | ||
|
|
ed15532cc4 | ||
|
|
a61bc10dde | ||
|
|
43189d0748 | ||
|
|
e1e5434e2a | ||
|
|
aed9fb8dd7 | ||
|
|
b3b19ab4c5 | ||
|
|
55ad3a20c2 | ||
|
|
e53265cca8 | ||
|
|
cf20194e23 | ||
|
|
8802831831 | ||
|
|
a1e1883ddc | ||
|
|
9607300514 | ||
|
|
8e8b5d84dc | ||
|
|
25fa78eedb | ||
|
|
4f367eb168 | ||
|
|
d020b53215 | ||
|
|
e1bfac5eae |
7
.bowerrc
Normal file
7
.bowerrc
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"directory": "public/bower_components",
|
||||
"scripts": {
|
||||
"postinstall": "grunt default genlicense",
|
||||
"postuninstall": "grunt default genlicense"
|
||||
}
|
||||
}
|
||||
20
.dockerignore
Normal file
20
.dockerignore
Normal file
@@ -0,0 +1,20 @@
|
||||
node_modules
|
||||
tmp
|
||||
application/config/email.php
|
||||
application/config/database.php
|
||||
*.patch
|
||||
patches/
|
||||
.idea/
|
||||
git-svn-diff.py
|
||||
*.bash
|
||||
.swp
|
||||
.buildpath
|
||||
.project
|
||||
.settings/*
|
||||
*.swp
|
||||
*.rej
|
||||
*.orig
|
||||
*~
|
||||
*.~
|
||||
*.log
|
||||
application/sessions/*
|
||||
5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
dist/ merge=ours
|
||||
application/language/**/*.php merge=ours
|
||||
text=auto
|
||||
application/config/config.php ident
|
||||
application/views/partial/footer.php ident
|
||||
32
.github/ISSUE_TEMPLATE.md
vendored
Normal file
32
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
### New Feature or Enhacement
|
||||
|
||||
For new Features or Enhacements please remove all the template text and clearly write your proposal.
|
||||
It's important to state whether you expect the community to implement it or you will contribute the work.
|
||||
Please bear in mind that we will implement new features only on the current code, there is no support for old versions.
|
||||
|
||||
|
||||
### Issue, Question or Bug
|
||||
|
||||
Before submitting an issue please make sure you remove the first section of the template and you tick (add a x between the square brakets) and agree with all the following check boxes:
|
||||
|
||||
- [] Checked the current issues database and no similar issue was already discussed
|
||||
- [] Read the README, WHATS_NEW and UPGRADE
|
||||
- [] Read the FAQ (https://github.com/jekkos/opensourcepos#faq) for any known install and/or upgrade gotchas (in specific PHP has php5-gd, php-intl and sockets installed)
|
||||
- [] Reporting an issue of an unmodified OSPOS installation
|
||||
- [] Ran any database upgrade scripts (e.g. database/2.4_to_3.0.sql)
|
||||
- [] PHP version is at least 5.5 and not 7.x
|
||||
- [] Know the version of OSPOS and git commit hash (check the footer of your OSPOS) and will add to my issue report
|
||||
- [] Know the name and version of OS, Web server and MySQL and will add to my issue report
|
||||
|
||||
IMPORTANT: If you remove the template when submitting an issue your issue will be closed.
|
||||
|
||||
### Installation information
|
||||
|
||||
|
||||
### Expected behaviour
|
||||
|
||||
|
||||
### Actual behaviour
|
||||
|
||||
|
||||
### Steps to reproduce the issue
|
||||
20
.gitignore
vendored
20
.gitignore
vendored
@@ -1,10 +1,26 @@
|
||||
node_modules
|
||||
public/bower_components
|
||||
tmp/
|
||||
bower_components
|
||||
public/bower_components
|
||||
tmp/
|
||||
application/config/email.php
|
||||
application/config/database.php
|
||||
*.patch
|
||||
patches/
|
||||
.idea/
|
||||
git-svn-diff.py
|
||||
*.bash
|
||||
*.sh
|
||||
*.swp
|
||||
.swp
|
||||
.buildpath
|
||||
.project
|
||||
.settings/*
|
||||
*.swp
|
||||
*.rej
|
||||
*.orig
|
||||
*~
|
||||
*.~
|
||||
*.log
|
||||
application/sessions/*
|
||||
public/license/.licenses
|
||||
vendor/mikey179
|
||||
|
||||
75
.htaccess
Executable file
75
.htaccess
Executable file
@@ -0,0 +1,75 @@
|
||||
RewriteEngine On
|
||||
|
||||
# To redirect a subdomain to a subdir because of https not supporting wildcards
|
||||
# replace values between <> with your ones
|
||||
# RewriteCond %{HTTP_HOST} ^<OSPOS subdomain>\.<my web domain>\.com$ [OR]
|
||||
# RewriteCond %{HTTP_HOST} ^www\.<OSPOS subdomain>\.<my web domain>\.com$
|
||||
# RewriteRule ^/?$ "https\:\/\/www\.<my web domain>\.com\/<OSPOS path>" [R=301,L]
|
||||
|
||||
# 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]
|
||||
|
||||
# Suppress index.php from OSPOS URL
|
||||
# Remember to set in application/config/config.php $config['index_page'] = '';
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
# if in web root
|
||||
RewriteRule ^(.*)$ index.php?/$1 [L]
|
||||
# if in subdir comment above line, uncomment below one and replace <OSPOS path> with your path
|
||||
# RewriteRule ^(.*)$ /<OSPOS path>/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 COPYING
|
||||
<Files COPYING>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</Files>
|
||||
|
||||
# prevent access to csv and txt files
|
||||
<FilesMatch "\.(csv|txt)$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</FilesMatch>
|
||||
|
||||
# control 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.xxx
|
||||
</Files>
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
<FilesMatch "\.(jpe?g|png|gif|js|css)$">
|
||||
ExpiresActive On
|
||||
ExpiresDefault "access plus 1 week"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
21
.travis.yml
Normal file
21
.travis.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
sudo: true # Required to install packages
|
||||
|
||||
branches:
|
||||
except:
|
||||
- weblate
|
||||
|
||||
services:
|
||||
- docker
|
||||
before_install:
|
||||
- curl -L https://github.com/docker/compose/releases/download/1.7.1/docker-compose-`uname -s`-`uname -m` > docker-compose
|
||||
- chmod +x docker-compose
|
||||
- sudo mv docker-compose /usr/local/bin
|
||||
script:
|
||||
- docker-compose build
|
||||
- docker-compose up -d
|
||||
env:
|
||||
- TAG=$(echo ${TRAVIS_BRANCH} | sed s/feature\\///)
|
||||
after_success:
|
||||
-
|
||||
- '[ -n ${DOCKER_USERNAME} ] && docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && docker tag opensourcepos_php "jekkos/opensourcepos:$TAG" && docker tag opensourcepos_sqlscript jekkos/opensourcepos:sqlscript && docker push "jekkos/opensourcepos:$TAG" && docker push jekkos/opensourcepos:sqlscript'
|
||||
|
||||
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM php:5-apache
|
||||
MAINTAINER jekkos
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
php5-apcu \
|
||||
libicu-dev \
|
||||
libgd-dev \
|
||||
sendmail
|
||||
|
||||
RUN a2enmod rewrite
|
||||
RUN docker-php-ext-install mysql mysqli bcmath intl gd sockets mbstring
|
||||
RUN echo "date.timezone = \"\${PHP_TIMEZONE}\"" > /usr/local/etc/php/conf.d/timezone.ini
|
||||
RUN echo -e “$(hostname -i)\t$(hostname) $(hostname).localhost” >> /etc/hosts
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN ln -s /app/*[^public] /var/www && rm -rf /var/www/html && ln -nsf /app/public /var/www/html
|
||||
RUN chmod 775 /app/public/uploads
|
||||
|
||||
RUN cp application/config/database.php.tmpl application/config/database.php && \
|
||||
sed -i -e "s/\(localhost\)/web/g" test/ospos.js && \
|
||||
sed -i -e "s/\(user.*\?=.\).*\(.\)$/\1getenv('MYSQL_USERNAME')\2/g" application/config/database.php && \
|
||||
sed -i -e "s/\(password.*\?=.\).*\(.\)$/\1getenv('MYSQL_PASSWORD')\2/g" application/config/database.php && \
|
||||
sed -i -e "s/\(database.*\?=.\).*\(.\)$/\1getenv('MYSQL_DB_NAME')\2/g" application/config/database.php && \
|
||||
sed -i -e "s/\(hostname.*\?=.\).*\(.\)$/\1getenv('MYSQL_HOST_NAME')\2/g" application/config/database.php
|
||||
9
Dockerfile.dev
Normal file
9
Dockerfile.dev
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM jekkos/opensourcepos:master
|
||||
MAINTAINER jekkos
|
||||
|
||||
RUN mkdir -p /app/bower_components && ln -s /app/bower_components /var/www/html/bower_components
|
||||
RUN yes | pecl install xdebug \
|
||||
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
11
Dockerfile.test
Normal file
11
Dockerfile.test
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM digitallyseamless/nodejs-bower-grunt:5
|
||||
MAINTAINER jekkos
|
||||
|
||||
# apt-get install curl
|
||||
|
||||
COPY Gruntfile.js .
|
||||
COPY package.json .
|
||||
COPY test .
|
||||
RUN npm install
|
||||
|
||||
CMD ['while ! curl web/index.php | grep username; do sleep 1; done; grunt mochaWebdriver:test']
|
||||
229
Gruntfile.js
Normal file
229
Gruntfile.js
Normal file
@@ -0,0 +1,229 @@
|
||||
module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
wiredep: {
|
||||
task: {
|
||||
ignorePath: '../../../public/',
|
||||
src: ['application/views/partial/header.php']
|
||||
}
|
||||
},
|
||||
bower_concat: {
|
||||
all: {
|
||||
mainFiles: {
|
||||
'bootstrap-table': [ "src/bootstrap-table.js", "src/bootstrap-table.css", "dist/extensions/export/bootstrap-table-export.js", "dist/extensions/mobile/bootstrap-table-mobile.js"]
|
||||
},
|
||||
dest: {
|
||||
'js': 'tmp/opensourcepos_bower.js',
|
||||
'css': 'tmp/opensourcepos_bower.css'
|
||||
}
|
||||
}
|
||||
},
|
||||
bowercopy: {
|
||||
options: {
|
||||
report: false
|
||||
},
|
||||
targetdistbootswatch: {
|
||||
options: {
|
||||
srcPrefix: 'public/bower_components/bootswatch',
|
||||
destPrefix: 'public/dist/bootswatch'
|
||||
},
|
||||
files: {
|
||||
'cerulean/bootstrap.min.css': 'cerulean/bootstrap.min.css',
|
||||
'cosmo/bootstrap.min.css': 'cosmo/bootstrap.min.css',
|
||||
'cyborg/bootstrap.min.css': 'cyborg/bootstrap.min.css',
|
||||
'darkly/bootstrap.min.css': 'darkly/bootstrap.min.css',
|
||||
'flatly/bootstrap.min.css': 'flatly/bootstrap.min.css',
|
||||
'journal/bootstrap.min.css': 'journal/bootstrap.min.css',
|
||||
'paper/bootstrap.min.css': 'paper/bootstrap.min.css',
|
||||
'readable/bootstrap.min.css': 'readable/bootstrap.min.css',
|
||||
'sandstone/bootstrap.min.css': 'sandstone/bootstrap.min.css',
|
||||
'slate/bootstrap.min.css': 'slate/bootstrap.min.css',
|
||||
'spacelab/bootstrap.min.css': 'spacelab/bootstrap.min.css',
|
||||
'superhero/bootstrap.min.css': 'superhero/bootstrap.min.css',
|
||||
'united/bootstrap.min.css': 'united/bootstrap.min.css',
|
||||
'yeti/bootstrap.min.css': 'yeti/bootstrap.min.css',
|
||||
'fonts': 'fonts'
|
||||
}
|
||||
},
|
||||
targetlicense: {
|
||||
options: {
|
||||
srcPrefix: './'
|
||||
},
|
||||
files: {
|
||||
'public/license': 'LICENSE'
|
||||
}
|
||||
},
|
||||
},
|
||||
cssmin: {
|
||||
target: {
|
||||
files: {
|
||||
'public/dist/<%= pkg.name %>.min.css': ['tmp/opensourcepos_bower.css', 'public/css/*.css', '!public/css/login.css', '!public/css/invoice_email.css', '!public/css/barcode_font.css', '!public/css/style.css']
|
||||
}
|
||||
}
|
||||
},
|
||||
concat: {
|
||||
js: {
|
||||
options: {
|
||||
separator: ';'
|
||||
},
|
||||
files: {
|
||||
'tmp/<%= pkg.name %>.js': ['tmp/opensourcepos_bower.js', 'public/js/jquery*', 'public/js/*.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: {
|
||||
'public/dist/<%= pkg.name %>.min.js': ['tmp/<%= pkg.name %>.js']
|
||||
}
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
files: ['Gruntfile.js', 'public/js/*.js'],
|
||||
options: {
|
||||
// options here to override JSHint defaults
|
||||
globals: {
|
||||
jQuery: true,
|
||||
console: true,
|
||||
module: true,
|
||||
document: true
|
||||
}
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
css_header: {
|
||||
options: {
|
||||
scriptTemplate: '<rel type="text/css" src="{{ path }}"></rel>',
|
||||
openTag: '<!-- start css template tags -->',
|
||||
closeTag: '<!-- end css template tags -->',
|
||||
ignorePath: '../../../public/'
|
||||
},
|
||||
src: ['public/css/*.css', '!public/css/login.css', '!public/css/invoice_email.css', '!public/css/barcode_font.css'],
|
||||
dest: 'application/views/partial/header.php',
|
||||
},
|
||||
mincss_header: {
|
||||
options: {
|
||||
scriptTemplate: '<rel type="text/css" src="{{ path }}"></rel>',
|
||||
openTag: '<!-- start mincss template tags -->',
|
||||
closeTag: '<!-- end mincss template tags -->',
|
||||
ignorePath: '../../../public/'
|
||||
},
|
||||
src: ['public/dist/*.css', '!public/dist/login.css', '!public/dist/invoice_email.css', '!public/dist/barcode_font.css'],
|
||||
dest: 'application/views/partial/header.php',
|
||||
},
|
||||
css_login: {
|
||||
options: {
|
||||
scriptTemplate: '<rel type="text/css" src="{{ path }}"></rel>',
|
||||
openTag: '<!-- start css template tags -->',
|
||||
closeTag: '<!-- end css template tags -->',
|
||||
ignorePath: '../../public/'
|
||||
},
|
||||
src: ['public/dist/login.css'],
|
||||
dest: 'application/views/login.php'
|
||||
},
|
||||
js: {
|
||||
options: {
|
||||
scriptTemplate: '<script type="text/javascript" src="{{ path }}"></script>',
|
||||
openTag: '<!-- start js template tags -->',
|
||||
closeTag: '<!-- end js template tags -->',
|
||||
ignorePath: '../../../public/'
|
||||
},
|
||||
src: ['public/js/jquery*', 'public/js/*.js'],
|
||||
dest: 'application/views/partial/header.php'
|
||||
},
|
||||
minjs: {
|
||||
options: {
|
||||
scriptTemplate: '<script type="text/javascript" src="{{ path }}"></script>',
|
||||
openTag: '<!-- start minjs template tags -->',
|
||||
closeTag: '<!-- end minjs template tags -->',
|
||||
ignorePath: '../../../public/'
|
||||
},
|
||||
src: ['public/dist/*min.js'],
|
||||
dest: 'application/views/partial/header.php'
|
||||
}
|
||||
},
|
||||
mochaWebdriver: {
|
||||
options: {
|
||||
timeout: 1000 * 60 * 3
|
||||
},
|
||||
test : {
|
||||
options: {
|
||||
usePhantom: true,
|
||||
usePromises: true
|
||||
},
|
||||
src: ['test/**/*.js']
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
files: ['<%= jshint.files %>'],
|
||||
tasks: ['jshint']
|
||||
},
|
||||
cachebreaker: {
|
||||
dev: {
|
||||
options: {
|
||||
match: [ {
|
||||
'opensourcepos.min.js': 'public/dist/opensourcepos.min.js',
|
||||
'opensourcepos.min.css': 'public/dist/opensourcepos.min.css'
|
||||
} ],
|
||||
replacement: 'md5'
|
||||
},
|
||||
files: {
|
||||
src: ['application/views/partial/header.php', 'application/views/login.php']
|
||||
}
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
license: ['public/bower_components/**/bower.json']
|
||||
},
|
||||
license: {
|
||||
all: {
|
||||
// Target-specific file lists and/or options go here.
|
||||
options: {
|
||||
// Target-specific options go here.
|
||||
directory: 'public/bower_components',
|
||||
output: 'public/license/bower.LICENSES'
|
||||
},
|
||||
},
|
||||
},
|
||||
'bower-licensechecker': {
|
||||
options: {
|
||||
/*directory: 'path/to/bower',*/
|
||||
acceptable: [ 'MIT', 'BSD', 'LICENSE.md' ],
|
||||
printTotal: true,
|
||||
warn: {
|
||||
nonBower: true,
|
||||
noLicense: true,
|
||||
allGood: true,
|
||||
noGood: true
|
||||
},
|
||||
log: {
|
||||
outFile: 'public/license/.licenses',
|
||||
nonBower: true,
|
||||
noLicense: true,
|
||||
allGood: true,
|
||||
noGood: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
require('load-grunt-tasks')(grunt);
|
||||
grunt.loadNpmTasks('grunt-mocha-webdriver');
|
||||
|
||||
grunt.registerTask('default', ['wiredep', 'bower_concat', 'bowercopy', 'concat', 'uglify', 'cssmin', 'tags', 'cachebreaker']);
|
||||
grunt.registerTask('genlicense', ['clean:license', 'license', 'bower-licensechecker']);
|
||||
|
||||
};
|
||||
19
LICENSE
19
LICENSE
@@ -1,6 +1,15 @@
|
||||
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)
|
||||
Copyright (c) 2016 Ramkrishna Mondal (aka RamkrishnaMondal)
|
||||
|
||||
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
|
||||
@@ -12,9 +21,15 @@ subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
You cannot claim copyright or ownership of the Software.
|
||||
|
||||
Footer signatures "You are using Open Source Point Of Sale" and/or "Open Source Point Of Sale"
|
||||
with version, hash and URL link to the original distribution of the code MUST BE RETAINED,
|
||||
MUST BE VISIBLE IN EVERY PAGE and CANNOT BE MODIFIED.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
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.
|
||||
164
README.md
164
README.md
@@ -1,4 +1,162 @@
|
||||
ospos
|
||||
=====
|
||||
[](https://travis-ci.org/jekkos/opensourcepos)
|
||||
[](https://gitter.im/jekkos/opensourcepos?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://david-dm.org/jekkos/opensourcepos#info=devDependencie)
|
||||
[](https://gemnasium.com/github.com/jekkos/opensourcepos)
|
||||
[](https://badge.fury.io/gh/jekkos%2Fopensourcepos)
|
||||
[](http://weblate.jpeelaer.net/engage/ospos/?utm_source=widget)
|
||||
|
||||
Open Source Point of Sale
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Open Source Point of Sale is a web based point of sale system.
|
||||
The main features are:
|
||||
* Stock management
|
||||
* Sale register with transactions logging
|
||||
* Receipt and invoice printing and emailing
|
||||
* Suppliers and Customers database
|
||||
* Multiuser with permission control
|
||||
* Reporting
|
||||
* Gift card
|
||||
* Receivings
|
||||
* Barcode generation and printing
|
||||
* Messaging
|
||||
* Multilanguage
|
||||
* Different UI themes
|
||||
|
||||
The software is written in PHP language, it uses MySQL or MariaDB as data storage back-end and has a simple but intuitive user interface.
|
||||
|
||||
The latest version 3.0.0 is a complete overhaul of the original software.
|
||||
It is now based on Bootstrap 3.x using Bootswatch themes, and still uses CodeIgniter 3.x as framework.
|
||||
It also has improved functionality and security.
|
||||
|
||||
Deployed to a Cloud it can be defined as a SaaS (Software as as Service) type of solution.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Open Source Point of Sale is licensed under MIT terms with an important addition:
|
||||
|
||||
_The footer signature "You are using Open Source Point Of Sale" with version,
|
||||
hash and link to the original distribution of the code MUST BE RETAINED,
|
||||
MUST BE VISIBLE IN EVERY PAGE and CANNOT BE MODIFIED._
|
||||
|
||||
Also worth noting:
|
||||
|
||||
_The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software._
|
||||
|
||||
For more details please read the file __LICENSE__.
|
||||
|
||||
It's important to understand that althought you are free to use the software the copyright stays and the license agreement applies in all cases.
|
||||
Therefore any actions like:
|
||||
|
||||
- Removing LICENSE and any license files is prohibited
|
||||
- Authoring the footer notice replacing it with your own or even worse claiming the copyright is absolutely prohibited
|
||||
- Claiming full ownership of the code is prohibited
|
||||
|
||||
In short you are free to use the software but you cannot claim any property on it.
|
||||
|
||||
Any person or company found breaching the license agreement will be chased up.
|
||||
|
||||
Keep the Machine Running
|
||||
------------------------
|
||||
If you like the project, and you are making money out of it on a daily basis, then consider buying me a coffee so I can keep adding features.
|
||||
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MUN6AEG7NY6H8)
|
||||
|
||||
Server Requirements
|
||||
-------------------
|
||||
PHP version 5.5 or newer is recommended but PHP 7.x is not fully supported yet.
|
||||
MySQL 5.5 or 5.6 are fine but MySQL 5.7 is not supported yet.
|
||||
|
||||
Local install
|
||||
-------------
|
||||
1. Create/locate a new mysql database to install open source point of sale into
|
||||
2. Execute the file database/database.sql to create the tables needed
|
||||
3. unzip and upload Open Source Point of Sale files to web server
|
||||
4. Copy application/config/database.php.tmpl to application/config/database.php
|
||||
5. Modify application/config/database.php to connect to your database
|
||||
6. Modify application/config/config.php encryption key with your own
|
||||
7. Go to your point of sale install public dir via the browser
|
||||
8. LOGIN using
|
||||
* username: admin
|
||||
* password: pointofsale
|
||||
9. Enjoy
|
||||
10. Oops an issue? Please read the FAQ first thing :-)
|
||||
|
||||
P.S.: For more info about a local install based on Raspberry PI please read our wiki
|
||||
|
||||
Local 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-compose build
|
||||
docker-compose up
|
||||
|
||||
Cloud install
|
||||
-------------
|
||||
A quick option would be to install directly to [Digitalocean](https://m.do.co/c/ac38c262507b) using their preconfigured LAMP stack.
|
||||
Create a DO account first, add a droplet with preconfigured LAMP and follow the instructions for Local Install below. You will be running a provisioned VPS within minutes.
|
||||
|
||||
Cloud install using Docker
|
||||
--------------------------
|
||||
If you want to run a quick demo of ospos or run it permanently in the cloud, then we
|
||||
suggest using Docker cloud together with the DigitalOcean hosting platform. This way all the
|
||||
configuration is done automatically and the install will just work.
|
||||
|
||||
If you choose *DigitalOcean* [through this link](https://m.do.co/c/ac38c262507b), you will get a *$10 credit* for a first
|
||||
month of uptime on the platform. A full setup will only take about 2 minutes by following steps below.
|
||||
|
||||
1. Create a [Digitalocean account](https://m.do.co/c/ac38c262507b)
|
||||
2. Create a [docker cloud account](https://cloud.docker.com)
|
||||
3. Login to docker cloud
|
||||
4. Associate your docker cloud account with your previously created digital ocean account under settings
|
||||
5. Create a new node on DigitalOcean through the `Infrastructure > Nodes` tab. Fill in a name (ospos) and choose a region near to you. We recommend to choose a node with minimum 1G RAM for the whole stack
|
||||
6. Click [](https://cloud.docker.com/stack/deploy/?repo=https://github.com/jekkos/opensourcepos)
|
||||
7. Othewise create a new stack under `Applications > Stacks` and paste the [contents of docker-cloud.yml](https://github.com/jekkos/opensourcepos/blob/master/docker-cloud.yml) from the source repository in the text field and hit `Create and deploy`
|
||||
8. Find your website url under `Infrastructure > Nodes > <yournode> > Endpoints > web`
|
||||
9. Login with default username/password admin/pointofsale
|
||||
10. DNS name for this server can be easily configured in the DigitalOcean control panel
|
||||
|
||||
More info [on maintaining a docker](https://github.com/jekkos/opensourcepos/wiki/Docker-cloud-maintenance) install can be found on the wiki
|
||||
|
||||
Reporting Bugs
|
||||
--------------
|
||||
Since OSPOS 3.0.0 is a version under development, please make sure you always run the latest 2.4_to_3.0.sql database upgrade script.
|
||||
Please DO NOT post issues if you have not done that before running OSPOS 3.0.
|
||||
Please also make sure you have updated all the files from latest master.
|
||||
|
||||
Bug reports must follow this schema:
|
||||
|
||||
1. Ospos **version string with git commit hash** (see ospos footer)
|
||||
2. OS name and version running your Web Server (e.g. Linux Ubuntu 15.0)
|
||||
3. Web Server name and version (e.g. Apache 2.4)
|
||||
4. Database name and version (e.g. =< MySQL 5.6)
|
||||
5. PHP version (e.g. PHP 5.5)
|
||||
6. Language selected in OSPOS (e.g. English, Spanish)
|
||||
7. Any configuration of OSPOS that you changed
|
||||
8. Exact steps to reproduce the issue (test case)
|
||||
9. Optionally some screenshots to illustrate each step
|
||||
|
||||
If above information is not provided in full, your issue will be tagged as pending.
|
||||
If missing information is not provided within a week we will close your issue.
|
||||
|
||||
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.
|
||||
|
||||
* If sales and receiving views don't show properly, please make sure BCMath lib (php-bcmath) is installed. On windows check php.ini and make sure php_bcmath extension is not commented out
|
||||
|
||||
* If the following error is seen in sales module `Message: Class 'NumberFormatter' not found` then you don't have `php5-intl` extension installed. Please check the [wiki](https://github.com/jekkos/opensourcepos/wiki/Localisation-support#php5-intl-extension-installation) to resolve this issue on your platform.
|
||||
|
||||
* If you are getting the error `Message: Can't use method return value in write context` that means that you are probably using PHP7 which is not completely supported yet. Check your hosting configuration to verify whether you have a supported PHP version installed
|
||||
|
||||
* If you read errors containing messages with Socket word in it, please make sure you have installed PHP Sockets support (e.g. go to PHP.ini and make sure all the needed modules are not commented out. This means php5-gd, php-intl and php-sockets. Restart the web server)
|
||||
|
||||
* If you get various errors at item creation, opening views or reports, or having issues at login please make sure you are not using MySQL5.7 as it's not supported yet
|
||||
|
||||
* If you installed your OSPOS under a web server subdir, please edit public/.htaccess and go to the lines with comment `if in web root` and `if in subdir comment above line, uncomment below one and replace <OSPOS path> with your path` and follow the instruction on the second comment line. If you face more issues please read [issue #920](https://github.com/jekkos/opensourcepos/issues/920) for more help
|
||||
|
||||
* If the avatar pictures are not shown in Items or at Item save time you get an error, please make sure your public and subdirs are assigned to the correct owner and the access permission is set to 755
|
||||
|
||||
13
README.txt
13
README.txt
@@ -1,13 +0,0 @@
|
||||
How to Install
|
||||
-------------------------
|
||||
1. Create/locate a new mysql database to install open source point of sale into
|
||||
2. Execute the file database/database.sql to create the tables needed
|
||||
3. unzip and upload Open Source Point of Sale files to web server
|
||||
4. Copy application/config/database.php.tmpl to application/config/database.php
|
||||
5. Modify application/config/database.php to connect to your database
|
||||
6. Modify application/config/config.php encryption key with your own
|
||||
7. Go to your point of sale install via the browser
|
||||
8. LOGIN using
|
||||
username: admin
|
||||
password:pointofsale
|
||||
9. Enjoy
|
||||
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 the 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 FAQ and/or GitHub issues as somebody else might have had your problem already or post a question
|
||||
|
||||
137
WHATS_NEW.txt
137
WHATS_NEW.txt
@@ -1,12 +1,139 @@
|
||||
* Ver. 2.1.0
|
||||
Version 3.0.0
|
||||
-----------
|
||||
+ *CodeIgniter 3.1 Upgrade*
|
||||
+ Major UI overhaul based on *Boostrap 3.0 and Bootswatch Themes*
|
||||
+ New tabular views with advanced filtering using *Bootstrap Tables*
|
||||
+ New graphical reports with no more Adobe flash dependency
|
||||
+ Redesign of all modal dialogs
|
||||
+ Updated Sales register with simplified payment flow
|
||||
+ *Improved security: MySQL injection, XSS, CSFR, BCrypt password encryption, safer project layout*
|
||||
+ Support for TXT messaging (interfacing to specific support required)
|
||||
+ Email configuration
|
||||
+ Improved Localisation support
|
||||
+ Improved Store Config page
|
||||
+ Docker container ready for Cloud installation
|
||||
+ Composer PHP support
|
||||
+ More languages and integration with Weblate for continuous translation
|
||||
+ About 280 closed issues under 3.0.0 release label, too many to produce a meaningful list
|
||||
+ Various code cleanup, refactoring, optimisation and etc.
|
||||
|
||||
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
|
||||
+ Sale invoice templating
|
||||
+ Configurable barcode generation for items
|
||||
+ Stock location filtering in detailed sales and receivings reports
|
||||
+ Giftcards bugfixes
|
||||
+ Proper pagination support for most modules
|
||||
+ Language updates
|
||||
+ Bugfix for decimal taxrates
|
||||
+ Add gender + company name attributes to customer
|
||||
+ Stock location config screen refactor
|
||||
+ Basic travis-ci + phantomJs setup
|
||||
+ Database backup on admin logout
|
||||
+ Modifiable item thumbnails
|
||||
+ Email invoice PDF generation using DomPDF
|
||||
+ Modifiable company logo
|
||||
+ jQuery upgrade (1.2 -> 1.8.3)
|
||||
+ Javascript minification (using grunt)
|
||||
+ Numerous bugfixes
|
||||
|
||||
Version 2.3.1
|
||||
-------------
|
||||
|
||||
+ Extra report permissions (this includes a refactoring of the database model - new grants table)
|
||||
+ Tax inclusive/exclusive pricing
|
||||
+ Receivings amount multiplication (can be configured in items section)
|
||||
+ Customizable sale and receiving numbering
|
||||
+ Giftcard improvements
|
||||
+ Fix item import through csv
|
||||
+ Bug fixes for reports
|
||||
|
||||
Version 2.3
|
||||
-----------
|
||||
+ Support for multiple stock locations
|
||||
|
||||
Version 2.2.2
|
||||
-------------
|
||||
+ French language added
|
||||
+ Thai language added
|
||||
+ Upgrade to CodeIgniter 2.2 (contains several security fixes)
|
||||
+ Database types for amounts all changed to decimal types (this will fix rounding errors in the sales and receivings reports) the rest of the application
|
||||
+ Fix duplicated session cookies in http headers (this broke the application when running on nginx)
|
||||
|
||||
Version 2.1.1
|
||||
-------------
|
||||
+ Barcodes on the order receipt weren't generated correctly
|
||||
+ Sales edit screen for detailed sales reports is now available with thickbox as in the rest of the application
|
||||
+ Indonesian language files updated (Oktafianus)
|
||||
+ Default language set to 'en' in config.php
|
||||
+ Fix some css bugs in suspended sales section
|
||||
+ Default cookie sess_time_expire set to 86400 (24h)
|
||||
|
||||
Version 2.1.0
|
||||
-------------
|
||||
+ Various upgrades, too numerous to list here.
|
||||
+ Removed dependancy on ofc upload library due to vulnerability found.
|
||||
-------------------------------------------------------------------------------
|
||||
* Ver. 2.0.2
|
||||
|
||||
Version 2.0.2
|
||||
-------------
|
||||
+ Fixed multiple giftcards issue per Bug #4 reported on Sourceforge where a
|
||||
second giftcard added would have its balance set to $0 even if the sale did
|
||||
not require the total of the second giftcard to pay the remaining amount due.
|
||||
+ Small code cleanup
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 2.1.0
|
||||
-------------
|
||||
* Upgrade to CodeIgniter 2.1.0
|
||||
* Various small improvements
|
||||
* Various small improvements
|
||||
|
||||
@@ -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,64 @@
|
||||
|
|
||||
| 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');
|
||||
|
|
||||
| You can also supply an alternative property name to be assigned in
|
||||
| the controller:
|
||||
|
|
||||
| $autoload['drivers'] = array('cache' => 'cch');
|
||||
|
|
||||
*/
|
||||
$autoload['drivers'] = array();
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
@@ -63,8 +89,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', 'locale', 'html', 'download', 'directory');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
@@ -78,10 +103,8 @@ $autoload['helper'] = array('form','url','table','text','currency', 'html', 'dow
|
||||
| config files. Otherwise, leave it blank.
|
||||
|
|
||||
*/
|
||||
|
||||
$autoload['config'] = array();
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Language files
|
||||
@@ -94,22 +117,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');
|
||||
|
||||
|
||||
/* 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,18 +1,40 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Code Version
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the version of Open Source Point of Sale you're running
|
||||
|
|
||||
|
|
||||
*/
|
||||
$config['application_version'] = '2.2.1';
|
||||
|--------------------------------------------------------------------------
|
||||
| Code Version
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the version of Open Source Point of Sale you're running
|
||||
|
|
||||
|
|
||||
*/
|
||||
$config['application_version'] = '3.0.0';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Commit sha1
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the commit hash for the version you are currently using
|
||||
|
|
||||
|
|
||||
*/
|
||||
$config['commit_sha1'] = '$Id$';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Internal to OSPOS XSS Clean
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is to indicated whether we want XSS clean to be performed or not
|
||||
| By default it's enabled as it's assumed the installation has Internet access and needs to be protected,
|
||||
| however intranet only installations may not need this so they can set FALSE to improve performance
|
||||
|
|
||||
*/
|
||||
$config['ospos_xss_clean'] = TRUE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Base Site URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
@@ -21,13 +43,21 @@ $config['application_version'] = '2.2.1';
|
||||
|
|
||||
| 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");
|
||||
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
|
||||
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
|
||||
$config['base_url'] = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
|
||||
$config['base_url'] .= '://' . $_SERVER['HTTP_HOST'];
|
||||
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -39,7 +69,7 @@ $config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER
|
||||
| variable so that it is blank.
|
||||
|
|
||||
*/
|
||||
$config['index_page'] = 'index.php';
|
||||
$config['index_page'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -47,17 +77,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 +96,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'] = '';
|
||||
|
||||
/*
|
||||
@@ -82,7 +110,7 @@ $config['url_suffix'] = '';
|
||||
| than english.
|
||||
|
|
||||
*/
|
||||
$config['language'] = 'en';
|
||||
$config['language'] = 'english';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -92,6 +120,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 +136,6 @@ $config['charset'] = 'UTF-8';
|
||||
*/
|
||||
$config['enable_hooks'] = TRUE;
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Extension Prefix
|
||||
@@ -115,33 +144,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'] = realpath(APPPATH . '../vendor/autoload.php');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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 +219,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 +239,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 +255,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 +297,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'] = 'ospos_sessions';
|
||||
$config['sess_match_ip'] = FALSE;
|
||||
$config['sess_match_useragent'] = FAlSE;
|
||||
$config['sess_time_to_update'] = 86400;
|
||||
$config['sess_driver'] = 'database';
|
||||
$config['sess_cookie_name'] = 'ospos_session';
|
||||
$config['sess_expiration'] = 7200;
|
||||
$config['sess_save_path'] = 'sessions';
|
||||
$config['sess_match_ip'] = TRUE;
|
||||
$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_secure'] = FALSE;
|
||||
$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 +452,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 +469,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_protection'] = TRUE;
|
||||
$config['csrf_token_name'] = 'csrf_ospos_v3';
|
||||
$config['csrf_cookie_name'] = 'csrf_cookie_ospos_v3';
|
||||
$config['csrf_expire'] = 7200;
|
||||
$config['csrf_regenerate'] = TRUE;
|
||||
$config['csrf_exclude_uris'] = array();
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -321,6 +489,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 +506,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 +523,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,16 +39,47 @@ 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_DESTRUCTIVE') 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');
|
||||
|
||||
|
||||
/* End of file constants.php */
|
||||
/* Location: ./application/config/constants.php */
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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
|
||||
|
||||
@@ -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'] = '';
|
||||
$db['default']['password'] = '';
|
||||
$db['default']['database'] = '';
|
||||
$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,16 +8,20 @@
|
||||
| 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(
|
||||
'class' => '',
|
||||
'function' => 'load_config',
|
||||
'filename' => 'load_config.php',
|
||||
'filepath' => 'hooks'
|
||||
$hook['post_controller_constructor'][] = array(
|
||||
'class' => '',
|
||||
'function' => 'load_config',
|
||||
'filename' => 'load_config.php',
|
||||
'filepath' => 'hooks'
|
||||
);
|
||||
|
||||
$hook['post_controller_constructor'][] = array(
|
||||
'class' => '',
|
||||
'function' => 'load_stats',
|
||||
'filename' => 'load_stats.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')
|
||||
);
|
||||
|
||||
24
application/config/pagination.php
Normal file
24
application/config/pagination.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bootstrap 3 pagination links styling
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Source code from http://stackoverflow.com/questions/20088779/bootstrap-3-pagination-with-codeigniter
|
||||
*/
|
||||
$config['full_tag_open'] = "<ul class='pagination pagination-sm'>";
|
||||
$config['full_tag_close'] ="</ul>";
|
||||
$config['num_tag_open'] = '<li>';
|
||||
$config['num_tag_close'] = '</li>';
|
||||
$config['cur_tag_open'] = "<li class='disabled'><li class='active'><a href='#'>";
|
||||
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
|
||||
$config['next_tag_open'] = "<li>";
|
||||
$config['next_tagl_close'] = "</li>";
|
||||
$config['prev_tag_open'] = "<li>";
|
||||
$config['prev_tagl_close'] = "</li>";
|
||||
$config['first_tag_open'] = "<li>";
|
||||
$config['first_tagl_close'] = "</li>";
|
||||
$config['last_tag_open'] = "<li>";
|
||||
$config['last_tagl_close'] = "</li>";
|
||||
@@ -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,32 +35,43 @@
|
||||
|
|
||||
| $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['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/$4';
|
||||
$route['reports/summary_:any'] = 'reports/date_input';
|
||||
$route['reports/(graphical_:any)/([^/]+)/([^/]+)'] = 'reports/$1/$2/$3/$4';
|
||||
$route['reports/graphical_:any'] = 'reports/date_input';
|
||||
$route['reports/(inventory_:any)/([^/]+)'] = 'reports/$1/$2';
|
||||
$route['reports/inventory_summary'] = 'reports/inventory_summary_input';
|
||||
$route['reports/(inventory_summary)/([^/]+)/([^/]+)/([^/]+)'] = 'reports/$1/$2';
|
||||
|
||||
$route['reports/(detailed_sales)/(:any)/(:any)'] = "reports/$1/$2/$3";
|
||||
$route['reports/detailed_sales'] = "reports/date_input";
|
||||
$route['reports/(detailed_receivings)/(:any)/(:any)'] = "reports/$1/$2/$3";
|
||||
$route['reports/detailed_receivings'] = "reports/date_input";
|
||||
$route['reports/(specific_:any)/(:any)/(:any)/(:any)'] = "reports/$1/$2/$3/$4";
|
||||
$route['reports/specific_customer'] = "reports/specific_customer_input";
|
||||
$route['reports/specific_employee'] = "reports/specific_employee_input";
|
||||
$route['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,214 @@
|
||||
<?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',
|
||||
'ia_archiver' => 'Alexa Crawler',
|
||||
'MJ12bot' => 'Majestic-12',
|
||||
'Uptimebot' => 'Uptimebot'
|
||||
);
|
||||
|
||||
519
application/controllers/Config.php
Normal file
519
application/controllers/Config.php
Normal file
@@ -0,0 +1,519 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Secure_Controller.php");
|
||||
|
||||
class Config extends Secure_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('config');
|
||||
|
||||
$this->load->library('barcode_lib');
|
||||
}
|
||||
|
||||
/*
|
||||
* This function loads all the licenses starting with the first one being OSPOS one
|
||||
*/
|
||||
private function _licenses()
|
||||
{
|
||||
$i = 0;
|
||||
$bower = FALSE;
|
||||
$composer = FALSE;
|
||||
$license = array();
|
||||
|
||||
$license[$i]['title'] = 'Open Source Point Of Sale ' . $this->config->item('application_version');
|
||||
|
||||
if(file_exists('license/LICENSE'))
|
||||
{
|
||||
$license[$i]['text'] = $this->xss_clean(file_get_contents('license/LICENSE', NULL, NULL, 0, 2000));
|
||||
}
|
||||
else
|
||||
{
|
||||
$license[$i]['text'] = 'LICENSE file must be in OSPOS license directory. You are not allowed to use OSPOS application until the distribution copy of LICENSE file is present.';
|
||||
}
|
||||
|
||||
// read all the files in the dir license
|
||||
$dir = new DirectoryIterator('license');
|
||||
|
||||
foreach($dir as $fileinfo)
|
||||
{
|
||||
// license files must be in couples: .version (name & version) & .license (license text)
|
||||
if($fileinfo->isFile())
|
||||
{
|
||||
if($fileinfo->getExtension() == 'version')
|
||||
{
|
||||
++$i;
|
||||
|
||||
$basename = 'license/' . $fileinfo->getBasename('.version');
|
||||
|
||||
$license[$i]['title'] = $this->xss_clean(file_get_contents($basename . '.version', NULL, NULL, 0, 100));
|
||||
|
||||
$license_text_file = $basename . '.license';
|
||||
|
||||
if(file_exists($license_text_file))
|
||||
{
|
||||
$license[$i]['text'] = $this->xss_clean(file_get_contents($license_text_file , NULL, NULL, 0, 2000));
|
||||
}
|
||||
else
|
||||
{
|
||||
$license[$i]['text'] = $license_text_file . ' file is missing';
|
||||
}
|
||||
}
|
||||
elseif($fileinfo->getBasename() == 'bower.LICENSES')
|
||||
{
|
||||
// set a flag to indicate that the JS Plugin bower.LICENSES file is available and needs to be attached at the end
|
||||
$bower = TRUE;
|
||||
}
|
||||
elseif($fileinfo->getBasename() == 'composer.LICENSES')
|
||||
{
|
||||
// set a flag to indicate that the composer.LICENSES file is available and needs to be attached at the end
|
||||
$composer = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// attach the licenses from the LICENSES file generated by bower
|
||||
if($composer)
|
||||
{
|
||||
++$i;
|
||||
$license[$i]['title'] = 'Composer Libraries';
|
||||
$license[$i]['text'] = '';
|
||||
|
||||
$file = file_get_contents('license/composer.LICENSES');
|
||||
$array = json_decode($file, true);
|
||||
|
||||
foreach($array as $key => $val)
|
||||
{
|
||||
if(is_array($val) && $key == 'dependencies')
|
||||
{
|
||||
foreach($val as $key1 => $val1)
|
||||
{
|
||||
if(is_array($val1))
|
||||
{
|
||||
$license[$i]['text'] .= 'component: ' . $key1 . "\n";
|
||||
|
||||
foreach($val1 as $key2 => $val2)
|
||||
{
|
||||
if(is_array($val2))
|
||||
{
|
||||
$license[$i]['text'] .= $key2 . ': ';
|
||||
|
||||
foreach($val2 as $key3 => $val3)
|
||||
{
|
||||
$license[$i]['text'] .= $val3 . ' ';
|
||||
}
|
||||
|
||||
$license[$i]['text'] .= "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$license[$i]['text'] .= $key2 . ': ' . $val2 . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$license[$i]['text'] .= "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$license[$i]['text'] .= $key1 . ': ' . $val1 . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$license[$i]['text'] = $this->xss_clean($license[$i]['text']);
|
||||
}
|
||||
|
||||
// attach the licenses from the LICENSES file generated by bower
|
||||
if($bower)
|
||||
{
|
||||
++$i;
|
||||
$license[$i]['title'] = 'JS Plugins';
|
||||
$license[$i]['text'] = '';
|
||||
|
||||
$file = file_get_contents('license/bower.LICENSES');
|
||||
$array = json_decode($file, true);
|
||||
|
||||
foreach($array as $key => $val)
|
||||
{
|
||||
if(is_array($val))
|
||||
{
|
||||
$license[$i]['text'] .= 'component: ' . $key . "\n";
|
||||
|
||||
foreach($val as $key1 => $val1)
|
||||
{
|
||||
if(is_array($val1))
|
||||
{
|
||||
$license[$i]['text'] .= $key1 . ': ';
|
||||
|
||||
foreach($val1 as $key2 => $val2)
|
||||
{
|
||||
$license[$i]['text'] .= $val2 . ' ';
|
||||
}
|
||||
|
||||
$license[$i]['text'] .= "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$license[$i]['text'] .= $key1 . ': ' . $val1 . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$license[$i]['text'] .= "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$license[$i]['text'] = $this->xss_clean($license[$i]['text']);
|
||||
}
|
||||
|
||||
return $license;
|
||||
}
|
||||
|
||||
private function _themes()
|
||||
{
|
||||
$themes = array();
|
||||
|
||||
// read all themes in the dist folder
|
||||
$dir = new DirectoryIterator('dist/bootswatch');
|
||||
|
||||
foreach($dir as $dirinfo)
|
||||
{
|
||||
if($dirinfo->isDir() && !$dirinfo->isDot() && $dirinfo->getFileName() != 'fonts')
|
||||
{
|
||||
$themes[$dirinfo->getFileName()] = $dirinfo->getFileName();
|
||||
}
|
||||
}
|
||||
asort($themes);
|
||||
return $themes;
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data['stock_locations'] = $this->Stock_location->get_all()->result_array();
|
||||
$data['support_barcode'] = $this->barcode_lib->get_list_barcodes();
|
||||
$data['logo_exists'] = $this->Appconfig->get('company_logo') != '';
|
||||
|
||||
$data = $this->xss_clean($data);
|
||||
|
||||
// load all the license statements, they are already XSS cleaned in the private function
|
||||
$data['licenses'] = $this->_licenses();
|
||||
$data['themes'] = $this->_themes();
|
||||
|
||||
$this->load->view("configs/manage", $data);
|
||||
}
|
||||
|
||||
public function save_info()
|
||||
{
|
||||
$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'),
|
||||
'return_policy' => $this->input->post('return_policy')
|
||||
);
|
||||
|
||||
if (!empty($upload_data['orig_name']))
|
||||
{
|
||||
// XSS file image sanity check
|
||||
if ($this->xss_clean($upload_data['raw_name'], TRUE) === TRUE)
|
||||
{
|
||||
$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 : strip_tags($this->upload->display_errors());
|
||||
|
||||
echo json_encode(array('success' => $success, 'message' => $message));
|
||||
}
|
||||
|
||||
public function save_general()
|
||||
{
|
||||
$batch_save_data = array(
|
||||
'theme' => $this->input->post('theme'),
|
||||
'default_tax_1_rate' => parse_decimals($this->input->post('default_tax_1_rate')),
|
||||
'default_tax_1_name' => $this->input->post('default_tax_1_name'),
|
||||
'default_tax_2_rate' => parse_decimals($this->input->post('default_tax_2_rate')),
|
||||
'default_tax_2_name' => $this->input->post('default_tax_2_name'),
|
||||
'tax_included' => $this->input->post('tax_included') != NULL,
|
||||
'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'),
|
||||
'notify_horizontal_position' => $this->input->post('notify_horizontal_position'),
|
||||
'notify_vertical_position' => $this->input->post('notify_vertical_position'),
|
||||
'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'),
|
||||
'statistics' => $this->input->post('statistics') != 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')));
|
||||
}
|
||||
|
||||
public function check_number_locale()
|
||||
{
|
||||
$number_locale = $this->input->post('number_locale');
|
||||
$fmt = new \NumberFormatter($number_locale, \NumberFormatter::CURRENCY);
|
||||
$currency_symbol = empty($this->input->post('currency_symbol')) ? $fmt->getSymbol(\NumberFormatter::CURRENCY_SYMBOL) : $this->input->post('currency_symbol');
|
||||
if ($this->input->post('thousands_separator') == "false")
|
||||
{
|
||||
$fmt->setAttribute(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL, '');
|
||||
}
|
||||
$fmt->setSymbol(\NumberFormatter::CURRENCY_SYMBOL, $currency_symbol);
|
||||
$number_local_example = $fmt->format(1234567890.12300);
|
||||
echo json_encode(array(
|
||||
'success' => $number_local_example != FALSE,
|
||||
'number_locale_example' => $number_local_example,
|
||||
'currency_symbol' => $currency_symbol,
|
||||
'thousands_separator' => $fmt->getAttribute(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL) != ''
|
||||
));
|
||||
}
|
||||
|
||||
public function save_locale()
|
||||
{
|
||||
$exploded = explode(":", $this->input->post('language'));
|
||||
$batch_save_data = array(
|
||||
'currency_symbol' => $this->input->post('currency_symbol'),
|
||||
'language_code' => $exploded[0],
|
||||
'language' => $exploded[1],
|
||||
'timezone' => $this->input->post('timezone'),
|
||||
'dateformat' => $this->input->post('dateformat'),
|
||||
'timeformat' => $this->input->post('timeformat'),
|
||||
'thousands_separator' => $this->input->post('thousands_separator'),
|
||||
'number_locale' => $this->input->post('number_locale'),
|
||||
'currency_decimals' => $this->input->post('currency_decimals'),
|
||||
'tax_decimals' => $this->input->post('tax_decimals'),
|
||||
'quantity_decimals' => $this->input->post('quantity_decimals'),
|
||||
'country_codes' => $this->input->post('country_codes'),
|
||||
'payment_options_order' => $this->input->post('payment_options_order')
|
||||
);
|
||||
|
||||
$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')));
|
||||
}
|
||||
|
||||
public function save_email()
|
||||
{
|
||||
$batch_save_data = array(
|
||||
'protocol' => $this->input->post('protocol'),
|
||||
'mailpath' => $this->input->post('mailpath'),
|
||||
'smtp_host' => $this->input->post('smtp_host'),
|
||||
'smtp_user' => $this->input->post('smtp_user'),
|
||||
'smtp_pass' => $this->input->post('smtp_pass'),
|
||||
'smtp_port' => $this->input->post('smtp_port'),
|
||||
'smtp_timeout' => $this->input->post('smtp_timeout'),
|
||||
'smtp_crypto' => $this->input->post('smtp_crypto')
|
||||
);
|
||||
|
||||
$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')));
|
||||
}
|
||||
|
||||
public function save_message()
|
||||
{
|
||||
$batch_save_data = array(
|
||||
'msg_msg' => $this->input->post('msg_msg'),
|
||||
'msg_uid' => $this->input->post('msg_uid'),
|
||||
'msg_pwd' => $this->input->post('msg_pwd'),
|
||||
'msg_src' => $this->input->post('msg_src')
|
||||
);
|
||||
|
||||
$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')));
|
||||
}
|
||||
|
||||
public function stock_locations()
|
||||
{
|
||||
$stock_locations = $this->Stock_location->get_all()->result_array();
|
||||
|
||||
$stock_locations = $this->xss_clean($stock_locations);
|
||||
|
||||
$this->load->view('partial/stock_locations', array('stock_locations' => $stock_locations));
|
||||
}
|
||||
|
||||
private 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();
|
||||
}
|
||||
|
||||
public 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);
|
||||
}
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
$success = $this->db->trans_status();
|
||||
|
||||
echo json_encode(array('success' => $success, 'message' => $this->lang->line('config_saved_' . ($success ? '' : 'un') . 'successfully')));
|
||||
}
|
||||
|
||||
public 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')));
|
||||
}
|
||||
|
||||
public function save_receipt()
|
||||
{
|
||||
$batch_save_data = array (
|
||||
'receipt_template' => $this->input->post('receipt_template'),
|
||||
'receipt_show_taxes' => $this->input->post('receipt_show_taxes') != NULL,
|
||||
'receipt_show_total_discount' => $this->input->post('receipt_show_total_discount') != NULL,
|
||||
'receipt_show_description' => $this->input->post('receipt_show_description') != NULL,
|
||||
'receipt_show_serialnumber' => $this->input->post('receipt_show_serialnumber') != 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')
|
||||
);
|
||||
|
||||
$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')));
|
||||
}
|
||||
|
||||
public function save_invoice()
|
||||
{
|
||||
$batch_save_data = array (
|
||||
'invoice_enable' => $this->input->post('invoice_enable') != NULL,
|
||||
'sales_invoice_format' => $this->input->post('sales_invoice_format'),
|
||||
'recv_invoice_format' => $this->input->post('recv_invoice_format'),
|
||||
'invoice_default_comments' => $this->input->post('invoice_default_comments'),
|
||||
'invoice_email_message' => $this->input->post('invoice_email_message')
|
||||
);
|
||||
|
||||
$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')));
|
||||
}
|
||||
|
||||
public function remove_logo()
|
||||
{
|
||||
$result = $this->Appconfig->batch_save(array('company_logo' => ''));
|
||||
|
||||
echo json_encode(array('success' => $result));
|
||||
}
|
||||
|
||||
private 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>');
|
||||
}
|
||||
|
||||
public 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');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
253
application/controllers/Customers.php
Normal file
253
application/controllers/Customers.php
Normal file
@@ -0,0 +1,253 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Persons.php");
|
||||
|
||||
class Customers extends Persons
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('customers');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data['table_headers'] = $this->xss_clean(get_people_manage_table_headers());
|
||||
|
||||
$this->load->view('people/manage', $data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns customer table data rows. This will be called with AJAX.
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
$search = $this->input->get('search');
|
||||
$limit = $this->input->get('limit');
|
||||
$offset = $this->input->get('offset');
|
||||
$sort = $this->input->get('sort');
|
||||
$order = $this->input->get('order');
|
||||
|
||||
$customers = $this->Customer->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->Customer->get_found_rows($search);
|
||||
|
||||
$data_rows = array();
|
||||
foreach($customers->result() as $person)
|
||||
{
|
||||
$data_rows[] = get_person_data_row($person, $this);
|
||||
}
|
||||
|
||||
$data_rows = $this->xss_clean($data_rows);
|
||||
|
||||
echo json_encode(array('total' => $total_rows, 'rows' => $data_rows));
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
public function suggest()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Customer->get_search_suggestions($this->input->get('term'), TRUE));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function suggest_search()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Customer->get_search_suggestions($this->input->post('term'), FALSE));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Loads the customer edit form
|
||||
*/
|
||||
public function view($customer_id = -1)
|
||||
{
|
||||
$info = $this->Customer->get_info($customer_id);
|
||||
foreach(get_object_vars($info) as $property => $value)
|
||||
{
|
||||
$info->$property = $this->xss_clean($value);
|
||||
}
|
||||
$data['person_info'] = $info;
|
||||
|
||||
$data['total'] = $this->xss_clean($this->Customer->get_totals($customer_id)->total);
|
||||
|
||||
$this->load->view("customers/form", $data);
|
||||
}
|
||||
|
||||
/*
|
||||
Inserts/updates a customer
|
||||
*/
|
||||
public 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')
|
||||
);
|
||||
$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'),
|
||||
'discount_percent' => $this->input->post('discount_percent') == '' ? 0.00 : $this->input->post('discount_percent'),
|
||||
'taxable' => $this->input->post('taxable') != NULL
|
||||
);
|
||||
|
||||
if($this->Customer->save_customer($person_data, $customer_data, $customer_id))
|
||||
{
|
||||
$person_data = $this->xss_clean($person_data);
|
||||
$customer_data = $this->xss_clean($customer_data);
|
||||
|
||||
//New customer
|
||||
if($customer_id == -1)
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('customers_successful_adding').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'], 'id' => $customer_data['person_id']));
|
||||
}
|
||||
else //Existing customer
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('customers_successful_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'], 'id' => $customer_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
$person_data = $this->xss_clean($person_data);
|
||||
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('customers_error_adding_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'], 'id' => -1));
|
||||
}
|
||||
}
|
||||
|
||||
public function check_account_number()
|
||||
{
|
||||
$exists = $this->Customer->account_number_exists($this->input->post('account_number'), $this->input->post('person_id'));
|
||||
|
||||
echo !$exists ? 'true' : 'false';
|
||||
}
|
||||
|
||||
/*
|
||||
This deletes customers from the customers table
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$customers_to_delete = $this->xss_clean($this->input->post('ids'));
|
||||
|
||||
if($this->Customer->delete_list($customers_to_delete))
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('customers_successful_deleted').' '.
|
||||
count($customers_to_delete).' '.$this->lang->line('customers_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('customers_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Customer import from excel spreadsheet
|
||||
*/
|
||||
public function excel()
|
||||
{
|
||||
$name = 'import_customers.csv';
|
||||
$data = file_get_contents($name);
|
||||
force_download($name, $data);
|
||||
}
|
||||
|
||||
public function excel_import()
|
||||
{
|
||||
$this->load->view('customers/form_excel_import', NULL);
|
||||
}
|
||||
|
||||
public function do_excel_import()
|
||||
{
|
||||
if($_FILES['file_path']['error'] != UPLOAD_ERR_OK)
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('customers_excel_import_failed')));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(($handle = fopen($_FILES['file_path']['tmp_name'], 'r')) !== FALSE)
|
||||
{
|
||||
// Skip the first row as it's the table description
|
||||
fgetcsv($handle);
|
||||
$i = 1;
|
||||
|
||||
$failCodes = array();
|
||||
|
||||
while(($data = fgetcsv($handle)) !== FALSE)
|
||||
{
|
||||
// XSS file data sanity check
|
||||
$data = $this->xss_clean($data);
|
||||
|
||||
if(sizeof($data) >= 15)
|
||||
{
|
||||
$person_data = array(
|
||||
'first_name' => $data[0],
|
||||
'last_name' => $data[1],
|
||||
'gender' => $data[2],
|
||||
'email' => $data[3],
|
||||
'phone_number' => $data[4],
|
||||
'address_1' => $data[5],
|
||||
'address_2' => $data[6],
|
||||
'city' => $data[7],
|
||||
'state' => $data[8],
|
||||
'zip' => $data[9],
|
||||
'country' => $data[10],
|
||||
'comments' => $data[11]
|
||||
);
|
||||
|
||||
$customer_data = array(
|
||||
'company_name' => $data[12],
|
||||
'discount_percent' => $data[14],
|
||||
'taxable' => $data[15] == '' ? 0 : 1
|
||||
);
|
||||
|
||||
$account_number = $data[13];
|
||||
$invalidated = FALSE;
|
||||
if($account_number != '')
|
||||
{
|
||||
$customer_data['account_number'] = $account_number;
|
||||
$invalidated = $this->Customer->account_number_exists($account_number);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$invalidated = TRUE;
|
||||
}
|
||||
|
||||
if($invalidated || !$this->Customer->save_customer($person_data, $customer_data))
|
||||
{
|
||||
$failCodes[] = $i;
|
||||
}
|
||||
|
||||
++$i;
|
||||
}
|
||||
|
||||
if(count($failCodes) > 0)
|
||||
{
|
||||
$message = $this->lang->line('customers_excel_import_partially_failed') . ' (' . count($failCodes) . '): ' . implode(', ', $failCodes);
|
||||
|
||||
echo json_encode(array('success' => FALSE, 'message' => $message));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('customers_excel_import_success')));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('customers_excel_import_nodata_wrongformat')));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
169
application/controllers/Employees.php
Normal file
169
application/controllers/Employees.php
Normal file
@@ -0,0 +1,169 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Persons.php");
|
||||
|
||||
class Employees extends Persons
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('employees');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data['table_headers'] = $this->xss_clean(get_people_manage_table_headers());
|
||||
|
||||
$this->load->view('people/manage', $data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns employee table data rows. This will be called with AJAX.
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
$search = $this->input->get('search');
|
||||
$limit = $this->input->get('limit');
|
||||
$offset = $this->input->get('offset');
|
||||
$sort = $this->input->get('sort');
|
||||
$order = $this->input->get('order');
|
||||
|
||||
$employees = $this->Employee->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->Employee->get_found_rows($search);
|
||||
|
||||
$data_rows = array();
|
||||
foreach($employees->result() as $person)
|
||||
{
|
||||
$data_rows[] = get_person_data_row($person, $this);
|
||||
}
|
||||
|
||||
$data_rows = $this->xss_clean($data_rows);
|
||||
|
||||
echo json_encode(array('total' => $total_rows, 'rows' => $data_rows));
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
public function suggest_search()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Employee->get_search_suggestions($this->input->post('term')));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Loads the employee edit form
|
||||
*/
|
||||
public function view($employee_id = -1)
|
||||
{
|
||||
$person_info = $this->Employee->get_info($employee_id);
|
||||
foreach(get_object_vars($person_info) as $property => $value)
|
||||
{
|
||||
$person_info->$property = $this->xss_clean($value);
|
||||
}
|
||||
$data['person_info'] = $person_info;
|
||||
|
||||
$modules = array();
|
||||
foreach($this->Module->get_all_modules()->result() as $module)
|
||||
{
|
||||
$module->module_id = $this->xss_clean($module->module_id);
|
||||
$module->grant = $this->xss_clean($this->Employee->has_grant($module->module_id, $person_info->person_id));
|
||||
|
||||
$modules[] = $module;
|
||||
}
|
||||
$data['all_modules'] = $modules;
|
||||
|
||||
$permissions = array();
|
||||
foreach($this->Module->get_all_subpermissions()->result() as $permission)
|
||||
{
|
||||
$permission->module_id = $this->xss_clean($permission->module_id);
|
||||
$permission->permission_id = $this->xss_clean($permission->permission_id);
|
||||
$permission->grant = $this->xss_clean($this->Employee->has_grant($permission->permission_id, $person_info->person_id));
|
||||
|
||||
$permissions[] = $permission;
|
||||
}
|
||||
$data['all_subpermissions'] = $permissions;
|
||||
|
||||
$this->load->view("employees/form", $data);
|
||||
}
|
||||
|
||||
/*
|
||||
Inserts/updates an employee
|
||||
*/
|
||||
public 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'),
|
||||
);
|
||||
$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') != '')
|
||||
{
|
||||
$employee_data = array(
|
||||
'username' => $this->input->post('username'),
|
||||
'password' => password_hash($this->input->post('password'), PASSWORD_DEFAULT),
|
||||
'hash_version' => 2
|
||||
);
|
||||
}
|
||||
else //Password not changed
|
||||
{
|
||||
$employee_data = array('username' => $this->input->post('username'));
|
||||
}
|
||||
|
||||
if($this->Employee->save_employee($person_data, $employee_data, $grants_data, $employee_id))
|
||||
{
|
||||
$person_data = $this->xss_clean($person_data);
|
||||
$employee_data = $this->xss_clean($employee_data);
|
||||
|
||||
//New employee
|
||||
if($employee_id == -1)
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('employees_successful_adding').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'], 'id' => $employee_data['person_id']));
|
||||
}
|
||||
else //Existing employee
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('employees_successful_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'], 'id' => $employee_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
$person_data = $this->xss_clean($person_data);
|
||||
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('employees_error_adding_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'], 'id' => -1));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
This deletes employees from the employees table
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$employees_to_delete = $this->xss_clean($this->input->post('ids'));
|
||||
|
||||
if($this->Employee->delete_list($employees_to_delete))
|
||||
{
|
||||
echo json_encode(array('success' => TRUE,'message' => $this->lang->line('employees_successful_deleted').' '.
|
||||
count($employees_to_delete).' '.$this->lang->line('employees_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE,'message' => $this->lang->line('employees_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
125
application/controllers/Giftcards.php
Normal file
125
application/controllers/Giftcards.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Secure_Controller.php");
|
||||
|
||||
class Giftcards extends Secure_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('giftcards');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data['table_headers'] = $this->xss_clean(get_giftcards_manage_table_headers());
|
||||
|
||||
$this->load->view('giftcards/manage', $data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns Giftcards table data rows. This will be called with AJAX.
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
$search = $this->input->get('search');
|
||||
$limit = $this->input->get('limit');
|
||||
$offset = $this->input->get('offset');
|
||||
$sort = $this->input->get('sort');
|
||||
$order = $this->input->get('order');
|
||||
|
||||
$giftcards = $this->Giftcard->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->Giftcard->get_found_rows($search);
|
||||
|
||||
$data_rows = array();
|
||||
foreach($giftcards->result() as $giftcard)
|
||||
{
|
||||
$data_rows[] = get_giftcard_data_row($giftcard, $this);
|
||||
}
|
||||
|
||||
$data_rows = $this->xss_clean($data_rows);
|
||||
|
||||
echo json_encode(array('total' => $total_rows, 'rows' => $data_rows));
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
public function suggest_search()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Giftcard->get_search_suggestions($this->input->post('term')));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function get_row($row_id)
|
||||
{
|
||||
$data_row = $this->xss_clean(get_giftcard_data_row($this->Giftcard->get_info($row_id), $this));
|
||||
|
||||
echo json_encode($data_row);
|
||||
}
|
||||
|
||||
public function view($giftcard_id = -1)
|
||||
{
|
||||
$giftcard_info = $this->Giftcard->get_info($giftcard_id);
|
||||
|
||||
$data['selected_person_name'] = ($giftcard_id > 0 && isset($giftcard_info->person_id)) ? $giftcard_info->first_name . ' ' . $giftcard_info->last_name : '';
|
||||
$data['selected_person_id'] = $giftcard_info->person_id;
|
||||
$data['giftcard_number'] = $giftcard_id > 0 ? $giftcard_info->giftcard_number : $this->Giftcard->get_max_number()->giftcard_number + 1;
|
||||
$data['giftcard_id'] = $giftcard_id;
|
||||
$data['giftcard_value'] = $giftcard_info->value;
|
||||
|
||||
$data = $this->xss_clean($data);
|
||||
|
||||
$this->load->view("giftcards/form", $data);
|
||||
}
|
||||
|
||||
public function save($giftcard_id = -1)
|
||||
{
|
||||
$giftcard_data = array(
|
||||
'record_time' => date('Y-m-d H:i:s'),
|
||||
'giftcard_number' => $this->input->post('giftcard_number'),
|
||||
'value' => parse_decimals($this->input->post('value')),
|
||||
'person_id' => $this->input->post('person_id') == '' ? NULL : $this->input->post('person_id')
|
||||
);
|
||||
|
||||
if($this->Giftcard->save($giftcard_data, $giftcard_id))
|
||||
{
|
||||
$giftcard_data = $this->xss_clean($giftcard_data);
|
||||
|
||||
//New giftcard
|
||||
if($giftcard_id == -1)
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('giftcards_successful_adding').' '.
|
||||
$giftcard_data['giftcard_number'], 'id' => $giftcard_data['giftcard_id']));
|
||||
}
|
||||
else //Existing giftcard
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('giftcards_successful_updating').' '.
|
||||
$giftcard_data['giftcard_number'], 'id' => $giftcard_id));
|
||||
}
|
||||
}
|
||||
else //failure
|
||||
{
|
||||
$giftcard_data = $this->xss_clean($giftcard_data);
|
||||
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('giftcards_error_adding_updating').' '.
|
||||
$giftcard_data['giftcard_number'], 'id' => -1));
|
||||
}
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$giftcards_to_delete = $this->xss_clean($this->input->post('ids'));
|
||||
|
||||
if($this->Giftcard->delete_list($giftcards_to_delete))
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('giftcards_successful_deleted').' '.
|
||||
count($giftcards_to_delete).' '.$this->lang->line('giftcards_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('giftcards_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
29
application/controllers/Home.php
Normal file
29
application/controllers/Home.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Secure_Controller.php");
|
||||
|
||||
class Home extends Secure_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('home');
|
||||
}
|
||||
|
||||
public function logout()
|
||||
{
|
||||
$this->Employee->logout();
|
||||
|
||||
if($this->config->item('statistics') == TRUE)
|
||||
{
|
||||
$this->load->library('tracking_lib');
|
||||
|
||||
$this->tracking_lib->track_page('logout', 'logout');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
198
application/controllers/Item_kits.php
Normal file
198
application/controllers/Item_kits.php
Normal file
@@ -0,0 +1,198 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Secure_Controller.php");
|
||||
|
||||
class Item_kits extends Secure_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('item_kits');
|
||||
}
|
||||
|
||||
/*
|
||||
Add the total cost and retail price to a passed items kit retrieving the data from each singular 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']);
|
||||
foreach(get_object_vars($item_info) as $property => $value)
|
||||
{
|
||||
$item_info->$property = $this->xss_clean($value);
|
||||
}
|
||||
|
||||
$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;
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data['table_headers'] = $this->xss_clean(get_item_kits_manage_table_headers());
|
||||
|
||||
$this->load->view('item_kits/manage', $data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns Item kits table data rows. This will be called with AJAX.
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
$search = $this->input->get('search');
|
||||
$limit = $this->input->get('limit');
|
||||
$offset = $this->input->get('offset');
|
||||
$sort = $this->input->get('sort');
|
||||
$order = $this->input->get('order');
|
||||
|
||||
$item_kits = $this->Item_kit->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->Item_kit->get_found_rows($search);
|
||||
|
||||
$data_rows = array();
|
||||
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_kit_data_row($item_kit, $this);
|
||||
}
|
||||
|
||||
$data_rows = $this->xss_clean($data_rows);
|
||||
|
||||
echo json_encode(array('total' => $total_rows, 'rows' => $data_rows));
|
||||
}
|
||||
|
||||
public function suggest_search()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Item_kit->get_search_suggestions($this->input->post('term')));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function get_row($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($row_id));
|
||||
|
||||
echo json_encode(get_item_kit_data_row($item_kit, $this));
|
||||
}
|
||||
|
||||
public function view($item_kit_id = -1)
|
||||
{
|
||||
$info = $this->Item_kit->get_info($item_kit_id);
|
||||
foreach(get_object_vars($info) as $property => $value)
|
||||
{
|
||||
$info->$property = $this->xss_clean($value);
|
||||
}
|
||||
$data['item_kit_info'] = $info;
|
||||
|
||||
$items = array();
|
||||
foreach($this->Item_kit_items->get_info($item_kit_id) as $item_kit_item)
|
||||
{
|
||||
$item['name'] = $this->xss_clean($this->Item->get_info($item_kit_item['item_id'])->name);
|
||||
$item['item_id'] = $this->xss_clean($item_kit_item['item_id']);
|
||||
$item['quantity'] = $this->xss_clean($item_kit_item['quantity']);
|
||||
|
||||
$items[] = $item;
|
||||
}
|
||||
$data['item_kit_items'] = $items;
|
||||
|
||||
$this->load->view("item_kits/form", $data);
|
||||
}
|
||||
|
||||
public 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))
|
||||
{
|
||||
$success = TRUE;
|
||||
//New item kit
|
||||
if ($item_kit_id == -1)
|
||||
{
|
||||
$item_kit_id = $item_kit_data['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
|
||||
);
|
||||
}
|
||||
|
||||
$success = $this->Item_kit_items->save($item_kit_items, $item_kit_id);
|
||||
}
|
||||
|
||||
$item_kit_data = $this->xss_clean($item_kit_data);
|
||||
|
||||
echo json_encode(array('success' => $success,
|
||||
'message' => $this->lang->line('item_kits_successful_adding').' '.$item_kit_data['name'], 'id' => $item_kit_id));
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
$item_kit_data = $this->xss_clean($item_kit_data);
|
||||
|
||||
echo json_encode(array('success' => FALSE,
|
||||
'message' => $this->lang->line('item_kits_error_adding_updating').' '.$item_kit_data['name'], 'id' => -1));
|
||||
}
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$item_kits_to_delete = $this->xss_clean($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')));
|
||||
}
|
||||
}
|
||||
|
||||
public 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));
|
||||
|
||||
$item_kid_id = 'KIT '. urldecode($item_kid_id);
|
||||
|
||||
$result[] = array('name' => $item_kit->name, 'item_id' => $item_kid_id, 'item_number' => $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;
|
||||
|
||||
// display barcodes
|
||||
$this->load->view("barcodes/barcode_sheet", $data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
739
application/controllers/Items.php
Normal file
739
application/controllers/Items.php
Normal file
@@ -0,0 +1,739 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Secure_Controller.php");
|
||||
|
||||
class Items extends Secure_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('items');
|
||||
|
||||
$this->load->library('item_lib');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data['table_headers'] = $this->xss_clean(get_items_manage_table_headers());
|
||||
|
||||
$data['stock_location'] = $this->xss_clean($this->item_lib->get_item_location());
|
||||
$data['stock_locations'] = $this->xss_clean($this->Stock_location->get_allowed_locations());
|
||||
|
||||
// filters that will be loaded in the multiselect dropdown
|
||||
$data['filters'] = array('empty_upc' => $this->lang->line('items_empty_upc_items'),
|
||||
'low_inventory' => $this->lang->line('items_low_inventory_items'),
|
||||
'is_serialized' => $this->lang->line('items_serialized_items'),
|
||||
'no_description' => $this->lang->line('items_no_description_items'),
|
||||
'search_custom' => $this->lang->line('items_search_custom_items'),
|
||||
'is_deleted' => $this->lang->line('items_is_deleted'));
|
||||
|
||||
$this->load->view('items/manage', $data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns Items table data rows. This will be called with AJAX.
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
$search = $this->input->get('search');
|
||||
$limit = $this->input->get('limit');
|
||||
$offset = $this->input->get('offset');
|
||||
$sort = $this->input->get('sort');
|
||||
$order = $this->input->get('order');
|
||||
|
||||
$this->item_lib->set_item_location($this->input->get('stock_location'));
|
||||
|
||||
$filters = array('start_date' => $this->input->get('start_date'),
|
||||
'end_date' => $this->input->get('end_date'),
|
||||
'stock_location_id' => $this->item_lib->get_item_location(),
|
||||
'empty_upc' => FALSE,
|
||||
'low_inventory' => FALSE,
|
||||
'is_serialized' => FALSE,
|
||||
'no_description' => FALSE,
|
||||
'search_custom' => FALSE,
|
||||
'is_deleted' => FALSE);
|
||||
|
||||
// check if any filter is set in the multiselect dropdown
|
||||
$filledup = array_fill_keys($this->input->get('filters'), TRUE);
|
||||
$filters = array_merge($filters, $filledup);
|
||||
|
||||
$items = $this->Item->search($search, $filters, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->Item->get_found_rows($search, $filters);
|
||||
|
||||
$data_rows = array();
|
||||
foreach($items->result() as $item)
|
||||
{
|
||||
$data_rows[] = $this->xss_clean(get_item_data_row($item, $this));
|
||||
}
|
||||
|
||||
echo json_encode(array('total' => $total_rows, 'rows' => $data_rows));
|
||||
}
|
||||
|
||||
public function pic_thumb($pic_id)
|
||||
{
|
||||
$this->load->helper('file');
|
||||
$this->load->library('image_lib');
|
||||
$base_path = './uploads/item_pics/' . $pic_id;
|
||||
$images = glob($base_path . '.*');
|
||||
if(sizeof($images) > 0)
|
||||
{
|
||||
$image_path = $images[0];
|
||||
$ext = pathinfo($image_path, PATHINFO_EXTENSION);
|
||||
$thumb_path = $base_path . $this->image_lib->thumb_marker . '.' . $ext;
|
||||
if(sizeof($images) < 2)
|
||||
{
|
||||
$config['image_library'] = 'gd2';
|
||||
$config['source_image'] = $image_path;
|
||||
$config['maintain_ratio'] = TRUE;
|
||||
$config['create_thumb'] = TRUE;
|
||||
$config['width'] = 52;
|
||||
$config['height'] = 32;
|
||||
$this->image_lib->initialize($config);
|
||||
$image = $this->image_lib->resize();
|
||||
$thumb_path = $this->image_lib->full_dst_path;
|
||||
}
|
||||
$this->output->set_content_type(get_mime_by_extension($thumb_path));
|
||||
$this->output->set_output(file_get_contents($thumb_path));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
public function suggest_search()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Item->get_search_suggestions($this->input->post_get('term'),
|
||||
array('search_custom' => $this->input->post('search_custom'), 'is_deleted' => $this->input->post('is_deleted') != NULL), FALSE));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function suggest()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Item->get_search_suggestions($this->input->post_get('term'),
|
||||
array('search_custom' => FALSE, 'is_deleted' => FALSE), TRUE));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
public function suggest_category()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Item->get_category_suggestions($this->input->get('term')));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
public function suggest_location()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Item->get_location_suggestions($this->input->get('term')));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
public function suggest_custom()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Item->get_custom_suggestions($this->input->post('term'), $this->input->post('field_no')));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function get_row($item_ids)
|
||||
{
|
||||
$item_infos = $this->Item->get_multiple_info(explode(":", $item_ids), $this->item_lib->get_item_location());
|
||||
|
||||
$result = array();
|
||||
foreach($item_infos->result() as $item_info)
|
||||
{
|
||||
$result[$item_info->item_id] = $this->xss_clean(get_item_data_row($item_info, $this));
|
||||
}
|
||||
|
||||
echo json_encode($result);
|
||||
}
|
||||
|
||||
public function view($item_id = -1)
|
||||
{
|
||||
$data['item_tax_info'] = $this->xss_clean($this->Item_taxes->get_info($item_id));
|
||||
$data['default_tax_1_rate'] = '';
|
||||
$data['default_tax_2_rate'] = '';
|
||||
|
||||
$item_info = $this->Item->get_info($item_id);
|
||||
foreach(get_object_vars($item_info) as $property => $value)
|
||||
{
|
||||
$item_info->$property = $this->xss_clean($value);
|
||||
}
|
||||
|
||||
if($item_id == -1)
|
||||
{
|
||||
$data['default_tax_1_rate'] = $this->Appconfig->get('default_tax_1_rate');
|
||||
$data['default_tax_2_rate'] = $this->Appconfig->get('default_tax_2_rate');
|
||||
|
||||
$item_info->receiving_quantity = 0;
|
||||
$item_info->reorder_level = 0;
|
||||
}
|
||||
|
||||
$data['item_info'] = $item_info;
|
||||
|
||||
$suppliers = array('' => $this->lang->line('items_none'));
|
||||
foreach($this->Supplier->get_all()->result_array() as $row)
|
||||
{
|
||||
$suppliers[$this->xss_clean($row['person_id'])] = $this->xss_clean($row['company_name']);
|
||||
}
|
||||
$data['suppliers'] = $suppliers;
|
||||
$data['selected_supplier'] = $item_info->supplier_id;
|
||||
|
||||
$data['logo_exists'] = $item_info->pic_id != '';
|
||||
$images = glob('./uploads/item_pics/' . $item_info->pic_id . '.*');
|
||||
$data['image_path'] = sizeof($images) > 0 ? base_url($images[0]) : '';
|
||||
|
||||
$stock_locations = $this->Stock_location->get_undeleted_all()->result_array();
|
||||
foreach($stock_locations as $location)
|
||||
{
|
||||
$location = $this->xss_clean($location);
|
||||
|
||||
$quantity = $this->xss_clean($this->Item_quantity->get_item_quantity($item_id, $location['location_id'])->quantity);
|
||||
$quantity = ($item_id == -1) ? 0 : $quantity;
|
||||
$location_array[$location['location_id']] = array('location_name' => $location['location_name'], 'quantity' => $quantity);
|
||||
$data['stock_locations'] = $location_array;
|
||||
}
|
||||
|
||||
$this->load->view('items/form', $data);
|
||||
}
|
||||
|
||||
public function inventory($item_id = -1)
|
||||
{
|
||||
$item_info = $this->Item->get_info($item_id);
|
||||
foreach(get_object_vars($item_info) as $property => $value)
|
||||
{
|
||||
$item_info->$property = $this->xss_clean($value);
|
||||
}
|
||||
$data['item_info'] = $item_info;
|
||||
|
||||
$data['stock_locations'] = array();
|
||||
$stock_locations = $this->Stock_location->get_undeleted_all()->result_array();
|
||||
foreach($stock_locations as $location)
|
||||
{
|
||||
$location = $this->xss_clean($location);
|
||||
$quantity = $this->xss_clean($this->Item_quantity->get_item_quantity($item_id, $location['location_id'])->quantity);
|
||||
|
||||
$data['stock_locations'][$location['location_id']] = $location['location_name'];
|
||||
$data['item_quantities'][$location['location_id']] = $quantity;
|
||||
}
|
||||
|
||||
$this->load->view('items/form_inventory', $data);
|
||||
}
|
||||
|
||||
public function count_details($item_id = -1)
|
||||
{
|
||||
$item_info = $this->Item->get_info($item_id);
|
||||
foreach(get_object_vars($item_info) as $property => $value)
|
||||
{
|
||||
$item_info->$property = $this->xss_clean($value);
|
||||
}
|
||||
$data['item_info'] = $item_info;
|
||||
|
||||
$data['stock_locations'] = array();
|
||||
$stock_locations = $this->Stock_location->get_undeleted_all()->result_array();
|
||||
foreach($stock_locations as $location)
|
||||
{
|
||||
$location = $this->xss_clean($location);
|
||||
$quantity = $this->xss_clean($this->Item_quantity->get_item_quantity($item_id, $location['location_id'])->quantity);
|
||||
|
||||
$data['stock_locations'][$location['location_id']] = $location['location_name'];
|
||||
$data['item_quantities'][$location['location_id']] = $quantity;
|
||||
}
|
||||
|
||||
$this->load->view('items/form_count_details', $data);
|
||||
}
|
||||
|
||||
public function generate_barcodes($item_ids)
|
||||
{
|
||||
$this->load->library('barcode_lib');
|
||||
|
||||
$item_ids = explode(':', $item_ids);
|
||||
$result = $this->Item->get_multiple_info($item_ids, $this->item_lib->get_item_location())->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)
|
||||
{
|
||||
$item = $this->xss_clean($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();
|
||||
|
||||
$save_item = array('item_number' => $item['item_number']);
|
||||
|
||||
// update the item in the database in order to save the UPC/EAN/ISBN field
|
||||
$this->Item->save($save_item, $item['item_id']);
|
||||
}
|
||||
}
|
||||
$data['items'] = $result;
|
||||
|
||||
// display barcodes
|
||||
$this->load->view('barcodes/barcode_sheet', $data);
|
||||
}
|
||||
|
||||
public function bulk_edit()
|
||||
{
|
||||
$suppliers = array('' => $this->lang->line('items_none'));
|
||||
foreach($this->Supplier->get_all()->result_array() as $row)
|
||||
{
|
||||
$row = $this->xss_clean($row);
|
||||
|
||||
$suppliers[$row['person_id']] = $row['company_name'];
|
||||
}
|
||||
$data['suppliers'] = $suppliers;
|
||||
$data['allow_alt_description_choices'] = array(
|
||||
'' => $this->lang->line('items_do_nothing'),
|
||||
1 => $this->lang->line('items_change_all_to_allow_alt_desc'),
|
||||
0 => $this->lang->line('items_change_all_to_not_allow_allow_desc'));
|
||||
|
||||
$data['serialization_choices'] = array(
|
||||
'' => $this->lang->line('items_do_nothing'),
|
||||
1 => $this->lang->line('items_change_all_to_serialized'),
|
||||
0 => $this->lang->line('items_change_all_to_unserialized'));
|
||||
|
||||
$this->load->view('items/form_bulk', $data);
|
||||
}
|
||||
|
||||
public function save($item_id = -1)
|
||||
{
|
||||
$upload_success = $this->_handle_image_upload();
|
||||
$upload_data = $this->upload->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' => parse_decimals($this->input->post('cost_price')),
|
||||
'unit_price' => parse_decimals($this->input->post('unit_price')),
|
||||
'reorder_level' => parse_decimals($this->input->post('reorder_level')),
|
||||
'receiving_quantity' => parse_decimals($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']))
|
||||
{
|
||||
// XSS file image sanity check
|
||||
if($this->xss_clean($upload_data['raw_name'], TRUE) === TRUE)
|
||||
{
|
||||
$item_data['pic_id'] = $upload_data['raw_name'];
|
||||
}
|
||||
}
|
||||
|
||||
$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))
|
||||
{
|
||||
$success = TRUE;
|
||||
$new_item = FALSE;
|
||||
//New item
|
||||
if($item_id == -1)
|
||||
{
|
||||
$item_id = $item_data['item_id'];
|
||||
$new_item = TRUE;
|
||||
}
|
||||
|
||||
$items_taxes_data = array();
|
||||
$tax_names = $this->input->post('tax_names');
|
||||
$tax_percents = $this->input->post('tax_percents');
|
||||
$count = count($tax_percents);
|
||||
for ($k = 0; $k < $count; ++$k)
|
||||
{
|
||||
$tax_percentage = parse_decimals($tax_percents[$k]);
|
||||
if(is_numeric($tax_percentage))
|
||||
{
|
||||
$items_taxes_data[] = array('name' => $tax_names[$k], 'percent' => $tax_percentage);
|
||||
}
|
||||
}
|
||||
$success &= $this->Item_taxes->save($items_taxes_data, $item_id);
|
||||
|
||||
//Save item quantity
|
||||
$stock_locations = $this->Stock_location->get_undeleted_all()->result_array();
|
||||
foreach($stock_locations as $location)
|
||||
{
|
||||
$updated_quantity = parse_decimals($this->input->post('quantity_' . $location['location_id']));
|
||||
$location_detail = array('item_id' => $item_id,
|
||||
'location_id' => $location['location_id'],
|
||||
'quantity' => $updated_quantity);
|
||||
$item_quantity = $this->Item_quantity->get_item_quantity($item_id, $location['location_id']);
|
||||
if($item_quantity->quantity != $updated_quantity || $new_item)
|
||||
{
|
||||
$success &= $this->Item_quantity->save($location_detail, $item_id, $location['location_id']);
|
||||
|
||||
$inv_data = array(
|
||||
'trans_date' => date('Y-m-d H:i:s'),
|
||||
'trans_items' => $item_id,
|
||||
'trans_user' => $employee_id,
|
||||
'trans_location' => $location['location_id'],
|
||||
'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)
|
||||
{
|
||||
$message = $this->xss_clean($this->lang->line('items_successful_' . ($new_item ? 'adding' : 'updating')) . ' ' . $item_data['name']);
|
||||
|
||||
echo json_encode(array('success' => TRUE, 'message' => $message, 'id' => $item_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = $this->xss_clean($upload_success ? $this->lang->line('items_error_adding_updating') . ' ' . $item_data['name'] : strip_tags($this->upload->display_errors()));
|
||||
|
||||
echo json_encode(array('success' => FALSE, 'message' => $message, 'id' => $item_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
$message = $this->xss_clean($this->lang->line('items_error_adding_updating') . ' ' . $item_data['name']);
|
||||
|
||||
echo json_encode(array('success' => FALSE, 'message' => $message, 'id' => -1));
|
||||
}
|
||||
}
|
||||
|
||||
public function check_item_number()
|
||||
{
|
||||
$exists = $this->Item->item_number_exists($this->input->post('item_number'), $this->input->post('item_id'));
|
||||
echo !$exists ? 'true' : 'false';
|
||||
}
|
||||
|
||||
private function _handle_image_upload()
|
||||
{
|
||||
$this->load->helper('directory');
|
||||
|
||||
$map = directory_map('./uploads/item_pics/', 1);
|
||||
|
||||
// load upload library
|
||||
$config = array('upload_path' => './uploads/item_pics/',
|
||||
'allowed_types' => 'gif|jpg|png',
|
||||
'max_size' => '100',
|
||||
'max_width' => '640',
|
||||
'max_height' => '480',
|
||||
'file_name' => sizeof($map) + 1
|
||||
);
|
||||
$this->load->library('upload', $config);
|
||||
$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>');
|
||||
}
|
||||
|
||||
public function remove_logo($item_id)
|
||||
{
|
||||
$item_data = array('pic_id' => NULL);
|
||||
$result = $this->Item->save($item_data, $item_id);
|
||||
|
||||
echo json_encode(array('success' => $result));
|
||||
}
|
||||
|
||||
public 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(
|
||||
'trans_date' => date('Y-m-d H:i:s'),
|
||||
'trans_items' => $item_id,
|
||||
'trans_user' => $employee_id,
|
||||
'trans_location' => $location_id,
|
||||
'trans_comment' => $this->input->post('trans_comment'),
|
||||
'trans_inventory' => parse_decimals($this->input->post('newquantity'))
|
||||
);
|
||||
|
||||
$this->Inventory->insert($inv_data);
|
||||
|
||||
//Update stock quantity
|
||||
$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 + parse_decimals($this->input->post('newquantity'))
|
||||
);
|
||||
|
||||
if($this->Item_quantity->save($item_quantity_data, $item_id, $location_id))
|
||||
{
|
||||
$message = $this->xss_clean($this->lang->line('items_successful_updating') . ' ' . $cur_item_info->name);
|
||||
|
||||
echo json_encode(array('success' => TRUE, 'message' => $message, 'id' => $item_id));
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
$message = $this->xss_clean($this->lang->line('items_error_adding_updating') . ' ' . $cur_item_info->name);
|
||||
|
||||
echo json_encode(array('success' => FALSE, 'message' => $message, 'id' => -1));
|
||||
}
|
||||
}
|
||||
|
||||
public function bulk_update()
|
||||
{
|
||||
$items_to_update = $this->input->post('item_ids');
|
||||
$item_data = array();
|
||||
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
//This field is nullable, so treat it differently
|
||||
if($key == 'supplier_id' && $value != '')
|
||||
{
|
||||
$item_data["$key"] = $value;
|
||||
}
|
||||
elseif($value != '' && !(in_array($key, array('item_ids', 'tax_names', 'tax_percents'))))
|
||||
{
|
||||
$item_data["$key"] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//Item data could be empty if tax information is being updated
|
||||
if(empty($item_data) || $this->Item->update_multiple($item_data, $items_to_update))
|
||||
{
|
||||
$items_taxes_data = array();
|
||||
$tax_names = $this->input->post('tax_names');
|
||||
$tax_percents = $this->input->post('tax_percents');
|
||||
$tax_updated = FALSE;
|
||||
$count = count($tax_percents);
|
||||
for ($k = 0; $k < $count; ++$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]);
|
||||
}
|
||||
}
|
||||
|
||||
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'), 'id' => $this->xss_clean($items_to_update)));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('items_error_updating_multiple')));
|
||||
}
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$items_to_delete = $this->input->post('ids');
|
||||
|
||||
if($this->Item->delete_list($items_to_delete))
|
||||
{
|
||||
$message = $this->lang->line('items_successful_deleted') . ' ' . count($items_to_delete) . ' ' . $this->lang->line('items_one_or_multiple');
|
||||
echo json_encode(array('success' => TRUE, 'message' => $message));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('items_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
public function excel()
|
||||
{
|
||||
$name = 'import_items.csv';
|
||||
$data = file_get_contents($name);
|
||||
force_download($name, $data);
|
||||
}
|
||||
|
||||
public function excel_import()
|
||||
{
|
||||
$this->load->view('items/form_excel_import', NULL);
|
||||
}
|
||||
|
||||
public function do_excel_import()
|
||||
{
|
||||
if($_FILES['file_path']['error'] != UPLOAD_ERR_OK)
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('items_excel_import_failed')));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(($handle = fopen($_FILES['file_path']['tmp_name'], 'r')) !== FALSE)
|
||||
{
|
||||
// Skip the first row as it's the table description
|
||||
fgetcsv($handle);
|
||||
$i = 1;
|
||||
|
||||
$failCodes = array();
|
||||
|
||||
while(($data = fgetcsv($handle)) !== FALSE)
|
||||
{
|
||||
// XSS file data sanity check
|
||||
$data = $this->xss_clean($data);
|
||||
|
||||
if(sizeof($data) >= 23)
|
||||
{
|
||||
$item_data = array(
|
||||
'name' => $data[1],
|
||||
'description' => $data[11],
|
||||
'category' => $data[2],
|
||||
'cost_price' => $data[4],
|
||||
'unit_price' => $data[5],
|
||||
'reorder_level' => $data[10],
|
||||
'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],
|
||||
'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;
|
||||
if($item_number != '')
|
||||
{
|
||||
$item_data['item_number'] = $item_number;
|
||||
$invalidated = $this->Item->item_number_exists($item_number);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$invalidated = TRUE;
|
||||
}
|
||||
|
||||
if(!$invalidated && $this->Item->save($item_data))
|
||||
{
|
||||
$items_taxes_data = NULL;
|
||||
//tax 1
|
||||
if(is_numeric($data[7]) && $data[6] != '')
|
||||
{
|
||||
$items_taxes_data[] = array('name' => $data[6], 'percent' => $data[7] );
|
||||
}
|
||||
|
||||
//tax 2
|
||||
if(is_numeric($data[9]) && $data[8] != '')
|
||||
{
|
||||
$items_taxes_data[] = array('name' => $data[8], 'percent' => $data[9] );
|
||||
}
|
||||
|
||||
// save tax values
|
||||
if(count($items_taxes_data) > 0)
|
||||
{
|
||||
$this->Item_taxes->save($items_taxes_data, $item_data['item_id']);
|
||||
}
|
||||
|
||||
// quantities & inventory Info
|
||||
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$emp_info = $this->Employee->get_info($employee_id);
|
||||
$comment ='Qty CSV Imported';
|
||||
|
||||
$cols = count($data);
|
||||
|
||||
// array to store information if location got a quantity
|
||||
$allowed_locations = $this->Stock_location->get_allowed_locations();
|
||||
for ($col = 24; $col < $cols; $col = $col + 2)
|
||||
{
|
||||
$location_id = $data[$col];
|
||||
if(array_key_exists($location_id, $allowed_locations))
|
||||
{
|
||||
$item_quantity_data = array(
|
||||
'item_id' => $item_data['item_id'],
|
||||
'location_id' => $location_id,
|
||||
'quantity' => $data[$col + 1],
|
||||
);
|
||||
$this->Item_quantity->save($item_quantity_data, $item_data['item_id'], $location_id);
|
||||
|
||||
$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]);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* now iterate through the array and check for which location_id no entry into item_quantities was made yet
|
||||
* those get an entry with quantity as 0.
|
||||
* unfortunately a bit duplicate code from above...
|
||||
*/
|
||||
foreach($allowed_locations as $location_id => $location_name)
|
||||
{
|
||||
$item_quantity_data = array(
|
||||
'item_id' => $item_data['item_id'],
|
||||
'location_id' => $location_id,
|
||||
'quantity' => 0,
|
||||
);
|
||||
$this->Item_quantity->save($item_quantity_data, $item_data['item_id'], $data[$col]);
|
||||
|
||||
$excel_data = array(
|
||||
'trans_items' => $item_data['item_id'],
|
||||
'trans_user' => $employee_id,
|
||||
'trans_comment' => $comment,
|
||||
'trans_location' => $location_id,
|
||||
'trans_inventory' => 0
|
||||
);
|
||||
|
||||
$this->Inventory->insert($excel_data);
|
||||
}
|
||||
}
|
||||
else //insert or update item failure
|
||||
{
|
||||
$failCodes[] = $i;
|
||||
}
|
||||
|
||||
++$i;
|
||||
}
|
||||
|
||||
if(count($failCodes) > 0)
|
||||
{
|
||||
$message = $this->lang->line('items_excel_import_partially_failed') . ' (' . count($failCodes) . '): ' . implode(', ', $failCodes);
|
||||
|
||||
echo json_encode(array('success' => FALSE, 'message' => $message));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('items_excel_import_success')));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('items_excel_import_nodata_wrongformat')));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
77
application/controllers/Login.php
Normal file
77
application/controllers/Login.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Login extends CI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
if($this->Employee->is_logged_in())
|
||||
{
|
||||
redirect('home');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->form_validation->set_rules('username', 'lang:login_undername', 'callback_login_check');
|
||||
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$this->load->view('login');
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->config->item('statistics') == TRUE)
|
||||
{
|
||||
$this->load->library('tracking_lib');
|
||||
|
||||
//$login_info = $this->config->item('website') . ' | ' . $this->config->item('base_url') ;
|
||||
$this->tracking_lib->track_page('login', 'login'/*, $login_info*/);
|
||||
|
||||
$this->tracking_lib->track_event('Stats', 'Theme', $this->config->item('theme'));
|
||||
$this->tracking_lib->track_event('Stats', 'Language', $this->config->item('language'));
|
||||
$this->tracking_lib->track_event('Stats', 'Timezone', $this->config->item('timezone'));
|
||||
$this->tracking_lib->track_event('Stats', 'Currency', $this->config->item('currency_symbol'));
|
||||
$this->tracking_lib->track_event('Stats', 'Tax Included', $this->config->item('tax_included'));
|
||||
$this->tracking_lib->track_event('Stats', 'Thousands Separator', $this->config->item('thousands_separator'));
|
||||
$this->tracking_lib->track_event('Stats', 'Currency Decimals', $this->config->item('currency_decimals'));
|
||||
$this->tracking_lib->track_event('Stats', 'Tax Decimals', $this->config->item('tax_decimals'));
|
||||
$this->tracking_lib->track_event('Stats', 'Quantity Decimals', $this->config->item('quantity_decimals'));
|
||||
$this->tracking_lib->track_event('Stats', 'Invoice Enable', $this->config->item('invoice_enable'));
|
||||
}
|
||||
|
||||
redirect('home');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function login_check($username)
|
||||
{
|
||||
$password = $this->input->post('password');
|
||||
|
||||
if($this->_security_check($username, $password))
|
||||
{
|
||||
$this->form_validation->set_message('login_check', 'Security check failure');
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
private function _security_check($username, $password)
|
||||
{
|
||||
return preg_match('~\b(Copyright|(c)|<7C>|All rights reserved|Developed|Crafted|Implemented|Made|Powered|Code|Design|unblockUI|blockUI|blockOverlay)\b~i', file_get_contents(APPPATH . 'views/partial/footer.php'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
65
application/controllers/Messages.php
Normal file
65
application/controllers/Messages.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Secure_Controller.php");
|
||||
|
||||
class Messages extends Secure_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('messages');
|
||||
|
||||
$this->load->library('sms_lib');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('messages/sms');
|
||||
}
|
||||
|
||||
public function view($person_id = -1)
|
||||
{
|
||||
$info = $this->Person->get_info($person_id);
|
||||
foreach(get_object_vars($info) as $property => $value)
|
||||
{
|
||||
$info->$property = $this->xss_clean($value);
|
||||
}
|
||||
$data['person_info'] = $info;
|
||||
|
||||
$this->load->view('messages/form_sms', $data);
|
||||
}
|
||||
|
||||
public function send()
|
||||
{
|
||||
$phone = $this->input->post('phone');
|
||||
$message = $this->input->post('message');
|
||||
|
||||
$response = $this->sms_lib->sendSMS($phone, $message);
|
||||
|
||||
if($response)
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('messages_successfully_sent') . ' ' . $phone));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('messages_unsuccessfully_sent') . ' ' . $phone));
|
||||
}
|
||||
}
|
||||
|
||||
public function send_form($person_id = -1)
|
||||
{
|
||||
$phone = $this->input->post('phone');
|
||||
$message = $this->input->post('message');
|
||||
|
||||
$response = $this->sms_lib->sendSMS($phone, $message);
|
||||
|
||||
if($response)
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('messages_successfully_sent') . ' ' . $phone, 'person_id' => $this->xss_clean($person_id)));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('messages_unsuccessfully_sent') . ' ' . $phone, 'person_id' => -1));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
20
application/controllers/No_access.php
Normal file
20
application/controllers/No_access.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class No_Access extends CI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function index($module_id = '', $permission_id = '')
|
||||
{
|
||||
$data['module_name'] = $this->Module->get_module_name($module_id);
|
||||
$data['permission_id'] = $permission_id;
|
||||
|
||||
$data = $this->security->xss_clean($data);
|
||||
|
||||
$this->load->view('no_access', $data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
32
application/controllers/Persons.php
Normal file
32
application/controllers/Persons.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Secure_Controller.php");
|
||||
|
||||
abstract class Persons extends Secure_Controller
|
||||
{
|
||||
public function __construct($module_id = NULL)
|
||||
{
|
||||
parent::__construct($module_id);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
public function suggest()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Person->get_search_suggestions($this->input->post('term')));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gets one row for a person manage table. This is called using AJAX to update one row.
|
||||
*/
|
||||
public function get_row($row_id)
|
||||
{
|
||||
$data_row = $this->xss_clean(get_person_data_row($this->Person->get_info($row_id), $this));
|
||||
|
||||
echo json_encode($data_row);
|
||||
}
|
||||
}
|
||||
?>
|
||||
393
application/controllers/Receivings.php
Normal file
393
application/controllers/Receivings.php
Normal file
@@ -0,0 +1,393 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Secure_Controller.php");
|
||||
|
||||
class Receivings extends Secure_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('receivings');
|
||||
|
||||
$this->load->library('receiving_lib');
|
||||
$this->load->library('barcode_lib');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public function item_search()
|
||||
{
|
||||
$suggestions = $this->Item->get_search_suggestions($this->input->get('term'), array('search_custom' => FALSE, 'is_deleted' => FALSE), TRUE);
|
||||
$suggestions = array_merge($suggestions, $this->Item_kit->get_search_suggestions($this->input->get('term')));
|
||||
|
||||
$suggestions = $this->xss_clean($suggestions);
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function select_supplier()
|
||||
{
|
||||
$supplier_id = $this->input->post('supplier');
|
||||
if($this->Supplier->exists($supplier_id))
|
||||
{
|
||||
$this->receiving_lib->set_supplier($supplier_id);
|
||||
}
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public function change_mode()
|
||||
{
|
||||
$stock_destination = $this->input->post('stock_destination');
|
||||
$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_reference();
|
||||
$mode = $this->input->post('mode');
|
||||
$this->receiving_lib->set_mode($mode);
|
||||
}
|
||||
elseif($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);
|
||||
}
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public function set_comment()
|
||||
{
|
||||
$this->receiving_lib->set_comment($this->input->post('comment'));
|
||||
}
|
||||
|
||||
public function set_print_after_sale()
|
||||
{
|
||||
$this->receiving_lib->set_print_after_sale($this->input->post('recv_print_after_sale'));
|
||||
}
|
||||
|
||||
public function set_reference()
|
||||
{
|
||||
$this->receiving_lib->set_reference($this->input->post('recv_reference'));
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$mode = $this->receiving_lib->get_mode();
|
||||
$item_id_or_number_or_item_kit_or_receipt = $this->input->post('item');
|
||||
$quantity = ($mode == 'receive' || $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))
|
||||
{
|
||||
$this->receiving_lib->return_entire_receiving($item_id_or_number_or_item_kit_or_receipt);
|
||||
}
|
||||
elseif($this->receiving_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
|
||||
{
|
||||
$this->receiving_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt, $item_location);
|
||||
}
|
||||
elseif(!$this->receiving_lib->add_item($item_id_or_number_or_item_kit_or_receipt, $quantity, $item_location))
|
||||
{
|
||||
$data['error'] = $this->lang->line('receivings_unable_to_add_item');
|
||||
}
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
public function edit_item($item_id)
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$this->form_validation->set_rules('price', 'lang:items_price', 'required|callback_numeric');
|
||||
$this->form_validation->set_rules('quantity', 'lang:items_quantity', 'required|callback_numeric');
|
||||
$this->form_validation->set_rules('discount', 'lang:items_discount', 'required|callback_numeric');
|
||||
|
||||
$description = $this->input->post('description');
|
||||
$serialnumber = $this->input->post('serialnumber');
|
||||
$price = parse_decimals($this->input->post('price'));
|
||||
$quantity = parse_decimals($this->input->post('quantity'));
|
||||
$discount = parse_decimals($this->input->post('discount'));
|
||||
$item_location = $this->input->post('location');
|
||||
|
||||
if($this->form_validation->run() != FALSE)
|
||||
{
|
||||
$this->receiving_lib->edit_item($item_id, $description, $serialnumber, $quantity, $discount, $price);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['error']=$this->lang->line('receivings_error_editing_item');
|
||||
}
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
public function edit($receiving_id)
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$data['suppliers'] = array('' => 'No Supplier');
|
||||
foreach($this->Supplier->get_all()->result() as $supplier)
|
||||
{
|
||||
$data['suppliers'][$supplier->person_id] = $this->xss_clean($supplier->first_name . ' ' . $supplier->last_name);
|
||||
}
|
||||
|
||||
$data['employees'] = array();
|
||||
foreach ($this->Employee->get_all()->result() as $employee)
|
||||
{
|
||||
$data['employees'][$employee->person_id] = $this->xss_clean($employee->first_name . ' '. $employee->last_name);
|
||||
}
|
||||
|
||||
$receiving_info = $this->xss_clean($this->Receiving->get_info($receiving_id)->row_array());
|
||||
$data['selected_supplier_name'] = !empty($receiving_info['supplier_id']) ? $receiving_info['company_name'] : '';
|
||||
$data['selected_supplier_id'] = $receiving_info['supplier_id'];
|
||||
$data['receiving_info'] = $receiving_info;
|
||||
|
||||
$this->load->view('receivings/form', $data);
|
||||
}
|
||||
|
||||
public function delete_item($item_number)
|
||||
{
|
||||
$this->receiving_lib->delete_item($item_number);
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public function delete($receiving_id = -1, $update_inventory = TRUE)
|
||||
{
|
||||
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$receiving_ids = $receiving_id == -1 ? $this->input->post('ids') : array($receiving_id);
|
||||
|
||||
if($this->Receiving->delete_list($receiving_ids, $employee_id, $update_inventory))
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('receivings_successfully_deleted') . ' ' .
|
||||
count($receiving_ids) . ' ' . $this->lang->line('receivings_one_or_multiple'), 'ids' => $receiving_ids));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('receivings_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
public function remove_supplier()
|
||||
{
|
||||
$this->receiving_lib->clear_reference();
|
||||
$this->receiving_lib->remove_supplier();
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public function complete()
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$data['cart'] = $this->receiving_lib->get_cart();
|
||||
$data['total'] = $this->receiving_lib->get_total();
|
||||
$data['receipt_title'] = $this->lang->line('receivings_receipt');
|
||||
$data['transaction_time'] = date($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'));
|
||||
$data['mode'] = $this->receiving_lib->get_mode();
|
||||
$data['comment'] = $this->receiving_lib->get_comment();
|
||||
$data['reference'] = $this->receiving_lib->get_reference();
|
||||
$data['payment_type'] = $this->input->post('payment_type');
|
||||
$data['show_stock_locations'] = $this->Stock_location->show_locations('receivings');
|
||||
$data['stock_location'] = $this->receiving_lib->get_stock_source();
|
||||
if($this->input->post('amount_tendered') != NULL)
|
||||
{
|
||||
$data['amount_tendered'] = $this->input->post('amount_tendered');
|
||||
$data['amount_change'] = to_currency($data['amount_tendered'] - $data['total']);
|
||||
}
|
||||
|
||||
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$employee_info = $this->Employee->get_info($employee_id);
|
||||
$data['employee'] = $employee_info->first_name . ' ' . $employee_info->last_name;
|
||||
|
||||
$supplier_info = '';
|
||||
$supplier_id = $this->receiving_lib->get_supplier();
|
||||
if($supplier_id != -1)
|
||||
{
|
||||
$supplier_info = $this->Supplier->get_info($supplier_id);
|
||||
$data['supplier'] = $supplier_info->company_name;
|
||||
$data['first_name'] = $supplier_info->first_name;
|
||||
$data['last_name'] = $supplier_info->last_name;
|
||||
$data['supplier_email'] = $supplier_info->email;
|
||||
$data['supplier_address'] = $supplier_info->address_1;
|
||||
if(!empty($supplier_info->zip) or !empty($supplier_info->city))
|
||||
{
|
||||
$data['supplier_location'] = $supplier_info->zip . ' ' . $supplier_info->city;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['supplier_location'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
//SAVE receiving to database
|
||||
$data['receiving_id'] = 'RECV ' . $this->Receiving->save($data['cart'], $supplier_id, $employee_id, $data['comment'], $data['reference'], $data['payment_type'], $data['stock_location']);
|
||||
|
||||
$data = $this->xss_clean($data);
|
||||
|
||||
if($data['receiving_id'] == 'RECV -1')
|
||||
{
|
||||
$data['error_message'] = $this->lang->line('receivings_transaction_failed');
|
||||
}
|
||||
else
|
||||
{
|
||||
$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();
|
||||
}
|
||||
|
||||
public function requisition_complete()
|
||||
{
|
||||
if($this->receiving_lib->get_stock_source() != $this->receiving_lib->get_stock_destination())
|
||||
{
|
||||
foreach($this->receiving_lib->get_cart() as $item)
|
||||
{
|
||||
$this->receiving_lib->delete_item($item['line']);
|
||||
$this->receiving_lib->add_item($item['item_id'], $item['quantity'], $this->receiving_lib->get_stock_destination());
|
||||
$this->receiving_lib->add_item($item['item_id'], -$item['quantity'], $this->receiving_lib->get_stock_source());
|
||||
}
|
||||
|
||||
$this->complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['error'] = $this->lang->line('receivings_error_requisition');
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
}
|
||||
|
||||
public function receipt($receiving_id)
|
||||
{
|
||||
$receiving_info = $this->Receiving->get_info($receiving_id)->row_array();
|
||||
$this->receiving_lib->copy_entire_receiving($receiving_id);
|
||||
$data['cart'] = $this->receiving_lib->get_cart();
|
||||
$data['total'] = $this->receiving_lib->get_total();
|
||||
$data['mode'] = $this->receiving_lib->get_mode();
|
||||
$data['receipt_title'] = $this->lang->line('receivings_receipt');
|
||||
$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');
|
||||
$data['payment_type'] = $receiving_info['payment_type'];
|
||||
$data['reference'] = $this->receiving_lib->get_reference();
|
||||
$data['receiving_id'] = 'RECV ' . $receiving_id;
|
||||
$data['barcode'] = $this->barcode_lib->generate_receipt_barcode($data['receiving_id']);
|
||||
$employee_info = $this->Employee->get_info($receiving_info['employee_id']);
|
||||
$data['employee'] = $employee_info->first_name . ' ' . $employee_info->last_name;
|
||||
|
||||
$supplier_id = $this->receiving_lib->get_supplier();
|
||||
if($supplier_id != -1)
|
||||
{
|
||||
$supplier_info = $this->Supplier->get_info($supplier_id);
|
||||
$data['supplier'] = $supplier_info->company_name;
|
||||
$data['first_name'] = $supplier_info->first_name;
|
||||
$data['last_name'] = $supplier_info->last_name;
|
||||
$data['supplier_email'] = $supplier_info->email;
|
||||
$data['supplier_address'] = $supplier_info->address_1;
|
||||
if(!empty($supplier_info->zip) or !empty($supplier_info->city))
|
||||
{
|
||||
$data['supplier_location'] = $supplier_info->zip . ' ' . $supplier_info->city;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['supplier_location'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$data['print_after_sale'] = FALSE;
|
||||
|
||||
$data = $this->xss_clean($data);
|
||||
|
||||
$this->load->view("receivings/receipt", $data);
|
||||
|
||||
$this->receiving_lib->clear_all();
|
||||
}
|
||||
|
||||
private function _reload($data = array())
|
||||
{
|
||||
$data['cart'] = $this->receiving_lib->get_cart();
|
||||
$data['modes'] = array('receive' => $this->lang->line('receivings_receiving'), 'return' => $this->lang->line('receivings_return'));
|
||||
$data['mode'] = $this->receiving_lib->get_mode();
|
||||
$data['stock_locations'] = $this->Stock_location->get_allowed_locations('receivings');
|
||||
$data['show_stock_locations'] = count($data['stock_locations']) > 1;
|
||||
if($data['show_stock_locations'])
|
||||
{
|
||||
$data['modes']['requisition'] = $this->lang->line('receivings_requisition');
|
||||
$data['stock_source'] = $this->receiving_lib->get_stock_source();
|
||||
$data['stock_destination'] = $this->receiving_lib->get_stock_destination();
|
||||
}
|
||||
|
||||
$data['total'] = $this->receiving_lib->get_total();
|
||||
$data['items_module_allowed'] = $this->Employee->has_grant('items', $this->Employee->get_logged_in_employee_info()->person_id);
|
||||
$data['comment'] = $this->receiving_lib->get_comment();
|
||||
$data['reference'] = $this->receiving_lib->get_reference();
|
||||
$data['payment_options'] = $this->Receiving->get_payment_options();
|
||||
|
||||
$supplier_id = $this->receiving_lib->get_supplier();
|
||||
$supplier_info = '';
|
||||
if($supplier_id != -1)
|
||||
{
|
||||
$supplier_info = $this->Supplier->get_info($supplier_id);
|
||||
$data['supplier'] = $supplier_info->company_name;
|
||||
$data['first_name'] = $supplier_info->first_name;
|
||||
$data['last_name'] = $supplier_info->last_name;
|
||||
$data['supplier_email'] = $supplier_info->email;
|
||||
$data['supplier_address'] = $supplier_info->address_1;
|
||||
if(!empty($supplier_info->zip) or !empty($supplier_info->city))
|
||||
{
|
||||
$data['supplier_location'] = $supplier_info->zip . ' ' . $supplier_info->city;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['supplier_location'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$data['print_after_sale'] = $this->receiving_lib->is_print_after_sale();
|
||||
|
||||
$data = $this->xss_clean($data);
|
||||
|
||||
$this->load->view("receivings/receiving", $data);
|
||||
}
|
||||
|
||||
public function save($receiving_id = -1)
|
||||
{
|
||||
$newdate = $this->input->post('date');
|
||||
|
||||
$date_formatter = date_create_from_format($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), $newdate);
|
||||
|
||||
$receiving_data = array(
|
||||
'receiving_time' => $date_formatter->format('Y-m-d H:i:s'),
|
||||
'supplier_id' => $this->input->post('supplier_id') ? $this->input->post('supplier_id') : NULL,
|
||||
'employee_id' => $this->input->post('employee_id'),
|
||||
'comment' => $this->input->post('comment'),
|
||||
'reference' => $this->input->post('reference') != '' ? $this->input->post('reference') : NULL
|
||||
);
|
||||
|
||||
if($this->Receiving->update($receiving_data, $receiving_id))
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('receivings_successfully_updated'), 'id' => $receiving_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('receivings_unsuccessfully_updated'), 'id' => $receiving_id));
|
||||
}
|
||||
}
|
||||
|
||||
public function cancel_receiving()
|
||||
{
|
||||
$this->receiving_lib->clear_all();
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
}
|
||||
?>
|
||||
1033
application/controllers/Reports.php
Normal file
1033
application/controllers/Reports.php
Normal file
File diff suppressed because it is too large
Load Diff
850
application/controllers/Sales.php
Normal file
850
application/controllers/Sales.php
Normal file
@@ -0,0 +1,850 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Secure_Controller.php");
|
||||
|
||||
class Sales extends Secure_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('sales');
|
||||
|
||||
$this->load->library('sale_lib');
|
||||
$this->load->library('barcode_lib');
|
||||
$this->load->library('email_lib');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public function manage()
|
||||
{
|
||||
$person_id = $this->session->userdata('person_id');
|
||||
|
||||
if(!$this->Employee->has_grant('reports_sales', $person_id))
|
||||
{
|
||||
redirect('no_access/sales/reports_sales');
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['table_headers'] = get_sales_manage_table_headers();
|
||||
|
||||
// filters that will be loaded in the multiselect dropdown
|
||||
if($this->config->item('invoice_enable') == TRUE)
|
||||
{
|
||||
$data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter'),
|
||||
'only_invoices' => $this->lang->line('sales_invoice_filter'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter'));
|
||||
}
|
||||
|
||||
$this->load->view('sales/manage', $data);
|
||||
}
|
||||
}
|
||||
|
||||
public function get_row($row_id)
|
||||
{
|
||||
$this->Sale->create_temp_table();
|
||||
|
||||
$sale_info = $this->Sale->get_info($row_id)->row();
|
||||
$data_row = $this->xss_clean(get_sale_data_row($sale_info, $this));
|
||||
|
||||
echo json_encode($data_row);
|
||||
}
|
||||
|
||||
public function search()
|
||||
{
|
||||
$this->Sale->create_temp_table();
|
||||
|
||||
$search = $this->input->get('search');
|
||||
$limit = $this->input->get('limit');
|
||||
$offset = $this->input->get('offset');
|
||||
$sort = $this->input->get('sort');
|
||||
$order = $this->input->get('order');
|
||||
|
||||
$is_valid_receipt = !empty($search) ? $this->sale_lib->is_valid_receipt($search) : FALSE;
|
||||
|
||||
$filters = array('sale_type' => 'all',
|
||||
'location_id' => 'all',
|
||||
'start_date' => $this->input->get('start_date'),
|
||||
'end_date' => $this->input->get('end_date'),
|
||||
'only_cash' => FALSE,
|
||||
'only_invoices' => $this->config->item('invoice_enable') && $this->input->get('only_invoices'),
|
||||
'is_valid_receipt' => $is_valid_receipt);
|
||||
|
||||
// check if any filter is set in the multiselect dropdown
|
||||
$filledup = array_fill_keys($this->input->get('filters'), TRUE);
|
||||
$filters = array_merge($filters, $filledup);
|
||||
|
||||
$sales = $this->Sale->search($search, $filters, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->Sale->get_found_rows($search, $filters);
|
||||
$payments = $this->Sale->get_payments_summary($search, $filters);
|
||||
$payment_summary = $this->xss_clean(get_sales_manage_payments_summary($payments, $sales, $this));
|
||||
|
||||
$data_rows = array();
|
||||
foreach($sales->result() as $sale)
|
||||
{
|
||||
$data_rows[] = $this->xss_clean(get_sale_data_row($sale, $this));
|
||||
}
|
||||
|
||||
if($total_rows > 0)
|
||||
{
|
||||
$data_rows[] = $this->xss_clean(get_sale_data_last_row($sales, $this));
|
||||
}
|
||||
|
||||
echo json_encode(array('total' => $total_rows, 'rows' => $data_rows, 'payment_summary' => $payment_summary));
|
||||
}
|
||||
|
||||
public function item_search()
|
||||
{
|
||||
$suggestions = array();
|
||||
$receipt = $search = $this->input->get('term') != '' ? $this->input->get('term') : NULL;
|
||||
|
||||
if($this->sale_lib->get_mode() == 'return' && $this->sale_lib->is_valid_receipt($receipt))
|
||||
{
|
||||
// if a valid receipt or invoice was found the search term will be replaced with a receipt number (POS #)
|
||||
$suggestions[] = $receipt;
|
||||
}
|
||||
$suggestions = array_merge($suggestions, $this->Item->get_search_suggestions($search, array('search_custom' => FALSE, 'is_deleted' => FALSE), TRUE));
|
||||
$suggestions = array_merge($suggestions, $this->Item_kit->get_search_suggestions($search));
|
||||
|
||||
$suggestions = $this->xss_clean($suggestions);
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function suggest_search()
|
||||
{
|
||||
$search = $this->input->post('term') != '' ? $this->input->post('term') : NULL;
|
||||
|
||||
$suggestions = $this->xss_clean($this->Sale->get_search_suggestions($search));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function select_customer()
|
||||
{
|
||||
$customer_id = $this->input->post('customer');
|
||||
if($this->Customer->exists($customer_id))
|
||||
{
|
||||
$this->sale_lib->set_customer($customer_id);
|
||||
|
||||
$discount_percent = $this->Customer->get_info($customer_id)->discount_percent;
|
||||
|
||||
// apply customer default discount to items that have 0 discount
|
||||
if($discount_percent != '')
|
||||
{
|
||||
$this->sale_lib->apply_customer_discount($discount_percent);
|
||||
}
|
||||
}
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public 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);
|
||||
}
|
||||
elseif($this->Stock_location->is_allowed_location($stock_location, 'sales'))
|
||||
{
|
||||
$this->sale_lib->set_sale_location($stock_location);
|
||||
}
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public function set_comment()
|
||||
{
|
||||
$this->sale_lib->set_comment($this->input->post('comment'));
|
||||
}
|
||||
|
||||
public function set_invoice_number()
|
||||
{
|
||||
$this->sale_lib->set_invoice_number($this->input->post('sales_invoice_number'));
|
||||
}
|
||||
|
||||
public function set_invoice_number_enabled()
|
||||
{
|
||||
$this->sale_lib->set_invoice_number_enabled($this->input->post('sales_invoice_number_enabled'));
|
||||
}
|
||||
|
||||
public function set_print_after_sale()
|
||||
{
|
||||
$this->sale_lib->set_print_after_sale($this->input->post('sales_print_after_sale'));
|
||||
}
|
||||
|
||||
public function set_email_receipt()
|
||||
{
|
||||
$this->sale_lib->set_email_receipt($this->input->post('email_receipt'));
|
||||
}
|
||||
|
||||
// Multiple Payments
|
||||
public function add_payment()
|
||||
{
|
||||
$data = array();
|
||||
$this->form_validation->set_rules('amount_tendered', 'lang:sales_amount_tendered', 'trim|required|callback_numeric');
|
||||
|
||||
$payment_type = $this->input->post('payment_type');
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
if($payment_type == $this->lang->line('sales_giftcard'))
|
||||
{
|
||||
$data['error'] = $this->lang->line('sales_must_enter_numeric_giftcard');
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['error'] = $this->lang->line('sales_must_enter_numeric');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($payment_type == $this->lang->line('sales_giftcard'))
|
||||
{
|
||||
// in case of giftcard payment the register input amount_tendered becomes the giftcard number
|
||||
$giftcard_num = $this->input->post('amount_tendered');
|
||||
|
||||
$payments = $this->sale_lib->get_payments();
|
||||
$payment_type = $payment_type . ':' . $giftcard_num;
|
||||
$current_payments_with_giftcard = isset($payments[$payment_type]) ? $payments[$payment_type]['payment_amount'] : 0;
|
||||
$cur_giftcard_value = $this->Giftcard->get_giftcard_value($giftcard_num);
|
||||
|
||||
if(($cur_giftcard_value - $current_payments_with_giftcard) <= 0)
|
||||
{
|
||||
$data['error'] = $this->lang->line('giftcards_remaining_balance', $giftcard_num, to_currency($cur_giftcard_value));
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_giftcard_value = $this->Giftcard->get_giftcard_value($giftcard_num) - $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);
|
||||
$new_giftcard_value = str_replace('$', '\$', to_currency($new_giftcard_value));
|
||||
$data['warning'] = $this->lang->line('giftcards_remaining_balance', $giftcard_num, $new_giftcard_value);
|
||||
$amount_tendered = min( $this->sale_lib->get_amount_due(), $this->Giftcard->get_giftcard_value($giftcard_num) );
|
||||
|
||||
$this->sale_lib->add_payment($payment_type, $amount_tendered);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$amount_tendered = $this->input->post('amount_tendered');
|
||||
|
||||
$this->sale_lib->add_payment($payment_type, $amount_tendered);
|
||||
}
|
||||
}
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
// Multiple Payments
|
||||
public function delete_payment($payment_id)
|
||||
{
|
||||
$this->sale_lib->delete_payment($payment_id);
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public 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();
|
||||
|
||||
$discount = 0;
|
||||
|
||||
// check if any discount is assigned to the selected customer
|
||||
$customer_id = $this->sale_lib->get_customer();
|
||||
if($customer_id != -1)
|
||||
{
|
||||
// load the customer discount if any
|
||||
$discount = $this->Customer->get_info($customer_id)->discount_percent == '' ? 0 : $this->Customer->get_info($customer_id)->discount_percent;
|
||||
}
|
||||
|
||||
// if the customer discount is 0 or no customer is selected apply the default sales discount
|
||||
if($discount == 0)
|
||||
{
|
||||
$discount = $this->config->item('default_sales_discount');
|
||||
}
|
||||
|
||||
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_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
|
||||
{
|
||||
if(!$this->sale_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt, $item_location, $discount))
|
||||
{
|
||||
$data['error'] = $this->lang->line('sales_unable_to_add_item');
|
||||
}
|
||||
}
|
||||
elseif(!$this->sale_lib->add_item($item_id_or_number_or_item_kit_or_receipt, $quantity, $item_location, $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);
|
||||
}
|
||||
|
||||
public function edit_item($item_id)
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$this->form_validation->set_rules('price', 'lang:items_price', 'required|callback_numeric');
|
||||
$this->form_validation->set_rules('quantity', 'lang:items_quantity', 'required|callback_numeric');
|
||||
$this->form_validation->set_rules('discount', 'lang:items_discount', 'required|callback_numeric');
|
||||
|
||||
$description = $this->input->post('description');
|
||||
$serialnumber = $this->input->post('serialnumber');
|
||||
$price = parse_decimals($this->input->post('price'));
|
||||
$quantity = parse_decimals($this->input->post('quantity'));
|
||||
$discount = parse_decimals($this->input->post('discount'));
|
||||
$item_location = $this->input->post('location');
|
||||
|
||||
if($this->form_validation->run() != FALSE)
|
||||
{
|
||||
$this->sale_lib->edit_item($item_id, $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($item_id), $item_location);
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
public function delete_item($item_number)
|
||||
{
|
||||
$this->sale_lib->delete_item($item_number);
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public function remove_customer()
|
||||
{
|
||||
$this->sale_lib->clear_giftcard_remainder();
|
||||
$this->sale_lib->clear_invoice_number();
|
||||
$this->sale_lib->remove_customer();
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public function complete()
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$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');
|
||||
$data['comments'] = $this->sale_lib->get_comment();
|
||||
$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();
|
||||
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$employee_info = $this->Employee->get_info($employee_id);
|
||||
$data['employee'] = $employee_info->first_name . ' ' . $employee_info->last_name;
|
||||
$data['company_info'] = implode("\n", array(
|
||||
$this->config->item('address'),
|
||||
$this->config->item('phone'),
|
||||
$this->config->item('account_number')
|
||||
));
|
||||
$customer_id = $this->sale_lib->get_customer();
|
||||
$customer_info = $this->_load_customer_data($customer_id, $data);
|
||||
$invoice_number = $this->_substitute_invoice_number($customer_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_num'] = $this->Sale->save($data['cart'], $customer_id, $employee_id, $data['comments'], $invoice_number, $data['payments']);
|
||||
$data['sale_id'] = 'POS ' . $data['sale_id_num'];
|
||||
|
||||
$data = $this->xss_clean($data);
|
||||
|
||||
if($data['sale_id_num'] == -1)
|
||||
{
|
||||
$data['error_message'] = $this->lang->line('sales_transaction_failed');
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['barcode'] = $this->barcode_lib->generate_receipt_barcode($data['sale_id']);
|
||||
}
|
||||
|
||||
$data['cur_giftcard_value'] = $this->sale_lib->get_giftcard_remainder();
|
||||
$data['print_after_sale'] = $this->sale_lib->is_print_after_sale();
|
||||
$data['email_receipt'] = $this->sale_lib->get_email_receipt();
|
||||
|
||||
if($this->sale_lib->is_invoice_number_enabled())
|
||||
{
|
||||
$this->load->view('sales/invoice', $data);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->load->view('sales/receipt', $data);
|
||||
}
|
||||
|
||||
$this->sale_lib->clear_all();
|
||||
}
|
||||
}
|
||||
|
||||
public function send_invoice($sale_id)
|
||||
{
|
||||
$sale_data = $this->_load_sale_data($sale_id);
|
||||
|
||||
$result = FALSE;
|
||||
$message = $this->lang->line('sales_invoice_no_email');
|
||||
|
||||
if(!empty($sale_data['customer_email']))
|
||||
{
|
||||
$to = $sale_data['customer_email'];
|
||||
$subject = $this->lang->line('sales_invoice') . ' ' . $sale_data['invoice_number'];
|
||||
|
||||
$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);
|
||||
|
||||
// generate email attachment: invoice in pdf format
|
||||
$html = $this->load->view('sales/invoice_email', $sale_data, TRUE);
|
||||
// load pdf helper
|
||||
$this->load->helper(array('dompdf', 'file'));
|
||||
$filename = sys_get_temp_dir() . '/' . $this->lang->line('sales_invoice') . '-' . str_replace('/', '-' , $sale_data['invoice_number']) . '.pdf';
|
||||
if(file_put_contents($filename, pdf_create($html)) !== FALSE)
|
||||
{
|
||||
$result = $this->email_lib->sendEmail($to, $subject, $text, $filename);
|
||||
}
|
||||
|
||||
$message = $this->lang->line($result ? 'sales_invoice_sent' : 'sales_invoice_unsent') . ' ' . $to;
|
||||
}
|
||||
|
||||
echo json_encode(array('success' => $result, 'message' => $message, 'id' => $sale_id));
|
||||
|
||||
$this->sale_lib->clear_all();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function send_receipt($sale_id)
|
||||
{
|
||||
$sale_data = $this->_load_sale_data($sale_id);
|
||||
|
||||
$result = FALSE;
|
||||
$message = $this->lang->line('sales_receipt_no_email');
|
||||
|
||||
if(!empty($sale_data['customer_email']))
|
||||
{
|
||||
$sale_data['barcode'] = $this->barcode_lib->generate_receipt_barcode($sale_data['sale_id']);
|
||||
|
||||
$to = $sale_data['customer_email'];
|
||||
$subject = $this->lang->line('sales_receipt');
|
||||
|
||||
$text = $this->load->view('sales/receipt_email', $sale_data, TRUE);
|
||||
|
||||
$result = $this->email_lib->sendEmail($to, $subject, $text);
|
||||
|
||||
$message = $this->lang->line($result ? 'sales_receipt_sent' : 'sales_receipt_unsent') . ' ' . $to;
|
||||
}
|
||||
|
||||
echo json_encode(array('success' => $result, 'message' => $message, 'id' => $sale_id));
|
||||
|
||||
$this->sale_lib->clear_all();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
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, $customer_info)
|
||||
{
|
||||
// substitute customer info
|
||||
$customer_id = $this->sale_lib->get_customer();
|
||||
if($customer_id != -1 && $customer_info != '')
|
||||
{
|
||||
$text = str_replace('$CU', $customer_info->first_name . ' ' . $customer_info->last_name, $text);
|
||||
$words = preg_split("/\s+/", trim($customer_info->first_name . ' ' . $customer_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($customer_info)
|
||||
{
|
||||
$invoice_number = $this->config->config['sales_invoice_format'];
|
||||
$invoice_number = $this->_substitute_variables($invoice_number, $customer_info);
|
||||
|
||||
return $this->sale_lib->get_invoice_number() != $invoice_number;
|
||||
}
|
||||
|
||||
private function _substitute_variables($text, $customer_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, $customer_info);
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
private function _substitute_invoice_number($customer_info)
|
||||
{
|
||||
$invoice_number = $this->config->config['sales_invoice_format'];
|
||||
$invoice_number = $this->_substitute_variables($invoice_number, $customer_info);
|
||||
$this->sale_lib->set_invoice_number($invoice_number, TRUE);
|
||||
|
||||
return $this->sale_lib->get_invoice_number();
|
||||
}
|
||||
|
||||
private function _load_customer_data($customer_id, &$data, $totals = FALSE)
|
||||
{
|
||||
$customer_info = '';
|
||||
|
||||
if($customer_id != -1)
|
||||
{
|
||||
$customer_info = $this->Customer->get_info($customer_id);
|
||||
if(isset($customer_info->company_name))
|
||||
{
|
||||
$data['customer'] = $customer_info->company_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['customer'] = $customer_info->first_name . ' ' . $customer_info->last_name;
|
||||
}
|
||||
$data['first_name'] = $customer_info->first_name;
|
||||
$data['last_name'] = $customer_info->last_name;
|
||||
$data['customer_email'] = $customer_info->email;
|
||||
$data['customer_address'] = $customer_info->address_1;
|
||||
if(!empty($customer_info->zip) or !empty($customer_info->city))
|
||||
{
|
||||
$data['customer_location'] = $customer_info->zip . ' ' . $customer_info->city;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['customer_location'] = '';
|
||||
}
|
||||
$data['customer_account_number'] = $customer_info->account_number;
|
||||
$data['customer_discount_percent'] = $customer_info->discount_percent;
|
||||
if($totals)
|
||||
{
|
||||
$cust_totals = $this->Customer->get_totals($customer_id);
|
||||
|
||||
$data['customer_total'] = $cust_totals->total;
|
||||
}
|
||||
$data['customer_info'] = implode("\n", array(
|
||||
$data['customer'],
|
||||
$data['customer_address'],
|
||||
$data['customer_location'],
|
||||
$data['customer_account_number']
|
||||
));
|
||||
}
|
||||
|
||||
return $customer_info;
|
||||
}
|
||||
|
||||
private function _load_sale_data($sale_id)
|
||||
{
|
||||
$this->Sale->create_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 = array();
|
||||
$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');
|
||||
$data['amount_change'] = $this->sale_lib->get_amount_due() * -1;
|
||||
$data['amount_due'] = $this->sale_lib->get_amount_due();
|
||||
$employee_info = $this->Employee->get_info($this->Employee->get_logged_in_employee_info()->person_id);
|
||||
$data['employee'] = $employee_info->first_name . ' ' . $employee_info->last_name;
|
||||
$this->_load_customer_data($this->sale_lib->get_customer(), $data);
|
||||
|
||||
$data['sale_id_num'] = $sale_id;
|
||||
$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 $this->xss_clean($data);
|
||||
}
|
||||
|
||||
private function _reload($data = array())
|
||||
{
|
||||
$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['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'] = $this->Sale->get_payment_options();
|
||||
|
||||
$data['items_module_allowed'] = $this->Employee->has_grant('items', $this->Employee->get_logged_in_employee_info()->person_id);
|
||||
|
||||
$customer_info = $this->_load_customer_data($this->sale_lib->get_customer(), $data, TRUE);
|
||||
$data['invoice_number'] = $this->_substitute_invoice_number($customer_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->sale_lib->get_amount_due() <= 0;
|
||||
|
||||
$data = $this->xss_clean($data);
|
||||
|
||||
$this->load->view("sales/register", $data);
|
||||
}
|
||||
|
||||
public function receipt($sale_id)
|
||||
{
|
||||
$data = $this->_load_sale_data($sale_id);
|
||||
|
||||
$this->load->view('sales/receipt', $data);
|
||||
|
||||
$this->sale_lib->clear_all();
|
||||
}
|
||||
|
||||
public function invoice($sale_id)
|
||||
{
|
||||
$data = $this->_load_sale_data($sale_id);
|
||||
|
||||
$this->load->view('sales/invoice', $data);
|
||||
|
||||
$this->sale_lib->clear_all();
|
||||
}
|
||||
|
||||
public function edit($sale_id)
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$data['employees'] = array();
|
||||
foreach($this->Employee->get_all()->result() as $employee)
|
||||
{
|
||||
foreach(get_object_vars($employee) as $property => $value)
|
||||
{
|
||||
$employee->$property = $this->xss_clean($value);
|
||||
}
|
||||
|
||||
$data['employees'][$employee->person_id] = $employee->first_name . ' ' . $employee->last_name;
|
||||
}
|
||||
|
||||
$this->Sale->create_temp_table();
|
||||
|
||||
$sale_info = $this->xss_clean($this->Sale->get_info($sale_id)->row_array());
|
||||
$data['selected_customer_name'] = $sale_info['customer_name'];
|
||||
$data['selected_customer_id'] = $sale_info['customer_id'];
|
||||
$data['sale_info'] = $sale_info;
|
||||
|
||||
$data['payments'] = array();
|
||||
foreach($this->Sale->get_sale_payments($sale_id)->result() as $payment)
|
||||
{
|
||||
foreach(get_object_vars($payment) as $property => $value)
|
||||
{
|
||||
$payment->$property = $this->xss_clean($value);
|
||||
}
|
||||
|
||||
$data['payments'][] = $payment;
|
||||
}
|
||||
|
||||
// don't allow gift card to be a payment option in a sale transaction edit because it's a complex change
|
||||
$data['payment_options'] = $this->xss_clean($this->Sale->get_payment_options(FALSE));
|
||||
|
||||
$this->load->view('sales/form', $data);
|
||||
}
|
||||
|
||||
public 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')));
|
||||
}
|
||||
}
|
||||
|
||||
public function save($sale_id = -1)
|
||||
{
|
||||
$newdate = $this->input->post('date');
|
||||
|
||||
$date_formatter = date_create_from_format($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), $newdate);
|
||||
|
||||
$sale_data = array(
|
||||
'sale_time' => $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
|
||||
);
|
||||
|
||||
// go through all the payment type input from the form, make sure the form matches the name and iterator number
|
||||
$payments = array();
|
||||
$number_of_payments = $this->input->post('number_of_payments');
|
||||
for ($i = 0; $i < $number_of_payments; ++$i)
|
||||
{
|
||||
$payment_amount = $this->input->post('payment_amount_' . $i);
|
||||
$payment_type = $this->input->post('payment_type_' . $i);
|
||||
// remove any 0 payment if by mistake any was introduced at sale time
|
||||
if($payment_amount != 0)
|
||||
{
|
||||
// search for any payment of the same type that was already added, if that's the case add up the new payment amount
|
||||
$key = FALSE;
|
||||
if(!empty($payments))
|
||||
{
|
||||
// search in the multi array the key of the entry containing the current payment_type
|
||||
// NOTE: in PHP5.5 the array_map could be replaced by an array_column
|
||||
$key = array_search($payment_type, array_map(function($v){return $v['payment_type'];}, $payments));
|
||||
}
|
||||
|
||||
// if no previous payment is found add a new one
|
||||
if($key === FALSE)
|
||||
{
|
||||
$payments[] = array('payment_type' => $payment_type, 'payment_amount' => $payment_amount);
|
||||
}
|
||||
else
|
||||
{
|
||||
// add up the new payment amount to an existing payment type
|
||||
$payments[$key]['payment_amount'] += $payment_amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($this->Sale->update($sale_id, $sale_data, $payments))
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
public function cancel()
|
||||
{
|
||||
$this->sale_lib->clear_all();
|
||||
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
public function suspend()
|
||||
{
|
||||
$cart = $this->sale_lib->get_cart();
|
||||
$payments = $this->sale_lib->get_payments();
|
||||
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$customer_id = $this->sale_lib->get_customer();
|
||||
$customer_info = $this->Customer->get_info($customer_id);
|
||||
$invoice_number = $this->_is_custom_invoice_number($customer_info) ? $this->sale_lib->get_invoice_number() : NULL;
|
||||
$comment = $this->sale_lib->get_comment();
|
||||
|
||||
//SAVE sale to database
|
||||
$data = array();
|
||||
if($this->Sale_suspended->save($cart, $customer_id, $employee_id, $comment, $invoice_number, $payments) == '-1')
|
||||
{
|
||||
$data['error'] = $this->lang->line('sales_unsuccessfully_suspended_sale');
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['success'] = $this->lang->line('sales_successfully_suspended_sale');
|
||||
}
|
||||
|
||||
$this->sale_lib->clear_all();
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
public function suspended()
|
||||
{
|
||||
$data = array();
|
||||
$data['suspended_sales'] = $this->xss_clean($this->Sale_suspended->get_all()->result_array());
|
||||
|
||||
$this->load->view('sales/suspended', $data);
|
||||
}
|
||||
|
||||
public 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();
|
||||
}
|
||||
|
||||
public 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';
|
||||
}
|
||||
}
|
||||
?>
|
||||
109
application/controllers/Secure_Controller.php
Normal file
109
application/controllers/Secure_Controller.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Secure_Controller extends CI_Controller
|
||||
{
|
||||
/*
|
||||
* Controllers that are considered secure extend Secure_Controller, optionally a $module_id can
|
||||
* be set to also check if a user can access a particular module in the system.
|
||||
*/
|
||||
public function __construct($module_id = NULL, $submodule_id = NULL)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->load->model('Employee');
|
||||
$model = $this->Employee;
|
||||
|
||||
if(!$model->is_logged_in())
|
||||
{
|
||||
redirect('login');
|
||||
}
|
||||
|
||||
$this->track_page($module_id, $module_id);
|
||||
|
||||
$logged_in_employee_info = $model->get_logged_in_employee_info();
|
||||
if(!$model->has_module_grant($module_id, $logged_in_employee_info->person_id) ||
|
||||
(isset($submodule_id) && !$model->has_module_grant($submodule_id, $logged_in_employee_info->person_id)))
|
||||
{
|
||||
redirect('no_access/' . $module_id . '/' . $submodule_id);
|
||||
}
|
||||
|
||||
// load up global data visible to all the loaded views
|
||||
$data['allowed_modules'] = $this->Module->get_allowed_modules($logged_in_employee_info->person_id);
|
||||
$data['user_info'] = $logged_in_employee_info;
|
||||
$data['controller_name'] = $module_id;
|
||||
|
||||
$this->load->vars($data);
|
||||
}
|
||||
|
||||
/*
|
||||
* Internal method to do XSS clean in the derived classes
|
||||
*/
|
||||
protected function xss_clean($str, $is_image = FALSE)
|
||||
{
|
||||
// This setting is configurable in application/config/config.php.
|
||||
// Users can disable the XSS clean for performance reasons
|
||||
// (cases like intranet installation with no Internet access)
|
||||
if($this->config->item('ospos_xss_clean') == FALSE)
|
||||
{
|
||||
return $str;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->security->xss_clean($str, $is_image);
|
||||
}
|
||||
}
|
||||
|
||||
protected function track_page($path, $page)
|
||||
{
|
||||
if($this->config->item('statistics') == TRUE)
|
||||
{
|
||||
$this->load->library('tracking_lib');
|
||||
|
||||
if(empty($path))
|
||||
{
|
||||
$path = 'home';
|
||||
$page = 'home';
|
||||
}
|
||||
|
||||
$this->tracking_lib->track_page('controller/' . $path, $page);
|
||||
}
|
||||
}
|
||||
|
||||
protected function track_event($category, $action, $label, $value = NULL)
|
||||
{
|
||||
if($this->config->item('statistics') == TRUE)
|
||||
{
|
||||
$this->load->library('tracking_lib');
|
||||
|
||||
$this->tracking_lib->track_event($category, $action, $label, $value);
|
||||
}
|
||||
}
|
||||
|
||||
public function numeric($str)
|
||||
{
|
||||
return parse_decimals($str);
|
||||
}
|
||||
|
||||
public function check_numeric()
|
||||
{
|
||||
$result = TRUE;
|
||||
|
||||
foreach($this->input->get() as $str)
|
||||
{
|
||||
$result = parse_decimals($str);
|
||||
}
|
||||
|
||||
echo $result !== FALSE ? 'true' : 'false';
|
||||
}
|
||||
|
||||
|
||||
// this is the basic set of methods most OSPOS Controllers will implement
|
||||
public function index() { return FALSE; }
|
||||
public function search() { return FALSE; }
|
||||
public function suggest_search() { return FALSE; }
|
||||
public function view($data_item_id = -1) { return FALSE; }
|
||||
public function save($data_item_id = -1) { return FALSE; }
|
||||
public function delete() { return FALSE; }
|
||||
|
||||
}
|
||||
?>
|
||||
155
application/controllers/Suppliers.php
Normal file
155
application/controllers/Suppliers.php
Normal file
@@ -0,0 +1,155 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once("Persons.php");
|
||||
|
||||
class Suppliers extends Persons
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('suppliers');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data['table_headers'] = $this->xss_clean(get_suppliers_manage_table_headers());
|
||||
|
||||
$this->load->view('people/manage', $data);
|
||||
}
|
||||
|
||||
/*
|
||||
Gets one row for a supplier manage table. This is called using AJAX to update one row.
|
||||
*/
|
||||
public function get_row($row_id)
|
||||
{
|
||||
$data_row = $this->xss_clean(get_supplier_data_row($this->Supplier->get_info($row_id), $this));
|
||||
|
||||
echo json_encode($data_row);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns Supplier table data rows. This will be called with AJAX.
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
$search = $this->input->get('search');
|
||||
$limit = $this->input->get('limit');
|
||||
$offset = $this->input->get('offset');
|
||||
$sort = $this->input->get('sort');
|
||||
$order = $this->input->get('order');
|
||||
|
||||
$suppliers = $this->Supplier->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->Supplier->get_found_rows($search);
|
||||
|
||||
$data_rows = array();
|
||||
foreach($suppliers->result() as $supplier)
|
||||
{
|
||||
$data_rows[] = get_supplier_data_row($supplier, $this);
|
||||
}
|
||||
|
||||
$data_rows = $this->xss_clean($data_rows);
|
||||
|
||||
echo json_encode(array('total' => $total_rows, 'rows' => $data_rows));
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
public function suggest()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Supplier->get_search_suggestions($this->input->get('term'), TRUE));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function suggest_search()
|
||||
{
|
||||
$suggestions = $this->xss_clean($this->Supplier->get_search_suggestions($this->input->post('term'), FALSE));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Loads the supplier edit form
|
||||
*/
|
||||
public function view($supplier_id = -1)
|
||||
{
|
||||
$info = $this->Supplier->get_info($supplier_id);
|
||||
foreach(get_object_vars($info) as $property => $value)
|
||||
{
|
||||
$info->$property = $this->xss_clean($value);
|
||||
}
|
||||
$data['person_info'] = $info;
|
||||
|
||||
$this->load->view("suppliers/form", $data);
|
||||
}
|
||||
|
||||
/*
|
||||
Inserts/updates a supplier
|
||||
*/
|
||||
public 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')
|
||||
);
|
||||
$supplier_data = array(
|
||||
'company_name' => $this->input->post('company_name'),
|
||||
'agency_name' => $this->input->post('agency_name'),
|
||||
'account_number' => $this->input->post('account_number') == '' ? NULL : $this->input->post('account_number')
|
||||
);
|
||||
|
||||
if($this->Supplier->save_supplier($person_data, $supplier_data, $supplier_id))
|
||||
{
|
||||
$supplier_data = $this->xss_clean($supplier_data);
|
||||
|
||||
//New supplier
|
||||
if($supplier_id == -1)
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('suppliers_successful_adding').' '.
|
||||
$supplier_data['company_name'], 'id' => $supplier_data['person_id']));
|
||||
}
|
||||
else //Existing supplier
|
||||
{
|
||||
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('suppliers_successful_updating').' '.
|
||||
$supplier_data['company_name'], 'id' => $supplier_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
$supplier_data = $this->xss_clean($supplier_data);
|
||||
|
||||
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('suppliers_error_adding_updating').' '.
|
||||
$supplier_data['company_name'], 'id' => -1));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
This deletes suppliers from the suppliers table
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$suppliers_to_delete = $this->xss_clean($this->input->post('ids'));
|
||||
|
||||
if($this->Supplier->delete_list($suppliers_to_delete))
|
||||
{
|
||||
echo json_encode(array('success' => TRUE,'message' => $this->lang->line('suppliers_successful_deleted').' '.
|
||||
count($suppliers_to_delete).' '.$this->lang->line('suppliers_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success' => FALSE,'message' => $this->lang->line('suppliers_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
class Barcode extends CI_Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->load->view('barcode');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
class Config extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('config');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->load->view("config");
|
||||
}
|
||||
|
||||
function save()
|
||||
{
|
||||
$batch_save_data=array(
|
||||
'company'=>$this->input->post('company'),
|
||||
'address'=>$this->input->post('address'),
|
||||
'phone'=>$this->input->post('phone'),
|
||||
'email'=>$this->input->post('email'),
|
||||
'fax'=>$this->input->post('fax'),
|
||||
'website'=>$this->input->post('website'),
|
||||
'default_tax_1_rate'=>$this->input->post('default_tax_1_rate'),
|
||||
'default_tax_1_name'=>$this->input->post('default_tax_1_name'),
|
||||
'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'),
|
||||
'default_tax_2_name'=>$this->input->post('default_tax_2_name'),
|
||||
'currency_symbol'=>$this->input->post('currency_symbol'),
|
||||
'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'),
|
||||
'print_after_sale'=>$this->input->post('print_after_sale'),
|
||||
'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( $this->Appconfig->batch_save( $batch_save_data ) )
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('config_saved_successfully')));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,201 +0,0 @@
|
||||
<?php
|
||||
require_once ("person_controller.php");
|
||||
class Customers extends Person_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('customers');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('/customers/index');
|
||||
$config['total_rows'] = $this->Customer->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$config['uri_segment'] = 3;
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_people_manage_table( $this->Customer->get_all( $config['per_page'], $this->uri->segment( $config['uri_segment'] ) ), $this );
|
||||
$this->load->view('people/manage',$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns customer table data rows. This will be called with AJAX.
|
||||
*/
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_people_manage_table_data_rows($this->Customer->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Customer->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Loads the customer edit form
|
||||
*/
|
||||
function view($customer_id=-1)
|
||||
{
|
||||
$data['person_info']=$this->Customer->get_info($customer_id);
|
||||
$this->load->view("customers/form",$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Inserts/updates a customer
|
||||
*/
|
||||
function save($customer_id=-1)
|
||||
{
|
||||
$person_data = array(
|
||||
'first_name'=>$this->input->post('first_name'),
|
||||
'last_name'=>$this->input->post('last_name'),
|
||||
'email'=>$this->input->post('email'),
|
||||
'phone_number'=>$this->input->post('phone_number'),
|
||||
'address_1'=>$this->input->post('address_1'),
|
||||
'address_2'=>$this->input->post('address_2'),
|
||||
'city'=>$this->input->post('city'),
|
||||
'state'=>$this->input->post('state'),
|
||||
'zip'=>$this->input->post('zip'),
|
||||
'country'=>$this->input->post('country'),
|
||||
'comments'=>$this->input->post('comments')
|
||||
);
|
||||
$customer_data=array(
|
||||
'account_number'=>$this->input->post('account_number')=='' ? null:$this->input->post('account_number'),
|
||||
'taxable'=>$this->input->post('taxable')=='' ? 0:1,
|
||||
);
|
||||
if($this->Customer->save($person_data,$customer_data,$customer_id))
|
||||
{
|
||||
//New customer
|
||||
if($customer_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('customers_successful_adding').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>$customer_data['person_id']));
|
||||
}
|
||||
else //previous customer
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('customers_successful_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>$customer_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('customers_error_adding_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>-1));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
This deletes customers from the customers table
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
$customers_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Customer->delete_list($customers_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('customers_successful_deleted').' '.
|
||||
count($customers_to_delete).' '.$this->lang->line('customers_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('customers_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
function excel()
|
||||
{
|
||||
$data = file_get_contents("import_customers.csv");
|
||||
$name = 'import_customers.csv';
|
||||
force_download($name, $data);
|
||||
}
|
||||
|
||||
function excel_import()
|
||||
{
|
||||
$this->load->view("customers/excel_import", null);
|
||||
}
|
||||
|
||||
function do_excel_import()
|
||||
{
|
||||
$msg = 'do_excel_import';
|
||||
$failCodes = array();
|
||||
if ($_FILES['file_path']['error']!=UPLOAD_ERR_OK)
|
||||
{
|
||||
$msg = $this->lang->line('items_excel_import_failed');
|
||||
echo json_encode( array('success'=>false,'message'=>$msg) );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($handle = fopen($_FILES['file_path']['tmp_name'], "r")) !== FALSE)
|
||||
{
|
||||
//Skip first row
|
||||
fgetcsv($handle);
|
||||
|
||||
$i=1;
|
||||
while (($data = fgetcsv($handle)) !== FALSE)
|
||||
{
|
||||
$person_data = array(
|
||||
'first_name'=>$data[0],
|
||||
'last_name'=>$data[1],
|
||||
'email'=>$data[2],
|
||||
'phone_number'=>$data[3],
|
||||
'address_1'=>$data[4],
|
||||
'address_2'=>$data[5],
|
||||
'city'=>$data[6],
|
||||
'state'=>$data[7],
|
||||
'zip'=>$data[8],
|
||||
'country'=>$data[9],
|
||||
'comments'=>$data[10]
|
||||
);
|
||||
|
||||
$customer_data=array(
|
||||
'account_number'=>$data[11]=='' ? null:$data[11],
|
||||
'taxable'=>$data[12]=='' ? 0:1,
|
||||
);
|
||||
|
||||
if(!$this->Customer->save($person_data,$customer_data))
|
||||
{
|
||||
$failCodes[] = $i;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode( array('success'=>false,'message'=>'Your upload file has no data or not in supported format.') );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$success = true;
|
||||
if(count($failCodes) > 1)
|
||||
{
|
||||
$msg = "Most customers imported. But some were not, here is list of their CODE (" .count($failCodes) ."): ".implode(", ", $failCodes);
|
||||
$success = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = "Import Customers successful";
|
||||
}
|
||||
|
||||
echo json_encode( array('success'=>$success,'message'=>$msg) );
|
||||
}
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 350;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,132 +0,0 @@
|
||||
<?php
|
||||
require_once ("person_controller.php");
|
||||
class Employees extends Person_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('employees');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('/employees/index');
|
||||
$config['total_rows'] = $this->Employee->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$config['uri_segment'] = 3;
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_people_manage_table( $this->Employee->get_all( $config['per_page'], $this->uri->segment( $config['uri_segment'] ) ), $this );
|
||||
$this->load->view('people/manage',$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns employee table data rows. This will be called with AJAX.
|
||||
*/
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_people_manage_table_data_rows($this->Employee->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Employee->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Loads the employee edit form
|
||||
*/
|
||||
function view($employee_id=-1)
|
||||
{
|
||||
$data['person_info']=$this->Employee->get_info($employee_id);
|
||||
$data['all_modules']=$this->Module->get_all_modules();
|
||||
$this->load->view("employees/form",$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Inserts/updates an employee
|
||||
*/
|
||||
function save($employee_id=-1)
|
||||
{
|
||||
$person_data = array(
|
||||
'first_name'=>$this->input->post('first_name'),
|
||||
'last_name'=>$this->input->post('last_name'),
|
||||
'email'=>$this->input->post('email'),
|
||||
'phone_number'=>$this->input->post('phone_number'),
|
||||
'address_1'=>$this->input->post('address_1'),
|
||||
'address_2'=>$this->input->post('address_2'),
|
||||
'city'=>$this->input->post('city'),
|
||||
'state'=>$this->input->post('state'),
|
||||
'zip'=>$this->input->post('zip'),
|
||||
'country'=>$this->input->post('country'),
|
||||
'comments'=>$this->input->post('comments')
|
||||
);
|
||||
$permission_data = $this->input->post("permissions")!=false ? $this->input->post("permissions"):array();
|
||||
|
||||
//Password has been changed OR first time password set
|
||||
if($this->input->post('password')!='')
|
||||
{
|
||||
$employee_data=array(
|
||||
'username'=>$this->input->post('username'),
|
||||
'password'=>md5($this->input->post('password'))
|
||||
);
|
||||
}
|
||||
else //Password not changed
|
||||
{
|
||||
$employee_data=array('username'=>$this->input->post('username'));
|
||||
}
|
||||
|
||||
if($this->Employee->save($person_data,$employee_data,$permission_data,$employee_id))
|
||||
{
|
||||
//New employee
|
||||
if($employee_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('employees_successful_adding').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>$employee_data['person_id']));
|
||||
}
|
||||
else //previous employee
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('employees_successful_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>$employee_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('employees_error_adding_updating').' '.
|
||||
$person_data['first_name'].' '.$person_data['last_name'],'person_id'=>-1));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
This deletes employees from the employees table
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
$employees_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Employee->delete_list($employees_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('employees_successful_deleted').' '.
|
||||
count($employees_to_delete).' '.$this->lang->line('employees_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('employees_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 650;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,117 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
require_once ("interfaces/idata_controller.php");
|
||||
class Giftcards extends Secure_area implements iData_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('giftcards');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('/giftcards/index');
|
||||
$config['total_rows'] = $this->Giftcard->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$config['uri_segment'] = 3;
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_giftcards_manage_table( $this->Giftcard->get_all( $config['per_page'], $this->uri->segment( $config['uri_segment'] ) ), $this );
|
||||
$this->load->view('giftcards/manage',$data);
|
||||
}
|
||||
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_giftcards_manage_table_data_rows($this->Giftcard->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Giftcard->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
/** GARRISON ADDED 5/3/2013 **/
|
||||
/*
|
||||
Gives search suggestions for person_id based on what is being searched for
|
||||
*/
|
||||
function suggest_person()
|
||||
{
|
||||
$suggestions = $this->Giftcard->get_person_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);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
function view($giftcard_id=-1)
|
||||
{
|
||||
$data['giftcard_info']=$this->Giftcard->get_info($giftcard_id);
|
||||
|
||||
$this->load->view("giftcards/form",$data);
|
||||
}
|
||||
|
||||
function save($giftcard_id=-1)
|
||||
{
|
||||
$giftcard_data = array(
|
||||
'giftcard_number'=>$this->input->post('giftcard_number'),
|
||||
'value'=>$this->input->post('value'),
|
||||
'person_id'=>$this->input->post('person_id')/**GARRISON ADDED 4/22/2013**/
|
||||
);
|
||||
|
||||
if( $this->Giftcard->save( $giftcard_data, $giftcard_id ) )
|
||||
{
|
||||
//New giftcard
|
||||
if($giftcard_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('giftcards_successful_adding').' '.
|
||||
$giftcard_data['giftcard_number'],'giftcard_id'=>$giftcard_data['giftcard_id']));
|
||||
$giftcard_id = $giftcard_data['giftcard_id'];
|
||||
}
|
||||
else //previous giftcard
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('giftcards_successful_updating').' '.
|
||||
$giftcard_data['giftcard_number'],'giftcard_id'=>$giftcard_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('giftcards_error_adding_updating').' '.
|
||||
$giftcard_data['giftcard_number'],'giftcard_id'=>-1));
|
||||
}
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
$giftcards_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Giftcard->delete_list($giftcards_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('giftcards_successful_deleted').' '.
|
||||
count($giftcards_to_delete).' '.$this->lang->line('giftcards_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('giftcards_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 360;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
|
||||
class Home extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->load->view("home");
|
||||
}
|
||||
|
||||
function logout()
|
||||
{
|
||||
$this->Employee->logout();
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,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,17 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
This interface is implemented by any controller that keeps track of data items, such
|
||||
as the customers, employees, and items controllers.
|
||||
*/
|
||||
interface iData_controller
|
||||
{
|
||||
public function index();
|
||||
public function search();
|
||||
public function suggest();
|
||||
public function get_row();
|
||||
public function view($data_item_id=-1);
|
||||
public function save($data_item_id=-1);
|
||||
public function delete();
|
||||
public function get_form_width();
|
||||
}
|
||||
?>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
This interface is implemented by any controller that keeps track of people, such
|
||||
as customers and employees.
|
||||
*/
|
||||
require_once("idata_controller.php");
|
||||
interface iPerson_controller extends iData_controller
|
||||
{
|
||||
public function mailto();
|
||||
}
|
||||
?>
|
||||
@@ -1,138 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
require_once ("interfaces/idata_controller.php");
|
||||
class Item_kits extends Secure_area implements iData_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('item_kits');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('/item_kits/index');
|
||||
$config['total_rows'] = $this->Item_kit->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$config['uri_segment'] = 3;
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_item_kits_manage_table( $this->Item_kit->get_all( $config['per_page'], $this->uri->segment( $config['uri_segment'] ) ), $this );
|
||||
$this->load->view('item_kits/manage',$data);
|
||||
}
|
||||
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_item_kits_manage_table_data_rows($this->Item_kit->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Item_kit->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function get_row()
|
||||
{
|
||||
$item_kit_id = $this->input->post('row_id');
|
||||
$data_row=get_item_kit_data_row($this->Item_kit->get_info($item_kit_id),$this);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
function view($item_kit_id=-1)
|
||||
{
|
||||
$data['item_kit_info']=$this->Item_kit->get_info($item_kit_id);
|
||||
$this->load->view("item_kits/form",$data);
|
||||
}
|
||||
|
||||
function save($item_kit_id=-1)
|
||||
{
|
||||
$item_kit_data = array(
|
||||
'name'=>$this->input->post('name'),
|
||||
'description'=>$this->input->post('description')
|
||||
);
|
||||
|
||||
if($this->Item_kit->save($item_kit_data,$item_kit_id))
|
||||
{
|
||||
//New item kit
|
||||
if($item_kit_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_adding').' '.
|
||||
$item_kit_data['name'],'item_kit_id'=>$item_kit_data['item_kit_id']));
|
||||
$item_kit_id = $item_kit_data['item_kit_id'];
|
||||
}
|
||||
else //previous item
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_updating').' '.
|
||||
$item_kit_data['name'],'item_kit_id'=>$item_kit_id));
|
||||
}
|
||||
|
||||
if ($this->input->post('item_kit_item'))
|
||||
{
|
||||
$item_kit_items = array();
|
||||
foreach($this->input->post('item_kit_item') as $item_id => $quantity)
|
||||
{
|
||||
$item_kit_items[] = array(
|
||||
'item_id' => $item_id,
|
||||
'quantity' => $quantity
|
||||
);
|
||||
}
|
||||
|
||||
$this->Item_kit_items->save($item_kit_items, $item_kit_id);
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('item_kits_error_adding_updating').' '.
|
||||
$item_kit_data['name'],'item_kit_id'=>-1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
$item_kits_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Item_kit->delete_list($item_kits_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('item_kits_successful_deleted').' '.
|
||||
count($item_kits_to_delete).' '.$this->lang->line('item_kits_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('item_kits_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
function generate_barcodes($item_kit_ids)
|
||||
{
|
||||
$result = array();
|
||||
|
||||
$item_kit_ids = explode(':', $item_kit_ids);
|
||||
foreach ($item_kit_ids as $item_kid_id)
|
||||
{
|
||||
$item_kit_info = $this->Item_kit->get_info($item_kid_id);
|
||||
|
||||
$result[] = array('name' =>$item_kit_info->name, 'id'=> 'KIT '.$item_kid_id);
|
||||
}
|
||||
|
||||
$data['items'] = $result;
|
||||
$this->load->view("barcode_sheet", $data);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 360;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,556 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
require_once ("interfaces/idata_controller.php");
|
||||
class Items extends Secure_area implements iData_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('items');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('/items/index');
|
||||
$config['total_rows'] = $this->Item->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$config['uri_segment'] = 3;
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_items_manage_table( $this->Item->get_all( $config['per_page'], $this->uri->segment( $config['uri_segment'] ) ), $this );
|
||||
$this->load->view('items/manage',$data);
|
||||
}
|
||||
|
||||
function refresh()
|
||||
{
|
||||
$low_inventory=$this->input->post('low_inventory');
|
||||
$is_serialized=$this->input->post('is_serialized');
|
||||
$no_description=$this->input->post('no_description');
|
||||
$search_custom=$this->input->post('search_custom');//GARRISON ADDED 4/13/2013
|
||||
$is_deleted=$this->input->post('is_deleted'); // Parq 131215
|
||||
|
||||
$data['search_section_state']=$this->input->post('search_section_state');
|
||||
$data['low_inventory']=$this->input->post('low_inventory');
|
||||
$data['is_serialized']=$this->input->post('is_serialized');
|
||||
$data['no_description']=$this->input->post('no_description');
|
||||
$data['search_custom']=$this->input->post('search_custom');//GARRISON ADDED 4/13/2013
|
||||
$data['is_deleted']=$this->input->post('is_deleted'); // Parq 131215
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_items_manage_table($this->Item->get_all_filtered($low_inventory,$is_serialized,$no_description,$search_custom,$is_deleted),$this);//GARRISON MODIFIED 4/13/2013, Parq 131215
|
||||
$this->load->view('items/manage',$data);
|
||||
}
|
||||
|
||||
function find_item_info()
|
||||
{
|
||||
$item_number=$this->input->post('scan_item_number');
|
||||
echo json_encode($this->Item->find_item_info($item_number));
|
||||
}
|
||||
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_items_manage_table_data_rows($this->Item->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Item->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function item_search()
|
||||
{
|
||||
$suggestions = $this->Item->get_item_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_category()
|
||||
{
|
||||
$suggestions = $this->Item->get_category_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/**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);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_custom1()
|
||||
{
|
||||
$suggestions = $this->Item->get_custom1_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_custom2()
|
||||
{
|
||||
$suggestions = $this->Item->get_custom2_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_custom3()
|
||||
{
|
||||
$suggestions = $this->Item->get_custom3_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_custom4()
|
||||
{
|
||||
$suggestions = $this->Item->get_custom4_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_custom5()
|
||||
{
|
||||
$suggestions = $this->Item->get_custom5_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_custom6()
|
||||
{
|
||||
$suggestions = $this->Item->get_custom6_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_custom7()
|
||||
{
|
||||
$suggestions = $this->Item->get_custom7_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_custom8()
|
||||
{
|
||||
$suggestions = $this->Item->get_custom8_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest_custom9()
|
||||
{
|
||||
$suggestions = $this->Item->get_custom9_suggestions($this->input->post('q'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
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');
|
||||
$data_row=get_item_data_row($this->Item->get_info($item_id),$this);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
function view($item_id=-1)
|
||||
{
|
||||
$data['item_info']=$this->Item->get_info($item_id);
|
||||
$data['item_tax_info']=$this->Item_taxes->get_info($item_id);
|
||||
$suppliers = array('' => $this->lang->line('items_none'));
|
||||
foreach($this->Supplier->get_all()->result_array() as $row)
|
||||
{
|
||||
$suppliers[$row['person_id']] = $row['company_name'] .' ('.$row['first_name'] .' '. $row['last_name'].')';
|
||||
}
|
||||
|
||||
$data['suppliers']=$suppliers;
|
||||
$data['selected_supplier'] = $this->Item->get_info($item_id)->supplier_id;
|
||||
$data['default_tax_1_rate']=($item_id==-1) ? $this->Appconfig->get('default_tax_1_rate') : '';
|
||||
$data['default_tax_2_rate']=($item_id==-1) ? $this->Appconfig->get('default_tax_2_rate') : '';
|
||||
$this->load->view("items/form",$data);
|
||||
}
|
||||
|
||||
//Ramel Inventory Tracking
|
||||
function inventory($item_id=-1)
|
||||
{
|
||||
$data['item_info']=$this->Item->get_info($item_id);
|
||||
$this->load->view("items/inventory",$data);
|
||||
}
|
||||
|
||||
function count_details($item_id=-1)
|
||||
{
|
||||
$data['item_info']=$this->Item->get_info($item_id);
|
||||
$this->load->view("items/count_details",$data);
|
||||
} //------------------------------------------- Ramel
|
||||
|
||||
function generate_barcodes($item_ids)
|
||||
{
|
||||
$result = array();
|
||||
|
||||
$item_ids = explode(':', $item_ids);
|
||||
foreach ($item_ids as $item_id)
|
||||
{
|
||||
$item_info = $this->Item->get_info($item_id);
|
||||
|
||||
$result[] = array('name' =>$item_info->name, 'id'=> $item_id);
|
||||
}
|
||||
|
||||
$data['items'] = $result;
|
||||
$this->load->view("barcode_sheet", $data);
|
||||
}
|
||||
|
||||
function bulk_edit()
|
||||
{
|
||||
$data = array();
|
||||
$suppliers = array('' => $this->lang->line('items_none'));
|
||||
foreach($this->Supplier->get_all()->result_array() as $row)
|
||||
{
|
||||
$suppliers[$row['person_id']] = $row['first_name'] .' '. $row['last_name'];
|
||||
}
|
||||
$data['suppliers'] = $suppliers;
|
||||
$data['allow_alt_description_choices'] = array(
|
||||
''=>$this->lang->line('items_do_nothing'),
|
||||
1 =>$this->lang->line('items_change_all_to_allow_alt_desc'),
|
||||
0 =>$this->lang->line('items_change_all_to_not_allow_allow_desc'));
|
||||
|
||||
$data['serialization_choices'] = array(
|
||||
''=>$this->lang->line('items_do_nothing'),
|
||||
1 =>$this->lang->line('items_change_all_to_serialized'),
|
||||
0 =>$this->lang->line('items_change_all_to_unserialized'));
|
||||
$this->load->view("items/form_bulk", $data);
|
||||
}
|
||||
|
||||
function save($item_id=-1)
|
||||
{
|
||||
$item_data = array(
|
||||
'name'=>$this->input->post('name'),
|
||||
'description'=>$this->input->post('description'),
|
||||
'category'=>$this->input->post('category'),
|
||||
'supplier_id'=>$this->input->post('supplier_id')=='' ? null:$this->input->post('supplier_id'),
|
||||
'item_number'=>$this->input->post('item_number')=='' ? null:$this->input->post('item_number'),
|
||||
'cost_price'=>$this->input->post('cost_price'),
|
||||
'unit_price'=>$this->input->post('unit_price'),
|
||||
'quantity'=>$this->input->post('quantity'),
|
||||
'reorder_level'=>$this->input->post('reorder_level'),
|
||||
'location'=>$this->input->post('location'),
|
||||
'allow_alt_description'=>$this->input->post('allow_alt_description'),
|
||||
'is_serialized'=>$this->input->post('is_serialized'),
|
||||
'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**/
|
||||
);
|
||||
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$cur_item_info = $this->Item->get_info($item_id);
|
||||
|
||||
|
||||
if($this->Item->save($item_data,$item_id))
|
||||
{
|
||||
//New item
|
||||
if($item_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_adding').' '.
|
||||
$item_data['name'],'item_id'=>$item_data['item_id']));
|
||||
$item_id = $item_data['item_id'];
|
||||
}
|
||||
else //previous item
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_updating').' '.
|
||||
$item_data['name'],'item_id'=>$item_id));
|
||||
}
|
||||
|
||||
$inv_data = array
|
||||
(
|
||||
'trans_date'=>date('Y-m-d H:i:s'),
|
||||
'trans_items'=>$item_id,
|
||||
'trans_user'=>$employee_id,
|
||||
'trans_comment'=>$this->lang->line('items_manually_editing_of_quantity'),
|
||||
'trans_inventory'=>$cur_item_info ? $this->input->post('quantity') - $cur_item_info->quantity : $this->input->post('quantity')
|
||||
);
|
||||
$this->Inventory->insert($inv_data);
|
||||
$items_taxes_data = array();
|
||||
$tax_names = $this->input->post('tax_names');
|
||||
$tax_percents = $this->input->post('tax_percents');
|
||||
for($k=0;$k<count($tax_percents);$k++)
|
||||
{
|
||||
if (is_numeric($tax_percents[$k]))
|
||||
{
|
||||
$items_taxes_data[] = array('name'=>$tax_names[$k], 'percent'=>$tax_percents[$k] );
|
||||
}
|
||||
}
|
||||
$this->Item_taxes->save($items_taxes_data, $item_id);
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('items_error_adding_updating').' '.
|
||||
$item_data['name'],'item_id'=>-1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Ramel Inventory Tracking
|
||||
function save_inventory($item_id=-1)
|
||||
{
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$cur_item_info = $this->Item->get_info($item_id);
|
||||
$inv_data = array
|
||||
(
|
||||
'trans_date'=>date('Y-m-d H:i:s'),
|
||||
'trans_items'=>$item_id,
|
||||
'trans_user'=>$employee_id,
|
||||
'trans_comment'=>$this->input->post('trans_comment'),
|
||||
'trans_inventory'=>$this->input->post('newquantity')
|
||||
);
|
||||
$this->Inventory->insert($inv_data);
|
||||
|
||||
//Update stock quantity
|
||||
$item_data = array(
|
||||
'quantity'=>$cur_item_info->quantity + $this->input->post('newquantity')
|
||||
);
|
||||
if($this->Item->save($item_data,$item_id))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_updating').' '.
|
||||
$cur_item_info->name,'item_id'=>$item_id));
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('items_error_adding_updating').' '.
|
||||
$cur_item_info->name,'item_id'=>-1));
|
||||
}
|
||||
|
||||
}//---------------------------------------------------------------------Ramel
|
||||
|
||||
function bulk_update()
|
||||
{
|
||||
$items_to_update=$this->input->post('item_ids');
|
||||
$item_data = array();
|
||||
|
||||
foreach($_POST as $key=>$value)
|
||||
{
|
||||
//This field is nullable, so treat it differently
|
||||
if ($key == 'supplier_id')
|
||||
{
|
||||
$item_data["$key"]=$value == '' ? null : $value;
|
||||
}
|
||||
elseif($value!='' and !(in_array($key, array('item_ids', 'tax_names', 'tax_percents'))))
|
||||
{
|
||||
$item_data["$key"]=$value;
|
||||
}
|
||||
}
|
||||
|
||||
//Item data could be empty if tax information is being updated
|
||||
if(empty($item_data) || $this->Item->update_multiple($item_data,$items_to_update))
|
||||
{
|
||||
$items_taxes_data = array();
|
||||
$tax_names = $this->input->post('tax_names');
|
||||
$tax_percents = $this->input->post('tax_percents');
|
||||
for($k=0;$k<count($tax_percents);$k++)
|
||||
{
|
||||
if (is_numeric($tax_percents[$k]))
|
||||
{
|
||||
$items_taxes_data[] = array('name'=>$tax_names[$k], 'percent'=>$tax_percents[$k] );
|
||||
}
|
||||
}
|
||||
$this->Item_taxes->save_multiple($items_taxes_data, $items_to_update);
|
||||
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_bulk_edit')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('items_error_updating_multiple')));
|
||||
}
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
$items_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Item->delete_list($items_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('items_successful_deleted').' '.
|
||||
count($items_to_delete).' '.$this->lang->line('items_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('items_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
function excel()
|
||||
{
|
||||
$data = file_get_contents("import_items.csv");
|
||||
$name = 'import_items.csv';
|
||||
force_download($name, $data);
|
||||
}
|
||||
|
||||
function excel_import()
|
||||
{
|
||||
$this->load->view("items/excel_import", null);
|
||||
}
|
||||
|
||||
function do_excel_import()
|
||||
{
|
||||
$msg = 'do_excel_import';
|
||||
$failCodes = array();
|
||||
if ($_FILES['file_path']['error']!=UPLOAD_ERR_OK)
|
||||
{
|
||||
$msg = $this->lang->line('items_excel_import_failed');
|
||||
echo json_encode( array('success'=>false,'message'=>$msg) );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($handle = fopen($_FILES['file_path']['tmp_name'], "r")) !== FALSE)
|
||||
{
|
||||
//Skip first row
|
||||
fgetcsv($handle);
|
||||
|
||||
$i=1;
|
||||
while (($data = fgetcsv($handle)) !== FALSE)
|
||||
{
|
||||
$item_data = array(
|
||||
'name' => $data[1],
|
||||
'description' => $data[13],
|
||||
'location' => $data[12],
|
||||
'category' => $data[2],
|
||||
'cost_price' => $data[4],
|
||||
'unit_price' => $data[5],
|
||||
'quantity' => $data[10],
|
||||
'reorder_level' => $data[11],
|
||||
'supplier_id' => $this->Supplier->exists($data[3]) ? $data[3] : null,
|
||||
'allow_alt_description' => $data[14] != '' ? '1' : '0',
|
||||
'is_serialized' => $data[15] != '' ? '1' : '0',
|
||||
'custom1' => $data[16], /** GARRISON ADDED 5/6/2013 **/
|
||||
'custom2' => $data[17], /** GARRISON ADDED 5/6/2013 **/
|
||||
'custom3' => $data[18], /** GARRISON ADDED 5/6/2013 **/
|
||||
'custom4' => $data[19], /** GARRISON ADDED 5/6/2013 **/
|
||||
'custom5' => $data[20], /** GARRISON ADDED 5/6/2013 **/
|
||||
'custom6' => $data[21], /** GARRISON ADDED 5/6/2013 **/
|
||||
'custom7' => $data[22], /** GARRISON ADDED 5/6/2013 **/
|
||||
'custom8' => $data[23], /** GARRISON ADDED 5/6/2013 **/
|
||||
'custom9' => $data[24], /** GARRISON ADDED 5/6/2013 **/
|
||||
'custom10' => $data[25] /** GARRISON ADDED 5/6/2013 **/
|
||||
);
|
||||
$item_number = $data[0];
|
||||
|
||||
if ($item_number != "")
|
||||
{
|
||||
$item_data['item_number'] = $item_number;
|
||||
}
|
||||
|
||||
if($this->Item->save($item_data))
|
||||
{
|
||||
$items_taxes_data = null;
|
||||
//tax 1
|
||||
if( is_numeric($data[7]) && $data[6]!='' )
|
||||
{
|
||||
$items_taxes_data[] = array('name'=>$data[6], 'percent'=>$data[7] );
|
||||
}
|
||||
|
||||
//tax 2
|
||||
if( is_numeric($data[9]) && $data[8]!='' )
|
||||
{
|
||||
$items_taxes_data[] = array('name'=>$data[8], 'percent'=>$data[9] );
|
||||
}
|
||||
|
||||
// save tax values
|
||||
if(count($items_taxes_data) > 0)
|
||||
{
|
||||
$this->Item_taxes->save($items_taxes_data, $item_data['item_id']);
|
||||
}
|
||||
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$emp_info=$this->Employee->get_info($employee_id);
|
||||
$comment ='Qty CSV Imported';
|
||||
$excel_data = array
|
||||
(
|
||||
'trans_items'=>$item_data['item_id'],
|
||||
'trans_user'=>$employee_id,
|
||||
'trans_comment'=>$comment,
|
||||
'trans_inventory'=>$data[10]
|
||||
);
|
||||
$this->db->insert('inventory',$excel_data);
|
||||
//------------------------------------------------Ramel
|
||||
}
|
||||
else//insert or update item failure
|
||||
{
|
||||
$failCodes[] = $i;
|
||||
}
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode( array('success'=>false,'message'=>'Your upload file has no data or not in supported format.') );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$success = true;
|
||||
if(count($failCodes) > 1)
|
||||
{
|
||||
$msg = "Most items imported. But some were not, here is list of their CODE (" .count($failCodes) ."): ".implode(", ", $failCodes);
|
||||
$success = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = "Import items successful";
|
||||
}
|
||||
|
||||
echo json_encode( array('success'=>$success,'message'=>$msg) );
|
||||
}
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 360;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,192 +0,0 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
// ---------------------------------------------------------------------
|
||||
class Languagecheck extends CI_Controller {
|
||||
|
||||
/*
|
||||
* use this language as comparison reference.
|
||||
* this should be the one that is complete.
|
||||
*/
|
||||
private $reference = 'english';
|
||||
|
||||
private $lang_path = 'language';
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* controller constructor
|
||||
*/
|
||||
function Languagecheck()
|
||||
{
|
||||
parent::Controller();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* use remap to capture all calls to this controller
|
||||
*/
|
||||
function _remap()
|
||||
{
|
||||
// load the required helpers
|
||||
$this->load->helper('directory');
|
||||
|
||||
// for simplicity, we don't use views
|
||||
$this->output('h1', 'Open Source Point of Sale - Language file checking and validation');
|
||||
|
||||
// determine the language file path
|
||||
if ( ! is_dir($this->lang_path) )
|
||||
{
|
||||
$this->lang_path = APPPATH . $this->lang_path;
|
||||
|
||||
if ( ! is_dir($this->lang_path) )
|
||||
{
|
||||
$this->output('h2', 'Defined language path "'.$this->lang_path.'" not found!', TRUE);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// fetch the languages directory map
|
||||
$languages = directory_map( $this->lang_path, TRUE );
|
||||
|
||||
// is our reference language present?
|
||||
if ( ! in_array($this->reference, $languages ) )
|
||||
{
|
||||
$this->output('h2', 'Reference language "'.$this->reference.'" not found!', TRUE);
|
||||
exit;
|
||||
}
|
||||
|
||||
// load the list of language files for the reference language
|
||||
$references = directory_map( $this->lang_path . '/' . $this->reference, TRUE );
|
||||
|
||||
// now process the list
|
||||
foreach( $references as $reference )
|
||||
{
|
||||
// skip non-language files in the language directory
|
||||
if ( strpos($reference, '_lang'.EXT) === FALSE )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// process it
|
||||
$this->output('h2', 'Processing '.$this->reference . ' » ' .$reference);
|
||||
|
||||
// load the language file
|
||||
include $this->lang_path . '/' . $this->reference . '/' . $reference;
|
||||
|
||||
// did the file contain any language strings?
|
||||
if ( empty($lang) )
|
||||
{
|
||||
// language file was empty or not properly defined
|
||||
$this->output('h3', 'Language file doesn\'t contain any language strings. Skipping file!', TRUE);
|
||||
continue;
|
||||
}
|
||||
|
||||
// store the loaded language strings
|
||||
$lang_ref = $lang;
|
||||
unset($lang);
|
||||
|
||||
// now loop through the available languages
|
||||
foreach ( $languages as $language )
|
||||
{
|
||||
// skip the reference language
|
||||
if ( $language == $this->reference )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// language file to check
|
||||
$file = $this->lang_path . '/' . $language . '/' . $reference;
|
||||
|
||||
// check if the language file exists for this language
|
||||
if ( ! file_exists( $file ) )
|
||||
{
|
||||
// file not found
|
||||
$this->output('h3', 'Language file doesn\'t exist for the language '.$language.'!', TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// load the file to compare
|
||||
include $file;
|
||||
|
||||
// did the file contain any language strings?
|
||||
if ( empty($lang) )
|
||||
{
|
||||
// language file was empty or not properly defined
|
||||
$this->output('h3', 'Language file for the language '.$language.' doesn\'t contain any language strings!', TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// start comparing
|
||||
$this->output('h3', 'Comparing with the '.$language.' version:');
|
||||
|
||||
// assume all goes well
|
||||
$failures = 0;
|
||||
|
||||
// start comparing language keys
|
||||
foreach( $lang_ref as $key => $value )
|
||||
{
|
||||
if ( ! isset($lang[$key]) )
|
||||
{
|
||||
// report the missing key
|
||||
$this->output('', 'Missing language string "'.$key.'"', TRUE);
|
||||
|
||||
// increment the failure counter
|
||||
$failures++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $failures )
|
||||
{
|
||||
$this->output('', 'The two language files have matching strings.');
|
||||
}
|
||||
}
|
||||
|
||||
// make sure the lang array is deleted before the next check
|
||||
if ( isset($lang) )
|
||||
{
|
||||
unset($lang);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->output('h2', 'Language file checking and validation completed');
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
private function output($type = '', $line = '', $highlight = FALSE)
|
||||
{
|
||||
switch ($type)
|
||||
{
|
||||
case 'h1':
|
||||
$html = "<h1>{line}</h1>\n<hr />\n";
|
||||
break;
|
||||
|
||||
case 'h2':
|
||||
$html = "<h2>{line}</h2>\n";
|
||||
break;
|
||||
|
||||
case 'h3':
|
||||
$html = "<h3> {line}</h3>\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
$html = " » {line}<br />";
|
||||
break;
|
||||
}
|
||||
|
||||
if ( $highlight )
|
||||
{
|
||||
$line = '<span style="color:red;font-weight:bold;">' . $line . '</span>';
|
||||
}
|
||||
|
||||
echo str_replace('{line}', $line, $html);
|
||||
}
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
}
|
||||
|
||||
/* End of file languagecheck.php */
|
||||
/* Location: ./application/controllers/languagecheck.php */
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
class Login extends CI_Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
if($this->Employee->is_logged_in())
|
||||
{
|
||||
redirect('home');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->form_validation->set_rules('username', 'lang:login_undername', 'callback_login_check');
|
||||
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$this->load->view('login');
|
||||
}
|
||||
else
|
||||
{
|
||||
redirect('home');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function login_check($username)
|
||||
{
|
||||
$password = $this->input->post("password");
|
||||
|
||||
if(!$this->Employee->login($username,$password))
|
||||
{
|
||||
$this->form_validation->set_message('login_check', $this->lang->line('login_invalid_username_and_password'));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
class No_Access extends CI_Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function index($module_id='')
|
||||
{
|
||||
$data['module_name']=$this->Module->get_module_name($module_id);
|
||||
$this->load->view('no_access',$data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,54 +0,0 @@
|
||||
<?php
|
||||
require_once ("interfaces/iperson_controller.php");
|
||||
require_once ("secure_area.php");
|
||||
abstract class Person_controller extends Secure_area implements iPerson_controller
|
||||
{
|
||||
function __construct($module_id=null)
|
||||
{
|
||||
parent::__construct($module_id);
|
||||
}
|
||||
|
||||
/*
|
||||
This returns a mailto link for persons with a certain id. This is called with AJAX.
|
||||
*/
|
||||
function mailto()
|
||||
{
|
||||
$people_to_email=$this->input->post('ids');
|
||||
|
||||
if($people_to_email!=false)
|
||||
{
|
||||
$mailto_url='mailto:';
|
||||
foreach($this->Person->get_multiple_info($people_to_email)->result() as $person)
|
||||
{
|
||||
$mailto_url.=$person->email.',';
|
||||
}
|
||||
//remove last comma
|
||||
$mailto_url=substr($mailto_url,0,strlen($mailto_url)-1);
|
||||
|
||||
echo $mailto_url;
|
||||
exit;
|
||||
}
|
||||
echo '#';
|
||||
}
|
||||
/** 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);
|
||||
}
|
||||
|
||||
/*
|
||||
Gets one row for a person manage table. This is called using AJAX to update one row.
|
||||
*/
|
||||
function get_row()
|
||||
{
|
||||
$person_id = $this->input->post('row_id');
|
||||
$data_row=get_person_data_row($this->Person->get_info($person_id),$this);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -1,199 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
class Receivings extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('receivings');
|
||||
$this->load->library('receiving_lib');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function item_search()
|
||||
{
|
||||
$suggestions = $this->Item->get_item_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
$suggestions = array_merge($suggestions, $this->Item_kit->get_item_kit_search_suggestions($this->input->post('q'),$this->input->post('limit')));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function supplier_search()
|
||||
{
|
||||
$suggestions = $this->Supplier->get_suppliers_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function select_supplier()
|
||||
{
|
||||
$supplier_id = $this->input->post("supplier");
|
||||
$this->receiving_lib->set_supplier($supplier_id);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function change_mode()
|
||||
{
|
||||
$mode = $this->input->post("mode");
|
||||
$this->receiving_lib->set_mode($mode);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function add()
|
||||
{
|
||||
$data=array();
|
||||
$mode = $this->receiving_lib->get_mode();
|
||||
$item_id_or_number_or_item_kit_or_receipt = $this->input->post("item");
|
||||
$quantity = $mode=="receive" ? 1:-1;
|
||||
|
||||
if($this->receiving_lib->is_valid_receipt($item_id_or_number_or_item_kit_or_receipt) && $mode=='return')
|
||||
{
|
||||
$this->receiving_lib->return_entire_receiving($item_id_or_number_or_item_kit_or_receipt);
|
||||
}
|
||||
elseif($this->receiving_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
|
||||
{
|
||||
$this->receiving_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt);
|
||||
}
|
||||
elseif(!$this->receiving_lib->add_item($item_id_or_number_or_item_kit_or_receipt,$quantity))
|
||||
{
|
||||
$data['error']=$this->lang->line('recvs_unable_to_add_item');
|
||||
}
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
function edit_item($item_id)
|
||||
{
|
||||
$data= array();
|
||||
|
||||
$this->form_validation->set_rules('price', 'lang:items_price', 'required|numeric');
|
||||
$this->form_validation->set_rules('quantity', 'lang:items_quantity', 'required|integer');
|
||||
$this->form_validation->set_rules('discount', 'lang:items_discount', 'required|integer');
|
||||
|
||||
$description = $this->input->post("description");
|
||||
$serialnumber = $this->input->post("serialnumber");
|
||||
$price = $this->input->post("price");
|
||||
$quantity = $this->input->post("quantity");
|
||||
$discount = $this->input->post("discount");
|
||||
|
||||
if ($this->form_validation->run() != FALSE)
|
||||
{
|
||||
$this->receiving_lib->edit_item($item_id,$description,$serialnumber,$quantity,$discount,$price);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['error']=$this->lang->line('recvs_error_editing_item');
|
||||
}
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
function delete_item($item_number)
|
||||
{
|
||||
$this->receiving_lib->delete_item($item_number);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function delete_supplier()
|
||||
{
|
||||
$this->receiving_lib->delete_supplier();
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function complete()
|
||||
{
|
||||
$data['cart']=$this->receiving_lib->get_cart();
|
||||
$data['total']=$this->receiving_lib->get_total();
|
||||
$data['receipt_title']=$this->lang->line('recvs_receipt');
|
||||
$data['transaction_time']= date('m/d/Y h:i:s a');
|
||||
$supplier_id=$this->receiving_lib->get_supplier();
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$comment = $this->input->post('comment');
|
||||
$emp_info=$this->Employee->get_info($employee_id);
|
||||
$payment_type = $this->input->post('payment_type');
|
||||
$data['payment_type']=$this->input->post('payment_type');
|
||||
|
||||
if ($this->input->post('amount_tendered'))
|
||||
{
|
||||
$data['amount_tendered'] = $this->input->post('amount_tendered');
|
||||
$data['amount_change'] = to_currency($data['amount_tendered'] - round($data['total'], 2));
|
||||
}
|
||||
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
|
||||
|
||||
if($supplier_id!=-1)
|
||||
{
|
||||
$suppl_info=$this->Supplier->get_info($supplier_id);
|
||||
$data['supplier']=$suppl_info->first_name.' '.$suppl_info->last_name;
|
||||
}
|
||||
|
||||
//SAVE receiving to database
|
||||
$data['receiving_id']='RECV '.$this->Receiving->save($data['cart'], $supplier_id,$employee_id,$comment,$payment_type);
|
||||
|
||||
if ($data['receiving_id'] == 'RECV -1')
|
||||
{
|
||||
$data['error_message'] = $this->lang->line('receivings_transaction_failed');
|
||||
}
|
||||
|
||||
$this->load->view("receivings/receipt",$data);
|
||||
$this->receiving_lib->clear_all();
|
||||
$this->_remove_duplicate_cookies();
|
||||
}
|
||||
|
||||
function receipt($receiving_id)
|
||||
{
|
||||
$receiving_info = $this->Receiving->get_info($receiving_id)->row_array();
|
||||
$this->receiving_lib->copy_entire_receiving($receiving_id);
|
||||
$data['cart']=$this->receiving_lib->get_cart();
|
||||
$data['total']=$this->receiving_lib->get_total();
|
||||
$data['receipt_title']=$this->lang->line('recvs_receipt');
|
||||
$data['transaction_time']= date('m/d/Y h:i:s a', strtotime($receiving_info['receiving_time']));
|
||||
$supplier_id=$this->receiving_lib->get_supplier();
|
||||
$emp_info=$this->Employee->get_info($receiving_info['employee_id']);
|
||||
$data['payment_type']=$receiving_info['payment_type'];
|
||||
|
||||
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
|
||||
|
||||
if($supplier_id!=-1)
|
||||
{
|
||||
$supplier_info=$this->Supplier->get_info($supplier_id);
|
||||
$data['supplier']=$supplier_info->first_name.' '.$supplier_info->last_name;
|
||||
}
|
||||
$data['receiving_id']='RECV '.$receiving_id;
|
||||
$this->load->view("receivings/receipt",$data);
|
||||
$this->receiving_lib->clear_all();
|
||||
$this->_remove_duplicate_cookies();
|
||||
}
|
||||
|
||||
function _reload($data=array())
|
||||
{
|
||||
$person_info = $this->Employee->get_logged_in_employee_info();
|
||||
$data['cart']=$this->receiving_lib->get_cart();
|
||||
$data['modes']=array('receive'=>$this->lang->line('recvs_receiving'),'return'=>$this->lang->line('recvs_return'));
|
||||
$data['mode']=$this->receiving_lib->get_mode();
|
||||
$data['total']=$this->receiving_lib->get_total();
|
||||
$data['items_module_allowed'] = $this->Employee->has_permission('items', $person_info->person_id);
|
||||
$data['payment_options']=array(
|
||||
$this->lang->line('sales_cash') => $this->lang->line('sales_cash'),
|
||||
$this->lang->line('sales_check') => $this->lang->line('sales_check'),
|
||||
$this->lang->line('sales_debit') => $this->lang->line('sales_debit'),
|
||||
$this->lang->line('sales_credit') => $this->lang->line('sales_credit')
|
||||
);
|
||||
|
||||
$supplier_id=$this->receiving_lib->get_supplier();
|
||||
if($supplier_id!=-1)
|
||||
{
|
||||
$info=$this->Supplier->get_info($supplier_id);
|
||||
$data['supplier']=$info->first_name.' '.$info->last_name;
|
||||
}
|
||||
$this->load->view("receivings/receiving",$data);
|
||||
$this->_remove_duplicate_cookies();
|
||||
}
|
||||
|
||||
function cancel_receiving()
|
||||
{
|
||||
$this->receiving_lib->clear_all();
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -1,917 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
require_once (APPPATH."libraries/ofc-library/open-flash-chart.php");
|
||||
|
||||
define("FORM_WIDTH", "400");
|
||||
|
||||
class Reports extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('reports');
|
||||
$this->load->helper('report');
|
||||
}
|
||||
|
||||
//Initial report listing screen
|
||||
function index()
|
||||
{
|
||||
$this->load->view("reports/listing",array());
|
||||
}
|
||||
|
||||
function _get_common_report_data()
|
||||
{
|
||||
$data = array();
|
||||
$data['report_date_range_simple'] = get_simple_date_ranges();
|
||||
$data['months'] = get_months();
|
||||
$data['days'] = get_days();
|
||||
$data['years'] = get_years();
|
||||
$data['selected_month']=date('n');
|
||||
$data['selected_day']=date('d');
|
||||
$data['selected_year']=date('Y');
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
//Input for reports that require only a date range and an export to excel. (see routes.php to see that all summary reports route here)
|
||||
function date_input_excel_export()
|
||||
{
|
||||
$data = $this->_get_common_report_data();
|
||||
$this->load->view("reports/date_input_excel_export",$data);
|
||||
}
|
||||
|
||||
function get_detailed_sales_row($sale_id, $sale_type=1)
|
||||
{
|
||||
$this->load->model('reports/Detailed_sales');
|
||||
$model = $this->Detailed_sales;
|
||||
|
||||
$report_data = $model->getDataBySaleId($sale_id, $sale_type);
|
||||
|
||||
$summary_data = array(anchor('sales/edit/'.$report_data['sale_id'] . '/width:'.FORM_WIDTH,
|
||||
'POS '.$report_data['sale_id'],
|
||||
array('class' => 'thickbox')),
|
||||
$report_data['sale_date'],
|
||||
$report_data['items_purchased'],
|
||||
$report_data['employee_name'],
|
||||
$report_data['customer_name'],
|
||||
to_currency($report_data['subtotal']),
|
||||
to_currency($report_data['total']),
|
||||
to_currency($report_data['tax']),
|
||||
to_currency($report_data['profit']),
|
||||
$report_data['payment_type'],
|
||||
$report_data['comment']);
|
||||
echo get_detailed_sales_data_row($summary_data, $this);
|
||||
}
|
||||
|
||||
function get_summary_data($start_date, $end_date = NULL, $sale_type=0)
|
||||
{
|
||||
$end_date = $end_date ?: $start_date;
|
||||
$this->load->model('reports/Summary_sales');
|
||||
$model = $this->Summary_sales;
|
||||
$summary = $model->getSummaryData(array(
|
||||
'start_date'=>$start_date,
|
||||
'end_date'=>$end_date,
|
||||
'sale_type' => $sale_type));
|
||||
echo get_sales_summary_totals($summary, $this);
|
||||
}
|
||||
|
||||
//Summary sales report
|
||||
function summary_sales($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_sales');
|
||||
$model = $this->Summary_sales;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['sale_date'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_sales_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary categories report
|
||||
function summary_categories($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_categories');
|
||||
$model = $this->Summary_categories;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['category'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_categories_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary customers report
|
||||
function summary_customers($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_customers');
|
||||
$model = $this->Summary_customers;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['customer'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_customers_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary suppliers report
|
||||
function summary_suppliers($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_suppliers');
|
||||
$model = $this->Summary_suppliers;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['supplier'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_suppliers_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary items report
|
||||
function summary_items($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_items');
|
||||
$model = $this->Summary_items;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array(character_limiter($row['name'], 16), $row['quantity_purchased'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_items_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary employees report
|
||||
function summary_employees($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_employees');
|
||||
$model = $this->Summary_employees;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['employee'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_employees_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary taxes report
|
||||
function summary_taxes($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_taxes');
|
||||
$model = $this->Summary_taxes;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['percent'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_taxes_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Summary discounts report
|
||||
function summary_discounts($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_discounts');
|
||||
$model = $this->Summary_discounts;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['discount_percent'],$row['count']);
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_discounts_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
function summary_payments($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Summary_payments');
|
||||
$model = $this->Summary_payments;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['payment_type'],to_currency($row['payment_amount']));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_payments_summary_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
//Input for reports that require only a date range. (see routes.php to see that all graphical summary reports route here)
|
||||
function date_input()
|
||||
{
|
||||
$data = $this->_get_common_report_data();
|
||||
$this->load->view("reports/date_input",$data);
|
||||
}
|
||||
|
||||
//Graphical summary sales report
|
||||
function graphical_summary_sales($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_sales');
|
||||
$model = $this->Summary_sales;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_sales_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_sales_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_sales_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_sales');
|
||||
$model = $this->Summary_sales;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[date('m/d/Y', strtotime($row['sale_date']))]= $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_sales_summary_report'),
|
||||
"yaxis_label"=>$this->lang->line('reports_revenue'),
|
||||
"xaxis_label"=>$this->lang->line('reports_date'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/line",$data);
|
||||
|
||||
}
|
||||
|
||||
//Graphical summary items report
|
||||
function graphical_summary_items($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_items');
|
||||
$model = $this->Summary_items;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_items_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_items_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_items_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_items');
|
||||
$model = $this->Summary_items;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['name']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_items_summary_report'),
|
||||
"xaxis_label"=>$this->lang->line('reports_revenue'),
|
||||
"yaxis_label"=>$this->lang->line('reports_items'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/hbar",$data);
|
||||
}
|
||||
|
||||
//Graphical summary customers report
|
||||
function graphical_summary_categories($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_categories');
|
||||
$model = $this->Summary_categories;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_categories_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_categories_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_categories_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_categories');
|
||||
$model = $this->Summary_categories;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['category']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_categories_summary_report'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/pie",$data);
|
||||
}
|
||||
|
||||
function graphical_summary_suppliers($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_suppliers');
|
||||
$model = $this->Summary_suppliers;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_suppliers_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_suppliers_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_suppliers_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_suppliers');
|
||||
$model = $this->Summary_suppliers;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['supplier']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_suppliers_summary_report'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/pie",$data);
|
||||
}
|
||||
|
||||
function graphical_summary_employees($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_employees');
|
||||
$model = $this->Summary_employees;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_employees_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_employees_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_employees_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_employees');
|
||||
$model = $this->Summary_employees;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['employee']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_employees_summary_report'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/pie",$data);
|
||||
}
|
||||
|
||||
function graphical_summary_taxes($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_taxes');
|
||||
$model = $this->Summary_taxes;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_taxes_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_taxes_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_taxes_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_taxes');
|
||||
$model = $this->Summary_taxes;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['percent']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_taxes_summary_report'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/pie",$data);
|
||||
}
|
||||
|
||||
//Graphical summary customers report
|
||||
function graphical_summary_customers($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_customers');
|
||||
$model = $this->Summary_customers;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_customers_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_customers_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_customers_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_customers');
|
||||
$model = $this->Summary_customers;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['customer']] = $row['total'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_customers_summary_report'),
|
||||
"xaxis_label"=>$this->lang->line('reports_revenue'),
|
||||
"yaxis_label"=>$this->lang->line('reports_customers'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/hbar",$data);
|
||||
}
|
||||
|
||||
//Graphical summary discounts report
|
||||
function graphical_summary_discounts($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_discounts');
|
||||
$model = $this->Summary_discounts;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_discounts_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_discounts_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_discounts_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_discounts');
|
||||
$model = $this->Summary_discounts;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['discount_percent']] = $row['count'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_discounts_summary_report'),
|
||||
"yaxis_label"=>$this->lang->line('reports_count'),
|
||||
"xaxis_label"=>$this->lang->line('reports_discount_percent'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/bar",$data);
|
||||
}
|
||||
|
||||
function graphical_summary_payments($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_payments');
|
||||
$model = $this->Summary_payments;
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_payments_summary_report'),
|
||||
"data_file" => site_url("reports/graphical_summary_payments_graph/$start_date/$end_date/$sale_type"),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type))
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphical",$data);
|
||||
}
|
||||
|
||||
//The actual graph data
|
||||
function graphical_summary_payments_graph($start_date, $end_date, $sale_type)
|
||||
{
|
||||
$this->load->model('reports/Summary_payments');
|
||||
$model = $this->Summary_payments;
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$graph_data = array();
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$graph_data[$row['payment_type']] = $row['payment_amount'];
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_payments_summary_report'),
|
||||
"yaxis_label"=>$this->lang->line('reports_revenue'),
|
||||
"xaxis_label"=>$this->lang->line('reports_payment_type'),
|
||||
"data" => $graph_data
|
||||
);
|
||||
|
||||
$this->load->view("reports/graphs/pie",$data);
|
||||
}
|
||||
function specific_customer_input()
|
||||
{
|
||||
$data = $this->_get_common_report_data();
|
||||
$data['specific_input_name'] = $this->lang->line('reports_customer');
|
||||
|
||||
$customers = array();
|
||||
foreach($this->Customer->get_all()->result() as $customer)
|
||||
{
|
||||
$customers[$customer->person_id] = $customer->first_name .' '.$customer->last_name;
|
||||
}
|
||||
$data['specific_input_data'] = $customers;
|
||||
$this->load->view("reports/specific_input",$data);
|
||||
}
|
||||
|
||||
function specific_customer($start_date, $end_date, $customer_id, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Specific_customer');
|
||||
$model = $this->Specific_customer;
|
||||
|
||||
$headers = $model->getDataColumns();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'customer_id' =>$customer_id, 'sale_type' => $sale_type));
|
||||
|
||||
$summary_data = array();
|
||||
$details_data = array();
|
||||
|
||||
foreach($report_data['summary'] as $key=>$row)
|
||||
{
|
||||
$summary_data[] = array(anchor('sales/edit/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']);
|
||||
|
||||
foreach($report_data['details'][$key] as $drow)
|
||||
{
|
||||
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),to_currency($drow['profit']), $drow['discount_percent'].'%');
|
||||
}
|
||||
}
|
||||
|
||||
$customer_info = $this->Customer->get_info($customer_id);
|
||||
$data = array(
|
||||
"title" => $customer_info->first_name .' '. $customer_info->last_name.' '.$this->lang->line('reports_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"summary_data" => $summary_data,
|
||||
"details_data" => $details_data,
|
||||
"overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date,'customer_id' =>$customer_id, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular_details",$data);
|
||||
}
|
||||
|
||||
function specific_employee_input()
|
||||
{
|
||||
$data = $this->_get_common_report_data();
|
||||
$data['specific_input_name'] = $this->lang->line('reports_employee');
|
||||
|
||||
$employees = array();
|
||||
foreach($this->Employee->get_all()->result() as $employee)
|
||||
{
|
||||
$employees[$employee->person_id] = $employee->first_name .' '.$employee->last_name;
|
||||
}
|
||||
$data['specific_input_data'] = $employees;
|
||||
$this->load->view("reports/specific_input",$data);
|
||||
}
|
||||
|
||||
function specific_employee($start_date, $end_date, $employee_id, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Specific_employee');
|
||||
$model = $this->Specific_employee;
|
||||
|
||||
$headers = $model->getDataColumns();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'employee_id' =>$employee_id, 'sale_type' => $sale_type));
|
||||
|
||||
$summary_data = array();
|
||||
$details_data = array();
|
||||
|
||||
foreach($report_data['summary'] as $key=>$row)
|
||||
{
|
||||
$summary_data[] = array(anchor('sales/edit/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']);
|
||||
|
||||
foreach($report_data['details'][$key] as $drow)
|
||||
{
|
||||
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),to_currency($drow['profit']), $drow['discount_percent'].'%');
|
||||
}
|
||||
}
|
||||
|
||||
$employee_info = $this->Employee->get_info($employee_id);
|
||||
$data = array(
|
||||
"title" => $employee_info->first_name .' '. $employee_info->last_name.' '.$this->lang->line('reports_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"summary_data" => $summary_data,
|
||||
"details_data" => $details_data,
|
||||
"overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date,'employee_id' =>$employee_id, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular_details",$data);
|
||||
}
|
||||
|
||||
function specific_discount_input()
|
||||
{
|
||||
$data = $this->_get_common_report_data();
|
||||
$data['specific_input_name'] = $this->lang->line('reports_discount');
|
||||
|
||||
$discounts = array();
|
||||
for($i = 0; $i <= 100; $i += 10)
|
||||
{
|
||||
$discounts[$i] = $i . '%';
|
||||
}
|
||||
$data['specific_input_data'] = $discounts;
|
||||
$this->load->view("reports/specific_input",$data);
|
||||
}
|
||||
|
||||
function specific_discount($start_date, $end_date, $discount, $sale_type, $export_excel = 0)
|
||||
{
|
||||
$this->load->model('reports/Specific_discount');
|
||||
$model = $this->Specific_discount;
|
||||
|
||||
$headers = $model->getDataColumns();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'discount' =>$discount, 'sale_type' => $sale_type));
|
||||
|
||||
$summary_data = array();
|
||||
$details_data = array();
|
||||
|
||||
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']);
|
||||
|
||||
foreach($report_data['details'][$key] as $drow)
|
||||
{
|
||||
$details_data[$key][] = array($drow['name'], $drow['category'], $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)),
|
||||
"headers" => $headers,
|
||||
"summary_data" => $summary_data,
|
||||
"details_data" => $details_data,
|
||||
"header_width" => intval(100 / count($headers['summary'])),
|
||||
"overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date,'discount' =>$discount, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular_details",$data);
|
||||
|
||||
}
|
||||
|
||||
function detailed_sales($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Detailed_sales');
|
||||
$model = $this->Detailed_sales;
|
||||
|
||||
$headers = $model->getDataColumns();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$summary_data = array();
|
||||
$details_data = array();
|
||||
|
||||
foreach($report_data['summary'] as $key=>$row)
|
||||
{
|
||||
$summary_data[] = array(anchor('sales/edit/'.$row['sale_id'] . '/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']);
|
||||
|
||||
foreach($report_data['details'][$key] as $drow)
|
||||
{
|
||||
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['serialnumber'], $drow['description'], $drow['quantity_purchased'], to_currency($drow['subtotal']), to_currency($drow['total']), to_currency($drow['tax']),to_currency($drow['profit']), $drow['discount_percent'].'%');
|
||||
}
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" =>$this->lang->line('reports_detailed_sales_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"editable" => true,
|
||||
"summary_data" => $summary_data,
|
||||
"details_data" => $details_data,
|
||||
"header_width" => intval(100 / count($headers['summary'])),
|
||||
"overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular_details",$data);
|
||||
}
|
||||
|
||||
function detailed_receivings($start_date, $end_date, $sale_type, $export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Detailed_receivings');
|
||||
$model = $this->Detailed_receivings;
|
||||
|
||||
$headers = $model->getDataColumns();
|
||||
$report_data = $model->getData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type));
|
||||
|
||||
$summary_data = array();
|
||||
$details_data = array();
|
||||
|
||||
foreach($report_data['summary'] as $key=>$row)
|
||||
{
|
||||
$summary_data[] = array(anchor('receivings/receipt/'.$row['receiving_id'], 'RECV '.$row['receiving_id'], array('target' => '_blank')), $row['receiving_date'], $row['items_purchased'], $row['employee_name'], $row['supplier_name'], to_currency($row['total']), $row['payment_type'], $row['comment']);
|
||||
|
||||
foreach($report_data['details'][$key] as $drow)
|
||||
{
|
||||
$details_data[$key][] = array($drow['name'], $drow['category'], $drow['quantity_purchased'], to_currency($drow['total']), $drow['discount_percent'].'%');
|
||||
}
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" =>$this->lang->line('reports_detailed_receivings_report'),
|
||||
"subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)),
|
||||
"headers" => $model->getDataColumns(),
|
||||
"summary_data" => $summary_data,
|
||||
"details_data" => $details_data,
|
||||
"overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date, 'sale_type' => $sale_type)),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular_details",$data);
|
||||
}
|
||||
|
||||
function excel_export()
|
||||
{
|
||||
$this->load->view("reports/excel_export",array());
|
||||
}
|
||||
|
||||
function inventory_low($export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Inventory_low');
|
||||
$model = $this->Inventory_low;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array());
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['name'], $row['item_number'], $row['description'], $row['quantity'], $row['reorder_level']);
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_low_inventory_report'),
|
||||
"subtitle" => '',
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array()),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
function inventory_summary($export_excel=0)
|
||||
{
|
||||
$this->load->model('reports/Inventory_summary');
|
||||
$model = $this->Inventory_summary;
|
||||
$tabular_data = array();
|
||||
$report_data = $model->getData(array());
|
||||
foreach($report_data as $row)
|
||||
{
|
||||
$tabular_data[] = array($row['name'], $row['item_number'], $row['description'], $row['quantity'], $row['reorder_level']);
|
||||
}
|
||||
|
||||
$data = array(
|
||||
"title" => $this->lang->line('reports_inventory_summary_report'),
|
||||
"subtitle" => '',
|
||||
"headers" => $model->getDataColumns(),
|
||||
"data" => $tabular_data,
|
||||
"summary_data" => $model->getSummaryData(array()),
|
||||
"export_excel" => $export_excel
|
||||
);
|
||||
|
||||
$this->load->view("reports/tabular",$data);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -1,441 +0,0 @@
|
||||
<?php
|
||||
require_once ("secure_area.php");
|
||||
class Sales extends Secure_area
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('sales');
|
||||
$this->load->library('sale_lib');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function item_search()
|
||||
{
|
||||
$suggestions = $this->Item->get_item_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
$suggestions = array_merge($suggestions, $this->Item_kit->get_item_kit_search_suggestions($this->input->post('q'),$this->input->post('limit')));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function customer_search()
|
||||
{
|
||||
$suggestions = $this->Customer->get_customer_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
function select_customer()
|
||||
{
|
||||
$customer_id = $this->input->post("customer");
|
||||
$this->sale_lib->set_customer($customer_id);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function change_mode()
|
||||
{
|
||||
$mode = $this->input->post("mode");
|
||||
$this->sale_lib->set_mode($mode);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function set_comment()
|
||||
{
|
||||
$this->sale_lib->set_comment($this->input->post('comment'));
|
||||
}
|
||||
|
||||
function set_email_receipt()
|
||||
{
|
||||
$this->sale_lib->set_email_receipt($this->input->post('email_receipt'));
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function add_payment()
|
||||
{
|
||||
$data = array();
|
||||
$this->form_validation->set_rules( 'amount_tendered', 'lang:sales_amount_tendered', 'numeric' );
|
||||
|
||||
if ( $this->form_validation->run() == FALSE )
|
||||
{
|
||||
if ( $this->input->post( 'payment_type' ) == $this->lang->line( 'sales_gift_card' ) )
|
||||
$data['error']=$this->lang->line('sales_must_enter_numeric_giftcard');
|
||||
else
|
||||
$data['error']=$this->lang->line('sales_must_enter_numeric');
|
||||
|
||||
$this->_reload( $data );
|
||||
return;
|
||||
}
|
||||
|
||||
$payment_type = $this->input->post( 'payment_type' );
|
||||
if ( $payment_type == $this->lang->line( 'sales_giftcard' ) )
|
||||
{
|
||||
$payments = $this->sale_lib->get_payments();
|
||||
$payment_type = $this->input->post( 'payment_type' ) . ':' . $payment_amount = $this->input->post( 'amount_tendered' );
|
||||
$current_payments_with_giftcard = isset( $payments[$payment_type] ) ? $payments[$payment_type]['payment_amount'] : 0;
|
||||
$cur_giftcard_value = $this->Giftcard->get_giftcard_value( $this->input->post( 'amount_tendered' ) ) - $current_payments_with_giftcard;
|
||||
|
||||
if ( $cur_giftcard_value <= 0 )
|
||||
{
|
||||
$data['error'] = 'Giftcard balance is ' . to_currency( $this->Giftcard->get_giftcard_value( $this->input->post( 'amount_tendered' ) ) ) . ' !';
|
||||
$this->_reload( $data );
|
||||
return;
|
||||
}
|
||||
|
||||
$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;
|
||||
$data['warning'] = 'Giftcard ' . $this->input->post( 'amount_tendered' ) . ' balance is ' . to_currency( $new_giftcard_value ) . ' !';
|
||||
$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=="sale" ? 1:-1;
|
||||
|
||||
if($this->sale_lib->is_valid_receipt($item_id_or_number_or_item_kit_or_receipt) && $mode=='return')
|
||||
{
|
||||
$this->sale_lib->return_entire_sale($item_id_or_number_or_item_kit_or_receipt);
|
||||
}
|
||||
elseif($this->sale_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
|
||||
{
|
||||
$this->sale_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt);
|
||||
}
|
||||
elseif(!$this->sale_lib->add_item($item_id_or_number_or_item_kit_or_receipt,$quantity))
|
||||
{
|
||||
$data['error']=$this->lang->line('sales_unable_to_add_item');
|
||||
}
|
||||
|
||||
if($this->sale_lib->out_of_stock($item_id_or_number_or_item_kit_or_receipt))
|
||||
{
|
||||
$data['warning'] = $this->lang->line('sales_quantity_less_than_zero');
|
||||
}
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
function edit_item($line)
|
||||
{
|
||||
$data= array();
|
||||
|
||||
$this->form_validation->set_rules('price', 'lang:items_price', 'required|numeric');
|
||||
$this->form_validation->set_rules('quantity', 'lang:items_quantity', 'required|numeric');
|
||||
|
||||
$description = $this->input->post("description");
|
||||
$serialnumber = $this->input->post("serialnumber");
|
||||
$price = $this->input->post("price");
|
||||
$quantity = $this->input->post("quantity");
|
||||
$discount = $this->input->post("discount");
|
||||
|
||||
|
||||
if ($this->form_validation->run() != FALSE)
|
||||
{
|
||||
$this->sale_lib->edit_item($line,$description,$serialnumber,$quantity,$discount,$price);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['error']=$this->lang->line('sales_error_editing_item');
|
||||
}
|
||||
|
||||
if($this->sale_lib->out_of_stock($this->sale_lib->get_item_id($line)))
|
||||
{
|
||||
$data['warning'] = $this->lang->line('sales_quantity_less_than_zero');
|
||||
}
|
||||
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
function delete_item($item_number)
|
||||
{
|
||||
$this->sale_lib->delete_item($item_number);
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function remove_customer()
|
||||
{
|
||||
$this->sale_lib->remove_customer();
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
function complete()
|
||||
{
|
||||
$data['cart']=$this->sale_lib->get_cart();
|
||||
$data['subtotal']=$this->sale_lib->get_subtotal();
|
||||
$data['taxes']=$this->sale_lib->get_taxes();
|
||||
$data['total']=$this->sale_lib->get_total();
|
||||
$data['receipt_title']=$this->lang->line('sales_receipt');
|
||||
$data['transaction_time']= date('m/d/Y h:i:s a');
|
||||
$customer_id=$this->sale_lib->get_customer();
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$comment = $this->sale_lib->get_comment();
|
||||
$emp_info=$this->Employee->get_info($employee_id);
|
||||
$data['payments']=$this->sale_lib->get_payments();
|
||||
$data['amount_change']=to_currency($this->sale_lib->get_amount_due() * -1);
|
||||
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
|
||||
|
||||
if($customer_id!=-1)
|
||||
{
|
||||
$cust_info=$this->Customer->get_info($customer_id);
|
||||
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
|
||||
}
|
||||
|
||||
//SAVE sale to database
|
||||
$data['sale_id']='POS '.$this->Sale->save($data['cart'], $customer_id,$employee_id,$comment,$data['payments']);
|
||||
if ($data['sale_id'] == 'POS -1')
|
||||
{
|
||||
$data['error_message'] = $this->lang->line('sales_transaction_failed');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->sale_lib->get_email_receipt() && !empty($cust_info->email))
|
||||
{
|
||||
$this->load->library('email');
|
||||
$config['mailtype'] = 'html';
|
||||
$this->email->initialize($config);
|
||||
$this->email->from($this->config->item('email'), $this->config->item('company'));
|
||||
$this->email->to($cust_info->email);
|
||||
|
||||
$this->email->subject($this->lang->line('sales_receipt'));
|
||||
$this->email->message($this->load->view("sales/receipt_email",$data, true));
|
||||
$this->email->send();
|
||||
}
|
||||
}
|
||||
$this->load->view("sales/receipt",$data);
|
||||
$this->sale_lib->clear_all();
|
||||
$this->_remove_duplicate_cookies();
|
||||
}
|
||||
|
||||
function receipt($sale_id)
|
||||
{
|
||||
$sale_info = $this->Sale->get_info($sale_id)->row_array();
|
||||
$this->sale_lib->copy_entire_sale($sale_id);
|
||||
$data['cart']=$this->sale_lib->get_cart();
|
||||
$data['payments']=$this->sale_lib->get_payments();
|
||||
$data['subtotal']=$this->sale_lib->get_subtotal();
|
||||
$data['taxes']=$this->sale_lib->get_taxes();
|
||||
$data['total']=$this->sale_lib->get_total();
|
||||
$data['receipt_title']=$this->lang->line('sales_receipt');
|
||||
$data['transaction_time']= date('m/d/Y h:i:s a', strtotime($sale_info['sale_time']));
|
||||
$customer_id=$this->sale_lib->get_customer();
|
||||
$emp_info=$this->Employee->get_info($sale_info['employee_id']);
|
||||
$data['payment_type']=$sale_info['payment_type'];
|
||||
$data['amount_change']=to_currency($this->sale_lib->get_amount_due() * -1);
|
||||
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
|
||||
|
||||
if($customer_id!=-1)
|
||||
{
|
||||
$cust_info=$this->Customer->get_info($customer_id);
|
||||
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
|
||||
}
|
||||
$data['sale_id']='POS '.$sale_id;
|
||||
$this->load->view("sales/receipt",$data);
|
||||
$this->sale_lib->clear_all();
|
||||
$this->_remove_duplicate_cookies();
|
||||
}
|
||||
|
||||
function edit($sale_id)
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$data['customers'] = array('' => 'No Customer');
|
||||
foreach ($this->Customer->get_all()->result() as $customer)
|
||||
{
|
||||
$data['customers'][$customer->person_id] = $customer->first_name . ' '. $customer->last_name;
|
||||
}
|
||||
|
||||
$data['employees'] = array();
|
||||
foreach ($this->Employee->get_all()->result() as $employee)
|
||||
{
|
||||
$data['employees'][$employee->person_id] = $employee->first_name . ' '. $employee->last_name;
|
||||
}
|
||||
|
||||
$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_delete_successful').' '.
|
||||
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_delete_unsuccessful')));
|
||||
}
|
||||
}
|
||||
|
||||
function save($sale_id)
|
||||
{
|
||||
$sale_data = array(
|
||||
'sale_time' => date('Y-m-d', strtotime($this->input->post('date'))),
|
||||
'customer_id' => $this->input->post('customer_id') ? $this->input->post('customer_id') : null,
|
||||
'employee_id' => $this->input->post('employee_id'),
|
||||
'comment' => $this->input->post('comment')
|
||||
);
|
||||
|
||||
if ($this->Sale->update($sale_data, $sale_id))
|
||||
{
|
||||
echo json_encode(array(
|
||||
'success'=>true,
|
||||
'message'=>$this->lang->line('sales_successfully_updated'),
|
||||
'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['subtotal']=$this->sale_lib->get_subtotal();
|
||||
$data['taxes']=$this->sale_lib->get_taxes();
|
||||
$data['total']=$this->sale_lib->get_total();
|
||||
$data['items_module_allowed'] = $this->Employee->has_permission('items', $person_info->person_id);
|
||||
$data['comment'] = $this->sale_lib->get_comment();
|
||||
$data['email_receipt'] = $this->sale_lib->get_email_receipt();
|
||||
$data['payments_total']=$this->sale_lib->get_payments_total();
|
||||
$data['amount_due']=$this->sale_lib->get_amount_due();
|
||||
$data['payments']=$this->sale_lib->get_payments();
|
||||
$data['payment_options']=array(
|
||||
$this->lang->line('sales_cash') => $this->lang->line('sales_cash'),
|
||||
$this->lang->line('sales_check') => $this->lang->line('sales_check'),
|
||||
$this->lang->line('sales_giftcard') => $this->lang->line('sales_giftcard'),
|
||||
$this->lang->line('sales_debit') => $this->lang->line('sales_debit'),
|
||||
$this->lang->line('sales_credit') => $this->lang->line('sales_credit')
|
||||
);
|
||||
|
||||
$customer_id=$this->sale_lib->get_customer();
|
||||
if($customer_id!=-1)
|
||||
{
|
||||
$info=$this->Customer->get_info($customer_id);
|
||||
$data['customer']=$info->first_name.' '.$info->last_name;
|
||||
$data['customer_email']=$info->email;
|
||||
}
|
||||
$data['payments_cover_total'] = $this->_payments_cover_total();
|
||||
$this->load->view("sales/register",$data);
|
||||
$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');
|
||||
$emp_info=$this->Employee->get_info($employee_id);
|
||||
$payment_type = $this->input->post('payment_type');
|
||||
$data['payment_type']=$this->input->post('payment_type');
|
||||
//Alain Multiple payments
|
||||
$data['payments']=$this->sale_lib->get_payments();
|
||||
$data['amount_change']=to_currency($this->sale_lib->get_amount_due() * -1);
|
||||
$data['employee']=$emp_info->first_name.' '.$emp_info->last_name;
|
||||
|
||||
if($customer_id!=-1)
|
||||
{
|
||||
$cust_info=$this->Customer->get_info($customer_id);
|
||||
$data['customer']=$cust_info->first_name.' '.$cust_info->last_name;
|
||||
}
|
||||
|
||||
$total_payments = 0;
|
||||
|
||||
foreach($data['payments'] as $payment)
|
||||
{
|
||||
$total_payments += $payment['payment_amount'];
|
||||
}
|
||||
|
||||
//SAVE sale to database
|
||||
$data['sale_id']='POS '.$this->Sale_suspended->save($data['cart'], $customer_id,$employee_id,$comment,$data['payments']);
|
||||
if ($data['sale_id'] == 'POS -1')
|
||||
{
|
||||
$data['error_message'] = $this->lang->line('sales_transaction_failed');
|
||||
}
|
||||
$this->sale_lib->clear_all();
|
||||
$this->_reload(array('success' => $this->lang->line('sales_successfully_suspended_sale')));
|
||||
}
|
||||
|
||||
function suspended()
|
||||
{
|
||||
$data = array();
|
||||
$data['suspended_sales'] = $this->Sale_suspended->get_all()->result_array();
|
||||
$this->load->view('sales/suspended', $data);
|
||||
}
|
||||
|
||||
function unsuspend()
|
||||
{
|
||||
$sale_id = $this->input->post('suspended_sale_id');
|
||||
$this->sale_lib->clear_all();
|
||||
$this->sale_lib->copy_entire_suspended_sale($sale_id);
|
||||
$this->Sale_suspended->delete($sale_id);
|
||||
$this->_reload();
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,82 +0,0 @@
|
||||
<?php
|
||||
class Secure_area extends CI_Controller
|
||||
{
|
||||
/*
|
||||
Controllers that are considered secure extend Secure_area, optionally a $module_id can
|
||||
be set to also check if a user can access a particular module in the system.
|
||||
*/
|
||||
function __construct($module_id=null)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('Employee');
|
||||
if(!$this->Employee->is_logged_in())
|
||||
{
|
||||
redirect('login');
|
||||
}
|
||||
|
||||
if(!$this->Employee->has_permission($module_id,$this->Employee->get_logged_in_employee_info()->person_id))
|
||||
{
|
||||
redirect('no_access/'.$module_id);
|
||||
}
|
||||
|
||||
//load up global data
|
||||
$logged_in_employee_info=$this->Employee->get_logged_in_employee_info();
|
||||
$data['allowed_modules']=$this->Module->get_allowed_modules($logged_in_employee_info->person_id);
|
||||
$data['user_info']=$logged_in_employee_info;
|
||||
$this->load->vars($data);
|
||||
}
|
||||
|
||||
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,131 +0,0 @@
|
||||
<?php
|
||||
require_once ("person_controller.php");
|
||||
class Suppliers extends Person_controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('suppliers');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$config['base_url'] = site_url('/suppliers/index');
|
||||
$config['total_rows'] = $this->Supplier->count_all();
|
||||
$config['per_page'] = '20';
|
||||
$config['uri_segment'] = 3;
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$data['controller_name']=strtolower(get_class());
|
||||
$data['form_width']=$this->get_form_width();
|
||||
$data['manage_table']=get_supplier_manage_table( $this->Supplier->get_all( $config['per_page'], $this->uri->segment( $config['uri_segment'] ) ), $this );
|
||||
$this->load->view('suppliers/manage',$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns supplier table data rows. This will be called with AJAX.
|
||||
*/
|
||||
function search()
|
||||
{
|
||||
$search=$this->input->post('search');
|
||||
$data_rows=get_supplier_manage_table_data_rows($this->Supplier->search($search),$this);
|
||||
echo $data_rows;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
{
|
||||
$suggestions = $this->Supplier->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
echo implode("\n",$suggestions);
|
||||
}
|
||||
|
||||
/*
|
||||
Loads the supplier edit form
|
||||
*/
|
||||
function view($supplier_id=-1)
|
||||
{
|
||||
$data['person_info']=$this->Supplier->get_info($supplier_id);
|
||||
$this->load->view("suppliers/form",$data);
|
||||
}
|
||||
|
||||
/*
|
||||
Inserts/updates a supplier
|
||||
*/
|
||||
function save($supplier_id=-1)
|
||||
{
|
||||
$person_data = array(
|
||||
'first_name'=>$this->input->post('first_name'),
|
||||
'last_name'=>$this->input->post('last_name'),
|
||||
'email'=>$this->input->post('email'),
|
||||
'phone_number'=>$this->input->post('phone_number'),
|
||||
'address_1'=>$this->input->post('address_1'),
|
||||
'address_2'=>$this->input->post('address_2'),
|
||||
'city'=>$this->input->post('city'),
|
||||
'state'=>$this->input->post('state'),
|
||||
'zip'=>$this->input->post('zip'),
|
||||
'country'=>$this->input->post('country'),
|
||||
'comments'=>$this->input->post('comments')
|
||||
);
|
||||
$supplier_data=array(
|
||||
'company_name'=>$this->input->post('company_name'),
|
||||
'account_number'=>$this->input->post('account_number')=='' ? null:$this->input->post('account_number'),
|
||||
);
|
||||
if($this->Supplier->save($person_data,$supplier_data,$supplier_id))
|
||||
{
|
||||
//New supplier
|
||||
if($supplier_id==-1)
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('suppliers_successful_adding').' '.
|
||||
$supplier_data['company_name'],'person_id'=>$supplier_data['person_id']));
|
||||
}
|
||||
else //previous supplier
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('suppliers_successful_updating').' '.
|
||||
$supplier_data['company_name'],'person_id'=>$supplier_id));
|
||||
}
|
||||
}
|
||||
else//failure
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('suppliers_error_adding_updating').' '.
|
||||
$supplier_data['company_name'],'person_id'=>-1));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
This deletes suppliers from the suppliers table
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
$suppliers_to_delete=$this->input->post('ids');
|
||||
|
||||
if($this->Supplier->delete_list($suppliers_to_delete))
|
||||
{
|
||||
echo json_encode(array('success'=>true,'message'=>$this->lang->line('suppliers_successful_deleted').' '.
|
||||
count($suppliers_to_delete).' '.$this->lang->line('suppliers_one_or_multiple')));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo json_encode(array('success'=>false,'message'=>$this->lang->line('suppliers_cannot_be_deleted')));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Gets one row for a supplier manage table. This is called using AJAX to update one row.
|
||||
*/
|
||||
function get_row()
|
||||
{
|
||||
$person_id = $this->input->post('row_id');
|
||||
$data_row=get_supplier_data_row($this->Supplier->get_info($person_id),$this);
|
||||
echo $data_row;
|
||||
}
|
||||
|
||||
/*
|
||||
get the width for the add/edit form
|
||||
*/
|
||||
function get_form_width()
|
||||
{
|
||||
return 360;
|
||||
}
|
||||
}
|
||||
?>
|
||||
96
application/core/MY_Lang.php
Normal file
96
application/core/MY_Lang.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
|
||||
|
||||
class MY_Lang extends CI_Lang
|
||||
{
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function switch_to( $idiom )
|
||||
{
|
||||
$CI =& get_instance();
|
||||
if( is_string( $idiom ) )
|
||||
{
|
||||
$CI->config->set_item( 'language', $idiom );
|
||||
$loaded = $this->is_loaded;
|
||||
$this->is_loaded = array();
|
||||
|
||||
foreach($loaded as $file)
|
||||
{
|
||||
$this->load(strtr($file, '', '_lang.php'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a single line of text from the language array. Takes variable number
|
||||
* of arguments and supports wildcards in the form of '%1', '%2', etc.
|
||||
* Overloaded function.
|
||||
*
|
||||
* @access public
|
||||
* @return mixed false if not found or the language string
|
||||
*/
|
||||
function line($line = '', $log_errors = true)
|
||||
{
|
||||
//get the arguments passed to the function
|
||||
$args = func_get_args();
|
||||
|
||||
//count the number of arguments
|
||||
$c = count($args);
|
||||
|
||||
//if one or more arguments, perform the necessary processing
|
||||
if ($c)
|
||||
{
|
||||
//first argument should be the actual language line key
|
||||
//so remove it from the array (pop from front)
|
||||
$line = array_shift($args);
|
||||
|
||||
//check to make sure the key is valid and load the line
|
||||
if ($line == '')
|
||||
{
|
||||
$line = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($this->language[$line]))
|
||||
{
|
||||
$line = $this->language[$line];
|
||||
//if the line exists and more function arguments remain
|
||||
//perform wildcard replacements
|
||||
if ($args)
|
||||
{
|
||||
$i = 1;
|
||||
foreach ($args as $arg)
|
||||
{
|
||||
$line = preg_replace('/\%'.$i.'/', $arg, $line);
|
||||
++$i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// just return label name (with TBD)
|
||||
$line = $this->line_tbd($line);
|
||||
log_message('error', 'Could not find the language line "'.$line.'"');
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//if no arguments given, no language line available
|
||||
$line = false;
|
||||
}
|
||||
|
||||
return $line;
|
||||
}
|
||||
|
||||
function line_tbd($line='')
|
||||
{
|
||||
return $line . ' (TBD)';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -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,28 +0,0 @@
|
||||
<?php
|
||||
/** GARRISON MODIFIED 4/20/2013 **/
|
||||
function to_currency($number)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$currency_symbol = $CI->config->item('currency_symbol') ? $CI->config->item('currency_symbol') : '$';
|
||||
if($number >= 0)
|
||||
{
|
||||
if($CI->config->item('currency_side') !== 'currency_side')
|
||||
return $currency_symbol.number_format($number, 2, '.', '');
|
||||
else
|
||||
return number_format($number, 2, '.', '').$currency_symbol;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($CI->config->item('currency_side') !== 'currency_side')
|
||||
return '-'.$currency_symbol.number_format(abs($number), 2, '.', '');
|
||||
else
|
||||
return '-'.number_format(abs($number), 2, '.', '').$currency_symbol;
|
||||
}
|
||||
}
|
||||
/** END MODIFIED **/
|
||||
|
||||
function to_currency_no_money($number)
|
||||
{
|
||||
return number_format($number, 2, '.', '');
|
||||
}
|
||||
?>
|
||||
31
application/helpers/dompdf_helper.php
Normal file
31
application/helpers/dompdf_helper.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
function pdf_create($html, $filename = '')
|
||||
{
|
||||
// need to enable magic quotes for the
|
||||
$magic_quotes_enabled = get_magic_quotes_runtime();
|
||||
|
||||
if(!$magic_quotes_enabled)
|
||||
{
|
||||
ini_set('magic_quotes_runtime', TRUE);
|
||||
}
|
||||
|
||||
$dompdf = new Dompdf\Dompdf();
|
||||
$dompdf->loadHtml($html);
|
||||
$dompdf->render();
|
||||
|
||||
if(!$magic_quotes_enabled)
|
||||
{
|
||||
ini_set('magic_quotes_runtime', $magic_quotes_enabled);
|
||||
}
|
||||
|
||||
if($filename != '')
|
||||
{
|
||||
$dompdf->stream($filename . '.pdf');
|
||||
}
|
||||
else
|
||||
{
|
||||
return $dompdf->output();
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -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>
|
||||
|
||||
192
application/helpers/locale_helper.php
Normal file
192
application/helpers/locale_helper.php
Normal file
@@ -0,0 +1,192 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Currency locale
|
||||
*/
|
||||
|
||||
function current_language_code()
|
||||
{
|
||||
return get_instance()->config->item('language_code');
|
||||
}
|
||||
|
||||
function current_language()
|
||||
{
|
||||
return get_instance()->config->item('language');
|
||||
}
|
||||
|
||||
function currency_side()
|
||||
{
|
||||
$config = get_instance()->config;
|
||||
$fmt = new \NumberFormatter($config->item('number_locale'), \NumberFormatter::CURRENCY);
|
||||
$fmt->setSymbol(\NumberFormatter::CURRENCY_SYMBOL, $config->item('currency_symbol'));
|
||||
return !preg_match('/^¤/', $fmt->getPattern());
|
||||
}
|
||||
|
||||
function quantity_decimals()
|
||||
{
|
||||
$config = get_instance()->config;
|
||||
return $config->item('quantity_decimals') ? $config->item('quantity_decimals') : 0;
|
||||
}
|
||||
|
||||
function totals_decimals()
|
||||
{
|
||||
$config = get_instance()->config;
|
||||
return $config->item('currency_decimals') ? $config->item('currency_decimals') : 0;
|
||||
}
|
||||
|
||||
function to_currency($number)
|
||||
{
|
||||
return to_decimals($number, 'currency_decimals', \NumberFormatter::CURRENCY);
|
||||
}
|
||||
|
||||
function to_currency_no_money($number)
|
||||
{
|
||||
return to_decimals($number, 'currency_decimals');
|
||||
}
|
||||
|
||||
function to_tax_decimals($number)
|
||||
{
|
||||
// taxes that are NULL, '' or 0 don't need to be displayed
|
||||
// NOTE: do not remove this line otherwise the items edit form will show a tax with 0 and it will save it
|
||||
if(empty($number))
|
||||
{
|
||||
return $number;
|
||||
}
|
||||
|
||||
return to_decimals($number, 'tax_decimals');
|
||||
}
|
||||
|
||||
function to_quantity_decimals($number)
|
||||
{
|
||||
return to_decimals($number, 'quantity_decimals');
|
||||
}
|
||||
|
||||
function to_decimals($number, $decimals, $type=\NumberFormatter::DECIMAL)
|
||||
{
|
||||
// ignore empty strings and return
|
||||
// NOTE: do not change it to empty otherwise tables will show a 0 with no decimal nor currency symbol
|
||||
if(!isset($number))
|
||||
{
|
||||
return $number;
|
||||
}
|
||||
|
||||
$config = get_instance()->config;
|
||||
$fmt = new \NumberFormatter($config->item('number_locale'), $type);
|
||||
$fmt->setAttribute(\NumberFormatter::MIN_FRACTION_DIGITS, $config->item($decimals));
|
||||
$fmt->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, $config->item($decimals));
|
||||
if (empty($config->item('thousands_separator')))
|
||||
{
|
||||
$fmt->setAttribute(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL, '');
|
||||
}
|
||||
$fmt->setSymbol(\NumberFormatter::CURRENCY_SYMBOL, $config->item('currency_symbol'));
|
||||
return $fmt->format($number);
|
||||
}
|
||||
|
||||
function parse_decimals($number)
|
||||
{
|
||||
// ignore empty strings and return
|
||||
if(empty($number))
|
||||
{
|
||||
return $number;
|
||||
}
|
||||
|
||||
$config = get_instance()->config;
|
||||
$fmt = new \NumberFormatter( $config->item('number_locale'), \NumberFormatter::DECIMAL );
|
||||
if (empty($config->item('thousands_separator')))
|
||||
{
|
||||
$fmt->setAttribute(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL, '');
|
||||
}
|
||||
return $fmt->parse($number);
|
||||
}
|
||||
|
||||
/*
|
||||
* Time locale conversion utility
|
||||
*/
|
||||
|
||||
function dateformat_momentjs($php_format)
|
||||
{
|
||||
$SYMBOLS_MATCHING = array(
|
||||
'd' => 'DD',
|
||||
'D' => 'ddd',
|
||||
'j' => 'D',
|
||||
'l' => 'dddd',
|
||||
'N' => 'E',
|
||||
'S' => 'o',
|
||||
'w' => 'e',
|
||||
'z' => 'DDD',
|
||||
'W' => 'W',
|
||||
'F' => 'MMMM',
|
||||
'm' => 'MM',
|
||||
'M' => 'MMM',
|
||||
'n' => 'M',
|
||||
't' => '', // no equivalent
|
||||
'L' => '', // no equivalent
|
||||
'o' => 'YYYY',
|
||||
'Y' => 'YYYY',
|
||||
'y' => 'YY',
|
||||
'a' => 'a',
|
||||
'A' => 'A',
|
||||
'B' => '', // no equivalent
|
||||
'g' => 'h',
|
||||
'G' => 'H',
|
||||
'h' => 'hh',
|
||||
'H' => 'HH',
|
||||
'i' => 'mm',
|
||||
's' => 'ss',
|
||||
'u' => 'SSS',
|
||||
'e' => 'zz', // deprecated since version $1.6.0 of moment.js
|
||||
'I' => '', // no equivalent
|
||||
'O' => '', // no equivalent
|
||||
'P' => '', // no equivalent
|
||||
'T' => '', // no equivalent
|
||||
'Z' => '', // no equivalent
|
||||
'c' => '', // no equivalent
|
||||
'r' => '', // no equivalent
|
||||
'U' => 'X'
|
||||
);
|
||||
|
||||
return strtr($php_format, $SYMBOLS_MATCHING);
|
||||
}
|
||||
|
||||
function dateformat_bootstrap($php_format)
|
||||
{
|
||||
$SYMBOLS_MATCHING = array(
|
||||
// Day
|
||||
'd' => 'dd',
|
||||
'D' => 'd',
|
||||
'j' => 'd',
|
||||
'l' => 'dd',
|
||||
'N' => '',
|
||||
'S' => '',
|
||||
'w' => '',
|
||||
'z' => '',
|
||||
// Week
|
||||
'W' => '',
|
||||
// Month
|
||||
'F' => 'MM',
|
||||
'm' => 'mm',
|
||||
'M' => 'M',
|
||||
'n' => 'm',
|
||||
't' => '',
|
||||
// Year
|
||||
'L' => '',
|
||||
'o' => '',
|
||||
'Y' => 'yyyy',
|
||||
'y' => 'yy',
|
||||
// Time
|
||||
'a' => 'p',
|
||||
'A' => 'P',
|
||||
'B' => '',
|
||||
'g' => 'H',
|
||||
'G' => 'h',
|
||||
'h' => 'HH',
|
||||
'H' => 'hh',
|
||||
'i' => 'ii',
|
||||
's' => 'ss',
|
||||
'u' => ''
|
||||
);
|
||||
|
||||
return strtr($php_format, $SYMBOLS_MATCHING);
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,87 +1,30 @@
|
||||
<?php
|
||||
function get_simple_date_ranges()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI->load->language('reports');
|
||||
$today = date('Y-m-d');
|
||||
$yesterday = date('Y-m-d', mktime(0,0,0,date("m"),date("d")-1,date("Y")));
|
||||
$six_days_ago = date('Y-m-d', mktime(0,0,0,date("m"),date("d")-6,date("Y")));
|
||||
$start_of_this_month = date('Y-m-d', mktime(0,0,0,date("m"),1,date("Y")));
|
||||
$end_of_this_month = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00'))));
|
||||
$start_of_last_month = date('Y-m-d', mktime(0,0,0,date("m")-1,1,date("Y")));
|
||||
$end_of_last_month = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime((date('m') - 1).'/01/'.date('Y').' 00:00:00'))));
|
||||
$start_of_this_year = date('Y-m-d', mktime(0,0,0,1,1,date("Y")));
|
||||
$end_of_this_year = date('Y-m-d', mktime(0,0,0,12,31,date("Y")));
|
||||
$start_of_last_year = date('Y-m-d', mktime(0,0,0,1,1,date("Y")-1));
|
||||
$end_of_last_year = date('Y-m-d', mktime(0,0,0,12,31,date("Y")-1));
|
||||
$start_of_time = date('Y-m-d', 0);
|
||||
|
||||
return array(
|
||||
$today. '/' . $today => $CI->lang->line('reports_today'),
|
||||
$yesterday. '/' . $yesterday => $CI->lang->line('reports_yesterday'),
|
||||
$six_days_ago. '/' . $today => $CI->lang->line('reports_last_7'),
|
||||
$start_of_this_month . '/' . $end_of_this_month => $CI->lang->line('reports_this_month'),
|
||||
$start_of_last_month . '/' . $end_of_last_month => $CI->lang->line('reports_last_month'),
|
||||
$start_of_this_year . '/' . $end_of_this_year => $CI->lang->line('reports_this_year'),
|
||||
$start_of_last_year . '/' . $end_of_last_year => $CI->lang->line('reports_last_year'),
|
||||
$start_of_time . '/' . $today => $CI->lang->line('reports_all_time'),
|
||||
);
|
||||
}
|
||||
|
||||
function get_months()
|
||||
function show_report_if_allowed($report_prefix, $report_name, $person_id, $permission_id = '')
|
||||
{
|
||||
$months = array();
|
||||
for($k=1;$k<=12;$k++)
|
||||
$CI =& get_instance();
|
||||
|
||||
$permission_id = empty($permission_id) ? 'reports_' . $report_name : $permission_id;
|
||||
if($CI->Employee->has_grant($permission_id, $person_id))
|
||||
{
|
||||
$cur_month = mktime(0, 0, 0, $k, 1, 2000);
|
||||
$months[date("m", $cur_month)] = date("M",$cur_month);
|
||||
show_report($report_prefix, $report_name, $permission_id);
|
||||
}
|
||||
|
||||
return $months;
|
||||
}
|
||||
|
||||
function get_days()
|
||||
function show_report($report_prefix, $report_name, $lang_key='')
|
||||
{
|
||||
$days = array();
|
||||
|
||||
for($k=1;$k<=31;$k++)
|
||||
$CI =& get_instance();
|
||||
|
||||
$lang_key = empty($lang_key) ? $report_name : $lang_key;
|
||||
$report_label = $CI->lang->line($lang_key);
|
||||
$report_prefix = empty($report_prefix) ? '' : $report_prefix . '_';
|
||||
// no summary nor detailed reports for receivings
|
||||
if(!empty($report_label) && $report_label != $lang_key . ' (TBD)')
|
||||
{
|
||||
$cur_day = mktime(0, 0, 0, 1, $k, 2000);
|
||||
$days[date('d',$cur_day)] = date('j',$cur_day);
|
||||
?>
|
||||
<a class="list-group-item" href="<?php echo site_url('reports/' . $report_prefix . preg_replace('/reports_(.*)/', '$1', $report_name));?>"><?php echo $report_label; ?></a>
|
||||
<?php
|
||||
}
|
||||
|
||||
return $days;
|
||||
}
|
||||
|
||||
function get_years()
|
||||
{
|
||||
$years = array();
|
||||
for($k=0;$k<10;$k++)
|
||||
{
|
||||
$years[date("Y")-$k] = date("Y")-$k;
|
||||
}
|
||||
|
||||
return $years;
|
||||
}
|
||||
|
||||
function get_random_colors($how_many)
|
||||
{
|
||||
$colors = array();
|
||||
|
||||
for($k=0;$k<$how_many;$k++)
|
||||
{
|
||||
$colors[] = '#'.random_color();
|
||||
}
|
||||
|
||||
return $colors;
|
||||
}
|
||||
|
||||
function random_color()
|
||||
{
|
||||
mt_srand((double)microtime()*1000000);
|
||||
$c = '';
|
||||
while(strlen($c)<6){
|
||||
$c .= sprintf("%02X", mt_rand(0, 255));
|
||||
}
|
||||
return $c;
|
||||
}
|
||||
?>
|
||||
@@ -1,364 +1,355 @@
|
||||
<?php
|
||||
/*
|
||||
Gets the html table to manage people.
|
||||
*/
|
||||
function get_people_manage_table($people,$controller)
|
||||
|
||||
function get_sales_manage_table_headers()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('common_last_name'),
|
||||
$CI->lang->line('common_first_name'),
|
||||
$CI->lang->line('common_email'),
|
||||
$CI->lang->line('common_phone_number'),
|
||||
' ');
|
||||
|
||||
$table.='<thead><tr>';
|
||||
foreach($headers as $header)
|
||||
{
|
||||
$table.="<th>$header</th>";
|
||||
}
|
||||
$table.='</tr></thead><tbody>';
|
||||
$table.=get_people_manage_table_data_rows($people,$controller);
|
||||
$table.='</tbody></table>';
|
||||
return $table;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html data rows for the people.
|
||||
*/
|
||||
function get_people_manage_table_data_rows($people,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table_data_rows='';
|
||||
|
||||
foreach($people->result() as $person)
|
||||
{
|
||||
$table_data_rows.=get_person_data_row($person,$controller);
|
||||
}
|
||||
|
||||
if($people->num_rows()==0)
|
||||
{
|
||||
$table_data_rows.="<tr><td colspan='6'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('common_no_persons_to_display')."</div></td></tr>";
|
||||
}
|
||||
|
||||
return $table_data_rows;
|
||||
}
|
||||
|
||||
function get_person_data_row($person,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$width = $controller->get_form_width();
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='5%'><input type='checkbox' id='person_$person->person_id' value='".$person->person_id."'/></td>";
|
||||
$table_data_row.='<td width="20%">'.character_limiter($person->last_name,13).'</td>';
|
||||
$table_data_row.='<td width="20%">'.character_limiter($person->first_name,13).'</td>';
|
||||
$table_data_row.='<td width="30%">'.mailto($person->email,character_limiter($person->email,22)).'</td>';
|
||||
$table_data_row.='<td width="20%">'.character_limiter($person->phone_number,13).'</td>';
|
||||
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$person->person_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
|
||||
$table_data_row.='</tr>';
|
||||
|
||||
return $table_data_row;
|
||||
}
|
||||
|
||||
function get_detailed_sales_data_row($sale, $controller)
|
||||
{
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.='<td><a href="#" class="expand">+</a></td>';
|
||||
foreach($sale as $cell)
|
||||
{
|
||||
$table_data_row.='<td>';
|
||||
$table_data_row.=$cell;
|
||||
$table_data_row.='</td>';
|
||||
}
|
||||
$table_data_row.='</tr>';
|
||||
return $table_data_row;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html table to manage suppliers.
|
||||
*/
|
||||
function get_supplier_manage_table($suppliers,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('suppliers_company_name'),
|
||||
$CI->lang->line('common_last_name'),
|
||||
$CI->lang->line('common_first_name'),
|
||||
$CI->lang->line('common_email'),
|
||||
$CI->lang->line('common_phone_number'),
|
||||
' ');
|
||||
|
||||
$table.='<thead><tr>';
|
||||
foreach($headers as $header)
|
||||
{
|
||||
$table.="<th>$header</th>";
|
||||
}
|
||||
$table.='</tr></thead><tbody>';
|
||||
$table.=get_supplier_manage_table_data_rows($suppliers,$controller);
|
||||
$table.='</tbody></table>';
|
||||
return $table;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html data rows for the supplier.
|
||||
*/
|
||||
function get_supplier_manage_table_data_rows($suppliers,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table_data_rows='';
|
||||
|
||||
foreach($suppliers->result() as $supplier)
|
||||
{
|
||||
$table_data_rows.=get_supplier_data_row($supplier,$controller);
|
||||
}
|
||||
|
||||
if($suppliers->num_rows()==0)
|
||||
{
|
||||
$table_data_rows.="<tr><td colspan='7'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('common_no_persons_to_display')."</div></tr></tr>";
|
||||
}
|
||||
|
||||
return $table_data_rows;
|
||||
}
|
||||
|
||||
function get_supplier_data_row($supplier,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$width = $controller->get_form_width();
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='5%'><input type='checkbox' id='person_$supplier->person_id' value='".$supplier->person_id."'/></td>";
|
||||
$table_data_row.='<td width="17%">'.character_limiter($supplier->company_name,13).'</td>';
|
||||
$table_data_row.='<td width="17%">'.character_limiter($supplier->last_name,13).'</td>';
|
||||
$table_data_row.='<td width="17%">'.character_limiter($supplier->first_name,13).'</td>';
|
||||
$table_data_row.='<td width="22%">'.mailto($supplier->email,character_limiter($supplier->email,22)).'</td>';
|
||||
$table_data_row.='<td width="17%">'.character_limiter($supplier->phone_number,13).'</td>';
|
||||
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$supplier->person_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
|
||||
$table_data_row.='</tr>';
|
||||
|
||||
return $table_data_row;
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html table to manage items.
|
||||
*/
|
||||
function get_items_manage_table($items,$controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('items_item_number'),
|
||||
$CI->lang->line('items_name'),
|
||||
$CI->lang->line('items_category'),
|
||||
$CI->lang->line('items_cost_price'),
|
||||
$CI->lang->line('items_unit_price'),
|
||||
$CI->lang->line('items_tax_percents'),
|
||||
$CI->lang->line('items_quantity'),
|
||||
' ',
|
||||
$CI->lang->line('items_inventory')
|
||||
$headers = array(
|
||||
array('sale_id' => $CI->lang->line('common_id')),
|
||||
array('sale_time' => $CI->lang->line('sales_sale_time')),
|
||||
array('customer_name' => $CI->lang->line('customers_customer')),
|
||||
array('amount_tendered' => $CI->lang->line('sales_amount_tendered')),
|
||||
array('amount_due' => $CI->lang->line('sales_amount_due')),
|
||||
array('change_due' => $CI->lang->line('sales_change_due')),
|
||||
array('payment_type' => $CI->lang->line('sales_payment_type'))
|
||||
);
|
||||
|
||||
$table.='<thead><tr>';
|
||||
foreach($headers as $header)
|
||||
if($CI->config->item('invoice_enable') == TRUE)
|
||||
{
|
||||
$table.="<th>$header</th>";
|
||||
$headers[] = array('invoice_number' => $CI->lang->line('sales_invoice_number'));
|
||||
$headers[] = array('invoice' => ' ', 'sortable' => FALSE);
|
||||
}
|
||||
$table.='</tr></thead><tbody>';
|
||||
$table.=get_items_manage_table_data_rows($items,$controller);
|
||||
$table.='</tbody></table>';
|
||||
return $table;
|
||||
|
||||
return transform_headers(array_merge($headers, array(array('receipt' => ' ', 'sortable' => FALSE))));
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html data rows for the items.
|
||||
*/
|
||||
function get_items_manage_table_data_rows($items,$controller)
|
||||
Gets the html data rows for the sales.
|
||||
*/
|
||||
function get_sale_data_last_row($sales, $controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table_data_rows='';
|
||||
|
||||
foreach($items->result() as $item)
|
||||
$table_data_rows = '';
|
||||
$sum_amount_tendered = 0;
|
||||
$sum_amount_due = 0;
|
||||
$sum_change_due = 0;
|
||||
|
||||
foreach($sales->result() as $key=>$sale)
|
||||
{
|
||||
$table_data_rows.=get_item_data_row($item,$controller);
|
||||
$sum_amount_tendered += $sale->amount_tendered;
|
||||
$sum_amount_due += $sale->amount_due;
|
||||
$sum_change_due += $sale->change_due;
|
||||
}
|
||||
|
||||
if($items->num_rows()==0)
|
||||
{
|
||||
$table_data_rows.="<tr><td colspan='11'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('items_no_items_to_display')."</div></tr></tr>";
|
||||
}
|
||||
|
||||
return $table_data_rows;
|
||||
|
||||
return array(
|
||||
'sale_id' => '-',
|
||||
'sale_time' => '<b>'.$CI->lang->line('sales_total').'</b>',
|
||||
'amount_tendered' => '<b>'. to_currency($sum_amount_tendered).'</b>',
|
||||
'amount_due' => '<b>'.to_currency($sum_amount_due).'</b>',
|
||||
'change_due' => '<b>'.to_currency($sum_change_due).'</b>'
|
||||
);
|
||||
}
|
||||
|
||||
function get_item_data_row($item,$controller)
|
||||
function get_sale_data_row($sale, $controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$item_tax_info=$CI->Item_taxes->get_info($item->item_id);
|
||||
$controller_name = $CI->uri->segment(1);
|
||||
|
||||
$row = array (
|
||||
'sale_id' => $sale->sale_id,
|
||||
'sale_time' => date( $CI->config->item('dateformat') . ' ' . $CI->config->item('timeformat'), strtotime($sale->sale_time) ),
|
||||
'customer_name' => $sale->customer_name,
|
||||
'amount_tendered' => to_currency($sale->amount_tendered),
|
||||
'amount_due' => to_currency($sale->amount_due),
|
||||
'change_due' => to_currency($sale->change_due),
|
||||
'payment_type' => $sale->payment_type
|
||||
);
|
||||
|
||||
if($CI->config->item('invoice_enable'))
|
||||
{
|
||||
$row['invoice_number'] = $sale->invoice_number;
|
||||
$row['invoice'] = empty($sale->invoice_number) ? '' : anchor($controller_name."/invoice/$sale->sale_id", '<span class="glyphicon glyphicon-list-alt"></span>',
|
||||
array('title'=>$CI->lang->line('sales_show_invoice'))
|
||||
);
|
||||
}
|
||||
|
||||
$row['receipt'] = anchor($controller_name."/receipt/$sale->sale_id", '<span class="glyphicon glyphicon-usd"></span>',
|
||||
array('title'=>$CI->lang->line('sales_show_receipt'))
|
||||
);
|
||||
$row['edit'] = anchor($controller_name."/edit/$sale->sale_id", '<span class="glyphicon glyphicon-edit"></span>',
|
||||
array('class'=>"modal-dlg print_hide", 'data-btn-delete' => $CI->lang->line('common_delete'), 'data-btn-submit' => $CI->lang->line('common_submit'), 'title' => $CI->lang->line($controller_name.'_update'))
|
||||
);
|
||||
|
||||
return $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->result_array() as $key=>$sale)
|
||||
{
|
||||
$amount -= $sale['change_due'];
|
||||
}
|
||||
}
|
||||
$table .= '<div class="summary_row">' . $payment['payment_type'] . ': ' . to_currency( $amount ) . '</div>';
|
||||
}
|
||||
$table .= '</div>';
|
||||
|
||||
return $table;
|
||||
}
|
||||
|
||||
function transform_headers_readonly($array)
|
||||
{
|
||||
$result = array();
|
||||
foreach($array as $key => $value)
|
||||
{
|
||||
$result[] = array('field' => $key, 'title' => $value, 'sortable' => $value != '', 'switchable' => !preg_match('(^$| )', $value));
|
||||
}
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
function transform_headers($array)
|
||||
{
|
||||
$result = array();
|
||||
$array = array_merge(array(array('checkbox' => 'select', 'sortable' => FALSE)),
|
||||
$array, array(array('edit' => '')));
|
||||
foreach($array as $element)
|
||||
{
|
||||
$result[] = array('field' => key($element),
|
||||
'title' => current($element),
|
||||
'switchable' => isset($element['switchable']) ?
|
||||
$element['switchable'] : !preg_match('(^$| )', current($element)),
|
||||
'sortable' => isset($element['sortable']) ?
|
||||
$element['sortable'] : current($element) != '',
|
||||
'checkbox' => isset($element['checkbox']) ?
|
||||
$element['checkbox'] : FALSE,
|
||||
'class' => isset($element['checkbox']) || preg_match('(^$| )', current($element)) ?
|
||||
'print_hide' : '');
|
||||
}
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
function get_people_manage_table_headers()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
|
||||
$headers = array(
|
||||
array('people.person_id' => $CI->lang->line('common_id')),
|
||||
array('last_name' => $CI->lang->line('common_last_name')),
|
||||
array('first_name' => $CI->lang->line('common_first_name')),
|
||||
array('email' => $CI->lang->line('common_email')),
|
||||
array('phone_number' => $CI->lang->line('common_phone_number'))
|
||||
);
|
||||
|
||||
if($CI->Employee->has_grant('messages', $CI->session->userdata('person_id')))
|
||||
{
|
||||
$headers[] = array('messages' => '', 'sortable' => FALSE);
|
||||
}
|
||||
|
||||
return transform_headers($headers);
|
||||
}
|
||||
|
||||
function get_person_data_row($person, $controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
|
||||
return array (
|
||||
'people.person_id' => $person->person_id,
|
||||
'last_name' => $person->last_name,
|
||||
'first_name' => $person->first_name,
|
||||
'email' => empty($person->email) ? '' : mailto($person->email, $person->email),
|
||||
'phone_number' => $person->phone_number,
|
||||
'messages' => empty($person->phone_number) ? '' : anchor("Messages/view/$person->person_id", '<span class="glyphicon glyphicon-phone"></span>',
|
||||
array('class'=>'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line('messages_sms_send'))),
|
||||
'edit' => anchor($controller_name."/view/$person->person_id", '<span class="glyphicon glyphicon-edit"></span>',
|
||||
array('class'=>'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line($controller_name.'_update'))
|
||||
));
|
||||
}
|
||||
|
||||
function get_suppliers_manage_table_headers()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
|
||||
$headers = array(
|
||||
array('people.person_id' => $CI->lang->line('common_id')),
|
||||
array('company_name' => $CI->lang->line('suppliers_company_name')),
|
||||
array('agency_name' => $CI->lang->line('suppliers_agency_name')),
|
||||
array('last_name' => $CI->lang->line('common_last_name')),
|
||||
array('first_name' => $CI->lang->line('common_first_name')),
|
||||
array('email' => $CI->lang->line('common_email')),
|
||||
array('phone_number' => $CI->lang->line('common_phone_number'))
|
||||
);
|
||||
|
||||
if($CI->Employee->has_grant('messages', $CI->session->userdata('person_id')))
|
||||
{
|
||||
$headers[] = array('messages' => '');
|
||||
}
|
||||
|
||||
return transform_headers($headers);
|
||||
}
|
||||
|
||||
function get_supplier_data_row($supplier, $controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
|
||||
return array (
|
||||
'people.person_id' => $supplier->person_id,
|
||||
'company_name' => $supplier->company_name,
|
||||
'agency_name' => $supplier->agency_name,
|
||||
'last_name' => $supplier->last_name,
|
||||
'first_name' => $supplier->first_name,
|
||||
'email' => empty($supplier->email) ? '' : mailto($supplier->email, $supplier->email),
|
||||
'phone_number' => $supplier->phone_number,
|
||||
'messages' => empty($supplier->phone_number) ? '' : anchor("Messages/view/$supplier->person_id", '<span class="glyphicon glyphicon-phone"></span>',
|
||||
array('class'=>"modal-dlg", 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line('messages_sms_send'))),
|
||||
'edit' => anchor($controller_name."/view/$supplier->person_id", '<span class="glyphicon glyphicon-edit"></span>',
|
||||
array('class'=>"modal-dlg", 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line($controller_name.'_update')))
|
||||
);
|
||||
}
|
||||
|
||||
function get_items_manage_table_headers()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
|
||||
$headers = array(
|
||||
array('items.item_id' => $CI->lang->line('common_id')),
|
||||
array('item_number' => $CI->lang->line('items_item_number')),
|
||||
array('name' => $CI->lang->line('items_name')),
|
||||
array('category' => $CI->lang->line('items_category')),
|
||||
array('company_name' => $CI->lang->line('suppliers_company_name')),
|
||||
array('cost_price' => $CI->lang->line('items_cost_price')),
|
||||
array('unit_price' => $CI->lang->line('items_unit_price')),
|
||||
array('quantity' => $CI->lang->line('items_quantity')),
|
||||
array('tax_percents' => $CI->lang->line('items_tax_percents'), 'sortable' => FALSE),
|
||||
array('item_pic' => $CI->lang->line('items_image'), 'sortable' => FALSE),
|
||||
array('inventory' => ''),
|
||||
array('stock' => '')
|
||||
);
|
||||
|
||||
return transform_headers($headers);
|
||||
}
|
||||
|
||||
function get_item_data_row($item, $controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$item_tax_info = $CI->Item_taxes->get_info($item->item_id);
|
||||
$tax_percents = '';
|
||||
foreach($item_tax_info as $tax_info)
|
||||
{
|
||||
$tax_percents.=$tax_info['percent']. '%, ';
|
||||
$tax_percents .= to_tax_decimals($tax_info['percent']) . '%, ';
|
||||
}
|
||||
$tax_percents=substr($tax_percents, 0, -2);
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$width = $controller->get_form_width();
|
||||
// remove ', ' from last item
|
||||
$tax_percents = substr($tax_percents, 0, -2);
|
||||
$controller_name = strtolower(get_class($CI));
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='3%'><input type='checkbox' id='item_$item->item_id' value='".$item->item_id."'/></td>";
|
||||
$table_data_row.='<td width="15%">'.$item->item_number.'</td>';
|
||||
$table_data_row.='<td width="20%">'.$item->name.'</td>';
|
||||
$table_data_row.='<td width="14%">'.$item->category.'</td>';
|
||||
$table_data_row.='<td width="14%">'.to_currency($item->cost_price).'</td>';
|
||||
$table_data_row.='<td width="14%">'.to_currency($item->unit_price).'</td>';
|
||||
$table_data_row.='<td width="14%">'.$tax_percents.'</td>';
|
||||
$table_data_row.='<td width="14%">'.$item->quantity.'</td>';
|
||||
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item->item_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
|
||||
|
||||
//Ramel Inventory Tracking
|
||||
$table_data_row.='<td width="10%">'.anchor($controller_name."/inventory/$item->item_id/width:$width", $CI->lang->line('common_inv'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_count')))./*'</td>';//inventory count
|
||||
$table_data_row.='<td width="5%">'*/' '.anchor($controller_name."/count_details/$item->item_id/width:$width", $CI->lang->line('common_det'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_details_count'))).'</td>';//inventory details
|
||||
|
||||
$table_data_row.='</tr>';
|
||||
return $table_data_row;
|
||||
$image = '';
|
||||
if ($item->pic_id != '')
|
||||
{
|
||||
$images = glob('./uploads/item_pics/' . $item->pic_id . '.*');
|
||||
if (sizeof($images) > 0)
|
||||
{
|
||||
$image .= '<a class="rollover" href="'. base_url($images[0]) .'"><img src="'.site_url('items/pic_thumb/'.$item->pic_id).'"></a>';
|
||||
}
|
||||
}
|
||||
|
||||
return array (
|
||||
'items.item_id' => $item->item_id,
|
||||
'item_number' => $item->item_number,
|
||||
'name' => $item->name,
|
||||
'category' => $item->category,
|
||||
'company_name' => $item->company_name,
|
||||
'cost_price' => to_currency($item->cost_price),
|
||||
'unit_price' => to_currency($item->unit_price),
|
||||
'quantity' => to_quantity_decimals($item->quantity),
|
||||
'tax_percents' => !$tax_percents ? '-' : $tax_percents,
|
||||
'item_pic' => $image,
|
||||
'inventory' => anchor($controller_name."/inventory/$item->item_id", '<span class="glyphicon glyphicon-pushpin"></span>',
|
||||
array('class' => 'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title' => $CI->lang->line($controller_name.'_count'))
|
||||
),
|
||||
'stock' => anchor($controller_name."/count_details/$item->item_id", '<span class="glyphicon glyphicon-list-alt"></span>',
|
||||
array('class' => 'modal-dlg', 'title' => $CI->lang->line($controller_name.'_details_count'))
|
||||
),
|
||||
'edit' => anchor($controller_name."/view/$item->item_id", '<span class="glyphicon glyphicon-edit"></span>',
|
||||
array('class' => 'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title' => $CI->lang->line($controller_name.'_update'))
|
||||
));
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html table to manage giftcards.
|
||||
*/
|
||||
function get_giftcards_manage_table( $giftcards, $controller )
|
||||
function get_giftcards_manage_table_headers()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('common_last_name'),
|
||||
$CI->lang->line('common_first_name'),
|
||||
$CI->lang->line('giftcards_giftcard_number'),
|
||||
$CI->lang->line('giftcards_card_value'),
|
||||
' ',
|
||||
|
||||
$headers = array(
|
||||
array('giftcard_id' => $CI->lang->line('common_id')),
|
||||
array('last_name' => $CI->lang->line('common_last_name')),
|
||||
array('first_name' => $CI->lang->line('common_first_name')),
|
||||
array('giftcard_number' => $CI->lang->line('giftcards_giftcard_number')),
|
||||
array('value' => $CI->lang->line('giftcards_card_value'))
|
||||
);
|
||||
|
||||
$table.='<thead><tr>';
|
||||
foreach($headers as $header)
|
||||
{
|
||||
$table.="<th>$header</th>";
|
||||
}
|
||||
$table.='</tr></thead><tbody>';
|
||||
$table.=get_giftcards_manage_table_data_rows( $giftcards, $controller );
|
||||
$table.='</tbody></table>';
|
||||
return $table;
|
||||
|
||||
return transform_headers($headers);
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html data rows for the giftcard.
|
||||
*/
|
||||
function get_giftcards_manage_table_data_rows( $giftcards, $controller )
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table_data_rows='';
|
||||
|
||||
foreach($giftcards->result() as $giftcard)
|
||||
{
|
||||
$table_data_rows.=get_giftcard_data_row( $giftcard, $controller );
|
||||
}
|
||||
|
||||
if($giftcards->num_rows()==0)
|
||||
{
|
||||
$table_data_rows.="<tr><td colspan='11'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('giftcards_no_giftcards_to_display')."</div></tr></tr>";
|
||||
}
|
||||
|
||||
return $table_data_rows;
|
||||
}
|
||||
|
||||
/** GARRISON MODIFIED 4/25/2013 **/
|
||||
function get_giftcard_data_row($giftcard,$controller)
|
||||
function get_giftcard_data_row($giftcard, $controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$width = $controller->get_form_width();
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='3%'><input type='checkbox' id='giftcard_$giftcard->giftcard_id' value='".$giftcard->giftcard_id."'/></td>";
|
||||
$table_data_row.='<td width="15%">'.$giftcard->last_name.'</td>';
|
||||
$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.='</tr>';
|
||||
return $table_data_row;
|
||||
return array (
|
||||
'giftcard_id' => $giftcard->giftcard_id,
|
||||
'last_name' => $giftcard->last_name,
|
||||
'first_name' => $giftcard->first_name,
|
||||
'giftcard_number' => $giftcard->giftcard_number,
|
||||
'value' => to_currency($giftcard->value),
|
||||
'edit' => anchor($controller_name."/view/$giftcard->giftcard_id", '<span class="glyphicon glyphicon-edit"></span>',
|
||||
array('class'=>'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line($controller_name.'_update'))
|
||||
));
|
||||
}
|
||||
/** END GARRISON MODIFIED **/
|
||||
|
||||
/*
|
||||
Gets the html table to manage item kits.
|
||||
*/
|
||||
function get_item_kits_manage_table( $item_kits, $controller )
|
||||
function get_item_kits_manage_table_headers()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
|
||||
$table='<table class="tablesorter" id="sortable_table">';
|
||||
|
||||
$headers = array('<input type="checkbox" id="select_all" />',
|
||||
$CI->lang->line('item_kits_name'),
|
||||
$CI->lang->line('item_kits_description'),
|
||||
' ',
|
||||
|
||||
$headers = array(
|
||||
array('item_kit_id' => $CI->lang->line('item_kits_kit')),
|
||||
array('name' => $CI->lang->line('item_kits_name')),
|
||||
array('description' => $CI->lang->line('item_kits_description')),
|
||||
array('cost_price' => $CI->lang->line('items_cost_price'), 'sortable' => FALSE),
|
||||
array('unit_price' => $CI->lang->line('items_unit_price'), 'sortable' => FALSE)
|
||||
);
|
||||
|
||||
$table.='<thead><tr>';
|
||||
foreach($headers as $header)
|
||||
{
|
||||
$table.="<th>$header</th>";
|
||||
}
|
||||
$table.='</tr></thead><tbody>';
|
||||
$table.=get_item_kits_manage_table_data_rows( $item_kits, $controller );
|
||||
$table.='</tbody></table>';
|
||||
return $table;
|
||||
|
||||
return transform_headers($headers);
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the html data rows for the item kits.
|
||||
*/
|
||||
function get_item_kits_manage_table_data_rows( $item_kits, $controller )
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$table_data_rows='';
|
||||
|
||||
foreach($item_kits->result() as $item_kit)
|
||||
{
|
||||
$table_data_rows.=get_item_kit_data_row( $item_kit, $controller );
|
||||
}
|
||||
|
||||
if($item_kits->num_rows()==0)
|
||||
{
|
||||
$table_data_rows.="<tr><td colspan='11'><div class='warning_message' style='padding:7px;'>".$CI->lang->line('item_kits_no_item_kits_to_display')."</div></tr></tr>";
|
||||
}
|
||||
|
||||
return $table_data_rows;
|
||||
}
|
||||
|
||||
function get_item_kit_data_row($item_kit,$controller)
|
||||
function get_item_kit_data_row($item_kit, $controller)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$controller_name=strtolower(get_class($CI));
|
||||
$width = $controller->get_form_width();
|
||||
|
||||
$table_data_row='<tr>';
|
||||
$table_data_row.="<td width='3%'><input type='checkbox' id='item_kit_$item_kit->item_kit_id' value='".$item_kit->item_kit_id."'/></td>";
|
||||
$table_data_row.='<td width="15%">'.$item_kit->name.'</td>';
|
||||
$table_data_row.='<td width="20%">'.character_limiter($item_kit->description, 25).'</td>';
|
||||
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item_kit->item_kit_id/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
|
||||
|
||||
$table_data_row.='</tr>';
|
||||
return $table_data_row;
|
||||
return array (
|
||||
'item_kit_id' => $item_kit->item_kit_id,
|
||||
'name' => $item_kit->name,
|
||||
'description' => $item_kit->description,
|
||||
'cost_price' => to_currency($item_kit->total_cost_price),
|
||||
'unit_price' => to_currency($item_kit->total_unit_price),
|
||||
'edit' => anchor($controller_name."/view/$item_kit->item_kit_id", '<span class="glyphicon glyphicon-edit"></span>',
|
||||
array('class'=>'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line($controller_name.'_update'))
|
||||
));
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -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,37 +3,56 @@
|
||||
function load_config()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
foreach( $CI->Appconfig->get_all()->result() as $app_config )
|
||||
{
|
||||
$CI->config->set_item( $app_config->key, $app_config->value );
|
||||
|
||||
foreach($CI->Appconfig->get_all()->result() as $app_config)
|
||||
{
|
||||
$CI->config->set_item($CI->security->xss_clean($app_config->key), $CI->security->xss_clean($app_config->value));
|
||||
}
|
||||
|
||||
//Set language from config database
|
||||
//Loads all the language files from the language directory
|
||||
|
||||
if ( $CI->config->item( 'language' ) )
|
||||
if(!empty(current_language()))
|
||||
{
|
||||
$CI->config->set_item( 'language', $CI->config->item( 'language' ) );
|
||||
|
||||
$map = directory_map('./application/language/' . $CI->config->item( 'language' ));
|
||||
|
||||
foreach($map as $file)
|
||||
// fallback to English if language folder does not exist
|
||||
if (!file_exists('../application/language/' . current_language_code()))
|
||||
{
|
||||
if ( substr(strrchr($file,'.'),1) == "php")
|
||||
{
|
||||
$CI->lang->load( str_replace( '_lang.php', '', $file ) );
|
||||
}
|
||||
$CI->config->set_item('language', 'english');
|
||||
$CI->config->set_item('language_code', 'en');
|
||||
}
|
||||
|
||||
load_language_files('../vendor/codeigniter/framework/system/language', current_language());
|
||||
load_language_files('../application/language', current_language_code());
|
||||
}
|
||||
|
||||
//Set timezone from config database
|
||||
if ( $CI->config->item( 'timezone' ) )
|
||||
if($CI->config->item('timezone'))
|
||||
{
|
||||
date_default_timezone_set( $CI->config->item( 'timezone' ) );
|
||||
date_default_timezone_set($CI->config->item('timezone'));
|
||||
}
|
||||
else
|
||||
{
|
||||
date_default_timezone_set( 'America/New_York' );
|
||||
date_default_timezone_set('America/New_York');
|
||||
}
|
||||
|
||||
bcscale(max(2, $CI->config->item('currency_decimals') + $CI->config->item('tax_decimals')));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $language
|
||||
* @param $CI
|
||||
*/
|
||||
function load_language_files($path, $language)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
|
||||
$map = directory_map($path . DIRECTORY_SEPARATOR . $language);
|
||||
|
||||
foreach($map as $file)
|
||||
{
|
||||
if(!is_array($file) && substr(strrchr($file, '.'), 1) == 'php')
|
||||
{
|
||||
$CI->lang->load(strtr($file, '', '_lang.php'), $language);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
56
application/hooks/load_stats.php
Normal file
56
application/hooks/load_stats.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
function load_stats()
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$line = $CI->lang->line('common_you_are_using_ospos');
|
||||
|
||||
if(count($CI->session->userdata('session_sha1')) == 0)
|
||||
{
|
||||
$footer_tags = file_get_contents(APPPATH . 'views/partial/footer.php');
|
||||
$d = preg_replace('/\$Id:\s.*?\s\$/', '$Id$', $footer_tags);
|
||||
$session_sha1 = sha1("blob " .strlen( $d ). "\0" . $d);
|
||||
$CI->session->set_userdata('session_sha1', substr($session_sha1, 0, 7));
|
||||
|
||||
preg_match('/\$Id:\s(.*?)\s\$/', $footer_tags, $matches);
|
||||
$needle = 'Open Source Point Of Sale';
|
||||
|
||||
if(!stristr($line, $needle) || $session_sha1 != $matches[1])
|
||||
{
|
||||
$CI->load->library('tracking_lib');
|
||||
|
||||
$footer = strip_tags($footer_tags) . ' | ' . $CI->Appconfig->get('company') . ' | ' . $CI->Appconfig->get('address') . ' | ' . $CI->Appconfig->get('email') . ' | ' . $CI->config->item('base_url') . ' | ' . $CI->Appconfig->get('website') . ' | ' . $CI->input->ip_address();
|
||||
$CI->tracking_lib->track_page('rogue/footer', 'rogue footer', $footer);
|
||||
$CI->tracking_lib->track_page('rogue/footer', 'rogue footer html', $footer_tags);
|
||||
|
||||
$login_footer = '';
|
||||
|
||||
if($handle = @fopen(APPPATH . 'views/login.php', 'r'))
|
||||
{
|
||||
while(!feof($handle))
|
||||
{
|
||||
$buffer = fgets($handle);
|
||||
if(strpos($buffer, $needle) !== FALSE)
|
||||
{
|
||||
$login_footer = '';
|
||||
}
|
||||
elseif(strpos($buffer, 'form_close') !== FALSE)
|
||||
{
|
||||
$login_footer = 'Footer: ';
|
||||
}
|
||||
elseif($login_footer != '')
|
||||
{
|
||||
$login_footer .= $buffer;
|
||||
}
|
||||
}
|
||||
|
||||
fclose($handle);
|
||||
}
|
||||
|
||||
if($login_footer != '')
|
||||
{
|
||||
$CI->tracking_lib->track_page('login', 'rogue login', $login_footer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
10
application/language/ar-EG/bootstrap_tables_lang.php
Normal file
10
application/language/ar-EG/bootstrap_tables_lang.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$lang["tables_loading"] = "جارى التحميل، برجاء الإنتظار";
|
||||
$lang["tables_rows_per_page"] = "{0} صف بالصفحة";
|
||||
$lang["tables_page_from_to"] = "عرض {0} إلى {1} من {2} صفوف";
|
||||
$lang["tables_hide_show_pagination"] = "عرض/إخفاء أرقام الصفحات";
|
||||
$lang["tables_refresh"] = "إعادة تحميل";
|
||||
$lang["tables_toggle"] = "تغيير";
|
||||
$lang["tables_columns"] = "أعمدة";
|
||||
$lang["tables_all"] = "الجميع";
|
||||
65
application/language/ar-EG/common_lang.php
Normal file
65
application/language/ar-EG/common_lang.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
$lang["common_address_1"] = "العنوان 1";
|
||||
$lang["common_address_2"] = "العنوان 2";
|
||||
$lang["common_city"] = "المدينة";
|
||||
$lang["common_close"] = "إغلاق";
|
||||
$lang["common_comments"] = "تعليقات";
|
||||
$lang["common_common"] = "عام";
|
||||
$lang["common_confirm_search"] = "لقد قمت اختيار أكتر من سجل، سوف تفقد هذه الاختيارات عند إرسال البحث، موافق؟";
|
||||
$lang["common_country"] = "البلد";
|
||||
$lang["common_date"] = "التاريخ";
|
||||
$lang["common_delete"] = "حذف";
|
||||
$lang["common_print"] = "طباعة";
|
||||
$lang["common_det"] = "تفاصيل";
|
||||
$lang["common_edit"] = "تحرير";
|
||||
$lang["common_email"] = "بريد إلكتروني";
|
||||
$lang["common_email_invalid_format"] = "شكل البريد الإلكتروني غير صحيح";
|
||||
$lang["common_fields_required_message"] = "الحقول التي بالأحمر مطلوبة";
|
||||
$lang["common_first_name"] = "الاسم الأول";
|
||||
$lang["common_first_name_required"] = "الاسم الأول مطلوب";
|
||||
$lang["common_first_page"] = "الأول";
|
||||
$lang["common_gender"] = "النوع";
|
||||
$lang["common_gender_female"] = "أنثى";
|
||||
$lang["common_gender_male"] = "ذكر";
|
||||
$lang["common_inv"] = "المخزن";
|
||||
$lang["common_last_name"] = "الاسم الأخير";
|
||||
$lang["common_last_name_required"] = "الاسم الأخير مطلوب";
|
||||
$lang["common_last_page"] = "الأخيرة";
|
||||
$lang["common_learn_about_project"] = "للتعرف على أخر المعلومات حول المشروع";
|
||||
$lang["common_list_of"] = "قائمة بـ";
|
||||
$lang["common_logout"] = "خروج";
|
||||
$lang["common_new"] = "جديد";
|
||||
$lang["common_no_persons_to_display"] = "لا يوجد اناس لعرضهم";
|
||||
$lang["common_none_selected_text"] = "لم يتم اختيار شيء";
|
||||
$lang["common_or"] = "أو";
|
||||
$lang["common_phone_number"] = "رقم التليفون";
|
||||
$lang["common_phone_number_required"] = "رقم التليفون مطلوب";
|
||||
$lang["common_please_visit_my"] = "برجاء زيارة";
|
||||
$lang["common_powered_by"] = "مدعوم بواسطة";
|
||||
$lang["common_price"] = "السعر";
|
||||
$lang["common_remove"] = "إزالة";
|
||||
$lang["common_return_policy"] = "سياسة الاسترجاع";
|
||||
$lang["common_search"] = "بحث";
|
||||
$lang["common_search_options"] = "خيارات البحث";
|
||||
$lang["common_searched_for"] = "بحث عن";
|
||||
$lang["common_state"] = "المحافظة";
|
||||
$lang["common_submit"] = "حفظ";
|
||||
$lang["common_view_recent_sales"] = "عرض أحدث المبيعات";
|
||||
$lang["common_website"] = "الموقع الإلكترونى";
|
||||
$lang["common_welcome"] = "مرحباً";
|
||||
$lang["common_welcome_message"] = "مرحباً فى OSPOS برجاء إختيار أى قسم للبدء";
|
||||
$lang["common_you_are_using_ospos"] = "أنت تستخدم إصدار Open Source Point Of Sale ";
|
||||
$lang["common_zip"] = "الرقم البريدى";
|
||||
$lang["common_import"] = "استيراد";
|
||||
$lang["common_download_import_template"] = "تنزيل قالب الاستيراد من اكسل (CSV)";
|
||||
$lang["common_import_excel"] = "استيراد من اكسل";
|
||||
$lang["common_import_full_path"] = "المسار الكامل لملف اكسل مطلوب";
|
||||
$lang["common_import_select_file"] = "اختار ملف";
|
||||
$lang["common_import_change_file"] = "تغيير";
|
||||
$lang["common_import_remove_file"] = "إزالة";
|
||||
$lang["common_export_excel"] = "تصدير إلى اكسل";
|
||||
$lang["common_export_excel_yes"] = "نعم";
|
||||
$lang["common_export_excel_no"] = "لا";
|
||||
$lang["common_required"] = "مطلوب";
|
||||
$lang["common_id"] = "كود";
|
||||
184
application/language/ar-EG/config_lang.php
Normal file
184
application/language/ar-EG/config_lang.php
Normal file
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
|
||||
$lang["config_address"] = "عنوان الشركة";
|
||||
$lang["config_address_required"] = "عنوان الشركة مطلوب";
|
||||
$lang["config_apostrophe"] = "الفاصلة";
|
||||
$lang["config_backup_button"] = "نسخ إحتياطى";
|
||||
$lang["config_backup_database"] = "نسخ إحتياطى لقاعدة البيانات";
|
||||
$lang["config_barcode"] = "باركود";
|
||||
$lang["config_barcode_company"] = "اسم الشركة";
|
||||
$lang["config_barcode_configuration"] = "اعدادات الباركود";
|
||||
$lang["config_barcode_content"] = "محتويات الباركود";
|
||||
$lang["config_barcode_first_row"] = "الصف 1";
|
||||
$lang["config_barcode_font"] = "الخط";
|
||||
$lang["config_barcode_height"] = "الارتفاع (px)";
|
||||
$lang["config_barcode_id"] = "كود/اسم الصنف";
|
||||
$lang["config_barcode_info"] = "معلومات اعدادات الباركود";
|
||||
$lang["config_barcode_layout"] = "تخطيط الباركود";
|
||||
$lang["config_barcode_name"] = "الاسم";
|
||||
$lang["config_barcode_number"] = "الباركود UPC/EAN/ISBN";
|
||||
$lang["config_barcode_number_in_row"] = "الرقم فى الصف";
|
||||
$lang["config_barcode_page_cellspacing"] = "المسافة بين الخلايا فى صفحة العرض";
|
||||
$lang["config_barcode_page_width"] = "عرض الصفحة";
|
||||
$lang["config_barcode_price"] = "السعر";
|
||||
$lang["config_barcode_quality"] = "الجودة (1-100)";
|
||||
$lang["config_barcode_second_row"] = "الصف 2";
|
||||
$lang["config_barcode_third_row"] = "الصف 3";
|
||||
$lang["config_barcode_type"] = "نوعية الباركود";
|
||||
$lang["config_barcode_width"] = "العرض (px)";
|
||||
$lang["config_barcode_generate_if_empty"] = "توليد اذا كان الباركود فارغ";
|
||||
$lang["config_bottom"] = "الأسفل";
|
||||
$lang["config_center"] = "الوسط";
|
||||
$lang["config_company"] = "اسم الشركة";
|
||||
$lang["config_company_logo"] = "شعار الشركة";
|
||||
$lang["config_company_select_image"] = "اختار صورة";
|
||||
$lang["config_company_change_image"] = "تغيير الصورة";
|
||||
$lang["config_company_remove_image"] = "إزالة الصورة";
|
||||
$lang["config_company_required"] = "اسم الشركة مطلوب";
|
||||
$lang["config_company_website_url"] = "الموقع الإلكترونى للشركة غير صحيح";
|
||||
$lang["config_comma"] = "فاصلة";
|
||||
$lang["config_country_codes"] = "أكواد الدولة";
|
||||
$lang["config_country_codes_tooltip"] = "قائمة مفصولة بفاصلة لاسماء الدول للبحث";
|
||||
$lang["config_currency_symbol"] = "رمز العملة";
|
||||
$lang["config_currency_decimals"] = "العلامة العشرية للعملة";
|
||||
$lang["config_custom1"] = "حقل مخصص 1";
|
||||
$lang["config_custom2"] = "حقل مخصص 2";
|
||||
$lang["config_custom3"] = "حقل مخصص 3";
|
||||
$lang["config_custom4"] = "حقل مخصص 4";
|
||||
$lang["config_custom5"] = "حقل مخصص 5";
|
||||
$lang["config_custom6"] = "حقل مخصص 6";
|
||||
$lang["config_custom7"] = "حقل مخصص 7";
|
||||
$lang["config_custom8"] = "حقل مخصص 8";
|
||||
$lang["config_custom9"] = "حقل مخصص 9";
|
||||
$lang["config_custom10"] = "حقل مخصص 10";
|
||||
$lang["config_datetimeformat"] = "شكل الوقت و التاريخ";
|
||||
$lang["config_decimal_point"] = "العلامة العشرية";
|
||||
$lang["config_default_barcode_font_size_number"] = "الحجم الافتراضي لخط الباركود لابد أن يكون رقم";
|
||||
$lang["config_default_barcode_font_size_required"] = "الحجم الافتراضي لخط الباركود مطلوب";
|
||||
$lang["config_default_barcode_height_number"] = "الارتفاع الافتراضي للباركود لابد ان يكون رقم";
|
||||
$lang["config_default_barcode_height_required"] = "الارتفاع الافتراضي للباركود مطلوب";
|
||||
$lang["config_default_barcode_num_in_row_number"] = "رقم الباركود فى اى سطر لابد ان يكون رقم";
|
||||
$lang["config_default_barcode_num_in_row_required"] = "رقم الباركود فى اى سطر مطلوب";
|
||||
$lang["config_default_barcode_page_cellspacing_number"] = "المسافة الافتراضية بين خلايا الباركود لابد أن تكون رقم";
|
||||
$lang["config_default_barcode_page_cellspacing_required"] = "المسافة الافتراضية بين خلايا الباركود مطلوبة";
|
||||
$lang["config_default_barcode_page_width_number"] = "عرض الصفحة الافتراضي للباركود لابد ان يكون رقم";
|
||||
$lang["config_default_barcode_page_width_required"] = "عرض الصفحة الافتراضي للباركود مطلوب";
|
||||
$lang["config_default_barcode_quality_number"] = "الجودة الافتراضية للباركود لابد ان تكون رقم";
|
||||
$lang["config_default_barcode_quality_required"] = "الجودة الافتراضية للباركود مطلوبة";
|
||||
$lang["config_default_barcode_width_number"] = "العرض الافتراضي للباركود لابد ان يكون رقم";
|
||||
$lang["config_default_barcode_width_required"] = "العرض الافتراضي للباركود مطلوب";
|
||||
$lang["config_default_sales_discount"] = "نسبة الخصم الافتراضية %";
|
||||
$lang["config_default_sales_discount_number"] = "نسبة الخصم الافتراضية لابد ان تكون رقم";
|
||||
$lang["config_default_sales_discount_required"] = "نسبة الخصم الافتراضية مطلوبة";
|
||||
$lang["config_default_tax_rate"] = "معدل الضريبة الافتراضي %";
|
||||
$lang["config_default_tax_rate_1"] = "معدل الضريبة 1";
|
||||
$lang["config_default_tax_rate_2"] = "معدل الضريبة 2";
|
||||
$lang["config_default_tax_rate_number"] = "معدل الضريبة الافتراضي يجب أن يكون رقم";
|
||||
$lang["config_default_tax_rate_required"] = "معدل الضريبة الافتراضي مطلوب";
|
||||
$lang["config_default_tax_name_required"] = "اسم الضريبة الافتراضية مطلوب";
|
||||
$lang["config_dot"] = "نقطة";
|
||||
$lang["config_email"] = "البريد الإلكتروني";
|
||||
$lang["config_email_configuration"] = "إعدادات البريد الإلكتروني";
|
||||
$lang["config_email_protocol"] = "بروتوكول";
|
||||
$lang["config_email_mailpath"] = "مسار ارسال البريد";
|
||||
$lang["config_email_smtp_host"] = "خادم SMTP";
|
||||
$lang["config_email_smtp_port"] = "رقم منفذ SMTP";
|
||||
$lang["config_email_smtp_crypto"] = "تشفير SMTP";
|
||||
$lang["config_email_smtp_timeout"] = "وقت فشل المحاولة (ثوانى) لـ SMTP";
|
||||
$lang["config_email_smtp_user"] = "اسم مستخدم SMTP";
|
||||
$lang["config_email_smtp_pass"] = "كلمة سر SMTP";
|
||||
$lang["config_fax"] = "الفاكس";
|
||||
$lang["config_general"] = "عام";
|
||||
$lang["config_general_configuration"] = "إعدادات عامة";
|
||||
$lang["config_info"] = "معلومات";
|
||||
$lang["config_info_configuration"] = "معلومات الشركة";
|
||||
$lang["config_invoice"] = "الفاتورة";
|
||||
$lang["config_invoice_configuration"] = "إعدادات طباعة الفاتورة";
|
||||
$lang["config_invoice_default_comments"] = "التعليق الافتراضي على الفاتورة";
|
||||
$lang["config_invoice_enable"] = "تفعيل الفوترة";
|
||||
$lang["config_invoice_email_message"] = "قالب البريد الإلكتروني للفاتورة";
|
||||
$lang["config_invoice_printer"] = "طابعة الفواتير";
|
||||
$lang["config_jsprintsetup_required"] = "تحذير! هذه الخاصية غير المفعلة سوف تعمل فقط مع وجود الاضافة jsPrintSetup على متصفح فايرفوكس. حفظ على أى حال؟";
|
||||
$lang["config_language"] = "اللغة";
|
||||
$lang["config_left"] = "يسار";
|
||||
$lang["config_license"] = "الرخصة";
|
||||
$lang["config_license_configuration"] = "نص الرخصة";
|
||||
$lang["config_lines_per_page"] = "عدد السطور فى الصفحة";
|
||||
$lang["config_lines_per_page_number"] = "عدد السطور فى الصفحة يجب أن يكون رقم";
|
||||
$lang["config_lines_per_page_required"] = "عدد السطور فى الصفحة مطلوب";
|
||||
$lang["config_locale"] = "إقليمية";
|
||||
$lang["config_locale_configuration"] = "الإعدادات الإقليمية";
|
||||
$lang["config_locale_info"] = "معلومات التهيئة الإقليمية";
|
||||
$lang["config_location"] = "المخزون";
|
||||
$lang["config_location_configuration"] = "أماكن المخزون";
|
||||
$lang["config_location_info"] = "معلومات تهيئة الأماكن";
|
||||
$lang["config_logout"] = "هل تريد عمل نسخة إحتياطية قبل الخروج؟ اضغط [نعم] لعمل النسخة أو [الغاء] للخروج";
|
||||
$lang["config_message"] = "الرسائل";
|
||||
$lang["config_message_configuration"] = "إعدادات الرسائل";
|
||||
$lang["config_msg_msg"] = "الرسائل النصية المحفوظة";
|
||||
$lang["config_msg_msg_placeholder"] = "إذا أردت إستخدام قالب للرسائل القصيرة احفظه هنا. عدا ذلك أترك هذا الحقل فارغ";
|
||||
$lang["config_msg_uid"] = "SMS-API اسم المستخدم لـ";
|
||||
$lang["config_msg_uid_required"] = "مطلوب SMS-API اسم المستخدم لـ";
|
||||
$lang["config_msg_pwd"] = "SMS-API كلمة السر لـ";
|
||||
$lang["config_msg_pwd_required"] = "مطلوب SMS-API كلمة السر لـ";
|
||||
$lang["config_msg_src"] = "SMS-API كود المرسل لـ";
|
||||
$lang["config_msg_src_required"] = "مطلوب SMS-API كود المرسل لـ";
|
||||
$lang["config_none"] = "لايوجد";
|
||||
$lang["config_notify_alignment"] = "مكان عرض رسائل المعلومات";
|
||||
$lang["config_number_format"] = "شكل الرقم";
|
||||
$lang["config_payment_options_order"] = "ترتيب خيارات الدفع";
|
||||
$lang["config_phone"] = "هاتف الشركة";
|
||||
$lang["config_phone_required"] = "هاتف الشركة مطلوب";
|
||||
$lang["config_print_bottom_margin"] = "الهامش السفلي";
|
||||
$lang["config_print_bottom_margin_number"] = "الهامش السفلي يجب أن يكون رقم";
|
||||
$lang["config_print_bottom_margin_required"] = "الهامش السفلي مطلوب";
|
||||
$lang["config_print_footer"] = "طباعة تذييل المتصفح";
|
||||
$lang["config_print_header"] = "طباعة ترويسة المتصفح";
|
||||
$lang["config_print_left_margin"] = "الهامش الأيسر";
|
||||
$lang["config_print_left_margin_number"] = "الهامش الأيسر يجب ان يكون رقم";
|
||||
$lang["config_print_left_margin_required"] = "الهامش الأيسر مطلوب";
|
||||
$lang["config_print_right_margin"] = "الهامش الأيمن";
|
||||
$lang["config_print_right_margin_number"] = "الهامش الأيمن يجب أن يكون رقم";
|
||||
$lang["config_print_right_margin_required"] = "الهامش الأيمن مطلوب";
|
||||
$lang["config_print_silently"] = "عرض صندوق حوار طباعة";
|
||||
$lang["config_print_top_margin"] = "الهامش العلوى";
|
||||
$lang["config_print_top_margin_number"] = "الهامش العلوى يجب أن يكون رقم";
|
||||
$lang["config_print_top_margin_required"] = "الهامش العلوى مطلوب";
|
||||
$lang["config_quantity_decimals"] = "العلامة العشرية للكمية";
|
||||
$lang["config_receipt"] = "الإيصال";
|
||||
$lang["config_receipt_configuration"] = "إعدادات طباعة الايصالات";
|
||||
$lang["config_receipt_info"] = "معلومات تهيئة الإيصالات";
|
||||
$lang["config_receipt_printer"] = "طابعة تذاكر";
|
||||
$lang["config_receipt_show_taxes"] = "عرض الضرائب";
|
||||
$lang["config_receipt_show_total_discount"] = "عرض إجمالى الخصم";
|
||||
$lang["config_receipt_show_description"] = "عرض الوصف";
|
||||
$lang["config_receipt_show_serialnumber"] = "عرض الرقم المسلسل";
|
||||
$lang["config_receipt_template"] = "قالب الايصال";
|
||||
$lang["config_receipt_default"] = "افتراضى";
|
||||
$lang["config_receipt_short"] = "مختصر";
|
||||
$lang["config_receiving_calculate_average_price"] = "حساب متوسط سعر الأصناف المستلمة";
|
||||
$lang["config_recv_invoice_format"] = "شكل فاتورة الإستلام";
|
||||
$lang["config_return_policy_required"] = "سياسة الإسترجاع مطلوب";
|
||||
$lang["config_right"] = "يمين";
|
||||
$lang["config_sales_invoice_format"] = "شكل فاتورة البيع";
|
||||
$lang["config_saved_successfully"] = "تم حفظ التهيئة بنجاح";
|
||||
$lang["config_saved_unsuccessfully"] = "لم يتم حفظ التهيئة بنجاح";
|
||||
$lang["config_statistics"] = "Send statistics";
|
||||
$lang["config_statistics_tooltip"] = "Send statistics for development and feature improvement purposes";
|
||||
$lang["config_stock_location"] = "مكان المخزون";
|
||||
$lang["config_stock_location_duplicate"] = "من فضلك إستخدم اسم مكان غير مكرر";
|
||||
$lang["config_stock_location_invalid_chars"] = "مكان المخزون لايمكن أن يحتوى على '_'";
|
||||
$lang["config_stock_location_required"] = "مكان المخزون مطلوب";
|
||||
$lang["config_takings_printer"] = "طابعة الإيراد";
|
||||
$lang["config_tax_decimals"] = "العلامة العشرية للضريبة";
|
||||
$lang["config_tax_included"] = "شامل الضريبة";
|
||||
$lang["config_thousands_separator"] = "فاصل الاف";
|
||||
$lang["config_timezone"] = "المنطقة الزمنية";
|
||||
$lang["config_top"] = "علوى";
|
||||
$lang["config_website"] = "موقع الشركة";
|
||||
$lang["config_number_locale"] = "التهيئة الاقليمية";
|
||||
$lang["config_return_policy_required"] = "سياسة الإسترجاع مطلوب";
|
||||
$lang["config_number_locale_required"] = "رقم التهيئة الإقليمية مطلوب";
|
||||
$lang["config_number_locale_invalid"] = "التهيئة الإقليمية المختارة غير صحية، راجع الرابط الموجود فى الملاحظة لاختيار تهيئة مناسبة";
|
||||
$lang["config_number_locale_tooltip"] = "إيجاد تهيئة إقليمية مناسبة عبر الرابط";
|
||||
$lang["config_theme"] = "السمة";
|
||||
24
application/language/ar-EG/customers_lang.php
Normal file
24
application/language/ar-EG/customers_lang.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
$lang["customers_account_number"] = "رقم الحساب";
|
||||
$lang["customers_account_number_duplicate"] = "رقم الحساب هذا موجود فى قاعدة البيانات من قبل";
|
||||
$lang["customers_cannot_be_deleted"] = "لايمكن حذف هؤلاء العملاء، أحدهم/كلهم مرتبط/مرتبطين بمبيعات";
|
||||
$lang["customers_company_name"] = "اسم الشركة";
|
||||
$lang["customers_confirm_delete"] = "هل تريد حذف هؤلاء العملاء حقاً؟";
|
||||
$lang["customers_customer"] = "العميل";
|
||||
$lang["customers_discount"] = "نسبة الخصم";
|
||||
$lang["customers_error_adding_updating"] = "خطاء فى إضافة أو تحديث العميل";
|
||||
$lang["customers_new"] = "عميل جديد";
|
||||
$lang["customers_none_selected"] = "لم تختار عملاء للحذف";
|
||||
$lang["customers_one_or_multiple"] = "عميل/عملاء";
|
||||
$lang["customers_successful_adding"] = "لقد أضفت عميل بنجاح";
|
||||
$lang["customers_successful_deleted"] = "لقد قمت بالحذف بنجاح";
|
||||
$lang["customers_successful_updating"] = "لقد قمت بتحديث بيانات العميل بنجاح";
|
||||
$lang["customers_taxable"] = "خاضع للضريبة";
|
||||
$lang["customers_total"] = "المجموع";
|
||||
$lang["customers_update"] = "تحديث بيانات عميل";
|
||||
$lang["customers_import_items_excel"] = "استيراد العملا ء من ورقة عمل اكسل";
|
||||
$lang["customers_excel_import_failed"] = "فشل الإستيراد من اكسل";
|
||||
$lang["customers_excel_import_nodata_wrongformat"] = "الملف الذى رفعته إما فارغ أو أنه مختلف البنية";
|
||||
$lang["customers_excel_import_success"] = "تم استيراد العملاء بنجاح";
|
||||
$lang["customers_excel_import_partially_failed"] = "تم استيراد معظم العملاء. البعض لم يتم استيرادهم ، وهذه هى القائمة";
|
||||
21
application/language/ar-EG/datepicker_lang.php
Normal file
21
application/language/ar-EG/datepicker_lang.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
$lang["datepicker_today"] = "اليوم";
|
||||
$lang["datepicker_weekstart"] = "0";
|
||||
$lang["datepicker_all_time"] = "جميع الأوقات";
|
||||
$lang["datepicker_last_7"] = "أخر سبعة أيام";
|
||||
$lang["datepicker_last_30"] = "أخر 30 يوم";
|
||||
$lang["datepicker_last_month"] = "أخر شهر";
|
||||
$lang["datepicker_last_year"] = "السنة الماضية";
|
||||
$lang["datepicker_this_month"] = "هذا الشهر";
|
||||
$lang["datepicker_this_month_last_year"] = "نفس الشهر من العام الماضي";
|
||||
$lang["datepicker_same_month_to_today"] = "هذا الشهر حتى اليوم";
|
||||
$lang["datepicker_same_month_to_same_day_last_year"] = "نفس الشهر حتى اليوم من السنة الماضية";
|
||||
$lang["datepicker_this_year"] = "السنة الحالية";
|
||||
$lang["datepicker_today_last_year"] = "نفس اليوم من السنة الماضية";
|
||||
$lang["datepicker_yesterday"] = "أمس";
|
||||
$lang["datepicker_apply"] = "تطبيق";
|
||||
$lang["datepicker_cancel"] = "إلغاء";
|
||||
$lang["datepicker_from"] = "من";
|
||||
$lang["datepicker_to"] = "إلى";
|
||||
$lang["datepicker_custom"] = "مخصص";
|
||||
28
application/language/ar-EG/employees_lang.php
Normal file
28
application/language/ar-EG/employees_lang.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
$lang["employees_basic_information"] = "المعلومات الأساسية للموظف";
|
||||
$lang["employees_cannot_be_deleted"] = "لايمكن حذف الموظفين ، واحد أو أكثر من المظفين قام بإجراء مبيعات :)";
|
||||
$lang["employees_confirm_delete"] = "هل أنت متأكد أنك تريد حذف الموظفين المختارين؟";
|
||||
$lang["employees_employee"] = "موظف";
|
||||
$lang["employees_error_adding_updating"] = "خطاء فى إضافة/تعديل موظف";
|
||||
$lang["employees_error_deleting_demo_admin"] = "لايمكن حذف المستخدم admin الخاص بنسخة العرض";
|
||||
$lang["employees_error_updating_demo_admin"] = "لايمكن تغيير بيانات المستخدم admin الخاص بنسخة العرض";
|
||||
$lang["employees_login_info"] = "معلومات دخول الموظف";
|
||||
$lang["employees_new"] = "موظف جديد";
|
||||
$lang["employees_none_selected"] = "لم تختار أى من الموظفين للحذف";
|
||||
$lang["employees_one_or_multiple"] = "موظف/موظفين";
|
||||
$lang["employees_password"] = "كلمة السر";
|
||||
$lang["employees_password_minlength"] = "كلمة السر يجب أن تكون 8 حروف على الأقل";
|
||||
$lang["employees_password_must_match"] = "كلمتى السر لا تتطابقان";
|
||||
$lang["employees_password_required"] = "كلمة السر مطلوبة";
|
||||
$lang["employees_permission_desc"] = "قم بإضافة الصلاحيات بلإختيار من الأسفل";
|
||||
$lang["employees_permission_info"] = "اذونات المستخدمين";
|
||||
$lang["employees_repeat_password"] = "كلمة السر مرة اخرى";
|
||||
$lang["employees_successful_adding"] = "لقد تم إضافة الموظف بنجاح";
|
||||
$lang["employees_successful_deleted"] = "لقد تم حذف الموظف بنجاح";
|
||||
$lang["employees_successful_updating"] = "لقد تم تحديث بيانات الموظف بنجاح";
|
||||
$lang["employees_update"] = "تحديث بيانات موظف";
|
||||
$lang["employees_username"] = "اسم المستخدم";
|
||||
$lang["employees_username_minlength"] = "اسم المستخدم يجب أن يكون 5 حروف على الأقل";
|
||||
$lang["employees_username_required"] = "اسم المستخدم مطلوب";
|
||||
$lang["employees_subpermission_required"] = "يجب إختيار صلاحية واحدة على الأقل لكل قسم";
|
||||
4
application/language/ar-EG/error_lang.php
Normal file
4
application/language/ar-EG/error_lang.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
$lang["error_no_permission_module"] = "ليس لديك صلاحيات للوصول لهذا القسم";
|
||||
$lang["error_unknown"] = "غير معروف";
|
||||
69
application/language/ar-EG/giftcards_lang.php
Normal file
69
application/language/ar-EG/giftcards_lang.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
$lang["giftcards_add_minus"] = "المخزن المضاف أو المطروح منه";
|
||||
$lang["giftcards_allow_alt_description"] = "السماح بوصف بديل";
|
||||
$lang["giftcards_amazon"] = "Amazon";
|
||||
$lang["giftcards_remaining_balance"] = "كارت الهدية %1 القيمة المتبقية منه %2!";
|
||||
$lang["giftcards_bulk_edit"] = "تحرير جماعى";
|
||||
$lang["giftcards_cannot_be_deleted"] = "لايمكن حذف بطاقات الهدية المختارة، واحد أو أكثر منها لديه مبيعات";
|
||||
$lang["giftcards_cannot_find_giftcard"] = "لايمكن إيجاد معلومات حول كارت الهدية";
|
||||
$lang["giftcards_card_value"] = "القيمة";
|
||||
$lang["giftcards_category"] = "الفئة";
|
||||
$lang["giftcards_change_all_to_allow_alt_desc"] = "السماح بوصف بديل للكل";
|
||||
$lang["giftcards_change_all_to_not_allow_allow_desc"] = "غير مسموح بوصف بديل للكل";
|
||||
$lang["giftcards_change_all_to_serialized"] = "تغيير الجميع لأرقام مسلسلة";
|
||||
$lang["giftcards_change_all_to_unserialized"] = "تغير الجميع لأرقام غير مسلسلة";
|
||||
$lang["giftcards_confirm_bulk_edit"] = "هل أنت متأكد انك تريد تحرير كل بطاقات الهدايا المختارة؟";
|
||||
$lang["giftcards_confirm_delete"] = "هل أنت متأكد انك تريد حذف كل بطاقات الهدايا المختارة؟";
|
||||
$lang["giftcards_cost_price"] = "سعر التكلفة";
|
||||
$lang["giftcards_count"] = "تحديث المخزون";
|
||||
$lang["giftcards_current_quantity"] = "الكميات الحالية";
|
||||
$lang["giftcards_description"] = "الوصف";
|
||||
$lang["giftcards_details_count"] = "حركة الكارت";
|
||||
$lang["giftcards_do_nothing"] = "لا تفعل شىء";
|
||||
$lang["giftcards_edit_fields_you_want_to_update"] = "قم بتحديث الحقول المراد تحديثها لكل بطاقات الهدايا المختارة";
|
||||
$lang["giftcards_edit_multiple_giftcards"] = "تحرير مجموعة من بطاقات الهدايا";
|
||||
$lang["giftcards_error_adding_updating"] = "خطاء فى إضافة/تحديث بطاقة هدية";
|
||||
$lang["giftcards_error_updating_multiple"] = "خطاء فى تحديث بيانات بطاقات الهدايا";
|
||||
$lang["giftcards_excel_import_failed"] = "فشل الإستيراد من اكسل";
|
||||
$lang["giftcards_generate_barcodes"] = "توليد أكواد الباركود";
|
||||
$lang["giftcards_giftcard"] = "بطاقة هدية";
|
||||
$lang["giftcards_giftcard_number"] = "رقم بطاقة الهدية";
|
||||
$lang["giftcards_info_provided_by"] = "المعلومات مقدمة بواسطة";
|
||||
$lang["giftcards_inventory_comments"] = "تعليقات";
|
||||
$lang["giftcards_is_serialized"] = "بطاقة الهدية لها رقم مسلسل";
|
||||
$lang["giftcards_low_inventory_giftcards"] = "مخزون قليل من بطاقات الهدايا";
|
||||
$lang["giftcards_manually_editing_of_quantity"] = "تحرير الكميات يدويا";
|
||||
$lang["giftcards_must_select_giftcard_for_barcode"] = "يجب إختيار بطاقة هدية واحدة على الأقل لتوليد أكواد الباركود";
|
||||
$lang["giftcards_new"] = "بطاقة هدية جديدة";
|
||||
$lang["giftcards_no_description_giftcards"] = "لايوجد وصف لبطاقات الهدايا";
|
||||
$lang["giftcards_no_giftcards_to_display"] = "لايوجد بطاقات هدايا لعرضها";
|
||||
$lang["giftcards_none"] = "لايوجد";
|
||||
$lang["giftcards_none_selected"] = "لم تقم بإختيار أى بطاقة هدية";
|
||||
$lang["giftcards_number"] = "رقم بطاقة الهدية يجب أن يكون رقم";
|
||||
$lang["giftcards_number_information"] = "رقم بطاقة الهدية";
|
||||
$lang["giftcards_number_required"] = "رقم بطاقة الهدية مطلوب";
|
||||
$lang["giftcards_one_or_multiple"] = "بطاقة/بطاقات الهدية";
|
||||
$lang["giftcards_person_id"] = "العميل";
|
||||
$lang["giftcards_quantity"] = "الكمية";
|
||||
$lang["giftcards_quantity_required"] = "الكمية مطلوبة";
|
||||
$lang["giftcards_reorder_level"] = "نقطة إعادة الطلب";
|
||||
$lang["giftcards_retrive_giftcard_info"] = "إسترجاع بيانات بطاقة هدية";
|
||||
$lang["giftcards_sales_tax_1"] = "ضريبة المبيعات";
|
||||
$lang["giftcards_sales_tax_2"] = "ضريبة المبيعات 2";
|
||||
$lang["giftcards_serialized_giftcards"] = "بطاقات هدايا مسلسلة";
|
||||
$lang["giftcards_successful_adding"] = "تم إضافة بطاقة هدية بنجاح";
|
||||
$lang["giftcards_successful_bulk_edit"] = "تم تحديث بطاقات الهدايا بنجاح";
|
||||
$lang["giftcards_successful_deleted"] = "تم الحذف بنجاح";
|
||||
$lang["giftcards_successful_updating"] = "تم تحديث بطاقة الهدية بنجاح";
|
||||
$lang["giftcards_supplier"] = "المورد";
|
||||
$lang["giftcards_tax_1"] = "الضريبة 1";
|
||||
$lang["giftcards_tax_2"] = "الضريبة 2";
|
||||
$lang["giftcards_tax_percent"] = "نسبة الضريبة";
|
||||
$lang["giftcards_tax_percents"] = "نسبة/نسب الضريبة";
|
||||
$lang["giftcards_unit_price"] = "سعر الوحدة";
|
||||
$lang["giftcards_upc_database"] = "UPC قاعدة بيانات";
|
||||
$lang["giftcards_update"] = "تحديث بطاقة هدية";
|
||||
$lang["giftcards_use_inventory_menu"] = "استخدام تحديث المخزن";
|
||||
$lang["giftcards_value"] = "قيمة بطاقة الهدية يجب ان تكون رقم";
|
||||
$lang["giftcards_value_required"] = "قيمة بطاقة الهدية مطلوبة";
|
||||
21
application/language/ar-EG/item_kits_lang.php
Normal file
21
application/language/ar-EG/item_kits_lang.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
$lang["item_kits_add_item"] = "إضافة مجموعة";
|
||||
$lang["item_kits_cannot_be_deleted"] = "لايمكن حذف مجموعة/مجموعات";
|
||||
$lang["item_kits_confirm_delete"] = "هل أنت متأكد أنك تريد حذف المجموعة؟";
|
||||
$lang["item_kits_description"] = "وصف المجموعة";
|
||||
$lang["item_kits_error_adding_updating"] = "خطاء فى إضافة/تحديث المجموعة";
|
||||
$lang["item_kits_info"] = "معلومات المجموعة";
|
||||
$lang["item_kits_item"] = "صنف";
|
||||
$lang["item_kits_items"] = "أصناف";
|
||||
$lang["item_kits_kit"] = "كود المجموعة";
|
||||
$lang["item_kits_name"] = "اسم المجموعة";
|
||||
$lang["item_kits_new"] = "مجموعة جديده";
|
||||
$lang["item_kits_no_item_kits_to_display"] = "لاتوجد مجموعات لعرضها";
|
||||
$lang["item_kits_none_selected"] = "لم تقم بإختيار مجموعات";
|
||||
$lang["item_kits_one_or_multiple"] = "مجموعة/مجموعات";
|
||||
$lang["item_kits_quantity"] = "الكمية";
|
||||
$lang["item_kits_successful_adding"] = "لقد تم إضافة المجموعة بنجاح";
|
||||
$lang["item_kits_successful_deleted"] = "لقد تم حذف المجموعة بنجاح";
|
||||
$lang["item_kits_successful_updating"] = "لقد تم تحديث بيانات المجموعة بنجاح";
|
||||
$lang["item_kits_update"] = "تحديث بيانات مجموعة";
|
||||
92
application/language/ar-EG/items_lang.php
Normal file
92
application/language/ar-EG/items_lang.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
$lang["items_add_minus"] = "الكمية المطلوب خصمها أو اضافتها";
|
||||
$lang["items_allow_alt_desciption"] = "وصف بديل";
|
||||
$lang["items_allow_alt_description"] = "السماح بوصف بديل";
|
||||
$lang["items_amazon"] = "Amazon";
|
||||
$lang["items_bulk_edit"] = "تحرير جماعى";
|
||||
$lang["items_buy_price_required"] = "سعر الشراء مطلوب";
|
||||
$lang["items_cannot_be_deleted"] = "لايمكن حذف الأصناف المختارة، واحد أو أكثر منها لديه مبيعات";
|
||||
$lang["items_cannot_find_item"] = "لايمكن ايجاد معلومات حول الصنف";
|
||||
$lang["items_category"] = "التصنيف";
|
||||
$lang["items_category_required"] = "التصنيف مطلوب";
|
||||
$lang["items_change_all_to_allow_alt_desc"] = "السماح بوصف بديل للجميع";
|
||||
$lang["items_change_all_to_not_allow_allow_desc"] = "عدم السماح بوصف بديل للجميع";
|
||||
$lang["items_change_all_to_serialized"] = "تغير الجميع لمتسلسل";
|
||||
$lang["items_change_all_to_unserialized"] = "تغيير الجميع لغير متسلسل";
|
||||
$lang["items_confirm_bulk_edit"] = "هل أنت متأكد انك تريد تحرير كل الأصناف المختارة؟";
|
||||
$lang["items_confirm_bulk_edit_wipe_taxes"] = "سوف يتم مسح معلومات الضرائب لجميع الأصناف";
|
||||
$lang["items_confirm_delete"] = "هل أنت متأكد انك تريد حذف كل الأصناف المختارة؟";
|
||||
$lang["items_cost_price"] = "سعر التكلفة";
|
||||
$lang["items_cost_price_number"] = "سعر التكلفة يجب أن يكون رقم";
|
||||
$lang["items_cost_price_required"] = "سعر التكلفة مطلوب";
|
||||
$lang["items_count"] = "تحديث المخزون";
|
||||
$lang["items_current_quantity"] = "الكمية الحالية";
|
||||
$lang["items_description"] = "الوصف";
|
||||
$lang["items_details_count"] = "حركة الصنف";
|
||||
$lang["items_do_nothing"] = "لاتفعل شئ";
|
||||
$lang["items_edit_fields_you_want_to_update"] = "قم بتحديث الحقول المراد تحديثها لكل الأصناف المختارة";
|
||||
$lang["items_edit_multiple_items"] = "تحريد مجموعة اصناف";
|
||||
$lang["items_error_adding_updating"] = "خطاء فى إضافة/تحديث صنف";
|
||||
$lang["items_error_updating_multiple"] = "خطاء فى تحديث بيانات أصناف";
|
||||
$lang["items_excel_import_failed"] = "فشل الإستيراد من اكسل";
|
||||
$lang["items_excel_import_nodata_wrongformat"] = "الملف الذى رفعته إما فارغ أو أنه مختلف البنية";
|
||||
$lang["items_excel_import_success"] = "تم استيراد الأصناف بنجاح";
|
||||
$lang["items_excel_import_partially_failed"] = "تم استيراد معظم الأصناف. البعض لم يتم استيرادهم ، وهذه هى القائمة";
|
||||
$lang["items_generate_barcodes"] = "توليد أكواد الباركود";
|
||||
$lang["items_image"] = "صورة";
|
||||
$lang["items_info_provided_by"] = "المعلومات مقدمة بواسطة";
|
||||
$lang["items_inventory"] = "المخزن";
|
||||
$lang["items_inventory_comments"] = "تعليقات";
|
||||
$lang["items_is_deleted"] = "حذفت";
|
||||
$lang["items_is_serialized"] = "الصنف له رقم مسلسل";
|
||||
$lang["items_item"] = "صنف";
|
||||
$lang["items_item_number"] = "الباركود UPC/EAN/ISBN";
|
||||
$lang["items_item_number_duplicate"] = "رقم الصنف موجود فى قاعدة البيانات من قبل";
|
||||
$lang["items_location"] = "مكان";
|
||||
$lang["items_empty_upc_items"] = "تفريغ اصناف UPC";
|
||||
$lang["items_low_inventory_items"] = "الأصناف التى لا يوجد لها مخزون";
|
||||
$lang["items_manually_editing_of_quantity"] = "تحرير الكمية يدوياً";
|
||||
$lang["items_name"] = "اسم الصنف";
|
||||
$lang["items_name_required"] = "اسم الصنف مطلوب";
|
||||
$lang["items_new"] = "صنف جديد";
|
||||
$lang["items_no_description_items"] = "الأصناف التى بلا وصف";
|
||||
$lang["items_no_items_to_display"] = "لايوجد أصناف لعرضها";
|
||||
$lang["items_none"] = "لاشىء";
|
||||
$lang["items_none_selected"] = "لم تختار أى أصناف لتحريرها";
|
||||
$lang["items_number_information"] = "رقم الصنف";
|
||||
$lang["items_number_required"] = "مطلوب UPC/EAN/ISBN رقم الباركود ";
|
||||
$lang["items_one_or_multiple"] = "صنف/أصناف";
|
||||
$lang["items_quantity"] = "الكمية";
|
||||
$lang["items_quantity_number"] = "الكمية يجب أن تكون رقم";
|
||||
$lang["items_quantity_required"] = "الكمية مطلوبة";
|
||||
$lang["items_receiving_quantity"] = "الكمية المستلمة";
|
||||
$lang["items_reorder_level"] = "نقطة إعادة الطلب";
|
||||
$lang["items_reorder_level_number"] = "نقطة إعادة الطلب يجب أن تكون رقم";
|
||||
$lang["items_reorder_level_required"] = "نقطة إعادة الطلب مطلوبة";
|
||||
$lang["items_retrive_item_info"] = "استرجاع بيانات الصنف";
|
||||
$lang["items_sales_tax_1"] = "ضريبة المبيعات";
|
||||
$lang["items_sales_tax_2"] = "ضريبة المبيعات 2";
|
||||
$lang["items_search_custom_items"] = "بحث الحقول المخصصة";
|
||||
$lang["items_serialized_items"] = "أصناف مسلسلة";
|
||||
$lang["items_stock_location"] = "مكان المخزون";
|
||||
$lang["items_successful_adding"] = "لقد تم إضافة صنف بنجاح";
|
||||
$lang["items_successful_bulk_edit"] = "لقد تم تحديث بيانات صنف/أصناف بنجاح";
|
||||
$lang["items_successful_deleted"] = "لقد تم الحذف بنجاح";
|
||||
$lang["items_successful_updating"] = "لقد تم تحديث بيانات صنف بنجاح";
|
||||
$lang["items_supplier"] = "المورد";
|
||||
$lang["items_tax_1"] = "الضريبة 1";
|
||||
$lang["items_tax_2"] = "الضريبة 2";
|
||||
$lang["items_tax_percent"] = "نسبة الضريبة";
|
||||
$lang["items_tax_percent_required"] = "نسبة الضريبة مطلوبة";
|
||||
$lang["items_tax_percents"] = "نسبة/نسب الضريبة";
|
||||
$lang["items_unit_price"] = "السعر";
|
||||
$lang["items_unit_price_number"] = "السعر يجب أن يكون رقم";
|
||||
$lang["items_unit_price_required"] = "السعر مطلوب";
|
||||
$lang["items_upc_database"] = "UPC قاعدة بيانات";
|
||||
$lang["items_update"] = "تحديث بيانات صنف";
|
||||
$lang["items_use_inventory_menu"] = "استخدام تحديث المخزن";
|
||||
$lang["items_import_items_excel"] = "استيراد من اكسل";
|
||||
$lang["items_select_image"] = "اختار صورة";
|
||||
$lang["items_change_image"] = "تغيير الصورة";
|
||||
$lang["items_remove_image"] = "ازالة الصورة";
|
||||
7
application/language/ar-EG/login_lang.php
Normal file
7
application/language/ar-EG/login_lang.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$lang["login_go"] = "البدء";
|
||||
$lang["login_invalid_username_and_password"] = "اسم مستخدم/كلمة سر غير صحيح";
|
||||
$lang["login_login"] = "دخول";
|
||||
$lang["login_password"] = "كلمة السر";
|
||||
$lang["login_username"] = "اسم المستخدم";
|
||||
14
application/language/ar-EG/messages_lang.php
Normal file
14
application/language/ar-EG/messages_lang.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
$lang["messages_sms_send"] = "إرسال SMS";
|
||||
$lang["messages_first_name"] = "الإسم الأول";
|
||||
$lang["messages_last_name"] = "الأسم الأخير";
|
||||
$lang["messages_phone"] = "رقم المحمول";
|
||||
$lang["messages_phone_placeholder"] = "رقم/أرقام المحمول هنا...";
|
||||
$lang["messages_phone_number_required"] = "رقم المحمول مطلوب";
|
||||
$lang["messages_message"] = "الرسالة";
|
||||
$lang["messages_message_placeholder"] = "رسالتك هنا...";
|
||||
$lang["messages_message_required"] = "الرسالة مطلوبة";
|
||||
$lang["messages_multiple_phones"] = " فى حالة إرسال الرسالة لأكثر من شخص قم بفصل الأرقام بعلامة الفاصلة";
|
||||
$lang["messages_successfully_sent"] = "تم إرسال الرسالة بنجاح إلى: ";
|
||||
$lang["messages_unsuccessfully_sent"] = "لم يتم إرسال الرسالة بنجاح إلى: ";
|
||||
25
application/language/ar-EG/module_lang.php
Normal file
25
application/language/ar-EG/module_lang.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
$lang["module_config"] = "إعدادات الشركة";
|
||||
$lang["module_config_desc"] = "تغيير إعدادات الشركة";
|
||||
$lang["module_customers"] = "العملاء";
|
||||
$lang["module_customers_desc"] = "إضافة، تحديث ، بحث و حذف العملاء";
|
||||
$lang["module_employees"] = "الموظفين";
|
||||
$lang["module_employees_desc"] = "إضافة، تحديث ، بحث و حذف الموظفين";
|
||||
$lang["module_giftcards"] = "بطاقات الهدايا";
|
||||
$lang["module_giftcards_desc"] = "إضافة، تحديث ، بحث و حذف بطاقات الهدايا";
|
||||
$lang["module_home"] = "الرئيسية";
|
||||
$lang["module_item_kits"] = "مجموعات الأصناف";
|
||||
$lang["module_item_kits_desc"] = "إضافة، تحديث ، بحث و حذف مجموعات الأصناف";
|
||||
$lang["module_items"] = "الأصناف";
|
||||
$lang["module_items_desc"] = "إضافة، تحديث ، بحث و حذف الأصناف";
|
||||
$lang["module_receivings"] = "استلام الأصناف";
|
||||
$lang["module_receivings_desc"] = "معالجة أوامر الشراء و استلام الأصناف";
|
||||
$lang["module_reports"] = "التقارير";
|
||||
$lang["module_reports_desc"] = "عرض وتوليد التقارير";
|
||||
$lang["module_sales"] = "المبيعات";
|
||||
$lang["module_sales_desc"] = "معالجة المبيعات و المرتجعات";
|
||||
$lang["module_suppliers"] = "الموردين";
|
||||
$lang["module_suppliers_desc"] = "إضافة، تحديث ، بحث و حذف مجموعات الموردين";
|
||||
$lang["module_messages"] = "الرسائل";
|
||||
$lang["module_messages_desc"] = "إرسال رسائل للعملاء ، الموردين او الموظفين";
|
||||
52
application/language/ar-EG/receivings_lang.php
Normal file
52
application/language/ar-EG/receivings_lang.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
$lang["receivings_transaction_failed"] = "حركات الإستلام فشلت";
|
||||
$lang["receivings_cancel_receiving"] = "إلغاء";
|
||||
$lang["receivings_cannot_be_deleted"] = "لايمكن حذف الإستلام/الإستلامات";
|
||||
$lang["receivings_comments"] = "تعليقات";
|
||||
$lang["receivings_complete_receiving"] = "إنهاء";
|
||||
$lang["receivings_confirm_cancel_receiving"] = "هل أنت متاكد أنك تريد إلغاء هذا الإستلام؟ سيتم حذف كل الأصناف.";
|
||||
$lang["receivings_confirm_finish_receiving"] = "هل أنت متاكد أنك تريد تنفيذ هذا الإستلام؟ لايمكن التراجع بعد الإرسال";
|
||||
$lang["receivings_cost"] = "التكلفة";
|
||||
$lang["receivings_date"] = "تاريخ الإستلام";
|
||||
$lang["receivings_date_required"] = "يجب إدخال تاريخ صحيح";
|
||||
$lang["receivings_date_type"] = "التاريخ مطلوب";
|
||||
$lang["receivings_confirm_delete"] = "هل أنت متاكد أنك تريد حذف هذا الإستلام؟ سيتم حذف كل الأصناف. لايمكن التراجع بعد الحذف";
|
||||
$lang["receivings_delete_entire_sale"] = "حذف عملية البيع بالكامل";
|
||||
$lang["receivings_discount"] = "نسبة الخصم";
|
||||
$lang["receivings_edit"] = "تحرير";
|
||||
$lang["receivings_edit_sale"] = "تحرير إستلام";
|
||||
$lang["receivings_employee"] = "الموظف";
|
||||
$lang["receivings_error_editing_item"] = "خطاء فى تحرير الصنف";
|
||||
$lang["receivings_error_requisition"] = "غير قادر على تحريك الصنف من و إلى نفس المكان";
|
||||
$lang["receivings_find_or_scan_item"] = "بحث/مسح باركود صنف";
|
||||
$lang["receivings_find_or_scan_item_or_receipt"] = "بحث/مسح باركود صنف أو إيصال";
|
||||
$lang["receivings_id"] = "كود الإستلام";
|
||||
$lang["receivings_reference"] = "رقم المرجع";
|
||||
$lang["receivings_item_name"] = "اسم الصنف";
|
||||
$lang["receivings_mode"] = "وضع الإستلام";
|
||||
$lang["receivings_new_supplier"] = "مورد جديد";
|
||||
$lang["receivings_one_or_multiple"] = "إستلام/إستلامات";
|
||||
$lang["receivings_print_after_sale"] = "طباعة بعد الإستلام";
|
||||
$lang["receivings_quantity"] = "الكمية";
|
||||
$lang["receivings_receipt"] = "إيصال إستلام";
|
||||
$lang["receivings_receipt_number"] = "كود الإستلام";
|
||||
$lang["receivings_receiving"] = "إستلام";
|
||||
$lang["receivings_register"] = "استلام الأصناف";
|
||||
$lang["receivings_requisition"] = "طلب شراء";
|
||||
$lang["receivings_return"] = "إرتجاع لمورد";
|
||||
$lang["receivings_select_supplier"] = "اختار المورد (اختيارى)";
|
||||
$lang["receivings_start_typing_supplier_name"] = "ابداء بكتابة اسم المورد....";
|
||||
$lang["receivings_stock_destination"] = "المخزون المحول له";
|
||||
$lang["receivings_stock_locaiton"] = "مكان المخزون";
|
||||
$lang["receivings_stock_source"] = "مصدر المخزون";
|
||||
$lang["receivings_successfully_deleted"] = "لقد تم الحذف";
|
||||
$lang["receivings_successfully_updated"] = "لقد تم التحديث";
|
||||
$lang["receivings_supplier"] = "المورد";
|
||||
$lang["receivings_supplier_email"] = "البريد الإلكتروني";
|
||||
$lang["receivings_supplier_address"] = "العنوان";
|
||||
$lang["receivings_supplier_location"] = "المكان";
|
||||
$lang["receivings_total"] = "الإجمالى";
|
||||
$lang["receivings_unable_to_add_item"] = "غير قادر على إضافة صنف للإستلام";
|
||||
$lang["receivings_unsuccessfully_updated"] = "لم يتم تحديث الإستلام بنجاح";
|
||||
$lang["receivings_update"] = "تحديث";
|
||||
97
application/language/ar-EG/reports_lang.php
Normal file
97
application/language/ar-EG/reports_lang.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
$lang["reports_all"] = "الكل";
|
||||
$lang["reports_categories"] = "التصنيفات";
|
||||
$lang["reports_categories_summary_report"] = "تقرير ملخص التصنيفات";
|
||||
$lang["reports_category"] = "تصنيف";
|
||||
$lang["reports_comments"] = "التعليقات";
|
||||
$lang["reports_count"] = "عدد";
|
||||
$lang["reports_customer"] = "عميل";
|
||||
$lang["reports_customers"] = "عملاء";
|
||||
$lang["reports_customers_summary_report"] = "تقرير ملخص العملاء";
|
||||
$lang["reports_date"] = "التاريخ";
|
||||
$lang["reports_date_range"] = "الفترة الزمنية";
|
||||
$lang["reports_description"] = "الوصف";
|
||||
$lang["reports_detailed_receivings_report"] = "تقرير مفصل لاستلام البضاعة";
|
||||
$lang["reports_detailed_reports"] = "التقارير التفصيلية";
|
||||
$lang["reports_detailed_requisition_report"] = "تقرير مفصل لطلبات الشراء";
|
||||
$lang["reports_detailed_sales_report"] = "تقرير مفصل للمبيعات";
|
||||
$lang["reports_discount"] = "الخصم";
|
||||
$lang["reports_discount_percent"] = "نسبة الخصم";
|
||||
$lang["reports_discounts"] = "الخصومات";
|
||||
$lang["reports_discounts_summary_report"] = "تقرير ملخص الخصومات";
|
||||
$lang["reports_employee"] = "موظف";
|
||||
$lang["reports_employees"] = "الموظفين";
|
||||
$lang["reports_employees_summary_report"] = "تقرير ملخص الموظفين";
|
||||
$lang["reports_graphical_reports"] = "تقارير رسومية";
|
||||
$lang["reports_inventory"] = "المخزن";
|
||||
$lang["reports_inventory_low"] = "نواقص المخزون";
|
||||
$lang["reports_inventory_low_report"] = "تقرير نواقص المخزون";
|
||||
$lang["reports_inventory_reports"] = "تقارير المخزن";
|
||||
$lang["reports_inventory_summary"] = "ملخص المخزن";
|
||||
$lang["reports_inventory_summary_report"] = "تقرير ملخص المخزن";
|
||||
$lang["reports_item"] = "صنف";
|
||||
$lang["reports_item_name"] = "اسم الصنف";
|
||||
$lang["reports_item_number"] = "رقم الصنف";
|
||||
$lang["reports_items"] = "الأصناف";
|
||||
$lang["reports_items_purchased"] = "الأصناف مشتراه";
|
||||
$lang["reports_items_received"] = "الأصناف مستلمة";
|
||||
$lang["reports_items_summary_report"] = "تقرير ملخص الأصناف";
|
||||
$lang["reports_low_inventory"] = "النواقص";
|
||||
$lang["reports_low_inventory_report"] = "تقرير نواقص المخزون";
|
||||
$lang["reports_name"] = "الاسم";
|
||||
$lang["reports_payment_type"] = "طريقة الدفع";
|
||||
$lang["reports_payments"] = "المدفوعات";
|
||||
$lang["reports_payments_summary_report"] = "ملخص المدفوعات";
|
||||
$lang["reports_profit"] = "الربح";
|
||||
$lang["reports_cost"] = "التكلفة";
|
||||
$lang["reports_quantity"] = "الكمية المشتراه";
|
||||
$lang["reports_quantity_purchased"] = "المستلم";
|
||||
$lang["reports_received_by"] = "مستلمة بواسطة";
|
||||
$lang["reports_receiving_id"] = "كود الاستلام";
|
||||
$lang["reports_receiving_type"] = "نوع الاستلام";
|
||||
$lang["reports_receivings"] = "استلام البضاعة";
|
||||
$lang["reports_reorder_level"] = "نقطة اعادة الطلب";
|
||||
$lang["reports_report"] = "تقرير";
|
||||
$lang["reports_report_input"] = "مدخلات التقرير";
|
||||
$lang["reports_reports"] = "تقارير";
|
||||
$lang["reports_requisition"] = "طلب الشراء";
|
||||
$lang["reports_requisition_by"] = "القائم بطلب الشراء";
|
||||
$lang["reports_requisition_id"] = "كود طلب الشراء";
|
||||
$lang["reports_requisition_item"] = "الصنف";
|
||||
$lang["reports_requisition_item_quantity"] = "الكمية المطلوبة";
|
||||
$lang["reports_requisition_related_item"] = "الصنف";
|
||||
$lang["reports_requisition_related_item_total_quantity"] = "إجمالى الكمية";
|
||||
$lang["reports_requisition_related_item_unit_quantity"] = "الكمية";
|
||||
$lang["reports_requisitions"] = "طلبات الشراء";
|
||||
$lang["reports_returns"] = "المرتجعات";
|
||||
$lang["reports_revenue"] = "العائد";
|
||||
$lang["reports_sale_id"] = "كود عملية البيع";
|
||||
$lang["reports_sale_type"] = "طريقة البيع";
|
||||
$lang["reports_sales"] = "بيع";
|
||||
$lang["reports_sales_amount"] = "كمية المبيعات";
|
||||
$lang["reports_sales_summary_report"] = "تقرير ملخص المبيعات";
|
||||
$lang["reports_serial_number"] = "مسلسل";
|
||||
$lang["reports_sold_by"] = "البائع";
|
||||
$lang["reports_sold_to"] = "مباع الى";
|
||||
$lang["reports_stock_location"] = "مكان المخزون";
|
||||
$lang["reports_subtotal"] = "المجموع الفرعى";
|
||||
$lang["reports_summary_reports"] = "تقارير ملخصة";
|
||||
$lang["reports_supplied_by"] = "مورده بواسطة";
|
||||
$lang["reports_supplier"] = "المورد";
|
||||
$lang["reports_suppliers"] = "الموردين";
|
||||
$lang["reports_suppliers_summary_report"] = "تقرير ملخص الموردين";
|
||||
$lang["reports_tax"] = "الضريبة";
|
||||
$lang["reports_tax_percent"] = "نسبة الضريبة";
|
||||
$lang["reports_taxes"] = "الضرائب";
|
||||
$lang["reports_taxes_summary_report"] = "تقرير ملخص الضرائب";
|
||||
$lang["reports_total"] = "الإجمالى";
|
||||
$lang["reports_type"] = "النوع";
|
||||
$lang["reports_item_count"] = "تصفية عداد الصنف";
|
||||
$lang["reports_cost_price"] = "سعر التكلفة";
|
||||
$lang["reports_unit_price"] = "السعر";
|
||||
$lang["reports_sub_total_value"] = "المجموع الفرعى";
|
||||
$lang["reports_total_inventory_value"] = "إجمالى قيمة المخزن";
|
||||
$lang["reports_zero_and_less"] = "صفر و أقل";
|
||||
$lang["reports_more_than_zero"] = "أكثر من صفر";
|
||||
$lang["reports_no_reports_to_display"] = "لايوجد أصناف لعرضها";
|
||||
123
application/language/ar-EG/sales_lang.php
Normal file
123
application/language/ar-EG/sales_lang.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
$lang["sales_add_payment"] = "إضافة دفع";
|
||||
$lang["sales_amount_due"] = "المبلغ المطلوب";
|
||||
$lang["sales_amount_tendered"] = "المبلغ المدفوع";
|
||||
$lang["sales_cancel_sale"] = "الغاء عملية البيع";
|
||||
$lang["sales_cash"] = "نقدى";
|
||||
$lang["sales_change_due"] = "الباقى";
|
||||
$lang["sales_check"] = "شيك";
|
||||
$lang["sales_check_balance"] = "تذكير بموعد الشيك";
|
||||
$lang["sales_comment"] = "تعليق";
|
||||
$lang["sales_comments"] = "تعليقات";
|
||||
$lang["sales_complete_sale"] = "إتمام البيع";
|
||||
$lang["sales_confirm_cancel_sale"] = "هل أنت متأكد من الغاء عملية البيع ؟ سيتم إزالة كل الأصناف";
|
||||
$lang["sales_confirm_delete"] = "هل تريد حذف عمليات البيع المختارة؟";
|
||||
$lang["sales_credit"] = "بطاقة إئتمانية";
|
||||
$lang["sales_customer"] = "العميل";
|
||||
$lang["sales_customer_email"] = "البريد الإلكترونى";
|
||||
$lang["sales_customer_address"] = "العنوان";
|
||||
$lang["sales_customer_location"] = "المكان";
|
||||
$lang["sales_customer_discount"] = "الخصم";
|
||||
$lang["sales_customer_total"] = "المجموع";
|
||||
$lang["sales_date"] = "تاريخ البيع";
|
||||
$lang["sales_date_required"] = "يجب إدخال تاريخ صحيح";
|
||||
$lang["sales_date_type"] = "التاريخ مطلوب";
|
||||
$lang["sales_debit"] = "بطاقة خصم";
|
||||
$lang["sales_delete_confirmation"] = "هل أنت متأكد أنك تريد حذف عملية البيع هذه؟ لايمكن التراجع بعد الحذف";
|
||||
$lang["sales_delete_entire_sale"] = "حذف عملية البيع بالكامل";
|
||||
$lang["sales_delete_successful"] = "لقد تم حذف عملية البيع بنجاح";
|
||||
$lang["sales_delete_unsuccessful"] = "لقد فشل حذف عملية البيع";
|
||||
$lang["sales_description_abbrv"] = "الوصف";
|
||||
$lang["sales_discount"] = "خصم %";
|
||||
$lang["sales_discount_included"] = "% خصم";
|
||||
$lang["sales_discount"] = "الخصم";
|
||||
$lang["sales_discount_short"] = "%";
|
||||
$lang["sales_edit"] = "تحرير";
|
||||
$lang["sales_edit_item"] = "تحرير صنف";
|
||||
$lang["sales_edit_sale"] = "تحرير عملية بيع";
|
||||
$lang["sales_email_receipt"] = "إرسال الايصال بالبريد الالكترونى";
|
||||
$lang["sales_employee"] = "الموظف";
|
||||
$lang["sales_error_editing_item"] = "خطاء فى تحرير الصنف";
|
||||
$lang["sales_find_or_scan_item"] = "بحث/مسح باركود صنف";
|
||||
$lang["sales_find_or_scan_item_or_receipt"] = "بحث/مسح باركود صنف أو ايصال";
|
||||
$lang["sales_giftcard"] = "بطاقة هدية";
|
||||
$lang["sales_giftcard_balance"] = "رصيد بطاقة الهدية";
|
||||
$lang["sales_giftcard_number"] = "رقم بطاقة الهدية";
|
||||
$lang["sales_id"] = "كود عملية البيع";
|
||||
$lang["sales_invoice"] = "فاتورة";
|
||||
$lang["sales_invoice_confirm"] = "هذه الفاتورة سوف ترسل إلى";
|
||||
$lang["sales_invoice_enable"] = "إنشاء فاتورة";
|
||||
$lang["sales_invoice_filter"] = "الفواتير";
|
||||
$lang["sales_cash_filter"] = "نقدى";
|
||||
$lang["sales_invoice_no_email"] = "هذا العميل ليس لدية بريد الكترونى صالح";
|
||||
$lang["sales_invoice_number"] = "فاتورة رقم #";
|
||||
$lang["sales_invoice_number_duplicate"] = "من فضلك أدخل رقم فاتورة غير مكرر";
|
||||
$lang["sales_invoice_sent"] = "تم إرسال الفاتورة إلى";
|
||||
$lang["sales_invoice_unsent"] = "فشل إرسال الفاتورة إلى";
|
||||
$lang["sales_invoice_update"] = "إعادة العد";
|
||||
$lang["sales_item_insufficient_of_stock"] = "لايوجد مخزون كافى من الصنف";
|
||||
$lang["sales_item_name"] = "اسم الصنف";
|
||||
$lang["sales_item_number"] = "صنف #";
|
||||
$lang["sales_item_out_of_stock"] = "لايوجد مخزون من الصنف";
|
||||
$lang["sales_mode"] = "وضع التسجيل";
|
||||
$lang["sales_must_enter_numeric"] = "يجب إدخال رقم للمبلغ الفعلى المدفوع";
|
||||
$lang["sales_must_enter_numeric_giftcard"] = "رقم بطاقة الهدية يجب أن يكون رقم";
|
||||
$lang["sales_new_customer"] = "عميل جديد";
|
||||
$lang["sales_new_item"] = "صنف جديد";
|
||||
$lang["sales_no_description"] = "لايوجد";
|
||||
$lang["sales_no_filter"] = "الكل";
|
||||
$lang["sales_no_items_in_cart"] = "لايوجد أصناف فى السلة";
|
||||
$lang["sales_no_sales_to_display"] = "لاتوجد عمليات بيع لعرضها";
|
||||
$lang["sales_one_or_multiple"] = "عمليات بيع";
|
||||
$lang["sales_takings"] = "الإيراد";
|
||||
$lang["sales_payment"] = "طريقة الدفع";
|
||||
$lang["sales_payment_amount"] = "المبلغ";
|
||||
$lang["sales_payment_not_cover_total"] = "المبلغ المدفوع لايغطى المبلغ الإجمالى";
|
||||
$lang["sales_payment_type"] = "طريقة";
|
||||
$lang["sales_payments_total"] = "إجمالى المدفوعات";
|
||||
$lang["sales_price"] = "السعر";
|
||||
$lang["sales_print_after_sale"] = "اطبع بعد عملية البيع";
|
||||
$lang["sales_quantity"] = "الكمية";
|
||||
$lang["sales_quantity_less_than_zero"] = "تحذير! الكمية المطلوبة غير كافية، بإمكانك إتمام عملية البيع ، لكن تحقق من مخزنك.";
|
||||
$lang["sales_quantity_less_than_reorder_level"] = "إيصال البيع";
|
||||
$lang["sales_receipt"] = "عملية بيع #";
|
||||
$lang["sales_receipt_number"] = "إيصال بيع";
|
||||
$lang["sales_receipt_sent"] = "تم إرسال الإيصال إلى";
|
||||
$lang["sales_receipt_unsent"] = "فشل إرسال الإيصال إلى";
|
||||
$lang["sales_register"] = "مسجل المبيعات";
|
||||
$lang["sales_remove_customer"] = "حذف عميل";
|
||||
$lang["sales_return"] = "إرتجاع";
|
||||
$lang["sales_sale"] = "بيع";
|
||||
$lang["sales_sale_for_customer"] = "العميل: ";
|
||||
$lang["sales_sale_time"] = "الوقت";
|
||||
$lang["sales_select_customer"] = "اختيار عميل (اختيارى)";
|
||||
$lang["sales_send_invoice"] = "إرسال الفاتورة";
|
||||
$lang["sales_send_receipt"] = "إرسال إيصال";
|
||||
$lang["sales_serial"] = "مسلسل";
|
||||
$lang["sales_show_invoice"] = "عرض الفاتورة";
|
||||
$lang["sales_show_receipt"] = "عرض الإيصال";
|
||||
$lang["sales_start_typing_customer_name"] = "ابداء بكتابة اسم العميل...";
|
||||
$lang["sales_start_typing_item_name"] = "ابداء بكتابة اسم أو مسح باركود الصنف";
|
||||
$lang["sales_stock_location"] = "مكان المخزون";
|
||||
$lang["sales_sub_total"] = "المجموع الفرعى";
|
||||
$lang["sales_successfully_deleted"] = "لقد تم الحذف بنجاح";
|
||||
$lang["sales_successfully_suspended_sale"] = "لقد تم تعليق عملية البيع بنجاح";
|
||||
$lang["sales_successfully_updated"] = "لقد تم تحديث بيانات عملية البيع بنجاح";
|
||||
$lang["sales_suspend_sale"] = "تعليق عملية البيع";
|
||||
$lang["sales_suspended_sale_id"] = "كود عملية البيع";
|
||||
$lang["sales_suspended_sales"] = "المبيعات المعلقة";
|
||||
$lang["sales_tax"] = "ضريبة";
|
||||
$lang["sales_tax_percent"] = "ضريبة %";
|
||||
$lang["sales_total"] = "المجموع";
|
||||
$lang["sales_total_tax_exclusive"] = "الإجمالى بدون الضرائب";
|
||||
$lang["sales_transaction_failed"] = "فشل حركة البيع";
|
||||
$lang["sales_unable_to_add_item"] = "غير قادر على إضافة صنف لعملية البيع";
|
||||
$lang["sales_unsuccessfully_deleted"] = "لايمكن حذف عملية/عمليات البيع";
|
||||
$lang["sales_unsuccessfully_suspended_sale"] = "فشل تعليق عملية البيع";
|
||||
$lang["sales_unsuccessfully_updated"] = "فشل عملية تحديث عملية البيع";
|
||||
$lang["sales_unsuspend"] = "إلغاء تعليق";
|
||||
$lang["sales_unsuspend_and_delete"] = "إلغاء تعليق وحذف";
|
||||
$lang["sales_update"] = "تحديث";
|
||||
$lang["sales_date_range"] = "الفترة الزمنية";
|
||||
$lang["sales_none_selected"] = "لم تقم بإختيار أى عمليات بيع لحذفها";
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user