Compare commits

..

263 Commits

Author SHA1 Message Date
Nabin Hait
2cda7fd834 Merge branch 'hotfix' 2016-04-22 12:15:35 +05:30
Nabin Hait
054e2952c8 bumped to version 6.27.11 2016-04-22 12:45:35 +06:00
Nabin Hait
b4f1f1e8b8 Merge pull request #5255 from nabinhait/hotfix1
[fix] Fixed ambiguous column name in query
2016-04-22 12:12:47 +05:30
Nabin Hait
3ab6181a4f [fix] Fixed ambiguous column name in query 2016-04-22 11:26:44 +05:30
Anand Doshi
18433591c3 Merge branch 'hotfix' 2016-04-20 16:43:00 +05:30
Anand Doshi
25dd38c8f2 bumped to version 6.27.10 2016-04-20 17:13:00 +06:00
Nabin Hait
88742e0912 Merge pull request #5241 from neilLasrado/lead
Removed no-copy from source in lead
2016-04-20 13:02:12 +05:30
Neil Trini Lasrado
ab822c5d16 Removed no-copy from source in lead 2016-04-20 11:03:15 +05:30
Nabin Hait
4058af24e2 Merge branch 'hotfix' 2016-04-15 11:01:32 +05:30
Nabin Hait
66953941ea bumped to version 6.27.9 2016-04-15 11:31:32 +06:00
Nabin Hait
36c9d11bee Merge pull request #5211 from nabinhait/jv_precision_fix
[fix] Set debit / credit as per field precision
2016-04-15 10:58:49 +05:30
Nabin Hait
e393c62086 [fix] Set debit / credit as per field precision 2016-04-14 18:15:42 +05:30
Nabin Hait
9f553e7206 Merge branch 'hotfix' 2016-04-13 16:04:37 +05:30
Nabin Hait
ba7d8b0cac bumped to version 6.27.8 2016-04-13 16:34:37 +06:00
Nabin Hait
1ce6df8ff6 Merge pull request #5203 from nabinhait/credit_limit_fix
[fix] Ignore closed sales order in credit limit validation
2016-04-13 15:36:33 +05:30
Nabin Hait
7132bd3659 [fix] Ignore closed sales order in credit limit validation 2016-04-13 15:19:37 +05:30
Nabin Hait
13a2574bd6 Merge pull request #5159 from neilLasrado/setup-wizard-fix
Fixed setup wizard
2016-04-13 12:06:55 +05:30
Nabin Hait
09855fc3cc Merge pull request #5158 from neilLasrado/hotfix
Removed education as a domain in ERPNext setup wizard
2016-04-13 12:05:11 +05:30
Nabin Hait
55f6308169 Merge branch 'anandpdoshi-fix/quotation-lead-tax-rule' into hotfix 2016-04-13 12:03:22 +05:30
Nabin Hait
c2ae1a7375 fixed merge conflict 2016-04-13 11:55:15 +05:30
Nabin Hait
c792e65d99 Merge pull request #5196 from nabinhait/report_fix34
[fix] Fixed pending so items for material request report
2016-04-13 11:40:34 +05:30
Nabin Hait
471908ab9f Merge pull request #5194 from nabinhait/gross_profit_fix
Gross profit fix
2016-04-12 18:57:45 +05:30
Nabin Hait
9fef3df6a0 [fix] Fixed pending so items for material request report 2016-04-12 18:46:47 +05:30
Nabin Hait
8a686ba982 [fix] Prevent from directly creating payment request 2016-04-12 17:02:15 +05:30
Nabin Hait
f509d13d28 [fix] Get average selling rate based on group by 2016-04-12 17:01:39 +05:30
Nabin Hait
96d7905383 Merge pull request #5177 from rohitwaghchaure/support_hot_fix
[Fix] Default letter head
2016-04-12 11:03:18 +05:30
Rohit Waghchaure
b2e7a1f605 [Fix] Default letter head 2016-04-11 17:30:44 +05:30
Nabin Hait
3912a31a6f Merge pull request #5176 from nabinhait/ar_ap_print_currency
Currency column in AR/AP and Sales/Purchase register report
2016-04-11 17:13:04 +05:30
Nabin Hait
b713406e22 Merge pull request #5180 from nabinhait/stock_entry_actual_qty
[fix] Set actual qty onload of the draft stock entry. Fixed #5172
2016-04-11 17:12:34 +05:30
Nabin Hait
32b2a7795e [fix] Set actual qty onload of the draft stock entry. Fixed #5172 2016-04-11 15:14:05 +05:30
Nabin Hait
f945e10cce Currency column in AR/AP and sales/purchase register report 2016-04-11 11:56:57 +05:30
Anand Doshi
2f957f27b0 [fix] apply Tax Rule for lead 2016-04-08 17:43:08 +05:30
Neil Trini Lasrado
7b46e5148a Fixed setup wizard 2016-04-08 17:28:44 +05:30
Anand Doshi
79a415e3b8 [fix] Use for shopping cart validation in Tax Rule 2016-04-08 17:08:26 +05:30
Neil Trini Lasrado
ce893499d7 Removed education as a domain in ERPNext setup wizard 2016-04-08 16:52:53 +05:30
Anand Doshi
d89152e4a5 Merge pull request #5151 from anandpdoshi/fix/travis-frappe-branch
[fix] bench init using correct frappe branch
2016-04-07 19:56:49 +05:30
Anand Doshi
6677fd58ef [fix] bench init using correct frappe branch 2016-04-07 19:33:04 +05:30
Anand Doshi
c6a695d0f3 Merge branch 'hotfix' 2016-04-07 17:41:48 +05:30
Anand Doshi
54910000d4 bumped to version 6.27.7 2016-04-07 18:11:48 +06:00
Anand Doshi
1f2f82fcc2 Merge pull request #5147 from vjFaLk/leave-allocation-fix
[Fix] Leave Allocation now includes To Date in Difference
2016-04-07 16:53:29 +05:30
Anand Doshi
1a0d32cdfb [fix] [minor] Learn link in welcome to ERPNext 2016-04-07 16:28:01 +05:30
Valmik Jangla
c33e96f860 Leave Allocation Fix 2016-04-07 12:02:31 +05:30
Anand Doshi
ca95384f05 [fix] Salary Slip: use accounts.utils.get_fiscal_year 2016-04-06 12:31:01 +05:30
Anand Doshi
4b207647db [fix] sanitize html of product bundle description 2016-04-05 18:34:11 +05:30
Anand Doshi
ade5b82167 Merge branch 'hotfix' 2016-04-04 17:54:48 +05:30
Anand Doshi
bcbfeb0d53 bumped to version 6.27.6 2016-04-04 18:24:48 +06:00
Anand Doshi
710c38ffe1 Merge pull request #5120 from nabinhait/report_fix
[fix] received and delivered items to be billed report based on percentage billed
2016-04-04 17:43:24 +05:30
Nabin Hait
94360cca20 [fix] received and delivered items to be billed report based on percentage billed 2016-04-04 17:40:33 +05:30
Anand Doshi
f1b276122e Merge pull request #5117 from nabinhait/report_modified_change
[fix] Modified date changed in query report due to project field renaming
2016-04-04 17:04:14 +05:30
Anand Doshi
62be8dfd21 Merge pull request #5131 from shreyasp/creditnote-print-format
[Fix] Correct amount shown in credit note print format
2016-04-04 15:37:31 +05:30
Anand Doshi
1a922196fa Merge pull request #5130 from anandpdoshi/fix/validate-pos-paid-amount
[fix] POS paid amount validation using grand total
2016-04-04 15:22:51 +05:30
shreyas
c6b47bcdda [Fix] Show amount in credit note print format 2016-04-04 15:13:03 +05:30
Anand Doshi
15f7b1ee1a [fix] POS paid amount validation using grand total 2016-04-04 15:03:28 +05:30
Anand Doshi
08b39b1ff8 [fix] escape fg_item in production planning's get_so_items 2016-04-04 13:16:56 +05:30
Anand Doshi
da7d1667d5 [travis] 2016-04-04 12:36:52 +05:30
Nabin Hait
4f10f15686 [fix] Modified date changed in query report due to project field renaming 2016-04-01 17:59:06 +05:30
Rushabh Mehta
d02038f591 Merge pull request #5110 from nabinhait/warranty_claim_fix
[fix] Get query for item in warranty claim
2016-04-01 11:44:48 +05:30
Nabin Hait
83e61bf368 [fix] Get query for item in warranty claim 2016-04-01 11:10:27 +05:30
Nabin Hait
d95c376d57 Merge pull request #5094 from nabinhait/item_query_fix
[fix] Item query in bom
2016-03-31 11:53:24 +05:30
Nabin Hait
c6285069dc [fix] Item query in bom 2016-03-30 13:10:25 +05:30
Rushabh Mehta
4ccf692f7c Merge branch 'hotfix' 2016-03-29 10:49:46 +05:30
Rushabh Mehta
8573aee8b8 bumped to version 6.27.5 2016-03-29 11:19:46 +06:00
Rushabh Mehta
dab3cdc106 Merge pull request #5071 from neilLasrado/pricing-rule-fix
Fixed Issues in Pricing rule
2016-03-29 10:18:03 +05:30
Rushabh Mehta
2de1f86009 Merge pull request #5070 from vjFaLk/hotfix
Fix for Holiday List in Maintenance Schedule
2016-03-29 10:17:27 +05:30
Neil Trini Lasrado
b176dea74e Fixed issues in Pricing Rule if multiple pricing rules existed with same priority 2016-03-28 13:23:47 +05:30
Valmik Jangla
47b89756d9 Fix for Holiday List in Maintenance Schedule 2016-03-28 12:34:21 +05:30
Rushabh Mehta
aabc634afd Merge branch 'hot-fix-leave-application' 2016-03-25 11:30:22 +05:30
Rushabh Mehta
3becd4239f bumped to version 6.27.4 2016-03-25 12:00:22 +06:00
Rushabh Mehta
1b5edcbbd8 [fix] holiday_list issues in maintenance schedule too 2016-03-25 11:22:15 +05:30
Rushabh Mehta
51135a1522 [fix] fix get holidays in leave application 2016-03-25 11:13:11 +05:30
Rushabh Mehta
97e523b4a4 Merge branch 'develop' 2016-03-21 17:25:09 +05:30
Rushabh Mehta
09ec13f7cf bumped to version 6.27.3 2016-03-21 17:55:09 +06:00
Rushabh Mehta
2179cd97c8 Merge pull request #5026 from nabinhait/modified_fix
[fix] Updated modified datetime
2016-03-21 17:23:28 +05:30
Nabin Hait
c8baa01e9c [fix] Updated modified datetime 2016-03-21 17:20:03 +05:30
Rushabh Mehta
dda0906458 Merge branch 'develop' 2016-03-21 15:45:22 +05:30
Rushabh Mehta
cd04380149 bumped to version 6.27.2 2016-03-21 16:15:21 +06:00
Rushabh Mehta
df3bf5d76b Merge pull request #5020 from rohitwaghchaure/support_week_14_03_5
[formatting] Added between in trends.py
2016-03-21 15:42:34 +05:30
Rushabh Mehta
833432086b Merge pull request #5024 from nabinhait/recurring_doc_status
[patch] Fix delivery and billing status of recurring orders
2016-03-21 15:26:40 +05:30
Nabin Hait
2646f84a30 [patch] Fix delivery and billing status of recurring orders 2016-03-21 15:22:31 +05:30
Rushabh Mehta
7364f0cf1c [patch-fix] remove old patches for web-forms 2016-03-21 14:47:35 +05:30
Rushabh Mehta
a9ce706bfb [update] translations 2016-03-21 14:35:36 +05:30
rohitwaghchaure
49ccac5d95 [formatting] Added between in trends.py 2016-03-21 12:31:41 +05:30
Rushabh Mehta
98122a2574 Merge pull request #5013 from agusputra/patch-25
Update allow-over-delivery-billing-against-sales-order-upto-certain-l…
2016-03-21 12:22:01 +05:30
Rushabh Mehta
ea768ec132 Merge pull request #5019 from saurabh6790/supp1.0
[fixes] set todays date on employee attendance tool
2016-03-21 12:06:01 +05:30
Rushabh Mehta
d00ce6a8cf Merge pull request #5022 from nabinhait/recurring_fix3
[fix] set recurring id after saving
2016-03-21 12:04:56 +05:30
Nabin Hait
68a628ea1e [fix] set recurring id after saving 2016-03-21 12:03:30 +05:30
Saurabh
6a277e244c [fixes] set todays date on employee attendance tool 2016-03-20 19:00:26 +05:30
Agus Syahputra
383b13cdb5 Update allow-over-delivery-billing-against-sales-order-upto-certain-limit.md 2016-03-19 08:31:50 +07:00
Nabin Hait
f197d42503 Merge branch 'develop' 2016-03-18 16:36:40 +05:30
Nabin Hait
6d27470401 bumped to version 6.27.1 2016-03-18 17:06:40 +06:00
Nabin Hait
3f11f0ae44 Merge pull request #5010 from rohitwaghchaure/support_week_14_03_5
[Enhancement]Fetch default letter head of company on salary structure and salary slip
2016-03-18 16:35:14 +05:30
rohitwaghchaure
277b7fa641 [Enhancement]Fetch default letter head of company on salary structure and salary slip 2016-03-18 16:33:18 +05:30
Nabin Hait
9a75530c26 [fix] reload doctype for renaming project 2016-03-18 16:19:25 +05:30
Nabin Hait
dcedac7f25 Merge pull request #5008 from rohitwaghchaure/support_week_14_03_5
[fix]Letterhead not being changed with change in company
2016-03-18 15:41:54 +05:30
rohitwaghchaure
cef1086441 [fix]Letterhead not being changed with change in company 2016-03-18 15:37:24 +05:30
Nabin Hait
d6c59656e8 Merge pull request #5009 from saurabh6790/cart_fixes-1.0
[fixes] return debtors account name
2016-03-18 15:36:06 +05:30
Nabin Hait
5996b2f1bb [fix] recurring document logic 2016-03-18 15:19:54 +05:30
Saurabh
b43df36e85 [fixes] return debtors account name 2016-03-18 15:05:50 +05:30
rohitwaghchaure
90ff509f6d [fix]Earlier recurring billing 2016-03-18 10:44:53 +05:30
Nabin Hait
d61b21cedf Merge pull request #5002 from rohitwaghchaure/support_week_14_03_5
[fix]Fiscal year removed from trends report
2016-03-18 10:33:18 +05:30
rohitwaghchaure
5b9d517d04 [fix]Fiscal year removed from trends report 2016-03-17 22:46:09 +05:30
Nabin Hait
84806bf673 Merge branch 'develop' 2016-03-17 19:31:45 +05:30
Nabin Hait
eba2c4323e bumped to version 6.27.0 2016-03-17 20:01:45 +06:00
Nabin Hait
1ecd8cdaa3 [change-log] 2016-03-17 19:26:29 +05:30
Nabin Hait
21ade4a773 Merge pull request #5000 from nabinhait/develop
Minor fixes
2016-03-17 19:19:19 +05:30
Nabin Hait
24f1c50dca Create sample Material Requests via setup wizard only if warehouse exists 2016-03-17 19:14:53 +05:30
Nabin Hait
4f01704234 [fix] Fetch shipping address only if field exists 2016-03-17 19:14:53 +05:30
Nabin Hait
547d223b28 Merge pull request #4979 from vjFaLk/leave-improvements
Improved Leave Application / Approver feature
2016-03-17 19:06:06 +05:30
Nabin Hait
2e08e3e186 Merge pull request #4991 from neilLasrado/develop
Fixed Production Planning Tool
2016-03-17 19:05:09 +05:30
Nabin Hait
4e78cee1c2 Merge pull request #4959 from ShashaQin/patch-37
Improvements about Item Prices Report
2016-03-17 18:13:09 +05:30
Nabin Hait
2f7b210aac Merge pull request #4995 from nabinhait/develop
[fix] BOM Browser
2016-03-17 18:05:28 +05:30
Nabin Hait
2ed8f8f099 [fix] BOM Browser 2016-03-17 15:55:48 +05:30
Nabin Hait
cf8fd6274d Merge pull request #4994 from umairsy/report-fix
fixes in the Account Receivable print format - with Nabin
2016-03-17 15:53:26 +05:30
Rushabh Mehta
813b9efe28 [fix] [minor] address.py 2016-03-17 15:36:30 +05:30
Umair Sayyed
8cbc076dc2 fixes in the Account Receivale print format - with Nabin 2016-03-17 15:12:31 +05:30
Valmik Jangla
15343be386 Commonified functions for retrieving Leave Approvers 2016-03-17 11:47:30 +05:30
Valmik Jangla
33cc081c3b Improved Leave Application / Approver feature 2016-03-17 11:47:30 +05:30
Nabin Hait
6221117069 [fix] shipping address position in document 2016-03-16 16:23:30 +05:30
Nabin Hait
cd6c09fbee [fix] shipping address in purchasee cycle 2016-03-16 16:23:30 +05:30
Saurabh
0f063a5f46 [patch] map customer_address to shipping_address and customer_address_display to shipping_address_display 2016-03-16 16:23:30 +05:30
Saurabh
14d646f636 [fixes] shipping address on purchase flow 2016-03-16 16:23:30 +05:30
shreyas
7e2d7e88a6 [Partial]Some more changes to enable shipping address to be displayed in PO 2016-03-16 16:23:30 +05:30
shreyas
26bb6f37bc [Partial] Fix to add Shipping address in Purchase order 2016-03-16 16:23:29 +05:30
shreyas
77d23824df [Partial]Some more changes to enable shipping address to be displayed in PO 2016-03-16 16:23:29 +05:30
shreyas
22d26a1d82 [Partial] Fix to add Shipping address in Purchase order 2016-03-16 16:23:29 +05:30
Nabin Hait
91a69e4a8d Merge pull request #4992 from neilLasrado/project-rename
Fixed bug while selecting project in sales_invoice, sales_order, deli…
2016-03-16 16:03:18 +05:30
Neil Trini Lasrado
f433a5a124 Fixed bug while selecting project in sales_invoice, sales_order, delivery_note 2016-03-16 16:00:27 +05:30
Neil Trini Lasrado
41380dfad8 Fixed Production Planning Tool 2016-03-16 15:26:01 +05:30
Nabin Hait
2a5c1138a0 Merge pull request #4944 from rmehta/modules-redesign
[redesign] modules
2016-03-16 14:35:11 +05:30
ShashaQin
769b01e07a Update item_prices.py 2016-03-16 16:37:28 +08:00
Nabin Hait
fc827b329e Merge pull request #4932 from ci2014/patch-2
Update purchase-return.md
2016-03-16 12:33:33 +05:30
Nabin Hait
1f11b96533 Merge pull request #4931 from ci2014/patch-1
Update sales-return.md
2016-03-16 12:32:42 +05:30
Nabin Hait
a61930e7a7 [fix] reload doctype forcefully to rename project field 2016-03-16 12:29:32 +05:30
Nabin Hait
22d4a7e742 Merge branch 'prod-order' of https://github.com/neilLasrado/erpnext into neilLasrado-prod-order 2016-03-16 12:18:01 +05:30
Nabin Hait
df4deba515 minor fix 2016-03-16 11:16:31 +05:30
Neil Trini Lasrado
6e343e23d9 Renamed project_name to project 2016-03-15 17:50:53 +05:30
Nabin Hait
2c70238fbb Merge branch 'develop' 2016-03-15 16:43:05 +05:30
Nabin Hait
d0723f8a96 bumped to version 6.26.0 2016-03-15 17:13:05 +06:00
Nabin Hait
2ecf239925 [change-log] 2016-03-15 16:26:36 +05:30
Nabin Hait
29b01226ea [translations] 2016-03-15 16:17:21 +05:30
Nabin Hait
6c88331101 Merge pull request #4986 from nabinhait/ar_fix
Fixes in AR/AP Print Format
2016-03-15 16:11:06 +05:30
Nabin Hait
f853a92676 Fixes in AR/AP Print Format 2016-03-15 16:10:15 +05:30
Nabin Hait
d8d6579003 Merge pull request #4985 from nabinhait/minor_fixes
minot fixes
2016-03-15 15:22:34 +05:30
Nabin Hait
89301863e5 minot fixes 2016-03-15 15:20:49 +05:30
Nabin Hait
6c3cc3647b Merge pull request #4969 from rmehta/link-count
[enhancement] sort links on basis of link_count (idx)
2016-03-15 11:40:18 +05:30
Nabin Hait
b9126317b3 Merge pull request #4981 from umairsy/march1
updated manual
2016-03-15 11:39:29 +05:30
Nabin Hait
25716652b7 Merge pull request #4982 from rohitwaghchaure/support_week_14_03-1
[fixes]draft BOM showing in Material Request
2016-03-15 11:36:15 +05:30
rohitwaghchaure
986616f8ee [fixes]draft BOM showing in Material Request 2016-03-14 19:33:30 +05:30
Umair Sayyed
d3ed3638cf updated manual 2016-03-14 19:28:53 +05:30
Nabin Hait
5fc9552d29 Merge pull request #4980 from rohitwaghchaure/support_week_14_03
[fixes]Unable set recurring date in sales order
2016-03-14 19:20:13 +05:30
Nabin Hait
b1f0a7d52e Merge pull request #4876 from saurabh6790/valuation_rate_on_so
[enhancement] get valuation rate and gross profit on sales order item
2016-03-14 19:18:58 +05:30
rohitwaghchaure
c54b805981 [fixes]Unable set recurring date in sales order 2016-03-14 19:03:22 +05:30
Nabin Hait
a098b4178a Merge pull request #4976 from saurabh6790/pr_from_si
[fixes] set amount in PR by checking party_account_currency field
2016-03-14 19:01:07 +05:30
Nabin Hait
c2f973b521 Merge pull request #4977 from nabinhait/fix88
[fix] Item or Warehouse filter mandatory in Stock Balance if number of sle is greater than 500000
2016-03-14 19:00:42 +05:30
Anand Doshi
ad61a28730 [fix] [hot] compact print: check in_format_data for print format builder prints 2016-03-14 18:20:48 +05:30
Nabin Hait
e66b6ce01f Merge pull request #4978 from rohitwaghchaure/support_week_14_03
[fixes]indicator in material request item
2016-03-14 18:09:58 +05:30
rohitwaghchaure
bea7558908 [fixes]indicator in material request item 2016-03-14 17:47:36 +05:30
Nabin Hait
aa7e17cd80 Merge pull request #4970 from nabinhait/fix77
[fix] delete company transactions
2016-03-14 16:36:51 +05:30
Saurabh
c54619570a [fixes] check party_account_currency while creating Pull Request from Sales Invoice 2016-03-14 15:55:23 +05:30
Nabin Hait
d1f85c4fe6 [fix] Item or Warehouse filter mandatory in Stock Balance if number of sle is greater than 500000 2016-03-14 14:59:21 +05:30
Saurabh
9f94266892 [fixes] fetch value from grand total field while creating payment request from si 2016-03-14 11:23:03 +05:30
Anand Doshi
01a8473996 [fix] [docs] removed contents.md 2016-03-12 00:08:38 +05:30
Anand Doshi
f319206d22 [fix] [hot] reload doctype Holiday List 2016-03-11 19:45:28 +05:30
Nabin Hait
653f68d2e4 [fix] delete company transactions 2016-03-11 17:36:57 +05:30
Anand Doshi
a7aa2c70b5 Merge branch 'vjFaLk-holiday-list' into develop 2016-03-11 17:16:37 +05:30
Anand Doshi
4284fcf2a6 [fix] additional fixes for removal of Fiscal Year form Holiday List 2016-03-11 17:16:30 +05:30
ci2014
73db44d0b9 Update purchase-return.md
Added back {next}
2016-03-11 11:27:17 +01:00
Valmik Jangla
e2b8af16ed Fixed Salary Slip to work with new Holiday List 2016-03-11 14:58:55 +05:30
Valmik Jangla
ba54a43e32 Fixed Maintenance Schedule to work wit new Holiday List
Improved code in Holiday List for speed
2016-03-11 14:58:55 +05:30
Valmik Jangla
3427c939bd Removed unused code 2016-03-11 14:58:55 +05:30
Valmik Jangla
c666030f34 Get Weekly Off dates now gets dates dynamically
Fixed Holiday List test records
2016-03-11 14:58:55 +05:30
Valmik Jangla
3085186182 Removed Fiscal Year from Holiday List and Calendar 2016-03-11 14:58:55 +05:30
Anand Doshi
58fc9037b3 Merge branch 'vjFaLk-remove-fiscal-year' into develop 2016-03-11 14:57:08 +05:30
Anand Doshi
c75c1d7e3e [fix] additional fixes after deprecating Fiscal Year 2016-03-11 14:56:19 +05:30
Rushabh Mehta
3574b37ff3 [enhancement] sort links on basis of link_count (idx) 2016-03-11 14:33:04 +05:30
Valmik Jangla
d9cc14ddd5 Removed from Leave Block List and Monthly Attendance List 2016-03-11 13:07:49 +05:30
Valmik Jangla
13bb2ba779 Removed fiscal year related things from, Recurrent Document, Leave Application, Upload attendance, Stock Reconciliation and Stock Balance 2016-03-11 13:07:49 +05:30
Valmik Jangla
063946a02f Removed from Purchase Invoice and Purchase Reciept 2016-03-11 13:07:48 +05:30
Valmik Jangla
d89dcf60e6 Removed from Delivery Note and Appraisal
Added back in Stock Ledger Entry
Added validation in GL Entry and SL Entry
Stock Controller sets Fiscal Year using Posting Date
2016-03-11 13:07:48 +05:30
Valmik Jangla
d4ac3d8ceb Removed from Stock Ledger Entry and Sales Invoice 2016-03-11 13:07:48 +05:30
Valmik Jangla
98ec1164fc Removed from Attendance, Upload Attendance, and Sales Order 2016-03-11 13:07:16 +05:30
Valmik Jangla
836fd6450d Removed from Purchase Order and Supplier Quotation 2016-03-11 13:07:16 +05:30
Valmik Jangla
cd9daf6671 Removed from Journal Entry and Stock Reconciliation 2016-03-11 13:07:16 +05:30
Valmik Jangla
c7e774fda9 BudgetError Fix 2016-03-11 13:05:20 +05:30
Valmik Jangla
865d547965 Removed from GL Entry, Opportunity and Quotation 2016-03-11 13:05:20 +05:30
Valmik Jangla
bc60970fcb Removed from Maitenance Visit and Warranty Claim 2016-03-11 13:05:19 +05:30
Valmik Jangla
319bbad4d4 Removed from Stock Entry 2016-03-11 13:05:19 +05:30
Valmik Jangla
57b69cecbf Removed from C-Form 2016-03-11 13:05:19 +05:30
Valmik Jangla
634ecae020 Removed from Lead 2016-03-11 13:05:19 +05:30
Valmik Jangla
c4c603dcd2 Removed from Expense Claim 2016-03-11 13:05:19 +05:30
Valmik Jangla
1d797c1688 Removed from Installation Note 2016-03-11 13:05:19 +05:30
Anand Doshi
22ef68945d [minor] comment about hack 2016-03-11 12:47:14 +05:30
Anand Doshi
09f7cc4912 Merge branch 'develop' 2016-03-11 12:30:42 +05:30
Anand Doshi
39dda5cf49 bumped to version 6.25.5 2016-03-11 13:00:42 +06:00
Anand Doshi
1e1d8026ad Merge pull request #4966 from shreyasp/move-compny-fld-in-jv
[Minor] Moved company field to top of the form
2016-03-11 12:25:11 +05:30
shreyas
6c89bb1900 [Minor] Moved company field to top of the form, making it more consistent other doctypes 2016-03-11 12:12:30 +05:30
Anand Doshi
73a0265e4f Merge branch 'develop' 2016-03-10 15:51:35 +05:30
Anand Doshi
06b3ecb99b bumped to version 6.25.4 2016-03-10 16:21:35 +06:00
Anand Doshi
6d59a41b27 [fix] delete Web Form contact 2016-03-10 14:31:04 +05:30
Anand Doshi
eb395788b7 Merge branch 'develop' 2016-03-10 12:48:52 +05:30
Anand Doshi
1bca0780a4 bumped to version 6.25.3 2016-03-10 13:18:52 +06:00
Anand Doshi
b015f9eca2 [fix] [hot] web form fixtures - removed Contact, added Issues and Addresses 2016-03-10 12:40:10 +05:30
ShashaQin
e8d635827a Update item_prices.py 2016-03-10 14:55:06 +08:00
Anand Doshi
f0e16e68c5 Merge pull request #4962 from nabinhait/trial_balance_fix
[fix] Trial Balance report, showing rows with zero values
2016-03-10 12:24:24 +05:30
Anand Doshi
650b016584 Merge pull request #4961 from nabinhait/fix_658
[fix] Rearranged position of mode_of_payment in sales invoice
2016-03-10 12:15:11 +05:30
Nabin Hait
3883e86ad7 [fix] Trial Balance report, showing rows with zero values 2016-03-10 12:01:01 +05:30
Nabin Hait
dd8dbe000b [fix] Rearranged position of mode_of_payment in sales invoice 2016-03-10 10:58:31 +05:30
ShashaQin
c6b5f7dcae Update item_prices.py 2016-03-10 08:49:38 +08:00
Anand Doshi
4147106c88 Merge branch 'develop' 2016-03-09 19:04:54 +05:30
Anand Doshi
25e947bef6 bumped to version 6.25.2 2016-03-09 19:34:54 +06:00
Anand Doshi
bb4db5ae80 [fix] [hot] german translation for Sales Return = Rücklieferung 2016-03-09 19:00:30 +05:30
Anand Doshi
c88068eecf Merge branch 'develop' 2016-03-09 16:34:03 +05:30
Anand Doshi
a2d03c849f bumped to version 6.25.1 2016-03-09 17:04:03 +06:00
Anand Doshi
0179242f04 [fix] [hot] setup wizard domain 2016-03-09 16:32:13 +05:30
Anand Doshi
7670c9f07d Merge branch 'develop' 2016-03-09 15:47:14 +05:30
Anand Doshi
1d0c5896c0 bumped to version 6.25.0 2016-03-09 16:17:14 +06:00
Saurabh
3fbf3ce852 [fixes] raise if selects product bundle as sub item in another product bundle. 2016-03-09 15:42:01 +05:30
Saurabh
bd01a81638 [fixes] calculate valuation rate for stock, non-stop and product bundle items 2016-03-09 15:42:01 +05:30
Saurabh
5ada14b887 [fixes] calculate valuation rate for non stock item 2016-03-09 15:42:01 +05:30
Saurabh
2d7af63351 [fixe] typo-fixes and set base currency symbol to gross-profit and valuation rate 2016-03-09 15:42:00 +05:30
Saurabh
d313553ae3 [enhancement] get valuation rate and gross profit on sales order item 2016-03-09 15:42:00 +05:30
Anand Doshi
27e9b77a3d [translations] 2016-03-09 14:50:38 +05:30
Anand Doshi
71ea34a0ba [change log] 2016-03-09 14:50:37 +05:30
Anand Doshi
065d24b26d Merge pull request #4951 from shreyasp/gross-profit-wn-sup17486
[Minor] Remove Warehouse column while user groups by 'Item code' in Gross profit report
2016-03-09 14:22:16 +05:30
shreyas
7c42995949 [Minor] Remove Warehouse column while user groups by 'Item code' in Gross profit report 2016-03-09 13:15:38 +05:30
Anand Doshi
3fb67c7c3b Merge pull request #4945 from shreyasp/mr-wn-sup17487
[Minor] Displaying 'for warehouse' while creating Material request from BOM
2016-03-09 10:32:15 +05:30
ci2014
1e735a87aa Update purchase-return.md
Fixed the images.
2016-03-08 17:13:18 +01:00
Anand Doshi
c62927ad5d Merge branch 'neilLasrado-drip-emails' into develop 2016-03-08 20:22:45 +05:30
Neil Trini Lasrado
1b03e0a6d0 Added Other as a Domain in Company/setup wizard 2016-03-08 20:22:24 +05:30
Neil Trini Lasrado
342895c9df Added Domain to setup wizard 2016-03-08 19:55:57 +05:30
ci2014
6dd7e682af Update sales-return.md
Fixed the images.
2016-03-08 15:13:04 +01:00
shreyas
007e87b8a5 [Minor] Whitespace fixes 2016-03-08 19:01:50 +05:30
shreyas
405b66898e [Minor] Displaying 'for warehouse' while creating Material request from BOM 2016-03-08 18:39:20 +05:30
Rushabh Mehta
d1e1c52171 [redesign] modules 2016-03-08 18:07:20 +05:30
Anand Doshi
b073cf4fa1 [fix] POS amount_paid when not cash - Fixes #4686, #4828, #4289 2016-03-08 17:59:19 +05:30
Anand Doshi
20b2a75603 Merge pull request #4943 from strixaluco/develop
Minor typo fix in bulk-rename.md
2016-03-08 17:40:48 +05:30
Anand Doshi
f9148f3a6f Merge branch 'bohlian-develop' into develop 2016-03-08 17:40:10 +05:30
Javier Wong
102f9062e8 Whitelist get_month_details
This is useful when manually pulling the salary structure in custom scripts for processing of other customized deductables or perhaps contributions.
2016-03-08 17:39:58 +05:30
strixaluco
184f0fa264 Minor typo fix in bulk-rename.md 2016-03-08 16:57:04 +08:00
Anand Doshi
ba7b05ad27 Merge branch 'emakis-in_words_configurable' into develop 2016-03-07 20:00:54 +05:30
emakis
b5b3d478a2 Made In Words configurable 2016-03-07 20:00:41 +05:30
Anand Doshi
44f777eeec [fix] Material Request notifications docstatus < 2 2016-03-07 19:35:54 +05:30
Anand Doshi
a2bd145d68 Merge pull request #4935 from shreyasp/sales-inv-WN-SUP17465
[Minor] Fix print settings for custom print format
2016-03-07 19:21:51 +05:30
Anand Doshi
40b230ea9e Merge pull request #4926 from nabinhait/balance_sheet
[fix][report] Show group rows with zero values if there are values against children
2016-03-07 19:15:46 +05:30
shreyas
6f8dfa4c8d [Minor] Fix print settings for custom print format 2016-03-07 18:22:40 +05:30
Anand Doshi
dab167791c Merge pull request #4934 from anandpdoshi/fix/stock-balance-filters
[fix] Run Stock Balance report only after one of the filters is set
2016-03-07 14:31:08 +05:30
Anand Doshi
0902fb2e3d [fix] Run Stock Balance report only after one of the filters is set 2016-03-07 13:11:59 +05:30
Rushabh Mehta
5a700820e7 [fix] [minor] autoload chart of accounts 2016-03-07 11:57:54 +05:30
Anand Doshi
9a2dc8332b Merge pull request #4930 from frehu01/patch-3
Update journal-entry.md
2016-03-07 11:28:01 +05:30
ci2014
fde7bfec31 Update purchase-return.md
You swapped sales return and purchase return in the german documentation, see https://github.com/frappe/erpnext/pull/4931
2016-03-07 00:45:15 +01:00
ci2014
943d707021 Update sales-return.md
You swapped sales return and purchase return in the german documentation.
2016-03-07 00:42:55 +01:00
frehu01
eb5ad3f793 Update journal-entry.md 2016-03-06 17:52:29 +01:00
Nabin Hait
acb28954ff [fix][report] Show group rows with zero values if there are values against children 2016-03-04 12:32:44 +05:30
Rushabh Mehta
a0b21235d7 Merge branch 'develop' 2016-03-03 16:48:45 +05:30
Rushabh Mehta
d3c04a3eda bumped to version 6.24.5 2016-03-03 17:18:45 +06:00
Rushabh Mehta
0c1b8f4334 [fix] [minor] autoload chart of accounts 2016-03-03 16:47:36 +05:30
Rushabh Mehta
571a9d0f19 [fix] [tests] 2016-03-03 15:03:40 +05:30
Rushabh Mehta
3d101c3fd2 Merge branch 'develop' 2016-03-03 13:57:45 +05:30
Rushabh Mehta
563f023c11 bumped to version 6.24.4 2016-03-03 14:27:45 +06:00
Rushabh Mehta
1396b776bc [fix] print hide for submit_on_creation 2016-03-03 13:57:15 +05:30
Rushabh Mehta
c47d03cf8a Merge branch 'develop' 2016-03-03 13:13:21 +05:30
Rushabh Mehta
369b9cf928 bumped to version 6.24.3 2016-03-03 13:43:21 +06:00
Rushabh Mehta
7114b7786e [fix] print hide for submit_on_create 2016-03-03 13:12:21 +05:30
330 changed files with 39715 additions and 37478 deletions

