Compare commits

..

559 Commits

Author SHA1 Message Date
Anand Doshi
eb7fea673b Fixed set_single_defaults during install 2014-03-19 17:10:01 +05:30
Anand Doshi
4b2692182a Fixes after change in fields handling in Document 2014-03-19 16:58:42 +05:30
Anand Doshi
76f330ca66 Fixed Fiscal Year input issue in Setup Wizard 2014-03-19 15:45:05 +05:30
Anand Doshi
2134d24b36 Removed cloud subscription logic 2014-03-14 15:24:57 +05:30
Pratik Vyas
9d1e8640ef Update README.md 2014-03-13 20:45:27 +05:30
Anand Doshi
49e0a687b3 Minor Fixes 2014-03-13 20:44:28 +05:30
Nabin Hait
54106807e4 Set paid amount to zero if not pos 2014-03-13 17:26:41 +05:30
Nabin Hait
a8dbb0dd41 Merge branch 'develop' of github.com:frappe/erpnext into develop 2014-03-13 17:23:24 +05:30
Pratik Vyas
65e8676f8b Profile -> User 2014-03-13 03:09:15 +05:30
Pratik Vyas
5c81f9c44e check docstatus before updating employee 2014-03-13 02:35:23 +05:30
Rushabh Mehta
7c932003ed rename Profile to User frappe/frappe#470 2014-03-11 16:15:59 +05:30
Anand Doshi
c379c78fec Fixed Dropbox, Scheduler, 3to4 migration 2014-03-11 15:17:13 +05:30
Anand Doshi
09a9f4c0c9 Added module to Report doctype 2014-03-07 17:20:22 +05:30
Anand Doshi
ec621194fc Verbose is default in cli.py 2014-03-07 14:01:56 +05:30
Rushabh Mehta
c12ccdb6ea bugfix erpnext/frappe#1446 2014-03-06 15:45:45 +05:30
Rushabh Mehta
d8de921c40 fixed erpnext/frappe#1441 and other pos related cleanups 2014-03-06 15:40:22 +05:30
Rushabh Mehta
73f0bf36c1 fixed #1454 2014-03-06 14:45:02 +05:30
Rushabh Mehta
2e7ad8980c fix for queries 2014-03-06 12:28:47 +05:30
Rushabh Mehta
4541875c81 removed searchfield condition from get_match_cond frappe/erpnext#1457 2014-03-06 11:19:46 +05:30
Rushabh Mehta
0fabc6a841 minor fix 2014-03-06 11:19:46 +05:30
Rushabh Mehta
2a45e1cfd0 Merge pull request #1437 from ddimmich/patch-1
Update README.md
2014-03-06 10:46:03 +05:30
Anand Doshi
2d5727b17b Ignore mandatory during email pulling 2014-03-05 19:24:07 +05:30
Anand Doshi
b2c2fca8a5 Added Pricing Rule to Accounts, Buying, Selling home 2014-03-05 18:25:10 +05:30
Nabin Hait
9472247b6e Update stock_entry.js 2014-03-05 17:45:58 +05:30
Anand Doshi
ebdac5db5c Fix in Pricing Rule Patch 2014-03-05 17:31:37 +05:30
Anand Doshi
7ea8528d50 Fixed Pricing Rule Cleanup Fieldname 2014-03-05 17:27:00 +05:30
Anand Doshi
74d0e40bdc Moved Notification Count hooks to frappe, employee user id patch, Item ignore restriction fields 2014-03-05 15:24:29 +05:30
Nabin Hait
2d57b0aa52 Merge branch 'develop' of github.com:frappe/erpnext into develop 2014-03-05 10:51:04 +05:30
Anand Doshi
0c4ef64b32 Fixed booboo: Moved website moduleview to framework 2014-03-04 11:15:08 +05:30
Anand Doshi
e30511d315 Email Settings split into Outgoing Email Settings and Support Email Settings 2014-03-03 20:32:20 +05:30
Anand Doshi
64f2ccd9e1 Global Settings in Setup, Sales Master Manager can restrict for Customer 2014-03-03 19:28:30 +05:30
Anand Doshi
6b12b07b33 Fixes to Module Views 2014-03-03 16:05:00 +05:30
Anand Doshi
f5794f1c07 Module Home Pages using Module View 2014-03-03 15:06:34 +05:30
Nabin Hait
8e4640f464 minor fix in report 2014-03-03 12:06:50 +05:30
Nabin Hait
f976143063 pricing rule patch fix 2014-02-28 19:02:27 +05:30
Nabin Hait
177b86a15b fix in pricing rule 2014-02-28 15:47:22 +05:30
Nabin Hait
e7e615cf18 pricing rule: fixes in testcase 2014-02-28 15:21:49 +05:30
Nabin Hait
13b93ebed8 pricing rule: fixes in testcase 2014-02-28 15:04:05 +05:30
Nabin Hait
3319170805 pricing rule: condition for tree-type docs 2014-02-28 13:04:19 +05:30
Nabin Hait
ed5f423e65 pricing rule: condition for tree-type docs 2014-02-28 13:04:19 +05:30
Nabin Hait
311079a311 Patch: copy customer discount to pricing rule 2014-02-28 13:04:19 +05:30
Nabin Hait
08222150f2 Pricing Rule fixes and reference field in all item table 2014-02-28 13:02:00 +05:30
Nabin Hait
7e8e8ba714 pricing rule 2014-02-28 13:02:00 +05:30
Nabin Hait
c65a0c7197 Allowed stock entry import 2014-02-28 13:02:00 +05:30
Nabin Hait
bc34f3edae shortage qty column added in stock projected qty report 2014-02-28 13:02:00 +05:30
Nabin Hait
615d342056 Pricing Rule: first commit 2014-02-28 13:02:00 +05:30
Anand Doshi
8462a7691b Fixed login 2014-02-28 11:53:59 +05:30
Rushabh Mehta
063141d152 added patch for address 2014-02-28 11:37:36 +05:30
Anand Doshi
fb21ce3893 3to4 fixes 2014-02-27 13:18:20 +05:30
Damian Dimmich
1ee5675750 Update README.md
remove old doc line
2014-02-26 10:29:42 +01:00
Anand Doshi
e9baaa68e7 Changed frappe.conn to frappe.db 2014-02-26 12:35:33 +05:30
Anand Doshi
901f4434fd Fixed Purchase Invoice test cases 2014-02-25 17:25:28 +05:30
Anand Doshi
0936ae6dca Fixed company web page creation 2014-02-25 16:21:50 +05:30
Anand Doshi
4362443b6e Propagate ignore_permissions during mapping from quotation to sales order 2014-02-25 15:42:32 +05:30
Anand Doshi
201dbbd977 Quotation Item Table can be empty 2014-02-25 15:42:32 +05:30
Rushabh Mehta
a6628eee56 rename sitemap to route 2014-02-25 11:08:37 +05:30
Nabin Hait
a1c96de9fc party related cleanup 2014-02-21 14:45:10 +05:30
Rushabh Mehta
6fbda08583 fixed sitemap patch 2014-02-20 19:03:03 +05:30
Nabin Hait
cda83bba59 Row no fix in stock reconciliation 2014-02-20 15:01:51 +05:30
Nabin Hait
2f8d4451f5 calculate outstanding amount in server side, only if docstatus is 0 2014-02-20 14:59:37 +05:30
Nabin Hait
0f2310690e fix in fetch item details and supplier non-mandatory to fetch 2014-02-20 11:27:47 +05:30
Pratik Vyas
33f36c3462 Add CI badge to readme 2014-02-20 00:17:43 +05:30
Pratik Vyas
a08855a0de add site arg to travis build script, booboo 2014-02-20 00:06:35 +05:30
Pratik Vyas
3197767650 run setup wizard before running tests on travis 2014-02-19 23:22:02 +05:30
Pratik Vyas
28da7523be set single defaults after install 2014-02-19 20:53:45 +05:30
Nabin Hait
ce64afaa51 default value in single doctypes 2014-02-19 19:12:01 +05:30
Nabin Hait
f5bb9ae1b1 default value in single doctypes 2014-02-19 19:02:40 +05:30
Nabin Hait
22831563ff default value in selling settings 2014-02-19 18:35:54 +05:30
Nabin Hait
32f168617c default value in global defaults 2014-02-19 18:11:42 +05:30
Nabin Hait
74bbd24b1d Merge github.com:frappe/erpnext into develop 2014-02-19 17:43:51 +05:30
Nabin Hait
9d1f077922 get lead details in quotation 2014-02-19 17:43:24 +05:30
Rushabh Mehta
e0e3f92019 fixed sales / accounts tree 2014-02-19 12:43:16 +05:30
Nabin Hait
05b28eb161 minor fixes 2014-02-19 11:04:32 +05:30
Nabin Hait
36a4db69b8 price list on_trash function 2014-02-18 15:14:46 +05:30
Pratik Vyas
da0a23e635 remove print in patch, booboo 2014-02-17 14:56:00 +05:30
Pratik Vyas
31affc0e67 bump modified dates for purchase receipt and purchase invoice 2014-02-17 11:36:10 +05:30
Pratik Vyas
d4f9af3498 Delete install_erpnext.py 2014-02-15 15:29:29 +05:30
Pratik Vyas
ad9b4faa47 Update README.md 2014-02-15 15:23:25 +05:30
Pratik Vyas
0240dc53ae 4.change version to 4.0.0-beta 2014-02-14 16:10:55 +05:30
Pratik Vyas
ed20b68a3a Update .travis.yml 2014-02-14 16:10:03 +05:30
Rushabh Mehta
86903e5f5b fixed travis 2014-02-14 15:54:43 +05:30
Rushabh Mehta
793ba6bd37 -webnotes +frappe 💥 2014-02-14 15:47:51 +05:30
Nabin Hait
8ae051cb39 fixed conflict 2014-02-14 13:42:41 +05:30
Nabin Hait
adeff27f28 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0.0-wip 2014-02-14 13:41:00 +05:30
Nabin Hait
9ea461638e minor fix 2014-02-14 13:40:41 +05:30
Rushabh Mehta
989b60ae52 removed setup from desktop: 2014-02-14 13:16:39 +05:30
Pratik Vyas
fc274e29ec Merge branch 'develop' 2014-02-14 10:36:23 +05:30
Pratik Vyas
d45f7d60c3 bumped to version 3.8.6 2014-02-14 11:06:23 +06:00
Nabin Hait
c1611abebf Merge pull request #1418 from nabinhait/hotfix
minor fixes in account receivable/payable
2014-02-13 18:44:15 +05:30
Nabin Hait
e0f6b3edbe minor fixes in account receivable/payable 2014-02-13 18:43:18 +05:30
Nabin Hait
a038831c45 validate item of item_price record 2014-02-13 15:54:51 +05:30
Nabin Hait
36028bfb56 minor 2014-02-12 19:09:28 +05:30
Nabin Hait
a87121c6da Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0.0-wip 2014-02-12 17:09:08 +05:30
Nabin Hait
e219d61ed4 patch included in patches txt 2014-02-12 17:08:35 +05:30
Nabin Hait
66b2717c54 Merge pull request #1414 from akhileshdarjee/4.0-hotfix
Customer and Supplier dashboard set to company currency
2014-02-12 16:55:17 +05:30
Nabin Hait
eba1bdbcca minor fixes 2014-02-12 16:04:17 +05:30
Nabin Hait
139dc7b9b2 minor fixes 2014-02-12 14:54:16 +05:30
Nabin Hait
0aa71a5c41 minor fixes 2014-02-12 14:54:15 +05:30
Nabin Hait
5aecc538dd Letter Head field added in purchase receipt and invoice 2014-02-12 14:54:15 +05:30
Nabin Hait
5f59726903 Rename fields: replaced in html and txt files 2014-02-12 14:54:15 +05:30
Nabin Hait
1eb560130a Rename fields: amount related fields 2014-02-12 14:54:14 +05:30
Nabin Hait
7979f7ed21 Field Rename: rate field mass replacement 2014-02-12 14:54:14 +05:30
Nabin Hait
a7f757a3f4 Rename fields: initial commit 2014-02-12 14:54:13 +05:30
Nabin Hait
777397489e Fields renamed in schema 2014-02-12 14:54:13 +05:30
Nabin Hait
436f526102 commonify get_item_details and rename fields to sync selling and purchase 2014-02-12 14:54:12 +05:30
Nabin Hait
c28c86dfd8 Validate duplicate serial nos entry 2014-02-12 14:54:11 +05:30
Nabin Hait
9beffb646d Validate duplicate serial nos entry 2014-02-12 14:54:11 +05:30
Nabin Hait
f0d29be1d5 Removed on_trash function from support ticket 2014-02-12 14:54:11 +05:30
Akhilesh Darjee
f2b7cd65a9 customer and supplier dashboard set to company currency 2014-02-12 11:29:08 +05:30
Anand Doshi
2735733d1f Minor fix in setup import 2014-02-11 20:28:11 +05:30
Anand Doshi
93fdc670fe Fixes in Test Cases 2014-02-11 14:40:21 +05:30
Nabin Hait
40c5174aa0 Merge pull request #1410 from nabinhait/hotfix
Hotfix
2014-02-11 12:03:11 +05:30
Nabin Hait
0799b28e46 Letter Head field added in purchase receipt and invoice 2014-02-11 12:02:46 +05:30
Pratik Vyas
89a3ee7f57 Merge branch 'develop' 2014-02-10 20:57:25 +05:30
Pratik Vyas
347bf93b4f bumped to version 3.8.5 2014-02-10 21:27:25 +06:00
Anand Doshi
d7cc47e3ac Do not validate Material Request against Sales Order, Moved Setup page to Framework 2014-02-10 17:39:12 +05:30
Anand Doshi
1d7e933590 Fix in Get Job Applications 2014-02-07 20:26:56 +05:30
Anand Doshi
080b64a98f Fixes in Sales Partner and Support Mails 2014-02-07 19:14:21 +05:30
Rushabh Mehta
c4ec534b06 added config.setup 2014-02-07 19:04:19 +05:30
Rushabh Mehta
22ababbec1 configs 2014-02-07 18:16:11 +05:30
Pratik Vyas
17cb5b7799 Merge branch 'develop' 2014-02-07 16:03:09 +05:30
Pratik Vyas
e0c9dd3d23 bumped to version 3.8.4 2014-02-07 16:33:09 +06:00
Nabin Hait
41891ec95c Merge pull request #1405 from nabinhait/hotfix
Serial No duplicate entry fix
2014-02-07 15:54:57 +05:30
Nabin Hait
dfc0072929 Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-02-07 15:45:39 +05:30
Nabin Hait
e1e5d675ac Validate duplicate serial nos entry 2014-02-07 15:33:34 +05:30
Nabin Hait
c4e92c6416 Validate duplicate serial nos entry 2014-02-07 15:22:50 +05:30
Anand Doshi
7c34f1c472 Test Item Group 2014-02-07 14:52:14 +05:30
Nabin Hait
2c832addca Merge pull request #1404 from nabinhait/hotfix
Hotfix
2014-02-07 11:51:54 +05:30
Nabin Hait
c095cfa224 Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-02-07 11:49:45 +05:30
Nabin Hait
fbb10d37d3 Removed on_trash function from support ticket 2014-02-07 11:49:26 +05:30
Anand Doshi
7bb9c3f125 Nested Set Test using Test Item group 2014-02-06 17:51:18 +05:30
Nabin Hait
a03f654446 Merge pull request #1382 from akhileshdarjee/4.0-hotfix
Newsletter can also be sent to employees
2014-02-06 16:02:39 +05:30
Nabin Hait
574c7e7c63 item related cleanup 2014-02-06 15:51:01 +05:30
Pratik Vyas
9294fc8e7e Merge branch 'develop' 2014-02-06 15:27:11 +05:30
Pratik Vyas
07d4c373f3 bumped to version 3.8.3 2014-02-06 15:57:11 +06:00
Pratik Vyas
79499e3615 fix syntax error in material request, merge booboo 2014-02-06 15:25:17 +05:30
Pratik Vyas
cc9bc95b25 fix language typo in build script 2014-02-06 14:59:05 +05:30
Pratik Vyas
ae763d7afa Merge pull request #1394 from pdvyas/testing-develop3
fix travis build script typo
2014-02-06 14:54:13 +05:30
Pratik Vyas
70e2a50f0f fix travis build script typo 2014-02-06 14:07:58 +05:30
Pratik Vyas
c22ff12951 Merge pull request #1390 from pdvyas/testing4
fix webnotes url in travis build script
2014-02-06 13:37:41 +05:30
Pratik Vyas
1b8c158fdc Merge pull request #1393 from pdvyas/testing-develop2
add travis build script
2014-02-06 13:37:21 +05:30
Pratik Vyas
4078ef8ef5 add travis build script 2014-02-06 13:36:26 +05:30
Akhilesh Darjee
462740f72b sales funnel fix 2014-02-06 13:14:15 +05:30
Pratik Vyas
c055ea6465 fix webnotes url in travis build script 2014-02-06 12:54:52 +05:30
Anand Doshi
3decf4dbc5 Fixes related website hierarchy 2014-02-06 12:50:35 +05:30
Rushabh Mehta
4b41e420c0 cleaned up splash: 2014-02-06 11:02:53 +05:30
Rushabh Mehta
2c545ef1ad bugfix to feed 2014-02-06 10:38:45 +05:30
Pratik Vyas
c6b59ef082 Merge branch 'develop' 2014-02-05 18:49:29 +05:30
Pratik Vyas
dbbba659a8 bumped to version 3.8.2 2014-02-05 19:19:29 +06:00
Nabin Hait
3c3719fa9c Merge pull request #1388 from nabinhait/hotfix
Hotfix
2014-02-05 18:46:54 +05:30
Nabin Hait
a7af1d619e Fix in accounts receivable report 2014-02-05 18:15:12 +05:30
Rushabh Mehta
307fac8b78 hooks fixes 2014-02-05 17:04:49 +05:30
Nabin Hait
18eb8c5f68 fixed unicode and null issue in sms center 2014-02-05 15:06:09 +05:30
Akhilesh Darjee
602fdc0000 patch reloading employee form 2014-02-03 19:32:59 +05:30
Akhilesh Darjee
f1c3537924 webnotes/erpnext#869 newsletter to send to employees 2014-02-03 19:28:36 +05:30
Akhilesh Darjee
81578d2e77 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0-hotfix 2014-02-03 17:48:46 +05:30
Akhilesh Darjee
8f674fe0fb minor changes 2014-02-03 17:47:50 +05:30
Akhilesh Darjee
abb3af7b30 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0-hotfix 2014-02-03 16:44:14 +05:30
Rushabh Mehta
cc008cc109 commonified get_party_details 2014-02-03 16:14:56 +05:30
Rushabh Mehta
347889b233 merge 2014-02-03 14:49:53 +05:30
Rushabh Mehta
8ed0268b9d fix to SalesInvoice format 2014-02-03 14:40:01 +05:30
Rushabh Mehta
fa799f7d81 Merge branch '4.0.0-cleanup' of github.com:webnotes/erpnext into 4.0.0-cleanup 2014-02-03 14:38:52 +05:30
Nabin Hait
23c28704d2 Field arrangement in child table 2014-02-03 14:36:59 +05:30
Akhilesh Darjee
dd905fcaba Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0-hotfix 2014-02-03 13:56:10 +05:30
Akhilesh Darjee
53593c9c47 Newsletter allow delete 2014-02-03 13:40:27 +05:30
Rushabh Mehta
8612778136 style fix 2014-02-03 10:45:21 +05:30
Rushabh Mehta
9adcf85a14 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0.0-wip 2014-02-03 10:44:34 +05:30
Akhilesh Darjee
d6d2193f91 newsletter reload 2014-01-31 19:59:25 +05:30
Nabin Hait
bec11fa86e Newsletter permissions 2014-01-31 17:33:23 +05:30
Nabin Hait
dfae0ea570 minor fix in patch 2014-01-31 17:25:09 +05:30
Nabin Hait
d7fb6dce89 Stock reconciliation: cost center filters 2014-01-31 17:05:09 +05:30
Nabin Hait
759f9ee973 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0.0-wip 2014-01-31 16:28:31 +05:30
Nabin Hait
646d06ee9f Merge branch 'develop' of github.com:webnotes/erpnext into 4.0.0-wip
Conflicts:
	config.json
