Compare commits
263 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2cda7fd834 | ||
|
|
054e2952c8 | ||
|
|
b4f1f1e8b8 | ||
|
|
3ab6181a4f | ||
|
|
18433591c3 | ||
|
|
25dd38c8f2 | ||
|
|
88742e0912 | ||
|
|
ab822c5d16 | ||
|
|
4058af24e2 | ||
|
|
66953941ea | ||
|
|
36c9d11bee | ||
|
|
e393c62086 | ||
|
|
9f553e7206 | ||
|
|
ba7d8b0cac | ||
|
|
1ce6df8ff6 | ||
|
|
7132bd3659 | ||
|
|
13a2574bd6 | ||
|
|
09855fc3cc | ||
|
|
55f6308169 | ||
|
|
c2ae1a7375 | ||
|
|
c792e65d99 | ||
|
|
471908ab9f | ||
|
|
9fef3df6a0 | ||
|
|
8a686ba982 | ||
|
|
f509d13d28 | ||
|
|
96d7905383 | ||
|
|
b2e7a1f605 | ||
|
|
3912a31a6f | ||
|
|
b713406e22 | ||
|
|
32b2a7795e | ||
|
|
f945e10cce | ||
|
|
2f957f27b0 | ||
|
|
7b46e5148a | ||
|
|
79a415e3b8 | ||
|
|
ce893499d7 | ||
|
|
d89152e4a5 | ||
|
|
6677fd58ef | ||
|
|
c6a695d0f3 | ||
|
|
54910000d4 | ||
|
|
1f2f82fcc2 | ||
|
|
1a0d32cdfb | ||
|
|
c33e96f860 | ||
|
|
ca95384f05 | ||
|
|
4b207647db | ||
|
|
ade5b82167 | ||
|
|
bcbfeb0d53 | ||
|
|
710c38ffe1 | ||
|
|
94360cca20 | ||
|
|
f1b276122e | ||
|
|
62be8dfd21 | ||
|
|
1a922196fa | ||
|
|
c6b47bcdda | ||
|
|
15f7b1ee1a | ||
|
|
08b39b1ff8 | ||
|
|
da7d1667d5 | ||
|
|
4f10f15686 | ||
|
|
d02038f591 | ||
|
|
83e61bf368 | ||
|
|
d95c376d57 | ||
|
|
c6285069dc | ||
|
|
4ccf692f7c | ||
|
|
8573aee8b8 | ||
|
|
dab3cdc106 | ||
|
|
2de1f86009 | ||
|
|
b176dea74e | ||
|
|
47b89756d9 | ||
|
|
aabc634afd | ||
|
|
3becd4239f | ||
|
|
1b5edcbbd8 | ||
|
|
51135a1522 | ||
|
|
97e523b4a4 | ||
|
|
09ec13f7cf | ||
|
|
2179cd97c8 | ||
|
|
c8baa01e9c | ||
|
|
dda0906458 | ||
|
|
cd04380149 | ||
|
|
df3bf5d76b | ||
|
|
833432086b | ||
|
|
2646f84a30 | ||
|
|
7364f0cf1c | ||
|
|
a9ce706bfb | ||
|
|
49ccac5d95 | ||
|
|
98122a2574 | ||
|
|
ea768ec132 | ||
|
|
d00ce6a8cf | ||
|
|
68a628ea1e | ||
|
|
6a277e244c | ||
|
|
383b13cdb5 | ||
|
|
f197d42503 | ||
|
|
6d27470401 | ||
|
|
3f11f0ae44 | ||
|
|
277b7fa641 | ||
|
|
9a75530c26 | ||
|
|
dcedac7f25 | ||
|
|
cef1086441 | ||
|
|
d6c59656e8 | ||
|
|
5996b2f1bb | ||
|
|
b43df36e85 | ||
|
|
90ff509f6d | ||
|
|
d61b21cedf | ||
|
|
5b9d517d04 | ||
|
|
84806bf673 | ||
|
|
eba2c4323e | ||
|
|
1ecd8cdaa3 | ||
|
|
21ade4a773 | ||
|
|
24f1c50dca | ||
|
|
4f01704234 | ||
|
|
547d223b28 | ||
|
|
2e08e3e186 | ||
|
|
4e78cee1c2 | ||
|
|
2f7b210aac | ||
|
|
2ed8f8f099 | ||
|
|
cf8fd6274d | ||
|
|
813b9efe28 | ||
|
|
8cbc076dc2 | ||
|
|
15343be386 | ||
|
|
33cc081c3b | ||
|
|
6221117069 | ||
|
|
cd6c09fbee | ||
|
|
0f063a5f46 | ||
|
|
14d646f636 | ||
|
|
7e2d7e88a6 | ||
|
|
26bb6f37bc | ||
|
|
77d23824df | ||
|
|
22d26a1d82 | ||
|
|
91a69e4a8d | ||
|
|
f433a5a124 | ||
|
|
41380dfad8 | ||
|
|
2a5c1138a0 | ||
|
|
769b01e07a | ||
|
|
fc827b329e | ||
|
|
1f11b96533 | ||
|
|
a61930e7a7 | ||
|
|
22d4a7e742 | ||
|
|
df4deba515 | ||
|
|
6e343e23d9 | ||
|
|
2c70238fbb | ||
|
|
d0723f8a96 | ||
|
|
2ecf239925 | ||
|
|
29b01226ea | ||
|
|
6c88331101 | ||
|
|
f853a92676 | ||
|
|
d8d6579003 | ||
|
|
89301863e5 | ||
|
|
6c3cc3647b | ||
|
|
b9126317b3 | ||
|
|
25716652b7 | ||
|
|
986616f8ee | ||
|
|
d3ed3638cf | ||
|
|
5fc9552d29 | ||
|
|
b1f0a7d52e | ||
|
|
c54b805981 | ||
|
|
a098b4178a | ||
|
|
c2f973b521 | ||
|
|
ad61a28730 | ||
|
|
e66b6ce01f | ||
|
|
bea7558908 | ||
|
|
aa7e17cd80 | ||
|
|
c54619570a | ||
|
|
d1f85c4fe6 | ||
|
|
9f94266892 | ||
|
|
01a8473996 | ||
|
|
f319206d22 | ||
|
|
653f68d2e4 | ||
|
|
a7aa2c70b5 | ||
|
|
4284fcf2a6 | ||
|
|
73db44d0b9 | ||
|
|
e2b8af16ed | ||
|
|
ba54a43e32 | ||
|
|
3427c939bd | ||
|
|
c666030f34 | ||
|
|
3085186182 | ||
|
|
58fc9037b3 | ||
|
|
c75c1d7e3e | ||
|
|
3574b37ff3 | ||
|
|
d9cc14ddd5 | ||
|
|
13bb2ba779 | ||
|
|
063946a02f | ||
|
|
d89dcf60e6 | ||
|
|
d4ac3d8ceb | ||
|
|
98ec1164fc | ||
|
|
836fd6450d | ||
|
|
cd9daf6671 | ||
|
|
c7e774fda9 | ||
|
|
865d547965 | ||
|
|
bc60970fcb | ||
|
|
319bbad4d4 | ||
|
|
57b69cecbf | ||
|
|
634ecae020 | ||
|
|
c4c603dcd2 | ||
|
|
1d797c1688 | ||
|
|
22ef68945d | ||
|
|
09f7cc4912 | ||
|
|
39dda5cf49 | ||
|
|
1e1d8026ad | ||
|
|
6c89bb1900 | ||
|
|
73a0265e4f | ||
|
|
06b3ecb99b | ||
|
|
6d59a41b27 | ||
|
|
eb395788b7 | ||
|
|
1bca0780a4 | ||
|
|
b015f9eca2 | ||
|
|
e8d635827a | ||
|
|
f0e16e68c5 | ||
|
|
650b016584 | ||
|
|
3883e86ad7 | ||
|
|
dd8dbe000b | ||
|
|
c6b5f7dcae | ||
|
|
4147106c88 | ||
|
|
25e947bef6 | ||
|
|
bb4db5ae80 | ||
|
|
c88068eecf | ||
|
|
a2d03c849f | ||
|
|
0179242f04 | ||
|
|
7670c9f07d | ||
|
|
1d0c5896c0 | ||
|
|
3fbf3ce852 | ||
|
|
bd01a81638 | ||
|
|
5ada14b887 | ||
|
|
2d7af63351 | ||
|
|
d313553ae3 | ||
|
|
27e9b77a3d | ||
|
|
71ea34a0ba | ||
|
|
065d24b26d | ||
|
|
7c42995949 | ||
|
|
3fb67c7c3b | ||
|
|
1e735a87aa | ||
|
|
c62927ad5d | ||
|
|
1b03e0a6d0 | ||
|
|
342895c9df | ||
|
|
6dd7e682af | ||
|
|
007e87b8a5 | ||
|
|
405b66898e | ||
|
|
d1e1c52171 | ||
|
|
b073cf4fa1 | ||
|
|
20b2a75603 | ||
|
|
f9148f3a6f | ||
|
|
102f9062e8 | ||
|
|
184f0fa264 | ||
|
|
ba7b05ad27 | ||
|
|
b5b3d478a2 | ||
|
|
44f777eeec | ||
|
|
a2bd145d68 | ||
|
|
40b230ea9e | ||
|
|
6f8dfa4c8d | ||
|
|
dab167791c | ||
|
|
0902fb2e3d | ||
|
|
5a700820e7 | ||
|
|
9a2dc8332b | ||
|
|
fde7bfec31 | ||
|
|
943d707021 | ||
|
|
eb5ad3f793 | ||
|
|
acb28954ff | ||
|
|
a0b21235d7 | ||
|
|
d3c04a3eda | ||
|
|
0c1b8f4334 | ||
|
|
571a9d0f19 | ||
|
|
3d101c3fd2 | ||
|
|
563f023c11 | ||
|
|
1396b776bc | ||
|
|
c47d03cf8a | ||
|
|
369b9cf928 | ||
|
|
7114b7786e |
@@ -16,16 +16,13 @@ install:
|
||||
- sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis
|
||||
- sudo pip install --upgrade pip
|
||||
- rm $TRAVIS_BUILD_DIR/.git/shallow
|
||||
- cd ~/ && bench init frappe-bench --frappe-path https://github.com/frappe/frappe.git --frappe-branch develop
|
||||
- bash $TRAVIS_BUILD_DIR/travis/bench_init.sh
|
||||
- cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
|
||||
|
||||
script:
|
||||
- cd ~/frappe-bench
|
||||
- bench get-app erpnext $TRAVIS_BUILD_DIR
|
||||
- bench use test_site
|
||||
- bench setup redis-cache
|
||||
- bench setup redis-async-broker
|
||||
- bench setup procfile --with-celery-broker
|
||||
- bench reinstall
|
||||
- bench build
|
||||
- bench build-website
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# stolen from http://cgit.drupalcode.org/octopus/commit/?id=db4f837
|
||||
includedir=`mysql_config --variable=pkgincludedir`
|
||||
thiscwd=`pwd`
|
||||
_THIS_DB_VERSION=`mysql -V 2>&1 | tr -d "\n" | cut -d" " -f6 | awk '{ print $1}' | cut -d"-" -f1 | awk '{ print $1}' | sed "s/[\,']//g"`
|
||||
if [ "$_THIS_DB_VERSION" = "5.5.40" ] && [ ! -e "$includedir-$_THIS_DB_VERSION-fixed.log" ] ; then
|
||||
cd $includedir
|
||||
sudo patch -p1 < $thiscwd/ci/my_config.h.patch &> /dev/null
|
||||
sudo touch $includedir-$_THIS_DB_VERSION-fixed.log
|
||||
fi
|
||||
@@ -1,22 +0,0 @@
|
||||
diff -burp a/my_config.h b/my_config.h
|
||||
--- a/my_config.h 2014-10-09 19:32:46.000000000 -0400
|
||||
+++ b/my_config.h 2014-10-09 19:35:12.000000000 -0400
|
||||
@@ -641,17 +641,4 @@
|
||||
#define SIZEOF_TIME_T 8
|
||||
/* #undef TIME_T_UNSIGNED */
|
||||
|
||||
-/*
|
||||
- stat structure (from <sys/stat.h>) is conditionally defined
|
||||
- to have different layout and size depending on the defined macros.
|
||||
- The correct macro is defined in my_config.h, which means it MUST be
|
||||
- included first (or at least before <features.h> - so, practically,
|
||||
- before including any system headers).
|
||||
-
|
||||
- __GLIBC__ is defined in <features.h>
|
||||
-*/
|
||||
-#ifdef __GLIBC__
|
||||
-#error <my_config.h> MUST be included first!
|
||||
-#endif
|
||||
-
|
||||
#endif
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
from __future__ import unicode_literals
|
||||
__version__ = '6.24.2'
|
||||
__version__ = '6.27.11'
|
||||
|
||||
@@ -24,12 +24,4 @@ cur_frm.fields_dict.state.get_query = function(doc) {
|
||||
cur_frm.cscript.invoice_no = function(doc, cdt, cdn) {
|
||||
var d = locals[cdt][cdn];
|
||||
return get_server_fields('get_invoice_details', d.invoice_no, 'invoices', doc, cdt, cdn, 1);
|
||||
}
|
||||
|
||||
cur_frm.cscript.company = function(doc, cdt, cdn) {
|
||||
erpnext.get_fiscal_year(doc.company, doc.received_date);
|
||||
}
|
||||
|
||||
cur_frm.cscript.received_date = function(doc, cdt, cdn){
|
||||
erpnext.get_fiscal_year(doc.company, doc.received_date);
|
||||
}
|
||||
@@ -16,6 +16,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@@ -40,6 +41,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Series",
|
||||
@@ -64,6 +66,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "C-Form No",
|
||||
@@ -87,6 +90,7 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Received Date",
|
||||
@@ -110,6 +114,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Customer",
|
||||
@@ -134,6 +139,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@@ -158,6 +164,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Company",
|
||||
@@ -174,30 +181,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "fiscal_year",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Fiscal Year",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Fiscal Year",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -206,6 +189,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Quarter",
|
||||
@@ -230,6 +214,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Total Amount",
|
||||
@@ -254,6 +239,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "State",
|
||||
@@ -277,6 +263,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@@ -299,6 +286,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Invoices",
|
||||
@@ -323,6 +311,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Total Invoiced Amount",
|
||||
@@ -347,6 +336,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Amended From",
|
||||
@@ -374,7 +364,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 3,
|
||||
"modified": "2016-02-03 01:09:33.043437",
|
||||
"modified": "2016-03-03 04:31:05.340444",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "C-Form",
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "",
|
||||
@@ -25,6 +26,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -40,6 +42,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Cost Center Name",
|
||||
@@ -49,6 +52,7 @@
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -64,6 +68,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Parent Cost Center",
|
||||
@@ -74,6 +79,7 @@
|
||||
"options": "Cost Center",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -89,6 +95,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Company",
|
||||
@@ -99,6 +106,7 @@
|
||||
"options": "Company",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -114,12 +122,14 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 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,
|
||||
@@ -137,6 +147,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Is Group",
|
||||
@@ -145,6 +156,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -161,6 +173,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Budget",
|
||||
@@ -168,6 +181,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -184,6 +198,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Distribution Id",
|
||||
@@ -194,6 +209,7 @@
|
||||
"options": "Monthly Distribution",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -210,6 +226,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Budgets",
|
||||
@@ -220,6 +237,7 @@
|
||||
"options": "Budget Detail",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -235,6 +253,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "lft",
|
||||
@@ -244,6 +263,7 @@
|
||||
"oldfieldtype": "Int",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 1,
|
||||
"reqd": 0,
|
||||
@@ -259,6 +279,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "rgt",
|
||||
@@ -268,6 +289,7 @@
|
||||
"oldfieldtype": "Int",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 1,
|
||||
"reqd": 0,
|
||||
@@ -283,6 +305,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "old_parent",
|
||||
@@ -293,6 +316,7 @@
|
||||
"options": "Cost Center",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 1,
|
||||
"reqd": 0,
|
||||
@@ -311,7 +335,8 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:43.870712",
|
||||
"menu_index": 0,
|
||||
"modified": "2016-03-14 15:59:51.508268",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Cost Center",
|
||||
@@ -337,6 +362,26 @@
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
"email": 0,
|
||||
"export": 1,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 0,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Auditor",
|
||||
"set_user_permissions": 0,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
@@ -396,29 +441,10 @@
|
||||
"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,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"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",
|
||||
"version": 0
|
||||
}
|
||||
8
erpnext/accounts/doctype/gl_entry/gl_entry.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('GL Entry', {
|
||||
refresh: function(frm) {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -9,6 +9,7 @@ from frappe.model.document import Document
|
||||
from erpnext.accounts.party import validate_party_gle_currency, validate_party_frozen_disabled
|
||||
from erpnext.accounts.utils import get_account_currency
|
||||
from erpnext.setup.doctype.company.company import get_company_currency
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
from erpnext.exceptions import InvalidAccountCurrency
|
||||
|
||||
exclude_from_linked_with = True
|
||||
@@ -18,11 +19,11 @@ class GLEntry(Document):
|
||||
self.flags.ignore_submit_comment = True
|
||||
self.check_mandatory()
|
||||
self.pl_must_have_cost_center()
|
||||
self.validate_posting_date()
|
||||
self.check_pl_account()
|
||||
self.validate_cost_center()
|
||||
self.validate_party()
|
||||
self.validate_currency()
|
||||
self.validate_and_set_fiscal_year()
|
||||
|
||||
def on_update_with_args(self, adv_adj, update_outstanding = 'Yes'):
|
||||
self.validate_account_details(adv_adj)
|
||||
@@ -37,7 +38,7 @@ class GLEntry(Document):
|
||||
self.against_voucher)
|
||||
|
||||
def check_mandatory(self):
|
||||
mandatory = ['account','remarks','voucher_type','voucher_no','fiscal_year','company']
|
||||
mandatory = ['account','remarks','voucher_type','voucher_no','company']
|
||||
for k in mandatory:
|
||||
if not self.get(k):
|
||||
frappe.throw(_("{0} is required").format(self.meta.get_label(k)))
|
||||
@@ -57,10 +58,6 @@ class GLEntry(Document):
|
||||
elif self.cost_center:
|
||||
self.cost_center = None
|
||||
|
||||
def validate_posting_date(self):
|
||||
from erpnext.accounts.utils import validate_fiscal_year
|
||||
validate_fiscal_year(self.posting_date, self.fiscal_year, _("Posting Date"), self)
|
||||
|
||||
def check_pl_account(self):
|
||||
if self.is_opening=='Yes' and \
|
||||
frappe.db.get_value("Account", self.account, "report_type")=="Profit and Loss":
|
||||
@@ -112,6 +109,12 @@ class GLEntry(Document):
|
||||
if self.party_type and self.party:
|
||||
validate_party_gle_currency(self.party_type, self.party, self.company, self.account_currency)
|
||||
|
||||
|
||||
def validate_and_set_fiscal_year(self):
|
||||
if not self.fiscal_year:
|
||||
self.fiscal_year = get_fiscal_year(self.posting_date, company=self.company)[0]
|
||||
|
||||
|
||||
def validate_balance_type(account, adv_adj=False):
|
||||
if not adv_adj and account:
|
||||
balance_must_be = frappe.db.get_value("Account", account, "balance_must_be")
|
||||
|
||||
@@ -217,16 +217,6 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
||||
|
||||
cur_frm.script_manager.make(erpnext.accounts.JournalEntry);
|
||||
|
||||
cur_frm.cscript.company = function(doc, cdt, cdn) {
|
||||
cur_frm.refresh_fields();
|
||||
erpnext.get_fiscal_year(doc.company, doc.posting_date);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
cur_frm.cscript.update_totals = function(doc) {
|
||||
var td=0.0; var tc =0.0;
|
||||
var accounts = doc.accounts || [];
|
||||
@@ -410,11 +400,11 @@ $.extend(erpnext.journal_entry, {
|
||||
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));
|
||||
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));
|
||||
|
||||
flt(flt(row.credit_in_account_currency)*row.exchange_rate, precision("credit", row)));
|
||||
|
||||
cur_frm.cscript.update_totals(frm.doc);
|
||||
},
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class JournalEntry(AccountsController):
|
||||
self.is_opening='No'
|
||||
self.clearance_date = None
|
||||
|
||||
super(JournalEntry, self).validate_date_with_fiscal_year()
|
||||
self.validate_party()
|
||||
self.validate_cheque_info()
|
||||
self.validate_entries_for_advance()
|
||||
@@ -354,25 +353,31 @@ class JournalEntry(AccountsController):
|
||||
self.remark = ("\n").join(r) #User Remarks is not mandatory
|
||||
|
||||
def set_print_format_fields(self):
|
||||
total_amount = 0.0
|
||||
bank_account_currency = None
|
||||
pay_to_recd_from = None
|
||||
bank_amount = party_amount = total_amount = 0.0
|
||||
currency = bank_account_currency = party_account_currency = pay_to_recd_from= None
|
||||
for d in self.get('accounts'):
|
||||
if d.party_type and d.party:
|
||||
if not pay_to_recd_from:
|
||||
pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
|
||||
"customer_name" if d.party_type=="Customer" else "supplier_name")
|
||||
|
||||
party_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
|
||||
party_account_currency = d.account_currency
|
||||
|
||||
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
|
||||
total_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
|
||||
bank_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
|
||||
bank_account_currency = d.account_currency
|
||||
|
||||
if pay_to_recd_from:
|
||||
self.pay_to_recd_from = pay_to_recd_from
|
||||
else:
|
||||
total_amount = 0
|
||||
if bank_amount:
|
||||
total_amount = bank_amount
|
||||
currency = bank_account_currency
|
||||
else:
|
||||
total_amount = party_amount
|
||||
currency = party_account_currency
|
||||
|
||||
self.set_total_amount(total_amount, bank_account_currency)
|
||||
self.set_total_amount(total_amount, currency)
|
||||
|
||||
def set_total_amount(self, amt, currency):
|
||||
self.total_amount = amt
|
||||
@@ -665,7 +670,7 @@ def get_payment_entry(ref_doc, args):
|
||||
bank_row.cost_center = cost_center
|
||||
|
||||
amount = args.get("debit_in_account_currency") or args.get("amount")
|
||||
|
||||
|
||||
if bank_row.account_currency == args.get("party_account_currency"):
|
||||
bank_row.set(args.get("amount_field_bank"), amount)
|
||||
else:
|
||||
|
||||
@@ -249,7 +249,6 @@ def make_journal_entry(account1, account2, amount, cost_center=None, exchange_ra
|
||||
jv = frappe.new_doc("Journal Entry")
|
||||
jv.posting_date = "2013-02-14"
|
||||
jv.company = "_Test Company"
|
||||
jv.fiscal_year = "_Test Fiscal Year 2013"
|
||||
jv.user_remark = "test"
|
||||
jv.multi_currency = 1
|
||||
jv.set("accounts", [
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
"accounts": [
|
||||
{
|
||||
"account": "_Test Receivable - _TC",
|
||||
"party_type": "Customer",
|
||||
"party": "_Test Customer",
|
||||
"party_type": "Customer",
|
||||
"party": "_Test Customer",
|
||||
"credit_in_account_currency": 400.0,
|
||||
"debit_in_account_currency": 0.0,
|
||||
"doctype": "Journal Entry Account",
|
||||
@@ -22,7 +22,6 @@
|
||||
"parentfield": "accounts"
|
||||
}
|
||||
],
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"naming_series": "_T-Journal Entry-",
|
||||
"posting_date": "2013-02-14",
|
||||
"user_remark": "test",
|
||||
@@ -38,8 +37,8 @@
|
||||
"accounts": [
|
||||
{
|
||||
"account": "_Test Payable - _TC",
|
||||
"party_type": "Supplier",
|
||||
"party": "_Test Supplier",
|
||||
"party_type": "Supplier",
|
||||
"party": "_Test Supplier",
|
||||
"credit_in_account_currency": 0.0,
|
||||
"debit_in_account_currency": 400.0,
|
||||
"doctype": "Journal Entry Account",
|
||||
@@ -53,7 +52,6 @@
|
||||
"parentfield": "accounts"
|
||||
}
|
||||
],
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"naming_series": "_T-Journal Entry-",
|
||||
"posting_date": "2013-02-14",
|
||||
"user_remark": "test",
|
||||
@@ -69,8 +67,8 @@
|
||||
"accounts": [
|
||||
{
|
||||
"account": "_Test Receivable - _TC",
|
||||
"party_type": "Customer",
|
||||
"party": "_Test Customer",
|
||||
"party_type": "Customer",
|
||||
"party": "_Test Customer",
|
||||
"credit_in_account_currency": 0.0,
|
||||
"debit_in_account_currency": 400.0,
|
||||
"doctype": "Journal Entry Account",
|
||||
@@ -85,7 +83,6 @@
|
||||
"parentfield": "accounts"
|
||||
}
|
||||
],
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"naming_series": "_T-Journal Entry-",
|
||||
"posting_date": "2013-02-14",
|
||||
"user_remark": "test",
|
||||
|
||||
@@ -1,150 +1,156 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:distribution_id",
|
||||
"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**",
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"allow_copy": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:distribution_id",
|
||||
"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**",
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"description": "Name of the Monthly Distribution",
|
||||
"fieldname": "distribution_id",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Distribution Name",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "distribution_id",
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"description": "Name of the Monthly Distribution",
|
||||
"fieldname": "distribution_id",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Distribution Name",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "distribution_id",
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"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": "fiscal_year",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Fiscal Year",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "fiscal_year",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Fiscal Year",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 1,
|
||||
"set_only_once": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "fiscal_year",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Fiscal Year",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "fiscal_year",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Fiscal Year",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 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",
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Monthly Distribution Percentages",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "budget_distribution_details",
|
||||
"oldfieldtype": "Table",
|
||||
"options": "Monthly Distribution Percentage",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "percentages",
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Monthly Distribution Percentages",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "budget_distribution_details",
|
||||
"oldfieldtype": "Table",
|
||||
"options": "Monthly Distribution Percentage",
|
||||
"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
|
||||
}
|
||||
],
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"icon": "icon-bar-chart",
|
||||
"idx": 1,
|
||||
"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",
|
||||
"module": "Accounts",
|
||||
"name": "Monthly Distribution",
|
||||
"name_case": "Title Case",
|
||||
"owner": "Administrator",
|
||||
],
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"icon": "icon-bar-chart",
|
||||
"idx": 1,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-03-03 02:46:44.493857",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Monthly Distribution",
|
||||
"name_case": "Title Case",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"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,
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"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,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
"email": 0,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 2,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Accounts Manager",
|
||||
"set_user_permissions": 0,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
"email": 0,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 2,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Accounts Manager",
|
||||
"set_user_permissions": 0,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
}
|
||||
],
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"sort_field": "modified",
|
||||
],
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -598,13 +598,13 @@
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"in_create": 0,
|
||||
"in_create": 1,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 1,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-02-24 16:49:46.832403",
|
||||
"modified": "2016-04-12 15:26:22.756129",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Request",
|
||||
@@ -675,5 +675,6 @@
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC"
|
||||
"sort_order": "DESC",
|
||||
"track_seen": 0
|
||||
}
|
||||
@@ -211,7 +211,10 @@ def get_amount(ref_doc, dt):
|
||||
grand_total = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid)
|
||||
|
||||
if dt == "Sales Invoice":
|
||||
grand_total = flt(ref_doc.outstanding_amount)
|
||||
if ref_doc.party_account_currency == ref_doc.currency:
|
||||
grand_total = flt(ref_doc.outstanding_amount)
|
||||
else:
|
||||
grand_total = flt(ref_doc.outstanding_amount) / ref_doc.conversion_rate
|
||||
|
||||
if grand_total > 0 :
|
||||
return grand_total
|
||||
|
||||
@@ -242,6 +242,8 @@ def filter_pricing_rules(args, pricing_rules):
|
||||
for p in pricing_rules:
|
||||
if p.item_code and args.variant_of:
|
||||
p.variant_of = args.variant_of
|
||||
else:
|
||||
p.variant_of = None
|
||||
|
||||
# find pricing rule with highest priority
|
||||
if pricing_rules:
|
||||
@@ -251,7 +253,7 @@ def filter_pricing_rules(args, pricing_rules):
|
||||
|
||||
# apply internal priority
|
||||
all_fields = ["item_code", "item_group", "brand", "customer", "customer_group", "territory",
|
||||
"supplier", "supplier_type", "campaign", "sales_partner"]
|
||||
"supplier", "supplier_type", "campaign", "sales_partner", "variant_of"]
|
||||
|
||||
if len(pricing_rules) > 1:
|
||||
for field_set in [["item_code", "variant_of", "item_group", "brand"],
|
||||
|
||||
@@ -118,7 +118,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
||||
items_add: function(doc, cdt, cdn) {
|
||||
var row = frappe.get_doc(cdt, cdn);
|
||||
this.frm.script_manager.copy_from_first_row("items", row,
|
||||
["expense_account", "cost_center", "project_name"]);
|
||||
["expense_account", "cost_center", "project"]);
|
||||
},
|
||||
|
||||
on_submit: function() {
|
||||
@@ -242,7 +242,7 @@ cur_frm.cscript.cost_center = function(doc, cdt, cdn){
|
||||
refresh_field('items');
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['items'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
|
||||
cur_frm.fields_dict['items'].grid.get_field('project').get_query = function(doc, cdt, cdn) {
|
||||
return{
|
||||
filters:[
|
||||
['Project', 'status', 'not in', 'Completed, Cancelled']
|
||||
|
||||
@@ -116,103 +116,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_email",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Email",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -424,6 +327,254 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"fieldname": "section_addresses",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address and Contact",
|
||||
"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": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Select Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"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": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
"depends_on": "",
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_email",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"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_break_address",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 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,
|
||||
"depends_on": "",
|
||||
"fieldname": "shipping_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Select Shipping Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"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": "shipping_address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Shipping Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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,
|
||||
@@ -1821,106 +1972,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"depends_on": "supplier",
|
||||
"fieldname": "contact_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Details",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "icon-bullhorn",
|
||||
"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": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"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": "col_break23",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 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,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -2235,33 +2286,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "fiscal_year",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Fiscal Year",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "fiscal_year",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Fiscal Year",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -2342,7 +2366,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"allow_on_submit": 1,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "is_recurring",
|
||||
@@ -2448,7 +2472,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"allow_on_submit": 1,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
|
||||
@@ -2464,7 +2488,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
@@ -2631,7 +2655,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "is_recurring",
|
||||
@@ -2649,7 +2673,7 @@
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
@@ -2668,7 +2692,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-03-02 07:12:31.805279",
|
||||
"modified": "2016-03-21 13:13:43.694604",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Invoice",
|
||||
@@ -2797,7 +2821,7 @@
|
||||
],
|
||||
"read_only": 0,
|
||||
"read_only_onload": 1,
|
||||
"search_fields": "posting_date, supplier, fiscal_year, bill_no, base_grand_total, outstanding_amount",
|
||||
"search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"timeline_field": "supplier",
|
||||
|
||||
@@ -10,7 +10,7 @@ import frappe.defaults
|
||||
|
||||
from erpnext.controllers.buying_controller import BuyingController
|
||||
from erpnext.accounts.party import get_party_account, get_due_date
|
||||
from erpnext.accounts.utils import get_account_currency
|
||||
from erpnext.accounts.utils import get_account_currency, get_fiscal_year
|
||||
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import update_billed_amount_based_on_po
|
||||
|
||||
form_grid_templates = {
|
||||
@@ -121,7 +121,7 @@ class PurchaseInvoice(BuyingController):
|
||||
},
|
||||
"Purchase Order Item": {
|
||||
"ref_dn_field": "po_detail",
|
||||
"compare_fields": [["project_name", "="], ["item_code", "="], ["uom", "="]],
|
||||
"compare_fields": [["project", "="], ["item_code", "="], ["uom", "="]],
|
||||
"is_child_table": True,
|
||||
"allow_duplicate_prev_row_id": True
|
||||
},
|
||||
@@ -131,7 +131,7 @@ class PurchaseInvoice(BuyingController):
|
||||
},
|
||||
"Purchase Receipt Item": {
|
||||
"ref_dn_field": "pr_detail",
|
||||
"compare_fields": [["project_name", "="], ["item_code", "="], ["uom", "="]],
|
||||
"compare_fields": [["project", "="], ["item_code", "="], ["uom", "="]],
|
||||
"is_child_table": True
|
||||
}
|
||||
})
|
||||
@@ -234,8 +234,6 @@ class PurchaseInvoice(BuyingController):
|
||||
reconcile_against_document(lst)
|
||||
|
||||
def on_submit(self):
|
||||
super(PurchaseInvoice, self).on_submit()
|
||||
|
||||
self.check_prev_docstatus()
|
||||
|
||||
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype,
|
||||
@@ -421,22 +419,36 @@ class PurchaseInvoice(BuyingController):
|
||||
def update_project(self):
|
||||
project_list = []
|
||||
for d in self.items:
|
||||
if d.project_name and d.project_name not in project_list:
|
||||
project = frappe.get_doc("Project", d.project_name)
|
||||
if d.project and d.project not in project_list:
|
||||
project = frappe.get_doc("Project", d.project)
|
||||
project.flags.dont_sync_tasks = True
|
||||
project.update_purchase_costing()
|
||||
project.save()
|
||||
project_list.append(d.project_name)
|
||||
project_list.append(d.project)
|
||||
|
||||
def validate_supplier_invoice(self):
|
||||
if self.bill_date:
|
||||
if getdate(self.bill_date) > getdate(self.posting_date):
|
||||
frappe.throw("Supplier Invoice Date cannot be greater than Posting Date")
|
||||
|
||||
if self.bill_no:
|
||||
if cint(frappe.db.get_single_value("Accounts Settings", "check_supplier_invoice_uniqueness")):
|
||||
pi = frappe.db.exists("Purchase Invoice", {"bill_no": self.bill_no,
|
||||
"fiscal_year": self.fiscal_year, "name": ("!=", self.name), "docstatus": ("<", 2)})
|
||||
fiscal_year = get_fiscal_year(self.posting_date, company=self.company, as_dict=True)
|
||||
|
||||
pi = frappe.db.sql('''select name from `tabPurchase Invoice`
|
||||
where
|
||||
bill_no = %(bill_no)s
|
||||
and name != %(name)s
|
||||
and docstatus < 2
|
||||
and posting_date between %(year_start_date)s and %(year_end_date)s''', {
|
||||
"bill_no": self.bill_no,
|
||||
"name": self.name,
|
||||
"year_start_date": fiscal_year.year_start_date,
|
||||
"year_end_date": fiscal_year.year_end_date
|
||||
})
|
||||
|
||||
if pi:
|
||||
pi = pi[0][0]
|
||||
frappe.throw("Supplier Invoice No exists in Purchase Invoice {0}".format(pi))
|
||||
|
||||
def update_billing_status_in_pr(self, update_modified=True):
|
||||
|
||||
@@ -222,14 +222,14 @@ class TestPurchaseInvoice(unittest.TestCase):
|
||||
|
||||
def test_total_purchase_cost_for_project(self):
|
||||
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 = '_Test Project' and docstatus=1""")
|
||||
existing_purchase_cost = existing_purchase_cost and existing_purchase_cost[0][0] or 0
|
||||
|
||||
pi = make_purchase_invoice(currency="USD", conversion_rate=60, project_name="_Test Project")
|
||||
pi = make_purchase_invoice(currency="USD", conversion_rate=60, project="_Test Project")
|
||||
self.assertEqual(frappe.db.get_value("Project", "_Test Project", "total_purchase_cost"),
|
||||
existing_purchase_cost + 15000)
|
||||
|
||||
pi1 = make_purchase_invoice(qty=10, project_name="_Test Project")
|
||||
pi1 = make_purchase_invoice(qty=10, project="_Test Project")
|
||||
self.assertEqual(frappe.db.get_value("Project", "_Test Project", "total_purchase_cost"),
|
||||
existing_purchase_cost + 15500)
|
||||
|
||||
@@ -338,7 +338,7 @@ def make_purchase_invoice(**args):
|
||||
"serial_no": args.serial_no,
|
||||
"stock_uom": "_Test UOM",
|
||||
"cost_center": "_Test Cost Center - _TC",
|
||||
"project_name": args.project_name
|
||||
"project": args.project
|
||||
})
|
||||
if not args.do_not_save:
|
||||
pi.insert()
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
"uom": "_Test UOM"
|
||||
}
|
||||
],
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"grand_total": 0,
|
||||
"naming_series": "_T-BILL",
|
||||
"taxes": [
|
||||
@@ -166,7 +165,6 @@
|
||||
"uom": "_Test UOM"
|
||||
}
|
||||
],
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"grand_total": 0,
|
||||
"naming_series": "_T-Purchase Invoice-",
|
||||
"taxes": [
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Document",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -842,14 +843,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Project",
|
||||
@@ -1238,7 +1239,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-02-22 09:32:17.205040",
|
||||
"modified": "2016-03-18 05:05:27.752823",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Invoice Item",
|
||||
|
||||
@@ -278,7 +278,7 @@ $.extend(cur_frm.cscript, new erpnext.accounts.SalesInvoiceController({frm: cur_
|
||||
// Hide Fields
|
||||
// ------------
|
||||
cur_frm.cscript.hide_fields = function(doc) {
|
||||
par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received',
|
||||
par_flds = ['project', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received',
|
||||
'advances', 'sales_partner', 'commission_rate', 'total_commission', 'advances', 'from_date', 'to_date'];
|
||||
|
||||
if(cint(doc.is_pos) == 1) {
|
||||
@@ -381,7 +381,7 @@ cur_frm.fields_dict.write_off_cost_center.get_query = function(doc) {
|
||||
|
||||
//project name
|
||||
//--------------------------
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
||||
cur_frm.fields_dict['project'].get_query = function(doc, cdt, cdn) {
|
||||
return{
|
||||
query: "erpnext.controllers.queries.get_project_name",
|
||||
filters: {'customer': doc.customer}
|
||||
|
||||
@@ -368,6 +368,33 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "mode_of_payment",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mode of Payment",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "mode_of_payment",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Mode of Payment",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -1810,33 +1837,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "mode_of_payment",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mode of Payment",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "mode_of_payment",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Mode of Payment",
|
||||
"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,
|
||||
@@ -2363,14 +2363,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "project_name",
|
||||
@@ -2776,33 +2776,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "fiscal_year",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Fiscal Year",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "fiscal_year",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Fiscal Year",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"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,
|
||||
@@ -3092,7 +3065,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"allow_on_submit": 1,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "is_recurring",
|
||||
@@ -3198,7 +3171,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"allow_on_submit": 1,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
|
||||
@@ -3214,7 +3187,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
@@ -3382,7 +3355,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "is_recurring",
|
||||
@@ -3400,7 +3373,7 @@
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
@@ -3445,7 +3418,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-03-02 07:12:38.793697",
|
||||
"modified": "2016-03-21 13:12:12.430038",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice",
|
||||
@@ -3530,11 +3503,31 @@
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
"email": 0,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 1,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"role": "All",
|
||||
"set_user_permissions": 0,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
}
|
||||
],
|
||||
"read_only": 0,
|
||||
"read_only_onload": 1,
|
||||
"search_fields": "posting_date, due_date, customer, fiscal_year, base_grand_total, outstanding_amount",
|
||||
"search_fields": "posting_date, due_date, customer, base_grand_total, outstanding_amount",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"timeline_field": "customer",
|
||||
|
||||
@@ -81,8 +81,6 @@ class SalesInvoice(SellingController):
|
||||
self.update_packing_list()
|
||||
|
||||
def on_submit(self):
|
||||
super(SalesInvoice, self).on_submit()
|
||||
|
||||
if cint(self.update_stock) == 1:
|
||||
self.update_stock_ledger()
|
||||
else:
|
||||
@@ -323,12 +321,12 @@ class SalesInvoice(SellingController):
|
||||
super(SalesInvoice, self).validate_with_previous_doc({
|
||||
"Sales Order": {
|
||||
"ref_dn_field": "sales_order",
|
||||
"compare_fields": [["customer", "="], ["company", "="], ["project_name", "="],
|
||||
"compare_fields": [["customer", "="], ["company", "="], ["project", "="],
|
||||
["currency", "="]],
|
||||
},
|
||||
"Delivery Note": {
|
||||
"ref_dn_field": "delivery_note",
|
||||
"compare_fields": [["customer", "="], ["company", "="], ["project_name", "="],
|
||||
"compare_fields": [["customer", "="], ["company", "="], ["project", "="],
|
||||
["currency", "="]],
|
||||
},
|
||||
})
|
||||
@@ -365,19 +363,19 @@ class SalesInvoice(SellingController):
|
||||
|
||||
def validate_proj_cust(self):
|
||||
"""check for does customer belong to same project as entered.."""
|
||||
if self.project_name and self.customer:
|
||||
if self.project and self.customer:
|
||||
res = frappe.db.sql("""select name from `tabProject`
|
||||
where name = %s and (customer = %s or customer is null or customer = '')""",
|
||||
(self.project_name, self.customer))
|
||||
(self.project, self.customer))
|
||||
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))
|
||||
|
||||
def validate_pos(self):
|
||||
if not self.cash_bank_account and flt(self.paid_amount):
|
||||
frappe.throw(_("Cash or Bank Account is mandatory for making payment entry"))
|
||||
|
||||
if flt(self.paid_amount) + flt(self.write_off_amount) \
|
||||
- flt(self.base_grand_total) > 1/(10**(self.precision("base_grand_total") + 1)):
|
||||
- flt(self.grand_total) > 1/(10**(self.precision("grand_total") + 1)):
|
||||
frappe.throw(_("""Paid amount + Write Off Amount can not be greater than Grand Total"""))
|
||||
|
||||
|
||||
|
||||
@@ -16,14 +16,13 @@
|
||||
"description": "138-CMS Shoe",
|
||||
"doctype": "Sales Invoice Item",
|
||||
"income_account": "Sales - _TC",
|
||||
"expense_account": "_Test Account Cost for Goods Sold - _TC",
|
||||
"expense_account": "_Test Account Cost for Goods Sold - _TC",
|
||||
"item_name": "138-CMS Shoe",
|
||||
"parentfield": "items",
|
||||
"qty": 1.0,
|
||||
"rate": 500.0
|
||||
}
|
||||
],
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"base_grand_total": 561.8,
|
||||
"grand_total": 561.8,
|
||||
"is_pos": 0,
|
||||
@@ -158,7 +157,6 @@
|
||||
"stock_uom": "_Test UOM"
|
||||
}
|
||||
],
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"grand_total": 0,
|
||||
"is_pos": 0,
|
||||
"naming_series": "_T-Sales Invoice-",
|
||||
@@ -280,7 +278,6 @@
|
||||
"stock_uom": "_Test UOM"
|
||||
}
|
||||
],
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"grand_total": 0,
|
||||
"is_pos": 0,
|
||||
"naming_series": "_T-Sales Invoice-",
|
||||
|
||||
@@ -19,19 +19,6 @@ 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",
|
||||
@@ -64,4 +51,4 @@ frappe.ui.form.on("Tax Rule", "supplier", function(frm) {
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import cstr
|
||||
from frappe.utils import cstr, cint
|
||||
|
||||
class IncorrectCustomerGroup(frappe.ValidationError): pass
|
||||
class IncorrectSupplierType(frappe.ValidationError): pass
|
||||
@@ -20,15 +20,16 @@ class TaxRule(Document):
|
||||
self.validate_tax_template()
|
||||
self.validate_date()
|
||||
self.validate_filters()
|
||||
self.validate_use_for_shopping_cart()
|
||||
|
||||
def validate_tax_template(self):
|
||||
if self.tax_type== "Sales":
|
||||
self.purchase_tax_template = self.supplier = self.supplier_type= None
|
||||
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
|
||||
self.sales_tax_template = self.customer = self.customer_group = None
|
||||
|
||||
if self.supplier:
|
||||
self.supplier_type = None
|
||||
@@ -81,6 +82,15 @@ class TaxRule(Document):
|
||||
if tax_rule[0].priority == self.priority:
|
||||
frappe.throw(_("Tax Rule Conflicts with {0}".format(tax_rule[0].name)), ConflictingTaxRule)
|
||||
|
||||
def validate_use_for_shopping_cart(self):
|
||||
'''If shopping cart is enabled and no tax rule exists for shopping cart, enable this one'''
|
||||
if (not self.use_for_shopping_cart
|
||||
and cint(frappe.db.get_single_value('Shopping Cart Settings', 'enabled'))
|
||||
and not frappe.db.get_value('Tax Rule', {'use_for_shopping_cart': 1, 'name': ['!=', self.name]})):
|
||||
|
||||
self.use_for_shopping_cart = 1
|
||||
frappe.msgprint(_("Enabling 'Use for Shopping Cart', as Shopping Cart is enabled and there should be at least one Tax Rule for Shopping Cart"))
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_party_details(party, party_type, args=None):
|
||||
out = {}
|
||||
@@ -109,11 +119,11 @@ def get_party_details(party, party_type, args=None):
|
||||
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}')
|
||||
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":
|
||||
if key=="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))))
|
||||
|
||||
@@ -142,7 +142,7 @@ def make_round_off_gle(gl_map, debit_credit_diff):
|
||||
|
||||
round_off_gle = frappe._dict()
|
||||
for k in ["voucher_type", "voucher_no", "company",
|
||||
"posting_date", "remarks", "fiscal_year", "is_opening"]:
|
||||
"posting_date", "remarks", "is_opening"]:
|
||||
round_off_gle[k] = gl_map[0][k]
|
||||
|
||||
round_off_gle.update({
|
||||
|
||||
@@ -60,6 +60,7 @@ frappe.pages["Accounts Browser"].on_page_load = function(wrapper){
|
||||
chart_area.get(0), wrapper.page);
|
||||
})
|
||||
|
||||
wrapper.$company_select.change();
|
||||
}
|
||||
|
||||
frappe.pages["Accounts Browser"].on_page_show = function(wrapper){
|
||||
|
||||
@@ -299,8 +299,12 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
|
||||
else:
|
||||
args.update(get_party_details(party, party_type))
|
||||
|
||||
if party_type=="Customer":
|
||||
if party_type in ("Customer", "Lead"):
|
||||
args.update({"tax_type": "Sales"})
|
||||
|
||||
if party_type=='Lead':
|
||||
args['customer'] = None
|
||||
del args['lead']
|
||||
else:
|
||||
args.update({"tax_type": "Purchase"})
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
|
||||
</div>
|
||||
<h2 class="text-center">{%= __(report.report_name) %}</h2>
|
||||
<h4 class="text-center">{%= filters.account && (filters.account + ", ") || "" %} {%= filters.company %}</h4>
|
||||
<h4 class="text-center">{%= filters.customer || filters.supplier %} </h4>
|
||||
<h5 class="text-center">
|
||||
{%= filters.ageing_based_on %}
|
||||
{%= __("Until") %}
|
||||
@@ -31,40 +31,37 @@
|
||||
{% for(var i=0, l=data.length; i<l; i++) { %}
|
||||
<tr>
|
||||
{% if(__(report.report_name) == "Accounts Receivable" || __(report.report_name) == "Accounts Payable") { %}
|
||||
{% if(data[i][__("Posting Date")]) { %}
|
||||
{% if(data[i][__("Customer")] || data[i][__("Supplier")]) { %}
|
||||
<td>{%= dateutil.str_to_user(data[i][__("Posting Date")]) %}</td>
|
||||
<td>{%= data[i][__("Voucher Type")] %}
|
||||
<br>{%= data[i][__("Voucher No")] %}</td>
|
||||
<td>{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
|
||||
{% if(__(report.report_name) == "Accounts Receivable") { %}
|
||||
<br>{%= __("Territory") %}: {%= data[i][__("Territory")] %}
|
||||
{% } else { %}
|
||||
<br>{%= __("Supplier Type") %}: {%= data[i][__("Supplier Type")] %}
|
||||
{% } %}
|
||||
<td>{%= data[i][__("Customer Name")] || data[i][__("Customer")] || data[i][__("Supplier Name")] || data[i][__("Supplier")] %}
|
||||
<br>{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Invoiced Amount")]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Paid Amount")]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Outstanding Amount")]) %}</td>
|
||||
<td style="text-align: right">
|
||||
{%= format_currency(data[i][__("Invoiced Amount")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">
|
||||
{%= format_currency(data[i][__("Paid Amount")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">
|
||||
{%= format_currency(data[i][__("Outstanding Amount")], data[i]["currency"]) %}</td>
|
||||
{% } else { %}
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><b>{%= data[i][__("Customer")] || data[i][__("Supplier")] || " " %}</b></td>
|
||||
<td><b>{%= __("Total") %}</b></td>
|
||||
<td style="text-align: right">
|
||||
{%= data[i][__("Account")] && format_currency(data[i][__("Invoiced Amount")]) %}</td>
|
||||
{%= format_currency(data[i][__("Invoiced Amount")]) %}</td>
|
||||
<td style="text-align: right">
|
||||
{%= data[i][__("Account")] && format_currency(data[i][__("Paid Amount")]) %}</td>
|
||||
{%= format_currency(data[i][__("Paid Amount")]) %}</td>
|
||||
<td style="text-align: right">
|
||||
{%= data[i][__("Account")] && format_currency(data[i][__("Outstanding Amount")]) %}</td>
|
||||
{%= format_currency(data[i][__("Outstanding Amount")]) %}</td>
|
||||
{% } %}
|
||||
{% } else { %}
|
||||
{% if(data[i][__("Customer")] || data[i][__("Supplier")]|| " ") { %}
|
||||
<td>{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
|
||||
{% if(__(report.report_name) == "Accounts Receivable Summary") { %}
|
||||
<br>{%= __("Territory") %}: {%= data[i][__("Territory")] %}
|
||||
{% } else { %}
|
||||
<br>{%= __("Supplier Type") %}: {%= data[i][__("Supplier Type")] %}
|
||||
{% } %}
|
||||
{% if((data[i][__("Customer")] || data[i][__("Supplier")]) != __("'Total'")) { %}
|
||||
<td>{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
|
||||
<br>{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}</td>
|
||||
{% } else { %}
|
||||
<td><b>{%= __("Total") %}</b></td>
|
||||
{% } %}
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Invoiced Amt")]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Paid Amt")]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Outstanding Amt")]) %}</td>
|
||||
|
||||
@@ -58,21 +58,19 @@ class ReceivablePayableReport(object):
|
||||
"width": 120
|
||||
})
|
||||
|
||||
columns.append({
|
||||
"fieldname": "currency",
|
||||
"label": _("Currency"),
|
||||
"fieldtype": "Data",
|
||||
"width": 100
|
||||
})
|
||||
if args.get("party_type") == "Customer":
|
||||
columns += [_("Territory") + ":Link/Territory:80"]
|
||||
if args.get("party_type") == "Supplier":
|
||||
columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
|
||||
columns += [
|
||||
{
|
||||
"fieldname": "currency",
|
||||
"label": _("Currency"),
|
||||
"fieldtype": "Data",
|
||||
"width": 100,
|
||||
"hidden": 1
|
||||
},
|
||||
_("Remarks") + "::200"
|
||||
]
|
||||
|
||||
|
||||
columns.append(_("Remarks") + "::200")
|
||||
|
||||
return columns
|
||||
|
||||
def get_data(self, party_naming_by, args):
|
||||
@@ -120,17 +118,17 @@ class ReceivablePayableReport(object):
|
||||
row += get_ageing_data(cint(self.filters.range1), cint(self.filters.range2),
|
||||
cint(self.filters.range3), self.age_as_on, entry_date, outstanding_amount)
|
||||
|
||||
if self.filters.get(scrub(args.get("party_type"))):
|
||||
row.append(gle.account_currency)
|
||||
else:
|
||||
row.append(company_currency)
|
||||
|
||||
# customer territory / supplier type
|
||||
if args.get("party_type") == "Customer":
|
||||
row += [self.get_territory(gle.party)]
|
||||
if args.get("party_type") == "Supplier":
|
||||
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)
|
||||
|
||||
|
||||
@@ -18,18 +18,25 @@ class AccountsReceivableSummary(ReceivablePayableReport):
|
||||
columns += [ args.get("party_type") + " Name::140"]
|
||||
|
||||
columns += [
|
||||
_("Total Invoiced Amt") + ":Currency:140",
|
||||
_("Total Paid Amt") + ":Currency:140",
|
||||
_("Total Outstanding Amt") + ":Currency:160",
|
||||
"0-" + str(self.filters.range1) + ":Currency:100",
|
||||
str(self.filters.range1) + "-" + str(self.filters.range2) + ":Currency:100",
|
||||
str(self.filters.range2) + "-" + str(self.filters.range3) + ":Currency:100",
|
||||
str(self.filters.range3) + _("-Above") + ":Currency:100"]
|
||||
_("Total Invoiced Amt") + ":Currency/currency:140",
|
||||
_("Total Paid Amt") + ":Currency/currency:140",
|
||||
_("Total Outstanding Amt") + ":Currency/currency:160",
|
||||
"0-" + str(self.filters.range1) + ":Currency/currency:100",
|
||||
str(self.filters.range1) + "-" + str(self.filters.range2) + ":Currency/currency:100",
|
||||
str(self.filters.range2) + "-" + str(self.filters.range3) + ":Currency/currency:100",
|
||||
str(self.filters.range3) + _("-Above") + ":Currency/currency:100"]
|
||||
|
||||
if args.get("party_type") == "Customer":
|
||||
columns += [_("Territory") + ":Link/Territory:80"]
|
||||
if args.get("party_type") == "Supplier":
|
||||
columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
|
||||
|
||||
columns.append({
|
||||
"fieldname": "currency",
|
||||
"label": _("Currency"),
|
||||
"fieldtype": "Data",
|
||||
"width": 80
|
||||
})
|
||||
|
||||
return columns
|
||||
|
||||
@@ -53,6 +60,8 @@ class AccountsReceivableSummary(ReceivablePayableReport):
|
||||
row += [self.get_territory(party)]
|
||||
if args.get("party_type") == "Supplier":
|
||||
row += [self.get_supplier_type(party)]
|
||||
|
||||
row.append(party_dict.currency)
|
||||
data.append(row)
|
||||
|
||||
return data
|
||||
@@ -73,6 +82,8 @@ class AccountsReceivableSummary(ReceivablePayableReport):
|
||||
)
|
||||
for k in party_total[d.party].keys():
|
||||
party_total[d.party][k] += d.get(k, 0)
|
||||
|
||||
party_total[d.party].currency = d.currency
|
||||
|
||||
return party_total
|
||||
|
||||
@@ -90,7 +101,7 @@ class AccountsReceivableSummary(ReceivablePayableReport):
|
||||
cols += ["bill_no", "bill_date"]
|
||||
|
||||
cols += ["invoiced_amt", "paid_amt",
|
||||
"outstanding_amt", "age", "range1", "range2", "range3", "range4"]
|
||||
"outstanding_amt", "age", "range1", "range2", "range3", "range4", "currency"]
|
||||
|
||||
if args.get("party_type") == "Supplier":
|
||||
cols += ["supplier_type", "remarks"]
|
||||
|
||||
@@ -19,7 +19,7 @@ def execute(filters=None):
|
||||
|
||||
data = []
|
||||
data.extend(asset or [])
|
||||
data.extend(liability or [])
|
||||
data.extend(liability or [])
|
||||
data.extend(equity or [])
|
||||
if provisional_profit_loss:
|
||||
data.append(provisional_profit_loss)
|
||||
@@ -43,11 +43,11 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
|
||||
for period in period_list:
|
||||
effective_liability = 0.0
|
||||
if liability:
|
||||
effective_liability += flt(liability[-2][period.key])
|
||||
effective_liability += flt(liability[-2].get(period.key))
|
||||
if equity:
|
||||
effective_liability += flt(equity[-2][period.key])
|
||||
effective_liability += flt(equity[-2].get(period.key))
|
||||
|
||||
provisional_profit_loss[period.key] = flt(asset[-2][period.key]) - effective_liability
|
||||
provisional_profit_loss[period.key] = flt(asset[-2].get(period.key)) - effective_liability
|
||||
|
||||
if provisional_profit_loss[period.key]:
|
||||
has_value = True
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
"doctype": "Report",
|
||||
"idx": 1,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2015-11-02 12:32:02.048551",
|
||||
"modified": "2016-04-04 17:27:19.104519",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Delivered Items To Be Billed",
|
||||
"owner": "Administrator",
|
||||
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project_name` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`base_amount` - ifnull((select sum(base_amount) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc",
|
||||
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t`tabDelivery Note Item`.`billed_amt` as \"Pending Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n `tabDelivery Note`.per_billed < 100\norder by `tabDelivery Note`.`name` desc",
|
||||
"ref_doctype": "Sales Invoice",
|
||||
"report_name": "Delivered Items To Be Billed",
|
||||
"report_type": "Query Report"
|
||||
|
||||
@@ -92,7 +92,7 @@ def get_data(company, root_type, balance_must_be, period_list,
|
||||
if not accounts:
|
||||
return None
|
||||
|
||||
accounts, accounts_by_name = filter_accounts(accounts)
|
||||
accounts, accounts_by_name, parent_children_map = filter_accounts(accounts)
|
||||
|
||||
company_currency = frappe.db.get_value("Company", company, "default_currency")
|
||||
|
||||
@@ -109,6 +109,7 @@ def get_data(company, root_type, balance_must_be, period_list,
|
||||
calculate_values(accounts_by_name, gl_entries_by_account, period_list, accumulated_values)
|
||||
accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values)
|
||||
out = prepare_data(accounts, balance_must_be, period_list, company_currency)
|
||||
out = filter_out_zero_value_rows(out, parent_children_map)
|
||||
|
||||
if out:
|
||||
add_total_row(out, balance_must_be, period_list, company_currency)
|
||||
@@ -134,15 +135,15 @@ def accumulate_values_into_parents(accounts, accounts_by_name, period_list, accu
|
||||
d.get(period.key, 0.0)
|
||||
|
||||
def prepare_data(accounts, balance_must_be, period_list, company_currency):
|
||||
out = []
|
||||
data = []
|
||||
year_start_date = period_list[0]["year_start_date"].strftime("%Y-%m-%d")
|
||||
year_end_date = period_list[-1]["year_end_date"].strftime("%Y-%m-%d")
|
||||
|
||||
|
||||
for d in accounts:
|
||||
# add to output
|
||||
has_value = False
|
||||
total = 0
|
||||
row = {
|
||||
row = frappe._dict({
|
||||
"account_name": d.account_name,
|
||||
"account": d.name,
|
||||
"parent_account": d.parent_account,
|
||||
@@ -150,7 +151,7 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
|
||||
"year_start_date": year_start_date,
|
||||
"year_end_date": year_end_date,
|
||||
"currency": company_currency
|
||||
}
|
||||
})
|
||||
for period in period_list:
|
||||
if d.get(period.key):
|
||||
# change sign based on Debit or Credit, since calculation is done using (debit - credit)
|
||||
@@ -163,11 +164,27 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
|
||||
has_value = True
|
||||
total += flt(row[period.key])
|
||||
|
||||
if has_value:
|
||||
row["total"] = total
|
||||
out.append(row)
|
||||
row["has_value"] = has_value
|
||||
row["total"] = total
|
||||
data.append(row)
|
||||
|
||||
return data
|
||||
|
||||
def filter_out_zero_value_rows(data, parent_children_map, show_zero_values=False):
|
||||
data_with_value = []
|
||||
for d in data:
|
||||
if show_zero_values or d.get("has_value"):
|
||||
data_with_value.append(d)
|
||||
else:
|
||||
# show group with zero balance, if there are balances against child
|
||||
children = [child.name for child in parent_children_map.get(d.get("account")) or []]
|
||||
if children:
|
||||
for row in data:
|
||||
if row.get("account") in children and row.get("has_value"):
|
||||
data_with_value.append(d)
|
||||
break
|
||||
|
||||
return out
|
||||
return data_with_value
|
||||
|
||||
def add_total_row(out, balance_must_be, period_list, company_currency):
|
||||
total_row = {
|
||||
@@ -187,10 +204,11 @@ def add_total_row(out, balance_must_be, period_list, company_currency):
|
||||
total_row["total"] += flt(row["total"])
|
||||
row["total"] = ""
|
||||
|
||||
out.append(total_row)
|
||||
if total_row.has_key("total"):
|
||||
out.append(total_row)
|
||||
|
||||
# blank row after Total
|
||||
out.append({})
|
||||
# blank row after Total
|
||||
out.append({})
|
||||
|
||||
def get_accounts(company, root_type):
|
||||
return frappe.db.sql("""select name, parent_account, lft, rgt, root_type, report_type, account_name from `tabAccount`
|
||||
@@ -218,7 +236,7 @@ def filter_accounts(accounts, depth=10):
|
||||
|
||||
add_to_list(None, 0)
|
||||
|
||||
return filtered_accounts, accounts_by_name
|
||||
return filtered_accounts, accounts_by_name, parent_children_map
|
||||
|
||||
def sort_root_accounts(roots):
|
||||
"""Sort root types as Asset, Liability, Equity, Income, Expense"""
|
||||
|
||||
@@ -9,7 +9,7 @@ from frappe.utils import flt
|
||||
def execute(filters=None):
|
||||
if not filters: filters = frappe._dict()
|
||||
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
|
||||
|
||||
|
||||
gross_profit_data = GrossProfitGenerator(filters)
|
||||
|
||||
data = []
|
||||
@@ -18,8 +18,8 @@ def execute(filters=None):
|
||||
group_wise_columns = frappe._dict({
|
||||
"invoice": ["parent", "customer", "posting_date","item_code", "item_name","item_group", "brand", "description", \
|
||||
"warehouse", "qty", "base_rate", "buying_rate", "base_amount",
|
||||
"buying_amount", "gross_profit", "gross_profit_percent", "project_name"],
|
||||
"item_code": ["item_code", "item_name", "brand", "description", "warehouse", "qty", "base_rate",
|
||||
"buying_amount", "gross_profit", "gross_profit_percent", "project"],
|
||||
"item_code": ["item_code", "item_name", "brand", "description", "qty", "base_rate",
|
||||
"buying_rate", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
|
||||
"warehouse": ["warehouse", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
|
||||
"gross_profit", "gross_profit_percent"],
|
||||
@@ -35,7 +35,7 @@ def execute(filters=None):
|
||||
"gross_profit", "gross_profit_percent"],
|
||||
"sales_person": ["sales_person", "allocated_amount", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
|
||||
"gross_profit", "gross_profit_percent"],
|
||||
"project": ["project_name", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
|
||||
"project": ["project", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
|
||||
"territory": ["territory", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"]
|
||||
})
|
||||
|
||||
@@ -45,7 +45,7 @@ def execute(filters=None):
|
||||
row = []
|
||||
for col in group_wise_columns.get(scrub(filters.group_by)):
|
||||
row.append(src.get(col))
|
||||
|
||||
|
||||
row.append(company_currency)
|
||||
data.append(row)
|
||||
|
||||
@@ -70,7 +70,7 @@ def get_columns(group_wise_columns, filters):
|
||||
"buying_amount": _("Buying Amount") + ":Currency/currency",
|
||||
"gross_profit": _("Gross Profit") + ":Currency/currency",
|
||||
"gross_profit_percent": _("Gross Profit %") + ":Percent",
|
||||
"project_name": _("Project") + ":Link/Project",
|
||||
"project": _("Project") + ":Link/Project",
|
||||
"sales_person": _("Sales person"),
|
||||
"allocated_amount": _("Allocated Amount") + ":Currency/currency",
|
||||
"customer": _("Customer") + ":Link/Customer",
|
||||
@@ -80,7 +80,7 @@ def get_columns(group_wise_columns, filters):
|
||||
|
||||
for col in group_wise_columns.get(scrub(filters.group_by)):
|
||||
columns.append(column_map.get(col))
|
||||
|
||||
|
||||
columns.append({
|
||||
"fieldname": "currency",
|
||||
"label" : _("Currency"),
|
||||
@@ -145,11 +145,11 @@ class GrossProfitGenerator(object):
|
||||
self.data.append(row)
|
||||
|
||||
if self.grouped:
|
||||
self.collapse_group()
|
||||
self.get_average_rate_based_on_group_by()
|
||||
else:
|
||||
self.grouped_data = []
|
||||
|
||||
def collapse_group(self):
|
||||
def get_average_rate_based_on_group_by(self):
|
||||
# sum buying / selling totals for group
|
||||
self.grouped_data = []
|
||||
for key in self.grouped.keys():
|
||||
@@ -166,6 +166,8 @@ class GrossProfitGenerator(object):
|
||||
if new_row.base_amount else 0
|
||||
new_row.buying_rate = (new_row.buying_amount / new_row.qty) \
|
||||
if new_row.qty else 0
|
||||
new_row.base_rate = (new_row.base_amount / new_row.qty) \
|
||||
if new_row.qty else 0
|
||||
|
||||
self.grouped_data.append(new_row)
|
||||
|
||||
@@ -233,7 +235,7 @@ class GrossProfitGenerator(object):
|
||||
conditions += " and posting_date <= %(to_date)s"
|
||||
|
||||
self.si_list = frappe.db.sql("""select item.parenttype, item.parent,
|
||||
si.posting_date, si.posting_time, si.project_name, si.update_stock,
|
||||
si.posting_date, si.posting_time, si.project, si.update_stock,
|
||||
si.customer, si.customer_group, si.territory,
|
||||
item.item_code, item.item_name, item.description, item.warehouse,
|
||||
item.item_group, item.brand, item.dn_detail, item.delivery_note,
|
||||
|
||||
@@ -16,6 +16,14 @@ def execute(filters=None):
|
||||
if item_list:
|
||||
item_tax, tax_accounts = get_tax_accounts(item_list, columns)
|
||||
|
||||
columns.append({
|
||||
"fieldname": "currency",
|
||||
"label": _("Currency"),
|
||||
"fieldtype": "Data",
|
||||
"width": 80
|
||||
})
|
||||
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
|
||||
print company_currency
|
||||
data = []
|
||||
for d in item_list:
|
||||
purchase_receipt = None
|
||||
@@ -27,14 +35,14 @@ def execute(filters=None):
|
||||
|
||||
expense_account = d.expense_account or aii_account_map.get(d.company)
|
||||
row = [d.item_code, d.item_name, d.item_group, d.parent, d.posting_date, d.supplier,
|
||||
d.supplier_name, d.credit_to, d.project_name, d.company, d.purchase_order,
|
||||
d.supplier_name, d.credit_to, d.project, d.company, d.purchase_order,
|
||||
purchase_receipt, expense_account, d.qty, d.base_net_rate, d.base_net_amount]
|
||||
|
||||
for tax in tax_accounts:
|
||||
row.append(item_tax.get(d.parent, {}).get(d.item_code, {}).get(tax, 0))
|
||||
|
||||
total_tax = sum(row[last_col:])
|
||||
row += [total_tax, d.base_net_amount + total_tax]
|
||||
row += [total_tax, d.base_net_amount + total_tax, company_currency]
|
||||
|
||||
data.append(row)
|
||||
|
||||
@@ -48,7 +56,8 @@ def get_columns():
|
||||
"Supplier Name::120", "Payable Account:Link/Account:120", _("Project") + ":Link/Project:80",
|
||||
_("Company") + ":Link/Company:100", _("Purchase Order") + ":Link/Purchase Order:100",
|
||||
_("Purchase Receipt") + ":Link/Purchase Receipt:100", _("Expense Account") + ":Link/Account:140",
|
||||
_("Qty") + ":Float:120", _("Rate") + ":Currency:120", _("Amount") + ":Currency:120"]
|
||||
_("Qty") + ":Float:120", _("Rate") + ":Currency/currency:120", _("Amount") + ":Currency/currency:120"
|
||||
]
|
||||
|
||||
def get_conditions(filters):
|
||||
conditions = ""
|
||||
@@ -69,7 +78,7 @@ def get_items(filters):
|
||||
|
||||
return frappe.db.sql("""select pi_item.parent, pi.posting_date, pi.credit_to, pi.company,
|
||||
pi.supplier, pi.remarks, pi.base_net_total, pi_item.item_code, pi_item.item_name, pi_item.item_group,
|
||||
pi_item.project_name, pi_item.purchase_order, pi_item.purchase_receipt, pi_item.po_detail,
|
||||
pi_item.project, pi_item.purchase_order, pi_item.purchase_receipt, pi_item.po_detail,
|
||||
pi_item.expense_account, pi_item.qty, pi_item.base_net_rate, pi_item.base_net_amount, pi.supplier_name
|
||||
from `tabPurchase Invoice` pi, `tabPurchase Invoice Item` pi_item
|
||||
where pi.name = pi_item.parent and pi.docstatus = 1 %s %s
|
||||
@@ -110,7 +119,7 @@ def get_tax_accounts(item_list, columns):
|
||||
(tax_amount * d.base_net_amount) / d.base_net_total
|
||||
|
||||
tax_accounts.sort()
|
||||
columns += [account_head + ":Currency:80" for account_head in tax_accounts]
|
||||
columns += ["Total Tax:Currency:80", "Total:Currency:80"]
|
||||
columns += [account_head + ":Currency/currency:80" for account_head in tax_accounts]
|
||||
columns += ["Total Tax:Currency/currency:80", "Total:Currency/currency:80"]
|
||||
|
||||
return item_tax, tax_accounts
|
||||
|
||||
@@ -14,7 +14,14 @@ def execute(filters=None):
|
||||
item_list = get_items(filters)
|
||||
if item_list:
|
||||
item_tax, tax_accounts = get_tax_accounts(item_list, columns)
|
||||
|
||||
columns.append({
|
||||
"fieldname": "currency",
|
||||
"label": _("Currency"),
|
||||
"fieldtype": "Data",
|
||||
"width": 80
|
||||
})
|
||||
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
|
||||
|
||||
data = []
|
||||
for d in item_list:
|
||||
delivery_note = None
|
||||
@@ -25,14 +32,14 @@ def execute(filters=None):
|
||||
from `tabDelivery Note Item` where docstatus=1 and so_detail=%s""", d.so_detail))
|
||||
|
||||
row = [d.item_code, d.item_name, d.item_group, d.parent, d.posting_date, d.customer, d.customer_name,
|
||||
d.customer_group, d.debit_to, d.territory, d.project_name, d.company, d.sales_order,
|
||||
d.customer_group, d.debit_to, d.territory, d.project, d.company, d.sales_order,
|
||||
delivery_note, d.income_account, d.qty, d.base_net_rate, d.base_net_amount]
|
||||
|
||||
for tax in tax_accounts:
|
||||
row.append(item_tax.get(d.parent, {}).get(d.item_code, {}).get(tax, 0))
|
||||
|
||||
total_tax = sum(row[last_col:])
|
||||
row += [total_tax, d.base_net_amount + total_tax]
|
||||
row += [total_tax, d.base_net_amount + total_tax, company_currency]
|
||||
|
||||
data.append(row)
|
||||
|
||||
@@ -48,7 +55,7 @@ def get_columns():
|
||||
_("Project") + ":Link/Project:80", _("Company") + ":Link/Company:100",
|
||||
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
|
||||
_("Income Account") + ":Link/Account:140", _("Qty") + ":Float:120",
|
||||
_("Rate") + ":Currency:120", _("Amount") + ":Currency:120"
|
||||
_("Rate") + ":Currency/currency:120", _("Amount") + ":Currency/currency:120"
|
||||
]
|
||||
|
||||
def get_conditions(filters):
|
||||
@@ -66,7 +73,7 @@ def get_conditions(filters):
|
||||
|
||||
def get_items(filters):
|
||||
conditions = get_conditions(filters)
|
||||
return frappe.db.sql("""select si_item.parent, si.posting_date, si.debit_to, si.project_name,
|
||||
return frappe.db.sql("""select si_item.parent, si.posting_date, si.debit_to, si.project,
|
||||
si.customer, si.remarks, si.territory, si.company, si.base_net_total, si_item.item_code, si_item.item_name,
|
||||
si_item.item_group, si_item.sales_order, si_item.delivery_note, si_item.income_account,
|
||||
si_item.qty, si_item.base_net_rate, si_item.base_net_amount, si.customer_name,
|
||||
@@ -108,7 +115,7 @@ def get_tax_accounts(item_list, columns):
|
||||
flt((tax_amount * d.base_net_amount) / d.base_net_total)
|
||||
|
||||
tax_accounts.sort()
|
||||
columns += [account_head + ":Currency:80" for account_head in tax_accounts]
|
||||
columns += ["Total Tax:Currency:80", "Total:Currency:80"]
|
||||
columns += [account_head + ":Currency/currency:80" for account_head in tax_accounts]
|
||||
columns += ["Total Tax:Currency/currency:80", "Total:Currency/currency:80"]
|
||||
|
||||
return item_tax, tax_accounts
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
"doctype": "Report",
|
||||
"idx": 1,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2016-02-23 18:48:42.372321",
|
||||
"modified": "2016-04-01 08:26:43.868609",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Ordered Items To Be Billed",
|
||||
"owner": "Administrator",
|
||||
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.base_amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order`.`company` as \"Company:Link/Company:\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Closed\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.amount,0)\norder by `tabSales Order`.transaction_date asc",
|
||||
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.base_amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order`.`company` as \"Company:Link/Company:\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Closed\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.amount,0)\norder by `tabSales Order`.transaction_date asc",
|
||||
"ref_doctype": "Sales Invoice",
|
||||
"report_name": "Ordered Items To Be Billed",
|
||||
"report_type": "Query Report"
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
"doctype": "Report",
|
||||
"idx": 1,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2016-02-23 18:51:21.968327",
|
||||
"modified": "2016-04-01 08:27:32.122070",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Order Items To Be Billed",
|
||||
"owner": "Administrator",
|
||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t(`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1))) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n\t`tabPurchase Order`.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Closed\"\n\tand (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1)) < ifnull(`tabPurchase Order Item`.base_amount, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t(`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1))) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n\t`tabPurchase Order`.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Closed\"\n\tand (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1)) < ifnull(`tabPurchase Order Item`.base_amount, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||
"ref_doctype": "Purchase Invoice",
|
||||
"report_name": "Purchase Order Items To Be Billed",
|
||||
"report_type": "Query Report"
|
||||
|
||||
@@ -21,18 +21,20 @@ def execute(filters=None):
|
||||
invoice_expense_map, expense_accounts)
|
||||
invoice_po_pr_map = get_invoice_po_pr_map(invoice_list)
|
||||
supplier_details = get_supplier_deatils(invoice_list)
|
||||
|
||||
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
|
||||
|
||||
data = []
|
||||
for inv in invoice_list:
|
||||
# invoice details
|
||||
purchase_order = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_order", [])))
|
||||
purchase_receipt = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_receipt", [])))
|
||||
project_name = list(set(invoice_po_pr_map.get(inv.name, {}).get("project_name", [])))
|
||||
project = list(set(invoice_po_pr_map.get(inv.name, {}).get("project", [])))
|
||||
|
||||
row = [inv.name, inv.posting_date, inv.supplier, inv.supplier_name,
|
||||
supplier_details.get(inv.supplier),
|
||||
inv.credit_to, ", ".join(project_name), inv.bill_no, inv.bill_date, inv.remarks,
|
||||
", ".join(purchase_order), ", ".join(purchase_receipt)]
|
||||
inv.credit_to, ", ".join(project), inv.bill_no, inv.bill_date, inv.remarks,
|
||||
", ".join(purchase_order), ", ".join(purchase_receipt), company_currency]
|
||||
|
||||
# map expense values
|
||||
base_net_total = 0
|
||||
@@ -62,10 +64,19 @@ def execute(filters=None):
|
||||
def get_columns(invoice_list):
|
||||
"""return columns based on filters"""
|
||||
columns = [
|
||||
_("Invoice") + ":Link/Purchase Invoice:120", _("Posting Date") + ":Date:80", _("Supplier Id") + "::120",
|
||||
_("Supplier Name") + "::120", _("Supplier Type") + ":Link/Supplier Type:120", _("Payable Account") + ":Link/Account:120",
|
||||
_("Project") + ":Link/Project:80", _("Bill No") + "::120", _("Bill Date") + ":Date:80", _("Remarks") + "::150",
|
||||
_("Purchase Order") + ":Link/Purchase Order:100", _("Purchase Receipt") + ":Link/Purchase Receipt:100"
|
||||
_("Invoice") + ":Link/Purchase Invoice:120",
|
||||
_("Posting Date") + ":Date:80", _("Supplier Id") + "::120",
|
||||
_("Supplier Name") + "::120", _("Supplier Type") + ":Link/Supplier Type:120",
|
||||
_("Payable Account") + ":Link/Account:120", _("Project") + ":Link/Project:80",
|
||||
_("Bill No") + "::120", _("Bill Date") + ":Date:80", _("Remarks") + "::150",
|
||||
_("Purchase Order") + ":Link/Purchase Order:100",
|
||||
_("Purchase Receipt") + ":Link/Purchase Receipt:100",
|
||||
{
|
||||
"fieldname": "currency",
|
||||
"label": _("Currency"),
|
||||
"fieldtype": "Data",
|
||||
"width": 80
|
||||
}
|
||||
]
|
||||
expense_accounts = tax_accounts = expense_columns = tax_columns = []
|
||||
|
||||
@@ -84,14 +95,14 @@ def get_columns(invoice_list):
|
||||
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]))
|
||||
|
||||
|
||||
expense_columns = [(account + ":Currency:120") for account in expense_accounts]
|
||||
expense_columns = [(account + ":Currency/currency:120") for account in expense_accounts]
|
||||
for account in tax_accounts:
|
||||
if account not in expense_accounts:
|
||||
tax_columns.append(account + ":Currency:120")
|
||||
tax_columns.append(account + ":Currency/currency:120")
|
||||
|
||||
columns = columns + expense_columns + [_("Net Total") + ":Currency:120"] + tax_columns + \
|
||||
[_("Total Tax") + ":Currency:120", _("Grand Total") + ":Currency:120",
|
||||
_("Rounded Total") + ":Currency:120", _("Outstanding Amount") + ":Currency:120"]
|
||||
columns = columns + expense_columns + [_("Net Total") + ":Currency/currency:120"] + tax_columns + \
|
||||
[_("Total Tax") + ":Currency/currency:120", _("Grand Total") + ":Currency/currency:120",
|
||||
_("Rounded Total") + ":Currency/currency:120", _("Outstanding Amount") + ":Currency/currency:120"]
|
||||
|
||||
return columns, expense_accounts, tax_accounts
|
||||
|
||||
@@ -146,7 +157,7 @@ def get_invoice_tax_map(invoice_list, invoice_expense_map, expense_accounts):
|
||||
|
||||
def get_invoice_po_pr_map(invoice_list):
|
||||
pi_items = frappe.db.sql("""select parent, purchase_order, purchase_receipt, po_detail,
|
||||
project_name from `tabPurchase Invoice Item` where parent in (%s)
|
||||
project from `tabPurchase Invoice Item` where parent in (%s)
|
||||
and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')""" %
|
||||
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
|
||||
|
||||
@@ -166,9 +177,9 @@ def get_invoice_po_pr_map(invoice_list):
|
||||
if pr_list:
|
||||
invoice_po_pr_map.setdefault(d.parent, frappe._dict()).setdefault("purchase_receipt", pr_list)
|
||||
|
||||
if d.project_name:
|
||||
if d.project:
|
||||
invoice_po_pr_map.setdefault(d.parent, frappe._dict()).setdefault(
|
||||
"project_name", []).append(d.project_name)
|
||||
"project", []).append(d.project)
|
||||
|
||||
return invoice_po_pr_map
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
"doctype": "Report",
|
||||
"idx": 1,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2015-11-02 12:33:11.681513",
|
||||
"modified": "2016-04-04 17:27:29.449124",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Received Items To Be Billed",
|
||||
"owner": "Administrator",
|
||||
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project_name` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`qty` - ifnull((select sum(qty) from `tabPurchase Invoice Item` \n\t where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n\t `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Qty:Float:110\",\n\t(`tabPurchase Receipt Item`.`base_amount` - ifnull((select sum(base_amount) \n from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and `tabPurchase Receipt`.status != \"Closed\" and \n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n (`tabPurchase Receipt Item`.qty > ifnull((select sum(qty) from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus=1 and \n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\norder by `tabPurchase Receipt`.`name` desc",
|
||||
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t`tabPurchase Receipt Item`.`billed_amt` as \"Pending Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and `tabPurchase Receipt`.status != \"Closed\" and \n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n `tabPurchase Receipt`.per_billed < 100\norder by `tabPurchase Receipt`.`name` desc",
|
||||
"ref_doctype": "Purchase Invoice",
|
||||
"report_name": "Received Items To Be Billed",
|
||||
"report_type": "Query Report"
|
||||
|
||||
@@ -22,6 +22,7 @@ def execute(filters=None):
|
||||
|
||||
invoice_so_dn_map = get_invoice_so_dn_map(invoice_list)
|
||||
customer_map = get_customer_deatils(invoice_list)
|
||||
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
|
||||
|
||||
data = []
|
||||
for inv in invoice_list:
|
||||
@@ -32,7 +33,8 @@ def execute(filters=None):
|
||||
row = [inv.name, inv.posting_date, inv.customer, inv.customer_name,
|
||||
customer_map.get(inv.customer, {}).get("customer_group"),
|
||||
customer_map.get(inv.customer, {}).get("territory"),
|
||||
inv.debit_to, inv.project_name, inv.remarks, ", ".join(sales_order), ", ".join(delivery_note)]
|
||||
inv.debit_to, inv.project, inv.remarks,
|
||||
", ".join(sales_order), ", ".join(delivery_note), company_currency]
|
||||
|
||||
# map income values
|
||||
base_net_total = 0
|
||||
@@ -66,7 +68,13 @@ def get_columns(invoice_list):
|
||||
_("Invoice") + ":Link/Sales Invoice:120", _("Posting Date") + ":Date:80", _("Customer Id") + "::120",
|
||||
_("Customer Name") + "::120", _("Customer Group") + ":Link/Customer Group:120", _("Territory") + ":Link/Territory:80",
|
||||
_("Receivable Account") + ":Link/Account:120", _("Project") +":Link/Project:80", _("Remarks") + "::150",
|
||||
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100"
|
||||
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
|
||||
{
|
||||
"fieldname": "currency",
|
||||
"label": _("Currency"),
|
||||
"fieldtype": "Data",
|
||||
"width": 80
|
||||
}
|
||||
]
|
||||
|
||||
income_accounts = tax_accounts = income_columns = tax_columns = []
|
||||
@@ -83,14 +91,14 @@ def get_columns(invoice_list):
|
||||
and parent in (%s) order by account_head""" %
|
||||
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]))
|
||||
|
||||
income_columns = [(account + ":Currency:120") for account in income_accounts]
|
||||
income_columns = [(account + ":Currency/currency:120") for account in income_accounts]
|
||||
for account in tax_accounts:
|
||||
if account not in income_accounts:
|
||||
tax_columns.append(account + ":Currency:120")
|
||||
tax_columns.append(account + ":Currency/currency:120")
|
||||
|
||||
columns = columns + income_columns + [_("Net Total") + ":Currency:120"] + tax_columns + \
|
||||
[_("Total Tax") + ":Currency:120", _("Grand Total") + ":Currency:120",
|
||||
_("Rounded Total") + ":Currency:120", _("Outstanding Amount") + ":Currency:120"]
|
||||
columns = columns + income_columns + [_("Net Total") + ":Currency/currency:120"] + tax_columns + \
|
||||
[_("Total Tax") + ":Currency/currency:120", _("Grand Total") + ":Currency/currency:120",
|
||||
_("Rounded Total") + ":Currency/currency:120", _("Outstanding Amount") + ":Currency/currency:120"]
|
||||
|
||||
return columns, income_accounts, tax_accounts
|
||||
|
||||
@@ -107,7 +115,7 @@ def get_conditions(filters):
|
||||
|
||||
def get_invoices(filters):
|
||||
conditions = get_conditions(filters)
|
||||
return frappe.db.sql("""select name, posting_date, debit_to, project_name, customer,
|
||||
return frappe.db.sql("""select name, posting_date, debit_to, project, customer,
|
||||
customer_name, remarks, base_net_total, base_grand_total, base_rounded_total, outstanding_amount
|
||||
from `tabSales Invoice`
|
||||
where docstatus = 1 %s order by posting_date desc, name desc""" %
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import cint, flt, getdate, formatdate, cstr
|
||||
from erpnext.accounts.report.financial_statements import filter_accounts, set_gl_entries_by_account
|
||||
from frappe.utils import flt, getdate, formatdate, cstr
|
||||
from erpnext.accounts.report.financial_statements \
|
||||
import filter_accounts, set_gl_entries_by_account, filter_out_zero_value_rows
|
||||
|
||||
value_fields = ("opening_debit", "opening_credit", "debit", "credit", "closing_debit", "closing_credit")
|
||||
|
||||
@@ -56,7 +57,7 @@ def get_data(filters):
|
||||
if not accounts:
|
||||
return None
|
||||
|
||||
accounts, accounts_by_name = filter_accounts(accounts)
|
||||
accounts, accounts_by_name, parent_children_map = filter_accounts(accounts)
|
||||
|
||||
min_lft, max_rgt = frappe.db.sql("""select min(lft), max(rgt) from `tabAccount`
|
||||
where company=%s""", (filters.company,))[0]
|
||||
@@ -71,8 +72,10 @@ def get_data(filters):
|
||||
total_row = calculate_values(accounts, gl_entries_by_account, opening_balances, filters)
|
||||
accumulate_values_into_parents(accounts, accounts_by_name)
|
||||
|
||||
data = prepare_data(accounts, filters, total_row)
|
||||
|
||||
data = prepare_data(accounts, filters, total_row, parent_children_map)
|
||||
data = filter_out_zero_value_rows(data, parent_children_map,
|
||||
show_zero_values=filters.get("show_zero_values"))
|
||||
|
||||
return data
|
||||
|
||||
def get_opening_balances(filters):
|
||||
@@ -156,10 +159,8 @@ def accumulate_values_into_parents(accounts, accounts_by_name):
|
||||
for key in value_fields:
|
||||
accounts_by_name[d.parent_account][key] += d[key]
|
||||
|
||||
def prepare_data(accounts, filters, total_row):
|
||||
show_zero_values = cint(filters.show_zero_values)
|
||||
def prepare_data(accounts, filters, total_row, parent_children_map):
|
||||
data = []
|
||||
accounts_with_zero_value = []
|
||||
for d in accounts:
|
||||
has_value = False
|
||||
row = {
|
||||
@@ -174,18 +175,15 @@ def prepare_data(accounts, filters, total_row):
|
||||
prepare_opening_and_closing(d)
|
||||
|
||||
for key in value_fields:
|
||||
row[key] = d.get(key, 0.0)
|
||||
if row[key]:
|
||||
row[key] = flt(d.get(key, 0.0), 3)
|
||||
|
||||
if abs(row[key]) >= 0.005:
|
||||
# ignore zero values
|
||||
has_value = True
|
||||
|
||||
if show_zero_values:
|
||||
data.append(row)
|
||||
else:
|
||||
if not has_value:
|
||||
accounts_with_zero_value.append(d.name)
|
||||
elif d.parent_account not in accounts_with_zero_value:
|
||||
data.append(row)
|
||||
|
||||
row["has_value"] = has_value
|
||||
data.append(row)
|
||||
|
||||
data.extend([{},total_row])
|
||||
|
||||
return data
|
||||
|
||||
@@ -16,10 +16,10 @@ class FiscalYearError(frappe.ValidationError): pass
|
||||
class BudgetError(frappe.ValidationError): pass
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_fiscal_year(date=None, fiscal_year=None, label="Date", verbose=1, company=None):
|
||||
return get_fiscal_years(date, fiscal_year, label, verbose, company)[0]
|
||||
def get_fiscal_year(date=None, fiscal_year=None, label="Date", verbose=1, company=None, as_dict=False):
|
||||
return get_fiscal_years(date, fiscal_year, label, verbose, company, as_dict=as_dict)[0]
|
||||
|
||||
def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verbose=1, company=None):
|
||||
def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verbose=1, company=None, as_dict=False):
|
||||
# if year start date is 2012-04-01, year end date should be 2013-03-31 (hence subdate)
|
||||
cond = " disabled = 0"
|
||||
if fiscal_year:
|
||||
@@ -36,10 +36,10 @@ def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verb
|
||||
"fiscal_year": fiscal_year,
|
||||
"transaction_date": transaction_date,
|
||||
"company": company
|
||||
})
|
||||
}, as_dict=as_dict)
|
||||
|
||||
if not fy:
|
||||
error_msg = _("""{0} {1} not in any active Fiscal Year. For more details check {2}.""").format(label, formatdate(transaction_date), "https://erpnext.com/kb/accounts/fiscal-year-error")
|
||||
error_msg = _("""{0} {1} not in any active Fiscal Year. For more details check {2}.""").format(label, formatdate(transaction_date), "https://frappe.github.io/erpnext/user/manual/en/accounts/articles/fiscal-year-error")
|
||||
if verbose==1: frappe.msgprint(error_msg)
|
||||
raise FiscalYearError, error_msg
|
||||
return fy
|
||||
@@ -106,7 +106,7 @@ def get_balance_on(account=None, date=None, party_type=None, party=None, in_acco
|
||||
in_account_currency = False
|
||||
else:
|
||||
cond.append("""gle.account = "%s" """ % (frappe.db.escape(account, percent=False), ))
|
||||
|
||||
|
||||
if party_type and party:
|
||||
cond.append("""gle.party_type = "%s" and gle.party = "%s" """ %
|
||||
(frappe.db.escape(party_type), frappe.db.escape(party, percent=False)))
|
||||
@@ -479,7 +479,7 @@ def get_outstanding_invoices(party_type, party, account, condition=None):
|
||||
return outstanding_invoices
|
||||
|
||||
|
||||
def get_account(account_type=None, root_type=None, is_group=None, account_currency=None, company=None):
|
||||
def get_account_name(account_type=None, root_type=None, is_group=None, account_currency=None, company=None):
|
||||
"""return account based on matching conditions"""
|
||||
return frappe.db.get_value("Account", {
|
||||
"account_type": account_type or '',
|
||||
@@ -488,4 +488,3 @@ def get_account(account_type=None, root_type=None, is_group=None, account_curren
|
||||
"account_currency": account_currency or frappe.defaults.get_defaults().currency,
|
||||
"company": company or frappe.defaults.get_defaults().company
|
||||
}, "name")
|
||||
|
||||
@@ -142,14 +142,14 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
}
|
||||
},
|
||||
|
||||
project_name: function(doc, cdt, cdn) {
|
||||
project: function(doc, cdt, cdn) {
|
||||
var item = frappe.get_doc(cdt, cdn);
|
||||
if(item.project_name) {
|
||||
if(item.project) {
|
||||
$.each(this.frm.doc["items"] || [],
|
||||
function(i, other_item) {
|
||||
if(!other_item.project_name) {
|
||||
other_item.project_name = item.project_name;
|
||||
refresh_field("project_name", other_item.name, other_item.parentfield);
|
||||
if(!other_item.project) {
|
||||
other_item.project = item.project;
|
||||
refresh_field("project", other_item.name, other_item.parentfield);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -170,10 +170,35 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
this.frm.add_custom_button(__("Product Bundle"), function() {
|
||||
erpnext.buying.get_items_from_product_bundle(me.frm);
|
||||
}, __("Get items from"));
|
||||
},
|
||||
|
||||
shipping_address: function(){
|
||||
var me = this;
|
||||
|
||||
this.frm.set_query("shipping_address", function(){
|
||||
if(me.frm.doc.customer){
|
||||
return{
|
||||
filters:{
|
||||
"customer": me.frm.doc.customer
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
return{
|
||||
filters:{
|
||||
"is_your_company_address": 1,
|
||||
"company": me.frm.doc.company
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
erpnext.utils.get_address_display(this.frm, "shipping_address",
|
||||
"shipping_address_display", is_your_company_address=true)
|
||||
}
|
||||
});
|
||||
|
||||
cur_frm.add_fetch('project_name', 'cost_center', 'cost_center');
|
||||
cur_frm.add_fetch('project', 'cost_center', 'cost_center');
|
||||
|
||||
erpnext.buying.get_default_bom = function(frm) {
|
||||
$.each(frm.doc["items"] || [], function(i, d) {
|
||||
|
||||
@@ -43,11 +43,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
||||
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) {
|
||||
cur_frm.add_custom_button(__('Close'), this.close_purchase_order, __("Status"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(is_drop_ship && doc.status!="Delivered"){
|
||||
cur_frm.add_custom_button(__('Delivered'),
|
||||
this.delivered_by_supplier, __("Status"));
|
||||
@@ -243,7 +240,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['items'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
|
||||
cur_frm.fields_dict['items'].grid.get_field('project').get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
filters:[
|
||||
['Project', 'status', 'not in', 'Completed, Cancelled']
|
||||
|
||||
@@ -191,104 +191,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_email",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Email",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -499,33 +401,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "customer_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"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,
|
||||
@@ -553,31 +428,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "customer_address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Address Display",
|
||||
"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,
|
||||
@@ -654,6 +504,254 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"fieldname": "section_addresses",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address and Contact",
|
||||
"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": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Select Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"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": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
"depends_on": "",
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_email",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"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_break_address",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 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,
|
||||
"depends_on": "",
|
||||
"fieldname": "shipping_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Select Shipping Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"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": "shipping_address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Shipping Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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,
|
||||
@@ -1845,105 +1943,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"depends_on": "supplier",
|
||||
"fieldname": "contact_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Details",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "icon-bullhorn",
|
||||
"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": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"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": "cb_contact",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 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": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -1997,33 +1996,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "fiscal_year",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Fiscal Year",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "fiscal_year",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Fiscal Year",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@@ -2396,7 +2368,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"allow_on_submit": 1,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "is_recurring",
|
||||
@@ -2502,7 +2474,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"allow_on_submit": 1,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
|
||||
@@ -2518,7 +2490,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
@@ -2685,7 +2657,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "is_recurring",
|
||||
@@ -2703,7 +2675,7 @@
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
@@ -2721,7 +2693,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-03-02 07:12:18.785730",
|
||||
"modified": "2016-03-21 13:13:07.334625",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Purchase Order",
|
||||
|
||||
@@ -58,7 +58,7 @@ class PurchaseOrder(BuyingController):
|
||||
},
|
||||
"Supplier Quotation Item": {
|
||||
"ref_dn_field": "supplier_quotation_item",
|
||||
"compare_fields": [["rate", "="], ["project_name", "="], ["item_code", "="]],
|
||||
"compare_fields": [["rate", "="], ["project", "="], ["item_code", "="]],
|
||||
"is_child_table": True
|
||||
}
|
||||
})
|
||||
@@ -171,8 +171,6 @@ class PurchaseOrder(BuyingController):
|
||||
if self.is_against_so():
|
||||
self.update_status_updater()
|
||||
|
||||
super(PurchaseOrder, self).on_submit()
|
||||
|
||||
purchase_controller = frappe.get_doc("Purchase Common")
|
||||
|
||||
self.update_prevdoc_status()
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"conversion_rate": 1.0,
|
||||
"currency": "INR",
|
||||
"doctype": "Purchase Order",
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"base_grand_total": 5000.0,
|
||||
"grand_total": 5000.0,
|
||||
"is_subcontracted": "Yes",
|
||||
@@ -40,7 +39,6 @@
|
||||
"conversion_rate": 1.0,
|
||||
"currency": "INR",
|
||||
"doctype": "Purchase Order",
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"base_grand_total": 5000.0,
|
||||
"grand_total": 5000.0,
|
||||
"is_subcontracted": "No",
|
||||
|
||||
@@ -934,14 +934,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Project",
|
||||
@@ -1384,7 +1384,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-02-22 09:33:02.405537",
|
||||
"modified": "2016-03-18 05:08:54.505417",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Purchase Order Item",
|
||||
|
||||
@@ -46,7 +46,7 @@ cur_frm.cscript.uom = function(doc, cdt, cdn) {
|
||||
// no need to trigger updation of stock uom, as this field doesn't exist in supplier quotation
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['items'].grid.get_field('project_name').get_query =
|
||||
cur_frm.fields_dict['items'].grid.get_field('project').get_query =
|
||||
function(doc, cdt, cdn) {
|
||||
return{
|
||||
filters:[
|
||||
|
||||
@@ -139,103 +139,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_email",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Email",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -343,6 +246,178 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"fieldname": "address_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address and Contact",
|
||||
"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": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"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": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"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": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"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": "contact_email",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Email",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -1487,82 +1562,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"depends_on": "supplier",
|
||||
"fieldname": "contact_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Details",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "icon-bullhorn",
|
||||
"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": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"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": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -1720,32 +1719,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"default": "No",
|
||||
"fieldname": "is_subcontracted",
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Is Subcontracted",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "\nYes\nNo",
|
||||
"permlevel": 0,
|
||||
"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,
|
||||
@@ -1773,26 +1746,25 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "fiscal_year",
|
||||
"fieldtype": "Link",
|
||||
"default": "No",
|
||||
"fieldname": "is_subcontracted",
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Fiscal Year",
|
||||
"label": "Is Subcontracted",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "fiscal_year",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Fiscal Year",
|
||||
"options": "\nYes\nNo",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
}
|
||||
@@ -1808,7 +1780,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-03-02 05:09:20.534046",
|
||||
"modified": "2016-03-16 15:36:05.481917",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Supplier Quotation",
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"conversion_rate": 1.0,
|
||||
"currency": "INR",
|
||||
"doctype": "Supplier Quotation",
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"base_grand_total": 5000.0,
|
||||
"grand_total": 5000.0,
|
||||
"is_subcontracted": "No",
|
||||
|
||||
@@ -803,14 +803,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Project",
|
||||
@@ -1046,7 +1046,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-02-22 09:36:18.864207",
|
||||
"modified": "2016-03-18 05:15:03.936587",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Supplier Quotation Item",
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
"doctype": "Report",
|
||||
"idx": 1,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2016-02-22 11:27:39.445257",
|
||||
"modified": "2016-04-01 08:26:52.361800",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Item-wise Purchase History",
|
||||
"owner": "Administrator",
|
||||
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n po_item.item_group as \"Item Group:Link/Item Group:120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n sup.supplier_name as \"Supplier Name::150\",\n\tpo_item.project_name as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item, `tabSupplier` sup\nwhere\n\tpo.name = po_item.parent and po.supplier = sup.name and po.docstatus = 1\norder by po.name desc",
|
||||
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n po_item.item_group as \"Item Group:Link/Item Group:120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n sup.supplier_name as \"Supplier Name::150\",\n\tpo_item.project as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item, `tabSupplier` sup\nwhere\n\tpo.name = po_item.parent and po.supplier = sup.name and po.docstatus = 1\norder by po.name desc",
|
||||
"ref_doctype": "Purchase Order",
|
||||
"report_name": "Item-wise Purchase History",
|
||||
"report_type": "Query Report"
|
||||
|
||||
5
erpnext/change_log/v6/v6_25_0.md
Normal file
@@ -0,0 +1,5 @@
|
||||
- Improved logic to hide accounts with zero values in Balance Sheet and Profit & Loss
|
||||
- Item Code or Warehouse filter mandatory in Stock Balance Report
|
||||
- For Item table print, combine Item Code, Item Name, Description and additional columns in Description only if **Compact Item Print** is checked in **Features Setup**
|
||||
- **Disable 'In Words'** from all documents via Setup > Global Settings
|
||||
- Bug fix: Paid Amount in POS view when the default Mode of Payment is not Cash
|
||||
5
erpnext/change_log/v6/v6_26_0.md
Normal file
@@ -0,0 +1,5 @@
|
||||
- Fiscal Year has been removed from Transactions
|
||||
- Holiday List based on From Date and To Date
|
||||
- Valuation Rate and Gross Profit in Sales Order Item row
|
||||
- Shopify sync status will be logged in Shopify Log
|
||||
- Item Code or Warehouse filter mandatory in Stock Balance Report, if number of Stock Ledger Entries is greater than 500000
|
||||
3
erpnext/change_log/v6/v6_27_0.md
Normal file
@@ -0,0 +1,3 @@
|
||||
- New Grouping in Module Pages
|
||||
- Shipping Address in purchase cycle
|
||||
- Improved Leave Application workflow
|
||||
@@ -4,14 +4,8 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"icon": "icon-star",
|
||||
"label": _("Billing"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Journal Entry",
|
||||
"description": _("Accounting journal entries.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Sales Invoice",
|
||||
@@ -22,6 +16,59 @@ def get_data():
|
||||
"name": "Purchase Invoice",
|
||||
"description": _("Bills raised by Suppliers.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Payment Request",
|
||||
"description": _("Payment Request")
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Accounts Receivable",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Accounts Payable",
|
||||
"doctype": "Purchase Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
"label": _("Company and Accounts"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Company",
|
||||
"description": _("Company (not Customer or Supplier) master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Journal Entry",
|
||||
"description": _("Accounting journal entries.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Accounts Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Chart of Accounts"),
|
||||
"route": "Accounts Browser/Account",
|
||||
"description": _("Tree of financial accounts."),
|
||||
"doctype": "Account",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name":"General Ledger",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Masters"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Customer",
|
||||
@@ -34,93 +81,76 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Payment Request",
|
||||
"description": _("Payment Request")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Accounts Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Chart of Accounts"),
|
||||
"route": "Accounts Browser/Account",
|
||||
"description": _("Tree of financial accounts."),
|
||||
"doctype": "Account",
|
||||
"name": "Item",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"label": _("Accounting Statements"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Bank Reconciliation",
|
||||
"description": _("Update bank payment dates with journals.")
|
||||
"type": "report",
|
||||
"name": "Trial Balance",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Payment Reconciliation",
|
||||
"description": _("Match non-linked Invoices and Payments.")
|
||||
"type": "report",
|
||||
"name": "Balance Sheet",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Period Closing Voucher",
|
||||
"description": _("Close Balance Sheet and book Profit or Loss.")
|
||||
"type": "report",
|
||||
"name": "Cash Flow",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Profit and Loss Statement",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Banking and Payments"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Payment Tool",
|
||||
"description": _("Create Payment Entries against Orders or Invoices.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"label": _("Update Bank Transaction Dates"),
|
||||
"name": "Bank Reconciliation",
|
||||
"description": _("Update bank payment dates with journals.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"label": _("Match Payments with Invoices"),
|
||||
"name": "Payment Reconciliation",
|
||||
"description": _("Match non-linked Invoices and Payments.")
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Bank Reconciliation Statement",
|
||||
"is_query_report": True,
|
||||
"doctype": "Journal Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Bank Clearance Summary",
|
||||
"is_query_report": True,
|
||||
"doctype": "Journal Entry"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
"label": _("Taxes"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Company",
|
||||
"description": _("Company (not Customer or Supplier) master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Fiscal Year",
|
||||
"description": _("Financial / accounting year.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Payment Gateway Account",
|
||||
"description": _("Setup Gateway accounts.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Accounts Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Chart of Accounts"),
|
||||
"route": "Accounts Browser/Account",
|
||||
"description": _("Tree of financial accounts."),
|
||||
"doctype": "Account",
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Accounts Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Chart of Cost Centers"),
|
||||
"route": "Accounts Browser/Cost Center",
|
||||
"description": _("Tree of financial Cost Centers."),
|
||||
"doctype": "Cost Center",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Accounts Settings",
|
||||
"description": _("Default settings for accounting transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Tax Rule",
|
||||
"description": _("Tax Rule for transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Sales Taxes and Charges Template",
|
||||
@@ -133,19 +163,71 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "POS Profile",
|
||||
"label": _("Point-of-Sale Profile"),
|
||||
"description": _("Rules to calculate shipping amount for a sale")
|
||||
"name": "Tax Rule",
|
||||
"description": _("Tax Rule for transactions.")
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Sales Register",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Purchase Register",
|
||||
"doctype": "Purchase Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Budget and Cost Center"),
|
||||
"items": [
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Accounts Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Chart of Cost Centers"),
|
||||
"route": "Accounts Browser/Cost Center",
|
||||
"description": _("Tree of financial Cost Centers."),
|
||||
"doctype": "Cost Center",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Budget Variance Report",
|
||||
"is_query_report": True,
|
||||
"doctype": "Cost Center"
|
||||
},
|
||||
{
|
||||
"type":"doctype",
|
||||
"name": "Monthly Distribution",
|
||||
"description": _("Seasonality for setting budgets, targets etc.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Period Closing Voucher",
|
||||
"description": _("Close Balance Sheet and book Profit or Loss.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Accounts Settings",
|
||||
"description": _("Default settings for accounting transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Shipping Rule",
|
||||
"description": _("Rules for adding shipping costs.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Pricing Rule",
|
||||
"description": _("Rules for applying pricing and discount.")
|
||||
"name": "Fiscal Year",
|
||||
"description": _("Financial / accounting year.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@@ -158,9 +240,15 @@ def get_data():
|
||||
"description": _("Currency exchange rate master.")
|
||||
},
|
||||
{
|
||||
"type":"doctype",
|
||||
"name": "Monthly Distribution",
|
||||
"description": _("Seasonality for setting budgets, targets etc.")
|
||||
"type": "doctype",
|
||||
"name": "Payment Gateway Account",
|
||||
"description": _("Setup Gateway accounts.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "POS Profile",
|
||||
"label": _("Point-of-Sale Profile"),
|
||||
"description": _("Rules to calculate shipping amount for a sale")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@@ -182,93 +270,8 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Main Reports"),
|
||||
"icon": "icon-table",
|
||||
"label": _("To Bill"),
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"name":"General Ledger",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Trial Balance",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Trial Balance for Party",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Gross Profit",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Accounts Receivable",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Accounts Payable",
|
||||
"doctype": "Purchase Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Sales Register",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Purchase Register",
|
||||
"doctype": "Purchase Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Balance Sheet",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Cash Flow",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Profit and Loss Statement",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "financial-analytics",
|
||||
"label": _("Financial Analytics"),
|
||||
"icon": "icon-bar-chart",
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Bank Reconciliation Statement",
|
||||
"is_query_report": True,
|
||||
"doctype": "Journal Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Ordered Items To Be Billed",
|
||||
@@ -293,11 +296,47 @@ def get_data():
|
||||
"is_query_report": True,
|
||||
"doctype": "Purchase Invoice"
|
||||
},
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
"label": _("Analytics"),
|
||||
"items": [
|
||||
{
|
||||
"type": "page",
|
||||
"name": "financial-analytics",
|
||||
"label": _("Financial Analytics"),
|
||||
"icon": "icon-bar-chart",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Bank Clearance Summary",
|
||||
"name": "Gross Profit",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Purchase Invoice Trends",
|
||||
"is_query_report": True,
|
||||
"doctype": "Purchase Invoice"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Sales Invoice Trends",
|
||||
"is_query_report": True,
|
||||
"doctype": "Sales Invoice"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Other Reports"),
|
||||
"icon": "icon-table",
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Trial Balance for Party",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
"doctype": "Journal Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
@@ -323,24 +362,6 @@ def get_data():
|
||||
"is_query_report": True,
|
||||
"doctype": "Purchase Invoice"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Budget Variance Report",
|
||||
"is_query_report": True,
|
||||
"doctype": "Cost Center"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Purchase Invoice Trends",
|
||||
"is_query_report": True,
|
||||
"doctype": "Purchase Invoice"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Sales Invoice Trends",
|
||||
"is_query_report": True,
|
||||
"doctype": "Sales Invoice"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Accounts Receivable Summary",
|
||||
|
||||
@@ -4,14 +4,9 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"label": _("Purchasing"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Supplier",
|
||||
"description": _("Supplier database."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Material Request",
|
||||
@@ -27,6 +22,21 @@ def get_data():
|
||||
"name": "Purchase Order",
|
||||
"description": _("Purchase Orders given to Suppliers."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Supplier"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Supplier",
|
||||
"description": _("Supplier database."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Supplier Type",
|
||||
"description": _("Supplier Type master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Contact",
|
||||
@@ -37,11 +47,7 @@ def get_data():
|
||||
"name": "Address",
|
||||
"description": _("All Addresses."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
"description": _("All Products or Services."),
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -53,20 +59,6 @@ def get_data():
|
||||
"name": "Buying Settings",
|
||||
"description": _("Default settings for buying transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Supplier Type",
|
||||
"description": _("Supplier Type master.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Item Group Tree"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name":"Terms and Conditions",
|
||||
@@ -78,11 +70,35 @@ def get_data():
|
||||
"name": "Purchase Taxes and Charges Template",
|
||||
"description": _("Tax template for buying transactions.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Items and Pricing"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
"description": _("All Products or Services."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Product Bundle",
|
||||
"description": _("Bundle items at time of sale."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Price List",
|
||||
"description": _("Price List master.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Item Group"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Price",
|
||||
@@ -94,10 +110,11 @@ def get_data():
|
||||
"name": "Pricing Rule",
|
||||
"description": _("Rules for applying pricing and discount.")
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Main Reports"),
|
||||
"label": _("Analytics"),
|
||||
"icon": "icon-table",
|
||||
"items": [
|
||||
{
|
||||
@@ -106,10 +123,22 @@ def get_data():
|
||||
"label": _("Purchase Analytics"),
|
||||
"icon": "icon-bar-chart",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Supplier-Wise Sales Analytics",
|
||||
"doctype": "Stock Ledger Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Purchase Order Trends",
|
||||
"doctype": "Purchase Order"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Other Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
@@ -136,24 +165,12 @@ def get_data():
|
||||
"name": "Item-wise Purchase History",
|
||||
"doctype": "Item"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Purchase Order Trends",
|
||||
"doctype": "Purchase Order"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Supplier Addresses and Contacts",
|
||||
"doctype": "Supplier"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Supplier-Wise Sales Analytics",
|
||||
"doctype": "Stock Ledger Entry"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"label": _("Sales Pipeline"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
@@ -13,19 +13,55 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Customer",
|
||||
"description": _("Customer database."),
|
||||
"name": "Opportunity",
|
||||
"description": _("Potential opportunities for selling."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Opportunity",
|
||||
"description": _("Potential opportunities for selling."),
|
||||
"name": "Customer",
|
||||
"description": _("Customer database."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Contact",
|
||||
"description": _("All Contacts."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
"type": "page",
|
||||
"name": "sales-funnel",
|
||||
"label": _("Sales Funnel"),
|
||||
"icon": "icon-bar-chart",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Lead Details",
|
||||
"doctype": "Lead"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Customer Addresses and Contacts",
|
||||
"doctype": "Contact"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Inactive Customers",
|
||||
"doctype": "Sales Order"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Communication"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Newsletter",
|
||||
@@ -38,22 +74,6 @@ def get_data():
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Center",
|
||||
"description":_("Send mass SMS to your contacts"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Log",
|
||||
"description":_("Logs for maintaining sms delivery status"),
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
@@ -95,47 +115,27 @@ def get_data():
|
||||
"name": "Newsletter List",
|
||||
"description": _("Newsletter Mailing List"),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("SMS"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Center",
|
||||
"description":_("Send mass SMS to your contacts"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Log",
|
||||
"description":_("Logs for maintaining sms delivery status"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Settings",
|
||||
"description": _("Setup SMS gateway settings")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Main Reports"),
|
||||
"icon": "icon-table",
|
||||
"items": [
|
||||
{
|
||||
"type": "page",
|
||||
"name": "sales-funnel",
|
||||
"label": _("Sales Funnel"),
|
||||
"icon": "icon-bar-chart",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Lead Details",
|
||||
"doctype": "Lead"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Customer Addresses and Contacts",
|
||||
"doctype": "Contact"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Customers Not Buying Since Long Time",
|
||||
"doctype": "Sales Order"
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -9,6 +9,13 @@ def get_data():
|
||||
"icon": "octicon octicon-repo",
|
||||
"type": "module"
|
||||
},
|
||||
{
|
||||
"module_name": "Stock",
|
||||
"color": "#f39c12",
|
||||
"icon": "icon-truck",
|
||||
"icon": "octicon octicon-package",
|
||||
"type": "module"
|
||||
},
|
||||
{
|
||||
"module_name": "CRM",
|
||||
"color": "#EF4DB6",
|
||||
@@ -60,13 +67,6 @@ def get_data():
|
||||
"icon": "octicon octicon-rocket",
|
||||
"type": "module"
|
||||
},
|
||||
{
|
||||
"module_name": "Stock",
|
||||
"color": "#f39c12",
|
||||
"icon": "icon-truck",
|
||||
"icon": "octicon octicon-package",
|
||||
"type": "module"
|
||||
},
|
||||
{
|
||||
"module_name": "Support",
|
||||
"color": "#2c3e50",
|
||||
|
||||
@@ -4,8 +4,7 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"icon": "icon-star",
|
||||
"label": _("Employee and Attendance"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
@@ -14,13 +13,10 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Application",
|
||||
"description": _("Applications for leave."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Expense Claim",
|
||||
"description": _("Claims for company expense."),
|
||||
"name": "Employee Attendance Tool",
|
||||
"label": _("Employee Attendance Tool"),
|
||||
"description":_("Mark Employee Attendance in Bulk"),
|
||||
"hide_count": True
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@@ -29,14 +25,15 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Salary Slip",
|
||||
"description": _("Monthly salary statement."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Appraisal",
|
||||
"description": _("Performance appraisal."),
|
||||
"name": "Upload Attendance",
|
||||
"description":_("Upload attendance from a .csv file"),
|
||||
"hide_count": True
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Recruitment"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Job Applicant",
|
||||
@@ -55,21 +52,50 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"label": _("Leaves and Holiday"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Employee Attendance Tool",
|
||||
"label": _("Employee Attendance Tool"),
|
||||
"description":_("Mark Employee Attendance in Bulk"),
|
||||
"name": "Leave Application",
|
||||
"description": _("Applications for leave."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name":"Leave Type",
|
||||
"description": _("Type of leaves like casual, sick etc."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Holiday List",
|
||||
"description": _("Holiday master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Allocation",
|
||||
"description": _("Allocate leaves for a period.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Control Panel",
|
||||
"label": _("Leave Allocation Tool"),
|
||||
"description":_("Allocate leaves for the year."),
|
||||
"hide_count": True
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Upload Attendance",
|
||||
"description":_("Upload attendance from a .csv file"),
|
||||
"hide_count": True
|
||||
"name": "Leave Block List",
|
||||
"description": _("Block leave applications by department.")
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Payroll"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Salary Slip",
|
||||
"description": _("Monthly salary statement."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@@ -78,14 +104,60 @@ def get_data():
|
||||
"description":_("Generate Salary Slips"),
|
||||
"hide_count": True
|
||||
},
|
||||
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Control Panel",
|
||||
"label": _("Leave Allocation Tool"),
|
||||
"description":_("Allocate leaves for the year."),
|
||||
"hide_count": True
|
||||
"name": "Salary Structure",
|
||||
"description": _("Salary template master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Earning Type",
|
||||
"description": _("Salary components.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Deduction Type",
|
||||
"description": _("Tax and other salary deductions.")
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Expense Claims"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Expense Claim",
|
||||
"description": _("Claims for company expense."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Expense Claim Type",
|
||||
"description": _("Types of Expense Claim.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Appraisals"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Appraisal",
|
||||
"description": _("Performance appraisal."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Appraisal Template",
|
||||
"description": _("Template for performance appraisals.")
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -117,60 +189,10 @@ def get_data():
|
||||
"name": "Designation",
|
||||
"description": _("Employee designation (e.g. CEO, Director etc.).")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Salary Structure",
|
||||
"description": _("Salary template master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Earning Type",
|
||||
"description": _("Salary components.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Deduction Type",
|
||||
"description": _("Tax and other salary deductions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Allocation",
|
||||
"description": _("Allocate leaves for a period.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name":"Leave Type",
|
||||
"description": _("Type of leaves like casual, sick etc."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Holiday List",
|
||||
"description": _("Holiday master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Block List",
|
||||
"description": _("Block leave applications by department.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Appraisal Template",
|
||||
"description": _("Template for performance appraisals.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Expense Claim Type",
|
||||
"description": _("Types of Expense Claim.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Email Account",
|
||||
"description": _("Setup incoming server for jobs email id. (e.g. jobs@example.com)")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
|
||||
@@ -4,25 +4,48 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"label": _("Production"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "BOM",
|
||||
"description": _("Bill of Materials (BOM)"),
|
||||
"label": _("Bill of Material")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Production Order",
|
||||
"description": _("Orders released for production."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Production Planning Tool",
|
||||
"description": _("Generate Material Requests (MRP) and Production Orders."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Stock Entry",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Time Log",
|
||||
"description": _("Time Logs for manufacturing."),
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Bill of Materials"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "BOM",
|
||||
"description": _("Bill of Materials (BOM)"),
|
||||
"label": _("Bill of Materials")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "bom-browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("BOM Browser"),
|
||||
"description": _("Tree of Bill of Materials"),
|
||||
"doctype": "BOM"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
@@ -45,24 +68,11 @@ def get_data():
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Production Planning Tool",
|
||||
"description": _("Generate Material Requests (MRP) and Production Orders."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "BOM Replace Tool",
|
||||
"description": _("Replace Item / BOM in all BOMs"),
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "bom-browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("BOM Browser"),
|
||||
"description": _("Tree of Bill of Materials"),
|
||||
"doctype": "BOM"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -76,7 +86,7 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
|
||||
@@ -4,19 +4,31 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"label": _("Projects"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Project",
|
||||
"description": _("Project master."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Task",
|
||||
"description": _("Project activity / task."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Project",
|
||||
"description": _("Project master."),
|
||||
"type": "report",
|
||||
"route": "Gantt/Task",
|
||||
"doctype": "Task",
|
||||
"name": "Gantt Chart",
|
||||
"description": _("Gantt chart of all tasks.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Time Tracking"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Time Log",
|
||||
@@ -40,20 +52,7 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"route": "Gantt/Task",
|
||||
"doctype": "Task",
|
||||
"name": "Gantt Chart",
|
||||
"description": _("Gantt chart of all tasks.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
|
||||
@@ -4,14 +4,9 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"label": _("Sales"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Customer",
|
||||
"description": _("Customer database."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Quotation",
|
||||
@@ -22,6 +17,25 @@ def get_data():
|
||||
"name": "Sales Order",
|
||||
"description": _("Confirmed orders from Customers."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Customers"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Customer",
|
||||
"description": _("Customer database."),
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"label": _("Customer Group"),
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"link": "Sales Browser/Customer Group",
|
||||
"description": _("Manage Customer Group Tree."),
|
||||
"doctype": "Customer Group",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Contact",
|
||||
@@ -32,57 +46,58 @@ def get_data():
|
||||
"name": "Address",
|
||||
"description": _("All Addresses."),
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Items and Pricing"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
"description": _("All Products or Services."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Center",
|
||||
"description":_("Send mass SMS to your contacts"),
|
||||
"name": "Product Bundle",
|
||||
"description": _("Bundle items at time of sale."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Log",
|
||||
"description":_("Logs for maintaining sms delivery status"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Newsletter",
|
||||
"description": _("Newsletters to contacts, leads."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Selling Settings",
|
||||
"description": _("Default settings for selling transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Campaign",
|
||||
"description": _("Sales campaigns."),
|
||||
"name": "Price List",
|
||||
"description": _("Price List master.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"label": _("Customer Group"),
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"link": "Sales Browser/Customer Group",
|
||||
"description": _("Manage Customer Group Tree."),
|
||||
"doctype": "Customer Group",
|
||||
"label": _("Item Group"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Price",
|
||||
"description": _("Multiple Item prices."),
|
||||
"route": "Report/Item Price"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Shipping Rule",
|
||||
"description": _("Rules for adding shipping costs.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Pricing Rule",
|
||||
"description": _("Rules for applying pricing and discount.")
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Sales Partners and Territory"),
|
||||
"items": [
|
||||
{
|
||||
"type": "page",
|
||||
"label": _("Territory"),
|
||||
@@ -107,13 +122,34 @@ def get_data():
|
||||
"doctype": "Sales Person",
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Item Group Tree"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Territory Target Variance (Item Group-Wise)",
|
||||
"route": "query-report/Territory Target Variance Item Group-Wise",
|
||||
"doctype": "Territory"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Sales Person Target Variance (Item Group-Wise)",
|
||||
"route": "query-report/Sales Person Target Variance Item Group-Wise",
|
||||
"doctype": "Sales Person",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Selling Settings",
|
||||
"description": _("Default settings for selling transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Campaign",
|
||||
"description": _("Sales campaigns."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@@ -126,51 +162,15 @@ def get_data():
|
||||
"name": "Sales Taxes and Charges Template",
|
||||
"description": _("Tax template for selling transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Shipping Rule",
|
||||
"description": _("Rules for adding shipping costs.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Price List",
|
||||
"description": _("Price List master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Price",
|
||||
"description": _("Multiple Item prices."),
|
||||
"route": "Report/Item Price"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Pricing Rule",
|
||||
"description": _("Rules for applying pricing and discount.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Product Bundle",
|
||||
"description": _("Bundle items at time of sale."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Email Account",
|
||||
"description": _("Setup incoming server for sales email id. (e.g. sales@example.com)")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Industry Type",
|
||||
"description": _("Track Leads by Industry Type.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Settings",
|
||||
"description": _("Setup SMS gateway settings")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Main Reports"),
|
||||
"label": _("Analytics"),
|
||||
"icon": "icon-table",
|
||||
"items": [
|
||||
{
|
||||
@@ -192,10 +192,22 @@ def get_data():
|
||||
"doctype": "Customer",
|
||||
"icon": "icon-bar-chart",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Quotation Trends",
|
||||
"doctype": "Quotation"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Sales Order Trends",
|
||||
"doctype": "Sales Order"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Other Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
@@ -228,20 +240,6 @@ def get_data():
|
||||
"name": "Item-wise Sales History",
|
||||
"doctype": "Item"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Territory Target Variance (Item Group-Wise)",
|
||||
"route": "query-report/Territory Target Variance Item Group-Wise",
|
||||
"doctype": "Territory"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Sales Person Target Variance (Item Group-Wise)",
|
||||
"route": "query-report/Sales Person Target Variance Item Group-Wise",
|
||||
"doctype": "Sales Person",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
@@ -251,19 +249,7 @@ def get_data():
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Customers Not Buying Since Long Time",
|
||||
"doctype": "Sales Order"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Quotation Trends",
|
||||
"doctype": "Quotation"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Sales Order Trends",
|
||||
"name": "Inactive Customers",
|
||||
"doctype": "Sales Order"
|
||||
},
|
||||
{
|
||||
@@ -286,6 +272,27 @@ def get_data():
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("SMS"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Center",
|
||||
"description":_("Send mass SMS to your contacts"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Log",
|
||||
"description":_("Logs for maintaining sms delivery status"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Settings",
|
||||
"description": _("Setup SMS gateway settings")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Help"),
|
||||
"items": [
|
||||
|
||||
@@ -4,19 +4,8 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"icon": "icon-star",
|
||||
"label": _("Stock Transactions"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
"description": _("All Products or Services."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Material Request",
|
||||
"description": _("Requests for items."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Stock Entry",
|
||||
@@ -34,14 +23,90 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Installation Note",
|
||||
"description": _("Installation record for a Serial No.")
|
||||
"name": "Material Request",
|
||||
"description": _("Requests for items."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Stock Reports"),
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Ledger",
|
||||
"doctype": "Stock Ledger Entry",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Balance",
|
||||
"doctype": "Stock Ledger Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Projected Qty",
|
||||
"doctype": "Item",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Ageing",
|
||||
"doctype": "Item",
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Items and Pricing"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
"description": _("All Products or Services."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Warehouse",
|
||||
"description": _("Where items are stored."),
|
||||
"name": "Product Bundle",
|
||||
"description": _("Bundle items at time of sale."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Price List",
|
||||
"description": _("Price List master.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Item Group"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Price",
|
||||
"description": _("Multiple Item prices."),
|
||||
"route": "Report/Item Price"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Shipping Rule",
|
||||
"description": _("Rules for adding shipping costs.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Pricing Rule",
|
||||
"description": _("Rules for applying pricing and discount.")
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Serial No and Batch"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Serial No",
|
||||
@@ -52,6 +117,26 @@ def get_data():
|
||||
"name": "Batch",
|
||||
"description": _("Batch (lot) of an Item."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Installation Note",
|
||||
"description": _("Installation record for a Serial No.")
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Service Contract Expiry",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Status",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Warranty Expiry",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -90,13 +175,9 @@ def get_data():
|
||||
"description": _("Default settings for stock transactions.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Item Group Tree"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
"type": "doctype",
|
||||
"name": "Warehouse",
|
||||
"description": _("Where items are stored."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@@ -106,60 +187,20 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Warehouse",
|
||||
"description": _("Warehouses.")
|
||||
"name": "Item Attribute",
|
||||
"description": _("Attributes for Item Variants. e.g Size, Color etc."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Brand",
|
||||
"description": _("Brand master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Price List",
|
||||
"description": _("Price List master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Price",
|
||||
"description": _("Multiple Item prices."),
|
||||
"route": "Report/Item Price"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Attribute",
|
||||
"description": _("Attributes for Item Variants. e.g Size, Color etc."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Main Reports"),
|
||||
"label": _("Analytics"),
|
||||
"icon": "icon-table",
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Ledger",
|
||||
"doctype": "Stock Ledger Entry",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Balance",
|
||||
"doctype": "Stock Ledger Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Projected Qty",
|
||||
"doctype": "Item",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Ageing",
|
||||
"doctype": "Item",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": False,
|
||||
@@ -171,11 +212,24 @@ def get_data():
|
||||
"name": "stock-analytics",
|
||||
"label": _("Stock Analytics"),
|
||||
"icon": "icon-bar-chart"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Delivery Note Trends",
|
||||
"doctype": "Delivery Note"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Purchase Receipt Trends",
|
||||
"doctype": "Purchase Receipt"
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
@@ -196,21 +250,6 @@ def get_data():
|
||||
"route": "Report/Bin/Item Shortage Report",
|
||||
"doctype": "Purchase Receipt"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Service Contract Expiry",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Status",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Warranty Expiry",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
@@ -235,18 +274,6 @@ def get_data():
|
||||
"name": "Itemwise Recommended Reorder Level",
|
||||
"doctype": "Item"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Delivery Note Trends",
|
||||
"doctype": "Delivery Note"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Purchase Receipt Trends",
|
||||
"doctype": "Purchase Receipt"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -4,8 +4,7 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"icon": "icon-star",
|
||||
"label": _("Issues"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
@@ -14,9 +13,14 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Warranty Claim",
|
||||
"description": _("Warranty Claim against Serial No."),
|
||||
"name": "Communication",
|
||||
"description": _("Communication log."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Maintenance"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Maintenance Schedule",
|
||||
@@ -28,14 +32,20 @@ def get_data():
|
||||
"description": _("Visit report for maintenance call."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Newsletter",
|
||||
"description": _("Newsletters to contacts, leads."),
|
||||
"type": "report",
|
||||
"name": "Maintenance Schedules",
|
||||
"is_query_report": True,
|
||||
"doctype": "Maintenance Schedule"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Warranty"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Communication",
|
||||
"description": _("Communication log."),
|
||||
"name": "Warranty Claim",
|
||||
"description": _("Warranty Claim against Serial No."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@@ -45,18 +55,7 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Email Account",
|
||||
"description": _("Setup incoming server for support email id. (e.g. support@example.com)")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
@@ -65,12 +64,6 @@ def get_data():
|
||||
"label": _("Support Analytics"),
|
||||
"icon": "icon-bar-chart"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Maintenance Schedules",
|
||||
"is_query_report": True,
|
||||
"doctype": "Maintenance Schedule"
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
@@ -42,17 +42,14 @@ class AccountsController(TransactionBase):
|
||||
if self.doctype in ("Sales Invoice", "Purchase Invoice") and not self.is_return:
|
||||
self.validate_due_date()
|
||||
|
||||
if self.meta.get_field("is_recurring"):
|
||||
validate_recurring_document(self)
|
||||
|
||||
if self.meta.get_field("taxes_and_charges"):
|
||||
self.validate_enabled_taxes_and_charges()
|
||||
|
||||
self.validate_party()
|
||||
self.validate_currency()
|
||||
|
||||
def on_submit(self):
|
||||
if self.meta.get_field("is_recurring"):
|
||||
|
||||
if self.meta.get_field("is_recurring") and not self.get("__islocal"):
|
||||
validate_recurring_document(self)
|
||||
convert_to_recurring(self, self.get("posting_date") or self.get("transaction_date"))
|
||||
|
||||
def on_update_after_submit(self):
|
||||
@@ -220,10 +217,10 @@ class AccountsController(TransactionBase):
|
||||
gl_dict = frappe._dict({
|
||||
'company': self.company,
|
||||
'posting_date': self.posting_date,
|
||||
'fiscal_year': get_fiscal_year(self.posting_date, company=self.company)[0],
|
||||
'voucher_type': self.doctype,
|
||||
'voucher_no': self.name,
|
||||
'remarks': self.get("remarks"),
|
||||
'fiscal_year': self.fiscal_year,
|
||||
'debit': 0,
|
||||
'credit': 0,
|
||||
'debit_in_account_currency': 0,
|
||||
|
||||
@@ -8,22 +8,22 @@ from frappe.utils import cint
|
||||
def print_settings_for_item_table(doc):
|
||||
|
||||
doc.print_templates = {
|
||||
"description": "templates/print_formats/includes/item_table_description.html",
|
||||
"qty": "templates/print_formats/includes/item_table_qty.html"
|
||||
}
|
||||
|
||||
doc.hide_in_print_layout = ["item_code", "item_name", "image", "uom", "stock_uom"]
|
||||
doc.hide_in_print_layout = ["uom", "stock_uom"]
|
||||
|
||||
doc.flags.compact_item_print = cint(frappe.db.get_value("Features Setup", None, "compact_item_print"))
|
||||
doc.flags.compact_item_fields = doc.hide_in_print_layout + ["description", "qty", "rate", "amount"]
|
||||
doc.flags.show_in_description = []
|
||||
|
||||
if doc.flags.compact_item_print:
|
||||
doc.print_templates["description"] = "templates/print_formats/includes/item_table_description.html"
|
||||
doc.hide_in_print_layout += ["item_code", "item_name", "image"]
|
||||
|
||||
doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"]
|
||||
doc.flags.show_in_description = []
|
||||
|
||||
for df in doc.meta.fields:
|
||||
if df.fieldtype not in ("Section Break", "Column Break", "Button"):
|
||||
if not doc.is_print_hide(df.fieldname):
|
||||
if df.fieldname not in doc.hide_in_print_layout and df.fieldname not in doc.flags.compact_item_fields:
|
||||
doc.hide_in_print_layout.append(df.fieldname)
|
||||
doc.flags.show_in_description.append(df.fieldname)
|
||||
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ def employee_query(doctype, txt, searchfield, start, page_len, filters):
|
||||
order by
|
||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||
if(locate(%(_txt)s, employee_name), locate(%(_txt)s, employee_name), 99999),
|
||||
idx desc,
|
||||
name, employee_name
|
||||
limit %(start)s, %(page_len)s""".format(**{
|
||||
'key': searchfield,
|
||||
@@ -64,6 +65,7 @@ def lead_query(doctype, txt, searchfield, start, page_len, filters):
|
||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||
if(locate(%(_txt)s, lead_name), locate(%(_txt)s, lead_name), 99999),
|
||||
if(locate(%(_txt)s, company_name), locate(%(_txt)s, company_name), 99999),
|
||||
idx desc,
|
||||
name, lead_name
|
||||
limit %(start)s, %(page_len)s""".format(**{
|
||||
'key': searchfield,
|
||||
@@ -94,6 +96,7 @@ def customer_query(doctype, txt, searchfield, start, page_len, filters):
|
||||
order by
|
||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||
if(locate(%(_txt)s, customer_name), locate(%(_txt)s, customer_name), 99999),
|
||||
idx desc,
|
||||
name, customer_name
|
||||
limit %(start)s, %(page_len)s""".format(**{
|
||||
"fields": fields,
|
||||
@@ -123,6 +126,7 @@ def supplier_query(doctype, txt, searchfield, start, page_len, filters):
|
||||
order by
|
||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||
if(locate(%(_txt)s, supplier_name), locate(%(_txt)s, supplier_name), 99999),
|
||||
idx desc,
|
||||
name, supplier_name
|
||||
limit %(start)s, %(page_len)s """.format(**{
|
||||
'field': fields,
|
||||
@@ -142,6 +146,7 @@ def tax_account_query(doctype, txt, searchfield, start, page_len, filters):
|
||||
and is_group = 0
|
||||
and company = %s
|
||||
and `%s` LIKE %s
|
||||
order by idx desc, name
|
||||
limit %s, %s""" %
|
||||
(", ".join(['%s']*len(filters.get("account_type"))), "%s", searchfield, "%s", "%s", "%s"),
|
||||
tuple(filters.get("account_type") + [filters.get("company"), "%%%s%%" % txt,
|
||||
@@ -176,10 +181,11 @@ def item_query(doctype, txt, searchfield, start, page_len, filters):
|
||||
order by
|
||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||
if(locate(%(_txt)s, item_name), locate(%(_txt)s, item_name), 99999),
|
||||
idx desc,
|
||||
name, item_name
|
||||
limit %(start)s, %(page_len)s """.format(key=searchfield,
|
||||
fcond=get_filters_cond(doctype, filters, conditions),
|
||||
mcond=get_match_cond(doctype)),
|
||||
fcond=get_filters_cond(doctype, filters, conditions).replace('%', '%%'),
|
||||
mcond=get_match_cond(doctype).replace('%', '%%')),
|
||||
{
|
||||
"today": nowdate(),
|
||||
"txt": "%%%s%%" % txt,
|
||||
@@ -195,11 +201,21 @@ def bom(doctype, txt, searchfield, start, page_len, filters):
|
||||
from tabBOM
|
||||
where tabBOM.docstatus=1
|
||||
and tabBOM.is_active=1
|
||||
and tabBOM.%(key)s like "%(txt)s"
|
||||
%(fcond)s %(mcond)s
|
||||
limit %(start)s, %(page_len)s """ % {'key': searchfield, 'txt': "%%%s%%" % frappe.db.escape(txt),
|
||||
'fcond': get_filters_cond(doctype, filters, conditions),
|
||||
'mcond':get_match_cond(doctype), 'start': start, 'page_len': page_len})
|
||||
and tabBOM.`{key}` like %(txt)s
|
||||
{fcond} {mcond}
|
||||
order by
|
||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||
idx desc, name
|
||||
limit %(start)s, %(page_len)s """.format(
|
||||
fcond=get_filters_cond(doctype, filters, conditions),
|
||||
mcond=get_match_cond(doctype),
|
||||
key=frappe.db.escape(searchfield)),
|
||||
{
|
||||
'txt': "%%%s%%" % frappe.db.escape(txt),
|
||||
'_txt': txt.replace("%", ""),
|
||||
'start': start,
|
||||
'page_len': page_len
|
||||
})
|
||||
|
||||
def get_project_name(doctype, txt, searchfield, start, page_len, filters):
|
||||
cond = ''
|
||||
@@ -208,10 +224,19 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters):
|
||||
|
||||
return frappe.db.sql("""select `tabProject`.name from `tabProject`
|
||||
where `tabProject`.status not in ("Completed", "Cancelled")
|
||||
and {cond} `tabProject`.name like %s {match_cond}
|
||||
order by `tabProject`.name asc
|
||||
limit {start}, {page_len}""".format(cond=cond, match_cond=get_match_cond(doctype),
|
||||
start=start, page_len=page_len), "%{0}%".format(txt))
|
||||
and {cond} `tabProject`.name like %(txt)s {match_cond}
|
||||
order by
|
||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||
idx desc,
|
||||
`tabProject`.name asc
|
||||
limit {start}, {page_len}""".format(
|
||||
cond=cond,
|
||||
match_cond=get_match_cond(doctype),
|
||||
start=start,
|
||||
page_len=page_len), {
|
||||
"txt": "%{0}%".format(txt),
|
||||
"_txt": txt.replace('%', '')
|
||||
})
|
||||
|
||||
def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters):
|
||||
return frappe.db.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name
|
||||
@@ -310,7 +335,8 @@ def get_income_account(doctype, txt, searchfield, start, page_len, filters):
|
||||
or tabAccount.account_type in ("Income Account", "Temporary"))
|
||||
and tabAccount.is_group=0
|
||||
and tabAccount.`{key}` LIKE %(txt)s
|
||||
{condition} {match_condition}"""
|
||||
{condition} {match_condition}
|
||||
order by idx desc, name"""
|
||||
.format(condition=condition, match_condition=get_match_cond(doctype), key=searchfield), {
|
||||
'txt': "%%%s%%" % frappe.db.escape(txt),
|
||||
'company': filters.get("company", "")
|
||||
|
||||
@@ -3,13 +3,10 @@ import frappe
|
||||
import frappe.utils
|
||||
import frappe.defaults
|
||||
|
||||
from frappe.utils import add_days, cint, cstr, date_diff, flt, getdate, nowdate, \
|
||||
get_first_day, get_last_day, comma_and, split_emails
|
||||
from frappe.model.naming import make_autoname
|
||||
from frappe.utils import cint, cstr, getdate, nowdate, \
|
||||
get_first_day, get_last_day, split_emails
|
||||
|
||||
from frappe import _, msgprint, throw
|
||||
from erpnext.accounts.party import get_party_account, get_due_date, get_party_details
|
||||
from frappe.model.mapper import get_mapped_doc
|
||||
|
||||
month_map = {'Monthly': 1, 'Quarterly': 3, 'Half-yearly': 6, 'Yearly': 12}
|
||||
date_field_map = {
|
||||
@@ -75,8 +72,7 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
|
||||
frappe.throw(exception_message)
|
||||
|
||||
def make_new_document(reference_doc, date_field, posting_date):
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
new_document = frappe.copy_doc(reference_doc, ignore_no_copy=True)
|
||||
new_document = frappe.copy_doc(reference_doc, ignore_no_copy=False)
|
||||
mcount = month_map[reference_doc.recurring_type]
|
||||
|
||||
from_date = get_next_date(reference_doc.from_date, mcount)
|
||||
@@ -93,8 +89,7 @@ def make_new_document(reference_doc, date_field, posting_date):
|
||||
date_field: posting_date,
|
||||
"from_date": from_date,
|
||||
"to_date": to_date,
|
||||
"fiscal_year": get_fiscal_year(posting_date)[0],
|
||||
"next_date": get_next_date(from_date, mcount,cint(reference_doc.repeat_on_day_of_month))
|
||||
"next_date": get_next_date(reference_doc.next_date, mcount,cint(reference_doc.repeat_on_day_of_month))
|
||||
})
|
||||
|
||||
# copy document fields
|
||||
@@ -113,6 +108,7 @@ def make_new_document(reference_doc, date_field, posting_date):
|
||||
new_document.run_method("on_recurring", reference_doc=reference_doc)
|
||||
|
||||
if reference_doc.submit_on_creation:
|
||||
new_document.insert()
|
||||
new_document.submit()
|
||||
else:
|
||||
new_document.docstatus=0
|
||||
@@ -165,26 +161,33 @@ def assign_task_to_owner(doc, doctype, msg, users):
|
||||
def validate_recurring_document(doc):
|
||||
if doc.is_recurring:
|
||||
validate_notification_email_id(doc)
|
||||
|
||||
if not doc.recurring_id:
|
||||
doc.recurring_id = doc.name
|
||||
|
||||
if not doc.recurring_type:
|
||||
msgprint(_("Please select {0}").format(doc.meta.get_label("recurring_type")),
|
||||
raise_exception=1)
|
||||
frappe.throw(_("Please select {0}").format(doc.meta.get_label("recurring_type")))
|
||||
|
||||
elif not (doc.from_date and doc.to_date):
|
||||
throw(_("Period From and Period To dates mandatory for recurring {0}").format(doc.doctype))
|
||||
frappe.throw(_("Period From and Period To dates mandatory for recurring {0}").format(doc.doctype))
|
||||
|
||||
def validate_recurring_next_date(doc):
|
||||
posting_date = doc.get("posting_date") or doc.get("transaction_date")
|
||||
if getdate(posting_date) > getdate(doc.next_date):
|
||||
frappe.throw(_("Next Date must be greater than Posting Date"))
|
||||
|
||||
if getdate(doc.next_date).day != doc.repeat_on_day_of_month:
|
||||
frappe.throw(_("Next Date's day and Repeat on Day of Month must be equal"))
|
||||
|
||||
#
|
||||
def convert_to_recurring(doc, posting_date):
|
||||
if doc.is_recurring:
|
||||
set_next_date(doc, posting_date)
|
||||
if doc.is_recurring:
|
||||
if not doc.recurring_id:
|
||||
doc.db_set("recurring_id", doc.name)
|
||||
|
||||
elif doc.recurring_id:
|
||||
frappe.db.sql("""update `tab%s` set is_recurring = 0
|
||||
where recurring_id = %s""" % (doc.doctype, '%s'), (doc.recurring_id))
|
||||
#
|
||||
set_next_date(doc, posting_date)
|
||||
|
||||
elif doc.recurring_id:
|
||||
frappe.db.sql("""update `tab%s` set is_recurring = 0
|
||||
where recurring_id = %s""" % (doc.doctype, '%s'), (doc.recurring_id))
|
||||
|
||||
if doc.next_date:
|
||||
validate_recurring_next_date(doc)
|
||||
|
||||
def validate_notification_email_id(doc):
|
||||
if doc.notify_by_email:
|
||||
@@ -203,13 +206,12 @@ def validate_notification_email_id(doc):
|
||||
|
||||
def set_next_date(doc, posting_date):
|
||||
""" Set next date on which recurring document will be created"""
|
||||
|
||||
if not doc.repeat_on_day_of_month:
|
||||
msgprint(_("Please enter 'Repeat on Day of Month' field value"), raise_exception=1)
|
||||
|
||||
next_date = doc.next_date or get_next_date(doc.from_date, month_map[doc.recurring_type],
|
||||
next_date = get_next_date(posting_date, month_map[doc.recurring_type],
|
||||
cint(doc.repeat_on_day_of_month))
|
||||
|
||||
frappe.db.set(doc, 'next_date', next_date)
|
||||
doc.db_set('next_date', next_date)
|
||||
|
||||
msgprint(_("Next Recurring {0} will be created on {1}").format(doc.doctype, next_date))
|
||||
|
||||
@@ -6,7 +6,7 @@ import frappe
|
||||
from frappe.utils import cint, flt, cstr, comma_or
|
||||
from erpnext.setup.utils import get_company_currency
|
||||
from frappe import _, throw
|
||||
from erpnext.stock.get_item_details import get_available_qty
|
||||
from erpnext.stock.get_item_details import get_bin_details
|
||||
|
||||
from erpnext.controllers.stock_controller import StockController
|
||||
|
||||
@@ -24,7 +24,7 @@ class SellingController(StockController):
|
||||
def onload(self):
|
||||
if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice"):
|
||||
for item in self.get("items"):
|
||||
item.update(get_available_qty(item.item_code,
|
||||
item.update(get_bin_details(item.item_code,
|
||||
item.warehouse))
|
||||
|
||||
def validate(self):
|
||||
@@ -51,7 +51,10 @@ class SellingController(StockController):
|
||||
|
||||
elif getattr(self, "lead", None):
|
||||
from erpnext.crm.doctype.lead.lead import get_lead_details
|
||||
self.update_if_missing(get_lead_details(self.lead))
|
||||
self.update_if_missing(get_lead_details(
|
||||
self.lead,
|
||||
posting_date=self.get('transaction_date') or self.get('posting_date'),
|
||||
company=self.company))
|
||||
|
||||
def set_price_list_and_item_details(self):
|
||||
self.set_price_list_currency("Selling")
|
||||
|
||||
@@ -6,6 +6,7 @@ import frappe
|
||||
from frappe.utils import cint, flt, cstr
|
||||
from frappe import msgprint, _
|
||||
import frappe.defaults
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
from erpnext.accounts.general_ledger import make_gl_entries, delete_gl_entries, process_gl_map
|
||||
from erpnext.stock.utils import get_incoming_rate
|
||||
|
||||
@@ -181,6 +182,7 @@ class StockController(AccountsController):
|
||||
"warehouse": d.get("warehouse", None),
|
||||
"posting_date": self.posting_date,
|
||||
"posting_time": self.posting_time,
|
||||
'fiscal_year': get_fiscal_year(self.posting_date, company=self.company)[0],
|
||||
"voucher_type": self.doctype,
|
||||
"voucher_no": self.name,
|
||||
"voucher_detail_no": d.name,
|
||||
@@ -188,10 +190,9 @@ class StockController(AccountsController):
|
||||
"stock_uom": frappe.db.get_value("Item", args.get("item_code") or d.get("item_code"), "stock_uom"),
|
||||
"incoming_rate": 0,
|
||||
"company": self.company,
|
||||
"fiscal_year": self.fiscal_year,
|
||||
"batch_no": cstr(d.get("batch_no")).strip(),
|
||||
"serial_no": d.get("serial_no"),
|
||||
"project": d.get("project_name"),
|
||||
"project": d.get("project"),
|
||||
"is_cancelled": self.docstatus==2 and "Yes" or "No"
|
||||
})
|
||||
|
||||
|
||||
@@ -283,8 +283,8 @@ class calculate_taxes_and_totals(object):
|
||||
last_tax.tax_amount += diff
|
||||
last_tax.tax_amount_after_discount_amount += diff
|
||||
last_tax.total += diff
|
||||
|
||||
self._set_in_company_currency(last_tax,
|
||||
|
||||
self._set_in_company_currency(last_tax,
|
||||
["total", "tax_amount", "tax_amount_after_discount_amount"])
|
||||
|
||||
def calculate_totals(self):
|
||||
@@ -319,22 +319,22 @@ class calculate_taxes_and_totals(object):
|
||||
self.doc.round_floats_in(self.doc, ["grand_total", "base_grand_total"])
|
||||
|
||||
if self.doc.meta.get_field("rounded_total"):
|
||||
self.doc.rounded_total = round_based_on_smallest_currency_fraction(self.doc.grand_total,
|
||||
self.doc.rounded_total = round_based_on_smallest_currency_fraction(self.doc.grand_total,
|
||||
self.doc.currency, self.doc.precision("rounded_total"))
|
||||
if self.doc.meta.get_field("base_rounded_total"):
|
||||
company_currency = get_company_currency(self.doc.company)
|
||||
|
||||
|
||||
self.doc.base_rounded_total = \
|
||||
round_based_on_smallest_currency_fraction(self.doc.base_grand_total,
|
||||
round_based_on_smallest_currency_fraction(self.doc.base_grand_total,
|
||||
company_currency, self.doc.precision("base_rounded_total"))
|
||||
|
||||
def _cleanup(self):
|
||||
for tax in self.doc.get("taxes"):
|
||||
tax.item_wise_tax_detail = json.dumps(tax.item_wise_tax_detail, separators=(',', ':'))
|
||||
|
||||
|
||||
def set_discount_amount(self):
|
||||
if not self.doc.discount_amount and self.doc.additional_discount_percentage:
|
||||
self.doc.discount_amount = flt(flt(self.doc.get(scrub(self.doc.apply_discount_on)))
|
||||
self.doc.discount_amount = flt(flt(self.doc.get(scrub(self.doc.apply_discount_on)))
|
||||
* self.doc.additional_discount_percentage / 100, self.doc.precision("discount_amount"))
|
||||
|
||||
def apply_discount_amount(self):
|
||||
@@ -397,13 +397,13 @@ class calculate_taxes_and_totals(object):
|
||||
for adv in self.doc.get("advances")])
|
||||
|
||||
self.doc.total_advance = flt(total_allocated_amount, self.doc.precision("total_advance"))
|
||||
|
||||
|
||||
if self.doc.party_account_currency == self.doc.currency:
|
||||
invoice_total = self.doc.grand_total
|
||||
else:
|
||||
invoice_total = flt(self.doc.grand_total * self.doc.conversion_rate,
|
||||
invoice_total = flt(self.doc.grand_total * self.doc.conversion_rate,
|
||||
self.doc.precision("grand_total"))
|
||||
|
||||
|
||||
if invoice_total > 0 and self.doc.total_advance > invoice_total:
|
||||
frappe.throw(_("Advance amount cannot be greater than {0} {1}")
|
||||
.format(self.doc.party_account_currency, invoice_total))
|
||||
@@ -417,21 +417,23 @@ class calculate_taxes_and_totals(object):
|
||||
# total_advance is only for non POS Invoice
|
||||
if self.doc.is_return:
|
||||
return
|
||||
|
||||
|
||||
self.doc.round_floats_in(self.doc, ["grand_total", "total_advance", "write_off_amount"])
|
||||
self._set_in_company_currency(self.doc, ['write_off_amount'])
|
||||
|
||||
if self.doc.party_account_currency == self.doc.currency:
|
||||
total_amount_to_pay = flt(self.doc.grand_total - self.doc.total_advance
|
||||
total_amount_to_pay = flt(self.doc.grand_total - self.doc.total_advance
|
||||
- flt(self.doc.write_off_amount), self.doc.precision("grand_total"))
|
||||
else:
|
||||
total_amount_to_pay = flt(flt(self.doc.grand_total *
|
||||
self.doc.conversion_rate, self.doc.precision("grand_total")) - self.doc.total_advance
|
||||
self.doc.conversion_rate, self.doc.precision("grand_total")) - self.doc.total_advance
|
||||
- flt(self.doc.base_write_off_amount), self.doc.precision("grand_total"))
|
||||
|
||||
|
||||
if self.doc.doctype == "Sales Invoice":
|
||||
self.doc.round_floats_in(self.doc, ["paid_amount"])
|
||||
paid_amount = self.doc.paid_amount \
|
||||
if self.doc.party_account_currency == self.doc.currency else self.doc.base_paid_amount
|
||||
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
|
||||
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
|
||||
self.doc.precision("outstanding_amount"))
|
||||
elif self.doc.doctype == "Purchase Invoice":
|
||||
self.doc.outstanding_amount = flt(total_amount_to_pay, self.doc.precision("outstanding_amount"))
|
||||
self.doc.outstanding_amount = flt(total_amount_to_pay, self.doc.precision("outstanding_amount"))
|
||||
|
||||
@@ -6,7 +6,6 @@ import frappe
|
||||
import frappe.permissions
|
||||
from erpnext.controllers.recurring_document import date_field_map
|
||||
from frappe.utils import get_first_day, get_last_day, add_to_date, nowdate, getdate, add_days
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
|
||||
def test_recurring_document(obj, test_records):
|
||||
frappe.db.set_value("Print Settings", "Print Settings", "send_print_as_pdf", 1)
|
||||
@@ -20,7 +19,6 @@ def test_recurring_document(obj, test_records):
|
||||
"notification_email_address": "test@example.com, test1@example.com, test2@example.com",
|
||||
"repeat_on_day_of_month": getdate(today).day,
|
||||
"due_date": None,
|
||||
"fiscal_year": get_fiscal_year(today)[0],
|
||||
"from_date": get_first_day(today),
|
||||
"to_date": get_last_day(today)
|
||||
})
|
||||
|
||||
@@ -43,9 +43,16 @@ def get_data(filters, conditions):
|
||||
inc, cond= '',''
|
||||
query_details = conditions["based_on_select"] + conditions["period_wise_select"]
|
||||
|
||||
if conditions["based_on_select"] in ["t1.project_name,", "t2.project_name,"]:
|
||||
posting_date = 't1.transaction_date'
|
||||
if conditions.get('trans') in ['Sales Invoice', 'Purchase Invoice', 'Purchase Receipt', 'Delivery Note']:
|
||||
posting_date = 't1.posting_date'
|
||||
|
||||
if conditions["based_on_select"] in ["t1.project,", "t2.project,"]:
|
||||
cond = 'and '+ conditions["based_on_select"][:-1] +' IS Not NULL'
|
||||
|
||||
year_start_date, year_end_date = frappe.db.get_value("Fiscal Year",
|
||||
filters.get('fiscal_year'), ["year_start_date", "year_end_date"])
|
||||
|
||||
if filters.get("group_by"):
|
||||
sel_col = ''
|
||||
ind = conditions["columns"].index(conditions["grbc"][0])
|
||||
@@ -62,12 +69,12 @@ def get_data(filters, conditions):
|
||||
else :
|
||||
inc = 1
|
||||
data1 = frappe.db.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
|
||||
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s and
|
||||
where t2.parent = t1.name and t1.company = %s and %s between %s and %s and
|
||||
t1.docstatus = 1 %s %s
|
||||
group by %s
|
||||
""" % (query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"], "%s",
|
||||
"%s", conditions.get("addl_tables_relational_cond"), cond, conditions["group_by"]), (filters.get("company"),
|
||||
filters["fiscal_year"]),as_list=1)
|
||||
posting_date, "%s", "%s", conditions.get("addl_tables_relational_cond"), cond, conditions["group_by"]), (filters.get("company"),
|
||||
year_start_date, year_end_date),as_list=1)
|
||||
|
||||
for d in range(len(data1)):
|
||||
#to add blanck column
|
||||
@@ -77,25 +84,25 @@ def get_data(filters, conditions):
|
||||
|
||||
#to get distinct value of col specified by group_by in filter
|
||||
row = frappe.db.sql("""select DISTINCT(%s) from `tab%s` t1, `tab%s Item` t2 %s
|
||||
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s
|
||||
where t2.parent = t1.name and t1.company = %s and %s between %s and %s
|
||||
and t1.docstatus = 1 and %s = %s %s
|
||||
""" %
|
||||
(sel_col, conditions["trans"], conditions["trans"], conditions["addl_tables"],
|
||||
"%s", "%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
|
||||
(filters.get("company"), filters.get("fiscal_year"), data1[d][0]), as_list=1)
|
||||
"%s", posting_date, "%s", "%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
|
||||
(filters.get("company"), year_start_date, year_end_date, data1[d][0]), as_list=1)
|
||||
|
||||
for i in range(len(row)):
|
||||
des = ['' for q in range(len(conditions["columns"]))]
|
||||
|
||||
#get data for group_by filter
|
||||
row1 = frappe.db.sql(""" select %s , %s from `tab%s` t1, `tab%s Item` t2 %s
|
||||
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s
|
||||
where t2.parent = t1.name and t1.company = %s and %s between %s and %s
|
||||
and t1.docstatus = 1 and %s = %s and %s = %s %s
|
||||
""" %
|
||||
(sel_col, conditions["period_wise_select"], conditions["trans"],
|
||||
conditions["trans"], conditions["addl_tables"], "%s", "%s", sel_col,
|
||||
conditions["trans"], conditions["addl_tables"], "%s", posting_date, "%s","%s", sel_col,
|
||||
"%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
|
||||
(filters.get("company"), filters.get("fiscal_year"), row[i][0],
|
||||
(filters.get("company"), year_start_date, year_end_date, row[i][0],
|
||||
data1[d][0]), as_list=1)
|
||||
|
||||
des[ind] = row[i][0]
|
||||
@@ -106,13 +113,13 @@ def get_data(filters, conditions):
|
||||
data.append(des)
|
||||
else:
|
||||
data = frappe.db.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
|
||||
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s and
|
||||
where t2.parent = t1.name and t1.company = %s and %s between %s and %s and
|
||||
t1.docstatus = 1 %s %s
|
||||
group by %s
|
||||
""" %
|
||||
(query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"],
|
||||
"%s", "%s", cond, conditions.get("addl_tables_relational_cond", ""), conditions["group_by"]),
|
||||
(filters.get("company"), filters.get("fiscal_year")), as_list=1)
|
||||
"%s", posting_date, "%s", "%s", cond, conditions.get("addl_tables_relational_cond", ""), conditions["group_by"]),
|
||||
(filters.get("company"), year_start_date, year_end_date), as_list=1)
|
||||
|
||||
return data
|
||||
|
||||
@@ -246,13 +253,13 @@ def based_wise_columns_query(based_on, trans):
|
||||
elif based_on == "Project":
|
||||
if trans in ['Sales Invoice', 'Delivery Note', 'Sales Order']:
|
||||
based_on_details["based_on_cols"] = ["Project:Link/Project:120"]
|
||||
based_on_details["based_on_select"] = "t1.project_name,"
|
||||
based_on_details["based_on_group_by"] = 't1.project_name'
|
||||
based_on_details["based_on_select"] = "t1.project,"
|
||||
based_on_details["based_on_group_by"] = 't1.project'
|
||||
based_on_details["addl_tables"] = ''
|
||||
elif trans in ['Purchase Order', 'Purchase Invoice', 'Purchase Receipt']:
|
||||
based_on_details["based_on_cols"] = ["Project:Link/Project:120"]
|
||||
based_on_details["based_on_select"] = "t2.project_name,"
|
||||
based_on_details["based_on_group_by"] = 't2.project_name'
|
||||
based_on_details["based_on_select"] = "t2.project,"
|
||||
based_on_details["based_on_group_by"] = 't2.project'
|
||||
based_on_details["addl_tables"] = ''
|
||||
else:
|
||||
frappe.throw(_("Project-wise data is not available for Quotation"))
|
||||
|
||||
@@ -10,6 +10,7 @@ from frappe.model.mapper import get_mapped_doc
|
||||
|
||||
from erpnext.controllers.selling_controller import SellingController
|
||||
from erpnext.utilities.address_and_contact import load_address_and_contact
|
||||
from erpnext.accounts.party import set_taxes
|
||||
|
||||
sender_field = "email_id"
|
||||
|
||||
@@ -58,7 +59,7 @@ class Lead(SellingController):
|
||||
def check_email_id_is_unique(self):
|
||||
if self.email_id:
|
||||
# validate email is unique
|
||||
duplicate_leads = frappe.db.sql_list("""select name from tabLead
|
||||
duplicate_leads = frappe.db.sql_list("""select name from tabLead
|
||||
where email_id=%s and name!=%s""", (self.email_id, self.name))
|
||||
|
||||
if duplicate_leads:
|
||||
@@ -138,7 +139,7 @@ def make_quotation(source_name, target_doc=None):
|
||||
return target_doc
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_lead_details(lead):
|
||||
def get_lead_details(lead, posting_date=None, company=None):
|
||||
if not lead: return {}
|
||||
|
||||
from erpnext.accounts.party import set_address_details
|
||||
@@ -158,4 +159,9 @@ def get_lead_details(lead):
|
||||
|
||||
set_address_details(out, lead, "Lead")
|
||||
|
||||
taxes_and_charges = set_taxes(None, 'Lead', posting_date, company,
|
||||
billing_address=out.get('customer_address'), shipping_address=out.get('shipping_address_name'))
|
||||
if taxes_and_charges:
|
||||
out['taxes_and_charges'] = taxes_and_charges
|
||||
|
||||
return out
|
||||
|
||||
@@ -31,8 +31,6 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
|
||||
set_multiple(cdt, cdn, { status:'Draft' });
|
||||
if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
|
||||
set_multiple(cdt, cdn, { company:frappe.defaults.get_user_default("Company") });
|
||||
if(!this.frm.doc.fiscal_year && sys_defaults.fiscal_year)
|
||||
set_multiple(cdt, cdn, { fiscal_year:sys_defaults.fiscal_year });
|
||||
|
||||
this.setup_queries();
|
||||
},
|
||||
@@ -166,13 +164,3 @@ cur_frm.cscript['Declare Opportunity Lost'] = function() {
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
cur_frm.cscript.company = function(doc, cdt, cdn) {
|
||||
erpnext.get_fiscal_year(doc.company, doc.transaction_date);
|
||||
}
|
||||
|
||||
cur_frm.cscript.transaction_date = function(doc, cdt, cdn){
|
||||
erpnext.get_fiscal_year(doc.company, doc.transaction_date);
|
||||
}
|
||||
|
||||
@@ -802,33 +802,6 @@
|
||||
"unique": 0,
|
||||
"width": "50px"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "fiscal_year",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Fiscal Year",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "fiscal_year",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Fiscal Year",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@@ -1001,7 +974,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-03-02 05:12:15.429804",
|
||||
"modified": "2016-03-03 06:13:49.728079",
|
||||
"modified_by": "Administrator",
|
||||
"module": "CRM",
|
||||
"name": "Opportunity",
|
||||
|
||||
@@ -40,8 +40,6 @@ class Opportunity(TransactionBase):
|
||||
if not self.title:
|
||||
self.title = self.customer_name
|
||||
|
||||
from erpnext.accounts.utils import validate_fiscal_year
|
||||
validate_fiscal_year(self.transaction_date, self.fiscal_year, _("Opportunity Date"), self)
|
||||
|
||||
def make_new_lead_if_required(self):
|
||||
"""Set lead against new opportunity"""
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"enquiry_type": "Sales",
|
||||
"lead": "_T-Lead-00001",
|
||||
"transaction_date": "2013-12-12",
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"items": [{
|
||||
"item_name": "Test Item",
|
||||
"description": "Some description"
|
||||
|
||||
BIN
erpnext/docs/assets/img/customize/custom-field-1.gif
Normal file
|
After Width: | Height: | Size: 535 KiB |
BIN
erpnext/docs/assets/img/customize/custom-field-2.gif
Normal file
|
After Width: | Height: | Size: 466 KiB |
BIN
erpnext/docs/assets/img/customize/custom-field-3.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
erpnext/docs/assets/img/customize/custom-field-4.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
erpnext/docs/assets/img/customize/custom-field-5.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
erpnext/docs/assets/img/customize/custom-field-6.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
erpnext/docs/assets/img/customize/custom-script-1.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 701 KiB |
|
After Width: | Height: | Size: 464 KiB |
|
After Width: | Height: | Size: 50 KiB |
BIN
erpnext/docs/assets/img/customize/feature-setup.png
Normal file
|
After Width: | Height: | Size: 213 KiB |