View File

@@ -16,16 +16,13 @@ install:
- sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis
- sudo pip install --upgrade pip
- rm $TRAVIS_BUILD_DIR/.git/shallow
- cd ~/ && bench init frappe-bench --frappe-path https://github.com/frappe/frappe.git --frappe-branch develop
- bash $TRAVIS_BUILD_DIR/travis/bench_init.sh
- cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
script:
- cd ~/frappe-bench
- bench get-app erpnext $TRAVIS_BUILD_DIR
- bench use test_site
- bench setup redis-cache
- bench setup redis-async-broker
- bench setup procfile --with-celery-broker
- bench reinstall
- bench build
- bench build-website

View File

@@ -1,11 +0,0 @@
#!/bin/bash
# stolen from http://cgit.drupalcode.org/octopus/commit/?id=db4f837
includedir=`mysql_config --variable=pkgincludedir`
thiscwd=`pwd`
_THIS_DB_VERSION=`mysql -V 2>&1 | tr -d "\n" | cut -d" " -f6 | awk '{ print $1}' | cut -d"-" -f1 | awk '{ print $1}' | sed "s/[\,']//g"`
if [ "$_THIS_DB_VERSION" = "5.5.40" ] && [ ! -e "$includedir-$_THIS_DB_VERSION-fixed.log" ] ; then
cd $includedir
sudo patch -p1 < $thiscwd/ci/my_config.h.patch &> /dev/null
sudo touch $includedir-$_THIS_DB_VERSION-fixed.log
fi

View File

@@ -1,22 +0,0 @@
diff -burp a/my_config.h b/my_config.h
--- a/my_config.h 2014-10-09 19:32:46.000000000 -0400
+++ b/my_config.h 2014-10-09 19:35:12.000000000 -0400
@@ -641,17 +641,4 @@
#define SIZEOF_TIME_T 8
/* #undef TIME_T_UNSIGNED */
-/*
- stat structure (from <sys/stat.h>) is conditionally defined
- to have different layout and size depending on the defined macros.
- The correct macro is defined in my_config.h, which means it MUST be
- included first (or at least before <features.h> - so, practically,
- before including any system headers).
-
- __GLIBC__ is defined in <features.h>
-*/
-#ifdef __GLIBC__
-#error <my_config.h> MUST be included first!
-#endif
-
#endif

View File

@@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.24.2'
__version__ = '6.27.11'

View File

@@ -24,12 +24,4 @@ cur_frm.fields_dict.state.get_query = function(doc) {
cur_frm.cscript.invoice_no = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return get_server_fields('get_invoice_details', d.invoice_no, 'invoices', doc, cdt, cdn, 1);
}
cur_frm.cscript.company = function(doc, cdt, cdn) {
erpnext.get_fiscal_year(doc.company, doc.received_date);
}
cur_frm.cscript.received_date = function(doc, cdt, cdn){
erpnext.get_fiscal_year(doc.company, doc.received_date);
}

View File

@@ -16,6 +16,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -40,6 +41,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series",
@@ -64,6 +66,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "C-Form No",
@@ -87,6 +90,7 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Received Date",
@@ -110,6 +114,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Customer",
@@ -134,6 +139,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -158,6 +164,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
@@ -174,30 +181,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -206,6 +189,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Quarter",
@@ -230,6 +214,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount",
@@ -254,6 +239,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "State",
@@ -277,6 +263,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -299,6 +286,7 @@
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Invoices",
@@ -323,6 +311,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Invoiced Amount",
@@ -347,6 +336,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
@@ -374,7 +364,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 3,
"modified": "2016-02-03 01:09:33.043437",
"modified": "2016-03-03 04:31:05.340444",
"modified_by": "Administrator",
"module": "Accounts",
"name": "C-Form",

View File

@@ -18,6 +18,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
@@ -25,6 +26,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -40,6 +42,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Cost Center Name",
@@ -49,6 +52,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -64,6 +68,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Parent Cost Center",
@@ -74,6 +79,7 @@
"options": "Cost Center",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -89,6 +95,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Company",
@@ -99,6 +106,7 @@
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -114,12 +122,14 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -137,6 +147,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Group",
@@ -145,6 +156,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -161,6 +173,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Budget",
@@ -168,6 +181,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -184,6 +198,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Distribution Id",
@@ -194,6 +209,7 @@
"options": "Monthly Distribution",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -210,6 +226,7 @@
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Budgets",
@@ -220,6 +237,7 @@
"options": "Budget Detail",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -235,6 +253,7 @@
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "lft",
@@ -244,6 +263,7 @@
"oldfieldtype": "Int",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
@@ -259,6 +279,7 @@
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "rgt",
@@ -268,6 +289,7 @@
"oldfieldtype": "Int",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
@@ -283,6 +305,7 @@
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "old_parent",
@@ -293,6 +316,7 @@
"options": "Cost Center",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
@@ -311,7 +335,8 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-11-16 06:29:43.870712",
"menu_index": 0,
"modified": "2016-03-14 15:59:51.508268",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",
@@ -337,6 +362,26 @@
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 1,
"role": "Auditor",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
},
{
"amend": 0,
"apply_user_permissions": 0,
@@ -396,29 +441,10 @@
"share": 0,
"submit": 0,
"write": 0
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "Stock User",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
}
],
"read_only": 0,
"read_only_onload": 0,
"search_fields": "parent_cost_center, is_group"
"search_fields": "parent_cost_center, is_group",
"version": 0
}

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('GL Entry', {
refresh: function(frm) {
}
});

View File

@@ -9,6 +9,7 @@ from frappe.model.document import Document
from erpnext.accounts.party import validate_party_gle_currency, validate_party_frozen_disabled
from erpnext.accounts.utils import get_account_currency
from erpnext.setup.doctype.company.company import get_company_currency
from erpnext.accounts.utils import get_fiscal_year
from erpnext.exceptions import InvalidAccountCurrency
exclude_from_linked_with = True
@@ -18,11 +19,11 @@ class GLEntry(Document):
self.flags.ignore_submit_comment = True
self.check_mandatory()
self.pl_must_have_cost_center()
self.validate_posting_date()
self.check_pl_account()
self.validate_cost_center()
self.validate_party()
self.validate_currency()
self.validate_and_set_fiscal_year()
def on_update_with_args(self, adv_adj, update_outstanding = 'Yes'):
self.validate_account_details(adv_adj)
@@ -37,7 +38,7 @@ class GLEntry(Document):
self.against_voucher)
def check_mandatory(self):
mandatory = ['account','remarks','voucher_type','voucher_no','fiscal_year','company']
mandatory = ['account','remarks','voucher_type','voucher_no','company']
for k in mandatory:
if not self.get(k):
frappe.throw(_("{0} is required").format(self.meta.get_label(k)))
@@ -57,10 +58,6 @@ class GLEntry(Document):
elif self.cost_center:
self.cost_center = None
def validate_posting_date(self):
from erpnext.accounts.utils import validate_fiscal_year
validate_fiscal_year(self.posting_date, self.fiscal_year, _("Posting Date"), self)
def check_pl_account(self):
if self.is_opening=='Yes' and \
frappe.db.get_value("Account", self.account, "report_type")=="Profit and Loss":
@@ -112,6 +109,12 @@ class GLEntry(Document):
if self.party_type and self.party:
validate_party_gle_currency(self.party_type, self.party, self.company, self.account_currency)
def validate_and_set_fiscal_year(self):
if not self.fiscal_year:
self.fiscal_year = get_fiscal_year(self.posting_date, company=self.company)[0]
def validate_balance_type(account, adv_adj=False):
if not adv_adj and account:
balance_must_be = frappe.db.get_value("Account", account, "balance_must_be")

View File