2014-01-31 16:28:05 +05:30
Nabin Hait
7f80485070 Merge pull request #1374 from akhileshdarjee/sms-center
SMS center character count
2014-01-31 02:57:35 -08:00
Nabin Hait
45f0c25a6d Merge pull request #1365 from akhileshdarjee/4.0-hotfix
Stay Updated button in website fixed
2014-01-31 02:44:35 -08:00
Nabin Hait
c3211ab394 Merge pull request #1368 from akhileshdarjee/default-tax
Default tax for customer and supplier
2014-01-31 02:40:51 -08:00
Akhilesh Darjee
dc45153430 webnotes/erpnext#1221 dont allow duplicate user id in employee 2014-01-31 12:23:13 +05:30
Akhilesh Darjee
4e3b601990 webnotes/erpnext#1188 sms center character count 2014-01-30 19:13:25 +05:30
Nabin Hait
b5be7bab9b Stock Return: fetch customer and supplier details 2014-01-30 18:47:12 +05:30
Nabin Hait
8dc2c6a16c Default accounts in company should not be copied 2014-01-30 17:00:09 +05:30
Pratik Vyas
fe977289eb Merge branch 'develop' 2014-01-30 16:00:29 +05:30
Pratik Vyas
45b5b6d11f bumped to version 3.8.1 2014-01-30 16:30:29 +06:00
Nabin Hait
ec43e4dd33 Merged with develop 2014-01-30 15:22:10 +05:30
Nabin Hait
c58b330673 Merge pull request #1372 from nabinhait/hotfix
Hotfix
2014-01-30 01:49:29 -08:00
Nabin Hait
5d976ca3ac recurring invoice test fix 2014-01-30 15:12:39 +05:30
Rushabh Mehta
fcb6b01e4e cleaned up email 2014-01-30 15:09:05 +05:30
Nabin Hait
f2f17959ab Serial no fix 2014-01-30 14:54:25 +05:30
Akhilesh Darjee
e0a1039756 merge conflict fixed 2014-01-30 14:44:35 +05:30
Pratik Vyas
6448076143 Merge branch 'develop' 2014-01-30 13:59:43 +05:30
Pratik Vyas
3f657bcf51 bumped to version 3.8.0 2014-01-30 14:29:43 +06:00
Akhilesh Darjee
4cdb79941b map charge to taxes and charges in transactions 2014-01-30 13:56:57 +05:30
Nabin Hait
0ff32e73ba Merged with 4.0.0-wip 2014-01-30 12:41:52 +05:30
Nabin Hait
fe8db590a1 Fixed conflict while merging with develop 2014-01-30 12:32:47 +05:30
Nabin Hait
53f7ba26f6 Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-30 12:12:50 +05:30
Nabin Hait
937103f840 Update accounts_receivable.py 2014-01-30 12:12:26 +05:30
Nabin Hait
1969f9e1ac Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-30 12:11:04 +05:30
Nabin Hait
60fcce66f7 Minor fix in accounts receivable report 2014-01-30 12:08:44 +05:30
Nabin Hait
47fcc0310d Merge pull request #1371 from nabinhait/hotfix
Minor fix in opening purchase invoice and AR report
2014-01-29 22:13:29 -08:00
Nabin Hait
7e676f3aae Merge pull request #1370 from akhileshdarjee/hotfix
Shipping address in quotation fixed for customer validation
2014-01-29 21:50:49 -08:00
Akhilesh Darjee
30aac9bbcf removed contact person for lead filter 2014-01-30 11:02:06 +05:30
Nabin Hait
c2a5858143 Minor fix in accounts receivable report 2014-01-30 10:50:55 +05:30
Nabin Hait
879b3a0cbc Set expense account for perpetual inventory only non-opening invoices 2014-01-30 10:50:55 +05:30
Akhilesh Darjee
ef0a0e8209 stashed footer page 2014-01-29 20:18:43 +05:30
Akhilesh Darjee
f7f20f624a shipping address in quotation fixed for customer validation 2014-01-29 20:13:43 +05:30
Nabin Hait
b87e9f2651 Fixes in fetching party details 2014-01-29 19:51:36 +05:30
Akhilesh Darjee
b665d86292 patch to reload all sales and purchase doctypes and print formats 2014-01-29 17:40:34 +05:30
Akhilesh Darjee
4f7215662d webnotes/erpnext#1090 set default tax type in customer and supplier 2014-01-29 16:31:38 +05:30
Akhilesh Darjee
db22657d93 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into default-tax 2014-01-29 16:00:33 +05:30
Rushabh Mehta
24da761a17 more updates to party 2014-01-29 15:26:04 +05:30
Nabin Hait
115dcc09d4 Merge pull request #1361 from trhura/develop
Pull request for issue #856
2014-01-29 00:30:07 -08:00
Thura Hlaing
990d7c4862 added StockFreezeError, and uncomment stock_auth_role check 2014-01-29 14:53:21 +06:30
Thura Hlaing
166024a23c Merge branch 'develop' of https://github.com/webnotes/erpnext into develop 2014-01-29 13:29:27 +06:30
Thura Hlaing
3c4bb0c7c9 initial tests for freeze stock functionality 2014-01-29 13:28:11 +06:30
Thura Hlaing
258191ab40 fix bug by coercing stock_frozen_upto_days value to int 2014-01-29 11:37:30 +06:30
Thura Hlaing
d66396abe3 fixed typo add_date -> add_days 2014-01-29 09:49:30 +06:30
Akhilesh Darjee
2ced3b07d4 changed fieldname from charge to taxes 2014-01-28 19:16:05 +05:30
Rushabh Mehta
49dd7bee87 added get_supplier_details and commonified invoice functions 2014-01-28 17:43:10 +05:30
Rushabh Mehta
3b432dce88 added listviews 2014-01-28 16:10:15 +05:30
Nabin Hait
21d324c597 Merged with 4.0-wip 2014-01-28 15:52:25 +05:30
Akhilesh Darjee
a7ab20ec78 webnotes/erpnext#912 Stay Updated button in website fixed 2014-01-28 15:50:28 +05:30
Akhilesh Darjee
7c1976950d webnotes/erpnext#912 stay updated button fixed in website 2014-01-28 13:03:47 +05:30
Nabin Hait
158200b209 Merge pull request #1363 from akhileshdarjee/hotfix
Allow renaming of Sales/Purchase Taxes and Charges Master
2014-01-27 23:13:03 -08:00
Akhilesh Darjee
a570cd66f7 webnotes/erpnext#1362 allow renaming of sales and purchase taxes and charges master 2014-01-28 12:31:12 +05:30
Thura Hlaing
d7f3d63a8e Merge branch 'develop' of https://github.com/webnotes/erpnext into develop 2014-01-28 09:10:20 +06:30
Thura Hlaing
2e67426936 label/message update in error reporting 2014-01-28 09:09:50 +06:30
Thura Hlaing
16f88ba3cd import add_date, removed timedelta import 2014-01-27 20:22:08 +06:30
Thura Hlaing
e31a41854b tabify modifications, minor coding style/message updates 2014-01-27 20:14:53 +06:30
Pratik Vyas
7349c191ab Merge branch 'develop' 2014-01-27 17:49:50 +05:30
Pratik Vyas
dc540dda4d bumped to version 3.7.1 2014-01-27 18:19:50 +06:00
Nabin Hait
4b97811941 Merge pull request #1359 from akhileshdarjee/4.0-hotfix
POS Invoice print format showing inclusive taxes and discount amount
2014-01-27 04:09:36 -08:00
Nabin Hait
5c494f79f3 Merge pull request #1360 from nabinhait/hotfix
Planned qty patch: auto commit on many writes
2014-01-27 04:07:43 -08:00
Nabin Hait
191935bbf5 Planned qty patch: auto commit on many writes 2014-01-27 17:37:06 +05:30
Akhilesh Darjee
ffa4769b51 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0-hotfix 2014-01-27 17:32:32 +05:30
Akhilesh Darjee
db4304914c POS Invoice print format showing inclusive taxes and discount amount 2014-01-27 17:27:39 +05:30
Nabin Hait
db7901ec49 Merge pull request #1261 from akhileshdarjee/maintenance2
Fixed Maintenance Schedule
2014-01-27 03:57:15 -08:00
Pratik Vyas
8c78a1abb7 Merge branch 'develop' 2014-01-27 17:19:45 +05:30
Pratik Vyas
8821541f33 bumped to version 3.7.0 2014-01-27 17:49:45 +06:00
Nabin Hait
5cec7ec84a Merge pull request #1355 from akhileshdarjee/hotfix
Allow rename for price list
2014-01-27 02:40:08 -08:00
Thura Hlaing
9d5566634c changed stock_frozen_upto to stock_frozen_upto_days, and added validation for it in stock ledger 2014-01-27 16:54:38 +06:30
Akhilesh Darjee
86894f3bbf merge conflict fixed 2014-01-27 15:42:02 +05:30
Nabin Hait
9536f112b5 Merge pull request #1358 from nabinhait/hotfix
Serial no and planned qty
2014-01-27 01:33:56 -08:00
Nabin Hait
44a40b860e Fixed planned qty bug and patch to recalculate planned qty 2014-01-27 15:02:30 +05:30
Nabin Hait
b3d26c08f6 Fixed planned qty bug and patch to recalculate planned qty 2014-01-27 14:58:55 +05:30
Thura Hlaing
98d4622ed8 Merge branch 'develop' of github.com:trhura/erpnext 2014-01-27 14:10:52 +06:30
Thura Hlaing
24b26db327 initial prototype implementation for issue #856 2014-01-27 14:08:55 +06:30
Nabin Hait
fa9fabaa49 Serial no status fix: patch to set status not available where no sle exists 2014-01-27 12:46:18 +05:30
Akhilesh Darjee
49e8e783e3 webnotes/erpnext#1353 allow rename for price list 2014-01-27 11:12:24 +05:30
Rushabh Mehta
1230e3a28b don't hide customer / supplier links, webnotes/erpenxt#796 2014-01-27 11:02:27 +05:30
Anand Doshi
c4ee74857d BugFix: Production Planning Tool - get_raw_materials 2014-01-24 21:53:11 +05:30
Anand Doshi
3f8f4ff6cd BugFix: Production Planning Tool - get_raw_materials 2014-01-24 21:47:01 +05:30
Anand Doshi
cb39e0878e Merge remote-tracking branch 'webnotes/develop' into 4.0.0-wip
Conflicts:
	config.json
	erpnext/accounts/utils.py
	erpnext/patches/patch_list.py
	erpnext/stock/doctype/price_list/price_list.txt
	erpnext/stock/doctype/warehouse/warehouse.py
	portal/templates/sale.html
	portal/utils.py
	selling/doctype/sales_order/templates/pages/order.py
	selling/utils/cart.py
	selling/utils/product.py
	utilities/demo/demo_docs/Fiscal_Year.csv
	utilities/demo/make_demo.py
