Compare commits

...

190 Commits

Author SHA1 Message Date
Nabin Hait
abfadce7d9 Merge branch 'develop' 2016-02-10 16:11:58 +05:30
Nabin Hait
1ec626f39b bumped to version 6.21.3 2016-02-10 16:41:58 +06:00
Nabin Hait
9bc0d18996 Merge pull request #4785 from nabinhait/fix55
[fix] Test case fixed
2016-02-10 16:08:42 +05:30
Nabin Hait
7e02831897 [fix] Test case fixed 2016-02-10 15:54:52 +05:30
Rushabh Mehta
c54d7ec445 Merge pull request #4768 from umairsy/feb-1st-week
Updated help on manufacturing module.
2016-02-10 15:44:42 +05:30
Rushabh Mehta
a4faffb813 Merge pull request #4783 from nabinhait/fixes54
[fix] call get_party_account only if party is set
2016-02-10 15:24:03 +05:30
Umair Sayyed
4715df1518 Removed current directory 2016-02-10 15:19:35 +05:30
Umair Sayyed
fc8d0f6ac7 help on manufacturing module 2016-02-10 15:19:35 +05:30
Rushabh Mehta
dc83bb8d18 Merge branch 'develop' 2016-02-10 14:51:18 +05:30
Rushabh Mehta
477ddf9119 bumped to version 6.21.2 2016-02-10 15:21:18 +06:00
Nabin Hait
ef864403a1 [fix] call get_party_account only if party is set 2016-02-10 14:47:25 +05:30
Anand Doshi
4fcf7bf01a [minor] Setup Wizard sample data: Clear Fiscal Year Error message 2016-02-10 14:35:48 +05:30
Anand Doshi
bb514467f6 Merge branch 'develop' 2016-02-10 13:19:17 +05:30
Anand Doshi
bec7e79ee8 bumped to version 6.21.1 2016-02-10 13:49:17 +06:00
Anand Doshi
247a8eedce [minor] fix add_comment 2016-02-10 13:17:40 +05:30
Rushabh Mehta
cc35f62514 Merge pull request #4781 from nabinhait/develop
Payment Request Fixes
2016-02-10 13:13:27 +05:30
Rushabh Mehta
8d1c7a2524 [fix] call get_party_account only if party is set 2016-02-10 13:08:42 +05:30
Nabin Hait
3070deb295 Packing Slip layout changes 2016-02-10 13:07:42 +05:30
Nabin Hait
e1f6e60cea [fix] Payment Request Fixes 2016-02-10 13:07:42 +05:30
Rushabh Mehta
3aa14f54b7 [fix] installation note item description to Text Editor 2016-02-10 11:56:05 +05:30
Rushabh Mehta
75de2238d1 Merge branch 'develop' 2016-02-09 12:45:25 +05:30
Rushabh Mehta
826900822c bumped to version 6.21.0 2016-02-09 13:15:24 +06:00
Rushabh Mehta
6584240277 [change log] 2016-02-09 12:35:51 +05:30
Rushabh Mehta
dd408d82da [translations] 2016-02-09 12:24:56 +05:30
Rushabh Mehta
5ddb8ea124 Merge pull request #4773 from agusputra/patch-14
Update search-record-by-specific-field.md
2016-02-09 11:20:19 +05:30
Rushabh Mehta
7f3983a3d6 Merge pull request #4769 from rmehta/pricing-rule-on-variant
[fix] pricing rule for variant, if rule for template available, use it
2016-02-09 11:20:00 +05:30
Rushabh Mehta
0c70a4ceb3 Merge pull request #4775 from nabinhait/advance32
[fix] validate advance only if invoice total is positive
2016-02-09 10:36:29 +05:30
Nabin Hait
adc0923c7e [fix] validate advance only if invoice total is positive 2016-02-09 10:32:41 +05:30
Agus Syahputra
cb7337f466 Update search-record-by-specific-field.md 2016-02-09 09:20:26 +07:00
Rushabh Mehta
b38fac8bf1 Merge pull request #4770 from agusputra/patch-13
Update managing-dynamic-link-fields.md
2016-02-09 07:45:20 +05:30
Agus Syahputra
68e6919d41 Update managing-dynamic-link-fields.md 2016-02-09 01:04:01 +07:00
Rushabh Mehta
57ebde2b9e Merge pull request #4765 from agusputra/patch-12
Update allow-fields-to-be-changed-after-submit.md
2016-02-08 18:53:51 +05:30
Rushabh Mehta
10663ab37f Merge pull request #4762 from nabinhait/multifixes3
Advance adjustment in invoice cannot be greater than grand total
2016-02-08 18:53:27 +05:30
Rushabh Mehta
0a67c9715c Merge pull request #4766 from nabinhait/permlevel1
[fix] Read permission to All for permlevel 1 fields
2016-02-08 18:52:03 +05:30
Rushabh Mehta
c403ce3b4f Merge pull request #4763 from rmehta/leave-app-cleanup
[cleanup] leave application
2016-02-08 18:51:29 +05:30
Rushabh Mehta
3cdf9e4105 Merge pull request #4764 from rmehta/remove-default-warehouse
[enhancement] default warehouse not mandatory in time, re-order level and re-order qty must always be set per warehosue
2016-02-08 18:51:01 +05:30
Rushabh Mehta
3cdf3544fb [enhancement] default warehouse not mandatory in time, re-order level and re-order qty must always be set per warehosue 2016-02-08 18:50:40 +05:30
Rushabh Mehta
faf9b589c4 [fix] pricing rule for variant, if rule for template available, use it 2016-02-08 18:49:27 +05:30
Rushabh Mehta
060f32d452 [fix] [minor] reset naming series in delete_company_transactions.py 2016-02-08 17:57:14 +05:30
Nabin Hait
4c6af87ad0 [fix] Read permission to All for permlevel 1 fields 2016-02-08 16:56:19 +05:30
Rushabh Mehta
a064e3a200 [minor] validate address template before saving 2016-02-08 14:51:14 +05:30
Anand Doshi
1106524121 Merge pull request #4644 from anandpdoshi/enhancement/comment-feed-communication-merge
[enhancement] Merge Comment and Feed into Communication 💥
2016-02-08 13:54:48 +05:30
Agus Syahputra
451ee87e9f Update allow-fields-to-be-changed-after-submit.md 2016-02-08 15:16:42 +07:00
Anand Doshi
17d4fc4fa7 [enhancement] Merge Comment and Feed into Communication 💥
Depends on frappe/frappe#1532
2016-02-08 13:06:56 +05:30
Rushabh Mehta
6bd9f7f5f0 [minor] catch duplicate entry error in bank account creation 2016-02-08 12:09:01 +05:30
Nabin Hait
289ffb788c [fix] Advance adjustment in invoice cannot be greater than grand total 2016-02-08 11:07:00 +05:30
Nabin Hait
45805622e4 [fix] Serial no query in Quality Inspection 2016-02-08 11:06:59 +05:30
Rushabh Mehta
467f5c7a75 Merge pull request #4751 from agusputra/patch-11
Update calendar.md
2016-02-08 10:59:06 +05:30
Rushabh Mehta
ca2ce13817 Merge pull request #4748 from vjFaLk/Monthly-attendance-fix
Employees with no attendance show up as blank now
2016-02-08 10:58:45 +05:30
Rushabh Mehta
57fb74f262 Merge pull request #4742 from nabinhait/multifixes1
Multi fixes
2016-02-08 10:55:48 +05:30
Rushabh Mehta
cde997edfa [cleanup] leave application 2016-02-08 10:53:22 +05:30
Nabin Hait
2b8472fe54 Merge pull request #4744 from ccfiel/develop
undo bank recon.
2016-02-08 10:45:55 +05:30
Rushabh Mehta
65ade073a9 Merge pull request #4733 from ShashaQin/patch-15
Update leave_application.py
2016-02-08 10:22:09 +05:30
Rushabh Mehta
e881b40ab2 Merge pull request #4759 from Tropicalrambler/patch-2
Corrected typo while translating
2016-02-08 10:10:57 +05:30
Rushabh Mehta
903f675b32 Merge pull request #4761 from Tropicalrambler/patch-4
Duplicate last line delete
2016-02-08 09:12:47 +05:30
Tropicalrambler
3ebd956090 Duplicate last line delete
Deleted the last line which was duplicated. Both read exactly the same.  Only one line is necessary.
2016-02-07 18:56:44 -06:00
Tropicalrambler
b01f1d2486 Corrected typo while translating
Found a switch of letters:  "wrokstation" instead of "workstation".  Corrected the item appropriately.  Found this while translating my fork of this page to spanish.
2016-02-07 16:39:12 -06:00
Agus Syahputra
4c0c69b388 Update calendar.md 2016-02-07 11:45:10 +07:00
Rushabh Mehta
16d58560a0 Merge pull request #4750 from agusputra/patch-10
Update wesite-home-page.md
2016-02-06 09:40:05 +05:30
Rushabh Mehta
dd556e7a89 Merge pull request #4749 from agusputra/patch-9
Update blogger.md
2016-02-06 09:39:36 +05:30
Agus Syahputra
12acd11814 Update wesite-home-page.md 2016-02-06 08:13:29 +07:00
Agus Syahputra
c4d3283879 Update blogger.md 2016-02-06 07:21:42 +07:00
Valmik Jangla
de7e760788 Employees with no attendance show up as blank 2016-02-05 17:46:14 +05:30
Nabin Hait
c2268caaf7 Merge pull request #4740 from vjFaLk/holiday-report-improvements
Added From and To date to Holiday Report
2016-02-05 15:13:11 +05:30
Valmik Jangla
235de6566e Minor fix 2016-02-05 15:07:16 +05:30
Nabin Hait
acd9040346 Merge pull request #4746 from agusputra/patch-8
Update overwriting-data-from-data-import-tool.md
2016-02-05 14:38:22 +05:30
Agus Syahputra
e24cfdc556 Update overwriting-data-from-data-import-tool.md 2016-02-05 08:27:20 +07:00
Chris Ian Fiel
53a46f68a2 Merge pull request #1 from ccfiel/ccfiel-patch-1
Update bank_reconciliation.py
2016-02-04 22:12:41 +08:00
Chris Ian Fiel
af667f77e6 Update bank_reconciliation.py
set to null if clearance_date is blank because if not it will set it just 0000-00-00.
2016-02-04 22:10:36 +08:00
Nabin Hait
ce4e8ec178 Merge pull request #4737 from ShashaQin/patch-18
Gross Profit report improvement
2016-02-04 17:26:20 +05:30
Nabin Hait
4129ae5395 [fix] Translations in Stock balance report 2016-02-04 17:22:57 +05:30
Nabin Hait
92c6c617de [fix] Remove filters on item group in territory and sales person target settings 2016-02-04 17:22:57 +05:30
Nabin Hait
a731ad4433 [fix] Set party account on chnage of company 2016-02-04 17:22:57 +05:30
Nabin Hait
3110c4a772 [fix] Make bank entry from expense claim 2016-02-04 17:22:57 +05:30
Rushabh Mehta
d50356dbab [docs] remove /docs/current from repo, they are re-built anyways 2016-02-04 17:10:24 +05:30
Rushabh Mehta
d1ba86a952 Merge branch 'develop' of github.com:frappe/erpnext into develop 2016-02-04 17:09:18 +05:30
Nabin Hait
03f7aa9dab Merge pull request #4741 from ShashaQin/patch-20
Report Improvement -  Item Wise Sales/Purchase History report
2016-02-04 14:38:29 +05:30
ShashaQin
8c63697f41 Update item_wise_purchase_history.json 2016-02-04 16:46:46 +08:00
ShashaQin
e7dccca782 Update item_wise_sales_history.json 2016-02-04 16:44:18 +08:00
Valmik Jangla
8d0ed21c04 Added From and To date to Holiday Report
Changed HD to H in Monthly Attendance Report
2016-02-04 12:18:55 +05:30
ShashaQin
bcc56a4557 Update gross_profit.py
Gross Profit report improvement
2016-02-04 11:45:00 +08:00
Rushabh Mehta
7bb2f3a27b [fix] newsletter priority 2016-02-03 16:20:59 +05:30
Nabin Hait
2d4cc7e71f Merge branch 'develop' 2016-02-03 15:23:56 +05:30
Nabin Hait
fba61abd2a bumped to version 6.20.0 2016-02-03 15:53:56 +06:00
Nabin Hait
94bfe8ea0d [change-log] 2016-02-03 15:14:17 +05:30
Nabin Hait
31619f0a83 [docs] 2016-02-03 15:13:55 +05:30
Nabin Hait
34037e0d88 [translations] 2016-02-03 13:11:06 +05:30
Nabin Hait
647102fc94 Merge pull request #4729 from vjFaLk/doc-update
Updated documentation for new features
2016-02-03 13:01:02 +05:30
Nabin Hait
a533b33fc6 Merge pull request #4730 from nabinhait/ShashaQin-patch-8
Financial Statements: Accumulated periodic balance based on filters
2016-02-03 12:55:36 +05:30
ShashaQin
995a71c854 Update leave_application.py
fix half day leave issue
2016-02-03 13:10:15 +08:00
Nabin Hait
bd7f48cfd4 [report] Financial Statements: Accumulated periodic balance based on filters 2016-02-02 19:05:43 +05:30
Nabin Hait
82cef59fb3 [fix] Purchase Return warehouse validation 2016-02-02 19:05:43 +05:30
ShashaQin
cc6ce5beac Update financial_statements.py 2016-02-02 19:05:42 +05:30
ShashaQin
15d7224335 Update balance_sheet.py 2016-02-02 19:05:42 +05:30
ShashaQin
1f51e71827 Update profit_and_loss_statement.py 2016-02-02 19:05:42 +05:30
ShashaQin
539a826b37 Update financial_statements.js
Adding Accumulated Values check box on Profit and Loss, Balance Sheet
2016-02-02 19:05:42 +05:30
Valmik Jangla
0ec9b90113 Updated documentation 2016-02-02 18:29:09 +05:30
Nabin Hait
49b275ad1d Merge pull request #4704 from chaoyee/develop
Update material_request.py
2016-02-02 16:11:35 +05:30
Nabin Hait
7957f0ecea Merge pull request #4726 from nabinhait/develop
Multiple fixes
2016-02-02 16:08:40 +05:30
Nabin Hait
3c55d89f7f [minor] Reference doctype in Item-wise price List Rate report 2016-02-01 15:55:09 +05:30
Nabin Hait
d5fda57297 [fix] Ignore permissions and made Customer warehouse field hidden in selling cycle 2016-02-01 15:55:09 +05:30
Nabin Hait
a85a1ff145 [fix] Validate rate with reference doc 2016-02-01 15:55:09 +05:30
Nabin Hait
afb8ec9cb6 [fix] Validate company abbr 2016-02-01 15:55:09 +05:30
Nabin Hait
8b92de26f0 Merge pull request #4718 from vjFaLk/holiday-fix
Fixed issue where no Holidays would cause the report to break
2016-02-01 15:49:15 +05:30
Nabin Hait
fcd4f2b86b Merge pull request #4706 from vrms/vrms-patch-1
Update implementation-strategy.md
2016-02-01 15:47:57 +05:30
Nabin Hait
1277a61dad Merge pull request #4720 from agusputra/patch-7
Update delete-a-company-and-all-related-transactions.md
2016-02-01 15:47:07 +05:30
Nabin Hait
767d5e48e7 Merge pull request #4723 from ShashaQin/patch-12
Stock Reconciliation Improvements
2016-02-01 15:38:48 +05:30
ShashaQin
ed11e93b25 Update stock_reconciliation.py
exclude 'disabled' item when get items
2016-02-01 16:54:19 +08:00
ShashaQin
1d702bf112 Update stock_reconciliation_item.json
Update valuation rate description. This description will be shown on downloaded template in order to input valuation rate correct.
2016-02-01 16:51:01 +08:00
Anand Doshi
43cdf792f9 Merge pull request #4715 from agusputra/patch-6
Update stock-reconciliation-for-non-serialized-item.md
2016-02-01 14:17:24 +05:30
Anand Doshi
687888133b Merge pull request #4716 from agusputra/patch-5
Update authorization-rule.md
2016-02-01 14:17:04 +05:30
Agus Syahputra
e0825aaea9 Update delete-a-company-and-all-related-transactions.md 2016-02-01 08:20:36 +07:00
Valmik Jangla
0a76b8b29a Fixed issue where no Holidays would cause the report to break 2016-01-30 10:59:40 +05:30
Agus Syahputra
0277dbc6b6 Update stock-reconciliation-for-non-serialized-item.md 2016-01-30 07:28:28 +07:00
Agus Syahputra
93a69e9485 Update authorization-rule.md 2016-01-29 23:41:46 +07:00
Anand Doshi
6e33d91443 [minor] fixes to attendance tool and employee holiday attendance 2016-01-29 16:57:54 +05:30
Valmik Jangla
07364f5ece Feature - Employee Attendance Tool 2016-01-29 16:57:54 +05:30
Valmik Jangla
1890c794d7 Added Employee Report Attendance Report
Made Holiday details mandatory
2016-01-29 16:57:54 +05:30
Chao-Yee Hsu 許朝益
71a9be8add Update material_request.py
Add "order by mr_item.item_code ASC" to 'get_material_requests_based_on_supplier(supplier)' in order to get material request item sorted by ascending order.
2016-01-29 18:45:22 +08:00
Anand Doshi
fd131a4210 Merge pull request #4699 from neilLasrado/tl-fix
Fixes in Time Log list view
2016-01-29 15:51:24 +05:30
shreyas
1a943151d7 [Refactor/Cleanup] Cleaned debug print statement
Refactored code to use format() instead of string formatting using %s
2016-01-29 15:41:45 +05:30
shreyas
c761f1b0a1 [Minor] Cleanup 2016-01-29 15:41:44 +05:30
shreyas
e970ddcee9 [Fix]
1. Sales Person wise transaction report
2. Sales Person wise target variance report
3. Sales order trend report generation for selection in group by feild
2016-01-29 15:41:44 +05:30
shreyas
51db2ba22a [Partial]Fixed Sales person target variance report 2016-01-29 15:41:44 +05:30
shreyas
cbc18ffdbf [Partial] Fixed the issue for Territory Item Group Variance report 2016-01-29 15:41:44 +05:30
Neil Trini Lasrado
5b7d0a960e Fixed indicators & List view in Time Log, Time Log Batch 2016-01-29 15:20:22 +05:30
Neil Trini Lasrado
172efb1e87 Fixed error messages while making Time Log Batch from Time Log List view 2016-01-29 14:27:03 +05:30
Anand Doshi
95760a7db6 Merge pull request #4680 from shyjuk/patch-1
Update index.md
2016-01-29 12:19:14 +05:30
Anand Doshi
9c24bec654 Merge branch 'nabinhait-mc_fix_5' into develop 2016-01-29 12:16:35 +05:30
Anand Doshi
7c0a58ac3f [fix] show formatted currency value in advance paid validation 2016-01-29 12:16:24 +05:30
Anand Doshi
77e4f6b774 [fix] strip item_code before autoname 2016-01-29 11:29:36 +05:30
Nabin Hait
5bedd649df Merge pull request #4691 from anandpdoshi/cleanup/remove-is-service-item
[cleanup] Removed 'Is Service Item' checkbox and filters
2016-01-29 11:10:54 +05:30
Anand Doshi
7207d21962 Merge pull request #4694 from umairsy/21-jan
Updated articles
2016-01-29 11:09:35 +05:30
Chao-Yee Hsu 許朝益
c118fc9343 Update material_request.py
Add "order by mr_item.item_code ASC" to 'get_material_requests_based_on_supplier(supplier)' in order to get material request item sorted by ascending order.
2016-01-29 10:38:33 +08:00
Rushabh Mehta
bad13369d4 [minor] added abbreviate function in company 2016-01-27 18:58:21 +05:30
Umair Sayyed
bf225c11b4 fixed articles 2016-01-27 18:19:31 +05:30
Umair Sayyed
694edbc89a updated articles 2016-01-27 18:19:31 +05:30
Umair Sayyed
6406f8bda0 discount article 2016-01-27 18:19:30 +05:30
Umair Sayyed
2901e14c59 articles 2016-01-27 18:19:30 +05:30
Umair Sayyed
5204eeedf7 articles 2016-01-27 18:19:30 +05:30
Nabin Hait
ee8f88d641 [patch] Set party account currency in existing orders 2016-01-27 16:01:31 +05:30
Nabin Hait
b2206d1155 [fix] Multi currency advance payment against Order 2016-01-27 15:43:24 +05:30
Anand Doshi
c54e25b5c7 Merge branch 'develop' 2016-01-27 14:20:19 +05:30
Anand Doshi
6e36a48521 bumped to version 6.19.0 2016-01-27 14:50:19 +06:00
Anand Doshi
eca2e42ecb [fix] patch title field of Pricing Rule 2016-01-27 12:36:36 +05:30
Anand Doshi
d7f7d5c9db [translations] 2016-01-27 12:36:36 +05:30
Anand Doshi
37b0f7ca47 [language] Added Estonian, Telugu and Urdu. Fixes frappe/translator#64 and frappe/translator#66 2016-01-27 12:36:35 +05:30
Anand Doshi
f4d5a66162 [change log] 2016-01-27 12:36:35 +05:30
Anand Doshi
a84186c209 Merge pull request #4692 from agusputra/patch-3
Update terms-and-conditions.md
2016-01-27 12:26:34 +05:30
Agus Syahputra
eb4c299bdb Update terms-and-conditions.md 2016-01-27 09:34:00 +07:00
Anand Doshi
5b1b2fb858 Merge branch 'shreyasp-disable_cust_supp' into develop 2016-01-26 16:41:11 +05:30
shreyas
eba9ca4d66 [Minor]Change to maintain args ordering convention 2016-01-26 16:29:26 +05:30
Anand Doshi
01de945388 [cleanup] Removed 'Is Service Item' checkbox and filters
'Is Service Item' checkbox only worked for filtering Items in Maintenance Schedule and Maintenance Visit, and validating that Items in a Maintenance type Order were of type 'Service'. However, it doesn't fit an actual use case where any Sales Item could be given for Maintenance, making the checkbox an unnecessary addition.
2016-01-26 16:22:51 +05:30
shreyas
79872bf62c [Refactor]Changed variable name to avoid conflict between args and local variable 2016-01-26 13:57:06 +05:30
shreyas
c8ac3b042b [Minor]Refactored code for better readability 2016-01-26 13:23:38 +05:30
shreyas
f76853a8d9 [Minor]Changed CustomerDisabled and CustomerFrozen to PartyDisabled and PartyFrozen 2016-01-25 21:25:11 +05:30
shreyas
323dc96c99 [Travis] Fixed reference failure in party.py 2016-01-25 18:19:14 +05:30
shreyas
2563f404d2 [Minor Change] Updated queries.py 2016-01-25 18:19:14 +05:30
shreyas
29b565fdf5 Added Disabled field to Supplier and Customer doctype
Frozen field is moved to More Information section for Customer and Supplier. Any Supplier/Customer which is disabled will not be shown while creating PO/SO
2016-01-25 18:19:13 +05:30
Anand Doshi
2ea5c6913d Merge pull request #4685 from shreyasp/supplier-credit-fix
Added the credit_days_based_on field to Supplier and Supplier Type doctype
2016-01-25 17:58:21 +05:30
Anand Doshi
5dcb40bc96 Merge pull request #4687 from anandpdoshi/fix/recurring-docs-no-copy
[fix] obey no_copy while creating recurring documents
2016-01-25 17:27:04 +05:30
Anand Doshi
c07489a096 [fix] Journal Entry: init debit/credit in account currency 2016-01-25 17:23:36 +05:30
Anand Doshi
39e2c2bb09 [fix] obey no_copy while creating recurring documents 2016-01-25 17:03:50 +05:30
Rushabh Mehta
e1a1c8ac31 [minor] clean up message if no Customer from Quotation > Sales Order, fixes #3854 2016-01-25 13:08:32 +05:30
shreyas
28a6578ba2 Added the credit_days_based_on field to Supplier and Supplier Type doctype 2016-01-25 12:44:14 +05:30
Shyju Kanaprath
932cf08aee Update index.md 2016-01-24 10:00:29 +05:30
Anand Doshi
47c2aa179b [fix] test case for get_item_details 2016-01-21 23:18:08 +05:30
Anand Doshi
f7e9a9d786 Merge branch 'develop' 2016-01-21 22:32:08 +05:30
Anand Doshi
04230cb656 bumped to version 6.18.4 2016-01-21 23:02:08 +06:00
Anand Doshi
54abf025b7 [hotfix] get_price_list_rate 2016-01-21 22:28:55 +05:30
Anand Doshi
39ac535bdb Merge branch 'develop' 2016-01-21 21:06:34 +05:30
Anand Doshi
dd74b5d44f bumped to version 6.18.3 2016-01-21 21:36:34 +06:00
Anand Doshi
afe85bdd04 [hotfix] use me.frm.doc in get_item_details 2016-01-21 21:04:16 +05:30
Nabin Hait
e4b44a86a6 Merge branch 'develop' 2016-01-21 18:53:36 +05:30
Nabin Hait
a1ccab81a0 bumped to version 6.18.2 2016-01-21 19:23:36 +06:00
Nabin Hait
cf3b318f7d Changes modified date 2016-01-21 18:52:25 +05:30
Nabin Hait
568054ab96 [fix] Make Delivery Note from Sales Invoice 2016-01-21 18:50:28 +05:30
Nabin Hait
0d207706c1 [fix] Get item details 2016-01-21 18:47:09 +05:30
Nabin Hait
3d5a6af1ae Delete Screenshot from 2014-11-18 18:13:22.png 2016-01-21 17:42:41 +05:30
Nabin Hait
79a994e895 Delete Screenshot from 2014-11-18 18:09:42.png 2016-01-21 17:42:35 +05:30
Nabin Hait
20cdaadcd4 Delete Screenshot from 2014-11-18 18:00:57.png 2016-01-21 17:42:28 +05:30
Nabin Hait
a2eccf08a1 Delete Screenshot from 2014-11-18 17:56:19.png 2016-01-21 17:42:22 +05:30
Nabin Hait
6f62ecab73 Delete Screenshot from 2014-11-18 18:09:42.png 2016-01-21 17:41:34 +05:30
Nabin Hait
463f71c6eb Delete Screenshot from 2014-11-18 18:13:22.png 2016-01-21 17:41:09 +05:30
Nabin Hait
cea6b09d44 Delete Screenshot from 2014-11-18 18:00:57.png 2016-01-21 17:40:41 +05:30
Nabin Hait
b4be679639 Delete Screenshot from 2014-11-18 17:56:19.png 2016-01-21 17:40:01 +05:30
Nabin Hait
c51ef85dd8 Merge branch 'develop' 2016-01-21 17:10:15 +05:30
Nabin Hait
3fc4e7c53f bumped to version 6.18.1 2016-01-21 17:40:14 +06:00
Nabin Hait
1d21274d65 Update manufacturer.json 2016-01-21 17:01:23 +05:30
vrms
063a88f057 Update implementation-strategy.md 2016-01-09 19:45:39 +08:00
678 changed files with 42424 additions and 133207 deletions