@@ -217,16 +217,6 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
cur_frm.script_manager.make(erpnext.accounts.JournalEntry);
cur_frm.cscript.company = function(doc, cdt, cdn) {
cur_frm.refresh_fields();
erpnext.get_fiscal_year(doc.company, doc.posting_date);
}
cur_frm.cscript.posting_date = function(doc, cdt, cdn){
cur_frm.posting_date = cur_frm.doc.posting_date;
erpnext.get_fiscal_year(doc.company, doc.posting_date);
}
cur_frm.cscript.update_totals = function(doc) {
var td=0.0; var tc =0.0;
var accounts = doc.accounts || [];
@@ -410,11 +400,11 @@ $.extend(erpnext.journal_entry, {
var row = locals[cdt][cdn];
frappe.model.set_value(cdt, cdn, "debit",
flt(flt(row.debit_in_account_currency)*row.exchange_rate), precision("debit", row));
flt(flt(row.debit_in_account_currency)*row.exchange_rate, precision("debit", row)));
frappe.model.set_value(cdt, cdn, "credit",
flt(flt(row.credit_in_account_currency)*row.exchange_rate), precision("credit", row));
flt(flt(row.credit_in_account_currency)*row.exchange_rate, precision("credit", row)));
cur_frm.cscript.update_totals(frm.doc);
},

File diff suppressed because it is too large Load Diff

View File

@@ -22,7 +22,6 @@ class JournalEntry(AccountsController):
self.is_opening='No'
self.clearance_date = None
super(JournalEntry, self).validate_date_with_fiscal_year()
self.validate_party()
self.validate_cheque_info()
self.validate_entries_for_advance()
@@ -354,25 +353,31 @@ class JournalEntry(AccountsController):
self.remark = ("\n").join(r) #User Remarks is not mandatory
def set_print_format_fields(self):
total_amount = 0.0
bank_account_currency = None
pay_to_recd_from = None
bank_amount = party_amount = total_amount = 0.0
currency = bank_account_currency = party_account_currency = pay_to_recd_from= None
for d in self.get('accounts'):
if d.party_type and d.party:
if not pay_to_recd_from:
pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
"customer_name" if d.party_type=="Customer" else "supplier_name")
party_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
party_account_currency = d.account_currency
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
total_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
bank_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
bank_account_currency = d.account_currency
if pay_to_recd_from:
self.pay_to_recd_from = pay_to_recd_from
else:
total_amount = 0
if bank_amount:
total_amount = bank_amount
currency = bank_account_currency
else:
total_amount = party_amount
currency = party_account_currency
self.set_total_amount(total_amount, bank_account_currency)
self.set_total_amount(total_amount, currency)
def set_total_amount(self, amt, currency):
self.total_amount = amt
@@ -665,7 +670,7 @@ def get_payment_entry(ref_doc, args):
bank_row.cost_center = cost_center
amount = args.get("debit_in_account_currency") or args.get("amount")
if bank_row.account_currency == args.get("party_account_currency"):
bank_row.set(args.get("amount_field_bank"), amount)
else:

View File

@@ -249,7 +249,6 @@ def make_journal_entry(account1, account2, amount, cost_center=None, exchange_ra
jv = frappe.new_doc("Journal Entry")
jv.posting_date = "2013-02-14"
jv.company = "_Test Company"
jv.fiscal_year = "_Test Fiscal Year 2013"
jv.user_remark = "test"
jv.multi_currency = 1
jv.set("accounts", [

View File

@@ -7,8 +7,8 @@
"accounts": [
{
"account": "_Test Receivable - _TC",
"party_type": "Customer",
"party": "_Test Customer",
"party_type": "Customer",
"party": "_Test Customer",
"credit_in_account_currency": 400.0,
"debit_in_account_currency": 0.0,
"doctype": "Journal Entry Account",
@@ -22,7 +22,6 @@
"parentfield": "accounts"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"naming_series": "_T-Journal Entry-",
"posting_date": "2013-02-14",
"user_remark": "test",
@@ -38,8 +37,8 @@
"accounts": [
{
"account": "_Test Payable - _TC",
"party_type": "Supplier",
"party": "_Test Supplier",
"party_type": "Supplier",
"party": "_Test Supplier",
"credit_in_account_currency": 0.0,
"debit_in_account_currency": 400.0,
"doctype": "Journal Entry Account",
@@ -53,7 +52,6 @@
"parentfield": "accounts"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"naming_series": "_T-Journal Entry-",
"posting_date": "2013-02-14",
"user_remark": "test",
@@ -69,8 +67,8 @@
"accounts": [
{
"account": "_Test Receivable - _TC",
"party_type": "Customer",
"party": "_Test Customer",
"party_type": "Customer",
"party": "_Test Customer",
"credit_in_account_currency": 0.0,
"debit_in_account_currency": 400.0,
"doctype": "Journal Entry Account",
@@ -85,7 +83,6 @@
"parentfield": "accounts"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"naming_series": "_T-Journal Entry-",
"posting_date": "2013-02-14",
"user_remark": "test",

View File

@@ -1,150 +1,156 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "field:distribution_id",
"creation": "2013-01-10 16:34:05",
"custom": 0,
"description": "**Monthly Distribution** helps you distribute your budget across months if you have seasonality in your business.\n\nTo distribute a budget using this distribution, set this **Monthly Distribution** in the **Cost Center**",
"docstatus": 0,
"doctype": "DocType",
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "field:distribution_id",
"creation": "2013-01-10 16:34:05",
"custom": 0,
"description": "**Monthly Distribution** helps you distribute your budget across months if you have seasonality in your business.\n\nTo distribute a budget using this distribution, set this **Monthly Distribution** in the **Cost Center**",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Name of the Monthly Distribution",
"fieldname": "distribution_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Distribution Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "distribution_id",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Name of the Monthly Distribution",
"fieldname": "distribution_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Distribution Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "distribution_id",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
"set_only_once": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
"set_only_once": 0,
"unique": 0
},
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "percentages",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Monthly Distribution Percentages",
"length": 0,
"no_copy": 0,
"oldfieldname": "budget_distribution_details",
"oldfieldtype": "Table",
"options": "Monthly Distribution Percentage",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "percentages",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Monthly Distribution Percentages",
"length": 0,
"no_copy": 0,
"oldfieldname": "budget_distribution_details",
"oldfieldtype": "Table",
"options": "Monthly Distribution Percentage",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "icon-bar-chart",
"idx": 1,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-11-16 06:29:50.431735",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Monthly Distribution",
"name_case": "Title Case",
"owner": "Administrator",
],
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "icon-bar-chart",
"idx": 1,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-03-03 02:46:44.493857",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Monthly Distribution",
"name_case": "Title Case",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 2,
"print": 0,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 2,
"print": 0,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
}
],
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
],
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC"
}
}

View File

@@ -598,13 +598,13 @@
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"in_create": 0,
"in_create": 1,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-02-24 16:49:46.832403",
"modified": "2016-04-12 15:26:22.756129",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Request",
@@ -675,5 +675,6 @@
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC"
"sort_order": "DESC",
"track_seen": 0
}

View File

@@ -211,7 +211,10 @@ def get_amount(ref_doc, dt):
grand_total = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid)
if dt == "Sales Invoice":
grand_total = flt(ref_doc.outstanding_amount)
if ref_doc.party_account_currency == ref_doc.currency:
grand_total = flt(ref_doc.outstanding_amount)
else:
grand_total = flt(ref_doc.outstanding_amount) / ref_doc.conversion_rate
if grand_total > 0 :
return grand_total

View File