2014-01-24 21:44:36 +05:30
Akhilesh Darjee
a4e0a1c061 minor changes 2014-01-24 19:57:52 +05:30
Anand Doshi
fc13b87fd5 Fixes in Make Demo 2014-01-24 18:54:50 +05:30
Anand Doshi
d9ba544e09 Fix in Item Test Case 2014-01-24 15:59:05 +05:30
Rushabh Mehta
2fa914b410 Merge pull request #1347 from akhileshdarjee/4.0-hotfix
method name fixing
2014-01-24 02:07:22 -08:00
Rushabh Mehta
e288e5238a added title_fields for Task, Newsletter 2014-01-24 15:33:42 +05:30
Akhilesh Darjee
7cbf5b4e67 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0-hotfix 2014-01-24 11:12:50 +05:30
Akhilesh Darjee
44edfb7231 method name fixing 2014-01-24 11:10:46 +05:30
Rushabh Mehta
1cd96a136f updates for restriction 2014-01-24 11:10:24 +05:30
Nabin Hait
af21479665 Merge pull request #1342 from akhileshdarjee/hotfix
Item List refresh when price list changed in POS
2014-01-23 05:14:16 -08:00
Nabin Hait
93eab5521c Minor fix in path 2014-01-23 17:58:03 +05:30
Nabin Hait
4ba95d0b7a Fix in testcases 2014-01-23 16:45:22 +05:30
Nabin Hait
5ae6a61c4d Fixes related to appifing shopping cart 2014-01-23 15:33:30 +05:30
Nabin Hait
eec59ae7c4 Merge pull request #1345 from nabinhait/hotfix
Order preview through customer login
2014-01-23 01:48:28 -08:00
Nabin Hait
efa9a7ed5b Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-23 13:25:39 +05:30
Nabin Hait
557abdebe0 order preview through customer login 2014-01-23 13:25:26 +05:30
Akhilesh Darjee
8589b1db22 Use model set_value for updating values from POS 2014-01-22 19:25:51 +05:30
Akhilesh Darjee
82a21beba0 Item List refresh when price list changed in POS 2014-01-22 16:55:32 +05:30
Pratik Vyas
256c4da0a5 Merge branch 'develop' 2014-01-22 16:03:07 +05:30
Pratik Vyas
7395dc9969 bumped to version 3.6.6 2014-01-22 16:33:07 +06:00
Nabin Hait
6a23cfa5cd Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0.0-wip 2014-01-22 15:57:32 +05:30
Nabin Hait
d39bc09e62 Merge pull request #1341 from nabinhait/hotfix
Small fix
2014-01-22 02:21:17 -08:00
Nabin Hait
c7676797e1 Dont display old fraction outstanding in AR report 2014-01-22 15:36:44 +05:30
Rushabh Mehta
7460dcf406 updated Bootstrap 2014-01-22 12:44:46 +05:30
Nabin Hait
423932fab2 Fixes in general ledger opening 2014-01-22 11:53:44 +05:30
Nabin Hait
efda5b0d36 Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-21 20:58:10 +05:30
Nabin Hait
13a9e27320 Fixes in warehouse merge function 2014-01-21 20:57:39 +05:30
Pratik Vyas
b0433d96a3 Merge branch 'develop' 2014-01-21 12:09:31 +05:30
Pratik Vyas
f3aba2e536 bumped to version 3.6.5 2014-01-21 12:39:31 +06:00
Nabin Hait
1594f102fd Merge pull request #1340 from nabinhait/hotfix
General ledger
2014-01-20 22:29:33 -08:00
Nabin Hait
b2f2df4c64 General ledger: opening balance issue fixed 2014-01-21 11:58:17 +05:30
Nabin Hait
9f6c48d82e Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-21 10:44:16 +05:30
Pratik Vyas
f0307dc75e Merge branch 'develop' 2014-01-20 19:21:25 +05:30
Pratik Vyas
872e4d1f3d bumped to version 3.6.4 2014-01-20 19:51:25 +06:00
Nabin Hait
b164e606f9 Merge pull request #1337 from nabinhait/hotfix
Hotfix
2014-01-20 05:00:43 -08:00
Nabin Hait
806343395a Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-20 18:29:48 +05:30
Nabin Hait
afe93d633c Increased remarks width in general ledger 2014-01-20 18:28:48 +05:30
Nabin Hait
cd20717c3d Merge pull request #1336 from akhileshdarjee/disable-price-list
Enabled feature for Price List
2014-01-20 04:47:10 -08:00
Rushabh Mehta
f96bcf943b added explicit delete perimssions 2014-01-20 17:52:13 +05:30
Nabin Hait
9e056ec1ce Auto closing of tickets through schedulers 2014-01-20 17:46:37 +05:30
Rushabh Mehta
cef681942f merge fix 2014-01-20 17:41:13 +05:30
Nabin Hait
5c6d13a0df Fixed conflict while merging with develop branch 2014-01-20 17:18:16 +05:30
Nabin Hait
719f2803b3 Fixed conflict while merging with develop branch 2014-01-20 17:01:28 +05:30
Nabin Hait
dc15b4fa8a Fixed conflict while merging with develop brnach 2014-01-20 16:48:49 +05:30
Akhilesh Darjee
529709e08b patch for enabling all price list 2014-01-20 16:39:03 +05:30
Akhilesh Darjee
e82eee512b Enabled feature in Price List 2014-01-20 16:09:45 +05:30
Nabin Hait
ee0c623760 Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-20 10:57:12 +05:30
Nabin Hait
dbb4955483 Merge pull request #1332 from akhileshdarjee/hotfix
decimal places fix in item prices report
2014-01-17 20:18:30 -08:00
Akhilesh Darjee
ed87335513 decimal places fix in item prices report 2014-01-17 18:57:21 +05:30
Akhilesh Darjee
8a4111fe0e decimal places fixed in item prices report 2014-01-17 18:50:44 +05:30
Pratik Vyas
4bfa8d560b Merge branch 'develop' 2014-01-17 16:56:31 +05:30
Pratik Vyas
96db41d996 bumped to version 3.6.3 2014-01-17 17:26:31 +06:00
Nabin Hait
9a74330d6f Merge pull request #1330 from pdvyas/fix-mysql-installer
remove mysql-python pinning to 1.2.4
2014-01-17 02:37:25 -08:00
Nabin Hait
1951baca57 Merge pull request #1319 from pdvyas/about-version
update about erpnext with version number
2014-01-17 02:36:11 -08:00
Pratik Vyas
da08124df2 remove mysql-python pinning to 1.2.4 2014-01-17 15:27:19 +05:30
Nabin Hait
2aecc5a717 Merge pull request #1329 from nabinhait/hotfix
Patch for updating billing status for old zero value order
2014-01-17 01:41:40 -08:00
Nabin Hait
a37ffe162b Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-17 12:05:06 +05:30
Nabin Hait
bc99c9d6e0 Priority to user's deafult price list over customer's default price list 2014-01-17 12:04:24 +05:30
Nabin Hait
f32314dd0b Do not set income/expense account automatically in company master 2014-01-17 11:53:25 +05:30
Nabin Hait
7e73f35916 Merge pull request #1327 from akhileshdarjee/hotfix
Allow renaming of campaign
2014-01-16 21:48:10 -08:00
Akhilesh Darjee
e1e63a91d6 Allow renaming of campaign 2014-01-17 11:12:20 +05:30
Nabin Hait
9a05aad8ea Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-17 10:31:43 +05:30
Nabin Hait
f6b77479d7 Patch: Update billing status for zero value order 2014-01-16 18:18:49 +05:30
Pratik Vyas
3c279163fc Merge branch 'develop' 2014-01-16 16:29:22 +05:30
Pratik Vyas
6933617538 bumped to version 3.6.2 2014-01-16 16:59:22 +06:00
Nabin Hait
2648661757 Merge pull request #1326 from nabinhait/hotfix
Calculate taxes and charges total in server side
2014-01-16 01:28:33 -08:00
Nabin Hait
e31a97f355 Calculate taxes and charges total in server side 2014-01-16 14:24:32 +05:30
Nabin Hait
6bdb73c392 Merge pull request #1324 from nabinhait/hotfix
Minor Fix
2014-01-15 22:44:25 -08:00
Nabin Hait
deda7e2c75 Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-16 12:08:36 +05:30
Nabin Hait
5cdb8cea13 Reset filters in Item Price report on each route 2014-01-16 12:08:12 +05:30
Nabin Hait
90a8c9e636 Merge pull request #1323 from nabinhait/hotfix
Billing status for zero value SO/PO
2014-01-15 05:20:51 -08:00
Nabin Hait
c0c951b6a9 Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-15 17:36:34 +05:30
Nabin Hait
39eb7faeb9 Update billing percentage and status from SI/PI in SO/PO, when net total is zero 2014-01-15 17:36:18 +05:30
Nabin Hait
4829ad3eb8 Merge pull request #1321 from akhileshdarjee/hotfix
Hide fields fix
2014-01-15 03:17:23 -08:00
Akhilesh Darjee
a682d45846 webnotes/erpnext # 1320 - hide fields fix 2014-01-15 16:39:01 +05:30
Pratik Vyas
76dd468f0e update about erpnext with version number 2014-01-15 14:23:38 +05:30
Nabin Hait
a6df26839d Higher priority to user's default price list over customer's default price list 2014-01-15 12:21:14 +05:30
Akhilesh Darjee
2a79b00700 minor fix 2014-01-15 11:54:05 +05:30
Akhilesh Darjee
6a749e3a8e removed while loop 2014-01-15 11:43:47 +05:30
Nabin Hait
c5d4fc38aa Fixes in monthly salary register 2014-01-15 10:54:07 +05:30
Pratik Vyas
02f7e83bd1 Merge branch 'develop' 2014-01-14 18:49:14 +05:30
Pratik Vyas
f55d9414cd bumped to version 3.6.1 2014-01-14 19:19:14 +06:00
Nabin Hait
5644ed37a4 Merge pull request #1316 from nabinhait/hotfix
rounding and divisional loss
2014-01-14 05:05:33 -08:00
Nabin Hait
ee6200576a Highest priority to user properties while fetching warehouse from item 2014-01-14 18:34:10 +05:30
Nabin Hait
eeb8ba18cd Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-14 17:44:47 +05:30
Nabin Hait
3a19370892 Rounding issue and divisional loss adjustment 2014-01-14 17:44:34 +05:30
Nabin Hait
6dc1ba6f7f Merge pull request #1314 from nabinhait/hotfix
comment fix
2014-01-14 02:29:39 -08:00
Nabin Hait
d91af2853e Allowed import for customer issue 2014-01-14 15:56:52 +05:30
Nabin Hait
d23ae108ae Fixes in Comment, if comment by not mentioned, consider owner 2014-01-14 15:52:09 +05:30
Anand Doshi
b9b6a6cea5 Moved webnotes scheduler event hooks 2014-01-13 21:22:23 +05:30
Pratik Vyas
72f8ae2d5a Merge branch 'develop' 2014-01-13 18:37:07 +05:30
Pratik Vyas
1e347910d5 bumped to version 3.6.0 2014-01-13 19:07:07 +06:00
Nabin Hait
25cfb700bb Merge pull request #1311 from akhileshdarjee/hotfix
Increase and decrease quantity buttons in POS
2014-01-13 04:33:50 -08:00
Nabin Hait
8d2d4e82fd Merge pull request #1302 from nabinhait/hotfix
Hotfix
2014-01-13 04:33:18 -08:00
Nabin Hait
c43d58ac79 Delete Property Setters for Custom Fields, and set them inside Custom Field 2014-01-13 17:55:24 +05:30
Akhilesh Darjee
0b3c10601c Increase and decrease quantity buttons in POS 2014-01-13 13:34:34 +05:30
Nabin Hait
14bf711d04 Fixes in frozen accounts validation 2014-01-13 13:28:07 +05:30
Nabin Hait
35a9d585b4 Bank Reconciliation Statement: Show balance in debit or credit column based on account type 2014-01-13 12:24:27 +05:30
Nabin Hait
38e56eeb45 Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-13 12:23:29 +05:30
Nabin Hait
3dd1043d5e Merge pull request #1301 from akhileshdarjee/hotfix
pos view showing inclusive taxes
2014-01-10 03:09:12 -08:00
Nabin Hait
55387aa931 Fixed conflict 2014-01-10 16:31:48 +05:30
Nabin Hait
03463ef73b Move related property setters to custom field property 2014-01-10 16:28:41 +05:30
Akhilesh Darjee
371663169c pos view showing inclusive taxes 2014-01-10 15:05:44 +05:30
Nabin Hait
f3ded044e0 Monthly Salary Register: Month is now optional 2014-01-09 17:38:50 +05:30
Nabin Hait
68b0d54b4b Set default accounts in company related to perpetual inventory, only it is enabled 2014-01-09 17:25:55 +05:30
Nabin Hait
95e45574cb Merge pull request #1239 from akhileshdarjee/flat-discount
Flat Discount on Sales Cycle
2014-01-09 03:43:35 -08:00
Pratik Vyas
e4a71935eb Merge branch 'develop' 2014-01-09 15:56:53 +05:30
Pratik Vyas
3e846d19d4 bumped to version 3.5.1 2014-01-09 16:26:53 +06:00
Nabin Hait
5411ece766 Merge pull request #1299 from nabinhait/hotfix
Accounts Receivable fix for partial payment in pos
2014-01-09 02:25:12 -08:00
Nabin Hait
aeb68b2899 Accounts Receivable fix for partial payment in pos 2014-01-09 15:54:18 +05:30
Pratik Vyas
0064dc6f4a Merge branch 'develop' 2014-01-09 15:52:09 +05:30
Pratik Vyas
11bf06ad76 bumped to version 3.5.0 2014-01-09 16:22:09 +06:00
Nabin Hait
5c6a2acff7 Merge pull request #1298 from nabinhait/hotfix
Accounts Receivable fix for partial payment in pos
2014-01-09 02:20:06 -08:00
Nabin Hait
cdbd4218a8 Accounts Receivable fix for partial payment in pos 2014-01-09 15:49:26 +05:30
Nabin Hait
701cddfb15 Merge pull request #1297 from nabinhait/hotfix
Hotfix
2014-01-08 23:18:54 -08:00
Nabin Hait
4bbf91bea1 Added match condition in general ledger report 2014-01-09 12:44:44 +05:30
Nabin Hait
e481e81e67 Merge pull request #1296 from akhileshdarjee/hotfix
POS print format fixed
2014-01-08 22:23:56 -08:00
Anand Doshi
102b417b52 Fix: Typo on patch 2014-01-09 11:39:10 +05:30
Akhilesh Darjee
efc2a45835 merge conflict fixed 2014-01-08 19:42:17 +05:30
Akhilesh Darjee
5c119a7e95 Merge branch 'master' of github.com:webnotes/erpnext into hotfix 2014-01-08 19:36:26 +05:30
Akhilesh Darjee
f7a102ffe3 POS print format fixed 2014-01-08 19:35:01 +05:30
Nabin Hait
d659343541 Payment Reconciliation: Fix for outstanding voucher query 2014-01-08 17:29:23 +05:30
Nabin Hait
dbf5e54eab Merge pull request #1290 from akhileshdarjee/price-list
Price List and Item Price : Valid for Buying and Selling as separate check box
2014-01-07 21:49:52 -08:00
Pratik Vyas
5eb139a531 Merge branch 'develop' 2014-01-07 21:45:04 +05:30
Pratik Vyas
9e2358c544 bumped to version 3.4.9 2014-01-07 22:15:04 +06:00
Akhilesh Darjee
8d0ef21911 pos invoice print format changes 2014-01-07 19:45:33 +05:30
Pratik Vyas
9a8f37c579 Merge pull request #1289 from pdvyas/hotfix-installer
fix installer python packages issue
2014-01-07 06:14:08 -08:00
Akhilesh Darjee
029f698c65 patch for item price and price list 2014-01-07 19:43:35 +05:30
Akhilesh Darjee
806017c92a Price List and Item Price : Validfor Buying and Selling as separate check box 2014-01-07 18:37:38 +05:30
Pratik Vyas
69951e5d1c fix installer python packages issue 2014-01-07 18:24:40 +05:30
Nabin Hait
10fd91c78e Close tickets automatically through scheduler 2014-01-07 16:18:41 +05:30
Pratik Vyas
63d71d7f2f Merge branch 'develop' 2014-01-07 13:47:44 +05:30
Pratik Vyas
777bff6e8d bumped to version 3.4.8 2014-01-07 14:17:44 +06:00
Nabin Hait
1e42a3d028 Merge pull request #1287 from nabinhait/hotfix
Fixes in overbilling validation against DN/PR
2014-01-06 23:12:45 -08:00
Nabin Hait
da282d405f Fixes in overbilling validation against DN/PR 2014-01-07 12:41:09 +05:30
Nabin Hait
8f1bb82ab9 Merge pull request #1286 from nabinhait/hotfix
Removed unwanted debug
2014-01-06 22:40:54 -08:00
Anand Doshi
f2b46635b5 Merge pull request #1285 from pdvyas/hotfix-installer
fix branching, pip version and mysql-python version pinning in install_erpnext
2014-01-06 22:35:49 -08:00
Pratik Vyas
a11e14424c fix branching, pip version and mysql-python version pinning in install_erpnext 2014-01-07 12:03:09 +05:30
Nabin Hait
01441ef37f Removed unwanted debug 2014-01-07 11:59:36 +05:30
Nabin Hait
f6cf5e0f43 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0.0-cleanup 2014-01-06 17:36:04 +05:30
Nabin Hait
cb665285db Merge pull request #1280 from nabinhait/hotfix
Fixes in item-wise sales/purchase register
2014-01-06 03:03:02 -08:00
Nabin Hait
6b66c387ad Fixes in item-wise sales/purchase register 2014-01-06 16:28:17 +05:30
Nabin Hait
5e702de710 Merge pull request #1279 from akhileshdarjee/hotfix
accounts payable fixed
2014-01-05 23:01:51 -08:00
Akhilesh Darjee
7e79f300a1 accounts payable fixed 2014-01-06 12:23:29 +05:30
Pratik Vyas
955902ccad Merge branch 'develop' 2014-01-06 12:18:58 +05:30
Pratik Vyas
b882fa14f4 bumped to version 3.4.7 2014-01-06 12:48:58 +06:00
Nabin Hait
d12d7142c6 Merge pull request #1278 from nabinhait/hotfix
Fixes in overbilling validation
2014-01-05 22:35:10 -08:00
Nabin Hait
42db5d76a9 Fixes in overbilling validation 2014-01-06 11:20:37 +05:30
Akhilesh Darjee
5dd92fd5d6 reload doc in maintenance schedule 2014-01-03 19:14:01 +05:30
Pratik Vyas
bd4030bf85 Merge branch 'develop' 2014-01-03 18:40:11 +05:30
Pratik Vyas
a83337a2dd bumped to version 3.4.6 2014-01-03 19:10:11 +06:00
Nabin Hait
e51e5238ec Merge pull request #1267 from nabinhait/hotfix
Hotfix
2014-01-03 04:59:34 -08:00
Nabin Hait
5d5fe5d9d5 Cost center field added in Purchase Receipt Item table 2014-01-03 18:28:53 +05:30
Akhilesh Darjee
e27717261d merge conflict fixed 2014-01-03 18:18:31 +05:30
Akhilesh Darjee
57738a0ff3 flat discount replaced to discount amount 2014-01-03 18:15:07 +05:30
Nabin Hait
b476c989a4 Fixes test cases for date and year mismatch 2014-01-03 17:43:52 +05:30
Nabin Hait
7f0406f281 Chekc over billing validation considering tolerance 2014-01-03 17:43:19 +05:30
Nabin Hait
33f6b9d6e8 Unlinked message listing all linked entries while cancelling an accounting trandsaction 2014-01-03 15:12:16 +05:30
Pratik Vyas
c196037cb0 Merge branch 'develop' 2014-01-03 13:27:06 +05:30
Pratik Vyas
866103bf66 bumped to version 3.4.5 2014-01-03 13:57:06 +06:00
Nabin Hait
528eb4e4ff Merge pull request #1264 from akhileshdarjee/hotfix
fixed accounts receivable for customer name
2014-01-02 23:53:30 -08:00
Nabin Hait
481454298d Merge pull request #1265 from nabinhait/hotfix
Fixes in general ledger report
2014-01-02 23:53:15 -08:00
Akhilesh Darjee
8a0b7cece1 accounts receivable fixed 2014-01-03 13:21:38 +05:30
Akhilesh Darjee
b4eba77f7b fixed accounts receivable 2014-01-03 12:58:04 +05:30
Akhilesh Darjee
b0a9581e59 fixed accounts receivable for customer name 2014-01-03 12:44:00 +05:30
Nabin Hait
6472bdace2 Fixes in general ledger report 2014-01-03 12:30:24 +05:30
Nabin Hait
c95b9f9221 Merge pull request #1263 from nabinhait/hotfix
Hotfix
2014-01-02 22:44:24 -08:00
Nabin Hait
a4db83a934 Fixes in valuation rate calculation in purchase receipt 2014-01-03 12:13:18 +05:30
Nabin Hait
28acaeb345 Fixes in valuation rate calculation in purchase receipt 2014-01-03 11:16:16 +05:30
Akhilesh Darjee
5c96b75a68 fixed maintenance schedule 2014-01-02 17:54:12 +05:30
Akhilesh Darjee
064d2ba16a fixed sr no in maintenance schedule 2014-01-02 17:47:32 +05:30
Pratik Vyas
5fbb757c2c Merge branch 'develop' 2014-01-02 17:12:01 +05:30
Pratik Vyas
df07c964f7 bumped to version 3.4.4 2014-01-02 17:42:01 +06:00
Nabin Hait
0e2a088ac4 Merge pull request #1260 from nabinhait/hotfix
Hotfix
2014-01-02 03:02:56 -08:00
Nabin Hait
ffc2f8885b Merge branch 'develop' of github.com:webnotes/erpnext into hotfix 2014-01-02 16:30:38 +05:30
Nabin Hait
a1ffacaf0b Valuation related charges should only go to stock items 2014-01-02 16:30:16 +05:30
Rushabh Mehta
b09d9dabc5 started cleanup of address / contact calls - partly fixed for customer, to fix shipping_address, get_pos_values, for all supplier transactions 2014-01-02 11:47:23 +05:30
Nabin Hait
06720dfb90 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into 4.0.0-wip 2014-01-01 10:47:18 +05:30
Nabin Hait
a2e0a9b05f Fliend rearrangemet in tables 2014-01-01 10:45:42 +05:30
Rushabh Mehta
3f7e2729bb removed demo hooks 2014-01-01 10:45:26 +05:30
Nabin Hait
6260b58a0a Merge pull request #1253 from nabinhait/4.0.0-wip
4.0.0 wip
2013-12-31 21:13:45 -08:00
Anand Doshi
2511aa2b14 Merge pull request #1254 from anandpdoshi/4.0.0-shopping-cart-wip
Moved Portal and Shopping Cart to Shopping Cart app, and some minor fixe...
2013-12-31 04:14:15 -08:00
Anand Doshi
9a4a13cb73 Moved Portal and Shopping Cart to Shopping Cart app, and some minor fixes 2013-12-31 17:38:21 +05:30
Nabin Hait
139aa71666 Fixed conflict while merging with master 2013-12-31 16:09:22 +05:30
Nabin Hait
d3f04d754a General ledger path fixed 2013-12-31 16:04:48 +05:30
Nabin Hait
432b86344e Validate account with reference voucher if against voucher mentioned 2013-12-31 15:07:58 +05:30
Pratik Vyas
8c52258e6d Merge branch 'develop' 2013-12-31 14:12:36 +05:30
Pratik Vyas
ffe8af3f2f bumped to version 3.4.3 2013-12-31 14:42:36 +06:00
Nabin Hait
fe5728718f Merge pull request #1251 from nabinhait/hotfix
Hotfix
2013-12-30 21:02:20 -08:00
Nabin Hait
424b4a4b36 Supplier bill info in accounts payable report 2013-12-31 10:24:28 +05:30
Nabin Hait
2a3d7e660f Fixes in general ledger report 2013-12-30 20:28:23 +05:30
Pratik Vyas
a0a43ca4e4 Merge branch 'develop' 2013-12-30 19:34:38 +05:30
Pratik Vyas
9cd9836e18 bumped to version 3.4.2 2013-12-30 20:04:38 +06:00
Pratik Vyas
39a3f50732 Merge branch 'develop' 2013-12-30 18:58:03 +05:30
Pratik Vyas
ba7221c332 bumped to version 3.4.1 2013-12-30 19:28:03 +06:00
Pratik Vyas
6a45588a2c Merge branch 'develop' 2013-12-30 17:48:01 +05:30
Pratik Vyas
ab9d755e4d bumped to version 3.4.0 2013-12-30 18:18:01 +06:00
Nabin Hait
1cf8bd8767 Merge pull request #1246 from nabinhait/hotfix
General Ledger and more
2013-12-30 03:44:41 -08:00
Akhilesh Darjee
829eda47a8 Merge branch '4.0.0-wip' of github.com:webnotes/erpnext into flat-discount 2013-12-30 12:31:07 +05:30
Anand Doshi
0663ec4a9c Merge fixes: removed patches, removed Warehouse User 2013-12-27 18:00:28 +05:30
Rushabh Mehta
61bf425935 deleted moves 2013-12-27 17:58:39 +05:30
Akhilesh Darjee
d203aea7c2 [flat discount] flat discount implemented on sales cycle 2013-12-27 17:49:57 +05:30
Nabin Hait
a4f99428d7 Fixes in time log batch 2013-12-27 17:36:17 +05:30
Nabin Hait
e761fe89e2 Stock Entry catch exceptions for testcase 2013-12-27 17:35:39 +05:30
Nabin Hait
d51f805b78 Rewritten General Ledger report with grouping functions 2013-12-27 17:33:55 +05:30
Rushabh Mehta
c4a0ed63ef Moved demo to separate app, moved patches folder 2013-12-27 17:30:24 +05:30
Akhilesh Darjee
31ccf9a80b [flat discount] fixed test cases for stock entry 2013-12-27 14:21:39 +05:30
Rushabh Mehta
4ac68952e8 Moved patches and fixed method routing in pages 2013-12-27 13:43:40 +05:30
Anand Doshi
e7fc25d6a8 Fixes after permissions merge 2013-12-27 10:49:28 +05:30
Rushabh Mehta
0527a393aa Merge pull request #1236 from anandpdoshi/permissions
Permissions
2013-12-26 21:07:54 -08:00
Akhilesh Darjee
2b1d8854d5 [flat discount] added flat discount in pos 2013-12-26 20:31:42 +05:30
Anand Doshi
8e332ffd16 Merge remote-tracking branch 'webnotes/4.0.0-wip' into permissions
Conflicts:
	erpnext/accounts/page/accounts_browser/accounts_browser.css
	erpnext/controllers/buying_controller.py
	erpnext/manufacturing/doctype/production_order/production_order.py
	erpnext/patches/patch_list.py
	erpnext/selling/doctype/customer/customer.txt
	erpnext/selling/doctype/sales_order/sales_order.py
	erpnext/selling/doctype/sales_order/test_sales_order.py
	erpnext/setup/doctype/features_setup/features_setup.txt
	erpnext/stock/doctype/stock_entry/test_stock_entry.py
	erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
	startup/query_handlers.py
2013-12-26 19:12:51 +05:30
Akhilesh Darjee
3ab9f24a12 Merge branch 'master' of github.com:webnotes/erpnext into flat_discount 2013-12-26 18:15:14 +05:30
Akhilesh Darjee
13fa595282 [flat discount] pos print format fixed 2013-12-26 18:14:44 +05:30
Akhilesh Darjee
aebb844da9 [flat discount] added flat discount in print format and all selling doctypes 2013-12-26 18:05:41 +05:30
Rushabh Mehta
7334bea3c2 fixed languages, moved framework strings to framework 2013-12-26 14:44:08 +05:30
Rushabh Mehta
caa4380d49 Merge with 3.3.8 2013-12-26 11:07:58 +05:30
Rushabh Mehta
54047780fc Merge with 3.3.8 2013-12-26 11:07:46 +05:30
Akhilesh Darjee
c53dbc7cdf [flat discount] implemented flat discount on client side 2013-12-25 19:46:20 +05:30
Rushabh Mehta
4b6b377134 Removed config.json 2013-12-25 17:38:12 +05:30
Rushabh Mehta
df200f305b Redesigned templates. Now all templates must be inside templates/pages templates/generators 2013-12-25 15:19:22 +05:30
Nabin Hait
9a064e9ced Merge pull request #1233 from nabinhait/hotfix
Removed country field from Search Fields
2013-12-25 01:01:17 -08:00
Nabin Hait
9dc1b00d87 Removed country field from Search Fields 2013-12-25 12:28:54 +05:30
Akhilesh Darjee
63aa5fd673 [flat discount] implemented flat discount on server side 2013-12-24 20:30:03 +05:30
Rushabh Mehta
3c68488873 Fixes to setup wizard 2013-12-24 18:51:49 +05:30
Rushabh Mehta
30fb30cffb Merge pull request #1 from pdvyas/testing
add travis ci
2013-12-24 05:21:21 -08:00
Pratik Vyas
9373ba96d5 Merge branch 'develop' 2013-12-24 13:12:21 +05:30
Pratik Vyas
a402079cd4 bumped to version 3.3.8 2013-12-24 13:42:21 +06:00
Nabin Hait
2ca388b0a5 Merge pull request #1232 from nabinhait/hotfix
Hotfix
2013-12-23 23:29:00 -08:00
Pratik Vyas
f437e867fd add travis ci 2013-12-24 12:17:59 +05:30
Nabin Hait
6ebcc5c006 Change parent account of warehouse from inside the warehouse 2013-12-24 12:14:12 +05:30
Nabin Hait
6a2edee914 Fixes in general ledger report 2013-12-24 11:58:05 +05:30
Nabin Hait
de69ad0a48 Merge pull request #1230 from akhileshdarjee/hotfix
[fix] [minor] update item_name and description in item price
2013-12-23 22:09:13 -08:00
Akhilesh Darjee
25a4bd02f4 [fix] [minor] update item_name and description in item price 2013-12-24 11:32:57 +05:30
Nabin Hait
a3d058938e Company mandatory validation while enabling perpetual inventory 2013-12-24 11:03:04 +05:30
Nabin Hait
4cae8a0d54 Fixes in stock ledger report 2013-12-24 10:47:34 +05:30
Nabin Hait
454b6f9f8a Merge pull request #1229 from nabinhait/hotfix
Fixes in sales return validation
2013-12-23 07:05:08 -08:00
Nabin Hait
9f1b59dfc6 Fixes in sales return validation 2013-12-23 20:34:09 +05:30
Anand Doshi
2926651e1c Restrict Employee and Leave Approver to relevant Employee and Leave Application records 2013-12-23 20:01:20 +05:30
Anand Doshi
9b67f4344b Patch to migrate allow_print and allow_email to print and email rights of DocPerm 2013-12-23 20:01:20 +05:30
Anand Doshi
68852f25b5 Added rights for print and email in DocPerm 2013-12-23 20:01:20 +05:30
Anand Doshi
8a436500f0 [refactor] Client-side permission handling 2013-12-23 20:01:19 +05:30
Anand Doshi
2298d59b8b [patch] new permission system 2013-12-23 20:01:19 +05:30
Anand Doshi
620145c59a [minor] patches for restriction 2013-12-23 20:01:19 +05:30
Anand Doshi
bcf2422848 [minor] user properties and leave application 2013-12-23 20:01:19 +05:30
Anand Doshi
83638b5f05 [minor] move warehouse user to restrictions 2013-12-23 20:01:18 +05:30
Rushabh Mehta
57518fc5f1 [cleanup] [minor] default+cache related 2013-12-23 20:01:18 +05:30
Rushabh Mehta
fea93d0f65 [cleanup] [minor] added webnotes.model.delete_doc (module) 2013-12-23 20:01:18 +05:30
Rushabh Mehta
b1ea6b1f66 [permissions] Added Test Cases 2013-12-23 20:01:18 +05:30
Rushabh Mehta
497d363fc1 [permission model] Redesign
Conflicts:

	patches/patch_list.py