1
.gitignore vendored
View File

@@ -7,3 +7,4 @@ latest_updates.json
.wnf-lang-status
*.egg-info
dist/
erpnext/docs/current

View File

@@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.18.0'
__version__ = '6.21.3'

View File

@@ -52,6 +52,8 @@ class BankReconciliation(Document):
frappe.throw(_("Clearance date cannot be before check date in row {0}").format(d.idx))
if d.clearance_date or self.include_reconciled_entries:
if not d.clearance_date:
d.clearance_date = None
frappe.db.set_value("Journal Entry", d.voucher_id, "clearance_date", d.clearance_date)
frappe.db.sql("""update `tabJournal Entry` set clearance_date = %s, modified = %s
where name=%s""", (d.clearance_date, nowdate(), d.voucher_id))

View File

@@ -22,6 +22,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "50%",
"read_only": 0,
"report_hide": 0,
@@ -47,6 +48,7 @@
"options": "C-FORM-",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -69,6 +71,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -91,6 +94,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -114,6 +118,7 @@
"options": "Customer",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -135,6 +140,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "50%",
"read_only": 0,
"report_hide": 0,
@@ -160,6 +166,7 @@
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -183,6 +190,7 @@
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -206,6 +214,7 @@
"options": "\nI\nII\nIII\nIV",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -229,6 +238,7 @@
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -251,6 +261,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -272,6 +283,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -295,6 +307,7 @@
"options": "C-Form Invoice Detail",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -318,6 +331,7 @@
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -341,6 +355,7 @@
"options": "C-Form",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -359,7 +374,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 3,
"modified": "2015-11-16 06:29:43.143528",
"modified": "2016-02-03 01:09:33.043437",
"modified_by": "Administrator",
"module": "Accounts",
"name": "C-Form",
@@ -427,5 +442,7 @@
}
],
"read_only": 0,
"read_only_onload": 0
"read_only_onload": 0,
"sort_order": "DESC",
"timeline_field": "customer"
}