@@ -242,6 +242,8 @@ def filter_pricing_rules(args, pricing_rules):
for p in pricing_rules:
if p.item_code and args.variant_of:
p.variant_of = args.variant_of
else:
p.variant_of = None
# find pricing rule with highest priority
if pricing_rules:
@@ -251,7 +253,7 @@ def filter_pricing_rules(args, pricing_rules):
# apply internal priority
all_fields = ["item_code", "item_group", "brand", "customer", "customer_group", "territory",
"supplier", "supplier_type", "campaign", "sales_partner"]
"supplier", "supplier_type", "campaign", "sales_partner", "variant_of"]
if len(pricing_rules) > 1:
for field_set in [["item_code", "variant_of", "item_group", "brand"],

View File

@@ -118,7 +118,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
items_add: function(doc, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
this.frm.script_manager.copy_from_first_row("items", row,
["expense_account", "cost_center", "project_name"]);
["expense_account", "cost_center", "project"]);
},
on_submit: function() {
@@ -242,7 +242,7 @@ cur_frm.cscript.cost_center = function(doc, cdt, cdn){
refresh_field('items');
}
cur_frm.fields_dict['items'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
cur_frm.fields_dict['items'].grid.get_field('project').get_query = function(doc, cdt, cdn) {
return{
filters:[
['Project', 'status', 'not in', 'Completed, Cancelled']

View File

@@ -116,103 +116,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "address_display",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_display",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_mobile",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mobile No",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_email",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Email",
"length": 0,
"no_copy": 0,
"options": "Email",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -424,6 +327,254 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_addresses",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address and Contact",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "supplier_address",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Select Supplier Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_person",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Contact Person",
"length": 0,
"no_copy": 0,
"options": "Contact",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "",
"fieldname": "address_display",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_display",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_mobile",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mobile No",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_email",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Email",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break_address",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "",
"fieldname": "shipping_address",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Select Shipping Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "shipping_address_display",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Shipping Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1821,106 +1972,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"depends_on": "supplier",
"fieldname": "contact_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Details",
"length": 0,
"no_copy": 0,
"options": "icon-bullhorn",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "supplier_address",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Supplier Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break23",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50%"
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_person",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Person",
"length": 0,
"no_copy": 0,
"options": "Contact",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -2235,33 +2286,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -2342,7 +2366,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
@@ -2448,7 +2472,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
@@ -2464,7 +2488,7 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
@@ -2631,7 +2655,7 @@
"unique": 0
},
{
"allow_on_submit": 1,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
@@ -2649,7 +2673,7 @@
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -2668,7 +2692,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-03-02 07:12:31.805279",
"modified": "2016-03-21 13:13:43.694604",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
@@ -2797,7 +2821,7 @@
],
"read_only": 0,
"read_only_onload": 1,
"search_fields": "posting_date, supplier, fiscal_year, bill_no, base_grand_total, outstanding_amount",
"search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount",
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "supplier",

View File

@@ -10,7 +10,7 @@ import frappe.defaults
from erpnext.controllers.buying_controller import BuyingController
from erpnext.accounts.party import get_party_account, get_due_date
from erpnext.accounts.utils import get_account_currency
from erpnext.accounts.utils import get_account_currency, get_fiscal_year
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import update_billed_amount_based_on_po
form_grid_templates = {
@@ -121,7 +121,7 @@ class PurchaseInvoice(BuyingController):
},
"Purchase Order Item": {
"ref_dn_field": "po_detail",
"compare_fields": [["project_name", "="], ["item_code", "="], ["uom", "="]],
"compare_fields": [["project", "="], ["item_code", "="], ["uom", "="]],
"is_child_table": True,
"allow_duplicate_prev_row_id": True
},
@@ -131,7 +131,7 @@ class PurchaseInvoice(BuyingController):
},
"Purchase Receipt Item": {
"ref_dn_field": "pr_detail",
"compare_fields": [["project_name", "="], ["item_code", "="], ["uom", "="]],
"compare_fields": [["project", "="], ["item_code", "="], ["uom", "="]],
"is_child_table": True
}
})
@@ -234,8 +234,6 @@ class PurchaseInvoice(BuyingController):
reconcile_against_document(lst)
def on_submit(self):
super(PurchaseInvoice, self).on_submit()
self.check_prev_docstatus()
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype,
@@ -421,22 +419,36 @@ class PurchaseInvoice(BuyingController):
def update_project(self):
project_list = []
for d in self.items:
if d.project_name and d.project_name not in project_list:
project = frappe.get_doc("Project", d.project_name)
if d.project and d.project not in project_list:
project = frappe.get_doc("Project", d.project)
project.flags.dont_sync_tasks = True
project.update_purchase_costing()
project.save()
project_list.append(d.project_name)
project_list.append(d.project)
def validate_supplier_invoice(self):
if self.bill_date:
if getdate(self.bill_date) > getdate(self.posting_date):
frappe.throw("Supplier Invoice Date cannot be greater than Posting Date")
if self.bill_no:
if cint(frappe.db.get_single_value("Accounts Settings", "check_supplier_invoice_uniqueness")):
pi = frappe.db.exists("Purchase Invoice", {"bill_no": self.bill_no,
"fiscal_year": self.fiscal_year, "name": ("!=", self.name), "docstatus": ("<", 2)})
fiscal_year = get_fiscal_year(self.posting_date, company=self.company, as_dict=True)
pi = frappe.db.sql('''select name from `tabPurchase Invoice`
where
bill_no = %(bill_no)s
and name != %(name)s
and docstatus < 2
and posting_date between %(year_start_date)s and %(year_end_date)s''', {
"bill_no": self.bill_no,
"name": self.name,
"year_start_date": fiscal_year.year_start_date,
"year_end_date": fiscal_year.year_end_date
})
if pi:
pi = pi[0][0]
frappe.throw("Supplier Invoice No exists in Purchase Invoice {0}".format(pi))
def update_billing_status_in_pr(self, update_modified=True):

View File

@@ -222,14 +222,14 @@ class TestPurchaseInvoice(unittest.TestCase):
def test_total_purchase_cost_for_project(self):
existing_purchase_cost = frappe.db.sql("""select sum(base_net_amount)
from `tabPurchase Invoice Item` where project_name = '_Test Project' and docstatus=1""")
from `tabPurchase Invoice Item` where project = '_Test Project' and docstatus=1""")
existing_purchase_cost = existing_purchase_cost and existing_purchase_cost[0][0] or 0
pi = make_purchase_invoice(currency="USD", conversion_rate=60, project_name="_Test Project")
pi = make_purchase_invoice(currency="USD", conversion_rate=60, project="_Test Project")
self.assertEqual(frappe.db.get_value("Project", "_Test Project", "total_purchase_cost"),
existing_purchase_cost + 15000)
pi1 = make_purchase_invoice(qty=10, project_name="_Test Project")
pi1 = make_purchase_invoice(qty=10, project="_Test Project")
self.assertEqual(frappe.db.get_value("Project", "_Test Project", "total_purchase_cost"),
existing_purchase_cost + 15500)
@@ -338,7 +338,7 @@ def make_purchase_invoice(**args):
"serial_no": args.serial_no,
"stock_uom": "_Test UOM",
"cost_center": "_Test Cost Center - _TC",
"project_name": args.project_name
"project": args.project
})
if not args.do_not_save:
pi.insert()

View File

@@ -40,7 +40,6 @@
"uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 0,
"naming_series": "_T-BILL",
"taxes": [
@@ -166,7 +165,6 @@
"uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 0,
"naming_series": "_T-Purchase Invoice-",
"taxes": [

View File

@@ -7,6 +7,7 @@
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"fields": [
{
"allow_on_submit": 0,
@@ -842,14 +843,14 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "project_name",
"fieldname": "project",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Project Name",
"label": "Project",
"length": 0,
"no_copy": 0,
"options": "Project",
@@ -1238,7 +1239,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-02-22 09:32:17.205040",
"modified": "2016-03-18 05:05:27.752823",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",

View File

@@ -278,7 +278,7 @@ $.extend(cur_frm.cscript, new erpnext.accounts.SalesInvoiceController({frm: cur_
// Hide Fields
// ------------
cur_frm.cscript.hide_fields = function(doc) {
par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received',
par_flds = ['project', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received',
'advances', 'sales_partner', 'commission_rate', 'total_commission', 'advances', 'from_date', 'to_date'];
if(cint(doc.is_pos) == 1) {
@@ -381,7 +381,7 @@ cur_frm.fields_dict.write_off_cost_center.get_query = function(doc) {
//project name
//--------------------------
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
cur_frm.fields_dict['project'].get_query = function(doc, cdt, cdn) {
return{
query: "erpnext.controllers.queries.get_project_name",
filters: {'customer': doc.customer}

View File

@@ -368,6 +368,33 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "mode_of_payment",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mode of Payment",
"length": 0,
"no_copy": 0,
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Select",
"options": "Mode of Payment",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1810,33 +1837,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "mode_of_payment",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mode of Payment",
"length": 0,
"no_copy": 0,
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Select",
"options": "Mode of Payment",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -2363,14 +2363,14 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "project_name",
"fieldname": "project",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Project Name",
"label": "Project",
"length": 0,
"no_copy": 0,
"oldfieldname": "project_name",
@@ -2776,33 +2776,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -3092,7 +3065,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
@@ -3198,7 +3171,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
@@ -3214,7 +3187,7 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
@@ -3382,7 +3355,7 @@
"unique": 0
},
{
"allow_on_submit": 1,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
@@ -3400,7 +3373,7 @@
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -3445,7 +3418,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-03-02 07:12:38.793697",
"modified": "2016-03-21 13:12:12.430038",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
@@ -3530,11 +3503,31 @@
"share": 0,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 1,
"print": 0,
"read": 1,
"report": 0,
"role": "All",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
}
],
"read_only": 0,
"read_only_onload": 1,
"search_fields": "posting_date, due_date, customer, fiscal_year, base_grand_total, outstanding_amount",
"search_fields": "posting_date, due_date, customer, base_grand_total, outstanding_amount",
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "customer",

View File

@@ -81,8 +81,6 @@ class SalesInvoice(SellingController):
self.update_packing_list()
def on_submit(self):
super(SalesInvoice, self).on_submit()
if cint(self.update_stock) == 1:
self.update_stock_ledger()
else:
@@ -323,12 +321,12 @@ class SalesInvoice(SellingController):
super(SalesInvoice, self).validate_with_previous_doc({
"Sales Order": {
"ref_dn_field": "sales_order",
"compare_fields": [["customer", "="], ["company", "="], ["project_name", "="],
"compare_fields": [["customer", "="], ["company", "="], ["project", "="],
["currency", "="]],
},
"Delivery Note": {
"ref_dn_field": "delivery_note",
"compare_fields": [["customer", "="], ["company", "="], ["project_name", "="],
"compare_fields": [["customer", "="], ["company", "="], ["project", "="],
["currency", "="]],
},
})
@@ -365,19 +363,19 @@ class SalesInvoice(SellingController):
def validate_proj_cust(self):
"""check for does customer belong to same project as entered.."""
if self.project_name and self.customer:
if self.project and self.customer:
res = frappe.db.sql("""select name from `tabProject`
where name = %s and (customer = %s or customer is null or customer = '')""",
(self.project_name, self.customer))
(self.project, self.customer))
if not res:
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project_name))
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project))
def validate_pos(self):
if not self.cash_bank_account and flt(self.paid_amount):
frappe.throw(_("Cash or Bank Account is mandatory for making payment entry"))
if flt(self.paid_amount) + flt(self.write_off_amount) \
- flt(self.base_grand_total) > 1/(10**(self.precision("base_grand_total") + 1)):
- flt(self.grand_total) > 1/(10**(self.precision("grand_total") + 1)):
frappe.throw(_("""Paid amount + Write Off Amount can not be greater than Grand Total"""))

View File

@@ -16,14 +16,13 @@
"description": "138-CMS Shoe",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_name": "138-CMS Shoe",
"parentfield": "items",
"qty": 1.0,
"rate": 500.0
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"base_grand_total": 561.8,
"grand_total": 561.8,
"is_pos": 0,
@@ -158,7 +157,6 @@
"stock_uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
@@ -280,7 +278,6 @@
"stock_uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",

View File

@@ -19,19 +19,6 @@ frappe.ui.form.on("Tax Rule", "refresh", function(frm) {
frappe.ui.form.trigger("Tax Rule", "tax_type");
})
frappe.ui.form.on("Tax Rule", "use_for_shopping_cart", function(frm) {
if(!frm.doc.use_for_shopping_cart &&
(frappe.get_list("Tax Rule", {"use_for_shopping_cart":1}).length == 0)) {
frappe.model.get_value("Shopping Cart Settings", "Shopping Cart Settings",
"enabled", function(docfield) {
if(docfield.enabled){
frm.set_value("use_for_shopping_cart", 1);
frappe.throw(__("Shopping Cart is enabled"));
}
});
}
})
frappe.ui.form.on("Tax Rule", "customer", function(frm) {
frappe.call({
method:"erpnext.accounts.doctype.tax_rule.tax_rule.get_party_details",
@@ -64,4 +51,4 @@ frappe.ui.form.on("Tax Rule", "supplier", function(frm) {
}
}
});
});
});

View File

@@ -6,7 +6,7 @@ from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import cstr
from frappe.utils import cstr, cint
class IncorrectCustomerGroup(frappe.ValidationError): pass
class IncorrectSupplierType(frappe.ValidationError): pass
@@ -20,15 +20,16 @@ class TaxRule(Document):
self.validate_tax_template()
self.validate_date()
self.validate_filters()
self.validate_use_for_shopping_cart()
def validate_tax_template(self):
if self.tax_type== "Sales":
self.purchase_tax_template = self.supplier = self.supplier_type= None
self.purchase_tax_template = self.supplier = self.supplier_type = None
if self.customer:
self.customer_group = None
else:
self.sales_tax_template= self.customer = self.customer_group= None
self.sales_tax_template = self.customer = self.customer_group = None
if self.supplier:
self.supplier_type = None
@@ -81,6 +82,15 @@ class TaxRule(Document):
if tax_rule[0].priority == self.priority:
frappe.throw(_("Tax Rule Conflicts with {0}".format(tax_rule[0].name)), ConflictingTaxRule)
def validate_use_for_shopping_cart(self):
'''If shopping cart is enabled and no tax rule exists for shopping cart, enable this one'''
if (not self.use_for_shopping_cart
and cint(frappe.db.get_single_value('Shopping Cart Settings', 'enabled'))
and not frappe.db.get_value('Tax Rule', {'use_for_shopping_cart': 1, 'name': ['!=', self.name]})):
self.use_for_shopping_cart = 1
frappe.msgprint(_("Enabling 'Use for Shopping Cart', as Shopping Cart is enabled and there should be at least one Tax Rule for Shopping Cart"))
@frappe.whitelist()
def get_party_details(party, party_type, args=None):
out = {}
@@ -109,11 +119,11 @@ def get_party_details(party, party_type, args=None):
def get_tax_template(posting_date, args):
"""Get matching tax rule"""
args = frappe._dict(args)
conditions = ["""(from_date is null or from_date = '' or from_date <= '{0}')
conditions = ["""(from_date is null or from_date = '' or from_date <= '{0}')
and (to_date is null or to_date = '' or to_date >= '{0}')""".format(posting_date)]
for key, value in args.iteritems():
if key in "use_for_shopping_cart":
if key=="use_for_shopping_cart":
conditions.append("use_for_shopping_cart = {0}".format(1 if value else 0))
else:
conditions.append("ifnull({0}, '') in ('', '{1}')".format(key, frappe.db.escape(cstr(value))))

View File

@@ -142,7 +142,7 @@ def make_round_off_gle(gl_map, debit_credit_diff):
round_off_gle = frappe._dict()
for k in ["voucher_type", "voucher_no", "company",
"posting_date", "remarks", "fiscal_year", "is_opening"]:
"posting_date", "remarks", "is_opening"]:
round_off_gle[k] = gl_map[0][k]
round_off_gle.update({

View File

@@ -60,6 +60,7 @@ frappe.pages["Accounts Browser"].on_page_load = function(wrapper){
chart_area.get(0), wrapper.page);
})
wrapper.$company_select.change();
}
frappe.pages["Accounts Browser"].on_page_show = function(wrapper){

View File

@@ -299,8 +299,12 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
else:
args.update(get_party_details(party, party_type))
if party_type=="Customer":
if party_type in ("Customer", "Lead"):
args.update({"tax_type": "Sales"})
if party_type=='Lead':
args['customer'] = None
del args['lead']
else:
args.update({"tax_type": "Purchase"})

View File

@@ -2,7 +2,7 @@
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
</div>
<h2 class="text-center">{%= __(report.report_name) %}</h2>
<h4 class="text-center">{%= filters.account && (filters.account + ", ") || "" %} {%= filters.company %}</h4>
<h4 class="text-center">{%= filters.customer || filters.supplier %} </h4>
<h5 class="text-center">
{%= filters.ageing_based_on %}
{%= __("Until") %}
@@ -31,40 +31,37 @@
{% for(var i=0, l=data.length; i<l; i++) { %}
<tr>
{% if(__(report.report_name) == "Accounts Receivable" || __(report.report_name) == "Accounts Payable") { %}
{% if(data[i][__("Posting Date")]) { %}
{% if(data[i][__("Customer")] || data[i][__("Supplier")]) { %}
<td>{%= dateutil.str_to_user(data[i][__("Posting Date")]) %}</td>
<td>{%= data[i][__("Voucher Type")] %}
<br>{%= data[i][__("Voucher No")] %}</td>
<td>{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
{% if(__(report.report_name) == "Accounts Receivable") { %}
<br>{%= __("Territory") %}: {%= data[i][__("Territory")] %}
{% } else { %}
<br>{%= __("Supplier Type") %}: {%= data[i][__("Supplier Type")] %}
{% } %}
<td>{%= data[i][__("Customer Name")] || data[i][__("Customer")] || data[i][__("Supplier Name")] || data[i][__("Supplier")] %}
<br>{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}</td>
<td style="text-align: right">{%= format_currency(data[i][__("Invoiced Amount")]) %}</td>
<td style="text-align: right">{%= format_currency(data[i][__("Paid Amount")]) %}</td>
<td style="text-align: right">{%= format_currency(data[i][__("Outstanding Amount")]) %}</td>
<td style="text-align: right">
{%= format_currency(data[i][__("Invoiced Amount")], data[i]["currency"]) %}</td>
<td style="text-align: right">
{%= format_currency(data[i][__("Paid Amount")], data[i]["currency"]) %}</td>
<td style="text-align: right">
{%= format_currency(data[i][__("Outstanding Amount")], data[i]["currency"]) %}</td>
{% } else { %}
<td></td>
<td></td>
<td><b>{%= data[i][__("Customer")] || data[i][__("Supplier")] || "&nbsp;" %}</b></td>
<td><b>{%= __("Total") %}</b></td>
<td style="text-align: right">
{%= data[i][__("Account")] && format_currency(data[i][__("Invoiced Amount")]) %}</td>
{%= format_currency(data[i][__("Invoiced Amount")]) %}</td>
<td style="text-align: right">
{%= data[i][__("Account")] && format_currency(data[i][__("Paid Amount")]) %}</td>
{%= format_currency(data[i][__("Paid Amount")]) %}</td>
<td style="text-align: right">
{%= data[i][__("Account")] && format_currency(data[i][__("Outstanding Amount")]) %}</td>
{%= format_currency(data[i][__("Outstanding Amount")]) %}</td>
{% } %}
{% } else { %}
{% if(data[i][__("Customer")] || data[i][__("Supplier")]|| "&nbsp;") { %}
<td>{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
{% if(__(report.report_name) == "Accounts Receivable Summary") { %}
<br>{%= __("Territory") %}: {%= data[i][__("Territory")] %}
{% } else { %}
<br>{%= __("Supplier Type") %}: {%= data[i][__("Supplier Type")] %}
{% } %}
{% if((data[i][__("Customer")] || data[i][__("Supplier")]) != __("'Total'")) { %}
<td>{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
<br>{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}</td>
{% } else { %}
<td><b>{%= __("Total") %}</b></td>
{% } %}
<td style="text-align: right">{%= format_currency(data[i][__("Total Invoiced Amt")]) %}</td>
<td style="text-align: right">{%= format_currency(data[i][__("Total Paid Amt")]) %}</td>
<td style="text-align: right">{%= format_currency(data[i][__("Total Outstanding Amt")]) %}</td>

View File

@@ -58,21 +58,19 @@ class ReceivablePayableReport(object):
"width": 120
})
columns.append({
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Data",
"width": 100
})
if args.get("party_type") == "Customer":
columns += [_("Territory") + ":Link/Territory:80"]
if args.get("party_type") == "Supplier":
columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
columns += [
{
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Data",
"width": 100,
"hidden": 1
},
_("Remarks") + "::200"
]
columns.append(_("Remarks") + "::200")
return columns
def get_data(self, party_naming_by, args):
@@ -120,17 +118,17 @@ class ReceivablePayableReport(object):
row += get_ageing_data(cint(self.filters.range1), cint(self.filters.range2),
cint(self.filters.range3), self.age_as_on, entry_date, outstanding_amount)
if self.filters.get(scrub(args.get("party_type"))):
row.append(gle.account_currency)
else:
row.append(company_currency)
# customer territory / supplier type
if args.get("party_type") == "Customer":
row += [self.get_territory(gle.party)]
if args.get("party_type") == "Supplier":
row += [self.get_supplier_type(gle.party)]
if self.filters.get(scrub(args.get("party_type"))):
row.append(gle.account_currency)
else:
row.append(company_currency)
row.append(gle.remarks)
data.append(row)

View File

@@ -18,18 +18,25 @@ class AccountsReceivableSummary(ReceivablePayableReport):
columns += [ args.get("party_type") + " Name::140"]
columns += [
_("Total Invoiced Amt") + ":Currency:140",
_("Total Paid Amt") + ":Currency:140",
_("Total Outstanding Amt") + ":Currency:160",
"0-" + str(self.filters.range1) + ":Currency:100",
str(self.filters.range1) + "-" + str(self.filters.range2) + ":Currency:100",
str(self.filters.range2) + "-" + str(self.filters.range3) + ":Currency:100",
str(self.filters.range3) + _("-Above") + ":Currency:100"]
_("Total Invoiced Amt") + ":Currency/currency:140",
_("Total Paid Amt") + ":Currency/currency:140",
_("Total Outstanding Amt") + ":Currency/currency:160",
"0-" + str(self.filters.range1) + ":Currency/currency:100",
str(self.filters.range1) + "-" + str(self.filters.range2) + ":Currency/currency:100",
str(self.filters.range2) + "-" + str(self.filters.range3) + ":Currency/currency:100",
str(self.filters.range3) + _("-Above") + ":Currency/currency:100"]
if args.get("party_type") == "Customer":
columns += [_("Territory") + ":Link/Territory:80"]
if args.get("party_type") == "Supplier":
columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
columns.append({
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Data",
"width": 80
})
return columns
@@ -53,6 +60,8 @@ class AccountsReceivableSummary(ReceivablePayableReport):
row += [self.get_territory(party)]
if args.get("party_type") == "Supplier":
row += [self.get_supplier_type(party)]
row.append(party_dict.currency)
data.append(row)
return data
@@ -73,6 +82,8 @@ class AccountsReceivableSummary(ReceivablePayableReport):
)
for k in party_total[d.party].keys():
party_total[d.party][k] += d.get(k, 0)
party_total[d.party].currency = d.currency
return party_total
@@ -90,7 +101,7 @@ class AccountsReceivableSummary(ReceivablePayableReport):
cols += ["bill_no", "bill_date"]
cols += ["invoiced_amt", "paid_amt",
"outstanding_amt", "age", "range1", "range2", "range3", "range4"]
"outstanding_amt", "age", "range1", "range2", "range3", "range4", "currency"]
if args.get("party_type") == "Supplier":
cols += ["supplier_type", "remarks"]

View File

@@ -19,7 +19,7 @@ def execute(filters=None):
data = []
data.extend(asset or [])
data.extend(liability or [])
data.extend(liability or [])
data.extend(equity or [])
if provisional_profit_loss:
data.append(provisional_profit_loss)
@@ -43,11 +43,11 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
for period in period_list:
effective_liability = 0.0
if liability:
effective_liability += flt(liability[-2][period.key])
effective_liability += flt(liability[-2].get(period.key))
if equity:
effective_liability += flt(equity[-2][period.key])
effective_liability += flt(equity[-2].get(period.key))
provisional_profit_loss[period.key] = flt(asset[-2][period.key]) - effective_liability
provisional_profit_loss[period.key] = flt(asset[-2].get(period.key)) - effective_liability
if provisional_profit_loss[period.key]:
has_value = True

View File

@@ -7,12 +7,12 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2015-11-02 12:32:02.048551",
"modified": "2016-04-04 17:27:19.104519",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Delivered Items To Be Billed",
"owner": "Administrator",
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project_name` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`base_amount` - ifnull((select sum(base_amount) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc",
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t`tabDelivery Note Item`.`billed_amt` as \"Pending Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n `tabDelivery Note`.per_billed < 100\norder by `tabDelivery Note`.`name` desc",
"ref_doctype": "Sales Invoice",
"report_name": "Delivered Items To Be Billed",
"report_type": "Query Report"

View File

@@ -92,7 +92,7 @@ def get_data(company, root_type, balance_must_be, period_list,
if not accounts:
return None
accounts, accounts_by_name = filter_accounts(accounts)
accounts, accounts_by_name, parent_children_map = filter_accounts(accounts)
company_currency = frappe.db.get_value("Company", company, "default_currency")
@@ -109,6 +109,7 @@ def get_data(company, root_type, balance_must_be, period_list,
calculate_values(accounts_by_name, gl_entries_by_account, period_list, accumulated_values)
accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values)
out = prepare_data(accounts, balance_must_be, period_list, company_currency)
out = filter_out_zero_value_rows(out, parent_children_map)
if out:
add_total_row(out, balance_must_be, period_list, company_currency)
@@ -134,15 +135,15 @@ def accumulate_values_into_parents(accounts, accounts_by_name, period_list, accu
d.get(period.key, 0.0)
def prepare_data(accounts, balance_must_be, period_list, company_currency):
out = []
data = []
year_start_date = period_list[0]["year_start_date"].strftime("%Y-%m-%d")
year_end_date = period_list[-1]["year_end_date"].strftime("%Y-%m-%d")
for d in accounts:
# add to output
has_value = False
total = 0
row = {
row = frappe._dict({
"account_name": d.account_name,
"account": d.name,
"parent_account": d.parent_account,
@@ -150,7 +151,7 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
"year_start_date": year_start_date,
"year_end_date": year_end_date,
"currency": company_currency
}
})
for period in period_list:
if d.get(period.key):
# change sign based on Debit or Credit, since calculation is done using (debit - credit)
@@ -163,11 +164,27 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
has_value = True
total += flt(row[period.key])
if has_value:
row["total"] = total
out.append(row)
row["has_value"] = has_value
row["total"] = total
data.append(row)
return data
def filter_out_zero_value_rows(data, parent_children_map, show_zero_values=False):
data_with_value = []
for d in data:
if show_zero_values or d.get("has_value"):
data_with_value.append(d)
else:
# show group with zero balance, if there are balances against child
children = [child.name for child in parent_children_map.get(d.get("account")) or []]
if children:
for row in data:
if row.get("account") in children and row.get("has_value"):
data_with_value.append(d)
break
return out
return data_with_value
def add_total_row(out, balance_must_be, period_list, company_currency):
total_row = {
@@ -187,10 +204,11 @@ def add_total_row(out, balance_must_be, period_list, company_currency):
total_row["total"] += flt(row["total"])
row["total"] = ""
out.append(total_row)
if total_row.has_key("total"):
out.append(total_row)
# blank row after Total
out.append({})
# blank row after Total
out.append({})
def get_accounts(company, root_type):
return frappe.db.sql("""select name, parent_account, lft, rgt, root_type, report_type, account_name from `tabAccount`
@@ -218,7 +236,7 @@ def filter_accounts(accounts, depth=10):
add_to_list(None, 0)
return filtered_accounts, accounts_by_name
return filtered_accounts, accounts_by_name, parent_children_map
def sort_root_accounts(roots):
"""Sort root types as Asset, Liability, Equity, Income, Expense"""

View File

@@ -9,7 +9,7 @@ from frappe.utils import flt
def execute(filters=None):
if not filters: filters = frappe._dict()
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
gross_profit_data = GrossProfitGenerator(filters)
data = []
@@ -18,8 +18,8 @@ def execute(filters=None):
group_wise_columns = frappe._dict({
"invoice": ["parent", "customer", "posting_date","item_code", "item_name","item_group", "brand", "description", \
"warehouse", "qty", "base_rate", "buying_rate", "base_amount",
"buying_amount", "gross_profit", "gross_profit_percent", "project_name"],
"item_code": ["item_code", "item_name", "brand", "description", "warehouse", "qty", "base_rate",
"buying_amount", "gross_profit", "gross_profit_percent", "project"],
"item_code": ["item_code", "item_name", "brand", "description", "qty", "base_rate",
"buying_rate", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
"warehouse": ["warehouse", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
"gross_profit", "gross_profit_percent"],
@@ -35,7 +35,7 @@ def execute(filters=None):
"gross_profit", "gross_profit_percent"],
"sales_person": ["sales_person", "allocated_amount", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
"gross_profit", "gross_profit_percent"],
"project": ["project_name", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
"project": ["project", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
"territory": ["territory", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"]
})
@@ -45,7 +45,7 @@ def execute(filters=None):
row = []
for col in group_wise_columns.get(scrub(filters.group_by)):
row.append(src.get(col))
row.append(company_currency)
data.append(row)
@@ -70,7 +70,7 @@ def get_columns(group_wise_columns, filters):
"buying_amount": _("Buying Amount") + ":Currency/currency",
"gross_profit": _("Gross Profit") + ":Currency/currency",
"gross_profit_percent": _("Gross Profit %") + ":Percent",
"project_name": _("Project") + ":Link/Project",
"project": _("Project") + ":Link/Project",
"sales_person": _("Sales person"),
"allocated_amount": _("Allocated Amount") + ":Currency/currency",
"customer": _("Customer") + ":Link/Customer",
@@ -80,7 +80,7 @@ def get_columns(group_wise_columns, filters):
for col in group_wise_columns.get(scrub(filters.group_by)):
columns.append(column_map.get(col))
columns.append({
"fieldname": "currency",
"label" : _("Currency"),
@@ -145,11 +145,11 @@ class GrossProfitGenerator(object):
self.data.append(row)
if self.grouped:
self.collapse_group()
self.get_average_rate_based_on_group_by()
else:
self.grouped_data = []
def collapse_group(self):
def get_average_rate_based_on_group_by(self):
# sum buying / selling totals for group
self.grouped_data = []
for key in self.grouped.keys():
@@ -166,6 +166,8 @@ class GrossProfitGenerator(object):
if new_row.base_amount else 0
new_row.buying_rate = (new_row.buying_amount / new_row.qty) \
if new_row.qty else 0
new_row.base_rate = (new_row.base_amount / new_row.qty) \
if new_row.qty else 0
self.grouped_data.append(new_row)
@@ -233,7 +235,7 @@ class GrossProfitGenerator(object):
conditions += " and posting_date <= %(to_date)s"
self.si_list = frappe.db.sql("""select item.parenttype, item.parent,
si.posting_date, si.posting_time, si.project_name, si.update_stock,
si.posting_date, si.posting_time, si.project, si.update_stock,
si.customer, si.customer_group, si.territory,
item.item_code, item.item_name, item.description, item.warehouse,
item.item_group, item.brand, item.dn_detail, item.delivery_note,

View File

@@ -16,6 +16,14 @@ def execute(filters=None):
if item_list:
item_tax, tax_accounts = get_tax_accounts(item_list, columns)
columns.append({
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Data",
"width": 80
})
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
print company_currency
data = []
for d in item_list:
purchase_receipt = None
@@ -27,14 +35,14 @@ def execute(filters=None):
expense_account = d.expense_account or aii_account_map.get(d.company)
row = [d.item_code, d.item_name, d.item_group, d.parent, d.posting_date, d.supplier,
d.supplier_name, d.credit_to, d.project_name, d.company, d.purchase_order,
d.supplier_name, d.credit_to, d.project, d.company, d.purchase_order,
purchase_receipt, expense_account, d.qty, d.base_net_rate, d.base_net_amount]
for tax in tax_accounts:
row.append(item_tax.get(d.parent, {}).get(d.item_code, {}).get(tax, 0))
total_tax = sum(row[last_col:])
row += [total_tax, d.base_net_amount + total_tax]
row += [total_tax, d.base_net_amount + total_tax, company_currency]
data.append(row)
@@ -48,7 +56,8 @@ def get_columns():
"Supplier Name::120", "Payable Account:Link/Account:120", _("Project") + ":Link/Project:80",
_("Company") + ":Link/Company:100", _("Purchase Order") + ":Link/Purchase Order:100",
_("Purchase Receipt") + ":Link/Purchase Receipt:100", _("Expense Account") + ":Link/Account:140",
_("Qty") + ":Float:120", _("Rate") + ":Currency:120", _("Amount") + ":Currency:120"]
_("Qty") + ":Float:120", _("Rate") + ":Currency/currency:120", _("Amount") + ":Currency/currency:120"
]
def get_conditions(filters):
conditions = ""
@@ -69,7 +78,7 @@ def get_items(filters):
return frappe.db.sql("""select pi_item.parent, pi.posting_date, pi.credit_to, pi.company,
pi.supplier, pi.remarks, pi.base_net_total, pi_item.item_code, pi_item.item_name, pi_item.item_group,
pi_item.project_name, pi_item.purchase_order, pi_item.purchase_receipt, pi_item.po_detail,
pi_item.project, pi_item.purchase_order, pi_item.purchase_receipt, pi_item.po_detail,
pi_item.expense_account, pi_item.qty, pi_item.base_net_rate, pi_item.base_net_amount, pi.supplier_name
from `tabPurchase Invoice` pi, `tabPurchase Invoice Item` pi_item
where pi.name = pi_item.parent and pi.docstatus = 1 %s %s
@@ -110,7 +119,7 @@ def get_tax_accounts(item_list, columns):
(tax_amount * d.base_net_amount) / d.base_net_total
tax_accounts.sort()
columns += [account_head + ":Currency:80" for account_head in tax_accounts]
columns += ["Total Tax:Currency:80", "Total:Currency:80"]
columns += [account_head + ":Currency/currency:80" for account_head in tax_accounts]
columns += ["Total Tax:Currency/currency:80", "Total:Currency/currency:80"]
return item_tax, tax_accounts

View File

@@ -14,7 +14,14 @@ def execute(filters=None):
item_list = get_items(filters)
if item_list:
item_tax, tax_accounts = get_tax_accounts(item_list, columns)
columns.append({
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Data",
"width": 80
})
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
data = []
for d in item_list:
delivery_note = None
@@ -25,14 +32,14 @@ def execute(filters=None):
from `tabDelivery Note Item` where docstatus=1 and so_detail=%s""", d.so_detail))
row = [d.item_code, d.item_name, d.item_group, d.parent, d.posting_date, d.customer, d.customer_name,
d.customer_group, d.debit_to, d.territory, d.project_name, d.company, d.sales_order,
d.customer_group, d.debit_to, d.territory, d.project, d.company, d.sales_order,
delivery_note, d.income_account, d.qty, d.base_net_rate, d.base_net_amount]
for tax in tax_accounts:
row.append(item_tax.get(d.parent, {}).get(d.item_code, {}).get(tax, 0))
total_tax = sum(row[last_col:])
row += [total_tax, d.base_net_amount + total_tax]
row += [total_tax, d.base_net_amount + total_tax, company_currency]
data.append(row)
@@ -48,7 +55,7 @@ def get_columns():
_("Project") + ":Link/Project:80", _("Company") + ":Link/Company:100",
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
_("Income Account") + ":Link/Account:140", _("Qty") + ":Float:120",
_("Rate") + ":Currency:120", _("Amount") + ":Currency:120"
_("Rate") + ":Currency/currency:120", _("Amount") + ":Currency/currency:120"
]
def get_conditions(filters):
@@ -66,7 +73,7 @@ def get_conditions(filters):
def get_items(filters):
conditions = get_conditions(filters)
return frappe.db.sql("""select si_item.parent, si.posting_date, si.debit_to, si.project_name,
return frappe.db.sql("""select si_item.parent, si.posting_date, si.debit_to, si.project,
si.customer, si.remarks, si.territory, si.company, si.base_net_total, si_item.item_code, si_item.item_name,
si_item.item_group, si_item.sales_order, si_item.delivery_note, si_item.income_account,
si_item.qty, si_item.base_net_rate, si_item.base_net_amount, si.customer_name,
@@ -108,7 +115,7 @@ def get_tax_accounts(item_list, columns):
flt((tax_amount * d.base_net_amount) / d.base_net_total)
tax_accounts.sort()
columns += [account_head + ":Currency:80" for account_head in tax_accounts]
columns += ["Total Tax:Currency:80", "Total:Currency:80"]
columns += [account_head + ":Currency/currency:80" for account_head in tax_accounts]
columns += ["Total Tax:Currency/currency:80", "Total:Currency/currency:80"]
return item_tax, tax_accounts

View File

@@ -7,12 +7,12 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2016-02-23 18:48:42.372321",
"modified": "2016-04-01 08:26:43.868609",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Ordered Items To Be Billed",
"owner": "Administrator",
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.base_amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order`.`company` as \"Company:Link/Company:\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Closed\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.amount,0)\norder by `tabSales Order`.transaction_date asc",
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.base_amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order`.`company` as \"Company:Link/Company:\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Closed\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.amount,0)\norder by `tabSales Order`.transaction_date asc",
"ref_doctype": "Sales Invoice",
"report_name": "Ordered Items To Be Billed",
"report_type": "Query Report"

View File

@@ -7,12 +7,12 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2016-02-23 18:51:21.968327",
"modified": "2016-04-01 08:27:32.122070",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Order Items To Be Billed",
"owner": "Administrator",
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t(`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1))) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n\t`tabPurchase Order`.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Closed\"\n\tand (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1)) < ifnull(`tabPurchase Order Item`.base_amount, 0)\norder by `tabPurchase Order`.transaction_date asc",
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t(`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1))) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n\t`tabPurchase Order`.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Closed\"\n\tand (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1)) < ifnull(`tabPurchase Order Item`.base_amount, 0)\norder by `tabPurchase Order`.transaction_date asc",
"ref_doctype": "Purchase Invoice",
"report_name": "Purchase Order Items To Be Billed",
"report_type": "Query Report"

View File

@@ -21,18 +21,20 @@ def execute(filters=None):
invoice_expense_map, expense_accounts)
invoice_po_pr_map = get_invoice_po_pr_map(invoice_list)
supplier_details = get_supplier_deatils(invoice_list)
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
data = []
for inv in invoice_list:
# invoice details
purchase_order = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_order", [])))
purchase_receipt = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_receipt", [])))
project_name = list(set(invoice_po_pr_map.get(inv.name, {}).get("project_name", [])))
project = list(set(invoice_po_pr_map.get(inv.name, {}).get("project", [])))
row = [inv.name, inv.posting_date, inv.supplier, inv.supplier_name,
supplier_details.get(inv.supplier),
inv.credit_to, ", ".join(project_name), inv.bill_no, inv.bill_date, inv.remarks,
", ".join(purchase_order), ", ".join(purchase_receipt)]
inv.credit_to, ", ".join(project), inv.bill_no, inv.bill_date, inv.remarks,
", ".join(purchase_order), ", ".join(purchase_receipt), company_currency]
# map expense values
base_net_total = 0
@@ -62,10 +64,19 @@ def execute(filters=None):
def get_columns(invoice_list):
"""return columns based on filters"""
columns = [
_("Invoice") + ":Link/Purchase Invoice:120", _("Posting Date") + ":Date:80", _("Supplier Id") + "::120",
_("Supplier Name") + "::120", _("Supplier Type") + ":Link/Supplier Type:120", _("Payable Account") + ":Link/Account:120",
_("Project") + ":Link/Project:80", _("Bill No") + "::120", _("Bill Date") + ":Date:80", _("Remarks") + "::150",
_("Purchase Order") + ":Link/Purchase Order:100", _("Purchase Receipt") + ":Link/Purchase Receipt:100"
_("Invoice") + ":Link/Purchase Invoice:120",
_("Posting Date") + ":Date:80", _("Supplier Id") + "::120",
_("Supplier Name") + "::120", _("Supplier Type") + ":Link/Supplier Type:120",
_("Payable Account") + ":Link/Account:120", _("Project") + ":Link/Project:80",
_("Bill No") + "::120", _("Bill Date") + ":Date:80", _("Remarks") + "::150",
_("Purchase Order") + ":Link/Purchase Order:100",
_("Purchase Receipt") + ":Link/Purchase Receipt:100",
{
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Data",
"width": 80
}
]
expense_accounts = tax_accounts = expense_columns = tax_columns = []
@@ -84,14 +95,14 @@ def get_columns(invoice_list):
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]))
expense_columns = [(account + ":Currency:120") for account in expense_accounts]
expense_columns = [(account + ":Currency/currency:120") for account in expense_accounts]
for account in tax_accounts:
if account not in expense_accounts:
tax_columns.append(account + ":Currency:120")
tax_columns.append(account + ":Currency/currency:120")
columns = columns + expense_columns + [_("Net Total") + ":Currency:120"] + tax_columns + \
[_("Total Tax") + ":Currency:120", _("Grand Total") + ":Currency:120",
_("Rounded Total") + ":Currency:120", _("Outstanding Amount") + ":Currency:120"]
columns = columns + expense_columns + [_("Net Total") + ":Currency/currency:120"] + tax_columns + \
[_("Total Tax") + ":Currency/currency:120", _("Grand Total") + ":Currency/currency:120",
_("Rounded Total") + ":Currency/currency:120", _("Outstanding Amount") + ":Currency/currency:120"]
return columns, expense_accounts, tax_accounts
@@ -146,7 +157,7 @@ def get_invoice_tax_map(invoice_list, invoice_expense_map, expense_accounts):
def get_invoice_po_pr_map(invoice_list):
pi_items = frappe.db.sql("""select parent, purchase_order, purchase_receipt, po_detail,
project_name from `tabPurchase Invoice Item` where parent in (%s)
project from `tabPurchase Invoice Item` where parent in (%s)
and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')""" %
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
@@ -166,9 +177,9 @@ def get_invoice_po_pr_map(invoice_list):
if pr_list:
invoice_po_pr_map.setdefault(d.parent, frappe._dict()).setdefault("purchase_receipt", pr_list)
if d.project_name:
if d.project:
invoice_po_pr_map.setdefault(d.parent, frappe._dict()).setdefault(
"project_name", []).append(d.project_name)
"project", []).append(d.project)
return invoice_po_pr_map

View File

@@ -7,12 +7,12 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2015-11-02 12:33:11.681513",
"modified": "2016-04-04 17:27:29.449124",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Received Items To Be Billed",
"owner": "Administrator",
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project_name` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`qty` - ifnull((select sum(qty) from `tabPurchase Invoice Item` \n\t where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n\t `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Qty:Float:110\",\n\t(`tabPurchase Receipt Item`.`base_amount` - ifnull((select sum(base_amount) \n from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and `tabPurchase Receipt`.status != \"Closed\" and \n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n (`tabPurchase Receipt Item`.qty > ifnull((select sum(qty) from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus=1 and \n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\norder by `tabPurchase Receipt`.`name` desc",
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t`tabPurchase Receipt Item`.`billed_amt` as \"Pending Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and `tabPurchase Receipt`.status != \"Closed\" and \n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n `tabPurchase Receipt`.per_billed < 100\norder by `tabPurchase Receipt`.`name` desc",
"ref_doctype": "Purchase Invoice",
"report_name": "Received Items To Be Billed",
"report_type": "Query Report"

View File

@@ -22,6 +22,7 @@ def execute(filters=None):
invoice_so_dn_map = get_invoice_so_dn_map(invoice_list)
customer_map = get_customer_deatils(invoice_list)
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
data = []
for inv in invoice_list:
@@ -32,7 +33,8 @@ def execute(filters=None):
row = [inv.name, inv.posting_date, inv.customer, inv.customer_name,
customer_map.get(inv.customer, {}).get("customer_group"),
customer_map.get(inv.customer, {}).get("territory"),
inv.debit_to, inv.project_name, inv.remarks, ", ".join(sales_order), ", ".join(delivery_note)]
inv.debit_to, inv.project, inv.remarks,
", ".join(sales_order), ", ".join(delivery_note), company_currency]
# map income values
base_net_total = 0
@@ -66,7 +68,13 @@ def get_columns(invoice_list):
_("Invoice") + ":Link/Sales Invoice:120", _("Posting Date") + ":Date:80", _("Customer Id") + "::120",
_("Customer Name") + "::120", _("Customer Group") + ":Link/Customer Group:120", _("Territory") + ":Link/Territory:80",
_("Receivable Account") + ":Link/Account:120", _("Project") +":Link/Project:80", _("Remarks") + "::150",
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100"
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
{
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Data",
"width": 80
}
]
income_accounts = tax_accounts = income_columns = tax_columns = []
@@ -83,14 +91,14 @@ def get_columns(invoice_list):
and parent in (%s) order by account_head""" %
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]))
income_columns = [(account + ":Currency:120") for account in income_accounts]
income_columns = [(account + ":Currency/currency:120") for account in income_accounts]
for account in tax_accounts:
if account not in income_accounts:
tax_columns.append(account + ":Currency:120")
tax_columns.append(account + ":Currency/currency:120")
columns = columns + income_columns + [_("Net Total") + ":Currency:120"] + tax_columns + \
[_("Total Tax") + ":Currency:120", _("Grand Total") + ":Currency:120",
_("Rounded Total") + ":Currency:120", _("Outstanding Amount") + ":Currency:120"]
columns = columns + income_columns + [_("Net Total") + ":Currency/currency:120"] + tax_columns + \
[_("Total Tax") + ":Currency/currency:120", _("Grand Total") + ":Currency/currency:120",
_("Rounded Total") + ":Currency/currency:120", _("Outstanding Amount") + ":Currency/currency:120"]
return columns, income_accounts, tax_accounts
@@ -107,7 +115,7 @@ def get_conditions(filters):
def get_invoices(filters):
conditions = get_conditions(filters)
return frappe.db.sql("""select name, posting_date, debit_to, project_name, customer,
return frappe.db.sql("""select name, posting_date, debit_to, project, customer,
customer_name, remarks, base_net_total, base_grand_total, base_rounded_total, outstanding_amount
from `tabSales Invoice`
where docstatus = 1 %s order by posting_date desc, name desc""" %

View File

@@ -4,8 +4,9 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import cint, flt, getdate, formatdate, cstr
from erpnext.accounts.report.financial_statements import filter_accounts, set_gl_entries_by_account
from frappe.utils import flt, getdate, formatdate, cstr
from erpnext.accounts.report.financial_statements \
import filter_accounts, set_gl_entries_by_account, filter_out_zero_value_rows
value_fields = ("opening_debit", "opening_credit", "debit", "credit", "closing_debit", "closing_credit")
@@ -56,7 +57,7 @@ def get_data(filters):
if not accounts:
return None
accounts, accounts_by_name = filter_accounts(accounts)
accounts, accounts_by_name, parent_children_map = filter_accounts(accounts)
min_lft, max_rgt = frappe.db.sql("""select min(lft), max(rgt) from `tabAccount`
where company=%s""", (filters.company,))[0]
@@ -71,8 +72,10 @@ def get_data(filters):
total_row = calculate_values(accounts, gl_entries_by_account, opening_balances, filters)
accumulate_values_into_parents(accounts, accounts_by_name)
data = prepare_data(accounts, filters, total_row)
data = prepare_data(accounts, filters, total_row, parent_children_map)
data = filter_out_zero_value_rows(data, parent_children_map,
show_zero_values=filters.get("show_zero_values"))
return data
def get_opening_balances(filters):
@@ -156,10 +159,8 @@ def accumulate_values_into_parents(accounts, accounts_by_name):
for key in value_fields:
accounts_by_name[d.parent_account][key] += d[key]
def prepare_data(accounts, filters, total_row):
show_zero_values = cint(filters.show_zero_values)
def prepare_data(accounts, filters, total_row, parent_children_map):
data = []
accounts_with_zero_value = []
for d in accounts:
has_value = False
row = {
@@ -174,18 +175,15 @@ def prepare_data(accounts, filters, total_row):
prepare_opening_and_closing(d)
for key in value_fields:
row[key] = d.get(key, 0.0)
if row[key]:
row[key] = flt(d.get(key, 0.0), 3)
if abs(row[key]) >= 0.005:
# ignore zero values
has_value = True
if show_zero_values:
data.append(row)
else:
if not has_value:
accounts_with_zero_value.append(d.name)
elif d.parent_account not in accounts_with_zero_value:
data.append(row)
row["has_value"] = has_value
data.append(row)
data.extend([{},total_row])
return data

View File

@@ -16,10 +16,10 @@ class FiscalYearError(frappe.ValidationError): pass
class BudgetError(frappe.ValidationError): pass
@frappe.whitelist()
def get_fiscal_year(date=None, fiscal_year=None, label="Date", verbose=1, company=None):
return get_fiscal_years(date, fiscal_year, label, verbose, company)[0]
def get_fiscal_year(date=None, fiscal_year=None, label="Date", verbose=1, company=None, as_dict=False):
return get_fiscal_years(date, fiscal_year, label, verbose, company, as_dict=as_dict)[0]
def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verbose=1, company=None):
def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verbose=1, company=None, as_dict=False):
# if year start date is 2012-04-01, year end date should be 2013-03-31 (hence subdate)
cond = " disabled = 0"
if fiscal_year:
@@ -36,10 +36,10 @@ def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verb
"fiscal_year": fiscal_year,
"transaction_date": transaction_date,
"company": company
})
}, as_dict=as_dict)
if not fy:
error_msg = _("""{0} {1} not in any active Fiscal Year. For more details check {2}.""").format(label, formatdate(transaction_date), "https://erpnext.com/kb/accounts/fiscal-year-error")
error_msg = _("""{0} {1} not in any active Fiscal Year. For more details check {2}.""").format(label, formatdate(transaction_date), "https://frappe.github.io/erpnext/user/manual/en/accounts/articles/fiscal-year-error")
if verbose==1: frappe.msgprint(error_msg)
raise FiscalYearError, error_msg
return fy
@@ -106,7 +106,7 @@ def get_balance_on(account=None, date=None, party_type=None, party=None, in_acco
in_account_currency = False
else:
cond.append("""gle.account = "%s" """ % (frappe.db.escape(account, percent=False), ))
if party_type and party:
cond.append("""gle.party_type = "%s" and gle.party = "%s" """ %
(frappe.db.escape(party_type), frappe.db.escape(party, percent=False)))
@@ -479,7 +479,7 @@ def get_outstanding_invoices(party_type, party, account, condition=None):
return outstanding_invoices
def get_account(account_type=None, root_type=None, is_group=None, account_currency=None, company=None):
def get_account_name(account_type=None, root_type=None, is_group=None, account_currency=None, company=None):
"""return account based on matching conditions"""
return frappe.db.get_value("Account", {
"account_type": account_type or '',
@@ -488,4 +488,3 @@ def get_account(account_type=None, root_type=None, is_group=None, account_curren
"account_currency": account_currency or frappe.defaults.get_defaults().currency,
"company": company or frappe.defaults.get_defaults().company
}, "name")

View File

@@ -142,14 +142,14 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
}
},
project_name: function(doc, cdt, cdn) {
project: function(doc, cdt, cdn) {
var item = frappe.get_doc(cdt, cdn);
if(item.project_name) {
if(item.project) {
$.each(this.frm.doc["items"] || [],
function(i, other_item) {
if(!other_item.project_name) {
other_item.project_name = item.project_name;
refresh_field("project_name", other_item.name, other_item.parentfield);
if(!other_item.project) {
other_item.project = item.project;
refresh_field("project", other_item.name, other_item.parentfield);
}
});
}
@@ -170,10 +170,35 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
this.frm.add_custom_button(__("Product Bundle"), function() {
erpnext.buying.get_items_from_product_bundle(me.frm);
}, __("Get items from"));
},
shipping_address: function(){
var me = this;
this.frm.set_query("shipping_address", function(){
if(me.frm.doc.customer){
return{
filters:{
"customer": me.frm.doc.customer
}
}
}
else{
return{
filters:{
"is_your_company_address": 1,
"company": me.frm.doc.company
}
}
}
});
erpnext.utils.get_address_display(this.frm, "shipping_address",
"shipping_address_display", is_your_company_address=true)
}
});
cur_frm.add_fetch('project_name', 'cost_center', 'cost_center');
cur_frm.add_fetch('project', 'cost_center', 'cost_center');
erpnext.buying.get_default_bom = function(frm) {
$.each(frm.doc["items"] || [], function(i, d) {

View File

@@ -43,11 +43,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) {
cur_frm.add_custom_button(__('Close'), this.close_purchase_order, __("Status"));
}
}
if(is_drop_ship && doc.status!="Delivered"){
cur_frm.add_custom_button(__('Delivered'),
this.delivered_by_supplier, __("Status"));
@@ -243,7 +240,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
}
}
cur_frm.fields_dict['items'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
cur_frm.fields_dict['items'].grid.get_field('project').get_query = function(doc, cdt, cdn) {
return {
filters:[
['Project', 'status', 'not in', 'Completed, Cancelled']

View File

@@ -191,104 +191,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "",
"fieldname": "address_display",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_display",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_mobile",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mobile No",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_email",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Email",
"length": 0,
"no_copy": 0,
"options": "Email",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -499,33 +401,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "",
"fieldname": "customer_address",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Customer Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -553,31 +428,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "customer_address_display",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Customer Address Display",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -654,6 +504,254 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_addresses",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address and Contact",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "supplier_address",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Select Supplier Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_person",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Contact Person",
"length": 0,
"no_copy": 0,
"options": "Contact",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "",
"fieldname": "address_display",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_display",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_mobile",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mobile No",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_email",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Email",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break_address",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "",
"fieldname": "shipping_address",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Select Shipping Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "shipping_address_display",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Shipping Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1845,105 +1943,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"depends_on": "supplier",
"fieldname": "contact_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Details",
"length": 0,
"no_copy": 0,
"options": "icon-bullhorn",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "supplier_address",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Supplier Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "cb_contact",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_person",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Contact Person",
"length": 0,
"no_copy": 0,
"options": "Contact",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1997,33 +1996,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -2396,7 +2368,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
@@ -2502,7 +2474,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
@@ -2518,7 +2490,7 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
@@ -2685,7 +2657,7 @@
"unique": 0
},
{
"allow_on_submit": 1,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
@@ -2703,7 +2675,7 @@
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -2721,7 +2693,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-03-02 07:12:18.785730",
"modified": "2016-03-21 13:13:07.334625",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",

View File

@@ -58,7 +58,7 @@ class PurchaseOrder(BuyingController):
},
"Supplier Quotation Item": {
"ref_dn_field": "supplier_quotation_item",
"compare_fields": [["rate", "="], ["project_name", "="], ["item_code", "="]],
"compare_fields": [["rate", "="], ["project", "="], ["item_code", "="]],
"is_child_table": True
}
})
@@ -171,8 +171,6 @@ class PurchaseOrder(BuyingController):
if self.is_against_so():
self.update_status_updater()
super(PurchaseOrder, self).on_submit()
purchase_controller = frappe.get_doc("Purchase Common")
self.update_prevdoc_status()

View File

@@ -6,7 +6,6 @@
"conversion_rate": 1.0,
"currency": "INR",
"doctype": "Purchase Order",
"fiscal_year": "_Test Fiscal Year 2013",
"base_grand_total": 5000.0,
"grand_total": 5000.0,
"is_subcontracted": "Yes",
@@ -40,7 +39,6 @@
"conversion_rate": 1.0,
"currency": "INR",
"doctype": "Purchase Order",
"fiscal_year": "_Test Fiscal Year 2013",
"base_grand_total": 5000.0,
"grand_total": 5000.0,
"is_subcontracted": "No",

View File

@@ -934,14 +934,14 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "project_name",
"fieldname": "project",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Project Name",
"label": "Project",
"length": 0,
"no_copy": 0,
"options": "Project",
@@ -1384,7 +1384,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-02-22 09:33:02.405537",
"modified": "2016-03-18 05:08:54.505417",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order Item",

View File

@@ -46,7 +46,7 @@ cur_frm.cscript.uom = function(doc, cdt, cdn) {
// no need to trigger updation of stock uom, as this field doesn't exist in supplier quotation
}
cur_frm.fields_dict['items'].grid.get_field('project_name').get_query =
cur_frm.fields_dict['items'].grid.get_field('project').get_query =
function(doc, cdt, cdn) {
return{
filters:[

View File

@@ -139,103 +139,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "address_display",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_display",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_mobile",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mobile No",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_email",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Email",
"length": 0,
"no_copy": 0,
"options": "Email",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -343,6 +246,178 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "address_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address and Contact",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "supplier_address",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Supplier Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_person",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Contact Person",
"length": 0,
"no_copy": 0,
"options": "Contact",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "address_display",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_display",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_mobile",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mobile No",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_email",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Email",
"length": 0,
"no_copy": 0,
"options": "Email",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1487,82 +1562,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"depends_on": "supplier",
"fieldname": "contact_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Details",
"length": 0,
"no_copy": 0,
"options": "icon-bullhorn",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "supplier_address",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Supplier Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_person",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Contact Person",
"length": 0,
"no_copy": 0,
"options": "Contact",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1720,32 +1719,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "No",
"fieldname": "is_subcontracted",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Subcontracted",
"length": 0,
"no_copy": 0,
"options": "\nYes\nNo",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1773,26 +1746,25 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"default": "No",
"fieldname": "is_subcontracted",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_list_view": 0,
"label": "Fiscal Year",
"label": "Is Subcontracted",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "Fiscal Year",
"options": "\nYes\nNo",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
@@ -1808,7 +1780,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-03-02 05:09:20.534046",
"modified": "2016-03-16 15:36:05.481917",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation",

View File

@@ -5,7 +5,6 @@
"conversion_rate": 1.0,
"currency": "INR",
"doctype": "Supplier Quotation",
"fiscal_year": "_Test Fiscal Year 2013",
"base_grand_total": 5000.0,
"grand_total": 5000.0,
"is_subcontracted": "No",

View File

@@ -803,14 +803,14 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "project_name",
"fieldname": "project",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Project Name",
"label": "Project",
"length": 0,
"no_copy": 0,
"options": "Project",
@@ -1046,7 +1046,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-02-22 09:36:18.864207",
"modified": "2016-03-18 05:15:03.936587",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation Item",

File diff suppressed because one or more lines are too long

View File

@@ -7,12 +7,12 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2016-02-22 11:27:39.445257",
"modified": "2016-04-01 08:26:52.361800",
"modified_by": "Administrator",
"module": "Buying",
"name": "Item-wise Purchase History",
"owner": "Administrator",
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n po_item.item_group as \"Item Group:Link/Item Group:120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n sup.supplier_name as \"Supplier Name::150\",\n\tpo_item.project_name as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item, `tabSupplier` sup\nwhere\n\tpo.name = po_item.parent and po.supplier = sup.name and po.docstatus = 1\norder by po.name desc",
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n po_item.item_group as \"Item Group:Link/Item Group:120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n sup.supplier_name as \"Supplier Name::150\",\n\tpo_item.project as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item, `tabSupplier` sup\nwhere\n\tpo.name = po_item.parent and po.supplier = sup.name and po.docstatus = 1\norder by po.name desc",
"ref_doctype": "Purchase Order",
"report_name": "Item-wise Purchase History",
"report_type": "Query Report"

View File

@@ -0,0 +1,5 @@
- Improved logic to hide accounts with zero values in Balance Sheet and Profit & Loss
- Item Code or Warehouse filter mandatory in Stock Balance Report
- For Item table print, combine Item Code, Item Name, Description and additional columns in Description only if **Compact Item Print** is checked in **Features Setup**
- **Disable 'In Words'** from all documents via Setup > Global Settings
- Bug fix: Paid Amount in POS view when the default Mode of Payment is not Cash

View File

@@ -0,0 +1,5 @@
- Fiscal Year has been removed from Transactions
- Holiday List based on From Date and To Date
- Valuation Rate and Gross Profit in Sales Order Item row
- Shopify sync status will be logged in Shopify Log
- Item Code or Warehouse filter mandatory in Stock Balance Report, if number of Stock Ledger Entries is greater than 500000

View File

@@ -0,0 +1,3 @@
- New Grouping in Module Pages
- Shipping Address in purchase cycle
- Improved Leave Application workflow

View File

@@ -4,14 +4,8 @@ from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"icon": "icon-star",
"label": _("Billing"),
"items": [
{
"type": "doctype",
"name": "Journal Entry",
"description": _("Accounting journal entries.")
},
{
"type": "doctype",
"name": "Sales Invoice",
@@ -22,6 +16,59 @@ def get_data():
"name": "Purchase Invoice",
"description": _("Bills raised by Suppliers.")
},
{
"type": "doctype",
"name": "Payment Request",
"description": _("Payment Request")
},
{
"type": "report",
"name": "Accounts Receivable",
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Accounts Payable",
"doctype": "Purchase Invoice",
"is_query_report": True
},
]
},
{
"label": _("Company and Accounts"),
"items": [
{
"type": "doctype",
"name": "Company",
"description": _("Company (not Customer or Supplier) master.")
},
{
"type": "doctype",
"name": "Journal Entry",
"description": _("Accounting journal entries.")
},
{
"type": "page",
"name": "Accounts Browser",
"icon": "icon-sitemap",
"label": _("Chart of Accounts"),
"route": "Accounts Browser/Account",
"description": _("Tree of financial accounts."),
"doctype": "Account",
},
{
"type": "report",
"name":"General Ledger",
"doctype": "GL Entry",
"is_query_report": True,
},
]
},
{
"label": _("Masters"),
"items": [
{
"type": "doctype",
"name": "Customer",
@@ -34,93 +81,76 @@ def get_data():
},
{
"type": "doctype",
"name": "Payment Request",
"description": _("Payment Request")
},
{
"type": "page",
"name": "Accounts Browser",
"icon": "icon-sitemap",
"label": _("Chart of Accounts"),
"route": "Accounts Browser/Account",
"description": _("Tree of financial accounts."),
"doctype": "Account",
"name": "Item",
},
]
},
{
"label": _("Tools"),
"icon": "icon-wrench",
"label": _("Accounting Statements"),
"items": [
{
"type": "doctype",
"name": "Bank Reconciliation",
"description": _("Update bank payment dates with journals.")
"type": "report",
"name": "Trial Balance",
"doctype": "GL Entry",
"is_query_report": True,
},
{
"type": "doctype",
"name": "Payment Reconciliation",
"description": _("Match non-linked Invoices and Payments.")
"type": "report",
"name": "Balance Sheet",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "doctype",
"name": "Period Closing Voucher",
"description": _("Close Balance Sheet and book Profit or Loss.")
"type": "report",
"name": "Cash Flow",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Profit and Loss Statement",
"doctype": "GL Entry",
"is_query_report": True
},
]
},
{
"label": _("Banking and Payments"),
"items": [
{
"type": "doctype",
"name": "Payment Tool",
"description": _("Create Payment Entries against Orders or Invoices.")
},
{
"type": "doctype",
"label": _("Update Bank Transaction Dates"),
"name": "Bank Reconciliation",
"description": _("Update bank payment dates with journals.")
},
{
"type": "doctype",
"label": _("Match Payments with Invoices"),
"name": "Payment Reconciliation",
"description": _("Match non-linked Invoices and Payments.")
},
{
"type": "report",
"name": "Bank Reconciliation Statement",
"is_query_report": True,
"doctype": "Journal Entry"
},
{
"type": "report",
"name": "Bank Clearance Summary",
"is_query_report": True,
"doctype": "Journal Entry"
},
]
},
{
"label": _("Setup"),
"icon": "icon-cog",
"label": _("Taxes"),
"items": [
{
"type": "doctype",
"name": "Company",
"description": _("Company (not Customer or Supplier) master.")
},
{
"type": "doctype",
"name": "Fiscal Year",
"description": _("Financial / accounting year.")
},
{
"type": "doctype",
"name": "Payment Gateway Account",
"description": _("Setup Gateway accounts.")
},
{
"type": "page",
"name": "Accounts Browser",
"icon": "icon-sitemap",
"label": _("Chart of Accounts"),
"route": "Accounts Browser/Account",
"description": _("Tree of financial accounts."),
"doctype": "Account",
},
{
"type": "page",
"name": "Accounts Browser",
"icon": "icon-sitemap",
"label": _("Chart of Cost Centers"),
"route": "Accounts Browser/Cost Center",
"description": _("Tree of financial Cost Centers."),
"doctype": "Cost Center",
},
{
"type": "doctype",
"name": "Accounts Settings",
"description": _("Default settings for accounting transactions.")
},
{
"type": "doctype",
"name": "Tax Rule",
"description": _("Tax Rule for transactions.")
},
{
"type": "doctype",
"name": "Sales Taxes and Charges Template",
@@ -133,19 +163,71 @@ def get_data():
},
{
"type": "doctype",
"name": "POS Profile",
"label": _("Point-of-Sale Profile"),
"description": _("Rules to calculate shipping amount for a sale")
"name": "Tax Rule",
"description": _("Tax Rule for transactions.")
},
{
"type": "report",
"name": "Sales Register",
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Purchase Register",
"doctype": "Purchase Invoice",
"is_query_report": True
},
]
},
{
"label": _("Budget and Cost Center"),
"items": [
{
"type": "page",
"name": "Accounts Browser",
"icon": "icon-sitemap",
"label": _("Chart of Cost Centers"),
"route": "Accounts Browser/Cost Center",
"description": _("Tree of financial Cost Centers."),
"doctype": "Cost Center",
},
{
"type": "report",
"name": "Budget Variance Report",
"is_query_report": True,
"doctype": "Cost Center"
},
{
"type":"doctype",
"name": "Monthly Distribution",
"description": _("Seasonality for setting budgets, targets etc.")
},
]
},
{
"label": _("Tools"),
"items": [
{
"type": "doctype",
"name": "Period Closing Voucher",
"description": _("Close Balance Sheet and book Profit or Loss.")
},
]
},
{
"label": _("Setup"),
"icon": "icon-cog",
"items": [
{
"type": "doctype",
"name": "Accounts Settings",
"description": _("Default settings for accounting transactions.")
},
{
"type": "doctype",
"name": "Shipping Rule",
"description": _("Rules for adding shipping costs.")
},
{
"type": "doctype",
"name": "Pricing Rule",
"description": _("Rules for applying pricing and discount.")
"name": "Fiscal Year",
"description": _("Financial / accounting year.")
},
{
"type": "doctype",
@@ -158,9 +240,15 @@ def get_data():
"description": _("Currency exchange rate master.")
},
{
"type":"doctype",
"name": "Monthly Distribution",
"description": _("Seasonality for setting budgets, targets etc.")
"type": "doctype",
"name": "Payment Gateway Account",
"description": _("Setup Gateway accounts.")
},
{
"type": "doctype",
"name": "POS Profile",
"label": _("Point-of-Sale Profile"),
"description": _("Rules to calculate shipping amount for a sale")
},
{
"type": "doctype",
@@ -182,93 +270,8 @@ def get_data():
]
},
{
"label": _("Main Reports"),
"icon": "icon-table",
"label": _("To Bill"),
"items": [
{
"type": "report",
"name":"General Ledger",
"doctype": "GL Entry",
"is_query_report": True,
},
{
"type": "report",
"name": "Trial Balance",
"doctype": "GL Entry",
"is_query_report": True,
},
{
"type": "report",
"name": "Trial Balance for Party",
"doctype": "GL Entry",
"is_query_report": True,
},
{
"type": "report",
"name": "Gross Profit",
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Accounts Receivable",
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Accounts Payable",
"doctype": "Purchase Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Sales Register",
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Purchase Register",
"doctype": "Purchase Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Balance Sheet",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Cash Flow",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Profit and Loss Statement",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "page",
"name": "financial-analytics",
"label": _("Financial Analytics"),
"icon": "icon-bar-chart",
}
]
},
{
"label": _("Standard Reports"),
"icon": "icon-list",
"items": [
{
"type": "report",
"name": "Bank Reconciliation Statement",
"is_query_report": True,
"doctype": "Journal Entry"
},
{
"type": "report",
"name": "Ordered Items To Be Billed",
@@ -293,11 +296,47 @@ def get_data():
"is_query_report": True,
"doctype": "Purchase Invoice"
},
]
},
{
"label": _("Analytics"),
"items": [
{
"type": "page",
"name": "financial-analytics",
"label": _("Financial Analytics"),
"icon": "icon-bar-chart",
},
{
"type": "report",
"name": "Bank Clearance Summary",
"name": "Gross Profit",
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Purchase Invoice Trends",
"is_query_report": True,
"doctype": "Purchase Invoice"
},
{
"type": "report",
"name": "Sales Invoice Trends",
"is_query_report": True,
"doctype": "Sales Invoice"
},
]
},
{
"label": _("Other Reports"),
"icon": "icon-table",
"items": [
{
"type": "report",
"name": "Trial Balance for Party",
"doctype": "GL Entry",
"is_query_report": True,
"doctype": "Journal Entry"
},
{
"type": "report",
@@ -323,24 +362,6 @@ def get_data():
"is_query_report": True,
"doctype": "Purchase Invoice"
},
{
"type": "report",
"name": "Budget Variance Report",
"is_query_report": True,
"doctype": "Cost Center"
},
{
"type": "report",
"name": "Purchase Invoice Trends",
"is_query_report": True,
"doctype": "Purchase Invoice"
},
{
"type": "report",
"name": "Sales Invoice Trends",
"is_query_report": True,
"doctype": "Sales Invoice"
},
{
"type": "report",
"name": "Accounts Receivable Summary",

View File

@@ -4,14 +4,9 @@ from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"label": _("Purchasing"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"name": "Supplier",
"description": _("Supplier database."),
},
{
"type": "doctype",
"name": "Material Request",
@@ -27,6 +22,21 @@ def get_data():
"name": "Purchase Order",
"description": _("Purchase Orders given to Suppliers."),
},
]
},
{
"label": _("Supplier"),
"items": [
{
"type": "doctype",
"name": "Supplier",
"description": _("Supplier database."),
},
{
"type": "doctype",
"name": "Supplier Type",
"description": _("Supplier Type master.")
},
{
"type": "doctype",
"name": "Contact",
@@ -37,11 +47,7 @@ def get_data():
"name": "Address",
"description": _("All Addresses."),
},
{
"type": "doctype",
"name": "Item",
"description": _("All Products or Services."),
},
]
},
{
@@ -53,20 +59,6 @@ def get_data():
"name": "Buying Settings",
"description": _("Default settings for buying transactions.")
},
{
"type": "doctype",
"name": "Supplier Type",
"description": _("Supplier Type master.")
},
{
"type": "page",
"name": "Sales Browser",
"icon": "icon-sitemap",
"label": _("Item Group Tree"),
"link": "Sales Browser/Item Group",
"description": _("Tree of Item Groups."),
"doctype": "Item Group",
},
{
"type": "doctype",
"name":"Terms and Conditions",
@@ -78,11 +70,35 @@ def get_data():
"name": "Purchase Taxes and Charges Template",
"description": _("Tax template for buying transactions.")
},
]
},
{
"label": _("Items and Pricing"),
"items": [
{
"type": "doctype",
"name": "Item",
"description": _("All Products or Services."),
},
{
"type": "doctype",
"name": "Product Bundle",
"description": _("Bundle items at time of sale."),
},
{
"type": "doctype",
"name": "Price List",
"description": _("Price List master.")
},
{
"type": "page",
"name": "Sales Browser",
"icon": "icon-sitemap",
"label": _("Item Group"),
"link": "Sales Browser/Item Group",
"description": _("Tree of Item Groups."),
"doctype": "Item Group",
},
{
"type": "doctype",
"name": "Item Price",
@@ -94,10 +110,11 @@ def get_data():
"name": "Pricing Rule",
"description": _("Rules for applying pricing and discount.")
},
]
},
{
"label": _("Main Reports"),
"label": _("Analytics"),
"icon": "icon-table",
"items": [
{
@@ -106,10 +123,22 @@ def get_data():
"label": _("Purchase Analytics"),
"icon": "icon-bar-chart",
},
{
"type": "report",
"is_query_report": True,
"name": "Supplier-Wise Sales Analytics",
"doctype": "Stock Ledger Entry"
},
{
"type": "report",
"is_query_report": True,
"name": "Purchase Order Trends",
"doctype": "Purchase Order"
},
]
},
{
"label": _("Standard Reports"),
"label": _("Other Reports"),
"icon": "icon-list",
"items": [
{
@@ -136,24 +165,12 @@ def get_data():
"name": "Item-wise Purchase History",
"doctype": "Item"
},
{
"type": "report",
"is_query_report": True,
"name": "Purchase Order Trends",
"doctype": "Purchase Order"
},
{
"type": "report",
"is_query_report": True,
"name": "Supplier Addresses and Contacts",
"doctype": "Supplier"
},
{
"type": "report",
"is_query_report": True,
"name": "Supplier-Wise Sales Analytics",
"doctype": "Stock Ledger Entry"
}
]
},
{

View File

@@ -3,7 +3,7 @@ from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"label": _("Sales Pipeline"),
"icon": "icon-star",
"items": [
{
@@ -13,19 +13,55 @@ def get_data():
},
{
"type": "doctype",
"name": "Customer",
"description": _("Customer database."),
"name": "Opportunity",
"description": _("Potential opportunities for selling."),
},
{
"type": "doctype",
"name": "Opportunity",
"description": _("Potential opportunities for selling."),
"name": "Customer",
"description": _("Customer database."),
},
{
"type": "doctype",
"name": "Contact",
"description": _("All Contacts."),
},
]
},
{
"label": _("Reports"),
"icon": "icon-list",
"items": [
{
"type": "page",
"name": "sales-funnel",
"label": _("Sales Funnel"),
"icon": "icon-bar-chart",
},
{
"type": "report",
"is_query_report": True,
"name": "Lead Details",
"doctype": "Lead"
},
{
"type": "report",
"is_query_report": True,
"name": "Customer Addresses and Contacts",
"doctype": "Contact"
},
{
"type": "report",
"is_query_report": True,
"name": "Inactive Customers",
"doctype": "Sales Order"
},
]
},
{
"label": _("Communication"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"name": "Newsletter",
@@ -38,22 +74,6 @@ def get_data():
},
]
},
{
"label": _("Tools"),
"icon": "icon-wrench",
"items": [
{
"type": "doctype",
"name": "SMS Center",
"description":_("Send mass SMS to your contacts"),
},
{
"type": "doctype",
"name": "SMS Log",
"description":_("Logs for maintaining sms delivery status"),
}
]
},
{
"label": _("Setup"),
"icon": "icon-cog",
@@ -95,47 +115,27 @@ def get_data():
"name": "Newsletter List",
"description": _("Newsletter Mailing List"),
},
]
},
{
"label": _("SMS"),
"icon": "icon-wrench",
"items": [
{
"type": "doctype",
"name": "SMS Center",
"description":_("Send mass SMS to your contacts"),
},
{
"type": "doctype",
"name": "SMS Log",
"description":_("Logs for maintaining sms delivery status"),
},
{
"type": "doctype",
"name": "SMS Settings",
"description": _("Setup SMS gateway settings")
},
]
},
{
"label": _("Main Reports"),
"icon": "icon-table",
"items": [
{
"type": "page",
"name": "sales-funnel",
"label": _("Sales Funnel"),
"icon": "icon-bar-chart",
},
]
},
{
"label": _("Standard Reports"),
"icon": "icon-list",
"items": [
{
"type": "report",
"is_query_report": True,
"name": "Lead Details",
"doctype": "Lead"
},
{
"type": "report",
"is_query_report": True,
"name": "Customer Addresses and Contacts",
"doctype": "Contact"
},
{
"type": "report",
"is_query_report": True,
"name": "Customers Not Buying Since Long Time",
"doctype": "Sales Order"
},
}
]
},
{

View File

@@ -9,6 +9,13 @@ def get_data():
"icon": "octicon octicon-repo",
"type": "module"
},
{
"module_name": "Stock",
"color": "#f39c12",
"icon": "icon-truck",
"icon": "octicon octicon-package",
"type": "module"
},
{
"module_name": "CRM",
"color": "#EF4DB6",
@@ -60,13 +67,6 @@ def get_data():
"icon": "octicon octicon-rocket",
"type": "module"
},
{
"module_name": "Stock",
"color": "#f39c12",
"icon": "icon-truck",
"icon": "octicon octicon-package",
"type": "module"
},
{
"module_name": "Support",
"color": "#2c3e50",

View File

@@ -4,8 +4,7 @@ from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"icon": "icon-star",
"label": _("Employee and Attendance"),
"items": [
{
"type": "doctype",
@@ -14,13 +13,10 @@ def get_data():
},
{
"type": "doctype",
"name": "Leave Application",
"description": _("Applications for leave."),
},
{
"type": "doctype",
"name": "Expense Claim",
"description": _("Claims for company expense."),
"name": "Employee Attendance Tool",
"label": _("Employee Attendance Tool"),
"description":_("Mark Employee Attendance in Bulk"),
"hide_count": True
},
{
"type": "doctype",
@@ -29,14 +25,15 @@ def get_data():
},
{
"type": "doctype",
"name": "Salary Slip",
"description": _("Monthly salary statement."),
},
{
"type": "doctype",
"name": "Appraisal",
"description": _("Performance appraisal."),
"name": "Upload Attendance",
"description":_("Upload attendance from a .csv file"),
"hide_count": True
},
]
},
{
"label": _("Recruitment"),
"items": [
{
"type": "doctype",
"name": "Job Applicant",
@@ -55,21 +52,50 @@ def get_data():
]
},
{
"label": _("Tools"),
"icon": "icon-wrench",
"label": _("Leaves and Holiday"),
"items": [
{
"type": "doctype",
"name": "Employee Attendance Tool",
"label": _("Employee Attendance Tool"),
"description":_("Mark Employee Attendance in Bulk"),
"name": "Leave Application",
"description": _("Applications for leave."),
},
{
"type": "doctype",
"name":"Leave Type",
"description": _("Type of leaves like casual, sick etc."),
},
{
"type": "doctype",
"name": "Holiday List",
"description": _("Holiday master.")
},
{
"type": "doctype",
"name": "Leave Allocation",
"description": _("Allocate leaves for a period.")
},
{
"type": "doctype",
"name": "Leave Control Panel",
"label": _("Leave Allocation Tool"),
"description":_("Allocate leaves for the year."),
"hide_count": True
},
{
"type": "doctype",
"name": "Upload Attendance",
"description":_("Upload attendance from a .csv file"),
"hide_count": True
"name": "Leave Block List",
"description": _("Block leave applications by department.")
},
]
},
{
"label": _("Payroll"),
"items": [
{
"type": "doctype",
"name": "Salary Slip",
"description": _("Monthly salary statement."),
},
{
"type": "doctype",
@@ -78,14 +104,60 @@ def get_data():
"description":_("Generate Salary Slips"),
"hide_count": True
},
{
"type": "doctype",
"name": "Leave Control Panel",
"label": _("Leave Allocation Tool"),
"description":_("Allocate leaves for the year."),
"hide_count": True
"name": "Salary Structure",
"description": _("Salary template master.")
},
{
"type": "doctype",
"name": "Earning Type",
"description": _("Salary components.")
},
{
"type": "doctype",
"name": "Deduction Type",
"description": _("Tax and other salary deductions.")
},
]
},
{
"label": _("Expense Claims"),
"items": [
{
"type": "doctype",
"name": "Expense Claim",
"description": _("Claims for company expense."),
},
{
"type": "doctype",
"name": "Expense Claim Type",
"description": _("Types of Expense Claim.")
},
]
},
{
"label": _("Appraisals"),
"items": [
{
"type": "doctype",
"name": "Appraisal",
"description": _("Performance appraisal."),
},
{
"type": "doctype",
"name": "Appraisal Template",
"description": _("Template for performance appraisals.")
},
]
},
{
"label": _("Tools"),
"icon": "icon-wrench",
"items": [
]
},
{
@@ -117,60 +189,10 @@ def get_data():
"name": "Designation",
"description": _("Employee designation (e.g. CEO, Director etc.).")
},
{
"type": "doctype",
"name": "Salary Structure",
"description": _("Salary template master.")
},
{
"type": "doctype",
"name": "Earning Type",
"description": _("Salary components.")
},
{
"type": "doctype",
"name": "Deduction Type",
"description": _("Tax and other salary deductions.")
},
{
"type": "doctype",
"name": "Leave Allocation",
"description": _("Allocate leaves for a period.")
},
{
"type": "doctype",
"name":"Leave Type",
"description": _("Type of leaves like casual, sick etc."),
},
{
"type": "doctype",
"name": "Holiday List",
"description": _("Holiday master.")
},
{
"type": "doctype",
"name": "Leave Block List",
"description": _("Block leave applications by department.")
},
{
"type": "doctype",
"name": "Appraisal Template",
"description": _("Template for performance appraisals.")
},
{
"type": "doctype",
"name": "Expense Claim Type",
"description": _("Types of Expense Claim.")
},
{
"type": "doctype",
"name": "Email Account",
"description": _("Setup incoming server for jobs email id. (e.g. jobs@example.com)")
},
]
},
{
"label": _("Standard Reports"),
"label": _("Reports"),
"icon": "icon-list",
"items": [
{

View File

@@ -4,25 +4,48 @@ from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"label": _("Production"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"name": "BOM",
"description": _("Bill of Materials (BOM)"),
"label": _("Bill of Material")
},
{
"type": "doctype",
"name": "Production Order",
"description": _("Orders released for production."),
},
{
"type": "doctype",
"name": "Production Planning Tool",
"description": _("Generate Material Requests (MRP) and Production Orders."),
},
{
"type": "doctype",
"name": "Stock Entry",
},
{
"type": "doctype",
"name": "Time Log",
"description": _("Time Logs for manufacturing."),
},
]
},
{
"label": _("Bill of Materials"),
"items": [
{
"type": "doctype",
"name": "BOM",
"description": _("Bill of Materials (BOM)"),
"label": _("Bill of Materials")
},
{
"type": "page",
"name": "bom-browser",
"icon": "icon-sitemap",
"label": _("BOM Browser"),
"description": _("Tree of Bill of Materials"),
"doctype": "BOM"
},
{
"type": "doctype",
"name": "Item",
@@ -45,24 +68,11 @@ def get_data():
"label": _("Tools"),
"icon": "icon-wrench",
"items": [
{
"type": "doctype",
"name": "Production Planning Tool",
"description": _("Generate Material Requests (MRP) and Production Orders."),
},
{
"type": "doctype",
"name": "BOM Replace Tool",
"description": _("Replace Item / BOM in all BOMs"),
},
{
"type": "page",
"name": "bom-browser",
"icon": "icon-sitemap",
"label": _("BOM Browser"),
"description": _("Tree of Bill of Materials"),
"doctype": "BOM"
}
]
},
{
@@ -76,7 +86,7 @@ def get_data():
]
},
{
"label": _("Standard Reports"),
"label": _("Reports"),
"icon": "icon-list",
"items": [
{

View File

@@ -4,19 +4,31 @@ from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"label": _("Projects"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"name": "Project",
"description": _("Project master."),
},
{
"type": "doctype",
"name": "Task",
"description": _("Project activity / task."),
},
{
"type": "doctype",
"name": "Project",
"description": _("Project master."),
"type": "report",
"route": "Gantt/Task",
"doctype": "Task",
"name": "Gantt Chart",
"description": _("Gantt chart of all tasks.")
},
]
},
{
"label": _("Time Tracking"),
"items": [
{
"type": "doctype",
"name": "Time Log",
@@ -40,20 +52,7 @@ def get_data():
]
},
{
"label": _("Tools"),
"icon": "icon-wrench",
"items": [
{
"type": "report",
"route": "Gantt/Task",
"doctype": "Task",
"name": "Gantt Chart",
"description": _("Gantt chart of all tasks.")
},
]
},
{
"label": _("Standard Reports"),
"label": _("Reports"),
"icon": "icon-list",
"items": [
{

View File

@@ -4,14 +4,9 @@ from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"label": _("Sales"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"name": "Customer",
"description": _("Customer database."),
},
{
"type": "doctype",
"name": "Quotation",
@@ -22,6 +17,25 @@ def get_data():
"name": "Sales Order",
"description": _("Confirmed orders from Customers."),
},
]
},
{
"label": _("Customers"),
"items": [
{
"type": "doctype",
"name": "Customer",
"description": _("Customer database."),
},
{
"type": "page",
"label": _("Customer Group"),
"name": "Sales Browser",
"icon": "icon-sitemap",
"link": "Sales Browser/Customer Group",
"description": _("Manage Customer Group Tree."),
"doctype": "Customer Group",
},
{
"type": "doctype",
"name": "Contact",
@@ -32,57 +46,58 @@ def get_data():
"name": "Address",
"description": _("All Addresses."),
},
]
},
{
"label": _("Items and Pricing"),
"items": [
{
"type": "doctype",
"name": "Item",
"description": _("All Products or Services."),
},
]
},
{
"label": _("Tools"),
"icon": "icon-wrench",
"items": [
{
"type": "doctype",
"name": "SMS Center",
"description":_("Send mass SMS to your contacts"),
"name": "Product Bundle",
"description": _("Bundle items at time of sale."),
},
{
"type": "doctype",
"name": "SMS Log",
"description":_("Logs for maintaining sms delivery status"),
},
{
"type": "doctype",
"name": "Newsletter",
"description": _("Newsletters to contacts, leads."),
},
]
},
{
"label": _("Setup"),
"icon": "icon-cog",
"items": [
{
"type": "doctype",
"name": "Selling Settings",
"description": _("Default settings for selling transactions.")
},
{
"type": "doctype",
"name": "Campaign",
"description": _("Sales campaigns."),
"name": "Price List",
"description": _("Price List master.")
},
{
"type": "page",
"label": _("Customer Group"),
"name": "Sales Browser",
"icon": "icon-sitemap",
"link": "Sales Browser/Customer Group",
"description": _("Manage Customer Group Tree."),
"doctype": "Customer Group",
"label": _("Item Group"),
"link": "Sales Browser/Item Group",
"description": _("Tree of Item Groups."),
"doctype": "Item Group",
},
{
"type": "doctype",
"name": "Item Price",
"description": _("Multiple Item prices."),
"route": "Report/Item Price"
},
{
"type": "doctype",
"name": "Shipping Rule",
"description": _("Rules for adding shipping costs.")
},
{
"type": "doctype",
"name": "Pricing Rule",
"description": _("Rules for applying pricing and discount.")
},
]
},
{
"label": _("Sales Partners and Territory"),
"items": [
{
"type": "page",
"label": _("Territory"),
@@ -107,13 +122,34 @@ def get_data():
"doctype": "Sales Person",
},
{
"type": "page",
"name": "Sales Browser",
"icon": "icon-sitemap",
"label": _("Item Group Tree"),
"link": "Sales Browser/Item Group",
"description": _("Tree of Item Groups."),
"doctype": "Item Group",
"type": "report",
"is_query_report": True,
"name": "Territory Target Variance (Item Group-Wise)",
"route": "query-report/Territory Target Variance Item Group-Wise",
"doctype": "Territory"
},
{
"type": "report",
"is_query_report": True,
"name": "Sales Person Target Variance (Item Group-Wise)",
"route": "query-report/Sales Person Target Variance Item Group-Wise",
"doctype": "Sales Person",
},
]
},
{
"label": _("Setup"),
"icon": "icon-cog",
"items": [
{
"type": "doctype",
"name": "Selling Settings",
"description": _("Default settings for selling transactions.")
},
{
"type": "doctype",
"name": "Campaign",
"description": _("Sales campaigns."),
},
{
"type": "doctype",
@@ -126,51 +162,15 @@ def get_data():
"name": "Sales Taxes and Charges Template",
"description": _("Tax template for selling transactions.")
},
{
"type": "doctype",
"name": "Shipping Rule",
"description": _("Rules for adding shipping costs.")
},
{
"type": "doctype",
"name": "Price List",
"description": _("Price List master.")
},
{
"type": "doctype",
"name": "Item Price",
"description": _("Multiple Item prices."),
"route": "Report/Item Price"
},
{
"type": "doctype",
"name": "Pricing Rule",
"description": _("Rules for applying pricing and discount.")
},
{
"type": "doctype",
"name": "Product Bundle",
"description": _("Bundle items at time of sale."),
},
{
"type": "doctype",
"name": "Email Account",
"description": _("Setup incoming server for sales email id. (e.g. sales@example.com)")
},
{
"type": "doctype",
"name": "Industry Type",
"description": _("Track Leads by Industry Type.")
},
{
"type": "doctype",
"name": "SMS Settings",
"description": _("Setup SMS gateway settings")
},
]
},
{
"label": _("Main Reports"),
"label": _("Analytics"),
"icon": "icon-table",
"items": [
{
@@ -192,10 +192,22 @@ def get_data():
"doctype": "Customer",
"icon": "icon-bar-chart",
},
{
"type": "report",
"is_query_report": True,
"name": "Quotation Trends",
"doctype": "Quotation"
},
{
"type": "report",
"is_query_report": True,
"name": "Sales Order Trends",
"doctype": "Sales Order"
},
]
},
{
"label": _("Standard Reports"),
"label": _("Other Reports"),
"icon": "icon-list",
"items": [
{
@@ -228,20 +240,6 @@ def get_data():
"name": "Item-wise Sales History",
"doctype": "Item"
},
{
"type": "report",
"is_query_report": True,
"name": "Territory Target Variance (Item Group-Wise)",
"route": "query-report/Territory Target Variance Item Group-Wise",
"doctype": "Territory"
},
{
"type": "report",
"is_query_report": True,
"name": "Sales Person Target Variance (Item Group-Wise)",
"route": "query-report/Sales Person Target Variance Item Group-Wise",
"doctype": "Sales Person",
},
{
"type": "report",
"is_query_report": True,
@@ -251,19 +249,7 @@ def get_data():
{
"type": "report",
"is_query_report": True,
"name": "Customers Not Buying Since Long Time",
"doctype": "Sales Order"
},
{
"type": "report",
"is_query_report": True,
"name": "Quotation Trends",
"doctype": "Quotation"
},
{
"type": "report",
"is_query_report": True,
"name": "Sales Order Trends",
"name": "Inactive Customers",
"doctype": "Sales Order"
},
{
@@ -286,6 +272,27 @@ def get_data():
},
]
},
{
"label": _("SMS"),
"icon": "icon-wrench",
"items": [
{
"type": "doctype",
"name": "SMS Center",
"description":_("Send mass SMS to your contacts"),
},
{
"type": "doctype",
"name": "SMS Log",
"description":_("Logs for maintaining sms delivery status"),
},
{
"type": "doctype",
"name": "SMS Settings",
"description": _("Setup SMS gateway settings")
},
]
},
{
"label": _("Help"),
"items": [

View File

@@ -4,19 +4,8 @@ from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"icon": "icon-star",
"label": _("Stock Transactions"),
"items": [
{
"type": "doctype",
"name": "Item",
"description": _("All Products or Services."),
},
{
"type": "doctype",
"name": "Material Request",
"description": _("Requests for items."),
},
{
"type": "doctype",
"name": "Stock Entry",
@@ -34,14 +23,90 @@ def get_data():
},
{
"type": "doctype",
"name": "Installation Note",
"description": _("Installation record for a Serial No.")
"name": "Material Request",
"description": _("Requests for items."),
},
]
},
{
"label": _("Stock Reports"),
"items": [
{
"type": "report",
"is_query_report": True,
"name": "Stock Ledger",
"doctype": "Stock Ledger Entry",
},
{
"type": "report",
"is_query_report": True,
"name": "Stock Balance",
"doctype": "Stock Ledger Entry"
},
{
"type": "report",
"is_query_report": True,
"name": "Stock Projected Qty",
"doctype": "Item",
},
{
"type": "report",
"is_query_report": True,
"name": "Stock Ageing",
"doctype": "Item",
},
]
},
{
"label": _("Items and Pricing"),
"items": [
{
"type": "doctype",
"name": "Item",
"description": _("All Products or Services."),
},
{
"type": "doctype",
"name": "Warehouse",
"description": _("Where items are stored."),
"name": "Product Bundle",
"description": _("Bundle items at time of sale."),
},
{
"type": "doctype",
"name": "Price List",
"description": _("Price List master.")
},
{
"type": "page",
"name": "Sales Browser",
"icon": "icon-sitemap",
"label": _("Item Group"),
"link": "Sales Browser/Item Group",
"description": _("Tree of Item Groups."),
"doctype": "Item Group",
},
{
"type": "doctype",
"name": "Item Price",
"description": _("Multiple Item prices."),
"route": "Report/Item Price"
},
{
"type": "doctype",
"name": "Shipping Rule",
"description": _("Rules for adding shipping costs.")
},
{
"type": "doctype",
"name": "Pricing Rule",
"description": _("Rules for applying pricing and discount.")
},
]
},
{
"label": _("Serial No and Batch"),
"items": [
{
"type": "doctype",
"name": "Serial No",
@@ -52,6 +117,26 @@ def get_data():
"name": "Batch",
"description": _("Batch (lot) of an Item."),
},
{
"type": "doctype",
"name": "Installation Note",
"description": _("Installation record for a Serial No.")
},
{
"type": "report",
"name": "Serial No Service Contract Expiry",
"doctype": "Serial No"
},
{
"type": "report",
"name": "Serial No Status",
"doctype": "Serial No"
},
{
"type": "report",
"name": "Serial No Warranty Expiry",
"doctype": "Serial No"
},
]
},
{
@@ -90,13 +175,9 @@ def get_data():
"description": _("Default settings for stock transactions.")
},
{
"type": "page",
"name": "Sales Browser",
"icon": "icon-sitemap",
"label": _("Item Group Tree"),
"link": "Sales Browser/Item Group",
"description": _("Tree of Item Groups."),
"doctype": "Item Group",
"type": "doctype",
"name": "Warehouse",
"description": _("Where items are stored."),
},
{
"type": "doctype",
@@ -106,60 +187,20 @@ def get_data():
},
{
"type": "doctype",
"name": "Warehouse",
"description": _("Warehouses.")
"name": "Item Attribute",
"description": _("Attributes for Item Variants. e.g Size, Color etc."),
},
{
"type": "doctype",
"name": "Brand",
"description": _("Brand master.")
},
{
"type": "doctype",
"name": "Price List",
"description": _("Price List master.")
},
{
"type": "doctype",
"name": "Item Price",
"description": _("Multiple Item prices."),
"route": "Report/Item Price"
},
{
"type": "doctype",
"name": "Item Attribute",
"description": _("Attributes for Item Variants. e.g Size, Color etc."),
},
]
},
{
"label": _("Main Reports"),
"label": _("Analytics"),
"icon": "icon-table",
"items": [
{
"type": "report",
"is_query_report": True,
"name": "Stock Ledger",
"doctype": "Stock Ledger Entry",
},
{
"type": "report",
"is_query_report": True,
"name": "Stock Balance",
"doctype": "Stock Ledger Entry"
},
{
"type": "report",
"is_query_report": True,
"name": "Stock Projected Qty",
"doctype": "Item",
},
{
"type": "report",
"is_query_report": True,
"name": "Stock Ageing",
"doctype": "Item",
},
{
"type": "report",
"is_query_report": False,
@@ -171,11 +212,24 @@ def get_data():
"name": "stock-analytics",
"label": _("Stock Analytics"),
"icon": "icon-bar-chart"
}
},
{
"type": "report",
"is_query_report": True,
"name": "Delivery Note Trends",
"doctype": "Delivery Note"
},
{
"type": "report",
"is_query_report": True,
"name": "Purchase Receipt Trends",
"doctype": "Purchase Receipt"
},
]
},
{
"label": _("Standard Reports"),
"label": _("Reports"),
"icon": "icon-list",
"items": [
{
@@ -196,21 +250,6 @@ def get_data():
"route": "Report/Bin/Item Shortage Report",
"doctype": "Purchase Receipt"
},
{
"type": "report",
"name": "Serial No Service Contract Expiry",
"doctype": "Serial No"
},
{
"type": "report",
"name": "Serial No Status",
"doctype": "Serial No"
},
{
"type": "report",
"name": "Serial No Warranty Expiry",
"doctype": "Serial No"
},
{
"type": "report",
"is_query_report": True,
@@ -235,18 +274,6 @@ def get_data():
"name": "Itemwise Recommended Reorder Level",
"doctype": "Item"
},
{
"type": "report",
"is_query_report": True,
"name": "Delivery Note Trends",
"doctype": "Delivery Note"
},
{
"type": "report",
"is_query_report": True,
"name": "Purchase Receipt Trends",
"doctype": "Purchase Receipt"
},
]
},
{

View File

@@ -4,8 +4,7 @@ from frappe import _
def get_data():
return [
{
"label": _("Documents"),
"icon": "icon-star",
"label": _("Issues"),
"items": [
{
"type": "doctype",
@@ -14,9 +13,14 @@ def get_data():
},
{
"type": "doctype",
"name": "Warranty Claim",
"description": _("Warranty Claim against Serial No."),
"name": "Communication",
"description": _("Communication log."),
},
]
},
{
"label": _("Maintenance"),
"items": [
{
"type": "doctype",
"name": "Maintenance Schedule",
@@ -28,14 +32,20 @@ def get_data():
"description": _("Visit report for maintenance call."),
},
{
"type": "doctype",
"name": "Newsletter",
"description": _("Newsletters to contacts, leads."),
"type": "report",
"name": "Maintenance Schedules",
"is_query_report": True,
"doctype": "Maintenance Schedule"
},
]
},
{
"label": _("Warranty"),
"items": [
{
"type": "doctype",
"name": "Communication",
"description": _("Communication log."),
"name": "Warranty Claim",
"description": _("Warranty Claim against Serial No."),
},
{
"type": "doctype",
@@ -45,18 +55,7 @@ def get_data():
]
},
{
"label": _("Setup"),
"icon": "icon-cog",
"items": [
{
"type": "doctype",
"name": "Email Account",
"description": _("Setup incoming server for support email id. (e.g. support@example.com)")
},
]
},
{
"label": _("Standard Reports"),
"label": _("Reports"),
"icon": "icon-list",
"items": [
{
@@ -65,12 +64,6 @@ def get_data():
"label": _("Support Analytics"),
"icon": "icon-bar-chart"
},
{
"type": "report",
"name": "Maintenance Schedules",
"is_query_report": True,
"doctype": "Maintenance Schedule"
},
]
},
]

View File

@@ -42,17 +42,14 @@ class AccountsController(TransactionBase):
if self.doctype in ("Sales Invoice", "Purchase Invoice") and not self.is_return:
self.validate_due_date()
if self.meta.get_field("is_recurring"):
validate_recurring_document(self)
if self.meta.get_field("taxes_and_charges"):
self.validate_enabled_taxes_and_charges()
self.validate_party()
self.validate_currency()
def on_submit(self):
if self.meta.get_field("is_recurring"):
if self.meta.get_field("is_recurring") and not self.get("__islocal"):
validate_recurring_document(self)
convert_to_recurring(self, self.get("posting_date") or self.get("transaction_date"))
def on_update_after_submit(self):
@@ -220,10 +217,10 @@ class AccountsController(TransactionBase):
gl_dict = frappe._dict({
'company': self.company,
'posting_date': self.posting_date,
'fiscal_year': get_fiscal_year(self.posting_date, company=self.company)[0],
'voucher_type': self.doctype,
'voucher_no': self.name,
'remarks': self.get("remarks"),
'fiscal_year': self.fiscal_year,
'debit': 0,
'credit': 0,
'debit_in_account_currency': 0,

View File

@@ -8,22 +8,22 @@ from frappe.utils import cint
def print_settings_for_item_table(doc):
doc.print_templates = {
"description": "templates/print_formats/includes/item_table_description.html",
"qty": "templates/print_formats/includes/item_table_qty.html"
}
doc.hide_in_print_layout = ["item_code", "item_name", "image", "uom", "stock_uom"]
doc.hide_in_print_layout = ["uom", "stock_uom"]
doc.flags.compact_item_print = cint(frappe.db.get_value("Features Setup", None, "compact_item_print"))
doc.flags.compact_item_fields = doc.hide_in_print_layout + ["description", "qty", "rate", "amount"]
doc.flags.show_in_description = []
if doc.flags.compact_item_print:
doc.print_templates["description"] = "templates/print_formats/includes/item_table_description.html"
doc.hide_in_print_layout += ["item_code", "item_name", "image"]
doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"]
doc.flags.show_in_description = []
for df in doc.meta.fields:
if df.fieldtype not in ("Section Break", "Column Break", "Button"):
if not doc.is_print_hide(df.fieldname):
if df.fieldname not in doc.hide_in_print_layout and df.fieldname not in doc.flags.compact_item_fields:
doc.hide_in_print_layout.append(df.fieldname)
doc.flags.show_in_description.append(df.fieldname)

View File

@@ -40,6 +40,7 @@ def employee_query(doctype, txt, searchfield, start, page_len, filters):
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
if(locate(%(_txt)s, employee_name), locate(%(_txt)s, employee_name), 99999),
idx desc,
name, employee_name
limit %(start)s, %(page_len)s""".format(**{
'key': searchfield,
@@ -64,6 +65,7 @@ def lead_query(doctype, txt, searchfield, start, page_len, filters):
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
if(locate(%(_txt)s, lead_name), locate(%(_txt)s, lead_name), 99999),
if(locate(%(_txt)s, company_name), locate(%(_txt)s, company_name), 99999),
idx desc,
name, lead_name
limit %(start)s, %(page_len)s""".format(**{
'key': searchfield,
@@ -94,6 +96,7 @@ def customer_query(doctype, txt, searchfield, start, page_len, filters):
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
if(locate(%(_txt)s, customer_name), locate(%(_txt)s, customer_name), 99999),
idx desc,
name, customer_name
limit %(start)s, %(page_len)s""".format(**{
"fields": fields,
@@ -123,6 +126,7 @@ def supplier_query(doctype, txt, searchfield, start, page_len, filters):
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
if(locate(%(_txt)s, supplier_name), locate(%(_txt)s, supplier_name), 99999),
idx desc,
name, supplier_name
limit %(start)s, %(page_len)s """.format(**{
'field': fields,
@@ -142,6 +146,7 @@ def tax_account_query(doctype, txt, searchfield, start, page_len, filters):
and is_group = 0
and company = %s
and `%s` LIKE %s
order by idx desc, name
limit %s, %s""" %
(", ".join(['%s']*len(filters.get("account_type"))), "%s", searchfield, "%s", "%s", "%s"),
tuple(filters.get("account_type") + [filters.get("company"), "%%%s%%" % txt,
@@ -176,10 +181,11 @@ def item_query(doctype, txt, searchfield, start, page_len, filters):
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
if(locate(%(_txt)s, item_name), locate(%(_txt)s, item_name), 99999),
idx desc,
name, item_name
limit %(start)s, %(page_len)s """.format(key=searchfield,
fcond=get_filters_cond(doctype, filters, conditions),
mcond=get_match_cond(doctype)),
fcond=get_filters_cond(doctype, filters, conditions).replace('%', '%%'),
mcond=get_match_cond(doctype).replace('%', '%%')),
{
"today": nowdate(),
"txt": "%%%s%%" % txt,
@@ -195,11 +201,21 @@ def bom(doctype, txt, searchfield, start, page_len, filters):
from tabBOM
where tabBOM.docstatus=1
and tabBOM.is_active=1
and tabBOM.%(key)s like "%(txt)s"
%(fcond)s %(mcond)s
limit %(start)s, %(page_len)s """ % {'key': searchfield, 'txt': "%%%s%%" % frappe.db.escape(txt),
'fcond': get_filters_cond(doctype, filters, conditions),
'mcond':get_match_cond(doctype), 'start': start, 'page_len': page_len})
and tabBOM.`{key}` like %(txt)s
{fcond} {mcond}
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
idx desc, name
limit %(start)s, %(page_len)s """.format(
fcond=get_filters_cond(doctype, filters, conditions),
mcond=get_match_cond(doctype),
key=frappe.db.escape(searchfield)),
{
'txt': "%%%s%%" % frappe.db.escape(txt),
'_txt': txt.replace("%", ""),
'start': start,
'page_len': page_len
})
def get_project_name(doctype, txt, searchfield, start, page_len, filters):
cond = ''
@@ -208,10 +224,19 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select `tabProject`.name from `tabProject`
where `tabProject`.status not in ("Completed", "Cancelled")
and {cond} `tabProject`.name like %s {match_cond}
order by `tabProject`.name asc
limit {start}, {page_len}""".format(cond=cond, match_cond=get_match_cond(doctype),
start=start, page_len=page_len), "%{0}%".format(txt))
and {cond} `tabProject`.name like %(txt)s {match_cond}
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
idx desc,
`tabProject`.name asc
limit {start}, {page_len}""".format(
cond=cond,
match_cond=get_match_cond(doctype),
start=start,
page_len=page_len), {
"txt": "%{0}%".format(txt),
"_txt": txt.replace('%', '')
})
def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name
@@ -310,7 +335,8 @@ def get_income_account(doctype, txt, searchfield, start, page_len, filters):
or tabAccount.account_type in ("Income Account", "Temporary"))
and tabAccount.is_group=0
and tabAccount.`{key}` LIKE %(txt)s
{condition} {match_condition}"""
{condition} {match_condition}
order by idx desc, name"""
.format(condition=condition, match_condition=get_match_cond(doctype), key=searchfield), {
'txt': "%%%s%%" % frappe.db.escape(txt),
'company': filters.get("company", "")

View File

@@ -3,13 +3,10 @@ import frappe
import frappe.utils
import frappe.defaults
from frappe.utils import add_days, cint, cstr, date_diff, flt, getdate, nowdate, \
get_first_day, get_last_day, comma_and, split_emails
from frappe.model.naming import make_autoname
from frappe.utils import cint, cstr, getdate, nowdate, \
get_first_day, get_last_day, split_emails
from frappe import _, msgprint, throw
from erpnext.accounts.party import get_party_account, get_due_date, get_party_details
from frappe.model.mapper import get_mapped_doc
month_map = {'Monthly': 1, 'Quarterly': 3, 'Half-yearly': 6, 'Yearly': 12}
date_field_map = {
@@ -75,8 +72,7 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
frappe.throw(exception_message)
def make_new_document(reference_doc, date_field, posting_date):
from erpnext.accounts.utils import get_fiscal_year
new_document = frappe.copy_doc(reference_doc, ignore_no_copy=True)
new_document = frappe.copy_doc(reference_doc, ignore_no_copy=False)
mcount = month_map[reference_doc.recurring_type]
from_date = get_next_date(reference_doc.from_date, mcount)
@@ -93,8 +89,7 @@ def make_new_document(reference_doc, date_field, posting_date):
date_field: posting_date,
"from_date": from_date,
"to_date": to_date,
"fiscal_year": get_fiscal_year(posting_date)[0],
"next_date": get_next_date(from_date, mcount,cint(reference_doc.repeat_on_day_of_month))
"next_date": get_next_date(reference_doc.next_date, mcount,cint(reference_doc.repeat_on_day_of_month))
})
# copy document fields
@@ -113,6 +108,7 @@ def make_new_document(reference_doc, date_field, posting_date):
new_document.run_method("on_recurring", reference_doc=reference_doc)
if reference_doc.submit_on_creation:
new_document.insert()
new_document.submit()
else:
new_document.docstatus=0
@@ -165,26 +161,33 @@ def assign_task_to_owner(doc, doctype, msg, users):
def validate_recurring_document(doc):
if doc.is_recurring:
validate_notification_email_id(doc)
if not doc.recurring_id:
doc.recurring_id = doc.name
if not doc.recurring_type:
msgprint(_("Please select {0}").format(doc.meta.get_label("recurring_type")),
raise_exception=1)
frappe.throw(_("Please select {0}").format(doc.meta.get_label("recurring_type")))
elif not (doc.from_date and doc.to_date):
throw(_("Period From and Period To dates mandatory for recurring {0}").format(doc.doctype))
frappe.throw(_("Period From and Period To dates mandatory for recurring {0}").format(doc.doctype))
def validate_recurring_next_date(doc):
posting_date = doc.get("posting_date") or doc.get("transaction_date")
if getdate(posting_date) > getdate(doc.next_date):
frappe.throw(_("Next Date must be greater than Posting Date"))
if getdate(doc.next_date).day != doc.repeat_on_day_of_month:
frappe.throw(_("Next Date's day and Repeat on Day of Month must be equal"))
#
def convert_to_recurring(doc, posting_date):
if doc.is_recurring:
set_next_date(doc, posting_date)
if doc.is_recurring:
if not doc.recurring_id:
doc.db_set("recurring_id", doc.name)
elif doc.recurring_id:
frappe.db.sql("""update `tab%s` set is_recurring = 0
where recurring_id = %s""" % (doc.doctype, '%s'), (doc.recurring_id))
#
set_next_date(doc, posting_date)
elif doc.recurring_id:
frappe.db.sql("""update `tab%s` set is_recurring = 0
where recurring_id = %s""" % (doc.doctype, '%s'), (doc.recurring_id))
if doc.next_date:
validate_recurring_next_date(doc)
def validate_notification_email_id(doc):
if doc.notify_by_email:
@@ -203,13 +206,12 @@ def validate_notification_email_id(doc):
def set_next_date(doc, posting_date):
""" Set next date on which recurring document will be created"""
if not doc.repeat_on_day_of_month:
msgprint(_("Please enter 'Repeat on Day of Month' field value"), raise_exception=1)
next_date = doc.next_date or get_next_date(doc.from_date, month_map[doc.recurring_type],
next_date = get_next_date(posting_date, month_map[doc.recurring_type],
cint(doc.repeat_on_day_of_month))
frappe.db.set(doc, 'next_date', next_date)
doc.db_set('next_date', next_date)
msgprint(_("Next Recurring {0} will be created on {1}").format(doc.doctype, next_date))

View File

@@ -6,7 +6,7 @@ import frappe
from frappe.utils import cint, flt, cstr, comma_or
from erpnext.setup.utils import get_company_currency
from frappe import _, throw
from erpnext.stock.get_item_details import get_available_qty
from erpnext.stock.get_item_details import get_bin_details
from erpnext.controllers.stock_controller import StockController
@@ -24,7 +24,7 @@ class SellingController(StockController):
def onload(self):
if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice"):
for item in self.get("items"):
item.update(get_available_qty(item.item_code,
item.update(get_bin_details(item.item_code,
item.warehouse))
def validate(self):
@@ -51,7 +51,10 @@ class SellingController(StockController):
elif getattr(self, "lead", None):
from erpnext.crm.doctype.lead.lead import get_lead_details
self.update_if_missing(get_lead_details(self.lead))
self.update_if_missing(get_lead_details(
self.lead,
posting_date=self.get('transaction_date') or self.get('posting_date'),
company=self.company))
def set_price_list_and_item_details(self):
self.set_price_list_currency("Selling")

View File

@@ -6,6 +6,7 @@ import frappe
from frappe.utils import cint, flt, cstr
from frappe import msgprint, _
import frappe.defaults
from erpnext.accounts.utils import get_fiscal_year
from erpnext.accounts.general_ledger import make_gl_entries, delete_gl_entries, process_gl_map
from erpnext.stock.utils import get_incoming_rate
@@ -181,6 +182,7 @@ class StockController(AccountsController):
"warehouse": d.get("warehouse", None),
"posting_date": self.posting_date,
"posting_time": self.posting_time,
'fiscal_year': get_fiscal_year(self.posting_date, company=self.company)[0],
"voucher_type": self.doctype,
"voucher_no": self.name,
"voucher_detail_no": d.name,
@@ -188,10 +190,9 @@ class StockController(AccountsController):
"stock_uom": frappe.db.get_value("Item", args.get("item_code") or d.get("item_code"), "stock_uom"),
"incoming_rate": 0,
"company": self.company,
"fiscal_year": self.fiscal_year,
"batch_no": cstr(d.get("batch_no")).strip(),
"serial_no": d.get("serial_no"),
"project": d.get("project_name"),
"project": d.get("project"),
"is_cancelled": self.docstatus==2 and "Yes" or "No"
})

View File

@@ -283,8 +283,8 @@ class calculate_taxes_and_totals(object):
last_tax.tax_amount += diff
last_tax.tax_amount_after_discount_amount += diff
last_tax.total += diff
self._set_in_company_currency(last_tax,
self._set_in_company_currency(last_tax,
["total", "tax_amount", "tax_amount_after_discount_amount"])
def calculate_totals(self):
@@ -319,22 +319,22 @@ class calculate_taxes_and_totals(object):
self.doc.round_floats_in(self.doc, ["grand_total", "base_grand_total"])
if self.doc.meta.get_field("rounded_total"):
self.doc.rounded_total = round_based_on_smallest_currency_fraction(self.doc.grand_total,
self.doc.rounded_total = round_based_on_smallest_currency_fraction(self.doc.grand_total,
self.doc.currency, self.doc.precision("rounded_total"))
if self.doc.meta.get_field("base_rounded_total"):
company_currency = get_company_currency(self.doc.company)
self.doc.base_rounded_total = \
round_based_on_smallest_currency_fraction(self.doc.base_grand_total,
round_based_on_smallest_currency_fraction(self.doc.base_grand_total,
company_currency, self.doc.precision("base_rounded_total"))
def _cleanup(self):
for tax in self.doc.get("taxes"):
tax.item_wise_tax_detail = json.dumps(tax.item_wise_tax_detail, separators=(',', ':'))
def set_discount_amount(self):
if not self.doc.discount_amount and self.doc.additional_discount_percentage:
self.doc.discount_amount = flt(flt(self.doc.get(scrub(self.doc.apply_discount_on)))
self.doc.discount_amount = flt(flt(self.doc.get(scrub(self.doc.apply_discount_on)))
* self.doc.additional_discount_percentage / 100, self.doc.precision("discount_amount"))
def apply_discount_amount(self):
@@ -397,13 +397,13 @@ class calculate_taxes_and_totals(object):
for adv in self.doc.get("advances")])
self.doc.total_advance = flt(total_allocated_amount, self.doc.precision("total_advance"))
if self.doc.party_account_currency == self.doc.currency:
invoice_total = self.doc.grand_total
else:
invoice_total = flt(self.doc.grand_total * self.doc.conversion_rate,
invoice_total = flt(self.doc.grand_total * self.doc.conversion_rate,
self.doc.precision("grand_total"))
if invoice_total > 0 and self.doc.total_advance > invoice_total:
frappe.throw(_("Advance amount cannot be greater than {0} {1}")
.format(self.doc.party_account_currency, invoice_total))
@@ -417,21 +417,23 @@ class calculate_taxes_and_totals(object):
# total_advance is only for non POS Invoice
if self.doc.is_return:
return
self.doc.round_floats_in(self.doc, ["grand_total", "total_advance", "write_off_amount"])
self._set_in_company_currency(self.doc, ['write_off_amount'])
if self.doc.party_account_currency == self.doc.currency:
total_amount_to_pay = flt(self.doc.grand_total - self.doc.total_advance
total_amount_to_pay = flt(self.doc.grand_total - self.doc.total_advance
- flt(self.doc.write_off_amount), self.doc.precision("grand_total"))
else:
total_amount_to_pay = flt(flt(self.doc.grand_total *
self.doc.conversion_rate, self.doc.precision("grand_total")) - self.doc.total_advance
self.doc.conversion_rate, self.doc.precision("grand_total")) - self.doc.total_advance
- flt(self.doc.base_write_off_amount), self.doc.precision("grand_total"))
if self.doc.doctype == "Sales Invoice":
self.doc.round_floats_in(self.doc, ["paid_amount"])
paid_amount = self.doc.paid_amount \
if self.doc.party_account_currency == self.doc.currency else self.doc.base_paid_amount
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
self.doc.precision("outstanding_amount"))
elif self.doc.doctype == "Purchase Invoice":
self.doc.outstanding_amount = flt(total_amount_to_pay, self.doc.precision("outstanding_amount"))
self.doc.outstanding_amount = flt(total_amount_to_pay, self.doc.precision("outstanding_amount"))

View File

@@ -6,7 +6,6 @@ import frappe
import frappe.permissions
from erpnext.controllers.recurring_document import date_field_map
from frappe.utils import get_first_day, get_last_day, add_to_date, nowdate, getdate, add_days
from erpnext.accounts.utils import get_fiscal_year
def test_recurring_document(obj, test_records):
frappe.db.set_value("Print Settings", "Print Settings", "send_print_as_pdf", 1)
@@ -20,7 +19,6 @@ def test_recurring_document(obj, test_records):
"notification_email_address": "test@example.com, test1@example.com, test2@example.com",
"repeat_on_day_of_month": getdate(today).day,
"due_date": None,
"fiscal_year": get_fiscal_year(today)[0],
"from_date": get_first_day(today),
"to_date": get_last_day(today)
})

View File

@@ -43,9 +43,16 @@ def get_data(filters, conditions):
inc, cond= '',''
query_details = conditions["based_on_select"] + conditions["period_wise_select"]
if conditions["based_on_select"] in ["t1.project_name,", "t2.project_name,"]:
posting_date = 't1.transaction_date'
if conditions.get('trans') in ['Sales Invoice', 'Purchase Invoice', 'Purchase Receipt', 'Delivery Note']:
posting_date = 't1.posting_date'
if conditions["based_on_select"] in ["t1.project,", "t2.project,"]:
cond = 'and '+ conditions["based_on_select"][:-1] +' IS Not NULL'
year_start_date, year_end_date = frappe.db.get_value("Fiscal Year",
filters.get('fiscal_year'), ["year_start_date", "year_end_date"])
if filters.get("group_by"):
sel_col = ''
ind = conditions["columns"].index(conditions["grbc"][0])
@@ -62,12 +69,12 @@ def get_data(filters, conditions):
else :
inc = 1
data1 = frappe.db.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s and
where t2.parent = t1.name and t1.company = %s and %s between %s and %s and
t1.docstatus = 1 %s %s
group by %s
""" % (query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"], "%s",
"%s", conditions.get("addl_tables_relational_cond"), cond, conditions["group_by"]), (filters.get("company"),
filters["fiscal_year"]),as_list=1)
posting_date, "%s", "%s", conditions.get("addl_tables_relational_cond"), cond, conditions["group_by"]), (filters.get("company"),
year_start_date, year_end_date),as_list=1)
for d in range(len(data1)):
#to add blanck column
@@ -77,25 +84,25 @@ def get_data(filters, conditions):
#to get distinct value of col specified by group_by in filter
row = frappe.db.sql("""select DISTINCT(%s) from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s
where t2.parent = t1.name and t1.company = %s and %s between %s and %s
and t1.docstatus = 1 and %s = %s %s
""" %
(sel_col, conditions["trans"], conditions["trans"], conditions["addl_tables"],
"%s", "%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
(filters.get("company"), filters.get("fiscal_year"), data1[d][0]), as_list=1)
"%s", posting_date, "%s", "%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
(filters.get("company"), year_start_date, year_end_date, data1[d][0]), as_list=1)
for i in range(len(row)):
des = ['' for q in range(len(conditions["columns"]))]
#get data for group_by filter
row1 = frappe.db.sql(""" select %s , %s from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s
where t2.parent = t1.name and t1.company = %s and %s between %s and %s
and t1.docstatus = 1 and %s = %s and %s = %s %s
""" %
(sel_col, conditions["period_wise_select"], conditions["trans"],
conditions["trans"], conditions["addl_tables"], "%s", "%s", sel_col,
conditions["trans"], conditions["addl_tables"], "%s", posting_date, "%s","%s", sel_col,
"%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
(filters.get("company"), filters.get("fiscal_year"), row[i][0],
(filters.get("company"), year_start_date, year_end_date, row[i][0],
data1[d][0]), as_list=1)
des[ind] = row[i][0]
@@ -106,13 +113,13 @@ def get_data(filters, conditions):
data.append(des)
else:
data = frappe.db.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s and
where t2.parent = t1.name and t1.company = %s and %s between %s and %s and
t1.docstatus = 1 %s %s
group by %s
""" %
(query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"],
"%s", "%s", cond, conditions.get("addl_tables_relational_cond", ""), conditions["group_by"]),
(filters.get("company"), filters.get("fiscal_year")), as_list=1)
"%s", posting_date, "%s", "%s", cond, conditions.get("addl_tables_relational_cond", ""), conditions["group_by"]),
(filters.get("company"), year_start_date, year_end_date), as_list=1)
return data
@@ -246,13 +253,13 @@ def based_wise_columns_query(based_on, trans):
elif based_on == "Project":
if trans in ['Sales Invoice', 'Delivery Note', 'Sales Order']:
based_on_details["based_on_cols"] = ["Project:Link/Project:120"]
based_on_details["based_on_select"] = "t1.project_name,"
based_on_details["based_on_group_by"] = 't1.project_name'
based_on_details["based_on_select"] = "t1.project,"
based_on_details["based_on_group_by"] = 't1.project'
based_on_details["addl_tables"] = ''
elif trans in ['Purchase Order', 'Purchase Invoice', 'Purchase Receipt']:
based_on_details["based_on_cols"] = ["Project:Link/Project:120"]
based_on_details["based_on_select"] = "t2.project_name,"
based_on_details["based_on_group_by"] = 't2.project_name'
based_on_details["based_on_select"] = "t2.project,"
based_on_details["based_on_group_by"] = 't2.project'
based_on_details["addl_tables"] = ''
else:
frappe.throw(_("Project-wise data is not available for Quotation"))

File diff suppressed because it is too large Load Diff

View File

@@ -10,6 +10,7 @@ from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.selling_controller import SellingController
from erpnext.utilities.address_and_contact import load_address_and_contact
from erpnext.accounts.party import set_taxes
sender_field = "email_id"
@@ -58,7 +59,7 @@ class Lead(SellingController):
def check_email_id_is_unique(self):
if self.email_id:
# validate email is unique
duplicate_leads = frappe.db.sql_list("""select name from tabLead
duplicate_leads = frappe.db.sql_list("""select name from tabLead
where email_id=%s and name!=%s""", (self.email_id, self.name))
if duplicate_leads:
@@ -138,7 +139,7 @@ def make_quotation(source_name, target_doc=None):
return target_doc
@frappe.whitelist()
def get_lead_details(lead):
def get_lead_details(lead, posting_date=None, company=None):
if not lead: return {}
from erpnext.accounts.party import set_address_details
@@ -158,4 +159,9 @@ def get_lead_details(lead):
set_address_details(out, lead, "Lead")
taxes_and_charges = set_taxes(None, 'Lead', posting_date, company,
billing_address=out.get('customer_address'), shipping_address=out.get('shipping_address_name'))
if taxes_and_charges:
out['taxes_and_charges'] = taxes_and_charges
return out

View File

@@ -31,8 +31,6 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
set_multiple(cdt, cdn, { status:'Draft' });
if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
set_multiple(cdt, cdn, { company:frappe.defaults.get_user_default("Company") });
if(!this.frm.doc.fiscal_year && sys_defaults.fiscal_year)
set_multiple(cdt, cdn, { fiscal_year:sys_defaults.fiscal_year });
this.setup_queries();
},
@@ -166,13 +164,3 @@ cur_frm.cscript['Declare Opportunity Lost'] = function() {
});
dialog.show();
}
cur_frm.cscript.company = function(doc, cdt, cdn) {
erpnext.get_fiscal_year(doc.company, doc.transaction_date);
}
cur_frm.cscript.transaction_date = function(doc, cdt, cdn){
erpnext.get_fiscal_year(doc.company, doc.transaction_date);
}

View File

@@ -802,33 +802,6 @@
"unique": 0,
"width": "50px"
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1001,7 +974,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-03-02 05:12:15.429804",
"modified": "2016-03-03 06:13:49.728079",
"modified_by": "Administrator",
"module": "CRM",
"name": "Opportunity",

View File

@@ -40,8 +40,6 @@ class Opportunity(TransactionBase):
if not self.title:
self.title = self.customer_name
from erpnext.accounts.utils import validate_fiscal_year
validate_fiscal_year(self.transaction_date, self.fiscal_year, _("Opportunity Date"), self)
def make_new_lead_if_required(self):
"""Set lead against new opportunity"""

View File

@@ -6,7 +6,6 @@
"enquiry_type": "Sales",
"lead": "_T-Lead-00001",
"transaction_date": "2013-12-12",
"fiscal_year": "_Test Fiscal Year 2013",
"items": [{
"item_name": "Test Item",
"description": "Some description"

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

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