2013-12-23 20:01:18 +05:30
Pratik Vyas
74f64b67db Merge branch 'develop' 2013-12-23 17:31:22 +05:30
Pratik Vyas
2117afba07 bumped to version 3.3.7 2013-12-23 18:01:22 +06:00
Nabin Hait
e409d0d70b Merge pull request #1227 from akhileshdarjee/hotfix
[fix] [minor] update item price on change of item details
2013-12-23 03:42:08 -08:00
Nabin Hait
50125b35d2 Merge pull request #1228 from nabinhait/hotfix
Hotfix
2013-12-23 03:41:13 -08:00
Nabin Hait
c38527ef5f Show general/stock ledger button links to new query reports 2013-12-23 17:07:57 +05:30
Nabin Hait
facde47c6c Stock ledger report filter by item and brand 2013-12-23 17:06:46 +05:30
Nabin Hait
20dc79ac99 General ledger filter by account group 2013-12-23 17:06:10 +05:30
Akhilesh Darjee
61da43f793 [fix] [minor] update modified date and time to item price when updating item and price list 2013-12-23 16:24:33 +05:30
Akhilesh Darjee
af30c3fdfd [fix] [minor] update item price on change of item details 2013-12-23 16:13:42 +05:30
Rushabh Mehta
b63d550a70 Added Applications page and fixed issues in translations and hooks 2013-12-23 16:09:00 +05:30
Akhilesh Darjee
b09dc46e68 [flat discount] first commit 2013-12-23 15:49:08 +05:30
Pratik Vyas
68888a21ec Merge branch 'develop' 2013-12-23 14:41:05 +05:30
Pratik Vyas
7d7661c9ed bumped to version 3.3.6 2013-12-23 15:11:05 +06:00
Nabin Hait
fbda00eef0 Merge pull request #1225 from nabinhait/hotfix
Fixes in Stock ageing report
2013-12-22 22:53:13 -08:00
Nabin Hait
a0212d8014 Fixes in Stock ageing report 2013-12-23 12:21:14 +05:30
Nabin Hait
c8d2604afc Merge pull request #1224 from nabinhait/hotfix
Incoming rate for stock ledger entry should not be rounded
2013-12-22 22:50:41 -08:00
Nabin Hait
861453279d Incoming rate for stock ledger entry should not be rounded 2013-12-23 12:14:45 +05:30
Pratik Vyas
be96600c1c Merge branch 'develop' 2013-12-20 15:15:45 +05:30
Pratik Vyas
8709c51e84 bumped to version 3.3.5 2013-12-20 15:45:45 +06:00
Pratik Vyas
6fc0262cb6 Merge pull request #1220 from nabinhait/hotfix
Fixes in stock projected qty report
2013-12-20 01:36:27 -08:00
Nabin Hait
4b5ced03ec Fixes in merge functions 2013-12-20 12:26:48 +05:30
Nabin Hait
a888e29b0a Fixes in stock projected qty report 2013-12-20 12:18:37 +05:30
Pratik Vyas
ae2e8996b0 Merge branch 'develop' 2013-12-19 19:18:57 +05:30
Pratik Vyas
1c2bbd77a0 bumped to version 3.3.4 2013-12-19 19:48:56 +06:00
Nabin Hait
2ffba327ac Merge pull request #1218 from nabinhait/hotfix
Opening and closing balance in general ledger report
2013-12-19 05:48:07 -08:00
Pratik Vyas
4764f3ea1d Merge pull request #1217 from pdvyas/patch-reload-packed_item
reload packed item in patch, for migration from slow branch
2013-12-19 05:46:52 -08:00
Pratik Vyas
104deeebb5 reload packed item in patch, for migration from slow branch 2013-12-19 19:16:00 +05:30
Nabin Hait
2a9e4e9a32 Opening and closing balance in general ledger report 2013-12-19 19:11:53 +05:30
Rushabh Mehta
2b08985e16 Translations redesigned webnotes/wnframework#351 2013-12-19 18:27:48 +05:30
Pratik Vyas
a38a7b8e76 Merge pull request #1214 from anandpdoshi/hotfix-scheduler-errors
Send Email Digest, only if there is atleast one update for selected cate...
2013-12-19 01:12:17 -08:00
Anand Doshi
88eedb7397 Send Email Digest, only if there is atleast one update for selected categories 2013-12-19 14:07:39 +05:30
Pratik Vyas
605cc93c90 Merge branch 'develop' 2013-12-19 11:42:38 +05:30
Pratik Vyas
1644fce273 bumped to version 3.3.3 2013-12-19 12:12:38 +06:00
Pratik Vyas
8cc2bf7fcf Merge pull request #1213 from pdvyas/email-digest-error
fix company email digest patch
2013-12-18 22:12:03 -08:00
Pratik Vyas
fe6409debf fix company email digest patch 2013-12-19 11:41:10 +05:30
Nabin Hait
edc58619d1 Merge pull request #1211 from nabinhait/hotfix
fixes in item validation
2013-12-18 21:28:25 -08:00
Nabin Hait
85800fa929 fixes in item validation 2013-12-19 10:57:43 +05:30
Nabin Hait
60ec0128a2 Merge pull request #1205 from akhileshdarjee/master
[fix] [issue] webnotes/erpnext#1191 - set expected delivery date in production order
2013-12-18 20:03:36 -08:00
Nabin Hait
90e0700e24 Merge pull request #1208 from nabinhait/hotfix
fixes in stock projected qty report
2013-12-18 05:46:03 -08:00
Nabin Hait
48156e3d8b fixes in stock projected qty report 2013-12-18 18:51:20 +05:30
Nabin Hait
8b353e5e15 Merge pull request #1207 from nabinhait/hotfix
Removed sales_order_no from no_copy in material request item
2013-12-18 01:24:02 -08:00
Nabin Hait
fcbd4d7638 Removed sales_order_no from no_copy in material request item 2013-12-18 14:53:36 +05:30
Pratik Vyas
9409efe02a Merge branch 'develop' 2013-12-18 14:40:36 +05:30
Pratik Vyas
b645a217fd bumped to version 3.3.2 2013-12-18 15:10:36 +06:00
Pratik Vyas
ef295d2977 Merge pull request #1203 from anandpdoshi/hotfix-scheduler-errors
[fix] scheduler error email digest
2013-12-18 01:10:12 -08:00
Akhilesh Darjee
2d0e31b479 [fix] [minor] merge conflict fixed 2013-12-18 13:32:37 +05:30
Akhilesh Darjee
2678ed181a [fix] [issue] webnotes/erpnext#1191 - set expected delivery date in production order 2013-12-18 13:28:40 +05:30
Anand Doshi
1fce0b1f79 [fix] scheduler error email digest 2013-12-18 13:22:18 +05:30
Rushabh Mehta
91e9822f65 fixed test cases webnotes/wnframework#351 2013-12-16 18:43:42 +05:30
Rushabh Mehta
c652a6254f Rewrote hooks for scheduler, notifications, boot, session, login, webpage webnotes/wnframework#351 2013-12-16 12:48:38 +05:30
Rushabh Mehta
30430796c7 notifications via hooks webnotes/wnframework#351 2013-12-13 15:33:40 +05:30
Rushabh Mehta
6de403f2be added manifest, hooks and fixed requires webnotes/wnframework#351 2013-12-13 14:10:14 +05:30
Rushabh Mehta
1f84799f2d install, web serving, session booting webnotes/wnframework#351 2013-12-12 19:12:19 +05:30
Rushabh Mehta
d2dd83c3a3 fixed template loader webnotes/wnframework#351 2013-12-12 13:57:58 +05:30
Pratik Vyas
1b23208779 [minor] get bundle working, almost 2013-12-12 10:44:38 +05:30
Rushabh Mehta
39bb8e2ed4 step 0: install 2013-12-11 15:32:14 +05:30
Rushabh Mehta
e460aa277b added setup.py 2013-12-11 11:32:21 +05:30
Rushabh Mehta
b234a3545a moved config.json inside erpnext 2013-12-11 10:55:55 +05:30
Rushabh Mehta
afea58b7a1 moved modules inside erpnext folder 2013-12-11 10:43:52 +05:30
1907 changed files with 29358 additions and 43500 deletions

2
.gitignore vendored
View File

@@ -5,3 +5,5 @@ conf.py
locale
latest_updates.json
.wnf-lang-status
*.egg-info
dist/

23
.travis.yml Normal file
View File

@@ -0,0 +1,23 @@
language: python
python:
- "2.7"
services:
- mysql
install:
- CFLAGS=-O0 pip install git+https://github.com/frappe/frappe.git@develop &&
- pip install --editable .
script:
cd ./test_sites/ &&
frappe --reinstall test_site &&
frappe --install_app erpnext test_site &&
frappe --request '?cmd=erpnext.setup.page.setup_wizard.setup_wizard.setup_account&currency=USD&first_name=Test&last_name=User&company_name=Wind+Power+LLC&timezone=America/New_York&company_abbr=WP&industry=Manufacturing&country=United states&fy_start_date=2014-01-01&fy_end_date=2014-12-31' test_site &&
frappe --run_tests test_site --app erpnext
before_script:
- mysql -e 'create database travis' &&
- echo "USE mysql;\nUPDATE user SET password=PASSWORD('travis') WHERE user='travis';\nFLUSH PRIVILEGES;\n" | mysql -u root

18
MANIFEST.in Normal file
View File

@@ -0,0 +1,18 @@
include MANIFEST.in
include requirements.txt
include *.json
include *.md
include *.py
include *.txt
recursive-include erpnext *.css
recursive-include erpnext *.csv
recursive-include erpnext *.html
recursive-include erpnext *.ico
recursive-include erpnext *.js
recursive-include erpnext *.json
recursive-include erpnext *.md
recursive-include erpnext *.png
recursive-include erpnext *.py
recursive-include erpnext *.svg
recursive-include erpnext *.txt
recursive-exclude * *.pyc

View File

@@ -1,10 +1,10 @@
# ERPNext - Open Source ERP for small, medium sized businesses
# ERPNext - Open Source ERP for small, medium sized businesses [![Build Status](https://travis-ci.org/frappe/erpnext.png)](https://travis-ci.org/frappe/erpnext)
[https://erpnext.com](https://erpnext.com)
Includes Accounting, Inventory, CRM, Sales, Purchase, Projects, HRMS. Built on Python / MySQL.
ERPNext is built on [wnframework](https://github.com/webnotes/wnframework)
ERPNext is built on [frappe](https://github.com/frappe/frappe)
- [User Guide](http://erpnext.org/user-guide.html)
- [Getting Help](http://erpnext.org/getting-help.html)
@@ -13,29 +13,22 @@ ERPNext is built on [wnframework](https://github.com/webnotes/wnframework)
---
### Development install
Use the bench, https://github.com/frappe/frappe-bench.
### Admin Login
1. go to "/login"
1. Administrator user name: "Administrator"
1. Administrator passowrd "admin"
### Download and Install
##### Virtual Image:
- [ERPNext Download](http://erpnext.com/erpnext-download)
##### On Linux:
1. Switch to root user using `sudo su`
1. create a folder where you want to install erpnext
1. go to the new folder
1. `wget https://raw.github.com/webnotes/erpnext/master/install_erpnext.py`
1. `python install_erpnext.py`
[See installation notes](https://github.com/webnotes/erpnext/wiki/How-to-Install-ERPNext)
##### Patch and update
To patch and update from the latest git repository the erpnext folder and run.
You will have to set your origin in git remote
$ lib/wnf.py --update origin master
---
## License

View File

@@ -1,22 +0,0 @@
[
{
"creation": "2011-12-21 11:08:55",
"docstatus": 0,
"modified": "2013-09-13 17:17:47",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doc_type": "Sales Invoice",
"doctype": "Print Format",
"html": "<html>\n<head>\n<!--Item Table, Totals and Other Charges-->\n<script>\nfunction get_print_format() {\n var oc = getchildren('Sales Invoice Item', doc.name, 'entries');\n\tvar rows = '<table width=\"100%\" cellpadding=\"0\" class=\"cart\">\\\n <tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>\\\n <tr>\\\n <td width=\"60%\" align=\"left\">ITEM NAME.</td>\\\n <td width=\"10%\" align=\"right\">QTY</td>\\\n <td width=\"30%\" align=\"right\">AMOUNT</td>\\\n </tr>\\\n <tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>';\n\tfor (var x=0; x<oc.length; x++) {\n console.log(oc[x].item_code!=oc[x].item_name);\n\t\trows += '<tr>\\\n <td align=\"left\">' + oc[x].item_code + \n (oc[x].item_code!=oc[x].item_name ? ('<br>' + oc[x].item_name) : '') + '</td>\\\n <td align=\"right\" style=\"vertical-align:top;\">' + oc[x].qty + '</td>\\\n <td align=\"right\" valign=\"top\">' + format_currency(oc[x].export_amount, doc.currency) + '</td>\\\n </tr>';\n\t}\n rows += '<tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>\\\n <tr>\\\n <td colspan=\"2\" align=\"right\">Net Total</td>\\\n <td align=\"right\">' + format_currency(doc.net_total_export, doc.currency) + '</td>\\\n </tr>';\n if (doc.other_charges_total_export != 0) {\n var taxes = wn.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t$.each(taxes, function(i, d) {\n\t\t\trows += '<tr>\\\n \t\t\t\t<td colspan=\"2\" align=\"right\">' + d.description + '</td>\\\n \t\t\t\t<td style=\"text-align: right;\">' + format_currency(d.tax_amount / doc.conversion_rate, doc.currency) + '</td>\\\n \t\t\t<tr>';\n\t\t});\n }\n rows += '<tr>\\\n <td colspan=\"2\" align=\"right\" style=\"vertical-align:middle;\">Grand Total</td>\\\n <td align=\"right\"><hr width=\"90%\" align=\"right\">' + format_currency(doc.grand_total_export, doc.currency) + '<br>\\\n <hr width=\"90%\" align=\"right\"></td>\\\n </tr>\\\n <tr>\\\n <td align=\"center\" colspan=\"3\">Thank You. Please visit again.</td>\\\n </tr>\\\n </table>';\n\treturn rows;\n}\n</script>\n<style>\n table, tr, td, div, p {\n font-family: Monospace;\n line-height: 200%;\n }\n h1, h2, h3, h4, h5, h6 {\n text-align: center;\n }\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 4in;\n\t\t}\n\t}\n</style>\n</head>\n\n<body>\n<table width=\"100%\" cellpadding=\"4\">\n <tr>\n <td align=\"left\">RECEIPT NO: <script>doc.name</script></td>\n <td align=\"right\">DATE: <script>date.str_to_user(doc.posting_date)</script></td>\n </tr>\n <tr>\n <td>M/s <script>doc.customer</script></td>\n </tr>\n</table>\n<!--Item Table & Totals-->\n<div><script>get_print_format();</script></div>\n</body>\n</html>\n",
"module": "Accounts",
"name": "__common__",
"print_format_type": "Client",
"standard": "Yes"
},
{
"doctype": "Print Format",
"name": "POS Invoice"
}
]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,21 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint, cstr
from webnotes import msgprint, _
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
def on_update(self):
webnotes.conn.set_default("auto_accounting_for_stock", self.doc.auto_accounting_for_stock)
if self.doc.auto_accounting_for_stock:
for wh in webnotes.conn.sql("select name from `tabWarehouse`"):
wh_bean = webnotes.bean("Warehouse", wh[0])
wh_bean.save()

View File

@@ -1,182 +0,0 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
//
//--------- ONLOAD -------------
wn.require("app/js/controllers/accounts.js");
cur_frm.cscript.onload = function(doc, cdt, cdn) {
}
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.set_footnote(wn.markdown(cur_frm.meta.description));
}
// For customizing print
cur_frm.pformat.net_total_import = function(doc) {
return '';
}
cur_frm.pformat.grand_total_import = function(doc) {
return '';
}
cur_frm.pformat.in_words_import = function(doc) {
return '';
}
cur_frm.pformat.purchase_tax_details= function(doc){
//function to make row of table
var make_row = function(title,val,bold){
var bstart = '<b>'; var bend = '</b>';
return '<tr><td style="width:50%;">'+(bold?bstart:'')+title+(bold?bend:'')+'</td>'
+'<td style="width:25%;text-align:right;"></td>'
+'<td style="width:25%;text-align:right;">'+format_currency(val, doc.currency)+'</td>'
+'</tr>'
}
function convert_rate(val){
var new_val = flt(val)/flt(doc.conversion_rate);
return new_val;
}
function print_hide(fieldname) {
var doc_field = wn.meta.get_docfield(doc.doctype, fieldname, doc.name);
return doc_field.print_hide;
}
var cl = getchildren('Purchase Taxes and Charges',doc.name,'purchase_tax_details');
// outer table
var out='<div><table class="noborder" style="width:100%">\
<tr><td style="width: 60%"></td><td>';
// main table
out +='<table class="noborder" style="width:100%">';
if(!print_hide('net_total_import')) {
out += make_row('Net Total', doc.net_total_import, 1);
}
// add rows
if(cl.length){
for(var i=0;i<cl.length;i++){
out += make_row(cl[i].description,convert_rate(cl[i].tax_amount),0);
}
}
// grand total
if(!print_hide('grand_total_import')) {
out += make_row('Grand Total', doc.grand_total_import, 1);
}
if(doc.in_words_import && !print_hide('in_words_import')){
out +='</table></td></tr>';
out += '<tr><td colspan = "2">';
out += '<table><tr><td style="width:25%;"><b>In Words</b></td>';
out+= '<td style="width:50%;">'+doc.in_words_import+'</td></tr>';
}
out +='</table></td></tr></table></div>';
return out;
}
cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.category && d.add_deduct_tax){
alert(wn._("Please select Category first"));
d.add_deduct_tax = '';
}
else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
console.log([d.category, d.add_deduct_tax]);
msgprint(wn._("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'"));
d.add_deduct_tax = '';
}
}
cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.category && d.charge_type){
alert(wn._("Please select Category first"));
d.charge_type = '';
}
else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){
alert(wn._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
d.charge_type = '';
}
else if((d.category == 'Valuation' || d.category == 'Valuation and Total') && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){
alert(wn._("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total"))
d.charge_type = '';
}
validated = false;
refresh_field('charge_type',d.name,'purchase_tax_details');
cur_frm.cscript.row_id(doc, cdt, cdn);
cur_frm.cscript.rate(doc, cdt, cdn);
cur_frm.cscript.tax_amount(doc, cdt, cdn);
}
cur_frm.cscript.row_id = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.row_id){
alert(wn._("Please select Charge Type first"));
d.row_id = '';
}
else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
alert(wn._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"));
d.row_id = '';
}
else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id){
if(d.row_id >= d.idx){
alert(wn._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
d.row_id = '';
}
}
validated = false;
refresh_field('row_id',d.name,'purchase_tax_details');
}
cur_frm.set_query("account_head", "purchase_tax_details", function(doc) {
return {
query: "controllers.queries.tax_account_query",
filters: {
"account_type": ["Tax", "Chargeable", "Expense Account"],
"debit_or_credit": "Debit",
"company": doc.company
}
}
});
cur_frm.fields_dict['purchase_tax_details'].grid.get_field("cost_center").get_query = function(doc) {
return {
filters: {
'company': doc.company,
'group_or_ledger': "Ledger"
}
}
}
cur_frm.cscript.rate = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.rate) {
alert(wn._("Please select Charge Type first"));
d.rate = '';
}
validated = false;
refresh_field('rate',d.name,'purchase_tax_details');
}
cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.tax_amount){
alert(wn._("Please select Charge Type first"));
d.tax_amount = '';
}
else if(d.charge_type && d.tax_amount) {
alert(wn._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
d.tax_amount = '';
}
validated = false;
refresh_field('tax_amount',d.name,'purchase_tax_details');
}

View File

@@ -1,5 +0,0 @@
{% extends "app/portal/templates/sale.html" %}
{% block status -%}
{% if doc.status %}{{ doc.status }}{% endif %}
{%- endblock %}

View File

@@ -1,30 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes import _
from webnotes.utils import flt, fmt_money
no_cache = True
def get_context():
from portal.utils import get_transaction_context
context = get_transaction_context("Sales Invoice", webnotes.form_dict.name)
modify_status(context.get("doc"))
context.update({
"parent_link": "invoices",
"parent_title": "Invoices"
})
return context
def modify_status(doc):
doc.status = ""
if flt(doc.outstanding_amount):
doc.status = '<span class="label %s"><i class="icon-fixed-width %s"></i> %s</span>' % \
("label-warning", "icon-exclamation-sign",
_("To Pay") + " = " + fmt_money(doc.outstanding_amount, currency=doc.currency))
else:
doc.status = '<span class="label %s"><i class="icon-fixed-width %s"></i> %s</span>' % \
("label-success", "icon-ok", _("Paid"))

View File

@@ -1 +0,0 @@
{% extends "app/portal/templates/sales_transactions.html" %}

View File

@@ -1,28 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
no_cache = True
def get_context():
from portal.utils import get_currency_context
context = get_currency_context()
context.update({
"title": "Invoices",
"method": "accounts.doctype.sales_invoice.templates.pages.invoices.get_invoices",
"icon": "icon-file-text",
"empty_list_message": "No Invoices Found",
"page": "invoice"
})
return context
@webnotes.whitelist()
def get_invoices(start=0):
from portal.utils import get_transaction_list
from accounts.doctype.sales_invoice.templates.pages.invoice import modify_status
invoices = get_transaction_list("Sales Invoice", start, ["outstanding_amount"])
for d in invoices:
modify_status(d)
return invoices

View File

@@ -1,22 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint
from webnotes.model.controller import DocListController
class DocType(DocListController):
def validate(self):
if self.doc.is_default == 1:
webnotes.conn.sql("""update `tabSales Taxes and Charges Master` set is_default = 0
where ifnull(is_default,0) = 1 and name != %s and company = %s""",
(self.doc.name, self.doc.company))
# at least one territory
self.validate_table_has_rows("valid_for_territories")
def on_update(self):
cart_settings = webnotes.get_obj("Shopping Cart Settings")
if cint(cart_settings.doc.enabled):
cart_settings.validate_tax_masters()

View File

