Compare commits

..

905 Commits

Author SHA1 Message Date
Pratik Vyas
54938d431c Merge branch 'develop' 2014-09-16 15:58:28 +05:30
Pratik Vyas
31c61e7eae bumped to version 4.4.0 2014-09-16 16:28:28 +06:00
Anand Doshi
a23151b138 Merge pull request #2202 from 81552433qqcom/develop
hotfix for project wise report and translation.
2014-09-16 15:23:34 +05:30
Anand Doshi
11b75759d2 Merge pull request #2194 from ankitjavalkarwork/stockbalreport
Update report with Valuation rate, stock values, move to Main report
2014-09-16 15:22:25 +05:30
Rushabh Mehta
a2c562fea4 Update CONTRIBUTING.md 2014-09-16 15:21:43 +05:30
Anand Doshi
8950abc36f Merge pull request #2197 from anandpdoshi/anand-september-15
[minor] removed Suggest
2014-09-16 15:18:57 +05:30
Anand Doshi
27c7226d97 Merge pull request #2201 from nabinhait/hotfix
Columns added in report and fixes in customer's account creation
2014-09-16 15:18:31 +05:30
81552433qqcom
1db294e837 hotfix for project wise report
translation patch for email digest and support ticket.
2014-09-16 16:49:58 +08:00
Nabin Hait
16e943f120 Removed link of item-wise last purchase rate from buying home page 2014-09-16 12:57:31 +05:30
Nabin Hait
9d610214cf Strip party name before checking for account 2014-09-16 12:28:40 +05:30
Nabin Hait
c25681c36c Added item group and brand in sales-person-wise transaction summary report 2014-09-16 12:28:40 +05:30
Nabin Hait
1aea75261d Merge pull request #2200 from nabinhait/hotfix
Minor fix
2014-09-16 11:28:15 +05:30
Nabin Hait
5cd20e3d24 Minor fix 2014-09-16 11:26:53 +05:30
Nabin Hait
9968c7ef70 Merge pull request #2199 from nabinhait/hotfix
Minor fix
2014-09-16 11:25:06 +05:30
Nabin Hait
ca260618d8 Minor fix 2014-09-16 11:24:25 +05:30
Anand Doshi
30c5b41398 [minor] removed Suggest 2014-09-15 16:43:34 +05:30
Anand Doshi
93c2adb2cd Merge pull request #2193 from anandpdoshi/anand-september-15
Recurring fix, cherry-picked nabin's address template fix
2014-09-15 13:04:12 +05:30
Anand Doshi
a92c6886cd Merge pull request #2173 from ankitjavalkarwork/fix2043
Add message on cancel in SI if C-Form exists, fix minor error, Add validation in C-Form
2014-09-15 12:56:51 +05:30
Anand Doshi
01d171756b [fix] before_recurring, set due_date, ageing_date as None, fixed account due date validation 2014-09-15 12:50:37 +05:30
Nabin Hait
65bef02607 Fixes in address template 2014-09-15 12:18:28 +05:30
Rushabh Mehta
cb9331ddca Merge pull request #2191 from 81552433qqcom/develop
#2190 hotfix, item page
2014-09-15 10:13:09 +05:30
81552433qqcom
ac0c3fb696 #2190 hotfix, item page 2014-09-15 10:21:36 +08:00
Anand Doshi
a844fb78bb Merge branch '81552433qqcom-master' into develop 2014-09-12 16:23:08 +05:30
81552433qqcom
6d02939256 changed indent. as well use tab instead of space. 2014-09-12 16:22:28 +05:30
81552433qqcom
e3b63f2d9c added __() for options that need label. 2014-09-12 16:07:12 +05:30
81552433qqcom
1c440b3b31 month options doesn't get translated. 2014-09-12 16:07:12 +05:30
81552433qqcom
c5a0ef8399 fix according to the suggestion. 2014-09-12 16:07:12 +05:30
81552433qqcom
951da0ca3d added translations to report py file. 2014-09-12 16:07:12 +05:30
81552433qqcom
351be9ca42 translations. 2014-09-12 16:07:11 +05:30
81552433qqcom
4bab0a2f54 various translation missed __() 2014-09-12 16:07:11 +05:30
Anand Doshi
97478b746d Merge pull request #2185 from anandpdoshi/ankit-payment-tool
Payment Tool
2014-09-12 15:53:03 +05:30
Anand Doshi
61a591944b [minor] ui/ux fixes in Payment Tool 2014-09-12 15:42:16 +05:30
Ankit Javalkar
8e7ca41817 Payment Tool #2106 2014-09-12 15:23:46 +05:30
Anand Doshi
84e08fd534 Merge pull request #2174 from neilLasrado/cost-of-production-cycle-magix
Cost of Production cycle
2014-09-12 14:45:19 +05:30
Anand Doshi
b0e56fa1b5 Merge pull request #2181 from nabinhait/hotfix
Report print format fixed for translated columns
2014-09-12 14:18:52 +05:30
Neil Trini Lasrado
e7c48ed3b0 bom operation inList view fix 2014-09-12 12:08:02 +05:30
Nabin Hait
c432270ca8 Report print format fixed for translated columns 2014-09-12 12:00:47 +05:30
Neil Trini Lasrado
6a7f75c3e3 Cost of Production cycle 2014-09-12 11:25:03 +05:30
Neil Trini Lasrado
e9882e12ba Cost of Production cycle 2014-09-12 11:25:03 +05:30
ankitjavalkarwork
3df10429db Add message on cancel in SI if C-Form exists, Add validation in C-Form, remove update_c_form 2014-09-11 16:58:18 +05:30
Anand Doshi
eee569bb20 Merge pull request #2177 from anandpdoshi/anand-september-11
[fix] transfer_qty in get_stock_and_rate
2014-09-11 16:47:59 +05:30
ankitjavalkarwork
2e07305616 Update report with Valuation rate, stock values, move to Main report 2014-09-11 16:47:19 +05:30
Anand Doshi
2f9c36a588 Merge pull request #2175 from ankitjavalkarwork/fix2153
[minor] Add Permission for additional roles to Customer, Supplier
2014-09-11 16:47:08 +05:30
Anand Doshi
907494c5d4 [fix] transfer_qty in get_stock_and_rate 2014-09-11 16:22:12 +05:30
Anand Doshi
4d2520ea53 Merge pull request #2176 from nabinhait/hotfix
Opening entry should not be considered in bank reconciliation statement
2014-09-11 15:21:24 +05:30
Nabin Hait
cece0c7ffe Opening entry should not be considered in bank reconciliation statement 2014-09-11 13:59:00 +05:30
ankitjavalkarwork
5e34383e25 [minor] Add Permission for additional roles to Customer, Supplier 2014-09-10 17:54:42 +05:30
Anand Doshi
8e39ee79b0 Merge pull request #2167 from anandpdoshi/anand-september-9
Set allow_on_submit for 'page_break', 'letter_head', 'select_print_heading', 'print_heading'. Fixes frappe/erpnext#1810
2014-09-10 15:24:52 +05:30
Anand Doshi
fc33d5a75b Set allow_on_submit for 'page_break', 'letter_head', 'select_print_heading', 'print_heading'. Fixes frappe/erpnext#1810 2014-09-09 15:25:43 +05:30
Pratik Vyas
6e566fb154 Merge branch 'develop' 2014-09-09 15:10:47 +05:30
Pratik Vyas
6675ce9036 bumped to version 4.3.0 2014-09-09 15:40:47 +06:00
Pratik Vyas
2cf75fcca2 change version in hooks.py 2014-09-09 15:10:18 +05:30
Anand Doshi
941f698daf Merge pull request #2165 from anandpdoshi/anand-september-9
Fix in web clear cache for Item, cheque printing format
2014-09-09 13:59:39 +05:30
Anand Doshi
48b3d1383f [minor] Cheque Printing Format 2014-09-09 12:59:16 +05:30
Anand Doshi
dc79334f1c [fix] Clear website cache for Item Group on saving Item 2014-09-09 12:35:15 +05:30
Anand Doshi
ab74a502e2 Merge pull request #2162 from nabinhait/hotfix
Get items in PO from material requests based on supplier
2014-09-09 12:07:27 +05:30
Nabin Hait
fa18e7c21f Merge pull request #2140 from nathando/patch-1
get_item_list does not [item qty=0]
2014-09-09 12:06:21 +05:30
Nabin Hait
ff7e9b6b22 Get items in PO from material requests based on supplier 2014-09-09 11:01:55 +05:30
Rushabh Mehta
00e93d1c1d Merge pull request #2159 from anandpdoshi/anand-september-8
[minor] Set in_list_view for Sales and Purchase item tables
2014-09-09 09:21:04 +05:30
Anand Doshi
45c9b1c065 [minor] Set in_list_view for Sales and Purchase item tables 2014-09-08 17:42:17 +05:30
Anand Doshi
dcfcd693c2 Merge pull request #2158 from rmehta/translated
transations-08-sep-2014
2014-09-08 15:30:15 +05:30
RM
7ab4ee1d79 transations-08-sep-2014 2014-09-08 09:28:34 +00:00
Nabin Hait
c017ed251d Merge pull request #2151 from ankitjavalkarwork/fix1999
Allow renaming for Sales Partner Doctype
2014-09-08 14:23:17 +05:30
Nabin Hait
34b94aff73 Merge pull request #2154 from anandpdoshi/anand-september-5
Setup Wizard: set corrected number format in system settings
2014-09-08 14:23:07 +05:30
Anand Doshi
65a5f85af5 Setup Wizard: set corrected number format in system settings 2014-09-05 17:27:25 +05:30
Anand Doshi
52a39a00d5 Merge pull request #2149 from anandpdoshi/anand-september-5
[fix] Validate Expense Approver
2014-09-05 15:24:24 +05:30
ankitjavalkarwork
ce9a9eeecc Allow renaming for Sales Partner Doctype 2014-09-05 14:58:21 +05:30
Nabin Hait
cbd433603d Merge pull request #2150 from nabinhait/hotfix
minor fixes
2014-09-05 14:57:02 +05:30
Nabin Hait
91fb661d12 minor fixes 2014-09-05 14:56:24 +05:30
Anand Doshi
0b74b6d98c [fix] Validate Expense Approver 2014-09-05 14:41:53 +05:30
Anand Doshi
d42326bf43 [hotfix] hooks - recurring order 2014-09-05 11:20:29 +05:30
Anand Doshi
4c93f35c2b Merge pull request #2145 from nabinhait/hotfix
Minor fixes
2014-09-04 15:38:00 +05:30
Nabin Hait
84f0cc6614 Dont show opening entries in Bank reconciliation 2014-09-04 15:21:46 +05:30
Nabin Hait
0f798dda15 Valuation rate for finished goods in repack entries 2014-09-04 15:21:46 +05:30
Nabin Hait
629e51a8e9 Search field fixed in stock entry 2014-09-04 15:21:46 +05:30
Anand Doshi
4211aa41a0 [hotfix] Product Search 'More' button 2014-09-04 15:16:13 +05:30
Anand Doshi
5893e143f4 Merge pull request #2143 from anandpdoshi/anand-septemper-3
[minor] id.csv
2014-09-04 15:00:41 +05:30
Anand Doshi
d91c4d3e00 [translations] German translations from a user 2014-09-03 21:39:05 +05:30
Anand Doshi
3d911eba6c [minor] id.csv 2014-09-03 17:33:33 +05:30
Nabin Hait
0c8e4335f9 Merge pull request #2142 from nabinhait/hotfix
removed test records for landed cost voucher
2014-09-03 14:30:50 +05:30
nathando
247e9ffc96 get_item_list does not [item qty=0]
- By using `if not d.qty:` it totally limits the chance of creating an empty Delivery Note 
- Should be changed to `if d.qty is None` 

Use case for empty DN: 
- Open a Delivery Note and tight to a specific Sales Order first without knowing the real qty at this point.
- Using barcode scanner to receive Sales Order to this DN (multiple times).
2014-09-03 15:03:31 +08:00
Pratik Vyas
3f4c3086df Remove frappe version pinning in requirements.txt 2014-09-03 10:35:13 +05:30
Nabin Hait
a84f3663dd removed test records for landed cost voucher 2014-09-02 23:11:06 +05:30
Nabin Hait
714b3ef7f8 Merge pull request #2139 from nabinhait/hotfix
Repost stock reconciliation and valuation rate in repack entry
2014-09-02 20:06:28 +05:30
Nabin Hait
96bdc5834c Get valuation rate in manufacturing/repack entry 2014-09-02 20:02:25 +05:30
Nabin Hait
3f4885e342 repost stock reconciliation 2014-09-02 20:02:24 +05:30
Nabin Hait
ee2bc92ab2 Merge pull request #2134 from nabinhait/hotfix
Stock reconciliation fixes
2014-09-02 20:01:57 +05:30
Pratik Vyas
144f06e381 Update patches.txt 2014-09-01 18:31:11 +05:30
Nabin Hait
7f3f2a0f0a Fixes in repost_stock utility 2014-09-01 18:16:24 +05:30
Nabin Hait
9e563e7b47 Stock reconciliation when valuation rate column is blank 2014-09-01 18:16:24 +05:30
Nabin Hait
12ce3eefca landed cost voucher added in module page 2014-09-01 18:16:24 +05:30
Anand Doshi
f395b7ce11 [hotfix] item grid rate visibility booboo 2014-09-01 17:26:00 +05:30
Anand Doshi
4228adfaa7 Merge pull request #2109 from ankitjavalkarwork/recurringorder2
Commonified Recurring for Sales Invoice and Sales Order
2014-09-01 16:34:12 +05:30
Anand Doshi
8ad474b910 Merge pull request #2122 from neilLasrado/print-templates-fix
[Cosmetics] Print Templates Layout Improved
2014-09-01 16:33:34 +05:30
ankitjavalkarwork
737d8e4d9f fix minor issue and set default value send as pdf 2014-09-01 16:22:56 +05:30
ankitjavalkarwork
aaac7c17b8 Fix minor errors, fix patch, call in hooks, move from account_controller to recurring_document 2014-09-01 16:22:56 +05:30
ankitjavalkarwork
28a975dd32 Add patch for field name change in SI, rename email template 2014-09-01 16:22:56 +05:30
ankitjavalkarwork
e60822b094 Add tests for Recurring Document, Sales Inv, Sales Order, fix minor errors 2014-09-01 16:20:59 +05:30
ankitjavalkarwork
ac085e0f59 Add manage_recurring_documents and path to hooks, fix minor issues 2014-09-01 16:20:59 +05:30
ankitjavalkarwork
e8331d40f3 Commonify Recurring Sales Order/Invoice 2014-09-01 16:20:59 +05:30
Rushabh Mehta
21b8d30c80 Merge pull request #2131 from anandpdoshi/anand-september-1
Hide Rate, Amount in Item Grid template based on permlevel
2014-09-01 12:52:45 +05:30
Anand Doshi
24989b90ba Hide Rate, Amount in Item Grid template based on permlevel 2014-09-01 12:38:09 +05:30
Nabin Hait
4f1bccb53d Merge pull request #2129 from anandpdoshi/anand-september-1
[patch] Set company's country
2014-09-01 11:11:19 +05:30
Anand Doshi
98eacdb785 [patch] Set company's country 2014-09-01 10:23:47 +05:30
Neil Trini Lasrado
8331ec7482 [cosmetics] Cheque Print format 2 2014-08-29 20:27:45 +05:30
Neil Trini Lasrado
d43752fc4f [cosmetics] Cheque Print format 1 2014-08-29 16:43:48 +05:30
Neil Trini Lasrado
bd03c8b28a Merge branch 'develop' of https://github.com/frappe/erpnext into print-templates-fix 2014-08-29 16:42:44 +05:30
Anand Doshi
d490933fce Merge pull request #2125 from anandpdoshi/anand-august-29
[fix] Maintenance Schedule, Incoming Rate
2014-08-29 16:38:03 +05:30
Neil Trini Lasrado
f65817d4c2 [cosmetics] payment receipt Print format 1 2014-08-29 16:31:57 +05:30
Anand Doshi
40a8ae2907 [fix] get incoming rate 2014-08-29 16:28:31 +05:30
Anand Doshi
12b98027ee [fix] Maintenance Scheduler periodicity validation 2014-08-29 16:11:11 +05:30
Neil Trini Lasrado
45a0ea9628 Merge branch 'develop' of https://github.com/frappe/erpnext into print-templates-fix 2014-08-29 15:48:42 +05:30
Anand Doshi
98ff85dea1 Merge pull request #2108 from neilLasrado/fix-issue-448
[Fix] Issue #448
2014-08-29 15:46:13 +05:30
Anand Doshi
0015157cba Merge pull request #2120 from nabinhait/hotfix
Fixes in BOM and maintenance schedule
2014-08-29 15:43:00 +05:30
Anand Doshi
f513531d3a Merge pull request #2114 from neilLasrado/credit-note-feature
[print-template] Credit Note Issue #31
2014-08-29 15:32:42 +05:30
Neil Trini Lasrado
4e16e9ed89 Refactored Credit Note Print Format 2014-08-29 13:20:58 +05:30
Anand Doshi
9f0ea97d85 [fix] get future vouchers query
[print-template] Credit Note Issue #31 2
2014-08-29 12:50:28 +05:30
Neil Trini Lasrado
7a435bb4f1 [print-template] Credit Note Issue #31 1 2014-08-29 12:50:28 +05:30
Neil Trini Lasrado
014346acba [print-template] Credit Note 2014-08-29 12:50:28 +05:30
Anand Doshi
c90773cc85 Merge pull request #2115 from anandpdoshi/user-permission-doctypes
HR permissions, translations
2014-08-29 11:55:51 +05:30
Nabin Hait
0514e07ef4 minor fix 2014-08-29 11:50:59 +05:30
Nabin Hait
14b8af2e65 Rounding issue fixed for bom quantity 2014-08-29 11:50:58 +05:30
Nabin Hait
818bacae49 Minor fix in maintenance schedule 2014-08-29 11:50:58 +05:30
Anand Doshi
6ba2e3deef Merge pull request #2118 from anandpdoshi/anand-august-28
[fix] default quotation list filter
2014-08-29 11:25:21 +05:30
Anand Doshi
bb370f3b6a HR - Leave Approver and Expense Approver fields changed to Link Fields, better default permissions 2014-08-29 11:19:10 +05:30
Anand Doshi
f680626f53 [minor] send translations in response 2014-08-29 11:19:10 +05:30
Neil Trini Lasrado
83ca3e5563 [Cosmetics] Print Templates Layout Improved 2014-08-28 14:48:16 +05:30
Anand Doshi
37cb544839 [fix] default quotation list filter 2014-08-28 11:27:18 +05:30
Nabin Hait
ec8964dde5 Merge pull request #2117 from anandpdoshi/anand-august-27
[fix] get future vouchers query
2014-08-28 10:43:35 +05:30
Anand Doshi
913c51b1f8 [fix] get future vouchers query 2014-08-27 22:09:15 +05:30
Neil Trini Lasrado
cd1efb94ed Merge branch 'develop' of https://github.com/frappe/erpnext into fix-issue-448 2014-08-27 18:49:03 +05:30
Neil Trini Lasrado
d6d71e8078 [fix] issue 448 final 1 2014-08-27 18:48:57 +05:30
Pratik Vyas
4cb67339c5 Merge pull request #2112 from anandpdoshi/anand-august-27
Enqueue Newsletter sending in Longjob Queue
2014-08-27 15:14:26 +05:30
Neil Trini Lasrado
4b71fe6fc1 Merge branch 'develop' of https://github.com/frappe/erpnext into fix-issue-448 2014-08-27 12:31:31 +05:30
Anand Doshi
46256cddd7 Enqueue Newsletter sending in Longjob Queue 2014-08-27 12:23:52 +05:30
Neil Trini Lasrado
ad24069cdc [fix] issue 448 final 2014-08-26 16:30:39 +05:30
Nabin Hait
3b1733bc04 minor fix in sales invoice test records 2014-08-26 16:30:39 +05:30
Anand Doshi
43f087c99d [hotfix] Supplier read permission for Purchase User
[Fix] Issue #448

[Fix] Issue #448 2
2014-08-26 16:30:39 +05:30
Nabin Hait
54ca95bc6e Merge pull request #2110 from nabinhait/hotfix
minor fix in sales invoice test records
2014-08-26 16:21:32 +05:30
Nabin Hait
e3f2323e14 minor fix in sales invoice test records 2014-08-26 16:20:38 +05:30
Anand Doshi
c147667486 [hotfix] Supplier read permission for Purchase User 2014-08-26 14:26:07 +05:30
Anand Doshi
5ed2c06eb5 Merge pull request #2089 from neilLasrado/item_group
Item group
2014-08-26 12:56:54 +05:30
Neil Trini Lasrado
9d1e8b61fe [Fix] Issue #980 final 2014-08-25 19:04:30 +05:30
Anand Doshi
e0ffe7a575 [hotfix] Product Search 2014-08-25 18:38:08 +05:30
Neil Trini Lasrado
d676491b6e Merge https://github.com/frappe/erpnext into item_group 2014-08-25 16:18:31 +05:30
Anand Doshi
580f447bbd Merge pull request #2100 from rmehta/aug-22
[cleanup] remove allow_attach
2014-08-25 16:07:50 +05:30
Rushabh Mehta
52f04da5f5 [style] default website 2014-08-25 15:17:20 +05:30
Nabin Hait
06927a20b2 Update repost_stock.py 2014-08-25 14:08:54 +05:30
Neil Trini Lasrado
caba531e89 [fix] issue#980 2014-08-25 13:22:15 +05:30
Rushabh Mehta
7a6ab91080 remove set_title_left 2014-08-25 13:04:22 +05:30
Rushabh Mehta
e8dd4160d4 [cleanup] remove allow_attach 2014-08-25 13:04:21 +05:30
Anand Doshi
bb6b58c271 Merge pull request #2074 from neilLasrado/purchase-invoice-fix
[fix] frappe/erpnext#1510
2014-08-25 12:51:16 +05:30
Anand Doshi
def374370f Merge pull request #2083 from geo-poland/basic-polish-language-support
Basic Polish language support
2014-08-25 12:48:33 +05:30
Nabin Hait
b748115609 Merge pull request #2101 from nabinhait/hotfix
Required raw materials qty in PP tool
2014-08-23 20:05:42 +05:30
Nabin Hait
a592a914b8 PP Tool: get query for sales order 2014-08-22 16:25:04 +05:30
Nabin Hait
1ae48f4988 Required raw materials qty in PP tool 2014-08-22 16:20:07 +05:30
Nabin Hait
bb29d15d5a Merge pull request #2099 from nabinhait/hotfix
Minor fixes
2014-08-22 15:26:38 +05:30
Nabin Hait
40e3d0c780 General ledger: debit/credit value rounding upto 3 decimals 2014-08-22 14:37:55 +05:30
Nabin Hait
00fc600e8b PP Tool: Raise material request based on projected qty in selected warehouse 2014-08-22 14:06:22 +05:30
Nabin Hait
f4ad37d208 Reset receiver list always on create receiver list button 2014-08-22 12:42:57 +05:30
Nabin Hait
79f91109cd Update pricing_rule.py 2014-08-21 19:21:25 +05:30
Nabin Hait
d67cbdf725 Merge pull request #2097 from nabinhait/hotfix
Escaped item group value in pricing rule condition
2014-08-21 19:19:34 +05:30
Nabin Hait
16aba71da0 Escaped item group value in pricing rule condition 2014-08-21 19:02:02 +05:30
Nabin Hait
9426522159 Merge pull request #2096 from nabinhait/hotfix
Fixex in payment reconciliation
2014-08-21 18:07:39 +05:30
Nabin Hait
8058832a48 Fixex in payment reconciliation 2014-08-21 18:06:35 +05:30
Nabin Hait
fa3f22c448 Merge pull request #2093 from nabinhait/hotfix
Packing list visibility and update status on communication
2014-08-21 17:34:58 +05:30
Nabin Hait
cabf9c5bee Minor fix in status updater 2014-08-21 16:44:32 +05:30
Nabin Hait
4417529952 Packing list visibility issue 2014-08-21 16:44:32 +05:30
Anand Doshi
bb3f192b07 Merge pull request #2091 from nabinhait/hotfix
Minor fixes
2014-08-21 12:42:40 +05:30
Nabin Hait
f71011aff0 Project query fixed 2014-08-21 11:34:31 +05:30
Nabin Hait
df5ab4e228 Minor fix in maintenance schedule 2014-08-21 11:32:39 +05:30
Neil Trini Lasrado
b02b59b8c8 Merge branch 'develop' of https://github.com/frappe/erpnext into purchase-invoice-fix 2014-08-20 14:57:24 +05:30
Rushabh Mehta
f29449ba07 Merge pull request #2086 from rmehta/route-redesign
Route redesign
2014-08-20 14:49:27 +05:30
Neil Trini Lasrado
bf4ceb981f Merge https://github.com/frappe/erpnext into purchase-invoice-fix 2014-08-20 14:39:22 +05:30
Neil Trini Lasrado
84e5a4a2c2 [fix-remarks-changed-issue#110] 2014-08-20 13:44:56 +05:30
Rushabh Mehta
ebd30beee4 [route] redesigned 2014-08-20 11:44:30 +05:30
Rushabh Mehta
cb067aa579 [route] refactor, wip 2014-08-20 11:44:30 +05:30
Rushabh Mehta
74bc2baa1d remove website route, wip 2014-08-20 11:43:58 +05:30
Tytus
f546ab3130 Add csv file with initial translations. 2014-08-19 15:53:08 +02:00
Tytus
35142cb206 Add Polish language to setup wizard. 2014-08-19 15:51:36 +02:00
Nabin Hait
13313b5cb6 Merge pull request #2082 from nabinhait/hotfix
Bank reconciliation statement: show amounts which has cleared in the ban...
2014-08-19 17:42:26 +05:30
Nabin Hait
432431f2e6 fix for translation 2014-08-19 16:49:44 +05:30
Anand Doshi
dd952146d1 Merge pull request #2081 from anandpdoshi/anand-august-19
[fix] Error Reports
2014-08-19 16:37:50 +05:30
Nabin Hait
237f3765e5 Bank reconciliation statement: show amounts which has cleared in the bank but not registered in the system 2014-08-19 16:29:31 +05:30
Anand Doshi
cca6460e65 [fix] Error Reports 2014-08-19 16:06:09 +05:30
Rushabh Mehta
354acf6fc9 Merge pull request #2076 from anandpdoshi/anand-august-19
[fix] Error Reports
2014-08-19 14:07:03 +05:30
Anand Doshi
7ce0609800 Merge pull request #2077 from nabinhait/hotfix
Precision issue in tax calculation
2014-08-19 13:43:23 +05:30
Nabin Hait
0a35effe49 Precision issue in tax calculation 2014-08-19 13:22:19 +05:30
Neil Trini Lasrado
95b395505f [new fix issue No #1510] 2014-08-19 13:12:33 +05:30
Neil Trini Lasrado
67e14a48b8 [fix issue No #1510] 2014-08-19 12:35:14 +05:30
Neil Trini Lasrado
2026148dbe [fix issue No #1510] 2014-08-19 12:22:45 +05:30
Anand Doshi
78b6366325 [fix] Error Reports 2014-08-19 12:20:48 +05:30
Neil Trini Lasrado
9c3535307f [fix] frappe/erpnext#1510 2014-08-19 10:41:34 +05:30
Rushabh Mehta
5e893ef8fd Merge pull request #2073 from anandpdoshi/anand-august-18
[fix] Leave Application Calendar - Fixes #2065
2014-08-18 22:11:28 +05:30
Anand Doshi
f72de95a38 [fix] SMS Center 2014-08-18 19:51:47 +05:30
Anand Doshi
6ab831b387 Allow Default Warehouse for Item, even if not a Stock Item 2014-08-18 19:04:19 +05:30
Anand Doshi
e4c434ab6f [fix] Leave Application Calendar 2014-08-18 17:04:04 +05:30
Pratik Vyas
1f3310e0d1 Merge pull request #2072 from nabinhait/hotfix
Multiple small fixes
2014-08-18 16:49:06 +05:30
Nabin Hait
c41a9480b8 Credit limit fixes 2014-08-18 15:40:36 +05:30
Nabin Hait
6394f5b1a9 minot fix in pro order 2014-08-18 15:40:36 +05:30
Nabin Hait
448c9b71c1 minot fix in material request 2014-08-18 15:40:36 +05:30
Nabin Hait
32a3a86a00 General ledger report: invalid account 2014-08-18 15:40:36 +05:30
Nabin Hait
dcce0c86ed Minimum ordered qty validation 2014-08-18 15:40:36 +05:30
Anand Doshi
f4b3d30312 Merge pull request #2071 from anandpdoshi/anand-august-18
[minor] Removed 'PIN: ' from default Address Template
2014-08-18 14:53:26 +05:30
Anand Doshi
62aa8fa4e7 [minor] Removed 'PIN: ' from default Address Template 2014-08-18 12:53:37 +05:30
Rushabh Mehta
e8a52d810f Merge pull request #2067 from dalwadani/develop
Improve Arabic translation
2014-08-18 09:54:12 +05:30
Dhaifallah Alwadani
5e27a759b7 Improve Arabic translation 2014-08-16 18:11:48 +01:00
Pratik Vyas
c0d31ce648 Merge pull request #2062 from nabinhait/hotfix
Hotfix
2014-08-15 11:06:44 +05:30
Anand Doshi
eb39435481 [hotfix] Allow on submit for Projected Qty 2014-08-14 18:08:19 +05:30
Nabin Hait
54498452b6 Stock entry minor fix 2014-08-14 15:49:44 +05:30
Nabin Hait
821aad5281 Sales/purchase return: fixes for qty validation 2014-08-14 15:15:14 +05:30
Nabin Hait
5145b1445b Fixes in production planning tool 2014-08-14 15:15:14 +05:30
Nabin Hait
e368091627 Fixes in Payment Reconciliation 2014-08-14 15:15:14 +05:30
Anand Doshi
d5a08ea449 Merge pull request #2055 from rmehta/aug-11
Timeline and Folds
2014-08-14 12:00:03 +05:30
Rushabh Mehta
c31a1eec5b [ux] fixes to timeline 2014-08-14 11:47:31 +05:30
Rushabh Mehta
0d0f5f6c25 [ux] fixes to timeline 2014-08-14 11:43:46 +05:30
Rushabh Mehta
ab8bde0149 [ux] added folds, show actual / projected qty in pos 2014-08-14 11:43:46 +05:30
Anand Doshi
cf8bb668b3 Merge pull request #2051 from anandpdoshi/anand-august-12
[logic] Email Digest - use transaction/posting date
2014-08-12 19:51:22 +05:30
Anand Doshi
f0075b9ce2 [fix] Opportunity communication listing 2014-08-12 15:20:39 +05:30
Anand Doshi
67d249eea9 [logic] Email Digest - use transaction/posting date 2014-08-12 12:45:23 +05:30
Anand Doshi
c7105a1a79 Merge branch 'nabinhait-landed_cost' into develop 2014-08-11 18:04:08 +05:30
Anand Doshi
f957cbd8ef [test] Purchase Receipt - update rejected serial no 2014-08-11 18:03:43 +05:30
Nabin Hait
5c0db8d05e Landed Cost voucher test case for serialized items 2014-08-11 16:28:29 +05:30
Nabin Hait
200e8d971f Landed Cost voucher test case for serialized items 2014-08-11 16:12:32 +05:30
Nabin Hait
a97e700371 Add rejected serial nos in Purchase Receipt if auto-created based on series 2014-08-11 16:12:32 +05:30
Nabin Hait
4e6c52dd24 Test case fixes 2014-08-11 16:12:32 +05:30
Nabin Hait
2b776e8c3a Landed cost voucher minor fixes 2014-08-11 16:12:32 +05:30
Nabin Hait
f3e1181ad9 Landed cost voucher fixes 2014-08-11 16:12:32 +05:30
nabinhait
9cbcf96aeb no copy property for landed cost voucher amount field 2014-08-11 16:12:32 +05:30
nabinhait
8ca3189f07 pr and pi gl entries 2014-08-11 16:12:31 +05:30
nabinhait
98e7dcfe2c landed cost voucher minor fix 2014-08-11 16:12:31 +05:30
nabinhait
cfd1b10980 Purchase receipt gl entries if there is warehouse without account 2014-08-11 16:12:31 +05:30
nabinhait
f807cda375 PR and PI gl entries fixes for landed cost 2014-08-11 16:12:31 +05:30
nabinhait
11594c7927 purchase receipt gl entries 2014-08-11 16:12:31 +05:30
nabinhait
509aa52efc minor fix 2014-08-11 16:12:31 +05:30
nabinhait
e2c3f7ab14 Added help in landed cost voucher 2014-08-11 16:12:31 +05:30
nabinhait
fe39442c48 Removed old landed cost wizard 2014-08-11 16:12:31 +05:30
nabinhait
b21b6598f1 Test case for landed cost voucher 2014-08-11 16:12:31 +05:30
nabinhait
5e1b0014c2 GL entries for sub-contracting and rejected qty 2014-08-11 16:12:31 +05:30
nabinhait
cc0692d714 landed cost fix 2014-08-11 16:12:31 +05:30
nabinhait
87f2401c1e Landed Cost on_submit and gl entries for PR 2014-08-11 16:12:31 +05:30
nabinhait
f6ea21c8ae landed cost voucher design changed #1921 2014-08-11 16:12:30 +05:30
nabinhait
4436157da1 Landed cost redesign initial commit #1921 2014-08-11 16:12:30 +05:30
Anand Doshi
b00a2422e4 [hotfix] Allow on Submit - Actual / Projected Qty for Packed Item 2014-08-11 15:54:20 +05:30
Anand Doshi
475b118fba Merge pull request #2050 from anandpdoshi/anand-august-11
Feed, Form Grid
2014-08-11 13:44:01 +05:30
Anand Doshi
42335fb2cb [minor] Allow on Submit - Actual / Projected Qty 2014-08-11 13:28:29 +05:30
Anand Doshi
15ec1e1860 Merge pull request #2049 from nabinhait/hotfix
Fixes in Order trends report
2014-08-11 12:48:16 +05:30
Anand Doshi
96964a4e03 [minor] Visible Columns' Label should show ellipsis on overflow 2014-08-11 12:28:32 +05:30
Anand Doshi
e4aaa3d18f [minor] Truncate comment in Feed to 240 chars 2014-08-11 12:27:47 +05:30
Nabin Hait
a6b597a0bd Fixes in Order trends report 2014-08-11 11:54:37 +05:30
Anand Doshi
52d1ea83a0 [hotfix] Stock Entry List 2014-08-11 09:16:59 +05:30
Anand Doshi
5d64f5abd4 [hotfix] Sales Order list 2014-08-09 14:54:52 +05:30
Anand Doshi
3e103ebffe [minor] ERPNext uses MariaDB 2014-08-08 17:36:25 +05:30
Rushabh Mehta
992bc448a2 Merge pull request #2045 from rmehta/fixes-aug-8
[fix] [pos] pos view only for draft docs
2014-08-08 17:30:12 +05:30
Rushabh Mehta
23607f91cd [fix] [pos] pos view only for draft docs 2014-08-08 17:29:16 +05:30
Anand Doshi
3a97739f83 Merge pull request #2042 from rmehta/pos-module
added icon for pos
2014-08-08 16:56:45 +05:30
Rushabh Mehta
e0ee6fe8cd Merge pull request #2044 from nabinhait/hotfix
PO-PI mapping: divisional loss issue fixed
2014-08-08 16:44:15 +05:30
Rushabh Mehta
a3f76fc14d Update sales_invoice.js 2014-08-08 16:43:21 +05:30
Nabin Hait
c85abbfeca PO-PI mapping: divisional loss issue fixed 2014-08-08 16:07:02 +05:30
Rushabh Mehta
139ec2a64f Update note_list.html 2014-08-08 15:47:56 +05:30
Rushabh Mehta
72e1719220 added icon for pos 2014-08-08 15:43:26 +05:30
Pratik Vyas
3de7757ba4 Update update_project_milestones.py 2014-08-08 14:49:53 +05:30
Anand Doshi
7c3fad63b1 Merge pull request #2040 from anandpdoshi/anand-august-8
[patch] Add currency Turkish Lira
2014-08-08 14:17:39 +05:30
Anand Doshi
6b8145a813 [patch] Add currency Turkish Lira 2014-08-08 14:05:01 +05:30
Nabin Hait
688a7a7329 Merge pull request #2039 from anandpdoshi/anand-august-8
[fix] Show Employee Name in Employee Birthday report
2014-08-08 13:21:36 +05:30
Anand Doshi
26201a5828 [fix] Show Employee Name in Employee Birthday report 2014-08-08 12:49:11 +05:30
Anand Doshi
6cd59537b6 Merge pull request #2037 from nabinhait/hotfix
Fixes in 'Received Items to be Billed' report
2014-08-08 12:45:56 +05:30
Anand Doshi
854f9895e4 Merge branch 'rmehta-microtemplate-fixes' into develop 2014-08-08 11:56:52 +05:30
Anand Doshi
4cc94df752 [tests] Fixed Test Records 2014-08-08 11:56:32 +05:30
Anand Doshi
03eadb74ab Fixes to microtemplate feature 2014-08-08 11:56:32 +05:30
Rushabh Mehta
7a4e739d6c templating for hr 2014-08-08 11:56:32 +05:30
Rushabh Mehta
a660464cec added for support 2014-08-08 11:56:32 +05:30
Rushabh Mehta
c9bd3f5d4a added templates for projects 2014-08-08 11:56:32 +05:30
Rushabh Mehta
873141c1a5 more updates to lists and started sane filters 2014-08-08 11:56:32 +05:30
Rushabh Mehta
8544447b19 added more listview templates 2014-08-08 11:56:32 +05:30
Rushabh Mehta
18eb4f5015 added listviews for sales, purchase 2014-08-08 11:56:31 +05:30
Rushabh Mehta
67af99794d start custom list rendering for Sales Order 2014-08-08 11:56:31 +05:30
Rushabh Mehta
b5e768906a built item grids for sales, purchase, stock 2014-08-08 11:56:31 +05:30
Anand Doshi
c13727adba Merge branch 'rmehta-primary-action-fixes' into develop 2014-08-08 11:55:37 +05:30
Anand Doshi
69ccf9695c [minor] primary action 2014-08-08 11:51:24 +05:30
Rushabh Mehta
995185d02d [ux] fixed primary action 2014-08-08 11:51:23 +05:30
Nabin Hait
f4de6e21fa Fixes in 'Received Items to be Billed' report 2014-08-08 11:23:59 +05:30
Nabin Hait
a6db05e18d Fixes in 'Received Items to be Billed' report 2014-08-08 11:02:06 +05:30
Nabin Hait
d91cefb23d Update fix_account_master_type.py 2014-08-07 19:22:02 +05:30
Anand Doshi
e7f7416190 Merge pull request #2035 from nabinhait/hotfix
Account master type patch and Stock RBNB Diff
2014-08-07 18:15:25 +05:30
Nabin Hait
67cd3fb89c Fixes in making credit note from Sales Return 2014-08-07 15:34:53 +05:30
Nabin Hait
849b7b172a minor fix 2014-08-07 15:13:52 +05:30
Nabin Hait
9a0c46fda7 Get Stock Rreceived But Not Billed Difference Amount 2014-08-07 15:10:05 +05:30
Nabin Hait
05b56d0d08 Fix account's master type 2014-08-07 15:03:41 +05:30
Anand Doshi
43ffa64849 Merge pull request #2030 from nabinhait/hotfix
Hotfix
2014-08-06 17:39:33 +05:30
Nabin Hait
7881df2138 minor fix 2014-08-06 17:29:07 +05:30
Nabin Hait
fd90571d49 fiscal year validation in financial statement 2014-08-06 17:25:23 +05:30
Nabin Hait
9f7e00bb3a Send salary slip mail after submit via Salary Manager 2014-08-06 17:25:23 +05:30
Nabin Hait
45b7d17ee8 Employee can be reselected but not changed in salary structure 2014-08-06 17:25:23 +05:30
Rushabh Mehta
859a995bd6 Merge pull request #2025 from anandpdoshi/anand-august-5
[test] Block Delivery Note if it is linked to a cancelled Sales Order
2014-08-05 14:44:38 +05:30
Anand Doshi
959bd6e9e7 [test] Block Delivery Note if it is linked to a cancelled Sales Order 2014-08-05 14:25:40 +05:30
Anand Doshi
9c47cae5c7 Merge pull request #2024 from anandpdoshi/anand-august-5
Print Fixes
2014-08-05 14:13:17 +05:30
Anand Doshi
f16fefafe3 [print] [fix] empty item grid issue 2014-08-05 13:57:29 +05:30
Anand Doshi
8d16e9fd6d [print] convert newlines to <br> based on fieldtype for Text/Small Text 2014-08-05 11:39:51 +05:30
Anand Doshi
2b8344e75c [print] [fix] when item grid is empty 2014-08-05 11:30:37 +05:30
Rushabh Mehta
a8755af0fa Merge pull request #2022 from nabinhait/hotfix
Fixes for customer / supplier renaming
2014-08-05 10:42:44 +05:30
Rushabh Mehta
ca70eaa388 Merge pull request #2019 from anandpdoshi/anand-august-1
Account Issues
2014-08-05 10:36:08 +05:30
Pratik Vyas
1271bc4457 [hotfix] [patch] remove missing patch 2014-08-05 06:54:11 +05:30
Nabin Hait
4d18b3f96d Fixes for standard print formats 2014-08-04 17:01:01 +05:30
Nabin Hait
1279f1d430 Fixes for customer / supplier renaming 2014-08-04 13:05:59 +05:30
Anand Doshi
e88b7fbcc4 Journal Voucher Detail: show Account Balance as Dr or Cr. Fixes #675 2014-08-01 16:56:32 +05:30
Anand Doshi
8c838061f9 [minor] Check account read permission for get_balance_on 2014-08-01 16:13:44 +05:30
Anand Doshi
6c608e04bc Fixes #699 - Cost Center mandatory 2014-08-01 16:04:35 +05:30
Anand Doshi
6e4efa7edd Merge pull request #2013 from anandpdoshi/anand-july-31
Fixes and Translations
2014-08-01 11:12:19 +05:30
Anand Doshi
a66ef778ec [translations] Added Turkish, Vietnamese. Updated rest of the translations. [frappe/erpnext#2012] 2014-08-01 00:06:42 +05:30
Anand Doshi
1b90207360 [minor] [fix] Serial No Servic Contract Expiry 2014-07-31 18:57:51 +05:30
Anand Doshi
3f28ac3205 Merge pull request #2010 from anandpdoshi/anand-july-31
[print] Labels and Total Taxes and Charges
2014-07-31 16:31:57 +05:30
Anand Doshi
29817d6d8b [print] Moved Total Taxes and Charges to the right column 2014-07-31 16:05:19 +05:30
Anand Doshi
92980e6882 Merge pull request #2009 from anandpdoshi/anand-july-31
Labels: Use Date instead of Posting Date
2014-07-31 15:07:11 +05:30
Anand Doshi
b4ad175b13 Merge pull request #2008 from pdvyas/print-format-patch-fix
[patch] remove reloading of removed print formats
2014-07-31 14:53:45 +05:30
Pratik Vyas
b91079676d [patch] remove reloading of removed print formats 2014-07-31 14:31:58 +05:30
Anand Doshi
fbe37c9158 Labels: Use Date instead of Posting Date 2014-07-31 14:31:25 +05:30
Pratik Vyas
1483e9d8d2 Merge pull request #2007 from nabinhait/hotfix
Activity: fix for timeline-wise display
2014-07-31 12:45:43 +05:30
nabinhait
8efd74b9b1 Activity: fix for timeline-wise display 2014-07-31 12:12:05 +05:30
Anand Doshi
c2371af779 Merge pull request #2001 from nabinhait/hotfix
Validation: Account must belong to the same company
2014-07-31 11:55:56 +05:30
nabinhait
8dbd295c9b bom operations on_delete_row function 2014-07-31 11:40:41 +05:30
nabinhait
d6ff58daa1 Minor fix in customer issue 2014-07-31 11:40:41 +05:30
nabinhait
4859b48c43 message fix 2014-07-31 11:40:41 +05:30
nabinhait
c34329284b Post gl entries only if there are atleast 2 distinct account head 2014-07-31 11:40:41 +05:30
nabinhait
0ad677045a Test record fixed for warehouse 2014-07-31 11:40:40 +05:30
nabinhait
c1f65dd863 Validation: Account must belong to the same company 2014-07-31 11:40:40 +05:30
Anand Doshi
b9fed3f046 Merge pull request #2004 from anandpdoshi/anand-july-30
[fixes] Leave Application and Toggle Rounded Totals
2014-07-30 17:40:01 +05:30
Anand Doshi
35cc320e21 [fixes] Leave Application and Toggle Rounded Totals 2014-07-30 17:00:26 +05:30
Pratik Vyas
5a5b405a18 Update .travis.yml 2014-07-30 16:49:05 +05:30
Pratik Vyas
cd4d6a228b Update .travis.yml 2014-07-30 16:42:39 +05:30
Anand Doshi
6c5e1c9701 Merge pull request #2003 from anandpdoshi/anand-july-30
Changed fieldtype of 'contact_email', 'contact_mobile' to Small Text
2014-07-30 14:10:16 +05:30
Anand Doshi
627f13ea26 Changed fieldtype of 'contact_email', 'contact_mobile' to Small Text 2014-07-30 13:09:01 +05:30
Anand Doshi
20fbfa2a44 [travis] 2014-07-30 11:50:05 +05:30
Anand Doshi
3f790eae55 [travis] 2014-07-29 23:42:30 +05:30
Anand Doshi
ddbf14adba Merge pull request #2002 from anandpdoshi/anand-july-29
[print] Hide Rate, Amount if Print Without Amount in Delivery Note
2014-07-29 23:38:24 +05:30
Anand Doshi
22608ad206 [travis] 2014-07-29 23:20:42 +05:30
Anand Doshi
60ee2ea8af [hotfix] Stock Entry search fields 2014-07-29 23:16:24 +05:30
Anand Doshi
bc708ee4c2 [print] Disable rounded total 2014-07-29 22:24:31 +05:30
Anand Doshi
0e93352c8d [print] Hide Rate, Amount if Print Without Amount in Delivery Note 2014-07-29 22:03:40 +05:30
Anand Doshi
a12312553b Merge pull request #1997 from nabinhait/hotfix
Fixes
2014-07-29 15:48:04 +05:30
nabinhait
78777e141a minor fix 2014-07-29 15:19:41 +05:30
Anand Doshi
9d9192d496 Merge pull request #2000 from anandpdoshi/anand-july-29
[print] Improvements to Item grid
2014-07-29 15:13:22 +05:30
Anand Doshi
ad1638e6b6 [print] Improvements to Item grid 2014-07-29 14:38:48 +05:30
nabinhait
0bab81aef9 minor fix in chart of accounts help message 2014-07-29 12:59:47 +05:30
nabinhait
92a1e06665 message fix 2014-07-29 12:46:56 +05:30
nabinhait
079611936f Delete Payment-to-invoice-matching-tool through patch 2014-07-29 12:12:09 +05:30
nabinhait
d4b92a1d20 Set ignore pricing rule while mapping SI to DN 2014-07-29 11:35:41 +05:30
nabinhait
7555d619f2 Message for frozen stock entries 2014-07-29 11:35:41 +05:30
Anand Doshi
bd748bd115 [hotfix] [patch] Delete old print formats 2014-07-29 08:51:41 +05:30
Anand Doshi
85eefadada [fix] [print] Print Hide Item Code 2014-07-28 21:17:20 +05:30
Anand Doshi
07d3261467 [hotfix] don't override default print format if specified in POS Sales Invoice 2014-07-28 19:55:13 +05:30
Anand Doshi
11586eda4c [minor] [fix] taxes print 2014-07-28 17:38:08 +05:30
Anand Doshi
423361946d Merge pull request #1996 from nabinhait/hotfix
Fixes
2014-07-28 16:56:11 +05:30
nabinhait
0a35277c96 Stock reconciliation only for valuation 2014-07-28 16:41:34 +05:30
nabinhait
16317748dd Issue fixes related to length of the report result 2014-07-28 16:41:34 +05:30
nabinhait
3d48a4ef65 Sales / purchase return: Get party details fix 2014-07-28 16:41:33 +05:30
nabinhait
b739264243 Don't run company trigger on amendment 2014-07-28 16:41:33 +05:30
nabinhait
957971eb1d Column added 'Reqd by Date' in po_items_to_be_billed report 2014-07-28 16:41:33 +05:30
Anand Doshi
e3c161f0ea Merge pull request #1995 from anandpdoshi/anand-july-28
[minor] apply pricing rule / price list only if item_code
2014-07-28 16:05:42 +05:30
Anand Doshi
39edcbc93b [minor] apply pricing rule / price list only if item_code 2014-07-28 16:00:19 +05:30
Anand Doshi
beb3e35153 Merge pull request #1989 from dalwadani/develop
Improve Arabic Translation
2014-07-28 15:46:22 +05:30
Anand Doshi
0416e59267 Merge pull request #1994 from anandpdoshi/anand-july-28
[minor] Show company name in General Ledger print
2014-07-28 15:44:07 +05:30
Anand Doshi
57f8dabf59 [minor] Show company name in General Ledger print 2014-07-28 15:28:44 +05:30
Anand Doshi
9ea4154b81 Merge pull request #1993 from anandpdoshi/anand-july-28
[minor] Fixed address listing
2014-07-28 14:21:29 +05:30
Anand Doshi
9c018fe984 [minor] Fixed address listing 2014-07-28 12:59:52 +05:30
Dhaifallah Alwadani
faeca7cf11 Improve Arabic Translation 2014-07-26 05:43:03 +03:00
Nabin Hait
f8b318aef1 Merge pull request #1987 from anandpdoshi/anand-july-25
[fix] Feed listing based on permissions
2014-07-25 15:08:30 +05:30
Anand Doshi
93e2defc96 [fix] Feed listing based on permissions 2014-07-25 14:57:37 +05:30
Anand Doshi
1c735365d0 Merge pull request #1986 from anandpdoshi/rmehta-print-formats
Print Formats (by Rushabh)
2014-07-25 13:58:18 +05:30
Anand Doshi
161f63d393 [travis] Install wkhtmltopdf 2014-07-25 13:36:47 +05:30
Anand Doshi
8f49cf7c03 [minor] fixed testcase 2014-07-25 13:02:29 +05:30
Anand Doshi
62b1cbf003 [impact] Limit available functions in jinja environment 2014-07-25 13:02:29 +05:30
Anand Doshi
a5437cdac1 Fixes for print 2014-07-25 13:02:28 +05:30
Anand Doshi
16deabef82 Format Qty 2014-07-25 13:02:28 +05:30
ankitjavalkarwork
82ec488b99 Payment Reconciliation Feature/Tool - Patch 2014-07-25 13:02:28 +05:30
Rushabh Mehta
781ddc3a25 added patch to remove old print formats 2014-07-25 13:02:28 +05:30
Rushabh Mehta
85ff3bcd04 updated pos invoice 2014-07-25 13:01:53 +05:30
Rushabh Mehta
5b51cc86a9 many fixes to print 2014-07-25 13:01:53 +05:30
Rushabh Mehta
d82352eacc item grid, added other printable fields in description 2014-07-25 13:01:53 +05:30
Rushabh Mehta
f84c240d1c cleanup for print format 2014-07-25 13:01:52 +05:30
Rushabh Mehta
28804bfb62 started sales order print format (new style) 2014-07-25 13:01:52 +05:30
Nabin Hait
5cf3a6bcd2 Merge pull request #1975 from anandpdoshi/anand-july-22
Trial Balance and Newsletter sending via Worker
2014-07-25 11:21:13 +05:30
Anand Doshi
329a8ef9a1 Merge pull request #1985 from ankitjavalkarwork/payrec
Remove Payment To Invoice Matching Tool
2014-07-24 18:57:46 +05:30
Anand Doshi
9e89dcf855 Merge pull request #1984 from nabinhait/hotfix
Fix for company in chart of accounts
2014-07-24 18:57:31 +05:30
ankitjavalkarwork
344dd3793a Merge branch 'develop' of https://github.com/frappe/erpnext into payrec 2014-07-24 15:15:12 +05:30
ankitjavalkarwork
d93f4c99e1 Remove Payment To Invoice Matching Tool 2014-07-24 15:14:36 +05:30
nabinhait
ffd57a0565 Fix for company in chart of accounts 2014-07-24 10:40:18 +05:30
Rushabh Mehta
92c043423e updated bench 2014-07-23 15:57:01 +05:30
Anand Doshi
d1a2ce2750 [minor] is_ajax check in newsletter 2014-07-23 12:51:17 +05:30
Rushabh Mehta
3c78ab5841 [email digest] [fix] [hot] only open to-do items 2014-07-23 10:19:31 +05:30
Anand Doshi
de85a3af15 Newsletter: Bulk Send via worker 2014-07-22 19:49:16 +05:30
Anand Doshi
cb86d597b7 Report: Trial Balance 2014-07-22 19:49:16 +05:30
Nabin Hait
9df4196597 Merge pull request #1970 from ankitjavalkarwork/payrec
Added Payment Reconciliation to list accounts.py
2014-07-22 18:24:58 +05:30
ankitjavalkarwork
87633d6be6 Payment Reconciliation Feature/Tool - Patch 2014-07-22 18:14:30 +05:30
Anand Doshi
33a94a74df Merge pull request #1968 from nabinhait/hotfix
Fixes
2014-07-22 17:39:07 +05:30
ankitjavalkarwork
b5ae643b6e Payment Reconciliation Feature/Tool - minor change 2014-07-22 15:26:04 +05:30
ankitjavalkarwork
b0cffac79d Payment Reconciliation Feature/Tool - add in module list 2014-07-22 15:02:59 +05:30
nabinhait
b5f9b5de45 PP Tool: data for required raw materials 2014-07-22 11:38:15 +05:30
nabinhait
c772b3d86a Purchase invoice: Copy project name from first row on addition of row 2014-07-22 11:38:14 +05:30
nabinhait
7d7123de37 Merge branch 'ankitjavalkarwork-wip_payrec' into develop 2014-07-21 19:23:20 +05:30
nabinhait
7f1e4a29c5 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2014-07-21 19:23:07 +05:30
nabinhait
97ab902895 payment reconciliation fixes 2014-07-21 19:22:02 +05:30
Anand Doshi
6e15f675a5 Merge pull request #1966 from anandpdoshi/anand-july-21
Stock Entry Warehouse prefill, Item autosuggest by description
2014-07-21 18:25:16 +05:30
Anand Doshi
67ecce695d [fix] Show against account in General Ledger Print Format 2014-07-21 18:13:05 +05:30
Anand Doshi
ac11d6ff97 Merge pull request #1964 from frappe/new-production-order-fix
[minor] fix server error for new production order if sales order is invalid
2014-07-21 18:05:06 +05:30
Anand Doshi
4c5d7617fb [minor] Update if missing, source and target warehouse in stock entry detail table, when they are specified in the form 2014-07-21 18:02:22 +05:30
Anand Doshi
7fcb3c9865 [minor] Item query - search by description 2014-07-21 17:51:32 +05:30
Pratik Vyas
994d9075b4 Change TRAVIS_BRANCH to develop 2014-07-21 17:36:50 +05:30
Pratik Vyas
649d18c4f7 [minor] fix server error for new production order if sales order is invalid 2014-07-21 17:17:59 +05:30
Nabin Hait
cbf0cb7de7 Merge pull request #1955 from anandpdoshi/financial-statements
Balance Sheet and Profit and Loss Statement
2014-07-21 16:44:46 +05:30
Anand Doshi
5f0459c321 Fixes to Financial Statements 2014-07-21 16:13:06 +05:30
nabinhait
2d355c7478 Merge branch 'wip_payrec' of github.com:ankitjavalkarwork/erpnext into ankitjavalkarwork-wip_payrec 2014-07-21 15:33:50 +05:30
ankitjavalkarwork
4dfe19e613 Merge branch 'develop' of https://github.com/frappe/erpnext into wip_payrec 2014-07-21 14:23:52 +05:30
Rushabh Mehta
1c6313679b Update material_request.js 2014-07-21 13:08:49 +05:30
Anand Doshi
f457bce0e7 Changed localize_date to formatdate 2014-07-21 12:03:04 +05:30
Anand Doshi
6cc5babd2e Use include directive to embed common print format 2014-07-21 11:43:19 +05:30
Anand Doshi
db4ba39824 Better handling of ignore zero values 2014-07-21 11:43:19 +05:30
Anand Doshi
825d014616 Commonfied code for Financial Statements and added Profit and Loss Statement 2014-07-21 11:43:18 +05:30
Anand Doshi
fa576a22e3 Balance Sheet 2014-07-21 11:43:18 +05:30
Anand Doshi
059f1e09a8 Balance Sheet - first cut 2014-07-21 11:43:18 +05:30
Anand Doshi
7a7675c7ef Merge pull request #1957 from nabinhait/hotfix
Hotfix
2014-07-19 18:17:52 +05:30
nabinhait
b1e7bf16ba Translate while creating India specific accounts 2014-07-19 17:56:43 +05:30
nabinhait
711e8bec3d Fixes overflow tolerance 2014-07-19 17:00:15 +05:30
nabinhait
b1c5738a67 Fixes overflow tolerance 2014-07-19 16:53:45 +05:30
ankitjavalkarwork
5283e5a7d8 Add Payment Reconciliation Feature/Tool - JS changes1 2014-07-18 15:54:29 +05:30
Anand Doshi
1a2516d4be Merge pull request #1953 from anandpdoshi/anand-july-18
Minor fix in reorder item
2014-07-18 10:32:14 +05:30
Anand Doshi
d141cf7293 Minor fix in reorder item 2014-07-18 10:31:34 +05:30
Anand Doshi
3c45c37428 Merge pull request #1952 from nabinhait/hotfix
Country mandatory in company master
2014-07-18 10:22:13 +05:30
nabinhait
d4e080be29 Country mandatory in company master 2014-07-17 19:32:12 +05:30
ankitjavalkarwork
84fd33ea7a Merge branch 'develop' of https://github.com/frappe/erpnext into wip_payrec 2014-07-17 19:11:07 +05:30
ankitjavalkarwork
87e30f68b9 Add Payment Reconciliation Feature/Tool - Complete 2014-07-17 19:10:45 +05:30
Anand Doshi
e8332be285 Merge pull request #1949 from anandpdoshi/anand-july-17
Fix in Stock Entry test case
2014-07-17 12:37:42 +05:30
Anand Doshi
e5df7a7f01 Merge pull request #1935 from nabinhait/hotfix
Default letter head in general ledger and bank reco statement print
2014-07-17 12:31:34 +05:30
Anand Doshi
fa0db761da Fix in Stock Entry test case 2014-07-17 12:30:55 +05:30
nabinhait
5f2f955224 From date and to date in general ledger print format 2014-07-17 12:29:56 +05:30
nabinhait
e26204e61d From date and to date in general ledger print format 2014-07-17 12:22:58 +05:30
nabinhait
fa1cd5faff Fixed root type of liability accounts 2014-07-17 11:52:50 +05:30
nabinhait
d16081c4d9 Batch no get query fix 2014-07-17 11:08:19 +05:30
nabinhait
143400d444 Batch no get query fix 2014-07-17 11:00:13 +05:30
nabinhait
96cb130263 Default letter head in general ledger and bank reco statement print 2014-07-17 10:56:07 +05:30
Nabin Hait
0a4c824a06 Merge pull request #1946 from anandpdoshi/anand-july-16
Fixes in load defaults of transaction.js
2014-07-16 20:04:37 +05:30
Anand Doshi
b8189d7d23 Auto Re-order Item for default warehouse only, if Warehouse wise re-order not specified 2014-07-16 19:24:53 +05:30
Anand Doshi
4b5e89a067 Fixes in Stock Entry test cases 2014-07-16 19:23:58 +05:30
Anand Doshi
f214bfcfc3 Fixes in load defaults of transaction.js 2014-07-16 17:53:02 +05:30
Rushabh Mehta
2e21e25613 Merge pull request #1945 from anandpdoshi/anand-july-16
Fixes in Stock Entry and test cases
2014-07-16 17:04:18 +05:30
Anand Doshi
d93fa2f78b Fixes in Stock Entry and test cases 2014-07-16 16:08:15 +05:30
Anand Doshi
75936cdde5 Merge pull request #1942 from anandpdoshi/anand-july-16
Fixes in Setup Wizard and Support Ticket
2014-07-16 13:17:50 +05:30
Anand Doshi
e73ed2afae Setup Wizard: fixed attachment issue #1940 2014-07-16 11:48:51 +05:30
Anand Doshi
c70d2d23a8 Support Ticket: set resolution_date as None if missing 2014-07-16 11:48:51 +05:30
ankitjavalkarwork
540a1eb6d9 Merge branch 'develop' of https://github.com/frappe/erpnext into wip_payrec 2014-07-15 18:02:08 +05:30
ankitjavalkarwork
d934cd105b Add Payment Reconciliation Feature/Tool - invoice entries table population 2014-07-15 18:01:36 +05:30
ankitjavalkarwork
ec05d7f8a1 Add Payment Reconciliation Feature/Tool - javascript validation 2014-07-14 18:28:10 +05:30
ankitjavalkarwork
345753ed19 Add Payment Reconciliation Feature/Tool - fetch unreconciled entries 2014-07-14 16:38:27 +05:30
Anand Doshi
c58e6c0dff Merge pull request #1932 from nabinhait/hotfix
Fixes
2014-07-14 14:28:05 +05:30
Anand Doshi
1829bd84d3 hotfix: website_image 2014-07-14 14:26:42 +05:30
nabinhait
7700c62fa8 Minor fix 2014-07-14 14:21:21 +05:30
Anand Doshi
8efbf5ef33 Merge pull request #1933 from anandpdoshi/anand-july-14
Fixed Address and Contact report name
2014-07-14 14:16:26 +05:30
Anand Doshi
e8c5cb8c9a Fixed Address and Contact report name 2014-07-14 13:10:24 +05:30
nabinhait
d5fd535909 Minor fix, if no default company 2014-07-14 12:39:50 +05:30
nabinhait
b0a8d000b1 Utility: reset serial no status and warehouse 2014-07-14 11:56:03 +05:30
nabinhait
5c38488590 Utility: reset serial no status and warehouse 2014-07-14 11:44:42 +05:30
nabinhait
614fb750b7 set qty as per stock uom in entire purchase cycle 2014-07-14 10:48:12 +05:30
nabinhait
e6cee7b41f Expense account can be liability account for stock reconciliation 2014-07-14 10:48:11 +05:30
ankitjavalkarwork
0e57b971ad Add Payment Reconciliation Feature/Tool - minor changes 2014-07-11 16:08:55 +05:30
ankitjavalkarwork
90b79fcd1f Add Payment Reconciliation Feature/Tool - minor changes 2014-07-11 15:23:26 +05:30
webnotes
9d31705f75 Merge https://github.com/frappe/erpnext into wip_payrec 2014-07-11 11:21:51 +05:30
webnotes
059922cef1 Add Payment Reconciliation Feature/Tool 2014-07-11 11:20:44 +05:30
Rushabh Mehta
8e4a9ba831 Merge pull request #1927 from anandpdoshi/anand-july-10
Bank Reconciliation Statement Print Format
2014-07-10 21:59:05 +05:30
Anand Doshi
9b7b9b2e93 Bank Reconciliation Statement Print Format 2014-07-10 18:45:03 +05:30
Rushabh Mehta
e0d7a6869c Merge pull request #1926 from anandpdoshi/anand-july-10
Production Planning Tool - Fixed bom get query
2014-07-10 17:37:34 +05:30
Anand Doshi
28c4bee0b1 Production Planning Tool - Fixed bom get query 2014-07-10 16:43:31 +05:30
Rushabh Mehta
052b5a68ed Merge pull request #1925 from nabinhait/hotfix
Overflow validation fixed
2014-07-10 15:46:08 +05:30
nabinhait
ee8b6f28b8 minor fix 2014-07-10 15:27:27 +05:30
nabinhait
d5fb5d91e9 overflow validation fixed 2014-07-10 15:27:27 +05:30
Anand Doshi
16658c14fe Merge pull request #1924 from anandpdoshi/anand-july-10
Print Hide other charges calculation
2014-07-10 13:09:39 +05:30
Anand Doshi
a96cf5b96b Print Hide other charges calculation 2014-07-10 12:16:39 +05:30
Anand Doshi
287fe0559e Merge pull request #1920 from anandpdoshi/anand-july-9
Fixes in queries
2014-07-09 13:39:51 +05:30
Anand Doshi
9006bba11e Merge pull request #1919 from nabinhait/hotfix
Github issue fixes
2014-07-09 13:39:38 +05:30
Anand Doshi
48d3b54e02 Fixes in queries 2014-07-09 13:15:03 +05:30
Anand Doshi
0c3bb75fd9 Added error_report_email in hooks 2014-07-09 12:59:56 +05:30
nabinhait
7e848b1924 Title mandatory in Note. Fixes #1913 2014-07-09 12:54:56 +05:30
nabinhait
8e4fcca216 Get query fixes in address in contact listing. Fixes #1911 2014-07-09 12:50:50 +05:30
nabinhait
fcfa42d992 Minor fixes #1917 2014-07-09 11:31:11 +05:30
nabinhait
5e0de79c0d Account validated in general ledger report. Fixed #1912 2014-07-09 11:10:40 +05:30
Anand Doshi
8adb211216 Fixed patch: erpnext/patches/v4_1/fix_delivery_and_billing_status.py 2014-07-09 11:09:53 +05:30
nabinhait
5eea6f1b6d Account validated in general ledger report. Fixed #1912 2014-07-09 11:08:59 +05:30
Rushabh Mehta
3f606b6c64 Update project.py 2014-07-09 09:27:02 +05:30
Rushabh Mehta
f31221d0d3 Changed raise Exception to frappe.throw 2014-07-09 09:13:00 +05:30
nabinhait
5220b462fd Merge branch 'anandpdoshi-reapply-price-list' into develop 2014-07-08 16:03:53 +05:30
nabinhait
89b5e3e2ea Set discount zero while fetching price list rate 2014-07-08 16:00:25 +05:30
nabinhait
ff2cc1626e Merge branch 'reapply-price-list' of github.com:anandpdoshi/erpnext into anandpdoshi-reapply-price-list 2014-07-08 15:30:25 +05:30
Anand Doshi
cf6d31cefc Sales Order: Fixed test case 2014-07-07 18:46:02 +05:30
Anand Doshi
46d64849b4 Merge pull request #1902 from nabinhait/hotfix
Run trigger of company field on onload function, even if company exists
2014-07-07 18:08:51 +05:30
nabinhait
6c40079139 Update delivery and billing status in SO 2014-07-07 18:02:53 +05:30
nabinhait
2c0c66e756 Update delivery and billing status in SO 2014-07-07 17:56:25 +05:30
nabinhait
bc408d8d0b Run trigger of company field on onload function, even if company exists 2014-07-07 17:56:24 +05:30
Anand Doshi
06cf2c7b51 Merge pull request #1903 from anandpdoshi/anand-july-7
Translations: Indonesian, Japanese and Russian
2014-07-07 17:44:04 +05:30
Anand Doshi
37f15ea664 Translations: Indonesian, Japanese and Russian 2014-07-07 17:26:51 +05:30
Anand Doshi
0da9060a80 Merge pull request #1900 from anandpdoshi/anand-july-7
Fix in Purchase Order and Re-order Item
2014-07-07 16:12:50 +05:30
Anand Doshi
e729516af7 Minor fix 2014-07-07 15:54:11 +05:30
Anand Doshi
4f0a42846c Catch FiscalYearError in Re-order Item 2014-07-07 15:21:18 +05:30
Anand Doshi
484b092720 BugFix in Purchase Order: Validate minimum order qty using Qty in Stock UOM 2014-07-07 14:03:26 +05:30
Rushabh Mehta
ada6e5a5c4 Merge pull request #1899 from anandpdoshi/anand-july-7
BugFix: Maintenance Visit against Customer Issue
2014-07-07 13:57:59 +05:30
Anand Doshi
2cf256c6d0 Merge pull request #1898 from rmehta/pdf-etc
sales order status bugfix, add leading / in website_image and removed se...
2014-07-07 13:09:22 +05:30
Rushabh Mehta
58692fe4d1 sales order status bugfix, add leading / in website_image and removed send_print_in_body_and_attachment 2014-07-07 12:29:43 +05:30
Anand Doshi
3a389788bf BugFix: Maintenance Visit against Customer Issue
+ Map Item details from Customer Issue into Maintenance Visit Purpose Table
+ Map Prev DocType and Prev DocName
+ Changed prevdoc_doctype and prevdoc_docname into Dynamic Link
2014-07-07 12:24:19 +05:30
Rushabh Mehta
47f26b0df4 Merge pull request #1896 from anandpdoshi/anand-july-7
BugFix: selling_controller.py
2014-07-07 11:50:54 +05:30
Anand Doshi
80a988c04f BugFix: selling_controller.py 2014-07-07 11:35:54 +05:30
Anand Doshi
51f722d20f Trigger Apply Price List on change of Currency Conversion Rate or Price List Currency Conversion Rate 2014-07-04 15:44:49 +05:30
Anand Doshi
dffec8fb85 Reapply Price List on Change 2014-07-04 15:44:48 +05:30
Anand Doshi
f9cae65df5 Merge pull request #1884 from nabinhait/hotfix
Hotfix
2014-07-04 15:31:15 +05:30
Rushabh Mehta
bcad536a90 Merge pull request #1883 from anandpdoshi/anand-july-3
Issues originating due to sql_mode='STRICT_ALL_TABLES'
2014-07-03 15:18:06 +05:30
Anand Doshi
d2f44006bd Issues originating due to sql_mode='STRICT_ALL_TABLES'
Fixes frappe/frappe-bench#18
2014-07-03 14:32:21 +05:30
nabinhait
23cce731ab Fixes in action, not defined if called from outside document class 2014-07-03 12:25:06 +05:30
Prakash Hodage
c01f4582de Description removed for default cost center 2014-07-03 10:50:35 +05:30
Rushabh Mehta
0e085e15bb Merge pull request #1881 from anandpdoshi/anand-wip
Fixes to end_of_life conditions
2014-07-02 18:16:54 +05:30
Anand Doshi
e673a664ac Fixes to end_of_life conditions 2014-07-02 18:15:01 +05:30
Anand Doshi
57f76e936a Merge pull request #1880 from rmehta/fixes-july-2
formatting fix in support ticket autoreply
2014-07-02 18:13:55 +05:30
Rushabh Mehta
501b2cc617 duplicate name fix for customer 2014-07-02 18:01:30 +05:30
Anand Doshi
843cdbe690 Merge pull request #1879 from anandpdoshi/anand-wip
Fixed Employee Birthday Report
2014-07-02 17:44:05 +05:30
Anand Doshi
df7f1c17ac Fixed Employee Birthday Report 2014-07-02 17:35:00 +05:30
Anand Doshi
1601742092 Merge pull request #1878 from anandpdoshi/anand-wip
Automatic Outstanding Writeoff
2014-07-02 17:17:29 +05:30
Rushabh Mehta
6084a3e63a formatting fix in support ticket autoreply 2014-07-02 17:13:08 +05:30
Anand Doshi
adfada707d Automatic Outstanding Writeoff 2014-07-02 17:10:46 +05:30
Anand Doshi
e8533d15b3 Hotfix: Get Balance query 2014-07-01 19:46:22 +05:30
Anand Doshi
67721444b9 Merge pull request #1875 from rmehta/develop
status_updater.py
2014-07-01 18:50:25 +05:30
Rushabh Mehta
5f42276dbd added patch for fixing sales order delivered qty 2014-07-01 18:42:59 +05:30
Rushabh Mehta
c53efc0d6c fix status_updater - update delivery status in Sales Order from Sales Invoice 2014-07-01 18:42:30 +05:30
Rushabh Mehta
ddd2648c1e fix travis, build website before tests 2014-07-01 18:42:30 +05:30
Rushabh Mehta
079e640b6b Merge pull request #1876 from anandpdoshi/anand-wip
Fix JV Remarks
2014-07-01 18:35:13 +05:30
Anand Doshi
bc71f737b8 Fix JV Remarks 2014-07-01 18:12:26 +05:30
Anand Doshi
c33ae0c7df Minor fix: commonified message. 2014-07-01 16:27:24 +05:30
Rushabh Mehta
e9f43251ab Update journal_voucher.py 2014-07-01 15:19:15 +05:30
Rushabh Mehta
bc920dd2a5 Merge pull request #1868 from anandpdoshi/anand-wip
Fix comments
2014-07-01 12:34:17 +05:30
Anand Doshi
9398932c47 Merge pull request #1869 from nabinhait/v4-hotfix
Minor fix in authorization rule
2014-06-30 18:47:42 +05:30
Anand Doshi
da8adea0a9 Fixed customer test 2014-06-30 17:28:52 +05:30
Nabin Hait
669e789bc3 Minor fix in authorization rule 2014-06-30 17:15:52 +05:30
Anand Doshi
02cb347ac7 Fix comments after naming series records rename 2014-06-30 17:05:51 +05:30
Anand Doshi
0e72a87613 Improved test_rename: check if comments are also moved on rename 2014-06-30 17:05:51 +05:30
Anand Doshi
8ac4643fd7 Merge pull request #1867 from nabinhait/v4-hotfix
Multiple fixes
2014-06-30 13:20:49 +05:30
Rushabh Mehta
578a6db659 Merge pull request #1866 from anandpdoshi/anand-wip
Fixed get_sender for Sales and Jobs
2014-06-30 12:33:10 +05:30
Anand Doshi
4aa2380de2 Fixed get_sender for Sales and Jobs 2014-06-30 12:19:22 +05:30
Anand Doshi
2adf73cca1 Fixed requirements.txt 2014-06-30 12:18:08 +05:30
Anand Doshi
27b0d16422 Bumped to v4.1.0 2014-06-30 12:09:41 +05:30
Anand Doshi
c459fe21f8 Merge pull request #1865 from frappe/wip-4.1
Wip 4.1
2014-06-30 12:00:55 +05:30
Nabin Hait
6c7cd70202 Pricing rule condition if item group missing 2014-06-30 11:50:17 +05:30
Nabin Hait
606c601fc0 Make debit/credit note from sales/purchase return 2014-06-30 11:50:17 +05:30
Nabin Hait
7c9652997b Item website specification from item group 2014-06-30 11:50:17 +05:30
Nabin Hait
4e4a83bcef Fixes in maintenance schedule 2014-06-30 11:50:17 +05:30
Anand Doshi
7cac2884ae Merge pull request #1862 from anandpdoshi/anand-wip-4.1
Fixes in Website Route system and other misc fixes
2014-06-30 11:30:30 +05:30
Anand Doshi
11ada53ed5 Fixes related to Website Route system and other misc fixes 2014-06-28 12:13:11 +05:30
Anand Doshi
5ba7ab0fed Outgoing Mail Footer patch 2014-06-27 21:00:51 +05:30
Anand Doshi
ebcb654649 Minor: General Ledger Report - print format improvements 2014-06-27 20:53:13 +05:30
Nabin Hait
a46af033b9 Merge pull request #1860 from nabinhait/v4-hotfix
item  query fixed in stock entry
2014-06-27 13:04:58 +05:30
Nabin Hait
a0a18d963d item query fixed in stock entry 2014-06-27 13:04:22 +05:30
Anand Doshi
4105f324f7 Merge pull request #1858 from nabinhait/v4-hotfix
with_doc issue fixes
2014-06-26 16:16:35 +05:30
Nabin Hait
b7e91ee95e with_doc issue fixes 2014-06-26 15:54:45 +05:30
Anand Doshi
f1af06c00d Merge remote-tracking branch 'frappe/develop' into wip-4.1 2014-06-26 15:05:42 +05:30
Anand Doshi
779111d781 Merge pull request #1856 from nabinhait/v4-hotfix
V4 hotfix
2014-06-26 15:03:59 +05:30
Nabin Hait
3e6586f58d minor fix 2014-06-26 14:56:47 +05:30
Nabin Hait
cf2632fe59 Fetch warehouse from pos settings 2014-06-26 13:05:10 +05:30
Anand Doshi
322f3caec6 Merge pull request #1854 from anandpdoshi/anand-wip-4.1
Changed System Signature to Footer
2014-06-26 12:59:08 +05:30
Anand Doshi
56198f40ac Changed System Signature to Footer 2014-06-26 12:47:45 +05:30
Nabin Hait
4a1c897b2d Select field options in serial no 2014-06-26 12:35:14 +05:30
Rushabh Mehta
2b62accee0 Merge pull request #1853 from anandpdoshi/anand-wip
Material Request: fixed series issue in insert_purchase_request
2014-06-26 12:31:17 +05:30
Rushabh Mehta
16e543e734 Merge pull request #1852 from anandpdoshi/anand-wip-4.1
Fixes frappe/erpnext#1849
2014-06-26 12:30:29 +05:30
Anand Doshi
1030af7b48 Material Request: fixed series issue in insert_purchase_request 2014-06-26 12:07:55 +05:30
Anand Doshi
7f41ff26fa Fixes frappe/erpnext#1849 2014-06-26 12:02:55 +05:30
Rushabh Mehta
994f0c3d49 Merge pull request #1851 from nabinhait/v4-hotfix
Show Frozen field in account to all if Frozen Account Modifier is not sp...
2014-06-26 10:59:27 +05:30
Nabin Hait
500e1bc9b5 Show Frozen field in account to all if Frozen Account Modifier is not specified in Accounts Settings 2014-06-26 10:53:32 +05:30
Nabin Hait
23152f68f2 Merge pull request #1845 from nabinhait/v4-hotfix
V4 hotfix
2014-06-25 19:16:05 +05:30
Nabin Hait
00778c9a1e Validate expense account for perpetual inventory 2014-06-25 19:12:24 +05:30
Nabin Hait
33a21ffbdc Minor fixes in recurring invoice 2014-06-25 18:35:36 +05:30
Anand Doshi
5263b1a9c1 Merge remote-tracking branch 'frappe/develop' into wip-4.1 2014-06-25 17:06:51 +05:30
Anand Doshi
3fc1088d73 Merge branch 'rmehta-wip-4.1' into wip-4.1 2014-06-25 17:04:37 +05:30
Anand Doshi
d12be12f72 Fixed gantt chart query for Task 2014-06-25 16:57:51 +05:30
Anand Doshi
fda8858fc3 Warehouse query filtered by company 2014-06-25 16:57:50 +05:30
Nabin Hait
29de86253f minor fixes 2014-06-25 16:57:50 +05:30
Nabin Hait
c7c89a5927 Cost center-wise net profit in financial analytics report 2014-06-25 16:57:50 +05:30
Nabin Hait
48f1142523 Fixed address deletion issue 2014-06-25 16:57:50 +05:30
Nabin Hait
9c2459658a Fixes for recurring invoice 2014-06-25 16:57:50 +05:30
Anand Doshi
ca37ff8b08 Fix in pricing rule patch 2014-06-25 16:57:50 +05:30
Nabin Hait
e6440a75b5 Allowed renaming for project 2014-06-25 16:57:50 +05:30
Nabin Hait
2b400dc2ad stock entry incoming rate based on precision 2014-06-25 16:57:49 +05:30
Nabin Hait
860b2e2bbb Fixes in pricing rule 2014-06-25 16:57:49 +05:30
Nabin Hait
f27fa5cbf3 Fixes in pricing rule 2014-06-25 16:57:49 +05:30
Nabin Hait
98bec6f96b Fixes in pricing rule 2014-06-25 16:57:49 +05:30
Nabin Hait
379d86f9a3 sms sending issue fixed 2014-06-25 16:57:49 +05:30
Anand Doshi
8b2dfcff29 Naming Series Property Setter Patch 2014-06-25 16:57:49 +05:30
Nabin Hait
b569930b2a Made warehouse and selling pricing list non-mandatory in pos setting 2014-06-25 16:57:48 +05:30
Nabin Hait
061c9744af Set status button in serial no 2014-06-25 16:57:48 +05:30
Nabin Hait
43616619ec Set status button in serial no 2014-06-25 16:57:48 +05:30
Nabin Hait
838aeb149f minor fix in sales invoice 2014-06-25 16:57:48 +05:30
Rushabh Mehta
37f809a1f4 fix end of life query for item 2014-06-25 16:57:48 +05:30
Rushabh Mehta
32303daf63 fixes to bom.js 2014-06-25 16:57:48 +05:30
Anand Doshi
d709f4dfdd Naming Series property type as Text 2014-06-25 16:57:47 +05:30
Nabin Hait
80142af9b8 Minor fixes 2014-06-25 16:57:47 +05:30
Nabin Hait
1b1b3a8fd6 validate pricing rule discount with item max discount 2014-06-25 16:57:47 +05:30
Nabin Hait
afffd656f6 Reload pricing rule in patch 2014-06-25 16:57:47 +05:30
Nabin Hait
4f6e31eb08 validate pricing rule discount with item max discount 2014-06-25 16:57:47 +05:30
Nabin Hait
9daca108b3 Pricing Rule fixes and improvements. Fixes #1795 2014-06-25 16:57:47 +05:30
Anand Doshi
de5e397fd4 Inventory Accounting: Cost Center only required for Expense Account 2014-06-25 16:57:46 +05:30
Anand Doshi
f5ec92c79a Validate Select field values 2014-06-25 16:57:46 +05:30
Anand Doshi
f654fea736 Fixed feed type options 2014-06-25 16:57:08 +05:30
Anand Doshi
daa56ca50f Fixed number format in currency 2014-06-25 16:57:08 +05:30
Anand Doshi
c20de7b264 Minor fix in Journal Voucher 2014-06-25 16:57:07 +05:30
Nabin Hait
c5e813f9f4 Overwrite from POS Settings if value exists 2014-06-25 16:57:07 +05:30
Nabin Hait
3b7dd0396f Get party details fixes 2014-06-25 16:57:07 +05:30
Nabin Hait
c226292d8e Stocvk entry incoming rate for sales return 2014-06-25 16:57:07 +05:30
Nabin Hait
216e5bb208 Incoming rate for sales return 2014-06-25 16:57:07 +05:30
Nabin Hait
afdc0a5f59 Valuation rate and amount for fg item 2014-06-25 16:57:07 +05:30
Anand Doshi
5a9e00ce71 Fixed Employee Leave Balance Report 2014-06-25 16:57:07 +05:30
Anand Doshi
ca3d60c160 Fixed Sales Order -> Delivery Note mapping of address fields 2014-06-25 16:57:06 +05:30
Anand Doshi
222b7b660e Stock Entry: get fg item incoming rate if bom is mentioned 2014-06-25 16:57:06 +05:30
Anand Doshi
a469954ef3 Revert "Stock Entry: get fg item incoming rate if bom is mentioned"
This reverts commit 297939325a.
2014-06-25 16:57:06 +05:30
Anand Doshi
be1d11f98d Travis: Install frappe of targetted branch
For example:
If pull request is for wip-4.1 branch of erpnext, install frappe with branch as wip-4.1
2014-06-25 16:57:05 +05:30
Anand Doshi
457515fc08 Stock Entry: get fg item incoming rate if bom is mentioned 2014-06-25 16:57:05 +05:30
Anand Doshi
e3ac8dd5a8 Don't set default for warehouse when creating serial no 2014-06-25 16:57:05 +05:30
Anand Doshi
14920b447c Fixed Currency Exchange error 2014-06-25 16:57:04 +05:30
Nabin Hait
0c6177dd9a Patch: update users report view settings for rename fields 2014-06-25 16:57:04 +05:30
Nabin Hait
cea571fc31 Fixes in fetching valuation rate in stock entry 2014-06-25 16:57:03 +05:30
Nabin Hait
d5a4c871f2 Field renamed in sms center 2014-06-25 16:57:02 +05:30
Nabin Hait
7c6c2e0ccf Do not make packing list after submission 2014-06-25 16:57:02 +05:30
Rushabh Mehta
476d1fb334 Update sms_center.json
changed total words to total characters
2014-06-25 16:57:01 +05:30
Rushabh Mehta
7ca3be57df Merge pull request #1844 from anandpdoshi/anand-wip
Serial No Validation in Stock Entry, Warehouse query fix
2014-06-25 16:05:17 +05:30
Anand Doshi
d1419edfd0 Merge remote-tracking branch 'frappe/develop' into wip-4.1 2014-06-25 15:25:48 +05:30
Anand Doshi
a740f750c7 Stock Entry: Serial No Mandatory when purpose in Material Transfer, Sales Return, Purchase Return 2014-06-25 13:31:02 +05:30
Anand Doshi
610a405c85 Fix in warehouse query 2014-06-25 13:30:26 +05:30
Rushabh Mehta
aa1edfb6ae Merge pull request #1842 from anandpdoshi/anand-wip
Warehouse query filtered by Company, Fixed Gantt Chart query for task
2014-06-25 10:18:35 +05:30
Anand Doshi
4864c9e96a Fixed gantt chart query for Task 2014-06-24 18:53:17 +05:30
Anand Doshi
faefeaa644 Warehouse query filtered by company 2014-06-24 18:53:04 +05:30
Anand Doshi
e0a7ff77df Merge pull request #1838 from nabinhait/v4-hotfix
Multiple fixes
2014-06-24 17:37:39 +05:30
Nabin Hait
60c48fee16 minor fixes 2014-06-24 17:34:52 +05:30
Anand Doshi
1ef3dbabfc Merge pull request #1837 from anandpdoshi/anand-wip
Fix in pricing rule patch
2014-06-24 17:11:29 +05:30
Nabin Hait
0b15755441 Cost center-wise net profit in financial analytics report 2014-06-24 17:02:45 +05:30
Nabin Hait
e9b95bbfe8 Fixed address deletion issue 2014-06-24 16:35:00 +05:30
Nabin Hait
d0bf91d639 Fixes for recurring invoice 2014-06-24 16:19:16 +05:30
Anand Doshi
a1be6021c4 Fix in pricing rule patch 2014-06-24 15:26:40 +05:30
Nabin Hait
21efc93e54 Allowed renaming for project 2014-06-24 12:44:49 +05:30
Nabin Hait
fdf38dab6f stock entry incoming rate based on precision 2014-06-24 12:42:36 +05:30
Rushabh Mehta
5dfacf2615 Merge pull request #1834 from nabinhait/v4-hotfix
Multiple fixes
2014-06-24 12:09:12 +05:30
Nabin Hait
613d784cfb Fixes in pricing rule 2014-06-24 12:07:56 +05:30
Nabin Hait
efd426650d Fixes in pricing rule 2014-06-24 11:11:08 +05:30
Nabin Hait
f62b75c731 Fixes in pricing rule 2014-06-24 11:00:13 +05:30
Nabin Hait
65efd0a9a1 sms sending issue fixed 2014-06-23 18:21:37 +05:30
Anand Doshi
f08881a2b7 Merge pull request #1831 from anandpdoshi/anand-wip
Naming Series Property Setter Patch
2014-06-23 18:15:01 +05:30
Anand Doshi
83da92fdcc Naming Series Property Setter Patch 2014-06-23 18:04:07 +05:30
Nabin Hait
16fa6472b3 Made warehouse and selling pricing list non-mandatory in pos setting 2014-06-23 16:42:36 +05:30
Anand Doshi
6781f62c70 Merge pull request #1828 from rmehta/develop
item query fix
2014-06-23 15:53:38 +05:30
Anand Doshi
a445c39901 Merge pull request #1829 from nabinhait/v4-hotfix
V4 hotfix
2014-06-23 15:52:54 +05:30
Nabin Hait
da490e3f53 Set status button in serial no 2014-06-23 15:51:03 +05:30
Nabin Hait
ccd2e2496c Merge pull request #1827 from anandpdoshi/anand-wip
Naming Series property type as Text
2014-06-23 15:44:29 +05:30
Nabin Hait
36da171a3d Set status button in serial no 2014-06-23 15:36:31 +05:30
Nabin Hait
e84f8b23aa minor fix in sales invoice 2014-06-23 15:36:30 +05:30
Rushabh Mehta
864d1ea87f fix end of life query for item 2014-06-23 12:20:39 +05:30
Rushabh Mehta
58ff651c6d fixes to bom.js 2014-06-23 12:20:39 +05:30
Anand Doshi
c027563b13 Merge pull request #1826 from nabinhait/v4-hotfix
V4 hotfix
2014-06-20 20:44:17 +05:30
Anand Doshi
f0a1735ac8 Naming Series property type as Text 2014-06-20 20:19:51 +05:30
Nabin Hait
56f6d01757 Minor fixes 2014-06-20 19:37:53 +05:30
Nabin Hait
3c946b2a72 validate pricing rule discount with item max discount 2014-06-20 19:07:44 +05:30
Nabin Hait
1d37698d4c Reload pricing rule in patch 2014-06-20 16:30:44 +05:30
Nabin Hait
be50c289f8 validate pricing rule discount with item max discount 2014-06-20 16:19:55 +05:30
Nabin Hait
444f956e7b Pricing Rule fixes and improvements. Fixes #1795 2014-06-20 16:00:45 +05:30
Rushabh Mehta
b35d84156f Merge pull request #1822 from anandpdoshi/anand-wip
Inventory Accounting: Cost Center only required for Expense Account
2014-06-20 11:24:45 +05:30
Anand Doshi
496123a646 Inventory Accounting: Cost Center only required for Expense Account 2014-06-19 19:25:19 +05:30
Anand Doshi
861747ec26 Merge remote-tracking branch 'frappe/develop' into wip-4.1 2014-06-19 17:44:33 +05:30
Anand Doshi
7bbaf0298e Merge pull request #1821 from nabinhait/v4-hotfix
Overwrite from POS Settings if value exists
2014-06-19 16:48:53 +05:30
Rushabh Mehta
a2f5a7f3cd Merge pull request #1820 from anandpdoshi/anand-wip
Validate Select Fields
2014-06-19 16:32:50 +05:30
Anand Doshi
a5cfc59d81 Validate Select field values 2014-06-19 16:05:08 +05:30
Anand Doshi
da342c7855 Fixed feed type options 2014-06-18 21:09:19 +05:30
Anand Doshi
aecddefbc8 Fixed number format in currency 2014-06-18 20:55:39 +05:30
Anand Doshi
fd05f458e1 Minor fix in Journal Voucher 2014-06-18 20:55:18 +05:30
Nabin Hait
faf176d78c Overwrite from POS Settings if value exists 2014-06-18 19:52:24 +05:30
Rushabh Mehta
151125e537 fixed for travis 2014-06-18 17:33:01 +05:30
Anand Doshi
64a0eb42ed Merge pull request #1816 from nabinhait/v4-hotfix
Stock Entry incoming rate
2014-06-18 17:32:04 +05:30
Nabin Hait
ba6cc2864a Merge pull request #1817 from anandpdoshi/anand-wip
Fixed Employee Leave Balance Report
2014-06-18 17:18:26 +05:30
Nabin Hait
4d7c4fc0f4 Get party details fixes 2014-06-18 16:40:59 +05:30
Nabin Hait
e7c2f74a07 Stocvk entry incoming rate for sales return 2014-06-18 16:40:59 +05:30
Nabin Hait
a7da6e1480 Incoming rate for sales return 2014-06-18 16:40:59 +05:30
Nabin Hait
ae0d753cad Valuation rate and amount for fg item 2014-06-18 16:40:59 +05:30
Anand Doshi
31c977b906 Fixed Employee Leave Balance Report 2014-06-18 16:26:45 +05:30
Nabin Hait
87179346d4 Merge pull request #1814 from anandpdoshi/anand-wip
Don't set warehouse when creating serial no, fixed currency exchange error message
2014-06-18 16:00:53 +05:30
Anand Doshi
d768afb80b Fixed Sales Order -> Delivery Note mapping of address fields 2014-06-18 15:23:25 +05:30
Anand Doshi
de12a0941f Stock Entry: get fg item incoming rate if bom is mentioned 2014-06-18 14:05:29 +05:30
Anand Doshi
987a28fc6a Revert "Stock Entry: get fg item incoming rate if bom is mentioned"
This reverts commit 297939325a.
2014-06-18 14:05:08 +05:30
Anand Doshi
c5dbf0f8ad Travis: Install frappe of targetted branch
For example:
If pull request is for wip-4.1 branch of erpnext, install frappe with branch as wip-4.1
2014-06-18 13:35:37 +05:30
Anand Doshi
297939325a Stock Entry: get fg item incoming rate if bom is mentioned 2014-06-18 13:10:10 +05:30
Anand Doshi
2f800521cb Don't set default for warehouse when creating serial no 2014-06-18 12:48:46 +05:30
Anand Doshi
72a178a37e Fixed Currency Exchange error 2014-06-18 12:14:17 +05:30
Anand Doshi
8c7b4549ed Merge pull request #1812 from nabinhait/v4-hotfix
Multiple fixes
2014-06-18 10:59:05 +05:30
Nabin Hait
91090042d1 Patch: update users report view settings for rename fields 2014-06-18 10:29:53 +05:30
Nabin Hait
0693937c1e Fixes in fetching valuation rate in stock entry 2014-06-18 10:20:01 +05:30
Nabin Hait
ac1a4ed576 Field renamed in sms center 2014-06-18 10:20:01 +05:30
Nabin Hait
b73d3f925d Do not make packing list after submission 2014-06-18 10:18:50 +05:30
Rushabh Mehta
69641ddc36 Update sms_center.json
changed total words to total characters
2014-06-18 09:04:09 +05:30
Rushabh Mehta
36881807ed Merge branch 'wip-4.2' into wip-4.1 2014-06-17 17:36:22 +05:30
Rushabh Mehta
1a18b427a8 make font size smaller for erpnext powered 2014-06-17 16:54:55 +05:30
Rushabh Mehta
69ce97b80a added print format for general ledger 2014-06-17 16:54:55 +05:30
Rushabh Mehta
9f887b436c fixes new routing, for frappe/frappe#600 2014-06-17 16:53:44 +05:30
Anand Doshi
5780163fb7 Merge remote-tracking branch 'frappe/develop' into wip-4.1 2014-06-17 14:58:18 +05:30
Anand Doshi
1c5fb9495e Merge pull request #1806 from nabinhait/v4-hotfix
Fixes
2014-06-17 14:54:44 +05:30
Rushabh Mehta
5df521bad5 updated generators for wip-4.2 2014-06-17 14:21:26 +05:30
Nabin Hait
be75d0265b Merge pull request #1805 from anandpdoshi/anand-wip
Sales Invoice List: show percent paid as 100% if grand total is 0
2014-06-17 14:12:26 +05:30
Anand Doshi
b20de6a3ec Sales Invoice List: show percent paid as 100% if grand total is 0 2014-06-17 13:58:06 +05:30
Nabin Hait
4ee8704b99 Fixes in financial analytics 2014-06-17 13:52:03 +05:30
Nabin Hait
d2e8a0a96a Delivery note update after submission 2014-06-17 12:55:52 +05:30
Anand Doshi
ff367c7b31 Merge pull request #1798 from nabinhait/v4-hotfix
Account common get_query
2014-06-16 16:04:32 +05:30
Nabin Hait
98d9d797fd Tax category validation ignored in material request 2014-06-16 15:54:05 +05:30
Nabin Hait
a6fc3f6337 Ignore pricing rule for material request 2014-06-16 15:34:52 +05:30
Nabin Hait
539f352318 Delivery note to packing slip mapping 2014-06-16 15:03:36 +05:30
Nabin Hait
e1b2b3e995 Account common get_query 2014-06-16 15:03:36 +05:30
Rushabh Mehta
3b7bcf0f4f make font size smaller for erpnext powered 2014-06-16 14:21:37 +05:30
Rushabh Mehta
03ae32d937 added print format for general ledger 2014-06-16 14:21:37 +05:30
Anand Doshi
ccf370f813 Fixed item query 2014-06-16 13:50:11 +05:30
Anand Doshi
0521814dea Fixed item query 2014-06-16 13:25:20 +05:30
Anand Doshi
e35841a2ea Reload Shopping Cart Settings in create price list patch 2014-06-16 12:59:54 +05:30
Anand Doshi
3474c273a5 Ignore mandatory in employee patch 2014-06-16 12:14:21 +05:30
Anand Doshi
3dc722b096 Create price list only if setup complete 2014-06-13 15:30:38 +05:30
Rushabh Mehta
5002a6467d Merge pull request #1793 from anandpdoshi/anand-wip
Create price list if missing
2014-06-13 13:20:46 +05:30
Anand Doshi
c1bfb63d96 Create price list if missing 2014-06-13 12:41:08 +05:30
Anand Doshi
27e295a4cb Merge pull request #1789 from nabinhait/v4-hotfix
V4 hotfix
2014-06-12 15:39:58 +05:30
Rushabh Mehta
99703a95c2 Merge pull request #1790 from anandpdoshi/wip-anand
Fixes split email settings, removed clear custom buttons, pos view switch
2014-06-12 15:25:03 +05:30
Nabin Hait
f2202fc014 minor fix 2014-06-12 15:20:47 +05:30
Anand Doshi
3761ff3522 Fix in patch: split email settings 2014-06-12 15:00:52 +05:30
Anand Doshi
205438669a Removed clear_custom_buttons, pos view switch fix 2014-06-12 15:00:51 +05:30
Nabin Hait
e7f2d3179d update other_charges in custom print formats 2014-06-12 14:58:09 +05:30
Anand Doshi
277f4a1bfe Removed clear_custom_buttons, pos view switch fix 2014-06-12 12:59:23 +05:30
Nabin Hait
46dc3b1442 validations added in stock entry 2014-06-12 12:48:28 +05:30
Nabin Hait
2128c98c35 available qty validation. Fixes #1045 2014-06-12 12:42:22 +05:30
Nabin Hait
e98b326ba3 Stock Entry: Always set valuation rate automatically if source warehouse provided or sales return. Fixes #932 2014-06-12 12:25:23 +05:30
Rushabh Mehta
7bcd31bddb Merge pull request #1785 from rmehta/develop
minor fix for outgoing communication email
2014-06-12 10:32:21 +05:30
Rushabh Mehta
6def968c3c minor fix for outgoing communication email 2014-06-12 10:31:43 +05:30
Nabin Hait
f2ee3cec19 Merge pull request #1784 from nabinhait/v4-hotfix
Minor fixes in salary manager. Fixes #1754
2014-06-12 10:19:27 +05:30
Nabin Hait
589a298096 Minor fixes in salary manager. Fixes #1754 2014-06-11 13:00:31 +05:30
Rushabh Mehta
94c17bdf85 Update CONTRIBUTING.md 2014-06-11 10:45:57 +05:30
Anand Doshi
fdfea0c17b Fixed Recurring Sales Invoice 2014-06-10 17:54:04 +05:30
Anand Doshi
862fe60368 Minor fix in newsletter 2014-06-10 17:15:50 +05:30
Nabin Hait
6a3e97a9f8 Merge pull request #1781 from anandpdoshi/hotfix
Reload sales taxes and charges in patch
2014-06-10 16:37:59 +05:30
Anand Doshi
7656377f3f Show website route for generator via set_intro, fix in Support Email Settings 2014-06-10 15:48:37 +05:30
Anand Doshi
82029be6f9 Reload sales taxes and charges in patch 2014-06-10 14:52:49 +05:30
Anand Doshi
339f75eb53 Merge pull request #1780 from nabinhait/v4-hotfix
minor fix in global defaults
2014-06-10 14:36:29 +05:30
Nabin Hait
7425634692 minor fix in global defaults 2014-06-10 14:12:28 +05:30
Anand Doshi
38d5407ea1 Merge pull request #1779 from nabinhait/v4-hotfix
Fixes
2014-06-10 11:40:26 +05:30
Nabin Hait
6febfca5a6 changed insert after for india related custom fields 2014-06-10 11:21:38 +05:30
Nabin Hait
7cba72a0b7 Pricing Rule: price / discount percentage can not be negative 2014-06-10 11:09:21 +05:30
Anand Doshi
fb6c003c97 Merge pull request #1778 from nabinhait/v4-hotfix
update custom print formats for renamed fields
2014-06-10 10:43:51 +05:30
Nabin Hait
91016ba989 update custom print formats for renamed fields 2014-06-10 10:41:37 +05:30
Nabin Hait
2aaf1de7fe Merge pull request #1777 from anandpdoshi/hotfix
Default Letterhead, Item wise Price List Rate
2014-06-09 18:52:28 +05:30
Anand Doshi
b527e54809 Fixed report: Item wise Price List Rate 2014-06-09 18:08:46 +05:30
Anand Doshi
c01db5fe9c Save default letterhead 2014-06-09 18:01:14 +05:30
Anand Doshi
534ebde638 Merge pull request #1775 from nabinhait/v4-hotfix
create custom fields for india specific fields
2014-06-09 16:23:21 +05:30
Nabin Hait
d532d2f64f create custom fields for india specific fields 2014-06-09 16:00:49 +05:30
Nabin Hait
7bcd69e157 Merge pull request #1774 from anandpdoshi/hotfix
Also save Global Defaults in System Settings patch
2014-06-09 15:52:03 +05:30
Anand Doshi
af63d053b1 Also save Global Defaults in System Settings patch 2014-06-09 15:51:12 +05:30
Nabin Hait
d9ff118b40 Merge pull request #1771 from anandpdoshi/hotfix
Fix in HR patch
2014-06-09 15:33:14 +05:30
Anand Doshi
be3f914acd Fixed add address template 2014-06-09 15:18:45 +05:30
Anand Doshi
edb9efd9a6 Fixed manifest and website 2014-06-09 15:11:18 +05:30
Anand Doshi
cdfa9a371d Export perm for GL Entry and Stock Ledger Entry 2014-06-09 15:11:17 +05:30
Anand Doshi
390efdc884 Fix in HR patch 2014-06-09 15:04:00 +05:30
Anand Doshi
ac276a27b7 Merge pull request #1772 from nabinhait/v4-hotfix
Update tax amount after discount in existing documents
2014-06-09 14:04:15 +05:30
Nabin Hait
b63e99eb43 Update tax amount after discount in existing documents 2014-06-09 12:49:09 +05:30
Anand Doshi
00976cfe47 Merge pull request #1768 from anandpdoshi/hotfix
Fixed HR patch
2014-06-06 22:11:39 +05:30
Anand Doshi
6f561aa846 Fixed HR patch 2014-06-06 22:10:18 +05:30
Anand Doshi
276386c94a Merge pull request #1765 from anandpdoshi/hotfix
Fixed Purchase Receipt qty trigger
2014-06-06 20:39:52 +05:30
Anand Doshi
0aa125304d Fixed Reset Permissions patch 2014-06-06 20:39:21 +05:30
Anand Doshi
482d29dc53 Fixed Purchase Receipt qty trigger 2014-06-06 20:34:08 +05:30
Anand Doshi
cd0aed993a Fixed Address Template Patch 2014-06-06 17:37:31 +05:30
Anand Doshi
f56656f6b4 Merge pull request #1763 from anandpdoshi/hotfix
Fixed address template and changed case
2014-06-06 17:20:57 +05:30
Anand Doshi
fc601659f5 Fixed Address Template 2014-06-06 17:07:50 +05:30
Anand Doshi
4a069a1e7f Changed case in modules.txt 2014-06-06 16:28:03 +05:30
Anand Doshi
04badf7e6e Hotfix: module name case for HR 2014-06-06 15:29:55 +05:30
Rushabh Mehta
0b31a163a3 Merge pull request #1761 from anandpdoshi/hotfix
Improved FIscal Year Error Messages, Reset Permissions for some DocTypes
2014-06-06 15:20:07 +05:30
Anand Doshi
171c00cfd6 Reload permissions for master and setting documents 2014-06-06 15:13:20 +05:30
Anand Doshi
b5cefa92fa Improved Fiscal Year validation messages 2014-06-06 15:10:00 +05:30
Anand Doshi
8cead48342 Merge pull request #1756 from rmehta/develop
removed sms control and related cleanup, fixes frappe/erpnext#462
2014-06-06 14:52:22 +05:30
Rushabh Mehta
1989e4fca0 Merge pull request #1755 from nabinhait/v4-hotfix
Fixes in trends report
2014-06-06 12:49:34 +05:30
Rushabh Mehta
880b3ef6c0 added qty updating option multi-item selector 2014-06-06 11:45:30 +05:30
Anand Doshi
2ec93590e4 Minor fix in address template 2014-06-06 11:45:30 +05:30
Anand Doshi
5fe69fb556 Fixes 2014-06-06 11:45:29 +05:30
Anand Doshi
290ed09dc6 Update new_address_template.py 2014-06-06 11:45:29 +05:30
Anand Doshi
65018daebc Minor fix in address template 2014-06-05 18:33:26 +05:30
Rushabh Mehta
0739937fa2 bug: added empty class for sms settings 2014-06-05 18:15:00 +05:30
Anand Doshi
ede8ea52b0 Fixes 2014-06-05 18:06:20 +05:30
Rushabh Mehta
ba83e9cfbe removed sms control and related cleanup, fixes frappe/erpnext#462 2014-06-05 17:56:42 +05:30
Nabin Hait
977331806b Set missing values only in unsubmitted documents 2014-06-05 17:55:00 +05:30
Nabin Hait
86207afe15 Set missing values only in unsubmitted documents 2014-06-05 17:55:00 +05:30
Nabin Hait
704a453b7a Set missing values only in unsubmitted documents 2014-06-05 17:55:00 +05:30
Nabin Hait
b7438894f6 Fixes in trends report 2014-06-05 17:55:00 +05:30
Anand Doshi
4022586015 Update new_address_template.py 2014-06-05 17:34:59 +05:30
Anand Doshi
26fcef69c7 Merge pull request #1753 from rmehta/develop
Address Template
2014-06-05 16:28:10 +05:30
Rushabh Mehta
5036706f81 removed address_title from address and removed test 2014-06-05 16:16:13 +05:30
Rushabh Mehta
c02fbd22fa removed address_title from address and removed test 2014-06-05 16:16:13 +05:30
Rushabh Mehta
33020a63b8 patch for address template fixes #1749 2014-06-05 16:16:13 +05:30
Rushabh Mehta
eaa2e55d20 patch for address template fixes #1749 2014-06-05 16:16:13 +05:30
Rushabh Mehta
c22e11d483 added address template: 2014-06-05 16:01:55 +05:30
Rushabh Mehta
41471c3b44 fixed description in salary manager 2014-06-05 16:01:55 +05:30
Anand Doshi
17e7538937 Merge pull request #1746 from nabinhait/v4-hotfix
Multiple issues
2014-06-05 15:27:57 +05:30
Nabin Hait
c8be8ba42c function renamed 2014-06-05 15:18:10 +05:30
Nabin Hait
4d4df03f88 Added total debit / credit row in trial balance. Fixes #1313 2014-06-04 19:00:57 +05:30
Nabin Hait
deb6e06336 minor fix 2014-06-04 19:00:56 +05:30
Nabin Hait
c3d1d6a946 cleanup raw materials supplied table for sub-contraction. Fixes #1743 2014-06-04 19:00:56 +05:30
Nabin Hait
1055139c83 get accounts for opening entry 2014-06-04 19:00:56 +05:30
Nabin Hait
19d1e499c3 Removed Purchase in transit report #1435 2014-06-04 19:00:56 +05:30
Nabin Hait
b161eea793 Account balance must be debit / credit, validate if balance already in credit / debit. Fixes #1442 2014-06-04 18:57:53 +05:30
Anand Doshi
8fbe4b9c3b Merge pull request #1747 from anandpdoshi/apply_user_permissions
Apply user permissions
2014-06-04 18:38:25 +05:30
Anand Doshi
85479bcbc0 Fixes for apply user permissions and momentjs 2014-06-04 18:15:43 +05:30
Anand Doshi
ec8240e890 Apply User Permissions optional in Script and Query Reports 2014-06-04 17:48:58 +05:30
Anand Doshi
221dec8cac transaction.js: calculate only if one entry in table 2014-06-04 17:48:57 +05:30
Anand Doshi
9a0f6f5bb4 Enable Scheduler in System Settings when Setup Wizard is completed 2014-06-04 17:48:57 +05:30
Anand Doshi
38dedf402b Fixes in patches for migration 2014-06-04 17:48:56 +05:30
Anand Doshi
c280d0655c Set Employee Name if missing 2014-06-04 17:48:56 +05:30
Anand Doshi
cdc1b640d9 Fixes in user permissions patches 2014-06-04 17:48:56 +05:30
Anand Doshi
37993dd713 Romanian and Korean Translations 2014-06-04 17:48:55 +05:30
Anand Doshi
cd25301607 Translations 2014-06-04 17:48:55 +05:30
Anand Doshi
4985691617 Role and User Permissions 2014-06-04 17:48:54 +05:30
Anand Doshi
69eec9e344 Role and User Permissions 2014-06-04 17:48:54 +05:30
Anand Doshi
a8ce570635 Permission relogication continued 2014-06-04 17:48:53 +05:30
Anand Doshi
fab0904af7 Started permission relogication 2014-06-04 17:48:52 +05:30
Anand Doshi
ffc28faa51 Merge pull request #1744 from rmehta/develop
added multiple item select and allow non purchase items in Material Requ...
2014-06-04 17:47:58 +05:30
Rushabh Mehta
b6843f2087 added multiple item select and allow non purchase items in Material Request of type transfer 2014-06-04 13:10:41 +05:30
Anand Doshi
3f6606acdb Merge pull request #1702 from pdvyas/put-version-in-file
keep version in separate file
2014-06-04 12:28:37 +05:30
Anand Doshi
7a3885863c Merge pull request #1740 from nabinhait/v4-hotfix
fixes
2014-06-04 11:56:42 +05:30
Nabin Hait
67d8b91690 Fixes in bank reconciliation statement 2014-06-04 11:18:25 +05:30
Nabin Hait
ce6977ffe6 Minor fixes in fetching item details 2014-06-03 23:02:02 +05:30
Nabin Hait
bc7efa6da6 Parent account mandatory for all non-root accounts 2014-06-03 23:02:02 +05:30
Anand Doshi
9198444a3b Merge pull request #1737 from nabinhait/v4-hotfix
Grid report translations and closing balance in trial balance
2014-06-03 14:40:26 +05:30
Nabin Hait
b15764ef2c Translation issue fixed in analytics/grid report 2014-06-03 13:02:39 +05:30
Nabin Hait
abb62c76d8 Removed allocated to field from serach fields in support ticket 2014-06-03 10:50:55 +05:30
Nabin Hait
51b7f322cc Closing balance fixes in trial balance. Fixes #1730 2014-06-02 18:47:46 +05:30
Anand Doshi
be99b1240c Merge pull request #1722 from nabinhait/v4-hotfix
multiple fixes
2014-06-02 11:09:32 +05:30
Anand Doshi
315e3b563b Merge pull request #1725 from rmehta/develop
Fix for awesome bar
2014-06-02 11:07:26 +05:30
Rushabh Mehta
430d132ee0 awesomebar: add tree links 2014-05-31 10:36:42 +05:30
Rushabh Mehta
cc37cc83cd removed section_style 2014-05-31 10:36:41 +05:30
Nabin Hait
0984f227a8 minor fixes related to path 2014-05-30 19:10:12 +05:30
Nabin Hait
548cf96c44 Minor fixes in sales return 2014-05-30 19:09:59 +05:30
Nabin Hait
0be378af6a Purchase ordered qty can not be less than minimum order qty. fixes #1529 2014-05-30 15:53:20 +05:30
Nabin Hait
fb988ba834 Salary Slip: pull details from salary struture. fixes #1719 2014-05-30 15:53:20 +05:30
Nabin Hait
e6ddd28067 Don't execute reorder_item, if initial setup not completed. fixes #1668 2014-05-30 15:53:20 +05:30
Nabin Hait
0acd3159db Merge pull request #1718 from nabinhait/v4-hotfix
Remove blank lines from uploaded file of attendance
2014-05-30 14:33:59 +05:30
Nabin Hait
1897e75894 Remove blank lines from uploaded file of attendance #1714 2014-05-30 14:31:10 +05:30
Anand Doshi
852e7cdb41 Merge pull request #1691 from nabinhait/v4-hotfix
build_filter_conditions and pricing rules
2014-05-30 11:51:36 +05:30
Nabin Hait
c1367d9d10 minor fixes 2014-05-30 11:43:00 +05:30
Nabin Hait
cb9bdf43f6 over billing validation fixed 2014-05-30 11:22:16 +05:30
Nabin Hait
6b1a8e0a40 minor fixes 2014-05-30 11:22:16 +05:30
Nabin Hait
7f32cbeb06 Total valuation for manufactured or repacked item(s) can not be less than total valuation of raw materials #1688 2014-05-30 11:22:15 +05:30
Nabin Hait
c7253b3a37 Get valuation rate for fg item base don issued item cost + operation cost. #1688 2014-05-30 11:22:15 +05:30
Nabin Hait
7f03e24c55 Valuation rate of raw materials in BOM. #1688 2014-05-30 11:22:15 +05:30
Nabin Hait
66cecf4824 uom trigger issue in stock entry fixes #1712 2014-05-30 11:22:15 +05:30
Nabin Hait
f3552ca737 packing slip fixes #1711 2014-05-30 11:22:15 +05:30
Nabin Hait
3dc6a80198 deleted delivery note packing list wise print format 2014-05-30 11:22:14 +05:30
Nabin Hait
e71159d6ea Standard Rate field removed from item. Fixes #1688 2014-05-30 11:22:14 +05:30
Nabin Hait
732a7e81a0 Incoming rate in stock ledger and valuation rate in stock balance report. Fixes #1706 2014-05-30 11:22:14 +05:30
Nabin Hait
c3cbe2a30c minor fixes in sales invoice validation 2014-05-30 11:22:13 +05:30
Nabin Hait
9bc9b8795b Fixes in stock reconciliation 2014-05-30 11:22:13 +05:30
Nabin Hait
d0605443fb removed print statement 2014-05-30 11:22:13 +05:30
Nabin Hait
47a8670d37 pricing rule testcase fixes 2014-05-30 11:22:12 +05:30
Nabin Hait
e7546e2305 SMS Settings added in setup and selling module page. Fixes #1693 2014-05-30 11:22:12 +05:30
Nabin Hait
ccb9826afd pricing list tets case fixes 2014-05-30 11:22:12 +05:30
Nabin Hait
8de61559b0 Minor fixes in sales / purchase analytics. Fixes #1701 2014-05-30 11:22:11 +05:30
Nabin Hait
ea4aa04cc4 Search query for account cleanup 2014-05-30 11:22:11 +05:30
Nabin Hait
a3dd72a759 Pricing Rule 2014-05-30 11:22:10 +05:30
Nabin Hait
62ec60188b use build_filter_conditions from db_query. Fixes #1679 2014-05-30 11:22:10 +05:30
Anand Doshi
10cb4799bc Merge pull request #1700 from rmehta/develop
Various UI Bug Fixes
2014-05-30 11:12:21 +05:30
Pratik Vyas
8e0438bad4 keep version in separate file 2014-05-28 16:58:55 +05:30
Pratik Vyas
76e48b5c3f hotfix: update_account_root_type.py patch 2014-05-28 15:22:34 +05:30
Rushabh Mehta
1bf9df7c85 removed about 2014-05-28 13:15:32 +05:30
Anand Doshi
32063bb472 Removed designation 'Director' owing to problems with Greek translation 2014-05-27 22:40:53 +05:30
Rushabh Mehta
f944e819e9 fixes #1581 and added icons to grid reports 2014-05-27 15:22:04 +05:30
Nabin Hait
9c1ae09994 Merge pull request #1689 from rmehta/develop
fix to pos invoice
2014-05-26 16:22:03 +05:30
Rushabh Mehta
d82e85d099 fix to pos invoice 2014-05-26 16:01:01 +05:30
Nabin Hait
c1d0851a56 Merge pull request #1687 from nabinhait/v4-hotfix
Update status based on communication. Fixes #1682
2014-05-26 15:07:31 +05:30
Nabin Hait
08dd6af446 Update status based on communication. Fixes #1682 2014-05-26 15:06:42 +05:30
Nabin Hait
ff8f32ca80 Merge pull request #1686 from rmehta/develop
Fixes
2014-05-26 13:36:28 +05:30
Rushabh Mehta
a7c46e4d83 removed debug in query (packing_slip.py) 2014-05-26 13:35:47 +05:30
Rushabh Mehta
b15d760406 fix to packing slip (validation) 2014-05-26 13:05:19 +05:30
Rushabh Mehta
9f399f139b Merge branch 'develop' of github.com:frappe/erpnext into develop 2014-05-26 11:40:46 +05:30
Rushabh Mehta
3b0f026522 fix to sales parter 2014-05-24 12:04:13 +05:30
Anand Doshi
8db94e7407 Merge pull request #1680 from anandpdoshi/hotfix
Updated Translations
2014-05-23 10:43:16 +05:30
Anand Doshi
8d321446ad Updated translations 2014-05-23 10:29:37 +05:30
Anand Doshi
c783c2636f Updated translations 2014-05-23 09:22:12 +05:30
Anand Doshi
5468740042 Fixed setup wizard errors for chinese simplified 2014-05-23 09:21:55 +05:30
Anand Doshi
69e4b16817 Setup Wizard: clear cache on language change 2014-05-22 22:52:36 +05:30
Pratik Vyas
e35a1025c9 hotfix: communication email bug 2014-05-22 18:37:55 +05:30
Rushabh Mehta
0f5601dad4 Merge pull request #1677 from rmehta/develop
Added title_field and added ignore_permission while creating Event from Lead
2014-05-22 11:23:03 +05:30
Pratik Vyas
a5f35e2b3c Merge pull request #1678 from anandpdoshi/hotfix
Fixed global_defaults_to_system_settings
2014-05-22 11:15:21 +05:30
Anand Doshi
c57d7dea8b Fixed global_defaults_to_system_settings 2014-05-22 11:05:46 +05:30
Rushabh Mehta
a39cae9c2e added title field to support ticket, lead and employee 2014-05-21 17:34:22 +05:30
Anand Doshi
53142f125b Merge pull request #1675 from nabinhait/v4-hotfix
Create serial no based on series only if item is serialized
2014-05-21 16:08:14 +05:30
Nabin Hait
edf87a258f Create serial no based on series only if item is serialized 2014-05-21 15:38:56 +05:30
Anand Doshi
18144da755 Merge pull request #1674 from anandpdoshi/hotfix
Hook: setup_wizard_success
2014-05-21 15:25:11 +05:30
Anand Doshi
d6007e7d9c Hook: setup_wizard_success 2014-05-21 15:22:15 +05:30
Rushabh Mehta
92ce693e6f added ignore_permission in Lead for creating Event 2014-05-21 14:59:56 +05:30
Anand Doshi
d2802cab6c Merge pull request #1672 from nabinhait/v4-hotfix
Account root type and email digest for income / expense
2014-05-21 12:50:08 +05:30
Nabin Hait
177fb132b9 description added in setup wizard 2014-05-21 12:39:37 +05:30
Nabin Hait
d811303d7b minor fix 2014-05-21 12:36:43 +05:30
Nabin Hait
27b12ef1b6 update account root type patch 2014-05-21 11:53:59 +05:30
Nabin Hait
4efc5d74d4 Setup Wizard: company abbr length validation on onchange trigger 2014-05-21 11:53:59 +05:30
Nabin Hait
b5c552faf3 minor fix 2014-05-21 11:53:59 +05:30
Nabin Hait
dec02340e8 reload account doc in root type patch 2014-05-21 11:53:59 +05:30
Nabin Hait
3f80ef0648 reload account doc in root type patch 2014-05-21 11:53:59 +05:30
Nabin Hait
44ae408b36 Income/expense info in email digest 2014-05-21 11:53:58 +05:30
Nabin Hait
0e6554edc1 Root Type field added in account and patch for existing accoutns 2014-05-21 11:53:58 +05:30
Pratik Vyas
c8c5d37bcf Release 4.0.2 2014-05-20 16:42:10 +05:30
Pratik Vyas
5873e50c50 Release 4.0.2 2014-05-20 16:42:01 +05:30
Pratik Vyas
4f1371945d hotfix: frappe version in requirements.txt 2014-05-20 16:39:29 +05:30
733 changed files with 53680 additions and 21153 deletions

View File

@@ -14,8 +14,15 @@ install:
- sudo apt-get update
- sudo apt-get purge -y mysql-common
- sudo apt-get install mariadb-server mariadb-common libmariadbclient-dev
- CFLAGS=-O0 pip install git+https://github.com/frappe/frappe.git@develop &&
- pip install --editable .
- wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-precise-amd64.deb
- sudo dpkg -i wkhtmltox-0.12.1_linux-precise-amd64.deb
- CFLAGS=-O0 pip install git+https://github.com/frappe/frappe.git@develop
- CFLAGS=-O0 pip install --editable .
before_script:
- mysql -e 'create database test_frappe'
- echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root
- echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root
script:
- cd ./test_sites/
@@ -23,9 +30,6 @@ script:
- frappe --reinstall
- frappe --install_app erpnext --verbose
- frappe -b
- frappe --build_website
- frappe --serve_test &
- frappe --verbose --run_tests --app erpnext
before_script:
- mysql -e 'create database test_frappe'
- echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root

View File

@@ -1,16 +1,23 @@
# Contributing to ERPNext
# Contributing to Frappe / ERPNext
### Update 16-Sep-14
Please send pull requests to branch v5.0
## Reporting issues
We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems. Please read the following guidelines before opening any issue.
1. **Search for existing issues.** We want to avoid duplication, and you'd help us out a lot by first checking if someone else has reported the same issue. The issue may have already been resolved with a fix available.
1. **Search for existing issues:** We want to avoid duplication, and you'd help us out a lot by first checking if someone else has reported the same issue. The issue may have already been resolved with a fix available.
1. **Report each issue separately:** Don't club multiple, unreleated issues in one note.
1. **Mention the version number:** Please mention the application, browser and platform version numbers.
### Issues
1. **Share as much information as possible.** Include operating system and version, browser and version, when did you last update ERPNext, how is it customized, etc. where appropriate. Also include steps to reproduce the bug.
1. Consider adding screenshots annotated with what goes wrong.
1. If you are reporting an issue from the browser, Open the Javascript Console and paste us any error messages you see.
1. **Share as much information as possible:** Include operating system and version, browser and version, when did you last update ERPNext, how is it customized, etc. where appropriate. Also include steps to reproduce the bug.
1. **Include Screenshots if possible:** Consider adding screenshots annotated with what goes wrong.
1. **Find and post the trace for bugs:** If you are reporting an issue from the browser, Open the Javascript Console and paste us any error messages you see.
### Feature Requests
@@ -37,14 +44,10 @@ that function to accommodate your use case.
DocTypes are easy to create but hard to maintain. If you find that there is a another DocType with a similar functionality, then please try and extend that functionality. For example, by adding a "type" field to classify the new type of record.
#### Don't Send Trivial Requests
Don't send pull requests for fixing a simple typo in a code comment.
#### Tabs or spaces?
Tabs!
### Copyright
Please see README.md
Please see README.md

View File

@@ -16,4 +16,5 @@ recursive-include erpnext *.md
recursive-include erpnext *.png
recursive-include erpnext *.py
recursive-include erpnext *.svg
recursive-include erpnext/public *
recursive-exclude * *.pyc

View File

@@ -2,7 +2,7 @@
[https://erpnext.com](https://erpnext.com)
Includes Accounting, Inventory, CRM, Sales, Purchase, Projects, HRMS. Built on Python / MySQL.
Includes Accounting, Inventory, CRM, Sales, Purchase, Projects, HRMS. Built on Python / MariaDB.
ERPNext is built on [frappe](https://github.com/frappe/frappe)
@@ -13,9 +13,9 @@ ERPNext is built on [frappe](https://github.com/frappe/frappe)
---
### Development install
### Install
Use the bench, https://github.com/frappe/frappe-bench.
Use the bench, https://github.com/frappe/bench
### Admin Login

View File

@@ -1 +1 @@
__version__ = '4.0.1'
from erpnext.__version__ import __version__

1
erpnext/__version__.py Normal file
View File

@@ -0,0 +1 @@
__version__ = '4.4.0'

View File

@@ -49,28 +49,25 @@ cur_frm.cscript.master_type = function(doc, cdt, cdn) {
}
cur_frm.add_fetch('parent_account', 'report_type', 'report_type');
cur_frm.add_fetch('parent_account', 'root_type', 'root_type');
cur_frm.cscript.account_type = function(doc, cdt, cdn) {
if(doc.group_or_ledger=='Ledger') {
cur_frm.toggle_display(['tax_rate'], doc.account_type == 'Tax');
cur_frm.toggle_display('master_type', cstr(doc.account_type)=='');
cur_frm.toggle_display('master_name', doc.account_type=='Warehouse' ||
in_list(['Customer', 'Supplier'], doc.master_type));
}
}
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.appframe.add_button(__('Chart of Accounts'),
cur_frm.add_custom_button(__('Chart of Accounts'),
function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
if (cstr(doc.group_or_ledger) == 'Group') {
cur_frm.add_custom_button(__('Convert to Ledger'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet', 'btn-default');
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
cur_frm.appframe.add_button(__('View Ledger'), function() {
cur_frm.add_custom_button(__('View Ledger'), function() {
frappe.route_options = {
"account": doc.name,
"from_date": sys_defaults.year_start_date,
@@ -79,6 +76,9 @@ cur_frm.cscript.add_toolbar_buttons = function(doc) {
};
frappe.set_route("query-report", "General Ledger");
}, "icon-table");
cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
}
}

View File

@@ -1,322 +1,332 @@
{
"allow_copy": 1,
"allow_import": 1,
"allow_rename": 1,
"creation": "2013-01-30 12:49:46",
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"allow_copy": 1,
"allow_import": 1,
"allow_rename": 1,
"creation": "2013-01-30 12:49:46",
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"fields": [
{
"fieldname": "properties",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Account Details",
"oldfieldtype": "Section Break",
"fieldname": "properties",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Account Details",
"oldfieldtype": "Section Break",
"permlevel": 0
},
},
{
"fieldname": "column_break0",
"fieldtype": "Column Break",
"in_list_view": 0,
"permlevel": 0,
"fieldname": "column_break0",
"fieldtype": "Column Break",
"in_list_view": 0,
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "account_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Account Name",
"no_copy": 1,
"oldfieldname": "account_name",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"fieldname": "account_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Account Name",
"no_copy": 1,
"oldfieldname": "account_name",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"search_index": 1
},
},
{
"default": "Ledger",
"fieldname": "group_or_ledger",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Group or Ledger",
"oldfieldname": "group_or_ledger",
"oldfieldtype": "Select",
"options": "\nLedger\nGroup",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"default": "Ledger",
"fieldname": "group_or_ledger",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Group or Ledger",
"oldfieldname": "group_or_ledger",
"oldfieldtype": "Select",
"options": "\nLedger\nGroup",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"search_index": 1
},
},
{
"fieldname": "company",
"fieldtype": "Link",
"in_filter": 1,
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"fieldname": "company",
"fieldtype": "Link",
"in_filter": 1,
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"permlevel": 0,
"read_only": 1,
"reqd": 1,
"search_index": 1
},
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "parent_account",
"fieldtype": "Link",
"ignore_restrictions": 1,
"label": "Parent Account",
"oldfieldname": "parent_account",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"fieldname": "parent_account",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"label": "Parent Account",
"oldfieldname": "parent_account",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"reqd": 1,
"search_index": 1
},
},
{
"fieldname": "report_type",
"fieldtype": "Select",
"label": "Report Type",
"options": "\nBalance Sheet\nProfit and Loss",
"permlevel": 0
},
{
"description": "Setting Account Type helps in selecting this Account in transactions.",
"fieldname": "account_type",
"fieldtype": "Select",
"in_filter": 1,
"label": "Account Type",
"oldfieldname": "account_type",
"oldfieldtype": "Select",
"options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment",
"permlevel": 0,
"description": "Setting Account Type helps in selecting this Account in transactions.",
"fieldname": "account_type",
"fieldtype": "Select",
"in_filter": 1,
"label": "Account Type",
"oldfieldname": "account_type",
"oldfieldtype": "Select",
"options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment\nStock",
"permlevel": 0,
"search_index": 0
},
},
{
"description": "Rate at which this tax is applied",
"fieldname": "tax_rate",
"fieldtype": "Float",
"hidden": 0,
"label": "Rate",
"oldfieldname": "tax_rate",
"oldfieldtype": "Currency",
"permlevel": 0,
"description": "Rate at which this tax is applied",
"fieldname": "tax_rate",
"fieldtype": "Float",
"hidden": 0,
"label": "Rate",
"oldfieldname": "tax_rate",
"oldfieldtype": "Currency",
"permlevel": 0,
"reqd": 0
},
},
{
"description": "If the account is frozen, entries are allowed to restricted users.",
"fieldname": "freeze_account",
"fieldtype": "Select",
"label": "Frozen",
"oldfieldname": "freeze_account",
"oldfieldtype": "Select",
"options": "No\nYes",
"description": "If the account is frozen, entries are allowed to restricted users.",
"fieldname": "freeze_account",
"fieldtype": "Select",
"label": "Frozen",
"oldfieldname": "freeze_account",
"oldfieldtype": "Select",
"options": "No\nYes",
"permlevel": 0
},
},
{
"fieldname": "credit_days",
"fieldtype": "Int",
"hidden": 1,
"label": "Credit Days",
"oldfieldname": "credit_days",
"oldfieldtype": "Int",
"permlevel": 0,
"fieldname": "credit_days",
"fieldtype": "Int",
"hidden": 1,
"label": "Credit Days",
"oldfieldname": "credit_days",
"oldfieldtype": "Int",
"permlevel": 0,
"print_hide": 1
},
},
{
"fieldname": "credit_limit",
"fieldtype": "Currency",
"hidden": 1,
"label": "Credit Limit",
"oldfieldname": "credit_limit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"fieldname": "credit_limit",
"fieldtype": "Currency",
"hidden": 1,
"label": "Credit Limit",
"oldfieldname": "credit_limit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1
},
},
{
"description": "If this Account represents a Customer, Supplier or Employee, set it here.",
"fieldname": "master_type",
"fieldtype": "Select",
"label": "Master Type",
"oldfieldname": "master_type",
"oldfieldtype": "Select",
"options": "\nSupplier\nCustomer\nEmployee",
"description": "If this Account represents a Customer, Supplier or Employee, set it here.",
"fieldname": "master_type",
"fieldtype": "Select",
"label": "Master Type",
"oldfieldname": "master_type",
"oldfieldtype": "Select",
"options": "\nSupplier\nCustomer\nEmployee",
"permlevel": 0
},
},
{
"fieldname": "master_name",
"fieldtype": "Link",
"label": "Master Name",
"oldfieldname": "master_name",
"oldfieldtype": "Link",
"options": "[Select]",
"fieldname": "master_name",
"fieldtype": "Link",
"label": "Master Name",
"oldfieldname": "master_name",
"oldfieldtype": "Link",
"options": "[Select]",
"permlevel": 0
},
},
{
"fieldname": "balance_must_be",
"fieldtype": "Select",
"label": "Balance must be",
"options": "\nDebit\nCredit",
"fieldname": "balance_must_be",
"fieldtype": "Select",
"label": "Balance must be",
"options": "\nDebit\nCredit",
"permlevel": 0
},
},
{
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"label": "Lft",
"permlevel": 0,
"print_hide": 1,
"fieldname": "root_type",
"fieldtype": "Select",
"label": "Root Type",
"options": "\nAsset\nLiability\nIncome\nExpense\nEquity",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"label": "Rgt",
"permlevel": 0,
"print_hide": 1,
"fieldname": "report_type",
"fieldtype": "Select",
"label": "Report Type",
"options": "\nBalance Sheet\nProfit and Loss",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "old_parent",
"fieldtype": "Data",
"hidden": 1,
"label": "Old Parent",
"permlevel": 0,
"print_hide": 1,
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"label": "Lft",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"label": "Rgt",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "old_parent",
"fieldtype": "Data",
"hidden": 1,
"label": "Old Parent",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
}
],
"icon": "icon-money",
"idx": 1,
"in_create": 1,
"modified": "2014-05-12 17:03:19.733139",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",
"owner": "Administrator",
],
"icon": "icon-money",
"idx": 1,
"in_create": 1,
"modified": "2014-06-19 18:27:58.109303",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"submit": 0,
"amend": 0,
"apply_user_permissions": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Auditor",
"submit": 0,
"amend": 0,
"apply_user_permissions": 1,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Auditor",
"submit": 0,
"write": 0
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales User",
"submit": 0,
"amend": 0,
"apply_user_permissions": 1,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales User",
"submit": 0,
"write": 0
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase User",
"submit": 0,
"amend": 0,
"apply_user_permissions": 1,
"create": 0,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase User",
"submit": 0,
"write": 0
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Auditor",
"submit": 0,
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Auditor",
"submit": 0,
"write": 0
},
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"restrict": 1,
"role": "Accounts Manager",
"submit": 0,
"amend": 0,
"apply_user_permissions": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 1,
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"submit": 0,
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Accounts User",
"submit": 0,
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Accounts User",
"submit": 0,
"write": 0
}
],
],
"search_fields": "group_or_ledger"
}
}

View File

@@ -11,11 +11,11 @@ class Account(Document):
nsm_parent_field = 'parent_account'
def onload(self):
frozen_accounts_modifier = frappe.db.get_value("Accounts Settings", "Accounts Settings", "frozen_accounts_modifier")
if frozen_accounts_modifier in frappe.user.get_roles():
frozen_accounts_modifier = frappe.db.get_value("Accounts Settings", "Accounts Settings",
"frozen_accounts_modifier")
if not frozen_accounts_modifier or frozen_accounts_modifier in frappe.user.get_roles():
self.get("__onload").can_freeze_account = True
def autoname(self):
self.name = self.account_name.strip() + ' - ' + \
frappe.db.get_value("Company", self.company, "abbr")
@@ -30,6 +30,7 @@ class Account(Document):
self.validate_mandatory()
self.validate_warehouse_account()
self.validate_frozen_accounts_modifier()
self.validate_balance_must_be_debit_or_credit()
def validate_master_name(self):
if self.master_type in ('Customer', 'Supplier') or self.account_type == "Warehouse":
@@ -39,19 +40,24 @@ class Account(Document):
throw(_("Invalid Master Name"))
def validate_parent(self):
"""Fetch Parent Details and validation for account not to be created under ledger"""
"""Fetch Parent Details and validate parent account"""
if self.parent_account:
par = frappe.db.get_value("Account", self.parent_account,
["name", "group_or_ledger", "report_type"], as_dict=1)
["name", "group_or_ledger", "report_type", "root_type", "company"], as_dict=1)
if not par:
throw(_("Parent account does not exist"))
elif par["name"] == self.name:
throw(_("You can not assign itself as parent account"))
elif par["group_or_ledger"] != 'Group':
throw(_("Parent account can not be a ledger"))
throw(_("Account {0}: Parent account {1} does not exist").format(self.name, self.parent_account))
elif par.name == self.name:
throw(_("Account {0}: You can not assign itself as parent account").format(self.name))
elif par.group_or_ledger != 'Group':
throw(_("Account {0}: Parent account {1} can not be a ledger").format(self.name, self.parent_account))
elif par.company != self.company:
throw(_("Account {0}: Parent account {1} does not belong to company: {2}")
.format(self.name, self.parent_account, self.company))
if par["report_type"]:
self.report_type = par["report_type"]
if par.report_type:
self.report_type = par.report_type
if par.root_type:
self.root_type = par.root_type
def validate_root_details(self):
#does not exists parent
@@ -67,6 +73,16 @@ class Account(Document):
frozen_accounts_modifier not in frappe.user.get_roles():
throw(_("You are not authorized to set Frozen value"))
def validate_balance_must_be_debit_or_credit(self):
from erpnext.accounts.utils import get_balance_on
if not self.get("__islocal") and self.balance_must_be:
account_balance = get_balance_on(self.name)
if account_balance > 0 and self.balance_must_be == "Credit":
frappe.throw(_("Account balance already in Debit, you are not allowed to set 'Balance Must Be' as 'Credit'"))
elif account_balance < 0 and self.balance_must_be == "Debit":
frappe.throw(_("Account balance already in Credit, you are not allowed to set 'Balance Must Be' as 'Debit'"))
def convert_group_to_ledger(self):
if self.check_if_child_exists():
throw(_("Account with child nodes cannot be converted to ledger"))
@@ -99,6 +115,9 @@ class Account(Document):
if not self.report_type:
throw(_("Report Type is mandatory"))
if not self.root_type:
throw(_("Root Type is mandatory"))
def validate_warehouse_account(self):
if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
return
@@ -146,19 +165,17 @@ class Account(Document):
# If outstanding greater than credit limit and not authorized person raise exception
if credit_limit > 0 and flt(total_outstanding) > credit_limit \
and not self.get_authorized_user():
throw(_("{0} Credit limit {0} crossed").format(_(credit_limit_from), credit_limit))
throw(_("{0} Credit limit {1} crossed").format(_(credit_limit_from), credit_limit))
def validate_due_date(self, posting_date, due_date):
credit_days = (self.credit_days or frappe.db.get_value("Company", self.company, "credit_days"))
if credit_days is None:
return
posting_date, due_date = getdate(posting_date), getdate(due_date)
diff = (due_date - posting_date).days
if diff < 0:
frappe.throw(_("Due Date cannot be before Posting Date"))
elif diff > credit_days:
elif credit_days is not None and diff > credit_days:
is_credit_controller = frappe.db.get_value("Accounts Settings", None,
"credit_controller") in frappe.user.get_roles()
@@ -194,10 +211,10 @@ class Account(Document):
throw(_("Account {0} does not exist").format(new))
val = list(frappe.db.get_value("Account", new_account,
["group_or_ledger", "report_type", "company"]))
["group_or_ledger", "root_type", "company"]))
if val != [self.group_or_ledger, self.report_type, self.company]:
throw(_("""Merging is only possible if following properties are same in both records. Group or Ledger, Report Type, Company"""))
if val != [self.group_or_ledger, self.root_type, self.company]:
throw(_("""Merging is only possible if following properties are same in both records. Group or Ledger, Root Type, Company"""))
return new_account

View File

@@ -14,6 +14,7 @@ def _make_test_records(verbose):
["_Test Account Stock Expenses", "Direct Expenses", "Group", None],
["_Test Account Shipping Charges", "_Test Account Stock Expenses", "Ledger", "Chargeable"],
["_Test Account Customs Duty", "_Test Account Stock Expenses", "Ledger", "Tax"],
["_Test Account Insurance Charges", "_Test Account Stock Expenses", "Ledger", "Chargeable"],
["_Test Account Tax Assets", "Current Assets", "Group", None],

View File

@@ -85,7 +85,7 @@
"icon": "icon-check",
"idx": 1,
"issingle": 1,
"modified": "2014-05-06 16:26:08.984595",
"modified": "2014-05-27 03:37:21.783216",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation",
@@ -93,6 +93,7 @@
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"permlevel": 0,

View File

@@ -24,7 +24,8 @@ class BankReconciliation(Document):
`tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
where
t2.parent = t1.name and t2.account = %s
and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1 %s""" %
and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1
and ifnull(t1.is_opening, 'No') = 'No' %s""" %
('%s', '%s', '%s', condition), (self.bank_account, self.from_date, self.to_date), as_dict=1)
self.set('entries', [])

View File

@@ -1,5 +1,5 @@
{
"allow_attach": 1,
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2013-03-07 11:55:06",
"docstatus": 0,
@@ -126,7 +126,7 @@
{
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"label": "Amended From",
"no_copy": 1,
"options": "C-Form",
@@ -139,13 +139,14 @@
"idx": 1,
"is_submittable": 1,
"max_attachments": 3,
"modified": "2014-05-09 02:18:00.162685",
"modified": "2014-09-05 12:58:43.333698",
"modified_by": "Administrator",
"module": "Accounts",
"name": "C-Form",
"owner": "Administrator",
"permissions": [
{
"apply_user_permissions": 1,
"create": 1,
"email": 1,
"permlevel": 0,

View File

@@ -17,15 +17,19 @@ class CForm(Document):
inv = frappe.db.sql("""select c_form_applicable, c_form_no from
`tabSales Invoice` where name = %s and docstatus = 1""", d.invoice_no)
if inv[0][0] != 'Yes':
if inv and inv[0][0] != 'Yes':
frappe.throw("C-form is not applicable for Invoice: %s" % d.invoice_no)
elif inv[0][1] and inv[0][1] != self.name:
elif inv and inv[0][1] and inv[0][1] != self.name:
frappe.throw("""Invoice %s is tagged in another C-form: %s.
If you want to change C-form no for this invoice,
please remove invoice no from the previous c-form and then try again""" %
(d.invoice_no, inv[0][1]))
elif not inv:
frappe.throw("Row %s: Invoice %s is invalid, it might be cancelled / does not exist. \
Please enter a valid Invoice" % d.idx, d.invoice_no)
def on_update(self):
""" Update C-Form No on invoices"""
self.set_total_invoiced_amount()
@@ -55,22 +59,12 @@ class CForm(Document):
def get_invoice_details(self, invoice_no):
""" Pull details from invoices for referrence """
inv = frappe.db.get_value("Sales Invoice", invoice_no,
["posting_date", "territory", "net_total", "grand_total"], as_dict=True)
return {
'invoice_date' : inv.posting_date,
'territory' : inv.territory,
'net_total' : inv.net_total,
'grand_total' : inv.grand_total
}
def get_invoice_nos(doctype, txt, searchfield, start, page_len, filters):
from erpnext.utilities import build_filter_conditions
conditions, filter_values = build_filter_conditions(filters)
return frappe.db.sql("""select name from `tabSales Invoice` where docstatus = 1
and c_form_applicable = 'Yes' and ifnull(c_form_no, '') = '' %s
and %s like %s order by name limit %s, %s""" %
(conditions, searchfield, "%s", "%s", "%s"),
tuple(filter_values + ["%%%s%%" % txt, start, page_len]))
if invoice_no:
inv = frappe.db.get_value("Sales Invoice", invoice_no,
["posting_date", "territory", "net_total", "grand_total"], as_dict=True)
return {
'invoice_date' : inv.posting_date,
'territory' : inv.territory,
'net_total' : inv.net_total,
'grand_total' : inv.grand_total
}

View File

@@ -9,7 +9,7 @@ from __future__ import unicode_literals
import os, json
import ast
from xml.etree import ElementTree as ET
from frappe.utils.datautils import read_csv_content
from frappe.utils.csvutils import read_csv_content
from frappe.utils import cstr
import frappe

View File

@@ -5,6 +5,7 @@ from __future__ import unicode_literals
import frappe, os, json
def import_charts():
print "Importing Chart of Accounts"
frappe.db.sql("""delete from `tabChart of Accounts`""")
charts_dir = os.path.join(os.path.dirname(__file__), "charts")
for fname in os.listdir(charts_dir):
@@ -19,8 +20,8 @@ def import_charts():
"source_file": fname,
"country": country
}).insert()
print doc.name.encode("utf-8")
else:
print "No chart for: " + chart.get("name").encode("utf-8")
frappe.db.commit()
#print doc.name.encode("utf-8")
#else:
#print "No chart for: " + chart.get("name").encode("utf-8")
frappe.db.commit()

View File

@@ -64,10 +64,12 @@ cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
if (cstr(doc.group_or_ledger) == 'Group') {
cur_frm.add_custom_button(__('Convert to Ledger'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet',
"btn-default")
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet',
"btn-default")
}
}

View File

@@ -31,7 +31,7 @@
{
"fieldname": "parent_cost_center",
"fieldtype": "Link",
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"in_list_view": 1,
"label": "Parent Cost Center",
"oldfieldname": "parent_cost_center",
@@ -131,7 +131,7 @@
"fieldname": "old_parent",
"fieldtype": "Link",
"hidden": 1,
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"label": "old_parent",
"no_copy": 1,
"oldfieldname": "old_parent",
@@ -144,8 +144,8 @@
],
"icon": "icon-money",
"idx": 1,
"in_create": 1,
"modified": "2014-05-07 06:37:48.038993",
"in_create": 0,
"modified": "2014-08-26 12:16:11.163750",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",
@@ -153,7 +153,6 @@
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@@ -167,7 +166,7 @@
},
{
"amend": 0,
"cancel": 0,
"apply_user_permissions": 1,
"create": 0,
"delete": 0,
"email": 1,
@@ -180,16 +179,19 @@
"write": 0
},
{
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
"role": "Sales User"
},
{
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
"role": "Purchase User"
},
{
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
"role": "Material User"

View File

@@ -15,5 +15,12 @@
"doctype": "Cost Center",
"group_or_ledger": "Ledger",
"parent_cost_center": "_Test Company - _TC"
},
{
"company": "_Test Company",
"cost_center_name": "_Test Cost Center 2",
"doctype": "Cost Center",
"group_or_ledger": "Ledger",
"parent_cost_center": "_Test Company - _TC"
}
]

View File

@@ -14,7 +14,8 @@ $.extend(cur_frm.cscript, {
this.frm.toggle_enable('year_end_date', doc.__islocal)
if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
this.frm.add_custom_button(__("Set as Default"), this.frm.cscript.set_as_default);
this.frm.add_custom_button(__("Set as Default"),
this.frm.cscript.set_as_default, "icon-star");
this.frm.set_intro(__("To set this Fiscal Year as Default, click on 'Set as Default'"));
} else {
this.frm.set_intro("");

View File

@@ -1,7 +1,7 @@
{
"allow_import": 1,
"autoname": "field:year",
"creation": "2013-01-22 16:50:25.000000",
"creation": "2013-01-22 16:50:25",
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
"docstatus": 0,
"doctype": "DocType",
@@ -11,6 +11,7 @@
"description": "For e.g. 2012, 2012-13",
"fieldname": "year",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Year Name",
"oldfieldname": "year",
"oldfieldtype": "Data",
@@ -20,6 +21,7 @@
{
"fieldname": "year_start_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Year Start Date",
"no_copy": 1,
"oldfieldname": "year_start_date",
@@ -30,6 +32,7 @@
{
"fieldname": "year_end_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Year End Date",
"no_copy": 1,
"permlevel": 0,
@@ -40,6 +43,7 @@
"description": "Entries are not allowed against this Fiscal Year if the year is closed.",
"fieldname": "is_fiscal_year_closed",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Year Closed",
"no_copy": 1,
"oldfieldname": "is_fiscal_year_closed",
@@ -51,14 +55,13 @@
],
"icon": "icon-calendar",
"idx": 1,
"modified": "2014-01-20 17:48:46.000000",
"modified": "2014-07-14 05:30:56.843180",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@@ -71,6 +74,7 @@
"write": 1
},
{
"apply_user_permissions": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
@@ -78,5 +82,7 @@
"read": 1,
"role": "All"
}
]
],
"sort_field": "name",
"sort_order": "DESC"
}

View File

@@ -25,15 +25,15 @@ class FiscalYear(Document):
if year_start_end_dates:
if getdate(self.year_start_date) != year_start_end_dates[0][0] or getdate(self.year_end_date) != year_start_end_dates[0][1]:
frappe.throw(_("Cannot change Year Start Date and Year End Date once the Fiscal Year is saved."))
frappe.throw(_("Cannot change Fiscal Year Start Date and Fiscal Year End Date once the Fiscal Year is saved."))
def on_update(self):
# validate year start date and year end date
if getdate(self.year_start_date) > getdate(self.year_end_date):
frappe.throw(_("Year Start Date should not be greater than Year End Date"))
frappe.throw(_("Fiscal Year Start Date should not be greater than Fiscal Year End Date"))
if (getdate(self.year_end_date) - getdate(self.year_start_date)).days > 366:
frappe.throw(_("Year Start Date and Year End Date are not within Fiscal Year."))
frappe.throw(_("Fiscal Year Start Date and Fiscal Year End Date cannot be more than a year apart."))
year_start_end_dates = frappe.db.sql("""select name, year_start_date, year_end_date
from `tabFiscal Year` where name!=%s""", (self.name))
@@ -41,4 +41,4 @@ class FiscalYear(Document):
for fiscal_year, ysd, yed in year_start_end_dates:
if (getdate(self.year_start_date) == ysd and getdate(self.year_end_date) == yed) \
and (not frappe.flags.in_test):
frappe.throw(_("Year Start Date and Year End Date are already set in Fiscal Year {0}").format(fiscal_year))
frappe.throw(_("Fiscal Year Start Date and Fiscal Year End Date are already set in Fiscal Year {0}").format(fiscal_year))

View File

@@ -86,44 +86,47 @@
"oldfieldtype": "Text",
"permlevel": 0
},
{
"fieldname": "against_voucher",
"fieldtype": "Data",
"in_filter": 1,
"label": "Against Voucher",
"oldfieldname": "against_voucher",
"oldfieldtype": "Data",
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "against_voucher_type",
"fieldtype": "Data",
"fieldtype": "Link",
"in_filter": 0,
"label": "Against Voucher Type",
"oldfieldname": "against_voucher_type",
"oldfieldtype": "Data",
"options": "DocType",
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "against_voucher",
"fieldtype": "Dynamic Link",
"in_filter": 1,
"label": "Against Voucher",
"oldfieldname": "against_voucher",
"oldfieldtype": "Data",
"options": "against_voucher_type",
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "voucher_type",
"fieldtype": "Select",
"fieldtype": "Link",
"in_filter": 1,
"label": "Voucher Type",
"oldfieldname": "voucher_type",
"oldfieldtype": "Select",
"options": "Journal Voucher\nSales Invoice\nPurchase Invoice",
"options": "DocType",
"permlevel": 0,
"search_index": 0
},
{
"fieldname": "voucher_no",
"fieldtype": "Data",
"fieldtype": "Dynamic Link",
"in_filter": 1,
"label": "Voucher No",
"oldfieldname": "voucher_no",
"oldfieldtype": "Data",
"options": "voucher_type",
"permlevel": 0,
"search_index": 1
},
@@ -186,7 +189,7 @@
"icon": "icon-list",
"idx": 1,
"in_create": 1,
"modified": "2014-05-09 02:16:29.981405",
"modified": "2014-06-23 08:07:30.678730",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GL Entry",
@@ -194,9 +197,10 @@
"permissions": [
{
"amend": 0,
"cancel": 0,
"apply_user_permissions": 1,
"create": 0,
"email": 1,
"export": 1,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -207,9 +211,9 @@
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"email": 1,
"export": 1,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -217,17 +221,6 @@
"role": "Accounts Manager",
"submit": 0,
"write": 0
},
{
"create": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"submit": 0,
"write": 0
}
],
"search_fields": "voucher_no,account,posting_date,against_voucher",

View File

@@ -25,7 +25,8 @@ class GLEntry(Document):
validate_balance_type(self.account, adv_adj)
# Update outstanding amt on against voucher
if self.against_voucher and update_outstanding == 'Yes':
if self.against_voucher_type in ['Journal Voucher', 'Sales Invoice', 'Purchase Invoice'] \
and self.against_voucher and update_outstanding == 'Yes':
update_outstanding_amt(self.account, self.against_voucher_type,
self.against_voucher)

View File

@@ -7,6 +7,11 @@ erpnext.accounts.JournalVoucher = frappe.ui.form.Controller.extend({
onload: function() {
this.load_defaults();
this.setup_queries();
this.setup_balance_formatter();
},
onload_post_render: function() {
cur_frm.get_field("entries").grid.set_multiple_add("account");
},
load_defaults: function() {
@@ -62,6 +67,18 @@ erpnext.accounts.JournalVoucher = frappe.ui.form.Controller.extend({
});
},
setup_balance_formatter: function() {
var df = frappe.meta.get_docfield("Journal Voucher Detail", "balance", this.frm.doc.name);
df.formatter = function(value, df, options, doc) {
var currency = frappe.meta.get_field_currency(df, doc);
var dr_or_cr = value ? ('<label>' + (value > 0.0 ? __("Dr") : __("Cr")) + '</label>') : "";
return "<div style='text-align: right'>"
+ ((value==null || value==="") ? "" : format_currency(Math.abs(value), currency))
+ " " + dr_or_cr
+ "</div>";
}
},
against_voucher: function(doc, cdt, cdn) {
var d = frappe.get_doc(cdt, cdn);
if (d.against_voucher && !flt(d.debit)) {
@@ -104,7 +121,6 @@ erpnext.accounts.JournalVoucher = frappe.ui.form.Controller.extend({
}
});
}
});
cur_frm.script_manager.make(erpnext.accounts.JournalVoucher);

View File

@@ -123,12 +123,6 @@
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "column_break99",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "difference",
"fieldtype": "Currency",
@@ -150,10 +144,8 @@
"read_only": 0
},
{
"fieldname": "reference",
"fieldtype": "Section Break",
"label": "Reference",
"options": "icon-pushpin",
"fieldname": "column_break99",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0
},
@@ -181,6 +173,31 @@
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "user_remark",
"fieldtype": "Small Text",
"in_filter": 1,
"label": "User Remark",
"no_copy": 1,
"oldfieldname": "user_remark",
"oldfieldtype": "Small Text",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "view_details",
"fieldtype": "Fold",
"label": "View Details",
"permlevel": 0
},
{
"fieldname": "reference",
"fieldtype": "Section Break",
"label": "Reference",
"options": "icon-pushpin",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "clearance_date",
"fieldtype": "Date",
@@ -194,23 +211,6 @@
"read_only": 1,
"search_index": 1
},
{
"fieldname": "column_break98",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "user_remark",
"fieldtype": "Small Text",
"in_filter": 1,
"label": "User Remark",
"no_copy": 1,
"oldfieldname": "user_remark",
"oldfieldtype": "Small Text",
"permlevel": 0,
"read_only": 0
},
{
"description": "User Remark will be added to Auto Remark",
"fieldname": "remark",
@@ -224,6 +224,12 @@
"read_only": 1,
"reqd": 0
},
{
"fieldname": "column_break98",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "bill_no",
"fieldtype": "Data",
@@ -333,6 +339,7 @@
"read_only": 0
},
{
"allow_on_submit": 1,
"fieldname": "letter_head",
"fieldtype": "Link",
"label": "Letter Head",
@@ -426,7 +433,7 @@
{
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
@@ -440,7 +447,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-09 02:16:47.686703",
"modified": "2014-09-09 05:35:31.217863",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Voucher",
@@ -448,6 +455,7 @@
"permissions": [
{
"amend": 1,
"apply_user_permissions": 1,
"cancel": 1,
"create": 1,
"delete": 1,
@@ -476,6 +484,7 @@
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 0,
"delete": 0,

View File

@@ -5,7 +5,7 @@ from __future__ import unicode_literals
import frappe
from frappe.utils import cint, cstr, flt, fmt_money, formatdate, getdate
from frappe import msgprint, _
from frappe import msgprint, _, scrub
from erpnext.setup.utils import get_company_currency
from erpnext.controllers.accounts_controller import AccountsController
@@ -35,18 +35,35 @@ class JournalVoucher(AccountsController):
self.create_remarks()
self.set_aging_date()
self.set_print_format_fields()
self.validate_against_sales_order()
self.validate_against_purchase_order()
def on_submit(self):
if self.voucher_type in ['Bank Voucher', 'Contra Voucher', 'Journal Entry']:
self.check_credit_days()
self.make_gl_entries()
self.check_credit_limit()
self.update_advance_paid()
def update_advance_paid(self):
advance_paid = frappe._dict()
for d in self.get("entries"):
if d.is_advance:
if d.against_sales_order:
advance_paid.setdefault("Sales Order", []).append(d.against_sales_order)
elif d.against_purchase_order:
advance_paid.setdefault("Purchase Order", []).append(d.against_purchase_order)
for voucher_type, order_list in advance_paid.items():
for voucher_no in list(set(order_list)):
frappe.get_doc(voucher_type, voucher_no).set_total_advance_paid()
def on_cancel(self):
from erpnext.accounts.utils import remove_against_link_from_jv
remove_against_link_from_jv(self.doctype, self.name, "against_jv")
self.make_gl_entries(1)
self.update_advance_paid()
def validate_cheque_info(self):
if self.voucher_type in ['Bank Voucher']:
@@ -64,7 +81,8 @@ class JournalVoucher(AccountsController):
master_type = frappe.db.get_value("Account", d.account, "master_type")
if (master_type == 'Customer' and flt(d.credit) > 0) or \
(master_type == 'Supplier' and flt(d.debit) > 0):
msgprint(_("Please check 'Is Advance' against Account {0} if this is an advance entry.").format(d.account))
msgprint(_("Row {0}: Please check 'Is Advance' against Account {1} if this \
is an advance entry.").format(d.idx, d.account))
def validate_against_jv(self):
for d in self.get('entries'):
@@ -90,24 +108,86 @@ class JournalVoucher(AccountsController):
.format(d.against_jv, dr_or_cr))
def validate_against_sales_invoice(self):
for d in self.get("entries"):
if d.against_invoice:
if d.debit > 0:
frappe.throw(_("Row {0}: Debit entry can not be linked with a Sales Invoice")
.format(d.idx))
if frappe.db.get_value("Sales Invoice", d.against_invoice, "debit_to") != d.account:
frappe.throw(_("Row {0}: Account does not match with \
Sales Invoice Debit To account").format(d.idx, d.account))
payment_against_voucher = self.validate_account_in_against_voucher("against_invoice", "Sales Invoice")
self.validate_against_invoice_fields("Sales Invoice", payment_against_voucher)
def validate_against_purchase_invoice(self):
payment_against_voucher = self.validate_account_in_against_voucher("against_voucher", "Purchase Invoice")
self.validate_against_invoice_fields("Purchase Invoice", payment_against_voucher)
def validate_against_sales_order(self):
payment_against_voucher = self.validate_account_in_against_voucher("against_sales_order", "Sales Order")
self.validate_against_order_fields("Sales Order", payment_against_voucher)
def validate_against_purchase_order(self):
payment_against_voucher = self.validate_account_in_against_voucher("against_purchase_order", "Purchase Order")
self.validate_against_order_fields("Purchase Order", payment_against_voucher)
def validate_account_in_against_voucher(self, against_field, doctype):
payment_against_voucher = frappe._dict()
field_dict = {'Sales Invoice': "Debit To",
'Purchase Invoice': "Credit To",
'Sales Order': "Customer",
'Purchase Order': "Supplier"
}
for d in self.get("entries"):
if d.against_voucher:
if flt(d.credit) > 0:
frappe.throw(_("Row {0}: Credit entry can not be linked with a Purchase Invoice")
.format(d.idx))
if frappe.db.get_value("Purchase Invoice", d.against_voucher, "credit_to") != d.account:
frappe.throw(_("Row {0}: Account does not match with \
Purchase Invoice Credit To account").format(d.idx, d.account))
if d.get(against_field):
dr_or_cr = "credit" if against_field in ["against_invoice", "against_sales_order"] \
else "debit"
if against_field in ["against_invoice", "against_sales_order"] \
and flt(d.debit) > 0:
frappe.throw(_("Row {0}: Debit entry can not be linked with a {1}").format(d.idx, doctype))
if against_field in ["against_voucher", "against_purchase_order"] \
and flt(d.credit) > 0:
frappe.throw(_("Row {0}: Credit entry can not be linked with a {1}").format(d.idx, doctype))
voucher_account = frappe.db.get_value(doctype, d.get(against_field), \
scrub(field_dict.get(doctype)))
account_master_name = frappe.db.get_value("Account", d.account, "master_name")
if against_field in ["against_invoice", "against_voucher"] \
and voucher_account != d.account:
frappe.throw(_("Row {0}: Account {1} does not match with {2} {3} account") \
.format(d.idx, d.account, doctype, field_dict.get(doctype)))
if against_field in ["against_sales_order", "against_purchase_order"]:
if voucher_account != account_master_name:
frappe.throw(_("Row {0}: Account {1} does not match with {2} {3} Name") \
.format(d.idx, d.account, doctype, field_dict.get(doctype)))
elif d.is_advance == "Yes":
payment_against_voucher.setdefault(d.get(against_field), []).append(flt(d.get(dr_or_cr)))
return payment_against_voucher
def validate_against_invoice_fields(self, doctype, payment_against_voucher):
for voucher_no, payment_list in payment_against_voucher.items():
voucher_properties = frappe.db.get_value(doctype, voucher_no,
["docstatus", "outstanding_amount"])
if voucher_properties[0] != 1:
frappe.throw(_("{0} {1} is not submitted").format(doctype, voucher_no))
if flt(voucher_properties[1]) < flt(sum(payment_list)):
frappe.throw(_("Payment against {0} {1} cannot be greater \
than Outstanding Amount {2}").format(doctype, voucher_no, voucher_properties[1]))
def validate_against_order_fields(self, doctype, payment_against_voucher):
for voucher_no, payment_list in payment_against_voucher.items():
voucher_properties = frappe.db.get_value(doctype, voucher_no,
["docstatus", "per_billed", "advance_paid", "grand_total"])
if voucher_properties[0] != 1:
frappe.throw(_("{0} {1} is not submitted").format(doctype, voucher_no))
if flt(voucher_properties[1]) >= 100:
frappe.throw(_("{0} {1} is fully billed").format(doctype, voucher_no))
if flt(voucher_properties[3]) < flt(voucher_properties[2]) + flt(sum(payment_list)):
frappe.throw(_("Advance paid against {0} {1} cannot be greater \
than Grand Total {2}").format(doctype, voucher_no, voucher_properties[3]))
def set_against_account(self):
accounts_debited, accounts_credited = [], []
@@ -142,12 +222,18 @@ class JournalVoucher(AccountsController):
if self.cheque_date:
r.append(_('Reference #{0} dated {1}').format(self.cheque_no, formatdate(self.cheque_date)))
else:
msgprint(_("Please enter Reference date"), raise_exception=1)
msgprint(_("Please enter Reference date"), raise_exception=frappe.MandatoryError)
for d in self.get('entries'):
if d.against_invoice and d.credit:
currency = frappe.db.get_value("Sales Invoice", d.against_invoice, "currency")
r.append(_("{0} {1} against Invoice {1}").format(currency, fmt_money(flt(d.credit)), d.against_invoice))
r.append(_("{0} against Sales Invoice {1}").format(fmt_money(flt(d.credit), currency = currency), \
d.against_invoice))
if d.against_sales_order and d.credit:
currency = frappe.db.get_value("Sales Order", d.against_sales_order, "currency")
r.append(_("{0} against Sales Order {1}").format(fmt_money(flt(d.credit), currency = currency), \
d.against_sales_order))
if d.against_voucher and d.debit:
bill_no = frappe.db.sql("""select bill_no, bill_date, currency
@@ -158,13 +244,17 @@ class JournalVoucher(AccountsController):
fmt_money(flt(d.debit)), bill_no[0][0],
bill_no[0][1] and formatdate(bill_no[0][1].strftime('%Y-%m-%d'))))
if d.against_purchase_order and d.debit:
currency = frappe.db.get_value("Purchase Order", d.against_purchase_order, "currency")
r.append(_("{0} against Purchase Order {1}").format(fmt_money(flt(d.credit), currency = currency), \
d.against_purchase_order))
if self.user_remark:
r.append(_("Note: {0}").format(self.user_remark))
if r:
self.remark = ("\n").join(r)
else:
frappe.msgprint(_("User Remarks is mandatory"), raise_exception=1)
self.remark = ("\n").join(r) #User Remarks is not mandatory
def set_aging_date(self):
if self.is_opening != 'Yes':
@@ -186,9 +276,14 @@ class JournalVoucher(AccountsController):
def set_print_format_fields(self):
for d in self.get('entries'):
account_type, master_type = frappe.db.get_value("Account", d.account,
result = frappe.db.get_value("Account", d.account,
["account_type", "master_type"])
if not result:
continue
account_type, master_type = result
if master_type in ['Supplier', 'Customer']:
if not self.pay_to_recd_from:
self.pay_to_recd_from = frappe.db.get_value(master_type,
@@ -198,7 +293,7 @@ class JournalVoucher(AccountsController):
if account_type in ['Bank', 'Cash']:
company_currency = get_company_currency(self.company)
amt = flt(d.debit) and d.debit or d.credit
self.total_amount = company_currency + ' ' + cstr(amt)
self.total_amount = fmt_money(amt, currency=company_currency)
from frappe.utils import money_in_words
self.total_amount_in_words = money_in_words(amt, company_currency)
@@ -259,14 +354,18 @@ class JournalVoucher(AccountsController):
"against": d.against_account,
"debit": flt(d.debit, self.precision("debit", "entries")),
"credit": flt(d.credit, self.precision("credit", "entries")),
"against_voucher_type": ((d.against_voucher and "Purchase Invoice")
or (d.against_invoice and "Sales Invoice")
or (d.against_jv and "Journal Voucher")),
"against_voucher": d.against_voucher or d.against_invoice or d.against_jv,
"against_voucher_type": (("Purchase Invoice" if d.against_voucher else None)
or ("Sales Invoice" if d.against_invoice else None)
or ("Journal Voucher" if d.against_jv else None)
or ("Sales Order" if d.against_sales_order else None)
or ("Purchase Order" if d.against_purchase_order else None)),
"against_voucher": d.against_voucher or d.against_invoice or d.against_jv
or d.against_sales_order or d.against_purchase_order,
"remarks": self.remark,
"cost_center": d.cost_center
})
)
if gl_map:
make_gl_entries(gl_map, cancel=cancel, adv_adj=adv_adj)
@@ -410,7 +509,7 @@ def get_opening_accounts(company):
"""get all balance sheet accounts for opening entry"""
from erpnext.accounts.utils import get_balance_on
accounts = frappe.db.sql_list("""select name from tabAccount
where group_or_ledger='Ledger' and report_type='Profit and Loss' and company=%s""", company)
where group_or_ledger='Ledger' and report_type='Balance Sheet' and company=%s""", company)
return [{"account": a, "balance": get_balance_on(a)} for a in accounts]

View File

@@ -0,0 +1,20 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-10">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
<span class="text-muted" style="margin-right: 8px;">
{%= doc.get_formatted("posting_date") %}</span>
<span class="label label-info filterable"
data-filter="voucher_type,=,{%= doc.voucher_type %}">
{%= doc.voucher_type %}
</span>
{% if(doc.docstatus===0) { %}
<span class="label label-danger filterable"
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
{% } %}
</div>
</div>
<div class="col-xs-2 text-right">
{%= doc.get_formatted("total_debit") %}
</div>
</div>

View File

@@ -0,0 +1,3 @@
frappe.listview_settings['Journal Voucher'] = {
add_fields: ["voucher_type", "posting_date", "total_debit", "company"]
};

View File

@@ -1,41 +1,88 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
import unittest, frappe
from frappe.utils import flt
class TestJournalVoucher(unittest.TestCase):
def test_journal_voucher_with_against_jv(self):
self.clear_account_balance()
jv_invoice = frappe.copy_doc(test_records[2])
jv_invoice.insert()
jv_invoice.submit()
base_jv = frappe.copy_doc(test_records[0])
self.jv_against_voucher_testcase(base_jv, jv_invoice)
self.assertTrue(frappe.db.sql("""select name from `tabJournal Voucher Detail`
where account = %s and docstatus = 1 and parent = %s""",
("_Test Customer - _TC", jv_invoice.name)))
def test_jv_against_sales_order(self):
from erpnext.selling.doctype.sales_order.test_sales_order \
import test_records as so_test_records
sales_order = frappe.copy_doc(so_test_records[0])
base_jv = frappe.copy_doc(test_records[0])
self.jv_against_voucher_testcase(base_jv, sales_order)
def test_jv_against_purchase_order(self):
from erpnext.buying.doctype.purchase_order.test_purchase_order \
import test_records as po_test_records
purchase_order = frappe.copy_doc(po_test_records[0])
base_jv = frappe.copy_doc(test_records[1])
self.jv_against_voucher_testcase(base_jv, purchase_order)
def jv_against_voucher_testcase(self, base_jv, test_voucher):
dr_or_cr = "credit" if test_voucher.doctype in ["Sales Order", "Journal Voucher"] else "debit"
field_dict = {'Journal Voucher': "against_jv",
'Sales Order': "against_sales_order",
'Purchase Order': "against_purchase_order"
}
self.clear_account_balance()
test_voucher.insert()
test_voucher.submit()
if test_voucher.doctype == "Journal Voucher":
self.assertTrue(frappe.db.sql("""select name from `tabJournal Voucher Detail`
where account = %s and docstatus = 1 and parent = %s""",
("_Test Customer - _TC", test_voucher.name)))
self.assertTrue(not frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_jv=%s""", jv_invoice.name))
where %s=%s""" % (field_dict.get(test_voucher.doctype), '%s'), (test_voucher.name)))
jv_payment = frappe.copy_doc(test_records[0])
jv_payment.get("entries")[0].against_jv = jv_invoice.name
jv_payment.insert()
jv_payment.submit()
base_jv.get("entries")[0].is_advance = "Yes" if (test_voucher.doctype in ["Sales Order", "Purchase Order"]) else "No"
base_jv.get("entries")[0].set(field_dict.get(test_voucher.doctype), test_voucher.name)
base_jv.insert()
base_jv.submit()
submitted_voucher = frappe.get_doc(test_voucher.doctype, test_voucher.name)
self.assertTrue(frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_jv=%s""", jv_invoice.name))
where %s=%s""" % (field_dict.get(test_voucher.doctype), '%s'), (submitted_voucher.name)))
self.assertTrue(frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_jv=%s and credit=400""", jv_invoice.name))
where %s=%s and %s=400""" % (field_dict.get(submitted_voucher.doctype), '%s', dr_or_cr), (submitted_voucher.name)))
# cancel jv_invoice
jv_invoice.cancel()
if base_jv.get("entries")[0].is_advance == "Yes":
self.advance_paid_testcase(base_jv, submitted_voucher, dr_or_cr)
self.cancel_against_voucher_testcase(submitted_voucher)
self.assertTrue(not frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_jv=%s""", jv_invoice.name))
def advance_paid_testcase(self, base_jv, test_voucher, dr_or_cr):
#Test advance paid field
advance_paid = frappe.db.sql("""select advance_paid from `tab%s`
where name=%s""" % (test_voucher.doctype, '%s'), (test_voucher.name))
payment_against_order = base_jv.get("entries")[0].get(dr_or_cr)
self.assertTrue(flt(advance_paid[0][0]) == flt(payment_against_order))
def cancel_against_voucher_testcase(self, test_voucher):
if test_voucher.doctype == "Journal Voucher":
# if test_voucher is a Journal Voucher, test cancellation of test_voucher
test_voucher.cancel()
self.assertTrue(not frappe.db.sql("""select name from `tabJournal Voucher Detail`
where against_jv=%s""", test_voucher.name))
elif test_voucher.doctype in ["Sales Order", "Purchase Order"]:
# if test_voucher is a Sales Order/Purchase Order, test error on cancellation of test_voucher
submitted_voucher = frappe.get_doc(test_voucher.doctype, test_voucher.name)
self.assertRaises(frappe.LinkExistsError, submitted_voucher.cancel)
def test_jv_against_stock_account(self):
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory

View File

@@ -1,6 +1,6 @@
{
"autoname": "JVD.######",
"creation": "2013-02-22 01:27:39.000000",
"creation": "2013-02-22 01:27:39",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -31,6 +31,7 @@
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0,
"print_hide": 1,
"print_width": "180px",
"search_index": 0,
"width": "180px"
@@ -50,6 +51,7 @@
"oldfieldtype": "Data",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
@@ -115,11 +117,6 @@
"print_hide": 0,
"search_index": 1
},
{
"fieldname": "col_break3",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "against_jv",
"fieldtype": "Link",
@@ -133,6 +130,25 @@
"print_hide": 0,
"search_index": 1
},
{
"fieldname": "col_break3",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "against_sales_order",
"fieldtype": "Link",
"label": "Against Sales Order",
"options": "Sales Order",
"permlevel": 0
},
{
"fieldname": "against_purchase_order",
"fieldtype": "Link",
"label": "Against Purchase Order",
"options": "Purchase Order",
"permlevel": 0
},
{
"fieldname": "is_advance",
"fieldtype": "Select",
@@ -158,9 +174,10 @@
],
"idx": 1,
"istable": 1,
"modified": "2014-02-03 12:44:31.000000",
"modified": "2014-08-20 12:19:55.049973",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Voucher Detail",
"owner": "Administrator"
"owner": "Administrator",
"permissions": []
}

View File

@@ -31,7 +31,7 @@
"description": "Default Bank / Cash account will be automatically updated in POS Invoice when this mode is selected.",
"fieldname": "default_account",
"fieldtype": "Link",
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"in_list_view": 1,
"label": "Default Account",
"options": "Account",
@@ -41,7 +41,7 @@
],
"icon": "icon-credit-card",
"idx": 1,
"modified": "2014-05-07 05:06:13.702313",
"modified": "2014-05-27 03:49:13.846602",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Mode of Payment",
@@ -59,6 +59,7 @@
"write": 1
},
{
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
"report": 1,

View File

@@ -0,0 +1,82 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// For license information, please see license.txt
frappe.provide("erpnext.accounts");
erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.extend({
onload: function() {
var me = this
this.frm.set_query('party_account', function() {
if(!me.frm.doc.company) {
msgprint(__("Please select company first"));
} else {
return{
filters:[
['Account', 'company', '=', me.frm.doc.company],
['Account', 'group_or_ledger', '=', 'Ledger'],
['Account', 'master_type', 'in', ['Customer', 'Supplier']]
]
};
}
});
this.frm.set_query('bank_cash_account', function() {
if(!me.frm.doc.company) {
msgprint(__("Please select company first"));
} else {
return{
filters:[
['Account', 'company', '=', me.frm.doc.company],
['Account', 'group_or_ledger', '=', 'Ledger'],
['Account', 'account_type', 'in', ['Bank', 'Cash']]
]
};
}
});
var help_content = '<i class="icon-hand-right"></i> ' + __("Note") + ':<br>'+
'<ul>' + __("If you are unable to match the exact amount, then amend your Journal Voucher and split rows such that payment amount match the invoice amount.") + '</ul>';
this.frm.set_value("reconcile_help", help_content);
},
get_unreconciled_entries: function() {
var me = this;
return this.frm.call({
doc: me.frm.doc,
method: 'get_unreconciled_entries',
callback: function(r, rt) {
var invoices = [];
$.each(me.frm.doc.payment_reconciliation_invoices || [], function(i, row) {
if (row.invoice_number && !inList(invoices, row.invoice_number))
invoices.push(row.invoice_number);
});
frappe.meta.get_docfield("Payment Reconciliation Payment", "invoice_number",
me.frm.doc.name).options = invoices.join("\n");
$.each(me.frm.doc.payment_reconciliation_payments || [], function(i, p) {
if(!inList(invoices, cstr(p.invoice_number))) p.invoice_number = null;
});
refresh_field("payment_reconciliation_payments");
}
});
},
reconcile: function() {
var me = this;
return this.frm.call({
doc: me.frm.doc,
method: 'reconcile'
});
}
});
$.extend(cur_frm.cscript, new erpnext.accounts.PaymentReconciliationController({frm: cur_frm}));
cur_frm.add_fetch('party_account', 'master_type', 'party_type')

View File

@@ -0,0 +1,163 @@
{
"allow_copy": 1,
"creation": "2014-07-09 12:04:51.681583",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"permlevel": 0,
"reqd": 1
},
{
"depends_on": "",
"fieldname": "party_account",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Party Account",
"options": "Account",
"permlevel": 0,
"reqd": 1,
"search_index": 0
},
{
"fieldname": "party_type",
"fieldtype": "Select",
"hidden": 1,
"in_list_view": 1,
"label": "Party Type",
"options": "\nCustomer\nSupplier",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
{
"fieldname": "bank_cash_account",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Bank / Cash Account",
"options": "Account",
"permlevel": 0,
"reqd": 0,
"search_index": 0
},
{
"fieldname": "col_break1",
"fieldtype": "Column Break",
"label": "Column Break",
"permlevel": 0
},
{
"fieldname": "from_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "From Date",
"permlevel": 0,
"search_index": 1
},
{
"fieldname": "to_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "To Date",
"permlevel": 0,
"search_index": 1
},
{
"fieldname": "minimum_amount",
"fieldtype": "Currency",
"label": "Minimum Amount",
"permlevel": 0
},
{
"fieldname": "maximum_amount",
"fieldtype": "Currency",
"label": "Maximum Amount",
"permlevel": 0
},
{
"fieldname": "get_unreconciled_entries",
"fieldtype": "Button",
"label": "Get Unreconciled Entries",
"permlevel": 0
},
{
"fieldname": "sec_break1",
"fieldtype": "Section Break",
"label": "Unreconciled Payment Details",
"permlevel": 0
},
{
"fieldname": "payment_reconciliation_payments",
"fieldtype": "Table",
"label": "Payment Reconciliation Payments",
"options": "Payment Reconciliation Payment",
"permlevel": 0
},
{
"fieldname": "reconcile",
"fieldtype": "Button",
"label": "Reconcile",
"permlevel": 0
},
{
"fieldname": "sec_break2",
"fieldtype": "Section Break",
"label": "Invoice/Journal Voucher Details",
"permlevel": 0
},
{
"fieldname": "payment_reconciliation_invoices",
"fieldtype": "Table",
"label": "Payment Reconciliation Invoices",
"options": "Payment Reconciliation Invoice",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "reconcile_help",
"fieldtype": "Small Text",
"label": "",
"permlevel": 0,
"read_only": 1
}
],
"hide_toolbar": 1,
"icon": "icon-resize-horizontal",
"issingle": 1,
"modified": "2014-07-31 05:43:03.410832",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"permlevel": 0,
"read": 1,
"role": "Accounts Manager",
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 1,
"permlevel": 0,
"read": 1,
"role": "Accounts User",
"submit": 0,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,187 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt
from frappe import msgprint, _
from frappe.model.document import Document
class PaymentReconciliation(Document):
def get_unreconciled_entries(self):
self.get_jv_entries()
self.get_invoice_entries()
def get_jv_entries(self):
self.check_mandatory_to_fetch()
dr_or_cr = "credit" if self.party_type == "Customer" else "debit"
cond = self.check_condition(dr_or_cr)
bank_account_condition = "t2.against_account like %(bank_cash_account)s" \
if self.bank_cash_account else "1=1"
jv_entries = frappe.db.sql("""
select
t1.name as voucher_no, t1.posting_date, t1.remark, t2.account,
t2.name as voucher_detail_no, {dr_or_cr} as payment_amount, t2.is_advance
from
`tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
where
t1.name = t2.parent and t1.docstatus = 1 and t2.docstatus = 1
and t2.account = %(party_account)s and {dr_or_cr} > 0
and ifnull(t2.against_voucher, '')='' and ifnull(t2.against_invoice, '')=''
and ifnull(t2.against_jv, '')='' {cond}
and (CASE
WHEN t1.voucher_type in ('Debit Note', 'Credit Note')
THEN 1=1
ELSE {bank_account_condition}
END)
""".format(**{
"dr_or_cr": dr_or_cr,
"cond": cond,
"bank_account_condition": bank_account_condition,
}), {
"party_account": self.party_account,
"bank_cash_account": "%%%s%%" % self.bank_cash_account
}, as_dict=1)
self.add_payment_entries(jv_entries)
def add_payment_entries(self, jv_entries):
self.set('payment_reconciliation_payments', [])
for e in jv_entries:
ent = self.append('payment_reconciliation_payments', {})
ent.journal_voucher = e.get('voucher_no')
ent.posting_date = e.get('posting_date')
ent.amount = flt(e.get('payment_amount'))
ent.remark = e.get('remark')
ent.voucher_detail_number = e.get('voucher_detail_no')
ent.is_advance = e.get('is_advance')
def get_invoice_entries(self):
#Fetch JVs, Sales and Purchase Invoices for 'payment_reconciliation_invoices' to reconcile against
non_reconciled_invoices = []
dr_or_cr = "debit" if self.party_type == "Customer" else "credit"
cond = self.check_condition(dr_or_cr)
invoice_list = frappe.db.sql("""
select
voucher_no, voucher_type, posting_date,
ifnull(sum({dr_or_cr}), 0) as invoice_amount
from
`tabGL Entry`
where
account = %s and {dr_or_cr} > 0 {cond}
group by voucher_type, voucher_no
""".format(**{
"cond": cond,
"dr_or_cr": dr_or_cr
}), (self.party_account), as_dict=True)
for d in invoice_list:
payment_amount = frappe.db.sql("""
select
ifnull(sum(ifnull({0}, 0)), 0)
from
`tabGL Entry`
where
account = %s and {0} > 0
and against_voucher_type = %s and ifnull(against_voucher, '') = %s
""".format("credit" if self.party_type == "Customer" else "debit"),
(self.party_account, d.voucher_type, d.voucher_no))
payment_amount = payment_amount[0][0] if payment_amount else 0
if d.invoice_amount > payment_amount:
non_reconciled_invoices.append({
'voucher_no': d.voucher_no,
'voucher_type': d.voucher_type,
'posting_date': d.posting_date,
'invoice_amount': flt(d.invoice_amount),
'outstanding_amount': d.invoice_amount - payment_amount})
self.add_invoice_entries(non_reconciled_invoices)
def add_invoice_entries(self, non_reconciled_invoices):
#Populate 'payment_reconciliation_invoices' with JVs and Invoices to reconcile against
self.set('payment_reconciliation_invoices', [])
for e in non_reconciled_invoices:
ent = self.append('payment_reconciliation_invoices', {})
ent.invoice_type = e.get('voucher_type')
ent.invoice_number = e.get('voucher_no')
ent.invoice_date = e.get('posting_date')
ent.amount = flt(e.get('invoice_amount'))
ent.outstanding_amount = e.get('outstanding_amount')
def reconcile(self, args):
self.get_invoice_entries()
self.validate_invoice()
dr_or_cr = "credit" if self.party_type == "Customer" else "debit"
lst = []
for e in self.get('payment_reconciliation_payments'):
if e.invoice_type and e.invoice_number:
lst.append({
'voucher_no' : e.journal_voucher,
'voucher_detail_no' : e.voucher_detail_number,
'against_voucher_type' : e.invoice_type,
'against_voucher' : e.invoice_number,
'account' : self.party_account,
'is_advance' : e.is_advance,
'dr_or_cr' : dr_or_cr,
'unadjusted_amt' : flt(e.amount),
'allocated_amt' : flt(e.amount)
})
if lst:
from erpnext.accounts.utils import reconcile_against_document
reconcile_against_document(lst)
msgprint(_("Successfully Reconciled"))
self.get_unreconciled_entries()
def check_mandatory_to_fetch(self):
for fieldname in ["company", "party_account"]:
if not self.get(fieldname):
frappe.throw(_("Please select {0} first").format(self.meta.get_label(fieldname)))
def validate_invoice(self):
if not self.get("payment_reconciliation_invoices"):
frappe.throw(_("No records found in the Invoice table"))
if not self.get("payment_reconciliation_payments"):
frappe.throw(_("No records found in the Payment table"))
unreconciled_invoices = frappe._dict()
for d in self.get("payment_reconciliation_invoices"):
unreconciled_invoices.setdefault(d.invoice_type, {}).setdefault(d.invoice_number, d.outstanding_amount)
invoices_to_reconcile = []
for p in self.get("payment_reconciliation_payments"):
if p.invoice_type and p.invoice_number:
invoices_to_reconcile.append(p.invoice_number)
if p.invoice_number not in unreconciled_invoices.get(p.invoice_type, {}):
frappe.throw(_("{0}: {1} not found in Invoice Details table")
.format(p.invoice_type, p.invoice_number))
if p.amount > unreconciled_invoices.get(p.invoice_type, {}).get(p.invoice_number):
frappe.throw(_("Row {0}: Payment amount must be less than or equals to invoice outstanding amount. Please refer Note below.").format(p.idx))
if not invoices_to_reconcile:
frappe.throw(_("Please select Invoice Type and Invoice Number in atleast one row"))
def check_condition(self, dr_or_cr):
cond = self.from_date and " and posting_date >= '" + self.from_date + "'" or ""
cond += self.to_date and " and posting_date <= '" + self.to_date + "'" or ""
if self.minimum_amount:
cond += " and {0} >= %s".format(dr_or_cr) % self.minimum_amount
if self.maximum_amount:
cond += " and {0} <= %s".format(dr_or_cr) % self.maximum_amount
return cond

View File

@@ -0,0 +1,66 @@
{
"creation": "2014-07-09 16:14:23.672922",
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "invoice_type",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Invoice Type",
"options": "Sales Invoice\nPurchase Invoice\nJournal Voucher",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "invoice_number",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Invoice Number",
"options": "",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "invoice_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Invoice Date",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "col_break1",
"fieldtype": "Column Break",
"label": "Column Break",
"permlevel": 0
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "outstanding_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Outstanding Amount",
"permlevel": 0,
"read_only": 1
}
],
"istable": 1,
"modified": "2014-07-18 12:20:51.269974",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Invoice",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class PaymentReconciliationInvoice(Document):
pass

View File

@@ -0,0 +1,107 @@
{
"creation": "2014-07-09 16:13:35.452759",
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "journal_voucher",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Journal Voucher",
"options": "Journal Voucher",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
{
"fieldname": "posting_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Posting Date",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "is_advance",
"fieldtype": "Data",
"hidden": 1,
"label": "Is Advance",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "voucher_detail_number",
"fieldtype": "Data",
"hidden": 1,
"in_list_view": 0,
"label": "Voucher Detail Number",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "col_break1",
"fieldtype": "Column Break",
"label": "Column Break",
"permlevel": 0
},
{
"default": "Sales Invoice",
"fieldname": "invoice_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Invoice Type",
"options": "\nSales Invoice\nPurchase Invoice\nJournal Voucher",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"fieldname": "invoice_number",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Invoice Number",
"options": "",
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "sec_break1",
"fieldtype": "Section Break",
"label": "",
"permlevel": 0
},
{
"fieldname": "remark",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Remark",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "col_break2",
"fieldtype": "Column Break",
"label": "Column Break",
"permlevel": 0
}
],
"istable": 1,
"modified": "2014-07-21 16:53:56.206169",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Payment",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class PaymentReconciliationPayment(Document):
pass

View File

@@ -1 +0,0 @@
Tool for mapping (cancelling) unpaid invoices and payments.

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,51 +0,0 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
cur_frm.cscript.onload_post_render = function(doc) {
$(cur_frm.get_field("reconcile").input).addClass("btn-info");
}
cur_frm.fields_dict.voucher_no.get_query = function(doc) {
// TO-do: check for pos, it should not come
if (!doc.account) msgprint(__("Please select Account first"));
else {
return {
doctype: doc.voucher_type,
query: "erpnext.accounts.doctype.payment_to_invoice_matching_tool.payment_to_invoice_matching_tool.get_voucher_nos",
filters: {
"voucher_type": doc.voucher_type,
"account": doc.account
}
}
}
}
cur_frm.cscript.voucher_no = function() {
return cur_frm.call({
doc: cur_frm.doc,
method: "get_voucher_details"
});
}
cur_frm.cscript.get_against_entries = function() {
return cur_frm.call({
doc: cur_frm.doc,
method: "get_against_entries"
});
}
cur_frm.cscript.reconcile = function() {
return cur_frm.call({
doc: cur_frm.doc,
method: "reconcile"
});
}
cur_frm.cscript.allocated_amount = function(doc, cdt, cdn) {
var total_allocated_amount = 0
$.each(cur_frm.doc.against_entries, function(i, d) {
if(d.allocated_amount > 0) total_allocated_amount += flt(d.allocated_amount);
else if (d.allocated_amount < 0) frappe.throw(__("Allocated amount can not be negative"));
})
cur_frm.set_value("total_allocated_amount", total_allocated_amount);
}

View File

@@ -1,187 +0,0 @@
{
"creation": "2013-01-30 12:49:46",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Other",
"fields": [
{
"fieldname": "account",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Account",
"options": "Account",
"permlevel": 0,
"reqd": 1
},
{
"default": "Journal Voucher",
"fieldname": "voucher_type",
"fieldtype": "Select",
"in_list_view": 0,
"label": "Voucher Type",
"options": "Sales Invoice\nPurchase Invoice\nJournal Voucher",
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "voucher_no",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Voucher No",
"options": "[Select]",
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"in_list_view": 0,
"permlevel": 0,
"print_width": "50%",
"width": "50%"
},
{
"fieldname": "total_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Total Amount",
"options": "",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "unmatched_amount",
"fieldtype": "Currency",
"label": "Unmatched Amount",
"options": "",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "against_entries_section",
"fieldtype": "Section Break",
"label": "Against Entries",
"permlevel": 0
},
{
"fieldname": "from_date",
"fieldtype": "Date",
"label": "From Date",
"permlevel": 0
},
{
"fieldname": "to_date",
"fieldtype": "Date",
"label": "To Date",
"permlevel": 0
},
{
"fieldname": "column_break3",
"fieldtype": "Column Break",
"label": "",
"permlevel": 0,
"print_width": "50%",
"width": "50%"
},
{
"fieldname": "amt_greater_than",
"fieldtype": "Currency",
"label": "Amount >=",
"permlevel": 0
},
{
"fieldname": "amt_less_than",
"fieldtype": "Currency",
"label": "Amount <=",
"permlevel": 0
},
{
"fieldname": "section_break0",
"fieldtype": "Section Break",
"options": "Simple",
"permlevel": 0
},
{
"fieldname": "get_against_entries",
"fieldtype": "Button",
"label": "Get Against Entries",
"options": "",
"permlevel": 0
},
{
"description": "Update allocated amount in the above table and then click \"Allocate\" button",
"fieldname": "against_entries",
"fieldtype": "Table",
"label": "Against Entries",
"options": "Payment to Invoice Matching Tool Detail",
"permlevel": 0
},
{
"fieldname": "sec_break1",
"fieldtype": "Section Break",
"options": "Simple",
"permlevel": 0
},
{
"fieldname": "total_allocated_amount",
"fieldtype": "Currency",
"label": "Total Allocated Amount",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "col_breal4",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"default": "",
"fieldname": "allocate_amount_automatically",
"fieldtype": "Button",
"hidden": 1,
"label": "Allocate Amount Automatically",
"permlevel": 0,
"reqd": 0
},
{
"fieldname": "reconcile",
"fieldtype": "Button",
"label": "Reconcile",
"options": "",
"permlevel": 0
}
],
"hide_toolbar": 0,
"icon": "icon-magic",
"idx": 1,
"issingle": 1,
"modified": "2014-04-30 17:11:05.908619",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment to Invoice Matching Tool",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 0,
"role": "Accounts Manager",
"submit": 0,
"write": 1
},
{
"create": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 0,
"role": "Accounts User",
"submit": 0,
"write": 1
}
]
}

View File

@@ -1,173 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt
from frappe import msgprint, _
from frappe.model.document import Document
class PaymenttoInvoiceMatchingTool(Document):
def get_voucher_details(self):
total_amount = frappe.db.sql("""select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
from `tabGL Entry`
where voucher_type = %s and voucher_no = %s
and account = %s and ifnull(against_voucher, '') != voucher_no""",
(self.voucher_type, self.voucher_no, self.account))
self.total_amount = total_amount and flt(total_amount[0][0]) or 0
reconciled_payment = frappe.db.sql("""
select abs(sum(ifnull(debit, 0)) - sum(ifnull(credit, 0)))
from `tabGL Entry`
where against_voucher_type = %s and against_voucher = %s and account = %s
""", (self.voucher_type, self.voucher_no, self.account))
reconciled_payment = reconciled_payment and flt(reconciled_payment[0][0]) or 0
self.unmatched_amount = self.total_amount - reconciled_payment
def get_against_entries(self):
self.set('against_entries', [])
gle = self.get_gl_entries()
self.create_against_entries_table(gle)
def get_gl_entries(self):
self.validate_mandatory()
dr_or_cr = "credit" if self.total_amount > 0 else "debit"
cond = self.from_date and " and t1.posting_date >= '" + self.from_date + "'" or ""
cond += self.to_date and " and t1.posting_date <= '" + self.to_date + "'" or ""
if self.amt_greater_than:
cond += ' and abs(ifnull(t2.debit, 0) - ifnull(t2.credit, 0)) >= ' + self.amt_greater_than
if self.amt_less_than:
cond += ' and abs(ifnull(t2.debit, 0) - ifnull(t2.credit, 0)) >= ' + self.amt_less_than
gle = frappe.db.sql("""
select
t1.name as voucher_no, t1.posting_date, t1.total_debit as total_amt,
abs(ifnull(t2.debit, 0) - ifnull(t2.credit, 0)) as unmatched_amount, t1.remark,
t2.against_account, t2.name as voucher_detail_no, t2.is_advance
from
`tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
where
t1.name = t2.parent and t1.docstatus = 1 and t2.account = %s
and ifnull(t2.against_voucher, '')='' and ifnull(t2.against_invoice, '')=''
and ifnull(t2.against_jv, '')='' and t2.%s > 0 and t1.name != %s
and not exists (select * from `tabJournal Voucher Detail`
where parent=%s and against_jv = t1.name) %s
group by t1.name, t2.name """ % ('%s', dr_or_cr, '%s', '%s', cond),
(self.account, self.voucher_no, self.voucher_no), as_dict=1)
return gle
def create_against_entries_table(self, gle):
adjusted_jv = {}
for d in gle:
if not adjusted_jv.has_key(d.get("voucher_no")):
matched_amount = frappe.db.sql("""
select
ifnull(abs(sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))), 0)
from
`tabGL Entry`
where
account = %s and against_voucher_type = "Journal Voucher"
and ifnull(against_voucher, '') = %s
""", (self.account, d.get('voucher_no')))
matched_amount = matched_amount[0][0] if matched_amount else 0
else:
matched_amount = adjusted_jv.get(d.get("voucher_no"))
if matched_amount < flt(d.get('unmatched_amount')):
unmatched_amount = flt(d.get('unmatched_amount')) - matched_amount
adjusted_jv.setdefault(d.get("voucher_no"), 0)
else:
unmatched_amount = 0
adjusted_jv.setdefault(d.get("voucher_no"), matched_amount - flt(d.get('unmatched_amount')))
if unmatched_amount:
ch = self.append('against_entries', {})
ch.voucher_no = d.get('voucher_no')
ch.posting_date = d.get('posting_date')
ch.unmatched_amount = unmatched_amount
ch.total_amt = flt(d.get('total_amt'))
ch.against_account = d.get('against_account')
ch.remarks = d.get('remark')
ch.voucher_detail_no = d.get('voucher_detail_no')
ch.is_advance = d.get("is_advance")
ch.original_amount = flt(d.get('unmatched_amount'))
def validate_mandatory(self):
for fieldname in ["account", "voucher_type", "voucher_no"]:
if not self.get(fieldname):
frappe.throw(_("Please select {0} first").format(self.meta.get_label("fieldname")))
if not frappe.db.exists(self.voucher_type, self.voucher_no):
frappe.throw(_("Voucher No is not valid"))
def reconcile(self):
self.validate_mandatory()
self.validate_allocated_amount()
dr_or_cr = "credit" if self.total_amount > 0 else "debit"
lst = []
for d in self.get('against_entries'):
if flt(d.allocated_amount) > 0:
lst.append({
'voucher_no' : d.voucher_no,
'voucher_detail_no' : d.voucher_detail_no,
'against_voucher_type' : self.voucher_type,
'against_voucher' : self.voucher_no,
'account' : self.account,
'is_advance' : d.is_advance,
'dr_or_cr' : dr_or_cr,
'unadjusted_amt' : flt(d.original_amount),
'allocated_amt' : flt(d.allocated_amount)
})
if lst:
from erpnext.accounts.utils import reconcile_against_document
reconcile_against_document(lst)
self.get_voucher_details()
self.get_against_entries()
msgprint(_("Successfully allocated"))
def validate_allocated_amount(self):
if not self.total_allocated_amount:
frappe.throw(_("You must allocate amount before reconcile"))
elif self.total_allocated_amount > self.unmatched_amount:
frappe.throw(_("Total Allocated Amount can not be greater than unmatched amount"))
def get_voucher_nos(doctype, txt, searchfield, start, page_len, filters):
non_reconclied_entries = []
entries = frappe.db.sql("""
select
voucher_no, posting_date, ifnull(abs(sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))), 0) as amount
from
`tabGL Entry`
where
account = %s and voucher_type = %s and voucher_no like %s
and ifnull(against_voucher, '') = ''
group by voucher_no
""", (filters["account"], filters["voucher_type"], "%%%s%%" % txt), as_dict=True)
for d in entries:
adjusted_amount = frappe.db.sql("""
select
ifnull(abs(sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))), 0)
from
`tabGL Entry`
where
account = %s and against_voucher_type = %s and ifnull(against_voucher, '') = %s
""", (filters["account"], filters["voucher_type"], d.voucher_no))
adjusted_amount = adjusted_amount[0][0] if adjusted_amount else 0
if d.amount > adjusted_amount:
non_reconclied_entries.append([d.voucher_no, d.posting_date, d.amount])
return non_reconclied_entries

View File

@@ -1 +0,0 @@
Journal Voucher (payment) detail for matching to invoice.

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,110 +0,0 @@
{
"creation": "2013-02-22 01:27:39",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "voucher_no",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Voucher No",
"options": "Journal Voucher",
"permlevel": 0,
"print_width": "140px",
"read_only": 1,
"reqd": 0,
"width": "140px"
},
{
"fieldname": "unmatched_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Unmatched Amount",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "allocated_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Allocated Amount",
"options": "Company:company:default_currency",
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "col_break1",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "posting_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Posting Date",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "total_amt",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Total Amount",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "against_account",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Against Account",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "remarks",
"fieldtype": "Small Text",
"label": "Remarks",
"permlevel": 0,
"print_width": "200px",
"read_only": 1,
"width": "200px"
},
{
"fieldname": "voucher_detail_no",
"fieldtype": "Data",
"hidden": 1,
"label": "Voucher Detail No",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
"reqd": 0
},
{
"fieldname": "is_advance",
"fieldtype": "Data",
"hidden": 1,
"label": "Is Advance",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "original_amount",
"fieldtype": "Currency",
"hidden": 1,
"label": "Original Amount",
"permlevel": 0
}
],
"hide_toolbar": 1,
"idx": 1,
"istable": 1,
"modified": "2014-04-30 19:27:15.993641",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment to Invoice Matching Tool Detail",
"owner": "Administrator",
"permissions": []
}

View File

@@ -0,0 +1,217 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// For license information, please see license.txt
frappe.provide("erpnext.payment_tool");
// Help content
frappe.ui.form.on("Payment Tool", "onload", function(frm) {
frm.set_value("make_jv_help", '<i class="icon-hand-right"></i> '
+ __("Note: If payment is not made against any reference, make Journal Voucher manually."));
frm.set_query("payment_account", function() {
return {
filters: [
['Account', 'account_type', 'in', 'Bank, Cash'],
['Account', 'group_or_ledger', '=', 'Ledger'],
['Account', 'company', '=', frm.doc.company]
]
}
});
frm.set_query("against_voucher_type", "payment_tool_details", function() {
return {
filters: {"name": ["in", ["Sales Invoice", "Purchase Invoice", "Journal Voucher", "Sales Order", "Purchase Order"]]}
};
});
});
frappe.ui.form.on("Payment Tool", "refresh", function(frm) {
frappe.ui.form.trigger("Payment Tool", "party_type");
});
frappe.ui.form.on("Payment Tool", "party_type", function(frm) {
frm.toggle_reqd("customer", frm.doc.party_type == "Customer");
frm.toggle_reqd("supplier", frm.doc.party_type == "Supplier");
});
frappe.ui.form.on("Payment Tool", "company", function(frm) {
erpnext.payment_tool.check_mandatory_to_set_button(frm);
});
frappe.ui.form.on("Payment Tool", "received_or_paid", function(frm) {
erpnext.payment_tool.check_mandatory_to_set_button(frm);
});
// Fetch bank/cash account based on payment mode
cur_frm.add_fetch("payment_mode", "default_account", "payment_account");
// Set party account name
frappe.ui.form.on("Payment Tool", "customer", function(frm) {
erpnext.payment_tool.set_party_account(frm);
erpnext.payment_tool.check_mandatory_to_set_button(frm);
});
frappe.ui.form.on("Payment Tool", "supplier", function(frm) {
erpnext.payment_tool.set_party_account(frm);
erpnext.payment_tool.check_mandatory_to_set_button(frm);
});
erpnext.payment_tool.check_mandatory_to_set_button = function(frm) {
if (frm.doc.company && frm.doc.party_type && frm.doc.received_or_paid && (frm.doc.customer || frm.doc.supplier)) {
frm.fields_dict.get_outstanding_vouchers.$input.addClass("btn-primary");
}
}
//Set Button color
erpnext.payment_tool.set_party_account = function(frm) {
if(frm.doc.party_type == "Customer") {
var party_name = frm.doc.customer;
} else {
var party_name = frm.doc.supplier;
}
return frappe.call({
method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_party_account',
args: {
party_type: frm.doc.party_type,
party_name: party_name
},
callback: function(r, rt) {
if(!r.exc) {
frm.set_value("party_account", r.message);
}
}
});
}
// Get outstanding vouchers
frappe.ui.form.on("Payment Tool", "get_outstanding_vouchers", function(frm) {
erpnext.payment_tool.check_mandatory_to_fetch(frm.doc);
frm.set_value("payment_tool_details", []);
return frappe.call({
method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_outstanding_vouchers',
args: {
args: {
"company": frm.doc.company,
"party_type": frm.doc.party_type,
"received_or_paid": frm.doc.received_or_paid,
"party_name": frm.doc.party_type == "Customer" ? frm.doc.customer : frm.doc.supplier,
"party_account": frm.doc.party_account
}
},
callback: function(r, rt) {
if(r.message) {
frm.fields_dict.get_outstanding_vouchers.$input.removeClass("btn-primary");
frm.fields_dict.make_journal_voucher.$input.addClass("btn-primary");
frappe.model.clear_table(frm.doc, "payment_tool_details");
$.each(r.message, function(i, d) {
var invoice_detail = frappe.model.add_child(frm.doc, "Payment Tool Detail", "payment_tool_details");
invoice_detail.against_voucher_type = d.voucher_type;
invoice_detail.against_voucher_no = d.voucher_no;
invoice_detail.total_amount = d.invoice_amount;
invoice_detail.outstanding_amount = d.outstanding_amount;
});
}
refresh_field("payment_tool_details");
erpnext.payment_tool.set_total_payment_amount(frm);
}
});
});
// validate against_voucher_type
frappe.ui.form.on("Payment Tool Detail", "against_voucher_type", function(frm) {
erpnext.payment_tool.validate_against_voucher(frm);
});
erpnext.payment_tool.validate_against_voucher = function(frm) {
$.each(frm.doc.payment_tool_details || [], function(i, row) {
if(frm.doc.party_type=="Customer"
&& !in_list(["Sales Order", "Sales Invoice", "Journal Voucher"], row.against_voucher_type)) {
frappe.model.set_value(row.doctype, row.name, "against_voucher_type", "");
frappe.throw(__("Against Voucher Type must be one of Sales Order, Sales Invoice or Journal Voucher"))
}
if(frm.doc.party_type=="Supplier"
&& !in_list(["Purchase Order", "Purchase Invoice", "Journal Voucher"], row.against_voucher_type)) {
frappe.model.set_value(row.doctype, row.name, "against_voucher_type", "");
frappe.throw(__("Against Voucher Type must be one of Purchase Order, Purchase Invoice or Journal Voucher"))
}
});
}
// validate against_voucher_type
frappe.ui.form.on("Payment Tool Detail", "against_voucher_no", function(frm, cdt, cdn) {
var row = locals[cdt][cdn];
frappe.call({
method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_against_voucher_amount',
args: {
"against_voucher_type": row.against_voucher_type,
"against_voucher_no": row.against_voucher_no
},
callback: function(r) {
if(!r.exc) {
$.each(r.message, function(k, v) {
frappe.model.set_value(cdt, cdn, k, v);
});
}
}
});
});
// Set total payment amount
frappe.ui.form.on("Payment Tool Detail", "payment_amount", function(frm) {
erpnext.payment_tool.set_total_payment_amount(frm);
});
frappe.ui.form.on("Payment Tool Detail", "payment_tool_details_remove", function(frm) {
erpnext.payment_tool.set_total_payment_amount(frm);
});
erpnext.payment_tool.set_total_payment_amount = function(frm) {
var total_amount = 0.00;
$.each(frm.doc.payment_tool_details || [], function(i, row) {
if (row.payment_amount && (row.payment_amount <= row.outstanding_amount)) {
total_amount = total_amount + row.payment_amount;
} else {
if(row.payment_amount < 0)
msgprint(__("Row {0}: Payment amount can not be negative", [row.idx]));
else if(row.payment_amount >= row.outstanding_amount)
msgprint(__("Row {0}: Payment Amount cannot be greater than Outstanding Amount", [__(row.idx)]));
frappe.model.set_value(row.doctype, row.name, "payment_amount", 0.0);
}
});
frm.set_value("total_payment_amount", total_amount);
}
// Make Journal voucher
frappe.ui.form.on("Payment Tool", "make_journal_voucher", function(frm) {
erpnext.payment_tool.check_mandatory_to_fetch(frm.doc);
return frappe.call({
method: 'make_journal_voucher',
doc: frm.doc,
callback: function(r) {
frm.fields_dict.make_journal_voucher.$input.addClass("btn-primary");
var doclist = frappe.model.sync(r.message);
frappe.set_route("Form", doclist[0].doctype, doclist[0].name);
}
});
});
erpnext.payment_tool.check_mandatory_to_fetch = function(doc) {
var check_fields = [
['Company', doc.company],
['Party Type', doc.party_type],
['Received Or Paid', doc.received_or_paid],
['Customer / Supplier', doc.party_type == "Customer" ? doc.customer : doc.supplier]
];
$.each(check_fields, function(i, v) {
if(!v[1]) frappe.throw(__("Please select {0} first", [v[0]]));
});
}

View File

@@ -0,0 +1,381 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"creation": "2014-07-23 15:12:27.746665",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "sec_break1",
"fieldtype": "Section Break",
"label": "Party Details",
"permlevel": 0
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"permlevel": 0,
"reqd": 1
},
{
"allow_on_submit": 0,
"default": "Customer",
"fieldname": "party_type",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Party Type",
"no_copy": 0,
"options": "Customer\nSupplier",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"depends_on": "eval:(doc.party_type == 'Customer')",
"fieldname": "customer",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Customer",
"no_copy": 0,
"options": "Customer",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"depends_on": "eval:(doc.party_type == 'Supplier')",
"fieldname": "supplier",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Supplier",
"no_copy": 0,
"options": "Supplier",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"fieldname": "party_account",
"fieldtype": "Link",
"hidden": 1,
"label": "Party Account",
"no_copy": 1,
"options": "Account",
"permlevel": 0,
"read_only": 1
},
{
"allow_on_submit": 0,
"fieldname": "received_or_paid",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Received Or Paid",
"no_copy": 0,
"options": "Received\nPaid",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "get_outstanding_vouchers",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Get Outstanding Vouchers",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Column Break 1",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "payment_mode",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Payment Mode",
"no_copy": 0,
"options": "Mode of Payment",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "payment_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Payment Account",
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "reference_no",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Reference No",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "reference_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Reference Date",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))",
"fieldname": "sec_break3",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Against Voucher",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "payment_tool_details",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Payment Tool Details",
"no_copy": 0,
"options": "Payment Tool Detail",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))",
"fieldname": "section_break_19",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "total_payment_amount",
"fieldtype": "Currency",
"label": "Total Payment Amount",
"permlevel": 0,
"read_only": 1
},
{
"allow_on_submit": 0,
"fieldname": "make_journal_voucher",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Make Journal Voucher",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"fieldname": "data_22",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))",
"fieldname": "section_break_21",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"allow_on_submit": 0,
"fieldname": "make_jv_help",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
}
],
"hide_heading": 0,
"hide_toolbar": 1,
"icon": "icon-magic",
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"modified": "2014-09-12 04:43:05.963218",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Tool",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 0,
"export": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "Accounts Manager",
"set_user_permissions": 0,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 0,
"export": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "Accounts User",
"set_user_permissions": 0,
"submit": 0,
"write": 1
}
],
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,118 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, scrub
from frappe.utils import flt
from frappe.model.document import Document
import json
class PaymentTool(Document):
def make_journal_voucher(self):
from erpnext.accounts.utils import get_balance_on
total_payment_amount = 0.00
invoice_voucher_type = {
'Sales Invoice': 'against_invoice',
'Purchase Invoice': 'against_voucher',
'Journal Voucher': 'against_jv',
'Sales Order': 'against_sales_order',
'Purchase Order': 'against_purchase_order',
}
jv = frappe.new_doc('Journal Voucher')
jv.voucher_type = 'Journal Entry'
jv.company = self.company
jv.cheque_no = self.reference_no
jv.cheque_date = self.reference_date
if not self.total_payment_amount:
frappe.throw(_("Please enter Payment Amount in atleast one row"))
for v in self.get("payment_tool_details"):
if not frappe.db.get_value(v.against_voucher_type, {"name": v.against_voucher_no}):
frappe.throw(_("Row {0}: {1} is not a valid {2}").format(v.idx, v.against_voucher_no,
v.against_voucher_type))
if v.payment_amount:
d1 = jv.append("entries")
d1.account = self.party_account
d1.balance = get_balance_on(self.party_account)
d1.set("debit" if self.received_or_paid=="Paid" else "credit", flt(v.payment_amount))
d1.set(invoice_voucher_type.get(v.against_voucher_type), v.against_voucher_no)
d1.set('is_advance', 'Yes' if v.against_voucher_type in ['Sales Order', 'Purchase Order'] else 'No')
total_payment_amount = flt(total_payment_amount) + flt(d1.debit) - flt(d1.credit)
d2 = jv.append("entries")
d2.account = self.payment_account
d2.set('debit' if total_payment_amount < 0 else 'credit', abs(total_payment_amount))
if self.payment_account:
d2.balance = get_balance_on(self.payment_account)
return jv.as_dict()
@frappe.whitelist()
def get_party_account(party_type, party_name):
return frappe.db.get_value("Account", {"master_type": party_type, "master_name": party_name})
@frappe.whitelist()
def get_outstanding_vouchers(args):
from erpnext.accounts.utils import get_outstanding_invoices
if not frappe.has_permission("Payment Tool"):
frappe.throw(_("No permission to use Payment Tool"), frappe.PermissionError)
args = json.loads(args)
if args.get("party_type") == "Customer" and args.get("received_or_paid") == "Received":
amount_query = "ifnull(debit, 0) - ifnull(credit, 0)"
elif args.get("party_type") == "Supplier" and args.get("received_or_paid") == "Paid":
amount_query = "ifnull(credit, 0) - ifnull(debit, 0)"
else:
frappe.throw(_("Please enter the Against Vouchers manually"))
# Get all outstanding sales /purchase invoices
outstanding_invoices = get_outstanding_invoices(amount_query, args.get("party_account"))
# Get all SO / PO which are not fully billed or aginst which full advance not paid
orders_to_be_billed = get_orders_to_be_billed(args.get("party_type"), args.get("party_name"))
return outstanding_invoices + orders_to_be_billed
def get_orders_to_be_billed(party_type, party_name):
voucher_type = 'Sales Order' if party_type == "Customer" else 'Purchase Order'
orders = frappe.db.sql("""
select
name as voucher_no,
ifnull(grand_total, 0) as invoice_amount,
(ifnull(grand_total, 0) - ifnull(advance_paid, 0)) as outstanding_amount,
transaction_date as posting_date
from
`tab%s`
where
%s = %s
and docstatus = 1
and ifnull(grand_total, 0) > ifnull(advance_paid, 0)
and ifnull(per_billed, 0) < 100.0
""" % (voucher_type, 'customer' if party_type == "Customer" else 'supplier', '%s'),
party_name, as_dict = True)
order_list = []
for d in orders:
d["voucher_type"] = voucher_type
order_list.append(d)
return order_list
@frappe.whitelist()
def get_against_voucher_amount(against_voucher_type, against_voucher_no):
if against_voucher_type in ["Sales Order", "Purchase Order"]:
select_cond = "grand_total as total_amount, ifnull(grand_total, 0) - ifnull(advance_paid, 0) as outstanding_amount"
elif against_voucher_type in ["Sales Invoice", "Purchase Invoice"]:
select_cond = "grand_total as total_amount, outstanding_amount"
elif against_voucher_type == "Journal Voucher":
select_cond = "total_debit as total_amount"
details = frappe.db.sql("""select {0} from `tab{1}` where name = %s"""
.format(select_cond, against_voucher_type), against_voucher_no, as_dict=1)
return details[0] if details else {}

View File

@@ -0,0 +1,193 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest, frappe, json
from frappe.utils import flt
test_dependencies = ["Item"]
class TestPaymentTool(unittest.TestCase):
def test_make_journal_voucher(self):
from erpnext.accounts.doctype.journal_voucher.test_journal_voucher \
import test_records as jv_test_records
from erpnext.selling.doctype.sales_order.test_sales_order \
import test_records as so_test_records
from erpnext.buying.doctype.purchase_order.test_purchase_order \
import test_records as po_test_records
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice \
import test_records as si_test_records
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice \
import test_records as pi_test_records
self.clear_table_entries()
base_customer_jv = self.create_against_jv(jv_test_records[2], { "account": "_Test Customer 3 - _TC"})
base_supplier_jv = self.create_against_jv(jv_test_records[1], { "account": "_Test Supplier 1 - _TC"})
#Create SO with partial outstanding
so1 = self.create_voucher(so_test_records[0], {
"customer": "_Test Customer 3"
})
jv_against_so1 = self.create_against_jv(jv_test_records[0], {
"account": "_Test Customer 3 - _TC",
"against_sales_order": so1.name
})
#Create SO with no outstanding
so2 = self.create_voucher(so_test_records[0], {
"customer": "_Test Customer 3"
})
jv_against_so2 = self.create_against_jv(jv_test_records[0], {
"account": "_Test Customer 3 - _TC",
"against_sales_order": so2.name,
"credit": 1000
})
po = self.create_voucher(po_test_records[1], {
"supplier": "_Test Supplier 1"
})
#Create SI with partial outstanding
si1 = self.create_voucher(si_test_records[0], {
"customer": "_Test Customer 3",
"debit_to": "_Test Customer 3 - _TC"
})
jv_against_si1 = self.create_against_jv(jv_test_records[0], {
"account": "_Test Customer 3 - _TC",
"against_invoice": si1.name
})
#Create SI with no outstanding
si2 = self.create_voucher(si_test_records[0], {
"customer": "_Test Customer 3",
"debit_to": "_Test Customer 3 - _TC"
})
jv_against_si2 = self.create_against_jv(jv_test_records[0], {
"account": "_Test Customer 3 - _TC",
"against_invoice": si2.name,
"credit": 561.80
})
pi = self.create_voucher(pi_test_records[0], {
"supplier": "_Test Supplier 1",
"credit_to": "_Test Supplier 1 - _TC"
})
#Create a dict containing properties and expected values
expected_outstanding = {
"Journal Voucher" : [base_customer_jv.name, 400.00],
"Sales Invoice" : [si1.name, 161.80],
"Purchase Invoice" : [pi.name, 1512.30],
"Sales Order" : [so1.name, 600.00],
"Purchase Order" : [po.name, 5000.00]
}
args = {
"company": "_Test Company",
"party_type": "Customer",
"received_or_paid": "Received",
"customer": "_Test Customer",
"party_account": "_Test Customer 3 - _TC",
"payment_mode": "Cheque",
"payment_account": "_Test Account Bank Account - _TC",
"reference_no": "123456",
"reference_date": "2013-02-14"
}
self.make_voucher_for_party(args, expected_outstanding)
args.update({
"party_type": "Supplier",
"received_or_paid": "Paid",
"supplier": "_Test Supplier 1",
"party_account": "_Test Supplier 1 - _TC"
})
expected_outstanding["Journal Voucher"] = [base_supplier_jv.name, 400.00]
self.make_voucher_for_party(args, expected_outstanding)
def create_voucher(self, test_record, args):
doc = frappe.copy_doc(test_record)
doc.update(args)
doc.insert()
doc.submit()
return doc
def create_against_jv(self, test_record, args):
jv = frappe.copy_doc(test_record)
jv.get("entries")[0].update(args)
if args.get("debit"):
jv.get("entries")[1].credit = args["debit"]
elif args.get("credit"):
jv.get("entries")[1].debit = args["credit"]
jv.insert()
jv.submit()
return jv
def make_voucher_for_party(self, args, expected_outstanding):
#Make Journal Voucher for Party
payment_tool_doc = frappe.new_doc("Payment Tool")
for k, v in args.items():
payment_tool_doc.set(k, v)
self.check_outstanding_vouchers(payment_tool_doc, args, expected_outstanding)
def check_outstanding_vouchers(self, doc, args, expected_outstanding):
from erpnext.accounts.doctype.payment_tool.payment_tool import get_outstanding_vouchers
outstanding_entries = get_outstanding_vouchers(json.dumps(args))
for d in outstanding_entries:
self.assertEquals(flt(d.get("outstanding_amount"), 2), expected_outstanding.get(d.get("voucher_type"))[1])
self.check_jv_entries(doc, outstanding_entries, expected_outstanding)
def check_jv_entries(self, paytool, outstanding_entries, expected_outstanding):
for e in outstanding_entries:
d1 = paytool.append("payment_tool_details")
d1.against_voucher_type = e.get("voucher_type")
d1.against_voucher_no = e.get("voucher_no")
d1.total_amount = e.get("invoice_amount")
d1.outstanding_amount = e.get("outstanding_amount")
d1.payment_amount = 100.00
paytool.total_payment_amount = 300
new_jv = paytool.make_journal_voucher()
#Create a list of expected values as [party account, payment against, against_jv, against_invoice,
#against_voucher, against_sales_order, against_purchase_order]
expected_values = [
[paytool.party_account, 100.00, expected_outstanding.get("Journal Voucher")[0], None, None, None, None],
[paytool.party_account, 100.00, None, expected_outstanding.get("Sales Invoice")[0], None, None, None],
[paytool.party_account, 100.00, None, None, expected_outstanding.get("Purchase Invoice")[0], None, None],
[paytool.party_account, 100.00, None, None, None, expected_outstanding.get("Sales Order")[0], None],
[paytool.party_account, 100.00, None, None, None, None, expected_outstanding.get("Purchase Order")[0]]
]
for jv_entry in new_jv.get("entries"):
if paytool.party_account == jv_entry.get("account"):
row = [
jv_entry.get("account"),
jv_entry.get("debit" if paytool.party_type=="Supplier" else "credit"),
jv_entry.get("against_jv"),
jv_entry.get("against_invoice"),
jv_entry.get("against_voucher"),
jv_entry.get("against_sales_order"),
jv_entry.get("against_purchase_order"),
]
self.assertTrue(row in expected_values)
self.assertEquals(new_jv.get("cheque_no"), paytool.reference_no)
self.assertEquals(new_jv.get("cheque_date"), paytool.reference_date)
def clear_table_entries(self):
frappe.db.sql("""delete from `tabGL Entry` where (account = "_Test Customer 3 - _TC" or account = "_Test Supplier 1 - _TC")""")
frappe.db.sql("""delete from `tabSales Order` where customer_name = "_Test Customer 3" """)
frappe.db.sql("""delete from `tabPurchase Order` where supplier_name = "_Test Supplier 1" """)

View File

@@ -0,0 +1,130 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"creation": "2014-08-11 14:27:54.463897",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"allow_on_submit": 0,
"fieldname": "against_voucher_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Against Voucher Type",
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
"print_hide": 0,
"print_width": "",
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"width": ""
},
{
"allow_on_submit": 0,
"fieldname": "against_voucher_no",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Against Voucher No",
"no_copy": 0,
"options": "against_voucher_type",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"allow_on_submit": 0,
"fieldname": "total_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Total Amount",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "outstanding_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Outstanding Amount",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
{
"allow_on_submit": 0,
"fieldname": "payment_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Payment Amount",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2014-09-11 08:55:34.384017",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Tool Detail",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class PaymentToolDetail(Document):
pass

View File

@@ -43,13 +43,14 @@
},
{
"fieldname": "amended_from",
"fieldtype": "Data",
"ignore_restrictions": 1,
"fieldtype": "Link",
"ignore_user_permissions": 1,
"in_list_view": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Data",
"options": "Period Closing Voucher",
"permlevel": 0,
"read_only": 1
},
@@ -101,7 +102,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-09 02:16:36.920034",
"modified": "2014-06-23 07:55:49.946225",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Period Closing Voucher",

View File

@@ -62,7 +62,7 @@
"options": "Price List",
"permlevel": 0,
"read_only": 0,
"reqd": 1
"reqd": 0
},
{
"fieldname": "company",
@@ -147,7 +147,7 @@
"options": "Warehouse",
"permlevel": 0,
"read_only": 0,
"reqd": 1
"reqd": 0
},
{
"fieldname": "cost_center",
@@ -171,6 +171,7 @@
"read_only": 0
},
{
"allow_on_submit": 1,
"fieldname": "letter_head",
"fieldtype": "Link",
"label": "Letter Head",
@@ -192,6 +193,7 @@
"read_only": 0
},
{
"allow_on_submit": 1,
"fieldname": "select_print_heading",
"fieldtype": "Link",
"in_filter": 0,
@@ -205,14 +207,13 @@
],
"icon": "icon-cog",
"idx": 1,
"modified": "2014-05-09 02:17:34.814856",
"modified": "2014-09-09 05:35:31.969193",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Setting",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@@ -225,7 +226,7 @@
"write": 1
},
{
"cancel": 0,
"apply_user_permissions": 1,
"delete": 0,
"email": 1,
"permlevel": 0,

View File

@@ -0,0 +1,10 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
import frappe
import unittest
test_records = frappe.get_test_records('POS Setting')
class TestPOSSetting(unittest.TestCase):
pass

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1,91 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.ui.form.on("Pricing Rule", "refresh", function(frm) {
var help_content = ['<table class="table table-bordered" style="background-color: #f9f9f9;">',
'<tr><td>',
'<h4><i class="icon-hand-right"></i> ',
__('Notes'),
':</h4>',
'<ul>',
'<li>',
__("Pricing Rule is made to overwrite Price List / define discount percentage, based on some criteria."),
'</li>',
'<li>',
__("If selected Pricing Rule is made for 'Price', it will overwrite Price List. Pricing Rule price is the final price, so no further discount should be applied. Hence, in transactions like Sales Order, Purchase Order etc, it will be fetched in 'Rate' field, rather than 'Price List Rate' field."),
'</li>',
'<li>',
__('Discount Percentage can be applied either against a Price List or for all Price List.'),
'</li>',
'<li>',
__('To not apply Pricing Rule in a particular transaction, all applicable Pricing Rules should be disabled.'),
'</li>',
'</ul>',
'</td></tr>',
'<tr><td>',
'<h4><i class="icon-question-sign"></i> ',
__('How Pricing Rule is applied?'),
'</h4>',
'<ol>',
'<li>',
__("Pricing Rule is first selected based on 'Apply On' field, which can be Item, Item Group or Brand."),
'</li>',
'<li>',
__("Then Pricing Rules are filtered out based on Customer, Customer Group, Territory, Supplier, Supplier Type, Campaign, Sales Partner etc."),
'</li>',
'<li>',
__('Pricing Rules are further filtered based on quantity.'),
'</li>',
'<li>',
__('If two or more Pricing Rules are found based on the above conditions, Priority is applied. Priority is a number between 0 to 20 while default value is zero (blank). Higher number means it will take precedence if there are multiple Pricing Rules with same conditions.'),
'</li>',
'<li>',
__('Even if there are multiple Pricing Rules with highest priority, then following internal priorities are applied:'),
'<ul>',
'<li>',
__('Item Code > Item Group > Brand'),
'</li>',
'<li>',
__('Customer > Customer Group > Territory'),
'</li>',
'<li>',
__('Supplier > Supplier Type'),
'</li>',
'</ul>',
'</li>',
'<li>',
__('If multiple Pricing Rules continue to prevail, users are asked to set Priority manually to resolve conflict.'),
'</li>',
'</ol>',
'</td></tr>',
'</table>'].join("\n");
set_field_options("pricing_rule_help", help_content);
cur_frm.cscript.set_options_for_applicable_for();
});
cur_frm.cscript.set_options_for_applicable_for = function() {
var options = [""];
var applicable_for = cur_frm.doc.applicable_for;
if(cur_frm.doc.selling) {
options = $.merge(options, ["Customer", "Customer Group", "Territory", "Sales Partner", "Campaign"]);
}
if(cur_frm.doc.buying) {
$.merge(options, ["Supplier", "Supplier Type"]);
}
set_field_options("applicable_for", options.join("\n"));
if(!in_list(options, applicable_for)) applicable_for = null;
cur_frm.set_value("applicable_for", applicable_for)
}
cur_frm.cscript.selling = function() {
cur_frm.cscript.set_options_for_applicable_for();
}
cur_frm.cscript.buying = function() {
cur_frm.cscript.set_options_for_applicable_for();
}

View File

@@ -51,6 +51,18 @@
"options": "Brand",
"permlevel": 0
},
{
"fieldname": "selling",
"fieldtype": "Check",
"label": "Selling",
"permlevel": 0
},
{
"fieldname": "buying",
"fieldtype": "Check",
"label": "Buying",
"permlevel": 0
},
{
"fieldname": "applicable_for",
"fieldtype": "Select",
@@ -131,6 +143,13 @@
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"permlevel": 0
},
{
"default": "Today",
"fieldname": "valid_from",
@@ -198,12 +217,25 @@
"label": "For Price List",
"options": "Price List",
"permlevel": 0
},
{
"fieldname": "help_section",
"fieldtype": "Section Break",
"label": "",
"options": "Simple",
"permlevel": 0
},
{
"fieldname": "pricing_rule_help",
"fieldtype": "HTML",
"label": "Pricing Rule Help",
"permlevel": 0
}
],
"icon": "icon-gift",
"idx": 1,
"istable": 0,
"modified": "2014-05-12 16:24:52.005162",
"modified": "2014-06-20 19:36:22.502381",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",
@@ -212,8 +244,8 @@
{
"create": 1,
"delete": 1,
"export": 0,
"import": 0,
"export": 1,
"import": 1,
"permlevel": 0,
"read": 1,
"report": 1,
@@ -258,7 +290,6 @@
"permlevel": 0,
"read": 1,
"report": 1,
"restrict": 1,
"role": "System Manager",
"write": 1
}

View File

@@ -5,28 +5,46 @@
from __future__ import unicode_literals
import frappe
import json
import copy
from frappe import throw, _
from frappe.utils import flt
from frappe.utils import flt, cint
from frappe.model.document import Document
class MultiplePricingRuleConflict(frappe.ValidationError): pass
class PricingRule(Document):
def validate(self):
self.validate_mandatory()
self.validate_applicable_for_selling_or_buying()
self.validate_min_max_qty()
self.cleanup_fields_value()
self.validate_price_or_discount()
self.validate_max_discount()
def validate_mandatory(self):
for field in ["apply_on", "applicable_for", "price_or_discount"]:
for field in ["apply_on", "applicable_for"]:
tocheck = frappe.scrub(self.get(field) or "")
if tocheck and not self.get(tocheck):
throw(_("{0} is required").format(self.meta.get_label(tocheck)), frappe.MandatoryError)
def validate_applicable_for_selling_or_buying(self):
if not self.selling and not self.buying:
throw(_("Atleast one of the Selling or Buying must be selected"))
if not self.selling and self.applicable_for in ["Customer", "Customer Group",
"Territory", "Sales Partner", "Campaign"]:
throw(_("Selling must be checked, if Applicable For is selected as {0}"
.format(self.applicable_for)))
if not self.buying and self.applicable_for in ["Supplier", "Supplier Type"]:
throw(_("Buying must be checked, if Applicable For is selected as {0}"
.format(self.applicable_for)))
def validate_min_max_qty(self):
if self.min_qty and self.max_qty and flt(self.min_qty) > flt(self.max_qty):
throw(_("Min Qty can not be greater than Max Qty"))
def cleanup_fields_value(self):
for logic_field in ["apply_on", "applicable_for", "price_or_discount"]:
fieldname = frappe.scrub(self.get(logic_field) or "")
@@ -39,3 +57,204 @@ class PricingRule(Document):
f = frappe.scrub(f)
if f!=fieldname:
self.set(f, None)
def validate_price_or_discount(self):
for field in ["Price", "Discount Percentage"]:
if flt(self.get(frappe.scrub(field))) < 0:
throw(_("{0} can not be negative").format(field))
def validate_max_discount(self):
if self.price_or_discount == "Discount Percentage" and self.item_code:
max_discount = frappe.db.get_value("Item", self.item_code, "max_discount")
if max_discount and flt(self.discount_percentage) > flt(max_discount):
throw(_("Max discount allowed for item: {0} is {1}%").format(self.item_code, max_discount))
#--------------------------------------------------------------------------------
@frappe.whitelist()
def apply_pricing_rule(args):
"""
args = {
"item_list": [{"doctype": "", "name": "", "item_code": "", "brand": "", "item_group": ""}, ...],
"customer": "something",
"customer_group": "something",
"territory": "something",
"supplier": "something",
"supplier_type": "something",
"currency": "something",
"conversion_rate": "something",
"price_list": "something",
"plc_conversion_rate": "something",
"company": "something",
"transaction_date": "something",
"campaign": "something",
"sales_partner": "something",
"ignore_pricing_rule": "something"
}
"""
if isinstance(args, basestring):
args = json.loads(args)
args = frappe._dict(args)
# list of dictionaries
out = []
if args.get("parenttype") == "Material Request": return out
if not args.transaction_type:
args.transaction_type = "buying" if frappe.get_meta(args.parenttype).get_field("supplier") \
else "selling"
item_list = args.get("item_list")
args.pop("item_list")
for item in item_list:
args_copy = copy.deepcopy(args)
args_copy.update(item)
out.append(get_pricing_rule_for_item(args_copy))
return out
def get_pricing_rule_for_item(args):
if args.get("parenttype") == "Material Request": return {}
item_details = frappe._dict({
"doctype": args.doctype,
"name": args.name,
"pricing_rule": None
})
if args.ignore_pricing_rule or not args.item_code:
return item_details
if not (args.item_group and args.brand):
args.item_group, args.brand = frappe.db.get_value("Item", args.item_code, ["item_group", "brand"])
if not args.item_group:
frappe.throw(_("Item Group not mentioned in item master for item {0}").format(args.item_code))
if args.customer and not (args.customer_group and args.territory):
customer = frappe.db.get_value("Customer", args.customer, ["customer_group", "territory"])
if customer:
args.customer_group, args.territory = customer
elif args.supplier and not args.supplier_type:
args.supplier_type = frappe.db.get_value("Supplier", args.supplier, "supplier_type")
pricing_rules = get_pricing_rules(args)
pricing_rule = filter_pricing_rules(args, pricing_rules)
if pricing_rule:
item_details.pricing_rule = pricing_rule.name
if pricing_rule.price_or_discount == "Price":
item_details.update({
"price_list_rate": pricing_rule.price/flt(args.conversion_rate) \
if args.conversion_rate else 0.0,
"discount_percentage": 0.0
})
else:
item_details.discount_percentage = pricing_rule.discount_percentage
return item_details
def get_pricing_rules(args):
def _get_tree_conditions(parenttype, allow_blank=True):
field = frappe.scrub(parenttype)
condition = ""
if args.get(field):
lft, rgt = frappe.db.get_value(parenttype, args[field], ["lft", "rgt"])
parent_groups = frappe.db.sql_list("""select name from `tab%s`
where lft<=%s and rgt>=%s""" % (parenttype, '%s', '%s'), (lft, rgt))
if parent_groups:
if allow_blank: parent_groups.append('')
condition = " ifnull("+field+", '') in ('" + \
"', '".join([d.replace("'", "\\'").replace('"', '\\"') for d in parent_groups])+"')"
return condition
conditions = ""
for field in ["company", "customer", "supplier", "supplier_type", "campaign", "sales_partner"]:
if args.get(field):
conditions += " and ifnull("+field+", '') in (%("+field+")s, '')"
else:
conditions += " and ifnull("+field+", '') = ''"
for parenttype in ["Customer Group", "Territory"]:
group_condition = _get_tree_conditions(parenttype)
if group_condition:
conditions += " and " + group_condition
if not args.price_list: args.price_list = None
conditions += " and ifnull(for_price_list, '') in (%(price_list)s, '')"
if args.get("transaction_date"):
conditions += """ and %(transaction_date)s between ifnull(valid_from, '2000-01-01')
and ifnull(valid_upto, '2500-12-31')"""
item_group_condition = _get_tree_conditions("Item Group", False)
if item_group_condition: item_group_condition = " or " + item_group_condition
return frappe.db.sql("""select * from `tabPricing Rule`
where (item_code=%(item_code)s {item_group_condition} or brand=%(brand)s)
and docstatus < 2 and ifnull(disable, 0) = 0
and ifnull({transaction_type}, 0) = 1 {conditions}
order by priority desc, name desc""".format(
item_group_condition=item_group_condition,
transaction_type=args.transaction_type, conditions=conditions), args, as_dict=1)
def filter_pricing_rules(args, pricing_rules):
# filter for qty
if pricing_rules and args.get("qty"):
pricing_rules = filter(lambda x: (args.qty>=flt(x.min_qty)
and (args.qty<=x.max_qty if x.max_qty else True)), pricing_rules)
# find pricing rule with highest priority
if pricing_rules:
max_priority = max([cint(p.priority) for p in pricing_rules])
if max_priority:
pricing_rules = filter(lambda x: cint(x.priority)==max_priority, pricing_rules)
# apply internal priority
all_fields = ["item_code", "item_group", "brand", "customer", "customer_group", "territory",
"supplier", "supplier_type", "campaign", "sales_partner"]
if len(pricing_rules) > 1:
for field_set in [["item_code", "item_group", "brand"],
["customer", "customer_group", "territory"], ["supplier", "supplier_type"]]:
remaining_fields = list(set(all_fields) - set(field_set))
if if_all_rules_same(pricing_rules, remaining_fields):
pricing_rules = apply_internal_priority(pricing_rules, field_set, args)
break
if len(pricing_rules) > 1:
price_or_discount = list(set([d.price_or_discount for d in pricing_rules]))
if len(price_or_discount) == 1 and price_or_discount[0] == "Discount Percentage":
pricing_rules = filter(lambda x: x.for_price_list==args.price_list, pricing_rules) \
or pricing_rules
if len(pricing_rules) > 1:
frappe.throw(_("Multiple Price Rule exists with same criteria, please resolve \
conflict by assigning priority. Price Rules: {0}")
.format("\n".join([d.name for d in pricing_rules])), MultiplePricingRuleConflict)
elif pricing_rules:
return pricing_rules[0]
def if_all_rules_same(pricing_rules, fields):
all_rules_same = True
val = [pricing_rules[0][k] for k in fields]
for p in pricing_rules[1:]:
if val != [p[k] for k in fields]:
all_rules_same = False
break
return all_rules_same
def apply_internal_priority(pricing_rules, field_set, args):
filtered_rules = []
for field in field_set:
if args.get(field):
filtered_rules = filter(lambda x: x[field]==args[field], pricing_rules)
if filtered_rules: break
return filtered_rules or pricing_rules

View File

@@ -17,9 +17,11 @@ class TestPricingRule(unittest.TestCase):
"doctype": "Pricing Rule",
"apply_on": "Item Code",
"item_code": "_Test Item",
"selling": 1,
"price_or_discount": "Discount Percentage",
"price": 0,
"discount_percentage": 10,
"company": "_Test Company"
}
frappe.get_doc(test_record.copy()).insert()
@@ -28,15 +30,16 @@ class TestPricingRule(unittest.TestCase):
"company": "_Test Company",
"price_list": "_Test Price List",
"currency": "_Test Currency",
"doctype": "Sales Order",
"parenttype": "Sales Order",
"conversion_rate": 1,
"price_list_currency": "_Test Currency",
"plc_conversion_rate": 1,
"order_type": "Sales",
"transaction_type": "selling",
"customer": "_Test Customer",
"doctype": "Sales Order Item",
"name": None
})
details = get_item_details(args)
self.assertEquals(details.get("discount_percentage"), 10)
@@ -71,8 +74,8 @@ class TestPricingRule(unittest.TestCase):
self.assertEquals(details.get("discount_percentage"), 5)
frappe.db.sql("update `tabPricing Rule` set priority=NULL where campaign='_Test Campaign'")
from erpnext.stock.get_item_details import MultiplePricingRuleConflict
self.assertRaises (MultiplePricingRuleConflict, get_item_details, args)
from erpnext.accounts.doctype.pricing_rule.pricing_rule import MultiplePricingRuleConflict
self.assertRaises(MultiplePricingRuleConflict, get_item_details, args)
args.item_code = "_Test Item 2"
details = get_item_details(args)

View File

@@ -27,7 +27,8 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
// Show / Hide button
if(doc.docstatus==1 && doc.outstanding_amount > 0)
this.frm.add_custom_button(__('Make Payment Entry'), this.make_bank_voucher);
this.frm.add_custom_button(__('Make Payment Entry'), this.make_bank_voucher,
frappe.boot.doctype_icons["Journal Voucher"]);
if(doc.docstatus==1) {
cur_frm.appframe.add_button(__('View Ledger'), function() {
@@ -56,7 +57,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
company: cur_frm.doc.company
}
})
});
}, "icon-download", "btn-default");
cur_frm.add_custom_button(__('From Purchase Receipt'),
function() {
@@ -69,7 +70,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
company: cur_frm.doc.company
}
})
});
}, "icon-download", "btn-default");
}
@@ -77,16 +78,19 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
},
supplier: function() {
var me = this;
if(this.frm.updating_party_details)
return;
erpnext.utils.get_party_details(this.frm,
"erpnext.accounts.party.get_party_details", {
erpnext.utils.get_party_details(this.frm, "erpnext.accounts.party.get_party_details",
{
posting_date: this.frm.doc.posting_date,
party: this.frm.doc.supplier,
party_type: "Supplier",
account: this.frm.doc.debit_to,
price_list: this.frm.doc.buying_price_list,
})
}, function() {
me.apply_pricing_rule();
})
},
credit_to: function() {
@@ -109,7 +113,8 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
entries_add: function(doc, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
this.frm.script_manager.copy_from_first_row("entries", row, ["expense_account", "cost_center"]);
this.frm.script_manager.copy_from_first_row("entries", row,
["expense_account", "cost_center", "project_name"]);
},
on_submit: function() {

View File

@@ -1,5 +1,4 @@
{
"allow_attach": 1,
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2013-05-21 16:16:39",
@@ -77,7 +76,7 @@
},
{
"fieldname": "contact_mobile",
"fieldtype": "Text",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Mobile No",
"permlevel": 0,
@@ -85,7 +84,7 @@
},
{
"fieldname": "contact_email",
"fieldtype": "Text",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Contact Email",
"permlevel": 0,
@@ -106,7 +105,7 @@
"fieldname": "posting_date",
"fieldtype": "Date",
"in_filter": 1,
"label": "Posting Date",
"label": "Date",
"no_copy": 0,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
@@ -117,7 +116,7 @@
"search_index": 1
},
{
"description": "If not applicable please enter: NA",
"description": "",
"fieldname": "bill_no",
"fieldtype": "Data",
"in_filter": 1,
@@ -127,7 +126,7 @@
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"reqd": 1,
"reqd": 0,
"search_index": 1
},
{
@@ -146,7 +145,7 @@
{
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_restrictions": 1,
"ignore_user_permissions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
@@ -231,6 +230,14 @@
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "ignore_pricing_rule",
"fieldtype": "Check",
"label": "Ignore Pricing Rule",
"no_copy": 1,
"permlevel": 1,
"print_hide": 1
},
{
"fieldname": "items",
"fieldtype": "Section Break",
@@ -256,22 +263,6 @@
"fieldtype": "Section Break",
"permlevel": 0
},
{
"fieldname": "net_total_import",
"fieldtype": "Currency",
"label": "Net Total",
"oldfieldname": "net_total_import",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "column_break_28",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"description": "Will be calculated automatically when you enter the details",
"fieldname": "net_total",
@@ -284,6 +275,22 @@
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_28",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "net_total_import",
"fieldtype": "Currency",
"label": "Net Total",
"oldfieldname": "net_total_import",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "taxes",
"fieldtype": "Section Break",
@@ -332,6 +339,59 @@
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "other_charges_added",
"fieldtype": "Currency",
"label": "Taxes and Charges Added (Company Currency)",
"oldfieldname": "other_charges_added",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "other_charges_deducted",
"fieldtype": "Currency",
"label": "Taxes and Charges Deducted (Company Currency)",
"oldfieldname": "other_charges_deducted",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "grand_total",
"fieldtype": "Currency",
"label": "Grand Total (Company Currency)",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"description": "In Words will be visible once you save the Purchase Invoice.",
"fieldname": "in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break8",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"width": "50%"
},
{
"fieldname": "other_charges_added_import",
"fieldtype": "Currency",
@@ -401,6 +461,17 @@
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "total_tax",
"fieldtype": "Currency",
"label": "Total Tax (Company Currency)",
"oldfieldname": "total_tax",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "outstanding_amount",
"fieldtype": "Currency",
@@ -416,70 +487,6 @@
"read_only": 1,
"search_index": 1
},
{
"fieldname": "column_break8",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"width": "50%"
},
{
"fieldname": "total_tax",
"fieldtype": "Currency",
"label": "Total Tax (Company Currency)",
"oldfieldname": "total_tax",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "other_charges_added",
"fieldtype": "Currency",
"label": "Taxes and Charges Added (Company Currency)",
"oldfieldname": "other_charges_added",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "other_charges_deducted",
"fieldtype": "Currency",
"label": "Taxes and Charges Deducted (Company Currency)",
"oldfieldname": "other_charges_deducted",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "grand_total",
"fieldtype": "Currency",
"label": "Grand Total (Company Currency)",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"description": "In Words will be visible once you save the Purchase Invoice.",
"fieldname": "in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "write_off_amount",
"fieldtype": "Currency",
@@ -525,6 +532,11 @@
"read_only": 0,
"report_hide": 0
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"permlevel": 0
},
{
"fieldname": "advances",
"fieldtype": "Section Break",
@@ -593,6 +605,7 @@
"label": "Supplier Address",
"options": "Address",
"permlevel": 0,
"print_hide": 1,
"read_only": 0
},
{
@@ -686,7 +699,7 @@
"oldfieldname": "due_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide": 1,
"read_only": 0,
"search_index": 1
},
@@ -744,16 +757,17 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-09 02:16:52.618986",
"modified": "2014-09-09 05:35:32.156763",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 0,
"amend": 1,
"apply_user_permissions": 1,
"cancel": 1,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
@@ -761,11 +775,12 @@
"read": 1,
"report": 1,
"role": "Accounts User",
"submit": 0,
"write": 0
"submit": 1,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 0,
"delete": 0,
@@ -780,6 +795,7 @@
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 0,
"delete": 0,
@@ -808,6 +824,7 @@
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 0,
"delete": 0,
@@ -819,6 +836,12 @@
"role": "Auditor",
"submit": 0,
"write": 0
},
{
"permlevel": 1,
"read": 1,
"role": "Accounts Manager",
"write": 1
}
],
"read_only_onload": 1,

View File

@@ -14,6 +14,10 @@ import frappe.defaults
from erpnext.controllers.buying_controller import BuyingController
from erpnext.accounts.party import get_party_account, get_due_date
form_grid_templates = {
"entries": "templates/form_grid/item_grid.html"
}
class PurchaseInvoice(BuyingController):
tname = 'Purchase Invoice Item'
fname = 'entries'
@@ -30,6 +34,7 @@ class PurchaseInvoice(BuyingController):
'target_ref_field': 'amount',
'source_field': 'amount',
'percent_join_field': 'purchase_order',
'overflow_type': 'billing'
}]
def validate(self):
@@ -42,7 +47,6 @@ class PurchaseInvoice(BuyingController):
self.pr_required()
self.check_active_purchase_items()
self.check_conversion_rate()
self.validate_bill_no()
self.validate_credit_acc()
self.clear_unallocated_advances("Purchase Invoice Advance", "advance_allocation_details")
self.check_for_acc_head_of_supplier()
@@ -56,6 +60,14 @@ class PurchaseInvoice(BuyingController):
self.update_valuation_rate("entries")
self.validate_multiple_billing("Purchase Receipt", "pr_detail", "amount",
"purchase_receipt_details")
self.create_remarks()
def create_remarks(self):
if not self.remarks:
if self.bill_no and self.bill_date:
self.remarks = _("Against Supplier Invoice {0} dated {1}").format(self.bill_no, formatdate(self.bill_date))
else:
self.remarks = _("No Remarks")
def set_missing_values(self, for_validate=False):
if not self.credit_to:
@@ -83,23 +95,6 @@ class PurchaseInvoice(BuyingController):
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):
throw(_("Conversion rate cannot be 0 or 1"))
def validate_bill_no(self):
if self.bill_no and self.bill_no.lower().strip() \
not in ['na', 'not applicable', 'none']:
b_no = frappe.db.sql("""select bill_no, name, ifnull(is_opening,'') from `tabPurchase Invoice`
where bill_no = %s and credit_to = %s and docstatus = 1 and name != %s""",
(self.bill_no, self.credit_to, self.name))
if b_no and cstr(b_no[0][2]) == cstr(self.is_opening):
throw(_("Bill No {0} already booked in Purchase Invoice {1}").format(cstr(b_no[0][0]),
cstr(b_no[0][1])))
if not self.remarks and self.bill_date:
self.remarks = (self.remarks or '') + "\n" \
+ _("Against Bill {0} dated {1}").format(self.bill_no, formatdate(self.bill_date))
if not self.remarks:
self.remarks = "No Remarks"
def validate_credit_acc(self):
if frappe.db.get_value("Account", self.credit_to, "report_type") != "Balance Sheet":
frappe.throw(_("Account must be a balance sheet account"))
@@ -269,6 +264,9 @@ class PurchaseInvoice(BuyingController):
auto_accounting_for_stock = \
cint(frappe.defaults.get_global_default("auto_accounting_for_stock"))
stock_received_but_not_billed = self.get_company_default("stock_received_but_not_billed")
expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation")
gl_entries = []
# parent's gl entry
@@ -308,30 +306,10 @@ class PurchaseInvoice(BuyingController):
(tax.add_deduct_tax == "Add" and 1 or -1) * flt(tax.tax_amount)
# item gl entries
stock_item_and_auto_accounting_for_stock = False
negative_expense_to_be_booked = 0.0
stock_items = self.get_stock_items()
for item in self.get("entries"):
if auto_accounting_for_stock and item.item_code in stock_items:
if flt(item.valuation_rate):
# if auto inventory accounting enabled and stock item,
# then do stock related gl entries
# expense will be booked in sales invoice
stock_item_and_auto_accounting_for_stock = True
valuation_amt = flt(item.base_amount + item.item_tax_amount,
self.precision("base_amount", item))
gl_entries.append(
self.get_gl_dict({
"account": item.expense_account,
"against": self.credit_to,
"debit": valuation_amt,
"remarks": self.remarks or "Accounting Entry for Stock"
})
)
elif flt(item.base_amount):
# if not a stock item or auto inventory accounting disabled, book the expense
if flt(item.base_amount):
gl_entries.append(
self.get_gl_dict({
"account": item.expense_account,
@@ -342,23 +320,52 @@ class PurchaseInvoice(BuyingController):
})
)
if stock_item_and_auto_accounting_for_stock and valuation_tax:
if auto_accounting_for_stock and item.item_code in stock_items and item.item_tax_amount:
# Post reverse entry for Stock-Received-But-Not-Billed if it is booked in Purchase Receipt
negative_expense_booked_in_pi = None
if item.purchase_receipt:
negative_expense_booked_in_pi = frappe.db.sql("""select name from `tabGL Entry`
where voucher_type='Purchase Receipt' and voucher_no=%s and account=%s""",
(item.purchase_receipt, expenses_included_in_valuation))
if not negative_expense_booked_in_pi:
gl_entries.append(
self.get_gl_dict({
"account": stock_received_but_not_billed,
"against": self.credit_to,
"debit": flt(item.item_tax_amount, self.precision("item_tax_amount", item)),
"remarks": self.remarks or "Accounting Entry for Stock"
})
)
negative_expense_to_be_booked += flt(item.item_tax_amount, self.precision("item_tax_amount", item))
if negative_expense_to_be_booked and valuation_tax:
# credit valuation tax amount in "Expenses Included In Valuation"
# this will balance out valuation amount included in cost of goods sold
expenses_included_in_valuation = \
self.get_company_default("expenses_included_in_valuation")
total_valuation_amount = sum(valuation_tax.values())
amount_including_divisional_loss = negative_expense_to_be_booked
i = 1
for cost_center, amount in valuation_tax.items():
if i == len(valuation_tax):
applicable_amount = amount_including_divisional_loss
else:
applicable_amount = negative_expense_to_be_booked * (amount / total_valuation_amount)
amount_including_divisional_loss -= applicable_amount
gl_entries.append(
self.get_gl_dict({
"account": expenses_included_in_valuation,
"cost_center": cost_center,
"against": self.credit_to,
"credit": amount,
"credit": applicable_amount,
"remarks": self.remarks or "Accounting Entry for Stock"
})
)
i += 1
# writeoff account includes petty difference in the invoice amount
# and the amount that is paid
if self.write_off_account and flt(self.write_off_amount):
@@ -382,7 +389,7 @@ class PurchaseInvoice(BuyingController):
self.update_prevdoc_status()
self.update_billing_status_for_zero_amount_refdoc("Purchase Order")
self.make_cancel_gl_entries()
self.make_gl_entries_on_cancel()
def on_update(self):
pass

View File

@@ -0,0 +1,45 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-9">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
<span style="margin-right: 8px; display: inline-block">
<span class="filterable"
data-filter="supplier,=,{%= doc.supplier %}">
{%= doc.supplier_name %}</span></span>
{% if(doc.outstanding_amount > 0 && doc.docstatus==1) { %}
{% if(frappe.datetime.get_diff(doc.due_date) < 0) { %}
<span class="label label-danger filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,>,0|due_date,<,Today">
{%= __("Overdue: ") + comment_when(doc.due_date) %}
</span>
{% } else { %}
<span class="label label-warning filterable"
data-filter="outstanding_amount,>,0|due,>=,Today"
title="{%= __("Payment Pending") %}">
{%= doc.get_formatted("due_date") %}</span>
{% } %}
{% } %}
{% if(doc.outstanding_amount==0 && doc.docstatus==1) { %}
<span class="label label-success filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,=,0">
<i class="icon-ok-sign"></i> {%= __("Paid") %}
</span>
{% } %}
{% if(doc.docstatus===0) { %}
<span class="label label-danger filterable"
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
{% } %}
</div>
</div>
<div class="col-xs-1 text-right">
{% var completed = cint((doc.grand_total - doc.outstanding_amount) * 100 / doc.grand_total), title = __("Outstanding Amount") + ": " + doc.get_formatted("outstanding_amount") %}
{% include "templates/form_grid/includes/progress.html" %}
</div>
<div class="col-xs-2 text-right">
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_import') %}">
{%= doc.get_formatted("grand_total_import") %}
</div>
</div>
</div>

View File

@@ -3,10 +3,6 @@
// render
frappe.listview_settings['Purchase Invoice'] = {
add_fields: ["`tabPurchase Invoice`.grand_total", "`tabPurchase Invoice`.outstanding_amount"],
add_columns: [{"content":"paid_amount", width:"10%", type:"bar-graph", label: "Paid"}],
prepare_data: function(data) {
data.paid_amount = flt(data.grand_total) ? (((flt(data.grand_total) -
flt(data.outstanding_amount)) / flt(data.grand_total)) * 100) : 0;
}
add_fields: ["supplier", "supplier_name", "grand_total", "outstanding_amount", "due_date", "company",
"currency"]
};

View File

@@ -9,7 +9,8 @@ import frappe.model
import json
from frappe.utils import cint
import frappe.defaults
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory, \
test_records as pr_test_records
test_dependencies = ["Item", "Cost Center"]
test_ignore = ["Serial No"]
@@ -57,9 +58,41 @@ class TestPurchaseInvoice(unittest.TestCase):
expected_values = sorted([
["_Test Supplier - _TC", 0, 720],
["Stock Received But Not Billed - _TC", 750.0, 0],
["Expenses Included In Valuation - _TC", 0.0, 250.0],
["_Test Account Shipping Charges - _TC", 100.0, 0],
["_Test Account VAT - _TC", 120.0, 0],
])
for i, gle in enumerate(gl_entries):
self.assertEquals(expected_values[i][0], gle.account)
self.assertEquals(expected_values[i][1], gle.debit)
self.assertEquals(expected_values[i][2], gle.credit)
set_perpetual_inventory(0)
def test_gl_entries_with_auto_accounting_for_stock_against_pr(self):
set_perpetual_inventory(1)
self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
pr = frappe.copy_doc(pr_test_records[0])
pr.submit()
pi = frappe.copy_doc(test_records[1])
for d in pi.get("entries"):
d.purchase_receipt = pr.name
pi.insert()
pi.submit()
gl_entries = frappe.db.sql("""select account, debit, credit
from `tabGL Entry` where voucher_type='Purchase Invoice' and voucher_no=%s
order by account asc""", pi.name, as_dict=1)
self.assertTrue(gl_entries)
expected_values = sorted([
["_Test Supplier - _TC", 0, 720],
["Stock Received But Not Billed - _TC", 500.0, 0],
["_Test Account Shipping Charges - _TC", 100.0, 0],
["_Test Account VAT - _TC", 120.0, 0],
["Expenses Included In Valuation - _TC", 0, 250.0],
])
for i, gle in enumerate(gl_entries):

View File

@@ -1,206 +1,208 @@
[
{
"bill_no": "NA",
"buying_price_list": "_Test Price List",
"company": "_Test Company",
"conversion_rate": 1,
"credit_to": "_Test Supplier - _TC",
"currency": "INR",
"doctype": "Purchase Invoice",
"bill_no": "NA",
"buying_price_list": "_Test Price List",
"company": "_Test Company",
"conversion_rate": 1,
"credit_to": "_Test Supplier - _TC",
"currency": "INR",
"doctype": "Purchase Invoice",
"entries": [
{
"amount": 500,
"base_amount": 500,
"base_rate": 50,
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"qty": 10,
"rate": 50,
"amount": 500,
"base_amount": 500,
"base_rate": 50,
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"qty": 10,
"rate": 50,
"uom": "_Test UOM"
},
},
{
"amount": 750,
"base_amount": 750,
"base_rate": 150,
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"qty": 5,
"rate": 150,
"amount": 750,
"base_amount": 750,
"base_rate": 150,
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"qty": 5,
"rate": 150,
"uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_import": 0,
"naming_series": "BILL",
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_import": 0,
"naming_series": "_T-BILL",
"other_charges": [
{
"account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add",
"category": "Valuation and Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add",
"category": "Valuation and Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 100
},
},
{
"account_head": "_Test Account Customs Duty - _TC",
"add_deduct_tax": "Add",
"category": "Valuation",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Customs Duty - _TC",
"add_deduct_tax": "Add",
"category": "Valuation",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 10
},
},
{
"account_head": "_Test Account Excise Duty - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Excise Duty - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 12
},
},
{
"account_head": "_Test Account Education Cess - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account Education Cess - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"row_id": 3
},
},
{
"account_head": "_Test Account S&H Education Cess - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 1,
"account_head": "_Test Account S&H Education Cess - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 1,
"row_id": 3
},
},
{
"account_head": "_Test Account CST - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account CST - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"row_id": 5
},
},
{
"account_head": "_Test Account VAT - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 12.5
},
},
{
"account_head": "_Test Account Discount - _TC",
"add_deduct_tax": "Deduct",
"category": "Total",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 10,
"account_head": "_Test Account Discount - _TC",
"add_deduct_tax": "Deduct",
"category": "Total",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 10,
"row_id": 7
}
],
"posting_date": "2013-02-03",
],
"posting_date": "2013-02-03",
"supplier": "_Test Supplier",
"supplier_name": "_Test Supplier"
},
},
{
"bill_no": "NA",
"buying_price_list": "_Test Price List",
"company": "_Test Company",
"conversion_rate": 1.0,
"credit_to": "_Test Supplier - _TC",
"currency": "INR",
"doctype": "Purchase Invoice",
"bill_no": "NA",
"buying_price_list": "_Test Price List",
"company": "_Test Company",
"conversion_rate": 1.0,
"credit_to": "_Test Supplier - _TC",
"currency": "INR",
"doctype": "Purchase Invoice",
"entries": [
{
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item",
"item_name": "_Test Item",
"parentfield": "entries",
"qty": 10.0,
"rate": 50.0,
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item",
"item_name": "_Test Item",
"parentfield": "entries",
"qty": 10.0,
"rate": 50.0,
"uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_import": 0,
"naming_series": "_T-Purchase Invoice-",
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_import": 0,
"naming_series": "_T-Purchase Invoice-",
"other_charges": [
{
"account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add",
"category": "Valuation and Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add",
"category": "Valuation and Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 100.0
},
},
{
"account_head": "_Test Account VAT - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"add_deduct_tax": "Add",
"category": "Total",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 120.0
},
},
{
"account_head": "_Test Account Customs Duty - _TC",
"add_deduct_tax": "Add",
"category": "Valuation",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Customs Duty - _TC",
"add_deduct_tax": "Add",
"category": "Valuation",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges",
"rate": 150.0
}
],
"posting_date": "2013-02-03",
],
"posting_date": "2013-02-03",
"supplier": "_Test Supplier",
"supplier_name": "_Test Supplier"
}
]
]

View File

@@ -1,6 +1,6 @@
{
"autoname": "EVD.######",
"creation": "2013-05-22 12:43:10.000000",
"creation": "2013-05-22 12:43:10",
"docstatus": 0,
"doctype": "DocType",
"fields": [
@@ -8,7 +8,7 @@
"fieldname": "item_code",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"in_list_view": 1,
"label": "Item",
"oldfieldname": "item_code",
"oldfieldtype": "Link",
@@ -52,7 +52,6 @@
{
"fieldname": "quantity_and_rate",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Quantity and Rate",
"permlevel": 0
},
@@ -76,7 +75,7 @@
{
"fieldname": "uom",
"fieldtype": "Link",
"in_list_view": 0,
"in_list_view": 1,
"label": "UOM",
"options": "UOM",
"permlevel": 0,
@@ -86,7 +85,6 @@
{
"fieldname": "conversion_factor",
"fieldtype": "Float",
"in_list_view": 0,
"label": "Conversion Factor",
"permlevel": 0,
"print_hide": 1,
@@ -100,7 +98,6 @@
{
"fieldname": "price_list_rate",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Price List Rate",
"options": "currency",
"permlevel": 0,
@@ -109,8 +106,8 @@
},
{
"fieldname": "discount_percentage",
"fieldtype": "Float",
"in_list_view": 0,
"fieldtype": "Percent",
"in_list_view": 1,
"label": "Discount %",
"permlevel": 0,
"print_hide": 0,
@@ -124,7 +121,6 @@
{
"fieldname": "base_price_list_rate",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Price List Rate (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -169,7 +165,6 @@
{
"fieldname": "base_rate",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Rate (Company Currency)",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
@@ -182,7 +177,6 @@
{
"fieldname": "base_amount",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Amount (Company Currency)",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
@@ -193,17 +187,9 @@
"reqd": 1
},
{
"fieldname": "pricing_rule_for_price",
"fieldname": "pricing_rule",
"fieldtype": "Link",
"label": "Pricing Rule For Price",
"options": "Pricing Rule",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "pricing_rule_for_discount",
"fieldtype": "Link",
"label": "Pricing Rule For Discount",
"label": "Pricing Rule",
"options": "Pricing Rule",
"permlevel": 0,
"read_only": 1
@@ -211,14 +197,12 @@
{
"fieldname": "accounting",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Accounting",
"permlevel": 0
},
{
"fieldname": "expense_account",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Expense Head",
"oldfieldname": "expense_head",
"oldfieldtype": "Link",
@@ -235,11 +219,20 @@
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "project_name",
"fieldtype": "Link",
"in_filter": 1,
"label": "Project Name",
"options": "Project",
"permlevel": 0,
"print_hide": 1,
"read_only": 0
},
{
"default": ":Company",
"fieldname": "cost_center",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
@@ -253,26 +246,13 @@
{
"fieldname": "reference",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Reference",
"permlevel": 0
},
{
"fieldname": "project_name",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Project Name",
"options": "Project",
"permlevel": 0,
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "brand",
"fieldtype": "Data",
"hidden": 1,
"in_list_view": 0,
"label": "Brand",
"oldfieldname": "brand",
"oldfieldtype": "Data",
@@ -286,7 +266,6 @@
"fieldtype": "Link",
"hidden": 1,
"in_filter": 1,
"in_list_view": 0,
"label": "Item Group",
"oldfieldname": "item_group",
"oldfieldtype": "Link",
@@ -301,7 +280,6 @@
"fieldname": "item_tax_rate",
"fieldtype": "Small Text",
"hidden": 1,
"in_list_view": 0,
"label": "Item Tax Rate",
"oldfieldname": "item_tax_rate",
"oldfieldtype": "Small Text",
@@ -314,7 +292,6 @@
"fieldname": "item_tax_amount",
"fieldtype": "Currency",
"hidden": 1,
"in_list_view": 0,
"label": "Item Tax Amount",
"no_copy": 1,
"options": "Company:company:default_currency",
@@ -325,28 +302,10 @@
"search_index": 0,
"width": "150px"
},
{
"allow_on_submit": 1,
"fieldname": "page_break",
"fieldtype": "Check",
"in_list_view": 0,
"label": "Page Break",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 1
},
{
"fieldname": "col_break6",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "purchase_order",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Order",
"no_copy": 1,
"oldfieldname": "purchase_order",
@@ -357,12 +316,16 @@
"read_only": 1,
"search_index": 1
},
{
"fieldname": "col_break6",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "po_detail",
"fieldtype": "Data",
"hidden": 1,
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Order Item",
"no_copy": 1,
"oldfieldname": "po_detail",
@@ -376,7 +339,6 @@
"fieldname": "purchase_receipt",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Receipt",
"no_copy": 1,
"oldfieldname": "purchase_receipt",
@@ -387,12 +349,22 @@
"read_only": 1,
"search_index": 1
},
{
"allow_on_submit": 1,
"fieldname": "page_break",
"fieldtype": "Check",
"label": "Page Break",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 1
},
{
"fieldname": "pr_detail",
"fieldtype": "Data",
"hidden": 1,
"in_filter": 1,
"in_list_view": 0,
"label": "PR Detail",
"no_copy": 1,
"oldfieldname": "pr_detail",
@@ -406,7 +378,6 @@
"fieldname": "valuation_rate",
"fieldtype": "Currency",
"hidden": 1,
"in_list_view": 0,
"label": "Valuation Rate",
"no_copy": 1,
"options": "Company:company:default_currency",
@@ -418,7 +389,6 @@
"fieldname": "rm_supp_cost",
"fieldtype": "Currency",
"hidden": 1,
"in_list_view": 0,
"label": "Raw Materials Supplied Cost",
"no_copy": 1,
"options": "Company:company:default_currency",
@@ -429,9 +399,12 @@
],
"idx": 1,
"istable": 1,
"modified": "2014-02-28 11:27:53.000000",
"modified": "2014-09-09 05:35:35.712453",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",
"owner": "Administrator"
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -1,431 +1,164 @@
{
"_last_update": null,
"_user_tags": null,
"allow_attach": null,
"allow_copy": null,
"allow_email": null,
"allow_import": null,
"allow_print": null,
"allow_rename": null,
"allow_trash": null,
"autoname": "PVTD.######",
"change_log": null,
"client_script": null,
"client_script_core": null,
"client_string": null,
"colour": null,
"creation": "2013-05-21 16:16:04",
"custom": null,
"default_print_format": null,
"description": null,
"docstatus": 0,
"doctype": "DocType",
"document_type": null,
"dt_template": null,
"autoname": "PVTD.######",
"creation": "2013-05-21 16:16:04",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"allow_on_submit": null,
"default": "Valuation and Total",
"depends_on": null,
"description": null,
"fieldname": "category",
"fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0,
"label": "Consider Tax or Charge for",
"no_column": null,
"no_copy": null,
"oldfieldname": "category",
"oldfieldtype": "Select",
"options": "Valuation and Total\nValuation\nTotal",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"default": "Valuation and Total",
"fieldname": "category",
"fieldtype": "Select",
"in_list_view": 0,
"label": "Consider Tax or Charge for",
"oldfieldname": "category",
"oldfieldtype": "Select",
"options": "Valuation and Total\nValuation\nTotal",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"allow_on_submit": null,
"default": "Add",
"depends_on": null,
"description": null,
"fieldname": "add_deduct_tax",
"fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Add or Deduct",
"no_column": null,
"no_copy": null,
"oldfieldname": "add_deduct_tax",
"oldfieldtype": "Select",
"options": "Add\nDeduct",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"default": "Add",
"fieldname": "add_deduct_tax",
"fieldtype": "Select",
"label": "Add or Deduct",
"oldfieldname": "add_deduct_tax",
"oldfieldtype": "Select",
"options": "Add\nDeduct",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "charge_type",
"fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Type",
"no_column": null,
"no_copy": null,
"oldfieldname": "charge_type",
"oldfieldtype": "Select",
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "charge_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Type",
"oldfieldname": "charge_type",
"oldfieldtype": "Select",
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
"description": null,
"fieldname": "row_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Reference Row #",
"no_column": null,
"no_copy": null,
"oldfieldname": "row_id",
"oldfieldtype": "Data",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
"fieldname": "row_id",
"fieldtype": "Data",
"hidden": 0,
"label": "Reference Row #",
"oldfieldname": "row_id",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "description",
"fieldtype": "Small Text",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Description",
"no_column": null,
"no_copy": null,
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": "300px",
"read_only": 0,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_width": "300px",
"read_only": 0,
"reqd": 1,
"width": "300px"
},
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": null,
"no_column": null,
"no_copy": null,
"oldfieldname": null,
"oldfieldtype": null,
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "col_break1",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "account_head",
"fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0,
"label": "Account Head",
"no_column": null,
"no_copy": null,
"oldfieldname": "account_head",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "account_head",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Account Head",
"oldfieldname": "account_head",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"allow_on_submit": null,
"default": ":Company",
"depends_on": null,
"description": null,
"fieldname": "cost_center",
"fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0,
"label": "Cost Center",
"no_column": null,
"no_copy": null,
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"default": ":Company",
"fieldname": "cost_center",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0,
"read_only": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "rate",
"fieldtype": "Float",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Rate",
"no_column": null,
"no_copy": null,
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": 0,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "rate",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"permlevel": 0,
"read_only": 0,
"reqd": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "tax_amount",
"fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Amount",
"no_column": null,
"no_copy": null,
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": 0,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "tax_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount",
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "total",
"fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Total",
"no_column": null,
"no_copy": null,
"oldfieldname": "total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "total",
"fieldtype": "Currency",
"label": "Total",
"oldfieldname": "total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "item_wise_tax_detail",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Item Wise Tax Detail ",
"no_column": null,
"no_copy": null,
"oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text",
"options": null,
"permlevel": 0,
"print_hide": 1,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "item_wise_tax_detail",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Item Wise Tax Detail ",
"oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "parenttype",
"fieldtype": "Data",
"hidden": 1,
"ignore_restrictions": null,
"in_filter": 1,
"in_list_view": null,
"label": "Parenttype",
"no_column": null,
"no_copy": null,
"oldfieldname": "parenttype",
"oldfieldtype": "Data",
"options": null,
"permlevel": 0,
"print_hide": 1,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": null,
"search_index": 0,
"set_only_once": null,
"trigger": null,
"width": null
"fieldname": "parenttype",
"fieldtype": "Data",
"hidden": 1,
"in_filter": 1,
"label": "Parenttype",
"oldfieldname": "parenttype",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"search_index": 0
}
],
"hide_heading": 1,
"hide_toolbar": null,
"icon": null,
"idx": 1,
"in_create": null,
"in_dialog": null,
"is_submittable": null,
"is_transaction_doc": null,
"issingle": null,
"istable": 1,
"max_attachments": null,
"menu_index": null,
"modified": "2014-04-15 09:48:45.892548",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Taxes and Charges",
"name_case": null,
"owner": "Administrator",
"parent": null,
"parent_node": null,
"parentfield": null,
"parenttype": null,
"permissions": [],
"plugin": null,
"print_outline": null,
"read_only": null,
"read_only_onload": null,
"search_fields": null,
"section_style": null,
"server_code": null,
"server_code_compiled": null,
"server_code_core": null,
"server_code_error": null,
"show_in_menu": null,
"smallicon": null,
"subject": null,
"tag_fields": null,
"title_field": null,
"use_template": null,
"version": null
}
],
"hide_heading": 1,
"idx": 1,
"istable": 1,
"modified": "2014-05-30 03:43:32.494112",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Taxes and Charges",
"owner": "Administrator",
"permissions": []
}

View File

@@ -21,9 +21,9 @@ erpnext.POS = Class.extend({
<tr>\
<th style="width: 40%">'+__("Item")+'</th>\
<th style="width: 9%"></th>\
<th style="width: 17%; text-align: right;">Qty</th>\
<th style="width: 22%; text-align: right;">Qty</th>\
<th style="width: 9%"></th>\
<th style="width: 25%; text-align: right;">Rate</th>\
<th style="width: 20%; text-align: right;">Rate</th>\
</tr>\
</thead>\
<tbody>\
@@ -367,10 +367,8 @@ erpnext.POS = Class.extend({
this.hide_payment_button();
// If quotation to is not Customer then remove party
if (this.frm.doctype == "Quotation") {
if (this.frm.doctype == "Quotation" && this.frm.doc.quotation_to!="Customer") {
this.party_field.$wrapper.remove();
if (this.frm.doc.quotation_to == "Customer")
this.make_party();
}
},
refresh_item_list: function() {
@@ -389,14 +387,19 @@ erpnext.POS = Class.extend({
$(repl('<tr id="%(item_code)s" data-selected="false">\
<td>%(item_code)s%(item_name)s</td>\
<td style="vertical-align:middle;" align="right">\
<td style="vertical-align:top; padding-top: 10px;" \
align="right">\
<div class="decrease-qty" style="cursor:pointer;">\
<i class="icon-minus-sign icon-large text-danger"></i>\
</div>\
</td>\
<td style="vertical-align:middle;"><input type="text" value="%(qty)s" \
class="form-control qty" style="text-align: right;"></td>\
<td style="vertical-align:middle;cursor:pointer;">\
<td style="vertical-align:middle;">\
<input type="text" value="%(qty)s" \
class="form-control qty" style="text-align: right;">\
<div class="actual-qty small text-muted">'
+__("Stock: ")+'<span class="text-success">%(actual_qty)s</span>%(projected_qty)s</div>\
</td>\
<td style="vertical-align:top; padding-top: 10px;">\
<div class="increase-qty" style="cursor:pointer;">\
<i class="icon-plus-sign icon-large text-success"></i>\
</div>\
@@ -407,6 +410,9 @@ erpnext.POS = Class.extend({
item_code: d.item_code,
item_name: d.item_name===d.item_code ? "" : ("<br>" + d.item_name),
qty: d.qty,
actual_qty: d.actual_qty,
projected_qty: d.projected_qty ? (" <span title='"+__("Projected Qty")
+"'>(" + d.projected_qty + ")<span>") : "",
rate: format_currency(d.rate, me.frm.doc.currency),
amount: format_currency(d.amount, me.frm.doc.currency)
}
@@ -481,7 +487,11 @@ erpnext.POS = Class.extend({
});
me.refresh_delete_btn();
this.barcode.$input.focus();
if(me.frm.doc[this.party]) {
this.barcode.$input.focus();
} else {
this.party_field.$input.focus();
}
},
increase_decrease_qty: function(tr, operation) {
var item_code = tr.attr("id");
@@ -489,7 +499,7 @@ erpnext.POS = Class.extend({
if (operation == "increase-qty")
this.update_qty(item_code, item_qty + 1);
else if (operation == "decrease-qty" && item_qty != 1)
else if (operation == "decrease-qty" && item_qty != 0)
this.update_qty(item_code, item_qty - 1);
},
disable_text_box_and_button: function() {

View File

@@ -11,7 +11,6 @@ cur_frm.pformat.print_heading = 'Invoice';
{% include 'selling/sales_common.js' %};
{% include 'accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js' %}
{% include 'utilities/doctype/sms_control/sms_control.js' %}
{% include 'accounts/doctype/sales_invoice/pos.js' %}
frappe.provide("erpnext.accounts");
@@ -25,7 +24,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
}
// toggle to pos view if is_pos is 1 in user_defaults
if ((cint(frappe.defaults.get_user_defaults("is_pos"))===1 || this.frm.doc.is_pos)) {
if ((is_null(this.frm.doc.is_pos) && cint(frappe.defaults.get_user_default("is_pos"))===1) || this.frm.doc.is_pos) {
if(this.frm.doc.__islocal && !this.frm.doc.amended_from && !this.frm.doc.customer) {
this.frm.set_value("is_pos", 1);
this.is_pos(function() {
@@ -35,8 +34,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
}
}
// if document is POS then change default print format to "POS Invoice"
if(cur_frm.doc.is_pos && cur_frm.doc.docstatus===1) {
// if document is POS then change default print format to "POS Invoice" if no default is specified
if(cur_frm.doc.is_pos && cur_frm.doc.docstatus===1 && cint(frappe.defaults.get_user_defaults("fs_pos_view"))===1
&& !locals.DocType[cur_frm.doctype].default_print_format) {
locals.DocType[cur_frm.doctype].default_print_format = "POS Invoice";
cur_frm.setup_print_layout();
}
@@ -73,12 +73,14 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
return item.delivery_note ? true : false;
});
if(!from_delivery_note)
cur_frm.appframe.add_primary_action(__('Make Delivery'), cur_frm.cscript['Make Delivery Note'])
if(!from_delivery_note) {
cur_frm.appframe.add_primary_action(__('Make Delivery'), cur_frm.cscript['Make Delivery Note'], "icon-truck")
}
}
if(doc.outstanding_amount!=0)
cur_frm.appframe.add_primary_action(__('Make Payment Entry'), cur_frm.cscript.make_bank_voucher);
if(doc.outstanding_amount!=0) {
cur_frm.appframe.add_primary_action(__('Make Payment Entry'), cur_frm.cscript.make_bank_voucher, "icon-money");
}
}
// Show buttons only when pos view is active
@@ -102,7 +104,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
company: cur_frm.doc.company
}
})
});
}, "icon-download", "btn-default");
},
delivery_note_btn: function() {
@@ -122,7 +124,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
};
}
});
});
}, "icon-download", "btn-default");
},
tc_name: function() {
@@ -155,8 +157,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
},
customer: function() {
if(this.frm.updating_party_details)
return;
var me = this;
if(this.frm.updating_party_details) return;
erpnext.utils.get_party_details(this.frm,
"erpnext.accounts.party.get_party_details", {
posting_date: this.frm.doc.posting_date,
@@ -164,7 +167,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
party_type: "Customer",
account: this.frm.doc.debit_to,
price_list: this.frm.doc.selling_price_list,
})
}, function() {
me.apply_pricing_rule();
})
},
debit_to: function() {
@@ -181,8 +186,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
frappe.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]);
// this will make outstanding amount 0
this.frm.set_value("write_off_amount",
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount),
precision("write_off_amount"));
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount,
precision("write_off_amount"))
);
}
this.calculate_outstanding_amount(false);
@@ -222,7 +228,7 @@ cur_frm.cscript.hide_fields = function(doc) {
par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'gross_profit',
'gross_profit_percent', 'get_advances_received',
'advance_adjustment_details', 'sales_partner', 'commission_rate',
'total_commission', 'advances'];
'total_commission', 'advances', 'from_date', 'to_date'];
item_flds_normal = ['sales_order', 'delivery_note']
@@ -393,9 +399,9 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
})
}
cur_frm.cscript.convert_into_recurring_invoice = function(doc, dt, dn) {
cur_frm.cscript.is_recurring = function(doc, dt, dn) {
// set default values for recurring invoices
if(doc.convert_into_recurring_invoice) {
if(doc.is_recurring) {
var owner_email = doc.owner=="Administrator"
? frappe.user_info("Administrator").email
: doc.owner;
@@ -408,18 +414,24 @@ cur_frm.cscript.convert_into_recurring_invoice = function(doc, dt, dn) {
refresh_many(["notification_email_address", "repeat_on_day_of_month"]);
}
cur_frm.cscript.invoice_period_from_date = function(doc, dt, dn) {
// set invoice_period_to_date
if(doc.invoice_period_from_date) {
cur_frm.cscript.from_date = function(doc, dt, dn) {
// set to_date
if(doc.from_date) {
var recurring_type_map = {'Monthly': 1, 'Quarterly': 3, 'Half-yearly': 6,
'Yearly': 12};
var months = recurring_type_map[doc.recurring_type];
if(months) {
var to_date = frappe.datetime.add_months(doc.invoice_period_from_date,
var to_date = frappe.datetime.add_months(doc.from_date,
months);
doc.invoice_period_to_date = frappe.datetime.add_days(to_date, -1);
refresh_field('invoice_period_to_date');
doc.to_date = frappe.datetime.add_days(to_date, -1);
refresh_field('to_date');
}
}
}
cur_frm.cscript.send_sms = function() {
frappe.require("assets/erpnext/js/sms_manager.js");
var sms_man = new SMSManager(cur_frm.doc);
}

View File

@@ -1,5 +1,4 @@
{
"allow_attach": 1,
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2013-05-24 19:29:05",
@@ -71,7 +70,7 @@
},
{
"fieldname": "contact_mobile",
"fieldtype": "Text",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Mobile No",
"permlevel": 0,
@@ -79,13 +78,24 @@
},
{
"fieldname": "contact_email",
"fieldtype": "Text",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Contact Email",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "mode_of_payment",
"fieldtype": "Link",
"label": "Mode of Payment",
"no_copy": 0,
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Select",
"options": "Mode of Payment",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
@@ -103,19 +113,6 @@
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_restrictions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Link",
"options": "Sales Invoice",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "company",
"fieldtype": "Link",
@@ -130,12 +127,25 @@
"reqd": 1,
"search_index": 0
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Link",
"options": "Sales Invoice",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"default": "Today",
"fieldname": "posting_date",
"fieldtype": "Date",
"in_filter": 1,
"label": "Posting Date",
"label": "Date",
"no_copy": 1,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
@@ -159,14 +169,27 @@
"search_index": 0
},
{
"fieldname": "mode_of_payment",
"fieldtype": "Link",
"label": "Mode of Payment",
"no_copy": 0,
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Select",
"options": "Mode of Payment",
"allow_on_submit": 1,
"depends_on": "",
"description": "Start date of current invoice's period",
"fieldname": "from_date",
"fieldtype": "Date",
"label": "From",
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"read_only": 0
},
{
"allow_on_submit": 1,
"depends_on": "",
"description": "End date of current invoice's period",
"fieldname": "to_date",
"fieldtype": "Date",
"label": "To",
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"read_only": 0
},
{
@@ -241,6 +264,14 @@
"read_only": 0,
"reqd": 1
},
{
"fieldname": "ignore_pricing_rule",
"fieldtype": "Check",
"label": "Ignore Pricing Rule",
"no_copy": 1,
"permlevel": 1,
"print_hide": 1
},
{
"fieldname": "items",
"fieldtype": "Section Break",
@@ -303,20 +334,6 @@
"fieldtype": "Section Break",
"permlevel": 0
},
{
"fieldname": "net_total_export",
"fieldtype": "Currency",
"label": "Net Total",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "column_break_32",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "net_total",
"fieldtype": "Currency",
@@ -329,6 +346,20 @@
"read_only": 1,
"reqd": 1
},
{
"fieldname": "column_break_32",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"fieldname": "net_total_export",
"fieldtype": "Currency",
"label": "Net Total",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "taxes",
"fieldtype": "Section Break",
@@ -395,10 +426,12 @@
"permlevel": 0
},
{
"fieldname": "other_charges_total_export",
"fieldname": "other_charges_total",
"fieldtype": "Currency",
"label": "Total Taxes and Charges",
"options": "currency",
"label": "Total Taxes and Charges (Company Currency)",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
@@ -409,12 +442,10 @@
"permlevel": 0
},
{
"fieldname": "other_charges_total",
"fieldname": "other_charges_total_export",
"fieldtype": "Currency",
"label": "Total Taxes and Charges (Company Currency)",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"label": "Total Taxes and Charges",
"options": "currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
@@ -437,70 +468,6 @@
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "grand_total_export",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Grand Total",
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"reqd": 1
},
{
"fieldname": "rounded_total_export",
"fieldtype": "Currency",
"label": "Rounded Total",
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "in_words_export",
"fieldtype": "Data",
"label": "In Words",
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "gross_profit",
"fieldtype": "Currency",
"label": "Gross Profit",
"oldfieldname": "gross_profit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "gross_profit_percent",
"fieldtype": "Float",
"label": "Gross Profit (%)",
"oldfieldname": "gross_profit_percent",
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break5",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"width": "50%"
},
{
"fieldname": "grand_total",
"fieldtype": "Currency",
@@ -561,6 +528,70 @@
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break5",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"width": "50%"
},
{
"fieldname": "grand_total_export",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Grand Total",
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"reqd": 1
},
{
"fieldname": "rounded_total_export",
"fieldtype": "Currency",
"label": "Rounded Total",
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "in_words_export",
"fieldtype": "Data",
"label": "In Words",
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"read_only": 1
},
{
"fieldname": "gross_profit",
"fieldtype": "Currency",
"label": "Gross Profit",
"oldfieldname": "gross_profit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "gross_profit_percent",
"fieldtype": "Float",
"label": "Gross Profit (%)",
"oldfieldname": "gross_profit_percent",
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "advances",
"fieldtype": "Section Break",
@@ -682,6 +713,11 @@
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "fold",
"fieldtype": "Fold",
"permlevel": 0
},
{
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
@@ -1051,9 +1087,9 @@
"allow_on_submit": 1,
"depends_on": "eval:doc.docstatus<2",
"description": "Check if recurring invoice, uncheck to stop recurring or put proper End Date",
"fieldname": "convert_into_recurring_invoice",
"fieldname": "is_recurring",
"fieldtype": "Check",
"label": "Convert into Recurring Invoice",
"label": "Is Recurring",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -1061,7 +1097,7 @@
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"depends_on": "eval:doc.is_recurring==1",
"description": "Select the period when the invoice will be generated automatically",
"fieldname": "recurring_type",
"fieldtype": "Select",
@@ -1074,7 +1110,7 @@
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"depends_on": "eval:doc.is_recurring==1",
"description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc ",
"fieldname": "repeat_on_day_of_month",
"fieldtype": "Int",
@@ -1085,24 +1121,23 @@
"read_only": 0
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"description": "Start date of current invoice's period",
"fieldname": "invoice_period_from_date",
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which next invoice will be generated. It is generated on submit.\n",
"fieldname": "next_date",
"fieldtype": "Date",
"label": "Invoice Period From Date",
"label": "Next Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 0
"read_only": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"description": "End date of current invoice's period",
"fieldname": "invoice_period_to_date",
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which recurring invoice will be stop",
"fieldname": "end_date",
"fieldtype": "Date",
"label": "Invoice Period To Date",
"label": "End Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -1118,19 +1153,7 @@
"width": "50%"
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"description": "Enter email id separated by commas, invoice will be mailed automatically on particular date",
"fieldname": "notification_email_address",
"fieldtype": "Small Text",
"label": "Notification Email Address",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 0
},
{
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"depends_on": "eval:doc.is_recurring==1",
"description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.",
"fieldname": "recurring_id",
"fieldtype": "Data",
@@ -1140,24 +1163,13 @@
"print_hide": 1,
"read_only": 1
},
{
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"description": "The date on which next invoice will be generated. It is generated on submit.\n",
"fieldname": "next_date",
"fieldtype": "Date",
"label": "Next Date",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.convert_into_recurring_invoice==1",
"description": "The date on which recurring invoice will be stop",
"fieldname": "end_date",
"fieldtype": "Date",
"label": "End Date",
"depends_on": "eval:doc.is_recurring==1",
"description": "Enter email id separated by commas, invoice will be mailed automatically on particular date",
"fieldname": "notification_email_address",
"fieldtype": "Small Text",
"label": "Notification Email Address",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -1180,7 +1192,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-09 02:17:00.217556",
"modified": "2014-09-09 05:35:34.121045",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
@@ -1202,6 +1214,7 @@
},
{
"amend": 1,
"apply_user_permissions": 1,
"cancel": 0,
"create": 1,
"delete": 0,
@@ -1215,6 +1228,7 @@
"write": 1
},
{
"apply_user_permissions": 1,
"cancel": 0,
"delete": 0,
"email": 1,
@@ -1223,6 +1237,12 @@
"read": 1,
"report": 1,
"role": "Customer"
},
{
"permlevel": 1,
"read": 1,
"role": "Accounts Manager",
"write": 1
}
],
"read_only_onload": 1,

View File

@@ -14,10 +14,14 @@ from erpnext.accounts.party import get_party_account, get_due_date
from erpnext.controllers.stock_controller import update_gl_entries_after
from frappe.model.mapper import get_mapped_doc
month_map = {'Monthly': 1, 'Quarterly': 3, 'Half-yearly': 6, 'Yearly': 12}
from erpnext.controllers.recurring_document import *
from erpnext.controllers.selling_controller import SellingController
form_grid_templates = {
"entries": "templates/form_grid/item_grid.html"
}
class SalesInvoice(SellingController):
tname = 'Sales Invoice Item'
fname = 'entries'
@@ -36,7 +40,8 @@ class SalesInvoice(SellingController):
'join_field': 'so_detail',
'percent_join_field': 'sales_order',
'status_field': 'billing_status',
'keyword': 'Billed'
'keyword': 'Billed',
'overflow_type': 'billing'
}]
def validate(self):
@@ -66,11 +71,13 @@ class SalesInvoice(SellingController):
self.is_opening = 'No'
self.set_aging_date()
frappe.get_doc("Account", self.debit_to).validate_due_date(self.posting_date, self.due_date)
self.set_against_income_account()
self.validate_c_form()
self.validate_time_logs_are_submitted()
self.validate_recurring_invoice()
validate_recurring_document(self)
self.validate_multiple_billing("Delivery Note", "dn_detail", "amount",
"delivery_note_details")
@@ -96,9 +103,8 @@ class SalesInvoice(SellingController):
if not cint(self.is_pos) == 1:
self.update_against_document_in_jv()
self.update_c_form()
self.update_time_log_batch(self.name)
self.convert_to_recurring()
convert_to_recurring(self, "RECINV.#####", self.posting_date)
def before_cancel(self):
self.update_time_log_batch(None)
@@ -115,8 +121,9 @@ class SalesInvoice(SellingController):
self.update_status_updater_args()
self.update_prevdoc_status()
self.update_billing_status_for_zero_amount_refdoc("Sales Order")
self.validate_c_form_on_cancel()
self.make_cancel_gl_entries()
self.make_gl_entries_on_cancel()
def update_status_updater_args(self):
if cint(self.update_stock):
@@ -134,12 +141,17 @@ class SalesInvoice(SellingController):
'keyword':'Delivered',
'second_source_dt': 'Delivery Note Item',
'second_source_field': 'qty',
'second_join_field': 'prevdoc_detail_docname'
'second_join_field': 'prevdoc_detail_docname',
'overflow_type': 'delivery'
})
def on_update_after_submit(self):
self.validate_recurring_invoice()
self.convert_to_recurring()
validate_recurring_document(self)
convert_to_recurring(self, "RECINV.#####", self.posting_date)
def before_recurring(self):
self.aging_date = None
self.due_date = None
def get_portal_page(self):
return "invoice" if self.docstatus==1 else None
@@ -262,11 +274,11 @@ class SalesInvoice(SellingController):
"""Validate Fixed Asset and whether Income Account Entered Exists"""
for d in self.get('entries'):
item = frappe.db.sql("""select name,is_asset_item,is_sales_item from `tabItem`
where name = %s and (ifnull(end_of_life,'')='' or end_of_life > now())""", d.item_code)
acc = frappe.db.sql("""select account_type from `tabAccount`
where name = %s""", d.item_code)
acc = frappe.db.sql("""select account_type from `tabAccount`
where name = %s and docstatus != 2""", d.income_account)
if item and item[0][1] == 'Yes' and not acc[0][0] == 'Fixed Asset':
msgprint(_("Account {0} must be of type 'Fixed Asset' as Item {1} is an Asset Item").format(d.item_code), raise_exception=True)
if item and item[0][1] == 'Yes' and acc and acc[0][0] != 'Fixed Asset':
msgprint(_("Account {0} must be of type 'Fixed Asset' as Item {1} is an Asset Item").format(acc[0][0], d.item_code), raise_exception=True)
def validate_with_previous_doc(self):
super(SalesInvoice, self).validate_with_previous_doc(self.tname, {
@@ -339,8 +351,8 @@ class SalesInvoice(SellingController):
def validate_pos(self):
if not self.cash_bank_account and flt(self.paid_amount):
msgprint(_("Cash or Bank Account is mandatory for making payment entry"))
raise Exception
frappe.throw(_("Cash or Bank Account is mandatory for making payment entry"))
if flt(self.paid_amount) + flt(self.write_off_amount) \
- flt(self.grand_total) > 1/(10**(self.precision("grand_total") + 1)):
frappe.throw(_("""Paid amount + Write Off Amount can not be greater than Grand Total"""))
@@ -370,6 +382,12 @@ class SalesInvoice(SellingController):
frappe.db.set(self, 'c_form_no', '')
def validate_c_form_on_cancel(self):
""" Display message if C-Form no exists on cancellation of Sales Invoice"""
if self.c_form_applicable == 'Yes' and self.c_form_no:
msgprint(_("Please remove this Invoice {0} from C-Form {1}")
.format(self.name, self.c_form_no), raise_exception = 1)
def update_current_stock(self):
for d in self.get('entries'):
if d.item_code and d.warehouse:
@@ -383,20 +401,20 @@ class SalesInvoice(SellingController):
def get_warehouse(self):
w = frappe.db.sql("""select warehouse from `tabPOS Setting`
where ifnull(user,'') = %s and company = %s""",
(frappe.session['user'], self.company))
w = w and w[0][0] or ''
if not w:
ps = frappe.db.sql("""select name, warehouse from `tabPOS Setting`
user_pos_setting = frappe.db.sql("""select name, warehouse from `tabPOS Setting`
where ifnull(user,'') = %s and company = %s""", (frappe.session['user'], self.company))
warehouse = user_pos_setting[0][1] if user_pos_setting else None
if not warehouse:
global_pos_setting = frappe.db.sql("""select name, warehouse from `tabPOS Setting`
where ifnull(user,'') = '' and company = %s""", self.company)
if not ps:
if global_pos_setting:
warehouse = global_pos_setting[0][1]
elif not user_pos_setting:
msgprint(_("POS Setting required to make POS Entry"), raise_exception=True)
elif not ps[0][1]:
msgprint(_("Warehouse required in POS Setting"))
else:
w = ps[0][1]
return w
return warehouse
def on_update(self):
if cint(self.update_stock) == 1:
@@ -431,8 +449,7 @@ class SalesInvoice(SellingController):
submitted = frappe.db.sql("""select name from `tabSales Order`
where docstatus = 1 and name = %s""", d.sales_order)
if not submitted:
msgprint(_("Sales Order {0} is not submitted").format(d.sales_order))
raise Exception
frappe.throw(_("Sales Order {0} is not submitted").format(d.sales_order))
if d.delivery_note:
submitted = frappe.db.sql("""select name from `tabDelivery Note`
@@ -579,178 +596,6 @@ class SalesInvoice(SellingController):
})
)
def update_c_form(self):
"""Update amended id in C-form"""
if self.c_form_no and self.amended_from:
frappe.db.sql("""update `tabC-Form Invoice Detail` set invoice_no = %s,
invoice_date = %s, territory = %s, net_total = %s,
grand_total = %s where invoice_no = %s and parent = %s""",
(self.name, self.amended_from, self.c_form_no))
def validate_recurring_invoice(self):
if self.convert_into_recurring_invoice:
self.validate_notification_email_id()
if not self.recurring_type:
msgprint(_("Please select {0}").format(self.meta.get_label("recurring_type")),
raise_exception=1)
elif not (self.invoice_period_from_date and \
self.invoice_period_to_date):
throw(_("Invoice Period From and Invoice Period To dates mandatory for recurring invoice"))
def convert_to_recurring(self):
if self.convert_into_recurring_invoice:
if not self.recurring_id:
frappe.db.set(self, "recurring_id",
make_autoname("RECINV/.#####"))
self.set_next_date()
elif self.recurring_id:
frappe.db.sql("""update `tabSales Invoice`
set convert_into_recurring_invoice = 0
where recurring_id = %s""", (self.recurring_id,))
def validate_notification_email_id(self):
if self.notification_email_address:
email_list = filter(None, [cstr(email).strip() for email in
self.notification_email_address.replace("\n", "").split(",")])
from frappe.utils import validate_email_add
for email in email_list:
if not validate_email_add(email):
throw(_("{0} is an invalid email address in 'Notification Email Address'").format(email))
else:
throw(_("'Notification Email Addresses' not specified for recurring invoice"))
def set_next_date(self):
""" Set next date on which auto invoice will be created"""
if not self.repeat_on_day_of_month:
msgprint(_("Please enter 'Repeat on Day of Month' field value"), raise_exception=1)
next_date = get_next_date(self.posting_date,
month_map[self.recurring_type], cint(self.repeat_on_day_of_month))
frappe.db.set(self, 'next_date', next_date)
def get_next_date(dt, mcount, day=None):
dt = getdate(dt)
from dateutil.relativedelta import relativedelta
dt += relativedelta(months=mcount, day=day)
return dt
def manage_recurring_invoices(next_date=None, commit=True):
"""
Create recurring invoices on specific date by copying the original one
and notify the concerned people
"""
next_date = next_date or nowdate()
recurring_invoices = frappe.db.sql("""select name, recurring_id
from `tabSales Invoice` where ifnull(convert_into_recurring_invoice, 0)=1
and docstatus=1 and next_date=%s
and next_date <= ifnull(end_date, '2199-12-31')""", next_date)
exception_list = []
for ref_invoice, recurring_id in recurring_invoices:
if not frappe.db.sql("""select name from `tabSales Invoice`
where posting_date=%s and recurring_id=%s and docstatus=1""",
(next_date, recurring_id)):
try:
ref_wrapper = frappe.get_doc('Sales Invoice', ref_invoice)
new_invoice_wrapper = make_new_invoice(ref_wrapper, next_date)
send_notification(new_invoice_wrapper)
if commit:
frappe.db.commit()
except:
if commit:
frappe.db.rollback()
frappe.db.begin()
frappe.db.sql("update `tabSales Invoice` set \
convert_into_recurring_invoice = 0 where name = %s", ref_invoice)
notify_errors(ref_invoice, ref_wrapper.customer, ref_wrapper.owner)
frappe.db.commit()
exception_list.append(frappe.get_traceback())
finally:
if commit:
frappe.db.begin()
if exception_list:
exception_message = "\n\n".join([cstr(d) for d in exception_list])
raise Exception, exception_message
def make_new_invoice(ref_wrapper, posting_date):
from erpnext.accounts.utils import get_fiscal_year
new_invoice = frappe.copy_doc(ref_wrapper)
mcount = month_map[ref_wrapper.recurring_type]
invoice_period_from_date = get_next_date(ref_wrapper.invoice_period_from_date, mcount)
# get last day of the month to maintain period if the from date is first day of its own month
# and to date is the last day of its own month
if (cstr(get_first_day(ref_wrapper.invoice_period_from_date)) == \
cstr(ref_wrapper.invoice_period_from_date)) and \
(cstr(get_last_day(ref_wrapper.invoice_period_to_date)) == \
cstr(ref_wrapper.invoice_period_to_date)):
invoice_period_to_date = get_last_day(get_next_date(ref_wrapper.invoice_period_to_date,
mcount))
else:
invoice_period_to_date = get_next_date(ref_wrapper.invoice_period_to_date, mcount)
new_invoice.update({
"posting_date": posting_date,
"aging_date": posting_date,
"due_date": add_days(posting_date, cint(date_diff(ref_wrapper.due_date,
ref_wrapper.posting_date))),
"invoice_period_from_date": invoice_period_from_date,
"invoice_period_to_date": invoice_period_to_date,
"fiscal_year": get_fiscal_year(posting_date)[0],
"owner": ref_wrapper.owner,
})
new_invoice.submit()
return new_invoice
def send_notification(new_rv):
"""Notify concerned persons about recurring invoice generation"""
from frappe.core.doctype.print_format.print_format import get_html
frappe.sendmail(new_rv.notification_email_address,
subject="New Invoice : " + new_rv.name,
message = get_html(new_rv, new_rv, "SalesInvoice"))
def notify_errors(inv, customer, owner):
from frappe.utils.user import get_system_managers
recipients=get_system_managers()
frappe.sendmail(recipients + [frappe.db.get_value("User", owner, "email")],
subject="[Urgent] Error while creating recurring invoice for %s" % inv,
message = frappe.get_template("template/emails/recurring_invoice_failed.html").render({
"name": inv,
"customer": customer
}))
assign_task_to_owner(inv, "Recurring Invoice Failed", recipients)
def assign_task_to_owner(inv, msg, users):
for d in users:
from frappe.widgets.form import assign_to
args = {
'assign_to' : d,
'doctype' : 'Sales Invoice',
'name' : inv,
'description' : msg,
'priority' : 'Urgent'
}
assign_to.add(args)
@frappe.whitelist()
def get_bank_cash_account(mode_of_payment):
val = frappe.db.get_value("Mode of Payment", mode_of_payment, "default_account")
@@ -783,6 +628,7 @@ def get_income_account(doctype, txt, searchfield, start, page_len, filters):
@frappe.whitelist()
def make_delivery_note(source_name, target_doc=None):
def set_missing_values(source, target):
target.ignore_pricing_rule = 1
target.run_method("set_missing_values")
target.run_method("calculate_taxes_and_totals")

View File

@@ -0,0 +1,45 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-9">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
<span style="margin-right: 8px; display: inline-block">
<span class="filterable"
data-filter="customer,=,{%= doc.customer %}">
{%= doc.customer_name %}</span></span>
{% if(doc.outstanding_amount > 0 && doc.docstatus==1) { %}
{% if(frappe.datetime.get_diff(doc.due_date) < 0) { %}
<span class="label label-danger filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,>,0|due_date,<,Today">
{%= __("Overdue: ") + comment_when(doc.due_date) %}
</span>
{% } else { %}
<span class="label label-warning filterable"
data-filter="outstanding_amount,>,0|due_date,>=,Today"
title="{%= __("Payment Pending") %}">
{%= doc.get_formatted("due_date") %}</span>
{% } %}
{% } %}
{% if(doc.outstanding_amount==0 && doc.docstatus==1) { %}
<span class="label label-success filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,=,0">
<i class="icon-ok-sign"></i> {%= __("Paid") %}
</span>
{% } %}
{% if(doc.docstatus===0) { %}
<span class="label label-danger filterable"
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
{% } %}
</div>
</div>
<div class="col-xs-1 text-right">
{% var completed = cint((doc.grand_total - doc.outstanding_amount) * 100 / doc.grand_total), title = __("Outstanding Amount") + ": " + doc.get_formatted("outstanding_amount") %}
{% include "templates/form_grid/includes/progress.html" %}
</div>
<div class="col-xs-2 text-right">
<div class="text-ellipsis" title="{%= doc.get_formatted("grand_total_export") %}">
{%= doc.get_formatted("grand_total_export") %}
</div>
</div>
</div>

View File

@@ -3,12 +3,7 @@
// render
frappe.listview_settings['Sales Invoice'] = {
add_fields: ["`tabSales Invoice`.grand_total", "`tabSales Invoice`.outstanding_amount"],
add_columns: [{"content":"Percent Paid", width:"10%", type:"bar-graph",
label: "Payment Received"}],
prepare_data: function(data) {
data["Percent Paid"] = (data.docstatus===1 && flt(data.grand_total))
? (((flt(data.grand_total) - flt(data.outstanding_amount)) / flt(data.grand_total)) * 100)
: 0;
}
add_fields: ["customer", "customer_name", "grand_total", "outstanding_amount", "due_date", "company",
"currency"],
filters: [["outstanding_amount", ">", "0"]]
};

View File

@@ -1,385 +1,390 @@
[
{
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"entries": [
{
"amount": 500.0,
"base_amount": 500.0,
"base_rate": 500.0,
"cost_center": "_Test Cost Center - _TC",
"description": "138-CMS Shoe",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"item_name": "138-CMS Shoe",
"parentfield": "entries",
"qty": 1.0,
"amount": 500.0,
"base_amount": 500.0,
"base_rate": 500.0,
"cost_center": "_Test Cost Center - _TC",
"description": "138-CMS Shoe",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_name": "138-CMS Shoe",
"parentfield": "entries",
"qty": 1.0,
"rate": 500.0
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 561.8,
"grand_total_export": 561.8,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"net_total": 500.0,
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 561.8,
"grand_total_export": 561.8,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"net_total": 500.0,
"other_charges": [
{
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 6
},
},
{
"account_head": "_Test Account Service Tax - _TC",
"charge_type": "On Net Total",
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Service Tax - _TC",
"charge_type": "On Net Total",
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 6.36
}
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
"sales_team": [
{
"allocated_percentage": 65.5,
"doctype": "Sales Team",
"parentfield": "sales_team",
"allocated_percentage": 65.5,
"doctype": "Sales Team",
"parentfield": "sales_team",
"sales_person": "_Test Sales Person 1"
},
},
{
"allocated_percentage": 34.5,
"doctype": "Sales Team",
"parentfield": "sales_team",
"allocated_percentage": 34.5,
"doctype": "Sales Team",
"parentfield": "sales_team",
"sales_person": "_Test Sales Person 2"
}
],
"selling_price_list": "_Test Price List",
],
"selling_price_list": "_Test Price List",
"territory": "_Test Territory"
},
},
{
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-03-07",
"entries": [
{
"amount": 500.0,
"base_amount": 500.0,
"base_rate": 500.0,
"cost_center": "_Test Cost Center - _TC",
"description": "_Test Item",
"doctype": "Sales Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"income_account": "Sales - _TC",
"item_code": "_Test Item",
"item_name": "_Test Item",
"parentfield": "entries",
"price_list_rate": 500.0,
"amount": 500.0,
"base_amount": 500.0,
"base_rate": 500.0,
"cost_center": "_Test Cost Center - _TC",
"description": "_Test Item",
"doctype": "Sales Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"income_account": "Sales - _TC",
"item_code": "_Test Item",
"item_name": "_Test Item",
"parentfield": "entries",
"price_list_rate": 500.0,
"qty": 1.0
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 630.0,
"grand_total_export": 630.0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"net_total": 500.0,
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total": 630.0,
"grand_total_export": 630.0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"net_total": 500.0,
"other_charges": [
{
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 16
},
},
{
"account_head": "_Test Account Service Tax - _TC",
"charge_type": "On Net Total",
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Service Tax - _TC",
"charge_type": "On Net Total",
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 10
}
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-03-07",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-03-07",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
"territory": "_Test Territory"
},
},
{
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"entries": [
{
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"price_list_rate": 50,
"qty": 10,
"rate": 50,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"price_list_rate": 50,
"qty": 10,
"rate": 50,
"stock_uom": "_Test UOM"
},
},
{
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"price_list_rate": 150,
"qty": 5,
"rate": 150,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"price_list_rate": 150,
"qty": 5,
"rate": 150,
"stock_uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_export": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_export": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"other_charges": [
{
"account_head": "_Test Account Shipping Charges - _TC",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Shipping Charges - _TC",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 100
},
},
{
"account_head": "_Test Account Customs Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Customs Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 10
},
},
{
"account_head": "_Test Account Excise Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account Excise Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 12
},
},
{
"account_head": "_Test Account Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"row_id": 3
},
},
{
"account_head": "_Test Account S&H Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 1,
"account_head": "_Test Account S&H Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 1,
"row_id": 3
},
},
{
"account_head": "_Test Account CST - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account CST - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 2,
"row_id": 5
},
},
{
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": 12.5
},
},
{
"account_head": "_Test Account Discount - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": -10,
"account_head": "_Test Account Discount - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Sales Taxes and Charges",
"parentfield": "other_charges",
"rate": -10,
"row_id": 7
}
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
"territory": "_Test Territory"
},
},
{
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
"debit_to": "_Test Customer - _TC",
"doctype": "Sales Invoice",
"due_date": "2013-01-23",
"entries": [
{
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"price_list_rate": 62.5,
"qty": 10,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries",
"price_list_rate": 62.5,
"qty": 10,
"stock_uom": "_Test UOM"
},
},
{
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"price_list_rate": 190.66,
"qty": 5,
"cost_center": "_Test Cost Center - _TC",
"doctype": "Sales Invoice Item",
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
"parentfield": "entries",
"price_list_rate": 190.66,
"qty": 5,
"stock_uom": "_Test UOM"
}
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_export": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
],
"fiscal_year": "_Test Fiscal Year 2013",
"grand_total_export": 0,
"is_pos": 0,
"naming_series": "_T-Sales Invoice-",
"other_charges": [
{
"account_head": "_Test Account Excise Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
"idx": 1,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"account_head": "_Test Account Excise Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
"idx": 1,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 12
},
},
{
"account_head": "_Test Account Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
"idx": 2,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
"idx": 2,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 2,
"row_id": 1
},
},
{
"account_head": "_Test Account S&H Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Sales Taxes and Charges",
"idx": 3,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 1,
"account_head": "_Test Account S&H Education Cess - _TC",
"charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Sales Taxes and Charges",
"idx": 3,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 1,
"row_id": 1
},
},
{
"account_head": "_Test Account CST - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Sales Taxes and Charges",
"idx": 4,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 2,
"account_head": "_Test Account CST - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Sales Taxes and Charges",
"idx": 4,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 2,
"row_id": 3
},
},
{
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"idx": 5,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
"idx": 5,
"included_in_print_rate": 1,
"parentfield": "other_charges",
"rate": 12.5
},
},
{
"account_head": "_Test Account Customs Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Sales Taxes and Charges",
"idx": 6,
"parentfield": "other_charges",
"account_head": "_Test Account Customs Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Sales Taxes and Charges",
"idx": 6,
"parentfield": "other_charges",
"rate": 10
},
},
{
"account_head": "_Test Account Shipping Charges - _TC",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Sales Taxes and Charges",
"idx": 7,
"parentfield": "other_charges",
"account_head": "_Test Account Shipping Charges - _TC",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Sales Taxes and Charges",
"idx": 7,
"parentfield": "other_charges",
"rate": 100
},
},
{
"account_head": "_Test Account Discount - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Sales Taxes and Charges",
"idx": 8,
"parentfield": "other_charges",
"rate": -10,
"account_head": "_Test Account Discount - _TC",
"charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Sales Taxes and Charges",
"idx": 8,
"parentfield": "other_charges",
"rate": -10,
"row_id": 7
}
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
],
"plc_conversion_rate": 1.0,
"posting_date": "2013-01-23",
"price_list_currency": "INR",
"selling_price_list": "_Test Price List",
"territory": "_Test Territory"
}
]
]

View File

@@ -502,7 +502,8 @@ class TestSalesInvoice(unittest.TestCase):
"warehouse": "_Test Warehouse - _TC"
})
pos_setting.insert()
if not frappe.db.exists("POS Setting", "_Test POS Setting"):
pos_setting.insert()
def test_si_gl_entry_with_aii_and_update_stock_with_warehouse_but_no_account(self):
self.clear_stock_account_balance()
@@ -664,142 +665,9 @@ class TestSalesInvoice(unittest.TestCase):
where against_invoice=%s""", si.name))
def test_recurring_invoice(self):
from frappe.utils import get_first_day, get_last_day, add_to_date, nowdate, getdate
from erpnext.accounts.utils import get_fiscal_year
today = nowdate()
base_si = frappe.copy_doc(test_records[0])
base_si.update({
"convert_into_recurring_invoice": 1,
"recurring_type": "Monthly",
"notification_email_address": "test@example.com, test1@example.com, test2@example.com",
"repeat_on_day_of_month": getdate(today).day,
"posting_date": today,
"fiscal_year": get_fiscal_year(today)[0],
"invoice_period_from_date": get_first_day(today),
"invoice_period_to_date": get_last_day(today)
})
from erpnext.controllers.tests.test_recurring_document import test_recurring_document
# monthly
si1 = frappe.copy_doc(base_si)
si1.insert()
si1.submit()
self._test_recurring_invoice(si1, True)
# monthly without a first and last day period
si2 = frappe.copy_doc(base_si)
si2.update({
"invoice_period_from_date": today,
"invoice_period_to_date": add_to_date(today, days=30)
})
si2.insert()
si2.submit()
self._test_recurring_invoice(si2, False)
# quarterly
si3 = frappe.copy_doc(base_si)
si3.update({
"recurring_type": "Quarterly",
"invoice_period_from_date": get_first_day(today),
"invoice_period_to_date": get_last_day(add_to_date(today, months=3))
})
si3.insert()
si3.submit()
self._test_recurring_invoice(si3, True)
# quarterly without a first and last day period
si4 = frappe.copy_doc(base_si)
si4.update({
"recurring_type": "Quarterly",
"invoice_period_from_date": today,
"invoice_period_to_date": add_to_date(today, months=3)
})
si4.insert()
si4.submit()
self._test_recurring_invoice(si4, False)
# yearly
si5 = frappe.copy_doc(base_si)
si5.update({
"recurring_type": "Yearly",
"invoice_period_from_date": get_first_day(today),
"invoice_period_to_date": get_last_day(add_to_date(today, years=1))
})
si5.insert()
si5.submit()
self._test_recurring_invoice(si5, True)
# yearly without a first and last day period
si6 = frappe.copy_doc(base_si)
si6.update({
"recurring_type": "Yearly",
"invoice_period_from_date": today,
"invoice_period_to_date": add_to_date(today, years=1)
})
si6.insert()
si6.submit()
self._test_recurring_invoice(si6, False)
# change posting date but keep recuring day to be today
si7 = frappe.copy_doc(base_si)
si7.update({
"posting_date": add_to_date(today, days=-1)
})
si7.insert()
si7.submit()
# setting so that _test function works
si7.posting_date = today
self._test_recurring_invoice(si7, True)
def _test_recurring_invoice(self, base_si, first_and_last_day):
from frappe.utils import add_months, get_last_day
from erpnext.accounts.doctype.sales_invoice.sales_invoice \
import manage_recurring_invoices, get_next_date
no_of_months = ({"Monthly": 1, "Quarterly": 3, "Yearly": 12})[base_si.recurring_type]
def _test(i):
self.assertEquals(i+1, frappe.db.sql("""select count(*) from `tabSales Invoice`
where recurring_id=%s and docstatus=1""", base_si.recurring_id)[0][0])
next_date = get_next_date(base_si.posting_date, no_of_months,
base_si.repeat_on_day_of_month)
manage_recurring_invoices(next_date=next_date, commit=False)
recurred_invoices = frappe.db.sql("""select name from `tabSales Invoice`
where recurring_id=%s and docstatus=1 order by name desc""",
base_si.recurring_id)
self.assertEquals(i+2, len(recurred_invoices))
new_si = frappe.get_doc("Sales Invoice", recurred_invoices[0][0])
for fieldname in ["convert_into_recurring_invoice", "recurring_type",
"repeat_on_day_of_month", "notification_email_address"]:
self.assertEquals(base_si.get(fieldname),
new_si.get(fieldname))
self.assertEquals(new_si.posting_date, unicode(next_date))
self.assertEquals(new_si.invoice_period_from_date,
unicode(add_months(base_si.invoice_period_from_date, no_of_months)))
if first_and_last_day:
self.assertEquals(new_si.invoice_period_to_date,
unicode(get_last_day(add_months(base_si.invoice_period_to_date,
no_of_months))))
else:
self.assertEquals(new_si.invoice_period_to_date,
unicode(add_months(base_si.invoice_period_to_date, no_of_months)))
return new_si
# if yearly, test 1 repetition, else test 5 repetitions
count = 1 if (no_of_months == 12) else 5
for i in xrange(count):
base_si = _test(i)
test_recurring_document(self, test_records)
def clear_stock_account_balance(self):
frappe.db.sql("delete from `tabStock Ledger Entry`")

View File

@@ -1,13 +1,12 @@
{
"autoname": "INVD.######",
"creation": "2013-06-04 11:02:19.000000",
"creation": "2013-06-04 11:02:19",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "barcode",
"fieldtype": "Data",
"in_list_view": 0,
"label": "Barcode",
"permlevel": 0,
"print_hide": 1,
@@ -32,7 +31,7 @@
"fieldname": "item_name",
"fieldtype": "Data",
"in_filter": 0,
"in_list_view": 0,
"in_list_view": 1,
"label": "Item Name",
"oldfieldname": "item_name",
"oldfieldtype": "Data",
@@ -51,7 +50,6 @@
"fieldname": "customer_item_code",
"fieldtype": "Data",
"hidden": 1,
"in_list_view": 0,
"label": "Customer's Item Code",
"permlevel": 0,
"print_hide": 1,
@@ -73,7 +71,6 @@
{
"fieldname": "quantity_and_rate",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Quantity and Rate",
"permlevel": 0
},
@@ -91,7 +88,6 @@
{
"fieldname": "price_list_rate",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Price List Rate",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
@@ -103,8 +99,8 @@
},
{
"fieldname": "discount_percentage",
"fieldtype": "Float",
"in_list_view": 0,
"fieldtype": "Percent",
"in_list_view": 1,
"label": "Discount (%)",
"oldfieldname": "adj_rate",
"oldfieldtype": "Float",
@@ -120,7 +116,7 @@
{
"fieldname": "stock_uom",
"fieldtype": "Link",
"in_list_view": 0,
"in_list_view": 1,
"label": "UOM",
"options": "UOM",
"permlevel": 0,
@@ -129,7 +125,6 @@
{
"fieldname": "base_price_list_rate",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Price List Rate (Company Currency)",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
@@ -176,7 +171,6 @@
"fieldname": "base_rate",
"fieldtype": "Currency",
"in_filter": 0,
"in_list_view": 0,
"label": "Rate (Company Currency)",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
@@ -190,7 +184,6 @@
{
"fieldname": "base_amount",
"fieldtype": "Currency",
"in_list_view": 0,
"label": "Amount (Company Currency)",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
@@ -201,17 +194,9 @@
"reqd": 1
},
{
"fieldname": "pricing_rule_for_price",
"fieldname": "pricing_rule",
"fieldtype": "Link",
"label": "Pricing Rule For Price",
"options": "Pricing Rule",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "pricing_rule_for_discount",
"fieldtype": "Link",
"label": "Pricing Rule For Discount",
"label": "Pricing Rule",
"options": "Pricing Rule",
"permlevel": 0,
"read_only": 1
@@ -219,7 +204,6 @@
{
"fieldname": "accounting",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Accounting",
"permlevel": 0
},
@@ -227,7 +211,6 @@
"fieldname": "income_account",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Income Account",
"oldfieldname": "income_account",
"oldfieldtype": "Link",
@@ -244,7 +227,6 @@
"fieldtype": "Link",
"hidden": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Expense Account",
"options": "Account",
"permlevel": 0,
@@ -262,7 +244,6 @@
"fieldname": "cost_center",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 0,
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
@@ -271,13 +252,12 @@
"print_hide": 1,
"print_width": "120px",
"read_only": 0,
"reqd": 0,
"reqd": 1,
"width": "120px"
},
{
"fieldname": "warehouse_and_reference",
"fieldtype": "Section Break",
"in_list_view": 0,
"label": "Warehouse and Reference",
"permlevel": 0
},
@@ -285,7 +265,7 @@
"fieldname": "warehouse",
"fieldtype": "Link",
"hidden": 0,
"in_list_view": 0,
"in_list_view": 1,
"label": "Warehouse",
"oldfieldname": "warehouse",
"oldfieldtype": "Link",
@@ -310,6 +290,7 @@
{
"fieldname": "batch_no",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Batch No",
"options": "Batch",
"permlevel": 0,
@@ -359,6 +340,7 @@
"permlevel": 0
},
{
"allow_on_submit": 1,
"fieldname": "actual_qty",
"fieldtype": "Float",
"label": "Available Qty at Warehouse",
@@ -380,6 +362,7 @@
"fieldname": "sales_order",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Sales Order",
"no_copy": 1,
"oldfieldname": "sales_order",
@@ -456,9 +439,12 @@
],
"idx": 1,
"istable": 1,
"modified": "2014-02-28 11:04:19.000000",
"modified": "2014-09-09 05:35:36.019576",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",
"owner": "Administrator"
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -1,431 +1,155 @@
{
"_last_update": null,
"_user_tags": null,
"allow_attach": null,
"allow_copy": null,
"allow_email": null,
"allow_import": null,
"allow_print": null,
"allow_rename": null,
"allow_trash": null,
"autoname": "INVTD.######",
"change_log": null,
"client_script": null,
"client_script_core": null,
"client_string": null,
"colour": null,
"creation": "2013-04-24 11:39:32",
"custom": null,
"default_print_format": null,
"description": null,
"docstatus": 0,
"doctype": "DocType",
"document_type": null,
"dt_template": null,
"autoname": "INVTD.######",
"creation": "2013-04-24 11:39:32",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "charge_type",
"fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Type",
"no_column": null,
"no_copy": null,
"oldfieldname": "charge_type",
"oldfieldtype": "Select",
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "charge_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Type",
"oldfieldname": "charge_type",
"oldfieldtype": "Select",
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
"permlevel": 0,
"reqd": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
"description": null,
"fieldname": "row_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Reference Row #",
"no_column": null,
"no_copy": null,
"oldfieldname": "row_id",
"oldfieldtype": "Data",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
"fieldname": "row_id",
"fieldtype": "Data",
"hidden": 0,
"label": "Reference Row #",
"oldfieldname": "row_id",
"oldfieldtype": "Data",
"permlevel": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "description",
"fieldtype": "Small Text",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Description",
"no_column": null,
"no_copy": null,
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": "300px",
"read_only": null,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_width": "300px",
"reqd": 1,
"width": "300px"
},
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "col_break_1",
"fieldtype": "Column Break",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": null,
"no_column": null,
"no_copy": null,
"oldfieldname": null,
"oldfieldtype": null,
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"fieldname": "col_break_1",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "account_head",
"fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0,
"label": "Account Head",
"no_column": null,
"no_copy": null,
"oldfieldname": "account_head",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": 1,
"search_index": 1,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "account_head",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Account Head",
"oldfieldname": "account_head",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"reqd": 1,
"search_index": 1
},
{
"allow_on_submit": null,
"default": ":Company",
"depends_on": null,
"description": null,
"fieldname": "cost_center",
"fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0,
"label": "Cost Center",
"no_column": null,
"no_copy": null,
"oldfieldname": "cost_center_other_charges",
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"default": ":Company",
"fieldname": "cost_center",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Cost Center",
"oldfieldname": "cost_center_other_charges",
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "rate",
"fieldtype": "Float",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Rate",
"no_column": null,
"no_copy": null,
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "rate",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"permlevel": 0,
"reqd": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "tax_amount",
"fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1,
"label": "Amount",
"no_column": null,
"no_copy": null,
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": 0,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "tax_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount",
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "total",
"fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Total",
"no_column": null,
"no_copy": null,
"oldfieldname": "total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "total",
"fieldtype": "Currency",
"label": "Total",
"oldfieldname": "total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
{
"allow_on_submit": 0,
"default": null,
"depends_on": null,
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
"fieldname": "included_in_print_rate",
"fieldtype": "Check",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Is this Tax included in Basic Rate?",
"no_column": null,
"no_copy": 0,
"oldfieldname": null,
"oldfieldtype": null,
"options": null,
"permlevel": 0,
"print_hide": 1,
"print_width": "150px",
"read_only": null,
"report_hide": 1,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"allow_on_submit": 0,
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
"fieldname": "included_in_print_rate",
"fieldtype": "Check",
"label": "Is this Tax included in Basic Rate?",
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_width": "150px",
"report_hide": 1,
"width": "150px"
},
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "tax_amount_after_discount_amount",
"fieldtype": "Currency",
"hidden": 1,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Tax Amount After Discount Amount",
"no_column": null,
"no_copy": null,
"oldfieldname": null,
"oldfieldtype": null,
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "tax_amount_after_discount_amount",
"fieldtype": "Currency",
"hidden": 1,
"label": "Tax Amount After Discount Amount",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "item_wise_tax_detail",
"fieldtype": "Small Text",
"hidden": 1,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Item Wise Tax Detail",
"no_column": null,
"no_copy": null,
"oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text",
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
},
"fieldname": "item_wise_tax_detail",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Item Wise Tax Detail",
"oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text",
"permlevel": 0,
"read_only": 1
},
{
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "parenttype",
"fieldtype": "Data",
"hidden": 1,
"ignore_restrictions": null,
"in_filter": 1,
"in_list_view": null,
"label": "Parenttype",
"no_column": null,
"no_copy": null,
"oldfieldname": "parenttype",
"oldfieldtype": "Data",
"options": null,
"permlevel": 0,
"print_hide": 1,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": 1,
"set_only_once": null,
"trigger": null,
"width": null
"fieldname": "parenttype",
"fieldtype": "Data",
"hidden": 1,
"in_filter": 1,
"label": "Parenttype",
"oldfieldname": "parenttype",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"search_index": 1
}
],
"hide_heading": 1,
"hide_toolbar": null,
"icon": null,
"idx": 1,
"in_create": null,
"in_dialog": null,
"is_submittable": null,
"is_transaction_doc": null,
"issingle": null,
"istable": 1,
"max_attachments": null,
"menu_index": null,
"modified": "2014-04-14 18:40:48.450796",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Taxes and Charges",
"name_case": null,
"owner": "Administrator",
"parent": null,
"parent_node": null,
"parentfield": null,
"parenttype": null,
"permissions": [],
"plugin": null,
"print_outline": null,
"read_only": null,
"read_only_onload": null,
"search_fields": null,
"section_style": null,
"server_code": null,
"server_code_compiled": null,
"server_code_core": null,
"server_code_error": null,
"show_in_menu": null,
"smallicon": null,
"subject": null,
"tag_fields": null,
"title_field": null,
"use_template": null,
"version": null
}
],
"hide_heading": 1,
"idx": 1,
"istable": 1,
"modified": "2014-05-30 03:43:39.740638",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Taxes and Charges",
"owner": "Administrator",
"permissions": []
}

View File

@@ -2,7 +2,7 @@
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:title",
"creation": "2013-01-10 16:34:09.000000",
"creation": "2013-01-10 16:34:09",
"description": "Standard tax template that can be applied to all Sales Transactions. This template can contain list of tax heads and also other expense / income heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.",
"docstatus": 0,
"doctype": "DocType",
@@ -12,6 +12,7 @@
"fieldname": "title",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Title",
"oldfieldname": "title",
"oldfieldtype": "Data",
@@ -22,6 +23,7 @@
{
"fieldname": "is_default",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Default",
"permlevel": 0
},
@@ -34,6 +36,7 @@
"fieldname": "company",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
@@ -69,7 +72,7 @@
],
"icon": "icon-money",
"idx": 1,
"modified": "2014-01-28 12:28:27.000000",
"modified": "2014-05-27 03:49:19.023941",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Taxes and Charges Master",
@@ -77,7 +80,7 @@
"permissions": [
{
"amend": 0,
"cancel": 0,
"apply_user_permissions": 1,
"create": 0,
"delete": 0,
"email": 1,
@@ -91,7 +94,6 @@
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@@ -105,7 +107,6 @@
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,

View File

@@ -1,6 +1,6 @@
{
"autoname": "Prompt",
"creation": "2013-06-25 11:48:03.000000",
"creation": "2013-06-25 11:48:03",
"description": "Specify conditions to calculate shipping amount",
"docstatus": 0,
"doctype": "DocType",
@@ -102,13 +102,14 @@
],
"icon": "icon-truck",
"idx": 1,
"modified": "2014-01-20 17:49:27.000000",
"modified": "2014-05-27 03:49:19.387875",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Shipping Rule",
"owner": "Administrator",
"permissions": [
{
"apply_user_permissions": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
@@ -118,6 +119,7 @@
"role": "Accounts User"
},
{
"apply_user_permissions": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
@@ -127,7 +129,6 @@
"role": "Sales User"
},
{
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
@@ -139,7 +140,6 @@
"write": 1
},
{
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,

View File

@@ -15,7 +15,10 @@ def make_gl_entries(gl_map, cancel=False, adv_adj=False, merge_entries=True,
if gl_map:
if not cancel:
gl_map = process_gl_map(gl_map, merge_entries)
save_entries(gl_map, adv_adj, update_outstanding)
if gl_map and len(gl_map) > 1:
save_entries(gl_map, adv_adj, update_outstanding)
else:
frappe.throw(_("Incorrect number of General Ledger Entries found. You might have selected a wrong Account in the transaction."))
else:
delete_gl_entries(gl_map, adv_adj=adv_adj, update_outstanding=update_outstanding)

View File

@@ -25,16 +25,16 @@ pscript['onload_Accounts Browser'] = function(wrapper){
'<li>'+__('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
'<li>'+
__('Accounting Entries can be made against leaf nodes, called')+
'<b>' +__('Ledgers')+'</b>.'+ __('Entries against') +
'<b>' +__('Groups') + '</b>'+ __('are not allowed.')+
' <b>' +__('Ledgers')+'</b>. '+ __('Entries against ') +
'<b>' +__('Groups') + '</b> '+ __('are not allowed.')+
'</li>'+
'<li>'+__('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
'<li>'+
'<b>'+__('To create a Bank Account:')+'</b>'+
'<b>'+__('To create a Bank Account')+'</b>: '+
__('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts and create a new Account Ledger (by clicking on Add Child) of type "Bank"')+
'</li>'+
'<li>'+
'<b>'+__('To create a Tax Account:')+'</b>'+
'<b>'+__('To create a Tax Account') +'</b>: '+
__('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
'</li>'+
'</ol>'+
@@ -45,7 +45,7 @@ pscript['onload_Accounts Browser'] = function(wrapper){
'icon-plus');
}
wrapper.appframe.set_title_right('Refresh', function() {
wrapper.appframe.set_title_right(__('Refresh'), function() {
wrapper.$company_select.change();
});
@@ -66,7 +66,7 @@ pscript['onload_Accounts Browser'] = function(wrapper){
$.each(r.message, function(i, v) {
$('<option>').html(v).attr('value', v).appendTo(wrapper.$company_select);
});
wrapper.$company_select.val(frappe.defaults.get_user_default("company") || r[0]).change();
wrapper.$company_select.val(frappe.defaults.get_user_default("company") || r.message[0]).change();
}
});
}
@@ -238,6 +238,9 @@ erpnext.AccountsChart = Class.extend({
method: 'erpnext.accounts.utils.add_ac',
callback: function(r) {
d.hide();
if(node.expanded) {
node.toggle_node();
}
node.reload();
}
});
@@ -281,6 +284,9 @@ erpnext.AccountsChart = Class.extend({
method: 'erpnext.accounts.utils.add_cc',
callback: function(r) {
d.hide();
if(node.expanded) {
node.toggle_node();
}
node.reload();
}
});

View File

@@ -17,8 +17,9 @@ frappe.pages['financial-analytics'].onload = function(wrapper) {
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
filters: [
{
fieldtype:"Select", label: __("PL or BS"),
options:["Profit and Loss", "Balance Sheet"],
fieldtype:"Select", label: __("PL or BS"), fieldname: "pl_or_bs",
options:[{"label": __("Profit and Loss"), "value": "Profit and Loss"},
{"label": __("Balance Sheet"), "value": "Balance Sheet"}],
filter: function(val, item, opts, me) {
if(item._show) return true;
@@ -31,21 +32,23 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
}
},
{
fieldtype:"Select", label: __("Company"),
link:"Company", default_value: "Select Company...",
fieldtype:"Select", label: __("Company"), fieldname: "company",
link:"Company", default_value: __("Select Company..."),
filter: function(val, item, opts) {
return item.company == val || val == opts.default_value || item._show;
}
},
{fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year",
default_value: "Select Fiscal Year..."},
{fieldtype:"Date", label: __("From Date")},
{fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year", fieldname: "fiscal_year",
default_value: __("Select Fiscal Year...")},
{fieldtype:"Date", label: __("From Date"), fieldname: "from_date"},
{fieldtype:"Label", label: __("To")},
{fieldtype:"Date", label: __("To Date")},
{fieldtype:"Select", label: __("Range"),
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
{fieldtype:"Date", label: __("To Date"), fieldname: "to_date"},
{fieldtype:"Select", label: __("Range"), fieldname: "range",
options:[{label: __("Daily"), value: "Daily"}, {label: __("Weekly"), value: "Weekly"},
{label: __("Monthly"), value: "Monthly"}, {label: __("Quarterly"), value: "Quarterly"},
{label: __("Yearly"), value: "Yearly"}]},
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
{fieldtype:"Button", label: __("Reset Filters")}
{fieldtype:"Button", label: __("Reset Filters"), icon: "icon-filter"}
],
setup_columns: function() {
var std_columns = [
@@ -203,11 +206,11 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
if(me.pl_or_bs=='Balance Sheet') {
$.each(me.data, function(i, ac) {
if((ac.rgt - ac.lft)==1 && ac.report_type=='Balance Sheet') {
var opening = 0;
var opening = flt(ac["opening_dr"]) - flt(ac["opening_cr"]);
//if(opening) throw opening;
$.each(me.columns, function(i, col) {
if(col.formatter==me.currency_formatter) {
if(col.balance_type=="Dr") {
if(col.balance_type=="Dr" && !in_list(["opening_dr", "opening_cr"], col.field)) {
opening = opening + flt(ac[col.date + "_dr"]) -
flt(ac[col.date + "_cr"]);
me.set_debit_or_credit(ac, col.date, opening);
@@ -229,7 +232,7 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
indent: 0,
opening: 0,
checked: false,
report_type: me.pl_or_bs,
report_type: me.pl_or_bs=="Balance Sheet"? "Balance Sheet" : "Profit and Loss",
};
me.item_by_name[net_profit.name] = net_profit;
@@ -241,7 +244,7 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
$.each(me.data, function(i, ac) {
if(!ac.parent_account && me.apply_filter(ac, "company") &&
ac.report_type==me.pl_or_bs) {
ac.report_type==net_profit.report_type) {
$.each(me.columns, function(i, col) {
if(col.formatter==me.currency_formatter && col.balance_type=="Dr") {
var bal = net_profit[col.date+"_dr"] -
@@ -253,9 +256,6 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
}
});
this.data.push(net_profit);
// $.each(me.data, function(i, v) {
// if(v.report_type=="Profit and Loss") console.log(v)
// })
}
},
add_balance: function(field, account, gl) {

View File

View File

@@ -0,0 +1,52 @@
frappe.pages['pos'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
title: __('Start POS'),
single_column: true
});
wrapper.body.html('<div class="text-center" style="margin: 40px">\
<p>' + __("Select type of transaction") + '</p>\
<p class="select-type" style="margin: auto; max-width: 300px; margin-bottom: 15px;"></p>\
<p class="alert alert-warning pos-setting-message hide">'
+ __("Please setup your POS Preferences")
+ ': <a class="btn btn-default" onclick="newdoc(\'POS Setting\')">'
+ __("Make new POS Setting") + '</a></p>\
<p><button class="btn btn-primary">' + __("Start") + '</button></p>\
</div>');
var pos_type = frappe.ui.form.make_control({
parent: wrapper.body.find(".select-type"),
df: {
fieldtype: "Select",
options: [
{label: __("Billing (Sales Invoice)"), value:"Sales Invoice"},
{value:"Sales Order"},
{value:"Delivery Note"},
{value:"Quotation"},
{value:"Purchase Order"},
{value:"Purchase Receipt"},
{value:"Purchase Invoice"},
],
fieldname: "pos_type"
},
only_input: true
});
pos_type.refresh();
wrapper.body.find(".btn-primary").on("click", function() {
erpnext.open_as_pos = true;
new_doc(pos_type.get_value());
});
$.ajax({
url: "/api/resource/POS Setting",
success: function(data) {
if(!data.data.length) {
wrapper.body.find(".pos-setting-message").removeClass('hide');
}
}
})
}

View File

@@ -0,0 +1,28 @@
{
"content": null,
"creation": "2014-08-08 02:45:55.931022",
"docstatus": 0,
"doctype": "Page",
"icon": "icon-th",
"modified": "2014-08-08 05:59:33.045012",
"modified_by": "Administrator",
"module": "Accounts",
"name": "pos",
"owner": "Administrator",
"page_name": "pos",
"roles": [
{
"role": "Sales User"
},
{
"role": "Purchase User"
},
{
"role": "Accounts User"
}
],
"script": null,
"standard": "Yes",
"style": null,
"title": "POS"
}

View File

@@ -1 +0,0 @@
Period wise opening and closing balance of all transactions.

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,51 +0,0 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.require("assets/erpnext/js/account_tree_grid.js");
frappe.pages['trial-balance'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
title: __('Trial Balance'),
single_column: true
});
var TrialBalance = erpnext.AccountTreeGrid.extend({
init: function(wrapper, title) {
var me = this;
this._super(wrapper, title);
// period closing entry checkbox
this.wrapper.bind("make", function() {
$('<div style="margin: 10px 0px; "\
class="with_period_closing_entry"><input type="checkbox" checked="checked">' +
__("With period closing entry") + '</div>')
.appendTo(me.wrapper)
.find("input").click(function() { me.refresh(); });
});
},
prepare_balances: function() {
// store value of with closing entry
this.with_period_closing_entry = this.wrapper
.find(".with_period_closing_entry input:checked").length;
this._super();
},
update_balances: function(account, posting_date, v) {
// for period closing voucher,
// only consider them when adding "With Closing Entry is checked"
if(v.voucher_type === "Period Closing Voucher") {
if(this.with_period_closing_entry) {
this._super(account, posting_date, v);
}
} else {
this._super(account, posting_date, v);
}
},
})
erpnext.trial_balance = new TrialBalance(wrapper, 'Trial Balance');
wrapper.appframe.add_module_icon("Accounts")
}

View File

@@ -1,23 +0,0 @@
{
"creation": "2013-01-27 16:30:52.000000",
"docstatus": 0,
"doctype": "Page",
"icon": "icon-table",
"idx": 1,
"modified": "2013-07-11 14:44:49.000000",
"modified_by": "Administrator",
"module": "Accounts",
"name": "trial-balance",
"owner": "Administrator",
"page_name": "trial-balance",
"roles": [
{
"role": "Analytics"
},
{
"role": "Accounts Manager"
}
],
"standard": "Yes",
"title": "Trial Balance"
}

View File

@@ -5,20 +5,21 @@ from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.defaults import get_restrictions
from frappe.defaults import get_user_permissions
from frappe.utils import add_days
from erpnext.utilities.doctype.address.address import get_address_display
from erpnext.utilities.doctype.contact.contact import get_contact_details
@frappe.whitelist()
def get_party_details(party=None, account=None, party_type="Customer", company=None,
posting_date=None, price_list=None, currency=None):
posting_date=None, price_list=None, currency=None, doctype=None):
return _get_party_details(party, account, party_type, company, posting_date, price_list, currency)
return _get_party_details(party, account, party_type,
company, posting_date, price_list, currency, doctype)
def _get_party_details(party=None, account=None, party_type="Customer", company=None,
posting_date=None, price_list=None, currency=None, ignore_permissions=False):
out = frappe._dict(set_account_and_due_date(party, account, party_type, company, posting_date))
posting_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False):
out = frappe._dict(set_account_and_due_date(party, account, party_type, company, posting_date, doctype))
party = out[party_type.lower()]
@@ -86,9 +87,9 @@ def set_other_values(out, party, party_type):
def set_price_list(out, party, party_type, given_price_list):
# price list
price_list = get_restrictions().get("Price List")
price_list = filter(None, get_user_permissions().get("Price List", []))
if isinstance(price_list, list):
price_list = None
price_list = price_list[0] if len(price_list)==1 else None
if not price_list:
price_list = party.default_price_list
@@ -106,8 +107,8 @@ def set_price_list(out, party, party_type, given_price_list):
out["selling_price_list" if party.doctype=="Customer" else "buying_price_list"] = price_list
def set_account_and_due_date(party, account, party_type, company, posting_date):
if not posting_date:
def set_account_and_due_date(party, account, party_type, company, posting_date, doctype):
if doctype not in ["Sales Invoice", "Purchase Invoice"]:
# not an invoice
return {
party_type.lower(): party
@@ -162,7 +163,7 @@ def create_party_account(party, party_type, company):
company_details = frappe.db.get_value("Company", company,
["abbr", "receivables_group", "payables_group"], as_dict=True)
if not frappe.db.exists("Account", (party + " - " + company_details.abbr)):
if not frappe.db.exists("Account", (party.strip() + " - " + company_details.abbr)):
parent_account = company_details.receivables_group \
if party_type=="Customer" else company_details.payables_group
if not parent_account:

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