Compare commits

...

1090 Commits

Author SHA1 Message Date
Nabin Hait
5650bf9ba5 Merge branch 'develop' 2017-04-20 08:51:44 +05:30
Nabin Hait
9afb53203f bumped to version 8.0.14 2017-04-20 09:21:44 +06:00
Nabin Hait
825e053e66 Fixed project_copied_from patch 2017-04-20 08:50:37 +05:30
Nabin Hait
3e519770de Merge pull request #8505 from nabinhait/develop
Fixed allow_zero_valuation_rate patch
2017-04-20 08:46:30 +05:30
Nabin Hait
e42fb32f6f Fixed allow_zero_valuation_rate patch 2017-04-20 08:45:18 +05:30
Nabin Hait
00bec1c272 Merge pull request #8504 from nabinhait/allow_on_submit_fix
Fixes allowed on submit
2017-04-19 21:11:13 +05:30
Nabin Hait
68ae9f3f88 Merge branch 'develop' into allow_on_submit_fix 2017-04-19 21:10:23 +05:30
mbauskar
8f3cc81302 [minor] minor fixes in pricing_rule and set_missing_value 2017-04-19 21:05:37 +05:30
mbauskar
9e9d242a24 [minor] fixes in test cases and added the test case for multiple uom in selling 2017-04-19 21:05:37 +05:30
mbauskar
287fe81329 [minor] calculate price list rate based on items uom 2017-04-19 21:05:37 +05:30
Nabin Hait
24053478a1 Merge pull request #8486 from nabinhait/develop
Asset Depreciation Enhancements
2017-04-19 21:01:34 +05:30
Nabin Hait
f382373cf4 Merge branch 'develop' into develop 2017-04-19 21:01:19 +05:30
CH
61f4a8e757 Make the address type translatable in the Address_HTML field 2017-04-19 20:58:53 +05:30
Nabin Hait
eef55185fc Update purchase_receipt_item.json 2017-04-19 20:58:09 +05:30
Nabin Hait
8691e0777b Update purchase_invoice_item.json 2017-04-19 20:58:09 +05:30
Nabin Hait
2de3bf7a0f Fixed indexes on sales and purchase transactions 2017-04-19 20:58:09 +05:30
Julian Robbins
2e6f12b850 Update purchase-details.md 2017-04-19 20:55:04 +05:30
mbauskar
ba41242f1f [fixes] fixed the pricing rule issue https://github.com/frappe/erpnext/issues/8493 2017-04-19 20:54:23 +05:30
Kanchan Chauhan
0633df5872 Item variant searchable in website products 2017-04-19 20:51:43 +05:30
Rohit Waghchaure
f4f774d1df [fix] offline_pos_name is not defined during print from the POS 2017-04-19 20:50:35 +05:30
Faris Ansari
695327a513 Duplicate dependencies when project is duplicated
- fix frappe/erpnext#8274
2017-04-19 20:48:49 +05:30
Rohit Waghchaure
019501e4a0 [fix] Balance Sheet, linking account to general ledger is not working 2017-04-19 20:46:30 +05:30
Nabin Hait
2704162f5a Fixes allowd on submit 2017-04-19 16:25:39 +05:30
Nabin Hait
117be7ddd5 Added a settings in Accounts Settings to disable booking depreciation entry automatically 2017-04-18 14:03:06 +05:30
Nabin Hait
f59920500c Merge branch 'develop' of github.com:nabinhait/erpnext into develop 2017-04-18 13:13:38 +05:30
Nabin Hait
8a01980757 Unlink Journal Entry reference from Asset 2017-04-18 13:11:10 +05:30
mbauskar
5123a8519b [minor] check if joining date is available before validating attandance date 2017-04-18 11:08:57 +05:30
Rohit Waghchaure
d7de3c606b [fix] Pricing rule for pos 2017-04-17 17:32:36 +05:30
Rohit Waghchaure
dc981dc546 [fix] Auto serial no fecthed on the invoice even if stock update is disabled issue 2017-04-17 17:31:32 +05:30
Nabin Hait
ed019123e2 Merge branch 'develop' 2017-04-17 15:36:59 +05:30
Nabin Hait
4d1cf53466 bumped to version 8.0.13 2017-04-17 16:06:58 +06:00
Nabin Hait
e2431fd5e9 minor fix 2017-04-17 15:35:36 +05:30
Nabin Hait
d12a4f5e8c Merge branch 'develop' 2017-04-17 15:12:18 +05:30
Nabin Hait
ad65be8250 bumped to version 8.0.12 2017-04-17 15:42:17 +06:00
Manas Solanki
ae30026005 Calender view fix for course schedule 2017-04-17 14:55:54 +05:30
Manas Solanki
54c4240d9c Changes in the program enrollment 2017-04-17 14:55:54 +05:30
Manas Solanki
79683d0871 Added school setting 2017-04-17 14:55:54 +05:30
Manas Solanki
a6d1876958 Changes in course and program 2017-04-17 14:55:54 +05:30
Manas Solanki
346928f2bc changes in program enrollment and tool 2017-04-17 14:55:54 +05:30
Nabin Hait
310d238d17 Merge pull request #8460 from rohitwaghchaure/client_followup_report
Client followup report
2017-04-17 14:13:38 +05:30
Nabin Hait
5e25731188 Update crm_reports.md 2017-04-17 14:13:20 +05:30
Nabin Hait
83ca262e38 Merge pull request #8453 from StrellaGroup/develop
[fix] Stock Entry - Change "Is Sample Item" to "Allow Zero Valuation Rate"
2017-04-17 14:00:12 +05:30
mbauskar
8a2e6f427b [minor] if address is not found then set the address_field to '' instead of None 2017-04-17 13:58:52 +05:30
Faris Ansari
8371c1c4cd Text overflow fix for product text in portal 2017-04-17 13:57:19 +05:30
Julian Robbins
361e7f6ddc Remove typos and use better English 2017-04-17 13:56:53 +05:30
rohitwaghchaure
798fd3484f Merge pull request #8469 from mbauskar/pos-fixes
[minor] POS & RFQ format_number fixes
2017-04-17 13:04:24 +05:30
mbauskar
22cedeb006 [minor] POS & RFQ format_number fixes 2017-04-17 12:24:24 +05:30
Rushabh Mehta
e3c117e32c [fix] validate preferred email if set in employee.py 2017-04-15 16:59:39 +05:30
Nabin Hait
68a8b0c2a9 Merge branch 'develop' 2017-04-14 17:32:37 +05:30
Nabin Hait
307543f968 bumped to version 8.0.11 2017-04-14 18:02:37 +06:00
Rohit Waghchaure
6681b0d2aa Documentation 2017-04-14 17:14:03 +05:30
Javier Wong
54d9c9eaf4 Merge branch 'develop' into develop 2017-04-14 18:33:44 +08:00
Javier Wong
9b11d9b45d [fix] Stock Entry - Change "Is Sample Item" to "Allow Zero Valuation Rate" 2017-04-14 18:24:04 +08:00
mbauskar
cca55ddc33 [minor][hot] fixes for KeyError: from_date for stock balance report 2017-04-14 14:54:11 +05:30
Rohit Waghchaure
1c68509426 [enhance] Report for prospects engaged but not converted 2017-04-14 12:28:59 +05:30
mbauskar
1e05077b1f [minor] sales register report fixes 2017-04-14 09:59:49 +05:30
joezsweet
b81244342f Create en-GB.csv
- added for compatibility with frappe languages
2017-04-13 19:09:06 +05:30
CH
8e92250798 Correction of issue #8354 2017-04-13 18:59:51 +05:30
CH
d20ec25c92 Removal of double brackets to setup the chart of accounts in the setup wizard 2017-04-13 18:59:06 +05:30
Nabin Hait
25bcb14c1d Merge pull request #8440 from mbauskar/cart-fixes
[minor] fides for add to card button issue
2017-04-13 18:49:22 +05:30
Nabin Hait
f6149f1507 Merge pull request #8429 from ckosiegbu/payroll_updates
Statistical Components for Salary Structure
2017-04-13 18:48:47 +05:30
Nabin Hait
2f3585f949 Update salary_slip.js 2017-04-13 18:47:25 +05:30
mbauskar
ed8ad9cfee [minor] fides for add to card button issue 2017-04-13 18:45:09 +05:30
Nabin Hait
3a2727c9eb Merge pull request #8430 from mbauskar/stock-entry-supplier-address
[minor] fetch supplier address, address_display on supplier trigger
2017-04-13 18:45:09 +05:30
Nabin Hait
16d92e7270 Update update_supplier_address_in_stock_entry.py 2017-04-13 18:44:33 +05:30
Nabin Hait
8c7eb444ef Merge pull request #8439 from mbauskar/subsciption-fixes
[minor] validate email address before get update button click
2017-04-13 18:41:49 +05:30
mbauskar
9a0efc7710 [minor] validate email address before get update button click 2017-04-13 18:18:18 +05:30
mbauskar
3ddfce4f17 [patch] move supplier_address to address_display and set supplier_address in SE 2017-04-13 16:46:41 +05:30
ckosiegbu
a236f4e586 Space to Tabs on salary_slip.py 2017-04-13 10:28:10 +01:00
Nabin Hait
0b62c6ebd4 Merge pull request #8432 from mbauskar/bom-tree-fixes
[minor] fixes in bom tree view template
2017-04-13 14:36:45 +05:30
mbauskar
40ca4c3bbb [minor] fixes in bom tree view template 2017-04-13 14:29:19 +05:30
Nabin Hait
c454dc7af5 Merge pull request #8420 from netchampfaris/pos
[POS] Show stock quantity of items
2017-04-13 13:26:58 +05:30
Rushabh Mehta
994cef5ee3 [minor] fix imports in old patches 2017-04-13 13:14:05 +05:30
Faris Ansari
185762aeeb update label 2017-04-13 12:36:08 +05:30
mbauskar
1b32d913a2 [minor] fetch supplier address, address_display on supplier trigger 2017-04-13 11:55:20 +05:30
ckosiegbu
64f29f819a Introduce the ability to specify in a Salary Structure that a component is statistical. This allows components to be used in calculations without being added/deducted from earnings deductions. 2017-04-13 00:00:37 +01:00
Nabin Hait
2efe05c1ce Merge pull request #8263 from frappe/revert-8126-issue8094
Revert "Add link field Package Code (fixes #8094)"
2017-04-12 19:50:43 +05:30
Nabin Hait
17c675547d Merge branch 'develop' 2017-04-12 19:00:52 +05:30
Nabin Hait
a220e96867 bumped to version 8.0.10 2017-04-12 19:30:52 +06:00
mbauskar
e471b02172 [minor] if packed item warehouse not found then set the parent item warehouse to packed items 2017-04-12 18:51:01 +05:30
Faris Ansari
19f90e984e [POS] Show stock quantity of items
- frappe/erpnext#8247
2017-04-12 16:06:31 +05:30
Faris Ansari
b5608f9b14 [fix] Default Print Format for Sales Invoice (#8419)
- frappe/erpnext#8416
2017-04-12 15:31:01 +05:30
rohitwaghchaure
5adce495aa Merge pull request #8417 from rohitwaghchaure/due_date_issue
[fix] POS, Due Date cannot be before Posting Date
2017-04-12 14:43:21 +05:30
Rushabh Mehta
66272a168d [minor] README.md + encode query parameter in search 2017-04-12 14:32:07 +05:30
Rohit Waghchaure
2192c244c0 [fix] POS, Due Date cannot be before Posting Date 2017-04-12 13:19:05 +05:30
Makarand Bauskar
141c244ece [minor] added order by args to get_*_list methods (#8413) 2017-04-12 13:02:28 +05:30
Nabin Hait
a57b020620 Merge branch 'develop' 2017-04-11 19:14:12 +05:30
Nabin Hait
d1fda1ff2b bumped to version 8.0.9 2017-04-11 19:44:12 +06:00
mbauskar
b9d0e7622a [translation] translation updates for - erpnext on 2017-04-04 2017-04-11 18:57:48 +05:30
mbauskar
2f9703c20e [minor] set company_currency as account_currency in general ledger if party type is employee 2017-04-11 18:56:41 +05:30
Khairil Zhafri
46b6d4ea47 Update student.json
Less binary gender option for Student
2017-04-11 18:55:31 +05:30
Khairil Zhafri
417145bec5 Update employee.json
Less binary gender options for Employee
2017-04-11 18:55:20 +05:30
Rohit Waghchaure
1ff1368280 [fix] Vehicle expense report not working 2017-04-11 18:54:32 +05:30
joezsweet
768a888bf2 [fix] validate supplier invoice
- modified to check for the selected supplier only
2017-04-11 18:52:46 +05:30
Julian Robbins
8037a0e3d5 Update assignment.md
A typo and improvement tom English
2017-04-11 18:51:34 +05:30
mbauskar
0b665ac791 [minor] don't throw error for buying transactions if price list is not selected 2017-04-11 18:51:12 +05:30
Rohit Waghchaure
87ad6d074a [enhance] Stock qty added in purchase invoice 2017-04-11 18:29:52 +05:30
Kanchan Chauhan
95108ac80b [Minor] Party validation for Employee 2017-04-11 18:29:27 +05:30
Dominik Ottenbreit
9b9777be3f Fix mistranslation "Lieferantennauftrag" -> "Bestellung"
There is the strange term of "Lieferantenauftrag" that has been used for
"Purchase Order" which translates to "Supplier Order". This is not
standard at all and should be fixed to "Bestellung".

A Google search for "Bestellung" returns 97 million results, a search
for "Lieferantenauftrag" returns 972 results so it should be clear what
is standard.
2017-04-11 18:28:35 +05:30
Nabin Hait
075b299673 bom traversing: argument mutable issue 2017-04-11 18:27:34 +05:30
mbauskar
e0271a8331 [minor] ReferenceError:doc fixes for delivery note 2017-04-11 17:54:22 +05:30
Nabin Hait
3fc3305251 bom traversing: argument mutable issue 2017-04-11 16:00:48 +05:30
mbauskar
236f7aac7f [minor] track changes for transaction documents 2017-04-10 14:48:54 +05:30
Manas Solanki
29ee263093 Fix in student attendacne tool 2017-04-10 14:33:35 +05:30
Makarand Bauskar
4782e8b751 [minor] added safe_eval for status_updater and added getdate and nowdate (#8365) 2017-04-07 17:16:16 +05:30
Rushabh Mehta
b58979fd3e [added] frappe.safe_eval 2017-04-06 18:58:39 +05:30
Rushabh Mehta
9365641777 [added] frappe.safe_eval 2017-04-06 18:24:34 +05:30
Nabin Hait
5e9d72d57b Merge branch 'develop' 2017-04-06 16:32:04 +05:30
Nabin Hait
0d230afd22 bumped to version 8.0.8 2017-04-06 17:02:03 +06:00
Makis Etzoglou
a906b3f11c add delivery date to print format Fix #8111 2017-04-06 15:47:52 +05:30
Kanchan Chauhan
aa6f00c403 Added default 'All' option to filters to differentiate all and empty filter 2017-04-06 15:22:18 +05:30
Nabin Hait
d681c88d79 validate returned qty only if there is reference qty 2017-04-06 15:20:45 +05:30
Javier Wong
fc11fce990 [enhancement] Changed Issue Description and Resolution to Text Editor (#8346) 2017-04-06 14:56:44 +05:30
Rohit Waghchaure
faf51d91b6 [fix] stock qty issue in purchase trends report 2017-04-05 14:53:26 +05:30
Rushabh Mehta
08a42e00ae [fix] salary slip eval, remove access to globals, #8313 2017-04-05 14:52:22 +05:30
Nabin Hait
549a2827e5 Merge pull request #8300 from rohitwaghchaure/customer_edit_issue_v8
[fix] Customer edit issue in offline POS
2017-04-05 14:51:44 +05:30
Rushabh Mehta
9264313f0e [fix] ordering for Edit Posting Time check 2017-04-05 12:49:01 +05:30
Nabin Hait
8013d1813a Merge pull request #8320 from manassolanki/newsl
Route to newsletter listview
2017-04-05 12:33:14 +05:30
Rushabh Mehta
ffc807cd57 [minor] check below posting date in delivery note 2017-04-05 12:27:41 +05:30
Manas Solanki
ba6559c2e9 Route to newsletter listview 2017-04-05 11:52:23 +05:30
Nabin Hait
7eea52d4e9 Merge branch 'develop' 2017-04-04 11:46:47 +05:30
Nabin Hait
93a990f006 bumped to version 8.0.7 2017-04-04 12:16:47 +06:00
Rohit Waghchaure
2861955632 [fix] Customer edit issue in offline POS 2017-04-04 09:59:29 +05:30
Nabin Hait
099163b16d Merge pull request #8296 from netchampfaris/customer-list-fix
Add `image` field to fetch in Customer List
2017-04-04 09:39:22 +05:30
Faris Ansari
0d114b4c31 Add image field to fetch in Customer List 2017-04-03 21:21:50 +05:30
Nabin Hait
fcf34dc570 Merge pull request #8295 from saurabh6790/demo_fix
[fix] demo script for setup data
2017-04-03 17:56:47 +05:30
Nabin Hait
6f038bc1f3 Validate total advance against grand total considering write off amount 2017-04-03 17:56:05 +05:30
Nabin Hait
9300013acc Validate total advance against grand total considering write off amount 2017-04-03 17:35:58 +05:30
Nabin Hait
8d8cba7faa Validate total advance against grand total considering write off amount 2017-04-03 17:26:32 +05:30
Nabin Hait
2d132e32aa Function name changed in company 2017-04-03 17:26:32 +05:30
Saurabh
2e47654f43 [fix] demo script for setup data 2017-04-03 17:25:55 +05:30
Nabin Hait
9bfa0ab7eb Merge branch 'develop' 2017-04-03 13:18:14 +05:30
Nabin Hait
17ddd8f389 bumped to version 8.0.6 2017-04-03 13:48:13 +06:00
Nabin Hait
c469f2c954 Get POS profile fix 2017-04-03 13:01:11 +05:30
Nabin Hait
731efe3a95 Minor fix in gross profit report 2017-04-03 12:11:36 +05:30
Nabin Hait
2c892c7e7f Indentation fixed in gross profit report 2017-04-03 12:05:35 +05:30
Nabin Hait
e6b5843a1f Merge branch 'develop' 2017-04-01 19:02:55 +05:30
Nabin Hait
31334328ed bumped to version 8.0.5 2017-04-01 19:32:55 +06:00
Rushabh Mehta
0d6db6c42c [fix] add user default role 2017-03-31 23:02:19 +05:30
Nabin Hait
ed0422a8d9 Merge branch 'develop' 2017-03-31 18:19:57 +05:30
Nabin Hait
d991c8666c bumped to version 8.0.4 2017-03-31 18:49:57 +06:00
Nabin Hait
85d1c07519 Merge pull request #8269 from rohitwaghchaure/v8_documentation
[Documentation] Added for custom roles for page and report, fixed some broken images
2017-03-31 18:04:44 +05:30
Nabin Hait
04ab7dfd2f Update role-permisison-for-page-and-report.md 2017-03-31 18:04:15 +05:30
Faris Ansari
eae30e5642 [fix] Show project title in kanban view (#8268)
- frappe/erpnext#8232
2017-03-31 17:46:12 +05:30
Nabin Hait
065302298f Merge pull request #8261 from rohitwaghchaure/pull_project_from_bom_to_po
[enhance] Get project from bom on production order
2017-03-31 17:40:43 +05:30
Nabin Hait
9f84a99158 Merge pull request #8258 from rohitwaghchaure/gross_profit_issue_v_8
[fix] get_valuation_rate takes 4 arguments 3 given in gross profit report
2017-03-31 17:39:58 +05:30
Nabin Hait
b15d999147 Merge branch 'develop' into gross_profit_issue_v_8 2017-03-31 17:39:45 +05:30
Rushabh Mehta
4b0381c820 [fix] tests 2017-03-31 17:36:48 +05:30
Rushabh Mehta
f0b4562a95 [refactor] move purchase_common.js -> public/js/controllers/buying.js 2017-03-31 17:36:48 +05:30
Rushabh Mehta
cc8b2b2fdb [fix] [refactor] demo for v8 and remove purchase common 2017-03-31 17:36:48 +05:30
Rohit Waghchaure
67a3e65f08 [Documentation] Added for custom roles for page and report, fixed some broken images 2017-03-31 17:22:58 +05:30
Rushabh Mehta
dc89916aa9 [fix] salary component fix for abbr 2017-03-31 17:20:57 +05:30
Rushabh Mehta
9d9cb8b7b1 Revert "Add link field Package Code (fixes #8094)" 2017-03-31 14:35:23 +05:30
Rohit Waghchaure
e7c0188732 [enhance] Get project from bom on production order 2017-03-31 13:40:06 +05:30
Rohit Waghchaure
34b1dba9aa [fix] get_valuation_rate takes 4 arguments 3 given in gross profit report 2017-03-31 12:44:10 +05:30
Nabin Hait
c040015bb5 Used db_update in patch to bypass validate and on_update method 2017-03-31 11:58:19 +05:30
Rushabh Mehta
b66edd19ca [minor] refactor transaction.js 2017-03-31 10:50:58 +05:30
Nabin Hait
b596deb57d Merge branch 'hotfix' 2017-03-30 23:50:27 +05:30
Nabin Hait
79fddcfac1 bumped to version 8.0.3 2017-03-31 00:20:27 +06:00
Revant Nandgaonkar
3d5bdeb90d [Fix] patch v7_2.contact_address_links 2017-03-30 23:14:58 +05:30
Revant Nandgaonkar
d07c041125 [Fix] Addresses linked back to Lead 2017-03-30 23:14:58 +05:30
Nabin Hait
e64b75153a Merge branch 'hotfix' 2017-03-30 19:52:42 +05:30
Nabin Hait
b207a0542a bumped to version 8.0.2 2017-03-30 20:22:42 +06:00
Nabin Hait
620bde7144 Updated modified date to reload sales uom 2017-03-30 19:50:45 +05:30
Nabin Hait
a8b2cdf65a Merge branch 'hotfix' 2017-03-30 19:35:51 +05:30
Nabin Hait
896fd1aca7 bumped to version 8.0.1 2017-03-30 20:05:51 +06:00
Nabin Hait
e503f68ec7 Merge pull request #8229 from rohitwaghchaure/pos_highlight_issue
[fix] POS cart item's highlighted issue
2017-03-30 19:26:33 +05:30
Rohit Waghchaure
a86bb69adf [fix] POS cart item's highlighted issue 2017-03-30 19:16:38 +05:30
Nabin Hait
80b3cf22eb Merge branch 'develop' 2017-03-30 18:28:22 +05:30
Nabin Hait
3b5b081ac4 bumped to version 8.0.0 2017-03-30 18:58:20 +06:00
Nabin Hait
d00218ece3 Merge pull request #8227 from manassolanki/contact_report
Addition of few more fields in student contact report
2017-03-30 17:43:33 +05:30
Nabin Hait
93c15383b8 [translations] 2017-03-30 16:57:19 +05:30
Nabin Hait
3c2be33adf Merge pull request #8226 from mbauskar/item-varient-fix
[minor] make varient fixes in item.js
2017-03-30 16:05:34 +05:30
Manas Solanki
4be52d8a20 Addition of few more fields in student contact report 2017-03-30 16:04:26 +05:30
Nabin Hait
6bd791742f Change log for version 8 2017-03-30 16:00:43 +05:30
mbauskar
90d82be966 [minor] make varient fixes in item.js 2017-03-30 15:36:46 +05:30
Nabin Hait
eb6fa5b70c Update attendance.py 2017-03-30 14:11:47 +05:30
Nabin Hait
1f6bd0ad37 Fixed merge conflict 2017-03-30 13:15:22 +05:30
Nabin Hait
c4894a5287 Merge branch 'hotfix' 2017-03-30 13:14:34 +05:30
Nabin Hait
a9bef56a94 bumped to version 7.2.32 2017-03-30 13:44:34 +06:00
Nabin Hait
f90a3295c4 Merge pull request #8213 from KanchanChauhan/update-disbursment-date
Disbursement Date fetched from JV - Employee Loan
2017-03-30 13:06:40 +05:30
Nabin Hait
a24f8dbb8f Merge branch 'develop' into update-disbursment-date 2017-03-30 13:06:28 +05:30
Kanchan Chauhan
37d8f643cc Read permissions to Employee on Employee Loan and Loan Type 2017-03-30 13:05:49 +05:30
Kanchan Chauhan
400c6f5aef Disbursement Date fetched from JV - Employee Loan 2017-03-30 13:04:05 +05:30
mbauskar
07e6bdd4f2 [minor] check employee date of joining before marking the employee attendance 2017-03-30 12:52:29 +05:30
Kanchan Chauhan
b87c174898 Employee Loan Dashboard 2017-03-30 12:51:46 +05:30
CH
99752e58ec VAT rates update for France 2017-03-30 12:45:08 +05:30
Kanchan Chauhan
5ac740b3cb [Fix] From Date and To Date not to be auto calculated for Timesheet Salary 2017-03-30 12:44:28 +05:30
Manas Solanki
3528d08178 [Fix] Fix in program enrollment tool and report 2017-03-30 12:21:49 +05:30
Nabin Hait
f912317fae Stock Balance: Show records based on all child item groups if filters set based on group node 2017-03-29 18:08:10 +05:30
Nabin Hait
e2fef16d78 Made join_table query optional based on item group filter 2017-03-29 17:51:05 +05:30
Javier Wong
41bf1ba7b3 [enhancement] Stock Balance Report - Added Item Group Filter 2017-03-29 17:51:05 +05:30
Ricardo Johann
3d1434afe7 Export total labels 2017-03-29 17:44:17 +05:30
addymuliady
0dd00eb418 Update accounts-settings.md 2017-03-29 17:40:01 +05:30
Nabin Hait
64e9c4abf4 Changed label of hide_tax_id field 2017-03-29 17:39:08 +05:30
Makis Etzoglou
82e6bc45e4 tax_id add to Sales Order, Delivery Note, and Sales Invoice 2017-03-29 17:39:08 +05:30
Saurabh
a5ddeb44e7 [fix] remove integraton service reference from documentation 2017-03-29 17:32:04 +05:30
Kanchan Chauhan
35b12e2ea6 Company in Leave Control Panel 2017-03-29 17:30:56 +05:30
mbauskar
de98ff6bb9 [minor] hide the stock details section if update_stock is unchecked 2017-03-29 17:29:58 +05:30
rohitwaghchaure
afa93c624b [fix] Reserved qty is not calculating properly in BIN for multi sales UOM (#8203) 2017-03-29 17:29:20 +05:30
Manas Solanki
8519b4bfe4 Changes in Program Enrollment and Report for Student Contact Details (#8176)
* Added the student house name in the program enrollment

* added report for the student contact details

* Enabled tag in Student master and fix in student enrollment tool

* [Fix] School House and Report
2017-03-29 16:07:31 +05:30
Nabin Hait
79731360ed Merge pull request #8126 from kickapoo/issue8094
Add link field Package Code (fixes #8094)
2017-03-28 20:48:39 +05:30
Nabin Hait
fede6d8fbe Updated modified date for production order 2017-03-28 20:42:42 +05:30
Stavros Anastasiadis
b9bbb3c3db Add link field Package Code (fixes #8093) 2017-03-28 16:09:52 +03:00
Nabin Hait
11812db5e8 Merge pull request #8183 from neilLasrado/minor-fix
Fixed issue with misleading error message on Stock Entry creation of Serialized Items
2017-03-28 18:08:42 +05:30
Neil Trini Lasrado
193c8919b9 Fixed issue with misleading error message on Stock Entry creation of Serialized Items 2017-03-28 17:43:23 +05:30
Nabin Hait
d1f6cc88f2 Required items table in Production order 2017-03-28 17:08:40 +05:30
Nabin Hait
dac525433c Merge pull request #8178 from nabinhait/develop
Patch order changed for multiple uoms in sales cycle
2017-03-28 16:55:57 +05:30
rohitwaghchaure
e313c09fd7 Merge pull request #8182 from frappe/netchampfaris-patch-1
Update POS screenshot
2017-03-28 16:35:16 +05:30
Faris Ansari
49a3d6d8f6 Update POS screenshot 2017-03-28 16:17:30 +05:30
Nabin Hait
580682d6a2 Merge pull request #8136 from dottenbr/customs_tariff_number
Add Customs Tariff Number
2017-03-28 13:51:52 +05:30
Nabin Hait
6c3eb36c35 Merge branch 'develop' into customs_tariff_number 2017-03-28 13:51:44 +05:30
Nabin Hait
da749f716b Merge pull request #8172 from rohitwaghchaure/credit_note_serial_no_issue
[fix] During making credit note from sales invoice, system fetching new serial no instead of old serial no from the sales invoice
2017-03-28 13:49:32 +05:30
Nabin Hait
2cf5ca28f6 Merge pull request #8173 from nabinhait/hotfix
In gross profit report, if incoming rate not found from last sle, consider average valuation rate
2017-03-28 13:49:09 +05:30
Nabin Hait
95db9f9e09 Merge pull request #8175 from rohitwaghchaure/production_planning_issue
[fix] sales order with status closed fetching on production planning tool
2017-03-28 13:48:42 +05:30
Nabin Hait
621dcc3c84 Patch order changed for multiple uoms in sales cycle 2017-03-28 13:45:56 +05:30
Nabin Hait
010d9cd796 Merge branch 'dottenbr-manufacturer_childtable' into develop 2017-03-28 13:39:43 +05:30
Nabin Hait
77b2fef41e Fixed test cases 2017-03-28 13:39:26 +05:30
Nabin Hait
d20f8585ae Merge branch 'manufacturer_childtable' of https://github.com/dottenbr/erpnext into dottenbr-manufacturer_childtable 2017-03-28 13:31:28 +05:30
Rohit Waghchaure
d7908f8e3a [fix] sales order with status closed fetching on production planning tool 2017-03-28 12:30:23 +05:30
Nabin Hait
77c970549b In gross profit report, if incoming rate not found from last sle, consider average valuation rate 2017-03-28 12:20:31 +05:30
Rohit Waghchaure
5ecbaa408b [fix] During making credit note from sales invoice, system fetching new serial no instead of old serial no from the sales invoice 2017-03-28 12:09:07 +05:30
Nabin Hait
46e108b34e Merge pull request #8166 from nabinhait/pro_order_multi_level_bom_operations
Fetch operations from all sub-assembly BOMs in Pro Order if multi-level BOM is checked
2017-03-27 21:36:28 +05:30
Rushabh Mehta
fe5c95e360 Update CONTRIBUTING.md 2017-03-27 20:41:51 +05:30
Nabin Hait
0329c0ffab Test case fixed for production order 2017-03-27 19:11:45 +05:30
Nabin Hait
5b60ef2dce Fetch operations from all sub-assembly BOMs in Pro Order if multi-level BOM is checked 2017-03-27 16:29:51 +05:30
Nabin Hait
8bf58367b8 Fixed merge conflict 2017-03-27 12:30:01 +05:30
Nabin Hait
3e43f275a0 Merge branch 'hotfix' 2017-03-27 12:27:38 +05:30
Nabin Hait
70c3f79d12 bumped to version 7.2.31 2017-03-27 12:57:38 +06:00
Nabin Hait
9c8159be8f Merge pull request #8129 from rohitwaghchaure/pos_v8_enhance_and_issue
[fix] customer edit, numeric keypad visibility, on selection of item highlight the background issue in the pos
2017-03-27 12:25:18 +05:30
Nabin Hait
68fb20b811 Merge pull request #8131 from rohitwaghchaure/purchase_analytics_issue
[fix] Purchase analytics report not loading
2017-03-27 12:24:46 +05:30
Nabin Hait
a4f838b6b4 Merge pull request #8135 from dottenbr/de_translation_fix
Fix German Translation
2017-03-27 12:24:20 +05:30
Dominik Ottenbreit
fc9ed4da24 Add Customs Tariff Number 2017-03-24 15:53:03 +01:00
Dominik Ottenbreit
ea617da277 fix translations that have to do with term 'close' which was not well translated 2017-03-24 15:24:55 +01:00
Dominik Ottenbreit
6eb202ef3a fix patch after test, fix variant based on manufacturer, add json for item_manufacturer 2017-03-24 14:49:52 +01:00
Dominik Ottenbreit
3938c61996 migrate from manufacturer to manufacturer childtable 2017-03-24 14:24:34 +01:00
Rohit Waghchaure
f74b02140c [fix] Purchase analytics report not loading 2017-03-24 17:37:02 +05:30
Rohit Waghchaure
b719dc53fc [fix] customer edit and numeric keypad visibility issue in the pos 2017-03-24 17:03:50 +05:30
Nabin Hait
00b04ed61e Merge pull request #8076 from KanchanChauhan/qty-in-shopping-cart
Show qty in Shopping Cart
2017-03-24 13:14:03 +05:30
Nabin Hait
bf2a7efca4 Account name changed in standard chart of accounts 2017-03-24 13:01:35 +05:30
Nabin Hait
214ea8f2c8 Merge pull request #8119 from robulik/develop
[minor] fixes of translatable strings in web pages
2017-03-24 12:59:02 +05:30
Kanchan Chauhan
a844040781 Show qty in Shopping Cart 2017-03-23 18:22:02 +05:30
Robert Kirschner
b8f5148a44 [minor] fix: translatable title, h1, button on product_search page. Address row in web view has translatable address type 2017-03-23 13:43:26 +01:00
Nabin Hait
9ba1be60b7 Merge pull request #8039 from netchampfaris/pos-ui-fix
[pos] ui fix for small screens frappe/erpnext#8029
2017-03-23 17:14:39 +05:30
Nabin Hait
2aafdd622b Merge pull request #8047 from KanchanChauhan/warehouse-for-dropship
[Fix] Warehouse not required for Dropship
2017-03-23 17:06:18 +05:30
Nabin Hait
b6b97f25d0 Merge pull request #8048 from KanchanChauhan/bom-based-on-project
Project filter in BOM selection in Production Order
2017-03-23 17:04:53 +05:30
Nabin Hait
4a8a62a202 Merge pull request #8053 from umairsy/video-pages
updated erpnext-learn pages
2017-03-23 17:02:34 +05:30
Nabin Hait
d25e314ccb Merge pull request #8054 from rohitwaghchaure/purchase_return_issue_invoice
[fix] Quantity is not copying in the Received Qty during making of debit note from the purchase invoice
2017-03-23 17:01:58 +05:30
Nabin Hait
f44f04e33a Merge pull request #8063 from khrlzhfr/patch-1
Update standard_chart_of_accounts.py
2017-03-23 17:01:34 +05:30
Nabin Hait
b40efe34e3 Merge pull request #8067 from KanchanChauhan/issue-webview-fixed
[Fix] Issue web view fixed
2017-03-23 17:00:47 +05:30
Nabin Hait
691a34c924 Merge branch 'develop' into issue-webview-fixed 2017-03-23 17:00:30 +05:30
Robert Kirschner
db068ac6c4 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2017-03-23 12:29:43 +01:00
Nabin Hait
c7dc838306 Merge pull request #8068 from rohitwaghchaure/asset_depreciation_issue
[fix] Precision issue during making of depreciation schedule
2017-03-23 16:59:12 +05:30
Nabin Hait
5168286ea0 Merge pull request #8072 from lb-/patch-1
Update the-champion.md - grammar
2017-03-23 16:58:19 +05:30
Nabin Hait
8373b8e50d Merge pull request #8075 from netchampfaris/asset-image-fix
[fix] asset image in image view
2017-03-23 16:58:05 +05:30
Nabin Hait
33f2b659e4 Merge pull request #8079 from robulik/develop
[fix] selecting new address in cart webpage unchecks previously checked
2017-03-23 16:52:39 +05:30
Nabin Hait
8de911b5b4 Merge pull request #8086 from KanchanChauhan/read-perm-to-guest
[Minor] Guest should have read permissions on Job Openings
2017-03-23 16:50:45 +05:30
Robert Kirschner
d162eb367c [minor] fix translation strings in cart web view 2017-03-23 12:18:24 +01:00
Robert Kirschner
0af93a782d Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2017-03-23 12:10:46 +01:00
Nabin Hait
46bccb55c5 Merge pull request #8080 from rmehta/item-variants-by-mfg
[feature] ability to have variants based on manufacturer
2017-03-23 16:29:41 +05:30
Nabin Hait
422ef584fa Merge pull request #8090 from KanchanChauhan/date-span-in-salary-slip
[Minor] From date, To date based on Payroll Frequency
2017-03-23 16:16:51 +05:30
Nabin Hait
b132428184 Merge pull request #8091 from mbauskar/cart-address-fixes
[minor] fixed shipping and billing address issue in cart
2017-03-23 16:16:11 +05:30
Nabin Hait
a90ff97782 Merge pull request #8096 from frappe/netchampfaris-documentation
Update Workflows
2017-03-23 16:15:40 +05:30
Nabin Hait
1775a3db38 Merge pull request #8115 from rohitwaghchaure/setup_wizard_unpickle_issue
[fix] UnpickleError, removed _ method from the argument of the function
2017-03-23 16:14:52 +05:30
Rohit Waghchaure
57f35a25a1 [fix] UnpickleError, removed _ method from the argument of the function 2017-03-23 14:55:52 +05:30
Faris Ansari
3011006ff2 Merge pull request #8097 from frappe/netchampfaris-documentation-1
Add new screenshots for Workflows documentation
2017-03-22 17:50:17 +05:30
Faris Ansari
1e7f739c84 Add new screenshots for Workflows documentation 2017-03-22 17:48:51 +05:30
Faris Ansari
7fbc1c2161 Update Workflows
Add new images
2017-03-22 17:45:52 +05:30
mbauskar
67e3e32dd6 [minor] fixed shipping and billing address issue in cart 2017-03-22 16:14:43 +05:30
Kanchan Chauhan
076e9d6af8 [Minor] From date, To date based on Payroll Frequency 2017-03-22 16:07:03 +05:30
Robert Kirschner
c6b52a321e update on cart.js pull request feedback 2017-03-22 08:10:30 +01:00
Kanchan Chauhan
730ad5a507 [Minor] Guest should have read permissions on Job Openings 2017-03-22 12:37:38 +05:30
Rushabh Mehta
43583d6497 Update item.js 2017-03-21 17:49:53 +01:00
Rushabh Mehta
a07c43fd68 [feature] ability to have variants based on manufacturer 2017-03-21 17:48:34 +01:00
Robert Kirschner
0a33d4ffc5 [fix] selecting new address in cart web page unchecks previously checked address 2017-03-21 14:52:59 +01:00
Rohit Waghchaure
6ee91ec9c6 on selection of row highlight the background in the cart 2017-03-21 15:55:09 +05:30
Faris Ansari
e1acb766ac [fix] asset image in image view 2017-03-21 14:18:30 +05:30
LB (Ben Johnston)
71f4fbf467 Update the-champion.md - grammar 2017-03-21 12:50:17 +07:00
Rohit Waghchaure
b69d311268 [fix] precision issue during making of depreciation schedule 2017-03-20 16:30:34 +05:30
Kanchan Chauhan
6514e051be [Fix] Issue web view fixed 2017-03-20 15:31:54 +05:30
Khairil Zhafri
4d6d456a0d Update standard_chart_of_accounts.py
Minor spelling edits
2017-03-20 00:15:34 +08:00
Rohit Waghchaure
414c0ab3bb [fix] Quantity is not copying in the Received Qty during making of debit note 2017-03-17 17:19:17 +05:30
Umair Sayyed
024896d806 updated erpnext-learn pages 2017-03-17 12:55:01 +05:30
rohitwaghchaure
2b9c95a940 Merge pull request #8043 from rohitwaghchaure/pos_issue_v8
[fix] POS, amount not updating on change of price, on zero of discount rate has not reset, pricing rule not working for brand
2017-03-16 17:56:20 +05:30
Kanchan Chauhan
7cf1a1d84b Project filter in BOM selection in Production Order 2017-03-16 17:09:37 +05:30
Kanchan Chauhan
6f7457a1b0 [Fix] Warehouse not required for Dropship 2017-03-16 16:03:41 +05:30
Rohit Waghchaure
75177c0e35 [fix] POS, amount not updating on change of price, on zero of discount rate has not reset, pricing rule not working for brand 2017-03-16 15:47:25 +05:30
Faris Ansari
d79f239001 [pos] ui fix for small screens frappe/erpnext#8029 2017-03-16 12:18:35 +05:30
Nabin Hait
c26ae0036d Merge pull request #8033 from manassolanki/student_applicant
[Fix] Enrolling the student
2017-03-15 19:40:46 +05:30
Nabin Hait
f494626ce4 Merge pull request #8034 from mbauskar/hotfix
[minor] make item code mandatory if update_stock is selected
2017-03-15 19:40:20 +05:30
mbauskar
27efc91db0 [minor] make item code mandatory if update_stock is selected 2017-03-15 18:57:18 +05:30
Manas Solanki
ad2dc2c747 [Fix] Enrolling the student 2017-03-15 18:22:57 +05:30
Rushabh Mehta
f340e19ea7 [minor] field re-arrangements in sales invoice, purchase invoice, stock reco 2017-03-15 15:12:43 +05:30
Nabin Hait
56f650f342 Merge branch 'master' into develop 2017-03-15 11:28:07 +05:30
Nabin Hait
c1a5b348b5 Merge branch 'hotfix' 2017-03-15 11:28:06 +05:30
Nabin Hait
1157ee365b bumped to version 7.2.30 2017-03-15 11:58:06 +06:00
Nabin Hait
ee7b4f2882 Merge pull request #8016 from rmehta/posting-date-option
[feature] posting date, time is always current unless explicitly set
2017-03-15 11:22:04 +05:30
Nabin Hait
505ed25f10 Merge pull request #8017 from nabinhait/develop
Field order changed for 'Qty as per Stock UOM'
2017-03-14 22:39:36 +05:30
Nabin Hait
1ba71a0b3a Merge pull request #8018 from mbauskar/develop
[minor] custom script to create issue, lead, opportunity from email
2017-03-14 22:39:26 +05:30
Nabin Hait
79bce2a71d Merge pull request #8019 from rohitwaghchaure/pos_serial_no_issue
[fix] User sales one serial number multiple time from the POS
2017-03-14 22:38:28 +05:30
Rushabh Mehta
4f3da42b75 [fixes] for tests 2017-03-14 21:29:55 +05:30
Rushabh Mehta
131866a11a [fixes] for tests 2017-03-14 21:06:15 +05:30
Rushabh Mehta
82c258948d [fixes] for recurring and tests 2017-03-14 19:13:39 +05:30
Rohit Waghchaure
e259a9b068 [fix] User sales one serial number multiple time from the POS 2017-03-14 19:05:21 +05:30
mbauskar
f54b1047b8 [minor] custom script to create issue, lead, opportunity from email 2017-03-14 17:57:47 +05:30
Nabin Hait
3d731df7e3 Field order changed for 'Qty as per Stock UOM' 2017-03-14 17:24:57 +05:30
Nabin Hait
f86d73fdc8 Merge pull request #8015 from rohitwaghchaure/gross_profit_issue
[fix] Gross profit report permission issue
2017-03-14 17:24:18 +05:30
Rushabh Mehta
f6dee248ee Update company.json 2017-03-14 17:10:01 +05:30
Rushabh Mehta
6d4a52562b [fix] posting date, time is always current unless explicitly set 2017-03-14 17:06:51 +05:30
Rushabh Mehta
6b53792aea [fix] posting date, time is always current unless explicitly set 2017-03-14 17:06:51 +05:30
Rohit Waghchaure
faedf8274c [fix] gross profit permission issue 2017-03-14 14:56:24 +05:30
Nabin Hait
6a053a989e Merge pull request #8014 from rohitwaghchaure/contact_issue_for_website_generator
[fix] Removed customer, supplier and added link_name from website_list_for_contact file
2017-03-14 14:46:48 +05:30
Saurabh
0d47d51407 [fix] modified payment request to cope with new payment structure (#7957)
* [fix] modified payment request to cope with new payment structure

* [fix] moved payment gateway doctype from accounts to core
2017-03-14 14:46:05 +05:30
Nabin Hait
468726320c Merge pull request #8013 from manassolanki/shishuv
[Fix] Student attendance tool- Handling double-click on button
2017-03-14 14:28:58 +05:30
Rohit Waghchaure
11fa7a9311 [fix] Removed customer, supplier and added link_name from website_list_for_contact file 2017-03-14 13:26:10 +05:30
Manas Solanki
2922660b34 [Fix] Student attendance tool- Handling double-click on button 2017-03-14 12:50:58 +05:30
rohitwaghchaure
27e86201fc Merge pull request #8007 from rohitwaghchaure/pos_profile_issue
[fix] Value assignment issue for country field in pos profile
2017-03-14 00:22:23 +05:30
Rohit Waghchaure
cc034a8983 [fix] Value assignment issue for country in the pos profile 2017-03-13 22:44:48 +05:30
rohitwaghchaure
0216f6e6eb Merge pull request #7995 from saurabh6790/restrict_negative_qty_in_pr
[fix] validate negative quantity while creating purchase receipt
2017-03-13 18:24:24 +05:30
Nabin Hait
26ed675240 Merge pull request #7996 from netchampfaris/ui-fixes
[ui] show assignees in gantt popup frappe/erpnext#6916
2017-03-13 17:22:56 +05:30
Saurabh
4f4d0a8369 [fix] validate negative quantity while creating purchase receipt 2017-03-13 15:37:47 +05:30
Faris Ansari
df65d21225 [ui] show assignees in gantt popup frappe/erpnext#6916 2017-03-13 14:52:56 +05:30
Nabin Hait
86cb0cc010 Merge pull request #7991 from mbauskar/develop
[minor] display campaign field only if source is Campaign
2017-03-13 11:19:59 +05:30
mbauskar
7f42e90832 [minor] display campaign field only if source is Campaign 2017-03-12 21:57:52 +05:30
Nabin Hait
0afbee9441 Merge pull request #7988 from nabinhait/develop
Multiple version 8 fixes
2017-03-12 17:41:17 +05:30
Nabin Hait
1ed8bc4c36 Gross Profit report: Consider Sales team table only if grouped by sales person 2017-03-12 17:10:41 +05:30
Nabin Hait
b2a8482cc5 In Student Sibling table, the current student id should not appear as sibling. 2017-03-12 16:55:05 +05:30
Nabin Hait
fb4b8d926f Company based on exising company fix 2017-03-12 16:55:05 +05:30
Nabin Hait
ae205f878a Set default taxes and charges while creating quotation from opportunity 2017-03-12 16:55:05 +05:30
Nabin Hait
d0d22ff203 copy letter head from invoice to payment entry 2017-03-12 16:55:05 +05:30
Nabin Hait
6923397ef6 Show net total in salary slip log in Process Payroll. Fixed #7986 2017-03-12 16:55:05 +05:30
Nabin Hait
c5204f56e2 Merge pull request #7909 from KanchanChauhan/employee-loan-jv
JV on submitting Employee Loan
2017-03-12 16:50:48 +05:30
Nabin Hait
132193309c Merge pull request #7952 from KanchanChauhan/multiple-salary-fixes
Multiple Salary Fixes
2017-03-12 16:48:11 +05:30
Nabin Hait
d402829d17 Merge pull request #7980 from rohitwaghchaure/target_bounty_redesign
[Enhancement] POS Redesign and new features
2017-03-12 16:47:26 +05:30
Nabin Hait
fd9b2467d6 Merge pull request #7966 from rohitwaghchaure/item_variant_issue_for_nuermic
[Fix] Item variants broken when using naming series for items and vriants of numeric value
2017-03-12 16:34:40 +05:30
Nabin Hait
3e22a11a16 Merge pull request #7985 from mbauskar/develop
[minor] ignore lead addresses delete query if address against lead no…
2017-03-12 15:16:01 +05:30
mbauskar
124cf14429 [minor] ignore lead addresses delete query if address against lead not found 2017-03-11 16:02:20 +05:30
Rohit Waghchaure
0169341917 [Fix] Item variants broken when using naming series for items and vriants of numeric value 2017-03-10 19:40:08 +05:30
Rohit Waghchaure
87fa59a710 [Fix] Customer delete, customer edit functionality, added country field in the pos profile 2017-03-10 19:37:02 +05:30
Faris Ansari
1fe1518398 [pos] ui cleanup 2017-03-10 17:00:43 +05:30
Rohit Waghchaure
6068aecc2e minor fix 2017-03-10 17:00:43 +05:30
Faris Ansari
07c9f35779 ui cleanup 2017-03-10 17:00:42 +05:30
Faris Ansari
45510109b6 [pos] cleanup 2017-03-10 17:00:42 +05:30
Rohit Waghchaure
017f5005e0 fixed pos numeric keypad functionality 2017-03-10 17:00:42 +05:30
Faris Ansari
339d9c954a minor changes 2017-03-10 17:00:42 +05:30
Rohit Waghchaure
1312fe31a9 Provision to edit customer and address details 2017-03-10 17:00:42 +05:30
Faris Ansari
adcb3c62fa wip 2017-03-10 17:00:42 +05:30
Rohit Waghchaure
3b5a412a9c offline email for POS 2017-03-10 17:00:41 +05:30
Rohit Waghchaure
56a7974b58 added event on numeric keypad 2017-03-10 17:00:41 +05:30
Rohit Waghchaure
86ab6a93b4 [Enhancement] POS, numeric keypad 2017-03-10 17:00:41 +05:30
Faris Ansari
1f261a8695 UI changes 2017-03-10 17:00:41 +05:30
Rohit Waghchaure
b5097ec161 offline email for POS 2017-03-10 17:00:41 +05:30
Rohit Waghchaure
f0c7ba4b1f added event on numeric keypad 2017-03-10 17:00:40 +05:30
Rohit Waghchaure
e30f83a8af [Enhancement] POS, numeric keypad 2017-03-10 17:00:40 +05:30
Nabin Hait
e7e82fe477 Merge pull request #7970 from rmehta/sample-tasks
Descriptions on sample tasks
2017-03-10 14:58:52 +05:30
Rushabh Mehta
83aa5ee3df [messages] cleanup 2017-03-10 12:47:29 +05:30
Rushabh Mehta
db206f2d10 [minor] develop_version 2017-03-10 09:39:31 +05:30
Rushabh Mehta
868bb26e24 [sample] add help for sample tasks and make them into notifications 2017-03-09 18:11:11 +05:30
Kanchan Chauhan
37a57813fa Multiple Salary Fixes 2017-03-09 13:00:35 +05:30
Rushabh Mehta
aea1c2a1e3 [minor] allow sales order delivery date before order date 2017-03-09 12:46:51 +05:30
Kanchan Chauhan
ffd1f112e6 JV on submitting Employee Loan 2017-03-09 12:21:37 +05:30
Nabin Hait
733855a4c3 Merge pull request #7956 from manassolanki/sibling
[Fixes] School
2017-03-09 11:04:38 +05:30
Nabin Hait
d22bb682a5 Merge pull request #7960 from rohitwaghchaure/material_request_issue_for_po
[Fix] Material Request to Production Order not working
2017-03-09 10:57:26 +05:30
Nabin Hait
f73a44aa8d Update material_request.py 2017-03-09 10:57:00 +05:30
Nabin Hait
1fde71b3c0 Merge pull request #7959 from KanchanChauhan/expense-claim-fix
[Minor] Label change in Expense Claim
2017-03-09 10:53:13 +05:30
Rohit Waghchaure
02fb5880fe [Fix] Material Request to Production Order not working 2017-03-08 18:38:12 +05:30
Kanchan Chauhan
a64f53801b [Minor] Label change in Expense Claim 2017-03-08 16:59:49 +05:30
Manas Solanki
631fab012f [Fix] Student attendance tool 2017-03-08 14:44:52 +05:30
Manas Solanki
d41836b386 [Fix] Student Sibling 2017-03-08 14:44:52 +05:30
Nabin Hait
52daaca885 Fixed merge conflict 2017-03-08 14:30:38 +05:30
Nabin Hait
89d494fbf5 Merge branch 'hotfix' 2017-03-08 14:30:12 +05:30
Nabin Hait
27c4fdc2df bumped to version 7.2.29 2017-03-08 15:00:12 +06:00
Nabin Hait
804c4fc4a7 Merge pull request #7951 from rohitwaghchaure/purchase_return_issue
[Fix] Purchase return issue
2017-03-08 14:28:55 +05:30
Nabin Hait
842d4fcf53 Merge pull request #7954 from mbauskar/hotfix
removed the test_clear_blank_rows test case from JE
2017-03-08 14:19:04 +05:30
mbauskar
02198ec8b0 removed the test_clear_blank_rows test case from JE 2017-03-08 12:34:36 +05:30
Rushabh Mehta
b9cdb05934 [minor] renamed portal hook 2017-03-08 12:34:03 +05:30
Nabin Hait
33fb6ae323 Fixed merge conflict 2017-03-08 11:18:15 +05:30
Nabin Hait
40f5d1845f Merge branch 'hotfix' 2017-03-08 11:16:00 +05:30
Nabin Hait
f967206523 bumped to version 7.2.28 2017-03-08 11:46:00 +06:00
Rohit Waghchaure
d05a8737f9 [Fix] Purchase return issue 2017-03-08 10:30:23 +05:30
Nabin Hait
1af471a16f Merge pull request #7938 from netchampfaris/task-list
[gantt] show task project in popup
2017-03-07 19:41:52 +05:30
Nabin Hait
f822b875ba Merge pull request #7941 from nabinhait/v8_fixes
Set new name in warehouse_name on rename of warehosue
2017-03-07 17:16:44 +05:30
Nabin Hait
229764b7bf Merge pull request #7939 from hereabdulla/patch-2
Only enabled user to be fetched
2017-03-07 17:16:31 +05:30
Nabin Hait
961bdc3743 Set new name in warehouse_name on rename of warehosue 2017-03-07 15:02:34 +05:30
Abdulla P I
cbe035b08a Only enabled user to be fetched 2017-03-07 13:34:08 +05:30
Nabin Hait
44bc6ab242 Merge pull request #7937 from mbauskar/hotfix
[minor] allowed the credit and debit amount to be 0 in JE
2017-03-07 12:56:02 +05:30
Faris Ansari
0e4b924f59 [gantt] show task project in popup 2017-03-07 12:01:39 +05:30
mbauskar
c03f275e7a [minor] allowed the credit and debit amount to be 0 in JE 2017-03-07 11:59:55 +05:30
Nabin Hait
f5a9c8ecf2 Merge pull request #7936 from rohitwaghchaure/financial_statement_issue
Minor fix
2017-03-07 00:27:53 +05:30
Rohit Waghchaure
9f4317e9b8 minor fix 2017-03-06 23:42:45 +05:30
Nabin Hait
1a735f2f5a Merge pull request #7933 from rohitwaghchaure/minor_fix_patch
minor fix in patch
2017-03-06 20:32:47 +05:30
Rohit Waghchaure
0bb434af3f minor fix in patch 2017-03-06 18:52:34 +05:30
Nabin Hait
b3ffd6b282 Merge pull request #7828 from rohitwaghchaure/update_user_roles_to_roles
Changed userrole to has role, commonify role editor of the user
2017-03-06 18:44:53 +05:30
Nabin Hait
439a39bbbb Merge pull request #7922 from nabinhait/uom-conversion-in-selling
Uom conversion in selling
2017-03-06 17:28:41 +05:30
Nabin Hait
fe876c0805 Test case fixed for multiple uom in selling 2017-03-06 16:41:13 +05:30
Nabin Hait
e68f32cf19 UOM Conversion in selling 2017-03-06 16:41:13 +05:30
Kanchan Chauhan
5a980ac87a UOM Conversion in Selling 2017-03-06 16:41:12 +05:30
Nabin Hait
0697d62603 Merge pull request #7931 from KanchanChauhan/job-applicant-fix
[Fix] Candidate can apply to multiple jobs
2017-03-06 16:38:00 +05:30
Rohit Waghchaure
611a70a12a changes in the report roles 2017-03-06 16:36:46 +05:30
Kanchan Chauhan
8411be7720 [Fix] Candidate can apply to multiple jobs 2017-03-06 14:40:43 +05:30
Nabin Hait
8981ecf170 Merge pull request #7926 from svigneux/patch-2
Update batch.md
2017-03-06 14:37:39 +05:30
Rohit Waghchaure
e7485150a1 added roles in the report 2017-03-06 14:26:09 +05:30
Rohit Waghchaure
312498060f changed doctype name userrole to has role 2017-03-06 14:24:39 +05:30
Rohit Waghchaure
d59f8b32cd changed user_roles to roles 2017-03-06 14:24:39 +05:30
S. Vigneux
ff2d5d8ad9 Update batch.md
The practice=> The practice
2017-03-05 12:44:03 -05:00
Nabin Hait
a07c3193cf Merge pull request #7889 from rohitwaghchaure/sales_return_issue_for_pos
[Fix] Sales Return Invoice (Is POS) doesn't show correct payment data
2017-03-04 18:32:40 +05:30
Nabin Hait
feb45727e5 Merge pull request #7912 from mbauskar/develop
[minor] fixes contact field set query for opportunity
2017-03-04 18:31:09 +05:30
Nabin Hait
9e6e718ee1 Merge pull request #7913 from rohitwaghchaure/minor_fix
Removed fiscal year and month from the print of monthly salary register
2017-03-04 18:30:44 +05:30
Rohit Waghchaure
a31ffbc745 [Fix] Sales Return Invoice (Is POS) doesn't show correct payment data 2017-03-03 16:28:49 +05:30
Rohit Waghchaure
f8aa6ed46b removed fiscal year and month from the print 2017-03-02 17:51:15 +05:30
mbauskar
91c6ffde86 [minor] fixes contact field set query for opportunity 2017-03-02 17:29:16 +05:30
Nabin Hait
78a650062c Update company.json 2017-03-02 14:48:49 +05:30
Nabin Hait
57a47a83a0 Merge pull request #7887 from rohitwaghchaure/capacity_planning
[Fix] Pull operation on production order, when making from sales order
2017-03-02 14:17:09 +05:30
Nabin Hait
a0fb3e5128 Merge pull request #7888 from KanchanChauhan/payroll-fix
[Fix] JV entry for Employee Loan only if Loan exists
2017-03-02 14:15:59 +05:30
Nabin Hait
42bc399f2a Merge pull request #7890 from KanchanChauhan/hr-page
[Minor] Employee Loan Management moved up in  HR Page
2017-03-02 14:14:04 +05:30
Nabin Hait
bc10ea897d Merge pull request #7893 from pratu16x7/crm-docs
CRM docs update
2017-03-02 14:13:19 +05:30
Nabin Hait
17cf220cbc Merge pull request #7908 from KanchanChauhan/removed-paid-status
[Minor] Removed Paid status from Salary Slip
2017-03-02 14:12:34 +05:30
Kanchan Chauhan
cfb0adff98 [Minor] Removed Paid status from Salary Slip 2017-03-02 12:59:35 +05:30
Nabin Hait
834d616c60 Merge branch 'master' into develop 2017-03-02 12:38:15 +05:30
Nabin Hait
c99f85d84c Merge branch 'hotfix' 2017-03-02 12:38:14 +05:30
Nabin Hait
1cc7024cb4 bumped to version 7.2.27 2017-03-02 13:08:14 +06:00
Rushabh Mehta
7067ff026a [minor] add progress in desktop help message 2017-03-02 11:14:09 +05:30
Rushabh Mehta
e7900b24a0 [minor] add progress in desktop help message 2017-03-02 11:13:18 +05:30
Saurabh
e95b6e75ac Merge pull request #7905 from saurabh6790/demo_data_setup_fix
[fix] add from date field to salary structure in setup demo data
2017-03-02 08:53:27 +05:30
Saurabh
b3134d34fa [fix] add from date field to salary structure in setup demo data 2017-03-02 08:43:08 +05:30
Nabin Hait
258c8199fb Merge pull request #7842 from superlack/develop
Add Sales Orders to Project costing and billing section
2017-03-01 17:20:23 +05:30
pratu16x7
4e71337f3d fix lead, customer, opportunity pages 2017-03-01 04:02:50 +05:30
Nabin Hait
18b7364a81 Merge branch 'master' into develop 2017-02-28 18:56:26 +05:30
Nabin Hait
093eba2336 Merge branch 'hotfix' 2017-02-28 18:56:25 +05:30
Nabin Hait
db2aefa3a6 bumped to version 7.2.26 2017-02-28 19:26:25 +06:00
Rushabh Mehta
f8b19e07cf [minor] activation messages only for non activated users 2017-02-28 18:54:07 +05:30
Kanchan Chauhan
639eebdae5 [Minor] Employee Loan Management moved up in HR Page 2017-02-28 18:01:07 +05:30
Kanchan Chauhan
e6254b96c4 [Fix] JV entry for Loan only if Loan exists 2017-02-28 17:42:09 +05:30
Rohit Waghchaure
2c2ce8c557 [Fix] Pull operation on production order, when making from sales order 2017-02-28 17:12:18 +05:30
Nabin Hait
8312f1cd64 Merge pull request #7671 from bcornwellmott/link_mrs
Created button to link buying items to material requests
2017-02-28 15:56:06 +05:30
Nabin Hait
6bbf141d57 Merge branch 'develop' into link_mrs 2017-02-28 15:55:35 +05:30
Nabin Hait
38c7ad2c69 Update supplier_quotation.json 2017-02-28 15:53:10 +05:30
Nabin Hait
491d2ad140 Update request_for_quotation.json 2017-02-28 15:52:43 +05:30
Nabin Hait
365ed5dea9 Update purchase_order.json 2017-02-28 15:51:00 +05:30
Nabin Hait
fd37395995 Merge pull request #7878 from netchampfaris/lead-fix
fix date compare in contact_date
2017-02-28 15:37:42 +05:30
Faris Ansari
0ded707397 fix date compare in contact_date 2017-02-27 21:51:46 +05:30
superlack
62d7ba0afd Update project.py 2017-02-27 07:00:30 -08:00
Nabin Hait
cda28ceeec [translations] 2017-02-27 17:46:47 +05:30
Nabin Hait
409062b8a4 Merge pull request #7869 from KanchanChauhan/dependent-tasks
Dependent task dates gets updated with parent dates
2017-02-27 17:34:09 +05:30
Nabin Hait
631ecad985 Merge pull request #7875 from KanchanChauhan/employee-loan-fixes
[Fix] Multiple fixes in Employee Loan
2017-02-27 17:28:20 +05:30
Nabin Hait
3ddc26060a Merge pull request #7876 from KanchanChauhan/salary-slip-fix
[Fix] Update totals on salary component deletion
2017-02-27 17:26:39 +05:30
Kanchan Chauhan
c02745c826 [Fix] Update totals on salary component deletion 2017-02-27 17:21:41 +05:30
Kanchan Chauhan
a13adc0e6b [Fix] Multiple fixes in Employee Loan 2017-02-27 16:56:00 +05:30
Nabin Hait
b9741b6ed5 Merge branch 'master' into develop 2017-02-27 15:41:44 +05:30
Nabin Hait
d39b012981 Merge branch 'hotfix' 2017-02-27 15:41:43 +05:30
Nabin Hait
b99a38d6ae bumped to version 7.2.25 2017-02-27 16:11:43 +06:00
Nabin Hait
a2afc4e11c Update activation.py 2017-02-27 15:39:29 +05:30
Kanchan Chauhan
e76685d925 Dependent task dates gets updated with parent dates 2017-02-27 14:55:03 +05:30
Nabin Hait
c642f76a4d Fixed merge conflict 2017-02-27 14:40:53 +05:30
Nabin Hait
e0d661f433 Merge branch 'hotfix' 2017-02-27 14:31:10 +05:30
Nabin Hait
79c5ee0a65 bumped to version 7.2.24 2017-02-27 15:01:10 +06:00
Nabin Hait
afd0d086a7 Merge pull request #7872 from rohitwaghchaure/delivery_note_serail_no_issue
[Fix] Serial nos not pulling on the delivery note, for spanish language add serial no button is not working
2017-02-27 14:11:30 +05:30
Nabin Hait
704b6a3e1f Merge pull request #7756 from mlisb0n/master
[Translation] Revised and updated all translations to meet european portuguese business/accounting terminology
2017-02-27 14:10:51 +05:30
Rohit Waghchaure
2087e574aa [Fix] Serial nos not pulling on the delivery note, for language spanish add serial no button was not working 2017-02-27 13:43:04 +05:30
Nabin Hait
c238016aff Merge pull request #7871 from KanchanChauhan/add-serial-no
[Fix] Add Serial No fix for other langauges
2017-02-27 13:14:57 +05:30
Kanchan Chauhan
6981870a40 [Fix] Add Serial No fix for other langauges 2017-02-27 12:54:13 +05:30
Nabin Hait
7e15afbf45 Merge pull request #7868 from RobertSchouten/patch-34
[fix] typo on get product bundle
2017-02-27 12:27:03 +05:30
robert schouten
4766562ff0 fix typo on get product bundle 2017-02-27 13:30:18 +08:00
Ben Cornwell-Mott
08c1e86b1c Moved link button. Creates new row for unlinked quantities 2017-02-25 23:16:54 -08:00
Nabin Hait
72c7e73ce0 Merge pull request #7852 from rohitwaghchaure/production_order_issue
[Fix] Production order operations scheduling issue
2017-02-25 11:03:43 +05:30
Nabin Hait
7553e72014 Merge pull request #7860 from nabinhait/develop
Leave application overlap validation for half day and test cases
2017-02-25 11:02:53 +05:30
superlack
c95ebdb4e4 Update sales_order.py 2017-02-24 12:35:10 -08:00
superlack
f800892ec3 Update project.py 2017-02-24 12:33:59 -08:00
Rohit Waghchaure
94c30d81b1 [Fix] Production order operations scheduling issue 2017-02-24 19:21:40 +05:30
Nabin Hait
697150f339 Leave application overlap validation for half day and test cases 2017-02-24 18:53:34 +05:30
Nabin Hait
a8d02bfd4a Merge pull request #7850 from manassolanki/shishuvan
Patch for making All Assessment Group parent in assessment group tree
2017-02-24 17:01:05 +05:30
Manas Solanki
d77fac113f Make All Assessment Group parent in assessment group tree 2017-02-24 15:30:22 +05:30
Nabin Hait
da73e1b806 Merge pull request #7851 from rohitwaghchaure/account_paid_to_payment_entry
[Fix] Payment entry account Paid To Show receivable accounts for supplier
2017-02-24 15:18:50 +05:30
Kanchan Chauhan
26b79f108a Leave Application Enchancement 2017-02-24 15:13:06 +05:30
Rohit Waghchaure
b983f26b98 [Fix] Payment entry account Paid To Show receivable accounts for supplier 2017-02-24 15:07:54 +05:30
Nabin Hait
8ad26c7d26 Merge pull request #7848 from manassolanki/neilLasrado-ass-redesign
Neil lasrado assessment redesign
2017-02-24 14:14:22 +05:30
Neil Trini Lasrado
c15b5db030 Added 'All Assessment Group' to fixtures 2017-02-24 13:16:46 +05:30
Neil Trini Lasrado
e4903b77b6 Added New Doctype - Assessment Code 2017-02-24 13:16:46 +05:30
Neil Trini Lasrado
15944b9ecf Added Academic Term to Assessment Group 2017-02-24 13:16:46 +05:30
Nabin Hait
2bcacec5c6 Merge pull request #7576 from RobertSchouten/compact_dev
[fix] compact print format not longer ignores format builder
2017-02-24 13:09:18 +05:30
Nabin Hait
ff5bd680c2 Merge pull request #7840 from rmehta/new-buttons
[enhance] connect new buttons on dashboard to custom make buttons and fix text for payment request
2017-02-24 12:57:13 +05:30
Nabin Hait
d9afd7e4aa Merge pull request #7822 from rmehta/desktop-messages
[enhance] desktop messages
2017-02-24 12:55:34 +05:30
Nabin Hait
d3d2daab4b Merge pull request #7838 from manassolanki/shishuvan
[Fix] Student Doctype
2017-02-24 12:53:21 +05:30
Nabin Hait
9f0d64b679 Merge pull request #7841 from mbauskar/hotfix
[minor] fixed assessment module icon
2017-02-24 12:50:16 +05:30
Manas Solanki
230df2c9d3 Link the sibling child table with the student doctype 2017-02-24 12:09:55 +05:30
Manas Solanki
53259fb91f Change in student master should reflect in every linked doctype and child doctype 2017-02-24 11:25:04 +05:30
superlack
868ef7738f Update project.json 2017-02-23 17:46:07 -08:00
superlack
23e5d40374 Update sales_order.py 2017-02-23 17:43:50 -08:00
superlack
c4587d2945 Update project.py 2017-02-23 17:39:05 -08:00
mbauskar
cea7d32b31 [minor] fixed assessment module icon 2017-02-23 20:28:47 +05:30
Rushabh Mehta
509543752c [enhance] connect new buttons on dashboard to custom make buttons and fix text for payment request 2017-02-23 17:03:46 +05:30
Nabin Hait
5278da8901 Merge pull request #7830 from mbauskar/develop
[minor] eval conditions for recurring sections and lead fields
2017-02-23 16:54:20 +05:30
Nabin Hait
8ec1b565f5 Merge pull request #7823 from KanchanChauhan/payroll-currency
[Minor] Company default currency in Salary Slip and Structure
2017-02-23 16:52:23 +05:30
Nabin Hait
89f7767b51 Merge pull request #7818 from KanchanChauhan/product-bundle-fix
[Fix] Disappearing Dropdown fixed
2017-02-23 16:49:49 +05:30
Nabin Hait
4c27ec5618 Merge pull request #7839 from KanchanChauhan/holiday-cal-fix
[Fix] Holiday Calendar Fix
2017-02-23 16:36:35 +05:30
Kanchan Chauhan
52a5cb9ae3 [Fix] Holiday Calendar Fix 2017-02-23 16:15:12 +05:30
Nabin Hait
60db08fd7f Merge pull request #7817 from KanchanChauhan/loan-management-fix
[Minor] Field label rename
2017-02-23 16:09:11 +05:30
Kanchan Chauhan
951e31667b [Minor] Company default currency in Salary Slip and Structure 2017-02-23 11:16:53 +05:30
Nabin Hait
97b3be6f9d Update salary_structure_employee.json 2017-02-23 11:10:05 +05:30
KanchanChauhan
90b42c4fa2 Merge pull request #7826 from KanchanChauhan/landed-cost-voucher-test
[Minor] Landed Cost Voucher test case fixed
2017-02-23 09:58:40 +05:30
Kanchan Chauhan
1d45a4312e [Minor] Landed Cost Voucher test case fixed 2017-02-23 08:44:02 +05:30
mbauskar
ddb9f0bf78 [minor] lead hide/unhide campain_name, customer field depending on source 2017-02-22 18:54:47 +05:30
mbauskar
d6e409ea92 [minor] hide recurring section if document is in __local state 2017-02-22 18:22:14 +05:30
Kanchan Chauhan
fe61c314b7 [Minor] Landed Cost Voucher test case fixed 2017-02-22 17:25:26 +05:30
nick9822
089c5caea5 Sales analytics error after upgrade
Hi Team,

We were getting errors in sales analytics report after the upgrade. 
https://discuss.erpnext.com/t/sales-analytics-report-hangs-on-erpnext-v7/17951/6

With the efforts of @Tropicalrambler into the report we made it work by putting checkpoint for item.
Please see whether its good or there is better solution for it.

Thanks,
Nick
2017-02-22 17:09:29 +05:30
Manas Solanki
7a61f12572 Fixes for attendance reports 2017-02-22 16:19:57 +05:30
Rushabh Mehta
05ce7ec7bb [enhance] desktop messages 2017-02-22 16:15:43 +05:30
Kanchan Chauhan
b249a6e6f7 [Fix] Disappearing Dropdown fixed 2017-02-22 15:39:07 +05:30
Nabin Hait
5079c9ef47 Fixed merge conflict 2017-02-22 15:31:31 +05:30
Nabin Hait
10ec553859 Merge branch 'hotfix' 2017-02-22 15:05:27 +05:30
Nabin Hait
633698affc bumped to version 7.2.23 2017-02-22 15:35:27 +06:00
Nabin Hait
1965949c67 Merge pull request #7816 from mbauskar/hotfix
[minor] minor fixes for journal entry get_exchange_rate trigger
2017-02-22 15:03:32 +05:30
Kanchan Chauhan
6af7140763 [Minor] Field label rename 2017-02-22 14:58:34 +05:30
mbauskar
a8fa10d2a9 [minor] minor fixes for journal entry get_exchange_rate trigger 2017-02-22 14:51:09 +05:30
Nabin Hait
79dd816359 Merge branch 'manassolanki-shishu' into develop 2017-02-22 13:06:01 +05:30
Nabin Hait
08847bd06a minor fix 2017-02-22 13:05:46 +05:30
Nabin Hait
1e3a0b4632 Merge branch 'shishu' of https://github.com/manassolanki/erpnext into manassolanki-shishu 2017-02-22 12:12:58 +05:30
Nabin Hait
753c8dedde Update api.py 2017-02-22 11:53:13 +05:30
Nabin Hait
2d8047837c Merge pull request #7802 from KanchanChauhan/multiple-items-purchase
[Fix] Throw error if item is added multiple time
2017-02-22 11:43:17 +05:30
Nabin Hait
1bdb6a57f2 Merge pull request #7809 from rohitwaghchaure/financial_statement_company_issue
[Fix] Company fiscal year issue in financial statement
2017-02-22 11:41:16 +05:30
Kanchan Chauhan
f2803ac427 [Fix] Throw error if item is added multiple time 2017-02-22 10:40:38 +05:30
Manas Solanki
47aba953e2 Added student language doctype 2017-02-21 18:49:00 +05:30
Manas Solanki
f869a679ae Fixed Student Attendence 2017-02-21 18:49:00 +05:30
Nabin Hait
8c9bc8edbb Merge pull request #7807 from nabinhait/hotfix
Company, Currency, Conversion Rate fields are mandatory in BOM
2017-02-21 16:06:20 +05:30
Nabin Hait
293158db6e Merge pull request #7808 from KanchanChauhan/attendance-rename-field
[Patch] Attendance Date field renamed
2017-02-21 16:01:50 +05:30
Nabin Hait
0142fdc0d7 Update rename_att_date_attendance.py 2017-02-21 16:01:21 +05:30
Rohit Waghchaure
49523d7f80 [Fix] Company fiscal year issue in financial statement 2017-02-21 14:20:26 +05:30
Kanchan Chauhan
42f55cf4b1 [Patch] Attendance Date rename field 2017-02-21 13:44:01 +05:30
Nabin Hait
6e1a2b16a5 Company, Currency, Conversion Rate fields are mandatory in BOM 2017-02-21 13:11:02 +05:30
Nabin Hait
d5442b5544 Merge pull request #7791 from nabinhait/pro_order_stock_qty
Build Qty considering quantity for which bom is created
2017-02-21 09:58:13 +05:30
Nabin Hait
7056ce54d7 Update salary_structure.py 2017-02-20 23:28:47 +05:30
Nabin Hait
16a4b58676 Merge branch 'pratu16x7-bom-view' into develop 2017-02-20 19:38:36 +05:30
Nabin Hait
391eca18c7 Fixed merge conflict 2017-02-20 19:38:22 +05:30
Nabin Hait
6fd8cca135 Merge pull request #7587 from noussh/develop
updated missing navigation links in Docs - Accounts
2017-02-20 19:33:55 +05:30
Nabin Hait
6cbe02400a Merge pull request #7672 from KanchanChauhan/remove-joining-datep-validation
From date, to date moved from Salary Structure to Salary Structure Employee
2017-02-20 19:31:49 +05:30
Nabin Hait
6a85752ead Merge branch 'hotfix' into remove-joining-datep-validation 2017-02-20 19:31:38 +05:30
Nabin Hait
e17519accb Update salary_structure.py 2017-02-20 19:30:44 +05:30
Nabin Hait
de7d7ba7d9 Merge pull request #7768 from mbauskar/develop
[minor] auto close opportunity after 7 days
2017-02-20 19:23:22 +05:30
Nabin Hait
0d66579e83 Merge branch 'develop' into develop 2017-02-20 19:22:03 +05:30
Nabin Hait
aa968cd12e Merge pull request #7751 from nick9822/patch-3
Next Depreciation Date is entered as past date
2017-02-20 19:11:31 +05:30
Nabin Hait
af6e41b637 Merge pull request #7467 from suyashphadtare/develop
[minor] Show Actual Item quantity in warehouse set query
2017-02-20 19:10:43 +05:30
Nabin Hait
cd837ecbac Merge branch 'develop' into develop 2017-02-20 19:09:20 +05:30
Nabin Hait
5422329b84 Merge branch 'KanchanChauhan-accrual-payroll-system' into develop 2017-02-20 19:01:27 +05:30
Nabin Hait
8bb69ff8bf Fixed merge conflict 2017-02-20 19:01:04 +05:30
Nabin Hait
e49d901907 Update process_payroll.py 2017-02-20 18:36:12 +05:30
Nabin Hait
afd8df8a20 Build Qty considering quantity for which bom is created 2017-02-20 18:06:50 +05:30
Nabin Hait
78ef086b00 Merge branch 'bcornwellmott-prod_ana' into develop 2017-02-20 17:42:07 +05:30
Nabin Hait
6ffd77660b Changed module for Production Analytics 2017-02-20 17:41:44 +05:30
Nabin Hait
3cdb65f782 Merge branch 'prod_ana' of https://github.com/bcornwellmott/erpnext into bcornwellmott-prod_ana 2017-02-20 17:25:01 +05:30
Nabin Hait
b44ae54813 Merge pull request #7785 from nabinhait/in_global_search
Added fields in global search
2017-02-20 15:05:01 +05:30
Nabin Hait
589f4656ad Merge branch 'develop' into in_global_search 2017-02-20 15:04:52 +05:30
Nabin Hait
9f4cb0c097 Fixed merge conflict 2017-02-20 15:00:04 +05:30
Nabin Hait
f8cff128b3 Merge branch 'hotfix' 2017-02-20 14:52:01 +05:30
Nabin Hait
66b373033a bumped to version 7.2.22 2017-02-20 15:22:01 +06:00
Nabin Hait
e6a5d5dc64 Merge pull request #7784 from mbauskar/minor-fixes
[minor] minor fixes for contact us page
2017-02-20 14:43:24 +05:30
Nabin Hait
da098222d7 Merge pull request #7780 from rohitwaghchaure/minor_fix_payment_entry
[Fix] Removed employee party type from the payment entry
2017-02-20 14:43:14 +05:30
Nabin Hait
fd3ec066ce Added fields in global search 2017-02-20 13:38:31 +05:30
Makarand Bauskar
98f9427ba1 [minor] minor fixes for contact us page 2017-02-20 12:41:48 +05:30
bcornwellmott
97ab1d2eb3 Merge pull request #7691 from bcornwellmott/stock_reports
Stock reports
2017-02-19 14:36:35 -08:00
bcornwellmott
568dac3aad Fixed Link Option for Warehouse 2017-02-19 14:04:20 -08:00
Rohit Waghchaure
f73d459c80 [Fix] Removed employee party type from the payment entry 2017-02-19 17:46:05 +05:30
Nabin Hait
02d987ed13 Minor fix for common tree view 2017-02-17 15:50:53 +05:30
Nabin Hait
83ba5c1319 Merge pull request #7770 from rohitwaghchaure/minor_issue_develop
[Fix] Payment entry fields issue, added total billed hours in timesheet
2017-02-17 15:20:06 +05:30
Nabin Hait
64e222697c Merge pull request #7769 from nabinhait/setup_fy_dates
Set fiscal year start and end date based on country
2017-02-17 15:18:28 +05:30
Nabin Hait
e285258374 Merge pull request #7762 from mbauskar/hotfix
[minor] timestamp fixes for heatmap
2017-02-17 15:18:01 +05:30
Nabin Hait
a6eb1434b3 Merge pull request #7771 from rmehta/item-name
[minor] item name not mandatory and item price with quick edit
2017-02-17 15:17:24 +05:30
Rushabh Mehta
0c5375d0fa [minor] item name not mandatory and item price with quick edit 2017-02-17 14:57:31 +05:30
mbauskar
90818080b1 [minor] Configured Auto Close days for Opportunity and Issue 2017-02-17 14:56:00 +05:30
mbauskar
e1e25a0c9d [minor] auto close opportunity after 7 days 2017-02-17 14:54:50 +05:30
Rohit Waghchaure
a020e4eba4 Payment entry fields issue, added total billed hours in timesheet 2017-02-17 14:51:57 +05:30
Nabin Hait
6af7dd4e1b Set fiscal year start and end date based on country 2017-02-17 14:47:33 +05:30
Nabin Hait
801fa80b39 Merge pull request #7764 from rohitwaghchaure/clean_supplied_items
[Fix] Cleanup supplied items if supply raw material is set as No
2017-02-17 12:36:05 +05:30
Nabin Hait
9e5b3dad29 Minor fix in assesment 2017-02-17 11:03:44 +05:30
Rohit Waghchaure
4b9d2f2733 [Fix] Cleanup supplied items if supply raw material is set as No 2017-02-16 18:53:23 +05:30
Kanchan Chauhan
1b204c8e4e Accrual Payroll System 2017-02-16 16:30:51 +05:30
nick9822
23e174c270 Validation for purchase_date
Separate validation for purchase date.
2017-02-16 16:26:38 +05:30
mbauskar
e7b87ad071 [minor] timestamp fixes for heatmap 2017-02-16 16:05:46 +05:30
Nabin Hait
de45b0eddc Merge branch 'master' into develop 2017-02-16 15:59:59 +05:30
Nabin Hait
1b59b624c3 Merge branch 'hotfix' 2017-02-16 15:59:58 +05:30
Nabin Hait
a7d6b68bc0 bumped to version 7.2.21 2017-02-16 16:29:58 +06:00
Nabin Hait
c70a4d2037 Merge pull request #7760 from rmehta/add-activation-1
[add] site activation level
2017-02-16 15:51:04 +05:30
Nabin Hait
d13d198dc8 Merge pull request #7747 from KanchanChauhan/item-name-asset
[Minor] Item Name in Asset
2017-02-16 15:15:23 +05:30
Rushabh Mehta
6dd461fec4 [add] site activation level 2017-02-16 14:53:21 +05:30
Nabin Hait
92c52f4623 Merge pull request #7732 from neilLasrado/student-left
Added ability to send newsletter to Student batch Guardians and Student Group Guardians
2017-02-16 14:40:14 +05:30
Nabin Hait
ea1cb68fe7 Merge branch 'master' into develop 2017-02-16 14:37:50 +05:30
Nabin Hait
d5d0b36973 Merge branch 'hotfix' 2017-02-16 14:37:49 +05:30
Nabin Hait
7677b56f7c bumped to version 7.2.20 2017-02-16 15:07:48 +06:00
Nabin Hait
b280398626 Merge pull request #7739 from rohitwaghchaure/payment_entry_currency_symbol_issue
[Fix] Payment Entry currency symbol issue
2017-02-16 14:21:24 +05:30
Nabin Hait
99c6c79834 Update payment_entry.js 2017-02-16 14:21:04 +05:30
Nabin Hait
507e6fa46e Merge pull request #7749 from KanchanChauhan/leave-application-cleanup
Rejected leave application can be submitted
2017-02-16 14:19:11 +05:30
Neil Trini Lasrado
fa2023d3da Added ability to send newsletter to Student batch Guardians and Student Group Guardians 2017-02-16 13:33:09 +05:30
Nabin Hait
3437a9a123 minor fix 2017-02-16 12:14:30 +05:30
pratu16x7
86415f394d [minor] duration bar 2017-02-16 09:27:53 +05:30
mlisb0n
835a615af8 Add files via upload 2017-02-15 15:45:52 +01:00
Kanchan Chauhan
11f159193e Rejected leave application can be submitted 2017-02-15 19:09:21 +05:30
Nabin Hait
2f7697d1bd Merge pull request #7746 from pratu16x7/minor-search-presets
Preset doctypes fields to Search
2017-02-15 18:46:03 +05:30
Nabin Hait
d9068497cb Merge pull request #7736 from KanchanChauhan/serial-no-status-report
[Fix] Serial No Status
2017-02-15 17:56:50 +05:30
Nabin Hait
b8624efe3a Merge pull request #7750 from KanchanChauhan/territory-filter-opportunity
[Minor] Is group filter removed from Territory in Opportunity
2017-02-15 17:41:31 +05:30
Nabin Hait
afef62c887 Merge pull request #7737 from KanchanChauhan/project-percentage
[Fix] Project % Completed set to 0 if no tasks
2017-02-15 17:28:53 +05:30
Nabin Hait
e827104a52 Merge pull request #7738 from KanchanChauhan/appraisal-fix
[Fix] Empty row in Goals of Appraisal fixed
2017-02-15 17:26:40 +05:30
Nabin Hait
6a2e138021 Merge pull request #7731 from nabinhait/hotfix
Check existing SO, PO and MR for enabling / disabling 'Is Stock Item' checkbox
2017-02-15 17:25:56 +05:30
nick9822
e5cb3e34fe nowdate changed to purchase_date
next depreciation date should be compared with purchase_date instead of nowdate.
2017-02-15 15:32:50 +05:30
Kanchan Chauhan
7118b5a2bd [Minor] Is group filter removed from Territory in Opportunity 2017-02-15 14:46:08 +05:30
Kanchan Chauhan
2307f57f19 [Minor] Item Name in Asset 2017-02-15 11:52:29 +05:30
Rohit Waghchaure
ff41c82c2b [Fix] Payment Entry currency symbol issue 2017-02-15 11:44:15 +05:30
pratu16x7
349ed568ed Add task and item 2017-02-15 09:23:26 +05:30
pratu16x7
ca56ad0bfc [minor] fix test 2017-02-14 18:49:26 +05:30
pratu16x7
462e89e452 [minor] margin fix 2017-02-14 17:18:10 +05:30
pratu16x7
0e94b4bec4 Mobile view fixes 2017-02-14 17:18:09 +05:30
pratu16x7
60fe77cc90 Website data from existing child tables, layout, images 2017-02-14 17:18:09 +05:30
pratu16x7
dee36e10ae Add operations and items to website 2017-02-14 17:18:09 +05:30
pratu16x7
aad8257e20 Add template 2017-02-14 17:18:09 +05:30
Kanchan Chauhan
ecdcac1fdf [Fix] Empty row in Goals of Appraisal fixed 2017-02-14 15:32:06 +05:30
KanchanChauhan
993358d5d7 Update install.md 2017-02-14 15:12:07 +05:30
Kanchan Chauhan
bab6c9c006 [Fix] Project perecentage set 0 if no tasks 2017-02-14 14:30:00 +05:30
Kanchan Chauhan
79cd59303a [Fix] Serial No Status 2017-02-14 12:49:36 +05:30
Nabin Hait
d8812020aa Merge pull request #7735 from mbauskar/develop
[minor] fetched tickets to closed using sql instead of get_all
2017-02-14 11:35:37 +05:30
mbauskar
2ecfd9be5d [minor] fetched tickets to closed using sql instead of get_all 2017-02-14 08:41:09 +05:30
Nabin Hait
7877b0ec1b Merge pull request #7730 from KanchanChauhan/minor-enhancement
[Minor] List of Contacts
2017-02-13 16:09:43 +05:30
Nabin Hait
99dfa3060a Check existing SO, PO and MR for disabling 'Is Stock Item' checkbox 2017-02-13 16:06:02 +05:30
Kanchan Chauhan
779c581a92 [Minor] List of Contacts 2017-02-13 16:01:52 +05:30
Nabin Hait
89b6c47b2e Merge pull request #7712 from rohitwaghchaure/minor_fix_item_valuation_method
[Fix] Valuation method changing issue in the item
2017-02-13 15:42:22 +05:30
Nabin Hait
ec07d18222 Merge pull request #7716 from KanchanChauhan/apply-now-job
[Fix] Apply Now button redirect fixed for Job Opening
2017-02-13 15:42:02 +05:30
Neil Trini Lasrado
a388352171 Merge pull request #7719 from neilLasrado/student-left
Removed Nationality in Student Applicant as a link field to Country
2017-02-12 01:31:02 +05:30
Neil Trini Lasrado
1ab8554d15 Removed Nationality in Student Applicant as a link feild to Country 2017-02-12 01:29:24 +05:30
Neil Trini Lasrado
b2fdc131e8 Merge pull request #7718 from neilLasrado/student-left
Added Exit Section to Student master
2017-02-12 01:19:39 +05:30
Neil Trini Lasrado
c1bf70dc75 Added Exit Section to Student master 2017-02-12 01:17:52 +05:30
suyashphadtare
34ab136b46 [fix] Remove un-necessary Whitespace 2017-02-10 19:14:43 +05:30
suyashphadtare
750a067688 [minor][fix] Show all warehouses with item actual qty in warehouse set query 2017-02-10 19:14:43 +05:30
suyashphadtare
049a88cc40 [minor] Show item quantity in warehouse set query 2017-02-10 19:14:43 +05:30
Kanchan Chauhan
1cd5e583ba [Fix] Apply Now button redirect fixed for Job Opening 2017-02-10 17:58:41 +05:30
KanchanChauhan
cc2c7649a8 [Minor] Stock Entry Fix (#7715) 2017-02-10 17:47:49 +05:30
Nabin Hait
bdd470a6d1 Update item.py 2017-02-10 17:12:48 +05:30
Rohit Waghchaure
2f09dc0e62 [Fix] Valuation method changing issue in the item 2017-02-10 15:29:45 +05:30
Nabin Hait
29dfb9479b Merge pull request #7710 from joolsr/patch-1
Update customer.md
2017-02-10 13:23:06 +05:30
Ben Cornwell-Mott
67a13972fb Added warehouse to BOM Stock Report, fixed bugs with buildable qty 2017-02-09 23:21:52 -08:00
Nabin Hait
5a69f24dfe Merge pull request #7705 from rmehta/stock-entry-fix
[minor] added make material request from Stock Entry and removed cur_frm
2017-02-10 12:51:09 +05:30
Nabin Hait
b41b10976f Merge pull request #7644 from mbauskar/develop
[docs] Feedback triggers
2017-02-10 12:13:31 +05:30
mbauskar
edaa43d9b8 [docs] manual feedback request and minor fixes 2017-02-10 11:28:45 +05:30
bcornwellmott
630882787a Added buildable qty
The field indicates how many can be built.
2017-02-09 20:41:12 -08:00
bcornwellmott
fc41bb6afd Fixed code issues
Also changed qty to Quantity left to build
2017-02-09 20:37:11 -08:00
joolsr
f9fdbe2853 Update customer.md 2017-02-09 23:10:39 +00:00
Rushabh Mehta
cf99dc0e77 [fix] for setup wizard tests and demo; 2017-02-09 18:06:11 +05:30
Rushabh Mehta
e6aa3b435a [minor] added make material request from Stock Entry and removed cur_frm 2017-02-09 17:47:22 +05:30
Nabin Hait
eee23eaf5c Merge pull request #7702 from mbauskar/hotfix
[minor] payment entry company trigger
2017-02-09 13:48:09 +05:30
mbauskar
d487bf77e1 [minor] payment entry company trigger 2017-02-09 12:57:25 +05:30
Nabin Hait
2b5fa7647a Merge pull request #7662 from nick9822/patch-2
Sales analytics error after upgrade
2017-02-09 11:45:30 +05:30
Nabin Hait
e27a0d25bc Merge pull request #7654 from rohitwaghchaure/lead_tax_issue
[Fix] Set default tax on quotation when it's making from the lead
2017-02-09 11:43:22 +05:30
Nabin Hait
fafa3748f1 Merge pull request #7696 from khatrijitendra/patch-1
[Fix] "type" and "rate" fields
2017-02-08 16:26:08 +05:30
khatrijitendra
d262eb1a1c issue in type and rate
1. there is not such field, "type" it is "margin_type"
2. there is not such field,  "rate" it is "margin_rate_or_amount"
2017-02-08 14:59:59 +05:30
Nabin Hait
6ff0caa87a Fixed merge conflict 2017-02-08 11:33:33 +05:30
Nabin Hait
efd5eadfea Merge branch 'hotfix' 2017-02-08 11:32:47 +05:30
Nabin Hait
57e97c06e6 bumped to version 7.2.19 2017-02-08 12:02:47 +06:00
Nabin Hait
6f93cd5bd0 Merge pull request #7692 from rohitwaghchaure/minor_fixes_v_7_2
Minor fixes
2017-02-08 11:21:54 +05:30
Nabin Hait
533d22e88b Merge pull request #7606 from rohitwaghchaure/data_import_tool_for_cost_center
[Fix] Allow data import tool for cost center
2017-02-08 11:21:25 +05:30
Rohit Waghchaure
b3489548a9 minor fix 2017-02-08 11:20:04 +05:30
Nabin Hait
ccd2e00331 Merge pull request #7676 from nabinhait/missing_val_rate
Get standard/historical valuation rate where missing, if item is not a sample item
2017-02-08 11:05:06 +05:30
Ben Cornwell-Mott
05dca985e6 Fixed stock query and corrected with suggestions from rohit 2017-02-07 09:15:33 -08:00
mbauskar
1df0b9bfed [minor] minor fixes in feedback index.md 2017-02-07 15:20:08 +05:30
mbauskar
298acd3d1a [docs] Feedback triggers 2017-02-07 15:20:08 +05:30
Nabin Hait
70fd8546ce Merge pull request #7677 from KanchanChauhan/serial-no-in-return
[Fix] Serial No if is_return
2017-02-07 13:28:30 +05:30
Nabin Hait
555279b6e6 Merge pull request #7680 from bcornwellmott/patch-7
Duplicate "title" field
2017-02-07 13:27:46 +05:30
Nabin Hait
ddcb514b65 Merge pull request #7685 from KanchanChauhan/employee-details-in-salary-preview
[Fix] Employee Details in Salary Slip preview
2017-02-07 13:27:24 +05:30
Nabin Hait
401ac7a5e5 Merge pull request #7686 from mbauskar/fixes
[minor] auto close issue using ORM (document save method)
2017-02-07 13:26:14 +05:30
Nabin Hait
0a6aaf4257 Get standard/historical valuation rate where missing: some minor fixes 2017-02-07 12:50:22 +05:30
mbauskar
9c0bf73d25 [minor] auto close issue using ORM (document save method) 2017-02-07 12:50:05 +05:30
Kanchan Chauhan
842ad55235 [Fix] Employee Details in Salary Slip preview 2017-02-07 12:07:55 +05:30
Kanchan Chauhan
4f3b0aa249 [Fix]Serial No if is_return 2017-02-07 11:28:34 +05:30
Ben Cornwell-Mott
02c02bc572 Fixed counting to correctly reflect all status at each month 2017-02-06 20:58:25 -08:00
Nabin Hait
ea8fab52c6 Get standard/historical valuation rate where missing, if item is not a sample item 2017-02-07 01:24:32 +05:30
bcornwellmott
92b6ceec41 Duplicate "title" field
The title field was duplicated - removed first one.
2017-02-06 10:51:02 -08:00
Neil Trini Lasrado
2160638f36 Merge pull request #7679 from neilLasrado/stud-group
Added validation to check if Student in a student group exists in the…
2017-02-07 00:17:24 +05:30
Neil Trini Lasrado
c28598ae8b Merge pull request #7678 from neilLasrado/stud-att
Added validations to Student Attendance
2017-02-07 00:17:14 +05:30
Neil Trini Lasrado
3ade874f9e Added validations to Student Attendance 2017-02-06 20:07:02 +05:30
Neil Trini Lasrado
05dec9a880 Added validation to check if Studnet in a student group exists in the student batch specified 2017-02-06 20:05:16 +05:30
Nabin Hait
8200485baa Merge pull request #7675 from mbauskar/hotfix
[minor] index out of range fixes for JE
2017-02-06 19:23:33 +05:30
mbauskar
c874a82559 [minor] index out of range fixes for JE 2017-02-06 15:41:34 +05:30
Kanchan Chauhan
5f5457085e Joining date validation removed from Salary Structure 2017-02-06 14:50:39 +05:30
Rushabh Mehta
50862039dc [minor] fixes to schools 2017-02-06 14:28:52 +05:30
Rohit Waghchaure
ade06f940c [Fix] Set default tax on quotation when it's making from the lead 2017-02-06 12:14:09 +05:30
Nabin Hait
259489572d Merge pull request #7657 from rmehta/po-from-so
[enhance] production order from sales order
2017-02-06 11:41:56 +05:30
Nabin Hait
101aaed643 Merge pull request #7614 from KanchanChauhan/account-filters-payroll
[Fix] Account filter in Process Payroll and Salary Component
2017-02-06 11:36:48 +05:30
Nabin Hait
20d2d7548a Update salary_component.js 2017-02-06 11:36:38 +05:30
Ben Cornwell-Mott
28945438f2 Created button to link buying items to material requests 2017-02-05 18:55:57 -08:00
Ben Cornwell-Mott
36d04fda37 Fixed filter dates and date comparisons 2017-02-05 14:00:46 -08:00
Ben Cornwell-Mott
b4a2c2f047 Got proper cumulative data working 2017-02-05 13:39:39 -08:00
Ben Cornwell-Mott
943124275d Production Analytics 2017-02-04 14:25:53 -08:00
rohitwaghchaure
ac65e956e8 Merge pull request #7659 from saurabh6790/demo_user_perm_fix
[minor][fix] demo user perm fix
2017-02-03 16:51:33 +05:30
Rushabh Mehta
e92a740b53 [minor] school patch fix 2017-02-03 16:05:53 +05:30
nick9822
acb5e9a11b Sales analytics error after upgrade
Hi Team,

We were getting errors in sales analytics report after the upgrade. 
https://discuss.erpnext.com/t/sales-analytics-report-hangs-on-erpnext-v7/17951/6

With the efforts of @Tropicalrambler into the report we made it work by putting checkpoint for item.
Please see whether its good or there is better solution for it.

Thanks,
Nick
2017-02-03 12:31:54 +05:30
Saurabh
9ca3f2847a a[minor][fix] demo user perm fix 2017-02-02 19:22:36 +05:30
Rushabh Mehta
6ede4a3809 [enhance] production order from sales order 2017-02-02 17:42:01 +05:30
KanchanChauhan
ed94aa4798 Merge pull request #7624 from neilLasrado/eval-group
Code Refractor.
2017-02-02 17:39:08 +05:30
Neil Trini Lasrado
f37d329cf5 Merge branch 'develop' into eval-group 2017-02-02 17:30:10 +05:30
rohitwaghchaure
3f10c7f4fc Merge pull request #7609 from rmehta/remove-party-status
Remove Party Status
2017-02-02 16:10:26 +05:30
KanchanChauhan
6575a0a7e2 [Minor]ROI fix in Employee Loan (#7643) 2017-02-02 16:01:43 +05:30
Rushabh Mehta
a3d0bea375 Merge branch 'develop' into remove-party-status 2017-02-02 15:42:04 +05:30
Kanchan Chauhan
3e2ecc3423 [Fix] Account filter in Process Payroll and Salary Component 2017-02-02 14:41:48 +05:30
Nabin Hait
6b9902627d Merge pull request #7638 from rohitwaghchaure/gross_profit_report_issue
[Fix] Buying rate in gross profit report
2017-02-02 13:41:32 +05:30
Nabin Hait
c62362f064 Merge pull request #7649 from KanchanChauhan/salary-struct-fix
[Fix] Employee name fixes in Salary Structure
2017-02-02 13:30:05 +05:30
Kanchan Chauhan
a0314f19ca [Fix] Employee name fixes in Salary Structure 2017-02-02 12:56:56 +05:30
Neil Trini Lasrado
4aabe61197 Patch for renaming evaluation criteria 2017-02-01 19:32:28 +05:30
Saurabh
10eb123b49 Merge pull request #7645 from rohitwaghchaure/pos_minor_fix
Minor fix
2017-02-01 19:26:47 +05:30
Rohit Waghchaure
69060a8177 Minor fix 2017-02-01 19:14:53 +05:30
Neil Trini Lasrado
749516c22d Renamed Evaluation Criteria to Assessment Criteria 2017-02-01 18:47:36 +05:30
Rushabh Mehta
3714626dd0 [minor] enhance BOM view 2017-02-01 18:35:53 +05:30
KanchanChauhan
98595dff0b Merge pull request #7642 from frappe/revert-7641-employee-loan-fix
Revert "[Fix] Rate of Interest Fix"
2017-02-01 18:17:18 +05:30
KanchanChauhan
b499fe91fa Revert "[Fix] Rate of Interest Fix" 2017-02-01 18:16:35 +05:30
rohitwaghchaure
c13dbd408f [Enhancement] POS Redesign (#7639)
* item group, discount

* POS Redesign

* offline customer

* removed offline records from modal view
2017-02-01 18:07:22 +05:30
KanchanChauhan
929c3890a4 Merge pull request #7641 from KanchanChauhan/employee-loan-fix
[Fix] Rate of Interest Fix
2017-02-01 18:06:32 +05:30
KanchanChauhan
0e995adc44 Salary Structure Employee custom field can be used in Formula and Condition (#7615) 2017-02-01 18:05:57 +05:30
Kanchan Chauhan
f01c1c2a9d [Fix] Rate of Interest Fix 2017-02-01 18:05:26 +05:30
KanchanChauhan
3dc96cf71e Merge pull request #7640 from KanchanChauhan/remove-date-validation-salary-structure
[Minor] From Date validation removed from Salary Structure
2017-02-01 17:42:18 +05:30
Kanchan Chauhan
e67e2e6fee [Minor] From Date validation removed from Salary Structure 2017-02-01 17:41:36 +05:30
Rohit Waghchaure
38f808cfae [Fix] Buying rate in gross profit report 2017-02-01 13:34:06 +05:30
rohitwaghchaure
ea092a7b24 [Enhancement] Booking of an employee's expense claim (#7267)
* [Enhancement] Auto book of an employee's expense claim

* test cases

* documentation

* fixes and changes

* removed payable from employee and added into the company

* Added party in account, patch to update party type for customer and supplier accounts

* added party type in erpnext, fix patch

* fixed travis
2017-02-01 12:02:08 +05:30
Rushabh Mehta
587dd90182 [minor] removed customer status 2017-02-01 12:01:24 +05:30
Rushabh Mehta
99ce531beb [minor] css for team updates 2017-02-01 11:46:47 +05:30
Neil Trini Lasrado
d408553b93 Merge pull request #7623 from neilLasrado/guardian
Added Student table in Guardian (Only rendered for display purpose)
2017-01-31 18:18:50 +05:30
Neil Trini Lasrado
ebfb7ff027 Merge pull request #7625 from neilLasrado/student-batch
Added Mark Assessment Result Button in assessment plan
2017-01-31 18:18:32 +05:30
Neil Trini Lasrado
879a2d84dc Added Evaluation Criteria Group 2017-01-31 17:03:37 +05:30
Neil Trini Lasrado
477c88450f UI fixes for Guardian Doctype 2017-01-31 16:49:39 +05:30
Neil Trini Lasrado
9071bcbfa8 Added Student table in Guardian (Only rendered for display purpose) 2017-01-31 16:36:29 +05:30
Rushabh Mehta
7ec4b717ed [feature] added team updates page 2017-01-31 11:42:58 +05:30
Rohit Waghchaure
d9a265fab1 Merge branch 'develop' of github.com:frappe/erpnext into develop 2017-01-31 11:34:07 +05:30
Neil Trini Lasrado
1947aca2a8 Added Mark Assessment Result Button in assessment plan 2017-01-30 18:34:25 +05:30
Neil Trini Lasrado
ba96ce7dd5 Merge pull request #7616 from neilLasrado/assessment-validations
Patch fix for Update Assessment Module Patch
2017-01-30 17:50:37 +05:30
Neil Trini Lasrado
fd1767d2ea Patch fix for Update Assessment Module Patch 2017-01-30 17:50:05 +05:30
Rushabh Mehta
4500f7b4d6 [cleanup] remove unused LMS (#7612) 2017-01-30 17:04:38 +05:30
Neil Trini Lasrado
455824235a Merge pull request #7613 from neilLasrado/assessment-validations
Patch fix for Update Assessment Module Patch
2017-01-30 16:41:46 +05:30
Neil Trini Lasrado
ab1ee1e6fc Patch fix for Update Assessment Module Patch 2017-01-30 16:40:14 +05:30
Neil Trini Lasrado
dbd95936ea Merge pull request #7610 from neilLasrado/assessment-validations
Validations for Assessment Plan
2017-01-30 15:51:08 +05:30
Neil Trini Lasrado
80ca65c166 Added validation to ensure that the Sum of Scores of evaluation Criteras is equal to the max assessment score. 2017-01-30 15:28:41 +05:30
KanchanChauhan
fbaa6197f9 Employee Loan Management (#7126)
* [WIP] Employee Loan Management

* EMI calculation

* Fixing PR
2017-01-30 15:15:58 +05:30
Rushabh Mehta
364f48aad2 [minor] fix patch 2017-01-30 13:23:09 +05:30
Rushabh Mehta
87037bdd56 [minor] remove party status as it leads to duplicate notifications fixes #7346, also fix for #7568 2017-01-30 13:22:51 +05:30
Makarand Bauskar
d893efd0a9 [minor] replace object values in translations (#7602) 2017-01-30 12:35:34 +05:30
rohitwaghchaure
3b40098738 Merge pull request #7571 from RicardoJohann/projectfilter
added project filter to gl and carry project filter from P&L
2017-01-30 12:24:36 +05:30
Rohit Waghchaure
b327429db7 [Fix] Allow data import tool for cost center 2017-01-30 11:34:29 +05:30
rohitwaghchaure
0bdffa8130 Merge pull request #7533 from mbauskar/minor-fixes
[WIP] Address and Contact Fixes
2017-01-30 11:13:10 +05:30
mbauskar
16ce3623bc [fixes] set lead to Null on delete company transaction & other minor fixes 2017-01-30 10:45:28 +05:30
mbauskar
51b1d6de48 [minor] moved the address_and_contact utils to frappe 2017-01-30 10:45:28 +05:30
mbauskar
7fa039f15c [fixes] delete company transaction and other minor fixes 2017-01-30 10:45:28 +05:30
mbauskar
83f4780f74 [Fixes] Address and Contact fixes 2017-01-30 10:45:28 +05:30
mbauskar
8271b4c564 [minor] fixes in address filters 2017-01-30 10:45:28 +05:30
mbauskar
cbc49e2989 [WIP] Address and Contact Fixes 2017-01-30 10:45:28 +05:30
rohitwaghchaure
531b49f6c7 Merge pull request #7590 from KanchanChauhan/rename-task
[Minor]Task rename now possible
2017-01-30 09:29:10 +05:30
KanchanChauhan
2dfb90a922 Merge pull request #7565 from KanchanChauhan/leave-balance-report-fix
[Fix] Permissions to view Leave Balance Report
2017-01-29 21:07:02 +05:30
Rohit Waghchaure
92c9ad8c72 Merge branch 'master' into develop 2017-01-28 14:14:33 +05:30
Rohit Waghchaure
bf667a6540 Merge branch 'hotfix' 2017-01-28 14:14:32 +05:30
Rohit Waghchaure
ce4a0b20ab bumped to version 7.2.18 2017-01-28 14:44:32 +06:00
Nabin Hait
68fd31ca0e Merge pull request #7599 from KanchanChauhan/stock-controller-urgent-fix
[URGENT][FIX]Stock Controller fix
2017-01-28 14:11:14 +05:30
Kanchan Chauhan
b77eaf7053 [URGENT][FIX]Stock Controller fix 2017-01-28 13:26:46 +05:30
KanchanChauhan
ecc44e506b Merge pull request #7597 from neilLasrado/guarding-name
Fixes to update student guardian name patch
2017-01-27 17:45:57 +05:30
Neil Trini Lasrado
6d0da98a78 Fixes to update student guardian name patch 2017-01-27 17:44:28 +05:30
KanchanChauhan
4db5dd3cc2 Merge pull request #7591 from neilLasrado/guarding-name
Added Guardian Name to Student Master
2017-01-27 17:31:22 +05:30
Neil Trini Lasrado
7ff5682193 Merge branch 'develop' into guarding-name 2017-01-27 16:54:50 +05:30
Neil Trini Lasrado
f36ff488c0 Added Guardian Name to Student Master 2017-01-27 16:53:55 +05:30
Rushabh Mehta
245c2e885a Merge branch 'hotfix' 2017-01-27 16:18:26 +05:30
Rushabh Mehta
e239d4dfe9 Merge branch 'master' into develop 2017-01-27 16:18:26 +05:30
Rushabh Mehta
098bd34f00 bumped to version 7.2.17 2017-01-27 16:48:25 +06:00
Rushabh Mehta
063e86a1bf [fix] remove on_update in Item 2017-01-27 16:16:08 +05:30
Rushabh Mehta
b5eaf324b3 Merge branch 'master' into develop 2017-01-27 16:03:30 +05:30
Rushabh Mehta
73bf1bc4b0 Merge branch 'hotfix' 2017-01-27 16:03:29 +05:30
Rushabh Mehta
5f0027a2d0 bumped to version 7.2.16 2017-01-27 16:33:29 +06:00
Rushabh Mehta
fd82f4b0d4 [minor] fix for item_group.py 2017-01-27 16:00:47 +05:30
Rushabh Mehta
710dc5392f [merge] 2017-01-27 15:48:31 +05:30
Rushabh Mehta
83cc7c9382 Merge branch 'hotfix' 2017-01-27 15:46:07 +05:30
Rushabh Mehta
149c033c8f bumped to version 7.2.15 2017-01-27 16:16:07 +06:00
KanchanChauhan
173fe24ef4 Merge pull request #7594 from neilLasrado/student-batch
Added 'Active' checkbox in list view for Student Batch and Student Group
2017-01-27 14:56:58 +05:30
Neil Trini Lasrado
7326217ab5 Added 'Active' checkbox in list view for Student Batch and Student Group 2017-01-27 14:50:48 +05:30
KanchanChauhan
6c85ad9726 Merge pull request #7593 from neilLasrado/student-batch
Fix- Student batch strength in Batch Wise attendance report
2017-01-27 14:18:40 +05:30
Neil Trini Lasrado
8c3fb43d8a Fix- Student batch strength in Batch Wise attendance report 2017-01-27 14:13:25 +05:30
Kanchan Chauhan
3dd85a0e9e Task rename now possible 2017-01-27 12:34:06 +05:30
Kanchan Chauhan
e877ecfb7b [Fix] Permissions to view Leave Balance Report 2017-01-27 11:53:56 +05:30
noussh
425d7adcdd Update recurring-orders-and-invoices.md 2017-01-26 15:38:57 +04:00
noussh
0350db6a4e added next link 2017-01-26 15:35:01 +04:00
noussh
1e86546e2c added the link 2017-01-26 12:53:45 +04:00
noussh
6396c90956 Update multi-currency-accounting.md 2017-01-26 12:52:29 +04:00
noussh
47fbc7efa5 adde the next page link 2017-01-26 12:50:34 +04:00
noussh
8b62626cec Wrong path updated 2017-01-25 19:44:32 +04:00
Nabin Hait
355b4110c9 Merge pull request #7583 from rohitwaghchaure/valuation_rate_issue
[Fix] Get valuation rate from item master and update stock value difference
2017-01-25 19:21:04 +05:30
Nabin Hait
cb19f52985 Update stock_controller.py 2017-01-25 19:20:35 +05:30
Rohit Waghchaure
3899d74f15 [Fix] Get valuation rate from item master and update stock value difference 2017-01-25 18:47:53 +05:30
Nabin Hait
57e4ab70be Merge pull request #7580 from KanchanChauhan/calendar-manual-screenshots
New screenshots for Calendar user manual
2017-01-25 17:35:01 +05:30
Nabin Hait
d288909310 Merge pull request #7561 from KanchanChauhan/salary-slip-fix-abbr
Patch to update Salary Detail where Salary Component Abbr is null
2017-01-25 17:23:43 +05:30
Kanchan Chauhan
ce116417e1 New screenshots for Calendar user manual 2017-01-25 15:38:35 +05:30
robert schouten
67eff49516 [fix] compact print format not longer ignores format builder 2017-01-25 08:20:43 +08:00
Ricardo Johann
34354237fd added project filter to gl and carry project filter from P&L 2017-01-24 06:46:07 -03:00
vrms
1f1f56225c Update warehouse.md (#7544)
added some detail about link between Warehouse & Warehouse account & machanics of sub-warehousese (Warehouse >Room >Row > Shelf >box
2017-01-24 11:29:27 +05:30
KanchanChauhan
4333ce0fd8 Merge pull request #7569 from neilLasrado/assessment
Fix for update assessment modules patch
2017-01-24 10:52:50 +05:30
rohitwaghchaure
8452e60204 Merge pull request #7566 from KanchanChauhan/naming-series-fix
[Fix] Naming series issue fix
2017-01-24 10:31:33 +05:30
Neil Trini Lasrado
15c5ae0918 Fix for update assessment modules patch 2017-01-24 10:28:49 +05:30
Kanchan Chauhan
679cc23abb [Fix] Naming series issue fix 2017-01-23 17:20:55 +05:30
Kanchan Chauhan
c948a4fc92 Patch to update Salary Detail where Salary Component Abbr is null 2017-01-23 16:12:45 +05:30
rohitwaghchaure
ab65f6d8b1 Merge pull request #7547 from mnatalia/develop
Added translations to the web page and item dashboard.
2017-01-23 15:57:33 +05:30
KanchanChauhan
d825409226 Merge pull request #7564 from neilLasrado/patch-fix
Fix for update assessment modules patch
2017-01-23 15:46:57 +05:30
Neil Trini Lasrado
d471ad2c45 Fix for update assessment modules patch 2017-01-23 14:59:19 +05:30
Makarand Bauskar
01eefafad5 [minor] minor fixes in opportunity form (#7549) 2017-01-23 12:15:36 +05:30
Rushabh Mehta
397e508fc0 [fix] sales_partner.js, fixes #7553 2017-01-21 16:58:57 +05:30
Nabin Hait
2a660fb695 Merge pull request #7551 from neilLasrado/assessment
Added ability to disable a student in student group/student batch
2017-01-20 20:10:38 +05:30
Nabin Hait
1f9d1bb877 Merge branch 'develop' into assessment 2017-01-20 20:09:44 +05:30
Neil Trini Lasrado
16d40cf0a3 Added ability to disable a student in student group/studnet batch 2017-01-20 19:33:09 +05:30
Nabin Hait
349d520ae2 Fixed merge conflict 2017-01-20 15:44:35 +05:30
Nabin Hait
b736aafb8b Merge branch 'hotfix' 2017-01-20 15:40:35 +05:30
Nabin Hait
a1d3d84415 bumped to version 7.2.14 2017-01-20 16:10:35 +06:00
Nabin Hait
c1cc7b68c4 Merge pull request #7522 from nabinhait/hotfix
Get valuation rate from Item while not found based on SLE
2017-01-20 15:39:24 +05:30
mnatalia
e09407571c Added translations to the web page and item dashboard. 2017-01-20 12:00:25 +02:00
Nabin Hait
4c952f48f8 Some minor fixes 2017-01-20 15:15:31 +05:30
Nabin Hait
bd1a628c55 Merge pull request #7545 from rohitwaghchaure/minor_issue
[Fix] Account user not able to access the report Payment Period Based On Invoice Date
2017-01-20 14:36:48 +05:30
Rohit Waghchaure
93c001455f [Fix] Account user not able to access the report 2017-01-20 14:18:17 +05:30
Nabin Hait
548cf183ea Merge pull request #7543 from RobertSchouten/leave_allocation_fix
[fix] remove invalid parameter from leave allocation
2017-01-20 12:54:55 +05:30
Nabin Hait
153156e31a Merge pull request #7529 from rohitwaghchaure/budget_issue
[Fix] Budget not working properly
2017-01-20 12:54:29 +05:30
Nabin Hait
a0b967f2cd Get valuation rate from Item while not found based on SLE 2017-01-20 12:50:40 +05:30
Nabin Hait
f356e539bb Update set_null_value_to_fields.py 2017-01-20 12:35:22 +05:30
Rohit Waghchaure
84b827efcd [Fix] Budget not working properly 2017-01-20 12:33:50 +05:30
robert schouten
e14e042f2f [fix] remove invalid parameter from leave allocation 2017-01-20 15:02:00 +08:00
Nabin Hait
bfcacbf2ca Merge pull request #7535 from rohitwaghchaure/landed_cost_voucher_issue
[Fix] Minor issue in landed cost voucher
2017-01-20 12:12:17 +05:30
Nabin Hait
188f9da160 Merge pull request #7530 from KanchanChauhan/website-default-warehouse
[Minor] Set website warehouse as default warehouse
2017-01-20 12:11:42 +05:30
Nabin Hait
78966fe03b Merge pull request #7524 from KanchanChauhan/date-fixes
Date fixes in Production Order
2017-01-20 12:09:46 +05:30
Rohit Waghchaure
a3a977d02a [Fix] Minor issue in landed cost voucher 2017-01-19 18:38:53 +05:30
Kanchan Chauhan
03dc695c77 [Minor] Set website warehouse as default warehouse 2017-01-19 14:57:05 +05:30
Rushabh Mehta
c81621d3ce [minor] add progress bar in patch 2017-01-19 14:32:36 +05:30
Rushabh Mehta
00d3cd6d64 [fix] contact address link patch 2017-01-19 14:27:02 +05:30
Rushabh Mehta
818af75575 [patch] add patch for contact_address_update 2017-01-19 13:08:46 +05:30
Rushabh Mehta
d69fd1b8c0 [fix] update_salary_slip.py 2017-01-19 12:51:37 +05:30
Rushabh Mehta
683d98fd54 [fix] update_salary_slip.py 2017-01-19 12:48:03 +05:30
Rushabh Mehta
35e4d8b152 [fix] update_salary_slip.py 2017-01-19 12:47:27 +05:30
Rushabh Mehta
60908f4a08 [fix] update_salary_slip.py 2017-01-19 12:46:11 +05:30
Rushabh Mehta
26fdb113a8 [fix] update_salary_slip.py 2017-01-19 12:44:54 +05:30
Kanchan Chauhan
45c14ed41c [Minor] Date fix in Production Order 2017-01-19 12:22:04 +05:30
Nabin Hait
eb80fdef82 Merge pull request #7520 from RobertSchouten/heatmap_limit_dev
[fix] accounts heatmaps now covering 366 days not 20
2017-01-19 09:15:20 +05:30
Nabin Hait
e2f4b35b11 Merge pull request #7521 from rohitwaghchaure/discount_issue
[Fix] Sales return discount issue
2017-01-18 17:05:01 +05:30
Nabin Hait
6b3670848e Merge pull request #7477 from rmehta/custom-perms
[minor] fix for custom perms
2017-01-18 17:03:58 +05:30
Rohit Waghchaure
56cc542eb7 [Fix] sales return discount issue 2017-01-18 14:50:24 +05:30
Rushabh Mehta
a0c41b70c4 [fix] tax rule test 2017-01-18 14:14:20 +05:30
Nabin Hait
461e9c1e09 Merge pull request #7519 from rohitwaghchaure/print_issue
[Fix] POS print issue
2017-01-18 13:24:16 +05:30
Rohit Waghchaure
2b97cee32c [Fix] POS print issue 2017-01-18 13:21:27 +05:30
robert schouten
c0888637cc [fix] accounts heatmaps now covering 366 days not 20 2017-01-18 15:25:58 +08:00
Rushabh Mehta
8f55d6bf3a [fix] test_shopping_cart.py 2017-01-17 22:15:17 +05:30
Rushabh Mehta
d14a6c058a [fix] stop recursion while adding role 2017-01-17 18:46:37 +05:30
Rushabh Mehta
982be9f11b [tests] fixed for shopping cart 2017-01-17 17:57:38 +05:30
Rushabh Mehta
7385b73449 [fix] test 2017-01-17 17:57:38 +05:30
Nabin Hait
dd839055e3 Fixed merge conflict 2017-01-17 15:52:56 +05:30
Nabin Hait
b70767b08e Merge branch 'hotfix' 2017-01-17 15:52:25 +05:30
Nabin Hait
aff2b9479d bumped to version 7.2.13 2017-01-17 16:22:25 +06:00
Nabin Hait
a987b35b72 Merge pull request #7514 from KanchanChauhan/fix-payroll
[Minor] Payroll Fix
2017-01-17 14:59:59 +05:30
Nabin Hait
f8676b2058 Create Material Requests considering projected qty of items 2017-01-17 14:11:43 +05:30
Ben Cornwell-Mott
5597f6a830 Fixes counting of in stock parent assemblies and formatting of csv 2017-01-17 14:11:43 +05:30
Kanchan Chauhan
653303180a [Minor] Payroll Fix 2017-01-17 13:54:55 +05:30
Nabin Hait
1c91dc4589 Merge pull request #7475 from RobertSchouten/profitability_order
[fix] profiability analasyis orderby name
2017-01-17 12:39:24 +05:30
Nabin Hait
d9e216878f Merge pull request #7513 from rohitwaghchaure/paid_amount_copy_issue
[Fix] Calculate paid amount when is pos is enabled
2017-01-17 12:38:09 +05:30
Nabin Hait
9e294ee454 Merge branch 'rfq_supplier_pull' into develop 2017-01-17 12:26:09 +05:30
Nabin Hait
2ad62c2892 In RFQ, get items from material requests based on possible supplier 2017-01-17 12:25:33 +05:30
Rohit Waghchaure
f58cad6b13 [Fix] Calculate paid amount when is pos is enabled 2017-01-17 12:11:57 +05:30
Rushabh Mehta
592104ef68 [fix] tests 2017-01-17 12:06:53 +05:30
Nabin Hait
7c7b3c0ab4 Merge pull request #7465 from KanchanChauhan/attendance-enhancement
[Enhancement] Attendance Module
2017-01-17 11:47:02 +05:30
Nabin Hait
0681c77f6a Merge pull request #7506 from mntechnique/hotfix
[Fix] Project: Enabled autocomplete for project users
2017-01-17 11:27:37 +05:30
Nabin Hait
2dab8809e7 Merge pull request #7509 from kickapoo/develop
Add Full Name as option in HR Setting Employee creation option
2017-01-17 11:26:25 +05:30
Dhaifallah Alwadani
9eb830ac4f fix string translation 2017-01-17 11:13:57 +05:30
Nabin Hait
bf01958b85 Merge pull request #7510 from dalwadani/develop
fix string translation
2017-01-17 11:12:15 +05:30
Nabin Hait
2f2b6df781 Merge pull request #7411 from KanchanChauhan/fleet-moved-to-hr
Fleet management moved to HR
2017-01-17 11:06:00 +05:30
Nabin Hait
b064cf39c2 Merge branch 'develop' into fleet-moved-to-hr 2017-01-17 11:05:39 +05:30
Nabin Hait
03f82240fa Merge pull request #7222 from neilLasrado/assessment
Redesign Assessment Module
2017-01-17 11:04:02 +05:30
Dhaifallah Alwadani
9375d1dfeb fix string translation 2017-01-16 04:05:40 -08:00
Stavros Anastasiadis
241e478dc0 Add Full Name as option in HR Setting Employee creation option 2017-01-16 14:02:28 +02:00
Rushabh Mehta
ffd80a6061 [fix] warehouse test cases 2017-01-16 17:23:20 +05:30
Rushabh Mehta
6695830f3f [fix] warehouse test cases 2017-01-16 16:57:53 +05:30
Gaurav Naik
d9b4c52046 [Fix] Project: Enabled autocomplete for project users 2017-01-16 16:01:25 +05:30
Kanchan Chauhan
f80c2b9606 Fleet management moved to HR 2017-01-16 14:38:24 +05:30
Rushabh Mehta
8d39fd9790 [fix] address queries + tests 2017-01-16 13:06:15 +05:30
Nabin Hait
120461efef Merge branch 'master' into develop 2017-01-16 13:04:54 +05:30
Nabin Hait
2bbf784fd8 Merge branch 'hotfix' 2017-01-16 13:04:53 +05:30
Nabin Hait
71a730a36f bumped to version 7.2.12 2017-01-16 13:34:53 +06:00
KanchanChauhan
b89be1e193 [Minor] Demo fixes (#7499) 2017-01-16 12:57:14 +05:30
Neil Trini Lasrado
38bd62d82d Merge branch 'develop' into assessment 2017-01-16 12:23:51 +05:30
Rushabh Mehta
4ad121e1a4 [minor] fixes for Contact 2017-01-16 12:19:21 +05:30
ci2014
820abd3ba4 Fix missing comma (#7495)
Fixed missing comma after method set_contact_link
2017-01-16 11:57:34 +05:30
Nabin Hait
47bdf8b659 Merge pull request #7490 from rohitwaghchaure/pos_discount_issue
[Fix] Discount not working in the POS
2017-01-16 11:44:50 +05:30
Rohit Waghchaure
685f89f2b7 [Fix] Discount not working in the POS 2017-01-14 20:47:56 +05:30
Rushabh Mehta
95439db53f [fixes] address and contact 2017-01-14 00:25:22 +05:30
Rushabh Mehta
c0bfb0ba56 [fix] contact and address for demo 2017-01-13 23:05:56 +05:30
Rushabh Mehta
b92087cb2d [cleanup] move contact, address to frappe 💥 2017-01-13 18:54:47 +05:30
Nabin Hait
448acf6f46 Merge branch 'master' into develop 2017-01-13 17:30:46 +05:30
Nabin Hait
5d69900f66 Merge branch 'hotfix' 2017-01-13 17:30:45 +05:30
Nabin Hait
3d26ddd790 bumped to version 7.2.11 2017-01-13 18:00:45 +06:00
Nabin Hait
e7cb911634 Salary Slip Patch Fixed 2017-01-13 17:30:06 +05:30
Nabin Hait
26ac85be5b Merge branch 'master' into develop 2017-01-13 17:10:52 +05:30
Nabin Hait
ca7c5275c0 Merge branch 'hotfix' 2017-01-13 17:10:51 +05:30
Nabin Hait
fd7f3240b4 bumped to version 7.2.10 2017-01-13 17:40:51 +06:00
Nabin Hait
b166caa9fb Patch fixed 2017-01-13 17:09:57 +05:30
robert schouten
7a3d418aa5 Email inbox based off of frappe email inbox pr (#7308)
* email inbox

* inbox fixes

* separate email-inbox to pass tests

* separate email-inbox to pass tests

* fix import

* add more info to contact and address
2017-01-13 14:51:09 +05:30
Rushabh Mehta
af077dc616 [minor] fix for custom perms 2017-01-13 14:47:37 +05:30
Nabin Hait
b251cd4ccb Fixed merge conflict 2017-01-13 14:34:54 +05:30
Nabin Hait
74c56aff90 Merge branch 'hotfix' 2017-01-13 14:33:56 +05:30
Nabin Hait
45cad45420 bumped to version 7.2.9 2017-01-13 15:03:56 +06:00
Nabin Hait
90350dfb86 Merge pull request #7476 from rohitwaghchaure/draft_status_issue_after_amend
[Fix] After amend the status become cancelled even if docstatus is zero
2017-01-13 13:14:43 +05:30
Nabin Hait
e43a94de4b Merge branch 'hotfix' into draft_status_issue_after_amend 2017-01-13 13:14:32 +05:30
Nabin Hait
9698f1b923 Merge pull request #7473 from KanchanChauhan/salary-slip-before-june
Patch to add Start and End Date in Salary Slips
2017-01-13 12:53:15 +05:30
Rohit Waghchaure
29458836e4 [Fix] After amend the status become cancelled even if docstatus is zero 2017-01-13 12:51:19 +05:30
robert schouten
1a92d54dcb [fix] profiability analasyis orderby cost center name 2017-01-13 14:52:11 +08:00
Kanchan Chauhan
b6114e672f Patch to add Start and End Date in Salary Slips 2017-01-13 12:05:03 +05:30
Nabin Hait
4bd42146ba Merge pull request #7462 from rohitwaghchaure/minor_pos_issue
[Fix] POS issues
2017-01-13 11:55:52 +05:30
Nabin Hait
ba2a76cfb7 Merge pull request #7453 from KanchanChauhan/salary-register-report
Changes to Salary Register
2017-01-13 11:51:48 +05:30
Nabin Hait
8f0c060578 Merge pull request #7447 from saurabh6790/tree_param_fix
[fix] provision to handle custom mandatory params while creating node
2017-01-13 11:50:18 +05:30
Nabin Hait
17cd36b7d5 Merge pull request #7451 from saurabh6790/chequeprint_date_fix
[minor][fix] show date in user format
2017-01-13 11:36:12 +05:30
Nabin Hait
90de12fea3 Merge pull request #7446 from KanchanChauhan/fieldtype-edit-desc
[Minor] Field type of Description field changed to Text Editor
2017-01-13 11:34:51 +05:30
Nabin Hait
007c87ea63 Merge pull request #7440 from nabinhait/gle_repost_optimization
Optimization to reduce GLE reposting time for future stock transactions
2017-01-13 11:33:42 +05:30
Nabin Hait
02b6fe0fcb Merge pull request #7443 from nabinhait/hotfix
Fetch bin details after setting warehouse based on POS Profile
2017-01-13 11:32:57 +05:30
Nabin Hait
4440ac037f Merge pull request #7470 from frappe/forellana-digithinkit-patch-1
[FIX] Contact form breaks on existing lead
2017-01-13 11:29:10 +05:30
robert schouten
d56627f2b7 [fix] profiability analasyis orderby project name 2017-01-13 11:53:43 +08:00
Felipe Orellana
ac81440a81 [FIX] Contact form breaks on existing lead
When an email address from the contacts form is from a existing lead utils.py tries to set new_lead(an undefined var) as the lead reference if a lead is found.
2017-01-12 12:08:20 -05:00
Kanchan Chauhan
7933eb685c [Enhancement] Attendance Module 2017-01-12 17:24:53 +05:30
Rohit Waghchaure
8afe267813 [Fix] POS issues 2017-01-12 15:22:02 +05:30
bcornwellmott
5dfffe7586 Merge pull request #7449 from RicardoJohann/rename_ss
allowed rename salary structure
2017-01-11 09:15:03 -08:00
Kanchan Chauhan
2f3ae914a6 Changes to Salary Register 2017-01-11 19:45:01 +05:30
Ben Cornwell-Mott
1cd7e54822 Adds button to find MRs linked to Supplier 2017-01-11 03:05:49 -08:00
Saurabh
056276c60e [minor][fix] show date in user format 2017-01-11 15:50:09 +05:30
RicardoJohann
7182de7684 allowed rename salary structure 2017-01-11 06:28:59 -02:00
Saurabh
2f02101d7d [fix] provision to handle custom mandatory params while creating node 2017-01-11 12:41:01 +05:30
Kanchan Chauhan
595cfb9f17 [Minor] Field type of Description field changed to Text Editor 2017-01-11 12:03:15 +05:30
Nabin Hait
0287d31c0f Fetch bin details after setting warehouse based on POS Profile 2017-01-11 10:31:45 +05:30
Nabin Hait
ffa5ffe607 Merge pull request #7442 from nabinhait/hotfix
Fix for Budget against Project
2017-01-11 10:30:44 +05:30
Nabin Hait
c0eab41ec5 Fix for Budget against Project 2017-01-11 10:16:19 +05:30
Ben Cornwell-Mott
3d491f90cc Created 2 reports for stock details 2017-01-10 14:14:18 -08:00
Neil Trini Lasrado
2a9e0f6fd8 Added assessment result tool 2017-01-10 17:32:02 +05:30
Nabin Hait
9e08ccdf39 Merge pull request #7425 from KanchanChauhan/sync-projecttask-task
Sync Project Task and Task
2017-01-10 17:26:51 +05:30
Nabin Hait
1612fa1253 Merge pull request #7426 from nabinhait/hotfix
Show values based on precision and filter out zero value rows
2017-01-10 17:26:27 +05:30
Nabin Hait
20aba32318 Merge pull request #7427 from KanchanChauhan/projects-manager-role
[Minor] Added Projects Manager role
2017-01-10 17:25:16 +05:30
Kanchan Chauhan
c4aceaad7f [Minor] Added Projects Manager role 2017-01-10 16:35:54 +05:30
Nabin Hait
5dd988207f Show values based on precision and filter out zero value rows 2017-01-10 16:10:40 +05:30
Kanchan Chauhan
4a15fa4c86 Sync Project Task and Task 2017-01-10 16:01:38 +05:30
Rushabh Mehta
d40e661ebd [style] better demo start page 2017-01-10 14:46:54 +05:30
Nabin Hait
51d45d8bce Fixed merge conflict 2017-01-10 12:32:01 +05:30
Nabin Hait
b8350353ea Merge branch 'hotfix' 2017-01-10 12:30:10 +05:30
Nabin Hait
4180a37773 bumped to version 7.2.8 2017-01-10 13:00:09 +06:00
Nabin Hait
a7f616564e Merge pull request #7417 from KanchanChauhan/quick-entry-for-item
[Minor] Valuation rate in Quick entry for Item
2017-01-10 12:23:36 +05:30
Nabin Hait
b083591164 Merge pull request #7418 from frappe/revert-7409-daterangecontrol
Revert "proposed usage of daterange picker"
2017-01-10 12:20:14 +05:30
Nabin Hait
01baceb74e Revert "proposed usage of daterange picker" 2017-01-10 12:19:48 +05:30
Kanchan Chauhan
43e07aed2c [Minor]Valuation rate in Quick entry for Item 2017-01-10 12:06:51 +05:30
Nabin Hait
9215581345 Merge pull request #7414 from KanchanChauhan/timesheet-payroll-frequency-toggle
[Fix] Payroll Frequency toggle fix
2017-01-10 11:58:36 +05:30
Kanchan Chauhan
2b41f9d548 [Fix] Payroll Frequency toggle fix 2017-01-09 18:43:52 +05:30
Neil Trini Lasrado
5a30467ae5 Added test case 2017-01-09 18:26:03 +05:30
Neil Trini Lasrado
a56224c03a Rename Assessment to Assessment Plan 2017-01-09 18:26:03 +05:30
Neil Trini Lasrado
233ecfdd9c Renamed min_score to threshold in Grading Scale 2017-01-09 18:26:03 +05:30
Neil Trini Lasrado
577cfd559f Removed LMS code in Course master 2017-01-09 18:26:03 +05:30
Neil Trini Lasrado
5c87455918 Patch for assessment module redesign 2017-01-09 18:26:03 +05:30
Neil Trini Lasrado
06ed74dc7c Redesign Assessment Module 2017-01-09 18:26:02 +05:30
Nabin Hait
ec793b4846 Merge branch 'hotfix' of git://github.com/frappe/erpnext into hotfix 2017-01-09 17:24:10 +05:30
Nabin Hait
6e9d2a3c1f fixed conflict 2017-01-09 17:21:34 +05:30
Nabin Hait
a2fae844b6 Merge pull request #7410 from RobertSchouten/timesheet_overlap_validation
[fix] timesheet overlap validation not including modified timesheet
2017-01-09 17:15:40 +05:30
Nabin Hait
21544ca978 Merge branch 'hotfix' 2017-01-09 16:57:11 +05:30
Nabin Hait
2bb9093b9a bumped to version 7.2.7 2017-01-09 17:27:10 +06:00
Nabin Hait
f0c41b5709 Merge pull request #7412 from nabinhait/hotfix
Allow fetching same items multiple times from source doc if all qty not processed
2017-01-09 16:00:08 +05:30
Nabin Hait
23b836dcdb Merge pull request #7386 from arvindstutzen/patch-1
Update step-8-customer-names.md
2017-01-09 15:55:38 +05:30
Nabin Hait
297ae85c31 Merge pull request #7409 from RobertSchouten/daterangecontrol
proposed usage of daterange picker
2017-01-09 15:55:17 +05:30
Nabin Hait
1839fcca11 Merge pull request #7406 from saurabh6790/terms_and_cond_fix
[fix] if terms exists then only call render_template
2017-01-09 15:49:56 +05:30
Nabin Hait
d1eb237909 Merge pull request #7400 from rohitwaghchaure/minor_issue
Get item default warehouse
2017-01-09 15:49:14 +05:30
Nabin Hait
a9b9edd9bc Merge pull request #7392 from frappe/bcornwellmott-patch-2
Fix number of digits on report
2017-01-09 15:48:04 +05:30
Nabin Hait
07b524ee50 Merge pull request #7398 from nabinhait/filter_dashboard
Reload in_standard_filter property
2017-01-09 15:43:30 +05:30
Nabin Hait
802b4359b5 Fetch same items multiple times from source doc if all qty not processed 2017-01-09 15:32:20 +05:30
nick9822
6f48d4be1c whitelisted erpnext.stock.utils.get_stock_balance (#7402)
whitelisted erpnext.stock.utils.get_stock_balance with respect to
https://github.com/frappe/erpnext/issues/7364
2017-01-09 12:12:36 +05:30
robert schouten
138c2f6b29 [fix] timesheet overlap validation not including modified timesheet 2017-01-09 12:50:35 +08:00
robert schouten
81130e848e proposed usage of daterange picker 2017-01-09 08:38:27 +08:00
Saurabh
f65e8de5a5 [fix] if terms exists then only call render_template 2017-01-07 08:18:10 +05:30
bcornwellmott
34e34ed1e8 Trigger Restart of build checks 2017-01-06 17:21:16 -08:00
Rushabh Mehta
8b133ac087 [minor] [tests] fix, tests will fail on the 5th of a month! 2017-01-06 17:21:04 +05:30
Rohit Waghchaure
6734c4ad5c Get item default warehouse 2017-01-06 14:39:40 +05:30
Nabin Hait
91621639e8 Reload in_standard_filter property 2017-01-06 12:54:16 +05:30
bcornwellmott
a3e7c38734 Fix number of digits on report
Currently the cells can show many digits.
2017-01-05 09:44:18 -08:00
Nabin Hait
7b4bdffea2 Merge pull request #7385 from bhupennewalkar1337/quot
Fix#6590  Now you can make quotation from supplier quotation
2017-01-05 14:58:52 +05:30
Nabin Hait
59a67c3586 Update supplier_quotation.py 2017-01-05 14:58:30 +05:30
Arvind Subramanian
efc9372f46 Update step-8-customer-names.md 2017-01-05 08:34:58 +05:30
bhupen
107099aac9 you can make quotation from supplier quotation 2017-01-04 17:04:12 +05:30
Nabin Hait
d08c248642 Merge pull request #7354 from Scheercuzy/enlarge-item-image-website
Hyperlink on item image on website
2017-01-04 15:58:44 +05:30
britlog
35cefb1275 fix success_list if http status == 200 + utf-8 support + optional success message 2017-01-04 15:53:26 +05:30
Nabin Hait
8281b36a26 Merge pull request #7380 from KanchanChauhan/emailid-to-emailaddress
Email ID renamed to Email Address
2017-01-04 15:46:48 +05:30
Nabin Hait
f45851c245 Merge pull request #7379 from KanchanChauhan/accounts-reports
[Enhancement] Summary link on Accounts Payable and Accounts Receivable
2017-01-04 15:45:39 +05:30
Nabin Hait
0dab40f4a1 Merge pull request #7377 from KanchanChauhan/naming-series
[Fix] Naming series issue
2017-01-04 15:44:00 +05:30
Nabin Hait
96562e3eb7 Merge pull request #7362 from rmehta/minor-fixes
[minor] dont get warehouse in opening entry #7353
2017-01-04 15:42:23 +05:30
Nabin Hait
202bcc09d5 Merge pull request #7336 from rohitwaghchaure/pos_enhancement_and_issues
[Enhancement] POS features
2017-01-04 15:15:32 +05:30
Nabin Hait
3051a3dd97 Fixed test case for margin 2017-01-04 15:11:58 +05:30
Kanchan Chauhan
b7cc393eb8 Email ID renamed to Email Address 2017-01-03 16:45:38 +05:30
Kanchan Chauhan
f4832cf2b9 [Enhancement] Summary link on Accounts Payable and Accounts Receivable 2017-01-03 16:29:41 +05:30
Scheercuzy
7c161cfff2 Merge remote-tracking branch 'frappe/develop' into enlarge-item-image-website 2017-01-03 16:03:43 +06:30
Kanchan Chauhan
0e8361d1de [Fix] Naming series issue 2017-01-03 14:29:17 +05:30
Nabin Hait
1d88c65be4 Merge pull request #7374 from rohitwaghchaure/billed_report_enhancement
[Enhancement] Consolidated billed report, changed the report type from query to script
2017-01-02 17:40:51 +05:30
Nabin Hait
ab42fc006f Merge branch 'master' into develop 2017-01-02 17:26:55 +05:30
Nabin Hait
c657cceffc Merge branch 'hotfix' 2017-01-02 17:26:54 +05:30
Nabin Hait
1ecf613c3c bumped to version 7.2.6 2017-01-02 17:56:54 +06:00
Nabin Hait
ceea71bcfc Merge pull request #7365 from rohitwaghchaure/terms_and_condition
minor fix
2017-01-02 17:24:42 +05:30
Nabin Hait
b0e329b803 Merge pull request #7367 from saurabh6790/sms_log_fix
[fix] status check fix
2017-01-02 17:24:25 +05:30
Nabin Hait
506120936a Merge pull request #7373 from KanchanChauhan/leave-for-absent
[Fix] Attendance validation in Leave Application
2017-01-02 17:23:45 +05:30
Nabin Hait
7fc18f359c Currency symbol for budget amount based on company 2017-01-02 17:21:34 +05:30
Nabin Hait
92254d3930 Set serial nos in DN based on FIFO based on Stock Settings 2017-01-02 17:01:27 +05:30
Rohit Waghchaure
5a383e5cdd [Enhancement] Consolidated billed report, changed type from query to script 2017-01-02 16:20:43 +05:30
Nabin Hait
06966e8e1d minor fix 2017-01-02 15:10:01 +05:30
Kanchan Chauhan
5594050104 [Fix] Attendance validation in Leave Application 2017-01-02 11:14:44 +05:30
Rohit Waghchaure
cdbacf5398 minor fix 2016-12-30 17:06:01 +05:30
Saurabh
6bbed0297b [fix] status check fix 2016-12-30 17:05:40 +05:30
KanchanChauhan
4601fdd98d Better Salary Slip logs in Process Payroll (#7322) 2016-12-30 16:26:55 +05:30
Nabin Hait
9784d27317 Optimization to reduce GLE reposting time for future stock transactions 2016-12-30 16:21:35 +05:30
Nabin Hait
ce5f942678 Merge branch 'master' into develop 2016-12-30 15:54:32 +05:30
Nabin Hait
3cae3a5190 Merge branch 'hotfix' 2016-12-30 15:54:31 +05:30
Nabin Hait
edb99f8750 bumped to version 7.2.5 2016-12-30 16:24:31 +06:00
Nabin Hait
4de4b56c60 Merge pull request #7363 from rohitwaghchaure/terms_and_conditions_for_company
set default terms and condition if tc_name is available on the form
2016-12-30 15:46:57 +05:30
Rohit Waghchaure
585448b225 set default terms and condition if tc_name is available on the form 2016-12-30 15:41:55 +05:30
Rushabh Mehta
985cb8226d [minor] dont get warehouse in opening entry #7353 2016-12-30 15:06:54 +05:30
Nabin Hait
e97d40806f Merge branch 'master' into develop 2016-12-30 14:56:20 +05:30
Nabin Hait
257ecf71ac Merge branch 'hotfix' 2016-12-30 14:56:20 +05:30
Nabin Hait
5105b1e789 bumped to version 7.2.4 2016-12-30 15:26:19 +06:00
Nabin Hait
dc0a277085 Merge pull request #7355 from manassolanki/hotfix
Fetching the item details from the reference doctype in QI
2016-12-30 14:10:21 +05:30
Nabin Hait
fa2feae314 Merge pull request #7359 from nabinhait/hotfix
[fix] Make Journal Entry against SO
2016-12-30 12:38:56 +05:30
Nabin Hait
494a4d9ba1 Merge pull request #7360 from KanchanChauhan/salary-register-repprt
[Fix] Monthly Salary Register Fix
2016-12-30 12:38:46 +05:30
Kanchan Chauhan
7b29dc7208 [Fix] Monthly Salary Register Fix 2016-12-30 12:36:00 +05:30
Nabin Hait
9646be1d5d [fix] Make Journal Entry against SO 2016-12-30 11:14:41 +05:30
Rushabh Mehta
a8326de4d0 [fix] on_update in item.py 2016-12-30 06:17:45 +05:30
Rushabh Mehta
2097ccfaea [fix] item_group.py #7358 2016-12-30 06:09:41 +05:30
Manas Solanki
5c82e9ef8b Fetching the item details from the reference doctype in quality inspection
Error Report [2016-12-29]
2016-12-29 18:01:25 +05:30
Scheercuzy
f483582957 Hyperlink Item Image
added hyperlink on item image
2016-12-29 18:56:44 +06:30
Nabin Hait
ae25e0da88 Merge branch 'hotfix' 2016-12-29 11:04:05 +05:30
Nabin Hait
f327a58b7f Merge branch 'master' into develop 2016-12-29 11:04:05 +05:30
Nabin Hait
3d98d23e22 bumped to version 7.2.3 2016-12-29 11:34:05 +06:00
Nabin Hait
11bde0ba14 Patch fixed 2016-12-29 10:58:05 +05:30
Nabin Hait
2469f247df Merge pull request #7341 from StrellaGroup/develop
Fixed spelling errors on Production Planning Tool and manual.
2016-12-28 17:12:01 +05:30
Nabin Hait
392806c0d4 Merge pull request #7342 from neilLasrado/develop
Added Guardian to school module
2016-12-28 16:26:16 +05:30
Neil Trini Lasrado
986927ca98 Added Guardian to school module 2016-12-28 16:15:35 +05:30
Muhammad Huzaifah Bin Ismail
465da8ce09 Fixed spelling errors on Production Planning Tool and manual. 2016-12-28 18:15:45 +08:00
Rohit Waghchaure
bef185c404 restrict user to edit the rate in the POS 2016-12-28 15:16:49 +05:30
Nabin Hait
340c9d327a Merge pull request #7339 from neilLasrado/develop
[Fix] Student Monthly Attendance Sheet
2016-12-28 13:42:18 +05:30
Neil Trini Lasrado
0152516ba4 [Fix] Student Monthly Attendance Sheet 2016-12-28 13:01:14 +05:30
Rushabh Mehta
94c4d7014d [fix] item_name in stock reco 2016-12-28 06:56:09 +05:30
Rohit Waghchaure
249bc6167f fix company issue 2016-12-28 00:20:08 +05:30
Rohit Waghchaure
aa9b8603b9 added paid amount in print format 2016-12-27 17:43:23 +05:30
Rohit Waghchaure
fe7a5b305f create customer from POS 2016-12-27 17:31:32 +05:30
Rohit Waghchaure
8c9c9cfc5f When a new company is made, cash account should be automatically set for Mode of Payment 2016-12-27 17:31:32 +05:30
Rushabh Mehta
5cb1b6bf3f [minor] translation fix 2016-12-27 16:30:20 +05:30
Nabin Hait
3bcf9b5e70 Fixed merge conflict 2016-12-27 14:30:17 +05:30
Nabin Hait
a6be7c71ed Merge branch 'hotfix' 2016-12-27 14:27:19 +05:30
Nabin Hait
89c8b4d6ae bumped to version 7.2.2 2016-12-27 14:57:19 +06:00
Nabin Hait
e5f5017973 Merge pull request #7333 from rmehta/variant-website-fix
[fix] item variants not directly shown in website due to route clash
2016-12-27 13:31:30 +05:30
Rushabh Mehta
174c3478a1 [fix] item variants not directly shown in website due to route clash 2016-12-27 12:30:30 +05:30
Rushabh Mehta
512b85e040 [minor] replace autocomplete with awesomplete 2016-12-27 12:14:37 +05:30
Rushabh Mehta
e60c2c7b7a [minor] dashboard cleanups 2016-12-27 12:14:37 +05:30
Nabin Hait
9007815ddc Merge pull request #7326 from neilLasrado/develop
Improved Student Dashboard
2016-12-26 18:33:19 +05:30
Neil Trini Lasrado
22239ac610 Improved Student Dashboard 2016-12-26 17:14:16 +05:30
Nabin Hait
88817b40df Merge pull request #7284 from mntechnique/develop
Report : Batch Item Expiry Status
2016-12-26 16:10:46 +05:30
Nabin Hait
4573029a5e Merge pull request #7292 from frappe/bcornwellmott-patch-1
Add hours to calendar labels
2016-12-26 16:09:11 +05:30
Nabin Hait
0631d516ce Merge pull request #7290 from netchampfaris/pos-item-area-scroll
pos item area scrollable
2016-12-26 16:07:38 +05:30
Nabin Hait
c2690425e3 Merge pull request #7310 from bhupennewalkar1337/hotfix
Fix #7202 unchecking pos will reflect automatically
2016-12-26 16:07:19 +05:30
Nabin Hait
488ad54bbc Merge pull request #7280 from neilLasrado/leave
Added mark as present to student leave application
2016-12-26 16:06:44 +05:30
Nabin Hait
0d49cdf024 Merge pull request #7324 from nabinhait/lcv_testcase
[test] Fixed test cases for LCV
2016-12-26 15:52:40 +05:30
Neil Trini Lasrado
df4b9ab630 Optimised code for Student Monthly Attendance Report 2016-12-26 15:40:01 +05:30
Nabin Hait
7b2177a544 [test] Fixed test cases for LCV 2016-12-26 15:31:05 +05:30
Neil Trini Lasrado
94f42ea145 Added from date and to date to student leave application 2016-12-26 12:09:27 +05:30
Neil Trini Lasrado
9a7cb6ce92 Added mark as present to student leave application 2016-12-26 12:09:27 +05:30
Nabin Hait
61a190dd69 Merge branch 'master' into develop 2016-12-24 11:01:26 +05:30
bhupen
bcf63a2a8f unchecking pos will reflect automatically 2016-12-23 18:00:18 +05:30
Nabin Hait
ba95fc4fa0 Fixed version conflict 2016-12-23 17:44:05 +05:30
Nabin Hait
c2d66bdfb2 Merge branch 'master' into develop 2016-12-23 16:45:09 +05:30
Nabin Hait
aa2d949f61 Merge pull request #7295 from bhupennewalkar1337/lcv
Fix#3717  entering amount in lcv is enabled
2016-12-23 15:49:07 +05:30
Nabin Hait
1e1e28b0ae Update landed_cost_voucher.js 2016-12-23 15:48:57 +05:30
Nabin Hait
06c6628481 Merge pull request #7279 from KanchanChauhan/automate-user-creation
Create User button in Employee if no User ID selected
2016-12-23 15:31:55 +05:30
Nabin Hait
0177c02c0f Merge pull request #7286 from rohitwaghchaure/pos_letter_head_issue
minor fix
2016-12-23 15:19:32 +05:30
bhupen
a83de5eac1 applicabe charges field is now editable 2016-12-22 16:24:14 +05:30
bhupen
914ae77a22 Limit instead of Allowance in stock settings 2016-12-22 16:24:14 +05:30
bhupen
5bb85e7a95 partially orderd status will be shown in material request 2016-12-22 16:24:14 +05:30
bcornwellmott
e549984a42 Grabs title from SQL
Gets a concatenated title label for the Calendar event that includes the number of hours
2016-12-21 12:36:45 -08:00
bcornwellmott
3385bd4921 Add hours to label in calendar view
Adds a label for the number of hours to each calendar event
2016-12-21 12:33:32 -08:00
Faris Ansari
0822e41f96 pos item area scrollable 2016-12-21 18:17:00 +05:30
Revant Nandgaonkar
1c00b1fb21 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2016-12-21 18:01:35 +05:30
Rushabh Mehta
0632ee3da9 Merge branch 'v7.2.0-beta' into develop 2016-12-21 17:31:09 +05:30
Rushabh Mehta
c6bd7ade2f [fix] inclusive tax + total bug and cleanup in stock entry get_uom, fixes #7253 2016-12-21 17:30:29 +05:30
Kanchan Chauhan
58ed0c6efa Create User button in Employee if no User ID selected 2016-12-21 16:18:59 +05:30
Revant Nandgaonkar
00e65cb70b Report - Batch Item Expiry Status
Changed column name `Expiry Status` to `Expiry (In Days)`
Changed column type from Data to Int
2016-12-21 14:21:53 +05:30
Rohit Waghchaure
d567e57f82 minor fix 2016-12-21 13:18:36 +05:30
Revant Nandgaonkar
c30ae28422 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2016-12-21 12:52:23 +05:30
Revant Nandgaonkar
0766d3e67e Report : Batch Item Expiry Status
Select From Date and To Date
Lists Items about to expire or already expired
Expiry Status column shows number of days in which item/batch will expire
2016-12-21 12:32:12 +05:30
Nabin Hait
e7939fd87b Merge branch 'master' into develop 2016-12-21 12:18:38 +05:30
Nabin Hait
2b8aafb08d Merge pull request #7276 from neilLasrado/develop
Allow Data Import for Student Guardian
2016-12-21 11:17:13 +05:30
rohitwaghchaure
34e820d02d [Enhancement] Added letter head for the report (#7250) 2016-12-20 16:54:24 +05:30
Rushabh Mehta
17d05b4fd7 Merge branch 'v7.2.0-beta' into develop 2016-12-20 12:59:29 +05:30
Rushabh Mehta
89af62a680 Merge branch 'v7.2.0-beta' into develop 2016-12-20 12:21:03 +05:30
Neil Trini Lasrado
8979e1c7a5 Allow Data Import for Student Guardian 2016-12-20 11:53:52 +05:30
Nabin Hait
f573d43b90 fixed version conflict 2016-12-20 11:40:15 +05:30
Rushabh Mehta
f944fb9e46 Merge branch 'v7.2.0-beta' into develop 2016-12-19 17:06:56 +05:30
Rushabh Mehta
688f2284af [minor] [patch] 2016-12-19 13:15:52 +05:30
Rushabh Mehta
a320b1a494 Merge branch 'v7.2.0-beta' into develop 2016-12-19 12:32:44 +05:30
Rushabh Mehta
e80208e6e5 Merge branch 'v7.2.0-beta' into develop 2016-12-19 12:02:14 +05:30
Rushabh Mehta
6fc6670a25 Delete zh-tw.csv (#7260) 2016-12-19 11:57:59 +05:30
1093 changed files with 105000 additions and 77385 deletions

View File

@@ -1,52 +1,58 @@
##General Overview
## General Overview
We have three branches where all the work happens:
There are three branches where all the work happens:
* **master** - This is the stable branch based on which we do releases. This branch is for production.
* **develop** - This is an unstable branch for development purposes, it has bleeding edge features and fixes, but it's not recommended for production. Bug fixes and new features go here.
* **hotfix** - This is a branch dedicated to hotfixes on the master branch. Urgent bug fixes go here.
* **master** - This is the production / stable branch for releases.
* **develop** - This is bleeding edge with features and fixes. Non critical bug fixes and new features go here. All updates to master also get pushed to develop.
* **hotfix** - Urgent bug fixes go here. This is merged into master for releases.
## Release Cycles
Once we deem the develop branch to be stable, we merge it into the master and do a major release. The hotfix branch is solely for making urgent bug fixes on the current master branch, which we then merge into master.
We almost never push directly to master.
Usually, hotfix / develop is pushed to master roughly every week.
If we are close to a major release, then all bugfixes get pushed to hotfix and a release is done every week or as necessary.
***
##Workflow
## Contributing
Contributing to ERPNext is not very different from the usual Pull Request workflow on GitHub.
###Prerequisites :
### Prerequisites :
* You need to know [Git and Github basics](https://try.github.io/levels/1/challenges/1)
* You need to have a Fork of the [ERPNext repo](https://github.com/frappe/erpnext) in your personal Github account
* You need to add a [remote](#glossary) for your Forked repository. `git remote add origin [your-erpnext-repo-url]`
###The Process:
### The Process:
1. Make sure you're in the right branch. **develop** for adding features / fixing issues and **hotfix** for urgent bug fixes
2. Make your changes
3. Create and checkout a new branch for the changes you've made. `git checkout -b [branch-name]`
4. Add and commit your changes `git commit -am "[commit-message]"
5. If you have been working on sometime for a long time, you should [rebase](#glossary) your branch with our develop branch. `git pull upstream develop --rebase` where `upstream` is the remote name of our repo
5. If you have been working on sometime for a long time, you should [rebase](#glossary) your branch with main develop branch. `git pull upstream develop --rebase` where `upstream` is the remote name of our repo
6. Now, push your changes to your fork. `git push origin [branch-name]`
If you rebased your commits, you will have to [force push](http://vignette2.wikia.nocookie.net/starwars/images/e/ea/Yodapush.png/revision/latest?cb=20130205190454) `git push origin [branch-name] --force`
7. You should now be able to see your pushed branch on Github, now create a pull request against the branch that you want to merge to.
8. Wait for us to review it
###Common Problems:
### Your Pull Request Should have
1. Clear explanation of the use case
1. Screenshots / Screecast GIF
1. Test Cases (if applicable)
1. Update to documentation
### Common Problems:
* During rebase you might face _merge conflicts_. A merge conflict occurs when you have made changes to the same file that someone else has, in the commits you're pulling. You need to resolve these conflicts by picking which code you want to keep, yours or theirs. You can use `git mergetool` for help.
* Sometimes you don't have a local branch to which you want to make changes to. In that case you first run `git fetch` followed by `git checkout --track -b upstream/[branch-name]`
###Good practices:
### Good practices:
* You should rebase your branch with the branch you plan to make a Pull Request to as often as you can.
* You should rebase your branch with the branch you plan to make a Pull Request (PR) to as often as you can.
* Your commit messages should be precise and explain exactly what the commit does. Same goes for the Pull Request title.
* When making a PR make sure that all your code is committed properly by checking the diffs.
* If you're working on different things at the same time, make sure you make separate branches for each.
@@ -55,7 +61,7 @@ If you rebased your commits, you will have to [force push](http://vignette2.wiki
* Tabs, not spaces.
###Glossary
### Glossary
* remote - A remote is a connection to a Github repo. You should have two remotes, one that points to your repo and one to ours.
* rebase - When you rebase a branch, you pull commits from your remote branch and move your commits on top of it. This allows you to update your branch with the latest changes without losing your changes.

View File

@@ -38,6 +38,14 @@ The ERPNext code is licensed as GNU General Public License (v3) and the Document
---
## Contributing
1. [Pull Request Requirements](https://github.com/frappe/erpnext/wiki/Pull-Request-Guidelines)
1. [Translations](https://translate.erpnext.com)
1. [Chart of Accounts](https://charts.erpnext.com)
---
## Logo and Trademark
The brand name ERPNext and the logo are trademarks of Frappe Technologies Pvt. Ltd.

View File

@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
__version__ = '7.2.1'
__version__ = '8.0.14'
def get_default_company(user=None):
'''Get default company for user'''
@@ -24,3 +24,26 @@ def get_default_currency():
company = get_default_company()
if company:
return frappe.db.get_value('Company', company, 'default_currency')
def get_company_currency(company):
'''Returns the default company currency'''
if not frappe.flags.company_currency:
frappe.flags.company_currency = {}
if not company in frappe.flags.company_currency:
frappe.flags.company_currency[company] = frappe.db.get_value('Company', company, 'default_currency')
return frappe.flags.company_currency[company]
def set_perpetual_inventory(enable=1):
accounts_settings = frappe.get_doc("Accounts Settings")
accounts_settings.auto_accounting_for_stock = enable
accounts_settings.save()
def encode_company_abbr(name, company):
'''Returns name encoded with company abbreviation'''
company_abbr = frappe.db.get_value("Company", company, "abbr")
parts = name.rsplit(" - ", 1)
if parts[-1].lower() != company_abbr.lower():
parts.append(company_abbr)
return " - ".join([parts[0], company_abbr])

View File

@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -76,7 +78,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Account Name",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Group",
@@ -134,7 +138,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Root Type",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Report Type",
@@ -222,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -251,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -278,6 +287,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Parent Account",
@@ -308,7 +318,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Account Type",
@@ -340,6 +351,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate",
@@ -370,6 +382,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frozen",
@@ -400,6 +413,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse",
@@ -428,6 +442,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Balance must be",
@@ -456,6 +471,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Lft",
@@ -483,6 +499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rgt",
@@ -510,6 +527,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Old Parent",
@@ -538,7 +556,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-15 14:43:50.121671",
"modified": "2017-02-17 16:22:49.249075",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",
@@ -554,7 +572,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -575,7 +592,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -596,7 +612,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -617,7 +632,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -638,7 +652,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -654,6 +667,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "",
"show_name_in_global_search": 1,
"sort_order": "ASC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -3,11 +3,12 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, cint
from frappe.utils import cint, fmt_money
from frappe import throw, _
from frappe.model.document import Document
class RootNotEditable(frappe.ValidationError): pass
class BalanceMismatchError(frappe.ValidationError): pass
class Account(Document):
nsm_parent_field = 'parent_account'
@@ -162,23 +163,38 @@ class Account(Document):
throw(_("Report Type is mandatory"))
def validate_warehouse_account(self):
'''If perpetual inventory is set, and warehouse is linked,
the account balance and stock balance as of now must always match.
'''
from erpnext.accounts.utils import get_balance_on
from erpnext.stock.utils import get_stock_value_on
if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
return
if self.account_type == "Stock" and not cint(self.is_group):
if not self.warehouse:
throw(_("Warehouse is mandatory"))
old_warehouse = cstr(frappe.db.get_value("Account", self.name, "warehouse"))
if old_warehouse != cstr(self.warehouse):
if old_warehouse and frappe.db.exists("Warehouse", old_warehouse):
self.validate_warehouse(old_warehouse)
if self.warehouse:
self.validate_warehouse(self.warehouse)
if self.account_type == "Stock":
if self.is_group == 0 and not self.warehouse:
frappe.throw(_("Warehouse is mandatory for non group Accounts of type Stock"))
if self.warehouse:
# company must be same
if frappe.get_value('Warehouse', self.warehouse, 'company') != self.company:
frappe.throw(_("Warehouse company must be same as Account company"))
# balance must be same
stock_balance = get_stock_value_on(self.warehouse)
if self.is_new():
account_balance = 0.0
else:
account_balance = get_balance_on(self.name)
if account_balance != stock_balance:
frappe.throw(_('Account balance ({0}) and stock value ({1}) must be same')\
.format(fmt_money(account_balance, self.account_currency),
fmt_money(stock_balance, self.account_currency)))
elif self.warehouse:
self.warehouse = None
def validate_warehouse(self, warehouse):
lft, rgt = frappe.db.get_value("Warehouse", warehouse, ["lft", "rgt"])

View File

@@ -117,7 +117,7 @@ def get_charts_for_country(country):
def get_account_tree_from_existing_company(existing_company):
all_accounts = frappe.get_all('Account',
filters={'company': existing_company},
filters={'company': existing_company, "warehouse": ""},
fields = ["name", "account_name", "parent_account", "account_type",
"is_group", "root_type", "tax_rate"],
order_by="lft, rgt")
@@ -126,7 +126,6 @@ def get_account_tree_from_existing_company(existing_company):
# fill in tree starting with root accounts (those with no parent)
build_account_tree(account_tree, None, all_accounts)
return account_tree
def build_account_tree(tree, parent, all_accounts):

View File

@@ -88,10 +88,7 @@
"Items Delivered to Customs on temprary Base": {}
},
"Stock in Hand": {
"All Warehouses": {
"account_type": "Stock",
"is_group": 1
},
"is_group": 1,
"account_type": "Stock"
}
},
@@ -341,9 +338,7 @@
"Post Dated Cheques Paid": {
"account_type": "Payable"
},
"Staff Payable": {
"account_type": "Payable"
},
"Staff Payable": {},
"Suppliers Price Protection": {
"account_type": "Payable"
},

View File

@@ -136,7 +136,8 @@
"Accounts Payable": {
"Creditors": {
"account_type": "Payable"
}
},
"Payroll Payable": {}
},
"Stock Liabilities": {
"Stock Received But Not Billed": {

View File

@@ -40,10 +40,7 @@
"Rental Deposits": {}
},
"Stock Assets": {
"All Warehouses": {
"account_type": "Stock",
"is_group": 1
},
"is_group": 1,
"account_type": "Stock"
},
"Tax Assets": {
@@ -265,7 +262,8 @@
"Accounts Payable": {
"Creditors": {
"account_type": "Payable"
}
},
"Payroll Payable": {}
},
"Duties and Taxes": {
"Deferred Tax Liabilities-Current": {},

View File

@@ -142,7 +142,8 @@
"Accounts Payable": {
"Creditors":{
"account_type": "Payable"
}
},
"Payroll Payable": {}
},
"Duties and Taxes": {
"account_type": "Tax",

View File

@@ -107,7 +107,7 @@ def get():
_("Office Maintenance Expenses"): {},
_("Office Rent"): {},
_("Postal Expenses"): {},
_("Print and Stationary"): {},
_("Print and Stationery"): {},
_("Round Off"): {
"account_type": "Round Off"
},
@@ -137,7 +137,8 @@ def get():
_("Accounts Payable"): {
_("Creditors"): {
"account_type": "Payable"
}
},
_("Payroll Payable"): {},
},
_("Stock Liabilities"): {
_("Stock Received But Not Billed"): {

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
@@ -25,7 +26,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Make Accounting Entry For Every Stock Movement",
"length": 0,
"no_copy": 0,
@@ -33,6 +36,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -51,7 +55,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Accounts Frozen Upto",
"length": 0,
"no_copy": 0,
@@ -59,6 +65,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -77,7 +84,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Role Allowed to Set Frozen Accounts & Edit Frozen Entries",
"length": 0,
"no_copy": 0,
@@ -86,6 +95,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -103,7 +113,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -111,6 +123,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -129,7 +142,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Credit Controller",
"length": 0,
"no_copy": 0,
@@ -138,6 +153,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -155,7 +171,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Check Supplier Invoice Number Uniqueness",
"length": 0,
"no_copy": 0,
@@ -164,6 +182,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -181,7 +200,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make Payment via Journal Entry",
"length": 0,
"no_copy": 0,
@@ -190,6 +211,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -208,7 +230,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Unlink Payment on Cancellation of Invoice",
"length": 0,
"no_copy": 0,
@@ -217,6 +241,37 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "1",
"fieldname": "book_asset_depreciation_entry_automatically",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Book Asset Depreciation Entry Automatically",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -224,18 +279,18 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "fa fa-cog",
"icon": "icon-cog",
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2016-10-20 16:12:38.595075",
"modified": "2017-04-18 13:35:59.166250",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
@@ -251,7 +306,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -266,6 +320,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_order": "ASC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset Name",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Item Code",
@@ -68,6 +70,36 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "item_name",
"fieldtype": "Read Only",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
"options": "item_code.item_name",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -79,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Asset Category",
@@ -109,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Status",
@@ -138,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -166,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -193,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -222,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Warehouse",
@@ -251,6 +289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Existing Asset",
@@ -279,6 +318,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Date",
@@ -307,6 +347,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -336,6 +377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Invoice",
@@ -365,6 +407,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disposal Date",
@@ -393,6 +436,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Journal Entry for Scrap",
@@ -422,6 +466,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -449,6 +494,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Gross Purchase Amount",
@@ -479,6 +525,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expected Value After Useful Life",
@@ -509,6 +556,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Opening Accumulated Depreciation",
@@ -538,6 +586,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Value After Depreciation",
@@ -567,6 +616,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -596,6 +646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depreciation Method",
@@ -625,6 +676,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Number of Depreciations",
@@ -654,6 +706,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Number of Depreciations Booked",
@@ -682,6 +735,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frequency of Depreciation (Months)",
@@ -711,6 +765,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Depreciation Date",
@@ -739,6 +794,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depreciation Schedule",
@@ -767,6 +823,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depreciation Schedules",
@@ -796,6 +853,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -825,7 +883,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-18 15:59:19.774500",
"modified": "2017-02-17 16:26:19.111939",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset",
@@ -842,7 +900,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -857,7 +914,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 1,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -32,7 +32,7 @@ class Asset(Document):
self.set_status()
def validate_item(self):
item = frappe.db.get_value("Item", self.item_code,
item = frappe.db.get_value("Item", self.item_code,
["is_fixed_asset", "is_stock_item", "disabled"], as_dict=1)
if not item:
frappe.throw(_("Item {0} does not exist").format(self.item_code))
@@ -42,7 +42,7 @@ class Asset(Document):
frappe.throw(_("Item {0} must be a Fixed Asset Item").format(self.item_code))
elif item.is_stock_item:
frappe.throw(_("Item {0} must be a non-stock item").format(self.item_code))
def set_missing_values(self):
if self.item_code:
item_details = get_item_details(self.item_code)
@@ -50,7 +50,7 @@ class Asset(Document):
if not self.get(field):
self.set(field, value)
self.value_after_depreciation = (flt(self.gross_purchase_amount) -
self.value_after_depreciation = (flt(self.gross_purchase_amount) -
flt(self.opening_accumulated_depreciation))
def validate_asset_values(self):
@@ -59,7 +59,7 @@ class Asset(Document):
if not flt(self.gross_purchase_amount):
frappe.throw(_("Gross Purchase Amount is mandatory"), frappe.MandatoryError)
if not self.is_existing_asset:
self.opening_accumulated_depreciation = 0
self.number_of_depreciations_booked = 0
@@ -70,30 +70,33 @@ class Asset(Document):
if flt(self.opening_accumulated_depreciation) > depreciable_amount:
frappe.throw(_("Opening Accumulated Depreciation must be less than equal to {0}")
.format(depreciable_amount))
if self.opening_accumulated_depreciation:
if not self.number_of_depreciations_booked:
frappe.throw(_("Please set Number of Depreciations Booked"))
else:
self.number_of_depreciations_booked = 0
if cint(self.number_of_depreciations_booked) > cint(self.total_number_of_depreciations):
frappe.throw(_("Number of Depreciations Booked cannot be greater than Total Number of Depreciations"))
if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(nowdate()):
frappe.msgprint(_("Next Depreciation Date is entered as past date"))
if (flt(self.value_after_depreciation) > flt(self.expected_value_after_useful_life)
frappe.msgprint(_("Next Depreciation Date is entered as past date"), title=_('Warning'), indicator='red')
if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(self.purchase_date):
frappe.throw(_("Next Depreciation Date cannot be before Purchase Date"))
if (flt(self.value_after_depreciation) > flt(self.expected_value_after_useful_life)
and not self.next_depreciation_date):
frappe.throw(_("Please set Next Depreciation Date"))
def make_depreciation_schedule(self):
if self.depreciation_method != 'Manual':
self.schedules = []
if not self.get("schedules") and self.next_depreciation_date:
value_after_depreciation = flt(self.value_after_depreciation)
number_of_pending_depreciations = cint(self.total_number_of_depreciations) - \
cint(self.number_of_depreciations_booked)
if number_of_pending_depreciations:
@@ -108,17 +111,17 @@ class Asset(Document):
"schedule_date": schedule_date,
"depreciation_amount": depreciation_amount
})
def set_accumulated_depreciation(self):
accumulated_depreciation = flt(self.opening_accumulated_depreciation)
for d in self.get("schedules"):
accumulated_depreciation += flt(d.depreciation_amount)
d.accumulated_depreciation_amount = accumulated_depreciation
accumulated_depreciation += flt(d.depreciation_amount, d.precision("depreciation_amount"))
d.accumulated_depreciation_amount = flt(accumulated_depreciation, d.precision("accumulated_depreciation_amount"))
def get_depreciation_amount(self, depreciable_value):
if self.depreciation_method in ("Straight Line", "Manual"):
depreciation_amount = (flt(self.value_after_depreciation) -
flt(self.expected_value_after_useful_life)) / (cint(self.total_number_of_depreciations) -
flt(self.expected_value_after_useful_life)) / (cint(self.total_number_of_depreciations) -
cint(self.number_of_depreciations_booked))
else:
factor = 200.0 / self.total_number_of_depreciations
@@ -129,14 +132,14 @@ class Asset(Document):
depreciation_amount = flt(depreciable_value) - flt(self.expected_value_after_useful_life)
return depreciation_amount
def validate_expected_value_after_useful_life(self):
accumulated_depreciation_after_full_schedule = \
max([d.accumulated_depreciation_amount for d in self.get("schedules")])
asset_value_after_full_schedule = (flt(self.gross_purchase_amount) -
asset_value_after_full_schedule = (flt(self.gross_purchase_amount) -
flt(accumulated_depreciation_after_full_schedule))
if self.expected_value_after_useful_life < asset_value_after_full_schedule:
frappe.throw(_("Expected value after useful life must be greater than or equal to {0}")
.format(asset_value_after_full_schedule))
@@ -153,8 +156,8 @@ class Asset(Document):
if d.journal_entry:
frappe.get_doc("Journal Entry", d.journal_entry).cancel()
d.db_set("journal_entry", None)
self.db_set("value_after_depreciation",
self.db_set("value_after_depreciation",
(flt(self.gross_purchase_amount) - flt(self.opening_accumulated_depreciation)))
def set_status(self, status=None):
@@ -185,6 +188,7 @@ def make_purchase_invoice(asset, item_code, gross_purchase_amount, company, post
pi = frappe.new_doc("Purchase Invoice")
pi.company = company
pi.currency = frappe.db.get_value("Company", company, "default_currency")
pi.set_posting_time = 1
pi.posting_date = posting_date
pi.append("items", {
"item_code": item_code,
@@ -197,7 +201,7 @@ def make_purchase_invoice(asset, item_code, gross_purchase_amount, company, post
})
pi.set_missing_values()
return pi
@frappe.whitelist()
def make_sales_invoice(asset, item_code, company):
si = frappe.new_doc("Sales Invoice")
@@ -214,7 +218,7 @@ def make_sales_invoice(asset, item_code, company):
})
si.set_missing_values()
return si
@frappe.whitelist()
def transfer_asset(args):
import json
@@ -223,23 +227,23 @@ def transfer_asset(args):
movement_entry.update(args)
movement_entry.insert()
movement_entry.submit()
frappe.db.commit()
frappe.msgprint(_("Asset Movement record {0} created").format("<a href='#Form/Asset Movement/{0}'>{0}</a>".format(movement_entry.name)))
@frappe.whitelist()
def get_item_details(item_code):
asset_category = frappe.db.get_value("Item", item_code, "asset_category")
if not asset_category:
frappe.throw(_("Please enter Asset Category in Item {0}").format(item_code))
ret = frappe.db.get_value("Asset Category", asset_category,
ret = frappe.db.get_value("Asset Category", asset_category,
["depreciation_method", "total_number_of_depreciations", "frequency_of_depreciation"], as_dict=1)
ret.update({
"asset_category": asset_category
})
return ret
return ret

View File

@@ -0,0 +1,3 @@
frappe.listview_settings['Asset'] = {
add_fields: ['image']
}

View File

@@ -8,6 +8,10 @@ from frappe import _
from frappe.utils import flt, today, getdate
def post_depreciation_entries(date=None):
# Return if automatic booking of asset depreciation is disabled
if not frappe.db.get_value("Accounts Settings", None, "book_asset_depreciation_entry_automatically"):
return
if not date:
date = today()
for asset in get_depreciable_assets(date):

View File

@@ -166,6 +166,23 @@ class TestAsset(unittest.TestCase):
self.assertEqual(gle, expected_gle)
self.assertEqual(asset.get("value_after_depreciation"), 70000)
def test_depreciation_entry_cancellation(self):
asset = frappe.get_doc("Asset", "Macbook Pro 1")
asset.submit()
post_depreciation_entries(date="2021-01-01")
asset.load_from_db()
# cancel depreciation entry
depr_entry = asset.get("schedules")[0].journal_entry
self.assertTrue(depr_entry)
frappe.get_doc("Journal Entry", depr_entry).cancel()
asset.load_from_db()
depr_entry = asset.get("schedules")[0].journal_entry
self.assertFalse(depr_entry)
def test_scrap_asset(self):
asset = frappe.get_doc("Asset", "Macbook Pro 1")
@@ -297,4 +314,7 @@ def set_depreciation_settings_in_company():
company.depreciation_expense_account = "_Test Depreciations - _TC"
company.disposal_account = "_Test Gain/Loss on Asset Disposal - _TC"
company.depreciation_cost_center = "_Test Cost Center - _TC"
company.save()
company.save()
# Enable booking asset depreciation entry automatically
frappe.db.set_value("Accounts Settings", None, "book_asset_depreciation_entry_automatically", 1)

View File

@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset Category Name",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Depreciation Method",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Number of Depreciations",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frequency of Depreciation (Months)",
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -192,6 +198,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -221,7 +228,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 05:49:42.600981",
"modified": "2017-02-17 16:09:52.955332",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Category",
@@ -238,7 +245,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -259,7 +265,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -274,7 +279,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Asset",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Date",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -135,6 +139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Source Warehouse",
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Target Warehouse",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -221,7 +228,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 05:49:47.558549",
"modified": "2017-02-17 16:09:32.069344",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Movement",
@@ -238,7 +245,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -259,7 +265,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -280,7 +285,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -295,7 +299,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -74,6 +74,9 @@ class BankReconciliation(Document):
clearance_date_updated = False
for d in self.get('payment_entries'):
if d.clearance_date:
if not d.payment_document:
frappe.throw(_("Row #{0}: Payment document is required to complete the trasaction"))
if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
frappe.throw(_("Row #{0}: Clearance date {1} cannot be before Cheque Date {2}")
.format(d.idx, d.clearance_date, d.cheque_date))

View File

@@ -43,9 +43,18 @@ frappe.ui.form.on('Budget', {
},
budget_against: function(frm) {
frm.trigger("set_null_value")
frm.trigger("toggle_reqd_fields")
},
set_null_value: function(frm) {
if(frm.doc.budget_against == 'Cost Center') {
frm.set_value('project', null)
} else {
frm.set_value('cost_center', null)
}
},
toggle_reqd_fields: function(frm) {
frm.toggle_reqd("cost_center", frm.doc.budget_against=="Cost Center");
frm.toggle_reqd("project", frm.doc.budget_against=="Project");

View File

@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Budget Against",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Cost Center",
@@ -111,6 +114,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Project",
@@ -140,6 +144,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Fiscal Year",
@@ -169,6 +174,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -197,6 +203,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Action if Annual Budget Exceeded",
@@ -228,6 +235,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Action if Accumulated Monthly Budget Exceeded",
@@ -258,6 +266,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Monthly Distribution",
@@ -287,6 +296,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -315,6 +325,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -342,6 +353,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Budget Accounts",
@@ -371,7 +383,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-15 14:45:31.079107",
"modified": "2017-02-17 16:25:32.342055",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget",
@@ -388,7 +400,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -403,7 +414,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -22,6 +22,7 @@ class Budget(Document):
frappe.throw(_("{0} is mandatory").format(self.budget_against))
self.validate_duplicate()
self.validate_accounts()
self.set_null_value()
def validate_duplicate(self):
budget_against_field = frappe.scrub(self.budget_against)
@@ -54,25 +55,31 @@ class Budget(Document):
else:
account_list.append(d.account)
def set_null_value(self):
if self.budget_against == 'Cost Center':
self.project = None
else:
self.cost_center = None
def validate_expense_against_budget(args):
args = frappe._dict(args)
if not args.cost_center and not args.project:
return
for budget_against in [args.project, args.cost_center]:
if budget_against \
for budget_against in ['project', 'cost_center']:
if args.get(budget_against) \
and frappe.db.get_value("Account", {"name": args.account, "root_type": "Expense"}):
if args.project:
condition = "and exists(select name from `tabProject` where name=b.project)"
if args.project and budget_against == 'project':
condition = "and b.project='%s'" % frappe.db.escape(args.project)
args.budget_against_field = "Project"
elif args.cost_center:
elif args.cost_center and budget_against == 'cost_center':
cc_lft, cc_rgt = frappe.db.get_value("Cost Center", args.cost_center, ["lft", "rgt"])
condition = """and exists(select name from `tabCost Center`
where lft<=%s and rgt>=%s and name=b.cost_center)""" % (cc_lft, cc_rgt)
args.budget_against_field = "Cost Center"
args.budget_against = budget_against
args.budget_against = args.get(budget_against)
budget_records = frappe.db.sql("""
select
@@ -88,12 +95,13 @@ def validate_expense_against_budget(args):
""".format(condition=condition,
budget_against_field=frappe.scrub(args.get("budget_against_field"))),
(args.fiscal_year, args.account), as_dict=True)
validate_budget_records(args, budget_records)
if budget_records:
validate_budget_records(args, budget_records)
def validate_budget_records(args, budget_records):
for budget in budget_records:
if budget.budget_amount:
if flt(budget.budget_amount):
yearly_action = budget.action_if_annual_budget_exceeded
monthly_action = budget.action_if_accumulated_monthly_budget_exceeded

View File

@@ -9,11 +9,13 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account",
"fieldtype": "Link",
"hidden": 0,
@@ -30,6 +32,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -40,6 +43,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "budget_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -50,11 +54,13 @@
"label": "Budget Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -72,7 +78,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-07-11 03:27:58.705376",
"modified": "2017-01-02 17:02:53.339420",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Account",

View File

@@ -35,7 +35,7 @@ def create_or_update_cheque_print_format(template_name):
</span>
<span style="top:%(date_dist_from_top_edge)s cm; left:%(date_dist_from_left_edge)scm;
position: absolute;">
{{doc.reference_date or '' }}
{{ frappe.utils.formatdate(doc.reference_date) or '' }}
</span>
<span style="top:%(acc_no_dist_from_top_edge)scm;left:%(acc_no_dist_from_left_edge)scm;
position: absolute;">

View File

@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Cost Center Name",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Parent Cost Center",
@@ -109,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
@@ -139,6 +143,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Group",
@@ -194,7 +200,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "lft",
@@ -223,7 +230,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "rgt",
@@ -253,6 +261,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "old_parent",
@@ -278,14 +287,14 @@
"icon": "fa fa-money",
"idx": 1,
"image_view": 0,
"in_create": 1,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-11-07 05:20:40.282432",
"modified": "2017-02-17 16:22:27.129572",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",
@@ -301,7 +310,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -322,7 +330,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -343,7 +350,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -364,7 +370,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -385,7 +390,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -401,6 +405,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "parent_cost_center, is_group",
"show_name_in_global_search": 1,
"sort_order": "ASC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -3,24 +3,30 @@
"allow_import": 1,
"allow_rename": 0,
"autoname": "field:year",
"beta": 0,
"creation": "2013-01-22 16:50:25",
"custom": 0,
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
"editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "For e.g. 2012, 2012-13",
"fieldname": "year",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Year Name",
"length": 0,
"no_copy": 0,
@@ -28,7 +34,9 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -39,19 +47,25 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "disabled",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disabled",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -62,12 +76,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "year_start_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Year Start Date",
"length": 0,
"no_copy": 1,
@@ -75,7 +93,9 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -86,18 +106,24 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "year_end_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Year End Date",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -108,12 +134,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "companies",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Companies",
"length": 0,
"no_copy": 0,
@@ -121,7 +151,9 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -133,13 +165,14 @@
"hide_toolbar": 0,
"icon": "fa fa-calendar",
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-11-16 06:29:47.289982",
"modified": "2017-02-17 16:22:08.431278",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year",
@@ -266,8 +299,12 @@
"write": 0
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_field": "name",
"sort_order": "DESC"
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -43,11 +43,13 @@ class FiscalYear(Document):
def on_update(self):
check_duplicate_fiscal_year(self)
frappe.cache().delete_value("fiscal_years")
def on_trash(self):
global_defaults = frappe.get_doc("Global Defaults")
if global_defaults.current_fiscal_year == self.name:
frappe.throw(_("You cannot delete Fiscal Year {0}. Fiscal Year {0} is set as default in Global Settings").format(self.name))
frappe.cache().delete_value("fiscal_years")
def validate_overlap(self):
existing_fiscal_years = frappe.db.sql("""select name from `tabFiscal Year`

View File

@@ -2,13 +2,12 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe, erpnext
from frappe import _
from frappe.utils import flt, fmt_money, getdate, formatdate
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
@@ -18,22 +17,27 @@ class GLEntry(Document):
def validate(self):
self.flags.ignore_submit_comment = True
self.check_mandatory()
self.pl_must_have_cost_center()
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)
if not self.flags.from_repost:
self.pl_must_have_cost_center()
self.check_pl_account()
self.validate_cost_center()
self.validate_party()
self.validate_currency()
def on_update_with_args(self, adv_adj, update_outstanding = 'Yes', from_repost=False):
if not from_repost:
self.validate_account_details(adv_adj)
check_freezing_date(self.posting_date, adv_adj)
validate_frozen_account(self.account, adv_adj)
check_freezing_date(self.posting_date, adv_adj)
validate_balance_type(self.account, adv_adj)
# Update outstanding amt on against voucher
if self.against_voucher_type in ['Journal Entry', 'Sales Invoice', 'Purchase Invoice'] \
and self.against_voucher and update_outstanding == 'Yes':
and self.against_voucher and update_outstanding == 'Yes' and not from_repost:
update_outstanding_amt(self.account, self.party_type, self.party, self.against_voucher_type,
self.against_voucher)
@@ -51,7 +55,7 @@ class GLEntry(Document):
elif account_type == "Payable":
frappe.throw(_("{0} {1}: Supplier is required against Payable account {2}")
.format(self.voucher_type, self.voucher_no, self.account))
# Zero value transaction is not allowed
if not (flt(self.debit) or flt(self.credit)):
frappe.throw(_("{0} {1}: Either debit or credit amount is required for {2}")
@@ -111,7 +115,7 @@ class GLEntry(Document):
validate_party_frozen_disabled(self.party_type, self.party)
def validate_currency(self):
company_currency = get_company_currency(self.company)
company_currency = erpnext.get_company_currency(self.company)
account_currency = get_account_currency(self.account)
if not self.account_currency:
@@ -119,7 +123,7 @@ class GLEntry(Document):
if account_currency != self.account_currency:
frappe.throw(_("{0} {1}: Accounting Entry for {2} can only be made in currency: {3}")
.format(self.voucher_type, self.voucher_no, self.account,
.format(self.voucher_type, self.voucher_no, self.account,
(account_currency or company_currency)), InvalidAccountCurrency)
if self.party_type and self.party:

View File

@@ -38,7 +38,7 @@ frappe.ui.form.on("Journal Entry", {
},
posting_date: function(frm) {
if(!frm.doc.multi_currency) return;
if(!frm.doc.multi_currency || !frm.doc.posting_date) return;
$.each(frm.doc.accounts || [], function(i, row) {
erpnext.journal_entry.set_exchange_rate(frm, row.doctype, row.name);
@@ -86,9 +86,9 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
};
});
me.frm.set_query("party_type", "accounts", function(doc, cdt, cdn) {
return {
filters: {"name": ["in", ["Customer", "Supplier"]]}
me.frm.set_query("party_type", "accounts", function() {
return{
query: "erpnext.setup.doctype.party_type.party_type.get_party_type"
}
});

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
@@ -22,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -79,7 +82,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Entry Type",
@@ -110,6 +114,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -140,6 +145,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -167,7 +173,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -196,7 +203,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -227,6 +235,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -256,6 +265,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounting Entries",
@@ -286,6 +296,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -312,7 +323,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Reference Number",
@@ -342,6 +354,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Date",
@@ -370,7 +383,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "User Remark",
@@ -400,6 +414,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -425,7 +440,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Debit",
@@ -455,7 +471,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Credit",
@@ -487,6 +504,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Difference (Dr - Cr)",
@@ -518,6 +536,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make Difference Entry",
@@ -546,6 +565,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Multi Currency",
@@ -574,6 +594,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Amount Currency",
@@ -603,6 +624,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Amount",
@@ -631,6 +653,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Amount in Words",
@@ -658,6 +681,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
@@ -685,7 +709,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Clearance Date",
@@ -716,6 +741,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remark",
@@ -745,6 +771,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -771,6 +798,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bill No",
@@ -800,6 +828,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bill Date",
@@ -829,6 +858,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Due Date",
@@ -859,6 +889,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off",
@@ -889,6 +920,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Based On",
@@ -918,6 +950,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get Outstanding Invoices",
@@ -946,6 +979,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -974,6 +1008,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Amount",
@@ -1002,6 +1037,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Settings",
@@ -1030,6 +1066,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pay To / Recd From",
@@ -1057,6 +1094,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1084,6 +1122,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -1112,6 +1151,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -1142,6 +1182,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -1171,6 +1212,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1200,7 +1242,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Opening",
@@ -1232,6 +1275,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock Entry",
@@ -1261,6 +1305,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1281,19 +1326,19 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "fa fa-file-text",
"idx": 176,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-11-07 05:53:46.738161",
"modified": "2017-04-10 12:07:44.599804",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",
@@ -1309,7 +1354,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1330,7 +1374,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1351,7 +1394,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1367,8 +1409,10 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "voucher_type,posting_date, due_date, cheque_no",
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -2,13 +2,14 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, json
import frappe, erpnext, json
from frappe.utils import cstr, flt, fmt_money, formatdate
from frappe import msgprint, _, scrub
from erpnext.controllers.accounts_controller import AccountsController
from erpnext.accounts.utils import get_balance_on, get_account_currency
from erpnext.setup.utils import get_company_currency
from erpnext.accounts.party import get_party_account
from erpnext.hr.doctype.expense_claim.expense_claim import update_reimbursed_amount
from erpnext.hr.doctype.employee_loan.employee_loan import update_disbursement_status
class JournalEntry(AccountsController):
def __init__(self, arg1, arg2=None):
@@ -37,19 +38,15 @@ class JournalEntry(AccountsController):
self.validate_credit_debit_note()
self.validate_empty_accounts_table()
self.set_account_and_party_balance()
self.clear_zero_debit_credit_row()
if not self.title:
self.title = self.get_title()
def clear_zero_debit_credit_row(self):
self.accounts = [account for account in self.accounts
if not (account.debit_in_account_currency==0.0 and account.credit_in_account_currency==0.0)]
def on_submit(self):
self.check_credit_limit()
self.make_gl_entries()
self.update_advance_paid()
self.update_expense_claim()
self.update_employee_loan()
def get_title(self):
return self.pay_to_recd_from or self.accounts[0].account
@@ -73,7 +70,9 @@ class JournalEntry(AccountsController):
self.make_gl_entries(1)
self.update_advance_paid()
self.update_expense_claim()
self.update_employee_loan()
self.unlink_advance_entry_reference()
self.unlink_asset_reference()
def unlink_advance_entry_reference(self):
for d in self.get("accounts"):
@@ -83,6 +82,18 @@ class JournalEntry(AccountsController):
d.reference_type = ''
d.reference_name = ''
d.db_update()
def unlink_asset_reference(self):
for d in self.get("accounts"):
if d.reference_type=="Asset" and d.reference_name:
asset = frappe.get_doc("Asset", d.reference_name)
for s in asset.get("schedules"):
if s.journal_entry == self.name:
s.db_set("journal_entry", None)
asset.value_after_depreciation += s.depreciation_amount
asset.db_set("value_after_depreciation", asset.value_after_depreciation)
asset.set_status()
def validate_party(self):
for d in self.get("accounts"):
@@ -326,10 +337,12 @@ class JournalEntry(AccountsController):
if d.account_currency == self.company_currency:
d.exchange_rate = 1
elif not d.exchange_rate or d.exchange_rate == 1 or \
(d.reference_type in ("Sales Invoice", "Purchase Invoice") and d.reference_name and d.posting_date):
(d.reference_type in ("Sales Invoice", "Purchase Invoice")
and d.reference_name and self.posting_date):
# Modified to include the posting date for which to retreive the exchange rate
d.exchange_rate = get_exchange_rate(self.posting_date, d.account, d.account_currency, self.company,
d.reference_type, d.reference_name, d.debit, d.credit, d.exchange_rate)
d.exchange_rate = get_exchange_rate(self.posting_date, d.account, d.account_currency,
self.company, d.reference_type, d.reference_name, d.debit, d.credit, d.exchange_rate)
if not d.exchange_rate:
frappe.throw(_("Row {0}: Exchange Rate is mandatory").format(d.idx))
@@ -373,7 +386,7 @@ class JournalEntry(AccountsController):
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 d.party_type in ['Customer', 'Supplier'] 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")
@@ -434,7 +447,7 @@ class JournalEntry(AccountsController):
if not self.get('accounts'):
msgprint(_("'Entries' cannot be empty"), raise_exception=True)
else:
flag, self.total_debit, self.total_credit = 0, 0, 0
self.total_debit, self.total_credit = 0, 0
diff = flt(self.difference, self.precision("difference"))
# If any row without amount, set the diff on that row
@@ -501,11 +514,15 @@ class JournalEntry(AccountsController):
def update_expense_claim(self):
for d in self.accounts:
if d.reference_type=="Expense Claim":
amt = frappe.db.sql("""select sum(debit) as amt from `tabJournal Entry Account`
where reference_type = "Expense Claim" and
reference_name = %s and docstatus = 1""", d.reference_name ,as_dict=1)[0].amt
frappe.db.set_value("Expense Claim", d.reference_name , "total_amount_reimbursed", amt)
if d.reference_type=="Expense Claim" and d.party:
doc = frappe.get_doc("Expense Claim", d.reference_name)
update_reimbursed_amount(doc)
def update_employee_loan(self):
for d in self.accounts:
if d.reference_type=="Employee Loan" and flt(d.debit) > 0:
doc = frappe.get_doc("Employee Loan", d.reference_name)
update_disbursement_status(doc)
def validate_expense_claim(self):
for d in self.accounts:
@@ -564,7 +581,7 @@ def get_default_bank_cash_account(company, account_type=None, mode_of_payment=No
if account:
account_details = frappe.db.get_value("Account", account,
["account_currency", "account_type"], as_dict=1)
return frappe._dict({
"account": account,
"balance": get_balance_on(account),
@@ -649,9 +666,10 @@ def get_payment_entry(ref_doc, args):
cost_center = frappe.db.get_value("Company", ref_doc.company, "cost_center")
exchange_rate = 1
if args.get("party_account"):
# Modified to include the posting date for which the exchange rate is required.
# Modified to include the posting date for which the exchange rate is required.
# Assumed to be the posting date in the reference document
exchange_rate = get_exchange_rate(ref_doc.posting_date, args.get("party_account"), args.get("party_account_currency"),
exchange_rate = get_exchange_rate(ref_doc.get("posting_date") or ref_doc.get("transaction_date"),
args.get("party_account"), args.get("party_account_currency"),
ref_doc.company, ref_doc.doctype, ref_doc.name)
je = frappe.new_doc("Journal Entry")
@@ -684,9 +702,10 @@ def get_payment_entry(ref_doc, args):
bank_account = get_default_bank_cash_account(ref_doc.company, "Bank", account=args.get("bank_account"))
if bank_account:
bank_row.update(bank_account)
# Modified to include the posting date for which the exchange rate is required.
# Modified to include the posting date for which the exchange rate is required.
# Assumed to be the posting date of the reference date
bank_row.exchange_rate = get_exchange_rate(ref_doc.posting_date, bank_account["account"],
bank_row.exchange_rate = get_exchange_rate(ref_doc.get("posting_date")
or ref_doc.get("transaction_date"), bank_account["account"],
bank_account["account_currency"], ref_doc.company)
bank_row.cost_center = cost_center
@@ -711,8 +730,14 @@ def get_payment_entry(ref_doc, args):
@frappe.whitelist()
def get_opening_accounts(company):
"""get all balance sheet accounts for opening entry"""
accounts = frappe.db.sql_list("""select name from tabAccount
where is_group=0 and report_type='Balance Sheet' and company=%s""", company)
accounts = frappe.db.sql_list("""select
name from tabAccount
where
is_group=0 and
report_type='Balance Sheet' and
ifnull(warehouse, '') = '' and
company=%s
order by name asc""", company)
return [{"account": a, "balance": get_balance_on(a)} for a in accounts]
@@ -733,7 +758,7 @@ def get_outstanding(args):
if isinstance(args, basestring):
args = json.loads(args)
company_currency = get_company_currency(args.get("company"))
company_currency = erpnext.get_company_currency(args.get("company"))
if args.get("doctype") == "Journal Entry":
condition = " and party=%(party)s" if args.get("party") else ""
@@ -792,7 +817,7 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi
if not frappe.has_permission("Account"):
frappe.msgprint(_("No Permission"), raise_exception=1)
company_currency = get_company_currency(company)
company_currency = erpnext.get_company_currency(company)
account_details = frappe.db.get_value("Account", account, ["account_type", "account_currency"], as_dict=1)
if not account_details:
@@ -810,8 +835,8 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi
"party_type": party_type,
"account_type": account_details.account_type,
"account_currency": account_details.account_currency or company_currency,
# The date used to retreive the exchange rate here is the date passed in
# The date used to retreive the exchange rate here is the date passed in
# as an argument to this function. It is assumed to be the date on which the balance is sought
"exchange_rate": get_exchange_rate(date, account, account_details.account_currency,
company, debit=debit, credit=credit, exchange_rate=exchange_rate)
@@ -825,7 +850,7 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi
# Added posting_date as one of the parameters of get_exchange_rate
@frappe.whitelist()
def get_exchange_rate(posting_date, account, account_currency=None, company=None,
def get_exchange_rate(posting_date, account=None, account_currency=None, company=None,
reference_type=None, reference_name=None, debit=None, credit=None, exchange_rate=None):
from erpnext.setup.utils import get_exchange_rate
account_details = frappe.db.get_value("Account", account,
@@ -840,7 +865,7 @@ def get_exchange_rate(posting_date, account, account_currency=None, company=None
if not account_currency:
account_currency = account_details.account_currency
company_currency = get_company_currency(company)
company_currency = erpnext.get_company_currency(company)
if account_currency != company_currency:
if reference_type in ("Sales Invoice", "Purchase Invoice") and reference_name:
@@ -851,7 +876,7 @@ def get_exchange_rate(posting_date, account, account_currency=None, company=None
(account_details.root_type == "Liability" and debit)):
exchange_rate = get_average_exchange_rate(account)
# The date used to retreive the exchange rate here is the date passed
# The date used to retreive the exchange rate here is the date passed
# in as an argument to this function.
if not exchange_rate and account_currency and posting_date:
exchange_rate = get_exchange_rate(account_currency, company_currency, posting_date)

View File

@@ -171,20 +171,6 @@ class TestJournalEntry(unittest.TestCase):
})
jv.submit()
def test_clear_blank_rows(self):
je = make_journal_entry("_Test Bank - _TC", "_Test Account Stock Expenses - _TC", 100, save=False)
je.append("accounts", {
"account": "_Test Cash - _TC",
"debit_in_account_currency": 0,
"credit_in_account_currency": 0,
"exchange_rate": 1
})
self.assertEqual(len(je.get("accounts")), 3)
je.save()
self.assertEqual(len(je.get("accounts")), 2)
def make_journal_entry(account1, account2, amount, cost_center=None, posting_date=None, exchange_rate=1, save=True, submit=False, project=None):
if not cost_center:

View File

@@ -8,7 +8,9 @@
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -20,8 +22,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Account",
"length": 0,
"no_copy": 0,
@@ -33,6 +37,7 @@
"print_hide_if_no_value": 0,
"print_width": "250px",
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -51,7 +56,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Type",
"length": 0,
"no_copy": 0,
@@ -60,6 +67,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -77,7 +85,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Balance",
"length": 0,
"no_copy": 1,
@@ -88,6 +98,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -106,8 +117,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
@@ -119,6 +132,7 @@
"print_hide_if_no_value": 0,
"print_width": "180px",
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -137,13 +151,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -161,7 +178,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Type",
"length": 0,
"no_copy": 0,
@@ -170,6 +189,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -187,7 +207,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Party",
"length": 0,
"no_copy": 0,
@@ -196,6 +218,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -213,7 +236,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Balance",
"length": 0,
"no_copy": 0,
@@ -223,6 +248,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -242,7 +268,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
@@ -251,6 +279,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -268,7 +297,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
"length": 0,
"no_copy": 1,
@@ -278,6 +309,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -295,7 +327,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -303,6 +337,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -320,7 +355,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
"length": 0,
"no_copy": 0,
@@ -329,6 +366,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -346,7 +384,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -354,6 +394,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -371,7 +412,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Debit",
"length": 0,
"no_copy": 0,
@@ -381,6 +424,7 @@
"print_hide": 0,
"print_hide_if_no_value": 1,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -398,7 +442,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Debit in Company Currency",
"length": 0,
"no_copy": 1,
@@ -410,6 +456,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -427,13 +474,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -451,7 +501,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Credit",
"length": 0,
"no_copy": 0,
@@ -461,6 +513,7 @@
"print_hide": 0,
"print_hide_if_no_value": 1,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -478,7 +531,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit in Company Currency",
"length": 0,
"no_copy": 1,
@@ -490,6 +545,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -507,7 +563,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
"length": 0,
"no_copy": 0,
@@ -515,6 +573,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -532,16 +591,19 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Type",
"length": 0,
"no_copy": 0,
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim\nAsset",
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim\nAsset\nEmployee Loan",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -559,7 +621,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Reference Name",
"length": 0,
"no_copy": 0,
@@ -569,6 +633,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -586,7 +651,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
"length": 0,
"no_copy": 0,
@@ -596,6 +663,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -613,13 +681,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -637,7 +708,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Advance",
"length": 0,
"no_copy": 1,
@@ -648,6 +721,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -665,7 +739,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against Account",
"length": 0,
"no_copy": 1,
@@ -675,6 +751,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -692,7 +769,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-08-26 01:54:32.267927",
"modified": "2017-03-02 05:02:10.102039",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",
@@ -701,6 +778,8 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mode of Payment",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Type",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -111,7 +114,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 05:54:39.560399",
"modified": "2017-02-17 16:31:34.207683",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Mode of Payment",
@@ -127,7 +130,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -148,7 +150,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -163,6 +164,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_order": "ASC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -11,9 +11,8 @@ frappe.ui.form.on('Payment Entry', {
},
setup: function(frm) {
var party_account_type = frm.doc.party_type=="Customer" ? "Receivable" : "Payable";
frm.set_query("paid_from", function() {
var party_account_type = frm.doc.party_type=="Customer" ? "Receivable" : "Payable";
var account_types = in_list(["Pay", "Internal Transfer"], frm.doc.payment_type) ?
["Bank", "Cash"] : party_account_type;
@@ -26,7 +25,16 @@ frappe.ui.form.on('Payment Entry', {
}
});
frm.set_query("party_type", function() {
return{
"filters": {
"name": ["in",["Customer","Supplier"]],
}
}
});
frm.set_query("paid_to", function() {
var party_account_type = frm.doc.party_type=="Customer" ? "Receivable" : "Payable";
var account_types = in_list(["Receive", "Internal Transfer"], frm.doc.payment_type) ?
["Bank", "Cash"] : party_account_type;
@@ -79,8 +87,13 @@ frappe.ui.form.on('Payment Entry', {
frm.events.show_general_ledger(frm);
},
company: function(frm) {
frm.events.hide_unhide_fields(frm);
frm.events.set_dynamic_labels(frm);
},
hide_unhide_fields: function(frm) {
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
var company_currency = frm.doc.company? frappe.get_doc(":Company", frm.doc.company).default_currency: "";
frm.toggle_display("source_exchange_rate",
(frm.doc.paid_amount && frm.doc.paid_from_account_currency != company_currency));
@@ -118,7 +131,7 @@ frappe.ui.form.on('Payment Entry', {
},
set_dynamic_labels: function(frm) {
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
var company_currency = frm.doc.company? frappe.get_doc(":Company", frm.doc.company).default_currency: "";
frm.set_currency_labels(["base_paid_amount", "base_received_amount", "base_total_allocated_amount",
"difference_amount"], company_currency);
@@ -131,6 +144,10 @@ frappe.ui.form.on('Payment Entry', {
frm.set_currency_labels(["total_allocated_amount", "unallocated_amount"], party_account_currency);
var currency_field = (frm.doc.payment_type=="Receive") ? "paid_from_account_currency" : "paid_to_account_currency"
frm.set_df_property("total_allocated_amount", "options", currency_field);
frm.set_df_property("unallocated_amount", "options", currency_field);
frm.set_currency_labels(["total_amount", "outstanding_amount", "allocated_amount"],
party_account_currency, "references");
@@ -741,4 +758,4 @@ frappe.ui.form.on('Payment Entry Deduction', {
deductions_remove: function(frm) {
frm.events.set_difference_amount(frm);
}
})
})

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
@@ -22,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Type of Payment",
@@ -50,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -79,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Payment Type",
@@ -97,95 +101,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)",
"fieldname": "party_type",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Party Type",
"length": 0,
"no_copy": 0,
"options": "Customer\nSupplier",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
"fieldname": "party",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Party",
"length": 0,
"no_copy": 0,
"options": "party_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "",
"fieldname": "party_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -197,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -225,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -253,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -282,6 +200,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Mode of Payment",
@@ -300,6 +219,158 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)",
"fieldname": "party_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment From / To",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "",
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.docstatus==0",
"fieldname": "party_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Party Type",
"length": 0,
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
"fieldname": "party",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Party",
"length": 0,
"no_copy": 0,
"options": "party_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_11",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
"description": "",
"fieldname": "party_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -311,6 +382,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -340,6 +412,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Balance",
@@ -369,6 +442,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Paid From",
@@ -399,6 +473,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
@@ -429,6 +504,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Balance",
@@ -458,6 +534,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -486,6 +563,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Paid To",
@@ -516,6 +594,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
@@ -546,6 +625,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Balance",
@@ -577,6 +657,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount",
@@ -606,6 +687,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount",
@@ -636,6 +718,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -665,6 +748,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount (Company Currency)",
@@ -694,6 +778,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -722,6 +807,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Received Amount",
@@ -752,6 +838,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -781,6 +868,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Received Amount (Company Currency)",
@@ -812,6 +900,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
@@ -842,6 +931,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allocate Payment Amount",
@@ -871,6 +961,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment References",
@@ -901,6 +992,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Writeoff",
@@ -930,6 +1022,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Allocated Amount",
@@ -959,6 +1052,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Allocated Amount (Company Currency)",
@@ -988,6 +1082,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Set Exchange Gain / Loss",
@@ -1016,6 +1111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1044,6 +1140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Unallocated Amount",
@@ -1073,6 +1170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Difference Amount (Company Currency)",
@@ -1103,6 +1201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Difference Amount",
@@ -1133,6 +1232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Deductions or Loss",
@@ -1161,6 +1261,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Deductions or Loss",
@@ -1190,6 +1291,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction ID",
@@ -1219,6 +1321,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cheque/Reference No",
@@ -1247,6 +1350,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1275,6 +1379,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cheque/Reference Date",
@@ -1304,6 +1409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Clearance Date",
@@ -1334,6 +1440,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -1363,6 +1470,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -1392,6 +1500,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
@@ -1420,6 +1529,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1447,6 +1557,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -1476,6 +1587,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -1505,6 +1617,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1533,6 +1646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -1551,17 +1665,17 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 05:33:40.371480",
"modified": "2017-04-10 12:06:22.176045",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
@@ -1578,7 +1692,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1599,7 +1712,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1614,8 +1726,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -684,6 +684,7 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
pe.paid_amount = paid_amount
pe.received_amount = received_amount
pe.allocate_payment_amount = 1
pe.letter_head = doc.get("letter_head")
pe.append("references", {
"reference_doctype": dt,

View File

@@ -9,6 +9,7 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Type",
"length": 0,
"no_copy": 0,
@@ -49,7 +52,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Name",
"length": 0,
"no_copy": 0,
@@ -77,7 +82,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Due Date",
"length": 0,
"no_copy": 0,
@@ -104,7 +111,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -130,7 +139,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Amount",
"length": 0,
"no_copy": 0,
@@ -157,7 +168,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Outstanding",
"length": 0,
"no_copy": 0,
@@ -184,7 +197,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Allocated",
"length": 0,
"no_copy": 0,
@@ -211,7 +226,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
"length": 0,
"no_copy": 0,
@@ -238,7 +255,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-11-14 12:28:51.822341",
"modified": "2017-02-17 16:47:17.156256",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry Reference",
@@ -248,7 +265,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -6,12 +6,10 @@ frappe.provide("erpnext.accounts");
erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.extend({
onload: function() {
var me = this
this.frm.set_query('party_type', function() {
return {
filters: {
"name": ["in", ["Customer", "Supplier"]]
}
};
this.frm.set_query("party_type", function() {
return{
query: "erpnext.setup.doctype.party_type.party_type.get_party_type"
}
});
this.frm.set_query('receivable_payable_account', function() {

View File

@@ -22,6 +22,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Type",
"length": 0,
"no_copy": 0,
@@ -30,6 +31,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -48,7 +50,8 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Reference_name",
"in_standard_filter": 0,
"label": "Reference Name",
"length": 0,
"no_copy": 0,
"options": "reference_type",
@@ -57,6 +60,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -75,6 +79,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
"length": 0,
"no_copy": 0,
@@ -82,6 +87,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -100,6 +106,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Advance",
"length": 0,
"no_copy": 0,
@@ -107,6 +114,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -125,6 +133,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Row",
"length": 0,
"no_copy": 0,
@@ -132,6 +141,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -150,6 +160,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -157,6 +168,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -175,6 +187,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Invoice Number",
"length": 0,
"no_copy": 0,
@@ -183,6 +196,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -201,6 +215,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -208,6 +223,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -226,6 +242,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Allocated amount",
"length": 0,
"no_copy": 0,
@@ -234,6 +251,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -252,6 +270,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -259,6 +278,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -277,6 +297,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Remark",
"length": 0,
"no_copy": 0,
@@ -284,6 +305,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -302,7 +324,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-08-26 02:08:35.879133",
"modified": "2017-01-30 01:04:22.557237",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Payment",
@@ -314,5 +336,6 @@
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recipient Message And Payment Details",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Format",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To",
@@ -138,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Subject",
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Gateway Account",
@@ -222,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Currency",
@@ -252,6 +260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount",
@@ -282,6 +291,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -312,6 +322,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make Sales Invoice",
@@ -340,6 +351,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -362,11 +374,12 @@
"collapsible": 0,
"columns": 0,
"fieldname": "message",
"fieldtype": "Small Text",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Message",
@@ -395,12 +408,13 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Message Examples",
"length": 0,
"no_copy": 0,
"options": "<pre><h5>Message Example</h5>\n\n&lt;p&gt; Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.&lt;/p&gt;\n\n&lt;p&gt; Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.&lt;/p&gt;\n\n&lt;p&gt; We don't want you to be spending time running around in order to pay for your Bill.<br>After all, life is beautiful and the time you have in hand should be spent to enjoy it!<br>So here are our little ways to help you get more time for life! &lt;/p&gt;\n\n&lt;a href=\"{{ payment_url }}\"&gt; click here to pay &lt;/a&gt;\n\n</pre>\n",
"options": "<pre><h5>Message Example</h5>\n\n&lt;p&gt;Dear {{ doc.contact_person }},&lt;/p&gt;\n\n&lt;p&gt;Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.&lt;/p&gt;\n\n&lt;a href=\"{{ payment_url }}\"&gt; click here to pay &lt;/a&gt;\n\n</pre>\n",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -424,6 +438,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mute Email",
@@ -452,6 +467,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "payment_url",
@@ -481,6 +497,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Gateway Details",
@@ -509,6 +526,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Gateway",
@@ -538,6 +556,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Account",
@@ -567,6 +586,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Details",
@@ -595,6 +615,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Reference Doctype",
@@ -624,6 +645,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Reference Name",
@@ -653,6 +675,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -675,13 +698,13 @@
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 1,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-15 14:46:19.662816",
"modified": "2017-02-23 05:03:37.464863",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Request",
@@ -698,7 +721,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -719,7 +741,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -734,7 +755,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -10,7 +10,7 @@ from frappe.utils import flt, nowdate, get_url
from erpnext.accounts.party import get_party_account
from erpnext.accounts.utils import get_account_currency
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry, get_company_defaults
from frappe.integration_broker.doctype.integration_service.integration_service import get_integration_controller
from frappe.integrations.utils import get_payment_gateway_controller
class PaymentRequest(Document):
def validate(self):
@@ -26,7 +26,7 @@ class PaymentRequest(Document):
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
if self.payment_account and ref_doc.currency != frappe.db.get_value("Account", self.payment_account, "account_currency"):
frappe.throw(_("Transaction currency must be same as Payment Gateway currency"))
def on_submit(self):
send_mail = True
self.make_communication_entry()
@@ -54,22 +54,22 @@ class PaymentRequest(Document):
def set_payment_request_url(self):
if self.payment_account:
self.payment_url = self.get_payment_url()
if self.payment_url:
self.db_set('payment_url', self.payment_url)
if self.payment_url or not self.payment_gateway_account:
self.db_set('status', 'Initiated')
def get_payment_url(self):
data = frappe.db.get_value(self.reference_doctype, self.reference_name,
["company", "customer_name"], as_dict=1)
controller = get_integration_controller(self.payment_gateway)
controller = get_payment_gateway_controller(self.payment_gateway)
controller.validate_transaction_currency(self.currency)
return controller.get_payment_url(**{
"amount": self.grand_total,
"amount": flt(self.grand_total, self.precision("grand_total")),
"title": data.company,
"description": self.subject,
"reference_doctype": "Payment Request",
@@ -83,7 +83,7 @@ class PaymentRequest(Document):
def set_as_paid(self):
if frappe.session.user == "Guest":
frappe.set_user("Administrator")
payment_entry = self.create_payment_entry()
self.make_invoice()
@@ -157,7 +157,7 @@ class PaymentRequest(Document):
def set_as_cancelled(self):
self.db_set("status", "Cancelled")
def check_if_payment_entry_exists(self):
if self.status == "Paid":
payment_entry = frappe.db.sql_list("""select parent from `tabPayment Entry Reference`
@@ -179,11 +179,11 @@ class PaymentRequest(Document):
def get_payment_success_url(self):
return self.payment_success_url
def on_payment_authorized(self, status=None):
if not status:
return
shopping_cart_settings = frappe.get_doc("Shopping Cart Settings")
if status in ["Authorized", "Completed"]:
@@ -203,9 +203,9 @@ class PaymentRequest(Document):
}).get(success_url, "me")
else:
redirect_to = get_url("/orders/{0}".format(self.reference_name))
return redirect_to
@frappe.whitelist(allow_guest=True)
def make_payment_request(**args):
"""Make payment request"""
@@ -234,7 +234,7 @@ def make_payment_request(**args):
"grand_total": grand_total,
"email_to": args.recipient_id or "",
"subject": "Payment Request for %s"%args.dn,
"message": gateway_account.get("message") or get_dummy_message(args.use_dummy_message),
"message": gateway_account.get("message") or get_dummy_message(ref_doc),
"reference_doctype": args.dt,
"reference_name": args.dn
})
@@ -319,19 +319,24 @@ def make_status_as_paid(doc, method):
payment_request_name = frappe.db.get_value("Payment Request",
{"reference_doctype": ref.reference_doctype, "reference_name": ref.reference_name,
"docstatus": 1})
if payment_request_name:
doc = frappe.get_doc("Payment Request", payment_request_name)
if doc.status != "Paid":
doc.db_set('status', 'Paid')
frappe.db.commit()
def get_dummy_message(use_dummy_message=True):
return """
<p> Hope you are enjoying a service. Please consider bank details for payment </p>
<p> Bank Details <p><br>
<p> Bank Name : National Bank </p>
<p> Account Number : 123456789000872 </p>
<p> IFSC code : NB000001 </p>
<p> Account Name : Wind Power LLC </p>
"""
def get_dummy_message(doc):
return frappe.render_template("""{% if doc.contact_person -%}
<p>Dear {{ doc.contact_person }},</p>
{%- else %}<p>Hello,</p>{% endif %}
<p>{{ _("Requesting payment against {0} {1} for amount {2}").format(doc.doctype,
doc.name, doc.get_formatted("grand_total")) }}</p>
<a href="{{ payment_url }}">{{ _("Make Payment") }}</a>
<p>{{ _("If you have any questions, please get back to us.") }}</p>
<p>{{ _("Thank you for your business!") }}</p>
""", dict(doc=doc, payment_url = '{{ payment_url }}'))

View File

@@ -35,9 +35,9 @@ class PeriodClosingVoucher(AccountsController):
def validate_posting_date(self):
from erpnext.accounts.utils import get_fiscal_year, validate_fiscal_year
validate_fiscal_year(self.posting_date, self.fiscal_year, label=_("Posting Date"), doc=self)
validate_fiscal_year(self.posting_date, self.fiscal_year, self.company, label=_("Posting Date"), doc=self)
self.year_start_date = get_fiscal_year(self.posting_date, self.fiscal_year)[1]
self.year_start_date = get_fiscal_year(self.posting_date, self.fiscal_year, company=self.company)[1]
pce = frappe.db.sql("""select name from `tabPeriod Closing Voucher`
where posting_date > %s and fiscal_year = %s and docstatus = 1""",

View File

@@ -11,7 +11,7 @@ from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journ
class TestPeriodClosingVoucher(unittest.TestCase):
def test_closing_entry(self):
year_start_date = get_fiscal_year(today())[1]
year_start_date = get_fiscal_year(today(), company="_Test Company")[1]
make_journal_entry("_Test Bank - _TC", "Sales - _TC", 400,
"_Test Cost Center - _TC", posting_date=now(), submit=True)
@@ -70,7 +70,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
"doctype": "Period Closing Voucher",
"closing_account_head": "_Test Account Reserves and Surplus - _TC",
"company": "_Test Company",
"fiscal_year": get_fiscal_year(today())[0],
"fiscal_year": get_fiscal_year(today(), company="_Test Company")[0],
"posting_date": today(),
"remarks": "test"
})

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
@@ -21,8 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"in_standard_filter": 0,
"label": "Applicable for User",
"length": 0,
"no_copy": 0,
@@ -51,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Series",
@@ -83,6 +86,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Update Stock",
@@ -111,6 +115,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse",
@@ -141,6 +146,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign",
@@ -159,34 +165,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "ignore_pricing_rule",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -198,6 +176,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -225,6 +204,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -255,8 +235,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
@@ -274,6 +255,36 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "country",
"fieldtype": "Read Only",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Country",
"length": 0,
"no_copy": 0,
"options": "company.country",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -285,6 +296,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -304,6 +316,35 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "ignore_pricing_rule",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -315,6 +356,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allow Delete",
@@ -332,6 +374,35 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "allow_user_to_edit_rate",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allow user to edit Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -343,6 +414,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -370,6 +442,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Invoice Payment",
@@ -399,6 +472,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -426,6 +500,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Groups",
@@ -455,6 +530,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -482,6 +558,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Groups",
@@ -511,6 +588,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -539,6 +617,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Format",
@@ -568,6 +647,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -598,6 +678,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -628,6 +709,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -658,6 +740,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -686,6 +769,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Territory",
@@ -716,6 +800,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -746,6 +831,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Discount",
@@ -776,6 +862,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Discount On",
@@ -805,6 +892,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -833,6 +921,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Account",
@@ -862,6 +951,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Cost Center",
@@ -891,6 +981,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account for Change Amount",
@@ -920,6 +1011,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -950,6 +1042,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -977,6 +1070,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Income Account",
@@ -1008,6 +1102,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Account",
@@ -1036,6 +1131,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
@@ -1056,19 +1152,19 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "icon-cog",
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-12 17:02:22.323006",
"modified_by": "Administrator",
"modified": "2017-03-10 16:53:56.390210",
"modified_by": "rohit@erpnext.com",
"module": "Accounts",
"name": "POS Profile",
"owner": "Administrator",
@@ -1083,7 +1179,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1104,7 +1199,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1119,8 +1213,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "user",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -91,8 +91,8 @@ cur_frm.cscript.buying = function() {
}
//Dynamically change the description based on type of margin
cur_frm.cscript.type = function(doc){
cur_frm.set_df_property('rate', 'description', doc.type=='Percentage'?'In Percentage %':'In Amount')
cur_frm.cscript.margin_type = function(doc){
cur_frm.set_df_property('margin_rate_or_amount', 'description', doc.margin_type=='Percentage'?'In Percentage %':'In Amount')
}
frappe.ui.form.on('Pricing Rule', 'price_or_discount', function(frm){
@@ -112,4 +112,4 @@ frappe.ui.form.on('Pricing Rule', {
}
}
}
})
})

View File

@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -49,6 +50,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -78,6 +80,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Apply On",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Item Code",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Brand",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item Group",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -221,6 +228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Priority",
@@ -249,6 +257,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disable",
@@ -276,6 +285,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -303,6 +313,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Selling",
@@ -330,6 +341,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Buying",
@@ -357,6 +369,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -385,6 +398,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Applicable For",
@@ -414,6 +428,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -443,6 +458,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -472,6 +488,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -501,6 +518,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Partner",
@@ -530,6 +548,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign",
@@ -559,6 +578,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -588,6 +608,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Type",
@@ -616,6 +637,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -643,6 +665,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Min Qty",
@@ -670,6 +693,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -697,6 +721,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Max Qty",
@@ -724,6 +749,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -752,6 +778,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valid From",
@@ -779,6 +806,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valid Upto",
@@ -806,6 +834,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -832,6 +861,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -861,6 +891,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin",
@@ -890,6 +921,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Type",
@@ -919,6 +951,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -948,6 +981,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Rate or Amount",
@@ -976,6 +1010,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1004,6 +1039,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price or Discount",
@@ -1032,6 +1068,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1059,6 +1096,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price",
@@ -1087,6 +1125,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
@@ -1115,6 +1154,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "For Price List",
@@ -1143,6 +1183,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1171,6 +1212,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pricing Rule Help",
@@ -1199,7 +1241,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-07 05:19:31.478456",
"modified": "2017-02-17 16:21:28.446208",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",
@@ -1215,7 +1257,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1236,7 +1277,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1257,7 +1297,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1278,7 +1317,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1299,7 +1337,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
"is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1314,8 +1351,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -23,6 +23,8 @@ class PricingRule(Document):
self.validate_price_or_discount()
self.validate_max_discount()
if not self.margin_type: self.margin_rate_or_amount = 0.0
def validate_mandatory(self):
for field in ["apply_on", "applicable_for"]:
tocheck = frappe.scrub(self.get(field) or "")
@@ -109,22 +111,27 @@ def apply_pricing_rule(args):
item_list = args.get("items")
args.pop("items")
set_serial_nos_based_on_fifo = frappe.db.get_single_value("Stock Settings",
"automatically_set_serial_nos_based_on_fifo")
for item in item_list:
args_copy = copy.deepcopy(args)
args_copy.update(item)
out.append(get_pricing_rule_for_item(args_copy))
out.append(get_serial_no_for_item(args_copy))
if set_serial_nos_based_on_fifo and not args.get('is_return'):
out.append(get_serial_no_for_item(args_copy))
return out
def get_serial_no_for_item(args):
from erpnext.stock.get_item_details import get_serial_no
item_details = frappe._dict({
"doctype": args.doctype,
"name": args.name,
"serial_no": args.serial_no
})
if args.get("parenttype") in ("Sales Invoice", "Delivery Note"):
if args.get("parenttype") in ("Sales Invoice", "Delivery Note") and args.stock_qty > 0:
item_details.serial_no = get_serial_no(args)
return item_details
@@ -138,7 +145,7 @@ def get_pricing_rule_for_item(args):
})
if args.ignore_pricing_rule or not args.item_code:
if frappe.db.exists(args.doctype, args.name) and args.get("pricing_rule"):
if args.get("pricing_rule"):
item_details = remove_pricing_rule(args, item_details)
return item_details
@@ -173,7 +180,7 @@ def get_pricing_rule_for_item(args):
item_details.margin_rate_or_amount = pricing_rule.margin_rate_or_amount
if pricing_rule.price_or_discount == "Price":
item_details.update({
"price_list_rate": pricing_rule.price/flt(args.conversion_rate) \
"price_list_rate": (pricing_rule.price/flt(args.conversion_rate)) * args.conversion_factor or 1.0 \
if args.conversion_rate else 0.0,
"discount_percentage": 0.0
})

View File

@@ -2,13 +2,16 @@
// License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.accounts");
{% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
{% include 'erpnext/public/js/controllers/buying.js' %};
erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
setup: function(doc) {
this.setup_posting_date_time_check();
this._super(doc);
},
onload: function() {
this._super();
if(!this.frm.doc.__islocal) {
// show credit_to in print format
if(!this.frm.doc.supplier && this.frm.doc.credit_to) {
@@ -32,7 +35,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
if(doc.update_stock==1 && doc.docstatus==1) {
this.show_stock_ledger();
}
if(!doc.is_return && doc.docstatus==1) {
if(doc.outstanding_amount != 0) {
this.frm.add_custom_button(__('Payment'), this.make_payment_entry, __("Make"));
@@ -40,7 +43,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
}
if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) {
cur_frm.add_custom_button(doc.update_stock ? __('Purchase Return') : __('Debit Note'),
cur_frm.add_custom_button(__('Return / Debit Note'),
this.make_debit_note, __("Make"));
}
}
@@ -205,6 +208,7 @@ function hide_fields(doc) {
cur_frm.cscript.update_stock = function(doc, dt, dn) {
hide_fields(doc, dt, dn);
this.frm.fields_dict.items.grid.toggle_reqd("item_code", doc.update_stock? true: false)
}
cur_frm.fields_dict.cash_bank_account.get_query = function(doc) {
@@ -218,18 +222,6 @@ cur_frm.fields_dict.cash_bank_account.get_query = function(doc) {
}
}
cur_frm.fields_dict['supplier_address'].get_query = function(doc, cdt, cdn) {
return{
filters:{'supplier': doc.supplier}
}
}
cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
return{
filters:{'supplier': doc.supplier}
}
}
cur_frm.fields_dict['items'].grid.get_field("item_code").get_query = function(doc, cdt, cdn) {
return {
query: "erpnext.controllers.queries.item_query",
@@ -336,6 +328,12 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){
}
frappe.ui.form.on("Purchase Invoice", {
setup: function(frm) {
frm.custom_make_buttons = {
'Purchase Invoice': 'Debit Note',
'Payment Entry': 'Payment'
}
},
onload: function(frm) {
$.each(["warehouse", "rejected_warehouse"], function(i, field) {
frm.set_query(field, "items", function() {

View File

@@ -2,10 +2,9 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe, erpnext
from frappe.utils import cint, formatdate, flt, getdate
from frappe import _, throw
from erpnext.setup.utils import get_company_currency
import frappe.defaults
from erpnext.controllers.buying_controller import BuyingController
@@ -15,6 +14,7 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import update_bille
from erpnext.controllers.stock_controller import get_warehouse_account
from erpnext.accounts.general_ledger import make_gl_entries, merge_similar_entries, delete_gl_entries
from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt
from erpnext.buying.utils import check_for_closed_status
form_grid_templates = {
"items": "templates/form_grid/item_grid.html"
@@ -40,6 +40,7 @@ class PurchaseInvoice(BuyingController):
if not self.is_opening:
self.is_opening = 'No'
self.validate_posting_time()
super(PurchaseInvoice, self).validate()
if not self.is_return:
@@ -92,7 +93,7 @@ class PurchaseInvoice(BuyingController):
super(PurchaseInvoice, self).set_missing_values(for_validate)
def check_conversion_rate(self):
default_currency = get_company_currency(self.company)
default_currency = erpnext.get_company_currency(self.company)
if not default_currency:
throw(_('Please enter default currency in Company Master'))
if (self.currency == default_currency and flt(self.conversion_rate) != 1.00) or not self.conversion_rate or (self.currency != default_currency and flt(self.conversion_rate) == 1.00):
@@ -112,12 +113,11 @@ class PurchaseInvoice(BuyingController):
def check_for_closed_status(self):
check_list = []
pc_obj = frappe.get_doc('Purchase Common')
for d in self.get('items'):
if d.purchase_order and not d.purchase_order in check_list and not d.purchase_receipt:
check_list.append(d.purchase_order)
pc_obj.check_for_closed_status('Purchase Order', d.purchase_order)
check_for_closed_status('Purchase Order', d.purchase_order)
def validate_with_previous_doc(self):
super(PurchaseInvoice, self).validate_with_previous_doc({
@@ -156,6 +156,12 @@ class PurchaseInvoice(BuyingController):
super(PurchaseInvoice, self).validate_warehouse()
def validate_item_code(self):
for d in self.get('items'):
if not d.item_code:
frappe.msgprint(_("Item Code required at Row No {0}").format(d.idx), raise_exception=True)
def set_expense_account(self, for_validate=False):
auto_accounting_for_stock = cint(frappe.defaults.get_global_default("auto_accounting_for_stock"))
@@ -164,6 +170,7 @@ class PurchaseInvoice(BuyingController):
stock_items = self.get_stock_items()
if self.update_stock:
self.validate_item_code()
self.validate_warehouse()
warehouse_account = get_warehouse_account()
@@ -302,12 +309,12 @@ class PurchaseInvoice(BuyingController):
asset.flags.ignore_validate_update_after_submit = True
asset.save()
def make_gl_entries(self, repost_future_gle=True):
def make_gl_entries(self, gl_entries=None, repost_future_gle=True, from_repost=False):
if not self.grand_total:
return
gl_entries = self.get_gl_entries()
if not gl_entries:
gl_entries = self.get_gl_entries()
if gl_entries:
update_outstanding = "No" if (cint(self.is_paid) or self.write_off_account) else "Yes"
@@ -344,7 +351,7 @@ class PurchaseInvoice(BuyingController):
self.make_payment_gl_entries(gl_entries)
self.make_write_off_gl_entry(gl_entries)
return gl_entries
def make_supplier_gl_entry(self, gl_entries):
@@ -621,10 +628,12 @@ class PurchaseInvoice(BuyingController):
pi = frappe.db.sql('''select name from `tabPurchase Invoice`
where
bill_no = %(bill_no)s
and supplier = %(supplier)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,
"supplier": self.supplier,
"name": self.name,
"year_start_date": fiscal_year.year_start_date,
"year_end_date": fiscal_year.year_end_date

View File

@@ -19,6 +19,7 @@ test_ignore = ["Serial No"]
class TestPurchaseInvoice(unittest.TestCase):
def setUp(self):
unlink_payment_on_cancel_of_invoice()
frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1)
def tearDown(self):
unlink_payment_on_cancel_of_invoice(0)

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
@@ -21,7 +22,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item",
@@ -52,6 +54,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -78,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -107,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -135,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -166,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -194,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image View",
@@ -223,6 +231,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quantity and Rate",
@@ -250,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Received Qty",
@@ -278,6 +288,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Qty",
@@ -307,6 +318,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Qty",
@@ -324,6 +336,36 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stock_uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock UOM",
"length": 0,
"no_copy": 0,
"options": "UOM",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -335,6 +377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -361,6 +404,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "UOM",
@@ -389,6 +433,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Conversion Factor",
@@ -405,6 +450,35 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stock_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock Qty",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -416,6 +490,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -442,6 +517,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate",
@@ -471,6 +547,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
@@ -498,6 +575,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -524,6 +602,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
@@ -552,6 +631,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -578,6 +658,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Rate ",
@@ -608,6 +689,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
@@ -638,6 +720,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -664,6 +747,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate (Company Currency)",
@@ -694,6 +778,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount (Company Currency)",
@@ -724,6 +809,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pricing Rule",
@@ -752,6 +838,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -779,6 +866,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate",
@@ -808,6 +896,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount",
@@ -837,6 +926,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -864,6 +954,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
@@ -893,6 +984,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
@@ -922,6 +1014,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse",
@@ -951,6 +1044,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accepted Warehouse",
@@ -980,6 +1074,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Warehouse",
@@ -1010,6 +1105,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quality Inspection",
@@ -1039,6 +1135,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Batch No",
@@ -1068,6 +1165,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1096,6 +1194,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Serial No",
@@ -1124,6 +1223,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Serial No",
@@ -1152,6 +1252,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounting",
@@ -1179,6 +1280,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Head",
@@ -1211,6 +1313,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1236,7 +1339,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -1267,6 +1371,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
@@ -1299,6 +1404,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
@@ -1315,6 +1421,35 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "allow_zero_valuation_rate",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allow Zero Valuation Rate",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1326,6 +1461,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Brand",
@@ -1355,7 +1491,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Group",
@@ -1371,7 +1508,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
@@ -1387,6 +1524,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Rate",
@@ -1416,6 +1554,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Amount",
@@ -1445,7 +1584,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Order",
@@ -1476,6 +1616,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "BOM",
@@ -1505,6 +1646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1531,6 +1673,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Fixed Asset",
@@ -1560,6 +1703,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset",
@@ -1588,7 +1732,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Order Item",
@@ -1617,7 +1762,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Receipt",
@@ -1648,6 +1794,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Page Break",
@@ -1674,7 +1821,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "PR Detail",
@@ -1704,6 +1852,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valuation Rate",
@@ -1732,6 +1881,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Materials Supplied Cost",
@@ -1760,6 +1910,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Landed Cost Voucher Amount",
@@ -1778,17 +1929,17 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-11-16 16:04:52.465169",
"modified": "2017-04-19 11:54:16.112134",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",
@@ -1797,7 +1948,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}
}

View File

@@ -5,6 +5,7 @@ from __future__ import unicode_literals
import frappe, json
from frappe.utils import nowdate
from erpnext.setup.utils import get_exchange_rate
from frappe.core.doctype.communication.email import make
from erpnext.stock.get_item_details import get_pos_profile
from erpnext.accounts.party import get_party_account_currency
from erpnext.controllers.accounts_controller import get_taxes_and_charges
@@ -25,12 +26,15 @@ def get_pos_data():
update_multi_mode_option(doc, pos_profile)
default_print_format = pos_profile.get('print_format') or "Point of Sale"
print_template = frappe.db.get_value('Print Format', default_print_format, 'html')
customers = get_customers_list(pos_profile)
return {
'doc': doc,
'default_customer': pos_profile.get('customer'),
'items': get_items_list(pos_profile),
'customers': get_customers_list(pos_profile),
'item_groups': get_item_groups(pos_profile),
'customers': customers,
'address': get_customers_address(customers),
'serial_no_data': get_serial_no_data(pos_profile, doc.company),
'batch_no_data': get_batch_no_data(),
'tax_data': get_item_tax_data(),
@@ -39,18 +43,28 @@ def get_pos_data():
'pricing_rules': get_pricing_rule_data(doc),
'print_template': print_template,
'pos_profile': pos_profile,
'meta': {
'invoice': frappe.get_meta('Sales Invoice'),
'items': frappe.get_meta('Sales Invoice Item'),
'taxes': frappe.get_meta('Sales Taxes and Charges')
}
'meta': get_meta()
}
def get_meta():
doctype_meta = {
'customer': frappe.get_meta('Customer'),
'invoice': frappe.get_meta('Sales Invoice')
}
for row in frappe.get_all('DocField', fields = ['fieldname', 'options'],
filters = {'parent': 'Sales Invoice', 'fieldtype': 'Table'}):
doctype_meta[row.fieldname] = frappe.get_meta(row.options)
return doctype_meta
def get_company_data(company):
return frappe.get_all('Company', fields = ["*"], filters= {'name': company})[0]
def update_pos_profile_data(doc, pos_profile, company_data):
doc.campaign = pos_profile.get('campaign')
if pos_profile and not pos_profile.get('country'):
pos_profile.country = company_data.country
doc.write_off_account = pos_profile.get('write_off_account') or \
company_data.write_off_account
@@ -62,10 +76,10 @@ def update_pos_profile_data(doc, pos_profile, company_data):
doc.currency = pos_profile.get('currency') or company_data.default_currency
doc.conversion_rate = 1.0
if doc.currency != company_data.default_currency:
doc.conversion_rate = get_exchange_rate(doc.currency, company_data.default_currency, doc.posting_date)
doc.selling_price_list = pos_profile.get('selling_price_list') or \
frappe.db.get_value('Selling Settings', None, 'selling_price_list')
doc.naming_series = pos_profile.get('naming_series') or 'SINV-'
@@ -74,6 +88,7 @@ def update_pos_profile_data(doc, pos_profile, company_data):
doc.apply_discount_on = pos_profile.get('apply_discount_on') if pos_profile.get('apply_discount') else ''
doc.customer_group = pos_profile.get('customer_group') or get_root('Customer Group')
doc.territory = pos_profile.get('territory') or get_root('Territory')
doc.terms = frappe.db.get_value('Terms and Conditions', pos_profile.get('tc_name'), 'terms') or doc.terms or ''
def get_root(table):
root = frappe.db.sql(""" select name from `tab%(table)s` having
@@ -117,37 +132,68 @@ def get_items_list(pos_profile):
if pos_profile.get('item_groups'):
# Get items based on the item groups defined in the POS profile
for d in pos_profile.get('item_groups'):
item_groups.extend(get_child_nodes('Item Group', d.item_group))
item_groups.extend([d.name for d in get_child_nodes('Item Group', d.item_group)])
cond = "item_group in (%s)"%(', '.join(['%s']*len(item_groups)))
return frappe.db.sql("""
select
name, item_code, item_name, description, item_group, expense_account, has_batch_no,
has_serial_no, expense_account, selling_cost_center, stock_uom, image,
default_warehouse, is_stock_item, barcode
default_warehouse, is_stock_item, barcode, brand
from
tabItem
where
disabled = 0 and has_variants = 0 and is_sales_item = 1 and {cond}
""".format(cond=cond), tuple(item_groups), as_dict=1)
def get_item_groups(pos_profile):
item_group_dict = {}
if pos_profile.get('item_groups'):
item_groups = []
for d in pos_profile.get('item_groups'):
item_groups.extend(get_child_nodes('Item Group', d.item_group))
else:
item_groups = frappe.db.sql("""Select name,
lft, rgt from `tabItem Group` order by lft""", as_dict=1)
for data in item_groups:
item_group_dict[data.name] = [data.lft, data.rgt]
return item_group_dict
def get_customers_list(pos_profile):
cond = "1=1"
customer_groups = []
if pos_profile.get('customer_groups'):
# Get customers based on the customer groups defined in the POS profile
for d in pos_profile.get('customer_groups'):
customer_groups.extend(get_child_nodes('Customer Group', d.customer_group))
customer_groups.extend([d.name for d in get_child_nodes('Customer Group', d.customer_group)])
cond = "customer_group in (%s)"%(', '.join(['%s']*len(customer_groups)))
return frappe.db.sql(""" select name, customer_name, customer_group,
territory from tabCustomer where disabled = 0
and {cond}""".format(cond=cond), tuple(customer_groups), as_dict=1) or {}
def get_customers_address(customers):
customer_address = {}
if isinstance(customers, basestring):
customers = [frappe._dict({'name': customers})]
for data in customers:
address = frappe.db.sql(""" select name, address_line1, address_line2, city, state,
email_id, phone, fax, pincode from `tabAddress` where is_primary_address =1 and name in
(select parent from `tabDynamic Link` where link_doctype = 'Customer' and link_name = %s
and parenttype = 'Address')""", data.name, as_dict=1)
if address:
address_data = address[0]
address_data.update({'full_name': data.customer_name})
customer_address[data.name] = address_data
return customer_address
def get_child_nodes(group_type, root):
lft, rgt = frappe.db.get_value(group_type, root, ["lft", "rgt"])
return frappe.db.sql_list(""" Select name from `tab{tab}` where
lft >= {lft} and rgt <= {rgt}""".format(tab=group_type, lft=lft, rgt=rgt))
return frappe.db.sql(""" Select name, lft, rgt from `tab{tab}` where
lft >= {lft} and rgt <= {rgt} order by lft""".format(tab=group_type, lft=lft, rgt=rgt), as_dict=1)
def get_serial_no_data(pos_profile, company):
# get itemwise serial no data
@@ -238,12 +284,18 @@ def get_pricing_rule_data(doc):
return pricing_rules
@frappe.whitelist()
def make_invoice(doc_list):
def make_invoice(doc_list={}, email_queue_list={}, customers_list={}):
if isinstance(doc_list, basestring):
doc_list = json.loads(doc_list)
name_list = []
if isinstance(email_queue_list, basestring):
email_queue_list = json.loads(email_queue_list)
if isinstance(customers_list, basestring):
customers_list = json.loads(customers_list)
customers = make_customer_and_address(customers_list)
name_list = []
for docs in doc_list:
for name, doc in docs.items():
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
@@ -251,27 +303,82 @@ def make_invoice(doc_list):
si_doc = frappe.new_doc('Sales Invoice')
si_doc.offline_pos_name = name
si_doc.update(doc)
submit_invoice(si_doc, name)
si_doc.due_date = doc.get('posting_date')
submit_invoice(si_doc, name, doc)
name_list.append(name)
else:
name_list.append(name)
return name_list
email_queue = make_email_queue(email_queue_list)
return {
'invoice': name_list,
'email_queue': email_queue,
'customers': customers
}
def validate_records(doc):
validate_customer(doc)
validate_item(doc)
def validate_customer(doc):
if not frappe.db.exists('Customer', doc.get('customer')):
customer_doc = frappe.new_doc('Customer')
customer_doc.customer_name = doc.get('customer')
customer_doc.customer_type = 'Company'
customer_doc.customer_group = doc.get('customer_group')
customer_doc.territory = doc.get('territory')
customer_doc.save(ignore_permissions = True)
frappe.db.commit()
doc['customer'] = customer_doc.name
def make_customer_and_address(customers):
customer_list = []
for name, data in customers.items():
if not frappe.db.exists('Customer', name):
name = add_customer(name)
data = json.loads(data)
make_address(data, name)
customer_list.append(name)
return customer_list
def add_customer(name):
customer_doc = frappe.new_doc('Customer')
customer_doc.customer_name = name
customer_doc.customer_type = 'Company'
customer_doc.customer_group = frappe.db.get_single_value('Selling Settings', 'customer_group')
customer_doc.territory = frappe.db.get_single_value('Selling Settings', 'territory')
customer_doc.flags.ignore_mandatory = True
customer_doc.save(ignore_permissions = True)
frappe.db.commit()
return customer_doc.name
def make_address(args, customer):
if not args.get('address_line1'): return
name = args.get('name')
if not name:
data = get_customers_address(customer)
name = data[customer].get('name') if data else None
if name:
address = frappe.get_doc('Address', name)
else:
address = frappe.new_doc('Address')
address.country = frappe.db.get_value('Company', args.get('company'), 'country')
address.append('links',{
'link_doctype': 'Customer',
'link_name': customer
})
address.is_primary_address = 1
address.is_shipping_address = 1
address.update(args)
address.save(ignore_permissions = True)
def make_email_queue(email_queue):
name_list = []
for key, data in email_queue.items():
name = frappe.db.get_value('Sales Invoice', {'offline_pos_name': key}, 'name')
data = json.loads(data)
sender = frappe.session.user
print_format = "POS Invoice"
attachments = [frappe.attach_print('Sales Invoice', name, print_format= print_format)]
make(subject = data.get('subject'), content = data.get('content'), recipients = data.get('recipients'),
sender=sender,attachments = attachments, send_email=True,
doctype='Sales Invoice', name=name)
name_list.append(key)
return name_list
def validate_item(doc):
for item in doc.get('items'):
@@ -287,7 +394,8 @@ def validate_item(doc):
item_doc.save(ignore_permissions=True)
frappe.db.commit()
def submit_invoice(si_doc, name):
def submit_invoice(si_doc, name, doc):
try:
si_doc.insert()
si_doc.submit()
@@ -301,4 +409,5 @@ def save_invoice(e, si_doc, name):
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
si_doc.docstatus = 0
si_doc.flags.ignore_mandatory = True
si_doc.due_date = si_doc.posting_date
si_doc.insert()

View File

@@ -6,8 +6,14 @@ cur_frm.pformat.print_heading = 'Invoice';
{% include 'erpnext/selling/sales_common.js' %};
cur_frm.add_fetch('customer', 'tax_id', 'tax_id');
frappe.provide("erpnext.accounts");
erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.extend({
setup: function(doc) {
this.setup_posting_date_time_check();
this._super(doc);
},
onload: function() {
var me = this;
this._super();
@@ -51,7 +57,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
})
if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) {
cur_frm.add_custom_button(doc.update_stock ? __('Sales Return') : __('Credit Note'),
cur_frm.add_custom_button(__('Return / Credit Note'),
this.make_sales_return, __("Make"));
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
@@ -270,6 +276,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
});
}
}
else this.frm.trigger("refresh")
},
amount: function(){
@@ -320,6 +327,7 @@ cur_frm.cscript.hide_fields = function(doc) {
cur_frm.cscript.update_stock = function(doc, dt, dn) {
cur_frm.cscript.hide_fields(doc, dt, dn);
this.frm.fields_dict.items.grid.toggle_reqd("item_code", doc.update_stock? true: false)
}
cur_frm.cscript['Make Delivery Note'] = function() {
@@ -468,6 +476,12 @@ cur_frm.set_query("asset", "items", function(doc, cdt, cdn) {
frappe.ui.form.on('Sales Invoice', {
setup: function(frm){
frm.custom_make_buttons = {
'Delivery Note': 'Delivery',
'Sales Invoice': 'Sales Return',
'Payment Request': 'Payment Request',
'Payment': 'Payment Entry'
},
frm.fields_dict["timesheets"].grid.get_field("time_sheet").get_query = function(doc, cdt, cdn){
return{
query: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet",

File diff suppressed because it is too large Load Diff

View File

@@ -532,10 +532,12 @@ class SalesInvoice(SellingController):
if d.delivery_note and frappe.db.get_value("Delivery Note", d.delivery_note, "docstatus") != 1:
throw(_("Delivery Note {0} is not submitted").format(d.delivery_note))
def make_gl_entries(self, repost_future_gle=True):
def make_gl_entries(self, gl_entries=None, repost_future_gle=True, from_repost=False):
if not self.grand_total:
return
gl_entries = self.get_gl_entries()
if not gl_entries:
gl_entries = self.get_gl_entries()
if gl_entries:
from erpnext.accounts.general_ledger import make_gl_entries
@@ -651,32 +653,34 @@ class SalesInvoice(SellingController):
def make_pos_gl_entries(self, gl_entries):
if cint(self.is_pos):
for payment_mode in self.payments:
# POS, make payment entries
gl_entries.append(
self.get_gl_dict({
"account": self.debit_to,
"party_type": "Customer",
"party": self.customer,
"against": payment_mode.account,
"credit": payment_mode.base_amount,
"credit_in_account_currency": payment_mode.base_amount \
if self.party_account_currency==self.company_currency \
else payment_mode.amount,
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
}, self.party_account_currency)
)
if payment_mode.amount:
# POS, make payment entries
gl_entries.append(
self.get_gl_dict({
"account": self.debit_to,
"party_type": "Customer",
"party": self.customer,
"against": payment_mode.account,
"credit": payment_mode.base_amount,
"credit_in_account_currency": payment_mode.base_amount \
if self.party_account_currency==self.company_currency \
else payment_mode.amount,
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
}, self.party_account_currency)
)
payment_mode_account_currency = get_account_currency(payment_mode.account)
gl_entries.append(
self.get_gl_dict({
"account": payment_mode.account,
"against": self.customer,
"debit": payment_mode.base_amount,
"debit_in_account_currency": payment_mode.base_amount \
if payment_mode_account_currency==self.company_currency else payment_mode.amount
}, payment_mode_account_currency)
)
payment_mode_account_currency = get_account_currency(payment_mode.account)
gl_entries.append(
self.get_gl_dict({
"account": payment_mode.account,
"against": self.customer,
"debit": payment_mode.base_amount,
"debit_in_account_currency": payment_mode.base_amount \
if payment_mode_account_currency==self.company_currency \
else payment_mode.amount
}, payment_mode_account_currency)
)
def make_gle_for_change_amount(self, gl_entries):
if cint(self.is_pos) and self.change_amount:
@@ -786,11 +790,11 @@ def make_delivery_note(source_name, target_doc=None):
target.run_method("calculate_taxes_and_totals")
def update_item(source_doc, target_doc, source_parent):
target_doc.base_amount = (flt(source_doc.qty) - flt(source_doc.delivered_qty)) * \
flt(source_doc.base_rate)
target_doc.amount = (flt(source_doc.qty) - flt(source_doc.delivered_qty)) * \
flt(source_doc.rate)
target_doc.qty = flt(source_doc.qty) - flt(source_doc.delivered_qty)
target_doc.stock_qty = target_doc.qty * flt(source_doc.conversion_factor)
target_doc.base_amount = target_doc.qty * flt(source_doc.base_rate)
target_doc.amount = target_doc.qty * flt(source_doc.rate)
doclist = get_mapped_doc("Sales Invoice", source_name, {
"Sales Invoice": {

View File

@@ -20,7 +20,10 @@
"item_name": "138-CMS Shoe",
"parentfield": "items",
"qty": 1.0,
"rate": 500.0
"rate": 500.0,
"uom": "_Test UOM",
"conversion_factor": 1,
"stock_uom": "_Test UOM"
}
],
"base_grand_total": 561.8,
@@ -89,7 +92,10 @@
"item_name": "_Test Item",
"parentfield": "items",
"price_list_rate": 500.0,
"qty": 1.0
"qty": 1.0,
"uom": "_Test UOM",
"conversion_factor": 1,
"stock_uom": "_Test UOM"
}
],
"base_grand_total": 630.0,
@@ -141,7 +147,9 @@
"price_list_rate": 50,
"qty": 10,
"rate": 50,
"stock_uom": "_Test UOM"
"uom": "_Test UOM 1",
"conversion_factor": 1,
"stock_uom": "_Test UOM 1"
},
{
"cost_center": "_Test Cost Center - _TC",
@@ -153,6 +161,8 @@
"parentfield": "items",
"price_list_rate": 150,
"qty": 5,
"uom": "_Test UOM",
"conversion_factor": 1,
"rate": 150,
"stock_uom": "_Test UOM"
}
@@ -263,7 +273,10 @@
"parentfield": "items",
"price_list_rate": 62.5,
"qty": 10,
"stock_uom": "_Test UOM"
"uom": "_Test UOM 1",
"conversion_factor": 1,
"stock_uom": "_Test UOM 1"
},
{
"cost_center": "_Test Cost Center - _TC",
@@ -275,6 +288,8 @@
"parentfield": "items",
"price_list_rate": 190.66,
"qty": 5,
"uom": "_Test UOM",
"conversion_factor": 1,
"stock_uom": "_Test UOM"
}
],

View File

@@ -4,7 +4,7 @@ from __future__ import unicode_literals
import frappe
import unittest, copy
from frappe.utils import nowdate, add_days, flt, nowdate
from frappe.utils import nowdate, add_days, flt
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry, get_qty_after_transaction
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import unlink_payment_on_cancel_of_invoice
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
@@ -162,11 +162,50 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEquals(si.base_grand_total, 1628)
self.assertEquals(si.grand_total, 32.56)
def test_sales_invoice_with_discount_and_inclusive_tax(self):
si = create_sales_invoice(qty=100, rate=50, do_not_save=True)
si.append("taxes", {
"charge_type": "On Net Total",
"account_head": "_Test Account Service Tax - _TC",
"cost_center": "_Test Cost Center - _TC",
"description": "Service Tax",
"rate": 14,
'included_in_print_rate': 1
})
si.insert()
# with inclusive tax
self.assertEquals(si.net_total, 4385.96)
self.assertEquals(si.grand_total, 5000)
si.reload()
# additional discount
si.discount_amount = 100
si.apply_discount_on = 'Net Total'
si.save()
# with inclusive tax and additional discount
self.assertEquals(si.net_total, 4285.96)
self.assertEquals(si.grand_total, 4885.99)
si.reload()
# additional discount on grand total
si.discount_amount = 100
si.apply_discount_on = 'Grand Total'
si.save()
# with inclusive tax and additional discount
self.assertEquals(si.net_total, 4298.24)
self.assertEquals(si.grand_total, 4900.00)
def test_sales_invoice_discount_amount(self):
si = frappe.copy_doc(test_records[3])
si.discount_amount = 104.95
si.append("taxes", {
"doctype": "Sales Taxes and Charges",
"charge_type": "On Previous Row Amount",
"account_head": "_Test Account Service Tax - _TC",
"cost_center": "_Test Cost Center - _TC",
@@ -519,7 +558,7 @@ class TestSalesInvoice(unittest.TestCase):
{'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 330}]
invoice_data = [{'09052016142': pos}]
si = make_invoice(invoice_data)
si = make_invoice(invoice_data).get('invoice')
self.assertEquals(si[0], '09052016142')
sales_invoice = frappe.get_all('Sales Invoice', fields =["*"], filters = {'offline_pos_name': '09052016142', 'docstatus': 1})
@@ -917,51 +956,13 @@ class TestSalesInvoice(unittest.TestCase):
def test_create_so_with_margin(self):
si = create_sales_invoice(item_code="_Test Item", qty=1, do_not_submit=True)
price_list_rate = si.items[0].price_list_rate
price_list_rate = 100
si.items[0].price_list_rate = price_list_rate
si.items[0].margin_type = 'Percentage'
si.items[0].margin_rate_or_amount = 25
si.insert()
self.assertEqual(si.get("items")[0].rate, flt((price_list_rate*25)/100 + price_list_rate))
self.assertNotEquals(si.get("items")[0].rate, flt((price_list_rate*25)/100 + price_list_rate))
si.items[0].margin_rate_or_amount = 25
si.submit()
self.assertNotEquals(si.get("items")[0].rate, flt((price_list_rate*25)/100 + price_list_rate))
def test_party_status(self):
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
from frappe.utils import random_string
customer_name = 'test customer for status'
if frappe.db.exists('Customer', customer_name):
customer = frappe.get_doc('Customer', customer_name)
customer.db_set('status', 'Active')
else:
customer = frappe.get_doc({
'doctype': 'Customer',
'customer_name': customer_name,
'customer_group': 'Commercial',
'customer_type': 'Individual',
'territory': 'Rest of the World'
}).insert()
self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
invoice = create_sales_invoice(customer="test customer for status",
debit_to="_Test Receivable - _TC",
currency="USD", conversion_rate=50)
self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
pe = get_payment_entry(invoice.doctype, invoice.name)
pe.reference_no = random_string(10)
pe.reference_date = invoice.posting_date
pe.insert()
pe.submit()
self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
def test_outstanding_amount_after_advance_jv_cancelation(self):
from erpnext.accounts.doctype.journal_entry.test_journal_entry \
import test_records as jv_test_records
@@ -986,15 +987,15 @@ class TestSalesInvoice(unittest.TestCase):
#check outstanding after advance allocation
self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total - si.total_advance, si.precision("outstanding_amount")))
#added to avoid Document has been modified exception
jv = frappe.get_doc("Journal Entry", jv.name)
jv.cancel()
si.load_from_db()
#check outstanding after advance cancellation
self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total + si.total_advance, si.precision("outstanding_amount")))
def test_outstanding_amount_after_advance_payment_entry_cancelation(self):
pe = frappe.get_doc({
"doctype": "Payment Entry",
@@ -1015,7 +1016,7 @@ class TestSalesInvoice(unittest.TestCase):
})
pe.insert()
pe.submit()
si = frappe.copy_doc(test_records[0])
si.is_pos = 0
si.append("advances", {
@@ -1028,23 +1029,44 @@ class TestSalesInvoice(unittest.TestCase):
})
si.insert()
si.submit()
si.load_from_db()
#check outstanding after advance allocation
self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total - si.total_advance, si.precision("outstanding_amount")))
#added to avoid Document has been modified exception
pe = frappe.get_doc("Payment Entry", pe.name)
pe.cancel()
si.load_from_db()
#check outstanding after advance cancellation
self.assertEqual(flt(si.outstanding_amount), flt(si.grand_total + si.total_advance, si.precision("outstanding_amount")))
def test_multiple_uom_in_selling(self):
si = frappe.copy_doc(test_records[1])
si.items[0].uom = "_Test UOM 1"
si.items[0].conversion_factor = None
si.items[0].price_list_rate = None
si.save()
expected_values = {
"keys": ["price_list_rate", "stock_uom", "uom", "conversion_factor", "rate", "amount",
"base_price_list_rate", "base_rate", "base_amount"],
"_Test Item": [1000, "_Test UOM", "_Test UOM 1", 10.0, 1000, 1000, 1000, 1000, 1000]
}
# check if the conversion_factor and price_list_rate is calculated according to uom
for d in si.get("items"):
for i, k in enumerate(expected_values["keys"]):
self.assertEquals(d.get(k), expected_values[d.item_code][i])
def create_sales_invoice(**args):
si = frappe.new_doc("Sales Invoice")
args = frappe._dict(args)
if args.posting_date:
si.set_posting_time = 1
si.posting_date = args.posting_date or nowdate()
si.company = args.company or "_Test Company"

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
@@ -22,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Barcode",
@@ -48,7 +50,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item",
@@ -79,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -105,6 +109,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -134,6 +139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer's Item Code",
@@ -161,6 +167,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Edit Description",
@@ -189,6 +196,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -220,6 +228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -247,6 +256,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image View",
@@ -276,6 +286,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -304,6 +315,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -331,6 +343,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Quantity",
@@ -349,6 +362,178 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stock_uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock UOM",
"length": 0,
"no_copy": 0,
"options": "UOM",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "col_break2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
"options": "UOM",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "conversion_factor",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "UOM Conversion Factor",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stock_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Qty as per Stock UOM",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_17",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -360,6 +545,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate",
@@ -379,60 +565,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "col_break2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stock_uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
"options": "UOM",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -444,6 +576,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
@@ -474,6 +607,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount and Margin",
@@ -503,6 +637,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
@@ -532,6 +667,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -560,6 +696,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Type",
@@ -590,6 +727,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Rate or Amount",
@@ -619,6 +757,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Margin",
@@ -647,6 +786,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -673,6 +813,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Rate",
@@ -703,6 +844,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
@@ -733,6 +875,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -759,6 +902,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate (Company Currency)",
@@ -789,6 +933,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount (Company Currency)",
@@ -819,6 +964,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pricing Rule",
@@ -847,6 +993,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -874,6 +1021,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate",
@@ -903,6 +1051,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount",
@@ -932,6 +1081,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -959,6 +1109,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
@@ -988,6 +1139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
@@ -1018,6 +1170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Drop Ship",
@@ -1046,6 +1199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivered By Supplier",
@@ -1074,6 +1228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounting Details",
@@ -1100,7 +1255,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Income Account",
@@ -1132,7 +1288,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Account",
@@ -1162,6 +1319,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1188,7 +1346,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
@@ -1216,12 +1375,14 @@
"collapsible": 1,
"collapsible_depends_on": "eval:doc.serial_no || doc.batch_no",
"columns": 0,
"depends_on": "eval: parent.update_stock",
"fieldname": "warehouse_and_reference",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock Details",
@@ -1249,6 +1410,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Warehouse",
@@ -1279,6 +1441,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Warehouse (Optional)",
@@ -1309,6 +1472,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quality Inspection",
@@ -1338,6 +1502,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Batch No",
@@ -1366,6 +1531,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1381,6 +1547,35 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "allow_zero_valuation_rate",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allow Zero Valuation Rate",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1391,7 +1586,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Serial No",
@@ -1421,7 +1617,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Group",
@@ -1451,7 +1648,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Brand Name",
@@ -1481,6 +1679,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Rate",
@@ -1510,6 +1709,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Available Batch Qty at Warehouse",
@@ -1540,6 +1740,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Available Qty at Warehouse",
@@ -1569,6 +1770,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "References",
@@ -1596,7 +1798,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Order",
@@ -1626,7 +1829,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Order Item",
@@ -1656,6 +1860,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1682,7 +1887,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Note",
@@ -1712,7 +1918,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Note Item",
@@ -1742,6 +1949,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivered Qty",
@@ -1771,6 +1979,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Fixed Asset",
@@ -1799,6 +2008,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset",
@@ -1828,6 +2038,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1855,6 +2066,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Page Break",
@@ -1872,17 +2084,17 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-11-16 16:04:02.438952",
"modified": "2017-04-19 11:53:26.682964",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",
@@ -1891,7 +2103,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -9,6 +9,7 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Time Sheet",
"length": 0,
"no_copy": 0,
@@ -31,6 +34,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -48,7 +52,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Billing Hours",
"length": 0,
"no_copy": 0,
@@ -57,6 +63,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -74,7 +81,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Billing Amount",
"length": 0,
"no_copy": 0,
@@ -83,6 +92,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -100,7 +110,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Timesheet Detail",
"length": 0,
"no_copy": 1,
@@ -109,6 +121,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -126,7 +139,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-09-09 14:01:04.095775",
"modified": "2017-02-17 16:47:04.413420",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Timesheet",
@@ -136,7 +149,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -4,11 +4,10 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import frappe, erpnext
from frappe import _, msgprint, throw
from frappe.utils import flt, fmt_money
from frappe.model.document import Document
from erpnext.setup.utils import get_company_currency
class OverlappingConditionError(frappe.ValidationError): pass
class FromGreaterThanToError(frappe.ValidationError): pass
@@ -77,7 +76,7 @@ class ShippingRule(Document):
overlaps.append([d1, d2])
if overlaps:
company_currency = get_company_currency(self.company)
company_currency = erpnext.get_company_currency(self.company)
msgprint(_("Overlapping conditions found between:"))
messages = []
for d1, d2 in overlaps:

View File

@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Tax Type",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Use for Shopping Cart",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Tax Template",
@@ -138,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Tax Template",
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Filters",
@@ -196,6 +202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -226,6 +233,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -255,6 +263,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing City",
@@ -283,6 +292,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing County",
@@ -311,6 +321,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing State",
@@ -339,6 +350,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing Country",
@@ -368,6 +380,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -396,6 +409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -426,6 +440,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Type",
@@ -455,6 +470,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping City",
@@ -483,6 +499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping County",
@@ -511,6 +528,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping State",
@@ -539,6 +557,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Country",
@@ -568,6 +587,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Validity",
@@ -596,6 +616,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Date",
@@ -624,6 +645,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -651,6 +673,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Date",
@@ -679,6 +702,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -707,6 +731,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Priority",
@@ -735,6 +760,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -762,6 +788,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -791,7 +818,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-13 15:56:28.704122",
"modified": "2017-02-17 16:22:42.501765",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Tax Rule",
@@ -808,7 +835,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
"is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -823,7 +849,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}
}

View File

@@ -7,6 +7,7 @@ import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import cstr, cint
from frappe.geo.doctype.address.address import get_default_address
class IncorrectCustomerGroup(frappe.ValidationError): pass
class IncorrectSupplierType(frappe.ValidationError): pass
@@ -96,27 +97,31 @@ class TaxRule(Document):
@frappe.whitelist()
def get_party_details(party, party_type, args=None):
out = {}
billing_address, shipping_address = None, None
if args:
billing_filters= {"name": args.get("billing_address")}
shipping_filters= {"name": args.get("shipping_address")}
if args.get('billing_address'):
billing_address = frappe.get_doc('Address', args.get('billing_address'))
if args.get('shipping_address'):
shipping_address = frappe.get_doc('Address', args.get('shipping_address'))
else:
billing_filters= {party_type: party, "is_primary_address": 1}
shipping_filters= {party_type:party, "is_shipping_address": 1}
billing_address= frappe.get_all("Address", fields=["city", "county", "state", "country"], filters= billing_filters)
shipping_address= frappe.get_all("Address", fields=["city", "county", "state", "country"], filters= shipping_filters)
billing_address_name = get_default_address(party_type, party)
shipping_address_name = get_default_address(party_type, party, 'is_shipping_address')
if billing_address_name:
billing_address = frappe.get_doc('Address', billing_address_name)
if shipping_address_name:
shipping_address = frappe.get_doc('Address', shipping_address_name)
if billing_address:
out["billing_city"]= billing_address[0].city
out["billing_county"]= billing_address[0].county
out["billing_state"]= billing_address[0].state
out["billing_country"]= billing_address[0].country
out["billing_city"]= billing_address.city
out["billing_county"]= billing_address.county
out["billing_state"]= billing_address.state
out["billing_country"]= billing_address.country
if shipping_address:
out["shipping_city"]= shipping_address[0].city
out["shipping_county"]= shipping_address[0].county
out["shipping_state"]= shipping_address[0].state
out["shipping_country"]= shipping_address[0].country
out["shipping_city"]= shipping_address.city
out["shipping_county"]= shipping_address.county
out["shipping_state"]= shipping_address.state
out["shipping_country"]= shipping_address.country
return out

View File

@@ -11,12 +11,12 @@ from erpnext.accounts.doctype.budget.budget import validate_expense_against_budg
class StockAccountInvalidTransaction(frappe.ValidationError): pass
def make_gl_entries(gl_map, cancel=False, adv_adj=False, merge_entries=True, update_outstanding='Yes'):
def make_gl_entries(gl_map, cancel=False, adv_adj=False, merge_entries=True, update_outstanding='Yes', from_repost=False):
if gl_map:
if not cancel:
gl_map = process_gl_map(gl_map, merge_entries)
if gl_map and len(gl_map) > 1:
save_entries(gl_map, adv_adj, update_outstanding)
save_entries(gl_map, adv_adj, update_outstanding, from_repost)
else:
frappe.throw(_("Incorrect number of General Ledger Entries found. You might have selected a wrong Account in the transaction."))
else:
@@ -78,21 +78,26 @@ def check_if_in_list(gle, gl_map):
and cstr(e.get('project')) == cstr(gle.get('project')):
return e
def save_entries(gl_map, adv_adj, update_outstanding):
validate_account_for_auto_accounting_for_stock(gl_map)
def save_entries(gl_map, adv_adj, update_outstanding, from_repost=False):
if not from_repost:
validate_account_for_auto_accounting_for_stock(gl_map)
round_off_debit_credit(gl_map)
for entry in gl_map:
make_entry(entry, adv_adj, update_outstanding)
make_entry(entry, adv_adj, update_outstanding, from_repost)
# check against budget
validate_expense_against_budget(entry)
if not from_repost:
validate_expense_against_budget(entry)
def make_entry(args, adv_adj, update_outstanding):
def make_entry(args, adv_adj, update_outstanding, from_repost=False):
args.update({"doctype": "GL Entry"})
gle = frappe.get_doc(args)
gle.flags.ignore_permissions = 1
gle.flags.from_repost = from_repost
gle.insert()
gle.run_method("on_update_with_args", adv_adj, update_outstanding)
gle.run_method("on_update_with_args", adv_adj, update_outstanding, from_repost)
gle.submit()
def validate_account_for_auto_accounting_for_stock(gl_map):

File diff suppressed because it is too large Load Diff

View File

@@ -7,9 +7,9 @@ import frappe
import datetime
from frappe import _, msgprint, scrub
from frappe.defaults import get_user_permissions
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, add_years
from erpnext.utilities.doctype.address.address import get_address_display
from erpnext.utilities.doctype.contact.contact import get_contact_details
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, add_years, get_timestamp
from frappe.geo.doctype.address.address import get_address_display, get_default_address
from frappe.email.doctype.contact.contact import get_contact_details, get_default_contact
from erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency
class DuplicatePartyAccountError(frappe.ValidationError): pass
@@ -60,21 +60,18 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
def set_address_details(out, party, party_type):
billing_address_field = "customer_address" if party_type == "Lead" \
else party_type.lower() + "_address"
out[billing_address_field] = frappe.db.get_value("Address",
{party_type.lower(): party.name, "is_primary_address":1}, "name")
out[billing_address_field] = get_default_address(party_type, party.name)
# address display
out.address_display = get_address_display(out[billing_address_field])
# shipping address
if party_type in ["Customer", "Lead"]:
out.shipping_address_name = frappe.db.get_value("Address",
{party_type.lower(): party.name, "is_shipping_address":1}, "name")
out.shipping_address_name = get_default_address(party_type, party.name, 'is_shipping_address')
out.shipping_address = get_address_display(out["shipping_address_name"])
def set_contact_details(out, party, party_type):
out.contact_person = frappe.db.get_value("Contact",
{party_type.lower(): party.name, "is_primary_contact":1}, "name")
out.contact_person = get_default_contact(party_type, party.name)
if not out.contact_person:
out.update({
@@ -154,13 +151,6 @@ def set_account_and_due_date(party, account, party_type, company, posting_date,
}
return out
def get_company_currency():
company_currency = frappe._dict()
for d in frappe.get_all("Company", fields=["name", "default_currency"]):
company_currency.setdefault(d.name, d.default_currency)
return company_currency
@frappe.whitelist()
def get_party_account(party_type, party, company):
"""Returns the account for the given `party`.
@@ -174,17 +164,17 @@ def get_party_account(party_type, party, company):
account = frappe.db.get_value("Party Account",
{"parenttype": party_type, "parent": party, "company": company}, "account")
if not account:
if not account and party_type in ['Customer', 'Supplier']:
party_group_doctype = "Customer Group" if party_type=="Customer" else "Supplier Type"
group = frappe.db.get_value(party_type, party, scrub(party_group_doctype))
account = frappe.db.get_value("Party Account",
{"parenttype": party_group_doctype, "parent": group, "company": company}, "account")
if not account:
if not account and party_type in ['Customer', 'Supplier']:
default_account_name = "default_receivable_account" \
if party_type=="Customer" else "default_payable_account"
account = frappe.db.get_value("Company", company, default_account_name)
existing_gle_currency = get_party_gle_currency(party_type, party, company)
if existing_gle_currency:
if account:
@@ -211,7 +201,7 @@ def get_party_gle_currency(party_type, party, company):
return frappe.local_cache("party_gle_currency", (party_type, party, company), generator,
regenerate_if_none=True)
def get_party_gle_account(party_type, party, company):
def generator():
existing_gle_account = frappe.db.sql("""select account from `tabGL Entry`
@@ -252,7 +242,7 @@ def validate_party_accounts(doc):
if existing_gle_currency and party_account_currency != existing_gle_currency:
frappe.throw(_("Accounting entries have already been made in currency {0} for company {1}. Please select a receivable or payable account with currency {0}.").format(existing_gle_currency, account.company))
if doc.default_currency and party_account_currency and company_default_currency:
if doc.get("default_currency") and party_account_currency and company_default_currency:
if doc.default_currency != party_account_currency and doc.default_currency != company_default_currency:
frappe.throw(_("Billing currency must be equal to either default comapany's currency or party account currency"))
@@ -340,19 +330,33 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
def validate_party_frozen_disabled(party_type, party_name):
if party_type and party_name:
party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
if party.disabled:
frappe.throw(_("{0} {1} is disabled").format(party_type, party_name), PartyDisabled)
elif party.is_frozen:
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
if not frozen_accounts_modifier in frappe.get_roles():
frappe.throw(_("{0} {1} is frozen").format(party_type, party_name), PartyFrozen)
if party_type in ("Customer", "Supplier"):
party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
if party.disabled:
frappe.throw(_("{0} {1} is disabled").format(party_type, party_name), PartyDisabled)
elif party.get("is_frozen"):
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
if not frozen_accounts_modifier in frappe.get_roles():
frappe.throw(_("{0} {1} is frozen").format(party_type, party_name), PartyFrozen)
elif party_type == "Employee":
if frappe.db.get_value("Employee", party_name, "status") == "Left":
frappe.msgprint(_("{0} {1} is not active").format(party_type, party_name), alert=True)
def get_timeline_data(doctype, name):
'''returns timeline data for the past one year'''
from frappe.desk.form.load import get_communication_data
out = {}
data = get_communication_data(doctype, name,
fields = 'unix_timestamp(date(creation)), count(name)',
fields = 'date(creation), count(name)',
after = add_years(None, -1).strftime('%Y-%m-%d'),
group_by='group by date(creation)', as_dict=False)
return dict(data)
timeline_items = dict(data)
for date, count in timeline_items.iteritems():
timestamp = get_timestamp(date)
out.update({ timestamp: count })
return out

View File

@@ -1,81 +0,0 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import evaluate_filters
from frappe.desk.notifications import get_filters_for
# NOTE: if you change this also update triggers in erpnext/hooks.py
status_depends_on = {
'Customer': ('Opportunity', 'Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice', 'Project', 'Issue'),
'Supplier': ('Supplier Quotation', 'Purchase Order', 'Purchase Receipt', 'Purchase Invoice')
}
default_status = {
'Customer': 'Active',
'Supplier': None
}
def notify_status(doc, method=None):
'''Notify status to customer, supplier'''
party_type = None
for key, doctypes in status_depends_on.iteritems():
if doc.doctype in doctypes:
party_type = key
break
if not party_type:
return
name = doc.get(party_type.lower())
if not name:
return
party = frappe.get_doc(party_type, name)
filters = get_filters_for(doc.doctype)
party.flags.ignore_mandatory = True
status = None
if filters:
if evaluate_filters(doc, filters):
# filters match, passed document is open
status = 'Open'
if status=='Open':
if party.status != 'Open':
# party not open, make it open
party.status = 'Open'
party.save(ignore_permissions=True)
else:
if party.status == 'Open':
# may be open elsewhere, check
# default status
update_status(party)
party.update_modified()
party.notify_update()
def get_party_status(doc):
'''return party status based on open documents'''
status = default_status[doc.doctype]
for doctype in status_depends_on[doc.doctype]:
filters = get_filters_for(doctype)
filters[doc.doctype.lower()] = doc.name
if filters:
open_count = frappe.get_all(doctype, fields='name', filters=filters, limit_page_length=1)
if len(open_count) > 0:
status = 'Open'
break
return status
def update_status(doc):
'''Set status as open if there is any open notification'''
status = get_party_status(doc)
if doc.status != status:
doc.db_set('status', status)

View File

@@ -1,4 +1,5 @@
{
"align_labels_left": 0,
"creation": "2016-05-05 17:16:18.564460",
"custom_format": 1,
"disabled": 0,
@@ -6,13 +7,16 @@
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"POS No : \") }}{{offline_pos_name}}<br>\n</p>\n<p>\n\t<b>{{ __(\"Date\") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ __(\"Item\") }}</b></th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for item in items %}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_name }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ format_number(item.qty, precision(\"difference\")) }}<br>@ {{ format_currency(item.rate, currency) }}</td>\n\t\t\t<td class=\"text-right\">{{ format_currency(item.amount, currency) }}</td>\n\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% for row in taxes %}\n\t\t{% if not row.included_in_print_rate %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t{% endfor %}\n\t\t{% if discount_amount %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n\n<hr>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"POS No : \") }} {{ offline_pos_name }}<br>\n</p>\n<p>\n\t<b>{{ __(\"Date\") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ __(\"Item\") }}</b></th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for item in items %}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_name }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ format_number(item.qty, null,precision(\"difference\")) }}<br>@ {{ format_currency(item.rate, currency) }}</td>\n\t\t\t<td class=\"text-right\">{{ format_currency(item.amount, currency) }}</td>\n\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% for row in taxes %}\n\t\t{% if not row.included_in_print_rate %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t{% endfor %}\n\t\t{% if discount_amount %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Paid Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(paid_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n\n<hr>\n<p>{{ terms }}</p>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"idx": 0,
"modified": "2016-09-05 08:28:42.308782",
"line_breaks": 0,
"modified": "2017-04-19 13:28:05.129504",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Point of Sale",
"owner": "Administrator",
"print_format_builder": 0,
"print_format_type": "Js",
"show_section_headings": 0,
"standard": "Yes"
}

View File

@@ -53,5 +53,11 @@ frappe.query_reports["Accounts Payable"] = {
"default": "90",
"reqd": 1
}
]
],
onload: function(report) {
report.page.add_inner_button(__("Accounts Payable Summary"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Accounts Payable Summary', {company: filters.company});
});
}
}

View File

@@ -1,17 +1,32 @@
{
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-04-22 16:16:03",
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2015-07-24 01:08:20.996267",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Payable",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Accounts Payable",
"report_type": "Script Report"
}
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-04-22 16:16:03",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 3,
"is_standard": "Yes",
"modified": "2017-02-24 20:09:46.150861",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Payable",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Accounts Payable",
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Purchase User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -53,5 +53,12 @@ frappe.query_reports["Accounts Payable Summary"] = {
"default": "90",
"reqd": 1
}
]
],
onload: function(report) {
report.page.add_inner_button(__("Accounts Payable"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Accounts Payable', {company: filters.company});
});
}
}

View File

@@ -5,13 +5,28 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 2,
"is_standard": "Yes",
"modified": "2014-11-04 12:09:59.672379",
"modified": "2017-02-24 20:11:35.655834",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Payable Summary",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Accounts Payable Summary",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Purchase User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -53,5 +53,12 @@ frappe.query_reports["Accounts Receivable"] = {
"default": "90",
"reqd": 1
}
]
],
onload: function(report) {
report.page.add_inner_button(__("Accounts Receivable Summary"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Accounts Receivable Summary', {company: filters.company});
});
}
}

View File

@@ -2,16 +2,25 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-04-16 11:31:13",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:16.907658",
"modified": "2017-03-06 05:52:06.235584",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Receivable",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Accounts Receivable",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts Manager"
},
{
"role": "Accounts User"
}
]
}

View File

@@ -53,5 +53,12 @@ frappe.query_reports["Accounts Receivable Summary"] = {
"default": "90",
"reqd": 1
}
]
],
onload: function(report) {
report.page.add_inner_button(__("Accounts Receivable"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Accounts Receivable', {company: filters.company});
});
}
}

View File

@@ -5,13 +5,22 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 2,
"is_standard": "Yes",
"modified": "2014-12-01 16:14:40.213259",
"modified": "2017-03-06 05:52:23.751082",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Receivable Summary",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Accounts Receivable Summary",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts Manager"
},
{
"role": "Accounts User"
}
]
}

View File

@@ -5,14 +5,19 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"idx": 2,
"is_standard": "Yes",
"modified": "2016-04-08 14:49:58.133098",
"modified": "2017-02-24 20:08:26.084484",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Depreciation Ledger",
"owner": "Administrator",
"ref_doctype": "Asset",
"report_name": "Asset Depreciation Ledger",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
}
]
}

View File

@@ -5,14 +5,19 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"idx": 2,
"is_standard": "Yes",
"modified": "2016-04-08 14:56:37.235981",
"modified": "2017-02-24 20:08:18.660476",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Depreciations and Balances",
"owner": "Administrator",
"ref_doctype": "Asset",
"report_name": "Asset Depreciations and Balances",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
}
]
}

View File

@@ -1,15 +1,29 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2014-07-14 05:24:20.385279",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 2,
"is_standard": "Yes",
"modified": "2014-07-14 05:24:20.385279",
"modified": "2017-02-24 20:12:47.161127",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Balance Sheet",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "Balance Sheet",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -8,7 +8,7 @@ from frappe.utils import flt, cint
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data)
def execute(filters=None):
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity)
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity, filters.company)
asset = get_data(filters.company, "Asset", "Debit", period_list, only_current_fiscal_year=False)
liability = get_data(filters.company, "Liability", "Credit", period_list, only_current_fiscal_year=False)
@@ -26,7 +26,7 @@ def execute(filters=None):
if opening_balance and round(opening_balance,2) !=0:
unclosed ={
"account_name": "'" + _("Unclosed Fiscal Years Profit / Loss (Credit)") + "'",
"account": None,
"account": "'" + _("Unclosed Fiscal Years Profit / Loss (Credit)") + "'",
"warn_if_negative": True,
"currency": frappe.db.get_value("Company", filters.company, "default_currency")
}
@@ -57,7 +57,7 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
currency = frappe.db.get_value("Company", company, "default_currency")
total_row = {
"account_name": "'" + _("Total (Credit)") + "'",
"account": None,
"account": "'" + _("Total (Credit)") + "'",
"warn_if_negative": True,
"currency": currency
}
@@ -85,7 +85,7 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
if has_value:
provisional_profit_loss.update({
"account_name": "'" + _("Provisional Profit / Loss (Credit)") + "'",
"account": None,
"account": "'" + _("Provisional Profit / Loss (Credit)") + "'",
"warn_if_negative": True,
"currency": currency
})

View File

@@ -1,16 +1,29 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-05-01 12:13:25",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:16.921522",
"modified": "2017-02-24 20:19:26.257552",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Clearance Summary",
"owner": "Administrator",
"ref_doctype": "Journal Entry",
"report_name": "Bank Clearance Summary",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -2,16 +2,28 @@
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-04-30 18:30:21",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:16.926502",
"modified": "2017-02-24 20:19:19.231541",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Statement",
"owner": "Administrator",
"ref_doctype": "Journal Entry",
"report_name": "Bank Reconciliation Statement",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -1,16 +1,35 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-18 12:56:36",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:16.971175",
"modified": "2017-02-24 20:19:06.964033",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Variance Report",
"owner": "Administrator",
"ref_doctype": "Cost Center",
"report_name": "Budget Variance Report",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
},
{
"role": "Accounts User"
},
{
"role": "Sales User"
},
{
"role": "Purchase User"
}
]
}

View File

@@ -5,14 +5,25 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"idx": 2,
"is_standard": "Yes",
"modified": "2015-12-12 10:22:45.383203",
"modified": "2017-02-24 20:09:19.748690",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cash Flow",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "Cash Flow",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -10,7 +10,8 @@ from erpnext.accounts.utils import get_fiscal_year
def execute(filters=None):
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity)
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year,
filters.periodicity, filters.company)
operation_accounts = {
"section_name": "Operations",
@@ -103,7 +104,7 @@ def get_account_type_based_data(company, account_type, period_list, accumulated_
data = {}
total = 0
for period in period_list:
start_date = get_start_date(period, accumulated_values)
start_date = get_start_date(period, accumulated_values, company)
gl_sum = frappe.db.sql_list("""
select sum(credit) - sum(debit)
from `tabGL Entry`
@@ -126,10 +127,10 @@ def get_account_type_based_data(company, account_type, period_list, accumulated_
data["total"] = total
return data
def get_start_date(period, accumulated_values):
def get_start_date(period, accumulated_values, company):
start_date = period["year_start_date"]
if accumulated_values:
start_date = get_fiscal_year(period.to_date)[1]
start_date = get_fiscal_year(period.to_date, company=company)[1]
return start_date

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.query_reports["Delivered Items To Be Billed"] = {
"filters": [
]
}

View File

@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2016-08-18 14:29:50.680329",
"modified": "2017-02-24 20:20:20.613388",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Delivered Items To Be Billed",
@@ -15,5 +15,13 @@
"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`.`customer_name` as \"Customer Name::150\",\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`.`base_amount` - `tabDelivery Note Item`.`billed_amt`*ifnull(`tabDelivery Note`.conversion_rate, 1)) 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`.name = `tabDelivery Note Item`.parent \n and `tabDelivery Note`.docstatus = 1 \n and `tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") \n and `tabDelivery Note Item`.amount > 0\n and `tabDelivery Note Item`.billed_amt < `tabDelivery Note Item`.amount\norder by `tabDelivery Note`.`name` desc",
"ref_doctype": "Sales Invoice",
"report_name": "Delivered Items To Be Billed",
"report_type": "Query Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts Manager"
},
{
"role": "Accounts User"
}
]
}

View File

@@ -0,0 +1,26 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_data
def execute(filters=None):
columns = get_column()
args = get_args()
data = get_ordered_to_be_billed_data(args)
return columns, data
def get_column():
return [
_("Delivery Note") + ":Link/Delivery Note:120", _("Date") + ":Date:100",
_("Suplier") + ":Link/Customer:120", _("Customer Name") + "::120",
_("Project") + ":Link/Project:120", _("Item Code") + ":Link/Item:120",
_("Amount") + ":Currency:100", _("Billed Amount") + ":Currency:100", _("Pending Amount") + ":Currency:100",
_("Item Name") + "::120", _("Description") + "::120", _("Company") + ":Link/Company:120",
]
def get_args():
return {'doctype': 'Delivery Note', 'party': 'customer',
'date': 'posting_date', 'order': 'name', 'order_by': 'desc'}

View File

@@ -3,12 +3,10 @@
from __future__ import unicode_literals
import frappe
import math
from frappe import _
from frappe.utils import (flt, getdate, get_first_day, get_last_day, date_diff,
add_months, add_days, formatdate, cint)
from frappe.utils import flt, getdate, get_first_day, add_months, add_days, formatdate
def get_period_list(from_fiscal_year, to_fiscal_year, periodicity):
def get_period_list(from_fiscal_year, to_fiscal_year, periodicity, company):
"""Get a list of dict {"from_date": from_date, "to_date": to_date, "key": key, "label": label}
Periodicity can be (Yearly, Quarterly, Monthly)"""
@@ -50,7 +48,7 @@ def get_period_list(from_fiscal_year, to_fiscal_year, periodicity):
# if a fiscal year ends before a 12 month period
period.to_date = year_end_date
period.to_date_fiscal_year = get_date_fiscal_year(period.to_date)
period.to_date_fiscal_year = get_date_fiscal_year(period.to_date, company)
period_list.append(period)
@@ -141,16 +139,15 @@ def calculate_values(accounts_by_name, gl_entries_by_account, period_list, accum
if entry.posting_date <= period.to_date:
if (accumulated_values or entry.posting_date >= period.from_date) and \
(entry.fiscal_year == period.to_date_fiscal_year or not ignore_accumulated_values_for_fy):
(not ignore_accumulated_values_for_fy or entry.fiscal_year == period.to_date_fiscal_year):
d[period.key] = d.get(period.key, 0.0) + flt(entry.debit) - flt(entry.credit)
if entry.posting_date < period_list[0].year_start_date:
d["opening_balance"] = d.get("opening_balance", 0.0) + flt(entry.debit) - flt(entry.credit)
def get_date_fiscal_year(date):
def get_date_fiscal_year(date, company):
from erpnext.accounts.utils import get_fiscal_year
return get_fiscal_year(date)[0]
return get_fiscal_year(date, company=company)[0]
def accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values):
"""accumulate children's values in parent accounts"""
@@ -219,7 +216,7 @@ def filter_out_zero_value_rows(data, parent_children_map, show_zero_values=False
def add_total_row(out, root_type, balance_must_be, period_list, company_currency):
total_row = {
"account_name": "'" + _("Total {0} ({1})").format(root_type, balance_must_be) + "'",
"account": None,
"account": "'" + _("Total {0} ({1})").format(root_type, balance_must_be) + "'",
"currency": company_currency
}

View File

@@ -47,14 +47,20 @@ frappe.query_reports["General Ledger"] = {
"label": __("Voucher No"),
"fieldtype": "Data",
},
{
"fieldname":"project",
"label": __("Project"),
"fieldtype": "Link",
"options": "Project"
},
{
"fieldtype": "Break",
},
{
"fieldname":"party_type",
"label": __("Party Type"),
"fieldtype": "Select",
"options": ["", "Customer", "Supplier"],
"fieldtype": "Link",
"options": "Party Type",
"default": ""
},
{
@@ -80,13 +86,6 @@ frappe.query_reports["General Ledger"] = {
"fieldname":"group_by_account",
"label": __("Group by Account"),
"fieldtype": "Check",
},
{
"fieldname":"letter_head",
"label": __("Letter Head"),
"fieldtype": "Link",
"options": "Letter Head",
"default": frappe.defaults.get_default("letter_head"),
}
]
}

View File

@@ -1,16 +1,29 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-12-06 13:22:23",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:17.072046",
"modified": "2017-02-24 20:17:51.995451",
"modified_by": "Administrator",
"module": "Accounts",
"name": "General Ledger",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "General Ledger",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}

View File

@@ -66,7 +66,8 @@ def set_account_currency(filters):
if gle_currency:
account_currency = gle_currency
else:
account_currency = frappe.db.get_value(filters.party_type, filters.party, "default_currency")
account_currency = None if filters.party_type == "Employee" else \
frappe.db.get_value(filters.party_type, filters.party, "default_currency")
filters["account_currency"] = account_currency or filters.company_currency
@@ -149,6 +150,9 @@ def get_conditions(filters):
if not (filters.get("account") or filters.get("party") or filters.get("group_by_account")):
conditions.append("posting_date >=%(from_date)s")
if filters.get("project"):
conditions.append("project=%(project)s")
from frappe.desk.reportview import build_match_conditions
match_conditions = build_match_conditions("GL Entry")
if match_conditions: conditions.append(match_conditions)

View File

@@ -1,16 +1,26 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-02-25 17:03:34",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-09-18 19:00:50.263854",
"modified": "2017-02-24 20:12:22.464240",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Gross Profit",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Gross Profit",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts Manager"
},
{
"role": "Accounts User"
}
]
}

View File

@@ -4,12 +4,15 @@
from __future__ import unicode_literals
import frappe
from frappe import _, scrub
from erpnext.stock.utils import get_incoming_rate
from erpnext.controllers.queries import get_match_cond
from erpnext.stock.stock_ledger import get_valuation_rate
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")
filters.currency = frappe.db.get_value("Company", filters.company, "default_currency")
gross_profit_data = GrossProfitGenerator(filters)
@@ -47,7 +50,7 @@ def execute(filters=None):
for col in group_wise_columns.get(scrub(filters.group_by)):
row.append(src.get(col))
row.append(company_currency)
row.append(filters.currency)
data.append(row)
return columns, data
@@ -208,21 +211,25 @@ class GrossProfitGenerator(object):
flt(my_sle[i+1].stock_value) or 0.0
return previous_stock_value - flt(sle.stock_value)
else:
return flt(row.qty) * self.get_average_buying_rate(item_code)
return flt(row.qty) * self.get_average_buying_rate(row, item_code)
return 0.0
def get_average_buying_rate(self, item_code):
def get_average_buying_rate(self, row, item_code):
if not item_code in self.average_buying_rate:
if item_code in self.non_stock_items:
self.average_buying_rate[item_code] = flt(frappe.db.sql("""select sum(base_net_amount) / sum(qty * conversion_factor)
self.average_buying_rate[item_code] = flt(frappe.db.sql("""
select sum(base_net_amount) / sum(qty * conversion_factor)
from `tabPurchase Invoice Item`
where item_code = %s and docstatus=1""", item_code)[0][0])
else:
self.average_buying_rate[item_code] = flt(frappe.db.sql("""select avg(valuation_rate)
from `tabStock Ledger Entry`
where item_code = %s and qty_after_transaction > 0""", item_code)[0][0])
average_buying_rate = get_incoming_rate(row)
if not average_buying_rate:
average_buying_rate = get_valuation_rate(item_code, row.warehouse,
row.parenttype, row.parent, allow_zero_rate=True,
currency=self.filters.currency)
self.average_buying_rate[item_code] = flt(average_buying_rate)
return self.average_buying_rate[item_code]
@@ -232,7 +239,7 @@ class GrossProfitGenerator(object):
select (a.base_rate / a.conversion_factor)
from `tabPurchase Invoice Item` a
where a.item_code = %s and a.docstatus=1
and modified <= %s
and modified <= %s
order by a.modified desc limit 1""", (item_code,self.filters.to_date))
else:
last_purchase_rate = frappe.db.sql("""
@@ -251,20 +258,31 @@ class GrossProfitGenerator(object):
if self.filters.to_date:
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, 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,
item.qty, item.base_net_rate, item.base_net_amount, item.name as "item_row",
sales.sales_person, sales.allocated_amount, sales.incentives
from `tabSales Invoice` si
inner join `tabSales Invoice Item` item on item.parent = si.name
left join `tabSales Team` sales on sales.parent = si.name
if self.filters.group_by=="Sales Person":
sales_person_cols = ", sales.sales_person, sales.allocated_amount, sales.incentives"
sales_team_table = "left join `tabSales Team` sales on sales.parent = `tabSales Invoice`.name"
else:
sales_person_cols = ""
sales_team_table = ""
self.si_list = frappe.db.sql("""select `tabSales Invoice Item`.parenttype, `tabSales Invoice Item`.parent,
`tabSales Invoice`.posting_date, `tabSales Invoice`.posting_time, `tabSales Invoice`.project, `tabSales Invoice`.update_stock,
`tabSales Invoice`.customer, `tabSales Invoice`.customer_group, `tabSales Invoice`.territory,
`tabSales Invoice Item`.item_code, `tabSales Invoice Item`.item_name, `tabSales Invoice Item`.description,
`tabSales Invoice Item`.warehouse, `tabSales Invoice Item`.item_group, `tabSales Invoice Item`.brand,
`tabSales Invoice Item`.dn_detail, `tabSales Invoice Item`.delivery_note, `tabSales Invoice Item`.stock_qty as qty,
`tabSales Invoice Item`.base_net_rate, `tabSales Invoice Item`.base_net_amount, `tabSales Invoice Item`.name as "item_row"
{sales_person_cols}
from
`tabSales Invoice`
inner join `tabSales Invoice Item` on `tabSales Invoice Item`.parent = `tabSales Invoice`.name
{sales_team_table}
where
si.docstatus = 1 and si.is_return != 1 %s
`tabSales Invoice`.docstatus = 1 and `tabSales Invoice`.is_return != 1 {conditions} {match_cond}
order by
si.posting_date desc, si.posting_time desc""" % (conditions,), self.filters, as_dict=1)
`tabSales Invoice`.posting_date desc, `tabSales Invoice`.posting_time desc"""
.format(conditions=conditions, sales_person_cols=sales_person_cols,
sales_team_table=sales_team_table, match_cond = get_match_cond('Sales Invoice')), self.filters, as_dict=1)
def load_stock_ledger_entries(self):
res = frappe.db.sql("""select item_code, voucher_type, voucher_no,

View File

@@ -2,16 +2,31 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-06-05 15:37:30",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:17.113416",
"modified": "2017-02-24 20:17:31.238117",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Item-wise Purchase Register",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Item-wise Purchase Register",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Purchase User"
},
{
"role": "Auditor"
},
{
"role": "Accounts Manager"
}
]
}

View File

@@ -2,16 +2,25 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-05-13 17:50:55",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"idx": 3,
"is_standard": "Yes",
"modified": "2014-06-03 07:18:17.123848",
"modified": "2017-02-24 20:17:17.638545",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Item-wise Sales Register",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Item-wise Sales Register",
"report_type": "Script Report"
"report_type": "Script Report",
"roles": [
{
"role": "Accounts Manager"
},
{
"role": "Accounts User"
}
]
}

View File

@@ -0,0 +1,38 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext import get_default_currency
from frappe.model.meta import get_field_precision
def get_ordered_to_be_billed_data(args):
doctype, party = args.get('doctype'), args.get('party')
child_tab = doctype + " Item"
precision = get_field_precision(frappe.get_meta(child_tab).get_field("billed_amt"),
currency=get_default_currency()) or 2
project_field = get_project_field(doctype, party)
return frappe.db.sql("""
Select
`{parent_tab}`.name, `{parent_tab}`.{date_field}, `{parent_tab}`.{party}, `{parent_tab}`.{party}_name,
{project_field}, `{child_tab}`.item_code, `{child_tab}`.base_amount,
(`{child_tab}`.billed_amt * ifnull(`{parent_tab}`.conversion_rate, 1)),
(`{child_tab}`.base_amount - (`{child_tab}`.billed_amt * ifnull(`{parent_tab}`.conversion_rate, 1))),
`{child_tab}`.item_name, `{child_tab}`.description, `{parent_tab}`.company
from
`{parent_tab}`, `{child_tab}`
where
`{parent_tab}`.name = `{child_tab}`.parent and `{parent_tab}`.docstatus = 1 and `{parent_tab}`.status != 'Closed'
and `{child_tab}`.amount > 0 and round(`{child_tab}`.billed_amt *
ifnull(`{parent_tab}`.conversion_rate, 1), {precision}) < `{child_tab}`.base_amount
order by
`{parent_tab}`.{order} {order_by}
""".format(parent_tab = 'tab' + doctype, child_tab = 'tab' + child_tab, precision= precision, party = party,
date_field = args.get('date'), project_field = project_field, order= args.get('order'), order_by = args.get('order_by')))
def get_project_field(doctype, party):
if party == "supplier": doctype = doctype + ' Item'
return "`tab%s`.project"%(doctype)

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.query_reports["Ordered Items To Be Billed"] = {
"filters": [
]
}

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