@@ -1,70 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import webnotes
import unittest
from accounts.doctype.shipping_rule.shipping_rule import FromGreaterThanToError, ManyBlankToValuesError, OverlappingConditionError
class TestShippingRule(unittest.TestCase):
def test_from_greater_than_to(self):
shipping_rule = webnotes.bean(copy=test_records[0])
shipping_rule.doclist[1].from_value = 101
self.assertRaises(FromGreaterThanToError, shipping_rule.insert)
def test_many_zero_to_values(self):
shipping_rule = webnotes.bean(copy=test_records[0])
shipping_rule.doclist[1].to_value = 0
self.assertRaises(ManyBlankToValuesError, shipping_rule.insert)
def test_overlapping_conditions(self):
for range_a, range_b in [
((50, 150), (0, 100)),
((50, 150), (100, 200)),
((50, 150), (75, 125)),
((50, 150), (25, 175)),
((50, 150), (50, 150)),
]:
shipping_rule = webnotes.bean(copy=test_records[0])
shipping_rule.doclist[1].from_value = range_a[0]
shipping_rule.doclist[1].to_value = range_a[1]
shipping_rule.doclist[2].from_value = range_b[0]
shipping_rule.doclist[2].to_value = range_b[1]
self.assertRaises(OverlappingConditionError, shipping_rule.insert)
test_records = [
[
{
"doctype": "Shipping Rule",
"label": "_Test Shipping Rule",
"calculate_based_on": "Net Total",
"company": "_Test Company",
"account": "_Test Account Shipping Charges - _TC",
"cost_center": "_Test Cost Center - _TC"
},
{
"doctype": "Shipping Rule Condition",
"parentfield": "shipping_rule_conditions",
"from_value": 0,
"to_value": 100,
"shipping_amount": 50.0
},
{
"doctype": "Shipping Rule Condition",
"parentfield": "shipping_rule_conditions",
"from_value": 101,
"to_value": 200,
"shipping_amount": 100.0
},
{
"doctype": "Shipping Rule Condition",
"parentfield": "shipping_rule_conditions",
"from_value": 201,
"shipping_amount": 0.0
},
{
"doctype": "Applicable Territory",
"parentfield": "valid_for_territories",
"territory": "_Test Territory"
}
]
]

View File

@@ -1,29 +0,0 @@
select.accbrowser-company-select {
width: 200px;
margin-top: 2px;
margin-left: 10px;
}
span.tree-node-toolbar {
padding: 2px;
margin-left: 15px;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background-color: #ddd;
}
.tree-area a.selected {
font-weight: bold;
text-decoration: underline;
}
span.balance-area {
float: right;
height: 13px;
}
span.balance-bold {
font-weight: bold;
}

View File