View File

@@ -6,10 +6,10 @@ import frappe
from frappe import _
from frappe.utils import flt, fmt_money, getdate, formatdate
from frappe.model.document import Document
from erpnext.accounts.party import validate_party_gle_currency
from erpnext.accounts.party import validate_party_gle_currency, validate_party_frozen_disabled
from erpnext.accounts.utils import get_account_currency
from erpnext.setup.doctype.company.company import get_company_currency
from erpnext.exceptions import InvalidAccountCurrency, CustomerFrozen
from erpnext.exceptions import InvalidAccountCurrency
exclude_from_linked_with = True
@@ -96,11 +96,7 @@ class GLEntry(Document):
frappe.throw(_("Cost Center {0} does not belong to Company {1}").format(self.cost_center, self.company))
def validate_party(self):
if self.party_type and self.party:
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
if not frozen_accounts_modifier in frappe.get_roles():
if frappe.db.get_value(self.party_type, self.party, "is_frozen"):
frappe.throw("{0} {1} is frozen".format(self.party_type, self.party), CustomerFrozen)
validate_party_frozen_disabled(self.party_type, self.party)
def validate_currency(self):
company_currency = get_company_currency(self.company)

View File

@@ -209,9 +209,7 @@ class JournalEntry(AccountsController):
account = self.reference_accounts[reference_name]
if reference_type in ("Sales Order", "Purchase Order"):
order = frappe.db.get_value(reference_type, reference_name,
["docstatus", "per_billed", "status", "advance_paid",
"base_grand_total", "grand_total", "currency"], as_dict=1)
order = frappe.get_doc(reference_type, reference_name)
if order.docstatus != 1:
frappe.throw(_("{0} {1} is not submitted").format(reference_type, reference_name))
@@ -225,12 +223,16 @@ class JournalEntry(AccountsController):
account_currency = get_account_currency(account)
if account_currency == self.company_currency:
voucher_total = order.base_grand_total
formatted_voucher_total = fmt_money(voucher_total, order.precision("base_grand_total"),
currency=account_currency)
else:
voucher_total = order.grand_total
formatted_voucher_total = fmt_money(voucher_total, order.precision("grand_total"),
currency=account_currency)
if flt(voucher_total) < (flt(order.advance_paid) + total):
frappe.throw(_("Advance paid against {0} {1} cannot be greater \
than Grand Total {2}").format(reference_type, reference_name, voucher_total))
than Grand Total {2}").format(reference_type, reference_name, formatted_voucher_total))
def validate_invoices(self):
"""Validate totals and docstatus for invoices"""
@@ -298,8 +300,11 @@ class JournalEntry(AccountsController):
def set_amounts_in_company_currency(self):
for d in self.get("accounts"):
d.debit = flt(flt(d.debit_in_account_currency)*flt(d.exchange_rate), d.precision("debit"))
d.credit = flt(flt(d.credit_in_account_currency)*flt(d.exchange_rate), d.precision("credit"))
d.debit_in_account_currency = flt(d.debit_in_account_currency, d.precision("debit_in_account_currency"))
d.credit_in_account_currency = flt(d.credit_in_account_currency, d.precision("credit_in_account_currency"))
d.debit = flt(d.debit_in_account_currency * flt(d.exchange_rate), d.precision("debit"))
d.credit = flt(d.credit_in_account_currency * flt(d.exchange_rate), d.precision("credit"))
def set_exchange_rate(self):
for d in self.get("accounts"):
@@ -361,10 +366,10 @@ class JournalEntry(AccountsController):
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
total_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
bank_account_currency = d.account_currency
if not self.pay_to_recd_from:
total_amount = 0
self.set_total_amount(total_amount, bank_account_currency)
def set_total_amount(self, amt, currency):
@@ -526,7 +531,7 @@ def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None, a
if not account:
account = frappe.db.get_value("Account",
{"company": company, "account_type": "Bank", "is_group": 0})
elif voucher_type=="Cash Entry":
account = frappe.db.get_value("Company", company, "default_cash_account")
if not account:
@@ -645,7 +650,7 @@ def get_payment_entry(ref_doc, args):
})
bank_row = je.append("accounts")
#make it bank_details
bank_account = get_default_bank_cash_account(ref_doc.company, "Bank Entry", account=args.get("bank_account"))
if bank_account:
@@ -667,7 +672,7 @@ def get_payment_entry(ref_doc, args):
je.set_amounts_in_company_currency()
je.set_total_debit_credit()
return je if args.get("journal_entry") else je.as_dict()
@frappe.whitelist()
@@ -794,7 +799,7 @@ def get_exchange_rate(account, account_currency=None, company=None,
company_currency = get_company_currency(company)
if account_currency != company_currency:
if reference_type in ("Sales Invoice", "Purchase Invoice") and reference_name:
if reference_type and reference_name and frappe.get_meta(reference_type).get_field("conversion_rate"):
exchange_rate = frappe.db.get_value(reference_type, reference_name, "conversion_rate")
elif account_details and account_details.account_type == "Bank" and \

View File

@@ -11,6 +11,8 @@ class PaymentGatewayAccount(Document):
self.name = self.gateway + " - " + self.currency
def validate(self):
self.currency = frappe.db.get_value("Account", self.payment_account, "account_currency")
self.update_default_payment_gateway()
self.set_as_default_if_not_set()
@@ -20,5 +22,6 @@ class PaymentGatewayAccount(Document):
where is_default = 1 """)
def set_as_default_if_not_set(self):
if not frappe.db.get_value("Payment Gateway Account", {"is_default": 1, "name": ("!=", self.name)}, "name"):
self.is_default = 1
if not frappe.db.get_value("Payment Gateway Account",
{"is_default": 1, "name": ("!=", self.name)}, "name"):
self.is_default = 1

View File

@@ -23,7 +23,7 @@ class PaymentRequest(Document):
def validate_payment_request(self):
if frappe.db.get_value("Payment Request", {"reference_name": self.reference_name,
"name": ("!=", self.name), "status": ("not in", ["Initiated", "Paid"]), "docstatus": 1}, "name"):
frappe.throw(_("Payment Request already exists {0}".fomart(self.reference_name)))
frappe.throw(_("Payment Request already exists {0}".format(self.reference_name)))
def validate_currency(self):
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
@@ -150,37 +150,43 @@ def make_payment_request(**args):
ref_doc = frappe.get_doc(args.dt, args.dn)
gateway_account = get_gateway_details(args)
pr = frappe.new_doc("Payment Request")
pr.update({
"payment_gateway": gateway_account.name,
"gateway": gateway_account.gateway,
"payment_account": gateway_account.payment_account,
"currency": ref_doc.currency,
"make_sales_invoice": args.cart or 0,
"amount": get_amount(ref_doc, args.dt),
"mute_email": args.mute_email or 0,
"email_to": args.recipient_id or "",
"subject": "Payment Request for %s"%args.dn,
"message": gateway_account.message,
"payment_url_message": gateway_account.payment_url_message,
"payment_success_url": gateway_account.payment_success_url,
"reference_doctype": args.dt,
"reference_name": args.dn
})
existing_payment_request = frappe.db.get_value("Payment Request",
{"reference_doctype": args.dt, "reference_name": args.dn})
if existing_payment_request:
pr = frappe.get_doc("Payment Request", existing_payment_request)
else:
pr = frappe.new_doc("Payment Request")
pr.update({
"payment_gateway": gateway_account.name,
"gateway": gateway_account.gateway,
"payment_account": gateway_account.payment_account,
"currency": ref_doc.currency,
"make_sales_invoice": args.cart or 0,
"amount": get_amount(ref_doc, args.dt),
"mute_email": args.mute_email or 0,
"email_to": args.recipient_id or "",
"subject": "Payment Request for %s"%args.dn,
"message": gateway_account.message,
"payment_url_message": gateway_account.payment_url_message,
"payment_success_url": gateway_account.payment_success_url,
"reference_doctype": args.dt,
"reference_name": args.dn
})
if args.return_doc:
return pr
if args.submit_doc:
pr.insert(ignore_permissions=True)
pr.submit()
if args.cart:
generate_payment_request(pr.name)
frappe.db.commit()
if not args.cart:
if args.return_doc:
return pr
if args.submit_doc:
pr.insert(ignore_permissions=True)
pr.submit()
if args.cart:
generate_payment_request(pr.name)
frappe.db.commit()
if not args.cart:
return pr
return pr.as_dict()

View File

@@ -28,7 +28,7 @@ payment_method = [
{
"doctype": "Payment Gateway Account",
"gateway": "_Test Gateway",
"payment_account": "_Test Bank - _TC",
"payment_account": "_Test Bank USD - _TC",
"currency": "USD"
}
]

View File

@@ -42,6 +42,10 @@ 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.set_value("received_or_paid", frm.doc.party_type=="Customer" ? "Received" : "Paid");
});
frappe.ui.form.on("Payment Tool", "party", function(frm) {
if(frm.doc.party_type && frm.doc.party) {
return frappe.call({

View File

@@ -71,7 +71,9 @@ class PaymentTool(Document):
d2.account = self.payment_account
d2.account_currency = bank_account_currency
d2.account_type = bank_account_type
d2.exchange_rate = get_exchange_rate(self.payment_account, self.company)
d2.exchange_rate = get_exchange_rate(self.payment_account, bank_account_currency, self.company,
debit=(abs(total_payment_amount) if total_payment_amount < 0 else 0),
credit=(total_payment_amount if total_payment_amount > 0 else 0))
d2.account_balance = get_balance_on(self.payment_account)
amount_field_bank = 'debit_in_account_currency' if total_payment_amount < 0 \

View File

@@ -97,10 +97,10 @@ def apply_pricing_rule(args):
args = json.loads(args)
args = frappe._dict(args)
if not args.transaction_type:
set_transaction_type(args)
# list of dictionaries
out = []
@@ -142,7 +142,7 @@ def get_pricing_rule_for_item(args):
customer = frappe.db.get_value("Customer", args.customer, ["customer_group", "territory"])
if customer:
args.customer_group, args.territory = customer
args.supplier = args.supplier_type = None
elif args.supplier and not args.supplier_type:
@@ -186,7 +186,7 @@ def get_pricing_rules(args):
return condition
conditions = ""
conditions = item_variant_condition = ""
values = {"item_code": args.get("item_code"), "brand": args.get("brand")}
for field in ["company", "customer", "supplier", "supplier_type", "campaign", "sales_partner"]:
@@ -211,16 +211,26 @@ def get_pricing_rules(args):
values['transaction_date'] = args.get('transaction_date')
item_group_condition = _get_tree_conditions("Item Group", False)
if item_group_condition: item_group_condition = " or " + item_group_condition
if item_group_condition:
item_group_condition = " or " + item_group_condition
# load variant of if not defined
if "variant_of" not in args:
args.variant_of = frappe.db.get_value("Item", args.item_code, "variant_of")
if args.variant_of:
item_variant_condition = ' or item_code=%(variant_of)s '
values['variant_of'] = args.variant_of
return frappe.db.sql("""select * from `tabPricing Rule`
where (item_code=%(item_code)s {item_group_condition} or brand=%(brand)s)
where (item_code=%(item_code)s {item_variant_condition} {item_group_condition} or brand=%(brand)s)
and docstatus < 2 and disable = 0
and {transaction_type} = 1 {conditions}
order by priority desc, name desc""".format(
item_group_condition=item_group_condition,
transaction_type= args.transaction_type,
conditions=conditions), values, as_dict=1)
item_group_condition = item_group_condition,
item_variant_condition = item_variant_condition,
transaction_type = args.transaction_type,
conditions = conditions), values, as_dict=1)
def filter_pricing_rules(args, pricing_rules):
# filter for qty
@@ -228,6 +238,11 @@ def filter_pricing_rules(args, pricing_rules):
pricing_rules = filter(lambda x: (flt(args.get("qty"))>=flt(x.min_qty)
and (flt(args.get("qty"))<=x.max_qty if x.max_qty else True)), pricing_rules)
# add variant_of property in pricing rule
for p in pricing_rules:
if p.item_code and args.variant_of:
p.variant_of = args.variant_of
# find pricing rule with highest priority
if pricing_rules:
max_priority = max([cint(p.priority) for p in pricing_rules])
@@ -239,7 +254,7 @@ def filter_pricing_rules(args, pricing_rules):
"supplier", "supplier_type", "campaign", "sales_partner"]
if len(pricing_rules) > 1:
for field_set in [["item_code", "item_group", "brand"],
for field_set in [["item_code", "variant_of", "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):
@@ -253,8 +268,7 @@ def filter_pricing_rules(args, 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}")
frappe.throw(_("Multiple Price Rules 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]
@@ -281,10 +295,10 @@ def apply_internal_priority(pricing_rules, field_set, args):
def set_transaction_type(args):
if args.doctype in ("Opportunity", "Quotation", "Sales Order", "Delivery Note", "Sales Invoice"):
args.transaction_type = "selling"
elif args.doctype in ("Material Request", "Supplier Quotation", "Purchase Order",
elif args.doctype in ("Material Request", "Supplier Quotation", "Purchase Order",
"Purchase Receipt", "Purchase Invoice"):
args.transaction_type = "buying"
elif args.customer:
args.transaction_type = "selling"
else:
args.transaction_type = "buying"
args.transaction_type = "buying"

View File

@@ -41,12 +41,12 @@ class TestPricingRule(unittest.TestCase):
})
details = get_item_details(args)
self.assertEquals(details.get("discount_percentage"), 10)
prule = frappe.get_doc(test_record.copy())
prule.applicable_for = "Customer"
prule.title = "_Test Pricing Rule for Customer"
self.assertRaises(MandatoryError, prule.insert)
prule.customer = "_Test Customer"
prule.discount_percentage = 20
prule.insert()
@@ -59,7 +59,7 @@ class TestPricingRule(unittest.TestCase):
prule.title = "_Test Pricing Rule for Item Group"
prule.discount_percentage = 15
prule.insert()
args.customer = "_Test Customer 1"
details = get_item_details(args)
self.assertEquals(details.get("discount_percentage"), 10)
@@ -85,3 +85,73 @@ class TestPricingRule(unittest.TestCase):
self.assertEquals(details.get("discount_percentage"), 15)
frappe.db.sql("delete from `tabPricing Rule`")
def test_pricing_rule_for_variants(self):
from erpnext.stock.get_item_details import get_item_details
from frappe import MandatoryError
frappe.db.sql("delete from `tabPricing Rule`")
if not frappe.db.exists("Item", "Test Variant PRT"):
frappe.get_doc({
"doctype": "Item",
"item_code": "Test Variant PRT",
"item_name": "Test Variant PRT",
"description": "Test Variant PRT",
"item_group": "_Test Item Group",
"is_stock_item": 1,
"variant_of": "_Test Variant Item",
"default_warehouse": "_Test Warehouse - _TC",
"stock_uom": "_Test UOM",
"attributes": [
{
"attribute": "Test Size",
"attribute_value": "Medium"
}
],
}).insert()
frappe.get_doc({
"doctype": "Pricing Rule",
"title": "_Test Pricing Rule 1",
"apply_on": "Item Code",
"item_code": "_Test Variant Item",
"selling": 1,
"price_or_discount": "Discount Percentage",
"price": 0,
"discount_percentage": 7.5,
"company": "_Test Company"
}).insert()
args = frappe._dict({
"item_code": "Test Variant PRT",
"company": "_Test Company",
"price_list": "_Test Price List",
"currency": "_Test Currency",
"doctype": "Sales Order",
"conversion_rate": 1,
"price_list_currency": "_Test Currency",
"plc_conversion_rate": 1,
"order_type": "Sales",
"customer": "_Test Customer",
"name": None
})
details = get_item_details(args)
self.assertEquals(details.get("discount_percentage"), 7.5)
# add a new pricing rule for that item code, it should take priority
frappe.get_doc({
"doctype": "Pricing Rule",
"title": "_Test Pricing Rule 2",
"apply_on": "Item Code",
"item_code": "Test Variant PRT",
"selling": 1,
"price_or_discount": "Discount Percentage",
"price": 0,
"discount_percentage": 17.5,
"company": "_Test Company"
}).insert()
details = get_item_details(args)
self.assertEquals(details.get("discount_percentage"), 17.5)

View File

@@ -7,6 +7,7 @@
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"fields": [
{
"allow_on_submit": 1,
@@ -1563,7 +1564,7 @@
"in_list_view": 0,
"label": "Write Off Account",
"length": 0,
"no_copy": 1,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"print_hide": 1,
@@ -1588,7 +1589,7 @@
"in_list_view": 0,
"label": "Write Off Cost Center",
"length": 0,
"no_copy": 1,
"no_copy": 0,
"options": "Cost Center",
"permlevel": 0,
"print_hide": 1,
@@ -2487,7 +2488,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2015-12-17 16:18:58.177334",
"modified": "2016-02-08 16:27:10.669373",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
@@ -2612,6 +2613,26 @@
"share": 0,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 1,
"print": 0,
"read": 1,
"report": 0,
"role": "All",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
}
],
"read_only": 0,
@@ -2619,5 +2640,6 @@
"search_fields": "posting_date, supplier, fiscal_year, bill_no, base_grand_total, outstanding_amount",
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "supplier",
"title_field": "title"
}

View File

@@ -263,9 +263,9 @@ class PurchaseInvoice(BuyingController):
# parent's gl entry
if self.grand_total:
# Didnot use base_grand_total to book rounding loss gle
grand_total_in_company_currency = flt(self.grand_total * self.conversion_rate,
grand_total_in_company_currency = flt(self.grand_total * self.conversion_rate,
self.precision("grand_total"))
gl_entries.append(
self.get_gl_dict({
"account": self.credit_to,
@@ -454,6 +454,9 @@ class PurchaseInvoice(BuyingController):
for pr in set(updated_pr):
frappe.get_doc("Purchase Receipt", pr).update_billing_percentage(update_modified=update_modified)
def on_recurring(self, reference_doc):
self.due_date = None
@frappe.whitelist()
def get_expense_account(doctype, txt, searchfield, start, page_len, filters):
from erpnext.controllers.queries import get_match_cond

View File

@@ -70,7 +70,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
});
if(!from_delivery_note && !is_delivered_by_supplier) {
cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Delivery Note'], __("Make"));
cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Make Delivery Note'],
__("Make"));
}
}

View File

@@ -3233,7 +3233,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2015-12-17 16:19:15.963267",
"modified": "2016-02-08 16:23:46.560153",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
@@ -3281,7 +3281,7 @@
},
{
"amend": 0,
"apply_user_permissions": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 0,
"delete": 0,
@@ -3297,6 +3297,7 @@
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"user_permission_doctypes": "[\"Company\"]",
"write": 0
},
{
@@ -3318,6 +3319,26 @@
"share": 0,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 1,
"print": 0,
"read": 1,
"report": 0,
"role": "All",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
}
],
"read_only": 0,
@@ -3325,6 +3346,6 @@
"search_fields": "posting_date, due_date, customer, fiscal_year, base_grand_total, outstanding_amount",
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"version": 0
"timeline_field": "customer",
"title_field": "title"
}

View File

@@ -532,9 +532,9 @@ class SalesInvoice(SellingController):
def make_customer_gl_entry(self, gl_entries):
if self.grand_total:
# Didnot use base_grand_total to book rounding loss gle
grand_total_in_company_currency = flt(self.grand_total * self.conversion_rate,
grand_total_in_company_currency = flt(self.grand_total * self.conversion_rate,
self.precision("grand_total"))
gl_entries.append(
self.get_gl_dict({
"account": self.debit_to,
@@ -656,6 +656,12 @@ class SalesInvoice(SellingController):
for dn in set(updated_delivery_notes):
frappe.get_doc("Delivery Note", dn).update_billing_percentage(update_modified=update_modified)
def on_recurring(self, reference_doc):
for fieldname in ("c_form_applicable", "c_form_no", "write_off_amount"):
self.set(fieldname, reference_doc.get(fieldname))
self.due_date = None
def get_list_context(context=None):
from erpnext.controllers.website_list_for_contact import get_list_context
list_context = get_list_context(context)

View File

@@ -7,6 +7,7 @@
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"fields": [
{
"allow_on_submit": 0,
@@ -972,13 +973,13 @@
"collapsible": 0,
"fieldname": "target_warehouse",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"hidden": 1,
"ignore_user_permissions": 1,
"in_filter": 0,
"in_list_view": 0,
"label": "Target Warehouse",
"label": "Customer Warehouse (Optional)",
"length": 0,
"no_copy": 0,
"no_copy": 1,
"options": "Warehouse",
"permlevel": 0,
"precision": "",
@@ -1444,7 +1445,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-01-06 02:23:06.432442",
"modified": "2016-02-01 11:16:58.288462",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",

View File

@@ -10,7 +10,7 @@ from frappe.defaults import get_user_permissions
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff
from erpnext.utilities.doctype.address.address import get_address_display
from erpnext.utilities.doctype.contact.contact import get_contact_details
from erpnext.exceptions import InvalidAccountCurrency
from erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency
class DuplicatePartyAccountError(frappe.ValidationError): pass
@@ -237,16 +237,11 @@ def get_due_date(posting_date, party_type, party, company):
due_date = None
if posting_date and party:
due_date = posting_date
if party_type=="Customer":
credit_days_based_on, credit_days = get_credit_days(party_type, party, company)
if credit_days_based_on == "Fixed Days" and credit_days:
due_date = add_days(posting_date, credit_days)
elif credit_days_based_on == "Last Day of the Next Month":
due_date = (get_first_day(posting_date, 0, 2) + datetime.timedelta(-1)).strftime("%Y-%m-%d")
else:
credit_days = get_credit_days(party_type, party, company)
if credit_days:
due_date = add_days(posting_date, credit_days)
credit_days_based_on, credit_days = get_credit_days(party_type, party, company)
if credit_days_based_on == "Fixed Days" and credit_days:
due_date = add_days(posting_date, credit_days)
elif credit_days_based_on == "Last Day of the Next Month":
due_date = (get_first_day(posting_date, 0, 2) + datetime.timedelta(-1)).strftime("%Y-%m-%d")
return due_date
@@ -255,20 +250,21 @@ def get_credit_days(party_type, party, company):
if party_type == "Customer":
credit_days_based_on, credit_days, customer_group = \
frappe.db.get_value(party_type, party, ["credit_days_based_on", "credit_days", "customer_group"])
if not credit_days_based_on:
credit_days_based_on, credit_days = \
frappe.db.get_value("Customer Group", customer_group, ["credit_days_based_on", "credit_days"]) \
or frappe.db.get_value("Company", company, ["credit_days_based_on", "credit_days"])
return credit_days_based_on, credit_days
else:
credit_days, supplier_type = frappe.db.get_value(party_type, party, ["credit_days", "supplier_type"])
if not credit_days:
credit_days = frappe.db.get_value("Supplier Type", supplier_type, "credit_days") \
or frappe.db.get_value("Company", company, "credit_days")
credit_days_based_on, credit_days, supplier_type = \
frappe.db.get_value(party_type, party, ["credit_days_based_on", "credit_days", "supplier_type"])
return credit_days
if not credit_days_based_on:
if party_type == "Customer":
credit_days_based_on, credit_days = \
frappe.db.get_value("Customer Group", customer_group, ["credit_days_based_on", "credit_days"]) \
or frappe.db.get_value("Company", company, ["credit_days_based_on", "credit_days"])
else:
credit_days_based_on, credit_days = \
frappe.db.get_value("Supplier Type", supplier_type, ["credit_days_based_on", "credit_days"])\
or frappe.db.get_value("Company", company, ["credit_days_based_on", "credit_days"] )
return credit_days_based_on, credit_days
def validate_due_date(posting_date, due_date, party_type, party, company):
if getdate(due_date) < getdate(posting_date):
@@ -312,3 +308,13 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
args.update({"use_for_shopping_cart": use_for_shopping_cart})
return get_tax_template(posting_date, args)
def validate_party_frozen_disabled(party_type, party_name):
if party_type and party_name:
party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
if party.disabled:
frappe.throw("{0} {1} is disabled".format(party_type, party_name), PartyDisabled)
elif party.is_frozen:
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
if not frozen_accounts_modifier in frappe.get_roles():
frappe.throw("{0} {1} is frozen".format(party_type, party_name), PartyFrozen)

View File

@@ -8,11 +8,12 @@ from frappe.utils import flt
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data)
def execute(filters=None):
period_list = get_period_list(filters.fiscal_year, filters.periodicity, from_beginning=True)
asset = get_data(filters.company, "Asset", "Debit", period_list)
liability = get_data(filters.company, "Liability", "Credit", period_list)
equity = get_data(filters.company, "Equity", "Credit", period_list)
period_list = get_period_list(filters.fiscal_year, filters.periodicity)
asset = get_data(filters.company, "Asset", "Debit", period_list, only_current_fiscal_year=False)
liability = get_data(filters.company, "Liability", "Credit", period_list, only_current_fiscal_year=False)
equity = get_data(filters.company, "Equity", "Credit", period_list, only_current_fiscal_year=False)
provisional_profit_loss = get_provisional_profit_loss(asset, liability, equity,
period_list, filters.company)
@@ -23,12 +24,13 @@ def execute(filters=None):
if provisional_profit_loss:
data.append(provisional_profit_loss)
columns = get_columns(period_list)
columns = get_columns(filters.periodicity, period_list, company=filters.company)
return columns, data
def get_provisional_profit_loss(asset, liability, equity, period_list, company):
if asset and (liability or equity):
total=0
provisional_profit_loss = {
"account_name": "'" + _("Provisional Profit / Loss (Credit)") + "'",
"account": None,
@@ -49,6 +51,9 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
if provisional_profit_loss[period.key]:
has_value = True
total += flt(provisional_profit_loss[period.key])
provisional_profit_loss["total"] = total
if has_value:
return provisional_profit_loss

View File

@@ -4,3 +4,9 @@
frappe.require("assets/erpnext/js/financial_statements.js");
frappe.query_reports["Cash Flow"] = erpnext.financial_statements;
frappe.query_reports["Cash Flow"]["filters"].push({
"fieldname": "accumulated_values",
"label": __("Accumulated Values"),
"fieldtype": "Check"
})

View File

@@ -48,12 +48,14 @@ def execute(filters=None):
cash_flow_accounts.append(financing_accounts)
# compute net profit / loss
income = get_data(filters.company, "Income", "Credit", period_list, ignore_closing_entries=True)
expense = get_data(filters.company, "Expense", "Debit", period_list, ignore_closing_entries=True)
income = get_data(filters.company, "Income", "Credit", period_list,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
expense = get_data(filters.company, "Expense", "Debit", period_list,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
net_profit_loss = get_net_profit_loss(income, expense, period_list, filters.company)
data = []
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
for cash_flow_account in cash_flow_accounts:
@@ -77,7 +79,8 @@ def execute(filters=None):
section_data.append(net_profit_loss)
for account in cash_flow_account['account_types']:
account_data = get_account_type_based_data(filters.company, account['account_type'], period_list)
account_data = get_account_type_based_data(filters.company,
account['account_type'], period_list, filters.accumulated_values)
account_data.update({
"account_name": account['label'],
"indent": 1,
@@ -91,13 +94,14 @@ def execute(filters=None):
period_list, company_currency)
add_total_row_account(data, data, _("Net Change in Cash"), period_list, company_currency)
columns = get_columns(period_list)
columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company)
return columns, data
def get_account_type_based_data(company, account_type, period_list):
def get_account_type_based_data(company, account_type, period_list, accumulated_values):
data = {}
total = 0
for period in period_list:
gl_sum = frappe.db.sql_list("""
select sum(credit) - sum(debit)
@@ -105,7 +109,8 @@ def get_account_type_based_data(company, account_type, period_list):
where company=%s and posting_date >= %s and posting_date <= %s
and voucher_type != 'Period Closing Voucher'
and account in ( SELECT name FROM tabAccount WHERE account_type = %s)
""", (company, period['from_date'], period['to_date'], account_type))
""", (company, period["year_start_date"] if accumulated_values else period['from_date'],
period['to_date'], account_type))
if gl_sum and gl_sum[0]:
amount = gl_sum[0]
@@ -113,12 +118,11 @@ def get_account_type_based_data(company, account_type, period_list):
amount *= -1
else:
amount = 0
total += amount
data.setdefault(period["key"], amount)
data.update({
"from_date": period['from_date'],
"to_date": period['to_date'],
period["key"]: amount
})
data["total"] = total
return data
@@ -128,12 +132,14 @@ def add_total_row_account(out, data, label, period_list, currency):
"account": None,
"currency": currency
}
for row in data:
if row.get("parent_account"):
for period in period_list:
total_row.setdefault(period.key, 0.0)
total_row[period.key] += row.get(period.key, 0.0)
total_row.setdefault("total", 0.0)
total_row["total"] += row["total"]
out.append(total_row)
out.append({})

