Compare commits
1418 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf3da35d67 | ||
|
|
a17ddcfe89 | ||
|
|
088826f6f0 | ||
|
|
f89eaa96d1 | ||
|
|
e526cfe7ec | ||
|
|
21c189184d | ||
|
|
2aaebdbe11 | ||
|
|
cda3174a57 | ||
|
|
91eeb76f7b | ||
|
|
df18c29fb7 | ||
|
|
7aebb39003 | ||
|
|
91bb25d0c9 | ||
|
|
b89d7eb558 | ||
|
|
ba004aab83 | ||
|
|
4c3762989b | ||
|
|
225b907a03 | ||
|
|
b543861cbe | ||
|
|
fc6595b92b | ||
|
|
d11df3645b | ||
|
|
ea4c83dcb3 | ||
|
|
3d05635d7a | ||
|
|
90b0db2d18 | ||
|
|
91a71d4f2c | ||
|
|
36ab7f01b4 | ||
|
|
130dd2da61 | ||
|
|
6d15d36639 | ||
|
|
4395d0bc4d | ||
|
|
6e4e2152af | ||
|
|
fc5d5d1600 | ||
|
|
180d7e9ceb | ||
|
|
7be281e712 | ||
|
|
9d5f4f729e | ||
|
|
b68087d690 | ||
|
|
a970e72819 | ||
|
|
4d0c5a51c9 | ||
|
|
41e1eb6af7 | ||
|
|
1761004bd5 | ||
|
|
c8fc5a2048 | ||
|
|
9b639b82cf | ||
|
|
314fa2bdad | ||
|
|
bff501c401 | ||
|
|
89d64f5b12 | ||
|
|
670269f85c | ||
|
|
38a15ab4fc | ||
|
|
8dfb35bb79 | ||
|
|
20e97c9dbc | ||
|
|
909f6da868 | ||
|
|
0ffc350f57 | ||
|
|
fea9357741 | ||
|
|
2fbc3b7259 | ||
|
|
f99923dc08 | ||
|
|
d5781b5de8 | ||
|
|
81adb7dec9 | ||
|
|
46d4ba904a | ||
|
|
8c48c36be6 | ||
|
|
f52b3090a9 | ||
|
|
e8703298ed | ||
|
|
98eba6b9ba | ||
|
|
34dc5bc812 | ||
|
|
ba9b85c1a6 | ||
|
|
4eefd2218a | ||
|
|
d58d56f4d4 | ||
|
|
1d7d055d16 | ||
|
|
2e7dca8693 | ||
|
|
746e21f283 | ||
|
|
60eed43269 | ||
|
|
b2b7d91010 | ||
|
|
1641f0815e | ||
|
|
e3f4b6ce6f | ||
|
|
7a6ec814b9 | ||
|
|
4325a8c82f | ||
|
|
6bff33b949 | ||
|
|
99c244c834 | ||
|
|
838db977fe | ||
|
|
837b656c45 | ||
|
|
7641a957eb | ||
|
|
f8a383b339 | ||
|
|
d144bfe2ca | ||
|
|
b5edc6676e | ||
|
|
f72a1eb782 | ||
|
|
a574979ebc | ||
|
|
49b3c0c064 | ||
|
|
d32a43c39f | ||
|
|
3162f31fd8 | ||
|
|
952c336f70 | ||
|
|
2f6a29b060 | ||
|
|
55e467dc20 | ||
|
|
df5aa98d00 | ||
|
|
ffa18f4dc8 | ||
|
|
cea952c1c4 | ||
|
|
92a3aa9fad | ||
|
|
3b7f626c0b | ||
|
|
8d71597c03 | ||
|
|
786779fd5c | ||
|
|
0c30c9cccb | ||
|
|
6479f0e82a | ||
|
|
f8da1ff59f | ||
|
|
043ab0c47e | ||
|
|
6e982264db | ||
|
|
ed9f8de78c | ||
|
|
80f1fc4fcb | ||
|
|
c26b090c72 | ||
|
|
a637010af1 | ||
|
|
108c1f8783 | ||
|
|
cfb0b3d371 | ||
|
|
e1a3b369e8 | ||
|
|
f0f54d53f4 | ||
|
|
fdf61e40f3 | ||
|
|
9a12221d72 | ||
|
|
6bea8c7bc2 | ||
|
|
7bfba0fb0e | ||
|
|
15597d7f60 | ||
|
|
19fb4f231d | ||
|
|
fc70f4c9e8 | ||
|
|
b0fc040dcc | ||
|
|
26018adff4 | ||
|
|
73933c1195 | ||
|
|
1d3d0ed595 | ||
|
|
9d80e47d27 | ||
|
|
f2fc91b73e | ||
|
|
b77eb6d383 | ||
|
|
6ced0da90b | ||
|
|
6aaec8e874 | ||
|
|
e4ba4d0efd | ||
|
|
acef1eaa9d | ||
|
|
75960296c9 | ||
|
|
924b9c1763 | ||
|
|
92f2771ae2 | ||
|
|
88a2580ec5 | ||
|
|
95a2e2f5e4 | ||
|
|
90f44ba6ac | ||
|
|
b32d97f071 | ||
|
|
8cb9cfdb81 | ||
|
|
44420e4df7 | ||
|
|
55bd4f7d06 | ||
|
|
1d1e03b792 | ||
|
|
bb4fcd9438 | ||
|
|
b61345c040 | ||
|
|
1827c3bc5f | ||
|
|
e65df29aed | ||
|
|
c9588f5aa3 | ||
|
|
6a2a290194 | ||
|
|
8c95b5492c | ||
|
|
3cf31eaefe | ||
|
|
0349c8e96d | ||
|
|
666b63aa5e | ||
|
|
16fca942bb | ||
|
|
bf5f7425bb | ||
|
|
a165451b84 | ||
|
|
5f7ac05af3 | ||
|
|
afc9afa01f | ||
|
|
fe032bfb6f | ||
|
|
71f5792f02 | ||
|
|
0c70bd4b10 | ||
|
|
f8ee7e12ef | ||
|
|
f8a93b6cb1 | ||
|
|
612ec6c289 | ||
|
|
2fe811695c | ||
|
|
3cedb81670 | ||
|
|
393afdaa1f | ||
|
|
80b1ff7744 | ||
|
|
0689d27072 | ||
|
|
e44372ca6b | ||
|
|
a94073d37d | ||
|
|
5d9a9473d3 | ||
|
|
6854d66cdc | ||
|
|
29675f8bbd | ||
|
|
2ffb4a7a8d | ||
|
|
692e465829 | ||
|
|
eaed755e0f | ||
|
|
f32d3716b8 | ||
|
|
e493a9252b | ||
|
|
e005662cf0 | ||
|
|
e83697c21c | ||
|
|
c3c654c672 | ||
|
|
c6a445fa8e | ||
|
|
6ebf5b0bbb | ||
|
|
668ea8a161 | ||
|
|
49c58975d9 | ||
|
|
3d9ef3202e | ||
|
|
4dd13fd81e | ||
|
|
edc5a79fbf | ||
|
|
a3bb3cded0 | ||
|
|
c8e88f5bba | ||
|
|
c4ffa9ceb0 | ||
|
|
b8834c3c1c | ||
|
|
c384bc8045 | ||
|
|
9d0e4c841b | ||
|
|
3097e73e5a | ||
|
|
eec101dffb | ||
|
|
40e5b0589a | ||
|
|
ee343c8c77 | ||
|
|
079ac113fb | ||
|
|
285ec76130 | ||
|
|
e1eb761807 | ||
|
|
ae8974b627 | ||
|
|
ea18cc464a | ||
|
|
064da78734 | ||
|
|
c87dc4771c | ||
|
|
c5aede5b4c | ||
|
|
d8785dde0c | ||
|
|
669e4df639 | ||
|
|
e7894fab39 | ||
|
|
f8be4394dc | ||
|
|
384f620c9d | ||
|
|
ba0ae97fdf | ||
|
|
a95a189592 | ||
|
|
5ede3a8a6f | ||
|
|
49e8628627 | ||
|
|
05521ee102 | ||
|
|
11e9c18b51 | ||
|
|
5fcb3d7775 | ||
|
|
84226006dd | ||
|
|
4fc998d0f9 | ||
|
|
938b9b2097 | ||
|
|
61c2d88781 | ||
|
|
fdba12d355 | ||
|
|
8e1014565e | ||
|
|
040c565a44 | ||
|
|
54f7616cf8 | ||
|
|
b27f2dc012 | ||
|
|
7bf3d908ba | ||
|
|
17caf1f6e5 | ||
|
|
b1c5f385bf | ||
|
|
457cfb7b60 | ||
|
|
46e0166d1f | ||
|
|
0b55567b44 | ||
|
|
f3ca6d0ac3 | ||
|
|
06ff0e42d9 | ||
|
|
1727bdb2b8 | ||
|
|
80300b321d | ||
|
|
5c8c606b50 | ||
|
|
7b8e9a39e7 | ||
|
|
054d63c94e | ||
|
|
4deb7aaea2 | ||
|
|
f146046845 | ||
|
|
f8942dd060 | ||
|
|
ee1f66bc86 | ||
|
|
ae77cb4959 | ||
|
|
6ba0f7bf75 | ||
|
|
3e2ebe5972 | ||
|
|
5f2f82de56 | ||
|
|
9d0d426ed6 | ||
|
|
d7ea4ec2b6 | ||
|
|
4d35ef149f | ||
|
|
34fe511260 | ||
|
|
03a3d5089c | ||
|
|
8af11201d9 | ||
|
|
cd35d45628 | ||
|
|
dd09f67e75 | ||
|
|
a51c4403a5 | ||
|
|
5656c6e969 | ||
|
|
635528e186 | ||
|
|
49e39f0cde | ||
|
|
e9784d1280 | ||
|
|
82e3e08650 | ||
|
|
721de2629e | ||
|
|
19d627c51f | ||
|
|
a1d129f836 | ||
|
|
79f52a54ef | ||
|
|
92091ce22d | ||
|
|
019196894c | ||
|
|
fbce19b2c6 | ||
|
|
84a9b6c816 | ||
|
|
aeb0934da0 | ||
|
|
347a580883 | ||
|
|
2891c5ebca | ||
|
|
fc1bb3ee1d | ||
|
|
bd194a9fb7 | ||
|
|
4bd999cbc5 | ||
|
|
bb154ad6c9 | ||
|
|
f7d133f4a0 | ||
|
|
b79151ccac | ||
|
|
5b509ca194 | ||
|
|
38aa8982f8 | ||
|
|
c46504dfdf | ||
|
|
279fc35cb2 | ||
|
|
4887292513 | ||
|
|
a056a7e390 | ||
|
|
d82fec317e | ||
|
|
2545651a77 | ||
|
|
43029c2754 | ||
|
|
3adcca8238 | ||
|
|
a76f957345 | ||
|
|
6935ae7f60 | ||
|
|
72e3741b44 | ||
|
|
609568d6d5 | ||
|
|
576c76f71c | ||
|
|
a952fef53d | ||
|
|
5dc46b6096 | ||
|
|
463bd7b742 | ||
|
|
e5cb6ab319 | ||
|
|
eeb280e06d | ||
|
|
2799039eec | ||
|
|
84f47e54af | ||
|
|
3cd67c9e9b | ||
|
|
6b3d94a5df | ||
|
|
218cc5d1f2 | ||
|
|
f53407b76e | ||
|
|
92988591fc | ||
|
|
9b69827d2c | ||
|
|
4136b3170a | ||
|
|
f3459158c6 | ||
|
|
a82056f424 | ||
|
|
a440125ef2 | ||
|
|
3e8aec4d64 | ||
|
|
97a27f3d46 | ||
|
|
0eb0f59194 | ||
|
|
fce8780c08 | ||
|
|
48d45869ab | ||
|
|
349360b3a1 | ||
|
|
5e646cd8ad | ||
|
|
8bcd104cec | ||
|
|
5e91280912 | ||
|
|
5fec1751a7 | ||
|
|
91802f914c | ||
|
|
f779df2737 | ||
|
|
fad1363756 | ||
|
|
b041b905d0 | ||
|
|
ed4e85bf97 | ||
|
|
1a8e484542 | ||
|
|
8794bb9c5f | ||
|
|
1cd13ce2d5 | ||
|
|
c1bdc108c8 | ||
|
|
6549710eaa | ||
|
|
4634194009 | ||
|
|
14006ad8c8 | ||
|
|
89a7730406 | ||
|
|
c2e913e0ca | ||
|
|
afbf3296d4 | ||
|
|
75963505dc | ||
|
|
9ec61cf150 | ||
|
|
699feb0384 | ||
|
|
da00bacb55 | ||
|
|
8ca8b14720 | ||
|
|
64b47ade3b | ||
|
|
423791a1cd | ||
|
|
9b09fea692 | ||
|
|
098cb65a54 | ||
|
|
2cf2f48c02 | ||
|
|
85febb969e | ||
|
|
952e19a9bb | ||
|
|
451ad3fe93 | ||
|
|
cec0728bba | ||
|
|
44838ea239 | ||
|
|
3c29d6faa2 | ||
|
|
5c4fdfce44 | ||
|
|
19bed183b0 | ||
|
|
53523539f4 | ||
|
|
a5488e43ad | ||
|
|
f8a2587cf4 | ||
|
|
337972eada | ||
|
|
e5944e8866 | ||
|
|
ee17a60872 | ||
|
|
35ad87bb14 | ||
|
|
421bef2db4 | ||
|
|
0048d29799 | ||
|
|
5029670657 | ||
|
|
d40ec15f1c | ||
|
|
9873c4029b | ||
|
|
78b4ae02cb | ||
|
|
9fa9b34930 | ||
|
|
61b6918e73 | ||
|
|
755d14b004 | ||
|
|
2d3670b6a4 | ||
|
|
8ff1c7b3e0 | ||
|
|
8df03c6e30 | ||
|
|
cab2fc6e73 | ||
|
|
a5b9008088 | ||
|
|
0a5ccb008a | ||
|
|
83b8d33e78 | ||
|
|
9c2a20a67b | ||
|
|
a7465f8fd6 | ||
|
|
49b476b9e5 | ||
|
|
7f7f77f4d7 | ||
|
|
356c552b41 | ||
|
|
1ccbd82b35 | ||
|
|
e606678b8f | ||
|
|
45db6156c7 | ||
|
|
9d3da40351 | ||
|
|
3f51a8aed4 | ||
|
|
e7d09edc0d | ||
|
|
94c7fa0141 | ||
|
|
abe9abc90b | ||
|
|
dbb25b67a5 | ||
|
|
d4e8e05749 | ||
|
|
02d28f1422 | ||
|
|
a97265c8af | ||
|
|
0480ad45f6 | ||
|
|
c8ea02d745 | ||
|
|
028f246cae | ||
|
|
f683bbee59 | ||
|
|
e01309f07e | ||
|
|
d7786190e6 | ||
|
|
5bce109e8e | ||
|
|
a2531995f9 | ||
|
|
98ccde84fb | ||
|
|
a12840f803 | ||
|
|
3e2f36034f | ||
|
|
d8c6213828 | ||
|
|
dd56b5f4ac | ||
|
|
8444febbda | ||
|
|
b26c3f2263 | ||
|
|
03791fceee | ||
|
|
542782e400 | ||
|
|
8bdf8e675f | ||
|
|
2da81732eb | ||
|
|
e1f46be230 | ||
|
|
81b8627250 | ||
|
|
79586775b2 | ||
|
|
8ee5498fe0 | ||
|
|
e8ab320028 | ||
|
|
bdd1ee2185 | ||
|
|
660f479ec8 | ||
|
|
fa557f494b | ||
|
|
695d09f9cd | ||
|
|
66c9940d73 | ||
|
|
204af3ce90 | ||
|
|
4a9f6ba520 | ||
|
|
83f9f93015 | ||
|
|
53804c5bed | ||
|
|
d3d4fe45c6 | ||
|
|
fae4f0269b | ||
|
|
fc4eca5cc7 | ||
|
|
a1a712b0c6 | ||
|
|
2164595933 | ||
|
|
8eaf5eee74 | ||
|
|
09e5306825 | ||
|
|
9cca3494c0 | ||
|
|
360b057b0a | ||
|
|
56ae9481a0 | ||
|
|
12425e22a6 | ||
|
|
da80a649fc | ||
|
|
13ec41abb2 | ||
|
|
b3051ab84d | ||
|
|
533aba02c5 | ||
|
|
a5cf8a86c1 | ||
|
|
c819fd4ee8 | ||
|
|
2af44ffd06 | ||
|
|
cff91abd8d | ||
|
|
5d39a9594d | ||
|
|
b1caeba0b4 | ||
|
|
7290c79fdf | ||
|
|
547e916b00 | ||
|
|
e4c0388b68 | ||
|
|
783e63a8e6 | ||
|
|
f6891975d5 | ||
|
|
45a8f9d006 | ||
|
|
1b0c797817 | ||
|
|
c119cbcb50 | ||
|
|
d595534431 | ||
|
|
5de53eb0eb | ||
|
|
5ccaf6f9d7 | ||
|
|
29fe53f63c | ||
|
|
49fe7af6de | ||
|
|
a68a3b5cc1 | ||
|
|
3931a35e27 | ||
|
|
56595ecda0 | ||
|
|
466ff3d31b | ||
|
|
61c6552434 | ||
|
|
4ad0963ee8 | ||
|
|
aa99fe2c4e | ||
|
|
d56ec92682 | ||
|
|
90852d334f | ||
|
|
694373d022 | ||
|
|
40d49ccf98 | ||
|
|
4372ac559a | ||
|
|
01478b3fc1 | ||
|
|
41c8cf645a | ||
|
|
70ed6ede5c | ||
|
|
7af5c4aefc | ||
|
|
01ca354d52 | ||
|
|
a974ab3dc5 | ||
|
|
cc24d28ddc | ||
|
|
441b2c7657 | ||
|
|
51d07dfca2 | ||
|
|
5e6757f197 | ||
|
|
6a8ff42a5a | ||
|
|
06db236aa0 | ||
|
|
733680bc3f | ||
|
|
14a0441b4b | ||
|
|
a311e706b0 | ||
|
|
e6a16c29df | ||
|
|
92bb480fc3 | ||
|
|
7dc0da18b5 | ||
|
|
c8a2b94200 | ||
|
|
203d4088fa | ||
|
|
5eefff13a1 | ||
|
|
9421e9873a | ||
|
|
5e4c8a52ee | ||
|
|
41f62f7250 | ||
|
|
4f39fd243e | ||
|
|
c43a11a313 | ||
|
|
1bffb42809 | ||
|
|
4660f820da | ||
|
|
1a19c05ef0 | ||
|
|
d53e780fb8 | ||
|
|
0f5d97a156 | ||
|
|
2f273674e9 | ||
|
|
734a40ad62 | ||
|
|
9547b774f7 | ||
|
|
e1f8b1d695 | ||
|
|
7be2e985b0 | ||
|
|
3b6287d849 | ||
|
|
ab7021ce64 | ||
|
|
ca4c663e07 | ||
|
|
275b3eec0d | ||
|
|
acaef538c2 | ||
|
|
041b062014 | ||
|
|
39e603a154 | ||
|
|
a4eeb919e6 | ||
|
|
c4d9554a05 | ||
|
|
2e1c8f27c4 | ||
|
|
4c7a32e446 | ||
|
|
2c069a418a | ||
|
|
ba2596a7e0 | ||
|
|
f7911687a0 | ||
|
|
ceb82324ad | ||
|
|
5dd1aa9f31 | ||
|
|
80ada3eddd | ||
|
|
8df5900f98 | ||
|
|
f58a3726a7 | ||
|
|
1c77506e80 | ||
|
|
f1f556c0ac | ||
|
|
4a1b9ac793 | ||
|
|
20abc2d0e8 | ||
|
|
4f9fe9c856 | ||
|
|
4496cc1e80 | ||
|
|
29cca2352c | ||
|
|
d793fc9446 | ||
|
|
84f44ad5eb | ||
|
|
5b73dea9f6 | ||
|
|
cd90478c6d | ||
|
|
c4edcf1532 | ||
|
|
70885f63a5 | ||
|
|
48b1633ff5 | ||
|
|
4140fa59c5 | ||
|
|
afacc3d779 | ||
|
|
87b0bec2cf | ||
|
|
29f9f6c147 | ||
|
|
37d9d6fdea | ||
|
|
0cc177f73c | ||
|
|
8c4e043747 | ||
|
|
3617942ff7 | ||
|
|
ddc295b4b3 | ||
|
|
621f4cd7c9 | ||
|
|
4750b1fdb7 | ||
|
|
e7bb6544f5 | ||
|
|
72e348daf5 | ||
|
|
6c173e9730 | ||
|
|
0547a7668e | ||
|
|
ec1695dbe3 | ||
|
|
7909102edd | ||
|
|
3f10e0ba2d | ||
|
|
9f7de868ef | ||
|
|
d6c5235d58 | ||
|
|
32e55e174d | ||
|
|
8d968ceb94 | ||
|
|
47e82d1a49 | ||
|
|
563c243ec6 | ||
|
|
7781763efa | ||
|
|
711e675987 | ||
|
|
5b03a75970 | ||
|
|
f4c3819134 | ||
|
|
b8591da62c | ||
|
|
a5f0a7ce06 | ||
|
|
9785cd35dc | ||
|
|
e38a53443a | ||
|
|
70f57eb7f0 | ||
|
|
2d70887aaf | ||
|
|
15b22c9d7d | ||
|
|
4b12740e8d | ||
|
|
f942d97a18 | ||
|
|
5cf7a0bf72 | ||
|
|
49abb18928 | ||
|
|
7c016d2ee2 | ||
|
|
666fbaff8c | ||
|
|
6674d1dc2b | ||
|
|
5225a9752b | ||
|
|
0fd67b23f4 | ||
|
|
b82bdd6f1f | ||
|
|
131bec67bc | ||
|
|
ebae726237 | ||
|
|
3314f1cba7 | ||
|
|
a4870118ea | ||
|
|
03b3d66b90 | ||
|
|
5c968abcef | ||
|
|
699d9be4b7 | ||
|
|
ad5cf9b22e | ||
|
|
cdb63fd52a | ||
|
|
bf07cba6a8 | ||
|
|
ff1ab26088 | ||
|
|
5c3469a01e | ||
|
|
625592e997 | ||
|
|
7221805587 | ||
|
|
a0961bc0cf | ||
|
|
cf3cf2ca1f | ||
|
|
17e9b9444d | ||
|
|
c4f4c09e42 | ||
|
|
fe1e5884b8 | ||
|
|
072c540ae3 | ||
|
|
3012f0d39a | ||
|
|
c6d91b8fb2 | ||
|
|
019111b05c | ||
|
|
ddad05dab3 | ||
|
|
9e425863a1 | ||
|
|
bde324a90f | ||
|
|
b133240298 | ||
|
|
56c605f36e | ||
|
|
8c56adf42b | ||
|
|
690023538e | ||
|
|
19ce11aa9c | ||
|
|
f649013079 | ||
|
|
120ea62acc | ||
|
|
602e8253be | ||
|
|
06df19b56a | ||
|
|
0f72750fc8 | ||
|
|
5f0b93ed71 | ||
|
|
5284b22c53 | ||
|
|
343c1a5cbd | ||
|
|
6daa5746f8 | ||
|
|
7763bb5c15 | ||
|
|
b65c69f9eb | ||
|
|
2e292060c5 | ||
|
|
a4bf02de6c | ||
|
|
3bcf82c7a6 | ||
|
|
55222a5b82 | ||
|
|
2c85efe31a | ||
|
|
20628f5bd8 | ||
|
|
caf122f015 | ||
|
|
b73f3da02c | ||
|
|
f0607b45c5 | ||
|
|
b45ca3ada0 | ||
|
|
11e8728715 | ||
|
|
edc8ab03b5 | ||
|
|
27c266b081 | ||
|
|
c7fc11a812 | ||
|
|
d962d1c96f | ||
|
|
11f8a0033a | ||
|
|
da79740cdf | ||
|
|
2cf1699937 | ||
|
|
1a3413875f | ||
|
|
3667da1053 | ||
|
|
a5ac1f024e | ||
|
|
d9e57978b8 | ||
|
|
fee95f1135 | ||
|
|
e8f4790d0a | ||
|
|
e1feab1d70 | ||
|
|
6826ca19b1 | ||
|
|
de46fd62d8 | ||
|
|
c7c2d17823 | ||
|
|
6f7cd47ac6 | ||
|
|
11fc0723c9 | ||
|
|
94e90bddaa | ||
|
|
43ce642649 | ||
|
|
a975fea3ac | ||
|
|
8e2d76bd63 | ||
|
|
34af16140e | ||
|
|
b3a68c3f40 | ||
|
|
9f2fd009b0 | ||
|
|
3858d12f1d | ||
|
|
adc93b797a | ||
|
|
b6de519571 | ||
|
|
58c4646199 | ||
|
|
4fbf01fd9d | ||
|
|
1ed82834ce | ||
|
|
cd87e76d88 | ||
|
|
834b3e6f83 | ||
|
|
95d025f9aa | ||
|
|
90c6d7bb47 | ||
|
|
59ba9e3d56 | ||
|
|
c1531e7008 | ||
|
|
511421b6a3 | ||
|
|
26c54bb4fb | ||
|
|
2c93d67463 | ||
|
|
d4b05fbd51 | ||
|
|
d65a03d437 | ||
|
|
fd288d4211 | ||
|
|
f774f75c63 | ||
|
|
e34a1b5fa2 | ||
|
|
5f6546c8a5 | ||
|
|
ca5b593e38 | ||
|
|
cea5479f4d | ||
|
|
6303f84d45 | ||
|
|
5dd00a7e89 | ||
|
|
87c0e9f03a | ||
|
|
d40d1e9a59 | ||
|
|
e19abfbe70 | ||
|
|
3fc1c44334 | ||
|
|
bb347f5afa | ||
|
|
938b530ebf | ||
|
|
28962f26d4 | ||
|
|
0b5489ca88 | ||
|
|
adebf31041 | ||
|
|
7fbab12c5d | ||
|
|
11cc43a5a6 | ||
|
|
61fb7ee5b8 | ||
|
|
37b4d75e4a | ||
|
|
f71ecbba2c | ||
|
|
c5c6c0669f | ||
|
|
fe85b2ea17 | ||
|
|
1c1eb7018c | ||
|
|
8df5b5e3a1 | ||
|
|
39982a5f02 | ||
|
|
8f228dd7f9 | ||
|
|
739aa4d51a | ||
|
|
f9ef0e4e15 | ||
|
|
fc51ec7f58 | ||
|
|
7ba4d02444 | ||
|
|
87b5fcb3b5 | ||
|
|
7489d29813 | ||
|
|
268d300030 | ||
|
|
7f77002015 | ||
|
|
b28573ab03 | ||
|
|
c756ff67b0 | ||
|
|
4e72ef1421 | ||
|
|
6b173f3a67 | ||
|
|
bbcce8cca0 | ||
|
|
c438c1dec7 | ||
|
|
fcfced624a | ||
|
|
64949bfc4b | ||
|
|
438c4fb279 | ||
|
|
ae4c8a6a48 | ||
|
|
0d7213122a | ||
|
|
4268b0092a | ||
|
|
64e31e9a4e | ||
|
|
0a0c267edb | ||
|
|
1a8d4b6ea7 | ||
|
|
97426776bd | ||
|
|
60e7f01fd4 | ||
|
|
169089bdde | ||
|
|
c14f80838b | ||
|
|
a5007db902 | ||
|
|
0d58501229 | ||
|
|
7c654cd1bb | ||
|
|
54fc260a42 | ||
|
|
7a39d51366 | ||
|
|
79c94426f7 | ||
|
|
c3ced9a0b5 | ||
|
|
c825575940 | ||
|
|
afd3209017 | ||
|
|
c541b87bb9 | ||
|
|
b42f3e34ef | ||
|
|
6a7edd32aa | ||
|
|
fc307970aa | ||
|
|
b9e7cb02f4 | ||
|
|
a20a419cb8 | ||
|
|
d805bd7daf | ||
|
|
ac53f2dbb1 | ||
|
|
20a7d820ab | ||
|
|
d48c2394e8 | ||
|
|
58101e9e6c | ||
|
|
666131d2fe | ||
|
|
118f043335 | ||
|
|
b4a51ec80b | ||
|
|
6197860643 | ||
|
|
95fbfa4928 | ||
|
|
b7f0a4961e | ||
|
|
9c044eefff | ||
|
|
5951692db0 | ||
|
|
bd4814fbb7 | ||
|
|
7d23e4286e | ||
|
|
15ea751f3c | ||
|
|
c40148e0da | ||
|
|
a9dda232b2 | ||
|
|
1f25c45ad7 | ||
|
|
12ffd914ee | ||
|
|
b1d8979a59 | ||
|
|
ec2d0030b7 | ||
|
|
55d0506155 | ||
|
|
5e9b52c273 | ||
|
|
00b4663e12 | ||
|
|
e54a4004ec | ||
|
|
d0b086ca54 | ||
|
|
8d1191ac8f | ||
|
|
a938b81e1c | ||
|
|
7cd0ba70d9 | ||
|
|
66340f9894 | ||
|
|
41f7f7442b | ||
|
|
126fb31f9a | ||
|
|
a8a91cca16 | ||
|
|
381385d19a | ||
|
|
aba8fdd18d | ||
|
|
915778fb69 | ||
|
|
bacc679df5 | ||
|
|
b0388d971a | ||
|
|
61c9ea938d | ||
|
|
6956eee790 | ||
|
|
2e65aadb1e | ||
|
|
653cffec1e | ||
|
|
cc8f1afa56 | ||
|
|
2f702dcb32 | ||
|
|
f857d81f35 | ||
|
|
6d64fe378d | ||
|
|
b0ab93f779 | ||
|
|
df1c1a573f | ||
|
|
a1f2aec918 | ||
|
|
d8930a776d | ||
|
|
8a8ef85174 | ||
|
|
edba048c14 | ||
|
|
b705798ccb | ||
|
|
5e0b0b4b97 | ||
|
|
a4efbf0db7 | ||
|
|
e930f0f74e | ||
|
|
99543f72d8 | ||
|
|
1a9646739a | ||
|
|
bd65cb8817 | ||
|
|
98b287565a | ||
|
|
c6dbe70256 | ||
|
|
556536615e | ||
|
|
8bd96f1c08 | ||
|
|
5b7e9a1c94 | ||
|
|
c306b21415 | ||
|
|
c39cef363c | ||
|
|
baefec4498 | ||
|
|
02a56b4e1a | ||
|
|
9a6df0341f | ||
|
|
5a90e3b2e9 | ||
|
|
7dab3c1f85 | ||
|
|
f9a974385a | ||
|
|
20a653e829 | ||
|
|
a2c668cb77 | ||
|
|
d0b0a80be3 | ||
|
|
532b9e8bfb | ||
|
|
32e48bb568 | ||
|
|
21e09a2bd8 | ||
|
|
1aa6e98136 | ||
|
|
023c036afa | ||
|
|
8372c44262 | ||
|
|
6d69ca6bac | ||
|
|
283b55f88c | ||
|
|
4757d0634a | ||
|
|
dc8ce7f7e9 | ||
|
|
d02375e89d | ||
|
|
a90a0528aa | ||
|
|
350f9592d3 | ||
|
|
43e50de6ef | ||
|
|
a530f410e3 | ||
|
|
bdfb070ed6 | ||
|
|
caa9fc033f | ||
|
|
15bf4e5599 | ||
|
|
6d490e530a | ||
|
|
9b363fe5f1 | ||
|
|
3c5df9f64c | ||
|
|
fd53991dfa | ||
|
|
c794ca53fb | ||
|
|
fa0adafa82 | ||
|
|
99f4b43641 | ||
|
|
fdeab29e94 | ||
|
|
31755b485f | ||
|
|
3f3696d1eb | ||
|
|
e1a478779c | ||
|
|
6c6f3789d0 | ||
|
|
044c43a5cb | ||
|
|
9ce9c052e4 | ||
|
|
83e68bb837 | ||
|
|
415df04834 | ||
|
|
6d2d6862d6 | ||
|
|
13a65d52dd | ||
|
|
6485d4a749 | ||
|
|
2e63c80523 | ||
|
|
23bd21778e | ||
|
|
a3f490890d | ||
|
|
8e3ea32d6d | ||
|
|
c4a1a943ef | ||
|
|
abc0b64b68 | ||
|
|
00818bfa90 | ||
|
|
b9bfe6117e | ||
|
|
7a9f46d9d1 | ||
|
|
a10b52c6e6 | ||
|
|
5033e7b431 | ||
|
|
e6791ee78e | ||
|
|
b84ba868e6 | ||
|
|
1c501b6aac | ||
|
|
9a2a6d8fcb | ||
|
|
0b59d1c78b | ||
|
|
0fbf10797c | ||
|
|
58344cbb81 | ||
|
|
c6e2c8f79e | ||
|
|
b64b461d53 | ||
|
|
0b93bdcf40 | ||
|
|
e3910d02a5 | ||
|
|
0af146cea6 | ||
|
|
683f756d0f | ||
|
|
d905204e49 | ||
|
|
d8bc40d7f0 | ||
|
|
54059b77a0 | ||
|
|
f9f0e2591f | ||
|
|
5810bf70c7 | ||
|
|
97d8db775e | ||
|
|
fbe08ec7d0 | ||
|
|
0045c305ac | ||
|
|
5dd0fb6e2a | ||
|
|
e99fff8d08 | ||
|
|
b61fed9106 | ||
|
|
398c83afa5 | ||
|
|
c346484ca4 | ||
|
|
70b7f7f036 | ||
|
|
31c51ef914 | ||
|
|
be464696cc | ||
|
|
191b2970e9 | ||
|
|
c50f033722 | ||
|
|
e1e1414894 | ||
|
|
d1441245fb | ||
|
|
87da662703 | ||
|
|
99ba924303 | ||
|
|
066ff9599a | ||
|
|
33ebaf479d | ||
|
|
3a573d1a6d | ||
|
|
7f66983309 | ||
|
|
2c867fdd73 | ||
|
|
95dfc2730b | ||
|
|
558646c6b8 | ||
|
|
ea0d98891f | ||
|
|
1b4c5ad1e1 | ||
|
|
2678135f5e | ||
|
|
25ef4ff373 | ||
|
|
c85a37fe00 | ||
|
|
3c3d69f905 | ||
|
|
aed8da40ae | ||
|
|
3bc43682f1 | ||
|
|
725816e616 | ||
|
|
7c0eadb451 | ||
|
|
d4357e80d7 | ||
|
|
c0f88e4caf | ||
|
|
73286dd9f5 | ||
|
|
1f259ba73d | ||
|
|
7b2b0cd73c | ||
|
|
2c749db2a9 | ||
|
|
17c633d00f | ||
|
|
4ee5b75687 | ||
|
|
a4fad72a65 | ||
|
|
e65ac00f36 | ||
|
|
75bd0f7cfe | ||
|
|
4d20f3029b | ||
|
|
c35b35abca | ||
|
|
17dc249841 | ||
|
|
12af47918d | ||
|
|
84ca0197e4 | ||
|
|
3395e7a2e4 | ||
|
|
25956d6282 | ||
|
|
ba2133cba2 | ||
|
|
28e3d63280 | ||
|
|
414660313a | ||
|
|
c52a601e87 | ||
|
|
7a869b0dca | ||
|
|
6f64a78ecf | ||
|
|
608bbc7850 | ||
|
|
639826e888 | ||
|
|
16b2c51988 | ||
|
|
76e9ba1e76 | ||
|
|
9dad86c189 | ||
|
|
5302b46955 | ||
|
|
afd14f6f0e | ||
|
|
05584d6d8b | ||
|
|
aa015902d5 | ||
|
|
2873f2e7de | ||
|
|
64fd970a8a | ||
|
|
b4e9c1da64 | ||
|
|
1d093a4039 | ||
|
|
fe9717cb9c | ||
|
|
d665a07621 | ||
|
|
2a1ba886f1 | ||
|
|
55f1ea05da | ||
|
|
2e7f9d2b8f | ||
|
|
3a519f269d | ||
|
|
4c0d0793a3 | ||
|
|
d3b8a74508 | ||
|
|
77760db89c | ||
|
|
1d23ebb51d | ||
|
|
ba5b0e8458 | ||
|
|
14a908bdec | ||
|
|
9f436a7c71 | ||
|
|
746fd90625 | ||
|
|
f861856ed9 | ||
|
|
f94f153078 | ||
|
|
c9bacedbfe | ||
|
|
c0cee82727 | ||
|
|
4c53931363 | ||
|
|
53f7e6281c | ||
|
|
9f235b891f | ||
|
|
c4d4c7feb0 | ||
|
|
ee6862b277 | ||
|
|
53f77ad5e8 | ||
|
|
fb73151da6 | ||
|
|
6e322d0a02 | ||
|
|
73e73795f1 | ||
|
|
80d2a55342 | ||
|
|
9cbf6b1b22 | ||
|
|
41dd2c458b | ||
|
|
71ebad5668 | ||
|
|
b4c0e94e99 | ||
|
|
73f1dc4edf | ||
|
|
174299124f | ||
|
|
c27748b2b3 | ||
|
|
626ba1bb81 | ||
|
|
591f047974 | ||
|
|
38e4c6f2af | ||
|
|
58e9590850 | ||
|
|
03afb45e34 | ||
|
|
d91382dbf3 | ||
|
|
e07958bbda | ||
|
|
b445be3552 | ||
|
|
c865f229fb | ||
|
|
ec5deb6e48 | ||
|
|
486bf2e113 | ||
|
|
f49b085625 | ||
|
|
adcaf75bb0 | ||
|
|
4f4fc45ae6 | ||
|
|
079d0b7108 | ||
|
|
86125b2b9f | ||
|
|
22d0d586ab | ||
|
|
eb62aed8c7 | ||
|
|
60f1739ca5 | ||
|
|
5f349a67c9 | ||
|
|
fd294eb981 | ||
|
|
d256055a8c | ||
|
|
cefa106a06 | ||
|
|
67ecfcf52c | ||
|
|
b7e46c4ed9 | ||
|
|
bc5ecfff06 | ||
|
|
8fa4845d00 | ||
|
|
d4882653c3 | ||
|
|
9a4d165ba2 | ||
|
|
a7099eaa8d | ||
|
|
4b72d05793 | ||
|
|
a30f3ea1f9 | ||
|
|
3b6a8af0da | ||
|
|
4fa69780a8 | ||
|
|
2dc619ae1f | ||
|
|
fc9031924e | ||
|
|
e14124198d | ||
|
|
51e980dd2c | ||
|
|
95781919fb | ||
|
|
c03cba9d17 | ||
|
|
72cd206286 | ||
|
|
9801745090 | ||
|
|
7866c6e6db | ||
|
|
5812fdb574 | ||
|
|
4c502bcd26 | ||
|
|
714948c867 | ||
|
|
8f3b360f83 | ||
|
|
314086d6c0 | ||
|
|
bcd655a985 | ||
|
|
b0dbdc1439 | ||
|
|
37b0bf257d | ||
|
|
c5a25f44e1 | ||
|
|
8dafa376ab | ||
|
|
74eb8e34da | ||
|
|
5c66fb7631 | ||
|
|
be3b3b2107 | ||
|
|
9ab09fd1d6 | ||
|
|
8a7bdd5a92 | ||
|
|
1d753c92b1 | ||
|
|
54ecc8ebba | ||
|
|
f4edaef481 | ||
|
|
ebbd163903 | ||
|
|
8954b24b22 | ||
|
|
ae92fc7f35 | ||
|
|
0bc3ca02f3 | ||
|
|
d10ba853e6 | ||
|
|
5bcf8315de | ||
|
|
789a798e36 | ||
|
|
ee1169dac7 | ||
|
|
fbef1fdf3a | ||
|
|
4358e1cd46 | ||
|
|
7a287a9153 | ||
|
|
5a49ded5d9 | ||
|
|
71f23acc2b | ||
|
|
1a1f790150 | ||
|
|
3c54e9779b | ||
|
|
db48b7d764 | ||
|
|
83c0899c83 | ||
|
|
e5047ec90a | ||
|
|
d9ab725be4 | ||
|
|
7afaeb0820 | ||
|
|
da2d8b958d | ||
|
|
ba48f82e03 | ||
|
|
8e7e128e81 | ||
|
|
0353569e8b | ||
|
|
665e2f5418 | ||
|
|
dace2b6796 | ||
|
|
712b02593a | ||
|
|
d2a60fd727 | ||
|
|
f924e08b93 | ||
|
|
5c623dae4d | ||
|
|
e2c3d40b57 | ||
|
|
673887455f | ||
|
|
63199e486b | ||
|
|
bf7294cf5c | ||
|
|
8aa06a809a | ||
|
|
72d2d682ae | ||
|
|
21f6ea6f7e | ||
|
|
185f488c51 | ||
|
|
f3006972d5 | ||
|
|
dccc6bc11d | ||
|
|
15d2c89939 | ||
|
|
ca4c8a2a46 | ||
|
|
c320fe541d | ||
|
|
f40a87511e | ||
|
|
4945b94950 | ||
|
|
cb96b61449 | ||
|
|
248c867a2c | ||
|
|
da98ab6f3c | ||
|
|
cd0989e051 | ||
|
|
b20baf894f | ||
|
|
d3cf4f1264 | ||
|
|
2dbe2b63b2 | ||
|
|
edba8f5582 | ||
|
|
89b8d11f9c | ||
|
|
19a33994da | ||
|
|
89349d3ae3 | ||
|
|
f6a31a568a | ||
|
|
4bcbcd29f7 | ||
|
|
740a11263f | ||
|
|
142859f36e | ||
|
|
6534ad082d | ||
|
|
6361ae3495 | ||
|
|
7f75dbf061 | ||
|
|
199d8a44fc | ||
|
|
72b1128467 | ||
|
|
d6cb55ad1a | ||
|
|
c76e34d7de | ||
|
|
33b10faf94 | ||
|
|
d970b001a4 | ||
|
|
d767fb6134 | ||
|
|
6239923340 | ||
|
|
e5a31462fe | ||
|
|
6f39300d43 | ||
|
|
0ca587e018 | ||
|
|
8ffe12ebe4 | ||
|
|
8579af371c | ||
|
|
b5ff9421e1 | ||
|
|
ba8ec17f0b | ||
|
|
44bd3b2601 | ||
|
|
9d40eca428 | ||
|
|
1b6c00e2c7 | ||
|
|
52efde31e7 | ||
|
|
f723032fd7 | ||
|
|
3297c43bdf | ||
|
|
aea250bc5a | ||
|
|
d37d4dfdec | ||
|
|
0ea68b33ed | ||
|
|
7f96c20f5b | ||
|
|
e75d947867 | ||
|
|
bba0a5d38f | ||
|
|
953e97536a | ||
|
|
e74d7ca33e | ||
|
|
8f2b8afcb7 | ||
|
|
b3f12c3109 | ||
|
|
f66e6aacd4 | ||
|
|
1d621be1f7 | ||
|
|
ab57e52cbd | ||
|
|
e63da9813c | ||
|
|
c020e42d20 | ||
|
|
b126ba0132 | ||
|
|
20ae349ebd | ||
|
|
c6e4b5978d | ||
|
|
361eca4cae | ||
|
|
9fc03b6c10 | ||
|
|
e2d46d0474 | ||
|
|
dd2f2f5321 | ||
|
|
6e4f5a214a | ||
|
|
b07b0a9e54 | ||
|
|
307978fea9 | ||
|
|
06ad308ca1 | ||
|
|
52dfc32eca | ||
|
|
72fbf902d7 | ||
|
|
8ffd483e24 | ||
|
|
3d76686b82 | ||
|
|
156ce607e2 | ||
|
|
65b6762247 | ||
|
|
abdfb4d3db | ||
|
|
3bcb13b1b8 | ||
|
|
b6ec680c46 | ||
|
|
53a0de7607 | ||
|
|
0a1d037f01 | ||
|
|
ce3e15d30c | ||
|
|
5b649521d1 | ||
|
|
798e75832c | ||
|
|
aa95a1b1ef | ||
|
|
c0c94aef44 | ||
|
|
e4dfeb651f | ||
|
|
f7e6eb4fd7 | ||
|
|
97c858a5e3 | ||
|
|
974892bf87 | ||
|
|
361df8993f | ||
|
|
b8b8de7a49 | ||
|
|
be6cfddc4d | ||
|
|
bf8c8df9ce | ||
|
|
40759c284c | ||
|
|
a48d754158 | ||
|
|
26bcd89d10 | ||
|
|
20fd360a63 | ||
|
|
df8efce36f | ||
|
|
9acd6a2629 | ||
|
|
779ae439cd | ||
|
|
a8ef4c9220 | ||
|
|
ce6b61b41e | ||
|
|
0332f83bc2 | ||
|
|
926ae17e5a | ||
|
|
8adb5f3e32 | ||
|
|
5532a14938 | ||
|
|
a69682c4e0 | ||
|
|
d20120e649 | ||
|
|
e9b14e497b | ||
|
|
ba0bf9e13d | ||
|
|
cba5a684cb | ||
|
|
c439b87ccc | ||
|
|
340709b2da | ||
|
|
a8de61e24b | ||
|
|
28386f551b | ||
|
|
9ff52cd57e | ||
|
|
e3401182c8 | ||
|
|
7523429ded | ||
|
|
0401e418be | ||
|
|
ff6fd7fa9d | ||
|
|
7620393b9b | ||
|
|
6489e97726 | ||
|
|
8c1a4c0c48 | ||
|
|
77ca80217c | ||
|
|
8247ad4028 | ||
|
|
1194c6ef4b | ||
|
|
70fed64cd5 | ||
|
|
87c2d1d634 | ||
|
|
d4aa27cbb8 | ||
|
|
59f4fa9a8c | ||
|
|
3b0c0a76b4 | ||
|
|
262ac09305 | ||
|
|
2a04d98c16 | ||
|
|
fec9f75707 | ||
|
|
12106725fb | ||
|
|
c5f919eb68 | ||
|
|
5fe0086d9a | ||
|
|
0b031cdd6c | ||
|
|
c19afa140d | ||
|
|
0bd145a608 | ||
|
|
c663f5c2bd | ||
|
|
adde1cff48 | ||
|
|
bb9427d1ef | ||
|
|
052babc6b6 | ||
|
|
24fa06bc53 | ||
|
|
7c867ae9ad | ||
|
|
8f7317175d | ||
|
|
957e7a37be | ||
|
|
def71d4d5d | ||
|
|
ef511b160e | ||
|
|
09f9c96c53 | ||
|
|
1a2d121073 | ||
|
|
810bd35609 | ||
|
|
949d7dbaba | ||
|
|
72e6aa160c | ||
|
|
0870b185de | ||
|
|
69f2cc8d24 | ||
|
|
86102064a5 | ||
|
|
0fd3347148 | ||
|
|
b74265c842 | ||
|
|
1fef2fad2d | ||
|
|
9345240ff1 | ||
|
|
9ab23231e6 | ||
|
|
dbe623b167 | ||
|
|
71e51c179c | ||
|
|
4b8dbbdf98 | ||
|
|
aaf1895a12 | ||
|
|
979326b0b1 | ||
|
|
5d9cfc76cd | ||
|
|
8db7bd2d8f | ||
|
|
d461d462aa | ||
|
|
e67fa424b2 | ||
|
|
121176f0e9 | ||
|
|
1c2636e7b3 | ||
|
|
840cad0ff7 | ||
|
|
f76d63b92a | ||
|
|
71ef6675ce | ||
|
|
793b87948c | ||
|
|
a1b0ff09a8 | ||
|
|
5a803d76ad | ||
|
|
9513025130 | ||
|
|
a13c60bf9f | ||
|
|
bc23e5ac5c | ||
|
|
2377cdfa4e | ||
|
|
e3ae05aabd | ||
|
|
a2fda1c779 | ||
|
|
a29577ca71 | ||
|
|
b1454cdf9f | ||
|
|
f668a4d03c | ||
|
|
c2b4ae6667 | ||
|
|
1857bb8b0b | ||
|
|
888a70c2d4 | ||
|
|
9d5b84e78a | ||
|
|
bdc125ad0f | ||
|
|
f0b3014a23 | ||
|
|
0b17a91aba | ||
|
|
83dd3e14e5 | ||
|
|
38f64ea3ab | ||
|
|
cd103c05d6 | ||
|
|
bc1e8b4408 | ||
|
|
6c3ff3e2ed | ||
|
|
4fb7f881c8 | ||
|
|
83a358afc1 | ||
|
|
96bb070781 | ||
|
|
d387dd3bc6 | ||
|
|
9f25575e0c | ||
|
|
e1af7f1a0f | ||
|
|
c35df5ce80 | ||
|
|
2c2868db11 | ||
|
|
17f28c13ed | ||
|
|
3f1f2dd307 | ||
|
|
ab05dcd9f9 | ||
|
|
f21edba97f | ||
|
|
91b0e2348c | ||
|
|
4de91887db | ||
|
|
9b1288605f | ||
|
|
43888546f6 | ||
|
|
68d2e317d2 | ||
|
|
2249eea59f | ||
|
|
d608363d7b | ||
|
|
b2739cbb79 | ||
|
|
f5940907ae | ||
|
|
90162078d5 | ||
|
|
cba99743a4 | ||
|
|
f44128f81c | ||
|
|
3607737b5e | ||
|
|
bf9691ed39 | ||
|
|
bbca95fd1b | ||
|
|
4df98d52c1 | ||
|
|
e9b445c853 | ||
|
|
28f8664b93 | ||
|
|
216aaaf1d6 | ||
|
|
be9edae961 | ||
|
|
4223d7c044 | ||
|
|
3a53d49b7e | ||
|
|
4d62d7867e | ||
|
|
c0e3b1a0c7 | ||
|
|
34fe81f7eb | ||
|
|
11a746d363 | ||
|
|
1609933748 | ||
|
|
5f90f7096d | ||
|
|
59c4ae5a46 | ||
|
|
85abdc4fad | ||
|
|
98096771c2 | ||
|
|
ba51ebd1b7 | ||
|
|
be090fa512 | ||
|
|
c2283ca304 | ||
|
|
deb38f7a68 | ||
|
|
283850ce47 | ||
|
|
caa839003b | ||
|
|
a6130dc918 | ||
|
|
099bbbded0 | ||
|
|
c3796d273c | ||
|
|
28700d6404 | ||
|
|
38f400ea87 | ||
|
|
f5793fff3c | ||
|
|
e1d2bef389 | ||
|
|
0ca3e3d89e | ||
|
|
a1fa659475 | ||
|
|
906bf64f04 | ||
|
|
e52ee553c0 | ||
|
|
409c1e494b | ||
|
|
19e560e73f | ||
|
|
bac9b8eef6 | ||
|
|
76bb927337 | ||
|
|
699751c531 | ||
|
|
06b15bfd63 | ||
|
|
8f1391dc96 | ||
|
|
0161b40aa9 | ||
|
|
1901ca5a45 | ||
|
|
c68f68d6cc | ||
|
|
6e439a5e53 | ||
|
|
610ad47676 | ||
|
|
42701b2160 | ||
|
|
3d9d2d1dd1 | ||
|
|
3ea7ce84ed | ||
|
|
002049eb85 | ||
|
|
57a51351d3 | ||
|
|
77a2107973 | ||
|
|
c5346c99de | ||
|
|
8b66f2a691 | ||
|
|
78be566428 | ||
|
|
f6f38f2f2d | ||
|
|
9a9a4293b3 | ||
|
|
f370b0c6a4 | ||
|
|
09c68c9ad0 | ||
|
|
13d8835b75 | ||
|
|
b8610e1079 | ||
|
|
41e948b00a | ||
|
|
2091f0c97e | ||
|
|
c6802ca6d0 | ||
|
|
282e4947fa | ||
|
|
54fe26dcfb | ||
|
|
4ffd7f3d05 | ||
|
|
a12d959729 | ||
|
|
b99c180466 | ||
|
|
6cf193d432 | ||
|
|
35a5c87cbf | ||
|
|
740db53b86 | ||
|
|
69b6195d3b | ||
|
|
cd2d8a0410 | ||
|
|
5bec301929 | ||
|
|
491df14426 | ||
|
|
00eba4d7f6 | ||
|
|
17679c6902 | ||
|
|
fa65c7bf29 | ||
|
|
f7800c053b | ||
|
|
678a4e24ff | ||
|
|
b8a6f40370 | ||
|
|
f24f6044bd | ||
|
|
3c107cdbf8 | ||
|
|
895029dc15 | ||
|
|
c561a499d7 | ||
|
|
69c1401764 | ||
|
|
50ba6faaf6 | ||
|
|
46bcbaf97b | ||
|
|
0e46a9b86e | ||
|
|
e459cb4d09 | ||
|
|
7dbd395781 | ||
|
|
6aea1c0da5 | ||
|
|
aeab6c559c |
@@ -49,6 +49,20 @@ DocTypes are easy to create but hard to maintain. If you find that there is a an
|
|||||||
|
|
||||||
Tabs!
|
Tabs!
|
||||||
|
|
||||||
|
#### Release Checklist
|
||||||
|
|
||||||
|
- Describe, in detail, what is in the pull request
|
||||||
|
- How to use the new feature?
|
||||||
|
- Test cases
|
||||||
|
- Change log
|
||||||
|
- Manual Pull Request Link
|
||||||
|
- Screencast. Should include:
|
||||||
|
- New Forms
|
||||||
|
- Linked Forms
|
||||||
|
- Linked Reports
|
||||||
|
- Print Views
|
||||||
|
|
||||||
### Copyright
|
### Copyright
|
||||||
|
|
||||||
Please see README.md
|
Please see README.md
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# ERPNext - Open source ERP for small and medium-size business [](https://travis-ci.org/frappe/erpnext)
|
# ERPNext - ERP made simple
|
||||||
|
|
||||||
[](https://gitter.im/frappe/erpnext?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://travis-ci.org/frappe/erpnext) [](https://gitter.im/frappe/erpnext?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
|
||||||
[https://erpnext.com](https://erpnext.com)
|
[https://erpnext.com](https://erpnext.com)
|
||||||
|
|
||||||
Includes: Accounting, Inventory, CRM, Sales, Purchase, Projects, HRMS. Requires MariaDB.
|
Includes: Accounting, Inventory, CRM, Sales, Purchase, Projects, HRMS. Requires MariaDB.
|
||||||
|
|
||||||
ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & Javascript.
|
ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & JavaScript.
|
||||||
|
|
||||||
- [User Guide](https://manual.erpnext.com)
|
- [User Guide](https://manual.erpnext.com)
|
||||||
- [Getting Help](http://erpnext.org/getting-help.html)
|
- [Getting Help](http://erpnext.org/getting-help.html)
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
__version__ = '5.8.2'
|
__version__ = '6.13.0'
|
||||||
|
|||||||
@@ -3,177 +3,449 @@
|
|||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"creation": "2013-01-30 12:49:46",
|
"creation": "2013-01-30 12:49:46",
|
||||||
|
"custom": 0,
|
||||||
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
|
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Setup",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "properties",
|
"fieldname": "properties",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldtype": "Section Break",
|
"oldfieldtype": "Section Break",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break0",
|
"fieldname": "column_break0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "account_name",
|
"fieldname": "account_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Account Name",
|
"label": "Account Name",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "account_name",
|
"oldfieldname": "account_name",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "0",
|
"default": "0",
|
||||||
"fieldname": "is_group",
|
"fieldname": "is_group",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Is Group",
|
"label": "Is Group",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "company",
|
"oldfieldname": "company",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "root_type",
|
"fieldname": "root_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Root Type",
|
"label": "Root Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "\nAsset\nLiability\nIncome\nExpense\nEquity",
|
"options": "\nAsset\nLiability\nIncome\nExpense\nEquity",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "report_type",
|
"fieldname": "report_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Report Type",
|
"label": "Report Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "\nBalance Sheet\nProfit and Loss",
|
"options": "\nBalance Sheet\nProfit and Loss",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:doc.is_group==0",
|
||||||
|
"fieldname": "account_currency",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Currency",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Currency",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break1",
|
"fieldname": "column_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "parent_account",
|
"fieldname": "parent_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Parent Account",
|
"label": "Parent Account",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "parent_account",
|
"oldfieldname": "parent_account",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Setting Account Type helps in selecting this Account in transactions.",
|
"description": "Setting Account Type helps in selecting this Account in transactions.",
|
||||||
"fieldname": "account_type",
|
"fieldname": "account_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Account Type",
|
"label": "Account Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "account_type",
|
"oldfieldname": "account_type",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nRound Off\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment\nStock\nTemporary",
|
"options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nRound Off\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment\nStock\nTemporary",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Rate at which this tax is applied",
|
"description": "Rate at which this tax is applied",
|
||||||
"fieldname": "tax_rate",
|
"fieldname": "tax_rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Rate",
|
"label": "Rate",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "tax_rate",
|
"oldfieldname": "tax_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "If the account is frozen, entries are allowed to restricted users.",
|
"description": "If the account is frozen, entries are allowed to restricted users.",
|
||||||
"fieldname": "freeze_account",
|
"fieldname": "freeze_account",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Frozen",
|
"label": "Frozen",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "freeze_account",
|
"oldfieldname": "freeze_account",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "No\nYes",
|
"options": "No\nYes",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "warehouse",
|
"fieldname": "warehouse",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Warehouse",
|
"label": "Warehouse",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Warehouse",
|
"options": "Warehouse",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "balance_must_be",
|
"fieldname": "balance_must_be",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Balance must be",
|
"label": "Balance must be",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "\nDebit\nCredit",
|
"options": "\nDebit\nCredit",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "lft",
|
"fieldname": "lft",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Lft",
|
"label": "Lft",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"search_index": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "rgt",
|
"fieldname": "rgt",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Rgt",
|
"label": "Rgt",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"search_index": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "old_parent",
|
"fieldname": "old_parent",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Old Parent",
|
"label": "Old Parent",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-money",
|
"icon": "icon-money",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"modified": "2015-07-20 03:54:14.297995",
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:41.535663",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Account",
|
"name": "Account",
|
||||||
@@ -181,70 +453,93 @@
|
|||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 1,
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
|
"if_owner": 0,
|
||||||
"import": 1,
|
"import": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts User",
|
"role": "Accounts User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 1,
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Auditor",
|
"role": "Auditor",
|
||||||
"submit": 0,
|
"set_user_permissions": 0,
|
||||||
"write": 0
|
"share": 0,
|
||||||
},
|
|
||||||
{
|
|
||||||
"amend": 0,
|
|
||||||
"apply_user_permissions": 1,
|
|
||||||
"create": 0,
|
|
||||||
"delete": 0,
|
|
||||||
"email": 1,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print": 1,
|
|
||||||
"read": 1,
|
|
||||||
"report": 1,
|
|
||||||
"role": "Sales User",
|
|
||||||
"submit": 0,
|
|
||||||
"write": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"amend": 0,
|
|
||||||
"apply_user_permissions": 1,
|
|
||||||
"create": 0,
|
|
||||||
"delete": 0,
|
|
||||||
"email": 1,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print": 1,
|
|
||||||
"read": 1,
|
|
||||||
"report": 1,
|
|
||||||
"role": "Purchase User",
|
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 0,
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Sales User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Purchase User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
|
"if_owner": 0,
|
||||||
"import": 1,
|
"import": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
@@ -257,5 +552,7 @@
|
|||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
"search_fields": ""
|
"search_fields": ""
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,8 @@ from frappe.utils import cstr, cint
|
|||||||
from frappe import throw, _
|
from frappe import throw, _
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class RootNotEditable(frappe.ValidationError): pass
|
||||||
|
|
||||||
class Account(Document):
|
class Account(Document):
|
||||||
nsm_parent_field = 'parent_account'
|
nsm_parent_field = 'parent_account'
|
||||||
|
|
||||||
@@ -28,6 +30,7 @@ class Account(Document):
|
|||||||
self.validate_warehouse_account()
|
self.validate_warehouse_account()
|
||||||
self.validate_frozen_accounts_modifier()
|
self.validate_frozen_accounts_modifier()
|
||||||
self.validate_balance_must_be_debit_or_credit()
|
self.validate_balance_must_be_debit_or_credit()
|
||||||
|
self.validate_account_currency()
|
||||||
|
|
||||||
def validate_parent(self):
|
def validate_parent(self):
|
||||||
"""Fetch Parent Details and validate parent account"""
|
"""Fetch Parent Details and validate parent account"""
|
||||||
@@ -63,11 +66,18 @@ class Account(Document):
|
|||||||
frappe.db.sql("update `tabAccount` set root_type=%s where lft > %s and rgt < %s",
|
frappe.db.sql("update `tabAccount` set root_type=%s where lft > %s and rgt < %s",
|
||||||
(self.root_type, self.lft, self.rgt))
|
(self.root_type, self.lft, self.rgt))
|
||||||
|
|
||||||
|
if self.root_type and not self.report_type:
|
||||||
|
self.report_type = "Balance Sheet" \
|
||||||
|
if self.root_type in ("Asset", "Liability", "Equity") else "Profit and Loss"
|
||||||
|
|
||||||
def validate_root_details(self):
|
def validate_root_details(self):
|
||||||
# does not exists parent
|
# does not exists parent
|
||||||
if frappe.db.exists("Account", self.name):
|
if frappe.db.exists("Account", self.name):
|
||||||
if not frappe.db.get_value("Account", self.name, "parent_account"):
|
if not frappe.db.get_value("Account", self.name, "parent_account"):
|
||||||
throw(_("Root cannot be edited."))
|
throw(_("Root cannot be edited."), RootNotEditable)
|
||||||
|
|
||||||
|
if not self.parent_account and not self.is_group:
|
||||||
|
frappe.throw(_("Root Account must be a group"))
|
||||||
|
|
||||||
def validate_frozen_accounts_modifier(self):
|
def validate_frozen_accounts_modifier(self):
|
||||||
old_value = frappe.db.get_value("Account", self.name, "freeze_account")
|
old_value = frappe.db.get_value("Account", self.name, "freeze_account")
|
||||||
@@ -87,6 +97,14 @@ class Account(Document):
|
|||||||
elif account_balance < 0 and self.balance_must_be == "Debit":
|
elif account_balance < 0 and self.balance_must_be == "Debit":
|
||||||
frappe.throw(_("Account balance already in Credit, you are not allowed to set 'Balance Must Be' as 'Debit'"))
|
frappe.throw(_("Account balance already in Credit, you are not allowed to set 'Balance Must Be' as 'Debit'"))
|
||||||
|
|
||||||
|
def validate_account_currency(self):
|
||||||
|
if not self.account_currency:
|
||||||
|
self.account_currency = frappe.db.get_value("Company", self.company, "default_currency")
|
||||||
|
|
||||||
|
elif self.account_currency != frappe.db.get_value("Account", self.name, "account_currency"):
|
||||||
|
if frappe.db.get_value("GL Entry", {"account": self.name}):
|
||||||
|
frappe.throw(_("Currency can not be changed after making entries using some other currency"))
|
||||||
|
|
||||||
def convert_group_to_ledger(self):
|
def convert_group_to_ledger(self):
|
||||||
if self.check_if_child_exists():
|
if self.check_if_child_exists():
|
||||||
throw(_("Account with child nodes cannot be converted to ledger"))
|
throw(_("Account with child nodes cannot be converted to ledger"))
|
||||||
@@ -116,12 +134,12 @@ class Account(Document):
|
|||||||
and docstatus != 2""", self.name)
|
and docstatus != 2""", self.name)
|
||||||
|
|
||||||
def validate_mandatory(self):
|
def validate_mandatory(self):
|
||||||
if not self.report_type:
|
|
||||||
throw(_("Report Type is mandatory"))
|
|
||||||
|
|
||||||
if not self.root_type:
|
if not self.root_type:
|
||||||
throw(_("Root Type is mandatory"))
|
throw(_("Root Type is mandatory"))
|
||||||
|
|
||||||
|
if not self.report_type:
|
||||||
|
throw(_("Report Type is mandatory"))
|
||||||
|
|
||||||
def validate_warehouse_account(self):
|
def validate_warehouse_account(self):
|
||||||
if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
|
if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
|
||||||
return
|
return
|
||||||
@@ -136,6 +154,8 @@ class Account(Document):
|
|||||||
self.validate_warehouse(old_warehouse)
|
self.validate_warehouse(old_warehouse)
|
||||||
if self.warehouse:
|
if self.warehouse:
|
||||||
self.validate_warehouse(self.warehouse)
|
self.validate_warehouse(self.warehouse)
|
||||||
|
elif self.warehouse:
|
||||||
|
self.warehouse = None
|
||||||
|
|
||||||
def validate_warehouse(self, warehouse):
|
def validate_warehouse(self, warehouse):
|
||||||
if frappe.db.get_value("Stock Ledger Entry", {"warehouse": warehouse}):
|
if frappe.db.get_value("Stock Ledger Entry", {"warehouse": warehouse}):
|
||||||
@@ -196,3 +216,16 @@ def get_parent_account(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
and %s like %s order by name limit %s, %s""" %
|
and %s like %s order by name limit %s, %s""" %
|
||||||
("%s", searchfield, "%s", "%s", "%s"),
|
("%s", searchfield, "%s", "%s", "%s"),
|
||||||
(filters["company"], "%%%s%%" % txt, start, page_len), as_list=1)
|
(filters["company"], "%%%s%%" % txt, start, page_len), as_list=1)
|
||||||
|
|
||||||
|
def get_account_currency(account):
|
||||||
|
"""Helper function to get account currency"""
|
||||||
|
if not account:
|
||||||
|
return
|
||||||
|
def generator():
|
||||||
|
account_currency, company = frappe.db.get_value("Account", account, ["account_currency", "company"])
|
||||||
|
if not account_currency:
|
||||||
|
account_currency = frappe.db.get_value("Company", company, "default_currency")
|
||||||
|
|
||||||
|
return account_currency
|
||||||
|
|
||||||
|
return frappe.local_cache("account_currency", account, generator)
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ def create_charts(chart_name, company):
|
|||||||
"is_group": is_group,
|
"is_group": is_group,
|
||||||
"root_type": root_type,
|
"root_type": root_type,
|
||||||
"report_type": report_type,
|
"report_type": report_type,
|
||||||
"account_type": child.get("account_type")
|
"account_type": child.get("account_type"),
|
||||||
|
"account_currency": frappe.db.get_value("Company", company, "default_currency")
|
||||||
})
|
})
|
||||||
|
|
||||||
if root_account:
|
if root_account:
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"country_code": "gt",
|
||||||
|
"name": "Cuentas de Guatemala",
|
||||||
|
"is_active": "Yes",
|
||||||
|
"tree": {
|
||||||
|
"Activos": {
|
||||||
|
"Activo Corriente": {
|
||||||
|
"Caja y Bancos": {},
|
||||||
|
"Cuentas por Cobrar": {},
|
||||||
|
"Impuestos por Cobrar": {
|
||||||
|
"IVA por Cobrar": {},
|
||||||
|
"Retenciones de IVA recibidas": {}
|
||||||
|
},
|
||||||
|
"Inventario": {
|
||||||
|
"is_group": 1,
|
||||||
|
"account_type": "Stock"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"No Corriente": {
|
||||||
|
"Activos Fijos": {},
|
||||||
|
"Cargos Diferidos": {}
|
||||||
|
},
|
||||||
|
"root_type": "Asset"
|
||||||
|
},
|
||||||
|
"Pasivos": {
|
||||||
|
"Pasivo Corriente": {
|
||||||
|
"Proveedores": {
|
||||||
|
"Inventario Recibido pero No Cobrado": {
|
||||||
|
"account_type": "Stock Received But Not Billed"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Impuestos por Pagar": {},
|
||||||
|
"Sueldos por Liquidar": {},
|
||||||
|
"Prestaciones": {},
|
||||||
|
"Cuentas por Pagar": {},
|
||||||
|
"Otras Cuentas por Pagar": {},
|
||||||
|
"Acreedores": {}
|
||||||
|
},
|
||||||
|
"Pasivo No Corriente": {
|
||||||
|
"Provisión para Indemnizaciones": {},
|
||||||
|
"Acreedores": {}
|
||||||
|
},
|
||||||
|
"root_type": "Liability"
|
||||||
|
},
|
||||||
|
"Patrimonio": {
|
||||||
|
"Capital": {},
|
||||||
|
"Utilidades Retenidas": {},
|
||||||
|
"Resultados del Ejercicio": {},
|
||||||
|
"root_type": "Asset"
|
||||||
|
},
|
||||||
|
"Costos": {
|
||||||
|
"Costo de Ventas": {},
|
||||||
|
"Costos Incluidos en la Valuación": {
|
||||||
|
"account_type": "Expenses Included In Valuation"
|
||||||
|
},
|
||||||
|
"Stock Adjustment": {
|
||||||
|
"account_type": "Stock Adjustment"
|
||||||
|
},
|
||||||
|
"root_type": "Expense"
|
||||||
|
},
|
||||||
|
"Gastos": {
|
||||||
|
"Gastos de Personal": {},
|
||||||
|
"Honorarios Profesionales": {},
|
||||||
|
"Servicios Básicos": {},
|
||||||
|
"Alquileres": {},
|
||||||
|
"Seguros": {},
|
||||||
|
"Mantenimiento": {},
|
||||||
|
"Depreciaciones": {},
|
||||||
|
"Gastos Diversos": {},
|
||||||
|
"root_type": "Expense"
|
||||||
|
},
|
||||||
|
"Ingresos": {
|
||||||
|
"Productos": {},
|
||||||
|
"Servicios": {},
|
||||||
|
"root_type": "Income"
|
||||||
|
},
|
||||||
|
"Otros Gastos y Productos Financieros": {
|
||||||
|
"Otros Ingresos": {
|
||||||
|
"Otros Gastos y Productos Financieros": {
|
||||||
|
"Intereses": {},
|
||||||
|
"Otros Gastos Financieros": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Otros Gastos": {
|
||||||
|
"Otros Gastos y Productos Financieros": {
|
||||||
|
"Intereses": {},
|
||||||
|
"Otros Gastos Financieros": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root_type": "Expense"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,36 +9,39 @@ def _make_test_records(verbose):
|
|||||||
|
|
||||||
accounts = [
|
accounts = [
|
||||||
# [account_name, parent_account, is_group]
|
# [account_name, parent_account, is_group]
|
||||||
["_Test Account Bank Account", "Bank Accounts", 0, "Bank"],
|
["_Test Bank", "Bank Accounts", 0, "Bank", None],
|
||||||
|
["_Test Bank USD", "Bank Accounts", 0, "Bank", "USD"],
|
||||||
|
["_Test Bank EUR", "Bank Accounts", 0, "Bank", "EUR"],
|
||||||
|
|
||||||
["_Test Account Stock Expenses", "Direct Expenses", 1, None],
|
["_Test Account Stock Expenses", "Direct Expenses", 1, None, None],
|
||||||
["_Test Account Shipping Charges", "_Test Account Stock Expenses", 0, "Chargeable"],
|
["_Test Account Shipping Charges", "_Test Account Stock Expenses", 0, "Chargeable", None],
|
||||||
["_Test Account Customs Duty", "_Test Account Stock Expenses", 0, "Tax"],
|
["_Test Account Customs Duty", "_Test Account Stock Expenses", 0, "Tax", None],
|
||||||
["_Test Account Insurance Charges", "_Test Account Stock Expenses", 0, "Chargeable"],
|
["_Test Account Insurance Charges", "_Test Account Stock Expenses", 0, "Chargeable", None],
|
||||||
["_Test Account Stock Adjustment", "_Test Account Stock Expenses", 0, "Stock Adjustment"],
|
["_Test Account Stock Adjustment", "_Test Account Stock Expenses", 0, "Stock Adjustment", None],
|
||||||
|
|
||||||
|
["_Test Account Tax Assets", "Current Assets", 1, None, None],
|
||||||
|
["_Test Account VAT", "_Test Account Tax Assets", 0, "Tax", None],
|
||||||
|
["_Test Account Service Tax", "_Test Account Tax Assets", 0, "Tax", None],
|
||||||
|
|
||||||
["_Test Account Tax Assets", "Current Assets", 1, None],
|
["_Test Account Reserves and Surplus", "Current Liabilities", 0, None, None],
|
||||||
["_Test Account VAT", "_Test Account Tax Assets", 0, "Tax"],
|
|
||||||
["_Test Account Service Tax", "_Test Account Tax Assets", 0, "Tax"],
|
|
||||||
|
|
||||||
["_Test Account Reserves and Surplus", "Current Liabilities", 0, None],
|
["_Test Account Cost for Goods Sold", "Expenses", 0, None, None],
|
||||||
|
["_Test Account Excise Duty", "_Test Account Tax Assets", 0, "Tax", None],
|
||||||
["_Test Account Cost for Goods Sold", "Expenses", 0, None],
|
["_Test Account Education Cess", "_Test Account Tax Assets", 0, "Tax", None],
|
||||||
["_Test Account Excise Duty", "_Test Account Tax Assets", 0, "Tax"],
|
["_Test Account S&H Education Cess", "_Test Account Tax Assets", 0, "Tax", None],
|
||||||
["_Test Account Education Cess", "_Test Account Tax Assets", 0, "Tax"],
|
["_Test Account CST", "Direct Expenses", 0, "Tax", None],
|
||||||
["_Test Account S&H Education Cess", "_Test Account Tax Assets", 0, "Tax"],
|
["_Test Account Discount", "Direct Expenses", 0, None, None],
|
||||||
["_Test Account CST", "Direct Expenses", 0, "Tax"],
|
["_Test Write Off", "Indirect Expenses", 0, None, None],
|
||||||
["_Test Account Discount", "Direct Expenses", 0, None],
|
|
||||||
["_Test Write Off", "Indirect Expenses", 0, None],
|
|
||||||
|
|
||||||
# related to Account Inventory Integration
|
# related to Account Inventory Integration
|
||||||
["_Test Account Stock In Hand", "Current Assets", 0, None],
|
["_Test Account Stock In Hand", "Current Assets", 0, None, None],
|
||||||
["_Test Account Fixed Assets", "Current Assets", 0, None],
|
["_Test Account Fixed Assets", "Current Assets", 0, None, None],
|
||||||
|
|
||||||
# Receivable / Payable Account
|
# Receivable / Payable Account
|
||||||
["_Test Receivable", "Current Assets", 0, "Receivable"],
|
["_Test Receivable", "Current Assets", 0, "Receivable", None],
|
||||||
["_Test Payable", "Current Liabilities", 0, "Payable"],
|
["_Test Payable", "Current Liabilities", 0, "Payable", None],
|
||||||
|
["_Test Receivable USD", "Current Assets", 0, "Receivable", "USD"],
|
||||||
|
["_Test Payable USD", "Current Liabilities", 0, "Payable", "USD"]
|
||||||
]
|
]
|
||||||
|
|
||||||
for company, abbr in [["_Test Company", "_TC"], ["_Test Company 1", "_TC1"]]:
|
for company, abbr in [["_Test Company", "_TC"], ["_Test Company 1", "_TC1"]]:
|
||||||
@@ -48,7 +51,8 @@ def _make_test_records(verbose):
|
|||||||
"parent_account": parent_account + " - " + abbr,
|
"parent_account": parent_account + " - " + abbr,
|
||||||
"company": company,
|
"company": company,
|
||||||
"is_group": is_group,
|
"is_group": is_group,
|
||||||
"account_type": account_type
|
"account_type": account_type,
|
||||||
} for account_name, parent_account, is_group, account_type in accounts])
|
"account_currency": currency
|
||||||
|
} for account_name, parent_account, is_group, account_type, currency in accounts])
|
||||||
|
|
||||||
return test_objects
|
return test_objects
|
||||||
|
|||||||
@@ -1,55 +1,136 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"creation": "2013-06-24 15:49:57",
|
"creation": "2013-06-24 15:49:57",
|
||||||
|
"custom": 0,
|
||||||
"description": "Settings for Accounts",
|
"description": "Settings for Accounts",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "1",
|
"default": "1",
|
||||||
"description": "If enabled, the system will post accounting entries for inventory automatically.",
|
"description": "If enabled, the system will post accounting entries for inventory automatically.",
|
||||||
"fieldname": "auto_accounting_for_stock",
|
"fieldname": "auto_accounting_for_stock",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Make Accounting Entry For Every Stock Movement",
|
"label": "Make Accounting Entry For Every Stock Movement",
|
||||||
"permlevel": 0
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Accounting entry frozen up to this date, nobody can do / modify entry except role specified below.",
|
"description": "Accounting entry frozen up to this date, nobody can do / modify entry except role specified below.",
|
||||||
"fieldname": "acc_frozen_upto",
|
"fieldname": "acc_frozen_upto",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Accounts Frozen Upto",
|
"label": "Accounts Frozen Upto",
|
||||||
"permlevel": 0
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Users with this role are allowed to set frozen accounts and create / modify accounting entries against frozen accounts",
|
"description": "Users with this role are allowed to set frozen accounts and create / modify accounting entries against frozen accounts",
|
||||||
"fieldname": "frozen_accounts_modifier",
|
"fieldname": "frozen_accounts_modifier",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Role Allowed to Set Frozen Accounts & Edit Frozen Entries",
|
"label": "Role Allowed to Set Frozen Accounts & Edit Frozen Entries",
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Role",
|
"options": "Role",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Role that is allowed to submit transactions that exceed credit limits set.",
|
"description": "Role that is allowed to submit transactions that exceed credit limits set.",
|
||||||
"fieldname": "credit_controller",
|
"fieldname": "credit_controller",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Credit Controller",
|
"label": "Credit Controller",
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Role",
|
"options": "Role",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "check_supplier_invoice_uniqueness",
|
"fieldname": "check_supplier_invoice_uniqueness",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Check Supplier Invoice Number Uniqueness",
|
"label": "Check Supplier Invoice Number Uniqueness",
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-cog",
|
"icon": "icon-cog",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
|
"istable": 0,
|
||||||
"modified": "2015-07-14 00:51:48.095525",
|
"modified": "2015-07-14 00:51:48.095525",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
@@ -57,14 +138,26 @@
|
|||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
|
"report": 0,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,9 @@ class AccountsSettings(Document):
|
|||||||
if cint(self.auto_accounting_for_stock):
|
if cint(self.auto_accounting_for_stock):
|
||||||
# set default perpetual account in company
|
# set default perpetual account in company
|
||||||
for company in frappe.db.sql("select name from tabCompany"):
|
for company in frappe.db.sql("select name from tabCompany"):
|
||||||
frappe.get_doc("Company", company[0]).save()
|
company = frappe.get_doc("Company", company[0])
|
||||||
|
company.flags.ignore_permissions = True
|
||||||
|
company.save()
|
||||||
|
|
||||||
# Create account head for warehouses
|
# Create account head for warehouses
|
||||||
warehouse_list = frappe.db.sql("select name, company from tabWarehouse", as_dict=1)
|
warehouse_list = frappe.db.sql("select name, company from tabWarehouse", as_dict=1)
|
||||||
@@ -25,4 +27,5 @@ class AccountsSettings(Document):
|
|||||||
frappe.throw(_("Company is missing in warehouses {0}").format(comma_and(warehouse_with_no_company)))
|
frappe.throw(_("Company is missing in warehouses {0}").format(comma_and(warehouse_with_no_company)))
|
||||||
for wh in warehouse_list:
|
for wh in warehouse_list:
|
||||||
wh_doc = frappe.get_doc("Warehouse", wh.name)
|
wh_doc = frappe.get_doc("Warehouse", wh.name)
|
||||||
|
wh_doc.flags.ignore_permissions = True
|
||||||
wh_doc.save()
|
wh_doc.save()
|
||||||
|
|||||||
@@ -2,6 +2,25 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.ui.form.on("Bank Reconciliation", {
|
frappe.ui.form.on("Bank Reconciliation", {
|
||||||
|
setup: function(frm) {
|
||||||
|
frm.get_docfield("journal_entries").allow_bulk_edit = 1;
|
||||||
|
frm.add_fetch("bank_account", "account_currency", "account_currency");
|
||||||
|
},
|
||||||
|
|
||||||
|
onload: function(frm) {
|
||||||
|
frm.set_query("bank_account", function() {
|
||||||
|
return {
|
||||||
|
"filters": {
|
||||||
|
"account_type": "Bank",
|
||||||
|
"is_group": 0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
frm.set_value("from_date", frappe.datetime.month_start());
|
||||||
|
frm.set_value("to_date", frappe.datetime.month_end());
|
||||||
|
},
|
||||||
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frm.disable_save();
|
frm.disable_save();
|
||||||
},
|
},
|
||||||
@@ -22,19 +41,3 @@ frappe.ui.form.on("Bank Reconciliation", {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|
||||||
cur_frm.add_fetch("bank_account", "company", "company");
|
|
||||||
|
|
||||||
cur_frm.set_query("bank_account", function() {
|
|
||||||
return {
|
|
||||||
"filters": {
|
|
||||||
"account_type": "Bank",
|
|
||||||
"is_group": 0
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
cur_frm.set_value("from_date", frappe.datetime.month_start());
|
|
||||||
cur_frm.set_value("to_date", frappe.datetime.month_end());
|
|
||||||
}
|
|
||||||
@@ -1,91 +1,239 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 1,
|
"allow_copy": 1,
|
||||||
"allow_email": 1,
|
"allow_import": 0,
|
||||||
"allow_print": 1,
|
"allow_rename": 0,
|
||||||
"creation": "2013-01-10 16:34:05",
|
"creation": "2013-01-10 16:34:05",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Select account head of the bank where cheque was deposited.",
|
"description": "Select account head of the bank where cheque was deposited.",
|
||||||
"fieldname": "bank_account",
|
"fieldname": "bank_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Bank Account",
|
"label": "Bank Account",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "company",
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "account_currency",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"in_list_view": 1,
|
"ignore_user_permissions": 0,
|
||||||
"label": "Company",
|
"in_filter": 0,
|
||||||
"options": "Company",
|
"in_list_view": 0,
|
||||||
|
"label": "Account Currency",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"reqd": 0
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "from_date",
|
"fieldname": "from_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "From Date",
|
"label": "From Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "to_date",
|
"fieldname": "to_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "To Date",
|
"label": "To Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "include_reconciled_entries",
|
"fieldname": "include_reconciled_entries",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Include Reconciled Entries",
|
"label": "Include Reconciled Entries",
|
||||||
"permlevel": 0
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "get_relevant_entries",
|
"fieldname": "get_relevant_entries",
|
||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Get Relevant Entries",
|
"label": "Get Relevant Entries",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "",
|
"options": "",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "journal_entries",
|
"fieldname": "journal_entries",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Journal Entries",
|
"label": "Journal Entries",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Bank Reconciliation Detail",
|
"options": "Bank Reconciliation Detail",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "update_clearance_date",
|
"fieldname": "update_clearance_date",
|
||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Update Clearance Date",
|
"label": "Update Clearance Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "",
|
"options": "",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "total_amount",
|
"fieldname": "total_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Total Amount",
|
"label": "Total Amount",
|
||||||
"options": "Company:company:default_currency",
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_heading": 1,
|
"hide_heading": 1,
|
||||||
"hide_toolbar": 1,
|
"hide_toolbar": 1,
|
||||||
"icon": "icon-check",
|
"icon": "icon-check",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"modified": "2015-02-05 05:11:34.776660",
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"menu_index": 0,
|
||||||
|
"modified": "2015-11-30 12:44:45.105451",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Bank Reconciliation",
|
"name": "Bank Reconciliation",
|
||||||
@@ -96,14 +244,23 @@
|
|||||||
"apply_user_permissions": 0,
|
"apply_user_permissions": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"report": 0,
|
||||||
"role": "Accounts User",
|
"role": "Accounts User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"read_only": 1
|
"read_only": 1,
|
||||||
|
"read_only_onload": 0,
|
||||||
|
"version": 0
|
||||||
}
|
}
|
||||||
@@ -15,12 +15,11 @@ class BankReconciliation(Document):
|
|||||||
|
|
||||||
condition = ""
|
condition = ""
|
||||||
if not self.include_reconciled_entries:
|
if not self.include_reconciled_entries:
|
||||||
condition = "and ifnull(clearance_date, '') in ('', '0000-00-00')"
|
condition = "and (clearance_date is null or clearance_date='0000-00-00')"
|
||||||
|
|
||||||
|
|
||||||
dl = frappe.db.sql("""select t1.name, t1.cheque_no, t1.cheque_date, t2.debit,
|
dl = frappe.db.sql("""select t1.name, t1.cheque_no, t1.cheque_date, t2.debit_in_account_currency,
|
||||||
t2.credit, t1.posting_date, t2.against_account, t1.clearance_date,
|
t2.credit_in_account_currency, t1.posting_date, t2.against_account, t1.clearance_date
|
||||||
t2.reference_type, t2.reference_name
|
|
||||||
from
|
from
|
||||||
`tabJournal Entry` t1, `tabJournal Entry Account` t2
|
`tabJournal Entry` t1, `tabJournal Entry Account` t2
|
||||||
where
|
where
|
||||||
@@ -39,11 +38,11 @@ class BankReconciliation(Document):
|
|||||||
nl.voucher_id = d.name
|
nl.voucher_id = d.name
|
||||||
nl.cheque_number = d.cheque_no
|
nl.cheque_number = d.cheque_no
|
||||||
nl.cheque_date = d.cheque_date
|
nl.cheque_date = d.cheque_date
|
||||||
nl.debit = d.debit
|
nl.debit = d.debit_in_account_currency
|
||||||
nl.credit = d.credit
|
nl.credit = d.credit_in_account_currency
|
||||||
nl.against_account = d.against_account
|
nl.against_account = d.against_account
|
||||||
nl.clearance_date = d.clearance_date
|
nl.clearance_date = d.clearance_date
|
||||||
self.total_amount += flt(d.debit) - flt(d.credit)
|
self.total_amount += flt(d.debit_in_account_currency) - flt(d.credit_in_account_currency)
|
||||||
|
|
||||||
def update_details(self):
|
def update_details(self):
|
||||||
vouchers = []
|
vouchers = []
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "voucher_id",
|
"fieldname": "voucher_id",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -16,12 +18,14 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Voucher ID",
|
"label": "Voucher ID",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "voucher_id",
|
"oldfieldname": "voucher_id",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Journal Entry",
|
"options": "Journal Entry",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -31,27 +35,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"fieldname": "clearance_date",
|
"bold": 0,
|
||||||
"fieldtype": "Date",
|
"collapsible": 0,
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Clearance Date",
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "clearance_date",
|
|
||||||
"oldfieldtype": "Date",
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"fieldname": "against_account",
|
"fieldname": "against_account",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -59,11 +44,13 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Against Account",
|
"label": "Against Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "against_account",
|
"oldfieldname": "against_account",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -73,27 +60,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"fieldname": "cheque_number",
|
"bold": 0,
|
||||||
"fieldtype": "Data",
|
"collapsible": 0,
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Cheque Number",
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "cheque_number",
|
|
||||||
"oldfieldtype": "Data",
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"read_only": 1,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"fieldname": "debit",
|
"fieldname": "debit",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -101,12 +69,14 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Debit",
|
"label": "Debit",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "debit",
|
"oldfieldname": "debit",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -116,6 +86,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "credit",
|
"fieldname": "credit",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -123,12 +95,14 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Credit",
|
"label": "Credit",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "credit",
|
"oldfieldname": "credit",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -138,48 +112,32 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"fieldname": "reference_type",
|
"bold": 0,
|
||||||
"fieldtype": "Link",
|
"collapsible": 0,
|
||||||
|
"fieldname": "column_break_5",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Reference Type",
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "DocType",
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0,
|
||||||
},
|
"width": "50%"
|
||||||
{
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"fieldname": "reference_name",
|
|
||||||
"fieldtype": "Dynamic Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"label": "Reference Name",
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "reference_type",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"read_only": 1,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "posting_date",
|
"fieldname": "posting_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -187,11 +145,13 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Posting Date",
|
"label": "Posting Date",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "posting_date",
|
"oldfieldname": "posting_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -201,24 +161,101 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "cheque_number",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Cheque Number",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"oldfieldname": "cheque_number",
|
||||||
|
"oldfieldtype": "Data",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "cheque_date",
|
"fieldname": "cheque_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 0,
|
||||||
"label": "Cheque Date",
|
"label": "Cheque Date",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "cheque_date",
|
"oldfieldname": "cheque_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "clearance_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Clearance Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"oldfieldname": "clearance_date",
|
||||||
|
"oldfieldtype": "Date",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "data_10",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
@@ -229,12 +266,15 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-08-10 16:59:43.974705",
|
"max_attachments": 0,
|
||||||
|
"menu_index": 0,
|
||||||
|
"modified": "2015-12-04 11:01:24.286320",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Bank Reconciliation Detail",
|
"name": "Bank Reconciliation Detail",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0
|
"read_only_onload": 0,
|
||||||
|
"version": 0
|
||||||
}
|
}
|
||||||
@@ -1,55 +1,106 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"autoname": "hash",
|
"autoname": "hash",
|
||||||
"creation": "2013-03-07 11:55:04",
|
"creation": "2013-03-07 11:55:04",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "account",
|
"fieldname": "account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Account",
|
"label": "Account",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "account",
|
"oldfieldname": "account",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "budget_allocated",
|
"fieldname": "budget_allocated",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Budget Allocated",
|
"label": "Budget Allocated",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "budget_allocated",
|
"oldfieldname": "budget_allocated",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "fiscal_year",
|
"fieldname": "fiscal_year",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Fiscal Year",
|
"label": "Fiscal Year",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "fiscal_year",
|
"oldfieldname": "fiscal_year",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "Fiscal Year",
|
"options": "Fiscal Year",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-02-19 01:06:59.471417",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:43.050558",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Budget Detail",
|
"name": "Budget Detail",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC"
|
"sort_order": "DESC"
|
||||||
}
|
}
|
||||||
@@ -1,184 +1,431 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
|
"allow_rename": 0,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
"creation": "2013-03-07 11:55:06",
|
"creation": "2013-03-07 11:55:06",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break0",
|
"fieldname": "column_break0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "50%",
|
"print_width": "50%",
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "naming_series",
|
"fieldname": "naming_series",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Series",
|
"label": "Series",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "C-FORM-",
|
"options": "C-FORM-",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "c_form_no",
|
"fieldname": "c_form_no",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "C-Form No",
|
"label": "C-Form No",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "received_date",
|
"fieldname": "received_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Received Date",
|
"label": "Received Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "customer",
|
"fieldname": "customer",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Customer",
|
"label": "Customer",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Customer",
|
"options": "Customer",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break1",
|
"fieldname": "column_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "50%",
|
"print_width": "50%",
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "fiscal_year",
|
"fieldname": "fiscal_year",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Fiscal Year",
|
"label": "Fiscal Year",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Fiscal Year",
|
"options": "Fiscal Year",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "quarter",
|
"fieldname": "quarter",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Quarter",
|
"label": "Quarter",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "\nI\nII\nIII\nIV",
|
"options": "\nI\nII\nIII\nIV",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "total_amount",
|
"fieldname": "total_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Total Amount",
|
"label": "Total Amount",
|
||||||
"options": "Company:company:default_currency",
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"read_only": 0,
|
|
||||||
"reqd": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "state",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"label": "State",
|
|
||||||
"permlevel": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"reqd": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "section_break0",
|
|
||||||
"fieldtype": "Section Break",
|
|
||||||
"permlevel": 0,
|
|
||||||
"read_only": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "invoices",
|
|
||||||
"fieldtype": "Table",
|
|
||||||
"label": "Invoices",
|
|
||||||
"options": "C-Form Invoice Detail",
|
|
||||||
"permlevel": 0,
|
|
||||||
"read_only": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "total_invoiced_amount",
|
|
||||||
"fieldtype": "Currency",
|
|
||||||
"label": "Total Invoiced Amount",
|
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"read_only": 1
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "state",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "State",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "section_break0",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "invoices",
|
||||||
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Invoices",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "C-Form Invoice Detail",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "total_invoiced_amount",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Total Invoiced Amount",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "C-Form",
|
"options": "C-Form",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
"max_attachments": 3,
|
"max_attachments": 3,
|
||||||
"modified": "2015-02-05 05:11:35.427357",
|
"modified": "2015-11-16 06:29:43.143528",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "C-Form",
|
"name": "C-Form",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"apply_user_permissions": 1,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts User",
|
"role": "Accounts User",
|
||||||
"share": 1,
|
"set_user_permissions": 0,
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"create": 1,
|
|
||||||
"email": 1,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print": 1,
|
|
||||||
"read": 1,
|
|
||||||
"report": 1,
|
|
||||||
"role": "Accounts Manager",
|
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 1,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 1,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 1,
|
"permlevel": 1,
|
||||||
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "All",
|
"role": "All",
|
||||||
"submit": 0
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
12
erpnext/accounts/doctype/c_form/test_c_form.py
Normal file
12
erpnext/accounts/doctype/c_form/test_c_form.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
# test_records = frappe.get_test_records('C-Form')
|
||||||
|
|
||||||
|
class TestCForm(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -1,69 +1,153 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"creation": "2013-02-22 01:27:38",
|
"creation": "2013-02-22 01:27:38",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "invoice_no",
|
"fieldname": "invoice_no",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Invoice No",
|
"label": "Invoice No",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Sales Invoice",
|
"options": "Sales Invoice",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "160px",
|
"print_width": "160px",
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "160px"
|
"width": "160px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "invoice_date",
|
"fieldname": "invoice_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Invoice Date",
|
"label": "Invoice Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "120px",
|
"print_width": "120px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "120px"
|
"width": "120px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "",
|
"description": "",
|
||||||
"fieldname": "territory",
|
"fieldname": "territory",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Territory",
|
"label": "Territory",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Territory",
|
"options": "Territory",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "120px",
|
"print_width": "120px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "120px"
|
"width": "120px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "net_total",
|
"fieldname": "net_total",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Net Total",
|
"label": "Net Total",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "120px",
|
"print_width": "120px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "120px"
|
"width": "120px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "grand_total",
|
"fieldname": "grand_total",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Grand Total",
|
"label": "Grand Total",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "120px",
|
"print_width": "120px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "120px"
|
"width": "120px"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-01-01 14:29:58.597428",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:43.221484",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "C-Form Invoice Detail",
|
"name": "C-Form Invoice Detail",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": []
|
"permissions": [],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
@@ -17,8 +17,7 @@ erpnext.accounts.CostCenterController = frappe.ui.form.Controller.extend({
|
|||||||
return {
|
return {
|
||||||
filters:[
|
filters:[
|
||||||
['Account', 'company', '=', me.frm.doc.company],
|
['Account', 'company', '=', me.frm.doc.company],
|
||||||
['Account', 'root_type', '=', 'Expense'],
|
['Account', 'is_group', '=', '0']
|
||||||
['Account', 'is_group', '=', '0'],
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,142 +4,314 @@
|
|||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:cost_center_name",
|
"autoname": "field:cost_center_name",
|
||||||
"creation": "2013-01-23 19:57:17",
|
"creation": "2013-01-23 19:57:17",
|
||||||
|
"custom": 0,
|
||||||
"description": "Track separate Income and Expense for product verticals or divisions.",
|
"description": "Track separate Income and Expense for product verticals or divisions.",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Setup",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "sb0",
|
"fieldname": "sb0",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
"permlevel": 0
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "cost_center_name",
|
"fieldname": "cost_center_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Cost Center Name",
|
"label": "Cost Center Name",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "cost_center_name",
|
"oldfieldname": "cost_center_name",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "parent_cost_center",
|
"fieldname": "parent_cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Parent Cost Center",
|
"label": "Parent Cost Center",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "parent_cost_center",
|
"oldfieldname": "parent_cost_center",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Cost Center",
|
"options": "Cost Center",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "company_name",
|
"oldfieldname": "company_name",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "cb0",
|
"fieldname": "cb0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "0",
|
"default": "0",
|
||||||
"fieldname": "is_group",
|
"fieldname": "is_group",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Is Group",
|
"label": "Is Group",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Define Budget for this Cost Center. To set budget action, see \"Company List\"",
|
"description": "Define Budget for this Cost Center. To set budget action, see \"Company List\"",
|
||||||
"fieldname": "sb1",
|
"fieldname": "sb1",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Budget",
|
"label": "Budget",
|
||||||
"permlevel": 0
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Select Monthly Distribution, if you want to track based on seasonality.",
|
"description": "Select Monthly Distribution, if you want to track based on seasonality.",
|
||||||
"fieldname": "distribution_id",
|
"fieldname": "distribution_id",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Distribution Id",
|
"label": "Distribution Id",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "distribution_id",
|
"oldfieldname": "distribution_id",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Monthly Distribution",
|
"options": "Monthly Distribution",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Add rows to set annual budgets on Accounts.",
|
"description": "Add rows to set annual budgets on Accounts.",
|
||||||
"fieldname": "budgets",
|
"fieldname": "budgets",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Budgets",
|
"label": "Budgets",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "budget_details",
|
"oldfieldname": "budget_details",
|
||||||
"oldfieldtype": "Table",
|
"oldfieldtype": "Table",
|
||||||
"options": "Budget Detail",
|
"options": "Budget Detail",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "lft",
|
"fieldname": "lft",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "lft",
|
"label": "lft",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "lft",
|
"oldfieldname": "lft",
|
||||||
"oldfieldtype": "Int",
|
"oldfieldtype": "Int",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 1,
|
"report_hide": 1,
|
||||||
"search_index": 1
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "rgt",
|
"fieldname": "rgt",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "rgt",
|
"label": "rgt",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "rgt",
|
"oldfieldname": "rgt",
|
||||||
"oldfieldtype": "Int",
|
"oldfieldtype": "Int",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 1,
|
"report_hide": 1,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 1
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "old_parent",
|
"fieldname": "old_parent",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "old_parent",
|
"label": "old_parent",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "old_parent",
|
"oldfieldname": "old_parent",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"options": "Cost Center",
|
"options": "Cost Center",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"report_hide": 1
|
"read_only": 0,
|
||||||
|
"report_hide": 1,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-money",
|
"icon": "icon-money",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"modified": "2015-07-13 05:28:25.504801",
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:43.870712",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Cost Center",
|
"name": "Cost Center",
|
||||||
@@ -147,50 +319,106 @@
|
|||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 1,
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts User",
|
"role": "Accounts User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"apply_user_permissions": 1,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"role": "Sales User"
|
"report": 0,
|
||||||
|
"role": "Sales User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"apply_user_permissions": 1,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"role": "Purchase User"
|
"report": 0,
|
||||||
|
"role": "Purchase User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"apply_user_permissions": 1,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"role": "Stock User"
|
"report": 0,
|
||||||
|
"role": "Stock User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
"search_fields": "parent_cost_center, is_group"
|
"search_fields": "parent_cost_center, is_group"
|
||||||
}
|
}
|
||||||
@@ -32,13 +32,13 @@ class CostCenter(NestedSet):
|
|||||||
for d in self.get('budgets'):
|
for d in self.get('budgets'):
|
||||||
if d.account:
|
if d.account:
|
||||||
account_details = frappe.db.get_value("Account", d.account,
|
account_details = frappe.db.get_value("Account", d.account,
|
||||||
["is_group", "company", "root_type"], as_dict=1)
|
["is_group", "company", "report_type"], as_dict=1)
|
||||||
if account_details.is_group:
|
if account_details.is_group:
|
||||||
frappe.throw(_("Budget cannot be assigned against Group Account {0}").format(d.account))
|
frappe.throw(_("Budget cannot be assigned against Group Account {0}").format(d.account))
|
||||||
elif account_details.company != self.company:
|
elif account_details.company != self.company:
|
||||||
frappe.throw(_("Account {0} does not belongs to company {1}").format(d.account, self.company))
|
frappe.throw(_("Account {0} does not belongs to company {1}").format(d.account, self.company))
|
||||||
elif account_details.root_type != "Expense":
|
elif account_details.report_type != "Profit and Loss":
|
||||||
frappe.throw(_("Budget cannot be assigned against {0}, as it's not an Expense account")
|
frappe.throw(_("Budget cannot be assigned against {0}, as it's not an Income or Expense account")
|
||||||
.format(d.account))
|
.format(d.account))
|
||||||
|
|
||||||
if [d.account, d.fiscal_year] in check_acc_list:
|
if [d.account, d.fiscal_year] in check_acc_list:
|
||||||
|
|||||||
@@ -1,142 +1,273 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
|
"allow_rename": 0,
|
||||||
"autoname": "field:year",
|
"autoname": "field:year",
|
||||||
"creation": "2013-01-22 16:50:25",
|
"creation": "2013-01-22 16:50:25",
|
||||||
|
"custom": 0,
|
||||||
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
|
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Setup",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "For e.g. 2012, 2012-13",
|
"description": "For e.g. 2012, 2012-13",
|
||||||
"fieldname": "year",
|
"fieldname": "year",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Year Name",
|
"label": "Year Name",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "year",
|
"oldfieldname": "year",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "disabled",
|
"fieldname": "disabled",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Disabled",
|
"label": "Disabled",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "year_start_date",
|
"fieldname": "year_start_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Year Start Date",
|
"label": "Year Start Date",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "year_start_date",
|
"oldfieldname": "year_start_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "year_end_date",
|
"fieldname": "year_end_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Year End Date",
|
"label": "Year End Date",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "companies",
|
"fieldname": "companies",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Companies",
|
"label": "Companies",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Fiscal Year Company",
|
"options": "Fiscal Year Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-calendar",
|
"icon": "icon-calendar",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2015-07-13 05:28:27.745408",
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:47.289982",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Fiscal Year",
|
"name": "Fiscal Year",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "System Manager",
|
"role": "System Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"apply_user_permissions": 1,
|
"amend": 0,
|
||||||
"delete": 0,
|
"apply_user_permissions": 0,
|
||||||
"email": 0,
|
"cancel": 0,
|
||||||
"permlevel": 0,
|
|
||||||
"print": 0,
|
|
||||||
"read": 1,
|
|
||||||
"role": "Sales User"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 0,
|
"email": 0,
|
||||||
"export": 0,
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print": 0,
|
||||||
|
"read": 1,
|
||||||
|
"report": 0,
|
||||||
|
"role": "Sales User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 0,
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"report": 0,
|
||||||
"role": "Purchase User",
|
"role": "Purchase User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 0,
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 0,
|
"email": 0,
|
||||||
"export": 0,
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 0,
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"report": 0,
|
||||||
"role": "Accounts User",
|
"role": "Accounts User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 0,
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 0,
|
"email": 0,
|
||||||
"export": 0,
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 0,
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"report": 0,
|
||||||
"role": "Stock User",
|
"role": "Stock User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 0,
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 0,
|
"email": 0,
|
||||||
"export": 0,
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 0,
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"report": 0,
|
||||||
"role": "Employee",
|
"role": "Employee",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 0,
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
"sort_field": "name",
|
"sort_field": "name",
|
||||||
"sort_order": "DESC"
|
"sort_order": "DESC"
|
||||||
}
|
}
|
||||||
@@ -28,5 +28,11 @@
|
|||||||
"year": "_Test Fiscal Year 2016",
|
"year": "_Test Fiscal Year 2016",
|
||||||
"year_end_date": "2016-12-31",
|
"year_end_date": "2016-12-31",
|
||||||
"year_start_date": "2016-01-01"
|
"year_start_date": "2016-01-01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype": "Fiscal Year",
|
||||||
|
"year": "_Test Fiscal Year 2017",
|
||||||
|
"year_end_date": "2017-12-31",
|
||||||
|
"year_start_date": "2017-01-01"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -6,10 +6,12 @@
|
|||||||
"custom": 0,
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Setup",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -17,6 +19,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -37,7 +40,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-10-02 13:35:44.155278",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:47.344839",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Fiscal Year Company",
|
"name": "Fiscal Year Company",
|
||||||
|
|||||||
@@ -1,199 +1,541 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"autoname": "GL.#######",
|
"autoname": "GL.#######",
|
||||||
"creation": "2013-01-10 16:34:06",
|
"creation": "2013-01-10 16:34:06",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "posting_date",
|
"fieldname": "posting_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Posting Date",
|
"label": "Posting Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "posting_date",
|
"oldfieldname": "posting_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "transaction_date",
|
"fieldname": "transaction_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Transaction Date",
|
"label": "Transaction Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "transaction_date",
|
"oldfieldname": "transaction_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "account",
|
"fieldname": "account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Account",
|
"label": "Account",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "account",
|
"oldfieldname": "account",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "party_type",
|
"fieldname": "party_type",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Party Type",
|
"label": "Party Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "DocType",
|
"options": "DocType",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "party",
|
"fieldname": "party",
|
||||||
"fieldtype": "Dynamic Link",
|
"fieldtype": "Dynamic Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Party",
|
"label": "Party",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "party_type",
|
"options": "party_type",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "cost_center",
|
"oldfieldname": "cost_center",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Cost Center",
|
"options": "Cost Center",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "debit",
|
"fieldname": "debit",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Debit Amt",
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Debit Amount",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "debit",
|
"oldfieldname": "debit",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "credit",
|
"fieldname": "credit",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Credit Amt",
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Credit Amount",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "credit",
|
"oldfieldname": "credit",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "account_currency",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Account Currency",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Currency",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "debit_in_account_currency",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Debit Amount in Account Currency",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "currency",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "credit_in_account_currency",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Credit Amount in Account Currency",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "currency",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "against",
|
"fieldname": "against",
|
||||||
"fieldtype": "Text",
|
"fieldtype": "Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Against",
|
"label": "Against",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "against",
|
"oldfieldname": "against",
|
||||||
"oldfieldtype": "Text",
|
"oldfieldtype": "Text",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "against_voucher_type",
|
"fieldname": "against_voucher_type",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Against Voucher Type",
|
"label": "Against Voucher Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "against_voucher_type",
|
"oldfieldname": "against_voucher_type",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"options": "DocType",
|
"options": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "against_voucher",
|
"fieldname": "against_voucher",
|
||||||
"fieldtype": "Dynamic Link",
|
"fieldtype": "Dynamic Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Against Voucher",
|
"label": "Against Voucher",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "against_voucher",
|
"oldfieldname": "against_voucher",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"options": "against_voucher_type",
|
"options": "against_voucher_type",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "voucher_type",
|
"fieldname": "voucher_type",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Voucher Type",
|
"label": "Voucher Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "voucher_type",
|
"oldfieldname": "voucher_type",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "DocType",
|
"options": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "voucher_no",
|
"fieldname": "voucher_no",
|
||||||
"fieldtype": "Dynamic Link",
|
"fieldtype": "Dynamic Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Voucher No",
|
"label": "Voucher No",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "voucher_no",
|
"oldfieldname": "voucher_no",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"options": "voucher_type",
|
"options": "voucher_type",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "remarks",
|
"fieldname": "remarks",
|
||||||
"fieldtype": "Text",
|
"fieldtype": "Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Remarks",
|
"label": "Remarks",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "remarks",
|
"oldfieldname": "remarks",
|
||||||
"oldfieldtype": "Text",
|
"oldfieldtype": "Text",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "is_opening",
|
"fieldname": "is_opening",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Is Opening",
|
"label": "Is Opening",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "is_opening",
|
"oldfieldname": "is_opening",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "No\nYes",
|
"options": "No\nYes",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "is_advance",
|
"fieldname": "is_advance",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Is Advance",
|
"label": "Is Advance",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "is_advance",
|
"oldfieldname": "is_advance",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "No\nYes",
|
"options": "No\nYes",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "fiscal_year",
|
"fieldname": "fiscal_year",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Fiscal Year",
|
"label": "Fiscal Year",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "fiscal_year",
|
"oldfieldname": "fiscal_year",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "Fiscal Year",
|
"options": "Fiscal Year",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "company",
|
"oldfieldname": "company",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-list",
|
"icon": "icon-list",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"in_create": 1,
|
"in_create": 1,
|
||||||
"modified": "2015-07-09 15:51:04.986518",
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:47.382225",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "GL Entry",
|
"name": "GL Entry",
|
||||||
@@ -201,45 +543,67 @@
|
|||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 1,
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts User",
|
"role": "Accounts User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 0,
|
"email": 0,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 0,
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Auditor",
|
"role": "Auditor",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 0,
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
"search_fields": "voucher_no,account,posting_date,against_voucher",
|
"search_fields": "voucher_no,account,posting_date,against_voucher",
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC"
|
"sort_order": "DESC"
|
||||||
|
|||||||
@@ -3,13 +3,15 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
from frappe.utils import flt, fmt_money, getdate, formatdate, cstr
|
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
from frappe.utils import flt, fmt_money, getdate, formatdate
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
from erpnext.accounts.party import validate_party_gle_currency
|
||||||
|
from erpnext.accounts.utils import get_account_currency
|
||||||
|
from erpnext.setup.doctype.company.company import get_company_currency
|
||||||
|
from erpnext.exceptions import InvalidAccountCurrency, CustomerFrozen
|
||||||
|
|
||||||
class CustomerFrozen(frappe.ValidationError): pass
|
exclude_from_linked_with = True
|
||||||
|
|
||||||
class GLEntry(Document):
|
class GLEntry(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
@@ -20,6 +22,7 @@ class GLEntry(Document):
|
|||||||
self.check_pl_account()
|
self.check_pl_account()
|
||||||
self.validate_cost_center()
|
self.validate_cost_center()
|
||||||
self.validate_party()
|
self.validate_party()
|
||||||
|
self.validate_currency()
|
||||||
|
|
||||||
def on_update_with_args(self, adv_adj, update_outstanding = 'Yes'):
|
def on_update_with_args(self, adv_adj, update_outstanding = 'Yes'):
|
||||||
self.validate_account_details(adv_adj)
|
self.validate_account_details(adv_adj)
|
||||||
@@ -99,11 +102,25 @@ class GLEntry(Document):
|
|||||||
if frappe.db.get_value(self.party_type, self.party, "is_frozen"):
|
if frappe.db.get_value(self.party_type, self.party, "is_frozen"):
|
||||||
frappe.throw("{0} {1} is frozen".format(self.party_type, self.party), CustomerFrozen)
|
frappe.throw("{0} {1} is frozen".format(self.party_type, self.party), CustomerFrozen)
|
||||||
|
|
||||||
|
def validate_currency(self):
|
||||||
|
company_currency = get_company_currency(self.company)
|
||||||
|
account_currency = get_account_currency(self.account)
|
||||||
|
|
||||||
|
if not self.account_currency:
|
||||||
|
self.account_currency = company_currency
|
||||||
|
|
||||||
|
if account_currency != self.account_currency:
|
||||||
|
frappe.throw(_("Accounting Entry for {0} can only be made in currency: {1}")
|
||||||
|
.format(self.account, (account_currency or company_currency)), InvalidAccountCurrency)
|
||||||
|
|
||||||
|
if self.party_type and self.party:
|
||||||
|
validate_party_gle_currency(self.party_type, self.party, self.company, self.account_currency)
|
||||||
|
|
||||||
def validate_balance_type(account, adv_adj=False):
|
def validate_balance_type(account, adv_adj=False):
|
||||||
if not adv_adj and account:
|
if not adv_adj and account:
|
||||||
balance_must_be = frappe.db.get_value("Account", account, "balance_must_be")
|
balance_must_be = frappe.db.get_value("Account", account, "balance_must_be")
|
||||||
if balance_must_be:
|
if balance_must_be:
|
||||||
balance = frappe.db.sql("""select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
|
balance = frappe.db.sql("""select sum(debit) - sum(credit)
|
||||||
from `tabGL Entry` where account = %s""", account)[0][0]
|
from `tabGL Entry` where account = %s""", account)[0][0]
|
||||||
|
|
||||||
if (balance_must_be=="Debit" and flt(balance) < 0) or \
|
if (balance_must_be=="Debit" and flt(balance) < 0) or \
|
||||||
@@ -124,22 +141,28 @@ def check_freezing_date(posting_date, adv_adj=False):
|
|||||||
frappe.throw(_("You are not authorized to add or update entries before {0}").format(formatdate(acc_frozen_upto)))
|
frappe.throw(_("You are not authorized to add or update entries before {0}").format(formatdate(acc_frozen_upto)))
|
||||||
|
|
||||||
def update_outstanding_amt(account, party_type, party, against_voucher_type, against_voucher, on_cancel=False):
|
def update_outstanding_amt(account, party_type, party, against_voucher_type, against_voucher, on_cancel=False):
|
||||||
|
if party_type and party:
|
||||||
|
party_condition = " and party_type='{0}' and party='{1}'"\
|
||||||
|
.format(frappe.db.escape(party_type), frappe.db.escape(party))
|
||||||
|
else:
|
||||||
|
party_condition = ""
|
||||||
|
|
||||||
# get final outstanding amt
|
# get final outstanding amt
|
||||||
bal = flt(frappe.db.sql("""select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
|
bal = flt(frappe.db.sql("""
|
||||||
|
select sum(debit_in_account_currency) - sum(credit_in_account_currency)
|
||||||
from `tabGL Entry`
|
from `tabGL Entry`
|
||||||
where against_voucher_type=%s and against_voucher=%s
|
where against_voucher_type=%s and against_voucher=%s
|
||||||
and account = %s and ifnull(party_type, '')=%s and ifnull(party, '')=%s""",
|
and account = %s {0}""".format(party_condition),
|
||||||
(against_voucher_type, against_voucher, account, party_type, party))[0][0] or 0.0)
|
(against_voucher_type, against_voucher, account))[0][0] or 0.0)
|
||||||
|
|
||||||
if against_voucher_type == 'Purchase Invoice':
|
if against_voucher_type == 'Purchase Invoice':
|
||||||
bal = -bal
|
bal = -bal
|
||||||
elif against_voucher_type == "Journal Entry":
|
elif against_voucher_type == "Journal Entry":
|
||||||
against_voucher_amount = flt(frappe.db.sql("""
|
against_voucher_amount = flt(frappe.db.sql("""
|
||||||
select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
|
select sum(debit_in_account_currency) - sum(credit_in_account_currency)
|
||||||
from `tabGL Entry` where voucher_type = 'Journal Entry' and voucher_no = %s
|
from `tabGL Entry` where voucher_type = 'Journal Entry' and voucher_no = %s
|
||||||
and account = %s and ifnull(party_type, '')=%s and ifnull(party, '')=%s
|
and account = %s and (against_voucher is null or against_voucher='') {0}"""
|
||||||
and ifnull(against_voucher, '') = ''""",
|
.format(party_condition), (against_voucher, account))[0][0])
|
||||||
(against_voucher, account, cstr(party_type), cstr(party)))[0][0])
|
|
||||||
|
|
||||||
if not against_voucher_amount:
|
if not against_voucher_amount:
|
||||||
frappe.throw(_("Against Journal Entry {0} is already adjusted against some other voucher")
|
frappe.throw(_("Against Journal Entry {0} is already adjusted against some other voucher")
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class TestGLEntry(unittest.TestCase):
|
|||||||
frappe.db.set_value("Company", "_Test Company", "round_off_cost_center", "_Test Cost Center - _TC")
|
frappe.db.set_value("Company", "_Test Company", "round_off_cost_center", "_Test Cost Center - _TC")
|
||||||
|
|
||||||
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
||||||
"_Test Account Bank Account - _TC", 100, "_Test Cost Center - _TC", submit=False)
|
"_Test Bank - _TC", 100, "_Test Cost Center - _TC", submit=False)
|
||||||
|
|
||||||
jv.get("accounts")[0].debit = 100.01
|
jv.get("accounts")[0].debit = 100.01
|
||||||
jv.flags.ignore_validate = True
|
jv.flags.ignore_validate = True
|
||||||
@@ -20,6 +20,6 @@ class TestGLEntry(unittest.TestCase):
|
|||||||
round_off_entry = frappe.db.sql("""select name from `tabGL Entry`
|
round_off_entry = frappe.db.sql("""select name from `tabGL Entry`
|
||||||
where voucher_type='Journal Entry' and voucher_no = %s
|
where voucher_type='Journal Entry' and voucher_no = %s
|
||||||
and account='_Test Write Off - _TC' and cost_center='_Test Cost Center - _TC'
|
and account='_Test Write Off - _TC' and cost_center='_Test Cost Center - _TC'
|
||||||
and ifnull(debit, 0) = 0 and ifnull(credit, 0) = '.01'""", jv.name)
|
and debit = 0 and credit = '.01'""", jv.name)
|
||||||
|
|
||||||
self.assertTrue(round_off_entry)
|
self.assertTrue(round_off_entry)
|
||||||
@@ -2,8 +2,42 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.provide("erpnext.accounts");
|
frappe.provide("erpnext.accounts");
|
||||||
|
frappe.provide("erpnext.journal_entry");
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
frappe.require("assets/erpnext/js/utils.js");
|
||||||
|
|
||||||
|
frappe.ui.form.on("Journal Entry", {
|
||||||
|
refresh: function(frm) {
|
||||||
|
erpnext.toggle_naming_series();
|
||||||
|
frm.cscript.voucher_type(frm.doc);
|
||||||
|
|
||||||
|
if(frm.doc.docstatus==1) {
|
||||||
|
frm.add_custom_button(__('View Ledger'), function() {
|
||||||
|
frappe.route_options = {
|
||||||
|
"voucher_no": frm.doc.name,
|
||||||
|
"from_date": frm.doc.posting_date,
|
||||||
|
"to_date": frm.doc.posting_date,
|
||||||
|
"company": frm.doc.company,
|
||||||
|
group_by_voucher: 0
|
||||||
|
};
|
||||||
|
frappe.set_route("query-report", "General Ledger");
|
||||||
|
}, "icon-table");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frm.doc.__islocal) {
|
||||||
|
frm.add_custom_button(__('Quick Entry'), function() {
|
||||||
|
return erpnext.journal_entry.quick_entry(frm);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// hide /unhide fields based on currency
|
||||||
|
erpnext.journal_entry.toggle_fields_based_on_currency(frm);
|
||||||
|
},
|
||||||
|
|
||||||
|
multi_currency: function(frm) {
|
||||||
|
erpnext.journal_entry.toggle_fields_based_on_currency(frm);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
||||||
onload: function() {
|
onload: function() {
|
||||||
this.load_defaults();
|
this.load_defaults();
|
||||||
@@ -23,23 +57,24 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!this.frm.doc.amended_from) this.frm.doc.posting_date = get_today();
|
if(!this.frm.doc.amended_from) this.frm.doc.posting_date = this.frm.posting_date || get_today();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setup_queries: function() {
|
setup_queries: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
$.each(["account", "cost_center"], function(i, fieldname) {
|
me.frm.set_query("account", "accounts", function(doc, cdt, cdn) {
|
||||||
me.frm.set_query(fieldname, "accounts", function() {
|
return erpnext.journal_entry.account_query(me.frm);
|
||||||
frappe.model.validate_missing(me.frm.doc, "company");
|
});
|
||||||
return {
|
|
||||||
filters: {
|
me.frm.set_query("cost_center", "accounts", function(doc, cdt, cdn) {
|
||||||
company: me.frm.doc.company,
|
return {
|
||||||
is_group: 0
|
filters: {
|
||||||
}
|
company: me.frm.doc.company,
|
||||||
};
|
is_group: 0
|
||||||
});
|
}
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
me.frm.set_query("party_type", "accounts", function(doc, cdt, cdn) {
|
me.frm.set_query("party_type", "accounts", function(doc, cdt, cdn) {
|
||||||
@@ -59,7 +94,6 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
|||||||
// journal entry
|
// journal entry
|
||||||
if(jvd.reference_type==="Journal Entry") {
|
if(jvd.reference_type==="Journal Entry") {
|
||||||
frappe.model.validate_missing(jvd, "account");
|
frappe.model.validate_missing(jvd, "account");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
query: "erpnext.accounts.doctype.journal_entry.journal_entry.get_against_jv",
|
query: "erpnext.accounts.doctype.journal_entry.journal_entry.get_against_jv",
|
||||||
filters: {
|
filters: {
|
||||||
@@ -69,24 +103,33 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// against party
|
|
||||||
|
|
||||||
frappe.model.validate_missing(jvd, "party_type");
|
|
||||||
frappe.model.validate_missing(jvd, "party");
|
|
||||||
|
|
||||||
var out = {
|
var out = {
|
||||||
filters: [
|
filters: [
|
||||||
[jvd.reference_type, jvd.reference_type.indexOf("Sales")===0 ? "customer" : "supplier", "=", jvd.party],
|
[jvd.reference_type, "docstatus", "=", 1]
|
||||||
[jvd.reference_type, "docstatus", "=", 1],
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
if(in_list(["Sales Invoice", "Purchase Invoice"], jvd.reference_type)) {
|
if(in_list(["Sales Invoice", "Purchase Invoice"], jvd.reference_type)) {
|
||||||
out.filters.push([jvd.reference_type, "outstanding_amount", "!=", 0]);
|
out.filters.push([jvd.reference_type, "outstanding_amount", "!=", 0]);
|
||||||
|
|
||||||
|
// account filter
|
||||||
|
frappe.model.validate_missing(jvd, "account");
|
||||||
|
|
||||||
|
party_account_field = jvd.reference_type==="Sales Invoice" ? "debit_to": "credit_to";
|
||||||
|
out.filters.push([jvd.reference_type, party_account_field, "=", jvd.account]);
|
||||||
} else {
|
} else {
|
||||||
|
// party_type and party mandatory
|
||||||
|
frappe.model.validate_missing(jvd, "party_type");
|
||||||
|
frappe.model.validate_missing(jvd, "party");
|
||||||
|
|
||||||
out.filters.push([jvd.reference_type, "per_billed", "<", 100]);
|
out.filters.push([jvd.reference_type, "per_billed", "<", 100]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(jvd.party_type && jvd.party) {
|
||||||
|
out.filters.push([jvd.reference_type,
|
||||||
|
(jvd.reference_type.indexOf("Sales")===0 ? "customer" : "supplier"), "=", jvd.party]);
|
||||||
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -110,32 +153,39 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
|||||||
|
|
||||||
reference_name: function(doc, cdt, cdn) {
|
reference_name: function(doc, cdt, cdn) {
|
||||||
var d = frappe.get_doc(cdt, cdn);
|
var d = frappe.get_doc(cdt, cdn);
|
||||||
if (d.reference_type==="Purchase Invoice" && !flt(d.debit)) {
|
if(d.reference_name) {
|
||||||
this.get_outstanding('Purchase Invoice', d.reference_name, d);
|
if (d.reference_type==="Purchase Invoice" && !flt(d.debit)) {
|
||||||
}
|
this.get_outstanding('Purchase Invoice', d.reference_name, doc.company, d);
|
||||||
if (d.reference_type==="Sales Invoice" && !flt(d.credit)) {
|
}
|
||||||
this.get_outstanding('Sales Invoice', d.reference_name, d);
|
if (d.reference_type==="Sales Invoice" && !flt(d.credit)) {
|
||||||
}
|
this.get_outstanding('Sales Invoice', d.reference_name, doc.company, d);
|
||||||
if (d.reference_type==="Journal Entry" && !flt(d.credit) && !flt(d.debit)) {
|
}
|
||||||
this.get_outstanding('Journal Entry', d.reference_name, d);
|
if (d.reference_type==="Journal Entry" && !flt(d.credit) && !flt(d.debit)) {
|
||||||
|
this.get_outstanding('Journal Entry', d.reference_name, doc.company, d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
get_outstanding: function(doctype, docname, child) {
|
get_outstanding: function(doctype, docname, company, child) {
|
||||||
var me = this;
|
var me = this;
|
||||||
var args = {
|
var args = {
|
||||||
"doctype": doctype,
|
"doctype": doctype,
|
||||||
"docname": docname,
|
"docname": docname,
|
||||||
"party": child.party,
|
"party": child.party,
|
||||||
"account": child.account
|
"account": child.account,
|
||||||
|
"account_currency": child.account_currency,
|
||||||
|
"company": company
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.frm.call({
|
return frappe.call({
|
||||||
child: child,
|
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_outstanding",
|
||||||
method: "get_outstanding",
|
|
||||||
args: { args: args},
|
args: { args: args},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
cur_frm.cscript.update_totals(me.frm.doc);
|
if(r.message) {
|
||||||
|
$.each(r.message, function(field, value) {
|
||||||
|
frappe.model.set_value(child.doctype, child.name, field, value);
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -153,50 +203,36 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
|||||||
// set difference
|
// set difference
|
||||||
if(doc.difference) {
|
if(doc.difference) {
|
||||||
if(doc.difference > 0) {
|
if(doc.difference > 0) {
|
||||||
|
row.credit_in_account_currency = doc.difference;
|
||||||
row.credit = doc.difference;
|
row.credit = doc.difference;
|
||||||
} else {
|
} else {
|
||||||
|
row.debit_in_account_currency = -doc.difference;
|
||||||
row.debit = -doc.difference;
|
row.debit = -doc.difference;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cur_frm.cscript.update_totals(doc);
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
cur_frm.script_manager.make(erpnext.accounts.JournalEntry);
|
cur_frm.script_manager.make(erpnext.accounts.JournalEntry);
|
||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc) {
|
|
||||||
erpnext.toggle_naming_series();
|
|
||||||
cur_frm.cscript.voucher_type(doc);
|
|
||||||
|
|
||||||
if(doc.docstatus==1) {
|
|
||||||
cur_frm.add_custom_button(__('View Ledger'), function() {
|
|
||||||
frappe.route_options = {
|
|
||||||
"voucher_no": doc.name,
|
|
||||||
"from_date": doc.posting_date,
|
|
||||||
"to_date": doc.posting_date,
|
|
||||||
"company": doc.company,
|
|
||||||
group_by_voucher: 0
|
|
||||||
};
|
|
||||||
frappe.set_route("query-report", "General Ledger");
|
|
||||||
}, "icon-table");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.company = function(doc, cdt, cdn) {
|
cur_frm.cscript.company = function(doc, cdt, cdn) {
|
||||||
cur_frm.refresh_fields();
|
cur_frm.refresh_fields();
|
||||||
erpnext.get_fiscal_year(doc.company, doc.posting_date);
|
erpnext.get_fiscal_year(doc.company, doc.posting_date);
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.posting_date = function(doc, cdt, cdn){
|
cur_frm.cscript.posting_date = function(doc, cdt, cdn){
|
||||||
|
cur_frm.posting_date = cur_frm.doc.posting_date;
|
||||||
erpnext.get_fiscal_year(doc.company, doc.posting_date);
|
erpnext.get_fiscal_year(doc.company, doc.posting_date);
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.update_totals = function(doc) {
|
cur_frm.cscript.update_totals = function(doc) {
|
||||||
var td=0.0; var tc =0.0;
|
var td=0.0; var tc =0.0;
|
||||||
var el = doc.accounts || [];
|
var accounts = doc.accounts || [];
|
||||||
for(var i in el) {
|
for(var i in accounts) {
|
||||||
td += flt(el[i].debit, precision("debit", el[i]));
|
td += flt(accounts[i].debit, precision("debit", accounts[i]));
|
||||||
tc += flt(el[i].credit, precision("credit", el[i]));
|
tc += flt(accounts[i].credit, precision("credit", accounts[i]));
|
||||||
}
|
}
|
||||||
var doc = locals[doc.doctype][doc.name];
|
var doc = locals[doc.doctype][doc.name];
|
||||||
doc.total_debit = td;
|
doc.total_debit = td;
|
||||||
@@ -205,32 +241,12 @@ cur_frm.cscript.update_totals = function(doc) {
|
|||||||
refresh_many(['total_debit','total_credit','difference']);
|
refresh_many(['total_debit','total_credit','difference']);
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.debit = function(doc,dt,dn) { cur_frm.cscript.update_totals(doc); }
|
|
||||||
cur_frm.cscript.credit = function(doc,dt,dn) { cur_frm.cscript.update_totals(doc); }
|
|
||||||
|
|
||||||
cur_frm.cscript.get_balance = function(doc,dt,dn) {
|
cur_frm.cscript.get_balance = function(doc,dt,dn) {
|
||||||
cur_frm.cscript.update_totals(doc);
|
cur_frm.cscript.update_totals(doc);
|
||||||
return $c_obj(cur_frm.doc, 'get_balance', '', function(r, rt){
|
return $c_obj(cur_frm.doc, 'get_balance', '', function(r, rt){
|
||||||
cur_frm.refresh();
|
cur_frm.refresh();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Get balance
|
|
||||||
// -----------
|
|
||||||
|
|
||||||
cur_frm.cscript.account = function(doc,dt,dn) {
|
|
||||||
var d = locals[dt][dn];
|
|
||||||
if(d.account) {
|
|
||||||
return frappe.call({
|
|
||||||
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_account_balance_and_party_type",
|
|
||||||
args: {account: d.account, date: doc.posting_date},
|
|
||||||
callback: function(r) {
|
|
||||||
$.extend(d, r.message);
|
|
||||||
refresh_field('balance', d.name, 'accounts');
|
|
||||||
refresh_field('party_type', d.name, 'accounts');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.validate = function(doc,cdt,cdn) {
|
cur_frm.cscript.validate = function(doc,cdt,cdn) {
|
||||||
cur_frm.cscript.update_totals(doc);
|
cur_frm.cscript.update_totals(doc);
|
||||||
@@ -295,18 +311,63 @@ cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
frappe.ui.form.on("Journal Entry Account", "party", function(frm, cdt, cdn) {
|
frappe.ui.form.on("Journal Entry Account", {
|
||||||
var d = frappe.get_doc(cdt, cdn);
|
party: function(frm, cdt, cdn) {
|
||||||
if(!d.account && d.party_type && d.party) {
|
var d = frappe.get_doc(cdt, cdn);
|
||||||
return frm.call({
|
if(!d.account && d.party_type && d.party) {
|
||||||
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_party_account_and_balance",
|
if(!frm.doc.company) frappe.throw(__("Please select Company"));
|
||||||
child: d,
|
return frm.call({
|
||||||
args: {
|
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_party_account_and_balance",
|
||||||
company: frm.doc.company,
|
child: d,
|
||||||
party_type: d.party_type,
|
args: {
|
||||||
party: d.party
|
company: frm.doc.company,
|
||||||
}
|
party_type: d.party_type,
|
||||||
});
|
party: d.party
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
account: function(frm, dt, dn) {
|
||||||
|
var d = locals[dt][dn];
|
||||||
|
if(d.account) {
|
||||||
|
if(!frm.doc.company) frappe.throw(__("Please select Company first"));
|
||||||
|
if(!frm.doc.posting_date) frappe.throw(__("Please select Posting Date first"));
|
||||||
|
|
||||||
|
return frappe.call({
|
||||||
|
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_account_balance_and_party_type",
|
||||||
|
args: {
|
||||||
|
account: d.account,
|
||||||
|
date: frm.doc.posting_date,
|
||||||
|
company: frm.doc.company,
|
||||||
|
debit: flt(d.debit_in_account_currency),
|
||||||
|
credit: flt(d.credit_in_account_currency),
|
||||||
|
exchange_rate: d.exchange_rate
|
||||||
|
},
|
||||||
|
callback: function(r) {
|
||||||
|
if(r.message) {
|
||||||
|
$.extend(d, r.message);
|
||||||
|
refresh_field('accounts');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
debit_in_account_currency: function(frm, cdt, cdn) {
|
||||||
|
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, cdt, cdn);
|
||||||
|
},
|
||||||
|
|
||||||
|
credit_in_account_currency: function(frm, cdt, cdn) {
|
||||||
|
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, cdt, cdn);
|
||||||
|
},
|
||||||
|
|
||||||
|
debit: function(frm, dt, dn) {
|
||||||
|
cur_frm.cscript.update_totals(frm.doc);
|
||||||
|
},
|
||||||
|
|
||||||
|
credit: function(frm, dt, dn) {
|
||||||
|
cur_frm.cscript.update_totals(frm.doc);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -314,3 +375,134 @@ frappe.ui.form.on("Journal Entry Account", "accounts_remove", function(frm) {
|
|||||||
cur_frm.cscript.update_totals(frm.doc);
|
cur_frm.cscript.update_totals(frm.doc);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$.extend(erpnext.journal_entry, {
|
||||||
|
toggle_fields_based_on_currency: function(frm) {
|
||||||
|
var fields = ["currency_section", "account_currency", "exchange_rate", "debit", "credit"];
|
||||||
|
|
||||||
|
var grid = frm.get_field("accounts").grid;
|
||||||
|
if(grid) grid.set_column_disp(fields, frm.doc.multi_currency);
|
||||||
|
|
||||||
|
// dynamic label
|
||||||
|
var field_label_map = {
|
||||||
|
"debit_in_account_currency": "Debit",
|
||||||
|
"credit_in_account_currency": "Credit"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.each(field_label_map, function (fieldname, label) {
|
||||||
|
var df = frappe.meta.get_docfield("Journal Entry Account", fieldname, frm.doc.name);
|
||||||
|
df.label = frm.doc.multi_currency ? (label + " in Account Currency") : label;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
set_debit_credit_in_company_currency: function(frm, cdt, cdn) {
|
||||||
|
erpnext.journal_entry.set_exchange_rate(frm, cdt, cdn);
|
||||||
|
|
||||||
|
var row = locals[cdt][cdn];
|
||||||
|
|
||||||
|
frappe.model.set_value(cdt, cdn, "debit",
|
||||||
|
flt(flt(row.debit_in_account_currency)*row.exchange_rate), precision("debit", row));
|
||||||
|
|
||||||
|
frappe.model.set_value(cdt, cdn, "credit",
|
||||||
|
flt(flt(row.credit_in_account_currency)*row.exchange_rate), precision("credit", row));
|
||||||
|
|
||||||
|
cur_frm.cscript.update_totals(frm.doc);
|
||||||
|
},
|
||||||
|
|
||||||
|
set_exchange_rate: function(frm, cdt, cdn) {
|
||||||
|
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
|
||||||
|
var row = locals[cdt][cdn];
|
||||||
|
|
||||||
|
if(row.account_currency == company_currency || !frm.doc.multi_currency) {
|
||||||
|
frappe.model.set_value(cdt, cdn, "exchange_rate", 1);
|
||||||
|
} else if (!row.exchange_rate || row.exchange_rate == 1 || row.account_type == "Bank") {
|
||||||
|
frappe.call({
|
||||||
|
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_exchange_rate",
|
||||||
|
args: {
|
||||||
|
account: row.account,
|
||||||
|
account_currency: row.account_currency,
|
||||||
|
company: frm.doc.company,
|
||||||
|
reference_type: cstr(row.reference_type),
|
||||||
|
reference_name: cstr(row.reference_name),
|
||||||
|
debit: flt(row.debit_in_account_currency),
|
||||||
|
credit: flt(row.credit_in_account_currency),
|
||||||
|
exchange_rate: row.exchange_rate
|
||||||
|
},
|
||||||
|
callback: function(r) {
|
||||||
|
if(r.message) {
|
||||||
|
frappe.model.set_value(cdt, cdn, "exchange_rate", r.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
quick_entry: function(frm) {
|
||||||
|
var naming_series_options = frm.fields_dict.naming_series.df.options;
|
||||||
|
var naming_series_default = frm.fields_dict.naming_series.df.default || naming_series_options.split("\n")[0];
|
||||||
|
|
||||||
|
var dialog = new frappe.ui.Dialog({
|
||||||
|
title: __("Quick Journal Entry"),
|
||||||
|
fields: [
|
||||||
|
{fieldtype: "Currency", fieldname: "debit", label: __("Amount"), reqd: 1},
|
||||||
|
{fieldtype: "Link", fieldname: "debit_account", label: __("Debit Account"), reqd: 1,
|
||||||
|
options: "Account",
|
||||||
|
get_query: function() {
|
||||||
|
return erpnext.journal_entry.account_query(frm);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{fieldtype: "Link", fieldname: "credit_account", label: __("Credit Account"), reqd: 1,
|
||||||
|
options: "Account",
|
||||||
|
get_query: function() {
|
||||||
|
return erpnext.journal_entry.account_query(frm);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{fieldtype: "Date", fieldname: "posting_date", label: __("Date"), reqd: 1,
|
||||||
|
default: frm.doc.posting_date},
|
||||||
|
{fieldtype: "Select", fieldname: "naming_series", label: __("Series"), reqd: 1,
|
||||||
|
options: naming_series_options, default: naming_series_default},
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
dialog.set_primary_action(__("Save"), function() {
|
||||||
|
var btn = this;
|
||||||
|
var values = dialog.get_values();
|
||||||
|
|
||||||
|
frm.set_value("posting_date", values.posting_date);
|
||||||
|
frm.set_value("naming_series", values.naming_series);
|
||||||
|
|
||||||
|
// clear table is used because there might've been an error while adding child
|
||||||
|
// and cleanup didn't happen
|
||||||
|
frm.clear_table("accounts");
|
||||||
|
|
||||||
|
// using grid.add_new_row() to add a row in UI as well as locals
|
||||||
|
// this is required because triggers try to refresh the grid
|
||||||
|
|
||||||
|
var debit_row = frm.fields_dict.accounts.grid.add_new_row();
|
||||||
|
frappe.model.set_value(debit_row.doctype, debit_row.name, "account", values.debit_account);
|
||||||
|
frappe.model.set_value(debit_row.doctype, debit_row.name, "debit_in_account_currency", values.debit);
|
||||||
|
|
||||||
|
var credit_row = frm.fields_dict.accounts.grid.add_new_row();
|
||||||
|
frappe.model.set_value(credit_row.doctype, credit_row.name, "account", values.credit_account);
|
||||||
|
frappe.model.set_value(credit_row.doctype, credit_row.name, "credit_in_account_currency", values.debit);
|
||||||
|
|
||||||
|
frm.save();
|
||||||
|
|
||||||
|
dialog.hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
dialog.show();
|
||||||
|
},
|
||||||
|
|
||||||
|
account_query: function(frm) {
|
||||||
|
var filters = {
|
||||||
|
company: frm.doc.company,
|
||||||
|
is_group: 0
|
||||||
|
};
|
||||||
|
if(!frm.doc.multi_currency) {
|
||||||
|
$.extend(filters, {
|
||||||
|
account_currency: frappe.get_doc(":Company", frm.doc.company).default_currency
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return { filters: filters };
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -2,13 +2,13 @@
|
|||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe, json
|
||||||
from frappe.utils import cstr, flt, fmt_money, formatdate, getdate, date_diff
|
from frappe.utils import cstr, flt, fmt_money, formatdate
|
||||||
from frappe import msgprint, _, scrub
|
from frappe import msgprint, _, scrub
|
||||||
from erpnext.setup.utils import get_company_currency
|
|
||||||
from erpnext.controllers.accounts_controller import AccountsController
|
from erpnext.controllers.accounts_controller import AccountsController
|
||||||
from erpnext.accounts.utils import get_balance_on
|
from erpnext.accounts.utils import get_balance_on, get_account_currency
|
||||||
|
from erpnext.setup.utils import get_company_currency
|
||||||
|
from erpnext.accounts.party import get_party_account
|
||||||
|
|
||||||
class JournalEntry(AccountsController):
|
class JournalEntry(AccountsController):
|
||||||
def __init__(self, arg1, arg2=None):
|
def __init__(self, arg1, arg2=None):
|
||||||
@@ -26,7 +26,9 @@ class JournalEntry(AccountsController):
|
|||||||
self.validate_party()
|
self.validate_party()
|
||||||
self.validate_cheque_info()
|
self.validate_cheque_info()
|
||||||
self.validate_entries_for_advance()
|
self.validate_entries_for_advance()
|
||||||
self.validate_debit_and_credit()
|
self.validate_multi_currency()
|
||||||
|
self.set_amounts_in_company_currency()
|
||||||
|
self.validate_total_debit_and_credit()
|
||||||
self.validate_against_jv()
|
self.validate_against_jv()
|
||||||
self.validate_reference_doc()
|
self.validate_reference_doc()
|
||||||
self.set_against_account()
|
self.set_against_account()
|
||||||
@@ -35,7 +37,9 @@ class JournalEntry(AccountsController):
|
|||||||
self.validate_expense_claim()
|
self.validate_expense_claim()
|
||||||
self.validate_credit_debit_note()
|
self.validate_credit_debit_note()
|
||||||
self.validate_empty_accounts_table()
|
self.validate_empty_accounts_table()
|
||||||
self.set_title()
|
self.set_account_and_party_balance()
|
||||||
|
if not self.title:
|
||||||
|
self.title = self.get_title()
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.check_credit_limit()
|
self.check_credit_limit()
|
||||||
@@ -43,8 +47,8 @@ class JournalEntry(AccountsController):
|
|||||||
self.update_advance_paid()
|
self.update_advance_paid()
|
||||||
self.update_expense_claim()
|
self.update_expense_claim()
|
||||||
|
|
||||||
def set_title(self):
|
def get_title(self):
|
||||||
self.title = self.pay_to_recd_from or self.accounts[0].account
|
return self.pay_to_recd_from or self.accounts[0].account
|
||||||
|
|
||||||
def update_advance_paid(self):
|
def update_advance_paid(self):
|
||||||
advance_paid = frappe._dict()
|
advance_paid = frappe._dict()
|
||||||
@@ -117,7 +121,7 @@ class JournalEntry(AccountsController):
|
|||||||
|
|
||||||
against_entries = frappe.db.sql("""select * from `tabJournal Entry Account`
|
against_entries = frappe.db.sql("""select * from `tabJournal Entry Account`
|
||||||
where account = %s and docstatus = 1 and parent = %s
|
where account = %s and docstatus = 1 and parent = %s
|
||||||
and ifnull(reference_type, '') in ("", "Sales Order", "Purchase Order")
|
and (reference_type is null or reference_type in ("", "Sales Order", "Purchase Order"))
|
||||||
""", (d.account, d.reference_name), as_dict=True)
|
""", (d.account, d.reference_name), as_dict=True)
|
||||||
|
|
||||||
if not against_entries:
|
if not against_entries:
|
||||||
@@ -144,6 +148,7 @@ class JournalEntry(AccountsController):
|
|||||||
|
|
||||||
self.reference_totals = {}
|
self.reference_totals = {}
|
||||||
self.reference_types = {}
|
self.reference_types = {}
|
||||||
|
self.reference_accounts = {}
|
||||||
|
|
||||||
for d in self.get("accounts"):
|
for d in self.get("accounts"):
|
||||||
if not d.reference_type:
|
if not d.reference_type:
|
||||||
@@ -151,8 +156,8 @@ class JournalEntry(AccountsController):
|
|||||||
if not d.reference_name:
|
if not d.reference_name:
|
||||||
d.reference_type = None
|
d.reference_type = None
|
||||||
if d.reference_type and d.reference_name and (d.reference_type in field_dict.keys()):
|
if d.reference_type and d.reference_name and (d.reference_type in field_dict.keys()):
|
||||||
dr_or_cr = "credit" if d.reference_type in ("Sales Order", "Sales Invoice") \
|
dr_or_cr = "credit_in_account_currency" \
|
||||||
else "debit"
|
if d.reference_type in ("Sales Order", "Sales Invoice") else "debit_in_account_currency"
|
||||||
|
|
||||||
# check debit or credit type Sales / Purchase Order
|
# check debit or credit type Sales / Purchase Order
|
||||||
if d.reference_type=="Sales Order" and flt(d.debit) > 0:
|
if d.reference_type=="Sales Order" and flt(d.debit) > 0:
|
||||||
@@ -166,10 +171,14 @@ class JournalEntry(AccountsController):
|
|||||||
self.reference_totals[d.reference_name] = 0.0
|
self.reference_totals[d.reference_name] = 0.0
|
||||||
self.reference_totals[d.reference_name] += flt(d.get(dr_or_cr))
|
self.reference_totals[d.reference_name] += flt(d.get(dr_or_cr))
|
||||||
self.reference_types[d.reference_name] = d.reference_type
|
self.reference_types[d.reference_name] = d.reference_type
|
||||||
|
self.reference_accounts[d.reference_name] = d.account
|
||||||
|
|
||||||
against_voucher = frappe.db.get_value(d.reference_type, d.reference_name,
|
against_voucher = frappe.db.get_value(d.reference_type, d.reference_name,
|
||||||
[scrub(dt) for dt in field_dict.get(d.reference_type)])
|
[scrub(dt) for dt in field_dict.get(d.reference_type)])
|
||||||
|
|
||||||
|
if not against_voucher:
|
||||||
|
frappe.throw(_("Row {0}: Invalid reference {1}").format(d.idx, d.reference_name))
|
||||||
|
|
||||||
# check if party and account match
|
# check if party and account match
|
||||||
if d.reference_type in ("Sales Invoice", "Purchase Invoice"):
|
if d.reference_type in ("Sales Invoice", "Purchase Invoice"):
|
||||||
if (against_voucher[0] != d.party or against_voucher[1] != d.account):
|
if (against_voucher[0] != d.party or against_voucher[1] != d.account):
|
||||||
@@ -191,23 +200,31 @@ class JournalEntry(AccountsController):
|
|||||||
"""Validate totals, stopped and docstatus for orders"""
|
"""Validate totals, stopped and docstatus for orders"""
|
||||||
for reference_name, total in self.reference_totals.iteritems():
|
for reference_name, total in self.reference_totals.iteritems():
|
||||||
reference_type = self.reference_types[reference_name]
|
reference_type = self.reference_types[reference_name]
|
||||||
|
account = self.reference_accounts[reference_name]
|
||||||
|
|
||||||
if reference_type in ("Sales Order", "Purchase Order"):
|
if reference_type in ("Sales Order", "Purchase Order"):
|
||||||
voucher_properties = frappe.db.get_value(reference_type, reference_name,
|
order = frappe.db.get_value(reference_type, reference_name,
|
||||||
["docstatus", "per_billed", "status", "advance_paid", "base_grand_total"])
|
["docstatus", "per_billed", "status", "advance_paid",
|
||||||
|
"base_grand_total", "grand_total", "currency"], as_dict=1)
|
||||||
|
|
||||||
if voucher_properties[0] != 1:
|
if order.docstatus != 1:
|
||||||
frappe.throw(_("{0} {1} is not submitted").format(reference_type, reference_name))
|
frappe.throw(_("{0} {1} is not submitted").format(reference_type, reference_name))
|
||||||
|
|
||||||
if flt(voucher_properties[1]) >= 100:
|
if flt(order.per_billed) >= 100:
|
||||||
frappe.throw(_("{0} {1} is fully billed").format(reference_type, reference_name))
|
frappe.throw(_("{0} {1} is fully billed").format(reference_type, reference_name))
|
||||||
|
|
||||||
if cstr(voucher_properties[2]) == "Stopped":
|
if cstr(order.status) == "Stopped":
|
||||||
frappe.throw(_("{0} {1} is stopped").format(reference_type, reference_name))
|
frappe.throw(_("{0} {1} is stopped").format(reference_type, reference_name))
|
||||||
|
|
||||||
if flt(voucher_properties[4]) < (flt(voucher_properties[3]) + total):
|
account_currency = get_account_currency(account)
|
||||||
|
if account_currency == self.company_currency:
|
||||||
|
voucher_total = order.base_grand_total
|
||||||
|
else:
|
||||||
|
voucher_total = order.grand_total
|
||||||
|
|
||||||
|
if flt(voucher_total) < (flt(order.advance_paid) + total):
|
||||||
frappe.throw(_("Advance paid against {0} {1} cannot be greater \
|
frappe.throw(_("Advance paid against {0} {1} cannot be greater \
|
||||||
than Grand Total {2}").format(reference_type, reference_name, voucher_properties[4]))
|
than Grand Total {2}").format(reference_type, reference_name, voucher_total))
|
||||||
|
|
||||||
def validate_invoices(self):
|
def validate_invoices(self):
|
||||||
"""Validate totals and docstatus for invoices"""
|
"""Validate totals and docstatus for invoices"""
|
||||||
@@ -215,15 +232,15 @@ class JournalEntry(AccountsController):
|
|||||||
reference_type = self.reference_types[reference_name]
|
reference_type = self.reference_types[reference_name]
|
||||||
|
|
||||||
if reference_type in ("Sales Invoice", "Purchase Invoice"):
|
if reference_type in ("Sales Invoice", "Purchase Invoice"):
|
||||||
voucher_properties = frappe.db.get_value(reference_type, reference_name,
|
invoice = frappe.db.get_value(reference_type, reference_name,
|
||||||
["docstatus", "outstanding_amount"])
|
["docstatus", "outstanding_amount"], as_dict=1)
|
||||||
|
|
||||||
if voucher_properties[0] != 1:
|
if invoice.docstatus != 1:
|
||||||
frappe.throw(_("{0} {1} is not submitted").format(reference_type, reference_name))
|
frappe.throw(_("{0} {1} is not submitted").format(reference_type, reference_name))
|
||||||
|
|
||||||
if total and flt(voucher_properties[1]) < total:
|
if total and flt(invoice.outstanding_amount) < total:
|
||||||
frappe.throw(_("Payment against {0} {1} cannot be greater \
|
frappe.throw(_("Payment against {0} {1} cannot be greater than Outstanding Amount {2}")
|
||||||
than Outstanding Amount {2}").format(reference_type, reference_name, voucher_properties[1]))
|
.format(reference_type, reference_name, invoice.outstanding_amount))
|
||||||
|
|
||||||
def set_against_account(self):
|
def set_against_account(self):
|
||||||
accounts_debited, accounts_credited = [], []
|
accounts_debited, accounts_credited = [], []
|
||||||
@@ -235,22 +252,56 @@ class JournalEntry(AccountsController):
|
|||||||
if flt(d.debit > 0): d.against_account = ", ".join(list(set(accounts_credited)))
|
if flt(d.debit > 0): d.against_account = ", ".join(list(set(accounts_credited)))
|
||||||
if flt(d.credit > 0): d.against_account = ", ".join(list(set(accounts_debited)))
|
if flt(d.credit > 0): d.against_account = ", ".join(list(set(accounts_debited)))
|
||||||
|
|
||||||
def validate_debit_and_credit(self):
|
def validate_total_debit_and_credit(self):
|
||||||
self.total_debit, self.total_credit, self.difference = 0, 0, 0
|
self.set_total_debit_credit()
|
||||||
|
if self.difference:
|
||||||
|
frappe.throw(_("Total Debit must be equal to Total Credit. The difference is {0}")
|
||||||
|
.format(self.difference))
|
||||||
|
|
||||||
|
def set_total_debit_credit(self):
|
||||||
|
self.total_debit, self.total_credit, self.difference = 0, 0, 0
|
||||||
for d in self.get("accounts"):
|
for d in self.get("accounts"):
|
||||||
if d.debit and d.credit:
|
if d.debit and d.credit:
|
||||||
frappe.throw(_("You cannot credit and debit same account at the same time"))
|
frappe.throw(_("You cannot credit and debit same account at the same time"))
|
||||||
|
|
||||||
self.total_debit = flt(self.total_debit) + flt(d.debit, self.precision("debit", "accounts"))
|
self.total_debit = flt(self.total_debit) + flt(d.debit, d.precision("debit"))
|
||||||
self.total_credit = flt(self.total_credit) + flt(d.credit, self.precision("credit", "accounts"))
|
self.total_credit = flt(self.total_credit) + flt(d.credit, d.precision("credit"))
|
||||||
|
|
||||||
self.difference = flt(self.total_debit, self.precision("total_debit")) - \
|
self.difference = flt(self.total_debit, self.precision("total_debit")) - \
|
||||||
flt(self.total_credit, self.precision("total_credit"))
|
flt(self.total_credit, self.precision("total_credit"))
|
||||||
|
|
||||||
if self.difference:
|
def validate_multi_currency(self):
|
||||||
frappe.throw(_("Total Debit must be equal to Total Credit. The difference is {0}")
|
alternate_currency = []
|
||||||
.format(self.difference))
|
for d in self.get("accounts"):
|
||||||
|
account = frappe.db.get_value("Account", d.account, ["account_currency", "account_type"], as_dict=1)
|
||||||
|
d.account_currency = account.account_currency or self.company_currency
|
||||||
|
d.account_type = account.account_type
|
||||||
|
|
||||||
|
if d.account_currency!=self.company_currency and d.account_currency not in alternate_currency:
|
||||||
|
alternate_currency.append(d.account_currency)
|
||||||
|
|
||||||
|
if alternate_currency:
|
||||||
|
if not self.multi_currency:
|
||||||
|
frappe.throw(_("Please check Multi Currency option to allow accounts with other currency"))
|
||||||
|
|
||||||
|
self.set_exchange_rate()
|
||||||
|
|
||||||
|
def set_amounts_in_company_currency(self):
|
||||||
|
for d in self.get("accounts"):
|
||||||
|
d.debit = flt(flt(d.debit_in_account_currency)*flt(d.exchange_rate), d.precision("debit"))
|
||||||
|
d.credit = flt(flt(d.credit_in_account_currency)*flt(d.exchange_rate), d.precision("credit"))
|
||||||
|
|
||||||
|
def set_exchange_rate(self):
|
||||||
|
for d in self.get("accounts"):
|
||||||
|
if d.account_currency == self.company_currency:
|
||||||
|
d.exchange_rate = 1
|
||||||
|
elif not d.exchange_rate or d.exchange_rate == 1 or \
|
||||||
|
(d.reference_type in ("Sales Invoice", "Purchase Invoice") and d.reference_name):
|
||||||
|
d.exchange_rate = get_exchange_rate(d.account, d.account_currency, self.company,
|
||||||
|
d.reference_type, d.reference_name, d.debit, d.credit, d.exchange_rate)
|
||||||
|
|
||||||
|
if not d.exchange_rate:
|
||||||
|
frappe.throw(_("Row {0}: Exchange Rate is mandatory").format(d.idx))
|
||||||
|
|
||||||
def create_remarks(self):
|
def create_remarks(self):
|
||||||
r = []
|
r = []
|
||||||
@@ -260,15 +311,13 @@ class JournalEntry(AccountsController):
|
|||||||
else:
|
else:
|
||||||
msgprint(_("Please enter Reference date"), raise_exception=frappe.MandatoryError)
|
msgprint(_("Please enter Reference date"), raise_exception=frappe.MandatoryError)
|
||||||
|
|
||||||
company_currency = get_company_currency(self.company)
|
|
||||||
|
|
||||||
for d in self.get('accounts'):
|
for d in self.get('accounts'):
|
||||||
if d.reference_type=="Sales Invoice" and d.credit:
|
if d.reference_type=="Sales Invoice" and d.credit:
|
||||||
r.append(_("{0} against Sales Invoice {1}").format(fmt_money(flt(d.credit), currency = company_currency), \
|
r.append(_("{0} against Sales Invoice {1}").format(fmt_money(flt(d.credit), currency = self.company_currency), \
|
||||||
d.reference_name))
|
d.reference_name))
|
||||||
|
|
||||||
if d.reference_type=="Sales Order" and d.credit:
|
if d.reference_type=="Sales Order" and d.credit:
|
||||||
r.append(_("{0} against Sales Order {1}").format(fmt_money(flt(d.credit), currency = company_currency), \
|
r.append(_("{0} against Sales Order {1}").format(fmt_money(flt(d.credit), currency = self.company_currency), \
|
||||||
d.reference_name))
|
d.reference_name))
|
||||||
|
|
||||||
if d.reference_type == "Purchase Invoice" and d.debit:
|
if d.reference_type == "Purchase Invoice" and d.debit:
|
||||||
@@ -276,11 +325,11 @@ class JournalEntry(AccountsController):
|
|||||||
from `tabPurchase Invoice` where name=%s""", d.reference_name)
|
from `tabPurchase Invoice` where name=%s""", d.reference_name)
|
||||||
if bill_no and bill_no[0][0] and bill_no[0][0].lower().strip() \
|
if bill_no and bill_no[0][0] and bill_no[0][0].lower().strip() \
|
||||||
not in ['na', 'not applicable', 'none']:
|
not in ['na', 'not applicable', 'none']:
|
||||||
r.append(_('{0} against Bill {1} dated {2}').format(fmt_money(flt(d.debit), currency=company_currency), bill_no[0][0],
|
r.append(_('{0} against Bill {1} dated {2}').format(fmt_money(flt(d.debit), currency=self.company_currency), bill_no[0][0],
|
||||||
bill_no[0][1] and formatdate(bill_no[0][1].strftime('%Y-%m-%d'))))
|
bill_no[0][1] and formatdate(bill_no[0][1].strftime('%Y-%m-%d'))))
|
||||||
|
|
||||||
if d.reference_type == "Purchase Order" and d.debit:
|
if d.reference_type == "Purchase Order" and d.debit:
|
||||||
r.append(_("{0} against Purchase Order {1}").format(fmt_money(flt(d.credit), currency = company_currency), \
|
r.append(_("{0} against Purchase Order {1}").format(fmt_money(flt(d.credit), currency = self.company_currency), \
|
||||||
d.reference_name))
|
d.reference_name))
|
||||||
|
|
||||||
if self.user_remark:
|
if self.user_remark:
|
||||||
@@ -290,21 +339,24 @@ class JournalEntry(AccountsController):
|
|||||||
self.remark = ("\n").join(r) #User Remarks is not mandatory
|
self.remark = ("\n").join(r) #User Remarks is not mandatory
|
||||||
|
|
||||||
def set_print_format_fields(self):
|
def set_print_format_fields(self):
|
||||||
|
total_amount = 0.0
|
||||||
|
bank_account_currency = None
|
||||||
for d in self.get('accounts'):
|
for d in self.get('accounts'):
|
||||||
if d.party_type and d.party:
|
if d.party_type and d.party:
|
||||||
if not self.pay_to_recd_from:
|
if not self.pay_to_recd_from:
|
||||||
self.pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
|
self.pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
|
||||||
"customer_name" if d.party_type=="Customer" else "supplier_name")
|
"customer_name" if d.party_type=="Customer" else "supplier_name")
|
||||||
|
|
||||||
self.set_total_amount(d.debit or d.credit)
|
|
||||||
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
|
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
|
||||||
self.set_total_amount(d.debit or d.credit)
|
total_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
|
||||||
|
bank_account_currency = d.account_currency
|
||||||
|
|
||||||
def set_total_amount(self, amt):
|
self.set_total_amount(total_amount, bank_account_currency)
|
||||||
company_currency = get_company_currency(self.company)
|
|
||||||
|
def set_total_amount(self, amt, currency):
|
||||||
self.total_amount = amt
|
self.total_amount = amt
|
||||||
from frappe.utils import money_in_words
|
from frappe.utils import money_in_words
|
||||||
self.total_amount_in_words = money_in_words(amt, company_currency)
|
self.total_amount_in_words = money_in_words(amt, currency)
|
||||||
|
|
||||||
def make_gl_entries(self, cancel=0, adv_adj=0):
|
def make_gl_entries(self, cancel=0, adv_adj=0):
|
||||||
from erpnext.accounts.general_ledger import make_gl_entries
|
from erpnext.accounts.general_ledger import make_gl_entries
|
||||||
@@ -318,8 +370,11 @@ class JournalEntry(AccountsController):
|
|||||||
"party_type": d.party_type,
|
"party_type": d.party_type,
|
||||||
"party": d.party,
|
"party": d.party,
|
||||||
"against": d.against_account,
|
"against": d.against_account,
|
||||||
"debit": flt(d.debit, self.precision("debit", "accounts")),
|
"debit": flt(d.debit, d.precision("debit")),
|
||||||
"credit": flt(d.credit, self.precision("credit", "accounts")),
|
"credit": flt(d.credit, d.precision("credit")),
|
||||||
|
"account_currency": d.account_currency,
|
||||||
|
"debit_in_account_currency": flt(d.debit_in_account_currency, d.precision("debit_in_account_currency")),
|
||||||
|
"credit_in_account_currency": flt(d.credit_in_account_currency, d.precision("credit_in_account_currency")),
|
||||||
"against_voucher_type": d.reference_type,
|
"against_voucher_type": d.reference_type,
|
||||||
"against_voucher": d.reference_name,
|
"against_voucher": d.reference_name,
|
||||||
"remarks": self.remark,
|
"remarks": self.remark,
|
||||||
@@ -338,23 +393,24 @@ class JournalEntry(AccountsController):
|
|||||||
diff = flt(self.difference, self.precision("difference"))
|
diff = flt(self.difference, self.precision("difference"))
|
||||||
|
|
||||||
# If any row without amount, set the diff on that row
|
# If any row without amount, set the diff on that row
|
||||||
for d in self.get('accounts'):
|
if diff:
|
||||||
if not d.credit and not d.debit and diff != 0:
|
blank_row = None
|
||||||
if diff>0:
|
for d in self.get('accounts'):
|
||||||
d.credit = diff
|
if not d.credit_in_account_currency and not d.debit_in_account_currency and diff != 0:
|
||||||
elif diff<0:
|
blank_row = d
|
||||||
d.debit = diff
|
|
||||||
flag = 1
|
|
||||||
|
|
||||||
# Set the diff in a new row
|
if not blank_row:
|
||||||
if flag == 0 and diff != 0:
|
blank_row = self.append('accounts', {})
|
||||||
jd = self.append('accounts', {})
|
|
||||||
|
blank_row.exchange_rate = 1
|
||||||
if diff>0:
|
if diff>0:
|
||||||
jd.credit = abs(diff)
|
blank_row.credit_in_account_currency = diff
|
||||||
|
blank_row.credit = diff
|
||||||
elif diff<0:
|
elif diff<0:
|
||||||
jd.debit = abs(diff)
|
blank_row.debit_in_account_currency = abs(diff)
|
||||||
|
blank_row.debit = abs(diff)
|
||||||
|
|
||||||
self.validate_debit_and_credit()
|
self.validate_total_debit_and_credit()
|
||||||
|
|
||||||
def get_outstanding_invoices(self):
|
def get_outstanding_invoices(self):
|
||||||
self.set('accounts', [])
|
self.set('accounts', [])
|
||||||
@@ -382,7 +438,7 @@ class JournalEntry(AccountsController):
|
|||||||
elif self.write_off_based_on == 'Accounts Payable':
|
elif self.write_off_based_on == 'Accounts Payable':
|
||||||
jd2.credit = total
|
jd2.credit = total
|
||||||
|
|
||||||
self.validate_debit_and_credit()
|
self.validate_total_debit_and_credit()
|
||||||
|
|
||||||
|
|
||||||
def get_values(self):
|
def get_values(self):
|
||||||
@@ -427,6 +483,20 @@ class JournalEntry(AccountsController):
|
|||||||
if not self.get('accounts'):
|
if not self.get('accounts'):
|
||||||
frappe.throw("Accounts table cannot be blank.")
|
frappe.throw("Accounts table cannot be blank.")
|
||||||
|
|
||||||
|
def set_account_and_party_balance(self):
|
||||||
|
account_balance = {}
|
||||||
|
party_balance = {}
|
||||||
|
for d in self.get("accounts"):
|
||||||
|
if d.account not in account_balance:
|
||||||
|
account_balance[d.account] = get_balance_on(account=d.account, date=self.posting_date)
|
||||||
|
|
||||||
|
if (d.party_type, d.party) not in party_balance:
|
||||||
|
party_balance[(d.party_type, d.party)] = get_balance_on(party_type=d.party_type,
|
||||||
|
party=d.party, date=self.posting_date)
|
||||||
|
|
||||||
|
d.account_balance = account_balance[d.account]
|
||||||
|
d.party_balance = party_balance[(d.party_type, d.party)]
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None):
|
def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None):
|
||||||
from erpnext.accounts.doctype.sales_invoice.sales_invoice import get_bank_cash_account
|
from erpnext.accounts.doctype.sales_invoice.sales_invoice import get_bank_cash_account
|
||||||
@@ -439,143 +509,141 @@ def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None):
|
|||||||
if voucher_type=="Bank Entry":
|
if voucher_type=="Bank Entry":
|
||||||
account = frappe.db.get_value("Company", company, "default_bank_account")
|
account = frappe.db.get_value("Company", company, "default_bank_account")
|
||||||
if not account:
|
if not account:
|
||||||
account = frappe.db.get_value("Account", {"company": company, "account_type": "Bank", "is_group": 0})
|
account = frappe.db.get_value("Account",
|
||||||
|
{"company": company, "account_type": "Bank", "is_group": 0})
|
||||||
elif voucher_type=="Cash Entry":
|
elif voucher_type=="Cash Entry":
|
||||||
account = frappe.db.get_value("Company", company, "default_cash_account")
|
account = frappe.db.get_value("Company", company, "default_cash_account")
|
||||||
if not account:
|
if not account:
|
||||||
account = frappe.db.get_value("Account", {"company": company, "account_type": "Cash", "is_group": 0})
|
account = frappe.db.get_value("Account",
|
||||||
|
{"company": company, "account_type": "Cash", "is_group": 0})
|
||||||
|
|
||||||
if account:
|
if account:
|
||||||
|
account_details = frappe.db.get_value("Account", account,
|
||||||
|
["account_currency", "account_type"], as_dict=1)
|
||||||
return {
|
return {
|
||||||
"account": account,
|
"account": account,
|
||||||
"balance": get_balance_on(account)
|
"balance": get_balance_on(account),
|
||||||
|
"account_currency": account_details.account_currency,
|
||||||
|
"account_type": account_details.account_type
|
||||||
}
|
}
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_payment_entry_from_sales_invoice(sales_invoice):
|
def get_payment_entry_against_order(dt, dn):
|
||||||
"""Returns new Journal Entry document as dict for given Sales Invoice"""
|
ref_doc = frappe.get_doc(dt, dn)
|
||||||
from erpnext.accounts.utils import get_balance_on
|
|
||||||
si = frappe.get_doc("Sales Invoice", sales_invoice)
|
|
||||||
jv = get_payment_entry(si)
|
|
||||||
jv.remark = 'Payment received against Sales Invoice {0}. {1}'.format(si.name, si.remarks)
|
|
||||||
|
|
||||||
# credit customer
|
if flt(ref_doc.per_billed, 2) > 0:
|
||||||
jv.get("accounts")[0].account = si.debit_to
|
frappe.throw(_("Can only make payment against unbilled {0}").format(dt))
|
||||||
jv.get("accounts")[0].party_type = "Customer"
|
|
||||||
jv.get("accounts")[0].party = si.customer
|
|
||||||
jv.get("accounts")[0].balance = get_balance_on(si.debit_to)
|
|
||||||
jv.get("accounts")[0].party_balance = get_balance_on(party=si.customer, party_type="Customer")
|
|
||||||
jv.get("accounts")[0].credit = si.outstanding_amount
|
|
||||||
jv.get("accounts")[0].reference_type = si.doctype
|
|
||||||
jv.get("accounts")[0].reference_name = si.name
|
|
||||||
|
|
||||||
# debit bank
|
if dt == "Sales Order":
|
||||||
jv.get("accounts")[1].debit = si.outstanding_amount
|
party_type = "Customer"
|
||||||
|
amount_field_party = "credit_in_account_currency"
|
||||||
|
amount_field_bank = "debit_in_account_currency"
|
||||||
|
else:
|
||||||
|
party_type = "Supplier"
|
||||||
|
amount_field_party = "debit_in_account_currency"
|
||||||
|
amount_field_bank = "credit_in_account_currency"
|
||||||
|
|
||||||
return jv.as_dict()
|
party_account = get_party_account(party_type, ref_doc.get(party_type.lower()), ref_doc.company)
|
||||||
|
party_account_currency = get_account_currency(party_account)
|
||||||
|
|
||||||
|
if party_account_currency == ref_doc.company_currency:
|
||||||
|
amount = flt(ref_doc.base_grand_total) - flt(ref_doc.advance_paid)
|
||||||
|
else:
|
||||||
|
amount = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid)
|
||||||
|
|
||||||
|
return get_payment_entry(ref_doc, {
|
||||||
|
"party_type": party_type,
|
||||||
|
"party_account": party_account,
|
||||||
|
"party_account_currency": party_account_currency,
|
||||||
|
"amount_field_party": amount_field_party,
|
||||||
|
"amount_field_bank": amount_field_bank,
|
||||||
|
"amount": amount,
|
||||||
|
"remarks": 'Advance Payment received against {0} {1}'.format(dt, dn),
|
||||||
|
"is_advance": "Yes"
|
||||||
|
})
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_payment_entry_from_purchase_invoice(purchase_invoice):
|
def get_payment_entry_against_invoice(dt, dn):
|
||||||
"""Returns new Journal Entry document as dict for given Purchase Invoice"""
|
ref_doc = frappe.get_doc(dt, dn)
|
||||||
pi = frappe.get_doc("Purchase Invoice", purchase_invoice)
|
if dt == "Sales Invoice":
|
||||||
jv = get_payment_entry(pi)
|
party_type = "Customer"
|
||||||
jv.remark = 'Payment against Purchase Invoice {0}. {1}'.format(pi.name, pi.remarks)
|
party_account = ref_doc.debit_to
|
||||||
|
else:
|
||||||
|
party_type = "Supplier"
|
||||||
|
party_account = ref_doc.credit_to
|
||||||
|
|
||||||
# credit supplier
|
|
||||||
jv.get("accounts")[0].account = pi.credit_to
|
|
||||||
jv.get("accounts")[0].party_type = "Supplier"
|
|
||||||
jv.get("accounts")[0].party = pi.supplier
|
|
||||||
jv.get("accounts")[0].balance = get_balance_on(pi.credit_to)
|
|
||||||
jv.get("accounts")[0].party_balance = get_balance_on(party=pi.supplier, party_type="Supplier")
|
|
||||||
jv.get("accounts")[0].debit = pi.outstanding_amount
|
|
||||||
jv.get("accounts")[0].reference_type = pi.doctype
|
|
||||||
jv.get("accounts")[0].reference_name = pi.name
|
|
||||||
|
|
||||||
# credit bank
|
if (dt=="Sales Invoice" and ref_doc.outstanding_amount > 0) \
|
||||||
jv.get("accounts")[1].credit = pi.outstanding_amount
|
or (dt=="Purchase Invoice" and ref_doc.outstanding_amount < 0):
|
||||||
|
amount_field_party = "credit_in_account_currency"
|
||||||
|
amount_field_bank = "debit_in_account_currency"
|
||||||
|
else:
|
||||||
|
amount_field_party = "debit_in_account_currency"
|
||||||
|
amount_field_bank = "credit_in_account_currency"
|
||||||
|
|
||||||
return jv.as_dict()
|
return get_payment_entry(ref_doc, {
|
||||||
|
"party_type": party_type,
|
||||||
|
"party_account": party_account,
|
||||||
|
"party_account_currency": ref_doc.party_account_currency,
|
||||||
|
"amount_field_party": amount_field_party,
|
||||||
|
"amount_field_bank": amount_field_bank,
|
||||||
|
"amount": abs(ref_doc.outstanding_amount),
|
||||||
|
"remarks": 'Payment received against {0} {1}. {2}'.format(dt, dn, ref_doc.remarks),
|
||||||
|
"is_advance": "No"
|
||||||
|
})
|
||||||
|
|
||||||
@frappe.whitelist()
|
def get_payment_entry(ref_doc, args):
|
||||||
def get_payment_entry_from_sales_order(sales_order):
|
cost_center = frappe.db.get_value("Company", ref_doc.company, "cost_center")
|
||||||
"""Returns new Journal Entry document as dict for given Sales Order"""
|
exchange_rate = get_exchange_rate(args.get("party_account"), args.get("party_account_currency"),
|
||||||
from erpnext.accounts.utils import get_balance_on
|
ref_doc.company, ref_doc.doctype, ref_doc.name)
|
||||||
from erpnext.accounts.party import get_party_account
|
|
||||||
so = frappe.get_doc("Sales Order", sales_order)
|
|
||||||
|
|
||||||
if flt(so.per_billed, 2) != 0.0:
|
jv = frappe.new_doc("Journal Entry")
|
||||||
frappe.throw(_("Can only make payment against unbilled Sales Order"))
|
jv.update({
|
||||||
|
"voucher_type": "Bank Entry",
|
||||||
|
"company": ref_doc.company,
|
||||||
|
"remark": args.get("remarks")
|
||||||
|
})
|
||||||
|
|
||||||
jv = get_payment_entry(so)
|
party_row = jv.append("accounts", {
|
||||||
jv.remark = 'Advance payment received against Sales Order {0}.'.format(so.name)
|
"account": args.get("party_account"),
|
||||||
party_account = get_party_account(so.company, so.customer, "Customer")
|
"party_type": args.get("party_type"),
|
||||||
|
"party": ref_doc.get(args.get("party_type").lower()),
|
||||||
amount = flt(so.base_grand_total) - flt(so.advance_paid)
|
"cost_center": cost_center,
|
||||||
|
"account_type": frappe.db.get_value("Account", args.get("party_account"), "account_type"),
|
||||||
# credit customer
|
"account_currency": args.get("party_account_currency") or \
|
||||||
jv.get("accounts")[0].account = party_account
|
get_account_currency(args.get("party_account")),
|
||||||
jv.get("accounts")[0].party_type = "Customer"
|
"balance": get_balance_on(args.get("party_account")),
|
||||||
jv.get("accounts")[0].party = so.customer
|
"party_balance": get_balance_on(party=args.get("party"), party_type=args.get("party_type")),
|
||||||
jv.get("accounts")[0].balance = get_balance_on(party_account)
|
"exchange_rate": exchange_rate,
|
||||||
jv.get("accounts")[0].party_balance = get_balance_on(party=so.customer, party_type="Customer")
|
args.get("amount_field_party"): args.get("amount"),
|
||||||
jv.get("accounts")[0].credit = amount
|
"is_advance": args.get("is_advance"),
|
||||||
jv.get("accounts")[0].reference_type = so.doctype
|
"reference_type": ref_doc.doctype,
|
||||||
jv.get("accounts")[0].reference_name = so.name
|
"reference_name": ref_doc.name
|
||||||
jv.get("accounts")[0].is_advance = "Yes"
|
})
|
||||||
|
|
||||||
# debit bank
|
|
||||||
jv.get("accounts")[1].debit = amount
|
|
||||||
|
|
||||||
return jv.as_dict()
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
|
||||||
def get_payment_entry_from_purchase_order(purchase_order):
|
|
||||||
"""Returns new Journal Entry document as dict for given Sales Order"""
|
|
||||||
from erpnext.accounts.utils import get_balance_on
|
|
||||||
from erpnext.accounts.party import get_party_account
|
|
||||||
po = frappe.get_doc("Purchase Order", purchase_order)
|
|
||||||
|
|
||||||
if flt(po.per_billed, 2) != 0.0:
|
|
||||||
frappe.throw(_("Can only make payment against unbilled Sales Order"))
|
|
||||||
|
|
||||||
jv = get_payment_entry(po)
|
|
||||||
jv.remark = 'Advance payment made against Purchase Order {0}.'.format(po.name)
|
|
||||||
party_account = get_party_account(po.company, po.supplier, "Supplier")
|
|
||||||
|
|
||||||
amount = flt(po.base_grand_total) - flt(po.advance_paid)
|
|
||||||
|
|
||||||
# credit customer
|
|
||||||
jv.get("accounts")[0].account = party_account
|
|
||||||
jv.get("accounts")[0].party_type = "Supplier"
|
|
||||||
jv.get("accounts")[0].party = po.supplier
|
|
||||||
jv.get("accounts")[0].balance = get_balance_on(party_account)
|
|
||||||
jv.get("accounts")[0].party_balance = get_balance_on(party=po.supplier, party_type="Supplier")
|
|
||||||
jv.get("accounts")[0].debit = amount
|
|
||||||
jv.get("accounts")[0].reference_type = po.doctype
|
|
||||||
jv.get("accounts")[0].reference_name = po.name
|
|
||||||
jv.get("accounts")[0].is_advance = "Yes"
|
|
||||||
|
|
||||||
# debit bank
|
|
||||||
jv.get("accounts")[1].credit = amount
|
|
||||||
|
|
||||||
return jv.as_dict()
|
|
||||||
|
|
||||||
def get_payment_entry(doc):
|
|
||||||
bank_account = get_default_bank_cash_account(doc.company, "Bank Entry")
|
|
||||||
|
|
||||||
jv = frappe.new_doc('Journal Entry')
|
|
||||||
jv.voucher_type = 'Bank Entry'
|
|
||||||
jv.company = doc.company
|
|
||||||
jv.fiscal_year = doc.fiscal_year
|
|
||||||
|
|
||||||
jv.append("accounts")
|
|
||||||
d2 = jv.append("accounts")
|
|
||||||
|
|
||||||
|
bank_row = jv.append("accounts")
|
||||||
|
bank_account = get_default_bank_cash_account(ref_doc.company, "Bank Entry")
|
||||||
if bank_account:
|
if bank_account:
|
||||||
d2.account = bank_account["account"]
|
bank_row.update(bank_account)
|
||||||
d2.balance = bank_account["balance"]
|
bank_row.exchange_rate = get_exchange_rate(bank_account["account"],
|
||||||
|
bank_account["account_currency"], ref_doc.company)
|
||||||
|
|
||||||
return jv
|
bank_row.cost_center = cost_center
|
||||||
|
|
||||||
|
if bank_row.account_currency == args.get("party_account_currency"):
|
||||||
|
bank_row.set(args.get("amount_field_bank"), args.get("amount"))
|
||||||
|
else:
|
||||||
|
bank_row.set(args.get("amount_field_bank"), args.get("amount") * exchange_rate)
|
||||||
|
|
||||||
|
# set multi currency check
|
||||||
|
if party_row.account_currency != ref_doc.company_currency \
|
||||||
|
or (bank_row.account_currency and bank_row.account_currency != ref_doc.company_currency):
|
||||||
|
jv.multi_currency = 1
|
||||||
|
|
||||||
|
jv.set_amounts_in_company_currency()
|
||||||
|
jv.set_total_debit_credit()
|
||||||
|
|
||||||
|
return jv.as_dict()
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_opening_accounts(company):
|
def get_opening_accounts(company):
|
||||||
@@ -590,36 +658,49 @@ def get_against_jv(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
return frappe.db.sql("""select jv.name, jv.posting_date, jv.user_remark
|
return frappe.db.sql("""select jv.name, jv.posting_date, jv.user_remark
|
||||||
from `tabJournal Entry` jv, `tabJournal Entry Account` jv_detail
|
from `tabJournal Entry` jv, `tabJournal Entry Account` jv_detail
|
||||||
where jv_detail.parent = jv.name and jv_detail.account = %s and ifnull(jv_detail.party, '') = %s
|
where jv_detail.parent = jv.name and jv_detail.account = %s and ifnull(jv_detail.party, '') = %s
|
||||||
and ifnull(jv_detail.reference_type, '') = ''
|
and (jv_detail.reference_type is null or jv_detail.reference_type = '')
|
||||||
and jv.docstatus = 1 and jv.{0} like %s order by jv.name desc limit %s, %s""".format(searchfield),
|
and jv.docstatus = 1 and jv.`{0}` like %s order by jv.name desc limit %s, %s""".format(frappe.db.escape(searchfield)),
|
||||||
(filters.get("account"), cstr(filters.get("party")), "%{0}%".format(txt), start, page_len))
|
(filters.get("account"), cstr(filters.get("party")), "%{0}%".format(txt), start, page_len))
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_outstanding(args):
|
def get_outstanding(args):
|
||||||
if not frappe.has_permission("Account"):
|
if not frappe.has_permission("Account"):
|
||||||
frappe.msgprint(_("No Permission"), raise_exception=1)
|
frappe.msgprint(_("No Permission"), raise_exception=1)
|
||||||
args = eval(args)
|
|
||||||
|
if isinstance(args, basestring):
|
||||||
|
args = json.loads(args)
|
||||||
|
|
||||||
|
company_currency = get_company_currency(args.get("company"))
|
||||||
|
|
||||||
if args.get("doctype") == "Journal Entry":
|
if args.get("doctype") == "Journal Entry":
|
||||||
condition = " and party=%(party)s" if args.get("party") else ""
|
condition = " and party=%(party)s" if args.get("party") else ""
|
||||||
|
|
||||||
against_jv_amount = frappe.db.sql("""
|
against_jv_amount = frappe.db.sql("""
|
||||||
select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
|
select sum(debit_in_account_currency) - sum(credit_in_account_currency)
|
||||||
from `tabJournal Entry Account` where parent=%(docname)s and account=%(account)s {0}
|
from `tabJournal Entry Account` where parent=%(docname)s and account=%(account)s {0}
|
||||||
and ifnull(reference_type, '')=''""".format(condition), args)
|
and (reference_type is null or reference_type = '')""".format(condition), args)
|
||||||
|
|
||||||
against_jv_amount = flt(against_jv_amount[0][0]) if against_jv_amount else 0
|
against_jv_amount = flt(against_jv_amount[0][0]) if against_jv_amount else 0
|
||||||
|
amount_field = "credit_in_account_currency" if against_jv_amount > 0 else "debit_in_account_currency"
|
||||||
return {
|
return {
|
||||||
("credit" if against_jv_amount > 0 else "debit"): abs(against_jv_amount)
|
amount_field: abs(against_jv_amount)
|
||||||
}
|
}
|
||||||
elif args.get("doctype") == "Sales Invoice":
|
elif args.get("doctype") in ("Sales Invoice", "Purchase Invoice"):
|
||||||
outstanding_amount = flt(frappe.db.get_value("Sales Invoice", args["docname"], "outstanding_amount"))
|
invoice = frappe.db.get_value(args["doctype"], args["docname"],
|
||||||
|
["outstanding_amount", "conversion_rate"], as_dict=1)
|
||||||
|
|
||||||
|
exchange_rate = invoice.conversion_rate if (args.get("account_currency") != company_currency) else 1
|
||||||
|
|
||||||
|
if args["doctype"] == "Sales Invoice":
|
||||||
|
amount_field = "credit_in_account_currency" \
|
||||||
|
if flt(invoice.outstanding_amount) > 0 else "debit_in_account_currency"
|
||||||
|
else:
|
||||||
|
amount_field = "debit_in_account_currency" \
|
||||||
|
if flt(invoice.outstanding_amount) > 0 else "credit_in_account_currency"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
("credit" if outstanding_amount > 0 else "debit"): abs(outstanding_amount)
|
amount_field: abs(flt(invoice.outstanding_amount)),
|
||||||
}
|
"exchange_rate": exchange_rate
|
||||||
elif args.get("doctype") == "Purchase Invoice":
|
|
||||||
outstanding_amount = flt(frappe.db.get_value("Purchase Invoice", args["docname"], "outstanding_amount"))
|
|
||||||
return {
|
|
||||||
("debit" if outstanding_amount > 0 else "credit"): abs(outstanding_amount)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
@@ -627,8 +708,7 @@ def get_party_account_and_balance(company, party_type, party):
|
|||||||
if not frappe.has_permission("Account"):
|
if not frappe.has_permission("Account"):
|
||||||
frappe.msgprint(_("No Permission"), raise_exception=1)
|
frappe.msgprint(_("No Permission"), raise_exception=1)
|
||||||
|
|
||||||
from erpnext.accounts.party import get_party_account
|
account = get_party_account(party_type, party, company)
|
||||||
account = get_party_account(company, party, party_type)
|
|
||||||
|
|
||||||
account_balance = get_balance_on(account=account)
|
account_balance = get_balance_on(account=account)
|
||||||
party_balance = get_balance_on(party_type=party_type, party=party)
|
party_balance = get_balance_on(party_type=party_type, party=party)
|
||||||
@@ -640,14 +720,77 @@ def get_party_account_and_balance(company, party_type, party):
|
|||||||
}
|
}
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_account_balance_and_party_type(account, date):
|
def get_account_balance_and_party_type(account, date, company, debit=None, credit=None, exchange_rate=None):
|
||||||
"""Returns dict of account balance and party type to be set in Journal Entry on selection of account."""
|
"""Returns dict of account balance and party type to be set in Journal Entry on selection of account."""
|
||||||
if not frappe.has_permission("Account"):
|
if not frappe.has_permission("Account"):
|
||||||
frappe.msgprint(_("No Permission"), raise_exception=1)
|
frappe.msgprint(_("No Permission"), raise_exception=1)
|
||||||
|
|
||||||
account_type = frappe.db.get_value("Account", account, "account_type")
|
company_currency = get_company_currency(company)
|
||||||
return {
|
account_details = frappe.db.get_value("Account", account, ["account_type", "account_currency"], as_dict=1)
|
||||||
|
|
||||||
|
if account_details.account_type == "Receivable":
|
||||||
|
party_type = "Customer"
|
||||||
|
elif account_details.account_type == "Payable":
|
||||||
|
party_type = "Supplier"
|
||||||
|
else:
|
||||||
|
party_type = ""
|
||||||
|
|
||||||
|
grid_values = {
|
||||||
"balance": get_balance_on(account, date),
|
"balance": get_balance_on(account, date),
|
||||||
"party_type": {"Receivable":"Customer", "Payable":"Supplier"}.get(account_type, "")
|
"party_type": party_type,
|
||||||
|
"account_type": account_details.account_type,
|
||||||
|
"account_currency": account_details.account_currency or company_currency,
|
||||||
|
"exchange_rate": get_exchange_rate(account, account_details.account_currency,
|
||||||
|
company, debit=debit, credit=credit, exchange_rate=exchange_rate)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# un-set party if not party type
|
||||||
|
if not party_type:
|
||||||
|
grid_values["party"] = ""
|
||||||
|
|
||||||
|
return grid_values
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def get_exchange_rate(account, account_currency=None, company=None,
|
||||||
|
reference_type=None, reference_name=None, debit=None, credit=None, exchange_rate=None):
|
||||||
|
from erpnext.setup.utils import get_exchange_rate
|
||||||
|
account_details = frappe.db.get_value("Account", account,
|
||||||
|
["account_type", "root_type", "account_currency", "company"], as_dict=1)
|
||||||
|
|
||||||
|
if not account_details:
|
||||||
|
frappe.throw(_("Please select correct account"))
|
||||||
|
|
||||||
|
if not company:
|
||||||
|
company = account_details.company
|
||||||
|
|
||||||
|
if not account_currency:
|
||||||
|
account_currency = account_details.account_currency
|
||||||
|
|
||||||
|
company_currency = get_company_currency(company)
|
||||||
|
|
||||||
|
if account_currency != company_currency:
|
||||||
|
if reference_type in ("Sales Invoice", "Purchase Invoice") and reference_name:
|
||||||
|
exchange_rate = frappe.db.get_value(reference_type, reference_name, "conversion_rate")
|
||||||
|
|
||||||
|
elif account_details and account_details.account_type == "Bank" and \
|
||||||
|
((account_details.root_type == "Asset" and flt(credit) > 0) or
|
||||||
|
(account_details.root_type == "Liability" and debit)):
|
||||||
|
exchange_rate = get_average_exchange_rate(account)
|
||||||
|
|
||||||
|
if not exchange_rate and account_currency:
|
||||||
|
exchange_rate = get_exchange_rate(account_currency, company_currency)
|
||||||
|
|
||||||
|
else:
|
||||||
|
exchange_rate = 1
|
||||||
|
|
||||||
|
# don't return None or 0 as it is multipled with a value and that value could be lost
|
||||||
|
return exchange_rate or 1
|
||||||
|
|
||||||
|
def get_average_exchange_rate(account):
|
||||||
|
exchange_rate = 0
|
||||||
|
bank_balance_in_account_currency = get_balance_on(account)
|
||||||
|
if bank_balance_in_account_currency:
|
||||||
|
bank_balance_in_company_currency = get_balance_on(account, in_account_currency=False)
|
||||||
|
exchange_rate = bank_balance_in_company_currency / bank_balance_in_account_currency
|
||||||
|
|
||||||
|
return exchange_rate
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from __future__ import unicode_literals
|
|||||||
import unittest, frappe
|
import unittest, frappe
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt
|
||||||
from erpnext.accounts.utils import get_actual_expense, BudgetError, get_fiscal_year
|
from erpnext.accounts.utils import get_actual_expense, BudgetError, get_fiscal_year
|
||||||
|
from erpnext.exceptions import InvalidAccountCurrency
|
||||||
|
|
||||||
|
|
||||||
class TestJournalEntry(unittest.TestCase):
|
class TestJournalEntry(unittest.TestCase):
|
||||||
@@ -101,7 +102,7 @@ class TestJournalEntry(unittest.TestCase):
|
|||||||
self.set_total_expense_zero("2013-02-28")
|
self.set_total_expense_zero("2013-02-28")
|
||||||
|
|
||||||
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
||||||
"_Test Account Bank Account - _TC", 40000, "_Test Cost Center - _TC", submit=True)
|
"_Test Bank - _TC", 40000, "_Test Cost Center - _TC", submit=True)
|
||||||
|
|
||||||
self.assertTrue(frappe.db.get_value("GL Entry",
|
self.assertTrue(frappe.db.get_value("GL Entry",
|
||||||
{"voucher_type": "Journal Entry", "voucher_no": jv.name}))
|
{"voucher_type": "Journal Entry", "voucher_no": jv.name}))
|
||||||
@@ -112,7 +113,7 @@ class TestJournalEntry(unittest.TestCase):
|
|||||||
self.set_total_expense_zero("2013-02-28")
|
self.set_total_expense_zero("2013-02-28")
|
||||||
|
|
||||||
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
||||||
"_Test Account Bank Account - _TC", 40000, "_Test Cost Center - _TC")
|
"_Test Bank - _TC", 40000, "_Test Cost Center - _TC")
|
||||||
|
|
||||||
self.assertRaises(BudgetError, jv.submit)
|
self.assertRaises(BudgetError, jv.submit)
|
||||||
|
|
||||||
@@ -126,7 +127,7 @@ class TestJournalEntry(unittest.TestCase):
|
|||||||
self.set_total_expense_zero("2013-02-28")
|
self.set_total_expense_zero("2013-02-28")
|
||||||
|
|
||||||
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
||||||
"_Test Account Bank Account - _TC", 150000, "_Test Cost Center - _TC")
|
"_Test Bank - _TC", 150000, "_Test Cost Center - _TC")
|
||||||
|
|
||||||
self.assertRaises(BudgetError, jv.submit)
|
self.assertRaises(BudgetError, jv.submit)
|
||||||
|
|
||||||
@@ -136,13 +137,13 @@ class TestJournalEntry(unittest.TestCase):
|
|||||||
self.set_total_expense_zero("2013-02-28")
|
self.set_total_expense_zero("2013-02-28")
|
||||||
|
|
||||||
jv1 = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
jv1 = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
||||||
"_Test Account Bank Account - _TC", 20000, "_Test Cost Center - _TC", submit=True)
|
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", submit=True)
|
||||||
|
|
||||||
self.assertTrue(frappe.db.get_value("GL Entry",
|
self.assertTrue(frappe.db.get_value("GL Entry",
|
||||||
{"voucher_type": "Journal Entry", "voucher_no": jv1.name}))
|
{"voucher_type": "Journal Entry", "voucher_no": jv1.name}))
|
||||||
|
|
||||||
jv2 = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
jv2 = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
||||||
"_Test Account Bank Account - _TC", 20000, "_Test Cost Center - _TC", submit=True)
|
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", submit=True)
|
||||||
|
|
||||||
self.assertTrue(frappe.db.get_value("GL Entry",
|
self.assertTrue(frappe.db.get_value("GL Entry",
|
||||||
{"voucher_type": "Journal Entry", "voucher_no": jv2.name}))
|
{"voucher_type": "Journal Entry", "voucher_no": jv2.name}))
|
||||||
@@ -165,32 +166,112 @@ class TestJournalEntry(unittest.TestCase):
|
|||||||
def set_total_expense_zero(self, posting_date):
|
def set_total_expense_zero(self, posting_date):
|
||||||
existing_expense = self.get_actual_expense(posting_date)
|
existing_expense = self.get_actual_expense(posting_date)
|
||||||
make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
||||||
"_Test Account Bank Account - _TC", -existing_expense, "_Test Cost Center - _TC", submit=True)
|
"_Test Bank - _TC", -existing_expense, "_Test Cost Center - _TC", submit=True)
|
||||||
|
|
||||||
def make_journal_entry(account1, account2, amount, cost_center=None, submit=False):
|
def test_multi_currency(self):
|
||||||
|
jv = make_journal_entry("_Test Bank USD - _TC",
|
||||||
|
"_Test Bank - _TC", 100, exchange_rate=50, save=False)
|
||||||
|
|
||||||
|
jv.get("accounts")[1].credit_in_account_currency = 5000
|
||||||
|
jv.submit()
|
||||||
|
|
||||||
|
gl_entries = frappe.db.sql("""select account, account_currency, debit, credit,
|
||||||
|
debit_in_account_currency, credit_in_account_currency
|
||||||
|
from `tabGL Entry` where voucher_type='Journal Entry' and voucher_no=%s
|
||||||
|
order by account asc""", jv.name, as_dict=1)
|
||||||
|
|
||||||
|
self.assertTrue(gl_entries)
|
||||||
|
|
||||||
|
expected_values = {
|
||||||
|
"_Test Bank USD - _TC": {
|
||||||
|
"account_currency": "USD",
|
||||||
|
"debit": 5000,
|
||||||
|
"debit_in_account_currency": 100,
|
||||||
|
"credit": 0,
|
||||||
|
"credit_in_account_currency": 0
|
||||||
|
},
|
||||||
|
"_Test Bank - _TC": {
|
||||||
|
"account_currency": "INR",
|
||||||
|
"debit": 0,
|
||||||
|
"debit_in_account_currency": 0,
|
||||||
|
"credit": 5000,
|
||||||
|
"credit_in_account_currency": 5000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for field in ("account_currency", "debit", "debit_in_account_currency", "credit", "credit_in_account_currency"):
|
||||||
|
for i, gle in enumerate(gl_entries):
|
||||||
|
self.assertEquals(expected_values[gle.account][field], gle[field])
|
||||||
|
|
||||||
|
# cancel
|
||||||
|
jv.cancel()
|
||||||
|
|
||||||
|
gle = frappe.db.sql("""select name from `tabGL Entry`
|
||||||
|
where voucher_type='Sales Invoice' and voucher_no=%s""", jv.name)
|
||||||
|
|
||||||
|
self.assertFalse(gle)
|
||||||
|
|
||||||
|
def test_disallow_change_in_account_currency_for_a_party(self):
|
||||||
|
# create jv in USD
|
||||||
|
jv = make_journal_entry("_Test Bank USD - _TC",
|
||||||
|
"_Test Receivable USD - _TC", 100, save=False)
|
||||||
|
|
||||||
|
jv.accounts[1].update({
|
||||||
|
"party_type": "Customer",
|
||||||
|
"party": "_Test Customer USD"
|
||||||
|
})
|
||||||
|
|
||||||
|
jv.submit()
|
||||||
|
|
||||||
|
# create jv in USD, but account currency in INR
|
||||||
|
jv = make_journal_entry("_Test Bank - _TC",
|
||||||
|
"_Test Receivable - _TC", 100, save=False)
|
||||||
|
|
||||||
|
jv.accounts[1].update({
|
||||||
|
"party_type": "Customer",
|
||||||
|
"party": "_Test Customer USD"
|
||||||
|
})
|
||||||
|
|
||||||
|
self.assertRaises(InvalidAccountCurrency, jv.submit)
|
||||||
|
|
||||||
|
# back in USD
|
||||||
|
jv = make_journal_entry("_Test Bank USD - _TC",
|
||||||
|
"_Test Receivable USD - _TC", 100, save=False)
|
||||||
|
|
||||||
|
jv.accounts[1].update({
|
||||||
|
"party_type": "Customer",
|
||||||
|
"party": "_Test Customer USD"
|
||||||
|
})
|
||||||
|
|
||||||
|
jv.submit()
|
||||||
|
|
||||||
|
def make_journal_entry(account1, account2, amount, cost_center=None, exchange_rate=1, save=True, submit=False):
|
||||||
jv = frappe.new_doc("Journal Entry")
|
jv = frappe.new_doc("Journal Entry")
|
||||||
jv.posting_date = "2013-02-14"
|
jv.posting_date = "2013-02-14"
|
||||||
jv.company = "_Test Company"
|
jv.company = "_Test Company"
|
||||||
jv.fiscal_year = "_Test Fiscal Year 2013"
|
jv.fiscal_year = "_Test Fiscal Year 2013"
|
||||||
jv.user_remark = "test"
|
jv.user_remark = "test"
|
||||||
|
jv.multi_currency = 1
|
||||||
jv.set("accounts", [
|
jv.set("accounts", [
|
||||||
{
|
{
|
||||||
"account": account1,
|
"account": account1,
|
||||||
"cost_center": cost_center,
|
"cost_center": cost_center,
|
||||||
"debit": amount if amount > 0 else 0,
|
"debit_in_account_currency": amount if amount > 0 else 0,
|
||||||
"credit": abs(amount) if amount < 0 else 0,
|
"credit_in_account_currency": abs(amount) if amount < 0 else 0,
|
||||||
|
"exchange_rate": exchange_rate
|
||||||
}, {
|
}, {
|
||||||
"account": account2,
|
"account": account2,
|
||||||
"cost_center": cost_center,
|
"cost_center": cost_center,
|
||||||
"credit": amount if amount > 0 else 0,
|
"credit_in_account_currency": amount if amount > 0 else 0,
|
||||||
"debit": abs(amount) if amount < 0 else 0,
|
"debit_in_account_currency": abs(amount) if amount < 0 else 0,
|
||||||
|
"exchange_rate": exchange_rate
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
jv.insert()
|
if save or submit:
|
||||||
|
jv.insert()
|
||||||
|
|
||||||
if submit:
|
if submit:
|
||||||
jv.submit()
|
jv.submit()
|
||||||
|
|
||||||
return jv
|
return jv
|
||||||
|
|
||||||
|
|||||||
@@ -9,15 +9,15 @@
|
|||||||
"account": "_Test Receivable - _TC",
|
"account": "_Test Receivable - _TC",
|
||||||
"party_type": "Customer",
|
"party_type": "Customer",
|
||||||
"party": "_Test Customer",
|
"party": "_Test Customer",
|
||||||
"credit": 400.0,
|
"credit_in_account_currency": 400.0,
|
||||||
"debit": 0.0,
|
"debit_in_account_currency": 0.0,
|
||||||
"doctype": "Journal Entry Account",
|
"doctype": "Journal Entry Account",
|
||||||
"parentfield": "accounts"
|
"parentfield": "accounts"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"account": "_Test Account Bank Account - _TC",
|
"account": "_Test Bank - _TC",
|
||||||
"credit": 0.0,
|
"credit_in_account_currency": 0.0,
|
||||||
"debit": 400.0,
|
"debit_in_account_currency": 400.0,
|
||||||
"doctype": "Journal Entry Account",
|
"doctype": "Journal Entry Account",
|
||||||
"parentfield": "accounts"
|
"parentfield": "accounts"
|
||||||
}
|
}
|
||||||
@@ -40,15 +40,15 @@
|
|||||||
"account": "_Test Payable - _TC",
|
"account": "_Test Payable - _TC",
|
||||||
"party_type": "Supplier",
|
"party_type": "Supplier",
|
||||||
"party": "_Test Supplier",
|
"party": "_Test Supplier",
|
||||||
"credit": 0.0,
|
"credit_in_account_currency": 0.0,
|
||||||
"debit": 400.0,
|
"debit_in_account_currency": 400.0,
|
||||||
"doctype": "Journal Entry Account",
|
"doctype": "Journal Entry Account",
|
||||||
"parentfield": "accounts"
|
"parentfield": "accounts"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"account": "_Test Account Bank Account - _TC",
|
"account": "_Test Bank - _TC",
|
||||||
"credit": 400.0,
|
"credit_in_account_currency": 400.0,
|
||||||
"debit": 0.0,
|
"debit_in_account_currency": 0.0,
|
||||||
"doctype": "Journal Entry Account",
|
"doctype": "Journal Entry Account",
|
||||||
"parentfield": "accounts"
|
"parentfield": "accounts"
|
||||||
}
|
}
|
||||||
@@ -71,16 +71,16 @@
|
|||||||
"account": "_Test Receivable - _TC",
|
"account": "_Test Receivable - _TC",
|
||||||
"party_type": "Customer",
|
"party_type": "Customer",
|
||||||
"party": "_Test Customer",
|
"party": "_Test Customer",
|
||||||
"credit": 0.0,
|
"credit_in_account_currency": 0.0,
|
||||||
"debit": 400.0,
|
"debit_in_account_currency": 400.0,
|
||||||
"doctype": "Journal Entry Account",
|
"doctype": "Journal Entry Account",
|
||||||
"parentfield": "accounts"
|
"parentfield": "accounts"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"account": "Sales - _TC",
|
"account": "Sales - _TC",
|
||||||
"cost_center": "_Test Cost Center - _TC",
|
"cost_center": "_Test Cost Center - _TC",
|
||||||
"credit": 400.0,
|
"credit_in_account_currency": 400.0,
|
||||||
"debit": 0.0,
|
"debit_in_account_currency": 0.0,
|
||||||
"doctype": "Journal Entry Account",
|
"doctype": "Journal Entry Account",
|
||||||
"parentfield": "accounts"
|
"parentfield": "accounts"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "account",
|
"fieldname": "account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -17,12 +19,14 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Account",
|
"label": "Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "account",
|
"oldfieldname": "account",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"print_width": "250px",
|
"print_width": "250px",
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
@@ -34,6 +38,32 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "account_type",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Account Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "balance",
|
"fieldname": "balance",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -41,12 +71,14 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Account Balance",
|
"label": "Account Balance",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "balance",
|
"oldfieldname": "balance",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"options": "Company:company:default_currency",
|
"options": "account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -56,6 +88,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": ":Company",
|
"default": ":Company",
|
||||||
"description": "If Income or Expense",
|
"description": "If Income or Expense",
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
@@ -65,12 +99,14 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "cost_center",
|
"oldfieldname": "cost_center",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Cost Center",
|
"options": "Cost Center",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"print_width": "180px",
|
"print_width": "180px",
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
@@ -82,15 +118,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -100,6 +140,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "party_type",
|
"fieldname": "party_type",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -107,10 +149,12 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Party Type",
|
"label": "Party Type",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "DocType",
|
"options": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -120,6 +164,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "party",
|
"fieldname": "party",
|
||||||
"fieldtype": "Dynamic Link",
|
"fieldtype": "Dynamic Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -127,10 +173,12 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Party",
|
"label": "Party",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "party_type",
|
"options": "party_type",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -140,6 +188,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "party_balance",
|
"fieldname": "party_balance",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -147,11 +197,13 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Party Balance",
|
"label": "Party Balance",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -161,6 +213,106 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"collapsible_depends_on": "",
|
||||||
|
"depends_on": "",
|
||||||
|
"fieldname": "currency_section",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Currency",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "account_currency",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Account Currency",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 1,
|
||||||
|
"options": "Currency",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "column_break_10",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "exchange_rate",
|
||||||
|
"fieldtype": "Float",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Exchange Rate",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "6",
|
||||||
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "sec_break1",
|
"fieldname": "sec_break1",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -168,9 +320,11 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -180,19 +334,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"fieldname": "debit",
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "debit_in_account_currency",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Debit",
|
"label": "Debit",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "debit",
|
"options": "account_currency",
|
||||||
"oldfieldtype": "Currency",
|
|
||||||
"options": "Company:company:default_currency",
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -202,15 +359,46 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "debit",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Debit in Company Currency",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 1,
|
||||||
|
"oldfieldname": "debit",
|
||||||
|
"oldfieldtype": "Currency",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break2",
|
"fieldname": "col_break2",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -220,19 +408,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"fieldname": "credit",
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "credit_in_account_currency",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Credit",
|
"label": "Credit",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "credit",
|
"options": "account_currency",
|
||||||
"oldfieldtype": "Currency",
|
|
||||||
"options": "Company:company:default_currency",
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -242,6 +433,35 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "credit",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Credit in Company Currency",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 1,
|
||||||
|
"oldfieldname": "credit",
|
||||||
|
"oldfieldtype": "Currency",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "reference",
|
"fieldname": "reference",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -249,9 +469,11 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Reference",
|
"label": "Reference",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -261,6 +483,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "reference_type",
|
"fieldname": "reference_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -268,11 +492,13 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Reference Type",
|
"label": "Reference Type",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim",
|
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -282,6 +508,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "reference_name",
|
"fieldname": "reference_name",
|
||||||
"fieldtype": "Dynamic Link",
|
"fieldtype": "Dynamic Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -289,11 +517,13 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Reference Name",
|
"label": "Reference Name",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "reference_type",
|
"options": "reference_type",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -303,15 +533,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break3",
|
"fieldname": "col_break3",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -321,6 +555,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "is_advance",
|
"fieldname": "is_advance",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -328,12 +564,14 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Is Advance",
|
"label": "Is Advance",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "is_advance",
|
"oldfieldname": "is_advance",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "No\nYes",
|
"options": "No\nYes",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -343,6 +581,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "against_account",
|
"fieldname": "against_account",
|
||||||
"fieldtype": "Text",
|
"fieldtype": "Text",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -350,11 +590,13 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Against Account",
|
"label": "Against Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "against_account",
|
"oldfieldname": "against_account",
|
||||||
"oldfieldtype": "Text",
|
"oldfieldtype": "Text",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -371,7 +613,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-08-17 02:11:33.991361",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-12-02 04:14:37.571883",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Journal Entry Account",
|
"name": "Journal Entry Account",
|
||||||
|
|||||||
@@ -1,58 +1,120 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:mode_of_payment",
|
"autoname": "field:mode_of_payment",
|
||||||
"creation": "2012-12-04 17:49:20",
|
"creation": "2012-12-04 17:49:20",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Setup",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "mode_of_payment",
|
"fieldname": "mode_of_payment",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Mode of Payment",
|
"label": "Mode of Payment",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "mode_of_payment",
|
"oldfieldname": "mode_of_payment",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "accounts",
|
"fieldname": "accounts",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Accounts",
|
"label": "Accounts",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Mode of Payment Account",
|
"options": "Mode of Payment Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-credit-card",
|
"icon": "icon-credit-card",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2015-02-05 05:11:41.346436",
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:50.335559",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Mode of Payment",
|
"name": "Mode of Payment",
|
||||||
"owner": "harshada@webnotestech.com",
|
"owner": "harshada@webnotestech.com",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"apply_user_permissions": 1,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
|
"delete": 0,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts User"
|
"role": "Accounts User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,24 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
from frappe import _
|
||||||
|
|
||||||
class ModeofPayment(Document):
|
class ModeofPayment(Document):
|
||||||
pass
|
def validate(self):
|
||||||
|
self.validate_accounts()
|
||||||
|
self.validate_repeating_companies()
|
||||||
|
|
||||||
|
def validate_repeating_companies(self):
|
||||||
|
"""Error when Same Company is entered multiple times in accounts"""
|
||||||
|
accounts_list = []
|
||||||
|
for entry in self.accounts:
|
||||||
|
accounts_list.append(entry.company)
|
||||||
|
|
||||||
|
if len(accounts_list)!= len(set(accounts_list)):
|
||||||
|
frappe.throw(_("Same Company is entered more than once"))
|
||||||
|
|
||||||
|
def validate_accounts(self):
|
||||||
|
for entry in self.accounts:
|
||||||
|
"""Error when Company of Ledger account doesn't match with Company Selected"""
|
||||||
|
if frappe.db.get_value("Account", entry.default_account, "company") != entry.company:
|
||||||
|
frappe.throw(_("Account does not match with Company"))
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
# test_records = frappe.get_test_records('Mode of Payment')
|
||||||
|
|
||||||
|
class TestModeofPayment(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -17,6 +19,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -26,10 +29,13 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Default Bank / Cash account will be automatically updated in POS Invoice when this mode is selected.",
|
"description": "Default Bank / Cash account will be automatically updated in POS Invoice when this mode is selected.",
|
||||||
"fieldname": "default_account",
|
"fieldname": "default_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -38,6 +44,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Default Account",
|
"label": "Default Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -47,7 +54,8 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
@@ -57,7 +65,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-01-06 17:26:57.053474",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:50.367895",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Mode of Payment Account",
|
"name": "Mode of Payment Account",
|
||||||
|
|||||||
@@ -1,46 +1,101 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"autoname": "field:distribution_id",
|
"autoname": "field:distribution_id",
|
||||||
"creation": "2013-01-10 16:34:05",
|
"creation": "2013-01-10 16:34:05",
|
||||||
|
"custom": 0,
|
||||||
"description": "**Monthly Distribution** helps you distribute your budget across months if you have seasonality in your business.\n\nTo distribute a budget using this distribution, set this **Monthly Distribution** in the **Cost Center**",
|
"description": "**Monthly Distribution** helps you distribute your budget across months if you have seasonality in your business.\n\nTo distribute a budget using this distribution, set this **Monthly Distribution** in the **Cost Center**",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Name of the Monthly Distribution",
|
"description": "Name of the Monthly Distribution",
|
||||||
"fieldname": "distribution_id",
|
"fieldname": "distribution_id",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Distribution Name",
|
"label": "Distribution Name",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "distribution_id",
|
"oldfieldname": "distribution_id",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "fiscal_year",
|
"fieldname": "fiscal_year",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Fiscal Year",
|
"label": "Fiscal Year",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "fiscal_year",
|
"oldfieldname": "fiscal_year",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "Fiscal Year",
|
"options": "Fiscal Year",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "percentages",
|
"fieldname": "percentages",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Monthly Distribution Percentages",
|
"label": "Monthly Distribution Percentages",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "budget_distribution_details",
|
"oldfieldname": "budget_distribution_details",
|
||||||
"oldfieldtype": "Table",
|
"oldfieldtype": "Table",
|
||||||
"options": "Monthly Distribution Percentage",
|
"options": "Monthly Distribution Percentage",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-bar-chart",
|
"icon": "icon-bar-chart",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2015-02-05 05:11:41.429491",
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:50.431735",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Monthly Distribution",
|
"name": "Monthly Distribution",
|
||||||
@@ -49,29 +104,47 @@
|
|||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 2,
|
"permlevel": 2,
|
||||||
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
"submit": 0
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC"
|
"sort_order": "DESC"
|
||||||
}
|
}
|
||||||
@@ -1,36 +1,77 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"autoname": "hash",
|
"autoname": "hash",
|
||||||
"creation": "2013-02-22 01:27:38",
|
"creation": "2013-02-22 01:27:38",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "month",
|
"fieldname": "month",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Month",
|
"label": "Month",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "month",
|
"oldfieldname": "month",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"reqd": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "percentage_allocation",
|
"fieldname": "percentage_allocation",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Percentage Allocation",
|
"label": "Percentage Allocation",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "percentage_allocation",
|
"oldfieldname": "percentage_allocation",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-02-19 01:07:00.800015",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:50.468982",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Monthly Distribution Percentage",
|
"name": "Monthly Distribution Percentage",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": []
|
"permissions": [],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -17,6 +19,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -25,17 +28,36 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"label": "col_break1",
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "account",
|
"fieldname": "account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -43,6 +65,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Account",
|
"label": "Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -51,7 +74,8 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
@@ -61,7 +85,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-08-29 16:08:49.388820",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:51.450360",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Party Account",
|
"name": "Party Account",
|
||||||
|
|||||||
@@ -74,21 +74,7 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
|
|||||||
doc: me.frm.doc,
|
doc: me.frm.doc,
|
||||||
method: 'get_unreconciled_entries',
|
method: 'get_unreconciled_entries',
|
||||||
callback: function(r, rt) {
|
callback: function(r, rt) {
|
||||||
var invoices = [];
|
me.set_invoice_options();
|
||||||
|
|
||||||
$.each(me.frm.doc.invoices || [], function(i, row) {
|
|
||||||
if (row.invoice_number && !inList(invoices, row.invoice_number))
|
|
||||||
invoices.push(row.invoice_number);
|
|
||||||
});
|
|
||||||
|
|
||||||
frappe.meta.get_docfield("Payment Reconciliation Payment", "invoice_number",
|
|
||||||
me.frm.doc.name).options = invoices.join("\n");
|
|
||||||
|
|
||||||
$.each(me.frm.doc.payments || [], function(i, p) {
|
|
||||||
if(!inList(invoices, cstr(p.invoice_number))) p.invoice_number = null;
|
|
||||||
});
|
|
||||||
|
|
||||||
refresh_field("payments");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -98,8 +84,29 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
|
|||||||
var me = this;
|
var me = this;
|
||||||
return this.frm.call({
|
return this.frm.call({
|
||||||
doc: me.frm.doc,
|
doc: me.frm.doc,
|
||||||
method: 'reconcile'
|
method: 'reconcile',
|
||||||
|
callback: function(r, rt) {
|
||||||
|
me.set_invoice_options();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
set_invoice_options: function() {
|
||||||
|
var invoices = [];
|
||||||
|
|
||||||
|
$.each(me.frm.doc.invoices || [], function(i, row) {
|
||||||
|
if (row.invoice_number && !inList(invoices, row.invoice_number))
|
||||||
|
invoices.push(row.invoice_type + " | " + row.invoice_number);
|
||||||
|
});
|
||||||
|
|
||||||
|
frappe.meta.get_docfield("Payment Reconciliation Payment", "invoice_number",
|
||||||
|
me.frm.doc.name).options = invoices.join("\n");
|
||||||
|
|
||||||
|
$.each(me.frm.doc.payments || [], function(i, p) {
|
||||||
|
if(!inList(invoices, cstr(p.invoice_number))) p.invoice_number = null;
|
||||||
|
});
|
||||||
|
|
||||||
|
refresh_field("payments");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 1,
|
"allow_copy": 1,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"creation": "2014-07-09 12:04:51.681583",
|
"creation": "2014-07-09 12:04:51.681583",
|
||||||
"custom": 0,
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
@@ -7,132 +9,360 @@
|
|||||||
"document_type": "",
|
"document_type": "",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "party_type",
|
"fieldname": "party_type",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Party Type",
|
"label": "Party Type",
|
||||||
|
"no_copy": 0,
|
||||||
"options": "DocType",
|
"options": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "",
|
"depends_on": "",
|
||||||
"fieldname": "party",
|
"fieldname": "party",
|
||||||
"fieldtype": "Dynamic Link",
|
"fieldtype": "Dynamic Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Party",
|
"label": "Party",
|
||||||
|
"no_copy": 0,
|
||||||
"options": "party_type",
|
"options": "party_type",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "receivable_payable_account",
|
"fieldname": "receivable_payable_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Receivable / Payable Account",
|
"label": "Receivable / Payable Account",
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "bank_cash_account",
|
"fieldname": "bank_cash_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Bank / Cash Account",
|
"label": "Bank / Cash Account",
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"label": "Column Break",
|
"hidden": 0,
|
||||||
"permlevel": 0
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "",
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "from_date",
|
"fieldname": "from_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "From Date",
|
"label": "From Date",
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "to_date",
|
"fieldname": "to_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "To Date",
|
"label": "To Date",
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"search_index": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "minimum_amount",
|
"fieldname": "minimum_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Minimum Amount",
|
"label": "Minimum Amount",
|
||||||
"permlevel": 0
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "maximum_amount",
|
"fieldname": "maximum_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Maximum Amount",
|
"label": "Maximum Amount",
|
||||||
"permlevel": 0
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "get_unreconciled_entries",
|
"fieldname": "get_unreconciled_entries",
|
||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Get Unreconciled Entries",
|
"label": "Get Unreconciled Entries",
|
||||||
"permlevel": 0
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "sec_break1",
|
"fieldname": "sec_break1",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Unreconciled Payment Details",
|
"label": "Unreconciled Payment Details",
|
||||||
"permlevel": 0
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "payments",
|
"fieldname": "payments",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Payments",
|
"label": "Payments",
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Payment Reconciliation Payment",
|
"options": "Payment Reconciliation Payment",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "reconcile",
|
"fieldname": "reconcile",
|
||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Reconcile",
|
"label": "Reconcile",
|
||||||
"permlevel": 0
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "sec_break2",
|
"fieldname": "sec_break2",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Invoice/Journal Entry Details",
|
"label": "Invoice/Journal Entry Details",
|
||||||
"permlevel": 0
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "invoices",
|
"fieldname": "invoices",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Invoices",
|
"label": "Invoices",
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Payment Reconciliation Invoice",
|
"options": "Payment Reconciliation Invoice",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 1,
|
"hide_toolbar": 1,
|
||||||
"icon": "icon-resize-horizontal",
|
"icon": "icon-resize-horizontal",
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"modified": "2015-02-05 05:11:42.105088",
|
"istable": 0,
|
||||||
|
"modified": "2015-09-21 03:41:24.672227",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Reconciliation",
|
"name": "Payment Reconciliation",
|
||||||
@@ -140,28 +370,48 @@
|
|||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
|
"report": 0,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
|
"email": 0,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
|
"report": 0,
|
||||||
"role": "Accounts User",
|
"role": "Accounts User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC"
|
"sort_order": "DESC"
|
||||||
}
|
}
|
||||||
@@ -3,12 +3,10 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt
|
||||||
|
|
||||||
from frappe import msgprint, _
|
from frappe import msgprint, _
|
||||||
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
from erpnext.accounts.utils import get_outstanding_invoices
|
||||||
|
|
||||||
class PaymentReconciliation(Document):
|
class PaymentReconciliation(Document):
|
||||||
def get_unreconciled_entries(self):
|
def get_unreconciled_entries(self):
|
||||||
@@ -17,9 +15,10 @@ class PaymentReconciliation(Document):
|
|||||||
|
|
||||||
def get_jv_entries(self):
|
def get_jv_entries(self):
|
||||||
self.check_mandatory_to_fetch()
|
self.check_mandatory_to_fetch()
|
||||||
dr_or_cr = "credit" if self.party_type == "Customer" else "debit"
|
dr_or_cr = "credit_in_account_currency" if self.party_type == "Customer" \
|
||||||
|
else "debit_in_account_currency"
|
||||||
|
|
||||||
cond = self.check_condition(dr_or_cr)
|
cond = self.check_condition()
|
||||||
|
|
||||||
bank_account_condition = "t2.against_account like %(bank_cash_account)s" \
|
bank_account_condition = "t2.against_account like %(bank_cash_account)s" \
|
||||||
if self.bank_cash_account else "1=1"
|
if self.bank_cash_account else "1=1"
|
||||||
@@ -34,7 +33,7 @@ class PaymentReconciliation(Document):
|
|||||||
t1.name = t2.parent and t1.docstatus = 1 and t2.docstatus = 1
|
t1.name = t2.parent and t1.docstatus = 1 and t2.docstatus = 1
|
||||||
and t2.party_type = %(party_type)s and t2.party = %(party)s
|
and t2.party_type = %(party_type)s and t2.party = %(party)s
|
||||||
and t2.account = %(account)s and {dr_or_cr} > 0
|
and t2.account = %(account)s and {dr_or_cr} > 0
|
||||||
and ifnull(t2.reference_type, '') in ('', 'Sales Order', 'Purchase Order')
|
and (t2.reference_type is null or t2.reference_type in ('', 'Sales Order', 'Purchase Order'))
|
||||||
{cond}
|
{cond}
|
||||||
and (CASE
|
and (CASE
|
||||||
WHEN t1.voucher_type in ('Debit Note', 'Credit Note')
|
WHEN t1.voucher_type in ('Debit Note', 'Credit Note')
|
||||||
@@ -67,58 +66,11 @@ class PaymentReconciliation(Document):
|
|||||||
|
|
||||||
def get_invoice_entries(self):
|
def get_invoice_entries(self):
|
||||||
#Fetch JVs, Sales and Purchase Invoices for 'invoices' to reconcile against
|
#Fetch JVs, Sales and Purchase Invoices for 'invoices' to reconcile against
|
||||||
non_reconciled_invoices = []
|
|
||||||
dr_or_cr = "debit" if self.party_type == "Customer" else "credit"
|
|
||||||
cond = self.check_condition(dr_or_cr)
|
|
||||||
|
|
||||||
invoice_list = frappe.db.sql("""
|
condition = self.check_condition()
|
||||||
select
|
|
||||||
voucher_no, voucher_type, posting_date,
|
|
||||||
ifnull(sum({dr_or_cr}), 0) as invoice_amount
|
|
||||||
from
|
|
||||||
`tabGL Entry`
|
|
||||||
where
|
|
||||||
party_type = %(party_type)s and party = %(party)s
|
|
||||||
and account = %(account)s and {dr_or_cr} > 0 {cond}
|
|
||||||
group by voucher_type, voucher_no
|
|
||||||
""".format(**{
|
|
||||||
"cond": cond,
|
|
||||||
"dr_or_cr": dr_or_cr
|
|
||||||
}), {
|
|
||||||
"party_type": self.party_type,
|
|
||||||
"party": self.party,
|
|
||||||
"account": self.receivable_payable_account,
|
|
||||||
}, as_dict=True)
|
|
||||||
|
|
||||||
for d in invoice_list:
|
non_reconciled_invoices = get_outstanding_invoices(self.party_type, self.party,
|
||||||
payment_amount = frappe.db.sql("""
|
self.receivable_payable_account, condition=condition)
|
||||||
select
|
|
||||||
ifnull(sum(ifnull({0}, 0)), 0)
|
|
||||||
from
|
|
||||||
`tabGL Entry`
|
|
||||||
where
|
|
||||||
party_type = %(party_type)s and party = %(party)s
|
|
||||||
and account = %(account)s and {0} > 0
|
|
||||||
and against_voucher_type = %(against_voucher_type)s
|
|
||||||
and ifnull(against_voucher, '') = %(against_voucher)s
|
|
||||||
""".format("credit" if self.party_type == "Customer" else "debit"), {
|
|
||||||
"party_type": self.party_type,
|
|
||||||
"party": self.party,
|
|
||||||
"account": self.receivable_payable_account,
|
|
||||||
"against_voucher_type": d.voucher_type,
|
|
||||||
"against_voucher": d.voucher_no
|
|
||||||
})
|
|
||||||
|
|
||||||
payment_amount = payment_amount[0][0] if payment_amount else 0
|
|
||||||
|
|
||||||
if d.invoice_amount - payment_amount > 0.005:
|
|
||||||
non_reconciled_invoices.append({
|
|
||||||
'voucher_no': d.voucher_no,
|
|
||||||
'voucher_type': d.voucher_type,
|
|
||||||
'posting_date': d.posting_date,
|
|
||||||
'invoice_amount': flt(d.invoice_amount),
|
|
||||||
'outstanding_amount': flt(d.invoice_amount - payment_amount, 2)
|
|
||||||
})
|
|
||||||
|
|
||||||
self.add_invoice_entries(non_reconciled_invoices)
|
self.add_invoice_entries(non_reconciled_invoices)
|
||||||
|
|
||||||
@@ -135,12 +87,18 @@ class PaymentReconciliation(Document):
|
|||||||
ent.outstanding_amount = e.get('outstanding_amount')
|
ent.outstanding_amount = e.get('outstanding_amount')
|
||||||
|
|
||||||
def reconcile(self, args):
|
def reconcile(self, args):
|
||||||
|
for e in self.get('payments'):
|
||||||
|
e.invoice_type = None
|
||||||
|
if e.invoice_number and " | " in e.invoice_number:
|
||||||
|
e.invoice_type, e.invoice_number = e.invoice_number.split(" | ")
|
||||||
|
|
||||||
self.get_invoice_entries()
|
self.get_invoice_entries()
|
||||||
self.validate_invoice()
|
self.validate_invoice()
|
||||||
dr_or_cr = "credit" if self.party_type == "Customer" else "debit"
|
dr_or_cr = "credit_in_account_currency" if self.party_type == "Customer" \
|
||||||
|
else "debit_in_account_currency"
|
||||||
lst = []
|
lst = []
|
||||||
for e in self.get('payments'):
|
for e in self.get('payments'):
|
||||||
if e.invoice_type and e.invoice_number and e.allocated_amount:
|
if e.invoice_number and e.allocated_amount:
|
||||||
lst.append({
|
lst.append({
|
||||||
'voucher_no' : e.journal_entry,
|
'voucher_no' : e.journal_entry,
|
||||||
'voucher_detail_no' : e.voucher_detail_number,
|
'voucher_detail_no' : e.voucher_detail_number,
|
||||||
@@ -199,13 +157,18 @@ class PaymentReconciliation(Document):
|
|||||||
if not invoices_to_reconcile:
|
if not invoices_to_reconcile:
|
||||||
frappe.throw(_("Please select Allocated Amount, Invoice Type and Invoice Number in atleast one row"))
|
frappe.throw(_("Please select Allocated Amount, Invoice Type and Invoice Number in atleast one row"))
|
||||||
|
|
||||||
def check_condition(self, dr_or_cr):
|
def check_condition(self):
|
||||||
cond = self.from_date and " and posting_date >= '" + self.from_date + "'" or ""
|
cond = " and posting_date >= {0}".format(frappe.db.escape(self.from_date)) if self.from_date else ""
|
||||||
cond += self.to_date and " and posting_date <= '" + self.to_date + "'" or ""
|
cond += " and posting_date <= {0}".format(frappe.db.escape(self.to_date)) if self.to_date else ""
|
||||||
|
|
||||||
|
if self.party_type == "Customer":
|
||||||
|
dr_or_cr = "debit_in_account_currency"
|
||||||
|
else:
|
||||||
|
dr_or_cr = "credit_in_account_currency"
|
||||||
|
|
||||||
if self.minimum_amount:
|
if self.minimum_amount:
|
||||||
cond += " and {0} >= %s".format(dr_or_cr) % self.minimum_amount
|
cond += " and `{0}` >= {1}".format(dr_or_cr, flt(self.minimum_amount))
|
||||||
if self.maximum_amount:
|
if self.maximum_amount:
|
||||||
cond += " and {0} <= %s".format(dr_or_cr) % self.maximum_amount
|
cond += " and `{0}` <= {1}".format(dr_or_cr, flt(self.maximum_amount))
|
||||||
|
|
||||||
return cond
|
return cond
|
||||||
|
|||||||
@@ -1,66 +1,165 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"creation": "2014-07-09 16:14:23.672922",
|
"creation": "2014-07-09 16:14:23.672922",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "",
|
"document_type": "",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "invoice_type",
|
"fieldname": "invoice_type",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Invoice Type",
|
"label": "Invoice Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Sales Invoice\nPurchase Invoice\nJournal Entry",
|
"options": "Sales Invoice\nPurchase Invoice\nJournal Entry",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "invoice_number",
|
"fieldname": "invoice_number",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Invoice Number",
|
"label": "Invoice Number",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "",
|
"options": "",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "invoice_date",
|
"fieldname": "invoice_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Invoice Date",
|
"label": "Invoice Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"label": "Column Break",
|
"hidden": 0,
|
||||||
"permlevel": 0
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "outstanding_amount",
|
"fieldname": "outstanding_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Outstanding Amount",
|
"label": "Outstanding Amount",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-07-18 12:20:51.269974",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:51.516537",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Reconciliation Invoice",
|
"name": "Payment Reconciliation Invoice",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC"
|
"sort_order": "DESC"
|
||||||
}
|
}
|
||||||
@@ -1,116 +1,254 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"creation": "2014-07-09 16:13:35.452759",
|
"creation": "2014-07-09 16:13:35.452759",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "",
|
"document_type": "",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "journal_entry",
|
"fieldname": "journal_entry",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Journal Entry",
|
"label": "Journal Entry",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Journal Entry",
|
"options": "Journal Entry",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"reqd": 0
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "posting_date",
|
"fieldname": "posting_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Posting Date",
|
"label": "Posting Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "is_advance",
|
"fieldname": "is_advance",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Is Advance",
|
"label": "Is Advance",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "voucher_detail_number",
|
"fieldname": "voucher_detail_number",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Voucher Detail Number",
|
"label": "Voucher Detail Number",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"label": "Column Break",
|
"hidden": 0,
|
||||||
"permlevel": 0
|
"ignore_user_permissions": 0,
|
||||||
},
|
"in_filter": 0,
|
||||||
{
|
|
||||||
"fieldname": "allocated_amount",
|
|
||||||
"fieldtype": "Currency",
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Allocated amount",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"reqd": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"default": "Sales Invoice",
|
|
||||||
"fieldname": "invoice_type",
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Invoice Type",
|
"label": "",
|
||||||
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry",
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "invoice_number",
|
"fieldname": "invoice_number",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Invoice Number",
|
"label": "Invoice Number",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "",
|
"options": "",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "allocated_amount",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Allocated amount",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "sec_break1",
|
"fieldname": "sec_break1",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
"permlevel": 0
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "remark",
|
"fieldname": "remark",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Remark",
|
"label": "Remark",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
},
|
"read_only": 1,
|
||||||
{
|
"report_hide": 0,
|
||||||
"fieldname": "col_break2",
|
"reqd": 0,
|
||||||
"fieldtype": "Column Break",
|
"search_index": 0,
|
||||||
"label": "Column Break",
|
"set_only_once": 0,
|
||||||
"permlevel": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-12-25 16:26:48.345281",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:51.563989",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Reconciliation Payment",
|
"name": "Payment Reconciliation Payment",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC"
|
"sort_order": "DESC"
|
||||||
}
|
}
|
||||||
@@ -25,8 +25,14 @@ frappe.ui.form.on("Payment Tool", "onload", function(frm) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
frm.set_query("against_voucher_type", "vouchers", function() {
|
frm.set_query("against_voucher_type", "vouchers", function() {
|
||||||
|
if (frm.doc.party_type=="Customer") {
|
||||||
|
var doctypes = ["Sales Order", "Sales Invoice", "Journal Entry"];
|
||||||
|
} else {
|
||||||
|
var doctypes = ["Purchase Order", "Purchase Invoice", "Journal Entry"];
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
filters: {"name": ["in", ["Sales Invoice", "Purchase Invoice", "Journal Entry", "Sales Order", "Purchase Order"]]}
|
filters: { "name": ["in", doctypes] }
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -55,6 +61,25 @@ frappe.ui.form.on("Payment Tool", "party", function(frm) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on("Payment Tool", "party_account", function(frm) {
|
||||||
|
if(frm.doc.party_account) {
|
||||||
|
frm.call({
|
||||||
|
method: "frappe.client.get_value",
|
||||||
|
args: {
|
||||||
|
doctype: "Account",
|
||||||
|
fieldname: "account_currency",
|
||||||
|
filters: { name: frm.doc.party_account },
|
||||||
|
},
|
||||||
|
callback: function(r, rt) {
|
||||||
|
if(r.message) {
|
||||||
|
frm.set_value("party_account_currency", r.message.account_currency);
|
||||||
|
erpnext.payment_tool.check_mandatory_to_set_button(frm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
frappe.ui.form.on("Payment Tool", "company", function(frm) {
|
frappe.ui.form.on("Payment Tool", "company", function(frm) {
|
||||||
erpnext.payment_tool.check_mandatory_to_set_button(frm);
|
erpnext.payment_tool.check_mandatory_to_set_button(frm);
|
||||||
});
|
});
|
||||||
@@ -63,10 +88,6 @@ frappe.ui.form.on("Payment Tool", "received_or_paid", function(frm) {
|
|||||||
erpnext.payment_tool.check_mandatory_to_set_button(frm);
|
erpnext.payment_tool.check_mandatory_to_set_button(frm);
|
||||||
});
|
});
|
||||||
|
|
||||||
frappe.ui.form.on("Payment Tool", "party", function(frm) {
|
|
||||||
erpnext.payment_tool.check_mandatory_to_set_button(frm);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Fetch bank/cash account based on payment mode
|
// Fetch bank/cash account based on payment mode
|
||||||
frappe.ui.form.on("Payment Tool", "payment_mode", function(frm) {
|
frappe.ui.form.on("Payment Tool", "payment_mode", function(frm) {
|
||||||
return frappe.call({
|
return frappe.call({
|
||||||
@@ -120,6 +141,10 @@ frappe.ui.form.on("Payment Tool", "get_outstanding_vouchers", function(frm) {
|
|||||||
c.against_voucher_no = d.voucher_no;
|
c.against_voucher_no = d.voucher_no;
|
||||||
c.total_amount = d.invoice_amount;
|
c.total_amount = d.invoice_amount;
|
||||||
c.outstanding_amount = d.outstanding_amount;
|
c.outstanding_amount = d.outstanding_amount;
|
||||||
|
|
||||||
|
if (frm.doc.set_payment_amount) {
|
||||||
|
c.payment_amount = d.outstanding_amount;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
refresh_field("vouchers");
|
refresh_field("vouchers");
|
||||||
@@ -130,41 +155,63 @@ frappe.ui.form.on("Payment Tool", "get_outstanding_vouchers", function(frm) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// validate against_voucher_type
|
// validate against_voucher_type
|
||||||
frappe.ui.form.on("Payment Tool Detail", "against_voucher_type", function(frm) {
|
frappe.ui.form.on("Payment Tool Detail", "against_voucher_type", function(frm, cdt, cdn) {
|
||||||
erpnext.payment_tool.validate_against_voucher(frm);
|
var row = frappe.model.get_doc(cdt, cdn);
|
||||||
|
erpnext.payment_tool.validate_against_voucher(frm, row);
|
||||||
});
|
});
|
||||||
|
|
||||||
erpnext.payment_tool.validate_against_voucher = function(frm) {
|
erpnext.payment_tool.validate_against_voucher = function(frm, row) {
|
||||||
$.each(frm.doc.vouchers || [], function(i, row) {
|
var _validate = function(i, row) {
|
||||||
|
if (!row.against_voucher_type) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(frm.doc.party_type=="Customer"
|
if(frm.doc.party_type=="Customer"
|
||||||
&& !in_list(["Sales Order", "Sales Invoice", "Journal Entry"], row.against_voucher_type)) {
|
&& !in_list(["Sales Order", "Sales Invoice", "Journal Entry"], row.against_voucher_type)) {
|
||||||
frappe.model.set_value(row.doctype, row.name, "against_voucher_type", "");
|
frappe.model.set_value(row.doctype, row.name, "against_voucher_type", "");
|
||||||
frappe.throw(__("Against Voucher Type must be one of Sales Order, Sales Invoice or Journal Entry"))
|
frappe.msgprint(__("Against Voucher Type must be one of Sales Order, Sales Invoice or Journal Entry"));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frm.doc.party_type=="Supplier"
|
if(frm.doc.party_type=="Supplier"
|
||||||
&& !in_list(["Purchase Order", "Purchase Invoice", "Journal Entry"], row.against_voucher_type)) {
|
&& !in_list(["Purchase Order", "Purchase Invoice", "Journal Entry"], row.against_voucher_type)) {
|
||||||
frappe.model.set_value(row.doctype, row.name, "against_voucher_type", "");
|
frappe.model.set_value(row.doctype, row.name, "against_voucher_type", "");
|
||||||
frappe.throw(__("Against Voucher Type must be one of Purchase Order, Purchase Invoice or Journal Entry"))
|
frappe.msgprint(__("Against Voucher Type must be one of Purchase Order, Purchase Invoice or Journal Entry"));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
}
|
||||||
|
|
||||||
|
if (row) {
|
||||||
|
_validate(0, row);
|
||||||
|
} else {
|
||||||
|
$.each(frm.doc.vouchers || [], _validate);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate against_voucher_type
|
// validate against_voucher_type
|
||||||
frappe.ui.form.on("Payment Tool Detail", "against_voucher_no", function(frm, cdt, cdn) {
|
frappe.ui.form.on("Payment Tool Detail", "against_voucher_no", function(frm, cdt, cdn) {
|
||||||
var row = locals[cdt][cdn];
|
var row = locals[cdt][cdn];
|
||||||
|
if (!row.against_voucher_no) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_against_voucher_amount',
|
method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_against_voucher_amount',
|
||||||
args: {
|
args: {
|
||||||
"against_voucher_type": row.against_voucher_type,
|
"against_voucher_type": row.against_voucher_type,
|
||||||
"against_voucher_no": row.against_voucher_no
|
"against_voucher_no": row.against_voucher_no,
|
||||||
|
"party_account": frm.doc.party_account,
|
||||||
|
"company": frm.doc.company
|
||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
$.each(r.message, function(k, v) {
|
$.each(r.message, function(k, v) {
|
||||||
frappe.model.set_value(cdt, cdn, k, v);
|
frappe.model.set_value(cdt, cdn, k, v);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frappe.model.set_value(cdt, cdn, "payment_amount", r.message.outstanding_amount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -187,7 +234,7 @@ erpnext.payment_tool.set_total_payment_amount = function(frm) {
|
|||||||
} else {
|
} else {
|
||||||
if(row.payment_amount < 0)
|
if(row.payment_amount < 0)
|
||||||
msgprint(__("Row {0}: Payment amount can not be negative", [row.idx]));
|
msgprint(__("Row {0}: Payment amount can not be negative", [row.idx]));
|
||||||
else if(row.payment_amount >= row.outstanding_amount)
|
else if(row.payment_amount > row.outstanding_amount)
|
||||||
msgprint(__("Row {0}: Payment Amount cannot be greater than Outstanding Amount", [__(row.idx)]));
|
msgprint(__("Row {0}: Payment Amount cannot be greater than Outstanding Amount", [__(row.idx)]));
|
||||||
|
|
||||||
frappe.model.set_value(row.doctype, row.name, "payment_amount", 0.0);
|
frappe.model.set_value(row.doctype, row.name, "payment_amount", 0.0);
|
||||||
|
|||||||
@@ -9,21 +9,52 @@
|
|||||||
"document_type": "",
|
"document_type": "",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "sec_break1",
|
"fieldname": "sec_break1",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Find Invoices to Match",
|
"label": "Find Invoices to Match",
|
||||||
"permlevel": 0
|
"no_copy": 0,
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "company",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"label": "Company",
|
|
||||||
"options": "Company",
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Company",
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Company",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "Customer",
|
"default": "Customer",
|
||||||
"fieldname": "party_type",
|
"fieldname": "party_type",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -40,10 +71,13 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "received_or_paid",
|
"fieldname": "received_or_paid",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -59,17 +93,20 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Column Break 1",
|
"label": "",
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -77,10 +114,13 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "",
|
"depends_on": "",
|
||||||
"fieldname": "party",
|
"fieldname": "party",
|
||||||
"fieldtype": "Dynamic Link",
|
"fieldtype": "Dynamic Link",
|
||||||
@@ -97,21 +137,80 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "party_account",
|
"fieldname": "party_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Party Account",
|
"label": "Party Account",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "party_account_currency",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Party Account Currency",
|
||||||
|
"no_copy": 1,
|
||||||
|
"options": "Currency",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "set_payment_amount",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Set Payment Amount = Outstanding Amount",
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "get_outstanding_vouchers",
|
"fieldname": "get_outstanding_vouchers",
|
||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -126,10 +225,13 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && doc.party_account)",
|
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && doc.party_account)",
|
||||||
"fieldname": "sec_break3",
|
"fieldname": "sec_break3",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
@@ -145,10 +247,13 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "vouchers",
|
"fieldname": "vouchers",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -164,18 +269,36 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
},
|
"unique": 0
|
||||||
{
|
|
||||||
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && doc.party_account)",
|
|
||||||
"fieldname": "section_break_19",
|
|
||||||
"fieldtype": "Section Break",
|
|
||||||
"label": "Make Payment Entry",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && doc.party_account)",
|
||||||
|
"fieldname": "section_break_19",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Make Payment Entry",
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "payment_mode",
|
"fieldname": "payment_mode",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -191,10 +314,13 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "payment_account",
|
"fieldname": "payment_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -210,23 +336,56 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
},
|
"unique": 0
|
||||||
{
|
|
||||||
"fieldname": "total_payment_amount",
|
|
||||||
"fieldtype": "Currency",
|
|
||||||
"label": "Total Payment Amount",
|
|
||||||
"permlevel": 0,
|
|
||||||
"read_only": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "data_22",
|
|
||||||
"fieldtype": "Column Break",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "total_payment_amount",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Total Payment Amount",
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "party_account_currency",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "data_22",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "reference_date",
|
"fieldname": "reference_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -241,10 +400,13 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "reference_no",
|
"fieldname": "reference_no",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -259,10 +421,13 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "make_journal_entry",
|
"fieldname": "make_journal_entry",
|
||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -277,17 +442,35 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
},
|
"unique": 0
|
||||||
{
|
|
||||||
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && doc.party_account)",
|
|
||||||
"fieldname": "section_break_21",
|
|
||||||
"fieldtype": "Section Break",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && doc.party_account)",
|
||||||
|
"fieldname": "section_break_21",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "make_jv_help",
|
"fieldname": "make_jv_help",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -301,7 +484,8 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
@@ -312,7 +496,7 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"modified": "2015-06-05 11:17:33.843334",
|
"modified": "2015-10-01 09:43:24.199025",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Tool",
|
"name": "Payment Tool",
|
||||||
@@ -327,6 +511,7 @@
|
|||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 0,
|
"email": 0,
|
||||||
"export": 0,
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 0,
|
"print": 0,
|
||||||
@@ -346,6 +531,7 @@
|
|||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 0,
|
"email": 0,
|
||||||
"export": 0,
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 0,
|
"print": 0,
|
||||||
|
|||||||
@@ -3,10 +3,12 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _, scrub
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
import json
|
import json
|
||||||
|
from erpnext.accounts.utils import get_account_currency
|
||||||
|
from erpnext.accounts.doctype.journal_entry.journal_entry import get_exchange_rate
|
||||||
|
|
||||||
class PaymentTool(Document):
|
class PaymentTool(Document):
|
||||||
def make_journal_entry(self):
|
def make_journal_entry(self):
|
||||||
@@ -19,6 +21,14 @@ class PaymentTool(Document):
|
|||||||
jv.cheque_no = self.reference_no
|
jv.cheque_no = self.reference_no
|
||||||
jv.cheque_date = self.reference_date
|
jv.cheque_date = self.reference_date
|
||||||
|
|
||||||
|
party_account_currency, party_account_type = frappe.db.get_value("Account", self.party_account,
|
||||||
|
["account_currency", "account_type"])
|
||||||
|
|
||||||
|
bank_account_currency, bank_account_type = None, None
|
||||||
|
if self.payment_account:
|
||||||
|
bank_account_currency, bank_account_type = frappe.db.get_value("Account", self.payment_account,
|
||||||
|
["account_currency", "account_type"])
|
||||||
|
|
||||||
if not self.total_payment_amount:
|
if not self.total_payment_amount:
|
||||||
frappe.throw(_("Please enter Payment Amount in atleast one row"))
|
frappe.throw(_("Please enter Payment Amount in atleast one row"))
|
||||||
|
|
||||||
@@ -28,22 +38,54 @@ class PaymentTool(Document):
|
|||||||
v.against_voucher_type))
|
v.against_voucher_type))
|
||||||
|
|
||||||
if v.payment_amount:
|
if v.payment_amount:
|
||||||
|
exchange_rate = get_exchange_rate(self.party_account, party_account_currency,
|
||||||
|
self.company, v.against_voucher_type, v.against_voucher_no)
|
||||||
|
|
||||||
d1 = jv.append("accounts")
|
d1 = jv.append("accounts")
|
||||||
d1.account = self.party_account
|
d1.account = self.party_account
|
||||||
d1.party_type = self.party_type
|
d1.party_type = self.party_type
|
||||||
d1.party = self.party
|
d1.party = self.party
|
||||||
|
d1.account_currency = party_account_currency
|
||||||
|
d1.account_type = party_account_type
|
||||||
d1.balance = get_balance_on(self.party_account)
|
d1.balance = get_balance_on(self.party_account)
|
||||||
d1.set("debit" if self.received_or_paid=="Paid" else "credit", flt(v.payment_amount))
|
d1.party_balance = get_balance_on(party=self.party, party_type=self.party_type)
|
||||||
d1.set("reference_type", v.against_voucher_type)
|
d1.exchange_rate = exchange_rate
|
||||||
d1.set("reference_name", v.against_voucher_no)
|
d1.set("debit_in_account_currency" if self.received_or_paid=="Paid" \
|
||||||
d1.set('is_advance', 'Yes' if v.against_voucher_type in ['Sales Order', 'Purchase Order'] else 'No')
|
else "credit_in_account_currency", flt(v.payment_amount))
|
||||||
total_payment_amount = flt(total_payment_amount) + flt(d1.debit) - flt(d1.credit)
|
d1.reference_type = v.against_voucher_type
|
||||||
|
d1.reference_name = v.against_voucher_no
|
||||||
|
d1.is_advance = 'Yes' \
|
||||||
|
if v.against_voucher_type in ['Sales Order', 'Purchase Order'] else 'No'
|
||||||
|
|
||||||
|
amount = flt(d1.debit_in_account_currency) - flt(d1.credit_in_account_currency)
|
||||||
|
if bank_account_currency == party_account_currency:
|
||||||
|
total_payment_amount += amount
|
||||||
|
else:
|
||||||
|
total_payment_amount += amount*exchange_rate
|
||||||
|
|
||||||
d2 = jv.append("accounts")
|
d2 = jv.append("accounts")
|
||||||
d2.account = self.payment_account
|
|
||||||
d2.set('debit' if total_payment_amount < 0 else 'credit', abs(total_payment_amount))
|
|
||||||
if self.payment_account:
|
if self.payment_account:
|
||||||
d2.balance = get_balance_on(self.payment_account)
|
bank_account_currency, bank_account_type = frappe.db.get_value("Account", self.payment_account,
|
||||||
|
["account_currency", "account_type"])
|
||||||
|
|
||||||
|
d2.account = self.payment_account
|
||||||
|
d2.account_currency = bank_account_currency
|
||||||
|
d2.account_type = bank_account_type
|
||||||
|
d2.exchange_rate = get_exchange_rate(self.payment_account, self.company)
|
||||||
|
d2.account_balance = get_balance_on(self.payment_account)
|
||||||
|
|
||||||
|
amount_field_bank = 'debit_in_account_currency' if total_payment_amount < 0 \
|
||||||
|
else 'credit_in_account_currency'
|
||||||
|
|
||||||
|
d2.set(amount_field_bank, abs(total_payment_amount))
|
||||||
|
|
||||||
|
company_currency = frappe.db.get_value("Company", self.company, "default_currency")
|
||||||
|
if party_account_currency != company_currency or \
|
||||||
|
(bank_account_currency and bank_account_currency != company_currency):
|
||||||
|
jv.multi_currency = 1
|
||||||
|
|
||||||
|
jv.set_amounts_in_company_currency()
|
||||||
|
jv.set_total_debit_credit()
|
||||||
|
|
||||||
return jv.as_dict()
|
return jv.as_dict()
|
||||||
|
|
||||||
@@ -56,39 +98,47 @@ def get_outstanding_vouchers(args):
|
|||||||
|
|
||||||
args = json.loads(args)
|
args = json.loads(args)
|
||||||
|
|
||||||
if args.get("party_type") == "Customer" and args.get("received_or_paid") == "Received":
|
party_account_currency = get_account_currency(args.get("party_account"))
|
||||||
amount_query = "ifnull(debit, 0) - ifnull(credit, 0)"
|
company_currency = frappe.db.get_value("Company", args.get("company"), "default_currency")
|
||||||
elif args.get("party_type") == "Supplier" and args.get("received_or_paid") == "Paid":
|
|
||||||
amount_query = "ifnull(credit, 0) - ifnull(debit, 0)"
|
if ((args.get("party_type") == "Customer" and args.get("received_or_paid") == "Paid")
|
||||||
else:
|
or (args.get("party_type") == "Supplier" and args.get("received_or_paid") == "Received")):
|
||||||
|
|
||||||
frappe.throw(_("Please enter the Against Vouchers manually"))
|
frappe.throw(_("Please enter the Against Vouchers manually"))
|
||||||
|
|
||||||
# Get all outstanding sales /purchase invoices
|
# Get all outstanding sales /purchase invoices
|
||||||
outstanding_invoices = get_outstanding_invoices(amount_query, args.get("party_account"),
|
outstanding_invoices = get_outstanding_invoices(args.get("party_type"), args.get("party"), args.get("party_account"))
|
||||||
args.get("party_type"), args.get("party"))
|
|
||||||
|
|
||||||
# Get all SO / PO which are not fully billed or aginst which full advance not paid
|
# Get all SO / PO which are not fully billed or aginst which full advance not paid
|
||||||
orders_to_be_billed = get_orders_to_be_billed(args.get("party_type"), args.get("party"))
|
orders_to_be_billed = get_orders_to_be_billed(args.get("party_type"), args.get("party"),
|
||||||
|
party_account_currency, company_currency)
|
||||||
|
|
||||||
return outstanding_invoices + orders_to_be_billed
|
return outstanding_invoices + orders_to_be_billed
|
||||||
|
|
||||||
def get_orders_to_be_billed(party_type, party):
|
def get_orders_to_be_billed(party_type, party, party_account_currency, company_currency):
|
||||||
voucher_type = 'Sales Order' if party_type == "Customer" else 'Purchase Order'
|
voucher_type = 'Sales Order' if party_type == "Customer" else 'Purchase Order'
|
||||||
|
|
||||||
|
ref_field = "base_grand_total" if party_account_currency == company_currency else "grand_total"
|
||||||
|
|
||||||
orders = frappe.db.sql("""
|
orders = frappe.db.sql("""
|
||||||
select
|
select
|
||||||
name as voucher_no,
|
name as voucher_no,
|
||||||
ifnull(base_grand_total, 0) as invoice_amount,
|
{ref_field} as invoice_amount,
|
||||||
(ifnull(base_grand_total, 0) - ifnull(advance_paid, 0)) as outstanding_amount,
|
({ref_field} - advance_paid) as outstanding_amount,
|
||||||
transaction_date as posting_date
|
transaction_date as posting_date
|
||||||
from
|
from
|
||||||
`tab%s`
|
`tab{voucher_type}`
|
||||||
where
|
where
|
||||||
%s = %s
|
{party_type} = %s
|
||||||
and docstatus = 1
|
and docstatus = 1
|
||||||
and ifnull(status, "") != "Stopped"
|
and ifnull(status, "") != "Stopped"
|
||||||
and ifnull(base_grand_total, 0) > ifnull(advance_paid, 0)
|
and {ref_field} > advance_paid
|
||||||
and abs(100 - ifnull(per_billed, 0)) > 0.01
|
and abs(100 - per_billed) > 0.01
|
||||||
""" % (voucher_type, 'customer' if party_type == "Customer" else 'supplier', '%s'),
|
""".format(**{
|
||||||
party, as_dict = True)
|
"ref_field": ref_field,
|
||||||
|
"voucher_type": voucher_type,
|
||||||
|
"party_type": scrub(party_type)
|
||||||
|
}), party, as_dict = True)
|
||||||
|
|
||||||
order_list = []
|
order_list = []
|
||||||
for d in orders:
|
for d in orders:
|
||||||
@@ -98,15 +148,21 @@ def get_orders_to_be_billed(party_type, party):
|
|||||||
return order_list
|
return order_list
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_against_voucher_amount(against_voucher_type, against_voucher_no):
|
def get_against_voucher_amount(against_voucher_type, against_voucher_no, party_account, company):
|
||||||
|
party_account_currency = get_account_currency(party_account)
|
||||||
|
company_currency = frappe.db.get_value("Company", company, "default_currency")
|
||||||
|
ref_field = "base_grand_total" if party_account_currency == company_currency else "grand_total"
|
||||||
|
|
||||||
if against_voucher_type in ["Sales Order", "Purchase Order"]:
|
if against_voucher_type in ["Sales Order", "Purchase Order"]:
|
||||||
select_cond = "base_grand_total as total_amount, ifnull(base_grand_total, 0) - ifnull(advance_paid, 0) as outstanding_amount"
|
select_cond = "{0} as total_amount, {0} - advance_paid as outstanding_amount"\
|
||||||
|
.format(ref_field)
|
||||||
elif against_voucher_type in ["Sales Invoice", "Purchase Invoice"]:
|
elif against_voucher_type in ["Sales Invoice", "Purchase Invoice"]:
|
||||||
select_cond = "base_grand_total as total_amount, outstanding_amount"
|
select_cond = "{0} as total_amount, outstanding_amount".format(ref_field)
|
||||||
elif against_voucher_type == "Journal Entry":
|
elif against_voucher_type == "Journal Entry":
|
||||||
select_cond = "total_debit as total_amount"
|
ref_field = "total_debit" if party_account_currency == company_currency else "total_debit/exchange_rate"
|
||||||
|
select_cond = "{0} as total_amount".format(ref_field)
|
||||||
|
|
||||||
details = frappe.db.sql("""select {0} from `tab{1}` where name = %s"""
|
details = frappe.db.sql("""select {0} from `tab{1}` where name = %s"""
|
||||||
.format(select_cond, against_voucher_type), against_voucher_no, as_dict=1)
|
.format(select_cond, frappe.db.escape(against_voucher_type)), against_voucher_no, as_dict=1)
|
||||||
|
|
||||||
return details[0] if details else {}
|
return details[0] if details else {}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class TestPaymentTool(unittest.TestCase):
|
|||||||
"party": "_Test Customer 3",
|
"party": "_Test Customer 3",
|
||||||
"reference_type": "Sales Order",
|
"reference_type": "Sales Order",
|
||||||
"reference_name": so2.name,
|
"reference_name": so2.name,
|
||||||
"credit": 1000,
|
"credit_in_account_currency": 1000,
|
||||||
"is_advance": "Yes"
|
"is_advance": "Yes"
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ class TestPaymentTool(unittest.TestCase):
|
|||||||
"party": "_Test Customer 3",
|
"party": "_Test Customer 3",
|
||||||
"reference_type": si2.doctype,
|
"reference_type": si2.doctype,
|
||||||
"reference_name": si2.name,
|
"reference_name": si2.name,
|
||||||
"credit": 561.80
|
"credit_in_account_currency": 561.80
|
||||||
})
|
})
|
||||||
|
|
||||||
pi = self.create_voucher(pi_test_records[0], {
|
pi = self.create_voucher(pi_test_records[0], {
|
||||||
@@ -91,7 +91,7 @@ class TestPaymentTool(unittest.TestCase):
|
|||||||
"party": "_Test Customer 3",
|
"party": "_Test Customer 3",
|
||||||
"party_account": "_Test Receivable - _TC",
|
"party_account": "_Test Receivable - _TC",
|
||||||
"payment_mode": "Cheque",
|
"payment_mode": "Cheque",
|
||||||
"payment_account": "_Test Account Bank Account - _TC",
|
"payment_account": "_Test Bank - _TC",
|
||||||
"reference_no": "123456",
|
"reference_no": "123456",
|
||||||
"reference_date": "2013-02-14"
|
"reference_date": "2013-02-14"
|
||||||
}
|
}
|
||||||
@@ -117,10 +117,10 @@ class TestPaymentTool(unittest.TestCase):
|
|||||||
def create_against_jv(self, test_record, args):
|
def create_against_jv(self, test_record, args):
|
||||||
jv = frappe.copy_doc(test_record)
|
jv = frappe.copy_doc(test_record)
|
||||||
jv.get("accounts")[0].update(args)
|
jv.get("accounts")[0].update(args)
|
||||||
if args.get("debit"):
|
if args.get("debit_in_account_currency"):
|
||||||
jv.get("accounts")[1].credit = args["debit"]
|
jv.get("accounts")[1].credit_in_account_currency = args["debit_in_account_currency"]
|
||||||
elif args.get("credit"):
|
elif args.get("credit_in_account_currency"):
|
||||||
jv.get("accounts")[1].debit = args["credit"]
|
jv.get("accounts")[1].debit_in_account_currency = args["credit_in_account_currency"]
|
||||||
|
|
||||||
jv.insert()
|
jv.insert()
|
||||||
jv.submit()
|
jv.submit()
|
||||||
@@ -141,7 +141,8 @@ class TestPaymentTool(unittest.TestCase):
|
|||||||
outstanding_entries = get_outstanding_vouchers(json.dumps(args))
|
outstanding_entries = get_outstanding_vouchers(json.dumps(args))
|
||||||
|
|
||||||
for d in outstanding_entries:
|
for d in outstanding_entries:
|
||||||
self.assertEquals(flt(d.get("outstanding_amount"), 2), expected_outstanding.get(d.get("voucher_type"))[1])
|
self.assertEquals(flt(d.get("outstanding_amount"), 2),
|
||||||
|
expected_outstanding.get(d.get("voucher_type"))[1])
|
||||||
|
|
||||||
self.check_jv_entries(doc, outstanding_entries, expected_outstanding)
|
self.check_jv_entries(doc, outstanding_entries, expected_outstanding)
|
||||||
|
|
||||||
@@ -156,11 +157,10 @@ class TestPaymentTool(unittest.TestCase):
|
|||||||
paytool.total_payment_amount = 300
|
paytool.total_payment_amount = 300
|
||||||
|
|
||||||
new_jv = paytool.make_journal_entry()
|
new_jv = paytool.make_journal_entry()
|
||||||
|
|
||||||
for jv_entry in new_jv.get("accounts"):
|
for jv_entry in new_jv.get("accounts"):
|
||||||
if paytool.party_account == jv_entry.get("account") and paytool.party == jv_entry.get("party"):
|
if paytool.party_account == jv_entry.get("account") and paytool.party == jv_entry.get("party"):
|
||||||
self.assertEquals(100.00,
|
self.assertEquals(100.00, jv_entry.get("debit_in_account_currency"
|
||||||
jv_entry.get("debit" if paytool.party_type=="Supplier" else "credit"))
|
if paytool.party_type=="Supplier" else "credit_in_account_currency"))
|
||||||
self.assertEquals(jv_entry.reference_name,
|
self.assertEquals(jv_entry.reference_name,
|
||||||
expected_outstanding[jv_entry.reference_type][0])
|
expected_outstanding[jv_entry.reference_type][0])
|
||||||
|
|
||||||
@@ -170,4 +170,6 @@ class TestPaymentTool(unittest.TestCase):
|
|||||||
def clear_table_entries(self):
|
def clear_table_entries(self):
|
||||||
frappe.db.sql("""delete from `tabGL Entry` where party in ("_Test Customer 3", "_Test Supplier 1")""")
|
frappe.db.sql("""delete from `tabGL Entry` where party in ("_Test Customer 3", "_Test Supplier 1")""")
|
||||||
frappe.db.sql("""delete from `tabSales Order` where customer = "_Test Customer 3" """)
|
frappe.db.sql("""delete from `tabSales Order` where customer = "_Test Customer 3" """)
|
||||||
|
frappe.db.sql("""delete from `tabSales Invoice` where customer = "_Test Customer 3" """)
|
||||||
frappe.db.sql("""delete from `tabPurchase Order` where supplier = "_Test Supplier 1" """)
|
frappe.db.sql("""delete from `tabPurchase Order` where supplier = "_Test Supplier 1" """)
|
||||||
|
frappe.db.sql("""delete from `tabPurchase Invoice` where supplier = "_Test Supplier 1" """)
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "against_voucher_type",
|
"fieldname": "against_voucher_type",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -17,6 +19,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Against Voucher Type",
|
"label": "Against Voucher Type",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "DocType",
|
"options": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -27,10 +30,13 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": ""
|
"width": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "against_voucher_no",
|
"fieldname": "against_voucher_no",
|
||||||
"fieldtype": "Dynamic Link",
|
"fieldtype": "Dynamic Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -38,6 +44,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Against Voucher No",
|
"label": "Against Voucher No",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "against_voucher_type",
|
"options": "against_voucher_type",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -46,16 +53,35 @@
|
|||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
},
|
"unique": 0
|
||||||
{
|
|
||||||
"fieldname": "column_break_3",
|
|
||||||
"fieldtype": "Column Break",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "column_break_3",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "total_amount",
|
"fieldname": "total_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -63,17 +89,22 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Total Amount",
|
"label": "Total Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
|
"options": "party_account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "outstanding_amount",
|
"fieldname": "outstanding_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -81,17 +112,22 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Outstanding Amount",
|
"label": "Outstanding Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
|
"options": "party_account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "payment_amount",
|
"fieldname": "payment_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -99,14 +135,17 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Payment Amount",
|
"label": "Payment Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
|
"options": "party_account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
@@ -116,7 +155,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-09-11 08:55:34.384017",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:51.626386",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Tool Detail",
|
"name": "Payment Tool Detail",
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
|
|
||||||
// ***************** Get Account Head *****************
|
// ***************** Get Account Head *****************
|
||||||
cur_frm.fields_dict['closing_account_head'].get_query = function(doc, cdt, cdn) {
|
cur_frm.fields_dict['closing_account_head'].get_query = function(doc, cdt, cdn) {
|
||||||
return{
|
return {
|
||||||
filters:{
|
filters: [
|
||||||
"company": doc.company,
|
['Account', 'company', '=', doc.company],
|
||||||
"report_type": "Balance Sheet",
|
['Account', 'is_group', '=', '0'],
|
||||||
"freeze_account": "No",
|
['Account', 'freeze_account', '=', 'No'],
|
||||||
"is_group": 0
|
['Account', 'root_type', 'in', 'Liability, Equity']
|
||||||
}
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,109 +1,243 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"autoname": "PCE/.###",
|
"autoname": "PCE/.###",
|
||||||
"creation": "2013-01-10 16:34:07",
|
"creation": "2013-01-10 16:34:07",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break0",
|
"fieldname": "column_break0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldtype": "Column Break",
|
"oldfieldtype": "Column Break",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "transaction_date",
|
"fieldname": "transaction_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Transaction Date",
|
"label": "Transaction Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "transaction_date",
|
"oldfieldname": "transaction_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "posting_date",
|
"fieldname": "posting_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Posting Date",
|
"label": "Posting Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "posting_date",
|
"oldfieldname": "posting_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "fiscal_year",
|
"fieldname": "fiscal_year",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Closing Fiscal Year",
|
"label": "Closing Fiscal Year",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "fiscal_year",
|
"oldfieldname": "fiscal_year",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "Fiscal Year",
|
"options": "Fiscal Year",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"options": "Period Closing Voucher",
|
"options": "Period Closing Voucher",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "company",
|
"oldfieldname": "company",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break1",
|
"fieldname": "column_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldtype": "Column Break",
|
"oldfieldtype": "Column Break",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "The account head under Liability, in which Profit/Loss will be booked",
|
"description": "The account head under Liability, in which Profit/Loss will be booked",
|
||||||
"fieldname": "closing_account_head",
|
"fieldname": "closing_account_head",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Closing Account Head",
|
"label": "Closing Account Head",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "closing_account_head",
|
"oldfieldname": "closing_account_head",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
},
|
"read_only": 0,
|
||||||
{
|
"report_hide": 0,
|
||||||
"fieldname": "coa_help",
|
"reqd": 1,
|
||||||
"fieldtype": "HTML",
|
"search_index": 0,
|
||||||
"label": "CoA Help",
|
"set_only_once": 0,
|
||||||
"oldfieldtype": "HTML",
|
"unique": 0
|
||||||
"options": "<a href=\"#!Accounts Browser/Account\">To manage Account Head, click here</a>",
|
|
||||||
"permlevel": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "remarks",
|
"fieldname": "remarks",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Remarks",
|
"label": "Remarks",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "remarks",
|
"oldfieldname": "remarks",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-02-05 05:11:42.268561",
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:51.671436",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Period Closing Voucher",
|
"name": "Period Closing Voucher",
|
||||||
@@ -111,35 +245,47 @@
|
|||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 1,
|
"amend": 1,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "System Manager",
|
"role": "System Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 1,
|
"submit": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 1,
|
"amend": 1,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 1,
|
"submit": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
"search_fields": "posting_date, fiscal_year",
|
"search_fields": "posting_date, fiscal_year",
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
from erpnext.accounts.utils import get_account_currency
|
||||||
from erpnext.controllers.accounts_controller import AccountsController
|
from erpnext.controllers.accounts_controller import AccountsController
|
||||||
|
|
||||||
class PeriodClosingVoucher(AccountsController):
|
class PeriodClosingVoucher(AccountsController):
|
||||||
@@ -20,51 +21,75 @@ class PeriodClosingVoucher(AccountsController):
|
|||||||
where voucher_type = 'Period Closing Voucher' and voucher_no=%s""", self.name)
|
where voucher_type = 'Period Closing Voucher' and voucher_no=%s""", self.name)
|
||||||
|
|
||||||
def validate_account_head(self):
|
def validate_account_head(self):
|
||||||
if frappe.db.get_value("Account", self.closing_account_head, "report_type") \
|
closing_account_type = frappe.db.get_value("Account", self.closing_account_head, "root_type")
|
||||||
!= "Balance Sheet":
|
|
||||||
frappe.throw(_("Closing Account {0} must be of type 'Liability'").format(self.closing_account_head))
|
if closing_account_type not in ["Liability", "Equity"]:
|
||||||
|
frappe.throw(_("Closing Account {0} must be of type Liability / Equity")
|
||||||
|
.format(self.closing_account_head))
|
||||||
|
|
||||||
|
account_currency = get_account_currency(self.closing_account_head)
|
||||||
|
company_currency = frappe.db.get_value("Company", self.company, "default_currency")
|
||||||
|
if account_currency != company_currency:
|
||||||
|
frappe.throw(_("Currency of the Closing Account must be {0}").format(company_currency))
|
||||||
|
|
||||||
def validate_posting_date(self):
|
def validate_posting_date(self):
|
||||||
from erpnext.accounts.utils import get_fiscal_year
|
from erpnext.accounts.utils import get_fiscal_year, validate_fiscal_year
|
||||||
|
|
||||||
|
validate_fiscal_year(self.posting_date, self.fiscal_year, label=_("Posting Date"), doc=self)
|
||||||
|
|
||||||
self.year_start_date = get_fiscal_year(self.posting_date, self.fiscal_year)[1]
|
self.year_start_date = get_fiscal_year(self.posting_date, self.fiscal_year)[1]
|
||||||
|
|
||||||
pce = frappe.db.sql("""select name from `tabPeriod Closing Voucher`
|
pce = frappe.db.sql("""select name from `tabPeriod Closing Voucher`
|
||||||
where posting_date > %s and fiscal_year = %s and docstatus = 1""",
|
where posting_date > %s and fiscal_year = %s and docstatus = 1""",
|
||||||
(self.posting_date, self.fiscal_year))
|
(self.posting_date, self.fiscal_year))
|
||||||
if pce and pce[0][0]:
|
if pce and pce[0][0]:
|
||||||
frappe.throw(_("Another Period Closing Entry {0} has been made after {1}").format(pce[0][0], self.posting_date))
|
frappe.throw(_("Another Period Closing Entry {0} has been made after {1}")
|
||||||
|
.format(pce[0][0], self.posting_date))
|
||||||
def get_pl_balances(self):
|
|
||||||
"""Get balance for pl accounts"""
|
|
||||||
return frappe.db.sql("""
|
|
||||||
select t1.account, sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) as balance
|
|
||||||
from `tabGL Entry` t1, `tabAccount` t2
|
|
||||||
where t1.account = t2.name and ifnull(t2.report_type, '') = 'Profit and Loss'
|
|
||||||
and t2.docstatus < 2 and t2.company = %s
|
|
||||||
and t1.posting_date between %s and %s
|
|
||||||
group by t1.account
|
|
||||||
""", (self.company, self.get("year_start_date"), self.posting_date), as_dict=1)
|
|
||||||
|
|
||||||
def make_gl_entries(self):
|
def make_gl_entries(self):
|
||||||
gl_entries = []
|
gl_entries = []
|
||||||
net_pl_balance = 0
|
net_pl_balance = 0
|
||||||
pl_accounts = self.get_pl_balances()
|
pl_accounts = self.get_pl_balances()
|
||||||
|
|
||||||
for acc in pl_accounts:
|
for acc in pl_accounts:
|
||||||
if flt(acc.balance):
|
if flt(acc.balance_in_company_currency):
|
||||||
gl_entries.append(self.get_gl_dict({
|
gl_entries.append(self.get_gl_dict({
|
||||||
"account": acc.account,
|
"account": acc.account,
|
||||||
"debit": abs(flt(acc.balance)) if flt(acc.balance) < 0 else 0,
|
"account_currency": acc.account_currency,
|
||||||
"credit": abs(flt(acc.balance)) if flt(acc.balance) > 0 else 0,
|
"debit_in_account_currency": abs(flt(acc.balance_in_account_currency)) \
|
||||||
|
if flt(acc.balance_in_account_currency) < 0 else 0,
|
||||||
|
"debit": abs(flt(acc.balance_in_company_currency)) \
|
||||||
|
if flt(acc.balance_in_company_currency) < 0 else 0,
|
||||||
|
"credit_in_account_currency": abs(flt(acc.balance_in_account_currency)) \
|
||||||
|
if flt(acc.balance_in_account_currency) > 0 else 0,
|
||||||
|
"credit": abs(flt(acc.balance_in_company_currency)) \
|
||||||
|
if flt(acc.balance_in_company_currency) > 0 else 0
|
||||||
}))
|
}))
|
||||||
|
|
||||||
net_pl_balance += flt(acc.balance)
|
net_pl_balance += flt(acc.balance_in_company_currency)
|
||||||
|
|
||||||
if net_pl_balance:
|
if net_pl_balance:
|
||||||
gl_entries.append(self.get_gl_dict({
|
gl_entries.append(self.get_gl_dict({
|
||||||
"account": self.closing_account_head,
|
"account": self.closing_account_head,
|
||||||
|
"debit_in_account_currency": abs(net_pl_balance) if net_pl_balance > 0 else 0,
|
||||||
"debit": abs(net_pl_balance) if net_pl_balance > 0 else 0,
|
"debit": abs(net_pl_balance) if net_pl_balance > 0 else 0,
|
||||||
|
"credit_in_account_currency": abs(net_pl_balance) if net_pl_balance < 0 else 0,
|
||||||
"credit": abs(net_pl_balance) if net_pl_balance < 0 else 0
|
"credit": abs(net_pl_balance) if net_pl_balance < 0 else 0
|
||||||
}))
|
}))
|
||||||
|
|
||||||
from erpnext.accounts.general_ledger import make_gl_entries
|
from erpnext.accounts.general_ledger import make_gl_entries
|
||||||
make_gl_entries(gl_entries)
|
make_gl_entries(gl_entries)
|
||||||
|
|
||||||
|
def get_pl_balances(self):
|
||||||
|
"""Get balance for pl accounts"""
|
||||||
|
return frappe.db.sql("""
|
||||||
|
select
|
||||||
|
t1.account, t2.account_currency,
|
||||||
|
sum(t1.debit_in_account_currency) - sum(t1.credit_in_account_currency) as balance_in_account_currency,
|
||||||
|
sum(t1.debit) - sum(t1.credit) as balance_in_company_currency
|
||||||
|
from `tabGL Entry` t1, `tabAccount` t2
|
||||||
|
where t1.account = t2.name and t2.report_type = 'Profit and Loss'
|
||||||
|
and t2.docstatus < 2 and t2.company = %s
|
||||||
|
and t1.posting_date between %s and %s
|
||||||
|
group by t1.account
|
||||||
|
""", (self.company, self.get("year_start_date"), self.posting_date), as_dict=1)
|
||||||
|
|||||||
@@ -5,42 +5,74 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import unittest
|
import unittest
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt, today
|
||||||
|
from erpnext.accounts.utils import get_fiscal_year
|
||||||
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
|
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
|
||||||
|
|
||||||
class TestPeriodClosingVoucher(unittest.TestCase):
|
class TestPeriodClosingVoucher(unittest.TestCase):
|
||||||
def test_closing_entry(self):
|
def test_closing_entry(self):
|
||||||
make_journal_entry("_Test Account Bank Account - _TC", "Sales - _TC", 400,
|
year_start_date = get_fiscal_year(today())[1]
|
||||||
|
|
||||||
|
make_journal_entry("_Test Bank - _TC", "Sales - _TC", 400,
|
||||||
"_Test Cost Center - _TC", submit=True)
|
"_Test Cost Center - _TC", submit=True)
|
||||||
|
|
||||||
make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
make_journal_entry("_Test Account Cost for Goods Sold - _TC",
|
||||||
"_Test Account Bank Account - _TC", 600, "_Test Cost Center - _TC", submit=True)
|
"_Test Bank - _TC", 600, "_Test Cost Center - _TC", submit=True)
|
||||||
|
|
||||||
profit_or_loss = frappe.db.sql("""select sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) as balance
|
random_expense_account = frappe.db.sql("""
|
||||||
|
select t1.account,
|
||||||
|
sum(t1.debit) - sum(t1.credit) as balance,
|
||||||
|
sum(t1.debit_in_account_currency) - sum(t1.credit_in_account_currency) \
|
||||||
|
as balance_in_account_currency
|
||||||
from `tabGL Entry` t1, `tabAccount` t2
|
from `tabGL Entry` t1, `tabAccount` t2
|
||||||
where t1.account = t2.name and ifnull(t2.report_type, '') = 'Profit and Loss'
|
where t1.account = t2.name and t2.root_type = 'Expense'
|
||||||
|
and t2.docstatus < 2 and t2.company = '_Test Company'
|
||||||
|
and t1.posting_date between %s and %s
|
||||||
|
group by t1.account
|
||||||
|
having sum(t1.debit) > sum(t1.credit)
|
||||||
|
limit 1""", (year_start_date, today()), as_dict=True)
|
||||||
|
|
||||||
|
profit_or_loss = frappe.db.sql("""select sum(t1.debit) - sum(t1.credit) as balance
|
||||||
|
from `tabGL Entry` t1, `tabAccount` t2
|
||||||
|
where t1.account = t2.name and t2.report_type = 'Profit and Loss'
|
||||||
and t2.docstatus < 2 and t2.company = '_Test Company'
|
and t2.docstatus < 2 and t2.company = '_Test Company'
|
||||||
and t1.posting_date between '2013-01-01' and '2013-12-31'""")
|
and t1.posting_date between %s and %s""", (year_start_date, today()))
|
||||||
|
|
||||||
profit_or_loss = flt(profit_or_loss[0][0]) if profit_or_loss else 0
|
profit_or_loss = flt(profit_or_loss[0][0]) if profit_or_loss else 0
|
||||||
|
|
||||||
pcv = self.make_period_closing_voucher()
|
pcv = self.make_period_closing_voucher()
|
||||||
|
|
||||||
gle_value = frappe.db.sql("""select ifnull(debit, 0) - ifnull(credit, 0)
|
# Check value for closing account
|
||||||
|
gle_amount_for_closing_account = frappe.db.sql("""select debit - credit
|
||||||
from `tabGL Entry` where voucher_type='Period Closing Voucher' and voucher_no=%s
|
from `tabGL Entry` where voucher_type='Period Closing Voucher' and voucher_no=%s
|
||||||
and account = '_Test Account Reserves and Surplus - _TC'""", pcv.name)
|
and account = '_Test Account Reserves and Surplus - _TC'""", pcv.name)
|
||||||
|
|
||||||
gle_value = flt(gle_value[0][0]) if gle_value else 0
|
gle_amount_for_closing_account = flt(gle_amount_for_closing_account[0][0]) \
|
||||||
|
if gle_amount_for_closing_account else 0
|
||||||
|
|
||||||
self.assertEqual(gle_value, profit_or_loss)
|
self.assertEqual(gle_amount_for_closing_account, profit_or_loss)
|
||||||
|
|
||||||
|
if random_expense_account:
|
||||||
|
# Check posted value for teh above random_expense_account
|
||||||
|
gle_for_random_expense_account = frappe.db.sql("""
|
||||||
|
select debit - credit as amount,
|
||||||
|
debit_in_account_currency - credit_in_account_currency
|
||||||
|
as amount_in_account_currency
|
||||||
|
from `tabGL Entry`
|
||||||
|
where voucher_type='Period Closing Voucher' and voucher_no=%s and account =%s""",
|
||||||
|
(pcv.name, random_expense_account[0].account), as_dict=True)
|
||||||
|
|
||||||
|
self.assertEqual(gle_for_random_expense_account[0].amount, -1*random_expense_account[0].balance)
|
||||||
|
self.assertEqual(gle_for_random_expense_account[0].amount_in_account_currency,
|
||||||
|
-1*random_expense_account[0].balance_in_account_currency)
|
||||||
|
|
||||||
def make_period_closing_voucher(self):
|
def make_period_closing_voucher(self):
|
||||||
pcv = frappe.get_doc({
|
pcv = frappe.get_doc({
|
||||||
"doctype": "Period Closing Voucher",
|
"doctype": "Period Closing Voucher",
|
||||||
"closing_account_head": "_Test Account Reserves and Surplus - _TC",
|
"closing_account_head": "_Test Account Reserves and Surplus - _TC",
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"fiscal_year": "_Test Fiscal Year 2013",
|
"fiscal_year": get_fiscal_year(today())[0],
|
||||||
"posting_date": "2013-12-31",
|
"posting_date": today(),
|
||||||
"remarks": "test"
|
"remarks": "test"
|
||||||
})
|
})
|
||||||
pcv.insert()
|
pcv.insert()
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "user",
|
"fieldname": "user",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -17,6 +19,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Applicable for User",
|
"label": "Applicable for User",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "user",
|
"oldfieldname": "user",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -32,6 +35,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "naming_series",
|
"fieldname": "naming_series",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -39,6 +44,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Series",
|
"label": "Series",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "naming_series",
|
"oldfieldname": "naming_series",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
@@ -54,6 +60,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "warehouse",
|
"fieldname": "warehouse",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -61,6 +69,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Warehouse",
|
"label": "Warehouse",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "warehouse",
|
"oldfieldname": "warehouse",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -76,6 +85,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "1",
|
"default": "1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"fieldname": "update_stock",
|
"fieldname": "update_stock",
|
||||||
@@ -85,6 +96,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Update Stock",
|
"label": "Update Stock",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -97,12 +109,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_4",
|
"fieldname": "column_break_4",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -116,6 +131,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "customer",
|
"fieldname": "customer",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -123,6 +140,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Customer",
|
"label": "Customer",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "customer_account",
|
"oldfieldname": "customer_account",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -138,6 +156,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -145,6 +165,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "company",
|
"oldfieldname": "company",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -160,6 +181,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "currency",
|
"fieldname": "currency",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -167,6 +190,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Currency",
|
"label": "Currency",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "currency",
|
"oldfieldname": "currency",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
@@ -182,6 +206,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "mode_of_payment",
|
"fieldname": "mode_of_payment",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -189,6 +215,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Mode of Payment",
|
"label": "Mode of Payment",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Mode of Payment",
|
"options": "Mode of Payment",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -203,12 +230,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_16",
|
"fieldname": "section_break_16",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -222,6 +252,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "print_format",
|
"fieldname": "print_format",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -229,6 +261,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Print Format",
|
"label": "Print Format",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Print Format",
|
"options": "Print Format",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -243,6 +276,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "letter_head",
|
"fieldname": "letter_head",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -250,6 +285,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Letter Head",
|
"label": "Letter Head",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "letter_head",
|
"oldfieldname": "letter_head",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
@@ -265,6 +301,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "select_print_heading",
|
"fieldname": "select_print_heading",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -272,6 +310,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Print Heading",
|
"label": "Print Heading",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "select_print_heading",
|
"oldfieldname": "select_print_heading",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
@@ -287,6 +326,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "tc_name",
|
"fieldname": "tc_name",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -294,6 +335,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Terms and Conditions",
|
"label": "Terms and Conditions",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "tc_name",
|
"oldfieldname": "tc_name",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -309,12 +351,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break0",
|
"fieldname": "column_break0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldtype": "Column Break",
|
"oldfieldtype": "Column Break",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -328,6 +373,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "",
|
"description": "",
|
||||||
"fieldname": "territory",
|
"fieldname": "territory",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -336,6 +383,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Territory",
|
"label": "Territory",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "territory",
|
"oldfieldname": "territory",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -351,6 +399,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "selling_price_list",
|
"fieldname": "selling_price_list",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -358,6 +408,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Price List",
|
"label": "Price List",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "price_list_name",
|
"oldfieldname": "price_list_name",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
@@ -373,12 +424,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_19",
|
"fieldname": "section_break_19",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -392,6 +446,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "write_off_account",
|
"fieldname": "write_off_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -399,6 +455,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Write Off Account",
|
"label": "Write Off Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -413,6 +470,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "write_off_cost_center",
|
"fieldname": "write_off_cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -420,6 +479,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Write Off Cost Center",
|
"label": "Write Off Cost Center",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Cost Center",
|
"options": "Cost Center",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -434,6 +494,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "taxes_and_charges",
|
"fieldname": "taxes_and_charges",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -441,6 +503,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Taxes and Charges",
|
"label": "Taxes and Charges",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "charge",
|
"oldfieldname": "charge",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -456,12 +519,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_23",
|
"fieldname": "column_break_23",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -475,6 +541,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "cash_bank_account",
|
"fieldname": "cash_bank_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -482,6 +550,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Cash/Bank Account",
|
"label": "Cash/Bank Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "cash_bank_account",
|
"oldfieldname": "cash_bank_account",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -497,6 +566,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "income_account",
|
"fieldname": "income_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -504,6 +575,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Income Account",
|
"label": "Income Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "income_account",
|
"oldfieldname": "income_account",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -519,6 +591,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)",
|
"depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)",
|
||||||
"fieldname": "expense_account",
|
"fieldname": "expense_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -527,6 +601,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Expense Account",
|
"label": "Expense Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -540,6 +615,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -547,6 +624,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "cost_center",
|
"oldfieldname": "cost_center",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -570,7 +648,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"modified": "2015-08-18 17:49:09.098876",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:51.741253",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "POS Profile",
|
"name": "POS Profile",
|
||||||
@@ -598,7 +677,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 1,
|
"apply_user_permissions": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "applicability_section",
|
"fieldname": "applicability_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -18,6 +20,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -30,6 +33,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "title",
|
"fieldname": "title",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -37,7 +42,8 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Title",
|
"label": "Title",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -50,6 +56,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "Item Code",
|
"default": "Item Code",
|
||||||
"fieldname": "apply_on",
|
"fieldname": "apply_on",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
@@ -58,6 +66,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Apply On",
|
"label": "Apply On",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "\nItem Code\nItem Group\nBrand",
|
"options": "\nItem Code\nItem Group\nBrand",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -71,6 +80,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.apply_on==\"Item Code\"",
|
"depends_on": "eval:doc.apply_on==\"Item Code\"",
|
||||||
"fieldname": "item_code",
|
"fieldname": "item_code",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -79,6 +90,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Item Code",
|
"label": "Item Code",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Item",
|
"options": "Item",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -92,6 +104,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.apply_on==\"Brand\"",
|
"depends_on": "eval:doc.apply_on==\"Brand\"",
|
||||||
"fieldname": "brand",
|
"fieldname": "brand",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -100,6 +114,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Brand",
|
"label": "Brand",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Brand",
|
"options": "Brand",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -113,6 +128,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.apply_on==\"Item Group\"",
|
"depends_on": "eval:doc.apply_on==\"Item Group\"",
|
||||||
"fieldname": "item_group",
|
"fieldname": "item_group",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -121,6 +138,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Item Group",
|
"label": "Item Group",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Item Group",
|
"options": "Item Group",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -134,12 +152,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_7",
|
"fieldname": "column_break_7",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -153,6 +174,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Higher the number, higher the priority",
|
"description": "Higher the number, higher the priority",
|
||||||
"fieldname": "priority",
|
"fieldname": "priority",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
@@ -161,6 +184,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Priority",
|
"label": "Priority",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20",
|
"options": "\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -174,6 +198,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "disable",
|
"fieldname": "disable",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -181,6 +207,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Disable",
|
"label": "Disable",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -193,12 +220,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_7",
|
"fieldname": "section_break_7",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -212,6 +242,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "selling",
|
"fieldname": "selling",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -219,6 +251,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Selling",
|
"label": "Selling",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -231,6 +264,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "buying",
|
"fieldname": "buying",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -238,6 +273,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Buying",
|
"label": "Buying",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -250,12 +286,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_11",
|
"fieldname": "column_break_11",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -269,6 +308,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval: doc.buying || doc.selling",
|
"depends_on": "eval: doc.buying || doc.selling",
|
||||||
"fieldname": "applicable_for",
|
"fieldname": "applicable_for",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
@@ -277,6 +318,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Applicable For",
|
"label": "Applicable For",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "\nCustomer\nCustomer Group\nTerritory\nSales Partner\nCampaign\nSupplier\nSupplier Type",
|
"options": "\nCustomer\nCustomer Group\nTerritory\nSales Partner\nCampaign\nSupplier\nSupplier Type",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -290,6 +332,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.applicable_for==\"Customer\"",
|
"depends_on": "eval:doc.applicable_for==\"Customer\"",
|
||||||
"fieldname": "customer",
|
"fieldname": "customer",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -298,6 +342,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Customer",
|
"label": "Customer",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Customer",
|
"options": "Customer",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -311,6 +356,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.applicable_for==\"Customer Group\"",
|
"depends_on": "eval:doc.applicable_for==\"Customer Group\"",
|
||||||
"fieldname": "customer_group",
|
"fieldname": "customer_group",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -319,6 +366,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Customer Group",
|
"label": "Customer Group",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Customer Group",
|
"options": "Customer Group",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -332,6 +380,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.applicable_for==\"Territory\"",
|
"depends_on": "eval:doc.applicable_for==\"Territory\"",
|
||||||
"fieldname": "territory",
|
"fieldname": "territory",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -340,6 +390,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Territory",
|
"label": "Territory",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Territory",
|
"options": "Territory",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -353,6 +404,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.applicable_for==\"Sales Partner\"",
|
"depends_on": "eval:doc.applicable_for==\"Sales Partner\"",
|
||||||
"fieldname": "sales_partner",
|
"fieldname": "sales_partner",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -361,6 +414,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Sales Partner",
|
"label": "Sales Partner",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Sales Partner",
|
"options": "Sales Partner",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -374,6 +428,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.applicable_for==\"Campaign\"",
|
"depends_on": "eval:doc.applicable_for==\"Campaign\"",
|
||||||
"fieldname": "campaign",
|
"fieldname": "campaign",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -382,6 +438,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Campaign",
|
"label": "Campaign",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Campaign",
|
"options": "Campaign",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -395,6 +452,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.applicable_for==\"Supplier\"",
|
"depends_on": "eval:doc.applicable_for==\"Supplier\"",
|
||||||
"fieldname": "supplier",
|
"fieldname": "supplier",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -403,6 +462,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Supplier",
|
"label": "Supplier",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Supplier",
|
"options": "Supplier",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -416,6 +476,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.applicable_for==\"Supplier Type\"",
|
"depends_on": "eval:doc.applicable_for==\"Supplier Type\"",
|
||||||
"fieldname": "supplier_type",
|
"fieldname": "supplier_type",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -424,6 +486,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Supplier Type",
|
"label": "Supplier Type",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Supplier Type",
|
"options": "Supplier Type",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -437,12 +500,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_19",
|
"fieldname": "section_break_19",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -456,6 +522,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "min_qty",
|
"fieldname": "min_qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -463,6 +531,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Min Qty",
|
"label": "Min Qty",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -475,12 +544,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_21",
|
"fieldname": "column_break_21",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -494,6 +566,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "max_qty",
|
"fieldname": "max_qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -501,6 +575,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Max Qty",
|
"label": "Max Qty",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -513,12 +588,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_23",
|
"fieldname": "section_break_23",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -532,6 +610,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "Today",
|
"default": "Today",
|
||||||
"fieldname": "valid_from",
|
"fieldname": "valid_from",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
@@ -540,6 +620,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Valid From",
|
"label": "Valid From",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -552,6 +633,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "valid_upto",
|
"fieldname": "valid_upto",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -559,6 +642,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Valid Upto",
|
"label": "Valid Upto",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -571,12 +655,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -589,6 +676,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -596,6 +685,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -609,6 +699,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "price_discount_section",
|
"fieldname": "price_discount_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -616,6 +708,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -628,6 +721,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "Discount Percentage",
|
"default": "Discount Percentage",
|
||||||
"fieldname": "price_or_discount",
|
"fieldname": "price_or_discount",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
@@ -636,6 +731,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Price or Discount",
|
"label": "Price or Discount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "\nPrice\nDiscount Percentage",
|
"options": "\nPrice\nDiscount Percentage",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -649,12 +745,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break2",
|
"fieldname": "col_break2",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -667,6 +766,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.price_or_discount==\"Price\"",
|
"depends_on": "eval:doc.price_or_discount==\"Price\"",
|
||||||
"fieldname": "price",
|
"fieldname": "price",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
@@ -675,6 +776,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Price",
|
"label": "Price",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -687,6 +789,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.price_or_discount==\"Discount Percentage\"",
|
"depends_on": "eval:doc.price_or_discount==\"Discount Percentage\"",
|
||||||
"fieldname": "discount_percentage",
|
"fieldname": "discount_percentage",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
@@ -695,6 +799,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Discount on Price List Rate (%)",
|
"label": "Discount on Price List Rate (%)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -707,6 +812,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.price_or_discount==\"Discount Percentage\"",
|
"depends_on": "eval:doc.price_or_discount==\"Discount Percentage\"",
|
||||||
"fieldname": "for_price_list",
|
"fieldname": "for_price_list",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -715,6 +822,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "For Price List",
|
"label": "For Price List",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Price List",
|
"options": "Price List",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -728,6 +836,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "help_section",
|
"fieldname": "help_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -735,6 +845,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Simple",
|
"options": "Simple",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -748,6 +859,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "pricing_rule_help",
|
"fieldname": "pricing_rule_help",
|
||||||
"fieldtype": "HTML",
|
"fieldtype": "HTML",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -755,6 +868,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Pricing Rule Help",
|
"label": "Pricing Rule Help",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -775,7 +889,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"modified": "2015-08-13 14:58:29.194326",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:51.958974",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Pricing Rule",
|
"name": "Pricing Rule",
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class PricingRule(Document):
|
|||||||
self.set(f, None)
|
self.set(f, None)
|
||||||
|
|
||||||
def validate_price_or_discount(self):
|
def validate_price_or_discount(self):
|
||||||
for field in ["Price", "Discount Percentage"]:
|
for field in ["Price"]:
|
||||||
if flt(self.get(frappe.scrub(field))) < 0:
|
if flt(self.get(frappe.scrub(field))) < 0:
|
||||||
throw(_("{0} can not be negative").format(field))
|
throw(_("{0} can not be negative").format(field))
|
||||||
|
|
||||||
@@ -130,7 +130,11 @@ def get_pricing_rule_for_item(args):
|
|||||||
return item_details
|
return item_details
|
||||||
|
|
||||||
if not (args.item_group and args.brand):
|
if not (args.item_group and args.brand):
|
||||||
args.item_group, args.brand = frappe.db.get_value("Item", args.item_code, ["item_group", "brand"])
|
try:
|
||||||
|
args.item_group, args.brand = frappe.db.get_value("Item", args.item_code, ["item_group", "brand"])
|
||||||
|
except TypeError:
|
||||||
|
# invalid item_code
|
||||||
|
return item_details
|
||||||
if not args.item_group:
|
if not args.item_group:
|
||||||
frappe.throw(_("Item Group not mentioned in item master for item {0}").format(args.item_code))
|
frappe.throw(_("Item Group not mentioned in item master for item {0}").format(args.item_code))
|
||||||
|
|
||||||
@@ -164,14 +168,18 @@ def get_pricing_rules(args):
|
|||||||
field = frappe.scrub(parenttype)
|
field = frappe.scrub(parenttype)
|
||||||
condition = ""
|
condition = ""
|
||||||
if args.get(field):
|
if args.get(field):
|
||||||
lft, rgt = frappe.db.get_value(parenttype, args[field], ["lft", "rgt"])
|
try:
|
||||||
|
lft, rgt = frappe.db.get_value(parenttype, args[field], ["lft", "rgt"])
|
||||||
|
except TypeError:
|
||||||
|
frappe.throw(_("Invalid {0}").format(args[field]))
|
||||||
|
|
||||||
parent_groups = frappe.db.sql_list("""select name from `tab%s`
|
parent_groups = frappe.db.sql_list("""select name from `tab%s`
|
||||||
where lft<=%s and rgt>=%s""" % (parenttype, '%s', '%s'), (lft, rgt))
|
where lft<=%s and rgt>=%s""" % (parenttype, '%s', '%s'), (lft, rgt))
|
||||||
|
|
||||||
if parent_groups:
|
if parent_groups:
|
||||||
if allow_blank: parent_groups.append('')
|
if allow_blank: parent_groups.append('')
|
||||||
condition = " ifnull("+field+", '') in ('" + \
|
condition = " ifnull("+field+", '') in ('" + \
|
||||||
"', '".join([d.replace("'", "\\'").replace('"', '\\"') for d in parent_groups])+"')"
|
"', '".join([frappe.db.escape(d) for d in parent_groups])+"')"
|
||||||
return condition
|
return condition
|
||||||
|
|
||||||
|
|
||||||
@@ -198,8 +206,8 @@ def get_pricing_rules(args):
|
|||||||
|
|
||||||
return frappe.db.sql("""select * from `tabPricing Rule`
|
return frappe.db.sql("""select * from `tabPricing Rule`
|
||||||
where (item_code=%(item_code)s {item_group_condition} or brand=%(brand)s)
|
where (item_code=%(item_code)s {item_group_condition} or brand=%(brand)s)
|
||||||
and docstatus < 2 and ifnull(disable, 0) = 0
|
and docstatus < 2 and disable = 0
|
||||||
and ifnull({transaction_type}, 0) = 1 {conditions}
|
and {transaction_type} = 1 {conditions}
|
||||||
order by priority desc, name desc""".format(
|
order by priority desc, name desc""".format(
|
||||||
item_group_condition=item_group_condition,
|
item_group_condition=item_group_condition,
|
||||||
transaction_type=args.transaction_type, conditions=conditions), args, as_dict=1)
|
transaction_type=args.transaction_type, conditions=conditions), args, as_dict=1)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
|
|
||||||
if(!doc.is_return) {
|
if(!doc.is_return) {
|
||||||
if(doc.docstatus==1) {
|
if(doc.docstatus==1) {
|
||||||
if(doc.outstanding_amount > 0) {
|
if(doc.outstanding_amount != 0) {
|
||||||
this.frm.add_custom_button(__('Payment'), this.make_bank_entry).addClass("btn-primary");
|
this.frm.add_custom_button(__('Payment'), this.make_bank_entry).addClass("btn-primary");
|
||||||
}
|
}
|
||||||
cur_frm.add_custom_button(__('Debit Note'), this.make_debit_note);
|
cur_frm.add_custom_button(__('Debit Note'), this.make_debit_note);
|
||||||
@@ -38,7 +38,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
supplier: cur_frm.doc.supplier || undefined,
|
supplier: cur_frm.doc.supplier || undefined,
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
status: ["!=", "Stopped"],
|
status: ["not in", ["Stopped", "Closed"]],
|
||||||
per_billed: ["<", 99.99],
|
per_billed: ["<", 99.99],
|
||||||
company: cur_frm.doc.company
|
company: cur_frm.doc.company
|
||||||
}
|
}
|
||||||
@@ -52,6 +52,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
supplier: cur_frm.doc.supplier || undefined,
|
supplier: cur_frm.doc.supplier || undefined,
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
|
status: ["!=", "Closed"],
|
||||||
company: cur_frm.doc.company
|
company: cur_frm.doc.company
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -76,7 +77,28 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
credit_to: function() {
|
||||||
|
var me = this;
|
||||||
|
if(this.frm.doc.credit_to) {
|
||||||
|
me.frm.call({
|
||||||
|
method: "frappe.client.get_value",
|
||||||
|
args: {
|
||||||
|
doctype: "Account",
|
||||||
|
fieldname: "account_currency",
|
||||||
|
filters: { name: me.frm.doc.credit_to },
|
||||||
|
},
|
||||||
|
callback: function(r, rt) {
|
||||||
|
if(r.message) {
|
||||||
|
me.frm.set_value("party_account_currency", r.message.account_currency);
|
||||||
|
me.set_dynamic_labels();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
write_off_amount: function() {
|
write_off_amount: function() {
|
||||||
|
this.set_in_company_currency(this.frm.doc, ["write_off_amount"]);
|
||||||
this.calculate_outstanding_amount();
|
this.calculate_outstanding_amount();
|
||||||
this.frm.refresh_fields();
|
this.frm.refresh_fields();
|
||||||
},
|
},
|
||||||
@@ -114,9 +136,10 @@ cur_frm.script_manager.make(erpnext.accounts.PurchaseInvoice);
|
|||||||
|
|
||||||
cur_frm.cscript.make_bank_entry = function() {
|
cur_frm.cscript.make_bank_entry = function() {
|
||||||
return frappe.call({
|
return frappe.call({
|
||||||
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_from_purchase_invoice",
|
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_invoice",
|
||||||
args: {
|
args: {
|
||||||
"purchase_invoice": cur_frm.doc.name,
|
"dt": "Purchase Invoice",
|
||||||
|
"dn": cur_frm.doc.name
|
||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
var doclist = frappe.model.sync(r.message);
|
var doclist = frappe.model.sync(r.message);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@ import frappe.defaults
|
|||||||
|
|
||||||
from erpnext.controllers.buying_controller import BuyingController
|
from erpnext.controllers.buying_controller import BuyingController
|
||||||
from erpnext.accounts.party import get_party_account, get_due_date
|
from erpnext.accounts.party import get_party_account, get_due_date
|
||||||
|
from erpnext.accounts.utils import get_account_currency
|
||||||
|
|
||||||
form_grid_templates = {
|
form_grid_templates = {
|
||||||
"items": "templates/form_grid/item_grid.html"
|
"items": "templates/form_grid/item_grid.html"
|
||||||
@@ -47,7 +48,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
self.check_conversion_rate()
|
self.check_conversion_rate()
|
||||||
self.validate_credit_to_acc()
|
self.validate_credit_to_acc()
|
||||||
self.clear_unallocated_advances("Purchase Invoice Advance", "advances")
|
self.clear_unallocated_advances("Purchase Invoice Advance", "advances")
|
||||||
self.check_for_stopped_status()
|
self.check_for_stopped_or_closed_status()
|
||||||
self.validate_with_previous_doc()
|
self.validate_with_previous_doc()
|
||||||
self.validate_uom_is_integer("uom", "qty")
|
self.validate_uom_is_integer("uom", "qty")
|
||||||
self.set_against_expense_account()
|
self.set_against_expense_account()
|
||||||
@@ -66,7 +67,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
|
|
||||||
def set_missing_values(self, for_validate=False):
|
def set_missing_values(self, for_validate=False):
|
||||||
if not self.credit_to:
|
if not self.credit_to:
|
||||||
self.credit_to = get_party_account(self.company, self.supplier, "Supplier")
|
self.credit_to = get_party_account("Supplier", self.supplier, self.company)
|
||||||
if not self.due_date:
|
if not self.due_date:
|
||||||
self.due_date = get_due_date(self.posting_date, "Supplier", self.supplier, self.company)
|
self.due_date = get_due_date(self.posting_date, "Supplier", self.supplier, self.company)
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
def get_advances(self):
|
def get_advances(self):
|
||||||
if not self.is_return:
|
if not self.is_return:
|
||||||
super(PurchaseInvoice, self).get_advances(self.credit_to, "Supplier", self.supplier,
|
super(PurchaseInvoice, self).get_advances(self.credit_to, "Supplier", self.supplier,
|
||||||
"Purchase Invoice Advance", "advances", "debit", "purchase_order")
|
"Purchase Invoice Advance", "advances", "debit_in_account_currency", "purchase_order")
|
||||||
|
|
||||||
def check_active_purchase_items(self):
|
def check_active_purchase_items(self):
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
@@ -91,7 +92,8 @@ class PurchaseInvoice(BuyingController):
|
|||||||
throw(_("Conversion rate cannot be 0 or 1"))
|
throw(_("Conversion rate cannot be 0 or 1"))
|
||||||
|
|
||||||
def validate_credit_to_acc(self):
|
def validate_credit_to_acc(self):
|
||||||
account = frappe.db.get_value("Account", self.credit_to, ["account_type", "report_type"], as_dict=True)
|
account = frappe.db.get_value("Account", self.credit_to,
|
||||||
|
["account_type", "report_type", "account_currency"], as_dict=True)
|
||||||
|
|
||||||
if account.report_type != "Balance Sheet":
|
if account.report_type != "Balance Sheet":
|
||||||
frappe.throw(_("Credit To account must be a Balance Sheet account"))
|
frappe.throw(_("Credit To account must be a Balance Sheet account"))
|
||||||
@@ -99,14 +101,16 @@ class PurchaseInvoice(BuyingController):
|
|||||||
if self.supplier and account.account_type != "Payable":
|
if self.supplier and account.account_type != "Payable":
|
||||||
frappe.throw(_("Credit To account must be a Payable account"))
|
frappe.throw(_("Credit To account must be a Payable account"))
|
||||||
|
|
||||||
def check_for_stopped_status(self):
|
self.party_account_currency = account.account_currency
|
||||||
|
|
||||||
|
def check_for_stopped_or_closed_status(self):
|
||||||
check_list = []
|
check_list = []
|
||||||
|
pc_obj = frappe.get_doc('Purchase Common')
|
||||||
|
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
if d.purchase_order and not d.purchase_order in check_list and not d.purchase_receipt:
|
if d.purchase_order and not d.purchase_order in check_list and not d.purchase_receipt:
|
||||||
check_list.append(d.purchase_order)
|
check_list.append(d.purchase_order)
|
||||||
stopped = frappe.db.sql("select name from `tabPurchase Order` where status = 'Stopped' and name = %s", d.purchase_order)
|
pc_obj.check_for_stopped_or_closed_status('Purchase Order', d.purchase_order)
|
||||||
if stopped:
|
|
||||||
throw(_("Purchase Order {0} is 'Stopped'").format(d.purchase_order))
|
|
||||||
|
|
||||||
def validate_with_previous_doc(self):
|
def validate_with_previous_doc(self):
|
||||||
super(PurchaseInvoice, self).validate_with_previous_doc({
|
super(PurchaseInvoice, self).validate_with_previous_doc({
|
||||||
@@ -146,10 +150,14 @@ class PurchaseInvoice(BuyingController):
|
|||||||
against_accounts = []
|
against_accounts = []
|
||||||
stock_items = self.get_stock_items()
|
stock_items = self.get_stock_items()
|
||||||
for item in self.get("items"):
|
for item in self.get("items"):
|
||||||
|
# in case of auto inventory accounting,
|
||||||
|
# against expense account is always "Stock Received But Not Billed"
|
||||||
|
# for a stock item and if not epening entry and not drop-ship entry
|
||||||
|
|
||||||
if auto_accounting_for_stock and item.item_code in stock_items \
|
if auto_accounting_for_stock and item.item_code in stock_items \
|
||||||
and self.is_opening == 'No':
|
and self.is_opening == 'No' and (not item.po_detail or
|
||||||
# in case of auto inventory accounting, against expense account is always
|
not frappe.db.get_value("Purchase Order Item", item.po_detail, "delivered_by_supplier")):
|
||||||
# Stock Received But Not Billed for a stock item
|
|
||||||
item.expense_account = stock_not_billed_account
|
item.expense_account = stock_not_billed_account
|
||||||
item.cost_center = None
|
item.cost_center = None
|
||||||
|
|
||||||
@@ -172,9 +180,10 @@ class PurchaseInvoice(BuyingController):
|
|||||||
throw(_("Purchse Order number required for Item {0}").format(d.item_code))
|
throw(_("Purchse Order number required for Item {0}").format(d.item_code))
|
||||||
|
|
||||||
def pr_required(self):
|
def pr_required(self):
|
||||||
|
stock_items = self.get_stock_items()
|
||||||
if frappe.db.get_value("Buying Settings", None, "pr_required") == 'Yes':
|
if frappe.db.get_value("Buying Settings", None, "pr_required") == 'Yes':
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
if not d.purchase_receipt:
|
if not d.purchase_receipt and d.item_code in stock_items:
|
||||||
throw(_("Purchase Receipt number required for Item {0}").format(d.item_code))
|
throw(_("Purchase Receipt number required for Item {0}").format(d.item_code))
|
||||||
|
|
||||||
def validate_write_off_account(self):
|
def validate_write_off_account(self):
|
||||||
@@ -213,7 +222,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
'party_type': 'Supplier',
|
'party_type': 'Supplier',
|
||||||
'party': self.supplier,
|
'party': self.supplier,
|
||||||
'is_advance' : 'Yes',
|
'is_advance' : 'Yes',
|
||||||
'dr_or_cr' : 'debit',
|
'dr_or_cr' : 'debit_in_account_currency',
|
||||||
'unadjusted_amt' : flt(d.advance_amount),
|
'unadjusted_amt' : flt(d.advance_amount),
|
||||||
'allocated_amt' : flt(d.allocated_amount)
|
'allocated_amt' : flt(d.allocated_amount)
|
||||||
}
|
}
|
||||||
@@ -257,26 +266,32 @@ class PurchaseInvoice(BuyingController):
|
|||||||
"party_type": "Supplier",
|
"party_type": "Supplier",
|
||||||
"party": self.supplier,
|
"party": self.supplier,
|
||||||
"against": self.against_expense_account,
|
"against": self.against_expense_account,
|
||||||
"credit": self.total_amount_to_pay,
|
"credit": self.base_grand_total,
|
||||||
"remarks": self.remarks,
|
"credit_in_account_currency": self.base_grand_total \
|
||||||
|
if self.party_account_currency==self.company_currency else self.grand_total,
|
||||||
"against_voucher": self.return_against if cint(self.is_return) else self.name,
|
"against_voucher": self.return_against if cint(self.is_return) else self.name,
|
||||||
"against_voucher_type": self.doctype,
|
"against_voucher_type": self.doctype,
|
||||||
})
|
}, self.party_account_currency)
|
||||||
)
|
)
|
||||||
|
|
||||||
# tax table gl entries
|
# tax table gl entries
|
||||||
valuation_tax = {}
|
valuation_tax = {}
|
||||||
for tax in self.get("taxes"):
|
for tax in self.get("taxes"):
|
||||||
if tax.category in ("Total", "Valuation and Total") and flt(tax.base_tax_amount_after_discount_amount):
|
if tax.category in ("Total", "Valuation and Total") and flt(tax.base_tax_amount_after_discount_amount):
|
||||||
|
account_currency = get_account_currency(tax.account_head)
|
||||||
|
|
||||||
|
dr_or_cr = "debit" if tax.add_deduct_tax == "Add" else "credit"
|
||||||
|
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": tax.account_head,
|
"account": tax.account_head,
|
||||||
"against": self.supplier,
|
"against": self.supplier,
|
||||||
"debit": tax.add_deduct_tax == "Add" and tax.base_tax_amount_after_discount_amount or 0,
|
dr_or_cr: tax.base_tax_amount_after_discount_amount,
|
||||||
"credit": tax.add_deduct_tax == "Deduct" and tax.base_tax_amount_after_discount_amount or 0,
|
dr_or_cr + "_in_account_currency": tax.base_tax_amount_after_discount_amount \
|
||||||
"remarks": self.remarks,
|
if account_currency==self.company_currency \
|
||||||
|
else tax.tax_amount_after_discount_amount,
|
||||||
"cost_center": tax.cost_center
|
"cost_center": tax.cost_center
|
||||||
})
|
}, account_currency)
|
||||||
)
|
)
|
||||||
|
|
||||||
# accumulate valuation tax
|
# accumulate valuation tax
|
||||||
@@ -292,36 +307,37 @@ class PurchaseInvoice(BuyingController):
|
|||||||
stock_items = self.get_stock_items()
|
stock_items = self.get_stock_items()
|
||||||
for item in self.get("items"):
|
for item in self.get("items"):
|
||||||
if flt(item.base_net_amount):
|
if flt(item.base_net_amount):
|
||||||
|
account_currency = get_account_currency(item.expense_account)
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": item.expense_account,
|
"account": item.expense_account,
|
||||||
"against": self.supplier,
|
"against": self.supplier,
|
||||||
"debit": item.base_net_amount,
|
"debit": item.base_net_amount,
|
||||||
"remarks": self.remarks,
|
"debit_in_account_currency": item.base_net_amount \
|
||||||
|
if account_currency==self.company_currency else item.net_amount,
|
||||||
"cost_center": item.cost_center
|
"cost_center": item.cost_center
|
||||||
})
|
}, account_currency)
|
||||||
)
|
)
|
||||||
|
|
||||||
if auto_accounting_for_stock and self.is_opening == "No" and \
|
if auto_accounting_for_stock and self.is_opening == "No" and \
|
||||||
item.item_code in stock_items and item.item_tax_amount:
|
item.item_code in stock_items and item.item_tax_amount:
|
||||||
# Post reverse entry for Stock-Received-But-Not-Billed if it is booked in Purchase Receipt
|
# Post reverse entry for Stock-Received-But-Not-Billed if it is booked in Purchase Receipt
|
||||||
negative_expense_booked_in_pi = None
|
|
||||||
if item.purchase_receipt:
|
if item.purchase_receipt:
|
||||||
negative_expense_booked_in_pi = frappe.db.sql("""select name from `tabGL Entry`
|
negative_expense_booked_in_pr = frappe.db.sql("""select name from `tabGL Entry`
|
||||||
where voucher_type='Purchase Receipt' and voucher_no=%s and account=%s""",
|
where voucher_type='Purchase Receipt' and voucher_no=%s and account=%s""",
|
||||||
(item.purchase_receipt, expenses_included_in_valuation))
|
(item.purchase_receipt, expenses_included_in_valuation))
|
||||||
|
|
||||||
if not negative_expense_booked_in_pi:
|
if not negative_expense_booked_in_pr:
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": stock_received_but_not_billed,
|
"account": stock_received_but_not_billed,
|
||||||
"against": self.supplier,
|
"against": self.supplier,
|
||||||
"debit": flt(item.item_tax_amount, self.precision("item_tax_amount", item)),
|
"debit": flt(item.item_tax_amount, self.precision("item_tax_amount", item)),
|
||||||
"remarks": self.remarks or "Accounting Entry for Stock"
|
"remarks": self.remarks or "Accounting Entry for Stock"
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
negative_expense_to_be_booked += flt(item.item_tax_amount, self.precision("item_tax_amount", item))
|
negative_expense_to_be_booked += flt(item.item_tax_amount, self.precision("item_tax_amount", item))
|
||||||
|
|
||||||
if self.is_opening == "No" and negative_expense_to_be_booked and valuation_tax:
|
if self.is_opening == "No" and negative_expense_to_be_booked and valuation_tax:
|
||||||
# credit valuation tax amount in "Expenses Included In Valuation"
|
# credit valuation tax amount in "Expenses Included In Valuation"
|
||||||
@@ -352,12 +368,28 @@ class PurchaseInvoice(BuyingController):
|
|||||||
# writeoff account includes petty difference in the invoice amount
|
# writeoff account includes petty difference in the invoice amount
|
||||||
# and the amount that is paid
|
# and the amount that is paid
|
||||||
if self.write_off_account and flt(self.write_off_amount):
|
if self.write_off_account and flt(self.write_off_amount):
|
||||||
|
write_off_account_currency = get_account_currency(self.write_off_account)
|
||||||
|
|
||||||
|
gl_entries.append(
|
||||||
|
self.get_gl_dict({
|
||||||
|
"account": self.credit_to,
|
||||||
|
"party_type": "Supplier",
|
||||||
|
"party": self.supplier,
|
||||||
|
"against": self.write_off_account,
|
||||||
|
"debit": self.base_write_off_amount,
|
||||||
|
"debit_in_account_currency": self.base_write_off_amount \
|
||||||
|
if self.party_account_currency==self.company_currency else self.write_off_amount,
|
||||||
|
"against_voucher": self.return_against if cint(self.is_return) else self.name,
|
||||||
|
"against_voucher_type": self.doctype,
|
||||||
|
}, self.party_account_currency)
|
||||||
|
)
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": self.write_off_account,
|
"account": self.write_off_account,
|
||||||
"against": self.supplier,
|
"against": self.supplier,
|
||||||
"credit": flt(self.write_off_amount),
|
"credit": flt(self.base_write_off_amount),
|
||||||
"remarks": self.remarks,
|
"credit_in_account_currency": self.base_write_off_amount \
|
||||||
|
if write_off_account_currency==self.company_currency else self.write_off_amount,
|
||||||
"cost_center": self.write_off_cost_center
|
"cost_center": self.write_off_cost_center
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
@@ -367,6 +399,8 @@ class PurchaseInvoice(BuyingController):
|
|||||||
make_gl_entries(gl_entries, cancel=(self.docstatus == 2))
|
make_gl_entries(gl_entries, cancel=(self.docstatus == 2))
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
|
self.check_for_stopped_or_closed_status()
|
||||||
|
|
||||||
if not self.is_return:
|
if not self.is_return:
|
||||||
from erpnext.accounts.utils import remove_against_link_from_jv
|
from erpnext.accounts.utils import remove_against_link_from_jv
|
||||||
remove_against_link_from_jv(self.doctype, self.name)
|
remove_against_link_from_jv(self.doctype, self.name)
|
||||||
@@ -393,7 +427,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
if self.bill_no:
|
if self.bill_no:
|
||||||
if cint(frappe.db.get_single_value("Accounts Settings", "check_supplier_invoice_uniqueness")):
|
if cint(frappe.db.get_single_value("Accounts Settings", "check_supplier_invoice_uniqueness")):
|
||||||
pi = frappe.db.exists("Purchase Invoice", {"bill_no": self.bill_no,
|
pi = frappe.db.exists("Purchase Invoice", {"bill_no": self.bill_no,
|
||||||
"fiscal_year": self.fiscal_year, "name": ("!=", self.name)})
|
"fiscal_year": self.fiscal_year, "name": ("!=", self.name), "docstatus": ("<", 2)})
|
||||||
if pi:
|
if pi:
|
||||||
frappe.throw("Supplier Invoice No exists in Purchase Invoice {0}".format(pi))
|
frappe.throw("Supplier Invoice No exists in Purchase Invoice {0}".format(pi))
|
||||||
|
|
||||||
@@ -409,10 +443,10 @@ def get_expense_account(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
or tabAccount.account_type in ("Expense Account", "Fixed Asset", "Temporary"))
|
or tabAccount.account_type in ("Expense Account", "Fixed Asset", "Temporary"))
|
||||||
and tabAccount.is_group=0
|
and tabAccount.is_group=0
|
||||||
and tabAccount.docstatus!=2
|
and tabAccount.docstatus!=2
|
||||||
and tabAccount.company = '%(company)s'
|
and tabAccount.company = %(company)s
|
||||||
and tabAccount.%(key)s LIKE '%(txt)s'
|
and tabAccount.{key} LIKE %(txt)s
|
||||||
%(mcond)s""" % {'company': filters['company'], 'key': searchfield,
|
{mcond}""".format( key=frappe.db.escape(searchfield), mcond=get_match_cond(doctype) ),
|
||||||
'txt': "%%%s%%" % frappe.db.escape(txt), 'mcond':get_match_cond(doctype)})
|
{ 'company': filters['company'], 'txt': "%%%s%%" % frappe.db.escape(txt) })
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def make_debit_note(source_name, target_doc=None):
|
def make_debit_note(source_name, target_doc=None):
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ from frappe.utils import cint
|
|||||||
import frappe.defaults
|
import frappe.defaults
|
||||||
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory, \
|
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory, \
|
||||||
test_records as pr_test_records
|
test_records as pr_test_records
|
||||||
|
from erpnext.exceptions import InvalidCurrency
|
||||||
|
|
||||||
test_dependencies = ["Item", "Cost Center"]
|
test_dependencies = ["Item", "Cost Center"]
|
||||||
test_ignore = ["Serial No"]
|
test_ignore = ["Serial No"]
|
||||||
@@ -49,23 +50,7 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
pi.insert()
|
pi.insert()
|
||||||
pi.submit()
|
pi.submit()
|
||||||
|
|
||||||
gl_entries = frappe.db.sql("""select account, debit, credit
|
self.check_gle_for_pi(pi.name)
|
||||||
from `tabGL Entry` where voucher_type='Purchase Invoice' and voucher_no=%s
|
|
||||||
order by account asc""", pi.name, as_dict=1)
|
|
||||||
self.assertTrue(gl_entries)
|
|
||||||
|
|
||||||
expected_values = dict((d[0], d) for d in [
|
|
||||||
["_Test Payable - _TC", 0, 720],
|
|
||||||
["Stock Received But Not Billed - _TC", 750.0, 0],
|
|
||||||
["Expenses Included In Valuation - _TC", 0.0, 250.0],
|
|
||||||
["_Test Account Shipping Charges - _TC", 100.0, 0],
|
|
||||||
["_Test Account VAT - _TC", 120.0, 0],
|
|
||||||
])
|
|
||||||
|
|
||||||
for i, gle in enumerate(gl_entries):
|
|
||||||
self.assertEquals(expected_values[gle.account][0], gle.account)
|
|
||||||
self.assertEquals(expected_values[gle.account][1], gle.debit)
|
|
||||||
self.assertEquals(expected_values[gle.account][2], gle.credit)
|
|
||||||
|
|
||||||
set_perpetual_inventory(0)
|
set_perpetual_inventory(0)
|
||||||
|
|
||||||
@@ -82,9 +67,14 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
pi.insert()
|
pi.insert()
|
||||||
pi.submit()
|
pi.submit()
|
||||||
|
|
||||||
|
self.check_gle_for_pi(pi.name)
|
||||||
|
|
||||||
|
set_perpetual_inventory(0)
|
||||||
|
|
||||||
|
def check_gle_for_pi(self, pi):
|
||||||
gl_entries = frappe.db.sql("""select account, debit, credit
|
gl_entries = frappe.db.sql("""select account, debit, credit
|
||||||
from `tabGL Entry` where voucher_type='Purchase Invoice' and voucher_no=%s
|
from `tabGL Entry` where voucher_type='Purchase Invoice' and voucher_no=%s
|
||||||
order by account asc""", pi.name, as_dict=1)
|
order by account asc""", pi, as_dict=1)
|
||||||
self.assertTrue(gl_entries)
|
self.assertTrue(gl_entries)
|
||||||
|
|
||||||
expected_values = dict((d[0], d) for d in [
|
expected_values = dict((d[0], d) for d in [
|
||||||
@@ -99,8 +89,6 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
self.assertEquals(expected_values[gle.account][1], gle.debit)
|
self.assertEquals(expected_values[gle.account][1], gle.debit)
|
||||||
self.assertEquals(expected_values[gle.account][2], gle.credit)
|
self.assertEquals(expected_values[gle.account][2], gle.credit)
|
||||||
|
|
||||||
set_perpetual_inventory(0)
|
|
||||||
|
|
||||||
def test_gl_entries_with_aia_for_non_stock_items(self):
|
def test_gl_entries_with_aia_for_non_stock_items(self):
|
||||||
set_perpetual_inventory()
|
set_perpetual_inventory()
|
||||||
self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
|
self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
|
||||||
@@ -218,7 +206,8 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
pi.load_from_db()
|
pi.load_from_db()
|
||||||
|
|
||||||
self.assertTrue(frappe.db.sql("""select name from `tabJournal Entry Account`
|
self.assertTrue(frappe.db.sql("""select name from `tabJournal Entry Account`
|
||||||
where reference_type='Purchase Invoice' and reference_name=%s and debit=300""", pi.name))
|
where reference_type='Purchase Invoice'
|
||||||
|
and reference_name=%s and debit_in_account_currency=300""", pi.name))
|
||||||
|
|
||||||
self.assertEqual(pi.outstanding_amount, 1212.30)
|
self.assertEqual(pi.outstanding_amount, 1212.30)
|
||||||
|
|
||||||
@@ -232,7 +221,7 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
test_recurring_document(self, test_records)
|
test_recurring_document(self, test_records)
|
||||||
|
|
||||||
def test_total_purchase_cost_for_project(self):
|
def test_total_purchase_cost_for_project(self):
|
||||||
existing_purchase_cost = frappe.db.sql("""select sum(ifnull(base_net_amount, 0))
|
existing_purchase_cost = frappe.db.sql("""select sum(base_net_amount)
|
||||||
from `tabPurchase Invoice Item` where project_name = '_Test Project' and docstatus=1""")
|
from `tabPurchase Invoice Item` where project_name = '_Test Project' and docstatus=1""")
|
||||||
existing_purchase_cost = existing_purchase_cost and existing_purchase_cost[0][0] or 0
|
existing_purchase_cost = existing_purchase_cost and existing_purchase_cost[0][0] or 0
|
||||||
|
|
||||||
@@ -277,6 +266,55 @@ class TestPurchaseInvoice(unittest.TestCase):
|
|||||||
|
|
||||||
set_perpetual_inventory(0)
|
set_perpetual_inventory(0)
|
||||||
|
|
||||||
|
def test_multi_currency_gle(self):
|
||||||
|
set_perpetual_inventory(0)
|
||||||
|
|
||||||
|
pi = make_purchase_invoice(supplier="_Test Supplier USD", credit_to="_Test Payable USD - _TC",
|
||||||
|
currency="USD", conversion_rate=50)
|
||||||
|
|
||||||
|
gl_entries = frappe.db.sql("""select account, account_currency, debit, credit,
|
||||||
|
debit_in_account_currency, credit_in_account_currency
|
||||||
|
from `tabGL Entry` where voucher_type='Purchase Invoice' and voucher_no=%s
|
||||||
|
order by account asc""", pi.name, as_dict=1)
|
||||||
|
|
||||||
|
self.assertTrue(gl_entries)
|
||||||
|
|
||||||
|
expected_values = {
|
||||||
|
"_Test Payable USD - _TC": {
|
||||||
|
"account_currency": "USD",
|
||||||
|
"debit": 0,
|
||||||
|
"debit_in_account_currency": 0,
|
||||||
|
"credit": 12500,
|
||||||
|
"credit_in_account_currency": 250
|
||||||
|
},
|
||||||
|
"_Test Account Cost for Goods Sold - _TC": {
|
||||||
|
"account_currency": "INR",
|
||||||
|
"debit": 12500,
|
||||||
|
"debit_in_account_currency": 12500,
|
||||||
|
"credit": 0,
|
||||||
|
"credit_in_account_currency": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for field in ("account_currency", "debit", "debit_in_account_currency", "credit", "credit_in_account_currency"):
|
||||||
|
for i, gle in enumerate(gl_entries):
|
||||||
|
self.assertEquals(expected_values[gle.account][field], gle[field])
|
||||||
|
|
||||||
|
|
||||||
|
# Check for valid currency
|
||||||
|
pi1 = make_purchase_invoice(supplier="_Test Supplier USD", credit_to="_Test Payable USD - _TC",
|
||||||
|
do_not_save=True)
|
||||||
|
|
||||||
|
self.assertRaises(InvalidCurrency, pi1.save)
|
||||||
|
|
||||||
|
# cancel
|
||||||
|
pi.cancel()
|
||||||
|
|
||||||
|
gle = frappe.db.sql("""select name from `tabGL Entry`
|
||||||
|
where voucher_type='Sales Invoice' and voucher_no=%s""", pi.name)
|
||||||
|
|
||||||
|
self.assertFalse(gle)
|
||||||
|
|
||||||
def make_purchase_invoice(**args):
|
def make_purchase_invoice(**args):
|
||||||
pi = frappe.new_doc("Purchase Invoice")
|
pi = frappe.new_doc("Purchase Invoice")
|
||||||
args = frappe._dict(args)
|
args = frappe._dict(args)
|
||||||
|
|||||||
@@ -141,6 +141,9 @@
|
|||||||
"supplier": "_Test Supplier",
|
"supplier": "_Test Supplier",
|
||||||
"supplier_name": "_Test Supplier"
|
"supplier_name": "_Test Supplier"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"bill_no": "NA",
|
"bill_no": "NA",
|
||||||
"buying_price_list": "_Test Price List",
|
"buying_price_list": "_Test Price List",
|
||||||
|
|||||||
@@ -1,28 +1,51 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"creation": "2013-03-08 15:36:46",
|
"creation": "2013-03-08 15:36:46",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "journal_entry",
|
"fieldname": "journal_entry",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Journal Entry",
|
"label": "Journal Entry",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "journal_voucher",
|
"oldfieldname": "journal_voucher",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Journal Entry",
|
"options": "Journal Entry",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "180px",
|
"print_width": "180px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "180px"
|
"width": "180px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "jv_detail_no",
|
"fieldname": "jv_detail_no",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Journal Entry Detail No",
|
"label": "Journal Entry Detail No",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "jv_detail_no",
|
"oldfieldname": "jv_detail_no",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
@@ -30,60 +53,130 @@
|
|||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_width": "80px",
|
"print_width": "80px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "80px"
|
"width": "80px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "remarks",
|
"fieldname": "remarks",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Remarks",
|
"label": "Remarks",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "remarks",
|
"oldfieldname": "remarks",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "150px",
|
"print_width": "150px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "150px"
|
"width": "150px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"permlevel": 0
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "advance_amount",
|
"fieldname": "advance_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Advance Amount",
|
"label": "Advance Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "advance_amount",
|
"oldfieldname": "advance_amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "party_account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "100px",
|
"print_width": "100px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "100px"
|
"width": "100px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "allocated_amount",
|
"fieldname": "allocated_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Allocated Amount",
|
"label": "Allocated Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "allocated_amount",
|
"oldfieldname": "allocated_amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "party_account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "100px",
|
"print_width": "100px",
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "100px"
|
"width": "100px"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-12-25 16:29:15.176476",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:53.288895",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Invoice Advance",
|
"name": "Purchase Invoice Advance",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": []
|
"permissions": [],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "item_code",
|
"fieldname": "item_code",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -17,6 +19,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Item",
|
"label": "Item",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "item_code",
|
"oldfieldname": "item_code",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -32,6 +35,29 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "col_break1",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "item_name",
|
"fieldname": "item_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -39,6 +65,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Item Name",
|
"label": "Item Name",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "item_name",
|
"oldfieldname": "item_name",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -53,14 +80,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"fieldname": "col_break1",
|
"bold": 0,
|
||||||
"fieldtype": "Column Break",
|
"collapsible": 1,
|
||||||
|
"fieldname": "description_section",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"label": "Description",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
@@ -71,6 +103,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
"fieldtype": "Text Editor",
|
"fieldtype": "Text Editor",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -78,6 +112,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "description",
|
"oldfieldname": "description",
|
||||||
"oldfieldtype": "Text",
|
"oldfieldtype": "Text",
|
||||||
@@ -94,6 +129,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "image",
|
"fieldname": "image",
|
||||||
"fieldtype": "Attach",
|
"fieldtype": "Attach",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -101,6 +138,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Image",
|
"label": "Image",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -114,6 +152,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "image_view",
|
"fieldname": "image_view",
|
||||||
"fieldtype": "Image",
|
"fieldtype": "Image",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -121,6 +161,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Image View",
|
"label": "Image View",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "image",
|
"options": "image",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -135,6 +176,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "quantity_and_rate",
|
"fieldname": "quantity_and_rate",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -142,6 +185,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Quantity and Rate",
|
"label": "Quantity and Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -154,6 +198,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "qty",
|
"fieldname": "qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -161,6 +207,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Qty",
|
"label": "Qty",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "qty",
|
"oldfieldname": "qty",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -175,12 +222,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break2",
|
"fieldname": "col_break2",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -193,6 +243,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "uom",
|
"fieldname": "uom",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -200,6 +252,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "UOM",
|
"label": "UOM",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "UOM",
|
"options": "UOM",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -213,6 +266,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "conversion_factor",
|
"fieldname": "conversion_factor",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -220,6 +275,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Conversion Factor",
|
"label": "Conversion Factor",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
@@ -232,12 +288,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "sec_break1",
|
"fieldname": "sec_break1",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -250,6 +309,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "price_list_rate",
|
"fieldname": "price_list_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -257,6 +318,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Price List Rate",
|
"label": "Price List Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -270,6 +332,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "price_list_rate",
|
"depends_on": "price_list_rate",
|
||||||
"fieldname": "discount_percentage",
|
"fieldname": "discount_percentage",
|
||||||
"fieldtype": "Percent",
|
"fieldtype": "Percent",
|
||||||
@@ -278,6 +342,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Discount on Price List Rate (%)",
|
"label": "Discount on Price List Rate (%)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -290,12 +355,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break3",
|
"fieldname": "col_break3",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -308,6 +376,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_price_list_rate",
|
"fieldname": "base_price_list_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -315,6 +385,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Price List Rate (Company Currency)",
|
"label": "Price List Rate (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -328,12 +399,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "sec_break2",
|
"fieldname": "sec_break2",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -346,6 +420,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "rate",
|
"fieldname": "rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -353,6 +429,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Rate ",
|
"label": "Rate ",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "import_rate",
|
"oldfieldname": "import_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -368,6 +445,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -375,6 +454,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "import_amount",
|
"oldfieldname": "import_amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -390,12 +470,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break4",
|
"fieldname": "col_break4",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -408,6 +491,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_rate",
|
"fieldname": "base_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -415,6 +500,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Rate (Company Currency)",
|
"label": "Rate (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "rate",
|
"oldfieldname": "rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -430,6 +516,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_amount",
|
"fieldname": "base_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -437,6 +525,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Amount (Company Currency)",
|
"label": "Amount (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "amount",
|
"oldfieldname": "amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -452,6 +541,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "pricing_rule",
|
"fieldname": "pricing_rule",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -459,6 +550,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Pricing Rule",
|
"label": "Pricing Rule",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Pricing Rule",
|
"options": "Pricing Rule",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -472,12 +564,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_22",
|
"fieldname": "section_break_22",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -491,6 +586,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "net_rate",
|
"fieldname": "net_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -498,6 +595,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Net Rate",
|
"label": "Net Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -512,6 +610,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "net_amount",
|
"fieldname": "net_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -519,6 +619,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Net Amount",
|
"label": "Net Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -533,12 +634,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_25",
|
"fieldname": "column_break_25",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -552,6 +656,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_net_rate",
|
"fieldname": "base_net_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -559,6 +665,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Net Rate (Company Currency)",
|
"label": "Net Rate (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -573,6 +680,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_net_amount",
|
"fieldname": "base_net_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -580,6 +689,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Net Amount (Company Currency)",
|
"label": "Net Amount (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -594,6 +704,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "accounting",
|
"fieldname": "accounting",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -601,6 +713,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Accounting",
|
"label": "Accounting",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -613,6 +726,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "expense_account",
|
"fieldname": "expense_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -620,6 +735,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Expense Head",
|
"label": "Expense Head",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "expense_head",
|
"oldfieldname": "expense_head",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -637,12 +753,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break5",
|
"fieldname": "col_break5",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -655,6 +774,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "project_name",
|
"fieldname": "project_name",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -662,6 +783,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Project Name",
|
"label": "Project Name",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Project",
|
"options": "Project",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -675,6 +797,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": ":Company",
|
"default": ":Company",
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -683,6 +807,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "cost_center",
|
"oldfieldname": "cost_center",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -700,6 +825,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "reference",
|
"fieldname": "reference",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -707,6 +834,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Reference",
|
"label": "Reference",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -719,6 +847,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "brand",
|
"fieldname": "brand",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -726,6 +856,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Brand",
|
"label": "Brand",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "brand",
|
"oldfieldname": "brand",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -740,6 +871,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "",
|
"description": "",
|
||||||
"fieldname": "item_group",
|
"fieldname": "item_group",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -748,6 +881,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Item Group",
|
"label": "Item Group",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "item_group",
|
"oldfieldname": "item_group",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -763,6 +897,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges",
|
"description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges",
|
||||||
"fieldname": "item_tax_rate",
|
"fieldname": "item_tax_rate",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
@@ -771,6 +907,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Item Tax Rate",
|
"label": "Item Tax Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "item_tax_rate",
|
"oldfieldname": "item_tax_rate",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
@@ -785,6 +922,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "item_tax_amount",
|
"fieldname": "item_tax_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -792,6 +931,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Item Tax Amount",
|
"label": "Item Tax Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -807,6 +947,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "purchase_order",
|
"fieldname": "purchase_order",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -814,6 +956,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Purchase Order",
|
"label": "Purchase Order",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "purchase_order",
|
"oldfieldname": "purchase_order",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -829,12 +972,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break6",
|
"fieldname": "col_break6",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -847,6 +993,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "po_detail",
|
"fieldname": "po_detail",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -854,6 +1002,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Purchase Order Item",
|
"label": "Purchase Order Item",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "po_detail",
|
"oldfieldname": "po_detail",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -868,6 +1017,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "purchase_receipt",
|
"fieldname": "purchase_receipt",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -875,6 +1026,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Purchase Receipt",
|
"label": "Purchase Receipt",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "purchase_receipt",
|
"oldfieldname": "purchase_receipt",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -890,6 +1042,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "page_break",
|
"fieldname": "page_break",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -897,6 +1051,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Page Break",
|
"label": "Page Break",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
@@ -909,6 +1064,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "pr_detail",
|
"fieldname": "pr_detail",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -916,6 +1073,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "PR Detail",
|
"label": "PR Detail",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "pr_detail",
|
"oldfieldname": "pr_detail",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -930,6 +1088,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "valuation_rate",
|
"fieldname": "valuation_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -937,6 +1097,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Valuation Rate",
|
"label": "Valuation Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -950,6 +1111,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "rm_supp_cost",
|
"fieldname": "rm_supp_cost",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -957,6 +1120,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Raw Materials Supplied Cost",
|
"label": "Raw Materials Supplied Cost",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -977,7 +1141,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-08-19 12:45:54.213558",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:53.343792",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Invoice Item",
|
"name": "Purchase Invoice Item",
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "Valuation and Total",
|
"default": "Valuation and Total",
|
||||||
"fieldname": "category",
|
"fieldname": "category",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
@@ -18,6 +20,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Consider Tax or Charge for",
|
"label": "Consider Tax or Charge for",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "category",
|
"oldfieldname": "category",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
@@ -33,6 +36,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "Add",
|
"default": "Add",
|
||||||
"fieldname": "add_deduct_tax",
|
"fieldname": "add_deduct_tax",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
@@ -41,6 +46,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Add or Deduct",
|
"label": "Add or Deduct",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "add_deduct_tax",
|
"oldfieldname": "add_deduct_tax",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
@@ -56,6 +62,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "charge_type",
|
"fieldname": "charge_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -63,6 +71,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Type",
|
"label": "Type",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "charge_type",
|
"oldfieldname": "charge_type",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
@@ -78,6 +87,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
|
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
|
||||||
"fieldname": "row_id",
|
"fieldname": "row_id",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
@@ -86,6 +97,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Reference Row #",
|
"label": "Reference Row #",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "row_id",
|
"oldfieldname": "row_id",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -100,6 +112,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
|
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
|
||||||
"fieldname": "included_in_print_rate",
|
"fieldname": "included_in_print_rate",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
@@ -108,6 +122,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Is this Tax included in Basic Rate?",
|
"label": "Is this Tax included in Basic Rate?",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -121,12 +136,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -139,6 +157,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "account_head",
|
"fieldname": "account_head",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -146,6 +166,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Account Head",
|
"label": "Account Head",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "account_head",
|
"oldfieldname": "account_head",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -161,6 +182,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": ":Company",
|
"default": ":Company",
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -169,6 +192,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "cost_center",
|
"oldfieldname": "cost_center",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -184,6 +208,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
"fieldtype": "Text Editor",
|
"fieldtype": "Text Editor",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -191,6 +217,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "description",
|
"oldfieldname": "description",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
@@ -207,12 +234,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_10",
|
"fieldname": "section_break_10",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -226,6 +256,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "rate",
|
"fieldname": "rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -233,6 +265,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Rate",
|
"label": "Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "rate",
|
"oldfieldname": "rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -247,12 +280,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_9",
|
"fieldname": "section_break_9",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -266,6 +302,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "tax_amount",
|
"fieldname": "tax_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -273,6 +311,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "tax_amount",
|
"oldfieldname": "tax_amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -288,6 +327,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "tax_amount_after_discount_amount",
|
"fieldname": "tax_amount_after_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -295,6 +336,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Tax Amount After Discount Amount",
|
"label": "Tax Amount After Discount Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -309,6 +351,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "total",
|
"fieldname": "total",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -316,6 +360,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Total",
|
"label": "Total",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "total",
|
"oldfieldname": "total",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -331,12 +376,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_14",
|
"fieldname": "column_break_14",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -350,6 +398,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_tax_amount",
|
"fieldname": "base_tax_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -357,6 +407,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Amount (Company Currency)",
|
"label": "Amount (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -371,6 +422,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_total",
|
"fieldname": "base_total",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -378,6 +431,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Total (Company Currency)",
|
"label": "Total (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -392,6 +446,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_tax_amount_after_discount_amount",
|
"fieldname": "base_tax_amount_after_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -399,6 +455,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Tax Amount After Discount Amount",
|
"label": "Tax Amount After Discount Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -413,6 +470,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "item_wise_tax_detail",
|
"fieldname": "item_wise_tax_detail",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -420,6 +479,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Item Wise Tax Detail ",
|
"label": "Item Wise Tax Detail ",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "item_wise_tax_detail",
|
"oldfieldname": "item_wise_tax_detail",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
@@ -434,6 +494,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "parenttype",
|
"fieldname": "parenttype",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -441,6 +503,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Parenttype",
|
"label": "Parenttype",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "parenttype",
|
"oldfieldname": "parenttype",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -462,7 +525,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-08-19 12:46:32.687299",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:54.644704",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Taxes and Charges",
|
"name": "Purchase Taxes and Charges",
|
||||||
|
|||||||
@@ -1,77 +1,190 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:title",
|
"autoname": "field:title",
|
||||||
"creation": "2013-01-10 16:34:08",
|
"creation": "2013-01-10 16:34:08",
|
||||||
|
"custom": 0,
|
||||||
"description": "Standard tax template that can be applied to all Purchase Transactions. This template can contain list of tax heads and also other expense heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both.\n10. Add or Deduct: Whether you want to add or deduct the tax.",
|
"description": "Standard tax template that can be applied to all Purchase Transactions. This template can contain list of tax heads and also other expense heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both.\n10. Add or Deduct: Whether you want to add or deduct the tax.",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Setup",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "title",
|
"fieldname": "title",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Title",
|
"label": "Title",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 1,
|
||||||
"oldfieldname": "title",
|
"oldfieldname": "title",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "is_default",
|
"fieldname": "is_default",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Default",
|
"label": "Default",
|
||||||
"permlevel": 0
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "disabled",
|
"fieldname": "disabled",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Disabled",
|
"label": "Disabled",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break4",
|
"fieldname": "column_break4",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break6",
|
"fieldname": "section_break6",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "",
|
"label": "",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "taxes",
|
"fieldname": "taxes",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Purchase Taxes and Charges",
|
"label": "Purchase Taxes and Charges",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "purchase_tax_details",
|
"oldfieldname": "purchase_tax_details",
|
||||||
"oldfieldtype": "Table",
|
"oldfieldtype": "Table",
|
||||||
"options": "Purchase Taxes and Charges",
|
"options": "Purchase Taxes and Charges",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-money",
|
"icon": "icon-money",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2015-05-06 08:52:01.499434",
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:54.729312",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Taxes and Charges Template",
|
"name": "Purchase Taxes and Charges Template",
|
||||||
@@ -79,44 +192,65 @@
|
|||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Purchase Manager",
|
"role": "Purchase Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Purchase Master Manager",
|
"role": "Purchase Master Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 0,
|
"email": 0,
|
||||||
"export": 0,
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 0,
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"report": 0,
|
||||||
"role": "Purchase User",
|
"role": "Purchase User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 0,
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
@@ -48,8 +48,9 @@ def get_items(price_list, sales_or_purchase, item=None):
|
|||||||
ON
|
ON
|
||||||
(item_det.item_code=i.name or item_det.item_code=i.variant_of)
|
(item_det.item_code=i.name or item_det.item_code=i.variant_of)
|
||||||
where
|
where
|
||||||
ifnull(i.has_variants, 0) = 0 and
|
i.has_variants = 0 and
|
||||||
{condition}
|
{condition}
|
||||||
order by
|
order by
|
||||||
{order_by}
|
{order_by}
|
||||||
i.name""".format(condition=condition, order_by=order_by), args, as_dict=1)
|
i.name
|
||||||
|
limit 24""".format(condition=condition, order_by=order_by), args, as_dict=1)
|
||||||
|
|||||||
@@ -36,6 +36,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
refresh: function(doc, dt, dn) {
|
refresh: function(doc, dt, dn) {
|
||||||
this._super();
|
this._super();
|
||||||
|
|
||||||
|
if(cur_frm.msgbox && cur_frm.msgbox.$wrapper.is(":visible")) {
|
||||||
|
// hide new msgbox
|
||||||
|
cur_frm.msgbox.hide();
|
||||||
|
}
|
||||||
|
|
||||||
cur_frm.dashboard.reset();
|
cur_frm.dashboard.reset();
|
||||||
|
|
||||||
this.frm.toggle_reqd("due_date", !this.frm.doc.is_return);
|
this.frm.toggle_reqd("due_date", !this.frm.doc.is_return);
|
||||||
@@ -45,6 +50,13 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
if(doc.update_stock) this.show_stock_ledger();
|
if(doc.update_stock) this.show_stock_ledger();
|
||||||
|
|
||||||
if(doc.docstatus==1 && !doc.is_return) {
|
if(doc.docstatus==1 && !doc.is_return) {
|
||||||
|
|
||||||
|
var is_delivered_by_supplier = false;
|
||||||
|
|
||||||
|
is_delivered_by_supplier = cur_frm.doc.items.some(function(item){
|
||||||
|
return item.is_delivered_by_supplier ? true : false;
|
||||||
|
})
|
||||||
|
|
||||||
cur_frm.add_custom_button(doc.update_stock ? __('Sales Return') : __('Credit Note'),
|
cur_frm.add_custom_button(doc.update_stock ? __('Sales Return') : __('Credit Note'),
|
||||||
this.make_sales_return);
|
this.make_sales_return);
|
||||||
|
|
||||||
@@ -56,7 +68,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
return item.delivery_note ? true : false;
|
return item.delivery_note ? true : false;
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!from_delivery_note) {
|
if(!from_delivery_note && !is_delivered_by_supplier) {
|
||||||
cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Make Delivery Note']).addClass("btn-primary");
|
cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Make Delivery Note']).addClass("btn-primary");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,7 +111,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
source_doctype: "Sales Order",
|
source_doctype: "Sales Order",
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
status: ["!=", "Stopped"],
|
status: ["not in", ["Stopped", "Closed"]],
|
||||||
per_billed: ["<", 99.99],
|
per_billed: ["<", 99.99],
|
||||||
customer: cur_frm.doc.customer || undefined,
|
customer: cur_frm.doc.customer || undefined,
|
||||||
company: cur_frm.doc.company
|
company: cur_frm.doc.company
|
||||||
@@ -133,8 +145,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
},
|
},
|
||||||
|
|
||||||
is_pos: function(doc, dt, dn, callback_fn) {
|
is_pos: function(doc, dt, dn, callback_fn) {
|
||||||
if(cur_frm.doc.__missing_values_set) return;
|
|
||||||
cur_frm.cscript.hide_fields(this.frm.doc);
|
cur_frm.cscript.hide_fields(this.frm.doc);
|
||||||
|
if(cur_frm.doc.__missing_values_set) return;
|
||||||
if(cint(this.frm.doc.is_pos)) {
|
if(cint(this.frm.doc.is_pos)) {
|
||||||
if(!this.frm.doc.company) {
|
if(!this.frm.doc.company) {
|
||||||
this.frm.set_value("is_pos", 0);
|
this.frm.set_value("is_pos", 0);
|
||||||
@@ -146,13 +158,18 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
method: "set_missing_values",
|
method: "set_missing_values",
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
cur_frm.pos_print_format = r.message.print_format;
|
if(r.message && r.message.print_format) {
|
||||||
|
cur_frm.pos_print_format = r.message.print_format;
|
||||||
|
}
|
||||||
cur_frm.doc.__missing_values_set = true;
|
cur_frm.doc.__missing_values_set = true;
|
||||||
me.frm.script_manager.trigger("update_stock");
|
me.frm.script_manager.trigger("update_stock");
|
||||||
frappe.model.set_default_values(me.frm.doc);
|
frappe.model.set_default_values(me.frm.doc);
|
||||||
me.set_dynamic_labels();
|
me.set_dynamic_labels();
|
||||||
me.calculate_taxes_and_totals();
|
me.calculate_taxes_and_totals();
|
||||||
if(callback_fn) callback_fn();
|
if(callback_fn) callback_fn();
|
||||||
|
frappe.after_ajax(function() {
|
||||||
|
cur_frm.doc.__missing_values_set = false;
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -176,6 +193,26 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
debit_to: function() {
|
||||||
|
var me = this;
|
||||||
|
if(this.frm.doc.debit_to) {
|
||||||
|
me.frm.call({
|
||||||
|
method: "frappe.client.get_value",
|
||||||
|
args: {
|
||||||
|
doctype: "Account",
|
||||||
|
fieldname: "account_currency",
|
||||||
|
filters: { name: me.frm.doc.debit_to },
|
||||||
|
},
|
||||||
|
callback: function(r, rt) {
|
||||||
|
if(r.message) {
|
||||||
|
me.frm.set_value("party_account_currency", r.message.account_currency);
|
||||||
|
me.set_dynamic_labels();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
allocated_amount: function() {
|
allocated_amount: function() {
|
||||||
this.calculate_total_advance();
|
this.calculate_total_advance();
|
||||||
this.frm.refresh_fields();
|
this.frm.refresh_fields();
|
||||||
@@ -183,10 +220,10 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
|
|
||||||
write_off_outstanding_amount_automatically: function() {
|
write_off_outstanding_amount_automatically: function() {
|
||||||
if(cint(this.frm.doc.write_off_outstanding_amount_automatically)) {
|
if(cint(this.frm.doc.write_off_outstanding_amount_automatically)) {
|
||||||
frappe.model.round_floats_in(this.frm.doc, ["base_grand_total", "paid_amount"]);
|
frappe.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]);
|
||||||
// this will make outstanding amount 0
|
// this will make outstanding amount 0
|
||||||
this.frm.set_value("write_off_amount",
|
this.frm.set_value("write_off_amount",
|
||||||
flt(this.frm.doc.base_grand_total - this.frm.doc.paid_amount - this.frm.doc.total_advance, precision("write_off_amount"))
|
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount - this.frm.doc.total_advance, precision("write_off_amount"))
|
||||||
);
|
);
|
||||||
this.frm.toggle_enable("write_off_amount", false);
|
this.frm.toggle_enable("write_off_amount", false);
|
||||||
|
|
||||||
@@ -199,10 +236,12 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
},
|
},
|
||||||
|
|
||||||
write_off_amount: function() {
|
write_off_amount: function() {
|
||||||
|
this.set_in_company_currency(this.frm.doc, ["write_off_amount"]);
|
||||||
this.write_off_outstanding_amount_automatically();
|
this.write_off_outstanding_amount_automatically();
|
||||||
},
|
},
|
||||||
|
|
||||||
paid_amount: function() {
|
paid_amount: function() {
|
||||||
|
this.set_in_company_currency(this.frm.doc, ["paid_amount"]);
|
||||||
this.write_off_outstanding_amount_automatically();
|
this.write_off_outstanding_amount_automatically();
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -291,9 +330,10 @@ cur_frm.cscript['Make Delivery Note'] = function() {
|
|||||||
|
|
||||||
cur_frm.cscript.make_bank_entry = function() {
|
cur_frm.cscript.make_bank_entry = function() {
|
||||||
return frappe.call({
|
return frappe.call({
|
||||||
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_from_sales_invoice",
|
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_invoice",
|
||||||
args: {
|
args: {
|
||||||
"sales_invoice": cur_frm.doc.name
|
"dt": "Sales Invoice",
|
||||||
|
"dn": cur_frm.doc.name
|
||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
var doclist = frappe.model.sync(r.message);
|
var doclist = frappe.model.sync(r.message);
|
||||||
@@ -347,7 +387,7 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
|||||||
// --------------------------------
|
// --------------------------------
|
||||||
cur_frm.set_query("income_account", "items", function(doc) {
|
cur_frm.set_query("income_account", "items", function(doc) {
|
||||||
return{
|
return{
|
||||||
query: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_income_account",
|
query: "erpnext.controllers.queries.get_income_account",
|
||||||
filters: {'company': doc.company}
|
filters: {'company': doc.company}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -395,9 +435,9 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if(cur_frm.doc.is_pos) {
|
if(cur_frm.doc.is_pos) {
|
||||||
frappe.msgprint('<a class="btn btn-primary" \
|
cur_frm.msgbox = frappe.msgprint('<a class="btn btn-primary" \
|
||||||
onclick="cur_frm.print_preview.printit(true)" style="margin-right: 5px;">Print</a>\
|
onclick="cur_frm.print_preview.printit(true)" style="margin-right: 5px;">Print</a>\
|
||||||
<a class="btn btn-default" href="#Form/Sales Invoice/New">New</a>');
|
<a class="btn btn-default" href="#Form/Sales Invoice/New Sales Invoice">New</a>');
|
||||||
|
|
||||||
} else if(cint(frappe.boot.notification_settings.sales_invoice)) {
|
} else if(cint(frappe.boot.notification_settings.sales_invoice)) {
|
||||||
cur_frm.email_doc(frappe.boot.notification_settings.sales_invoice_message);
|
cur_frm.email_doc(frappe.boot.notification_settings.sales_invoice_message);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@ from erpnext.controllers.stock_controller import update_gl_entries_after
|
|||||||
from frappe.model.mapper import get_mapped_doc
|
from frappe.model.mapper import get_mapped_doc
|
||||||
|
|
||||||
from erpnext.controllers.selling_controller import SellingController
|
from erpnext.controllers.selling_controller import SellingController
|
||||||
|
from erpnext.accounts.utils import get_account_currency
|
||||||
|
|
||||||
form_grid_templates = {
|
form_grid_templates = {
|
||||||
"items": "templates/form_grid/item_grid.html"
|
"items": "templates/form_grid/item_grid.html"
|
||||||
@@ -35,6 +36,15 @@ class SalesInvoice(SellingController):
|
|||||||
'overflow_type': 'billing'
|
'overflow_type': 'billing'
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
def set_indicator(self):
|
||||||
|
"""Set indicator for portal"""
|
||||||
|
if self.outstanding_amount > 0:
|
||||||
|
self.indicator_color = "orange"
|
||||||
|
self.indicator_title = _("Unpaid")
|
||||||
|
else:
|
||||||
|
self.indicator_color = "green"
|
||||||
|
self.indicator_title = _("Paid")
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
super(SalesInvoice, self).validate()
|
super(SalesInvoice, self).validate()
|
||||||
self.validate_posting_time()
|
self.validate_posting_time()
|
||||||
@@ -42,7 +52,7 @@ class SalesInvoice(SellingController):
|
|||||||
self.validate_proj_cust()
|
self.validate_proj_cust()
|
||||||
self.validate_with_previous_doc()
|
self.validate_with_previous_doc()
|
||||||
self.validate_uom_is_integer("stock_uom", "qty")
|
self.validate_uom_is_integer("stock_uom", "qty")
|
||||||
self.check_stop_sales_order("sales_order")
|
self.check_stop_or_close_sales_order("sales_order")
|
||||||
self.validate_debit_to_acc()
|
self.validate_debit_to_acc()
|
||||||
self.validate_fixed_asset_account()
|
self.validate_fixed_asset_account()
|
||||||
self.clear_unallocated_advances("Sales Invoice Advance", "advances")
|
self.clear_unallocated_advances("Sales Invoice Advance", "advances")
|
||||||
@@ -54,6 +64,7 @@ class SalesInvoice(SellingController):
|
|||||||
self.validate_pos()
|
self.validate_pos()
|
||||||
|
|
||||||
if cint(self.update_stock):
|
if cint(self.update_stock):
|
||||||
|
self.validate_dropship_item()
|
||||||
self.validate_item_code()
|
self.validate_item_code()
|
||||||
self.validate_warehouse()
|
self.validate_warehouse()
|
||||||
self.update_current_stock()
|
self.update_current_stock()
|
||||||
@@ -88,13 +99,13 @@ class SalesInvoice(SellingController):
|
|||||||
self.update_status_updater_args()
|
self.update_status_updater_args()
|
||||||
self.update_prevdoc_status()
|
self.update_prevdoc_status()
|
||||||
|
|
||||||
|
# this sequence because outstanding may get -ve
|
||||||
|
self.make_gl_entries()
|
||||||
|
|
||||||
if not self.is_return:
|
if not self.is_return:
|
||||||
self.update_billing_status_for_zero_amount_refdoc("Sales Order")
|
self.update_billing_status_for_zero_amount_refdoc("Sales Order")
|
||||||
self.check_credit_limit()
|
self.check_credit_limit()
|
||||||
|
|
||||||
# this sequence because outstanding may get -ve
|
|
||||||
self.make_gl_entries()
|
|
||||||
|
|
||||||
if not cint(self.is_pos) == 1 and not self.is_return:
|
if not cint(self.is_pos) == 1 and not self.is_return:
|
||||||
self.update_against_document_in_jv()
|
self.update_against_document_in_jv()
|
||||||
|
|
||||||
@@ -107,7 +118,7 @@ class SalesInvoice(SellingController):
|
|||||||
if cint(self.update_stock) == 1:
|
if cint(self.update_stock) == 1:
|
||||||
self.update_stock_ledger()
|
self.update_stock_ledger()
|
||||||
|
|
||||||
self.check_stop_sales_order("sales_order")
|
self.check_stop_or_close_sales_order("sales_order")
|
||||||
|
|
||||||
from erpnext.accounts.utils import remove_against_link_from_jv
|
from erpnext.accounts.utils import remove_against_link_from_jv
|
||||||
remove_against_link_from_jv(self.doctype, self.name)
|
remove_against_link_from_jv(self.doctype, self.name)
|
||||||
@@ -145,7 +156,7 @@ class SalesInvoice(SellingController):
|
|||||||
'second_join_field': 'so_detail',
|
'second_join_field': 'so_detail',
|
||||||
'overflow_type': 'delivery',
|
'overflow_type': 'delivery',
|
||||||
'extra_cond': """ and exists(select name from `tabSales Invoice`
|
'extra_cond': """ and exists(select name from `tabSales Invoice`
|
||||||
where name=`tabSales Invoice Item`.parent and ifnull(update_stock, 0) = 1)"""
|
where name=`tabSales Invoice Item`.parent and update_stock = 1)"""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'source_dt': 'Sales Invoice Item',
|
'source_dt': 'Sales Invoice Item',
|
||||||
@@ -162,11 +173,22 @@ class SalesInvoice(SellingController):
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
def check_credit_limit(self):
|
||||||
|
from erpnext.selling.doctype.customer.customer import check_credit_limit
|
||||||
|
|
||||||
|
validate_against_credit_limit = False
|
||||||
|
for d in self.get("items"):
|
||||||
|
if not (d.sales_order or d.delivery_note):
|
||||||
|
validate_against_credit_limit = True
|
||||||
|
break
|
||||||
|
if validate_against_credit_limit:
|
||||||
|
check_credit_limit(self.customer, self.company)
|
||||||
|
|
||||||
def set_missing_values(self, for_validate=False):
|
def set_missing_values(self, for_validate=False):
|
||||||
pos = self.set_pos_fields(for_validate)
|
pos = self.set_pos_fields(for_validate)
|
||||||
|
|
||||||
if not self.debit_to:
|
if not self.debit_to:
|
||||||
self.debit_to = get_party_account(self.company, self.customer, "Customer")
|
self.debit_to = get_party_account("Customer", self.customer, self.company)
|
||||||
if not self.due_date and self.customer:
|
if not self.due_date and self.customer:
|
||||||
self.due_date = get_due_date(self.posting_date, "Customer", self.customer, self.company)
|
self.due_date = get_due_date(self.posting_date, "Customer", self.customer, self.company)
|
||||||
|
|
||||||
@@ -186,8 +208,8 @@ class SalesInvoice(SellingController):
|
|||||||
def validate_time_logs_are_submitted(self):
|
def validate_time_logs_are_submitted(self):
|
||||||
for d in self.get("items"):
|
for d in self.get("items"):
|
||||||
if d.time_log_batch:
|
if d.time_log_batch:
|
||||||
status = frappe.db.get_value("Time Log Batch", d.time_log_batch, "status")
|
docstatus = frappe.db.get_value("Time Log Batch", d.time_log_batch, "docstatus")
|
||||||
if status!="Submitted":
|
if docstatus!=1:
|
||||||
frappe.throw(_("Time Log Batch {0} must be 'Submitted'").format(d.time_log_batch))
|
frappe.throw(_("Time Log Batch {0} must be 'Submitted'").format(d.time_log_batch))
|
||||||
|
|
||||||
def set_pos_fields(self, for_validate=False):
|
def set_pos_fields(self, for_validate=False):
|
||||||
@@ -235,7 +257,7 @@ class SalesInvoice(SellingController):
|
|||||||
def get_advances(self):
|
def get_advances(self):
|
||||||
if not self.is_return:
|
if not self.is_return:
|
||||||
super(SalesInvoice, self).get_advances(self.debit_to, "Customer", self.customer,
|
super(SalesInvoice, self).get_advances(self.debit_to, "Customer", self.customer,
|
||||||
"Sales Invoice Advance", "advances", "credit", "sales_order")
|
"Sales Invoice Advance", "advances", "credit_in_account_currency", "sales_order")
|
||||||
|
|
||||||
def get_company_abbr(self):
|
def get_company_abbr(self):
|
||||||
return frappe.db.sql("select abbr from tabCompany where name=%s", self.company)[0][0]
|
return frappe.db.sql("select abbr from tabCompany where name=%s", self.company)[0][0]
|
||||||
@@ -260,7 +282,7 @@ class SalesInvoice(SellingController):
|
|||||||
'party_type': 'Customer',
|
'party_type': 'Customer',
|
||||||
'party': self.customer,
|
'party': self.customer,
|
||||||
'is_advance' : 'Yes',
|
'is_advance' : 'Yes',
|
||||||
'dr_or_cr' : 'credit',
|
'dr_or_cr' : 'credit_in_account_currency',
|
||||||
'unadjusted_amt' : flt(d.advance_amount),
|
'unadjusted_amt' : flt(d.advance_amount),
|
||||||
'allocated_amt' : flt(d.allocated_amount)
|
'allocated_amt' : flt(d.allocated_amount)
|
||||||
}
|
}
|
||||||
@@ -271,7 +293,8 @@ class SalesInvoice(SellingController):
|
|||||||
reconcile_against_document(lst)
|
reconcile_against_document(lst)
|
||||||
|
|
||||||
def validate_debit_to_acc(self):
|
def validate_debit_to_acc(self):
|
||||||
account = frappe.db.get_value("Account", self.debit_to, ["account_type", "report_type"], as_dict=True)
|
account = frappe.db.get_value("Account", self.debit_to,
|
||||||
|
["account_type", "report_type", "account_currency"], as_dict=True)
|
||||||
|
|
||||||
if account.report_type != "Balance Sheet":
|
if account.report_type != "Balance Sheet":
|
||||||
frappe.throw(_("Debit To account must be a Balance Sheet account"))
|
frappe.throw(_("Debit To account must be a Balance Sheet account"))
|
||||||
@@ -279,6 +302,8 @@ class SalesInvoice(SellingController):
|
|||||||
if self.customer and account.account_type != "Receivable":
|
if self.customer and account.account_type != "Receivable":
|
||||||
frappe.throw(_("Debit To account must be a Receivable account"))
|
frappe.throw(_("Debit To account must be a Receivable account"))
|
||||||
|
|
||||||
|
self.party_account_currency = account.account_currency
|
||||||
|
|
||||||
def validate_fixed_asset_account(self):
|
def validate_fixed_asset_account(self):
|
||||||
"""Validate Fixed Asset and whether Income Account Entered Exists"""
|
"""Validate Fixed Asset and whether Income Account Entered Exists"""
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
@@ -335,8 +360,8 @@ class SalesInvoice(SellingController):
|
|||||||
"""check for does customer belong to same project as entered.."""
|
"""check for does customer belong to same project as entered.."""
|
||||||
if self.project_name and self.customer:
|
if self.project_name and self.customer:
|
||||||
res = frappe.db.sql("""select name from `tabProject`
|
res = frappe.db.sql("""select name from `tabProject`
|
||||||
where name = %s and (customer = %s or
|
where name = %s and (customer = %s or customer is null or customer = '')""",
|
||||||
ifnull(customer,'')='')""", (self.project_name, self.customer))
|
(self.project_name, self.customer))
|
||||||
if not res:
|
if not res:
|
||||||
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project_name))
|
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project_name))
|
||||||
|
|
||||||
@@ -355,6 +380,8 @@ class SalesInvoice(SellingController):
|
|||||||
msgprint(_("Item Code required at Row No {0}").format(d.idx), raise_exception=True)
|
msgprint(_("Item Code required at Row No {0}").format(d.idx), raise_exception=True)
|
||||||
|
|
||||||
def validate_warehouse(self):
|
def validate_warehouse(self):
|
||||||
|
super(SalesInvoice, self).validate_warehouse()
|
||||||
|
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
if not d.warehouse:
|
if not d.warehouse:
|
||||||
frappe.throw(_("Warehouse required at Row No {0}").format(d.idx))
|
frappe.throw(_("Warehouse required at Row No {0}").format(d.idx))
|
||||||
@@ -384,6 +411,12 @@ class SalesInvoice(SellingController):
|
|||||||
msgprint(_("Please remove this Invoice {0} from C-Form {1}")
|
msgprint(_("Please remove this Invoice {0} from C-Form {1}")
|
||||||
.format(self.name, self.c_form_no), raise_exception = 1)
|
.format(self.name, self.c_form_no), raise_exception = 1)
|
||||||
|
|
||||||
|
def validate_dropship_item(self):
|
||||||
|
for item in self.items:
|
||||||
|
if item.sales_order:
|
||||||
|
if frappe.db.get_value("Sales Order Item", item.so_detail, "delivered_by_supplier"):
|
||||||
|
frappe.throw(_("Could not update stock, invoice contains drop shipping item."))
|
||||||
|
|
||||||
def update_current_stock(self):
|
def update_current_stock(self):
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
if d.item_code and d.warehouse:
|
if d.item_code and d.warehouse:
|
||||||
@@ -398,7 +431,7 @@ class SalesInvoice(SellingController):
|
|||||||
def update_packing_list(self):
|
def update_packing_list(self):
|
||||||
if cint(self.update_stock) == 1:
|
if cint(self.update_stock) == 1:
|
||||||
from erpnext.stock.doctype.packed_item.packed_item import make_packing_list
|
from erpnext.stock.doctype.packed_item.packed_item import make_packing_list
|
||||||
make_packing_list(self, 'items')
|
make_packing_list(self)
|
||||||
else:
|
else:
|
||||||
self.set('packed_items', [])
|
self.set('packed_items', [])
|
||||||
|
|
||||||
@@ -410,7 +443,7 @@ class SalesInvoice(SellingController):
|
|||||||
|
|
||||||
if not warehouse:
|
if not warehouse:
|
||||||
global_pos_profile = frappe.db.sql("""select name, warehouse from `tabPOS Profile`
|
global_pos_profile = frappe.db.sql("""select name, warehouse from `tabPOS Profile`
|
||||||
where ifnull(user,'') = '' and company = %s""", self.company)
|
where (user is null or user = '') and company = %s""", self.company)
|
||||||
|
|
||||||
if global_pos_profile:
|
if global_pos_profile:
|
||||||
warehouse = global_pos_profile[0][1]
|
warehouse = global_pos_profile[0][1]
|
||||||
@@ -424,7 +457,7 @@ class SalesInvoice(SellingController):
|
|||||||
if flt(self.paid_amount) == 0:
|
if flt(self.paid_amount) == 0:
|
||||||
if self.cash_bank_account:
|
if self.cash_bank_account:
|
||||||
frappe.db.set(self, 'paid_amount',
|
frappe.db.set(self, 'paid_amount',
|
||||||
(flt(self.base_grand_total) - flt(self.write_off_amount)))
|
flt(flt(self.grand_total) - flt(self.write_off_amount), self.precision("paid_amount")))
|
||||||
else:
|
else:
|
||||||
# show message that the amount is not paid
|
# show message that the amount is not paid
|
||||||
frappe.db.set(self,'paid_amount',0)
|
frappe.db.set(self,'paid_amount',0)
|
||||||
@@ -432,6 +465,9 @@ class SalesInvoice(SellingController):
|
|||||||
else:
|
else:
|
||||||
frappe.db.set(self,'paid_amount',0)
|
frappe.db.set(self,'paid_amount',0)
|
||||||
|
|
||||||
|
frappe.db.set(self, 'base_paid_amount',
|
||||||
|
flt(self.paid_amount*self.conversion_rate, self.precision("base_paid_amount")))
|
||||||
|
|
||||||
def check_prev_docstatus(self):
|
def check_prev_docstatus(self):
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
if d.sales_order and frappe.db.get_value("Sales Order", d.sales_order, "docstatus") != 1:
|
if d.sales_order and frappe.db.get_value("Sales Order", d.sales_order, "docstatus") != 1:
|
||||||
@@ -487,7 +523,7 @@ class SalesInvoice(SellingController):
|
|||||||
return gl_entries
|
return gl_entries
|
||||||
|
|
||||||
def make_customer_gl_entry(self, gl_entries):
|
def make_customer_gl_entry(self, gl_entries):
|
||||||
if self.base_grand_total:
|
if self.grand_total:
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": self.debit_to,
|
"account": self.debit_to,
|
||||||
@@ -495,37 +531,42 @@ class SalesInvoice(SellingController):
|
|||||||
"party": self.customer,
|
"party": self.customer,
|
||||||
"against": self.against_income_account,
|
"against": self.against_income_account,
|
||||||
"debit": self.base_grand_total,
|
"debit": self.base_grand_total,
|
||||||
"remarks": self.remarks,
|
"debit_in_account_currency": self.base_grand_total \
|
||||||
|
if self.party_account_currency==self.company_currency else self.grand_total,
|
||||||
"against_voucher": self.return_against if cint(self.is_return) else self.name,
|
"against_voucher": self.return_against if cint(self.is_return) else self.name,
|
||||||
"against_voucher_type": self.doctype
|
"against_voucher_type": self.doctype
|
||||||
})
|
}, self.party_account_currency)
|
||||||
)
|
)
|
||||||
|
|
||||||
def make_tax_gl_entries(self, gl_entries):
|
def make_tax_gl_entries(self, gl_entries):
|
||||||
for tax in self.get("taxes"):
|
for tax in self.get("taxes"):
|
||||||
if flt(tax.base_tax_amount_after_discount_amount):
|
if flt(tax.base_tax_amount_after_discount_amount):
|
||||||
|
account_currency = get_account_currency(tax.account_head)
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": tax.account_head,
|
"account": tax.account_head,
|
||||||
"against": self.customer,
|
"against": self.customer,
|
||||||
"credit": flt(tax.base_tax_amount_after_discount_amount),
|
"credit": flt(tax.base_tax_amount_after_discount_amount),
|
||||||
"remarks": self.remarks,
|
"credit_in_account_currency": flt(tax.base_tax_amount_after_discount_amount) \
|
||||||
|
if account_currency==self.company_currency else flt(tax.tax_amount_after_discount_amount),
|
||||||
"cost_center": tax.cost_center
|
"cost_center": tax.cost_center
|
||||||
})
|
}, account_currency)
|
||||||
)
|
)
|
||||||
|
|
||||||
def make_item_gl_entries(self, gl_entries):
|
def make_item_gl_entries(self, gl_entries):
|
||||||
# income account gl entries
|
# income account gl entries
|
||||||
for item in self.get("items"):
|
for item in self.get("items"):
|
||||||
if flt(item.base_net_amount):
|
if flt(item.base_net_amount):
|
||||||
|
account_currency = get_account_currency(item.income_account)
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": item.income_account,
|
"account": item.income_account,
|
||||||
"against": self.customer,
|
"against": self.customer,
|
||||||
"credit": item.base_net_amount,
|
"credit": item.base_net_amount,
|
||||||
"remarks": self.remarks,
|
"credit_in_account_currency": item.base_net_amount \
|
||||||
|
if account_currency==self.company_currency else item.net_amount,
|
||||||
"cost_center": item.cost_center
|
"cost_center": item.cost_center
|
||||||
})
|
}, account_currency)
|
||||||
)
|
)
|
||||||
|
|
||||||
# expense account gl entries
|
# expense account gl entries
|
||||||
@@ -535,6 +576,7 @@ class SalesInvoice(SellingController):
|
|||||||
|
|
||||||
def make_pos_gl_entries(self, gl_entries):
|
def make_pos_gl_entries(self, gl_entries):
|
||||||
if cint(self.is_pos) and self.cash_bank_account and self.paid_amount:
|
if cint(self.is_pos) and self.cash_bank_account and self.paid_amount:
|
||||||
|
bank_account_currency = get_account_currency(self.cash_bank_account)
|
||||||
# POS, make payment entries
|
# POS, make payment entries
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
@@ -542,44 +584,50 @@ class SalesInvoice(SellingController):
|
|||||||
"party_type": "Customer",
|
"party_type": "Customer",
|
||||||
"party": self.customer,
|
"party": self.customer,
|
||||||
"against": self.cash_bank_account,
|
"against": self.cash_bank_account,
|
||||||
"credit": self.paid_amount,
|
"credit": self.base_paid_amount,
|
||||||
"remarks": self.remarks,
|
"credit_in_account_currency": self.base_paid_amount \
|
||||||
|
if self.party_account_currency==self.company_currency else self.paid_amount,
|
||||||
"against_voucher": self.return_against if cint(self.is_return) else self.name,
|
"against_voucher": self.return_against if cint(self.is_return) else self.name,
|
||||||
"against_voucher_type": self.doctype,
|
"against_voucher_type": self.doctype,
|
||||||
})
|
}, self.party_account_currency)
|
||||||
)
|
)
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": self.cash_bank_account,
|
"account": self.cash_bank_account,
|
||||||
"against": self.customer,
|
"against": self.customer,
|
||||||
"debit": self.paid_amount,
|
"debit": self.base_paid_amount,
|
||||||
"remarks": self.remarks,
|
"debit_in_account_currency": self.base_paid_amount \
|
||||||
})
|
if bank_account_currency==self.company_currency else self.paid_amount
|
||||||
|
}, bank_account_currency)
|
||||||
)
|
)
|
||||||
|
|
||||||
def make_write_off_gl_entry(self, gl_entries):
|
def make_write_off_gl_entry(self, gl_entries):
|
||||||
# write off entries, applicable if only pos
|
# write off entries, applicable if only pos
|
||||||
if self.write_off_account and self.write_off_amount:
|
if self.write_off_account and self.write_off_amount:
|
||||||
|
write_off_account_currency = get_account_currency(self.write_off_account)
|
||||||
|
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": self.debit_to,
|
"account": self.debit_to,
|
||||||
"party_type": "Customer",
|
"party_type": "Customer",
|
||||||
"party": self.customer,
|
"party": self.customer,
|
||||||
"against": self.write_off_account,
|
"against": self.write_off_account,
|
||||||
"credit": self.write_off_amount,
|
"credit": self.base_write_off_amount,
|
||||||
"remarks": self.remarks,
|
"credit_in_account_currency": self.base_write_off_amount \
|
||||||
|
if self.party_account_currency==self.company_currency else self.write_off_amount,
|
||||||
"against_voucher": self.return_against if cint(self.is_return) else self.name,
|
"against_voucher": self.return_against if cint(self.is_return) else self.name,
|
||||||
"against_voucher_type": self.doctype,
|
"against_voucher_type": self.doctype
|
||||||
})
|
}, self.party_account_currency)
|
||||||
)
|
)
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": self.write_off_account,
|
"account": self.write_off_account,
|
||||||
"against": self.customer,
|
"against": self.customer,
|
||||||
"debit": self.write_off_amount,
|
"debit": self.base_write_off_amount,
|
||||||
"remarks": self.remarks,
|
"debit_in_account_currency": self.base_write_off_amount \
|
||||||
|
if write_off_account_currency==self.company_currency else self.write_off_amount,
|
||||||
"cost_center": self.write_off_cost_center
|
"cost_center": self.write_off_cost_center
|
||||||
})
|
}, write_off_account_currency)
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_list_context(context=None):
|
def get_list_context(context=None):
|
||||||
@@ -598,24 +646,6 @@ def get_bank_cash_account(mode_of_payment, company):
|
|||||||
"account": account
|
"account": account
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
|
||||||
def get_income_account(doctype, txt, searchfield, start, page_len, filters):
|
|
||||||
from erpnext.controllers.queries import get_match_cond
|
|
||||||
|
|
||||||
# income account can be any Credit account,
|
|
||||||
# but can also be a Asset account with account_type='Income Account' in special circumstances.
|
|
||||||
# Hence the first condition is an "OR"
|
|
||||||
return frappe.db.sql("""select tabAccount.name from `tabAccount`
|
|
||||||
where (tabAccount.report_type = "Profit and Loss"
|
|
||||||
or tabAccount.account_type in ("Income Account", "Temporary"))
|
|
||||||
and tabAccount.is_group=0
|
|
||||||
and tabAccount.docstatus!=2
|
|
||||||
and tabAccount.company = '%(company)s'
|
|
||||||
and tabAccount.%(key)s LIKE '%(txt)s'
|
|
||||||
%(mcond)s""" % {'company': filters['company'], 'key': searchfield,
|
|
||||||
'txt': "%%%s%%" % frappe.db.escape(txt), 'mcond':get_match_cond(doctype)})
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def make_delivery_note(source_name, target_doc=None):
|
def make_delivery_note(source_name, target_doc=None):
|
||||||
def set_missing_values(source, target):
|
def set_missing_values(source, target):
|
||||||
@@ -646,7 +676,8 @@ def make_delivery_note(source_name, target_doc=None):
|
|||||||
"sales_order": "against_sales_order",
|
"sales_order": "against_sales_order",
|
||||||
"so_detail": "so_detail"
|
"so_detail": "so_detail"
|
||||||
},
|
},
|
||||||
"postprocess": update_item
|
"postprocess": update_item,
|
||||||
|
"condition": lambda doc: doc.delivered_by_supplier!=1
|
||||||
},
|
},
|
||||||
"Sales Taxes and Charges": {
|
"Sales Taxes and Charges": {
|
||||||
"doctype": "Sales Taxes and Charges",
|
"doctype": "Sales Taxes and Charges",
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ import unittest, copy
|
|||||||
from frappe.utils import nowdate, add_days, flt
|
from frappe.utils import nowdate, add_days, flt
|
||||||
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry, get_qty_after_transaction
|
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry, get_qty_after_transaction
|
||||||
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory
|
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory
|
||||||
|
from erpnext.exceptions import InvalidAccountCurrency, InvalidCurrency
|
||||||
|
from erpnext.stock.doctype.serial_no.serial_no import SerialNoWarehouseError
|
||||||
|
from frappe.model.naming import make_autoname
|
||||||
|
|
||||||
class TestSalesInvoice(unittest.TestCase):
|
class TestSalesInvoice(unittest.TestCase):
|
||||||
def make(self):
|
def make(self):
|
||||||
@@ -401,7 +404,7 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
jv.cancel()
|
jv.cancel()
|
||||||
self.assertEquals(frappe.db.get_value("Sales Invoice", w.name, "outstanding_amount"), 561.8)
|
self.assertEquals(frappe.db.get_value("Sales Invoice", w.name, "outstanding_amount"), 561.8)
|
||||||
|
|
||||||
def test_sales_invoice_gl_entry_without_aii(self):
|
def test_sales_invoice_gl_entry_without_perpetual_inventory(self):
|
||||||
set_perpetual_inventory(0)
|
set_perpetual_inventory(0)
|
||||||
si = frappe.copy_doc(test_records[1])
|
si = frappe.copy_doc(test_records[1])
|
||||||
si.insert()
|
si.insert()
|
||||||
@@ -433,7 +436,7 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
|
|
||||||
self.assertFalse(gle)
|
self.assertFalse(gle)
|
||||||
|
|
||||||
def test_pos_gl_entry_with_aii(self):
|
def test_pos_gl_entry_with_perpetual_inventory(self):
|
||||||
set_perpetual_inventory()
|
set_perpetual_inventory()
|
||||||
self.make_pos_profile()
|
self.make_pos_profile()
|
||||||
|
|
||||||
@@ -442,8 +445,7 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
pos = copy.deepcopy(test_records[1])
|
pos = copy.deepcopy(test_records[1])
|
||||||
pos["is_pos"] = 1
|
pos["is_pos"] = 1
|
||||||
pos["update_stock"] = 1
|
pos["update_stock"] = 1
|
||||||
# pos["posting_time"] = "12:05"
|
pos["cash_bank_account"] = "_Test Bank - _TC"
|
||||||
pos["cash_bank_account"] = "_Test Account Bank Account - _TC"
|
|
||||||
pos["paid_amount"] = 600.0
|
pos["paid_amount"] = 600.0
|
||||||
|
|
||||||
si = frappe.copy_doc(pos)
|
si = frappe.copy_doc(pos)
|
||||||
@@ -474,7 +476,7 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
[stock_in_hand, 0.0, abs(sle.stock_value_difference)],
|
[stock_in_hand, 0.0, abs(sle.stock_value_difference)],
|
||||||
[pos["items"][0]["expense_account"], abs(sle.stock_value_difference), 0.0],
|
[pos["items"][0]["expense_account"], abs(sle.stock_value_difference), 0.0],
|
||||||
[si.debit_to, 0.0, 600.0],
|
[si.debit_to, 0.0, 600.0],
|
||||||
["_Test Account Bank Account - _TC", 600.0, 0.0]
|
["_Test Bank - _TC", 600.0, 0.0]
|
||||||
])
|
])
|
||||||
|
|
||||||
for i, gle in enumerate(sorted(gl_entries, key=lambda gle: gle.account)):
|
for i, gle in enumerate(sorted(gl_entries, key=lambda gle: gle.account)):
|
||||||
@@ -494,7 +496,7 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
|
|
||||||
def make_pos_profile(self):
|
def make_pos_profile(self):
|
||||||
pos_profile = frappe.get_doc({
|
pos_profile = frappe.get_doc({
|
||||||
"cash_bank_account": "_Test Account Bank Account - _TC",
|
"cash_bank_account": "_Test Bank - _TC",
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"cost_center": "_Test Cost Center - _TC",
|
"cost_center": "_Test Cost Center - _TC",
|
||||||
"currency": "INR",
|
"currency": "INR",
|
||||||
@@ -513,7 +515,7 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
if not frappe.db.exists("POS Profile", "_Test POS Profile"):
|
if not frappe.db.exists("POS Profile", "_Test POS Profile"):
|
||||||
pos_profile.insert()
|
pos_profile.insert()
|
||||||
|
|
||||||
def test_si_gl_entry_with_aii_and_update_stock_with_warehouse_but_no_account(self):
|
def test_si_gl_entry_with_perpetual_inventory_and_update_stock_with_warehouse_but_no_account(self):
|
||||||
set_perpetual_inventory()
|
set_perpetual_inventory()
|
||||||
frappe.delete_doc("Account", "_Test Warehouse No Account - _TC")
|
frappe.delete_doc("Account", "_Test Warehouse No Account - _TC")
|
||||||
|
|
||||||
@@ -567,7 +569,7 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
self.assertFalse(gle)
|
self.assertFalse(gle)
|
||||||
set_perpetual_inventory(0)
|
set_perpetual_inventory(0)
|
||||||
|
|
||||||
def test_sales_invoice_gl_entry_with_aii_no_item_code(self):
|
def test_sales_invoice_gl_entry_with_perpetual_inventory_no_item_code(self):
|
||||||
set_perpetual_inventory()
|
set_perpetual_inventory()
|
||||||
|
|
||||||
si = frappe.get_doc(test_records[1])
|
si = frappe.get_doc(test_records[1])
|
||||||
@@ -593,7 +595,7 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
|
|
||||||
set_perpetual_inventory(0)
|
set_perpetual_inventory(0)
|
||||||
|
|
||||||
def test_sales_invoice_gl_entry_with_aii_non_stock_item(self):
|
def test_sales_invoice_gl_entry_with_perpetual_inventory_non_stock_item(self):
|
||||||
set_perpetual_inventory()
|
set_perpetual_inventory()
|
||||||
si = frappe.get_doc(test_records[1])
|
si = frappe.get_doc(test_records[1])
|
||||||
si.get("items")[0].item_code = "_Test Non Stock Item"
|
si.get("items")[0].item_code = "_Test Non Stock Item"
|
||||||
@@ -660,7 +662,7 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
where reference_name=%s""", si.name))
|
where reference_name=%s""", si.name))
|
||||||
|
|
||||||
self.assertTrue(frappe.db.sql("""select name from `tabJournal Entry Account`
|
self.assertTrue(frappe.db.sql("""select name from `tabJournal Entry Account`
|
||||||
where reference_name=%s and credit=300""", si.name))
|
where reference_name=%s and credit_in_account_currency=300""", si.name))
|
||||||
|
|
||||||
self.assertEqual(si.outstanding_amount, 261.8)
|
self.assertEqual(si.outstanding_amount, 261.8)
|
||||||
|
|
||||||
@@ -688,7 +690,6 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
si.insert()
|
si.insert()
|
||||||
si.submit()
|
si.submit()
|
||||||
|
|
||||||
self.assertEquals(frappe.db.get_value("Serial No", serial_nos[0], "status"), "Delivered")
|
|
||||||
self.assertFalse(frappe.db.get_value("Serial No", serial_nos[0], "warehouse"))
|
self.assertFalse(frappe.db.get_value("Serial No", serial_nos[0], "warehouse"))
|
||||||
self.assertEquals(frappe.db.get_value("Serial No", serial_nos[0],
|
self.assertEquals(frappe.db.get_value("Serial No", serial_nos[0],
|
||||||
"delivery_document_no"), si.name)
|
"delivery_document_no"), si.name)
|
||||||
@@ -702,33 +703,26 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
|
|
||||||
serial_nos = get_serial_nos(si.get("items")[0].serial_no)
|
serial_nos = get_serial_nos(si.get("items")[0].serial_no)
|
||||||
|
|
||||||
self.assertEquals(frappe.db.get_value("Serial No", serial_nos[0], "status"), "Available")
|
|
||||||
self.assertEquals(frappe.db.get_value("Serial No", serial_nos[0], "warehouse"), "_Test Warehouse - _TC")
|
self.assertEquals(frappe.db.get_value("Serial No", serial_nos[0], "warehouse"), "_Test Warehouse - _TC")
|
||||||
self.assertFalse(frappe.db.get_value("Serial No", serial_nos[0],
|
self.assertFalse(frappe.db.get_value("Serial No", serial_nos[0],
|
||||||
"delivery_document_no"))
|
"delivery_document_no"))
|
||||||
|
|
||||||
def test_serialize_status(self):
|
def test_serialize_status(self):
|
||||||
from erpnext.stock.doctype.serial_no.serial_no import SerialNoStatusError, get_serial_nos, SerialNoDuplicateError
|
serial_no = frappe.get_doc({
|
||||||
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_serialized_item
|
"doctype": "Serial No",
|
||||||
|
"item_code": "_Test Serialized Item With Series",
|
||||||
se = make_serialized_item()
|
"serial_no": make_autoname("SR", "Serial No")
|
||||||
serial_nos = get_serial_nos(se.get("items")[0].serial_no)
|
})
|
||||||
|
serial_no.save()
|
||||||
sr = frappe.get_doc("Serial No", serial_nos[0])
|
|
||||||
sr.status = "Not Available"
|
|
||||||
sr.save()
|
|
||||||
|
|
||||||
si = frappe.copy_doc(test_records[0])
|
si = frappe.copy_doc(test_records[0])
|
||||||
si.update_stock = 1
|
si.update_stock = 1
|
||||||
si.get("items")[0].item_code = "_Test Serialized Item With Series"
|
si.get("items")[0].item_code = "_Test Serialized Item With Series"
|
||||||
si.get("items")[0].qty = 1
|
si.get("items")[0].qty = 1
|
||||||
si.get("items")[0].serial_no = serial_nos[0]
|
si.get("items")[0].serial_no = serial_no.name
|
||||||
si.insert()
|
si.insert()
|
||||||
|
|
||||||
self.assertRaises(SerialNoStatusError, si.submit)
|
self.assertRaises(SerialNoWarehouseError, si.submit)
|
||||||
|
|
||||||
# hack! because stock ledger entires are already inserted and are not rolled back!
|
|
||||||
self.assertRaises(SerialNoDuplicateError, si.cancel)
|
|
||||||
|
|
||||||
def test_invoice_due_date_against_customers_credit_days(self):
|
def test_invoice_due_date_against_customers_credit_days(self):
|
||||||
# set customer's credit days
|
# set customer's credit days
|
||||||
@@ -842,6 +836,79 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
self.assertEquals(si.base_grand_total, 859.44)
|
self.assertEquals(si.base_grand_total, 859.44)
|
||||||
self.assertEquals(si.grand_total, 859.44)
|
self.assertEquals(si.grand_total, 859.44)
|
||||||
|
|
||||||
|
def test_multi_currency_gle(self):
|
||||||
|
set_perpetual_inventory(0)
|
||||||
|
si = create_sales_invoice(customer="_Test Customer USD", debit_to="_Test Receivable USD - _TC",
|
||||||
|
currency="USD", conversion_rate=50)
|
||||||
|
|
||||||
|
gl_entries = frappe.db.sql("""select account, account_currency, debit, credit,
|
||||||
|
debit_in_account_currency, credit_in_account_currency
|
||||||
|
from `tabGL Entry` where voucher_type='Sales Invoice' and voucher_no=%s
|
||||||
|
order by account asc""", si.name, as_dict=1)
|
||||||
|
|
||||||
|
self.assertTrue(gl_entries)
|
||||||
|
|
||||||
|
expected_values = {
|
||||||
|
"_Test Receivable USD - _TC": {
|
||||||
|
"account_currency": "USD",
|
||||||
|
"debit": 5000,
|
||||||
|
"debit_in_account_currency": 100,
|
||||||
|
"credit": 0,
|
||||||
|
"credit_in_account_currency": 0
|
||||||
|
},
|
||||||
|
"Sales - _TC": {
|
||||||
|
"account_currency": "INR",
|
||||||
|
"debit": 0,
|
||||||
|
"debit_in_account_currency": 0,
|
||||||
|
"credit": 5000,
|
||||||
|
"credit_in_account_currency": 5000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for field in ("account_currency", "debit", "debit_in_account_currency", "credit", "credit_in_account_currency"):
|
||||||
|
for i, gle in enumerate(gl_entries):
|
||||||
|
self.assertEquals(expected_values[gle.account][field], gle[field])
|
||||||
|
|
||||||
|
# cancel
|
||||||
|
si.cancel()
|
||||||
|
|
||||||
|
gle = frappe.db.sql("""select name from `tabGL Entry`
|
||||||
|
where voucher_type='Sales Invoice' and voucher_no=%s""", si.name)
|
||||||
|
|
||||||
|
self.assertFalse(gle)
|
||||||
|
|
||||||
|
def test_invalid_currency(self):
|
||||||
|
# Customer currency = USD
|
||||||
|
|
||||||
|
# Transaction currency cannot be INR
|
||||||
|
si1 = create_sales_invoice(customer="_Test Customer USD", debit_to="_Test Receivable USD - _TC",
|
||||||
|
do_not_save=True)
|
||||||
|
|
||||||
|
self.assertRaises(InvalidCurrency, si1.save)
|
||||||
|
|
||||||
|
# Transaction currency cannot be EUR
|
||||||
|
si2 = create_sales_invoice(customer="_Test Customer USD", debit_to="_Test Receivable USD - _TC",
|
||||||
|
currency="EUR", conversion_rate=80, do_not_save=True)
|
||||||
|
|
||||||
|
self.assertRaises(InvalidCurrency, si2.save)
|
||||||
|
|
||||||
|
# Transaction currency only allowed in USD
|
||||||
|
si3 = create_sales_invoice(customer="_Test Customer USD", debit_to="_Test Receivable USD - _TC",
|
||||||
|
currency="USD", conversion_rate=50)
|
||||||
|
|
||||||
|
# Party Account currency must be in USD, as there is existing GLE with USD
|
||||||
|
si4 = create_sales_invoice(customer="_Test Customer USD", debit_to="_Test Receivable - _TC",
|
||||||
|
currency="USD", conversion_rate=50, do_not_submit=True)
|
||||||
|
|
||||||
|
self.assertRaises(InvalidAccountCurrency, si4.submit)
|
||||||
|
|
||||||
|
# Party Account currency must be in USD, force customer currency as there is no GLE
|
||||||
|
|
||||||
|
si3.cancel()
|
||||||
|
si5 = create_sales_invoice(customer="_Test Customer USD", debit_to="_Test Receivable - _TC",
|
||||||
|
currency="USD", conversion_rate=50, do_not_submit=True)
|
||||||
|
|
||||||
|
self.assertRaises(InvalidAccountCurrency, si5.submit)
|
||||||
|
|
||||||
def create_sales_invoice(**args):
|
def create_sales_invoice(**args):
|
||||||
si = frappe.new_doc("Sales Invoice")
|
si = frappe.new_doc("Sales Invoice")
|
||||||
@@ -856,14 +923,15 @@ def create_sales_invoice(**args):
|
|||||||
si.is_pos = args.is_pos
|
si.is_pos = args.is_pos
|
||||||
si.is_return = args.is_return
|
si.is_return = args.is_return
|
||||||
si.return_against = args.return_against
|
si.return_against = args.return_against
|
||||||
si.currency="INR"
|
si.currency=args.currency or "INR"
|
||||||
si.conversion_rate = 1
|
si.conversion_rate = args.conversion_rate or 1
|
||||||
|
|
||||||
si.append("items", {
|
si.append("items", {
|
||||||
"item_code": args.item or args.item_code or "_Test Item",
|
"item_code": args.item or args.item_code or "_Test Item",
|
||||||
"warehouse": args.warehouse or "_Test Warehouse - _TC",
|
"warehouse": args.warehouse or "_Test Warehouse - _TC",
|
||||||
"qty": args.qty or 1,
|
"qty": args.qty or 1,
|
||||||
"rate": args.rate or 100,
|
"rate": args.rate or 100,
|
||||||
|
"income_account": "Sales - _TC",
|
||||||
"expense_account": "Cost of Goods Sold - _TC",
|
"expense_account": "Cost of Goods Sold - _TC",
|
||||||
"cost_center": "_Test Cost Center - _TC",
|
"cost_center": "_Test Cost Center - _TC",
|
||||||
"serial_no": args.serial_no
|
"serial_no": args.serial_no
|
||||||
|
|||||||
@@ -1,41 +1,77 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"creation": "2013-02-22 01:27:41",
|
"creation": "2013-02-22 01:27:41",
|
||||||
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "journal_entry",
|
"fieldname": "journal_entry",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Journal Entry",
|
"label": "Journal Entry",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "journal_voucher",
|
"oldfieldname": "journal_voucher",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Journal Entry",
|
"options": "Journal Entry",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "250px",
|
"print_width": "250px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "250px"
|
"width": "250px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "remarks",
|
"fieldname": "remarks",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Remarks",
|
"label": "Remarks",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "remarks",
|
"oldfieldname": "remarks",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "150px",
|
"print_width": "150px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "150px"
|
"width": "150px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "jv_detail_no",
|
"fieldname": "jv_detail_no",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Journal Entry Detail No",
|
"label": "Journal Entry Detail No",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "jv_detail_no",
|
"oldfieldname": "jv_detail_no",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -43,47 +79,104 @@
|
|||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_width": "120px",
|
"print_width": "120px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "120px"
|
"width": "120px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"permlevel": 0
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "advance_amount",
|
"fieldname": "advance_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Advance amount",
|
"label": "Advance amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "advance_amount",
|
"oldfieldname": "advance_amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "party_account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "120px",
|
"print_width": "120px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "120px"
|
"width": "120px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "allocated_amount",
|
"fieldname": "allocated_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Allocated amount",
|
"label": "Allocated amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "allocated_amount",
|
"oldfieldname": "allocated_amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "Company:company:default_currency",
|
"options": "party_account_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"print_width": "120px",
|
"print_width": "120px",
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0,
|
||||||
"width": "120px"
|
"width": "120px"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-12-25 16:30:19.446500",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:56.263776",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice Advance",
|
"name": "Sales Invoice Advance",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": []
|
"permissions": [],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "barcode",
|
"fieldname": "barcode",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -17,6 +19,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Barcode",
|
"label": "Barcode",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
@@ -29,6 +32,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "item_code",
|
"fieldname": "item_code",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -36,6 +41,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Item",
|
"label": "Item",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "item_code",
|
"oldfieldname": "item_code",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -51,6 +57,29 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "col_break1",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "item_name",
|
"fieldname": "item_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -58,6 +87,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Item Name",
|
"label": "Item Name",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "item_name",
|
"oldfieldname": "item_name",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -72,24 +102,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"fieldname": "col_break1",
|
"bold": 0,
|
||||||
"fieldtype": "Column Break",
|
"collapsible": 0,
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"fieldname": "customer_item_code",
|
"fieldname": "customer_item_code",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -97,6 +111,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Customer's Item Code",
|
"label": "Customer's Item Code",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
@@ -109,6 +124,31 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 1,
|
||||||
|
"fieldname": "section_break_6",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Edit Description",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
"fieldtype": "Text Editor",
|
"fieldtype": "Text Editor",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -116,6 +156,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "description",
|
"oldfieldname": "description",
|
||||||
"oldfieldtype": "Text",
|
"oldfieldtype": "Text",
|
||||||
@@ -132,13 +173,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"fieldname": "image",
|
"bold": 0,
|
||||||
"fieldtype": "Attach",
|
"collapsible": 0,
|
||||||
"hidden": 1,
|
"fieldname": "column_break_8",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Image",
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -152,6 +195,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "image_view",
|
"fieldname": "image_view",
|
||||||
"fieldtype": "Image",
|
"fieldtype": "Image",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -159,6 +204,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Image View",
|
"label": "Image View",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "image",
|
"options": "image",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -173,13 +219,39 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "image",
|
||||||
|
"fieldtype": "Attach",
|
||||||
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Image",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "quantity_and_rate",
|
"fieldname": "quantity_and_rate",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Quantity and Rate",
|
"label": "",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -192,6 +264,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "qty",
|
"fieldname": "qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -199,6 +273,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Quantity",
|
"label": "Quantity",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "qty",
|
"oldfieldname": "qty",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -213,6 +288,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "price_list_rate",
|
"fieldname": "price_list_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -220,6 +297,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Price List Rate",
|
"label": "Price List Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "ref_rate",
|
"oldfieldname": "ref_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -235,6 +313,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "price_list_rate",
|
"depends_on": "price_list_rate",
|
||||||
"fieldname": "discount_percentage",
|
"fieldname": "discount_percentage",
|
||||||
"fieldtype": "Percent",
|
"fieldtype": "Percent",
|
||||||
@@ -243,6 +323,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Discount on Price List Rate (%)",
|
"label": "Discount on Price List Rate (%)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "adj_rate",
|
"oldfieldname": "adj_rate",
|
||||||
"oldfieldtype": "Float",
|
"oldfieldtype": "Float",
|
||||||
@@ -257,12 +338,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break2",
|
"fieldname": "col_break2",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -275,6 +359,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "stock_uom",
|
"fieldname": "stock_uom",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -282,6 +368,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "UOM",
|
"label": "UOM",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "UOM",
|
"options": "UOM",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -295,6 +382,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_price_list_rate",
|
"fieldname": "base_price_list_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -302,6 +391,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Price List Rate (Company Currency)",
|
"label": "Price List Rate (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "base_ref_rate",
|
"oldfieldname": "base_ref_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -317,12 +407,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break1",
|
"fieldname": "section_break1",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -335,6 +428,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "rate",
|
"fieldname": "rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -342,6 +437,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Rate",
|
"label": "Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "export_rate",
|
"oldfieldname": "export_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -357,6 +453,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -364,6 +462,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "export_amount",
|
"oldfieldname": "export_amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -379,12 +478,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break3",
|
"fieldname": "col_break3",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -397,6 +499,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_rate",
|
"fieldname": "base_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -404,6 +508,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Rate (Company Currency)",
|
"label": "Rate (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "basic_rate",
|
"oldfieldname": "basic_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -419,6 +524,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_amount",
|
"fieldname": "base_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -426,6 +533,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Amount (Company Currency)",
|
"label": "Amount (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "amount",
|
"oldfieldname": "amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -441,6 +549,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "pricing_rule",
|
"fieldname": "pricing_rule",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -448,6 +558,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Pricing Rule",
|
"label": "Pricing Rule",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Pricing Rule",
|
"options": "Pricing Rule",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -461,12 +572,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_21",
|
"fieldname": "section_break_21",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -480,6 +594,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "net_rate",
|
"fieldname": "net_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -487,6 +603,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Net Rate",
|
"label": "Net Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -501,6 +618,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "net_amount",
|
"fieldname": "net_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -508,6 +627,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Net Amount",
|
"label": "Net Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -522,12 +642,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_24",
|
"fieldname": "column_break_24",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -541,6 +664,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_net_rate",
|
"fieldname": "base_net_rate",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -548,6 +673,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Net Rate (Company Currency)",
|
"label": "Net Rate (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -562,6 +688,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_net_amount",
|
"fieldname": "base_net_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -569,6 +697,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Net Amount (Company Currency)",
|
"label": "Net Amount (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -583,13 +712,63 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 1,
|
||||||
|
"collapsible_depends_on": "eval:doc.delivered_by_supplier==1",
|
||||||
|
"fieldname": "drop_ship",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Drop Ship",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "delivered_by_supplier",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Delivered By Supplier",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 1,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 1,
|
||||||
"fieldname": "accounting",
|
"fieldname": "accounting",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Accounting",
|
"label": "Accounting Details",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -602,6 +781,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "income_account",
|
"fieldname": "income_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -609,6 +790,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Income Account",
|
"label": "Income Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "income_account",
|
"oldfieldname": "income_account",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -626,6 +808,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "expense_account",
|
"fieldname": "expense_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -633,6 +817,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Expense Account",
|
"label": "Expense Account",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -647,12 +832,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break4",
|
"fieldname": "col_break4",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -665,6 +853,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": ":Company",
|
"default": ":Company",
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -673,6 +863,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "cost_center",
|
"oldfieldname": "cost_center",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -690,13 +881,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 1,
|
||||||
|
"collapsible_depends_on": "eval:doc.serial_no || doc.batch_no",
|
||||||
"fieldname": "warehouse_and_reference",
|
"fieldname": "warehouse_and_reference",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Warehouse and Reference",
|
"label": "Stock Details",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -709,6 +904,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "warehouse",
|
"fieldname": "warehouse",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -716,6 +913,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Warehouse",
|
"label": "Warehouse",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "warehouse",
|
"oldfieldname": "warehouse",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -731,6 +929,32 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "target_warehouse",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Target Warehouse",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Warehouse",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "serial_no",
|
"fieldname": "serial_no",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -738,6 +962,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Serial No",
|
"label": "Serial No",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "serial_no",
|
"oldfieldname": "serial_no",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
@@ -752,6 +977,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "batch_no",
|
"fieldname": "batch_no",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -759,6 +986,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Batch No",
|
"label": "Batch No",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Batch",
|
"options": "Batch",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -772,6 +1000,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "",
|
"description": "",
|
||||||
"fieldname": "item_group",
|
"fieldname": "item_group",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -780,6 +1010,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Item Group",
|
"label": "Item Group",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "item_group",
|
"oldfieldname": "item_group",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -795,6 +1026,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "brand",
|
"fieldname": "brand",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -802,6 +1035,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Brand Name",
|
"label": "Brand Name",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "brand",
|
"oldfieldname": "brand",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -816,6 +1050,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "item_tax_rate",
|
"fieldname": "item_tax_rate",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -823,6 +1059,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Item Tax Rate",
|
"label": "Item Tax Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "item_tax_rate",
|
"oldfieldname": "item_tax_rate",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
@@ -837,12 +1074,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break5",
|
"fieldname": "col_break5",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -855,6 +1095,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "actual_batch_qty",
|
"fieldname": "actual_batch_qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -862,6 +1104,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Available Batch Qty at Warehouse",
|
"label": "Available Batch Qty at Warehouse",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -877,6 +1120,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "actual_qty",
|
"fieldname": "actual_qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -884,6 +1129,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Available Qty at Warehouse",
|
"label": "Available Qty at Warehouse",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "actual_qty",
|
"oldfieldname": "actual_qty",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -898,6 +1144,31 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 1,
|
||||||
|
"fieldname": "edit_references",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "References",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "time_log_batch",
|
"fieldname": "time_log_batch",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -905,6 +1176,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Time Log Batch",
|
"label": "Time Log Batch",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Time Log Batch",
|
"options": "Time Log Batch",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -918,6 +1190,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "sales_order",
|
"fieldname": "sales_order",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -925,6 +1199,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Sales Order",
|
"label": "Sales Order",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "sales_order",
|
"oldfieldname": "sales_order",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -940,6 +1215,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "so_detail",
|
"fieldname": "so_detail",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -947,6 +1224,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Sales Order Item",
|
"label": "Sales Order Item",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "so_detail",
|
"oldfieldname": "so_detail",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -961,6 +1239,30 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "column_break_50",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "delivery_note",
|
"fieldname": "delivery_note",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -968,6 +1270,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Delivery Note",
|
"label": "Delivery Note",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "delivery_note",
|
"oldfieldname": "delivery_note",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -983,6 +1286,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "dn_detail",
|
"fieldname": "dn_detail",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -990,6 +1295,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Delivery Note Item",
|
"label": "Delivery Note Item",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "dn_detail",
|
"oldfieldname": "dn_detail",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -1004,6 +1310,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "delivered_qty",
|
"fieldname": "delivered_qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1011,6 +1319,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Delivered Qty",
|
"label": "Delivered Qty",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "delivered_qty",
|
"oldfieldname": "delivered_qty",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -1023,8 +1332,32 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "section_break_54",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "page_break",
|
"fieldname": "page_break",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1032,6 +1365,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Page Break",
|
"label": "Page Break",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
@@ -1051,7 +1385,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-08-19 12:45:54.989734",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:56.335017",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice Item",
|
"name": "Sales Invoice Item",
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "charge_type",
|
"fieldname": "charge_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -17,6 +19,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Type",
|
"label": "Type",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "charge_type",
|
"oldfieldname": "charge_type",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
@@ -32,6 +35,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
|
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
|
||||||
"fieldname": "row_id",
|
"fieldname": "row_id",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
@@ -40,6 +45,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Reference Row #",
|
"label": "Reference Row #",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "row_id",
|
"oldfieldname": "row_id",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -54,6 +60,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "account_head",
|
"fieldname": "account_head",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -61,6 +69,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Account Head",
|
"label": "Account Head",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "account_head",
|
"oldfieldname": "account_head",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -76,6 +85,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": ":Company",
|
"default": ":Company",
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@@ -84,6 +95,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "cost_center_other_charges",
|
"oldfieldname": "cost_center_other_charges",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -99,12 +111,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "col_break_1",
|
"fieldname": "col_break_1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -118,6 +133,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
"fieldtype": "Text Editor",
|
"fieldtype": "Text Editor",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -125,6 +142,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "description",
|
"oldfieldname": "description",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
@@ -141,6 +159,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
|
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
|
||||||
"fieldname": "included_in_print_rate",
|
"fieldname": "included_in_print_rate",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
@@ -149,6 +169,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Is this Tax included in Basic Rate?",
|
"label": "Is this Tax included in Basic Rate?",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
@@ -163,12 +184,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_8",
|
"fieldname": "section_break_8",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -182,6 +206,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "rate",
|
"fieldname": "rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -189,6 +215,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Rate",
|
"label": "Rate",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "rate",
|
"oldfieldname": "rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -203,12 +230,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_9",
|
"fieldname": "section_break_9",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -222,6 +252,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "tax_amount",
|
"fieldname": "tax_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -229,6 +261,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -243,6 +276,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "total",
|
"fieldname": "total",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -250,6 +285,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Total",
|
"label": "Total",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -264,6 +300,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "tax_amount_after_discount_amount",
|
"fieldname": "tax_amount_after_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -271,6 +309,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Tax Amount After Discount Amount",
|
"label": "Tax Amount After Discount Amount",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -285,12 +324,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_13",
|
"fieldname": "column_break_13",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@@ -304,6 +346,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_tax_amount",
|
"fieldname": "base_tax_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -311,6 +355,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Amount (Company Currency)",
|
"label": "Amount (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "tax_amount",
|
"oldfieldname": "tax_amount",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -326,6 +371,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "base_total",
|
"fieldname": "base_total",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -333,6 +380,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Total (Company Currency)",
|
"label": "Total (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "total",
|
"oldfieldname": "total",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@@ -348,6 +396,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"depends_on": "eval:parent.discount_amount",
|
"depends_on": "eval:parent.discount_amount",
|
||||||
"fieldname": "base_tax_amount_after_discount_amount",
|
"fieldname": "base_tax_amount_after_discount_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
@@ -356,6 +406,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Tax Amount After Discount Amount (Company Currency)",
|
"label": "Tax Amount After Discount Amount (Company Currency)",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -369,6 +420,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "item_wise_tax_detail",
|
"fieldname": "item_wise_tax_detail",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -376,6 +429,7 @@
|
|||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Item Wise Tax Detail",
|
"label": "Item Wise Tax Detail",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "item_wise_tax_detail",
|
"oldfieldname": "item_wise_tax_detail",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
@@ -390,6 +444,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "parenttype",
|
"fieldname": "parenttype",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -397,6 +453,7 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Parenttype",
|
"label": "Parenttype",
|
||||||
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "parenttype",
|
"oldfieldname": "parenttype",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -418,7 +475,8 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2015-08-19 12:46:33.165519",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:57.263576",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Taxes and Charges",
|
"name": "Sales Taxes and Charges",
|
||||||
|
|||||||
@@ -5,6 +5,3 @@ cur_frm.cscript.tax_table = "Sales Taxes and Charges";
|
|||||||
|
|
||||||
{% include "public/js/controllers/accounts.js" %}
|
{% include "public/js/controllers/accounts.js" %}
|
||||||
|
|
||||||
frappe.ui.form.on("Sales Taxes and Charges Template", "onload", function(frm) {
|
|
||||||
erpnext.add_applicable_territory();
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -1,86 +1,189 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:title",
|
"autoname": "field:title",
|
||||||
"creation": "2013-01-10 16:34:09",
|
"creation": "2013-01-10 16:34:09",
|
||||||
|
"custom": 0,
|
||||||
"description": "Standard tax template that can be applied to all Sales Transactions. This template can contain list of tax heads and also other expense / income heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.",
|
"description": "Standard tax template that can be applied to all Sales Transactions. This template can contain list of tax heads and also other expense / income heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Setup",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "title",
|
"fieldname": "title",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Title",
|
"label": "Title",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 1,
|
||||||
"oldfieldname": "title",
|
"oldfieldname": "title",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "is_default",
|
"fieldname": "is_default",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Default",
|
"label": "Default",
|
||||||
"permlevel": 0
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "disabled",
|
"fieldname": "disabled",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Disabled",
|
"label": "Disabled",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_3",
|
"fieldname": "column_break_3",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"permlevel": 0
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "company",
|
"oldfieldname": "company",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_5",
|
"fieldname": "section_break_5",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"permlevel": 0
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "* Will be calculated in the transaction.",
|
"description": "* Will be calculated in the transaction.",
|
||||||
"fieldname": "taxes",
|
"fieldname": "taxes",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Sales Taxes and Charges",
|
"label": "Sales Taxes and Charges",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"oldfieldname": "other_charges",
|
"oldfieldname": "other_charges",
|
||||||
"oldfieldtype": "Table",
|
"oldfieldtype": "Table",
|
||||||
"options": "Sales Taxes and Charges",
|
"options": "Sales Taxes and Charges",
|
||||||
"permlevel": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Specify a list of Territories, for which, this Taxes Master is valid",
|
|
||||||
"fieldname": "territories",
|
|
||||||
"fieldtype": "Table",
|
|
||||||
"label": "Valid for Territories",
|
|
||||||
"options": "Applicable Territory",
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-money",
|
"icon": "icon-money",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2015-05-06 08:51:54.662853",
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:57.346680",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Taxes and Charges Template",
|
"name": "Sales Taxes and Charges Template",
|
||||||
@@ -89,44 +192,64 @@
|
|||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 1,
|
"apply_user_permissions": 1,
|
||||||
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Sales User",
|
"role": "Sales User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Sales Master Manager",
|
"role": "Sales Master Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,6 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from erpnext.controllers.accounts_controller import validate_taxes_and_charges, validate_inclusive_tax
|
from erpnext.controllers.accounts_controller import validate_taxes_and_charges, validate_inclusive_tax
|
||||||
from frappe.utils.nestedset import get_root_of
|
|
||||||
|
|
||||||
class SalesTaxesandChargesTemplate(Document):
|
class SalesTaxesandChargesTemplate(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
@@ -17,13 +16,9 @@ def valdiate_taxes_and_charges_template(doc):
|
|||||||
|
|
||||||
if doc.is_default == 1:
|
if doc.is_default == 1:
|
||||||
frappe.db.sql("""update `tab{0}` set is_default = 0
|
frappe.db.sql("""update `tab{0}` set is_default = 0
|
||||||
where ifnull(is_default,0) = 1 and name != %s and company = %s""".format(doc.doctype),
|
where is_default = 1 and name != %s and company = %s""".format(doc.doctype),
|
||||||
(doc.name, doc.company))
|
(doc.name, doc.company))
|
||||||
|
|
||||||
if doc.meta.get_field("territories"):
|
|
||||||
if not doc.territories:
|
|
||||||
doc.append("territories", {"territory": get_root_of("Territory") })
|
|
||||||
|
|
||||||
for tax in doc.get("taxes"):
|
for tax in doc.get("taxes"):
|
||||||
validate_taxes_and_charges(tax)
|
validate_taxes_and_charges(tax)
|
||||||
validate_inclusive_tax(tax, doc)
|
validate_inclusive_tax(tax, doc)
|
||||||
|
|||||||
@@ -20,19 +20,7 @@
|
|||||||
"rate": 6.36
|
"rate": 6.36
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "_Test Sales Taxes and Charges Template",
|
"title": "_Test Sales Taxes and Charges Template"
|
||||||
"territories": [
|
|
||||||
{
|
|
||||||
"doctype": "Applicable Territory",
|
|
||||||
"parentfield": "territories",
|
|
||||||
"territory": "All Territories"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "Applicable Territory",
|
|
||||||
"parentfield": "territories",
|
|
||||||
"territory": "_Test Territory Rest Of The World"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
@@ -115,14 +103,7 @@
|
|||||||
"row_id": 7
|
"row_id": 7
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "_Test India Tax Master",
|
"title": "_Test India Tax Master"
|
||||||
"territories": [
|
|
||||||
{
|
|
||||||
"doctype": "Applicable Territory",
|
|
||||||
"parentfield": "territories",
|
|
||||||
"territory": "_Test Territory India"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
@@ -145,13 +126,76 @@
|
|||||||
"rate": 4
|
"rate": 4
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "_Test Sales Taxes and Charges Template - Rest of the World",
|
"title": "_Test Sales Taxes and Charges Template - Rest of the World"
|
||||||
"territories": [
|
},
|
||||||
|
{
|
||||||
|
"company": "_Test Company",
|
||||||
|
"doctype": "Sales Taxes and Charges Template",
|
||||||
|
"taxes": [
|
||||||
{
|
{
|
||||||
"doctype": "Applicable Territory",
|
"account_head": "_Test Account VAT - _TC",
|
||||||
"parentfield": "territories",
|
"charge_type": "On Net Total",
|
||||||
"territory": "_Test Territory Rest Of The World"
|
"description": "VAT",
|
||||||
|
"doctype": "Sales Taxes and Charges",
|
||||||
|
"parentfield": "taxes",
|
||||||
|
"rate": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"account_head": "_Test Account Service Tax - _TC",
|
||||||
|
"charge_type": "On Net Total",
|
||||||
|
"description": "Service Tax",
|
||||||
|
"doctype": "Sales Taxes and Charges",
|
||||||
|
"parentfield": "taxes",
|
||||||
|
"rate": 4
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"title": "_Test Sales Taxes and Charges Template 1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"company": "_Test Company",
|
||||||
|
"doctype": "Sales Taxes and Charges Template",
|
||||||
|
"taxes": [
|
||||||
|
{
|
||||||
|
"account_head": "_Test Account VAT - _TC",
|
||||||
|
"charge_type": "On Net Total",
|
||||||
|
"description": "VAT",
|
||||||
|
"doctype": "Sales Taxes and Charges",
|
||||||
|
"parentfield": "taxes",
|
||||||
|
"rate": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"account_head": "_Test Account Service Tax - _TC",
|
||||||
|
"charge_type": "On Net Total",
|
||||||
|
"description": "Service Tax",
|
||||||
|
"doctype": "Sales Taxes and Charges",
|
||||||
|
"parentfield": "taxes",
|
||||||
|
"rate": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "_Test Sales Taxes and Charges Template 2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype" : "Sales Taxes and Charges Template",
|
||||||
|
"title": "_Test Tax 1",
|
||||||
|
"company": "_Test Company",
|
||||||
|
"taxes":[{
|
||||||
|
"charge_type": "Actual",
|
||||||
|
"account_head": "Sales Expenses - _TC",
|
||||||
|
"cost_center": "Main - _TC",
|
||||||
|
"description": "Test Shopping cart taxes with Tax Rule",
|
||||||
|
"tax_amount": 1000
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype" : "Sales Taxes and Charges Template",
|
||||||
|
"title": "_Test Tax 2",
|
||||||
|
"company": "_Test Company",
|
||||||
|
"taxes":[{
|
||||||
|
"charge_type": "Actual",
|
||||||
|
"account_head": "Sales Expenses - _TC",
|
||||||
|
"cost_center": "Main - _TC",
|
||||||
|
"description": "Test Shopping cart taxes with Tax Rule",
|
||||||
|
"tax_amount": 200
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
$.extend(cur_frm.cscript, {
|
|
||||||
onload: function() {
|
|
||||||
erpnext.add_applicable_territory();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -1,156 +1,411 @@
|
|||||||
{
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
"autoname": "field:label",
|
"autoname": "field:label",
|
||||||
"creation": "2013-06-25 11:48:03",
|
"creation": "2013-06-25 11:48:03",
|
||||||
|
"custom": 0,
|
||||||
"description": "Specify conditions to calculate shipping amount",
|
"description": "Specify conditions to calculate shipping amount",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"description": "example: Next Day Shipping",
|
"description": "example: Next Day Shipping",
|
||||||
"fieldname": "label",
|
"fieldname": "label",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Shipping Rule Label",
|
"label": "Shipping Rule Label",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break_2",
|
"allow_on_submit": 0,
|
||||||
"fieldtype": "Column Break",
|
"bold": 0,
|
||||||
"permlevel": 0
|
"collapsible": 0,
|
||||||
|
"fieldname": "disabled",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Disabled",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"default": "Net Total",
|
"default": "Net Total",
|
||||||
"fieldname": "calculate_based_on",
|
"fieldname": "calculate_based_on",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Calculate Based On",
|
"label": "Calculate Based On",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Net Total\nNet Weight",
|
"options": "Net Total\nNet Weight",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"reqd": 0
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:!doc.disabled",
|
||||||
"fieldname": "rule_conditions_section",
|
"fieldname": "rule_conditions_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Shipping Rule Conditions",
|
"label": "Shipping Rule Conditions",
|
||||||
"permlevel": 0
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "conditions",
|
"fieldname": "conditions",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Shipping Rule Conditions",
|
"label": "Shipping Rule Conditions",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Shipping Rule Condition",
|
"options": "Shipping Rule Condition",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:!doc.disabled",
|
||||||
"fieldname": "section_break_6",
|
"fieldname": "section_break_6",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"permlevel": 0
|
"hidden": 0,
|
||||||
},
|
"ignore_user_permissions": 0,
|
||||||
{
|
"in_filter": 0,
|
||||||
"description": "Specify a list of Territories, for which, this Shipping Rule is valid",
|
|
||||||
"fieldname": "territories",
|
|
||||||
"fieldtype": "Table",
|
|
||||||
"label": "Valid For Territories",
|
|
||||||
"options": "Applicable Territory",
|
|
||||||
"permlevel": 0,
|
|
||||||
"reqd": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "column_break_8",
|
|
||||||
"fieldtype": "Column Break",
|
|
||||||
"permlevel": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "company",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Company",
|
"label": "Valid for Countries",
|
||||||
"options": "Company",
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "worldwide_shipping",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Worldwide Shipping",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:!doc.worldwide_shipping",
|
||||||
|
"fieldname": "countries",
|
||||||
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Valid for Countries",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Shipping Rule Country",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:!doc.disabled",
|
||||||
"fieldname": "section_break_10",
|
"fieldname": "section_break_10",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"permlevel": 0
|
"hidden": 0,
|
||||||
},
|
"ignore_user_permissions": 0,
|
||||||
{
|
"in_filter": 0,
|
||||||
"fieldname": "account",
|
"in_list_view": 0,
|
||||||
"fieldtype": "Link",
|
"length": 0,
|
||||||
"label": "Shipping Account",
|
"no_copy": 0,
|
||||||
"options": "Account",
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Company",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_12",
|
"fieldname": "column_break_12",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"permlevel": 0
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "account",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Shipping Account",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Account",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
"label": "Cost Center",
|
"label": "Cost Center",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Cost Center",
|
"options": "Cost Center",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-truck",
|
"icon": "icon-truck",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2015-02-05 05:11:46.634371",
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:57.633071",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Shipping Rule",
|
"name": "Shipping Rule",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
"apply_user_permissions": 1,
|
"apply_user_permissions": 1,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts User"
|
"role": "Accounts User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
"apply_user_permissions": 1,
|
"apply_user_permissions": 1,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 0,
|
||||||
"delete": 0,
|
"delete": 0,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Sales User"
|
"role": "Sales User",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 0,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Sales Master Manager",
|
"role": "Sales Master Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
@@ -22,6 +22,12 @@ class ShippingRule(Document):
|
|||||||
self.sort_shipping_rule_conditions()
|
self.sort_shipping_rule_conditions()
|
||||||
self.validate_overlapping_shipping_rule_conditions()
|
self.validate_overlapping_shipping_rule_conditions()
|
||||||
|
|
||||||
|
if self.worldwide_shipping:
|
||||||
|
self.countries = []
|
||||||
|
|
||||||
|
elif not len([d.country for d in self.countries if d.country]):
|
||||||
|
frappe.throw(_("Please specify a country for this Shipping Rule or check Worldwide Shipping"))
|
||||||
|
|
||||||
def validate_from_to_values(self):
|
def validate_from_to_values(self):
|
||||||
zero_to_values = []
|
zero_to_values = []
|
||||||
|
|
||||||
|
|||||||
@@ -29,13 +29,7 @@
|
|||||||
"shipping_amount": 0.0
|
"shipping_amount": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"territories": [
|
"worldwide_shipping": 1
|
||||||
{
|
|
||||||
"doctype": "Applicable Territory",
|
|
||||||
"parentfield": "territories",
|
|
||||||
"territory": "_Test Territory"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"account": "_Test Account Shipping Charges - _TC",
|
"account": "_Test Account Shipping Charges - _TC",
|
||||||
@@ -67,12 +61,8 @@
|
|||||||
"shipping_amount": 0.0
|
"shipping_amount": 0.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"territories": [
|
"countries": [
|
||||||
{
|
{"country": "India"}
|
||||||
"doctype": "Applicable Territory",
|
|
||||||
"parentfield": "territories",
|
|
||||||
"territory": "_Test Territory India"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -105,12 +95,6 @@
|
|||||||
"shipping_amount": 1500.0
|
"shipping_amount": 1500.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"territories": [
|
"worldwide_shipping": 1
|
||||||
{
|
|
||||||
"doctype": "Applicable Territory",
|
|
||||||
"parentfield": "territories",
|
|
||||||
"territory": "_Test Territory Rest Of The World"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1,40 +1,96 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-06-25 11:54:50.000000",
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
|
"creation": "2013-06-25 11:54:50",
|
||||||
|
"custom": 0,
|
||||||
"description": "A condition for a Shipping Rule",
|
"description": "A condition for a Shipping Rule",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "from_value",
|
"fieldname": "from_value",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "From Value",
|
"label": "From Value",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "to_value",
|
"fieldname": "to_value",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "To Value",
|
"label": "To Value",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
"fieldname": "shipping_amount",
|
"fieldname": "shipping_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Shipping Amount",
|
"label": "Shipping Amount",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2013-12-20 19:21:46.000000",
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:57.700694",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Shipping Rule Condition",
|
"name": "Shipping Rule Condition",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator",
|
||||||
|
"permissions": [],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
|
"creation": "2015-09-17 06:43:22.767534",
|
||||||
|
"custom": 0,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "DocType",
|
||||||
|
"document_type": "Other",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "country",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Country",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Country",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 1,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:57.731755",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Accounts",
|
||||||
|
"name": "Shipping Rule Country",
|
||||||
|
"name_case": "",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC"
|
||||||
|
}
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
# -*- coding: utf-8 -*-
|
||||||
# MIT License. See license.txt
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
|
||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class ApplicableTerritory(Document):
|
class ShippingRuleCountry(Document):
|
||||||
pass
|
pass
|
||||||
67
erpnext/accounts/doctype/tax_rule/tax_rule.js
Normal file
67
erpnext/accounts/doctype/tax_rule/tax_rule.js
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
cur_frm.add_fetch("customer", "customer_group", "customer_group" );
|
||||||
|
cur_frm.add_fetch("supplier", "supplier_type", "supplier_type" );
|
||||||
|
|
||||||
|
frappe.ui.form.on("Tax Rule", "tax_type", function(frm) {
|
||||||
|
frm.toggle_reqd("sales_tax_template", frm.doc.tax_type=="Sales");
|
||||||
|
frm.toggle_reqd("purchase_tax_template", frm.doc.tax_type=="Purchase");
|
||||||
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on("Tax Rule", "onload", function(frm) {
|
||||||
|
if(frm.doc.__islocal) {
|
||||||
|
frm.set_value("use_for_shopping_cart", 1);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on("Tax Rule", "refresh", function(frm) {
|
||||||
|
frappe.ui.form.trigger("Tax Rule", "tax_type");
|
||||||
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on("Tax Rule", "use_for_shopping_cart", function(frm) {
|
||||||
|
if(!frm.doc.use_for_shopping_cart &&
|
||||||
|
(frappe.get_list("Tax Rule", {"use_for_shopping_cart":1}).length == 0)) {
|
||||||
|
frappe.model.get_value("Shopping Cart Settings", "Shopping Cart Settings",
|
||||||
|
"enabled", function(docfield) {
|
||||||
|
if(docfield.enabled){
|
||||||
|
frm.set_value("use_for_shopping_cart", 1);
|
||||||
|
frappe.throw(__("Shopping Cart is enabled"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on("Tax Rule", "customer", function(frm) {
|
||||||
|
frappe.call({
|
||||||
|
method:"erpnext.accounts.doctype.tax_rule.tax_rule.get_party_details",
|
||||||
|
args: {
|
||||||
|
"party": frm.doc.customer,
|
||||||
|
"party_type": "customer"
|
||||||
|
},
|
||||||
|
callback: function(r) {
|
||||||
|
if(!r.exc) {
|
||||||
|
$.each(r.message, function(k, v) {
|
||||||
|
frm.set_value(k, v);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
frappe.ui.form.on("Tax Rule", "supplier", function(frm) {
|
||||||
|
frappe.call({
|
||||||
|
method:"erpnext.accounts.doctype.tax_rule.tax_rule.get_party_details",
|
||||||
|
args: {
|
||||||
|
"party": frm.doc.supplier,
|
||||||
|
"party_type": "supplier"
|
||||||
|
},
|
||||||
|
callback: function(r) {
|
||||||
|
if(!r.exc) {
|
||||||
|
$.each(r.message, function(k, v) {
|
||||||
|
frm.set_value(k, v);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
641
erpnext/accounts/doctype/tax_rule/tax_rule.json
Normal file
641
erpnext/accounts/doctype/tax_rule/tax_rule.json
Normal file
@@ -0,0 +1,641 @@
|
|||||||
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_import": 1,
|
||||||
|
"allow_rename": 0,
|
||||||
|
"autoname": "TR.####",
|
||||||
|
"creation": "2015-08-07 02:33:52.670866",
|
||||||
|
"custom": 0,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "DocType",
|
||||||
|
"document_type": "Setup",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"default": "Sales",
|
||||||
|
"fieldname": "tax_type",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Tax Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Sales\nPurchase",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "use_for_shopping_cart",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Use for Shopping Cart",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "column_break_1",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:doc.tax_type==\"Sales\"",
|
||||||
|
"fieldname": "sales_tax_template",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Sales Tax Template",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Sales Taxes and Charges Template",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:doc.tax_type==\"Purchase\"",
|
||||||
|
"fieldname": "purchase_tax_template",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Purchase Tax Template",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Purchase Taxes and Charges Template",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "filters",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Filters",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:doc.tax_type==\"Sales\"",
|
||||||
|
"fieldname": "customer",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Customer",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Customer",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:doc.tax_type==\"Purchase\"",
|
||||||
|
"fieldname": "supplier",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Supplier",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Supplier",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "billing_city",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Billing City",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "billing_state",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Billing State",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "billing_country",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Billing Country",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Country",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "column_break_2",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:doc.tax_type==\"Sales\"",
|
||||||
|
"fieldname": "customer_group",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Customer Group",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Customer Group",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"depends_on": "eval:doc.tax_type==\"Purchase\"",
|
||||||
|
"fieldname": "supplier_type",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Supplier Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Supplier Type",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "shipping_city",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Shipping City",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "shipping_state",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Shipping State",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "shipping_country",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Shipping Country",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Country",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "section_break_4",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Validity",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "from_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "From Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "column_break_7",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "to_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "To Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "section_break_6",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"default": "1",
|
||||||
|
"fieldname": "priority",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Priority",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "column_break_20",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Company",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Company",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
|
"in_create": 0,
|
||||||
|
"in_dialog": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2015-11-16 06:29:59.201327",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Accounts",
|
||||||
|
"name": "Tax Rule",
|
||||||
|
"name_case": "",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"apply_user_permissions": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 1,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC"
|
||||||
|
}
|
||||||
133
erpnext/accounts/doctype/tax_rule/tax_rule.py
Normal file
133
erpnext/accounts/doctype/tax_rule/tax_rule.py
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
from frappe import _
|
||||||
|
from frappe.model.document import Document
|
||||||
|
from frappe.utils import cstr
|
||||||
|
|
||||||
|
class IncorrectCustomerGroup(frappe.ValidationError): pass
|
||||||
|
class IncorrectSupplierType(frappe.ValidationError): pass
|
||||||
|
class ConflictingTaxRule(frappe.ValidationError): pass
|
||||||
|
|
||||||
|
class TaxRule(Document):
|
||||||
|
def __setup__(self):
|
||||||
|
self.flags.ignore_these_exceptions_in_test = [ConflictingTaxRule]
|
||||||
|
|
||||||
|
def validate(self):
|
||||||
|
self.validate_tax_template()
|
||||||
|
self.validate_date()
|
||||||
|
self.validate_filters()
|
||||||
|
|
||||||
|
def validate_tax_template(self):
|
||||||
|
if self.tax_type== "Sales":
|
||||||
|
self.purchase_tax_template = self.supplier = self.supplier_type= None
|
||||||
|
if self.customer:
|
||||||
|
self.customer_group = None
|
||||||
|
|
||||||
|
else:
|
||||||
|
self.sales_tax_template= self.customer = self.customer_group= None
|
||||||
|
|
||||||
|
if self.supplier:
|
||||||
|
self.supplier_type = None
|
||||||
|
|
||||||
|
if not (self.sales_tax_template or self.purchase_tax_template):
|
||||||
|
frappe.throw(_("Tax Template is mandatory."))
|
||||||
|
|
||||||
|
def validate_date(self):
|
||||||
|
if self.from_date and self.to_date and self.from_date > self.to_date:
|
||||||
|
frappe.throw(_("From Date cannot be greater than To Date"))
|
||||||
|
|
||||||
|
def validate_filters(self):
|
||||||
|
filters = {
|
||||||
|
"tax_type": self.tax_type,
|
||||||
|
"customer": self.customer,
|
||||||
|
"customer_group": self.customer_group,
|
||||||
|
"supplier": self.supplier,
|
||||||
|
"supplier_type": self.supplier_type,
|
||||||
|
"billing_city": self.billing_city,
|
||||||
|
"billing_state": self.billing_state,
|
||||||
|
"billing_country": self.billing_country,
|
||||||
|
"shipping_city": self.shipping_city,
|
||||||
|
"shipping_state": self.shipping_state,
|
||||||
|
"shipping_country": self.shipping_country,
|
||||||
|
"company": self.company
|
||||||
|
}
|
||||||
|
|
||||||
|
conds=""
|
||||||
|
for d in filters:
|
||||||
|
if conds:
|
||||||
|
conds += " and "
|
||||||
|
conds += """ifnull({0}, '') = '{1}'""".format(d, frappe.db.escape(cstr(filters[d])))
|
||||||
|
|
||||||
|
if self.from_date and self.to_date:
|
||||||
|
conds += """ and ((from_date > '{from_date}' and from_date < '{to_date}') or
|
||||||
|
(to_date > '{from_date}' and to_date < '{to_date}') or
|
||||||
|
('{from_date}' > from_date and '{from_date}' < to_date) or
|
||||||
|
('{from_date}' = from_date and '{to_date}' = to_date))""".format(from_date=self.from_date, to_date=self.to_date)
|
||||||
|
|
||||||
|
elif self.from_date and not self.to_date:
|
||||||
|
conds += """ and to_date > '{from_date}'""".format(from_date = self.from_date)
|
||||||
|
|
||||||
|
elif self.to_date and not self.from_date:
|
||||||
|
conds += """ and from_date < '{to_date}'""".format(to_date = self.to_date)
|
||||||
|
|
||||||
|
tax_rule = frappe.db.sql("select name, priority \
|
||||||
|
from `tabTax Rule` where {0} and name != '{1}'".format(conds, self.name), as_dict=1)
|
||||||
|
|
||||||
|
if tax_rule:
|
||||||
|
if tax_rule[0].priority == self.priority:
|
||||||
|
frappe.throw(_("Tax Rule Conflicts with {0}".format(tax_rule[0].name)), ConflictingTaxRule)
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def get_party_details(party, party_type, args=None):
|
||||||
|
out = {}
|
||||||
|
if args:
|
||||||
|
billing_filters= {"name": args.get("billing_address")}
|
||||||
|
shipping_filters= {"name": args.get("shipping_address")}
|
||||||
|
else:
|
||||||
|
billing_filters= {party_type: party, "is_primary_address": 1}
|
||||||
|
shipping_filters= {party_type:party, "is_shipping_address": 1}
|
||||||
|
|
||||||
|
billing_address= frappe.get_all("Address", fields=["city", "state", "country"], filters= billing_filters)
|
||||||
|
shipping_address= frappe.get_all("Address", fields=["city", "state", "country"], filters= shipping_filters)
|
||||||
|
|
||||||
|
if billing_address:
|
||||||
|
out["billing_city"]= billing_address[0].city
|
||||||
|
out["billing_state"]= billing_address[0].state
|
||||||
|
out["billing_country"]= billing_address[0].country
|
||||||
|
|
||||||
|
if shipping_address:
|
||||||
|
out["shipping_city"]= shipping_address[0].city
|
||||||
|
out["shipping_state"]= shipping_address[0].state
|
||||||
|
out["shipping_country"]= shipping_address[0].country
|
||||||
|
|
||||||
|
return out
|
||||||
|
|
||||||
|
def get_tax_template(posting_date, args):
|
||||||
|
"""Get matching tax rule"""
|
||||||
|
args = frappe._dict(args)
|
||||||
|
conditions = ["""(from_date is null or from_date = '' or from_date <= '{0}')
|
||||||
|
and (to_date is null or to_date = '' or to_date >= '{0}')""".format(posting_date)]
|
||||||
|
|
||||||
|
for key, value in args.iteritems():
|
||||||
|
if key in "use_for_shopping_cart":
|
||||||
|
conditions.append("use_for_shopping_cart = {0}".format(1 if value else 0))
|
||||||
|
else:
|
||||||
|
conditions.append("ifnull({0}, '') in ('', '{1}')".format(key, frappe.db.escape(cstr(value))))
|
||||||
|
|
||||||
|
tax_rule = frappe.db.sql("""select * from `tabTax Rule`
|
||||||
|
where {0}""".format(" and ".join(conditions)), as_dict = True)
|
||||||
|
|
||||||
|
if not tax_rule:
|
||||||
|
return None
|
||||||
|
|
||||||
|
for rule in tax_rule:
|
||||||
|
rule.no_of_keys_matched = 0
|
||||||
|
for key in args:
|
||||||
|
if rule.get(key): rule.no_of_keys_matched += 1
|
||||||
|
|
||||||
|
rule = sorted(tax_rule, lambda b, a: cmp(a.no_of_keys_matched, b.no_of_keys_matched) or cmp(a.priority, b.priority))[0]
|
||||||
|
return rule.sales_tax_template or rule.purchase_tax_template
|
||||||
28
erpnext/accounts/doctype/tax_rule/test_records.json
Normal file
28
erpnext/accounts/doctype/tax_rule/test_records.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"doctype": "Tax Rule",
|
||||||
|
"tax_type" : "Sales",
|
||||||
|
"sales_tax_template": "_Test Tax 1",
|
||||||
|
"use_for_shopping_cart": 1,
|
||||||
|
"billing_city": "_Test City",
|
||||||
|
"billing_state": "Test State",
|
||||||
|
"billing_country": "India",
|
||||||
|
"shipping_city": "_Test City",
|
||||||
|
"shipping_country": "India",
|
||||||
|
"priority": 1,
|
||||||
|
"company": "_Test Company"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype": "Tax Rule",
|
||||||
|
"tax_type" : "Sales",
|
||||||
|
"sales_tax_template": "_Test Tax 2",
|
||||||
|
"use_for_shopping_cart": 0,
|
||||||
|
"billing_city": "_Test City",
|
||||||
|
"billing_country": "India",
|
||||||
|
"shipping_city": "_Test City",
|
||||||
|
"shipping_state": "Test State",
|
||||||
|
"shipping_country": "India",
|
||||||
|
"priority": 2,
|
||||||
|
"company": "_Test Company"
|
||||||
|
}
|
||||||
|
]
|
||||||
130
erpnext/accounts/doctype/tax_rule/test_tax_rule.py
Normal file
130
erpnext/accounts/doctype/tax_rule/test_tax_rule.py
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
import unittest
|
||||||
|
from erpnext.accounts.doctype.tax_rule.tax_rule import IncorrectCustomerGroup, IncorrectSupplierType, ConflictingTaxRule, get_tax_template
|
||||||
|
|
||||||
|
test_records = frappe.get_test_records('Tax Rule')
|
||||||
|
|
||||||
|
class TestTaxRule(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
frappe.db.sql("delete from `tabTax Rule` where use_for_shopping_cart <> 1")
|
||||||
|
|
||||||
|
def test_conflict(self):
|
||||||
|
tax_rule1 = make_tax_rule(customer= "_Test Customer",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", priority = 1)
|
||||||
|
tax_rule1.save()
|
||||||
|
|
||||||
|
tax_rule2 = make_tax_rule(customer= "_Test Customer",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", priority = 1)
|
||||||
|
|
||||||
|
self.assertRaises(ConflictingTaxRule, tax_rule2.save)
|
||||||
|
|
||||||
|
def test_conflict_with_non_overlapping_dates(self):
|
||||||
|
tax_rule1 = make_tax_rule(customer= "_Test Customer",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", priority = 1, from_date = "2015-01-01")
|
||||||
|
tax_rule1.save()
|
||||||
|
|
||||||
|
tax_rule2 = make_tax_rule(customer= "_Test Customer",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", priority = 1, to_date = "2013-01-01")
|
||||||
|
|
||||||
|
tax_rule2.save()
|
||||||
|
self.assertTrue(tax_rule2.name)
|
||||||
|
|
||||||
|
def test_conflict_with_overlapping_dates(self):
|
||||||
|
tax_rule1 = make_tax_rule(customer= "_Test Customer",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", priority = 1, from_date = "2015-01-01", to_date = "2015-01-05")
|
||||||
|
tax_rule1.save()
|
||||||
|
|
||||||
|
tax_rule2 = make_tax_rule(customer= "_Test Customer",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", priority = 1, from_date = "2015-01-03", to_date = "2015-01-09")
|
||||||
|
|
||||||
|
self.assertRaises(ConflictingTaxRule, tax_rule2.save)
|
||||||
|
|
||||||
|
def test_tax_template(self):
|
||||||
|
tax_rule = make_tax_rule()
|
||||||
|
self.assertEquals(tax_rule.purchase_tax_template, None)
|
||||||
|
|
||||||
|
|
||||||
|
def test_select_tax_rule_based_on_customer(self):
|
||||||
|
make_tax_rule(customer= "_Test Customer",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", save=1)
|
||||||
|
|
||||||
|
make_tax_rule(customer= "_Test Customer 1",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template 1", save=1)
|
||||||
|
|
||||||
|
make_tax_rule(customer= "_Test Customer 2",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template 2", save=1)
|
||||||
|
|
||||||
|
self.assertEquals(get_tax_template("2015-01-01", {"customer":"_Test Customer 2"}),
|
||||||
|
"_Test Sales Taxes and Charges Template 2")
|
||||||
|
|
||||||
|
def test_select_tax_rule_based_on_better_match(self):
|
||||||
|
make_tax_rule(customer= "_Test Customer", billing_city = "Test City", billing_state = "Test State",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", save=1)
|
||||||
|
|
||||||
|
make_tax_rule(customer= "_Test Customer", billing_city = "Test City1", billing_state = "Test State",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template 1", save=1)
|
||||||
|
|
||||||
|
self.assertEquals(get_tax_template("2015-01-01", {"customer":"_Test Customer", "billing_city": "Test City", "billing_state": "Test State"}),
|
||||||
|
"_Test Sales Taxes and Charges Template")
|
||||||
|
|
||||||
|
def test_select_tax_rule_based_on_state_match(self):
|
||||||
|
make_tax_rule(customer= "_Test Customer", shipping_state = "Test State",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", save=1)
|
||||||
|
|
||||||
|
make_tax_rule(customer= "_Test Customer", shipping_state = "Test State12",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template 1", priority=2, save=1)
|
||||||
|
|
||||||
|
self.assertEquals(get_tax_template("2015-01-01", {"customer":"_Test Customer", "shipping_state": "Test State"}),
|
||||||
|
"_Test Sales Taxes and Charges Template")
|
||||||
|
|
||||||
|
def test_select_tax_rule_based_on_better_priority(self):
|
||||||
|
make_tax_rule(customer= "_Test Customer", billing_city = "Test City",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", priority=1, save=1)
|
||||||
|
|
||||||
|
make_tax_rule(customer= "_Test Customer", billing_city = "Test City",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template 1", priority=2, save=1)
|
||||||
|
|
||||||
|
self.assertEquals(get_tax_template("2015-01-01", {"customer":"_Test Customer", "billing_city": "Test City"}),
|
||||||
|
"_Test Sales Taxes and Charges Template 1")
|
||||||
|
|
||||||
|
def test_select_tax_rule_based_cross_matching_keys(self):
|
||||||
|
make_tax_rule(customer= "_Test Customer", billing_city = "Test City",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", save=1)
|
||||||
|
|
||||||
|
make_tax_rule(customer= "_Test Customer 1", billing_city = "Test City 1",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template 1", save=1)
|
||||||
|
|
||||||
|
self.assertEquals(get_tax_template("2015-01-01", {"customer":"_Test Customer", "billing_city": "Test City 1"}),
|
||||||
|
None)
|
||||||
|
|
||||||
|
def test_select_tax_rule_based_cross_partially_keys(self):
|
||||||
|
make_tax_rule(customer= "_Test Customer", billing_city = "Test City",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template", save=1)
|
||||||
|
|
||||||
|
make_tax_rule(billing_city = "Test City 1",
|
||||||
|
sales_tax_template = "_Test Sales Taxes and Charges Template 1", save=1)
|
||||||
|
|
||||||
|
self.assertEquals(get_tax_template("2015-01-01", {"customer":"_Test Customer", "billing_city": "Test City 1"}),
|
||||||
|
"_Test Sales Taxes and Charges Template 1")
|
||||||
|
|
||||||
|
|
||||||
|
def make_tax_rule(**args):
|
||||||
|
args = frappe._dict(args)
|
||||||
|
|
||||||
|
tax_rule = frappe.new_doc("Tax Rule")
|
||||||
|
|
||||||
|
for key, val in args.iteritems():
|
||||||
|
if key != "save":
|
||||||
|
tax_rule.set(key, val)
|
||||||
|
|
||||||
|
tax_rule.company = args.company or "_Test Company"
|
||||||
|
|
||||||
|
if args.save:
|
||||||
|
tax_rule.insert()
|
||||||
|
|
||||||
|
return tax_rule
|
||||||
@@ -31,10 +31,21 @@ def process_gl_map(gl_map, merge_entries=True):
|
|||||||
if flt(entry.debit) < 0:
|
if flt(entry.debit) < 0:
|
||||||
entry.credit = flt(entry.credit) - flt(entry.debit)
|
entry.credit = flt(entry.credit) - flt(entry.debit)
|
||||||
entry.debit = 0.0
|
entry.debit = 0.0
|
||||||
|
|
||||||
|
if flt(entry.debit_in_account_currency) < 0:
|
||||||
|
entry.credit_in_account_currency = \
|
||||||
|
flt(entry.credit_in_account_currency) - flt(entry.debit_in_account_currency)
|
||||||
|
entry.debit_in_account_currency = 0.0
|
||||||
|
|
||||||
if flt(entry.credit) < 0:
|
if flt(entry.credit) < 0:
|
||||||
entry.debit = flt(entry.debit) - flt(entry.credit)
|
entry.debit = flt(entry.debit) - flt(entry.credit)
|
||||||
entry.credit = 0.0
|
entry.credit = 0.0
|
||||||
|
|
||||||
|
if flt(entry.credit_in_account_currency) < 0:
|
||||||
|
entry.debit_in_account_currency = \
|
||||||
|
flt(entry.debit_in_account_currency) - flt(entry.credit_in_account_currency)
|
||||||
|
entry.credit_in_account_currency = 0.0
|
||||||
|
|
||||||
return gl_map
|
return gl_map
|
||||||
|
|
||||||
def merge_similar_entries(gl_map):
|
def merge_similar_entries(gl_map):
|
||||||
@@ -45,7 +56,11 @@ def merge_similar_entries(gl_map):
|
|||||||
same_head = check_if_in_list(entry, merged_gl_map)
|
same_head = check_if_in_list(entry, merged_gl_map)
|
||||||
if same_head:
|
if same_head:
|
||||||
same_head.debit = flt(same_head.debit) + flt(entry.debit)
|
same_head.debit = flt(same_head.debit) + flt(entry.debit)
|
||||||
|
same_head.debit_in_account_currency = \
|
||||||
|
flt(same_head.debit_in_account_currency) + flt(entry.debit_in_account_currency)
|
||||||
same_head.credit = flt(same_head.credit) + flt(entry.credit)
|
same_head.credit = flt(same_head.credit) + flt(entry.credit)
|
||||||
|
same_head.credit_in_account_currency = \
|
||||||
|
flt(same_head.credit_in_account_currency) + flt(entry.credit_in_account_currency)
|
||||||
else:
|
else:
|
||||||
merged_gl_map.append(entry)
|
merged_gl_map.append(entry)
|
||||||
|
|
||||||
@@ -84,7 +99,7 @@ def validate_account_for_auto_accounting_for_stock(gl_map):
|
|||||||
if cint(frappe.db.get_single_value("Accounts Settings", "auto_accounting_for_stock")) \
|
if cint(frappe.db.get_single_value("Accounts Settings", "auto_accounting_for_stock")) \
|
||||||
and gl_map[0].voucher_type=="Journal Entry":
|
and gl_map[0].voucher_type=="Journal Entry":
|
||||||
aii_accounts = [d[0] for d in frappe.db.sql("""select name from tabAccount
|
aii_accounts = [d[0] for d in frappe.db.sql("""select name from tabAccount
|
||||||
where account_type = 'Warehouse' and ifnull(warehouse, '')!=''""")]
|
where account_type = 'Warehouse' and (warehouse != '' and warehouse is not null)""")]
|
||||||
|
|
||||||
for entry in gl_map:
|
for entry in gl_map:
|
||||||
if entry.account in aii_accounts:
|
if entry.account in aii_accounts:
|
||||||
|
|||||||
@@ -42,13 +42,13 @@ frappe.pages["Accounts Browser"].on_page_load = function(wrapper){
|
|||||||
wrapper.page.add_menu_item(__('New Company'), function() { newdoc('Company'); }, true);
|
wrapper.page.add_menu_item(__('New Company'), function() { newdoc('Company'); }, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
wrapper.page.set_secondary_action(__('Refresh'), function() {
|
wrapper.page.add_menu_item(__('Refresh'), function() {
|
||||||
wrapper.$company_select.change();
|
wrapper.$company_select.change();
|
||||||
});
|
});
|
||||||
|
|
||||||
wrapper.page.set_primary_action(__('New'), function() {
|
wrapper.page.set_primary_action(__('New'), function() {
|
||||||
erpnext.account_chart && erpnext.account_chart.make_new();
|
erpnext.account_chart && erpnext.account_chart.make_new();
|
||||||
});
|
}, "octicon octicon-plus");
|
||||||
|
|
||||||
// company-select
|
// company-select
|
||||||
wrapper.$company_select = wrapper.page.add_select("Company", [])
|
wrapper.$company_select = wrapper.page.add_select("Company", [])
|
||||||
@@ -117,11 +117,12 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
condition: function(node) { return !node.root && node.expandable; },
|
condition: function(node) { return node.expandable; },
|
||||||
label: __("Add Child"),
|
label: __("Add Child"),
|
||||||
click: function() {
|
click: function() {
|
||||||
me.make_new()
|
me.make_new()
|
||||||
}
|
},
|
||||||
|
btnClass: "hidden-xs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
condition: function(node) {
|
condition: function(node) {
|
||||||
@@ -137,17 +138,18 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
"company": me.company
|
"company": me.company
|
||||||
};
|
};
|
||||||
frappe.set_route("query-report", "General Ledger");
|
frappe.set_route("query-report", "General Ledger");
|
||||||
}
|
},
|
||||||
|
btnClass: "hidden-xs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
condition: function(node) { return !node.root && me.can_write },
|
condition: function(node) { return !node.root && me.can_write },
|
||||||
label: __("Rename"),
|
label: __("Rename"),
|
||||||
click: function(node) {
|
click: function(node) {
|
||||||
frappe.model.rename_doc(me.ctype, node.label, function(new_name) {
|
frappe.model.rename_doc(me.ctype, node.label, function(new_name) {
|
||||||
node.reload();
|
node.reload_parent();
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
btnClass: "hidden-xs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
condition: function(node) { return !node.root && me.can_delete },
|
condition: function(node) { return !node.root && me.can_delete },
|
||||||
@@ -156,14 +158,18 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
frappe.model.delete_doc(me.ctype, node.label, function() {
|
frappe.model.delete_doc(me.ctype, node.label, function() {
|
||||||
node.parent.remove();
|
node.parent.remove();
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
btnClass: "hidden-xs"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
onrender: function(node) {
|
onrender: function(node) {
|
||||||
var dr_or_cr = node.data.balance < 0 ? "Cr" : "Dr";
|
var dr_or_cr = node.data.balance < 0 ? "Cr" : "Dr";
|
||||||
if (me.ctype == 'Account' && node.data && node.data.balance!==undefined) {
|
if (me.ctype == 'Account' && node.data && node.data.balance!==undefined) {
|
||||||
$('<span class="balance-area pull-right text-muted small">'
|
$('<span class="balance-area pull-right text-muted small">'
|
||||||
+ format_currency(Math.abs(node.data.balance), node.data.currency)
|
+ (node.data.balance_in_account_currency ?
|
||||||
|
(format_currency(Math.abs(node.data.balance_in_account_currency),
|
||||||
|
node.data.account_currency) + " / ") : "")
|
||||||
|
+ format_currency(Math.abs(node.data.balance), node.data.company_currency)
|
||||||
+ " " + dr_or_cr
|
+ " " + dr_or_cr
|
||||||
+ '</span>').insertBefore(node.$ul);
|
+ '</span>').insertBefore(node.$ul);
|
||||||
}
|
}
|
||||||
@@ -205,13 +211,16 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers")},
|
description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers")},
|
||||||
{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
|
{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
|
||||||
description: __('Further accounts can be made under Groups, but entries can be made against non-Groups')},
|
description: __('Further accounts can be made under Groups, but entries can be made against non-Groups')},
|
||||||
|
{fieldtype:'Select', fieldname:'root_type', label:__('Root Type'),
|
||||||
|
options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'].join('\n'),
|
||||||
|
},
|
||||||
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
|
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
|
||||||
options: ['', 'Bank', 'Cash', 'Warehouse', 'Receivable', 'Payable',
|
options: ['', 'Bank', 'Cash', 'Warehouse', 'Tax', 'Chargeable'].join('\n'),
|
||||||
'Equity', 'Cost of Goods Sold', 'Fixed Asset', 'Expense Account',
|
|
||||||
'Income Account', 'Tax', 'Chargeable', 'Temporary'].join('\n'),
|
|
||||||
description: __("Optional. This setting will be used to filter in various transactions.") },
|
description: __("Optional. This setting will be used to filter in various transactions.") },
|
||||||
{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate')},
|
{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate')},
|
||||||
{fieldtype:'Link', fieldname:'warehouse', label:__('Warehouse'), options:"Warehouse"}
|
{fieldtype:'Link', fieldname:'warehouse', label:__('Warehouse'), options:"Warehouse"},
|
||||||
|
{fieldtype:'Link', fieldname:'account_currency', label:__('Currency'), options:"Currency",
|
||||||
|
description: __("Optional. Sets company's default currency, if not specified.")}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -235,6 +244,9 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
$(fd.warehouse.wrapper).toggle(fd.account_type.get_value()==='Warehouse');
|
$(fd.warehouse.wrapper).toggle(fd.account_type.get_value()==='Warehouse');
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// root type if root
|
||||||
|
$(fd.root_type.wrapper).toggle(node.root);
|
||||||
|
|
||||||
// create
|
// create
|
||||||
d.set_primary_action(__("Create New"), function() {
|
d.set_primary_action(__("Create New"), function() {
|
||||||
var btn = this;
|
var btn = this;
|
||||||
@@ -250,6 +262,14 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
v.parent_account = node.label;
|
v.parent_account = node.label;
|
||||||
v.company = me.company;
|
v.company = me.company;
|
||||||
|
|
||||||
|
if(node.root) {
|
||||||
|
v.is_root = true;
|
||||||
|
v.parent_account = null;
|
||||||
|
} else {
|
||||||
|
v.is_root = false;
|
||||||
|
v.root_type = null;
|
||||||
|
}
|
||||||
|
|
||||||
return frappe.call({
|
return frappe.call({
|
||||||
args: v,
|
args: v,
|
||||||
method: 'erpnext.accounts.utils.add_ac',
|
method: 'erpnext.accounts.utils.add_ac',
|
||||||
@@ -258,7 +278,7 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
if(node.expanded) {
|
if(node.expanded) {
|
||||||
node.toggle_node();
|
node.toggle_node();
|
||||||
}
|
}
|
||||||
node.reload();
|
node.load();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -304,7 +324,7 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
if(node.expanded) {
|
if(node.expanded) {
|
||||||
node.toggle_node();
|
node.toggle_node();
|
||||||
}
|
}
|
||||||
node.reload();
|
node.load();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,36 +18,40 @@ def get_companies():
|
|||||||
def get_children():
|
def get_children():
|
||||||
args = frappe.local.form_dict
|
args = frappe.local.form_dict
|
||||||
ctype, company = args['ctype'], args['comp']
|
ctype, company = args['ctype'], args['comp']
|
||||||
|
fieldname = frappe.db.escape(ctype.lower().replace(' ','_'))
|
||||||
|
doctype = frappe.db.escape(ctype)
|
||||||
|
|
||||||
# root
|
# root
|
||||||
if args['parent'] in ("Accounts", "Cost Centers"):
|
if args['parent'] in ("Accounts", "Cost Centers"):
|
||||||
select_cond = ", root_type, report_type" if args["parent"]=="Accounts" else ""
|
fields = ", root_type, report_type, account_currency" if ctype=="Account" else ""
|
||||||
|
|
||||||
acc = frappe.db.sql(""" select
|
acc = frappe.db.sql(""" select
|
||||||
name as value, is_group as expandable %s
|
name as value, is_group as expandable {fields}
|
||||||
from `tab%s`
|
from `tab{doctype}`
|
||||||
where ifnull(parent_%s,'') = ''
|
where ifnull(`parent_{fieldname}`,'') = ''
|
||||||
and `company` = %s and docstatus<2
|
and `company` = %s and docstatus<2
|
||||||
order by name""" % (select_cond, ctype, ctype.lower().replace(' ','_'), '%s'),
|
order by name""".format(fields=fields, fieldname = fieldname, doctype=doctype),
|
||||||
company, as_dict=1)
|
company, as_dict=1)
|
||||||
|
|
||||||
if args["parent"]=="Accounts":
|
if args["parent"]=="Accounts":
|
||||||
sort_root_accounts(acc)
|
sort_root_accounts(acc)
|
||||||
else:
|
else:
|
||||||
# other
|
# other
|
||||||
|
fields = ", account_currency" if ctype=="Account" else ""
|
||||||
acc = frappe.db.sql("""select
|
acc = frappe.db.sql("""select
|
||||||
name as value, is_group as expandable
|
name as value, is_group as expandable, parent_{fieldname} as parent {fields}
|
||||||
from `tab%s`
|
from `tab{doctype}`
|
||||||
where ifnull(parent_%s,'') = %s
|
where ifnull(`parent_{fieldname}`,'') = %s
|
||||||
and docstatus<2
|
and docstatus<2
|
||||||
order by name""" % (ctype, ctype.lower().replace(' ','_'), '%s'),
|
order by name""".format(fields=fields, fieldname=fieldname, doctype=doctype),
|
||||||
args['parent'], as_dict=1)
|
args['parent'], as_dict=1)
|
||||||
|
|
||||||
if ctype == 'Account':
|
if ctype == 'Account':
|
||||||
currency = frappe.db.sql("select default_currency from `tabCompany` where name = %s", company)[0][0]
|
company_currency = frappe.db.get_value("Company", company, "default_currency")
|
||||||
for each in acc:
|
for each in acc:
|
||||||
bal = get_balance_on(each.get("value"))
|
each["company_currency"] = company_currency
|
||||||
each["currency"] = currency
|
each["balance"] = flt(get_balance_on(each.get("value"), in_account_currency=False))
|
||||||
each["balance"] = flt(bal)
|
|
||||||
|
if each.account_currency != company_currency:
|
||||||
|
each["balance_in_account_currency"] = flt(get_balance_on(each.get("value")))
|
||||||
|
|
||||||
return acc
|
return acc
|
||||||
|
|||||||
@@ -7,9 +7,12 @@ import frappe
|
|||||||
import datetime
|
import datetime
|
||||||
from frappe import _, msgprint, scrub
|
from frappe import _, msgprint, scrub
|
||||||
from frappe.defaults import get_user_permissions
|
from frappe.defaults import get_user_permissions
|
||||||
from frappe.utils import add_days, getdate, formatdate, flt, get_first_day, date_diff, nowdate
|
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff
|
||||||
from erpnext.utilities.doctype.address.address import get_address_display
|
from erpnext.utilities.doctype.address.address import get_address_display
|
||||||
from erpnext.utilities.doctype.contact.contact import get_contact_details
|
from erpnext.utilities.doctype.contact.contact import get_contact_details
|
||||||
|
from erpnext.exceptions import InvalidAccountCurrency
|
||||||
|
|
||||||
|
class DuplicatePartyAccountError(frappe.ValidationError): pass
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_party_details(party=None, account=None, party_type="Customer", company=None,
|
def get_party_details(party=None, account=None, party_type="Customer", company=None,
|
||||||
@@ -32,7 +35,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
|
|||||||
party = out[party_type.lower()]
|
party = out[party_type.lower()]
|
||||||
|
|
||||||
if not ignore_permissions and not frappe.has_permission(party_type, "read", party):
|
if not ignore_permissions and not frappe.has_permission(party_type, "read", party):
|
||||||
frappe.throw(_("Not permitted"), frappe.PermissionError)
|
frappe.throw(_("Not permitted for {0}").format(party), frappe.PermissionError)
|
||||||
|
|
||||||
party = frappe.get_doc(party_type, party)
|
party = frappe.get_doc(party_type, party)
|
||||||
|
|
||||||
@@ -40,6 +43,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
|
|||||||
set_contact_details(out, party, party_type)
|
set_contact_details(out, party, party_type)
|
||||||
set_other_values(out, party, party_type)
|
set_other_values(out, party, party_type)
|
||||||
set_price_list(out, party, party_type, price_list)
|
set_price_list(out, party, party_type, price_list)
|
||||||
|
out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company, out.customer_group, out.supplier_type)
|
||||||
|
|
||||||
if not out.get("currency"):
|
if not out.get("currency"):
|
||||||
out["currency"] = currency
|
out["currency"] = currency
|
||||||
@@ -48,8 +52,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
|
|||||||
if party_type=="Customer":
|
if party_type=="Customer":
|
||||||
out["sales_team"] = [{
|
out["sales_team"] = [{
|
||||||
"sales_person": d.sales_person,
|
"sales_person": d.sales_person,
|
||||||
"sales_designation": d.sales_designation,
|
"allocated_percentage": d.allocated_percentage or None
|
||||||
"allocated_percentage": d.allocated_percentage
|
|
||||||
} for d in party.get("sales_team")]
|
} for d in party.get("sales_team")]
|
||||||
|
|
||||||
return out
|
return out
|
||||||
@@ -96,11 +99,24 @@ def set_other_values(out, party, party_type):
|
|||||||
out[f] = party.get(f)
|
out[f] = party.get(f)
|
||||||
|
|
||||||
# fields prepended with default in Customer doctype
|
# fields prepended with default in Customer doctype
|
||||||
for f in ['currency', 'taxes_and_charges'] \
|
for f in ['currency'] \
|
||||||
+ (['sales_partner', 'commission_rate'] if party_type=="Customer" else []):
|
+ (['sales_partner', 'commission_rate'] if party_type=="Customer" else []):
|
||||||
if party.get("default_" + f):
|
if party.get("default_" + f):
|
||||||
out[f] = party.get("default_" + f)
|
out[f] = party.get("default_" + f)
|
||||||
|
|
||||||
|
def get_default_price_list(party):
|
||||||
|
"""Return default price list for party (Document object)"""
|
||||||
|
if party.default_price_list:
|
||||||
|
return party.default_price_list
|
||||||
|
|
||||||
|
if party.doctype == "Customer":
|
||||||
|
price_list = frappe.db.get_value("Customer Group",
|
||||||
|
party.customer_group, "default_price_list")
|
||||||
|
if price_list:
|
||||||
|
return price_list
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
def set_price_list(out, party, party_type, given_price_list):
|
def set_price_list(out, party, party_type, given_price_list):
|
||||||
# price list
|
# price list
|
||||||
price_list = filter(None, get_user_permissions().get("Price List", []))
|
price_list = filter(None, get_user_permissions().get("Price List", []))
|
||||||
@@ -108,11 +124,7 @@ def set_price_list(out, party, party_type, given_price_list):
|
|||||||
price_list = price_list[0] if len(price_list)==1 else None
|
price_list = price_list[0] if len(price_list)==1 else None
|
||||||
|
|
||||||
if not price_list:
|
if not price_list:
|
||||||
price_list = party.default_price_list
|
price_list = get_default_price_list(party)
|
||||||
|
|
||||||
if not price_list and party_type=="Customer":
|
|
||||||
price_list = frappe.db.get_value("Customer Group",
|
|
||||||
party.customer_group, "default_price_list")
|
|
||||||
|
|
||||||
if not price_list:
|
if not price_list:
|
||||||
price_list = given_price_list
|
price_list = given_price_list
|
||||||
@@ -131,7 +143,7 @@ def set_account_and_due_date(party, account, party_type, company, posting_date,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if party:
|
if party:
|
||||||
account = get_party_account(company, party, party_type)
|
account = get_party_account(party_type, party, company)
|
||||||
|
|
||||||
account_fieldname = "debit_to" if party_type=="Customer" else "credit_to"
|
account_fieldname = "debit_to" if party_type=="Customer" else "credit_to"
|
||||||
|
|
||||||
@@ -142,14 +154,21 @@ def set_account_and_due_date(party, account, party_type, company, posting_date,
|
|||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
def get_company_currency():
|
||||||
|
company_currency = frappe._dict()
|
||||||
|
for d in frappe.get_all("Company", fields=["name", "default_currency"]):
|
||||||
|
company_currency.setdefault(d.name, d.default_currency)
|
||||||
|
|
||||||
|
return company_currency
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_party_account(company, party, party_type):
|
def get_party_account(party_type, party, company):
|
||||||
"""Returns the account for the given `party`.
|
"""Returns the account for the given `party`.
|
||||||
Will first search in party (Customer / Supplier) record, if not found,
|
Will first search in party (Customer / Supplier) record, if not found,
|
||||||
will search in group (Customer Group / Supplier Type),
|
will search in group (Customer Group / Supplier Type),
|
||||||
finally will return default."""
|
finally will return default."""
|
||||||
if not company:
|
if not company:
|
||||||
frappe.throw(_("Please select company first."))
|
frappe.throw(_("Please select a Company"))
|
||||||
|
|
||||||
if party:
|
if party:
|
||||||
account = frappe.db.get_value("Party Account",
|
account = frappe.db.get_value("Party Account",
|
||||||
@@ -167,6 +186,51 @@ def get_party_account(company, party, party_type):
|
|||||||
|
|
||||||
return account
|
return account
|
||||||
|
|
||||||
|
def get_party_account_currency(party_type, party, company):
|
||||||
|
def generator():
|
||||||
|
party_account = get_party_account(party_type, party, company)
|
||||||
|
return frappe.db.get_value("Account", party_account, "account_currency")
|
||||||
|
|
||||||
|
return frappe.local_cache("party_account_currency", (party_type, party, company), generator)
|
||||||
|
|
||||||
|
def get_party_gle_currency(party_type, party, company):
|
||||||
|
def generator():
|
||||||
|
existing_gle_currency = frappe.db.sql("""select account_currency from `tabGL Entry`
|
||||||
|
where docstatus=1 and company=%(company)s and party_type=%(party_type)s and party=%(party)s
|
||||||
|
limit 1""", { "company": company, "party_type": party_type, "party": party })
|
||||||
|
|
||||||
|
return existing_gle_currency[0][0] if existing_gle_currency else None
|
||||||
|
|
||||||
|
return frappe.local_cache("party_gle_currency", (party_type, party, company), generator,
|
||||||
|
regenerate_if_none=True)
|
||||||
|
|
||||||
|
def validate_party_gle_currency(party_type, party, company, party_account_currency=None):
|
||||||
|
"""Validate party account currency with existing GL Entry's currency"""
|
||||||
|
if not party_account_currency:
|
||||||
|
party_account_currency = get_party_account_currency(party_type, party, company)
|
||||||
|
|
||||||
|
existing_gle_currency = get_party_gle_currency(party_type, party, company)
|
||||||
|
|
||||||
|
if existing_gle_currency and party_account_currency != existing_gle_currency:
|
||||||
|
frappe.throw(_("Accounting Entry for {0}: {1} can only be made in currency: {2}")
|
||||||
|
.format(party_type, party, existing_gle_currency), InvalidAccountCurrency)
|
||||||
|
|
||||||
|
def validate_party_accounts(doc):
|
||||||
|
companies = []
|
||||||
|
|
||||||
|
for account in doc.get("accounts"):
|
||||||
|
if account.company in companies:
|
||||||
|
frappe.throw(_("There can only be 1 Account per Company in {0} {1}")
|
||||||
|
.format(doc.doctype, doc.name), DuplicatePartyAccountError)
|
||||||
|
else:
|
||||||
|
companies.append(account.company)
|
||||||
|
|
||||||
|
party_account_currency = frappe.db.get_value("Account", account.account, "account_currency")
|
||||||
|
existing_gle_currency = get_party_gle_currency(doc.doctype, doc.name, account.company)
|
||||||
|
|
||||||
|
if existing_gle_currency and party_account_currency != existing_gle_currency:
|
||||||
|
frappe.throw(_("Accounting entries have already been made in currency {0} for company {1}. Please select a receivable or payable account with currency {0}.").format(existing_gle_currency, account.company))
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_due_date(posting_date, party_type, party, company):
|
def get_due_date(posting_date, party_type, party, company):
|
||||||
"""Set Due Date = Posting Date + Credit Days"""
|
"""Set Due Date = Posting Date + Credit Days"""
|
||||||
@@ -211,6 +275,9 @@ def validate_due_date(posting_date, due_date, party_type, party, company):
|
|||||||
frappe.throw(_("Due Date cannot be before Posting Date"))
|
frappe.throw(_("Due Date cannot be before Posting Date"))
|
||||||
else:
|
else:
|
||||||
default_due_date = get_due_date(posting_date, party_type, party, company)
|
default_due_date = get_due_date(posting_date, party_type, party, company)
|
||||||
|
if not default_due_date:
|
||||||
|
return
|
||||||
|
|
||||||
if default_due_date != posting_date and getdate(due_date) > getdate(default_due_date):
|
if default_due_date != posting_date and getdate(due_date) > getdate(default_due_date):
|
||||||
is_credit_controller = frappe.db.get_single_value("Accounts Settings", "credit_controller") in frappe.get_roles()
|
is_credit_controller = frappe.db.get_single_value("Accounts Settings", "credit_controller") in frappe.get_roles()
|
||||||
if is_credit_controller:
|
if is_credit_controller:
|
||||||
@@ -218,3 +285,30 @@ def validate_due_date(posting_date, due_date, party_type, party, company):
|
|||||||
.format(date_diff(due_date, default_due_date)))
|
.format(date_diff(due_date, default_due_date)))
|
||||||
else:
|
else:
|
||||||
frappe.throw(_("Due / Reference Date cannot be after {0}").format(formatdate(default_due_date)))
|
frappe.throw(_("Due / Reference Date cannot be after {0}").format(formatdate(default_due_date)))
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def set_taxes(party, party_type, posting_date, company, customer_group=None, supplier_type=None,
|
||||||
|
billing_address=None, shipping_address=None, use_for_shopping_cart=None):
|
||||||
|
from erpnext.accounts.doctype.tax_rule.tax_rule import get_tax_template, get_party_details
|
||||||
|
args = {
|
||||||
|
party_type.lower(): party,
|
||||||
|
"customer_group": customer_group,
|
||||||
|
"supplier_type": supplier_type,
|
||||||
|
"company": company
|
||||||
|
}
|
||||||
|
|
||||||
|
if billing_address or shipping_address:
|
||||||
|
args.update(get_party_details(party, party_type, {"billing_address": billing_address, \
|
||||||
|
"shipping_address": shipping_address }))
|
||||||
|
else:
|
||||||
|
args.update(get_party_details(party, party_type))
|
||||||
|
|
||||||
|
if party_type=="Customer":
|
||||||
|
args.update({"tax_type": "Sales"})
|
||||||
|
else:
|
||||||
|
args.update({"tax_type": "Purchase"})
|
||||||
|
|
||||||
|
if use_for_shopping_cart:
|
||||||
|
args.update({"use_for_shopping_cart": use_for_shopping_cart})
|
||||||
|
|
||||||
|
return get_tax_template(posting_date, args)
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{%- from "templates/print_formats/standard_macros.html" import add_header -%}
|
||||||
|
<div class="page-break">
|
||||||
|
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
|
||||||
|
and doc.set("select_print_heading", _("Payment Receipt Note")) -%}{%- endif -%}
|
||||||
|
{{ add_header(0, 1, doc, letter_head, no_letterhead) }}
|
||||||
|
|
||||||
|
{%- for label, value in (
|
||||||
|
(_("Received On"), frappe.utils.formatdate(doc.voucher_date)),
|
||||||
|
(_("Received From"), doc.pay_to_recd_from),
|
||||||
|
(_("Amount"), "<strong>" + doc.get_formatted("total_amount") + "</strong><br>" + (doc.total_amount_in_words or "") + "<br>"),
|
||||||
|
(_("Remarks"), doc.remark)
|
||||||
|
) -%}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-3"><label class="text-right">{{ label }}</label></div>
|
||||||
|
<div class="col-xs-9">{{ value }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{%- endfor -%}
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<br>
|
||||||
|
<p class="strong">
|
||||||
|
{{ _("For") }} {{ doc.company }},<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
{{ _("Authorized Signatory") }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
@@ -1,15 +1,17 @@
|
|||||||
{
|
{
|
||||||
"creation": "2012-05-01 12:46:31",
|
"creation": "2012-05-01 12:46:31",
|
||||||
|
"custom_format": 0,
|
||||||
|
"disabled": 0,
|
||||||
"doc_type": "Journal Entry",
|
"doc_type": "Journal Entry",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Print Format",
|
"doctype": "Print Format",
|
||||||
"html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n<div class=\"page-break\">\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Payment Receipt Note\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n {%- for label, value in (\n (_(\"Received On\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Received From\"), doc.pay_to_recd_from),\n (_(\"Amount\"), \"<strong>\" + doc.get_formatted(\"total_amount\") + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n (_(\"Remarks\"), doc.remark)\n ) -%}\n <div class=\"row\">\n <div class=\"col-xs-3\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-xs-9\">{{ value }}</div>\n </div>\n\n {%- endfor -%}\n\n <hr>\n <br>\n <p class=\"strong\">\n {{ _(\"For\") }} {{ doc.company }},<br>\n <br>\n <br>\n <br>\n {{ _(\"Authorized Signatory\") }}\n </p>\n</div>\n\n",
|
"html": "",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2015-01-16 11:03:22.893209",
|
"modified": "2015-11-25 07:06:00.668141",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
|
||||||
"name": "Payment Receipt Voucher",
|
"name": "Payment Receipt Voucher",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
|
"print_format_builder": 0,
|
||||||
"print_format_type": "Server",
|
"print_format_type": "Server",
|
||||||
"standard": "Yes"
|
"standard": "Yes"
|
||||||
}
|
}
|
||||||
@@ -24,25 +24,53 @@ class ReceivablePayableReport(object):
|
|||||||
if party_naming_by == "Naming Series":
|
if party_naming_by == "Naming Series":
|
||||||
columns += [args.get("party_type") + " Name::110"]
|
columns += [args.get("party_type") + " Name::110"]
|
||||||
|
|
||||||
columns += [_("Voucher Type") + "::110", _("Voucher No") + ":Dynamic Link/Voucher Type:120",
|
columns += [_("Voucher Type") + "::110", _("Voucher No") + ":Dynamic Link/"+_("Voucher Type")+":120",
|
||||||
_("Due Date") + ":Date:80"]
|
_("Due Date") + ":Date:80"]
|
||||||
|
|
||||||
if args.get("party_type") == "Supplier":
|
if args.get("party_type") == "Supplier":
|
||||||
columns += [_("Bill No") + "::80", _("Bill Date") + ":Date:80"]
|
columns += [_("Bill No") + "::80", _("Bill Date") + ":Date:80"]
|
||||||
|
|
||||||
columns += [_("Invoiced Amount") + ":Currency:100", _("Paid Amount") + ":Currency:100",
|
for label in ("Invoiced Amount", "Paid Amount", "Outstanding Amount"):
|
||||||
_("Outstanding Amount") + ":Currency:100", _("Age") + ":Int:50",
|
columns.append({
|
||||||
"0-" + str(self.filters.range1) + ":Currency:100",
|
"label": label,
|
||||||
str(self.filters.range1) + "-" + str(self.filters.range2) + ":Currency:100",
|
"fieldtype": "Currency",
|
||||||
str(self.filters.range2) + "-" + str(self.filters.range3) + ":Currency:100",
|
"options": "currency",
|
||||||
str(self.filters.range3) + _("-Above") + ":Currency:100"
|
"width": 120
|
||||||
]
|
})
|
||||||
|
|
||||||
|
columns += [_("Age (Days)") + ":Int:80"]
|
||||||
|
|
||||||
|
if not "range1" in self.filters:
|
||||||
|
self.filters["range1"] = "30"
|
||||||
|
if not "range2" in self.filters:
|
||||||
|
self.filters["range2"] = "60"
|
||||||
|
if not "range3" in self.filters:
|
||||||
|
self.filters["range3"] = "90"
|
||||||
|
|
||||||
|
for label in ("0-{range1}".format(**self.filters),
|
||||||
|
"{range1}-{range2}".format(**self.filters),
|
||||||
|
"{range2}-{range3}".format(**self.filters),
|
||||||
|
"{range3}-{above}".format(range3=self.filters.range3, above=_("Above"))):
|
||||||
|
columns.append({
|
||||||
|
"label": label,
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 120
|
||||||
|
})
|
||||||
|
|
||||||
if args.get("party_type") == "Customer":
|
if args.get("party_type") == "Customer":
|
||||||
columns += [_("Territory") + ":Link/Territory:80"]
|
columns += [_("Territory") + ":Link/Territory:80"]
|
||||||
if args.get("party_type") == "Supplier":
|
if args.get("party_type") == "Supplier":
|
||||||
columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
|
columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
|
||||||
columns += [_("Remarks") + "::200"]
|
columns += [
|
||||||
|
{
|
||||||
|
"fieldname": "currency",
|
||||||
|
"label": _("Currency"),
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"width": 100,
|
||||||
|
},
|
||||||
|
_("Remarks") + "::200"
|
||||||
|
]
|
||||||
|
|
||||||
return columns
|
return columns
|
||||||
|
|
||||||
@@ -55,6 +83,8 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
future_vouchers = self.get_entries_after(self.filters.report_date, args.get("party_type"))
|
future_vouchers = self.get_entries_after(self.filters.report_date, args.get("party_type"))
|
||||||
|
|
||||||
|
company_currency = frappe.db.get_value("Company", self.filters.get("company"), "default_currency")
|
||||||
|
|
||||||
data = []
|
data = []
|
||||||
for gle in self.get_entries_till(self.filters.report_date, args.get("party_type")):
|
for gle in self.get_entries_till(self.filters.report_date, args.get("party_type")):
|
||||||
if self.is_receivable_or_payable(gle, dr_or_cr, future_vouchers):
|
if self.is_receivable_or_payable(gle, dr_or_cr, future_vouchers):
|
||||||
@@ -91,10 +121,16 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
# customer territory / supplier type
|
# customer territory / supplier type
|
||||||
if args.get("party_type") == "Customer":
|
if args.get("party_type") == "Customer":
|
||||||
row += [self.get_territory(gle.party), gle.remarks]
|
row += [self.get_territory(gle.party)]
|
||||||
if args.get("party_type") == "Supplier":
|
if args.get("party_type") == "Supplier":
|
||||||
row += [self.get_supplier_type(gle.party), gle.remarks]
|
row += [self.get_supplier_type(gle.party)]
|
||||||
|
|
||||||
|
if self.filters.get(scrub(args.get("party_type"))):
|
||||||
|
row.append(gle.account_currency)
|
||||||
|
else:
|
||||||
|
row.append(company_currency)
|
||||||
|
|
||||||
|
row.append(gle.remarks)
|
||||||
data.append(row)
|
data.append(row)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
@@ -171,10 +207,18 @@ class ReceivablePayableReport(object):
|
|||||||
def get_gl_entries(self, party_type):
|
def get_gl_entries(self, party_type):
|
||||||
if not hasattr(self, "gl_entries"):
|
if not hasattr(self, "gl_entries"):
|
||||||
conditions, values = self.prepare_conditions(party_type)
|
conditions, values = self.prepare_conditions(party_type)
|
||||||
self.gl_entries = frappe.db.sql("""select name, posting_date, account, party_type, party, debit, credit,
|
|
||||||
voucher_type, voucher_no, against_voucher_type, against_voucher from `tabGL Entry`
|
if self.filters.get(scrub(party_type)):
|
||||||
where docstatus < 2 and party_type=%s {0} order by posting_date, party"""
|
select_fields = "debit_in_account_currency as debit, credit_in_account_currency as credit"
|
||||||
.format(conditions), values, as_dict=True)
|
else:
|
||||||
|
select_fields = "debit, credit"
|
||||||
|
|
||||||
|
self.gl_entries = frappe.db.sql("""select name, posting_date, account, party_type, party,
|
||||||
|
voucher_type, voucher_no, against_voucher_type, against_voucher, account_currency, remarks, {0}
|
||||||
|
from `tabGL Entry`
|
||||||
|
where docstatus < 2 and party_type=%s and (party is not null and party != '') {1}
|
||||||
|
order by posting_date, party"""
|
||||||
|
.format(select_fields, conditions), values, as_dict=True)
|
||||||
|
|
||||||
return self.gl_entries
|
return self.gl_entries
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
|
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
|
||||||
</div>
|
</div>
|
||||||
<h2 class="text-center">{%= __("Bank Reconciliation Statement") %}</h2>
|
<h2 class="text-center">{%= __("Bank Reconciliation Statement") %}</h2>
|
||||||
<h4 class="text-center">{%= filters.account && (filters.account + ", ") || "" %} {%= filters.company %}</h4>
|
<h4 class="text-center">{%= filters.account %}</h4>
|
||||||
<hr>
|
<hr>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -16,31 +16,31 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for(var i=0, l=data.length; i<l; i++) { %}
|
{% for(var i=0, l=data.length; i<l; i++) { %}
|
||||||
{% if (data[i][__("Posting Date")]) { %}
|
{% if (data[i]["posting_date"]) { %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{%= dateutil.str_to_user(data[i][__("Posting Date")]) %}</td>
|
<td>{%= dateutil.str_to_user(data[i]["posting_date"]) %}</td>
|
||||||
<td>{%= data[i][__("Journal Entry")] %}</td>
|
<td>{%= data[i]["journal_entry"] %}</td>
|
||||||
<td>{%= __("Against") %}: {%= data[i][__("Against Account")] %}
|
<td>{%= __("Against") %}: {%= data[i]["against_account"] %}
|
||||||
{% if (data[i][__("Reference")]) { %}
|
{% if (data[i]["reference"]) { %}
|
||||||
<br>{%= __("Reference") %}: {%= data[i][__("Reference")] %}
|
<br>{%= __("Reference") %}: {%= data[i]["reference"] %}
|
||||||
{% if (data[i][__("Ref Date")]) { %}
|
{% if (data[i]["ref_date"]) { %}
|
||||||
<br>{%= __("Reference Date") %}: {%= dateutil.str_to_user(data[i][__("Ref Date")]) %}
|
<br>{%= __("Reference Date") %}: {%= dateutil.str_to_user(data[i]["ref_date"]) %}
|
||||||
{% } %}
|
{% } %}
|
||||||
{% } %}
|
{% } %}
|
||||||
{% if (data[i][__("Clearance Date")]) { %}
|
{% if (data[i]["clearance_date"]) { %}
|
||||||
<br>{%= __("Clearance Date") %}: {%= dateutil.str_to_user(data[i][__("Clearance Date")]) %}
|
<br>{%= __("Clearance Date") %}: {%= dateutil.str_to_user(data[i]["clearance_date"]) %}
|
||||||
{% } %}
|
{% } %}
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align: right">{%= format_currency(data[i][__("Debit")]) %}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["debit"]) %}</td>
|
||||||
<td style="text-align: right">{%= format_currency(data[i][__("Credit")]) %}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["credit"]) %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% } else { %}
|
{% } else { %}
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>{%= data[i][__("Journal Entry")] %}</td>
|
<td>{%= data[i]["journal_entry"] %}</td>
|
||||||
<td style="text-align: right">{%= format_currency(data[i][__("Debit")]) %}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["debit"]) %}</td>
|
||||||
<td style="text-align: right">{%= format_currency(data[i][__("Credit")]) %}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["credit"]) %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% } %}
|
{% } %}
|
||||||
{% } %}
|
{% } %}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user