@@ -1,321 +0,0 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
// tree of chart of accounts / cost centers
// multiple companies
// add node
// edit node
// see ledger
pscript['onload_Accounts Browser'] = function(wrapper){
console.log($(wrapper).html());
wn.ui.make_app_page({
parent: wrapper,
single_column: true
})
wrapper.appframe.add_module_icon("Accounts");
var main = $(wrapper).find(".layout-main"),
chart_area = $("<div>")
.css({"margin-bottom": "15px", "min-height": "200px"})
.appendTo(main),
help_area = $('<div class="well">'+
'<h4>'+wn._('Quick Help')+'</h4>'+
'<ol>'+
'<li>'+wn._('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
'<li>'+
wn._('Accounting Entries can be made against leaf nodes, called')+
'<b>' +wn._('Ledgers')+'</b>.'+ wn._('Entries against') +
'<b>' +wn._('Groups') + '</b>'+ wn._('are not allowed.')+
'</li>'+
'<li>'+wn._('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
'<li>'+
'<b>'+wn._('To create a Bank Account:')+'</b>'+
wn._('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts)')+
wn._('and create a new Account Ledger (by clicking on Add Child) of type "Bank or Cash"')+
'</li>'+
'<li>'+
'<b>'+wn._('To create a Tax Account:')+'</b>'+
wn._('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties)')+
wn._('and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
'</li>'+
'</ol>'+
'<p>'+wn._('Please setup your chart of accounts before you start Accounting Entries')+'</p></div>').appendTo(main);
if (wn.boot.profile.can_create.indexOf("Company") !== -1) {
wrapper.appframe.add_button(wn._('New Company'), function() { newdoc('Company'); },
'icon-plus');
}
wrapper.appframe.set_title_right('Refresh', function() {
wrapper.$company_select.change();
});
// company-select
wrapper.$company_select = wrapper.appframe.add_select("Company", [])
.change(function() {
var ctype = wn.get_route()[1] || 'Account';
erpnext.account_chart = new erpnext.AccountsChart(ctype, $(this).val(),
chart_area.get(0));
pscript.set_title(wrapper, ctype, $(this).val());
})
// load up companies
return wn.call({
method:'accounts.page.accounts_browser.accounts_browser.get_companies',
callback: function(r) {
wrapper.$company_select.empty();
$.each(r.message, function(i, v) {
$('<option>').html(v).attr('value', v).appendTo(wrapper.$company_select);
});
wrapper.$company_select.val(wn.defaults.get_default("company") || r[0]).change();
}
});
}
pscript.set_title = function(wrapper, ctype, val) {
if(val) {
wrapper.appframe.set_title('Chart of '+ctype+'s' + " - " + cstr(val));
} else {
wrapper.appframe.set_title('Chart of '+ctype+'s');
}
}
pscript['onshow_Accounts Browser'] = function(wrapper){
// set route
var ctype = wn.get_route()[1] || 'Account';
if(erpnext.account_chart && erpnext.account_chart.ctype != ctype) {
wrapper.$company_select.change();
}
pscript.set_title(wrapper, ctype);
}
erpnext.AccountsChart = Class.extend({
init: function(ctype, company, wrapper) {
$(wrapper).empty();
var me = this;
me.ctype = ctype;
me.can_create = wn.model.can_create(this.ctype);
me.can_delete = wn.model.can_delete(this.ctype);
me.can_write = wn.model.can_write(this.ctype);
me.company = company;
this.tree = new wn.ui.Tree({
parent: $(wrapper),
label: ctype==="Account" ? "Accounts" : "Cost Centers",
args: {ctype: ctype, comp: company},
method: 'accounts.page.accounts_browser.accounts_browser.get_children',
click: function(link) {
if(me.cur_toolbar)
$(me.cur_toolbar).toggle(false);
if(!link.toolbar)
me.make_link_toolbar(link);
if(link.toolbar) {
me.cur_toolbar = link.toolbar;
$(me.cur_toolbar).toggle(true);
}
// bold
$('.balance-bold').removeClass('balance-bold'); // deselect
$(link).parent().find('.balance-area:first').addClass('balance-bold'); // select
},
onrender: function(treenode) {
if (ctype == 'Account' && treenode.data) {
if(treenode.data.balance) {
treenode.parent.append('<span class="balance-area">'
+ format_currency(treenode.data.balance, treenode.data.currency)
+ '</span>');
}
}
}
});
this.tree.rootnode.$a.click();
},
make_link_toolbar: function(link) {
var data = $(link).data('node-data');
if(!data) return;
link.toolbar = $('<span class="tree-node-toolbar"></span>').insertAfter(link);
var node_links = [];
// edit
if (wn.model.can_read(this.ctype) !== -1) {
node_links.push('<a onclick="erpnext.account_chart.open();">'+wn._('Edit')+'</a>');
}
if (data.expandable && wn.boot.profile.in_create.indexOf(this.ctype) !== -1) {
node_links.push('<a onclick="erpnext.account_chart.new_node();">'+wn._('Add Child')+'</a>');
} else if (this.ctype === 'Account' && wn.boot.profile.can_read.indexOf("GL Entry") !== -1) {
node_links.push('<a onclick="erpnext.account_chart.show_ledger();">'+wn._('View Ledger')+'</a>');
}
if (this.can_write) {
node_links.push('<a onclick="erpnext.account_chart.rename()">'+wn._('Rename')+'</a>');
};
if (this.can_delete) {
node_links.push('<a onclick="erpnext.account_chart.delete()">'+wn._('Delete')+'</a>');
};
link.toolbar.append(node_links.join(" | "));
},
open: function() {
var node = this.selected_node();
wn.set_route("Form", this.ctype, node.data("label"));
},
show_ledger: function() {
var me = this;
var node = me.selected_node();
wn.route_options = {
"account": node.data('label'),
"from_date": sys_defaults.year_start_date,
"to_date": sys_defaults.year_end_date
};
wn.set_route("general-ledger");
},
rename: function() {
var node = this.selected_node();
wn.model.rename_doc(this.ctype, node.data('label'), function(new_name) {
node.parents("ul:first").parent().find(".tree-link:first").trigger("reload");
});
},
delete: function() {
var node = this.selected_node();
wn.model.delete_doc(this.ctype, node.data('label'), function() {
node.parent().remove();
});
},
new_node: function() {
if(this.ctype=='Account') {
this.new_account();
} else {
this.new_cost_center();
}
},
selected_node: function() {
return this.tree.$w.find('.tree-link.selected');
},
new_account: function() {
var me = this;
// the dialog
var d = new wn.ui.Dialog({
title:wn._('New Account'),
fields: [
{fieldtype:'Data', fieldname:'account_name', label:wn._('New Account Name'), reqd:true,
description: wn._("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+
wn._("they are created automatically from the Customer and Supplier master")},
{fieldtype:'Select', fieldname:'group_or_ledger', label:wn._('Group or Ledger'),
options:'Group\nLedger', description: wn._('Further accounts can be made under Groups,')+
wn._('but entries can be made against Ledger')},
{fieldtype:'Select', fieldname:'account_type', label:wn._('Account Type'),
options: ['', 'Fixed Asset Account', 'Bank or Cash', 'Expense Account', 'Tax',
'Income Account', 'Chargeable'].join('\n'),
description: wn._("Optional. This setting will be used to filter in various transactions.") },
{fieldtype:'Float', fieldname:'tax_rate', label:wn._('Tax Rate')},
{fieldtype:'Button', fieldname:'create_new', label:wn._('Create New') }
]
})
var fd = d.fields_dict;
// account type if ledger
$(fd.group_or_ledger.input).change(function() {
if($(this).val()=='Group') {
$(fd.account_type.wrapper).toggle(false);
$(fd.tax_rate.wrapper).toggle(false);
} else {
$(fd.account_type.wrapper).toggle(true);
if(fd.account_type.get_value()=='Tax') {
$(fd.tax_rate.wrapper).toggle(true);
}
}
});
// tax rate if tax
$(fd.account_type.input).change(function() {
if($(this).val()=='Tax') {
$(fd.tax_rate.wrapper).toggle(true);
} else {
$(fd.tax_rate.wrapper).toggle(false);
}
})
// create
$(fd.create_new.input).click(function() {
var btn = this;
$(btn).set_working();
var v = d.get_values();
if(!v) return;
var node = me.selected_node();
v.parent_account = node.data('label');
v.master_type = '';
v.company = me.company;
return wn.call({
args: v,
method:'accounts.utils.add_ac',
callback: function(r) {
$(btn).done_working();
d.hide();
node.trigger('reload');
}
});
});
// show
d.onshow = function() {
$(fd.group_or_ledger.input).change();
$(fd.account_type.input).change();
}
$(fd.group_or_ledger.input).val("Ledger").change();
d.show();
},
new_cost_center: function(){
var me = this;
// the dialog
var d = new wn.ui.Dialog({
title:wn._('New Cost Center'),
fields: [
{fieldtype:'Data', fieldname:'cost_center_name', label:wn._('New Cost Center Name'), reqd:true},
{fieldtype:'Select', fieldname:'group_or_ledger', label:wn._('Group or Ledger'),
options:'Group\nLedger', description:wn._('Further accounts can be made under Groups,')+
wn._('but entries can be made against Ledger')},
{fieldtype:'Button', fieldname:'create_new', label:wn._('Create New') }
]
});
// create
$(d.fields_dict.create_new.input).click(function() {
var btn = this;
$(btn).set_working();
var v = d.get_values();
if(!v) return;
var node = me.selected_node();
v.parent_cost_center = node.data('label');
v.company = me.company;
return wn.call({
args: v,
method:'accounts.utils.add_cc',
callback: function(r) {
$(btn).done_working();
d.hide();
node.trigger('reload');
}
});
});
d.show();
}
});

View File

@@ -1,295 +0,0 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt"
wn.module_page["Accounts"] = [
{
top: true,
title: wn._("Documents"),
icon: "icon-copy",
items: [
{
label: wn._("Journal Voucher"),
description: wn._("Accounting journal entries."),
doctype:"Journal Voucher"
},
{
label: wn._("Sales Invoice"),
description: wn._("Bills raised to Customers."),
doctype:"Sales Invoice"
},
{
label: wn._("Purchase Invoice"),
description: wn._("Bills raised by Suppliers."),
doctype:"Purchase Invoice"
},
]
},
{
title: wn._("Masters"),
icon: "icon-book",
items: [
{
label: wn._("Chart of Accounts"),
route: "Accounts Browser/Account",
description: wn._("Structure of books of accounts."),
doctype:"Account"
},
{
label: wn._("Chart of Cost Centers"),
route: "Accounts Browser/Cost Center",
description: wn._("Structure cost centers for budgeting."),
doctype:"Cost Center"
},
{
label: wn._("Customer"),
description: wn._("Customer database."),
doctype:"Customer"
},
{
label: wn._("Supplier"),
description: wn._("Supplier database."),
doctype:"Supplier"
},
]
},
{
title: wn._("Setup"),
icon: "icon-wrench",
items: [
{
label: wn._("Company"),
description: wn._("Company Master."),
doctype:"Company"
},
{
label: wn._("Fiscal Year"),
description: wn._("Accounting Year."),
doctype:"Fiscal Year"
},
]
},
{
title: wn._("Tools"),
icon: "icon-wrench",
items: [
{
"route":"Form/Bank Reconciliation/Bank Reconciliation",
"label": wn._("Bank Reconciliation"),
"description": wn._("Update bank payment dates with journals."),
doctype: "Bank Reconciliation"
},
{
"route":"Form/Payment to Invoice Matching Tool/Payment to Invoice Matching Tool",
"label": wn._("Payment Reconciliation"),
"description": wn._("Match non-linked Invoices and Payments."),
doctype: "Payment to Invoice Matching Tool"
},
{
"label": wn._("Period Closing Voucher"),
"doctype": "Period Closing Voucher",
description: wn._("Close Balance Sheet and book Profit or Loss.")
},
]
},
{
title: wn._("Setup"),
icon: "icon-cog",
items: [
{
"label": wn._("Accounts Settings"),
"route": "Form/Accounts Settings",
"doctype":"Accounts Settings",
"description": wn._("Settings for Accounts")
},
{
"label": wn._("Sales Taxes and Charges Master"),
"doctype":"Sales Taxes and Charges Master",
"description": wn._("Tax Template for Sales")
},
{
"label": wn._("Purchase Taxes and Charges Master"),
"doctype":"Purchase Taxes and Charges Master",
"description": wn._("Tax Template for Purchase")
},
{
"label": wn._("Shipping Rules"),
"doctype":"Shipping Rule",
"description": wn._("Rules to calculate shipping amount for a sale")
},
{
"label": wn._("Currency Exchange"),
"doctype":"Currency Exchange",
"description": wn._("Manage exchange rates for currency conversion")
},
{
"label": wn._("Point-of-Sale Setting"),
"doctype":"POS Setting",
"description": wn._("User settings for Point-of-sale (POS)")
},
{
"doctype":"Budget Distribution",
"label": wn._("Budget Distribution"),
"description": wn._("Seasonality for setting budgets.")
},
{
"doctype":"Terms and Conditions",
"label": wn._("Terms and Conditions Template"),
description: wn._("Template of terms or contract.")
},
{
"doctype":"Mode of Payment",
"label": wn._("Mode of Payment"),
description: wn._("e.g. Bank, Cash, Credit Card")
},
{
"doctype":"C-Form",
"label": wn._("C-Form"),
description: wn._("C-Form records"),
country: "India"
}
]
},
{
title: wn._("Main Reports"),
right: true,
icon: "icon-table",
items: [
{
"label":wn._("General Ledger"),
doctype: "GL Entry",
route: "query-report/General Ledger"
},
{
"label":wn._("Trial Balance"),
page: "trial-balance"
},
{
"page":"Financial Statements",
"label": wn._("Financial Statements")
},
{
"label":wn._("Accounts Receivable"),
route: "query-report/Accounts Receivable",
doctype: "Sales Invoice"
},
{
"label":wn._("Accounts Payable"),
route: "query-report/Accounts Payable",
doctype: "Purchase Invoice"
},
{
"label":wn._("Sales Register"),
route: "query-report/Sales Register",
doctype: "Sales Invoice"
},
{
"label":wn._("Purchase Register"),
route: "query-report/Purchase Register",
doctype: "Purchase Invoice"
},
]
},
{
title: wn._("Analytics"),
right: true,
icon: "icon-bar-chart",
items: [
{
"label":wn._("Financial Analytics"),
page: "financial-analytics"
},
{
"label":wn._("Gross Profit"),
route: "query-report/Gross Profit",
doctype: "Sales Invoice"
},
]
},
{
title: wn._("Reports"),
right: true,
icon: "icon-list",
items: [
{
"label":wn._("Bank Reconciliation Statement"),
route: "query-report/Bank Reconciliation Statement",
doctype: "Journal Voucher"
},
{
"label":wn._("Ordered Items To Be Billed"),
route: "query-report/Ordered Items To Be Billed",
doctype: "Sales Invoice"
},
{
"label":wn._("Delivered Items To Be Billed"),
route: "query-report/Delivered Items To Be Billed",
doctype: "Sales Invoice"
},
{
"label":wn._("Purchase Order Items To Be Billed"),
route: "query-report/Purchase Order Items To Be Billed",
doctype: "Purchase Invoice"
},
{
"label":wn._("Received Items To Be Billed"),
route: "query-report/Received Items To Be Billed",
doctype: "Purchase Invoice"
},
{
"label":wn._("Bank Clearance Summary"),
route: "query-report/Bank Clearance Summary",
doctype: "Journal Voucher"
},
{
"label":wn._("Payment Period Based On Invoice Date"),
route: "query-report/Payment Period Based On Invoice Date",
doctype: "Journal Voucher"
},
{
"label":wn._("Sales Partners Commission"),
route: "query-report/Sales Partners Commission",
doctype: "Sales Invoice"
},
{
"label":wn._("Customer Account Head"),
route: "query-report/Customer Account Head",
doctype: "Account"
},
{
"label":wn._("Supplier Account Head"),
route: "query-report/Supplier Account Head",
doctype: "Account"
},
{
"label":wn._("Item-wise Sales Register"),
route: "query-report/Item-wise Sales Register",
doctype: "Sales Invoice"
},
{
"label":wn._("Item-wise Purchase Register"),
route: "query-report/Item-wise Purchase Register",
doctype: "Purchase Invoice"
},
{
"label":wn._("Budget Variance Report"),
route: "query-report/Budget Variance Report",
doctype: "Cost Center"
},
{
"label":wn._("Purchase Invoice Trends"),
route: "query-report/Purchase Invoice Trends",
doctype: "Purchase Invoice"
},
{
"label":wn._("Sales Invoice Trends"),
route: "query-report/Sales Invoice Trends",
doctype: "Sales Invoice"
},
]
}
]
pscript['onload_accounts-home'] = function(wrapper) {
wn.views.moduleview.make(wrapper, "Accounts");
}

View File

@@ -1,22 +0,0 @@
[
{
"creation": "2012-06-14 15:07:28",
"docstatus": 0,
"modified": "2013-07-11 14:40:16",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doctype": "Page",
"icon": "icon-th",
"module": "Accounts",
"name": "__common__",
"page_name": "accounts-home",
"standard": "Yes",
"title": "Accounts Home"
},
{
"doctype": "Page",
"name": "accounts-home"
}
]

View File

@@ -1,22 +0,0 @@
[
{
"creation": "2013-07-30 17:28:49",
"docstatus": 0,
"modified": "2013-09-05 12:40:04",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doctype": "Report",
"is_standard": "Yes",
"name": "__common__",
"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`.`amount` - ifnull((select sum(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\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` != \"Stopped\" 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",
"ref_doctype": "Sales Invoice",
"report_name": "Delivered Items To Be Billed",
"report_type": "Query Report"
},
{
"doctype": "Report",
"name": "Delivered Items To Be Billed"
}
]

View File

@@ -1,51 +0,0 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
wn.query_reports["General Ledger"] = {
"filters": [
{
"fieldname":"company",
"label": wn._("Company"),
"fieldtype": "Link",
"options": "Company",
"default": wn.defaults.get_user_default("company"),
"reqd": 1
},
{
"fieldname":"account",
"label": wn._("Account"),
"fieldtype": "Link",
"options": "Account"
},
{
"fieldname":"voucher_no",
"label": wn._("Voucher No"),
"fieldtype": "Data",
},
{
"fieldname":"group_by",
"label": wn._("Group by"),
"fieldtype": "Select",
"options": "\nGroup by Account\nGroup by Voucher"
},
{
"fieldtype": "Break",
},
{
"fieldname":"from_date",
"label": wn._("From Date"),
"fieldtype": "Date",
"default": wn.datetime.add_months(wn.datetime.get_today(), -1),
"reqd": 1,
"width": "60px"
},
{
"fieldname":"to_date",
"label": wn._("To Date"),
"fieldtype": "Date",
"default": wn.datetime.get_today(),
"reqd": 1,
"width": "60px"
}
]
}

View File

@@ -1,79 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import flt
from webnotes import _
def execute(filters=None):
validate_filters(filters)
columns = get_columns()
if filters.get("group_by"):
data = get_grouped_gle(filters)
else:
data = get_gl_entries(filters)
if data:
data.append(get_total_row(data))
return columns, data
def validate_filters(filters):
if filters.get("account") and filters.get("group_by") == "Group by Account":
webnotes.throw(_("Can not filter based on Account, if grouped by Account"))
if filters.get("voucher_no") and filters.get("group_by") == "Group by Voucher":
webnotes.throw(_("Can not filter based on Voucher No, if grouped by Voucher"))
def get_columns():
return ["Posting Date:Date:100", "Account:Link/Account:200", "Debit:Currency:100",
"Credit:Currency:100", "Voucher Type::120", "Voucher No::160",
"Cost Center:Link/Cost Center:100", "Remarks::200"]
def get_gl_entries(filters):
return webnotes.conn.sql("""select
posting_date, account, debit, credit, voucher_type, voucher_no, cost_center, remarks
from `tabGL Entry`
where company=%(company)s
and posting_date between %(from_date)s and %(to_date)s
{conditions}
order by posting_date, account"""\
.format(conditions=get_conditions(filters)), filters, as_list=1)
def get_conditions(filters):
conditions = []
if filters.get("account"):
conditions.append("account=%(account)s")
if filters.get("voucher_no"):
conditions.append("voucher_no=%(voucher_no)s")
return "and {}".format(" and ".join(conditions)) if conditions else ""
def get_grouped_gle(filters):
gle_map = {}
gle = get_gl_entries(filters)
for d in gle:
gle_map.setdefault(d[1 if filters["group_by"]=="Group by Account" else 5], []).append(d)
data = []
for entries in gle_map.values():
subtotal_debit = subtotal_credit = 0.0
for entry in entries:
data.append(entry)
subtotal_debit += flt(entry[2])
subtotal_credit += flt(entry[3])
data.append(["", "Total", subtotal_debit, subtotal_credit, "", "", ""])
if data:
data.append(get_total_row(gle))
return data
def get_total_row(gle):
total_debit = total_credit = 0.0
for d in gle:
total_debit += flt(d[2])
total_credit += flt(d[3])
return ["", "Total Debit/Credit", total_debit, total_credit, "", "", ""]

View File

@@ -1,22 +0,0 @@
[
{
"creation": "2013-02-21 14:26:44",
"docstatus": 0,
"modified": "2013-02-22 15:53:01",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doctype": "Report",
"is_standard": "Yes",
"name": "__common__",
"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`.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`.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\"\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 != \"Stopped\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.export_amount,0)\norder by `tabSales Order`.transaction_date asc",
"ref_doctype": "Sales Invoice",
"report_name": "Ordered Items To Be Billed",
"report_type": "Query Report"
},
{
"doctype": "Report",
"name": "Ordered Items To Be Billed"
}
]

View File

@@ -1,22 +0,0 @@
[
{
"creation": "2013-07-30 18:35:10",
"docstatus": 0,
"modified": "2013-07-31 11:46:57",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doctype": "Report",
"is_standard": "Yes",
"name": "__common__",
"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\t `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabPurchase Receipt Item`.`amount` - ifnull((select sum(amount) from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and\n\t`tabPurchase Receipt`.`status` != \"Stopped\" 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`.pr_detail = `tabPurchase Receipt Item`.name), 0))\norder by `tabPurchase Receipt`.`name` desc",
"ref_doctype": "Purchase Invoice",
"report_name": "Received Items To Be Billed",
"report_type": "Query Report"
},
{
"doctype": "Report",
"name": "Received Items To Be Billed"
}
]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,198 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import webnotes.defaults
from webnotes.utils import cint
from webnotes import msgprint, _
from webnotes.model.doc import make_autoname
from utilities.transaction_base import TransactionBase
class DocType(TransactionBase):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist
def autoname(self):
supp_master_name = webnotes.defaults.get_global_default('supp_master_name')
if supp_master_name == 'Supplier Name':
if webnotes.conn.exists("Customer", self.doc.supplier_name):
webnotes.msgprint(_("A Customer exists with same name"), raise_exception=1)
self.doc.name = self.doc.supplier_name
else:
self.doc.name = make_autoname(self.doc.naming_series + '.#####')
def update_address(self):
webnotes.conn.sql("""update `tabAddress` set supplier_name=%s, modified=NOW()
where supplier=%s""", (self.doc.supplier_name, self.doc.name))
def update_contact(self):
webnotes.conn.sql("""update `tabContact` set supplier_name=%s, modified=NOW()
where supplier=%s""", (self.doc.supplier_name, self.doc.name))
def update_credit_days_limit(self):
webnotes.conn.sql("""update tabAccount set credit_days = %s where name = %s""",
(cint(self.doc.credit_days), self.doc.name + " - " + self.get_company_abbr()))
def on_update(self):
if not self.doc.naming_series:
self.doc.naming_series = ''
self.update_address()
self.update_contact()
# create account head
self.create_account_head()
# update credit days and limit in account
self.update_credit_days_limit()
def get_payables_group(self):
g = webnotes.conn.sql("select payables_group from tabCompany where name=%s", self.doc.company)
g = g and g[0][0] or ''
if not g:
msgprint("Update Company master, assign a default group for Payables")
raise Exception
return g
def add_account(self, ac, par, abbr):
ac_bean = webnotes.bean({
"doctype": "Account",
'account_name':ac,
'parent_account':par,
'group_or_ledger':'Group',
'company':self.doc.company,
"freeze_account": "No",
})
ac_bean.ignore_permissions = True
ac_bean.insert()
msgprint(_("Created Group ") + ac)
def get_company_abbr(self):
return webnotes.conn.sql("select abbr from tabCompany where name=%s", self.doc.company)[0][0]
def get_parent_account(self, abbr):
if (not self.doc.supplier_type):
msgprint("Supplier Type is mandatory")
raise Exception
if not webnotes.conn.sql("select name from tabAccount where name=%s and debit_or_credit = 'Credit' and ifnull(is_pl_account, 'No') = 'No'", (self.doc.supplier_type + " - " + abbr)):
# if not group created , create it
self.add_account(self.doc.supplier_type, self.get_payables_group(), abbr)
return self.doc.supplier_type + " - " + abbr
def validate(self):
#validation for Naming Series mandatory field...
if webnotes.defaults.get_global_default('supp_master_name') == 'Naming Series':
if not self.doc.naming_series:
msgprint("Series is Mandatory.", raise_exception=1)
def create_account_head(self):
if self.doc.company :
abbr = self.get_company_abbr()
parent_account = self.get_parent_account(abbr)
if not webnotes.conn.sql("select name from tabAccount where name=%s", (self.doc.name + " - " + abbr)):
ac_bean = webnotes.bean({
"doctype": "Account",
'account_name': self.doc.name,
'parent_account': parent_account,
'group_or_ledger':'Ledger',
'company': self.doc.company,
'account_type': '',
'tax_rate': '0',
'master_type': 'Supplier',
'master_name': self.doc.name,
"freeze_account": "No"
})
ac_bean.ignore_permissions = True
ac_bean.insert()
msgprint(_("Created Account Head: ") + ac_bean.doc.name)
else:
self.check_parent_account(parent_account, abbr)
else :
msgprint("Please select Company under which you want to create account head")
def check_parent_account(self, parent_account, abbr):
if webnotes.conn.get_value("Account", self.doc.name + " - " + abbr,
"parent_account") != parent_account:
ac = webnotes.bean("Account", self.doc.name + " - " + abbr)
ac.doc.parent_account = parent_account
ac.save()
def get_contacts(self,nm):
if nm:
contact_details =webnotes.conn.convert_to_lists(webnotes.conn.sql("select name, CONCAT(IFNULL(first_name,''),' ',IFNULL(last_name,'')),contact_no,email_id from `tabContact` where supplier = '%s'"%nm))
return contact_details
else:
return ''
def delete_supplier_address(self):
for rec in webnotes.conn.sql("select * from `tabAddress` where supplier=%s", (self.doc.name,), as_dict=1):
webnotes.conn.sql("delete from `tabAddress` where name=%s",(rec['name']))
def delete_supplier_contact(self):
for contact in webnotes.conn.sql_list("""select name from `tabContact`
where supplier=%s""", self.doc.name):
webnotes.delete_doc("Contact", contact)
def delete_supplier_account(self):
"""delete supplier's ledger if exist and check balance before deletion"""
acc = webnotes.conn.sql("select name from `tabAccount` where master_type = 'Supplier' \
and master_name = %s and docstatus < 2", self.doc.name)
if acc:
from webnotes.model import delete_doc
delete_doc('Account', acc[0][0])
def on_trash(self):
self.delete_supplier_address()
self.delete_supplier_contact()
self.delete_supplier_account()
def before_rename(self, olddn, newdn, merge=False):
from accounts.utils import rename_account_for
rename_account_for("Supplier", olddn, newdn, merge)
def after_rename(self, olddn, newdn, merge=False):
set_field = ''
if webnotes.defaults.get_global_default('supp_master_name') == 'Supplier Name':
webnotes.conn.set(self.doc, "supplier_name", newdn)
self.update_contact()
set_field = ", supplier_name=%(newdn)s"
self.update_supplier_address(newdn, set_field)
def update_supplier_address(self, newdn, set_field):
webnotes.conn.sql("""update `tabAddress` set address_title=%(newdn)s
{set_field} where supplier=%(newdn)s"""\
.format(set_field=set_field), ({"newdn": newdn}))
@webnotes.whitelist()
def get_dashboard_info(supplier):
if not webnotes.has_permission("Supplier", "read", supplier):
webnotes.msgprint("No Permission", raise_exception=True)
out = {}
for doctype in ["Supplier Quotation", "Purchase Order", "Purchase Receipt", "Purchase Invoice"]:
out[doctype] = webnotes.conn.get_value(doctype,
{"supplier": supplier, "docstatus": ["!=", 2] }, "count(*)")
billing = webnotes.conn.sql("""select sum(grand_total), sum(outstanding_amount)
from `tabPurchase Invoice`
where supplier=%s
and docstatus = 1
and fiscal_year = %s""", (supplier, webnotes.conn.get_default("fiscal_year")))
out["total_billing"] = billing[0][0]
out["total_unpaid"] = billing[0][1]
return out

View File

@@ -1,169 +0,0 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt"
wn.module_page["Buying"] = [
{
title: wn._("Documents"),
top: true,
icon: "icon-copy",
items: [
{
label: wn._("Supplier"),
description: wn._("Supplier database."),
doctype:"Supplier"
},
{
label: wn._("Material Request"),
description: wn._("Request for purchase."),
doctype:"Material Request"
},
{
label: wn._("Supplier Quotation"),
description: wn._("Quotations received from Suppliers."),
doctype:"Supplier Quotation"
},
{
label: wn._("Purchase Order"),
description: wn._("Purchase Orders given to Suppliers."),
doctype:"Purchase Order"
},
]
},
{
title: wn._("Masters"),
icon: "icon-book",
items: [
{
label: wn._("Contact"),
description: wn._("All Contacts."),
doctype:"Contact"
},
{
label: wn._("Address"),
description: wn._("All Addresses."),
doctype:"Address"
},
{
label: wn._("Item"),
description: wn._("All Products or Services."),
doctype:"Item"
},
]
},
{
title: wn._("Setup"),
icon: "icon-cog",
items: [
{
"label": wn._("Buying Settings"),
"route": "Form/Buying Settings",
"doctype":"Buying Settings",
"description": wn._("Settings for Buying Module")
},
{
"label": wn._("Purchase Taxes and Charges Master"),
"doctype":"Purchase Taxes and Charges Master",
"description": wn._("Tax Template for Purchase")
},
{
label: wn._("Price List"),
description: wn._("Multiple Price list."),
doctype:"Price List"
},
{
label: wn._("Item Price"),
description: wn._("Multiple Item prices."),
doctype:"Item Price"
},
{
"doctype":"Supplier Type",
"label": wn._("Supplier Type"),
"description": wn._("Supplier classification.")
},
{
"route":"Sales Browser/Item Group",
"label":wn._("Item Group"),
"description": wn._("Tree of item classification"),
doctype:"Item Group"
},
{
label: wn._("Terms and Conditions"),
description: wn._("Template of terms or contract."),
doctype:"Terms and Conditions"
},
]
},
{
title: wn._("Tools"),
icon: "icon-wrench",
items: [
]
},
{
title: wn._("Analytics"),
right: true,
icon: "icon-bar-chart",
items: [
{
"label":wn._("Purchase Analytics"),
page: "purchase-analytics"
},
]
},
{
title: wn._("Reports"),
right: true,
icon: "icon-list",
items: [
{
"label":wn._("Items To Be Requested"),
route: "query-report/Items To Be Requested",
doctype: "Item"
},
{
"label":wn._("Requested Items To Be Ordered"),
route: "query-report/Requested Items To Be Ordered",
doctype: "Material Request"
},
{
"label":wn._("Material Requests for which Supplier Quotations are not created"),
route: "query-report/Material Requests for which Supplier Quotations are not created",
doctype: "Material Request"
},
{
"label":wn._("Purchase In Transit"),
route: "query-report/Purchase In Transit",
doctype: "Purchase Order"
},
{
"label":wn._("Item-wise Purchase History"),
route: "query-report/Item-wise Purchase History",
doctype: "Item"
},
{
"label":wn._("Item-wise Last Purchase Rate"),
route: "query-report/Item-wise Last Purchase Rate",
doctype: "Item"
},
{
"label":wn._("Purchase Order Trends"),
route: "query-report/Purchase Order Trends",
doctype: "Purchase Order"
},
{
"label":wn._("Supplier Addresses And Contacts"),
route: "query-report/Supplier Addresses and Contacts",
doctype: "Supplier"
},
{
"label":wn._("Supplier-Wise Sales Analytics"),
route: "query-report/Supplier-Wise Sales Analytics",
doctype: "Stock Ledger Entry"
}
]
}
]
pscript['onload_buying-home'] = function(wrapper) {
wn.views.moduleview.make(wrapper, "Buying");
}

View File

@@ -1,22 +0,0 @@
[
{
"creation": "2012-02-21 13:22:54",
"docstatus": 0,
"modified": "2013-07-11 14:41:50",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doctype": "Page",
"icon": "icon-th",
"module": "Buying",
"name": "__common__",
"page_name": "buying-home",
"standard": "Yes",
"title": "Buying Home"
},
{
"doctype": "Page",
"name": "buying-home"
}
]

View File

@@ -1,23 +0,0 @@
[
{
"creation": "2013-05-13 16:10:02",
"docstatus": 0,
"modified": "2013-05-13 16:21:07",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"add_total_row": 1,
"doctype": "Report",
"is_standard": "Yes",
"name": "__common__",
"query": "select \n mr.name as \"Material Request:Link/Material Request:120\",\n\tmr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tmr_item.qty as \"Qty:Float:100\",\n\tmr_item.ordered_qty as \"Ordered Qty:Float:100\", \n\t(mr_item.qty - ifnull(mr_item.ordered_qty, 0)) as \"Qty to Order:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\n\tand ifnull(mr_item.ordered_qty, 0) < ifnull(mr_item.qty, 0)\norder by mr.transaction_date asc",
"ref_doctype": "Purchase Order",
"report_name": "Requested Items To Be Ordered",
"report_type": "Query Report"
},
{
"doctype": "Report",
"name": "Requested Items To Be Ordered"
}
]

View File

@@ -1,203 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes import msgprint, _
from webnotes.utils import getdate, flt, add_days, cstr
import json
@webnotes.whitelist()
def get_item_details(args):
"""
args = {
"doctype": "",
"docname": "",
"item_code": "",
"warehouse": None,
"supplier": None,
"transaction_date": None,
"conversion_rate": 1.0,
"buying_price_list": None,
"price_list_currency": None,
"plc_conversion_rate": 1.0,
"is_subcontracted": "Yes" / "No"
}
"""
if isinstance(args, basestring):
args = json.loads(args)
args = webnotes._dict(args)
item_bean = webnotes.bean("Item", args.item_code)
item = item_bean.doc
_validate_item_details(args, item)
out = _get_basic_details(args, item_bean)
out.supplier_part_no = _get_supplier_part_no(args, item_bean)
if not out.warehouse:
out.warehouse = item_bean.doc.default_warehouse
if out.warehouse:
out.projected_qty = get_projected_qty(item.name, out.warehouse)
if args.transaction_date and item.lead_time_days:
out.schedule_date = out.lead_time_date = add_days(args.transaction_date,
item.lead_time_days)
meta = webnotes.get_doctype(args.doctype)
if meta.get_field("currency"):
out.purchase_ref_rate = out.discount_rate = out.purchase_rate = \
out.import_ref_rate = out.import_rate = 0.0
out.update(_get_price_list_rate(args, item_bean, meta))
if args.doctype == "Material Request":
out.min_order_qty = flt(item.min_order_qty)
return out
def _get_basic_details(args, item_bean):
item = item_bean.doc
out = webnotes._dict({
"description": item.description_html or item.description,
"qty": 1.0,
"uom": item.stock_uom,
"conversion_factor": 1.0,
"warehouse": args.warehouse or item.default_warehouse,
"item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in
item_bean.doclist.get({"parentfield": "item_tax"})))),
"batch_no": None,
"expense_head": item.purchase_account \
or webnotes.conn.get_value("Company", args.company, "default_expense_account"),
"cost_center": item.cost_center
})
for fieldname in ("item_name", "item_group", "brand", "stock_uom"):
out[fieldname] = item.fields.get(fieldname)
return out
def _get_price_list_rate(args, item_bean, meta):
from utilities.transaction_base import validate_currency
item = item_bean.doc
out = webnotes._dict()
# try fetching from price list
if args.buying_price_list and args.price_list_currency:
price_list_rate = webnotes.conn.sql("""select ref_rate from `tabItem Price`
where price_list=%s and item_code=%s and buying_or_selling='Buying'""",
(args.buying_price_list, args.item_code), as_dict=1)
if price_list_rate:
validate_currency(args, item_bean.doc, meta)
out.import_ref_rate = flt(price_list_rate[0].ref_rate) * \
flt(args.plc_conversion_rate) / flt(args.conversion_rate)
# if not found, fetch from last purchase transaction
if not out.import_ref_rate:
last_purchase = get_last_purchase_details(item.name, args.docname, args.conversion_rate)
if last_purchase:
out.update(last_purchase)
if out.import_ref_rate or out.import_rate:
validate_currency(args, item, meta)
return out
def _get_supplier_part_no(args, item_bean):
item_supplier = item_bean.doclist.get({"parentfield": "item_supplier_details",
"supplier": args.supplier})
return item_supplier and item_supplier[0].supplier_part_no or None
def _validate_item_details(args, item):
from utilities.transaction_base import validate_item_fetch
validate_item_fetch(args, item)
# validate if purchase item or subcontracted item
if item.is_purchase_item != "Yes":
msgprint(_("Item") + (" %s: " % item.name) + _("not a purchase item"),
raise_exception=True)
if args.is_subcontracted == "Yes" and item.is_sub_contracted_item != "Yes":
msgprint(_("Item") + (" %s: " % item.name) +
_("not a sub-contracted item.") +
_("Please select a sub-contracted item or do not sub-contract the transaction."),
raise_exception=True)
def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0):
"""returns last purchase details in stock uom"""
# get last purchase order item details
last_purchase_order = webnotes.conn.sql("""\
select po.name, po.transaction_date, po.conversion_rate,
po_item.conversion_factor, po_item.purchase_ref_rate,
po_item.discount_rate, po_item.purchase_rate
from `tabPurchase Order` po, `tabPurchase Order Item` po_item
where po.docstatus = 1 and po_item.item_code = %s and po.name != %s and
po.name = po_item.parent
order by po.transaction_date desc, po.name desc
limit 1""", (item_code, cstr(doc_name)), as_dict=1)
# get last purchase receipt item details
last_purchase_receipt = webnotes.conn.sql("""\
select pr.name, pr.posting_date, pr.posting_time, pr.conversion_rate,
pr_item.conversion_factor, pr_item.purchase_ref_rate, pr_item.discount_rate,
pr_item.purchase_rate
from `tabPurchase Receipt` pr, `tabPurchase Receipt Item` pr_item
where pr.docstatus = 1 and pr_item.item_code = %s and pr.name != %s and
pr.name = pr_item.parent
order by pr.posting_date desc, pr.posting_time desc, pr.name desc
limit 1""", (item_code, cstr(doc_name)), as_dict=1)
purchase_order_date = getdate(last_purchase_order and last_purchase_order[0].transaction_date \
or "1900-01-01")
purchase_receipt_date = getdate(last_purchase_receipt and \
last_purchase_receipt[0].posting_date or "1900-01-01")
if (purchase_order_date > purchase_receipt_date) or \
(last_purchase_order and not last_purchase_receipt):
# use purchase order
last_purchase = last_purchase_order[0]
purchase_date = purchase_order_date
elif (purchase_receipt_date > purchase_order_date) or \
(last_purchase_receipt and not last_purchase_order):
# use purchase receipt
last_purchase = last_purchase_receipt[0]
purchase_date = purchase_receipt_date
else:
return webnotes._dict()
conversion_factor = flt(last_purchase.conversion_factor)
out = webnotes._dict({
"purchase_ref_rate": flt(last_purchase.purchase_ref_rate) / conversion_factor,
"purchase_rate": flt(last_purchase.purchase_rate) / conversion_factor,
"discount_rate": flt(last_purchase.discount_rate),
"purchase_date": purchase_date
})
conversion_rate = flt(conversion_rate) or 1.0
out.update({
"import_ref_rate": out.purchase_ref_rate / conversion_rate,
"import_rate": out.purchase_rate / conversion_rate,
"rate": out.purchase_rate
})
return out
@webnotes.whitelist()
def get_conversion_factor(item_code, uom):
return {"conversion_factor": webnotes.conn.get_value("UOM Conversion Detail",
{"parent": item_code, "uom": uom}, "conversion_factor")}
@webnotes.whitelist()
def get_projected_qty(item_code, warehouse):
return webnotes.conn.get_value("Bin", {"item_code": item_code,
"warehouse": warehouse}, "projected_qty")