View File

@@ -3,38 +3,42 @@
from __future__ import unicode_literals
import frappe
from frappe import _, _dict
from frappe import _
from frappe.utils import (flt, getdate, get_first_day, get_last_day,
add_months, add_days, formatdate)
def get_period_list(fiscal_year, periodicity, from_beginning=False):
"""Get a list of dict {"to_date": to_date, "key": key, "label": label}
def get_period_list(fiscal_year, periodicity):
"""Get a list of dict {"from_date": from_date, "to_date": to_date, "key": key, "label": label}
Periodicity can be (Yearly, Quarterly, Monthly)"""
fy_start_end_date = frappe.db.get_value("Fiscal Year", fiscal_year, ["year_start_date", "year_end_date"])
if not fy_start_end_date:
frappe.throw(_("Fiscal Year {0} not found.").format(fiscal_year))
start_date = getdate(fy_start_end_date[0])
end_date = getdate(fy_start_end_date[1])
# start with first day, so as to avoid year to_dates like 2-April if ever they occur]
year_start_date = get_first_day(getdate(fy_start_end_date[0]))
year_end_date = getdate(fy_start_end_date[1])
if periodicity == "Yearly":
period_list = [_dict({"to_date": end_date, "key": fiscal_year, "label": fiscal_year})]
period_list = [frappe._dict({"from_date": year_start_date, "to_date": year_end_date,
"key": fiscal_year, "label": fiscal_year})]
else:
months_to_add = {
"Half-yearly": 6,
"Half-Yearly": 6,
"Quarterly": 3,
"Monthly": 1
}[periodicity]
period_list = []
# start with first day, so as to avoid year to_dates like 2-April if ever they occur
to_date = get_first_day(start_date)
start_date = year_start_date
for i in xrange(12 / months_to_add):
to_date = add_months(to_date, months_to_add)
period = frappe._dict({
"from_date": start_date
})
to_date = add_months(start_date, months_to_add)
start_date = to_date
if to_date == get_first_day(to_date):
# if to_date is the first day, get the last day of previous month
to_date = add_days(to_date, -1)
@@ -42,39 +46,48 @@ def get_period_list(fiscal_year, periodicity, from_beginning=False):
# to_date should be the last day of the new to_date's month
to_date = get_last_day(to_date)
if to_date <= end_date:
if to_date <= year_end_date:
# the normal case
period_list.append(_dict({ "to_date": to_date }))
# if it ends before a full year
if to_date == end_date:
break
period.to_date = to_date
else:
# if a fiscal year ends before a 12 month period
period_list.append(_dict({ "to_date": end_date }))
period.to_date = year_end_date
period_list.append(period)
if period.to_date == year_end_date:
break
# common processing
for opts in period_list:
key = opts["to_date"].strftime("%b_%Y").lower()
label = formatdate(opts["to_date"], "MMM YYYY")
if periodicity == "Monthly":
label = formatdate(opts["to_date"], "MMM YYYY")
else:
label = get_label(periodicity, opts["from_date"], opts["to_date"])
opts.update({
"key": key.replace(" ", "_").replace("-", "_"),
"label": label,
"year_start_date": start_date,
"year_end_date": end_date
"year_start_date": year_start_date,
"year_end_date": year_end_date
})
if from_beginning:
# set start date as None for all fiscal periods, used in case of Balance Sheet
opts["from_date"] = None
else:
opts["from_date"] = start_date
return period_list
def get_data(company, root_type, balance_must_be, period_list, ignore_closing_entries=False):
def get_label(periodicity, from_date, to_date):
if periodicity=="Yearly":
if formatdate(from_date, "YYYY") == formatdate(to_date, "YYYY"):
label = formatdate(from_date, "YYYY")
else:
label = formatdate(from_date, "YYYY") + "-" + formatdate(to_date, "YYYY")
else:
label = formatdate(from_date, "MMM YY") + "-" + formatdate(to_date, "MMM YY")
return label
def get_data(company, root_type, balance_must_be, period_list,
accumulated_values=1, only_current_fiscal_year=True, ignore_closing_entries=False):
accounts = get_accounts(company, root_type)
if not accounts:
return None
@@ -86,29 +99,33 @@ def get_data(company, root_type, balance_must_be, period_list, ignore_closing_en
gl_entries_by_account = {}
for root in frappe.db.sql("""select lft, rgt from tabAccount
where root_type=%s and ifnull(parent_account, '') = ''""", root_type, as_dict=1):
set_gl_entries_by_account(company, period_list[0]["from_date"],
period_list[-1]["to_date"],root.lft, root.rgt, gl_entries_by_account,
ignore_closing_entries=ignore_closing_entries)
set_gl_entries_by_account(company,
period_list[0]["year_start_date"] if only_current_fiscal_year else None,
period_list[-1]["to_date"],
root.lft, root.rgt,
gl_entries_by_account, ignore_closing_entries=ignore_closing_entries)
calculate_values(accounts_by_name, gl_entries_by_account, period_list)
accumulate_values_into_parents(accounts, accounts_by_name, period_list)
calculate_values(accounts_by_name, gl_entries_by_account, period_list, accumulated_values)
accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values)
out = prepare_data(accounts, balance_must_be, period_list, company_currency)
if out:
add_total_row(out, balance_must_be, period_list, company_currency)
return out
def calculate_values(accounts_by_name, gl_entries_by_account, period_list):
def calculate_values(accounts_by_name, gl_entries_by_account, period_list, accumulated_values):
for entries in gl_entries_by_account.values():
for entry in entries:
d = accounts_by_name.get(entry.account)
for period in period_list:
# check if posting date is within the period
if entry.posting_date <= period.to_date:
d[period.key] = d.get(period.key, 0.0) + flt(entry.debit) - flt(entry.credit)
if accumulated_values or entry.posting_date >= period.from_date:
d[period.key] = d.get(period.key, 0.0) + flt(entry.debit) - flt(entry.credit)
def accumulate_values_into_parents(accounts, accounts_by_name, period_list):
def accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values):
"""accumulate children's values in parent accounts"""
for d in reversed(accounts):
if d.parent_account:
@@ -124,13 +141,14 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
for d in accounts:
# add to output
has_value = False
total = 0
row = {
"account_name": d.account_name,
"account": d.name,
"parent_account": d.parent_account,
"indent": flt(d.indent),
"from_date": year_start_date,
"to_date": year_end_date,
"year_start_date": year_start_date,
"year_end_date": year_end_date,
"currency": company_currency
}
for period in period_list:
@@ -143,8 +161,10 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
if abs(row[period.key]) >= 0.005:
# ignore zero values
has_value = True
total += flt(row[period.key])
if has_value:
row["total"] = total
out.append(row)
return out
@@ -161,9 +181,12 @@ def add_total_row(out, balance_must_be, period_list, company_currency):
for period in period_list:
total_row.setdefault(period.key, 0.0)
total_row[period.key] += row.get(period.key, 0.0)
row[period.key] = ""
row[period.key] = ""
total_row.setdefault("total", 0.0)
total_row["total"] += flt(row["total"])
row["total"] = ""
out.append(total_row)
# blank row after Total
@@ -245,7 +268,7 @@ def set_gl_entries_by_account(company, from_date, to_date, root_lft, root_rgt, g
return gl_entries_by_account
def get_columns(period_list, company=None):
def get_columns(periodicity, period_list, accumulated_values=1, company=None):
columns = [{
"fieldname": "account",
"label": _("Account"),
@@ -261,7 +284,6 @@ def get_columns(period_list, company=None):
"options": "Currency",
"hidden": 1
})
for period in period_list:
columns.append({
"fieldname": period.key,
@@ -270,5 +292,13 @@ def get_columns(period_list, company=None):
"options": "currency",
"width": 150
})
if periodicity!="Yearly":
if not accumulated_values:
columns.append({
"fieldname": "total",
"label": _("Total"),
"fieldtype": "Currency",
"width": 150
})
return columns
return columns

View File

@@ -16,9 +16,9 @@ def execute(filters=None):
source = gross_profit_data.grouped_data if filters.get("group_by") != "Invoice" else gross_profit_data.data
group_wise_columns = frappe._dict({
"invoice": ["parent", "customer", "posting_date", "posting_time", "item_code", "item_name", "brand", "description", \
"invoice": ["parent", "customer", "posting_date","item_code", "item_name","item_group", "brand", "description", \
"warehouse", "qty", "base_rate", "buying_rate", "base_amount",
"buying_amount", "gross_profit", "gross_profit_percent", "project"],
"buying_amount", "gross_profit", "gross_profit_percent", "project_name"],
"item_code": ["item_code", "item_name", "brand", "description", "warehouse", "qty", "base_rate",
"buying_rate", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
"warehouse": ["warehouse", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
@@ -35,7 +35,7 @@ def execute(filters=None):
"gross_profit", "gross_profit_percent"],
"sales_person": ["sales_person", "allocated_amount", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
"gross_profit", "gross_profit_percent"],
"project": ["project", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
"project": ["project_name", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
"territory": ["territory", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"]
})
@@ -59,7 +59,7 @@ def get_columns(group_wise_columns, filters):
"posting_time": _("Posting Time"),
"item_code": _("Item Code") + ":Link/Item",
"item_name": _("Item Name"),
"item_group": _("Item Group") + ":Link/Item",
"item_group": _("Item Group") + ":Link/Item Group",
"brand": _("Brand"),
"description": _("Description"),
"warehouse": _("Warehouse") + ":Link/Warehouse",
@@ -70,7 +70,7 @@ def get_columns(group_wise_columns, filters):
"buying_amount": _("Buying Amount") + ":Currency/currency",
"gross_profit": _("Gross Profit") + ":Currency/currency",
"gross_profit_percent": _("Gross Profit %") + ":Percent",
"project": _("Project") + ":Link/Project",
"project_name": _("Project") + ":Link/Project",
"sales_person": _("Sales person"),
"allocated_amount": _("Allocated Amount") + ":Currency/currency",
"customer": _("Customer") + ":Link/Customer",

View File

@@ -4,3 +4,9 @@
frappe.require("assets/erpnext/js/financial_statements.js");
frappe.query_reports["Profit and Loss Statement"] = erpnext.financial_statements;
frappe.query_reports["Profit and Loss Statement"]["filters"].push({
"fieldname": "accumulated_values",
"label": __("Accumulated Values"),
"fieldtype": "Check"
})

View File

@@ -10,8 +10,11 @@ from erpnext.accounts.report.financial_statements import (get_period_list, get_c
def execute(filters=None):
period_list = get_period_list(filters.fiscal_year, filters.periodicity)
income = get_data(filters.company, "Income", "Credit", period_list, ignore_closing_entries=True)
expense = get_data(filters.company, "Expense", "Debit", period_list, ignore_closing_entries=True)
income = get_data(filters.company, "Income", "Credit", period_list,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
expense = get_data(filters.company, "Expense", "Debit", period_list,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
net_profit_loss = get_net_profit_loss(income, expense, period_list, filters.company)
data = []
@@ -20,12 +23,13 @@ def execute(filters=None):
if net_profit_loss:
data.append(net_profit_loss)
columns = get_columns(period_list, filters.company)
columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company)
return columns, data
def get_net_profit_loss(income, expense, period_list, company):
if income and expense:
total = 0
net_profit_loss = {
"account_name": "'" + _("Net Profit / Loss") + "'",
"account": None,
@@ -33,7 +37,16 @@ def get_net_profit_loss(income, expense, period_list, company):
"currency": frappe.db.get_value("Company", company, "default_currency")
}
has_value = False
for period in period_list:
net_profit_loss[period.key] = flt(income[-2][period.key] - expense[-2][period.key], 3)
return net_profit_loss
if net_profit_loss[period.key]:
has_value=True
total += flt(net_profit_loss[period.key])
net_profit_loss["total"] = total
if has_value:
return net_profit_loss

View File

@@ -1597,29 +1597,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "advance_paid",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Advance Paid",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1694,6 +1671,30 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "advance_paid",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Advance Paid",
"length": 0,
"no_copy": 1,
"options": "party_account_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1968,6 +1969,31 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "party_account_currency",
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Party Account Currency",
"length": 0,
"no_copy": 1,
"options": "Currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -2508,7 +2534,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-01-15 04:13:35.179163",
"modified": "2016-02-08 16:26:19.210634",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",
@@ -2613,6 +2639,26 @@
"share": 0,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 1,
"print": 0,
"read": 1,
"report": 0,
"role": "All",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
}
],
"read_only": 0,
@@ -2620,5 +2666,6 @@
"search_fields": "status, transaction_date, supplier,grand_total",
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "supplier",
"title_field": "title"
}

View File

@@ -84,11 +84,11 @@ class PurchaseOrder(BuyingController):
if d.prevdoc_detail_docname and not d.schedule_date:
d.schedule_date = frappe.db.get_value("Material Request Item",
d.prevdoc_detail_docname, "schedule_date")
def get_last_purchase_rate(self):
"""get last purchase rates for all items"""
conversion_rate = flt(self.get('conversion_rate')) or 1.0
for d in self.get("items"):
@@ -96,7 +96,7 @@ class PurchaseOrder(BuyingController):
last_purchase_details = get_last_purchase_details(d.item_code, self.name)
if last_purchase_details:
d.base_price_list_rate = (last_purchase_details['base_price_list_rate'] *
d.base_price_list_rate = (last_purchase_details['base_price_list_rate'] *
(flt(d.conversion_factor) or 1.0))
d.discount_percentage = last_purchase_details['discount_percentage']
d.base_rate = last_purchase_details['base_rate'] * (flt(d.conversion_factor) or 1.0)
@@ -104,7 +104,7 @@ class PurchaseOrder(BuyingController):
d.rate = d.base_rate / conversion_rate
else:
# if no last purchase found, reset all values to 0
for field in ("base_price_list_rate", "base_rate",
for field in ("base_price_list_rate", "base_rate",
"price_list_rate", "rate", "discount_percentage"):
d.set(field, 0)
@@ -188,7 +188,7 @@ class PurchaseOrder(BuyingController):
def on_cancel(self):
if self.is_against_so():
self.update_status_updater()
if self.has_drop_ship_item():
self.update_delivered_qty_in_sales_order()
@@ -219,17 +219,6 @@ class PurchaseOrder(BuyingController):
def on_update(self):
pass
def before_recurring(self):
super(PurchaseOrder, self).before_recurring()
for field in ("per_received", "per_billed"):
self.set(field, None)
for d in self.get("items"):
for field in ("received_qty", "billed_amt", "prevdoc_doctype", "prevdoc_docname",
"prevdoc_detail_docname", "supplier_quotation", "supplier_quotation_item"):
d.set(field, None)
def update_status_updater(self):
self.status_updater[0].update({
"target_parent_dt": "Sales Order",
@@ -254,7 +243,7 @@ class PurchaseOrder(BuyingController):
def has_drop_ship_item(self):
return any([d.delivered_by_supplier for d in self.items])
def is_against_so(self):
return any([d.prevdoc_doctype for d in self.items if d.prevdoc_doctype=="Sales Order"])

View File

@@ -19,16 +19,16 @@ class TestPurchaseOrder(unittest.TestCase):
def test_ordered_qty(self):
existing_ordered_qty = get_ordered_qty()
po = create_purchase_order(do_not_submit=True)
self.assertRaises(frappe.ValidationError, make_purchase_receipt, po.name)
po.submit()
self.assertEqual(get_ordered_qty(), existing_ordered_qty + 10)
create_pr_against_po(po.name)
create_pr_against_po(po.name)
self.assertEqual(get_ordered_qty(), existing_ordered_qty + 6)
po.load_from_db()
self.assertEquals(po.get("items")[0].received_qty, 4)
@@ -36,13 +36,13 @@ class TestPurchaseOrder(unittest.TestCase):
pr = create_pr_against_po(po.name, received_qty=8)
self.assertEqual(get_ordered_qty(), existing_ordered_qty)
po.load_from_db()
self.assertEquals(po.get("items")[0].received_qty, 12)
pr.cancel()
self.assertEqual(get_ordered_qty(), existing_ordered_qty + 6)
po.load_from_db()
self.assertEquals(po.get("items")[0].received_qty, 4)
@@ -70,19 +70,19 @@ class TestPurchaseOrder(unittest.TestCase):
from erpnext.utilities.transaction_base import UOMMustBeIntegerError
po = create_purchase_order(qty=3.4, do_not_save=True)
self.assertRaises(UOMMustBeIntegerError, po.insert)
def test_ordered_qty_for_closing_po(self):
bin = frappe.get_all("Bin", filters={"item_code": "_Test Item", "warehouse": "_Test Warehouse - _TC"},
fields=["ordered_qty"])
def test_ordered_qty_for_closing_po(self):
bin = frappe.get_all("Bin", filters={"item_code": "_Test Item", "warehouse": "_Test Warehouse - _TC"},
fields=["ordered_qty"])
existing_ordered_qty = bin[0].ordered_qty if bin else 0.0
po = create_purchase_order(item_code= "_Test Item", qty=1)
self.assertEquals(get_ordered_qty(item_code= "_Test Item", warehouse="_Test Warehouse - _TC"), existing_ordered_qty+1)
po.update_status("Closed")
self.assertEquals(get_ordered_qty(item_code="_Test Item", warehouse="_Test Warehouse - _TC"), existing_ordered_qty)
def create_purchase_order(**args):
@@ -108,9 +108,9 @@ def create_purchase_order(**args):
po.insert()
if not args.do_not_submit:
po.submit()
return po
def create_pr_against_po(po, received_qty=4):
pr = make_purchase_receipt(po)
pr.get("items")[0].qty = received_qty

View File

@@ -7,6 +7,7 @@
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"fields": [
{
"allow_on_submit": 0,
@@ -1155,7 +1156,7 @@
"in_list_view": 0,
"label": "BOM",
"length": 0,
"no_copy": 1,
"no_copy": 0,
"options": "BOM",
"permlevel": 0,
"precision": "",
@@ -1330,7 +1331,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-01-06 02:21:10.407871",
"modified": "2016-01-25 05:39:52.405200",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order Item",

View File

@@ -46,18 +46,23 @@ cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
// Serial No based on item_code
cur_frm.fields_dict['item_serial_no'].get_query = function(doc, cdt, cdn) {
var filter = {};
var filters = {};
if (doc.item_code) {
filter = {
'item_code': doc.item_code,
'status': "Available"
filters = {
'item_code': doc.item_code
}
} else
filter = { 'status': "Available" }
return { filters: filter }
}
return { filters: filters }
}
cur_frm.set_query("batch_no", function(doc) {
return {
filters: {
"item": doc.item_code
}
}
})
cur_frm.add_fetch('item_code', 'item_name', 'item_name');
cur_frm.add_fetch('item_code', 'description', 'description');

File diff suppressed because it is too large Load Diff

View File

@@ -3,5 +3,70 @@
from __future__ import unicode_literals
import frappe
test_records = frappe.get_test_records('Supplier')
import frappe, unittest
from erpnext.accounts.party import get_due_date
from erpnext.exceptions import PartyFrozen, PartyDisabled
from frappe.test_runner import make_test_records
test_records = frappe.get_test_records('Supplier')
class TestSupplier(unittest.TestCase):
def test_supplier_due_date_against_supplier_credit_limit(self):
# Set Credit Limit based on Fixed days
frappe.db.set_value("Supplier", "_Test Supplier", "credit_days_based_on", "Fixed Days")
frappe.db.set_value("Supplier", "_Test Supplier", "credit_days", 10)
due_date = get_due_date("2016-01-22", "Supplier", "_Test Supplier", "_Test Company")
self.assertEqual(due_date, "2016-02-01")
# Set Credit Limit based on Last day next month
frappe.db.set_value("Supplier", "_Test Supplier", "credit_days", 0)
frappe.db.set_value("Supplier", "_Test Supplier", "credit_days_based_on",
"Last Day of the Next Month")
# Leap year
due_date = get_due_date("2016-01-22", "Supplier", "_Test Supplier", "_Test Company")
self.assertEqual(due_date, "2016-02-29")
# Non Leap year
due_date = get_due_date("2017-01-22", "Supplier", "_Test Supplier", "_Test Company")
self.assertEqual(due_date, "2017-02-28")
frappe.db.set_value("Supplier", "_Test Supplier", "credit_days_based_on", "")
# Set credit limit for the supplier type instead of supplier and evaluate the due date
# based on Fixed days
frappe.db.set_value("Supplier Type", "_Test Supplier Type", "credit_days_based_on",
"Fixed Days")
frappe.db.set_value("Supplier Type", "_Test Supplier Type", "credit_days", 10)
due_date = get_due_date("2016-01-22", "Supplier", "_Test Supplier", "_Test Company")
self.assertEqual(due_date, "2016-02-01")
# Set credit limit for the supplier type instead of supplier and evaluate the due date
# based on Last day of next month
frappe.db.set_value("Supplier", "_Test Supplier Type", "credit_days", 0)
frappe.db.set_value("Supplier Type", "_Test Supplier Type", "credit_days_based_on",
"Last Day of the Next Month")
# Leap year
due_date = get_due_date("2016-01-22", "Supplier", "_Test Supplier", "_Test Company")
self.assertEqual(due_date, "2016-02-29")
# Non Leap year
due_date = get_due_date("2017-01-22", "Supplier", "_Test Supplier", "_Test Company")
self.assertEqual(due_date, "2017-02-28")
def test_supplier_disabled(self):
make_test_records("Item")
frappe.db.set_value("Supplier", "_Test Supplier", "disabled", 1)
from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order
po = create_purchase_order(do_not_save=True)
self.assertRaises(PartyDisabled, po.save)
frappe.db.set_value("Supplier", "_Test Supplier", "disabled", 0)
po.save()

View File

@@ -1714,7 +1714,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2015-12-17 16:18:29.855942",
"modified": "2016-02-08 16:30:33.704770",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation",
@@ -1839,6 +1839,26 @@
"share": 0,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 1,
"print": 0,
"read": 1,
"report": 0,
"role": "All",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
}
],
"read_only": 0,
@@ -1846,5 +1866,6 @@
"search_fields": "status, transaction_date, supplier,grand_total",
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "supplier",
"title_field": "title"
}

View File

@@ -6,13 +6,13 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2015-03-30 05:39:39.876374",
"modified": "2016-01-28 15:36:46.837095",
"modified_by": "Administrator",
"module": "Buying",
"name": "Item-wise Purchase History",
"owner": "Administrator",
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.stock_uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n\tpo_item.project_name as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item\nwhere\n\tpo.name = po_item.parent and po.docstatus = 1\norder by po.name desc",
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n po_item.item_group as \"Item Group:Link/Item Group:120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.stock_uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n sup.supplier_name as \"Supplier Name::150\",\n\tpo_item.project_name as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item, `tabSupplier` sup\nwhere\n\tpo.name = po_item.parent and po.supplier = sup.name and po.docstatus = 1\norder by po.name desc",
"ref_doctype": "Purchase Order",
"report_name": "Item-wise Purchase History",
"report_type": "Query Report"
}
}

View File

@@ -0,0 +1,3 @@
- Now you can **disable** existing Customers / Suppliers
- Set *Last Day of the Next Month* as Credit Days for a Supplier / Supplier Type
- Don't map **No Copy** fields when creating recurring documents like Sales Order, Sales Invoice, Purchase Order and Purchase Invoice

View File

@@ -0,0 +1,4 @@
- Added new **Employee Attendance Tool**, to manage attendace in bulk.
- In Profit and Loss Statement and Cash Flow repots, **accumulated periodic balance** is not optional based on filters
- Removed **Is Service Item** from Item, all sales items are available for service.
- Now **Sales Person Group** can be selected in a sales transaction. All the activities made by the children of any group, will also be considered as it's own activity.

View File

@@ -0,0 +1,3 @@
- Customer history (Quototations, Sales Invoices etc) can been seen in Customer timeline (based on permissions)
- Default Warehouse not mandatory in Item
- Use **Pricing Rule** of template in case of Item variant, if not Pricing Rule for Item variant is defined.

View File

@@ -60,9 +60,9 @@ def get_data():
"items": [
{
"type": "doctype",
"name": "Process Payroll",
"label": _("Process Payroll"),
"description":_("Generate Salary Slips"),
"name": "Employee Attendance Tool",
"label": _("Employee Attendance Tool"),
"description":_("Mark Employee Attendance in Bulk"),
"hide_count": True
},
{
@@ -71,6 +71,14 @@ def get_data():
"description":_("Upload attendance from a .csv file"),
"hide_count": True
},
{
"type": "doctype",
"name": "Process Payroll",
"label": _("Process Payroll"),
"description":_("Generate Salary Slips"),
"hide_count": True
},
{
"type": "doctype",
"name": "Leave Control Panel",
@@ -177,6 +185,12 @@ def get_data():
"name": "Employee Birthday",
"doctype": "Employee"
},
{
"type": "report",
"is_query_report": True,
"name": "Employee Holiday Attendance",
"doctype": "Employee"
},
{
"type": "report",
"name": "Employee Information",
@@ -194,6 +208,7 @@ def get_data():
"name": "Monthly Attendance Sheet",
"doctype": "Attendance"
},
]
},
{

View File

@@ -4,14 +4,14 @@
from __future__ import unicode_literals
import frappe
from frappe import _, throw
from frappe.utils import today, flt, cint
from frappe.utils import today, flt, cint, fmt_money
from erpnext.setup.utils import get_company_currency, get_exchange_rate
from erpnext.accounts.utils import get_fiscal_year, validate_fiscal_year, get_account_currency
from erpnext.utilities.transaction_base import TransactionBase
from erpnext.controllers.recurring_document import convert_to_recurring, validate_recurring_document
from erpnext.controllers.sales_and_purchase_return import validate_return
from erpnext.accounts.party import get_party_account_currency
from erpnext.exceptions import CustomerFrozen, InvalidCurrency
from erpnext.accounts.party import get_party_account_currency, validate_party_frozen_disabled
from erpnext.exceptions import InvalidCurrency
force_item_fields = ("item_group", "barcode", "brand", "stock_uom")
@@ -60,12 +60,6 @@ class AccountsController(TransactionBase):
validate_recurring_document(self)
convert_to_recurring(self, self.get("posting_date") or self.get("transaction_date"))
def before_recurring(self):
if self.meta.get_field("fiscal_year"):
self.fiscal_year = None
if self.meta.get_field("due_date"):
self.due_date = None
def set_missing_values(self, for_validate=False):
for fieldname in ["posting_date", "transaction_date"]:
if not self.get(fieldname) and self.meta.get_field(fieldname):
@@ -392,27 +386,44 @@ class AccountsController(TransactionBase):
def set_total_advance_paid(self):
if self.doctype == "Sales Order":
dr_or_cr = "credit_in_account_currency"
party = self.customer
else:
dr_or_cr = "debit_in_account_currency"
party = self.supplier
advance_paid = frappe.db.sql("""
advance = frappe.db.sql("""
select
sum({dr_or_cr})
account_currency, sum({dr_or_cr}) as amount
from
`tabJournal Entry Account`
where
reference_type = %s and reference_name = %s
reference_type = %s and reference_name = %s and party=%s
and docstatus = 1 and is_advance = "Yes"
""".format(dr_or_cr=dr_or_cr), (self.doctype, self.name))
""".format(dr_or_cr=dr_or_cr), (self.doctype, self.name, party), as_dict=1)
if advance_paid:
advance_paid = flt(advance_paid[0][0], self.precision("advance_paid"))
if flt(self.base_grand_total) >= advance_paid:
frappe.db.set_value(self.doctype, self.name, "advance_paid", advance_paid)
else:
frappe.throw(_("Total advance ({0}) against Order {1} cannot be greater \
than the Grand Total ({2})")
.format(advance_paid, self.name, self.base_grand_total))
if advance:
advance = advance[0]
advance_paid = flt(advance.amount, self.precision("advance_paid"))
formatted_advance_paid = fmt_money(advance_paid, precision=self.precision("advance_paid"),
currency=advance.account_currency)
frappe.db.set_value(self.doctype, self.name, "party_account_currency",
advance.account_currency)
if advance.account_currency == self.currency:
order_total = self.grand_total
formatted_order_total = fmt_money(order_total, precision=self.precision("grand_total"),
currency=advance.account_currency)
else:
order_total = self.base_grand_total
formatted_order_total = fmt_money(order_total, precision=self.precision("base_grand_total"),
currency=advance.account_currency)
if order_total >= advance_paid:
frappe.db.set_value(self.doctype, self.name, "advance_paid", advance_paid)
else:
frappe.throw(_("Total advance ({0}) against Order {1} cannot be greater than the Grand Total ({2})")
.format(formatted_advance_paid, self.name, formatted_order_total))
@property
def company_abbr(self):
@@ -422,24 +433,23 @@ class AccountsController(TransactionBase):
return self._abbr
def validate_party(self):
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
if frozen_accounts_modifier in frappe.get_roles():
return
party_type, party = self.get_party()
if party_type:
if frappe.db.get_value(party_type, party, "is_frozen"):
frappe.throw("{0} {1} is frozen".format(party_type, party), CustomerFrozen)
validate_party_frozen_disabled(party_type, party)
def get_party(self):
party_type = None
if self.meta.get_field("customer"):
if self.doctype in ("Opportunity", "Quotation", "Sales Order", "Delivery Note", "Sales Invoice"):
party_type = 'Customer'
elif self.meta.get_field("supplier"):
elif self.doctype in ("Supplier Quotation", "Purchase Order", "Purchase Receipt", "Purchase Invoice"):
party_type = 'Supplier'
elif self.meta.get_field("customer"):
party_type = "Customer"
elif self.meta.get_field("supplier"):
party_type = "Supplier"
party = self.get(party_type.lower()) if party_type else None
return party_type, party
@@ -457,7 +467,9 @@ class AccountsController(TransactionBase):
frappe.throw(_("Accounting Entry for {0}: {1} can only be made in currency: {2}")
.format(party_type, party, party_account_currency), InvalidCurrency)
# Note: not validating with gle account because we don't have the account at quotation / sales order level and we shouldn't stop someone from creating a sales invoice if sales order is already created
# Note: not validating with gle account because we don't have the account
# at quotation / sales order level and we shouldn't stop someone
# from creating a sales invoice if sales order is already created
@frappe.whitelist()
def get_tax_rate(account_head):

View File

@@ -89,7 +89,7 @@ def customer_query(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select {fields} from `tabCustomer`
where docstatus < 2
and ({key} like %(txt)s
or customer_name like %(txt)s)
or customer_name like %(txt)s) and disabled=0
{mcond}
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
@@ -118,7 +118,7 @@ def supplier_query(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select {field} from `tabSupplier`
where docstatus < 2
and ({key} like %(txt)s
or supplier_name like %(txt)s)
or supplier_name like %(txt)s) and disabled=0
{mcond}
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
@@ -216,12 +216,8 @@ def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len,
return frappe.db.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name
from `tabDelivery Note`
where `tabDelivery Note`.`%(key)s` like %(txt)s and
`tabDelivery Note`.docstatus = 1 and status not in ("Stopped", "Closed") %(fcond)s and
(ifnull((select sum(qty) from `tabDelivery Note Item` where
`tabDelivery Note Item`.parent=`tabDelivery Note`.name), 0) >
ifnull((select sum(qty) from `tabSales Invoice Item` where
`tabSales Invoice Item`.docstatus = 1 and
`tabSales Invoice Item`.delivery_note=`tabDelivery Note`.name), 0))
`tabDelivery Note`.docstatus = 1 and status not in ("Stopped", "Closed") %(fcond)s
and (`tabDelivery Note`.per_billed < 100 or `tabDelivery Note`.grand_total = 0)
%(mcond)s order by `tabDelivery Note`.`%(key)s` asc
limit %(start)s, %(page_len)s""" % {
"key": searchfield,

View File

@@ -47,12 +47,9 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
where %s=%s and recurring_id=%s and docstatus=1"""
% (doctype, date_field, '%s', '%s'), (next_date, recurring_id)):
try:
ref_wrapper = frappe.get_doc(doctype, ref_document)
if hasattr(ref_wrapper, "before_recurring"):
ref_wrapper.before_recurring()
new_document_wrapper = make_new_document(ref_wrapper, date_field, next_date)
send_notification(new_document_wrapper)
reference_doc = frappe.get_doc(doctype, ref_document)
new_doc = make_new_document(reference_doc, date_field, next_date)
send_notification(new_doc)
if commit:
frappe.db.commit()
except:
@@ -63,8 +60,8 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
frappe.db.sql("update `tab%s` \
set is_recurring = 0 where name = %s" % (doctype, '%s'),
(ref_document))
notify_errors(ref_document, doctype, ref_wrapper.get("customer") or ref_wrapper.get("supplier"),
ref_wrapper.owner)
notify_errors(ref_document, doctype, reference_doc.get("customer") or reference_doc.get("supplier"),
reference_doc.owner)
frappe.db.commit()
exception_list.append(frappe.get_traceback())
@@ -76,34 +73,42 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
exception_message = "\n\n".join([cstr(d) for d in exception_list])
frappe.throw(exception_message)
def make_new_document(ref_wrapper, date_field, posting_date):
def make_new_document(reference_doc, date_field, posting_date):
from erpnext.accounts.utils import get_fiscal_year
new_document = frappe.copy_doc(ref_wrapper)
mcount = month_map[ref_wrapper.recurring_type]
new_document = frappe.copy_doc(reference_doc, ignore_no_copy=True)
mcount = month_map[reference_doc.recurring_type]
from_date = get_next_date(ref_wrapper.from_date, mcount)
from_date = get_next_date(reference_doc.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.from_date)) == cstr(ref_wrapper.from_date)) and \
(cstr(get_last_day(ref_wrapper.to_date)) == cstr(ref_wrapper.to_date)):
to_date = get_last_day(get_next_date(ref_wrapper.to_date, mcount))
if (cstr(get_first_day(reference_doc.from_date)) == cstr(reference_doc.from_date)) and \
(cstr(get_last_day(reference_doc.to_date)) == cstr(reference_doc.to_date)):
to_date = get_last_day(get_next_date(reference_doc.to_date, mcount))
else:
to_date = get_next_date(ref_wrapper.to_date, mcount)
to_date = get_next_date(reference_doc.to_date, mcount)
new_document.update({
date_field: posting_date,
"from_date": from_date,
"to_date": to_date,
"fiscal_year": get_fiscal_year(posting_date)[0],
"owner": ref_wrapper.owner,
"fiscal_year": get_fiscal_year(posting_date)[0]
})
if ref_wrapper.doctype == "Sales Order":
new_document.update({
"delivery_date": get_next_date(ref_wrapper.delivery_date, mcount,
cint(ref_wrapper.repeat_on_day_of_month))
})
# copy document fields
for fieldname in ("owner", "recurring_type", "repeat_on_day_of_month",
"recurring_id", "notification_email_address", "is_recurring", "end_date",
"title", "naming_series", "select_print_heading", "ignore_pricing_rule",
"posting_time", "remarks"):
if new_document.meta.get_field(fieldname):
new_document.set(fieldname, reference_doc.get(fieldname))
# copy item fields
for i, item in enumerate(new_document.items):
for fieldname in ("page_break",):
item.set(fieldname, reference_doc.items[i].get(fieldname))
new_document.run_method("on_recurring", reference_doc=reference_doc)
new_document.submit()

View File

@@ -97,7 +97,7 @@ def validate_returned_items(doc):
frappe.throw(_("Row # {0}: Serial No {1} does not match with {2} {3}")
.format(d.idx, s, doc.doctype, doc.return_against))
if not d.warehouse:
if doc.doctype != "Purchase Invoice" and not d.get("warehouse"):
frappe.throw(_("Warehouse is mandatory"))
items_returned = True

View File

@@ -161,7 +161,7 @@ class SellingController(StockController):
for d in self.get("items"):
if d.qty is None:
frappe.throw(_("Row {0}: Qty is mandatory").format(d.idx))
if self.has_product_bundle(d.item_code):
for p in self.get("packed_items"):
if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
@@ -199,17 +199,17 @@ class SellingController(StockController):
where so_detail = %s and docstatus = 1
and against_sales_order = %s
and parent != %s""", (so_detail, so, current_docname))
delivered_via_si = frappe.db.sql("""select sum(si_item.qty)
delivered_via_si = frappe.db.sql("""select sum(si_item.qty)
from `tabSales Invoice Item` si_item, `tabSales Invoice` si
where si_item.parent = si.name and si.update_stock = 1
and si_item.so_detail = %s and si.docstatus = 1
and si_item.so_detail = %s and si.docstatus = 1
and si_item.sales_order = %s
and si.name != %s""", (so_detail, so, current_docname))
total_delivered_qty = (flt(delivered_via_dn[0][0]) if delivered_via_dn else 0) \
+ (flt(delivered_via_si[0][0]) if delivered_via_si else 0)
return total_delivered_qty
def get_so_qty_and_warehouse(self, so_detail):
@@ -230,10 +230,10 @@ def check_active_sales_items(obj):
for d in obj.get("items"):
if d.item_code:
item = frappe.db.sql("""select docstatus, is_sales_item,
is_service_item, income_account from tabItem where name = %s""",
income_account from tabItem where name = %s""",
d.item_code, as_dict=True)[0]
if item.is_sales_item == 0 and item.is_service_item == 0:
frappe.throw(_("Item {0} must be Sales or Service Item in {1}").format(d.item_code, d.idx))
if item.is_sales_item == 0:
frappe.throw(_("Item {0} must be a Sales Item in {1}").format(d.item_code, d.idx))
if getattr(d, "income_account", None) and not item.income_account:
frappe.db.set_value("Item", d.item_code, "income_account",
d.income_account)

View File

@@ -397,6 +397,16 @@ class calculate_taxes_and_totals(object):
for adv in self.doc.get("advances")])
self.doc.total_advance = flt(total_allocated_amount, self.doc.precision("total_advance"))
if self.doc.party_account_currency == self.doc.currency:
invoice_total = self.doc.grand_total
else:
invoice_total = flt(self.doc.grand_total * self.doc.conversion_rate,
self.doc.precision("grand_total"))
if invoice_total > 0 and self.doc.total_advance > invoice_total:
frappe.throw(_("Advance amount cannot be greater than {0} {1}")
.format(self.doc.party_account_currency, invoice_total))
if self.doc.docstatus == 0:
self.calculate_outstanding_amount()

View File

@@ -31,10 +31,10 @@ def validate_filters(filters):
for f in ["Fiscal Year", "Based On", "Period", "Company"]:
if not filters.get(f.lower().replace(" ", "_")):
frappe.throw(_("{0} is mandatory").format(f))
if not frappe.db.exists("Fiscal Year", filters.get("fiscal_year")):
frappe.throw(_("Fiscal Year: {0} does not exists").format(filters.get("fiscal_year")))
if filters.get("based_on") == filters.get("group_by"):
frappe.throw(_("'Based On' and 'Group By' can not be same"))
@@ -98,7 +98,8 @@ def get_data(filters, conditions):
(filters.get("company"), filters.get("fiscal_year"), row[i][0],
data1[d][0]), as_list=1)
des[ind] = row[i]
des[ind] = row[i][0]
for j in range(1,len(conditions["columns"])-inc):
des[j+inc] = row1[0][j]
@@ -213,7 +214,7 @@ def based_wise_columns_query(based_on, trans):
elif based_on == "Customer":
based_on_details["based_on_cols"] = ["Customer:Link/Customer:120", "Territory:Link/Territory:120"]
based_on_details["based_on_select"] = "t1.customer_name, t1.territory, "
based_on_details["based_on_group_by"] = 't1.customer_name'
based_on_details["based_on_group_by"] = 't1.customer'
based_on_details["addl_tables"] = ''
elif based_on == "Customer Group":

View File

@@ -1,7 +1,7 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"allow_rename": 1,
"autoname": "field:subject",
"creation": "2013-01-10 16:34:31",
"custom": 0,
@@ -27,6 +27,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -49,6 +50,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -72,6 +74,7 @@
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -94,6 +97,7 @@
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -116,6 +120,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -138,6 +143,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -161,6 +167,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -184,6 +191,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -207,6 +215,7 @@
"options": "test_send",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -225,7 +234,8 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-11-16 06:29:50.506090",
"menu_index": 0,
"modified": "2016-02-05 11:48:43.081204",
"modified_by": "Administrator",
"module": "CRM",
"name": "Newsletter",
@@ -254,5 +264,7 @@
],
"read_only": 0,
"read_only_onload": 0,
"title_field": "subject"
"sort_order": "ASC",
"title_field": "subject",
"version": 0
}

View File

@@ -63,7 +63,7 @@ class Newsletter(Document):
reference_doctype = self.doctype, reference_name = self.name,
unsubscribe_method = "/api/method/erpnext.crm.doctype.newsletter.newsletter.unsubscribe",
unsubscribe_params = {"name": self.newsletter_list},
bulk_priority = 1)
bulk_priority = 0)
if not frappe.flags.in_test:
frappe.db.auto_commit_on_many_writes = False

View File

@@ -52,8 +52,7 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
this.frm.set_query("item_code", "items", function() {
return {
query: "erpnext.controllers.queries.item_query",
filters: me.frm.doc.enquiry_type === "Maintenance" ?
{"is_service_item": 1} : {"is_sales_item":1}
filters: {"is_sales_item": 1}
};
});

View File

@@ -26,6 +26,7 @@
"options": "icon-user",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -51,6 +52,7 @@
"options": "OPTY-",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -76,6 +78,7 @@
"options": "\nLead\nCustomer",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -102,6 +105,7 @@
"options": "Customer",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -128,6 +132,7 @@
"options": "Lead",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -151,6 +156,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -173,6 +179,7 @@
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -197,6 +204,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -223,6 +231,7 @@
"options": "Sales\nMaintenance",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -249,6 +258,7 @@
"options": "Open\nQuotation\nLost\nReplied\nClosed",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -272,6 +282,7 @@
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -295,6 +306,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -320,6 +332,7 @@
"options": "icon-shopping-cart",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -346,6 +359,7 @@
"options": "Opportunity Item",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -371,6 +385,7 @@
"options": "icon-bullhorn",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -395,6 +410,7 @@
"options": "Address",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -419,6 +435,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -444,6 +461,7 @@
"options": "Territory",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -471,6 +489,7 @@
"options": "Customer Group",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -492,6 +511,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -516,6 +536,7 @@
"options": "Contact",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -539,6 +560,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -562,6 +584,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -585,6 +608,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -610,6 +634,7 @@
"options": "icon-file-text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -635,6 +660,7 @@
"options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -661,6 +687,7 @@
"options": "Campaign",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -683,6 +710,7 @@
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -709,6 +737,7 @@
"options": "Company",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -734,6 +763,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -760,6 +790,7 @@
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -784,6 +815,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -810,6 +842,7 @@
"options": "User",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -836,6 +869,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -858,6 +892,7 @@
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -883,6 +918,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -908,6 +944,7 @@
"options": "Opportunity",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -927,7 +964,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-11-16 06:29:50.931180",
"modified": "2016-02-03 01:10:50.963569",
"modified_by": "Administrator",
"module": "CRM",
"name": "Opportunity",
@@ -979,5 +1016,6 @@
"search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company",
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "title"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

View File

@@ -1,193 +0,0 @@
<!-- title: erpnext.accounts.general_ledger --><div class="dev-header">
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
Version 6.x.x</a>
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/general_ledger.py"
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
</div>
<h3 style="font-weight: normal;">Class <b>StockAccountInvalidTransaction</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<p class="docs-attr-name">
<a name="erpnext.accounts.general_ledger.check_if_in_list" href="#erpnext.accounts.general_ledger.check_if_in_list" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.general_ledger.<b>check_if_in_list</b>
<i class="text-muted">(gle, gl_map)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.general_ledger.delete_gl_entries" href="#erpnext.accounts.general_ledger.delete_gl_entries" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.general_ledger.<b>delete_gl_entries</b>
<i class="text-muted">(gl_entries=None, voucher_type=None, voucher_no=None, adv_adj=False, update_outstanding=Yes)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.general_ledger.make_entry" href="#erpnext.accounts.general_ledger.make_entry" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.general_ledger.<b>make_entry</b>
<i class="text-muted">(args, adv_adj, update_outstanding)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.general_ledger.make_gl_entries" href="#erpnext.accounts.general_ledger.make_gl_entries" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.general_ledger.<b>make_gl_entries</b>
<i class="text-muted">(gl_map, cancel=False, adv_adj=False, merge_entries=True, update_outstanding=Yes)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.general_ledger.make_round_off_gle" href="#erpnext.accounts.general_ledger.make_round_off_gle" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.general_ledger.<b>make_round_off_gle</b>
<i class="text-muted">(gl_map, debit_credit_diff)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.general_ledger.merge_similar_entries" href="#erpnext.accounts.general_ledger.merge_similar_entries" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.general_ledger.<b>merge_similar_entries</b>
<i class="text-muted">(gl_map)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.general_ledger.process_gl_map" href="#erpnext.accounts.general_ledger.process_gl_map" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.general_ledger.<b>process_gl_map</b>
<i class="text-muted">(gl_map, merge_entries=True)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.general_ledger.round_off_debit_credit" href="#erpnext.accounts.general_ledger.round_off_debit_credit" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.general_ledger.<b>round_off_debit_credit</b>
<i class="text-muted">(gl_map)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.general_ledger.save_entries" href="#erpnext.accounts.general_ledger.save_entries" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.general_ledger.<b>save_entries</b>
<i class="text-muted">(gl_map, adv_adj, update_outstanding)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.general_ledger.validate_account_for_auto_accounting_for_stock" href="#erpnext.accounts.general_ledger.validate_account_for_auto_accounting_for_stock" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.general_ledger.<b>validate_account_for_auto_accounting_for_stock</b>
<i class="text-muted">(gl_map)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<!-- autodoc -->

View File

@@ -1,18 +0,0 @@
<!-- title: erpnext.accounts --><div class="dev-header">
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
Version 6.x.x</a>
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/accounts.py"
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
</div>
<!-- autodoc -->

View File

@@ -1,332 +0,0 @@
<!-- title: erpnext.accounts.party --><div class="dev-header">
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
Version 6.x.x</a>
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/party.py"
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
</div>
<h3 style="font-weight: normal;">Class <b>DuplicatePartyAccountError</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<p class="docs-attr-name">
<a name="erpnext.accounts.party._get_party_details" href="#erpnext.accounts.party._get_party_details" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>_get_party_details</b>
<i class="text-muted">(party=None, account=None, party_type=Customer, company=None, posting_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.get_company_currency" href="#erpnext.accounts.party.get_company_currency" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>get_company_currency</b>
<i class="text-muted">()</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.get_credit_days" href="#erpnext.accounts.party.get_credit_days" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>get_credit_days</b>
<i class="text-muted">(party_type, party, company)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.get_default_price_list" href="#erpnext.accounts.party.get_default_price_list" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>get_default_price_list</b>
<i class="text-muted">(party)</i>
</p>
<div class="docs-attr-desc"><p>Return default price list for party (Document object)</p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.accounts.party.get_due_date</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.get_due_date" href="#erpnext.accounts.party.get_due_date" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>get_due_date</b>
<i class="text-muted">(posting_date, party_type, party, company)</i>
</p>
<div class="docs-attr-desc"><p>Set Due Date = Posting Date + Credit Days</p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.accounts.party.get_party_account</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.get_party_account" href="#erpnext.accounts.party.get_party_account" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>get_party_account</b>
<i class="text-muted">(party_type, party, company)</i>
</p>
<div class="docs-attr-desc"><p>Returns the account for the given <code>party</code>.
Will first search in party (Customer / Supplier) record, if not found,
will search in group (Customer Group / Supplier Type),
finally will return default.</p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.get_party_account_currency" href="#erpnext.accounts.party.get_party_account_currency" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>get_party_account_currency</b>
<i class="text-muted">(party_type, party, company)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.accounts.party.get_party_details</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.get_party_details" href="#erpnext.accounts.party.get_party_details" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>get_party_details</b>
<i class="text-muted">(party=None, account=None, party_type=Customer, company=None, posting_date=None, price_list=None, currency=None, doctype=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.get_party_gle_currency" href="#erpnext.accounts.party.get_party_gle_currency" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>get_party_gle_currency</b>
<i class="text-muted">(party_type, party, company)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.set_account_and_due_date" href="#erpnext.accounts.party.set_account_and_due_date" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>set_account_and_due_date</b>
<i class="text-muted">(party, account, party_type, company, posting_date, doctype)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.set_address_details" href="#erpnext.accounts.party.set_address_details" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>set_address_details</b>
<i class="text-muted">(out, party, party_type)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.set_contact_details" href="#erpnext.accounts.party.set_contact_details" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>set_contact_details</b>
<i class="text-muted">(out, party, party_type)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.set_other_values" href="#erpnext.accounts.party.set_other_values" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>set_other_values</b>
<i class="text-muted">(out, party, party_type)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.set_price_list" href="#erpnext.accounts.party.set_price_list" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>set_price_list</b>
<i class="text-muted">(out, party, party_type, given_price_list)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.accounts.party.set_taxes</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.set_taxes" href="#erpnext.accounts.party.set_taxes" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>set_taxes</b>
<i class="text-muted">(party, party_type, posting_date, company, customer_group=None, supplier_type=None, billing_address=None, shipping_address=None, use_for_shopping_cart=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.validate_due_date" href="#erpnext.accounts.party.validate_due_date" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>validate_due_date</b>
<i class="text-muted">(posting_date, due_date, party_type, party, company)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.validate_party_accounts" href="#erpnext.accounts.party.validate_party_accounts" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>validate_party_accounts</b>
<i class="text-muted">(doc)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.validate_party_gle_currency" href="#erpnext.accounts.party.validate_party_gle_currency" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>validate_party_gle_currency</b>
<i class="text-muted">(party_type, party, company, party_account_currency=None)</i>
</p>
<div class="docs-attr-desc"><p>Validate party account currency with existing GL Entry's currency</p>
</div>
<br>
<!-- autodoc -->

View File

@@ -1,380 +0,0 @@
<!-- title: erpnext.accounts.utils --><div class="dev-header">
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
Version 6.x.x</a>
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/utils.py"
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
</div>
<h3 style="font-weight: normal;">Class <b>BudgetError</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<h3 style="font-weight: normal;">Class <b>FiscalYearError</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.accounts.utils.add_ac</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.add_ac" href="#erpnext.accounts.utils.add_ac" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>add_ac</b>
<i class="text-muted">(args=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.accounts.utils.add_cc</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.add_cc" href="#erpnext.accounts.utils.add_cc" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>add_cc</b>
<i class="text-muted">(args=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.check_if_jv_modified" href="#erpnext.accounts.utils.check_if_jv_modified" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>check_if_jv_modified</b>
<i class="text-muted">(args)</i>
</p>
<div class="docs-attr-desc"><p>check if there is already a voucher reference
check if amount is same
check if jv is submitted</p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.fix_total_debit_credit" href="#erpnext.accounts.utils.fix_total_debit_credit" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>fix_total_debit_credit</b>
<i class="text-muted">()</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.get_actual_expense" href="#erpnext.accounts.utils.get_actual_expense" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>get_actual_expense</b>
<i class="text-muted">(args)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.get_allocated_budget" href="#erpnext.accounts.utils.get_allocated_budget" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>get_allocated_budget</b>
<i class="text-muted">(distribution_id, posting_date, fiscal_year, yearly_budget)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.accounts.utils.get_balance_on</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.get_balance_on" href="#erpnext.accounts.utils.get_balance_on" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>get_balance_on</b>
<i class="text-muted">(account=None, date=None, party_type=None, party=None, in_account_currency=True)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.accounts.utils.get_company_default</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.get_company_default" href="#erpnext.accounts.utils.get_company_default" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>get_company_default</b>
<i class="text-muted">(company, fieldname)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.get_currency_precision" href="#erpnext.accounts.utils.get_currency_precision" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>get_currency_precision</b>
<i class="text-muted">(currency=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.accounts.utils.get_fiscal_year</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.get_fiscal_year" href="#erpnext.accounts.utils.get_fiscal_year" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>get_fiscal_year</b>
<i class="text-muted">(date=None, fiscal_year=None, label=Date, verbose=1, company=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.get_fiscal_years" href="#erpnext.accounts.utils.get_fiscal_years" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>get_fiscal_years</b>
<i class="text-muted">(transaction_date=None, fiscal_year=None, label=Date, verbose=1, company=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.get_outstanding_invoices" href="#erpnext.accounts.utils.get_outstanding_invoices" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>get_outstanding_invoices</b>
<i class="text-muted">(party_type, party, account, condition=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.get_stock_and_account_difference" href="#erpnext.accounts.utils.get_stock_and_account_difference" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>get_stock_and_account_difference</b>
<i class="text-muted">(account_list=None, posting_date=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.get_stock_rbnb_difference" href="#erpnext.accounts.utils.get_stock_rbnb_difference" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>get_stock_rbnb_difference</b>
<i class="text-muted">(posting_date, company)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.reconcile_against_document" href="#erpnext.accounts.utils.reconcile_against_document" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>reconcile_against_document</b>
<i class="text-muted">(args)</i>
</p>
<div class="docs-attr-desc"><p>Cancel JV, Update aginst document, split if required and resubmit jv</p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.remove_against_link_from_jv" href="#erpnext.accounts.utils.remove_against_link_from_jv" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>remove_against_link_from_jv</b>
<i class="text-muted">(ref_type, ref_no)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.update_against_doc" href="#erpnext.accounts.utils.update_against_doc" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>update_against_doc</b>
<i class="text-muted">(d, jv_obj)</i>
</p>
<div class="docs-attr-desc"><p>Updates against document, if partial amount splits into rows</p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.validate_allocated_amount" href="#erpnext.accounts.utils.validate_allocated_amount" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>validate_allocated_amount</b>
<i class="text-muted">(args)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.validate_expense_against_budget" href="#erpnext.accounts.utils.validate_expense_against_budget" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>validate_expense_against_budget</b>
<i class="text-muted">(args)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.utils.validate_fiscal_year" href="#erpnext.accounts.utils.validate_fiscal_year" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.utils.<b>validate_fiscal_year</b>
<i class="text-muted">(date, fiscal_year, label=Date, doc=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<!-- autodoc -->

View File

@@ -1,19 +0,0 @@
<!-- title: accounts -->
<div class="dev-header">
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
Version 6.x.x</a>
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/tree/develop/accounts"
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
</div>
<h3>Package Contents</h3>
{index}
<!-- autodoc -->

View File

@@ -1,4 +0,0 @@
erpnext.accounts.general_ledger
erpnext.accounts
erpnext.accounts.party
erpnext.accounts.utils

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