View File

@@ -1,78 +0,0 @@
{
"app_name": "ERPNext",
"app_version": "3.3.1",
"base_template": "app/portal/templates/base.html",
"modules": {
"Accounts": {
"color": "#3498db",
"icon": "icon-money",
"link": "accounts-home",
"type": "module"
},
"Activity": {
"color": "#e67e22",
"icon": "icon-play",
"label": "Activity",
"link": "activity",
"type": "page"
},
"Buying": {
"color": "#c0392b",
"icon": "icon-shopping-cart",
"link": "buying-home",
"type": "module"
},
"HR": {
"color": "#2ecc71",
"icon": "icon-group",
"label": "Human Resources",
"link": "hr-home",
"type": "module"
},
"Manufacturing": {
"color": "#7f8c8d",
"icon": "icon-cogs",
"link": "manufacturing-home",
"type": "module"
},
"Notes": {
"color": "#95a5a6",
"doctype": "Note",
"icon": "icon-file-alt",
"label": "Notes",
"link": "List/Note",
"type": "list"
},
"Projects": {
"color": "#8e44ad",
"icon": "icon-puzzle-piece",
"link": "projects-home",
"type": "module"
},
"Selling": {
"color": "#1abc9c",
"icon": "icon-tag",
"link": "selling-home",
"type": "module"
},
"Setup": {
"color": "#bdc3c7",
"icon": "icon-wrench",
"link": "Setup",
"type": "setup"
},
"Stock": {
"color": "#f39c12",
"icon": "icon-truck",
"link": "stock-home",
"type": "module"
},
"Support": {
"color": "#2c3e50",
"icon": "icon-phone",
"link": "support-home",
"type": "module"
}
},
"requires_framework_version": "==3.3.1"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,9 @@
{%- if doc.letter_head -%}
{{ webnotes.conn.get_value("Letter Head", doc.letter_head, "content") }}
{{ frappe.db.get_value("Letter Head", doc.letter_head, "content") }}
{%- endif -%}
<!-- Page Layout Settings -->
<div class='common page-header'>
<table class='header-table' cellspacing=0>
<table class='header-table' cellspacing=0 style="width: 100%">
<thead>
<tr><td colspan="2"><h1>{{ doc.select_print_heading or 'Invoice' }}</h1></td></tr>
<tr><td colspan="2"><h3>{{ doc.name }}</h3></td></tr>
@@ -28,18 +28,18 @@
<tr>
<td width=40%><b>Invoice Date</b></td>
<td>{{ utils.formatdate(doc.posting_date) }}</td>
<tr>
</tr>
{%- if doc.convert_into_recurring_invoice and doc.recurring_id -%}
<tr>
<td width=40%><b>Invoice Period</b></td>
<td>{{ (utils.formatdate(doc.invoice_period_from_date)) +
' to ' + utils.formatdate(doc.invoice_period_to_date) }}</td>
<tr>
</tr>
{%- endif -%}
<tr>
<td><b>Due Date</b></td>
<td>{{ utils.formatdate(doc.due_date) }}</td>
<tr>
</tr>
</tbody></table></td>
</tr>
</tbody>
@@ -72,8 +72,8 @@
<td style="width: 37%;">{{ row.description }}</td>
<td style="width: 5%; text-align: right;">{{ row.qty }}</td>
<td style="width: 5%;">{{ row.stock_uom }}</td>
<td style="width: 15%; text-align: right;">{{ utils.fmt_money(row.export_rate, currency=doc.currency) }}</td>
<td style="width: 15%; text-align: right;">{{ utils.fmt_money(row.export_amount, currency=doc.currency) }}</td>
<td style="width: 15%; text-align: right;">{{ utils.fmt_money(row.rate, currency=doc.currency) }}</td>
<td style="width: 15%; text-align: right;">{{ utils.fmt_money(row.amount, currency=doc.currency) }}</td>
</tr>
{% endfor -%}
</tbody>

View File

@@ -11,7 +11,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
// -----------------------------------------
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(doc.__islocal) {
msgprint(wn._("Please create new account from Chart of Accounts."));
msgprint(frappe._("Please create new account from Chart of Accounts."));
throw "cannot create";
}
@@ -26,8 +26,8 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
'is_pl_account', 'company'], false);
if(doc.group_or_ledger=='Ledger') {
wn.model.with_doc("Accounts Settings", "Accounts Settings", function (name) {
var accounts_settings = wn.model.get_doc("Accounts Settings", name);
frappe.model.with_doc("Accounts Settings", "Accounts Settings", function (name) {
var accounts_settings = frappe.model.get_doc("Accounts Settings", name);
var display = accounts_settings["frozen_accounts_modifier"]
&& in_list(user_roles, accounts_settings["frozen_accounts_modifier"]);
@@ -37,8 +37,8 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
// read-only for root accounts
if(!doc.parent_account) {
cur_frm.perm = [[1,0,0], [1,0,0]];
cur_frm.set_intro(wn._("This is a root account and cannot be edited."));
cur_frm.set_read_only();
cur_frm.set_intro(frappe._("This is a root account and cannot be edited."));
} else {
// credit days and type if customer or supplier
cur_frm.set_intro(null);
@@ -81,23 +81,24 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
// Hide/unhide group or ledger
// -----------------------------------------
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.appframe.add_button(wn._('Chart of Accounts'),
function() { wn.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
cur_frm.appframe.add_button(frappe._('Chart of Accounts'),
function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
if (cstr(doc.group_or_ledger) == 'Group') {
cur_frm.add_custom_button(wn._('Convert to Ledger'),
cur_frm.add_custom_button(frappe._('Convert to Ledger'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
cur_frm.add_custom_button(wn._('Convert to Group'),
cur_frm.add_custom_button(frappe._('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
cur_frm.appframe.add_button(wn._('View Ledger'), function() {
wn.route_options = {
cur_frm.appframe.add_button(frappe._('View Ledger'), function() {
frappe.route_options = {
"account": doc.name,
"from_date": sys_defaults.year_start_date,
"to_date": sys_defaults.year_end_date
"to_date": sys_defaults.year_end_date,
"company": doc.company
};
wn.set_route("general-ledger");
frappe.set_route("query-report", "General Ledger");
}, "icon-table");
}
}

View File

@@ -2,12 +2,12 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import frappe
from webnotes.utils import flt, fmt_money, cstr, cint
from webnotes import msgprint, _
from frappe.utils import flt, fmt_money, cstr, cint
from frappe import msgprint, throw, _
get_value = webnotes.conn.get_value
get_value = frappe.db.get_value
class DocType:
def __init__(self,d,dl):
@@ -16,11 +16,11 @@ class DocType:
def autoname(self):
self.doc.name = self.doc.account_name.strip() + ' - ' + \
webnotes.conn.get_value("Company", self.doc.company, "abbr")
frappe.db.get_value("Company", self.doc.company, "abbr")
def get_address(self):
return {
'address': webnotes.conn.get_value(self.doc.master_type,
'address': frappe.db.get_value(self.doc.master_type,
self.doc.master_name, "address")
}
@@ -41,24 +41,29 @@ class DocType:
if self.doc.master_type in ('Customer', 'Supplier') or self.doc.account_type == "Warehouse":
if not self.doc.master_name:
msgprint(_("Please enter Master Name once the account is created."))
elif not webnotes.conn.exists(self.doc.master_type or self.doc.account_type,
elif not frappe.db.exists(self.doc.master_type or self.doc.account_type,
self.doc.master_name):
webnotes.throw(_("Invalid Master Name"))
throw(_("Invalid Master Name"))
def validate_parent(self):
"""Fetch Parent Details and validation for account not to be created under ledger"""
if self.doc.parent_account:
par = webnotes.conn.sql("""select name, group_or_ledger, is_pl_account, debit_or_credit
par = frappe.db.sql("""select name, group_or_ledger, is_pl_account, debit_or_credit
from tabAccount where name =%s""", self.doc.parent_account)
if not par:
msgprint("Parent account does not exists", raise_exception=1)
throw(_("Parent account does not exists"))
elif par[0][0] == self.doc.name:
msgprint("You can not assign itself as parent account", raise_exception=1)
throw(_("You can not assign itself as parent account"))
elif par[0][1] != 'Group':
msgprint("Parent account can not be a ledger", raise_exception=1)
throw(_("Parent account can not be a ledger"))
elif self.doc.debit_or_credit and par[0][3] != self.doc.debit_or_credit:
msgprint("You can not move a %s account under %s account" %
(self.doc.debit_or_credit, par[0][3]), raise_exception=1)
throw("{msg} {debit_or_credit} {under} {account} {acc}".format(**{
"msg": _("You cannot move a"),
"debit_or_credit": self.doc.debit_or_credit,
"under": _("account under"),
"account": par[0][3],
"acc": _("account")
}))
if not self.doc.is_pl_account:
self.doc.is_pl_account = par[0][2]
@@ -67,42 +72,48 @@ class DocType:
def validate_max_root_accounts(self):
"""Raise exception if there are more than 4 root accounts"""
if webnotes.conn.sql("""select count(*) from tabAccount where
if frappe.db.sql("""select count(*) from tabAccount where
company=%s and ifnull(parent_account,'')='' and docstatus != 2""",
self.doc.company)[0][0] > 4:
webnotes.msgprint("One company cannot have more than 4 root Accounts",
raise_exception=1)
throw(_("One company cannot have more than 4 root Accounts"))
def validate_duplicate_account(self):
if self.doc.fields.get('__islocal') or not self.doc.name:
company_abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr")
if webnotes.conn.sql("""select name from tabAccount where name=%s""",
company_abbr = frappe.db.get_value("Company", self.doc.company, "abbr")
if frappe.db.sql("""select name from tabAccount where name=%s""",
(self.doc.account_name + " - " + company_abbr)):
msgprint("Account Name: %s already exists, please rename"
% self.doc.account_name, raise_exception=1)
throw("{name}: {acc_name} {exist}, {rename}".format(**{
"name": _("Account Name"),
"acc_name": self.doc.account_name,
"exist": _("already exists"),
"rename": _("please rename")
}))
def validate_root_details(self):
#does not exists parent
if webnotes.conn.exists("Account", self.doc.name):
if not webnotes.conn.get_value("Account", self.doc.name, "parent_account"):
webnotes.msgprint("Root cannot be edited.", raise_exception=1)
if frappe.db.exists("Account", self.doc.name):
if not frappe.db.get_value("Account", self.doc.name, "parent_account"):
throw(_("Root cannot be edited."))
def validate_frozen_accounts_modifier(self):
old_value = webnotes.conn.get_value("Account", self.doc.name, "freeze_account")
old_value = frappe.db.get_value("Account", self.doc.name, "freeze_account")
if old_value and old_value != self.doc.freeze_account:
frozen_accounts_modifier = webnotes.conn.get_value( 'Accounts Settings', None,
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,
'frozen_accounts_modifier')
if not frozen_accounts_modifier or \
frozen_accounts_modifier not in webnotes.user.get_roles():
webnotes.throw(_("You are not authorized to set Frozen value"))
frozen_accounts_modifier not in frappe.user.get_roles():
throw(_("You are not authorized to set Frozen value"))
def convert_group_to_ledger(self):
if self.check_if_child_exists():
msgprint("Account: %s has existing child. You can not convert this account to ledger" %
(self.doc.name), raise_exception=1)
throw("{acc}: {account_name} {child}. {msg}".format(**{
"acc": _("Account"),
"account_name": self.doc.name,
"child": _("has existing child"),
"msg": _("You can not convert this account to ledger")
}))
elif self.check_gle_exists():
msgprint("Account with existing transaction can not be converted to ledger.",
raise_exception=1)
throw(_("Account with existing transaction can not be converted to ledger."))
else:
self.doc.group_or_ledger = 'Ledger'
self.doc.save()
@@ -110,11 +121,9 @@ class DocType:
def convert_ledger_to_group(self):
if self.check_gle_exists():
msgprint("Account with existing transaction can not be converted to group.",
raise_exception=1)
throw(_("Account with existing transaction can not be converted to group."))
elif self.doc.master_type or self.doc.account_type:
msgprint("Cannot covert to Group because Master Type or Account Type is selected.",
raise_exception=1)
throw(_("Cannot covert to Group because Master Type or Account Type is selected."))
else:
self.doc.group_or_ledger = 'Group'
self.doc.save()
@@ -122,42 +131,42 @@ class DocType:
# Check if any previous balance exists
def check_gle_exists(self):
return webnotes.conn.get_value("GL Entry", {"account": self.doc.name})
return frappe.db.get_value("GL Entry", {"account": self.doc.name})
def check_if_child_exists(self):
return webnotes.conn.sql("""select name from `tabAccount` where parent_account = %s
return frappe.db.sql("""select name from `tabAccount` where parent_account = %s
and docstatus != 2""", self.doc.name)
def validate_mandatory(self):
if not self.doc.debit_or_credit:
msgprint("Debit or Credit field is mandatory", raise_exception=1)
throw(_("Debit or Credit field is mandatory"))
if not self.doc.is_pl_account:
msgprint("Is PL Account field is mandatory", raise_exception=1)
throw(_("Is PL Account field is mandatory"))
def validate_warehouse_account(self):
if not cint(webnotes.defaults.get_global_default("auto_accounting_for_stock")):
if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
return
if self.doc.account_type == "Warehouse":
old_warehouse = cstr(webnotes.conn.get_value("Account", self.doc.name, "master_name"))
old_warehouse = cstr(frappe.db.get_value("Account", self.doc.name, "master_name"))
if old_warehouse != cstr(self.doc.master_name):
if old_warehouse:
self.validate_warehouse(old_warehouse)
if self.doc.master_name:
self.validate_warehouse(self.doc.master_name)
else:
webnotes.throw(_("Master Name is mandatory if account type is Warehouse"))
throw(_("Master Name is mandatory if account type is Warehouse"))
def validate_warehouse(self, warehouse):
if webnotes.conn.get_value("Stock Ledger Entry", {"warehouse": warehouse}):
webnotes.throw(_("Stock transactions exist against warehouse ") + warehouse +
if frappe.db.get_value("Stock Ledger Entry", {"warehouse": warehouse}):
throw(_("Stock transactions exist against warehouse ") + warehouse +
_(" .You can not assign / modify / remove Master Name"))
def update_nsm_model(self):
"""update lft, rgt indices for nested set model"""
import webnotes
import webnotes.utils.nestedset
webnotes.utils.nestedset.update_nsm(self)
import frappe
import frappe.utils.nestedset
frappe.utils.nestedset.update_nsm(self)
def on_update(self):
self.validate_max_root_accounts()
@@ -165,40 +174,39 @@ class DocType:
def get_authorized_user(self):
# Check logged-in user is authorized
if webnotes.conn.get_value('Accounts Settings', None, 'credit_controller') \
in webnotes.user.get_roles():
if frappe.db.get_value('Accounts Settings', None, 'credit_controller') \
in frappe.user.get_roles():
return 1
def check_credit_limit(self, total_outstanding):
# Get credit limit
credit_limit_from = 'Customer'
cr_limit = webnotes.conn.sql("""select t1.credit_limit from tabCustomer t1, `tabAccount` t2
cr_limit = frappe.db.sql("""select t1.credit_limit from tabCustomer t1, `tabAccount` t2
where t2.name=%s and t1.name = t2.master_name""", self.doc.name)
credit_limit = cr_limit and flt(cr_limit[0][0]) or 0
if not credit_limit:
credit_limit = webnotes.conn.get_value('Company', self.doc.company, 'credit_limit')
credit_limit = frappe.db.get_value('Company', self.doc.company, 'credit_limit')
credit_limit_from = 'Company'
# If outstanding greater than credit limit and not authorized person raise exception
if credit_limit > 0 and flt(total_outstanding) > credit_limit \
and not self.get_authorized_user():
msgprint("""Total Outstanding amount (%s) for <b>%s</b> can not be \
throw("""Total Outstanding amount (%s) for <b>%s</b> can not be \
greater than credit limit (%s). To change your credit limit settings, \
please update in the <b>%s</b> master""" % (fmt_money(total_outstanding),
self.doc.name, fmt_money(credit_limit), credit_limit_from), raise_exception=1)
self.doc.name, fmt_money(credit_limit), credit_limit_from))
def validate_trash(self):
"""checks gl entries and if child exists"""
if not self.doc.parent_account:
msgprint("Root account can not be deleted", raise_exception=1)
throw(_("Root account can not be deleted"))
if self.check_gle_exists():
msgprint("""Account with existing transaction (Sales Invoice / Purchase Invoice / \
Journal Voucher) can not be deleted""", raise_exception=1)
throw("""Account with existing transaction (Sales Invoice / Purchase Invoice / \
Journal Voucher) can not be deleted""")
if self.check_if_child_exists():
msgprint("Child account exists for this account. You can not delete this account.",
raise_exception=1)
throw(_("Child account exists for this account. You can not delete this account."))
def on_trash(self):
self.validate_trash()
@@ -206,16 +214,19 @@ class DocType:
def before_rename(self, old, new, merge=False):
# Add company abbr if not provided
from setup.doctype.company.company import get_name_with_abbr
from erpnext.setup.doctype.company.company import get_name_with_abbr
new_account = get_name_with_abbr(new, self.doc.company)
# Validate properties before merging
if merge:
val = list(webnotes.conn.get_value("Account", new_account,
["group_or_ledger", "debit_or_credit", "is_pl_account"]))
if not frappe.db.exists("Account", new):
throw(_("Account ") + new +_(" does not exists"))
val = list(frappe.db.get_value("Account", new_account,
["group_or_ledger", "debit_or_credit", "is_pl_account", "company"]))
if val != [self.doc.group_or_ledger, self.doc.debit_or_credit, self.doc.is_pl_account]:
webnotes.throw(_("""Merging is only possible if following \
if val != [self.doc.group_or_ledger, self.doc.debit_or_credit, self.doc.is_pl_account, self.doc.company]:
throw(_("""Merging is only possible if following \
properties are same in both records.
Group or Ledger, Debit or Credit, Is PL Account"""))
@@ -223,22 +234,22 @@ class DocType:
def after_rename(self, old, new, merge=False):
if not merge:
webnotes.conn.set_value("Account", new, "account_name",
frappe.db.set_value("Account", new, "account_name",
" - ".join(new.split(" - ")[:-1]))
else:
from webnotes.utils.nestedset import rebuild_tree
from frappe.utils.nestedset import rebuild_tree
rebuild_tree("Account", "parent_account")
def get_master_name(doctype, txt, searchfield, start, page_len, filters):
conditions = (" and company='%s'"% filters["company"]) if doctype == "Warehouse" else ""
return webnotes.conn.sql("""select name from `tab%s` where %s like %s %s
return frappe.db.sql("""select name from `tab%s` where %s like %s %s
order by name limit %s, %s""" %
(filters["master_type"], searchfield, "%s", conditions, "%s", "%s"),
("%%%s%%" % txt, start, page_len), as_list=1)
def get_parent_account(doctype, txt, searchfield, start, page_len, filters):
return webnotes.conn.sql("""select name from tabAccount
return frappe.db.sql("""select name from tabAccount
where group_or_ledger = 'Group' and docstatus != 2 and company = %s
and %s like %s order by name limit %s, %s""" %
("%s", searchfield, "%s", "%s", "%s"),

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-30 12:49:46",
"docstatus": 0,
"modified": "2013-09-24 11:22:18",
"modified": "2014-01-20 17:48:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -28,6 +28,7 @@
},
{
"amend": 0,
"cancel": 0,
"doctype": "DocPerm",
"name": "__common__",
"parent": "Account",
@@ -138,6 +139,7 @@
"doctype": "DocField",
"fieldname": "parent_account",
"fieldtype": "Link",
"ignore_restrictions": 1,
"label": "Parent Account",
"oldfieldname": "parent_account",
"oldfieldtype": "Link",
@@ -154,7 +156,6 @@
"oldfieldname": "account_type",
"oldfieldtype": "Select",
"options": "\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable\nWarehouse",
"permlevel": 0,
"search_index": 0
},
{
@@ -254,64 +255,77 @@
"read_only": 1
},
{
"cancel": 1,
"create": 1,
"delete": 1,
"doctype": "DocPerm",
"email": 1,
"permlevel": 0,
"print": 1,
"role": "Accounts User",
"write": 1
},
{
"cancel": 0,
"create": 0,
"delete": 0,
"doctype": "DocPerm",
"email": 1,
"permlevel": 0,
"print": 1,
"role": "Auditor",
"write": 0
},
{
"cancel": 0,
"create": 0,
"delete": 0,
"doctype": "DocPerm",
"email": 1,
"permlevel": 0,
"print": 1,
"role": "Sales User",
"write": 0
},
{
"cancel": 0,
"create": 0,
"delete": 0,
"doctype": "DocPerm",
"email": 1,
"permlevel": 0,
"print": 1,
"role": "Purchase User",
"write": 0
},
{
"cancel": 0,
"create": 0,
"delete": 0,
"doctype": "DocPerm",
"permlevel": 2,
"role": "Auditor",
"write": 0
},
{
"cancel": 1,
"create": 1,
"delete": 1,
"doctype": "DocPerm",
"email": 1,
"export": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"restrict": 1,
"role": "Accounts Manager",
"write": 1
},
{
"cancel": 0,
"create": 0,
"delete": 0,
"doctype": "DocPerm",
"permlevel": 2,
"role": "Accounts Manager",
"write": 1
},
{
"cancel": 0,
"create": 0,
"delete": 0,
"doctype": "DocPerm",
"permlevel": 2,
"role": "Accounts User",

View File

@@ -2,10 +2,10 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import frappe
def make_test_records(verbose):
from webnotes.test_runner import make_test_objects
def _make_test_records(verbose):
from frappe.test_runner import make_test_objects
accounts = [
# [account_name, parent_account, group_or_ledger]

View File

@@ -0,0 +1,31 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import cint
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
def on_update(self):
frappe.db.set_default("auto_accounting_for_stock", self.doc.auto_accounting_for_stock)
if cint(self.doc.auto_accounting_for_stock):
# set default perpetual account in company
for company in frappe.db.sql("select name from tabCompany"):
frappe.bean("Company", company[0]).save()
# Create account head for warehouses
warehouse_list = frappe.db.sql("select name, company from tabWarehouse", as_dict=1)
warehouse_with_no_company = [d.name for d in warehouse_list if not d.company]
if warehouse_with_no_company:
frappe.throw(_("Company is missing in following warehouses") + ": \n" +
"\n".join(warehouse_with_no_company))
for wh in warehouse_list:
wh_bean = frappe.bean("Warehouse", wh.name)
wh_bean.save()

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-06-24 15:49:57",
"docstatus": 0,
"modified": "2013-09-24 11:52:58",
"modified": "2013-12-20 19:22:52",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -25,11 +25,13 @@
{
"create": 1,
"doctype": "DocPerm",
"email": 1,
"name": "__common__",
"parent": "Accounts Settings",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 1,
"read": 1,
"role": "Accounts Manager",
"write": 1

View File

@@ -1,9 +1,8 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
cur_frm.add_fetch("bank_account", "company", "company");
cur_frm.cscript.onload = function(doc, cdt, cdn){
cur_frm.set_intro('<i class="icon-question" /> ' +
wn._("Update clearance date of Journal Entries marked as 'Bank Vouchers'"))
}
frappe._("Update clearance date of Journal Entries marked as 'Bank Vouchers'"))
}

View File

@@ -2,13 +2,13 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import frappe
from webnotes.utils import cstr, flt, getdate, now, nowdate
from webnotes.model import db_exists
from webnotes.model.doc import addchild
from webnotes.model.bean import getlist, copy_doclist
from webnotes import msgprint
from frappe.utils import cstr, flt, getdate, now, nowdate
from frappe.model import db_exists
from frappe.model.doc import addchild
from frappe.model.bean import getlist, copy_doclist
from frappe import msgprint
@@ -22,7 +22,7 @@ class DocType:
msgprint("Bank Account, From Date and To Date are Mandatory")
return
dl = webnotes.conn.sql("select t1.name, t1.cheque_no, t1.cheque_date, t2.debit, t2.credit, t1.posting_date, t2.against_account from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2 where t2.parent = t1.name and t2.account = %s and (clearance_date is null or clearance_date = '0000-00-00' or clearance_date = '') and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1", (self.doc.bank_account, self.doc.from_date, self.doc.to_date))
dl = frappe.db.sql("select t1.name, t1.cheque_no, t1.cheque_date, t2.debit, t2.credit, t1.posting_date, t2.against_account from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2 where t2.parent = t1.name and t2.account = %s and (clearance_date is null or clearance_date = '0000-00-00' or clearance_date = '') and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1", (self.doc.bank_account, self.doc.from_date, self.doc.to_date))
self.doclist = self.doc.clear_table(self.doclist, 'entries')
self.doc.total_amount = 0.0
@@ -46,7 +46,7 @@ class DocType:
msgprint("Clearance Date can not be before Cheque Date (Row #%s)" %
d.idx, raise_exception=1)
webnotes.conn.sql("""update `tabJournal Voucher`
frappe.db.sql("""update `tabJournal Voucher`
set clearance_date = %s, modified = %s where name=%s""",
(d.clearance_date, nowdate(), d.voucher_id))
vouchers.append(d.voucher_id)

View File

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import frappe
class DocType:
def __init__(self, d, dl):

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-02-22 01:27:37",
"docstatus": 0,
"modified": "2013-11-03 14:11:31",
"modified": "2013-12-20 19:22:55",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import frappe
class DocType:
def __init__(self, d, dl):

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 11:55:04",
"docstatus": 0,
"modified": "2013-08-22 17:27:59",
"modified": "2013-12-20 19:22:59",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@@ -8,7 +8,7 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){
}
return $c('runserverobj',args={'method' : 'get_months', 'docs' :
wn.model.compress(make_doclist(doc.doctype, doc.name))},callback1);
frappe.model.compress(make_doclist(doc.doctype, doc.name))},callback1);
}
}

View File

@@ -2,12 +2,12 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import frappe
from webnotes.utils import flt
from webnotes.model.doc import addchild
from webnotes.model.bean import getlist
from webnotes import msgprint, _
from frappe.utils import flt
from frappe.model.doc import addchild
from frappe.model.bean import getlist
from frappe import msgprint, _
class DocType:
def __init__(self,doc,doclist=[]):

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:05",
"docstatus": 0,
"modified": "2013-07-22 15:30:37",
"modified": "2014-01-20 17:48:27",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -24,6 +24,7 @@
"permlevel": 0
},
{
"cancel": 0,
"doctype": "DocPerm",
"name": "__common__",
"parent": "Budget Distribution",
@@ -79,13 +80,16 @@
},
{
"amend": 0,
"cancel": 1,
"create": 1,
"delete": 1,
"doctype": "DocPerm",
"email": 1,
"permlevel": 0,
"print": 1,
"write": 1
},
{
"delete": 0,
"doctype": "DocPerm",
"permlevel": 2
}

View File

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import frappe
class DocType:
def __init__(self, d, dl):

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-02-22 01:27:38",
"docstatus": 0,
"modified": "2013-07-10 14:54:06",
"modified": "2013-12-20 19:22:59",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@@ -2,9 +2,9 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import flt, getdate
from webnotes.model.bean import getlist
import frappe
from frappe.utils import flt, getdate
from frappe.model.bean import getlist
class DocType:
def __init__(self,d,dl):
@@ -16,19 +16,19 @@ class DocType:
for d in getlist(self.doclist, 'invoice_details'):
if d.invoice_no:
inv = webnotes.conn.sql("""select c_form_applicable, c_form_no from
inv = frappe.db.sql("""select c_form_applicable, c_form_no from
`tabSales Invoice` where name = %s and docstatus = 1""", d.invoice_no)
if not inv:
webnotes.msgprint("""Invoice: %s is not exists in the system or
frappe.msgprint("""Invoice: %s is not exists in the system or
is not submitted, please check.""" % d.invoice_no, raise_exception=1)
elif inv[0][0] != 'Yes':
webnotes.msgprint("C-form is not applicable for Invoice: %s" %
frappe.msgprint("C-form is not applicable for Invoice: %s" %
d.invoice_no, raise_exception=1)
elif inv[0][1] and inv[0][1] != self.doc.name:
webnotes.msgprint("""Invoice %s is tagged in another C-form: %s.
frappe.msgprint("""Invoice %s is tagged in another C-form: %s.
If you want to change C-form no for this invoice,
please remove invoice no from the previous c-form and then try again""" %
(d.invoice_no, inv[0][1]), raise_exception=1)
@@ -42,31 +42,31 @@ class DocType:
def before_cancel(self):
# remove cform reference
webnotes.conn.sql("""update `tabSales Invoice` set c_form_no=null
frappe.db.sql("""update `tabSales Invoice` set c_form_no=null
where c_form_no=%s""", self.doc.name)
def set_cform_in_sales_invoices(self):
inv = [d.invoice_no for d in getlist(self.doclist, 'invoice_details')]
if inv:
webnotes.conn.sql("""update `tabSales Invoice` set c_form_no=%s, modified=%s
frappe.db.sql("""update `tabSales Invoice` set c_form_no=%s, modified=%s
where name in (%s)""" % ('%s', '%s', ', '.join(['%s'] * len(inv))),
tuple([self.doc.name, self.doc.modified] + inv))
webnotes.conn.sql("""update `tabSales Invoice` set c_form_no = null, modified = %s
frappe.db.sql("""update `tabSales Invoice` set c_form_no = null, modified = %s
where name not in (%s) and ifnull(c_form_no, '') = %s""" %
('%s', ', '.join(['%s']*len(inv)), '%s'),
tuple([self.doc.modified] + inv + [self.doc.name]))
else:
webnotes.msgprint("Please enter atleast 1 invoice in the table", raise_exception=1)
frappe.msgprint("Please enter atleast 1 invoice in the table", raise_exception=1)
def set_total_invoiced_amount(self):
total = sum([flt(d.grand_total) for d in getlist(self.doclist, 'invoice_details')])
webnotes.conn.set(self.doc, 'total_invoiced_amount', total)
frappe.db.set(self.doc, 'total_invoiced_amount', total)
def get_invoice_details(self, invoice_no):
""" Pull details from invoices for referrence """
inv = webnotes.conn.sql("""select posting_date, territory, net_total, grand_total
inv = frappe.db.sql("""select posting_date, territory, net_total, grand_total
from `tabSales Invoice` where name = %s""", invoice_no)
return {
'invoice_date' : inv and getdate(inv[0][0]).strftime('%Y-%m-%d') or '',
@@ -76,10 +76,10 @@ class DocType:
}
def get_invoice_nos(doctype, txt, searchfield, start, page_len, filters):
from utilities import build_filter_conditions
from erpnext.utilities import build_filter_conditions
conditions, filter_values = build_filter_conditions(filters)
return webnotes.conn.sql("""select name from `tabSales Invoice` where docstatus = 1
return frappe.db.sql("""select name from `tabSales Invoice` where docstatus = 1
and c_form_applicable = 'Yes' and ifnull(c_form_no, '') = '' %s
and %s like %s order by name limit %s, %s""" %
(conditions, searchfield, "%s", "%s", "%s"),

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 11:55:06",
"docstatus": 0,
"modified": "2013-11-02 14:05:25",
"modified": "2013-12-20 19:23:58",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -157,6 +157,7 @@
"doctype": "DocField",
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_restrictions": 1,
"label": "Amended From",
"no_copy": 1,
"options": "C-Form",
@@ -166,14 +167,18 @@
{
"create": 1,
"doctype": "DocPerm",
"email": 1,
"permlevel": 0,
"print": 1,
"role": "Accounts User",
"write": 1
},
{
"create": 1,
"doctype": "DocPerm",
"email": 1,
"permlevel": 0,
"print": 1,
"role": "Accounts Manager",
"write": 1
},

View File

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import frappe
class DocType:
def __init__(self, d, dl):

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-02-22 01:27:38",
"docstatus": 0,
"modified": "2013-11-02 16:58:31",
"modified": "2013-12-20 19:23:00",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@@ -1,8 +1,8 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
wn.provide("erpnext.accounts");
erpnext.accounts.CostCenterController = wn.ui.form.Controller.extend({
frappe.provide("erpnext.accounts");
erpnext.accounts.CostCenterController = frappe.ui.form.Controller.extend({
onload: function() {
this.setup_queries();
},
@@ -41,8 +41,8 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.toggle_enable(['group_or_ledger', 'company'], doc.__islocal);
if(!doc.__islocal && doc.group_or_ledger=='Group') {
intro_txt += '<p><b>'+wn._('Note:')+'</b>'+ wn._('This Cost Center is a')+ '<i>'+wn._('Group')+'</i>, '+
wn._('Accounting Entries are not allowed against groups.')+'</p>';
intro_txt += '<p><b>'+frappe._('Note:')+'</b>'+ frappe._('This Cost Center is a')+ '<i>'+frappe._('Group')+'</i>, '+
frappe._('Accounting Entries are not allowed against groups.')+'</p>';
}
cur_frm.cscript.hide_unhide_group_ledger(doc);
@@ -50,22 +50,22 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger')
cur_frm.set_intro(intro_txt);
cur_frm.appframe.add_button(wn._('Chart of Cost Centers'),
function() { wn.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
cur_frm.appframe.add_button(frappe._('Chart of Cost Centers'),
function() { frappe.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
}
cur_frm.cscript.parent_cost_center = function(doc,cdt,cdn){
cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
if(!doc.company){
alert(wn._('Please enter company name first'));
msgprint(frappe._('Please enter company name first'));
}
}
cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
if (cstr(doc.group_or_ledger) == 'Group') {
cur_frm.add_custom_button(wn._('Convert to Ledger'),
cur_frm.add_custom_button(frappe._('Convert to Ledger'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
cur_frm.add_custom_button(wn._('Convert to Group'),
cur_frm.add_custom_button(frappe._('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
}
}

View File

@@ -2,11 +2,11 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.model.bean import getlist
from webnotes import msgprint, _
import frappe
from frappe.model.bean import getlist
from frappe import msgprint, _
from webnotes.utils.nestedset import DocTypeNestedSet
from frappe.utils.nestedset import DocTypeNestedSet
class DocType(DocTypeNestedSet):
def __init__(self,d,dl):
@@ -14,7 +14,7 @@ class DocType(DocTypeNestedSet):
self.nsm_parent_field = 'parent_cost_center'
def autoname(self):
company_abbr = webnotes.conn.sql("select abbr from tabCompany where name=%s",
company_abbr = frappe.db.sql("select abbr from tabCompany where name=%s",
self.doc.company)[0][0]
self.doc.name = self.doc.cost_center_name.strip() + ' - ' + company_abbr
@@ -46,10 +46,10 @@ class DocType(DocTypeNestedSet):
return 1
def check_gle_exists(self):
return webnotes.conn.get_value("GL Entry", {"cost_center": self.doc.name})
return frappe.db.get_value("GL Entry", {"cost_center": self.doc.name})
def check_if_child_exists(self):
return webnotes.conn.sql("select name from `tabCost Center` where \
return frappe.db.sql("select name from `tabCost Center` where \
parent_cost_center = %s and docstatus != 2", self.doc.name)
def validate_budget_details(self):
@@ -67,7 +67,7 @@ class DocType(DocTypeNestedSet):
"""
Cost Center name must be unique
"""
if (self.doc.fields.get("__islocal") or not self.doc.name) and webnotes.conn.sql("select name from `tabCost Center` where cost_center_name = %s and company=%s", (self.doc.cost_center_name, self.doc.company)):
if (self.doc.fields.get("__islocal") or not self.doc.name) and frappe.db.sql("select name from `tabCost Center` where cost_center_name = %s and company=%s", (self.doc.cost_center_name, self.doc.company)):
msgprint("Cost Center Name already exists, please rename", raise_exception=1)
self.validate_mandatory()
@@ -75,7 +75,7 @@ class DocType(DocTypeNestedSet):
def before_rename(self, olddn, newdn, merge=False):
# Add company abbr if not provided
from setup.doctype.company.company import get_name_with_abbr
from erpnext.setup.doctype.company.company import get_name_with_abbr
new_cost_center = get_name_with_abbr(newdn, self.doc.company)
# Validate properties before merging
@@ -85,7 +85,7 @@ class DocType(DocTypeNestedSet):
def after_rename(self, olddn, newdn, merge=False):
if not merge:
webnotes.conn.set_value("Cost Center", newdn, "cost_center_name",
frappe.db.set_value("Cost Center", newdn, "cost_center_name",
" - ".join(newdn.split(" - ")[:-1]))
else:
super(DocType, self).after_rename(olddn, newdn, merge)

View File

@@ -2,12 +2,13 @@
{
"creation": "2013-01-23 19:57:17",
"docstatus": 0,
"modified": "2013-07-22 15:23:10",
"modified": "2014-01-20 17:48:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"allow_copy": 1,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:cost_center_name",
"description": "Track separate Income and Expense for product verticals or divisions.",
@@ -29,12 +30,15 @@
},
{
"amend": 0,
"cancel": 0,
"doctype": "DocPerm",
"email": 1,
"name": "__common__",
"parent": "Cost Center",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"submit": 0
@@ -74,6 +78,7 @@
"doctype": "DocField",
"fieldname": "parent_cost_center",
"fieldtype": "Link",
"ignore_restrictions": 1,
"label": "Parent Cost Center",
"oldfieldname": "parent_cost_center",
"oldfieldtype": "Link",
@@ -171,6 +176,7 @@
"fieldname": "old_parent",
"fieldtype": "Link",
"hidden": 1,
"ignore_restrictions": 1,
"label": "old_parent",
"no_copy": 1,
"oldfieldname": "old_parent",
@@ -180,15 +186,15 @@
"report_hide": 1
},
{
"cancel": 1,
"create": 1,
"delete": 1,
"doctype": "DocPerm",
"role": "Accounts Manager",
"write": 1
},
{
"cancel": 0,
"create": 0,
"delete": 0,
"doctype": "DocPerm",
"role": "Accounts User",
"write": 0

View File

@@ -8,12 +8,12 @@ $.extend(cur_frm.cscript, {
this.frm.toggle_enable('year_end_date', doc.__islocal)
if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
this.frm.add_custom_button(wn._("Set as Default"), this.frm.cscript.set_as_default);
this.frm.set_intro(wn._("To set this Fiscal Year as Default, click on 'Set as Default'"));
this.frm.add_custom_button(frappe._("Set as Default"), this.frm.cscript.set_as_default);
this.frm.set_intro(frappe._("To set this Fiscal Year as Default, click on 'Set as Default'"));
} else this.frm.set_intro("");
},
set_as_default: function() {
return wn.call({
return frappe.call({
doc: cur_frm.doc,
method: "set_as_default"
});
@@ -22,7 +22,7 @@ $.extend(cur_frm.cscript, {
var me = this;
year_end_date =
wn.datetime.add_days(wn.datetime.add_months(this.frm.doc.year_start_date, 12), -1);
frappe.datetime.add_days(frappe.datetime.add_months(this.frm.doc.year_start_date, 12), -1);
this.frm.set_value("year_end_date", year_end_date);
},
});

View File

@@ -2,46 +2,44 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes import msgprint, _
from webnotes.utils import getdate
import frappe
from frappe import msgprint, _
from frappe.utils import getdate
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
def set_as_default(self):
webnotes.conn.set_value("Global Defaults", None, "current_fiscal_year", self.doc.name)
webnotes.get_obj("Global Defaults").on_update()
frappe.db.set_value("Global Defaults", None, "current_fiscal_year", self.doc.name)
frappe.get_obj("Global Defaults").on_update()
# clear cache
webnotes.clear_cache()
frappe.clear_cache()
msgprint(self.doc.name + _(""" is now the default Fiscal Year. \
Please refresh your browser for the change to take effect."""))
def validate(self):
year_start_end_dates = webnotes.conn.sql("""select year_start_date, year_end_date
year_start_end_dates = frappe.db.sql("""select year_start_date, year_end_date
from `tabFiscal Year` where name=%s""", (self.doc.name))
if year_start_end_dates:
if getdate(self.doc.year_start_date) != year_start_end_dates[0][0] or getdate(self.doc.year_end_date) != year_start_end_dates[0][1]:
webnotes.throw(_("Cannot change Year Start Date and Year End Date \
once the Fiscal Year is saved."))
frappe.throw(_("Cannot change Year Start Date and Year End Date once the Fiscal Year is saved."))
def on_update(self):
# validate year start date and year end date
if getdate(self.doc.year_start_date) > getdate(self.doc.year_end_date):
webnotes.throw(_("Year Start Date should not be greater than Year End Date"))
frappe.throw(_("Year Start Date should not be greater than Year End Date"))
if (getdate(self.doc.year_end_date) - getdate(self.doc.year_start_date)).days > 366:
webnotes.throw(_("Year Start Date and Year End Date are not within Fiscal Year."))
frappe.throw(_("Year Start Date and Year End Date are not within Fiscal Year."))
year_start_end_dates = webnotes.conn.sql("""select name, year_start_date, year_end_date
year_start_end_dates = frappe.db.sql("""select name, year_start_date, year_end_date
from `tabFiscal Year` where name!=%s""", (self.doc.name))
for fiscal_year, ysd, yed in year_start_end_dates:
if (getdate(self.doc.year_start_date) == ysd and getdate(self.doc.year_end_date) == yed) \
and (not webnotes.flags.in_test):
webnotes.throw(_("Year Start Date and Year End Date are already \
set in Fiscal Year: ") + fiscal_year)
and (not frappe.flags.in_test):
frappe.throw(_("Year Start Date and Year End Date are already set in Fiscal Year: ") + fiscal_year)

View File

@@ -2,11 +2,12 @@
{
"creation": "2013-01-22 16:50:25",
"docstatus": 0,
"modified": "2013-11-25 11:40:02",
"modified": "2014-01-20 17:48:46",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"allow_import": 1,
"autoname": "field:year",
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
"doctype": "DocType",
@@ -25,11 +26,13 @@
},
{
"doctype": "DocPerm",
"email": 1,
"name": "__common__",
"parent": "Fiscal Year",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 1,
"read": 1
},
{
@@ -78,8 +81,9 @@
"reqd": 0
},
{
"cancel": 1,
"cancel": 0,
"create": 1,
"delete": 1,
"doctype": "DocPerm",
"report": 1,
"role": "System Manager",
@@ -87,6 +91,7 @@
"write": 1
},
{
"delete": 0,
"doctype": "DocPerm",
"role": "All"
}

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