Compare commits

...

1056 Commits

Author SHA1 Message Date
Sahil Khan
4111965d2e Merge branch 'version-11-hotfix' into version-11 2019-09-10 14:32:30 +05:30
Sahil Khan
3ac54a0ba6 bumped to version 11.1.61 2019-09-10 14:52:29 +05:50
Nabin Hait
143f007272 fix: set raw material's batch based on main item's batch only if RM has batch no (#18978) 2019-09-10 14:07:37 +05:30
Suraj Shetty
3fc10a8da1 fix: Make address fields mandatory (#18980) 2019-09-10 14:07:01 +05:30
Mangesh-Khairnar
ed1e28b8fa fix(packing-slip): add a more descriptive message (#18982) 2019-09-10 13:21:19 +05:30
Deepesh Garg
71145c699f Merge pull request #18973 from Anurag810/sales_invoice_print_format_fixes_v11
fix: sales invoice return print format overriding the meta default print format
2019-09-09 18:35:49 +05:30
Anurag Mishra
ea6d90988f fix: sales invoice return print format overideing the meta default print format 2019-09-09 16:05:23 +05:30
Faris Ansari
6efe4acb1d fix: Set Price List in case of User Permissions (#18968)
- Pick Price List if there is one User Permission record
2019-09-09 14:28:12 +05:30
Rohan
ad2365502f fix: only select serial no that are present in the selected batch (#18726) 2019-09-09 13:49:02 +05:30
rohitwaghchaure
9c428ebfba fix: not able to save item because price list has disabled (#18965) 2019-09-09 13:20:15 +05:30
rohitwaghchaure
b53e4404dc fix: '>' not supported between instances of 'int' and 'str' (#18966) 2019-09-09 13:19:22 +05:30
rohitwaghchaure
0bc849975c Merge pull request #18951 from rohitwaghchaure/fixed_decimal_point_issue_for_e_invoicing
fix: PrezzoUnitario decimal issue
2019-09-06 18:47:59 +05:30
rohitwaghchaure
690139ca11 fix: circular dependency during asset cancellation (#18952) 2019-09-06 18:39:25 +05:30
Rohit Waghchaure
c0a21ad96a fix: PrezzoUnitario decimal issue 2019-09-06 16:30:05 +05:30
rohitwaghchaure
8c9fd62775 fix: ImponibileImporto for On Previous Row Total (#18947) 2019-09-06 12:14:45 +05:30
Sahil Khan
0be054ae0f Merge branch 'version-11-hotfix' into version-11 2019-09-05 17:25:12 +05:30
Sahil Khan
912cf9d555 bumped to version 11.1.60 2019-09-05 17:45:11 +05:50
Nabin Hait
7fe0a2023a fix: Print/PDF of AR/AP report after refactoring (#18930) 2019-09-05 16:43:06 +05:30
Mohammad Noureldin
cf191c0483 18861: Updated .gitignore (#18862) 2019-09-05 15:15:59 +05:30
Ernesto Ruiz
bb8d9f2a57 fix: Add transtlation function to strings (#18806)
* fix: Add transtlation function to strings

fix: Add transtlation function to strings

* fix: Add transtlation function to strings

fix: Add transtlation function to strings
2019-09-05 15:04:42 +05:30
Bassam Ramadan
fa4577d18a Update journal_entry.js (#18922)
adding a missed semicolom
2019-09-05 14:55:58 +05:30
Rohan
993521d365 fix: pull project from task (#18775) 2019-09-05 14:53:48 +05:30
Rohan
3372b7411d fix: error while trying to get directions (#18826) 2019-09-05 14:51:04 +05:30
rohitwaghchaure
5dbfeb8557 fix: not able to create invoice against patient (#18857) 2019-09-05 14:48:34 +05:30
rohitwaghchaure
f5d2337176 fix: mismatch between warehouse tree value and warehouse based stock balance report value (#18877) 2019-09-05 14:47:10 +05:30
Faris Ansari
67aa7b8735 fix: Honor Shopping Cart Price List (#18884) 2019-09-05 12:19:35 +05:30
Anurag Mishra
aea67c9843 fix: added missing positional argument (#18897) 2019-09-05 12:18:01 +05:30
Rohan
f64aaf5e1c fix: attribute error when trying to fetch items (#18899) 2019-09-05 12:16:44 +05:30
Deepesh Garg
00f6fd827e fix: Add UOM in anlytics report when viewing based on item (#18901) 2019-09-05 12:15:25 +05:30
Sahil Khan
ea2cdf8c12 Merge branch 'version-11-hotfix' into version-11 2019-09-03 16:30:00 +05:30
Sahil Khan
29729c8d31 bumped to version 11.1.59 2019-09-03 16:50:00 +05:50
rohitwaghchaure
536e24c6a1 Merge pull request #18908 from rohitwaghchaure/update_qty_even_after_submission_of_the_sales_transaction
fix: update actual qty even after submission of the sales transactions
2019-09-03 15:59:26 +05:30
Rohit Waghchaure
f178dc3b26 fix: update actual qty even after submission of the sales transactions 2019-09-03 15:57:53 +05:30
Mangesh-Khairnar
bc2f311a41 fix(purchase-invoice): add rounded total property setter for purchase invoice (#18842) 2019-09-03 14:18:31 +05:30
Deepesh Garg
5c28aba872 fix: Default message from Payment Gateway Account not fetching (#18849) 2019-09-03 14:17:15 +05:30
Rohan
f800050b71 fix: include start and end date for contract status (#18865) 2019-09-03 14:16:33 +05:30
Nabin Hait
fea996303f fix: Test case for Accounts Receivable based on payment terms (#18896) 2019-09-03 13:54:40 +05:30
rohitwaghchaure
833e017111 Merge pull request #18886 from rohitwaghchaure/fix_incorrect_stock_valuation_calculate_when_qty_from_negative_to_stock
fix: incorrect stock value difference when stock move from negative to positive
2019-09-02 23:19:56 +05:30
Nabin Hait
fb4f73605a refactor: Accounts Receivable / Payable report (#18890) 2019-09-02 22:36:20 +05:30
Mangesh-Khairnar
94dfcce434 fix: loan application (#18881)
* fix: loan application

* Update loan_application.py
2019-09-02 15:59:07 +05:30
Rohit Waghchaure
18e5bc1976 fix: incorrect stock value difference when stock move from negative to positive 2019-09-02 11:57:54 +05:30
Saurabh
7e54e6acb8 Merge branch 'version-11-hotfix' into version-11 2019-08-29 20:11:51 +05:30
Saurabh
0e52951db8 bumped to version 11.1.58 2019-08-29 20:41:51 +06:00
rohitwaghchaure
1b050e2dfd Merge pull request #18869 from rohitwaghchaure/not_able_to_save_sales_order
fix: not able to save sales order
2019-08-29 20:02:41 +05:30
Rohit Waghchaure
5674e19e71 fix: not able to save sales order 2019-08-29 20:00:45 +05:30
Saurabh
c49735ed15 Merge branch 'version-11-hotfix' into version-11 2019-08-29 15:08:47 +05:30
Saurabh
d1c467e49c bumped to version 11.1.57 2019-08-29 15:38:47 +06:00
rohitwaghchaure
e14df31c05 Merge pull request #18864 from rohitwaghchaure/v11_optimized_code_to_get_items_for_pos
fix: optimized the code to fix slow loading of items in the POS
2019-08-29 12:22:30 +05:30
rohitwaghchaure
9ff9f21af0 Merge pull request #18856 from rohitwaghchaure/incorrect_valuation_rate_calculated_for_serial_no
fix: incorrect valuation rate calculated because of string replacement issue
2019-08-29 12:13:24 +05:30
Saurabh
eba361b27d Merge branch 'version-11-hotfix' into v11_optimized_code_to_get_items_for_pos 2019-08-29 12:05:44 +05:30
Rohit Waghchaure
cc960806a9 Optimized the code to fix slow loading of items in the POS 2019-08-29 11:46:55 +05:30
rohitwaghchaure
75c47d64ff Merge pull request #18824 from rohitwaghchaure/fix_actual_qty_showing_different_in_the_report_and_form
fix: Actual qty in the sales order showing different on the sales ord…
2019-08-29 09:23:32 +05:30
Rohit Waghchaure
300307b22f fix: incorrect valuation rate calculated because of string replacement issue 2019-08-28 16:56:07 +05:30
Mangesh-Khairnar
43ebcb5876 fix: update show in website on disabling item (#18832) 2019-08-26 10:27:21 +05:30
bghayad
f254d8c5ee Adding query for item field for some stock reports (#18457) 2019-08-23 13:00:39 +05:30
Nabin Hait
8811a8c9b6 Translated payment type 2019-08-23 12:48:43 +05:30
Ernesto Ruiz
4f1b88ee0f fix: fix: Add transtlation function to strings (#18801)
fix: Add transtlation function to strings
2019-08-23 12:31:11 +05:30
Ernesto Ruiz
51a7aa9c76 Fix: Add translation function to string (#18802)
Fix: Add translation function to string
2019-08-23 12:28:50 +05:30
Sun Howwrongbum
33ce5ce048 fix: pos return validation (#18810) 2019-08-23 12:25:18 +05:30
Sagar Vora
b4a570242e fix: incorrect value being passed to get_taxes function (#18509) 2019-08-23 12:12:26 +05:30
Rohit Waghchaure
481977d368 fix: Actual qty in the sales order showing different on the sales order form and the standard sales order report 2019-08-23 11:49:26 +05:30
Deepesh Garg
479b2bbbd9 fix: Duplicate items check in sales Invoice (#18662)
* fix: Duplicate items check in sales Invoice

* fix: Commonified function for duplicate items check in selling controller

* fix: Set valuation rate and transaction date in child tabel

* fix: Code cleanup
2019-08-23 11:42:49 +05:30
rohitwaghchaure
4faf57869d fix: POS Sync Issue (#18808) 2019-08-23 11:13:54 +05:30
Mangesh-Khairnar
33eb38cc1b fix: fetch capital work in progress as expense account (#18781) 2019-08-21 14:49:14 +05:30
Nabin Hait
c6f72f7c90 fix: Single gl entry should only be considered once either in opening or closing entry (#18793) 2019-08-21 14:47:25 +05:30
rohitwaghchaure
d082a12411 Merge pull request #18798 from scmmishra/shopping-cart
fix: shopping cart item availability
2019-08-21 08:59:37 +05:30
Shivam Mishra
096de8a0d5 fix: shopping cart item availability 2019-08-20 19:18:45 +05:30
Sahil Khan
5638d63866 Merge branch 'version-11-hotfix' into version-11 2019-08-20 15:58:20 +05:30
Sahil Khan
a621466219 bumped to version 11.1.56 2019-08-20 16:18:20 +05:50
rohitwaghchaure
6155114bfd fix: group by voucher consolidated showing incorrect data for deferred entries (#18778) 2019-08-20 12:35:38 +05:30
Mangesh-Khairnar
2ca33d4f51 Merge pull request #18782 from deepeshgarg007/test_case_fix_v11
fix: Failing sales and purchase return test cases
2019-08-19 19:21:05 +05:30
deepeshgarg007
f1618af76c fix: Syntax error 2019-08-19 18:53:11 +05:30
deepeshgarg007
9f7098115b fix: Failing sales and purchase return test cases 2019-08-19 17:53:47 +05:30
Deepesh Garg
55b8b4e374 fix: Travis (#18773) 2019-08-19 12:56:49 +05:30
Deepesh Garg
7cb8c51b2d fix: Party dashboard heatmap not capturing sales, purchase and other activities (#18752) 2019-08-19 11:49:47 +05:30
Anurag Mishra
311fe5b3dc fix: removed filters(not required) (#18728) 2019-08-19 10:30:44 +05:30
Anurag Mishra
269868130f fix: validated cost center in financial_statement (#18732)
* fix: validated cost center in financial_statement

* Update financial_statements.py
2019-08-19 10:27:53 +05:30
Mangesh-Khairnar
736eed01c2 fix: notify update on status change (#18764) 2019-08-19 10:20:48 +05:30
Mangesh-Khairnar
e014b898bd fix: valuation rate in stock ledger (#18743)
* fix: valuation rate in stock ledger

* test: allow zero valuation rate for items
2019-08-19 10:04:34 +05:30
Sahil Khan
1eb31210e0 Merge branch 'version-11-hotfix' into version-11 2019-08-16 17:32:19 +05:30
Sahil Khan
8d72aa99aa bumped to version 11.1.55 2019-08-16 17:52:19 +05:50
Deepesh Garg
3a4503b7a1 Merge pull request #18760 from deepeshgarg007/chart_of_accounts_fix
fix: Symbol fix in chart of accounts
2019-08-16 15:48:34 +05:30
Mangesh-Khairnar
01952bbc15 Merge pull request #18714 from Mangesh-Khairnar/quality-inspection-fix
fix(quality-inspection): fetch all items for inspection type in process
2019-08-16 13:54:31 +05:30
Mangesh-Khairnar
1ca6365dee Merge branch 'version-11-hotfix' into quality-inspection-fix 2019-08-16 13:54:11 +05:30
deepeshgarg007
a7a810a25f fix: Remove extra space 2019-08-16 12:58:24 +05:30
Suraj Shetty
e62fba062e fix: Check if account passed is accessible under Payment Entry (#18706)
* fix: Check if account passed is accessible under Payment Entry

* fix: Comment description

* fix: Ignore account permission check

* fix: Re-organise code
2019-08-14 14:47:24 +05:30
Mangesh-Khairnar
60b7acc9b0 fix(payroll-entry): commit submitted salary slip check onchange (#18695)
* fix(payroll-entry): commit submitted salary slip check onchange

* fix: track submitted ss via flags
2019-08-14 14:39:33 +05:30
Deepesh Garg
d7ddb0c14e Merge pull request #18718 from Anurag810/company_fix_v11
fix: removed hard coded string
2019-08-14 12:12:03 +05:30
Anurag Mishra
8d84ffb276 fix: removed hard coded string 2019-08-13 19:47:20 +05:30
Mangesh-Khairnar
784c3333d7 fix(quality-inspection): fetch all items for inspection type in process 2019-08-13 17:04:29 +05:30
Sahil Khan
2227f54e66 Merge branch 'version-11-hotfix' into version-11 2019-08-13 14:41:58 +05:30
Sahil Khan
c55657dca5 bumped to version 11.1.54 2019-08-13 15:01:58 +05:50
Anurag Mishra
b6b2c48340 fix: condition (#18708) 2019-08-13 12:53:17 +05:30
Suraj Shetty
582c86a7b6 fix: Filters for portal quotation list (#18704)
* fix: Filters for portal quotation list

* fix: Remove unwanted import
2019-08-12 17:33:04 +05:30
rohitwaghchaure
76668e9004 Merge pull request #18701 from rohitwaghchaure/reconciled_entry_still_has_no_clearance_date
fix: reconciled entry has not clearance date set
2019-08-12 15:34:05 +05:30
Rohit Waghchaure
d0426a6127 fix: reconciled entry has not clearance date set 2019-08-12 14:56:57 +05:30
DeeMysterio
4252575e84 fix(delivery note): change the text invoice to sales invoice on make button (#18665) 2019-08-12 13:03:39 +05:30
Anurag Mishra
f6dcd8ac91 payment ammount valication for pos invoiceds (#18664) 2019-08-12 12:10:48 +05:30
Andrew McLeod
6a9fb51dc5 fix: Python3 urllib use in item_group.py (now uses six.moves) (#18605) 2019-08-12 12:07:07 +05:30
Anurag Mishra
70b93e2cd4 fix: condition (#18667) 2019-08-12 11:46:47 +05:30
rohitwaghchaure
f4493674f7 Merge pull request #18680 from Anurag810/get-item-from-product-bundle-v11
fix: get item from product bundle
2019-08-09 15:17:07 +05:30
Anurag Mishra
dd5a818d6a fix: get item from product bundle 2019-08-09 13:35:01 +05:30
rohitwaghchaure
e78dfb5df6 Merge pull request #18668 from rohitwaghchaure/removed_stock_item_condition_for_sub_contract
fix: allow to subcontract service raw materials
2019-08-09 12:42:01 +05:30
Rohit Waghchaure
429d0dcda0 fix: allow to subcotract service raw materials 2019-08-08 18:19:24 +05:30
rohitwaghchaure
eb174e1afa fix: incorrect value of ImponibileImporto in the xml invoice (#18655) 2019-08-08 17:42:11 +05:30
rohitwaghchaure
4a6b5367ca fix: not able to transfer raw materials for subcontracted items (#18649) 2019-08-08 17:41:33 +05:30
Mangesh-Khairnar
3675e616bc fix: accounting period (#18476)
* fix: accounting period

* test: accounting period

* fix: account period creation

* fix: remove status field from accounting period
2019-08-08 17:38:56 +05:30
Deepesh Garg
f9d3df9531 fix: Changes in print format due to attribute name changes in frappe (#18638) 2019-08-08 15:52:00 +05:30
Aditya Hase
081d312a11 fix(quickbooks): Do not build global search for QuickBooks Migrator (#18626) 2019-08-08 15:47:22 +05:30
Shivam Mishra
355e832b02 fix: icon for opportunity (#18651) 2019-08-08 13:18:46 +05:30
Deepesh Garg
6b65e2b168 fix: Show Cr or Dr symbol in chart of accounts based on balance (#18652)
* fix: Show Cr or Dr symbol in chart of accounts based on balance

* Update account_tree.js
2019-08-08 13:16:35 +05:30
Sahil Khan
57041084d1 Merge branch 'version-11-hotfix' into version-11 2019-08-07 16:17:49 +05:30
Sahil Khan
cf4c7b406a bumped to version 11.1.53 2019-08-07 16:37:49 +05:50
Anurag Mishra
edb3cdbb59 fix: query (#18465) 2019-08-05 10:27:48 +05:30
Mangesh-Khairnar
55025d4dc9 fix(sales-order): update items (#18537)
* fix(sales-order): update items

* fix: minor changes
2019-08-05 10:16:10 +05:30
Deepesh Garg
6f7a5e525d fix: Make conversion rate optional for non itemized items (#18538) 2019-08-05 10:14:37 +05:30
Deepesh Garg
342c77c851 fix: Customer price list not honored in shopping cart (#18555) 2019-08-05 10:11:07 +05:30
Suraj Shetty
94f4d81b70 fix: Quotation list in customer portal (#18580)
* fix: Quotation list in customer portal

Customers were not able to see their quotations because of
 the recent customer field removal from quotation

* fix: Remove duplicate code
2019-08-05 10:08:01 +05:30
Mangesh-Khairnar
74f31c6677 fix(employee-advance): update employee advance on change in expense claim (#18589)
* fix(employee-advance): update employee advance on rejection/cancellation of expense claim

* fix(expense-claim): display appropriate buttons only if linked transactions are valid

* Update employee_advance.py
2019-08-05 10:03:32 +05:30
Deepesh Garg
7589b9f822 Merge pull request #18575 from deepeshgarg007/taxes_and_totals_v11
fix: Error handling in taxes and totals
2019-08-03 18:27:52 +05:30
deepeshgarg007
b761169976 fix: Error handling in taxes and totals 2019-08-03 13:40:37 +05:30
Suraj Shetty
537c3a79ab fix: Show correct label instead of showing undefined (#18561) 2019-08-02 21:46:11 +05:30
Sahil Khan
0510988b3e Merge branch 'version-11-hotfix' into version-11 2019-08-02 14:24:50 +05:30
Sahil Khan
79c389a48f bumped to version 11.1.52 2019-08-02 14:44:50 +05:50
Suraj Shetty
239779dad0 fix: Check zero valuation rate only for valid doctypes (#18530)
fix: Check zero valuation rate only for valid doctypes
2019-08-02 11:23:01 +05:30
Suraj Shetty
37a7ab9d0e Merge branch 'version-11-hotfix' into stock-ledger-fix_v11 2019-08-02 08:42:58 +05:30
Deepesh Garg
17ea15eb91 fix: Enhancement in credit note (#18534)
* fix: Credit note enhancement

* Fix: Print format for Sales Invoice Return

* fix: Zero quantity validation fix for credit note
2019-07-31 15:59:34 +05:30
rohitwaghchaure
ddaf81051e Merge pull request #18532 from rohitwaghchaure/scrap_item_not_adding_v11_hotfix
fix: scrap item not adding while making finished good entry
2019-07-31 12:09:52 +05:30
Rohit Waghchaure
d06f3882e9 fix: scrap item not adding while making finished good entry 2019-07-31 00:00:47 +05:30
deepeshgarg007
523994c2cf fix: Check zero valuation rate only for valid doctypes 2019-07-30 19:06:06 +05:30
Sahil Khan
00219ab7f0 Merge branch 'version-11-hotfix' into version-11 2019-07-30 13:06:37 +05:30
Sahil Khan
0c4f1e5e67 bumped to version 11.1.51 2019-07-30 13:26:37 +05:50
rohitwaghchaure
29e3cfd60f Merge pull request #18456 from rohitwaghchaure/bank_reco_consider_incorrect_paid_amount_field
fix: multi currency bank reconciliation issue
2019-07-29 11:40:25 +05:30
Mangesh-Khairnar
95058eac21 fix(payroll-entry): show make bank entry button when manually submitting salary slip (#18499) 2019-07-27 10:04:18 +05:30
Sahil Khan
4b963be8c4 Merge branch 'version-11-hotfix' into version-11 2019-07-26 12:43:33 +05:30
Sahil Khan
a4434b1a50 bumped to version 11.1.50 2019-07-26 13:03:33 +05:50
Deepesh Garg
d3dc241878 Merge pull request #18492 from adityahase/faster-version-11
perf(travis): Faster Builds
2019-07-26 12:40:27 +05:30
Deepesh Garg
012e617c55 Merge pull request #18479 from deepeshgarg007/bank_reco
fix: Dynamic link issue fix in Bank reconciliation statement
2019-07-26 08:49:14 +05:30
Deepesh Garg
bee135c8c6 Merge pull request #18472 from deepeshgarg007/gstr-1-query
fix: GSTR-1 report fixes
2019-07-26 08:46:24 +05:30
Aditya Hase
8a19cd1096 perf(tests): Remove unnecessary tearDown code 2019-07-26 06:03:21 +05:30
Aditya Hase
5b14ca081c perf(travis): Use setUpClass instead of setUp 2019-07-26 06:03:21 +05:30
Aditya Hase
4fbf03c760 perf(tests): Use country with lesser fixtures 2019-07-26 06:00:51 +05:30
Aditya Hase
503d1d3291 perf(tests): Do not unnecessarily create companies 2019-07-26 05:59:31 +05:30
Aditya Hase
e2108d75dc perf(tests): Use setUpClass and tearDownClass instead of setUp and tearDown 2019-07-26 05:59:31 +05:30
Aditya Hase
9a009a1d1c fix(travis): Install wkhtmltopdf 2019-07-26 05:59:30 +05:30
Aditya Hase
61211486bc fix(travis): Remove redundant arguments 2019-07-26 05:59:30 +05:30
Aditya Hase
42fd7451bf fix(travis): Use --site parameter 2019-07-26 05:59:30 +05:30
Aditya Hase
70a1c1bdac fix(travis): Merge install and before_script 2019-07-26 05:59:30 +05:30
Aditya Hase
eb6d74217c fix(travis): Execute get-app before bench start 2019-07-26 05:59:30 +05:30
Aditya Hase
172a8f1cea perf(travis): Use travis optimizations 2019-07-26 05:59:30 +05:30
Aditya Hase
164057fa5b perf(travis): Do not build assets 2019-07-26 05:59:30 +05:30
Aditya Hase
3c21ac6bb6 perf(travis): Remove unnecessary processes from Procfile 2019-07-26 05:59:30 +05:30
Aditya Hase
ad2585e1b7 fix(travis): Use MariaDB credentials from site_config.json 2019-07-26 05:59:30 +05:30
Aditya Hase
09fe604452 perf(travis): Do not waste 10 seconds 2019-07-26 05:59:30 +05:30
Aditya Hase
28d836cfea fix(travis): Execute get-app and reinstall after bench start 2019-07-26 05:59:30 +05:30
Aditya Hase
8005f350ae fix(travis): Do not disable scheduler using CLI 2019-07-26 05:59:30 +05:30
Aditya Hase
3168ae7dcc fix(travis): Do not use use_site 2019-07-26 05:59:30 +05:30
Aditya Hase
447b8dab96 fix(travis): Setup MariaDB 2019-07-26 05:59:30 +05:30
Aditya Hase
6408949d43 fix(travis): Remove unused files 2019-07-26 05:59:30 +05:30
Aditya Hase
5fe2272861 fix(travis): Remove travis/bench_init.sh 2019-07-26 05:58:21 +05:30
Aditya Hase
7165a5d1f8 fix(travis): Do not execute install.py 2019-07-26 05:58:21 +05:30
Aditya Hase
2ec21fa9fb fix(travis): Install coverall after tests 2019-07-26 05:58:21 +05:30
Aditya Hase
a162f560dd fix(travis): Use MariaDB 10.3 2019-07-26 05:58:21 +05:30
Aditya Hase
c3c168a70d fix(travis): Restructure build matrix 2019-07-26 05:58:21 +05:30
Aditya Hase
b5ac3b8a53 fix(travis): Remove unnecessary commands 2019-07-26 05:58:21 +05:30
deepeshgarg007
30452a8bcd Dynamic link issue fix in Bank reconciliation statement 2019-07-25 12:23:40 +05:30
deepeshgarg007
36676effd9 fix: Query for b2b 2019-07-24 21:19:08 +05:30
deepeshgarg007
f31ff74a75 fix: GSTR-1 report fixes 2019-07-24 20:52:25 +05:30
rohitwaghchaure
4298cc1cdb Merge pull request #18462 from rohitwaghchaure/pos_not_working_for_loyalty
fix: pos not working
2019-07-24 12:22:30 +05:30
Rohit Waghchaure
abe5a5ae30 fix: pos not working 2019-07-24 12:06:12 +05:30
Rohit Waghchaure
9daaeaed07 fix: multi currency bank reco issue 2019-07-23 23:13:33 +05:30
Sahil Khan
926150bccb Merge branch 'hotfix' 2019-07-23 14:38:23 +05:30
Sahil Khan
e46d10676e bumped to version 11.1.49 2019-07-23 14:58:23 +05:50
Mangesh-Khairnar
631e8bb9dd fix: remove wrong status update for order type maintenance (#18443) 2019-07-22 16:25:58 +05:30
rohitwaghchaure
13d6f4b291 fix: Pro rata calculation is not working for WDV depreciation method (#17746)
* fix: Pro rata calculation is not working for WDV depreciation method

* fixed test cases and the logic for pro rata calculation
2019-07-22 11:55:28 +05:30
Anurag Mishra
bc72fdff7a Handling case for Material Request type 'Manufacture' v11 (#18366)
* fix: status for 'material request type == Manufacture'

* Patch: for setting status

* fix: list view status
2019-07-22 11:34:55 +05:30
rohitwaghchaure
e8148112fc Merge pull request #18186 from bhavishyasharma/fix-bom-item-with-operation
fix: BOM Item with Operation
2019-07-22 11:28:54 +05:30
Mangesh-Khairnar
a1dd861096 fix: update percentage on creation of invoice for zero amt transaction (#18383) 2019-07-22 11:28:33 +05:30
Anurag Mishra
aeb0b008fa fix: mapped cost center in gl entries (#18405)
* fis: mapped cost center in gl entries

* chore: Removed Print statements
2019-07-22 11:21:44 +05:30
Himanshu
4c711ed62c fix(Item): File Attach via data import (#18413)
* fix: file not showing

* fix: file attach via import
2019-07-22 11:21:19 +05:30
Anurag Mishra
7620742299 fix: handle for product bundle (#18421) 2019-07-22 11:10:15 +05:30
rohitwaghchaure
8a5bd02662 Merge pull request #18441 from rohitwaghchaure/pos_not_working_for_hotfix
fix: pos not working
2019-07-21 22:57:16 +05:30
Rohit Waghchaure
565936442d fix: pos not working 2019-07-21 22:53:13 +05:30
Bhavishya Sharma
a8e1c90035 fix: updated logic 2019-07-20 19:49:47 +05:30
Deepesh Garg
a953b68a17 Merge pull request #18433 from deepeshgarg007/get_balance_hotfix
fix: Condition fix in get_balance_on function
2019-07-20 16:50:18 +05:30
deepeshgarg007
c9c48d3736 fix: Condition fix 2019-07-20 14:54:47 +05:30
deepeshgarg007
d1d679843e fix: Assignment fix 2019-07-20 14:54:40 +05:30
deepeshgarg007
c2b7084ee8 fix: Condition fix in get_balance_on function 2019-07-20 14:54:32 +05:30
Mangesh-Khairnar
07bbe8568f fix: payment document link fix (#18407) 2019-07-19 17:20:58 +05:30
Sahil Khan
2a58b6c20b Merge branch 'hotfix' 2019-07-19 17:11:27 +05:30
Sahil Khan
196bf2104f bumped to version 11.1.48 2019-07-19 17:31:27 +05:50
Deepesh Garg
a33145e6d9 Merge pull request #18400 from frappe/kennethsequeira-patch-1
fix: Update image in README file
2019-07-19 09:53:39 +05:30
Deepesh Garg
6161d3362d Merge pull request #18409 from rohitwaghchaure/not_able_to_make_material_request_for_product_bundle_from_so_hotfix
fix: not able to make material request for bundle items from the sale…
2019-07-19 09:47:43 +05:30
Deepesh Garg
fac8ed0630 Merge pull request #18389 from deepeshgarg007/lead_email
fix: Fetch email when making Opportunity from Lead
2019-07-19 08:05:46 +05:30
Rohit Waghchaure
3279ad55f6 fix: not able to make material request for bundle items from the sales order 2019-07-19 07:55:28 +05:30
Mangesh-Khairnar
9bdb04d7ca Merge pull request #18380 from rohitwaghchaure/pos_fixed_address_and_taxes_and_charges_not_set_as_per_profile_hotfix
fix: address and taxes not set as per pos profile in the pos invoice
2019-07-18 19:34:44 +05:30
Kenneth Sequeira
89270ef2c0 Update image in README file
Updated the link of the ERPNext logo image in the read me file
2019-07-18 17:01:23 +05:30
rohitwaghchaure
c0ea006571 Merge pull request #18392 from rohitwaghchaure/fix_send_sms_not_working_for_quotation
fix: send sms not working for the quotation
2019-07-18 15:46:01 +05:30
Mangesh-Khairnar
de3b79cce8 fix: precision on comparing with the outstanding amount (#18374) 2019-07-18 13:51:05 +05:30
Rohit Waghchaure
f326d5c9a1 fix: send sms not working for the quotation 2019-07-18 13:50:37 +05:30
Anurag Mishra
e112ac2345 fix: handled value Error (#18362) 2019-07-18 12:43:05 +05:30
Suraj Shetty
ad1719bbe4 feat(customer): Add report to show item prices per Customer (#17929)
feat(customer): Add report to show item prices per Customer
2019-07-18 10:15:05 +05:30
deepeshgarg007
f2c464dda8 fix: Fetch email when making Opportunity from Lead 2019-07-18 09:05:57 +05:30
Suraj Shetty
2b64b38a6e Merge branch 'hotfix' into hotfix-customer-item-price-report 2019-07-18 08:49:36 +05:30
rohitwaghchaure
dcbafecf58 Merge pull request #18384 from rohitwaghchaure/offline_pos_syncing_issue_for_customer_hotfix
fix: offline pos syncing issue for customer
2019-07-17 21:38:15 +05:30
rohitwaghchaure
20229b915c Merge pull request #18386 from rohitwaghchaure/cost_center_not_able_to_access
fix: cost center not able to access
2019-07-17 21:37:03 +05:30
Rohit Waghchaure
7a1a0fb5fb fix: cost center not able to access 2019-07-17 21:20:05 +05:30
Rohit Waghchaure
fddef7bd5c fix: offline pos syncing issue for customer 2019-07-17 20:34:50 +05:30
Rohit Waghchaure
804854f051 fix: address and taxes not set as per pos profile in the pos invoice 2019-07-17 19:34:42 +05:30
rohitwaghchaure
bdb48f34ed Merge pull request #18370 from Anurag810/fix_precision
fix: precision for base grand total amount
2019-07-17 19:00:18 +05:30
Suraj Shetty
986b5115da Merge branch 'hotfix' into hotfix-customer-item-price-report 2019-07-17 17:29:27 +05:30
Anurag Mishra
b37f4a157c fix precision 2019-07-17 14:53:25 +05:30
rohitwaghchaure
f650b287ef fix: conversion issue (#18357) 2019-07-16 15:58:43 +05:30
Sahil Khan
1866cebd14 Merge branch 'hotfix' 2019-07-16 15:23:51 +05:30
Sahil Khan
bb5bf06e0c bumped to version 11.1.47 2019-07-16 15:43:50 +05:50
Deepesh Garg
ecf8e20462 fix: Fixes in get_balance_on function (#18323) 2019-07-16 09:40:47 +05:30
Deepesh Garg
5a0bc043aa Merge pull request #18321 from deepeshgarg007/quo_opp_address_fix_hotfix
fix: Address filtering fix in opportunity
2019-07-16 09:03:07 +05:30
Deepesh Garg
a2c9c9505c Merge pull request #18349 from rohitwaghchaure/added_payment_terms_in_accounts_payble_summary
feat: added payment terms filter in the accounts payable summary
2019-07-16 08:39:50 +05:30
Rohit Waghchaure
f6060fa5f2 feat: added payment terms filter in the accounts payable summary 2019-07-16 01:53:34 +05:30
rohitwaghchaure
b4cf29391b fix: taxes sequence if shipping rule is set in the sales invoice (#18330) 2019-07-15 18:58:06 +05:30
Anurag Mishra
a6a6f69e26 fix: Validate loan repayment amount in Loan Application (#18170)
* fix: validate loan repayment amount

* fix: test for Loan Application
2019-07-15 14:16:45 +05:30
Mangesh-Khairnar
db38c02aee fix(bin): update requested qty in bin (#18313) 2019-07-15 14:08:12 +05:30
deepeshgarg007
e107d430eb fix: Address filtering fix in opportunity 2019-07-15 13:58:03 +05:30
Mangesh-Khairnar
0c849ac0f3 fix: bank-reconcillation-statement, payment entry links (#18312) 2019-07-15 11:59:59 +05:30
rohitwaghchaure
6b86bb462b Merge pull request #17845 from fproldan/fix_by_voucher_order
fix: General Ledger Group by Voucher not ordering by posting_date
2019-07-14 17:24:35 +05:30
rohitwaghchaure
80cfc88abb Merge pull request #18111 from sunhoww/pos_loyalty
fix: POS loyalty issues
2019-07-14 17:11:05 +05:30
rohitwaghchaure
3c425584a7 Merge pull request #18296 from rohitwaghchaure/fixed_dr_cr_issue_account_tree_hotfix
fix: Dr / Cr label for balance of the ledgers in the account tree
2019-07-14 17:01:13 +05:30
Mangesh-Khairnar
af561becc6 Merge pull request #17956 from harounasow/17902
fix(payment entry): payment to shareholder #17902
2019-07-13 19:10:17 +05:30
Mangesh-Khairnar
0ef08618c9 Merge branch 'hotfix' into 17902 2019-07-13 12:01:27 +05:30
Deepesh Garg
373d90f802 Merge pull request #18292 from nabinhait/taxes-calc-only-if-items
fix: Calculate taxes and totals only if items added in transaction
2019-07-12 23:03:41 +05:30
Mangesh-Khairnar
ceaedd0f95 fix: handle shareholder option in payment entry 2019-07-12 16:28:03 +05:30
Rohit Waghchaure
fd7c4e9822 fix: dr / cr label for balance of the ledgers in the account tree 2019-07-12 15:49:51 +05:30
Deepesh Garg
26878d907e Merge pull request #18000 from govindsmenokee/patch-2
fix: lead reference changed to dynamic link #17987
2019-07-12 14:41:00 +05:30
Mangesh-Khairnar
ae3c21046b Merge branch 'hotfix' into 17902 2019-07-12 14:39:56 +05:30
Nabin Hait
f01baaa56f fix: Calculate taxes and totals only if items added in transaction 2019-07-12 14:27:19 +05:30
Aditya Hase
ac534c64bc fix: QuickBooks Migrator (#18273)
* fix: Remove unused imports

* style: Remove whitespace before :

* style: Insert whitespace after ,

* style: One import per line

* fix: Remove unused local variable

* style: Remove multiple whitespace after :

* fix: Company might not have any warehouses when on_update hook for QBM is being executed

This used to throw while renaming a Company that is either used with QuickBooks
Migrator or is set as a Default Company in Global Defaults.
2019-07-12 11:19:53 +05:30
Rohan
6e8e42ca7c Merge branch 'hotfix' into hotfix-customer-item-price-report 2019-07-12 00:07:21 +05:30
Nabin Hait
7d3d99a9b8 fix: UX fixes in loan (#18219)
* fix: UX fixes in loan

* Update loan.py
2019-07-11 17:17:49 +05:30
Sahil Khan
9a858a9824 Merge branch 'hotfix' 2019-07-11 15:15:56 +05:30
Sahil Khan
5792d6037c bumped to version 11.1.46 2019-07-11 15:35:56 +05:50
Nabin Hait
75310637da fix: Revert #frappe/erpnext/17896 (#18250) 2019-07-11 14:39:38 +05:30
Mangesh-Khairnar
6fa4697efb fix(sales-invoice): get items from quotation (#18236) 2019-07-11 10:05:03 +05:30
Don-Leopardo
63e83cc005 Merge branch 'hotfix' into fix_by_voucher_order 2019-07-10 10:47:52 -03:00
Suraj Shetty
68d7d6e223 fix: Return fieldtype so that the client-side can format chart values (#18221) 2019-07-10 17:16:48 +05:30
Nabin Hait
7ee97b6128 fix: Make material request against SO only for pending qty (#18217) 2019-07-10 17:05:57 +05:30
Mangesh-Khairnar
49fadcbaf2 fix(exchange-rate-revaluation): change create to view button on creation of journal entry (#18202) 2019-07-10 17:03:08 +05:30
rohitwaghchaure
e6ab86e185 fix: error report for item price (#18213) 2019-07-10 16:41:39 +05:30
Sahil Khan
35fe0a6cbd Merge branch 'hotfix' 2019-07-09 15:20:08 +05:30
Sahil Khan
d287fe4dae bumped to version 11.1.45 2019-07-09 15:40:08 +05:50
Mangesh-Khairnar
683d987432 fix(bom): escape name with wildcard character (#18163) 2019-07-08 10:40:24 +05:30
rohitwaghchaure
37d0c75f04 fix: not able to make credit note for the sales invoice in which item code is not set (#18185) 2019-07-08 10:26:12 +05:30
Deepesh Garg
6940a6cd47 Merge pull request #18196 from deepeshgarg007/b2cs_json_hotfix
fix: Cess amount calculation fix in GSTR-1 report (hotfix)
2019-07-08 10:11:06 +05:30
deepeshgarg007
34867ced92 fix: Cess amount calculation fix in GSTR-1(hotfix) 2019-07-07 21:49:17 +05:30
Bhavishya Sharma
5c482e907e BOM Scrap Item fix 2019-07-06 00:20:21 +05:30
Bhavishya Sharma
3ebc13f228 typo fix 2019-07-05 23:33:19 +05:30
Bhavishya Sharma
b5882aaa6c fix: BOM Item with Operation 2019-07-05 22:40:49 +05:30
rohitwaghchaure
7543916da6 Merge pull request #18153 from netchampfaris/fix-price-list-on-website
fix: Honor price list in Shopping Cart Settings
2019-07-05 18:14:06 +05:30
rohitwaghchaure
11d02c028f fix: on credit note / debit note deferred reversed instead of income (#18171) 2019-07-05 14:19:40 +05:30
rohitwaghchaure
a72ef5eceb Merge pull request #18159 from rohitwaghchaure/set_default_supplier_in_item_default_for_multi_company
fix: default supplier was not set from the patch in item defaults for multi company instance
2019-07-05 11:21:34 +05:30
Sahil Khan
3e9ddf23e1 Merge branch 'hotfix' 2019-07-04 15:50:39 +05:30
Sahil Khan
6fc6f385fe bumped to version 11.1.44 2019-07-04 16:10:39 +05:50
Rohit Waghchaure
ba62173561 fix: default supplier was not set from the patch in item defaults for multi company instance 2019-07-04 15:00:04 +05:30
Mangesh-Khairnar
709f21692c fix(salary-slip): amount calculation (#18158) 2019-07-04 13:09:06 +05:30
Mangesh-Khairnar
4dd48f46f3 fix: invoice cancellation (#18151) 2019-07-04 11:37:45 +05:30
Faris Ansari
e59836e3da fix: Honor price list in Shopping Cart Settings 2019-07-03 19:22:49 +05:30
Mangesh-Khairnar
cc80be449d fix: Salary slip amount calculation (#18146) 2019-07-03 17:27:40 +05:30
Anurag Mishra
29433f2b1b fix: translating Error (#18140) 2019-07-03 11:42:33 +05:30
Sahil Khan
bdeaf4880f Merge branch 'hotfix' 2019-07-02 18:46:20 +05:30
Sahil Khan
53e3674924 bumped to version 11.1.43 2019-07-02 19:06:20 +05:50
rohitwaghchaure
6f2f8ae85e Merge pull request #18128 from rohitwaghchaure/fixed_issues_in_delayed_order_report
fix: multiple minor issues in delayed order report
2019-07-02 12:46:04 +05:30
Deepesh Garg
48474a2d4e fix: Fiter passing fix in get batch query (#18130) 2019-07-02 10:11:02 +05:30
rohitwaghchaure
3e6df7f0bb Merge pull request #18103 from rohitwaghchaure/incorrect_value_of_accumualated_depreciation_in_the_sales_invoice
fix: incorrect value booked in the accumulated depreciation account on sell of the asset
2019-07-01 20:43:35 +05:30
Rohit Waghchaure
47bca7f651 fix: multiple minor issues in delayed order report 2019-07-01 20:38:27 +05:30
Shivam Mishra
fb59d770ba fix: translated title (#18121) 2019-07-01 11:01:36 +00:00
Nabin Hait
ad99934b4c Update accounts_controller.py 2019-07-01 15:16:10 +05:30
Rohit Waghchaure
2a0be68cb3 fix: incorrect value booked in the accumulated depreciation account on sell of the asset 2019-07-01 13:26:58 +05:30
Mangesh-Khairnar
a7da7226ac Merge pull request #18106 from Mangesh-Khairnar/fix-mapped-doc
fix: clear duplicates in mapped doc
2019-07-01 12:27:24 +05:30
Sun Howwrongbum
505332e680 feat(pos): reset payments and loyalty points on redeem uncheck 2019-06-29 21:35:58 +05:30
Sun Howwrongbum
ada3330403 fix(pos): changing loyalty points not updating payment amounts 2019-06-29 21:18:53 +05:30
Sun Howwrongbum
e0143e081c fix(pos): loyalty details not rendering in cart area 2019-06-29 20:48:27 +05:30
Himanshu
84d3d544ef Merge branch 'hotfix' into fix-mapped-doc 2019-06-28 19:46:29 +05:30
Mangesh-Khairnar
30c9c56d6c fix: add a more descriptive message when no records are found (#18083)
* fix: add a more descriptive message when no records are found

* fix: translation by passing string to translation function
2019-06-28 19:35:05 +05:30
Mangesh-Khairnar
dfe0a9002a fix: mapped doc 2019-06-28 19:26:18 +05:30
rohitwaghchaure
3eea9e3967 Merge pull request #18101 from adityahase/fix-buying
fix(buying): Translate label for "Supplier Addresses And Contacts" Report
2019-06-28 14:43:52 +05:30
Aditya Hase
69051c4197 fix(buying): Translate label for "Supplier Addresses And Contacts" Report 2019-06-28 14:36:53 +05:30
Himanshu
5b5156356a fix(Utils): Do not add duplicate item to items (#17895)
* fix: do not add duplicate item to items

* fix: compare warehouses, batch and qty for an item

* fix: code fixes

* Update utils.js

* fix: check required_date and delivery_date

* Update utils.js

* Update utils.js

* Update utils.js

* fix: mixed spaces and tabs
2019-06-28 14:12:40 +05:30
Deepesh Garg
fdd1422d31 fix: Usability fixes to Serial No and batch selector (#18070)
* fix: Usability fixes to Serial No and batch selector

* fix: Codacy

* Update sales_common.js
2019-06-28 14:09:23 +05:30
rohitwaghchaure
c82253e479 fix: not able to make salary slip based on timesheet (#18087) 2019-06-28 12:41:16 +05:30
Nabin Hait
b059c6f630 fix: Fixes related to customer/lead merging (#18075) 2019-06-28 12:36:27 +05:30
Don-Leopardo
f03522ad9e Merge branch 'hotfix' into fix_by_voucher_order 2019-06-27 18:09:39 -03:00
Anurag Mishra
42e62bd1b4 fix: Wrong Casual Leave Opening in Employee Leave Balance Report
fix: Wrong Casual Leave Opening in Employee Leave Balance Report
2019-06-27 17:01:21 +05:30
Rushabh Mehta
2ff9c385c3 Merge pull request #18080 from Mangesh-Khairnar/department-fix
fix: open department in tree view via awesome bar
2019-06-27 15:02:57 +05:30
Anurag Mishra
804b80ac7b Merge branch 'hotfix' into wrong_Casual_Leave_opening 2019-06-27 13:48:57 +05:30
Saurabh
25eff13d35 Merge branch 'hotfix' 2019-06-27 12:51:14 +05:30
Saurabh
415c90d9d0 bumped to version 11.1.42 2019-06-27 13:21:14 +06:00
rohitwaghchaure
97a49185c5 Merge pull request #18091 from rohitwaghchaure/same_taxes_adding_multiple_times_in_pos
fix: same taxes adding multiple times in pos
2019-06-27 12:14:23 +05:30
Mangesh-Khairnar
e68d4c897b fix: open department in tree view via awesome bar 2019-06-27 11:41:17 +05:30
Anurag Mishra
76640cbad6 Merge branch 'hotfix' into wrong_Casual_Leave_opening 2019-06-27 11:20:24 +05:30
Rohit Waghchaure
c2e5e569a0 fix: same taxes adding multiple times in pos 2019-06-27 11:15:18 +05:30
rohitwaghchaure
d5384a110d Merge pull request #18084 from rohitwaghchaure/fix_test_cases_for_sales_invoice_for_dn
fix: dn test cases
2019-06-26 22:52:10 +05:30
Rohit Waghchaure
4e9f1a08fe fix: dn test cases 2019-06-26 21:57:03 +05:30
Anurag Mishra
e20e38d530 Merge branch 'hotfix' into wrong_Casual_Leave_opening 2019-06-26 18:28:59 +05:30
Saurabh
79f2779574 Merge branch 'hotfix' 2019-06-26 17:18:50 +05:30
Saurabh
23251d9e4d bumped to version 11.1.41 2019-06-26 17:48:50 +06:00
Aditya Hase
e2652b9cc5 fix(item): moving reload_doc up in item barcode patch (#18078)
fix(item): moving reload_doc up in item barcode patch
2019-06-26 17:14:37 +05:30
karthikeyan5
beca677276 fix(item): fixing broken patch item_barcode_childtable_migrate 2019-06-26 17:11:14 +05:30
Sahil Khan
1202dc1dd3 Merge branch 'hotfix' 2019-06-26 15:53:52 +05:30
Sahil Khan
e2ddc82637 bumped to version 11.1.40 2019-06-26 16:13:52 +05:50
rohitwaghchaure
f269b66f39 fix: returned qty issue while making sales invoice from dn if same item added multiple times (#18074) 2019-06-26 13:39:52 +05:30
Rushabh Mehta
850284abee Merge pull request #18073 from hrwX/att_gantt_fix
fix(Attendance): Attendance gantt view
2019-06-26 13:36:49 +05:30
Anurag Mishra
b3dec74c6a fix: removed unused function 2019-06-26 13:31:09 +05:30
Faris Ansari
a6a6171225 fix: Don't append None values in against_account (#18032) 2019-06-26 13:30:54 +05:30
Anurag Mishra
cf77740ab1 fix: wrong Casual Leave opening 2019-06-26 13:29:02 +05:30
Himanshu Warekar
836aa5a1e6 fix: attendance gantt view 2019-06-26 11:35:53 +05:30
Mangesh-Khairnar
453d484a96 fix: precision for certain calculations in buying controller (#18009)
* fix: precision for certain numbers

* fix: check precision of the received_qty

* Update buying_controller.py
2019-06-26 11:09:39 +05:30
Deepesh Garg
3957880370 fix: Removed submitted status from quotation (#18054)
* fix: Change in list view and status updater

* fix: Change status in doctype

* fix: Patch for submitted status
2019-06-26 11:06:14 +05:30
Mangesh-Khairnar
840bfa87e8 fix: change the department to tree view (#18056) 2019-06-26 11:03:36 +05:30
Karthikeyan S
b2c43ee2d9 fix(item): fix patch for barcode childtable migration in item (#18066)
* fix(item): fix patch for barcode childtable migration in item

* fix(item): fix patch for barcode childtable migration in item

> adding condition so this patch will not execute for the site where it was executed perfectly the first time
2019-06-26 11:00:17 +05:30
Nabin Hait
10878c4d0e fix: Show close button if per_ordered is less than 99.999999 (#18068) 2019-06-26 10:57:39 +05:30
Don-Leopardo
f80be2d1f4 Merge branch 'hotfix' into fix_by_voucher_order 2019-06-25 08:39:58 -03:00
rohitwaghchaure
7cb940b179 Merge pull request #18043 from rohitwaghchaure/closed_job_opening_disaplying_in_job_applicant_hotfix
fix: Closed job opening disaplying in job applicant
2019-06-25 16:51:30 +05:30
rohitwaghchaure
01c85e0420 Merge pull request #18048 from deepeshgarg007/rounded_total
fix: Currency symbol fix for rounded total
2019-06-25 16:50:45 +05:30
rohitwaghchaure
41f36a6d92 Merge pull request #18027 from adityahase/fix-remove-imports
style: Remove unused imports
2019-06-25 15:41:44 +05:30
rohitwaghchaure
2aff5384ec Merge pull request #18044 from deepeshgarg007/accounts-controller
fix: Float division by zero error handling in group similar item
2019-06-25 15:25:17 +05:30
rohitwaghchaure
e592891121 Merge pull request #18039 from Mangesh-Khairnar/price-list-fix
fix(price list): change the field name
2019-06-25 15:23:13 +05:30
Deepesh Garg
e263a10fdd Merge pull request #18051 from karthikeyan5/hotfix-woocommerce-log
fix(integrations): Adding Error Logs for Woocommerce
2019-06-25 15:11:33 +05:30
rohitwaghchaure
db8b6c59bc Merge pull request #18018 from frappe/fix_bom_include_exploded_item
fix(BOM): set default value of include_exploded_item to 0
2019-06-25 14:19:00 +05:30
sahil28297
e1f3da2c2d Merge branch 'hotfix' into fix_bom_include_exploded_item 2019-06-25 14:09:47 +05:30
karthikeyan5
ae255d6328 Fix(integrations): Adding Error Logs for Woocommerce 2019-06-25 14:01:13 +05:30
Deepesh Garg
c283329581 Merge branch 'hotfix' into accounts-controller 2019-06-25 13:15:50 +05:30
Deepesh Garg
f85e344ed4 Merge branch 'hotfix' into rounded_total 2019-06-25 13:15:33 +05:30
rohitwaghchaure
aece8056f8 Merge pull request #18041 from rohitwaghchaure/fixed_test_case_for_payment_terms_in_so_hotfix
fix: test cases for quotation
2019-06-25 06:38:55 +05:30
deepeshgarg007
5d6ccafac9 fix: Currency symbol fix for rounded total 2019-06-24 21:12:16 +05:30
Don-Leopardo
1bd60ac343 Merge branch 'hotfix' into fix_by_voucher_order 2019-06-24 11:30:19 -03:00
Rohit Waghchaure
ee22706182 fix: Closed job opening disaplying in job applicant 2019-06-24 18:04:28 +05:30
rohitwaghchaure
013ae1172a Merge pull request #17986 from rohitwaghchaure/all_default_values_not_moved_to_item_default_table
fix: as limit 100 was set in the query therefore not all item's default value moved to the Item Default table
2019-06-24 17:59:44 +05:30
deepeshgarg007
069276473f fix: Division by zero error fix in group similar item 2019-06-24 17:46:44 +05:30
Rohit Waghchaure
a8289d4fd5 fix: test case for payment terms in quotation 2019-06-24 17:45:22 +05:30
Mangesh-Khairnar
2ed653f433 fix(price list): change the field name 2019-06-24 17:29:11 +05:30
sahil28297
b724e080b0 fix(BOM): update modified field 2019-06-23 20:05:02 +05:30
Aditya Hase
9de95528ef style: Remove unused imports 2019-06-21 22:57:31 +05:30
Aditya Hase
3cab94f130 chore: Python 3 Tests on Travis (#18016)
chore: Python 3 Tests on Travis
2019-06-21 22:33:10 +05:30
Aditya Hase
b2cf38bbf4 Merge branch 'hotfix' into py3-hotfix 2019-06-21 21:36:03 +05:30
Aditya Hase
6c7bfb37c1 fix: Python 3 compatibility fixes (#18024)
fix: Python 3 compatibility fixes
2019-06-21 21:35:46 +05:30
Aditya Hase
6edd2b7f9f fix(py3): Convert filter to list 2019-06-21 17:58:45 +05:30
Aditya Hase
b47caf6642 fix(py3): Convert dict.values() to list 2019-06-21 17:56:58 +05:30
Aditya Hase
67476e7e09 fix(py3): Convert filter to list 2019-06-21 17:52:51 +05:30
Aditya Hase
3bafada5a6 fix(py3): Convert per_billed explicitly to int before comparing 2019-06-21 17:51:45 +05:30
Aditya Hase
0743610487 Merge branch 'hotfix' into py3-hotfix 2019-06-21 12:58:16 +05:30
Aditya Hase
bc7d39a16b fix: Python 3 compatibility fixes (#18019)
fix: Python 3 compatibility fixes
2019-06-21 12:57:52 +05:30
Aditya Hase
618146cc63 fix(py3): Replace unicode with six.text_type 2019-06-21 12:09:44 +05:30
Aditya Hase
4acd39b6a4 fix(py3): Convert filter to list 2019-06-21 12:08:23 +05:30
Aditya Hase
72056c26a8 fix(py3): Undefined variable 2019-06-21 12:06:05 +05:30
Aditya Hase
fbab41668d fix(py3): Undefined variable 2019-06-21 12:06:05 +05:30
Aditya Hase
14b5c96c58 fix(py3): Use range instead of xrange 2019-06-21 12:06:05 +05:30
Aditya Hase
d48d5c7cbd fix: Replace unicode with six.text_type 2019-06-21 12:06:05 +05:30
Aditya Hase
3d59ab5c55 fix(tests): Do not test order of features in Location 2019-06-21 12:06:05 +05:30
Aditya Hase
12cb0ea633 fix(tests): Timesheet tests 2019-06-21 12:06:05 +05:30
sahil28297
c5e959fe9c fix(BOM): set default value of include_exploded_item to 0 2019-06-21 11:42:58 +05:30
Aditya Hase
13d01dd690 fix: Run script with bash 2019-06-21 11:24:56 +05:30
Aditya Hase
4e94e26ef8 fix: Minor 2019-06-21 11:24:47 +05:30
Aditya Hase
8738f2e1c9 fix: Set file permissions 755 on travis/run-tests.sh 2019-06-21 11:24:39 +05:30
Aditya Hase
508b3ab8de fix(travis): Refactor .travis.yml 2019-06-21 11:24:28 +05:30
Aditya Hase
8f1f6a89f1 feat(travis): Python 3.6 tests 2019-06-21 11:24:14 +05:30
Rohit Waghchaure
523d89a2d9 fix: as limit 100 was set in the query therefore not all item's default value moved to the Item Default table 2019-06-21 10:24:08 +05:30
Rushabh Mehta
8d45d5c4a7 Merge pull request #16896 from Alchez/hotfix-shipping-override
fix(transaction): Fix shipping rule charge override by tax template
2019-06-21 09:25:14 +05:30
Rushabh Mehta
437edb1f01 Merge pull request #17391 from ashish-greycube/copy_payment_schedule_from_quot_to_SO
fix: copy_payment_schedule_from_quot_to_SO
2019-06-21 09:19:41 +05:30
Deepesh Garg
ac57edf7d3 fix: Default cost center fix for delivery note item (#17988) 2019-06-20 19:12:16 +05:30
Rushabh Mehta
3a2fec1ffb Merge pull request #17917 from Alchez/hotfix-item-code-gen
fix(stock): Remove hardcoded validation for Item
2019-06-20 14:21:46 +05:30
Himanshu
2fc2d9b8ad Merge branch 'hotfix' into patch-2 2019-06-20 00:34:47 +05:30
Deepesh Garg
e2cf17e106 Merge pull request #17994 from deepeshgarg007/hsn_summary
fix: From date and to date filters in HSN wise summary of outward supplies
2019-06-19 21:48:33 +05:30
Govind S Menokee
839b653f6b fix: lead reference changed to dynamic link #17987 2019-06-19 21:04:35 +05:30
deepeshgarg007
e5c7f3e542 fix: From date and to date filters in HSN wise summary of out ward supplies 2019-06-19 18:25:38 +05:30
rohitwaghchaure
d2bbc3ef3e Merge pull request #17966 from Alchez/fix-delivery-email
fix(delivery): Add items to context for dispatch notification email
2019-06-19 14:36:34 +05:30
rohitwaghchaure
96b6cfd810 Merge pull request #17979 from rohitwaghchaure/added_include_default_finance_book_in_reports
fix: finance book filters includes the gl data which don't have finance book
2019-06-19 14:09:35 +05:30
rohitwaghchaure
b3cf5f0caa Merge pull request #17977 from rohitwaghchaure/employee_attendance_tool_ux_issue
fix: could not find company all
2019-06-19 14:08:33 +05:30
Rohit Waghchaure
072948e827 fix: finance book filters includes the gl data which don't have finance book 2019-06-18 18:34:14 +05:30
Rohit Waghchaure
8ef80fb669 fix: could not find company all 2019-06-18 16:09:17 +05:30
Sahil Khan
4de1083096 Merge branch 'hotfix' 2019-06-18 14:41:56 +05:30
Sahil Khan
e5647f7441 bumped to version 11.1.39 2019-06-18 15:01:56 +05:50
Suraj Shetty
f9318f82ae Merge pull request #17971 from Mangesh-Khairnar/benefit-application
fix(employee-benefit-application): remove query from setup
2019-06-18 14:37:11 +05:30
rohitwaghchaure
4f78d14471 Merge pull request #17963 from rohitwaghchaure/bank_guarantee_project_not_found_error
fix: bank guarantee, not able to select the purchase order
2019-06-18 11:30:42 +05:30
rohitwaghchaure
d41771b4b1 Merge pull request #17961 from rohitwaghchaure/not_able_to_save_asset_for_manual_method
fix: not able to save asset if depreciation method is manual
2019-06-18 11:29:39 +05:30
Anurag Mishra
0c7afb389d fix: Company Filter in Total Stock Summary Report (#17973) 2019-06-17 20:48:11 +05:30
Mangesh-Khairnar
77ed46242f fix: change formatting 2019-06-17 19:04:13 +05:30
Mangesh-Khairnar
acbdeb833f fix(employee-benefit-application): remove query from setup 2019-06-17 18:08:48 +05:30
Rohit Waghchaure
2493d5e0d3 fix: bank guarantee, not able to select the purchase order 2019-06-17 17:39:37 +05:30
rohitwaghchaure
820d66b42e Merge pull request #17968 from rohitwaghchaure/enabled_disabled_buttons_on_change_of_pos_profile
fix: allow edit is enabled in the pos profile still user not able to edit the rates
2019-06-17 17:24:14 +05:30
Rohit Waghchaure
8fb018de47 fix: allow edit is enabled in the pos profile still user not able to edit the rates 2019-06-17 16:19:23 +05:30
Rohan Bansal
7987b1a681 fix(delivery): Add more context for dispatch notification email + formatting fixes 2019-06-17 16:13:52 +05:30
Rushabh Mehta
750526b138 Merge pull request #17928 from nabinhait/get-items-from
fix: Fixed setters for getting items from quotation/opportunity
2019-06-17 14:31:49 +05:30
Rohit Waghchaure
6b5c365cb6 fix: not able to save asset if depreciation method is manual 2019-06-17 13:32:36 +05:30
Rohan Bansal
61cfa275f8 fix(customer): Improve performance by reducing queries 2019-06-17 12:14:09 +05:30
rohitwaghchaure
1a5c0b3ae2 Merge pull request #17957 from rohitwaghchaure/revert_group_by_voucher_general_ledger
fix: revert group by voucher general ledger changes
2019-06-17 07:43:53 +05:30
Rohit Waghchaure
740c954679 fix: revert group by voucher general ledger changes 2019-06-17 07:40:21 +05:30
harounasow
7319bcb577 Merge branch 'hotfix' into 17902 2019-06-17 00:00:30 +02:00
Harouna Sow
3750a06d4f Merge branch '17902' of https://github.com/harounasow/erpnext into 17902 2019-06-16 23:45:19 +02:00
Harouna Sow
c79c8dae19 fix(payment entry): payment to shareholder 2019-06-16 23:42:57 +02:00
frappe user
1e4e2c81e9 fix(payment entry): payment to shareholder 2019-06-16 23:17:48 +02:00
Rohan
c8b1fbd9e6 Merge branch 'hotfix' into hotfix-item-code-gen 2019-06-14 15:53:11 +05:30
Khadija Tul Kubra Zaki
dc24fe60be fix: leave without pay spelling in salary register (#17938)
* leave without pay spelling in salary register

* fixed typo
2019-06-14 11:59:45 +05:30
Rushabh Mehta
86b33b2a10 Merge pull request #17369 from alyf-de/datev_report
feat(regional): Report for German tax consultants (DATEV)
2019-06-14 11:49:20 +05:30
Anurag Mishra
1450a7b408 fix column width (#17936) 2019-06-14 11:29:29 +05:30
rohitwaghchaure
f7af9b8745 fix: trial balance opening balance not showing in the debit side for the liability account (#17786) 2019-06-14 11:22:23 +05:30
Saurabh
87a09d2bb3 Merge pull request #17940 from nabinhait/salary-slip-amount
fix: salary slip amount calculation based on formula
2019-06-14 11:20:01 +05:30
Rushabh Mehta
c5283903be Merge pull request #17893 from deepeshgarg007/serial_no_batch_selector
fix: Available qty not shown in item batch selector for batch
2019-06-14 10:51:08 +05:30
sahil28297
cfd6ec0dcb Merge branch 'hotfix' into serial_no_batch_selector 2019-06-13 19:51:47 +05:30
Nabin Hait
a59aaf48f2 fix: salary slip amount calculation based on formula 2019-06-13 19:43:47 +05:30
Shivam Mishra
c40d832e5e Merge pull request #17934 from Anurag810/billing_summary_fixes_v11
fix: column sequence and width
2019-06-13 17:27:12 +05:30
rohitwaghchaure
23f901c29a Merge pull request #17931 from rohitwaghchaure/fixed_pos_not_overriding_the_taxes
fix: taxes are not overriding after changing the tax template for the POS invoice
2019-06-13 16:25:56 +05:30
Shivam Mishra
c06d1ec73d Merge pull request #17926 from Mangesh-Khairnar/get-bom-items-fix
fix: Check fields before making BOM items
2019-06-13 16:17:58 +05:30
Anurag Mishra
2fc6d1d210 fix: column sequence and width 2019-06-13 16:09:30 +05:30
Rohit Waghchaure
49c6c909f8 fix: taxes are not overriding after changing the taxes template 2019-06-13 15:42:13 +05:30
Rohan Bansal
334106a6d0 feat(customer): Add report to show item prices per Customer 2019-06-13 14:46:21 +05:30
Nabin Hait
ffd6b27f4b fix: Fixed setters for getting items from quotation/opportunity 2019-06-13 14:33:47 +05:30
Mangesh-Khairnar
860b6bac75 fix: get bom item when company is not passed 2019-06-13 14:28:46 +05:30
Rohan
9c3729b4ba Merge branch 'hotfix' into hotfix-item-code-gen 2019-06-13 14:23:36 +05:30
Rohan Bansal
1174e5a127 fix(stock): Remove hardcoded validation for Item 2019-06-12 17:56:17 +05:30
sahil28297
fe802a97a2 Merge branch 'hotfix' into serial_no_batch_selector 2019-06-12 13:11:32 +05:30
Francisco Roldán
eba2455ad3 Merge branch 'hotfix' into fix_by_voucher_order 2019-06-11 10:22:26 -03:00
Sahil Khan
60f1750c96 Merge branch 'hotfix' 2019-06-11 17:03:41 +05:30
Sahil Khan
6a198acd2f bumped to version 11.1.38 2019-06-11 17:23:41 +05:50
rohitwaghchaure
40968c78a8 Merge pull request #17901 from rohitwaghchaure/general_leder_report_for_group_by_voucher_consolidated
fix: group by voucher condition for the general ledger report
2019-06-11 16:17:34 +05:30
Rohit Waghchaure
e03892b130 fix: group by voucher condition for the general ledger report 2019-06-11 14:17:06 +05:30
rohitwaghchaure
844bbcdb1d Merge pull request #17898 from rohitwaghchaure/general_ledger_group_by_voucher_consolidated_issue
fix: debit and credit showing in the same row if the group by is set as group by voucher (consolidated)
2019-06-11 11:39:33 +05:30
Don-Leopardo
63267d3616 Merge branch 'hotfix' into fix_by_voucher_order 2019-06-10 17:28:17 -03:00
Nabin Hait
d77cd79262 Merge branch 'hotfix' 2019-06-10 19:16:11 +05:30
Nabin Hait
6e97f7fbd8 bumped to version 11.1.37 2019-06-10 19:36:10 +05:50
Rohit Waghchaure
de04941ddb fix: debit and credit showing in the same row if the group by is set as group by voucher (consolidated) 2019-06-10 18:31:41 +05:30
deepeshgarg007
2de80fdc3e fix: Codacy 2019-06-10 17:51:47 +05:30
Deepesh Garg
832884a7ea fix: Total Amount fix in journal entry (#17879) 2019-06-10 17:43:08 +05:30
sahil28297
4bc86c7e9d fix(patch): escape illegal characters to avoid SQL syntax error (#17889) 2019-06-10 17:38:42 +05:30
rohitwaghchaure
cd2938e2d0 fix: accounts receivable for PDC not showing 120 days column (#17892) 2019-06-10 17:38:17 +05:30
deepeshgarg007
1d11ddc235 fix: Available qty not shown in item batch selector for batch 2019-06-10 17:33:36 +05:30
rohitwaghchaure
f37a09d9fe Merge pull request #17618 from rohitwaghchaure/user_cogs_only_for_material_issue
feat: set COGS for material issue only
2019-06-10 16:56:34 +05:30
Don-Leopardo
5ed80a5ba9 Merge branch 'hotfix' into fix_by_voucher_order 2019-06-10 08:23:07 -03:00
Rohit Waghchaure
978bc1352e stock_entry: set COGS for material issue only 2019-06-07 13:34:59 +05:30
rohitwaghchaure
ab669ad055 Merge pull request #17875 from rohitwaghchaure/salary_slip_update_component_row_error
fix: Not able to save salary slip
2019-06-07 12:58:07 +05:30
Deepesh Garg
443f9ed5f1 Merge pull request #17873 from sagarvora/ewb_fix
fix(regional): remove "Generate" from button text as button now under "Make" heading
2019-06-07 12:43:23 +05:30
Rohit Waghchaure
d72f4d7959 fix: Not able to save salary slip 2019-06-07 11:44:51 +05:30
Sagar Vora
4c23c2ddec fix (regional): remove "Generate" from button text as button now under "Make" heading 2019-06-07 10:37:26 +05:30
Prasann Shah
e0333c0756 [Add] GSTIN filter in HSN summary report (#17836)
* [Add] GSTIN filter in HSN summary report

* [Add] Same filter in GST Itemised Sales Register
2019-06-06 11:22:06 +05:30
Saurabh
066ae71581 Merge pull request #17863 from adityahase/fix-error-report-email-hotfix
fix(error-report): Do not send error reports to support@erpnext.com
2019-06-06 10:36:12 +05:30
Aditya Hase
2898c94f08 fix(error-report): Do not send error reports to support@erpnext.com 2019-06-05 23:31:13 +05:30
Nabin Hait
fc0df994b8 fix: Removed unwanted total row from financial statement and general ledger print (#17859) 2019-06-05 20:29:15 +05:30
Deepesh Garg
c5a4e423c6 fix: NoneType fixes in Lab test (#17856) 2019-06-05 20:23:41 +05:30
Don-Leopardo
98e5692a40 Merge branch 'hotfix' into fix_by_voucher_order 2019-06-05 08:34:01 -03:00
Sahil Khan
949f170b48 Merge branch 'hotfix' 2019-06-05 15:15:01 +05:30
Sahil Khan
576e68eef0 bumped to version 11.1.36 2019-06-05 15:35:01 +05:50
Deepesh Garg
63af463a9a fix: Patch for renaming enquiry_from to opportunity_from (#17785)
* fix: Patch for renaming enquiry_from to opportunity_from

* fix: Patch fix

* fix: patch fix

* fix: Use has_column instead of exists

* fix: Handled ifnull
2019-06-05 14:22:59 +05:30
Rohan
b20eda9996 fix(projects): Remove hardcode of expected end date for new Tasks (#17716) 2019-06-05 14:16:57 +05:30
Nabin Hait
88832daae4 feat: Rounding based on settings on salary component (#17851) 2019-06-05 13:20:18 +05:30
rohitwaghchaure
3aa2df29f5 Merge pull request #17850 from deepeshgarg007/italy-xml
fix: Update currency in Italy e-invoice XML
2019-06-05 11:42:37 +05:30
deepeshgarg007
42d0ee7431 fix: Update Italy e-invoice XML 2019-06-05 11:12:32 +05:30
NahuelOperto
bc293cf251 fix order in general ledger 2019-06-04 08:47:09 -03:00
rohitwaghchaure
15e128f321 Merge pull request #17838 from rohitwaghchaure/fix_payment_period_based_on_invoice_date_error
fix: report Payment Period Based On Invoice Date not working
2019-06-03 20:12:01 +05:30
Rohit Waghchaure
56757866f3 fix: report Payment Period Based On Invoice Date not working 2019-06-03 18:20:46 +05:30
Nabin Hait
c3f3c156b1 Merge pull request #17834 from deepeshgarg007/serial-no-fix
fix: Serial no filtering issue for delivered items
2019-06-03 14:25:17 +05:30
Nabin Hait
62e8955b39 Merge pull request #17806 from nabinhait/discount-rounding-adjustment
fix: Rounding adjustment while additional discount amount is applied on grand total
2019-06-03 13:08:57 +05:30
deepeshgarg007
fad3789f64 fix: Pass delivery document no as empty string 2019-06-03 13:04:57 +05:30
deepeshgarg007
a0b85d060b fix: Serial no filtering issue for delivered items 2019-06-03 11:57:00 +05:30
Saurabh
fd5d3f551b Merge pull request #17808 from Alchez/hotfix-sales-analytics-total
fix(selling): Remove Totals row for Sales Analytics
2019-05-31 14:28:10 +05:30
Saurabh
019014070d Merge pull request #17810 from nabinhait/pr-expense-account
fix: Added Expense Account field to push value from PO-PR-PI
2019-05-31 14:18:33 +05:30
Saurabh
97f5dff656 Merge pull request #17812 from rohitwaghchaure/allow_import_for_packing_slip
fix: allow import for packing slip
2019-05-31 14:15:16 +05:30
Deepesh Garg
0d28802485 Merge pull request #17815 from deepeshgarg007/ar_translation
fix: Add translations for missing labels in AR report
2019-05-31 12:37:18 +05:30
Saurabh
254774f7a3 Merge pull request #17817 from rohitwaghchaure/fixed_pos_cash_payment_modal
fix: POS cash mode of payment css
2019-05-31 12:28:53 +05:30
Rohit Waghchaure
6f1e624465 fix: POS cash mode of payment css 2019-05-30 23:19:55 +05:30
deepeshgarg007
2dcd03d17d fix: Label translations 2019-05-30 22:33:02 +05:30
deepeshgarg007
ffcb7aa6ed fix: Add translations for missing labels in AR report 2019-05-30 22:26:52 +05:30
Rohit Waghchaure
9350b5a533 fix: allow import for packing slip 2019-05-30 21:52:13 +05:30
Nabin Hait
8cb2c7a89c fix: Set query for expense account in PO and PR 2019-05-30 18:13:11 +05:30
Nabin Hait
50bdaa6d1a fix: Added Expense Account field to push value from PO-PR-PI 2019-05-30 18:08:22 +05:30
Rohan Bansal
20a4cf1290 fix(selling): Remove Totals row for tree-based Sales Analytics 2019-05-30 17:24:19 +05:30
Suraj Shetty
fc092d0df4 Merge pull request #17807 from deepeshgarg007/gstr-1-condition-fix
fix: GSTR-1 report B2B condition fix
2019-05-30 17:24:04 +05:30
Rushabh Mehta
51bb2909c3 Merge pull request #17790 from deepeshgarg007/customer_lead_dashboard
fix: Customer and Lead dashboard fixes for opportunity and quotation
2019-05-30 17:21:25 +05:30
Suraj Shetty
cab0cd55b3 Merge branch 'hotfix' into gstr-1-condition-fix 2019-05-30 16:38:45 +05:30
deepeshgarg007
4f579639c6 fix: Use AND instead of OR 2019-05-30 16:26:38 +05:30
Nabin Hait
c5b68ef386 fix: Rounding adjustment while additional discount amount is aplied on grand total 2019-05-30 16:05:03 +05:30
deepeshgarg007
95dc4e4dc5 fix: Use make methods to override 2019-05-30 15:28:15 +05:30
Sahil Khan
dc35138356 Merge branch 'hotfix' 2019-05-30 12:09:35 +05:30
Sahil Khan
08617f7700 bumped to version 11.1.35 2019-05-30 12:29:35 +05:50
Anurag Mishra
cfecf3c5b1 fix: Added description if item variants does not have description in map (#17795)
* fix: variant item description based on attribute

* fix: requested changes

* fix: refactor
2019-05-29 17:16:48 +05:30
Shivam Mishra
831100b657 Merge pull request #17792 from adityahase/remove-manifest-hotfix
perf: Remove MANIFEST.in
2019-05-29 15:31:26 +05:30
Aditya Hase
f296a2f58a perf: Remove MANIFEST.in
Faster pip install -e erpnext

https://stackoverflow.com/questions/24727709/do-python-projects-need-a-manifest-in-and-what-should-be-in-it

https://github.com/frappe/frappe/pull/7360
2019-05-29 15:15:05 +05:30
deepeshgarg007
18a0120fc1 fix: Customer and Lead dashboard fixes for opportunity and quotation 2019-05-29 14:20:24 +05:30
Nabin Hait
aae557e8a1 Merge pull request #17779 from sunnyakaxd/patch-1
fix (performance): Dont fetch all orders to update a few
2019-05-29 10:04:37 +05:30
Nabin Hait
0f92c4b85b Merge pull request #17778 from deepeshgarg007/lead_owner
fix: Lead owner efficiency report query and column fixes
2019-05-29 09:57:08 +05:30
deepeshgarg007
217df1761d fix: Styling fixes 2019-05-29 08:10:07 +05:30
Himanshu Mishra
d355741462 Python 2 compatibility -_- 2019-05-28 23:54:03 +05:30
Himanshu Mishra
7b6ed4f16e Update status_updater.py 2019-05-28 23:51:22 +05:30
deepeshgarg007
c5a682e9d9 fix: Lead owner efficiency report query and column fixes 2019-05-28 23:40:05 +05:30
Sahil Khan
b4fa105555 Merge branch 'hotfix' 2019-05-28 14:50:05 +05:30
Sahil Khan
e1aef6f0db bumped to version 11.1.34 2019-05-28 15:10:05 +05:50
Nabin Hait
6f35d2b52d Merge pull request #17764 from nabinhait/salary-slip-tax-calc
fix: Tax calculation on salary slip
2019-05-28 11:16:40 +05:30
rohitwaghchaure
197f57c050 Merge pull request #17766 from rohitwaghchaure/renamed_delayed_item_report
fix: rename delayed order item report
2019-05-27 19:33:41 +05:30
Rohit Waghchaure
c74fa7546b fix: rename delayed order item report 2019-05-27 19:32:43 +05:30
Raffael Meyer
0261472ecd add default filters 2019-05-27 16:01:05 +02:00
Nabin Hait
233ef8752d Merge pull request #17550 from dimanex/bugfix/17547-Pricing-Rules-are-broken
Pricing Rules are not queried correctly after removing 'customer' and adding 'party_name' in Quotation #17547
2019-05-27 19:24:24 +05:30
Nabin Hait
afd9e7546f Merge branch 'hotfix' into bugfix/17547-Pricing-Rules-are-broken 2019-05-27 19:22:34 +05:30
Nabin Hait
8b1532d691 Merge pull request #17758 from saurabh6790/custom_field_fix_hotfix
fix: add shopify_supplier_id custom field while setting up shopify
2019-05-27 19:12:16 +05:30
Nabin Hait
a887c29e06 Merge pull request #17760 from nabinhait/multi-fixes99
fix: Error due to merging of lead/customer to party_name
2019-05-27 19:11:01 +05:30
Nabin Hait
7114b72be8 fix: Tax calculation on salary slip 2019-05-27 18:42:20 +05:30
Raffael Meyer
1c1a5958bc more pleasant icon color 2019-05-27 15:05:32 +02:00
Raffael Meyer
b7b5bcbd85 fix: em dash cannot be encoded in latin-1 2019-05-27 15:05:08 +02:00
Raffael Meyer
9638f0ef2b Add columns to CSV, add comments and docstrings 2019-05-27 14:42:52 +02:00
Nabin Hait
92ab345daf Merge pull request #17018 from chdecultot/fec_improvement
fix: Addition of third party types in FEC
2019-05-27 17:18:42 +05:30
Nabin Hait
79dd4d707b fix: Error fixed due to merging of lead/customer to party_name 2019-05-27 15:44:12 +05:30
Nabin Hait
a3a733fa91 fix: error because of non-mandatory fields 2019-05-27 15:43:26 +05:30
Nabin Hait
7a9b014f72 fix: Made item code non-mandatory in item 2019-05-27 15:41:06 +05:30
Saurabh
61b4a98356 fix: add shopify_supplier_id custom field while setting up shopify 2019-05-27 15:25:47 +05:30
Don-Leopardo
46db69b304 fix: Make from Lead to Opportunity (#17727)
* fix: lead to oportunity error

* fix: one more missmatched field
2019-05-27 14:22:52 +05:30
Joe Paul
a0be41322d fix(subscription): Remove property decorator (#17395) 2019-05-27 14:11:52 +05:30
Nabin Hait
39d30718e2 Merge branch 'hotfix' into copy_payment_schedule_from_quot_to_SO 2019-05-27 14:10:07 +05:30
Saif
05f29988f4 fix: Status updater for Credit/Debit Note Issued (#16998)
* fix: Status updater for Credit/Debit Note Issued higher precendence than Return

* style: linting
2019-05-27 14:05:14 +05:30
Deepesh Garg
d7903de51c fix: Do not fetch batch items and serialized items in stock reconciliation (#17726) 2019-05-27 13:41:58 +05:30
Kenneth Sequeira
0e31cc9ff8 improve error message (#17745)
Change ```Allocated amount can not greater than unadjusted amount```  to ```Allocated amount cannot be greater than unadjusted amount```

```Allocated amount can not be negative``` to ```Allocated amount cannot be negative```
2019-05-27 13:40:40 +05:30
rohitwaghchaure
32280a11aa fix: customer item code not fetched on selection of the item in the sales order (#17755) 2019-05-27 13:32:44 +05:30
Anurag Mishra
a2f9d2f89c fix: holidays was showing on same date in calendar view (#17753) 2019-05-27 13:20:06 +05:30
Nabin Hait
5fc5355b96 fix: Opening accounting entry for stock entry (#17710)
* fix: Opening accounting entry for stock entry

* test: Add test case for opening stock entry gle

* fix: validate expense account for opening stock entry

* fix: validate expense account for opening stock reco
2019-05-27 11:50:08 +05:30
Deepesh Garg
30c73e6b35 fix: Only show registered customers for GSTR-1 B2B Report (#17719) 2019-05-27 11:48:40 +05:30
Nabin Hait
7a6b88c791 fix: payment reconciliation against expense claim (#17728)
* feat: Added dashboard in expense claim

* fix: payment reconciliation against expense claim
2019-05-27 11:41:05 +05:30
rohitwaghchaure
9c42124fbc Merge pull request #17720 from rohitwaghchaure/reverting_method_to_show_stock_value
fix: warehouse tree view taking lot of time to load
2019-05-23 16:36:34 +05:30
Rohit Waghchaure
0378b15412 fix: warehouse tree view taking lot of time to load 2019-05-23 16:34:32 +05:30
rohitwaghchaure
3f86369604 fix: range 4 for ageing filter added in the AP/AR report (#17714) 2019-05-23 15:27:17 +05:30
rohitwaghchaure
cc99d92116 Merge pull request #17705 from rohitwaghchaure/not_able_to_submit_sales_invoice
fix: not able to submit sales invoice
2019-05-22 22:31:37 +05:30
Rohit Waghchaure
f880975438 fix: not able to submit sales invoice for italy 2019-05-22 22:30:26 +05:30
Saurabh
daa8db4d95 Merge branch 'hotfix' 2019-05-22 22:24:17 +05:30
Saurabh
9ff39e2d1b bumped to version 11.1.33 2019-05-22 22:54:17 +06:00
Saurabh
9d70c5d13f Merge pull request #17704 from rohitwaghchaure/typo_pos_not_working
fix: typo
2019-05-22 22:21:51 +05:30
Rohit Waghchaure
a9a82919e7 fix: typo 2019-05-22 22:15:01 +05:30
Sahil Khan
723ed07642 Merge branch 'hotfix' 2019-05-22 15:54:26 +05:30
Sahil Khan
86b531aea6 bumped to version 11.1.32 2019-05-22 16:14:26 +05:50
rohitwaghchaure
781a420593 Merge pull request #17702 from rohitwaghchaure/not_able_to_submit_sales_invoice_italy_localization
fix: italy localization, not able to submit sales invoice
2019-05-22 15:48:12 +05:30
Rohit Waghchaure
08f709c2a2 fix: italy localization, not able to submit sales invoice 2019-05-22 15:28:47 +05:30
Nabin Hait
a849f6e21e fix: update received qty in PO from PR and PI (#17692)
* fix: Don't set reqd date in PO based on MR, if less than today

* fix: update received qty in PO from PR

* fix: po status

* fix: set schedule date from MR to PO
2019-05-22 15:05:17 +05:30
rohitwaghchaure
6ff8387d56 Merge pull request #17679 from Anurag810/revert_change
fix(Revert): sales order status for order type 'Maintenance
2019-05-22 14:47:47 +05:30
rohitwaghchaure
2af9ff9c33 Merge pull request #17699 from rohitwaghchaure/italian_localization_issue_for_invoices
fix: removed translation for customer type and tax charge type
2019-05-22 13:21:20 +05:30
Rohit Waghchaure
01905cad2f fix: removed translation for customer type and tax charge type 2019-05-22 13:17:46 +05:30
Raffael Meyer
31f5055287 fix sql for multi-company case 2019-05-22 00:03:16 +02:00
Raffael Meyer
ce9239af83 fix error when downloading empty report 2019-05-21 22:49:59 +02:00
Raffael Meyer
50de88417c fix filename 2019-05-21 21:59:04 +02:00
Raffael Meyer
2701f94491 add remarks and voucher info 2019-05-21 21:58:35 +02:00
Anurag Mishra
58260e4f0a Merge branch 'hotfix' into revert_change 2019-05-21 16:52:01 +05:30
Anurag Mishra
a01869bb20 style: refactor 2019-05-21 16:50:20 +05:30
Anurag Mishra
3a92615f23 Merge branch 'revert_change' of https://github.com/anurag810/erpnext into revert_change 2019-05-21 14:15:58 +05:30
Sahil Khan
eca8db7405 Merge branch 'hotfix' 2019-05-21 14:11:08 +05:30
Sahil Khan
58c4cfc0d7 bumped to version 11.1.31 2019-05-21 14:31:08 +05:50
Anurag Mishra
ab52a4db75 fix: refactor sales_order_list.js 2019-05-21 13:09:47 +05:30
Saurabh
c8d3a8c0f5 Merge pull request #17686 from rohitwaghchaure/set_default_warehouse_from_the_stock_settings
fix: while making the item, default warehouse not set even if the stock settings has the default warehouse
2019-05-21 12:52:51 +05:30
rohitwaghchaure
aab88eee3e Merge pull request #17644 from nabinhait/bom-item-rate
fix: BOM Item rate based on uom conversion factor and exchange rate
2019-05-21 12:25:19 +05:30
Rushabh Mehta
d9f4c83567 Merge pull request #17539 from adityahase/fix-training-feedback-hotfix
fix(hr): Use event_status instead of status
2019-05-21 12:20:29 +05:30
Rushabh Mehta
b96dd366ce Merge pull request #17641 from nabinhait/gle-opening-stock-reco
fix: GL Entry for opening stock reconciliation
2019-05-21 12:17:04 +05:30
rohitwaghchaure
597ec83af7 Merge pull request #17684 from rohitwaghchaure/item_group_not_disaplying_in_website
fix: item group not disaplying in the website if shopping cart is disabled
2019-05-21 12:15:39 +05:30
Rohit Waghchaure
e802bdd186 fix: while making the item, default warehouse not set even if the stock settings has the warehouse 2019-05-21 12:11:40 +05:30
Rohit Waghchaure
3a949bb298 fix: item group not disaplying in the website if shopping cart is disabled 2019-05-21 10:18:39 +05:30
Raffael Meyer
13c9d041d9 Merge branch 'hotfix' of https://github.com/frappe/erpnext into datev_report 2019-05-21 00:33:45 +02:00
rohitwaghchaure
1e920dd0d8 Merge pull request #17681 from rohitwaghchaure/expense_claim_reconciliation_issue
fix: payment reconciliation not update the status of the expense claim
2019-05-20 22:41:48 +05:30
Rohit Waghchaure
09536f402e fix: payment reconciliation not update the status of the expense claim 2019-05-20 17:01:22 +05:30
Anurag Mishra
581f26b7a0 Merge branch 'hotfix' into revert_change 2019-05-20 16:22:20 +05:30
Deepesh Garg
0418a2f70a Merge pull request #17677 from rohitwaghchaure/show_opening_entries_gl_report
feat: added checkbox in the filter of general ledger to show opening entries
2019-05-20 15:21:28 +05:30
Saurabh
5e3338744c Merge pull request #17675 from nabinhait/lead-from-email
fix: Person / Org name is not mandatory while creation of lead from email
2019-05-20 14:57:16 +05:30
Anurag Mishra
da3762700c fix(Revert): sales order status for order type 'Maintenance 2019-05-20 12:38:33 +05:30
Rohit Waghchaure
2c9fccd8ba feat: added checkbox in the filter of general ledger to show opening entries 2019-05-20 12:25:53 +05:30
Nabin Hait
286c4fa640 fix: Person / Org name is not mandatory while creation of lead from email 2019-05-20 12:16:34 +05:30
Deepesh Garg
a144e002db Merge pull request #17667 from deepeshgarg007/quotation-qty-fix
fix: Quotation to lead fix while changing item qty
2019-05-18 23:38:24 +05:30
deepeshgarg007
553dabaa08 fix: Pricing rule fix for lead 2019-05-18 21:31:58 +05:30
Anurag Mishra
55d0d32c77 fix: Allow return if delivery note or sales order is required in selling settings(v11) (#17632)
* fix: Allow retrun if delivery note or sales order is required in selling settings

* fix: combined condition

* style: refactor
2019-05-18 13:02:31 +05:30
Deepesh Garg
1f93745eef Merge pull request #17663 from deepeshgarg007/opportunity-list-fixes
fix: Opportunity List view fix
2019-05-17 19:36:08 +05:30
deepeshgarg007
e3a02dd5f6 Merge branch 'hotfix' of https://github.com/frappe/erpnext into opportunity-list-fixes 2019-05-17 19:11:13 +05:30
deepeshgarg007
153733414f fix: Opportunity List view fix 2019-05-17 19:08:24 +05:30
Deepesh Garg
ac535f0ce9 Merge pull request #17661 from deepeshgarg007/quotation_lead_fixes
fix: Quotation to lead fix
2019-05-17 18:35:49 +05:30
deepeshgarg007
3886529787 fix: Get lead details only if lead name entered 2019-05-17 18:10:13 +05:30
Deepesh Garg
d2cd713b89 Merge pull request #17657 from deepeshgarg007/territory_item_code_hotfix
fix: Inactive Sales Item report fixes
2019-05-17 15:41:50 +05:30
Deepesh Garg
6b378e1669 fix: Unable to create item variant based on manufacturer (#17651)
* fix: Unable to create item variant against manufacturer

* fix: Spacing fixes

* fix: Spacing fixes in item.js
2019-05-17 15:39:59 +05:30
deepeshgarg007
a4fc30bbe4 fix: Inactive Sales Item report fixes 2019-05-17 15:39:23 +05:30
rohitwaghchaure
b4b0e4424d Merge pull request #17655 from rohitwaghchaure/not_able_to_make_si_from_dn
fix: not able to make si from dn
2019-05-17 15:29:04 +05:30
Rohit Waghchaure
f3bdcc2a84 fix: not able to make si from dn 2019-05-17 15:28:12 +05:30
Nabin Hait
19901c14c9 fix: Removed unused variable 2019-05-17 14:30:45 +05:30
Deepesh Garg
714d686e50 Merge pull request #17650 from deepeshgarg007/gstr2_fix
fix: GSTR 2 report fix
2019-05-17 11:24:44 +05:30
rohitwaghchaure
094dc1dee6 Merge pull request #17646 from rohitwaghchaure/fixed_bank_reco_internal_transfer
fix: bank reconciliation for internal transfer is not working
2019-05-17 11:20:43 +05:30
deepeshgarg007
cdcf424ba5 Merge branch 'hotfix' of https://github.com/frappe/erpnext into gstr2_fix 2019-05-17 10:30:39 +05:30
deepeshgarg007
2a2b884e32 fix: Return taxable value in get_row_data_for_invoice 2019-05-17 10:20:14 +05:30
Rohit Waghchaure
c1e00f4daa fix: bank reconciliation for internal transfer is not working 2019-05-17 00:01:21 +05:30
Rohan
0a22aab6bb fix(tests): Save batch instead of submitting it (#17636) 2019-05-16 19:45:11 +05:30
Nabin Hait
43c6d1a518 fix: Gte lead details in opportunity (#17633) 2019-05-16 19:35:27 +05:30
Nabin Hait
090219814e fix: BOM Item rate based on uom conversion factor and exchange rate 2019-05-16 19:17:02 +05:30
Nabin Hait
510dc60bf0 fix: GL Entry for opening stock reconciliation 2019-05-16 17:28:39 +05:30
Saurabh
12d520a366 Merge pull request #17562 from fproldan/fix_bundlestock
fix: Available Stock for Packing Items error
2019-05-16 15:40:02 +05:30
Saurabh
a06a527fe6 Merge pull request #17629 from nabinhait/multi-fixes-33
fix: Multiple small fixes
2019-05-16 15:39:31 +05:30
Rushabh Mehta
9a7681535f Merge pull request #17634 from nabinhait/add-multiple-items
feat: Added 'Add Multiple' options in all sales / purchase transactions
2019-05-16 14:56:44 +05:30
Nabin Hait
8e1a612b3b feat: Added 'Add Multiple' options in all sales / purchase transactions 2019-05-16 14:48:10 +05:30
Deepesh Garg
21085bf2be fix: Query fixes in quotation and opportunity (#17619)
* fix: Query fixes for contact person and minor fixes

* fix: Change quotation to quotation_to
2019-05-16 14:11:21 +05:30
Anurag Mishra
8e9413829d fix: variant item description based on attribute (#17627)
* fix: variant item description based on attribute

* fix: requested changes

* style: removed print
2019-05-16 13:57:35 +05:30
Nabin Hait
8208f878ff fix: show tasks in project order by due date and status 2019-05-16 13:43:08 +05:30
Nabin Hait
a7130649cd fix: Get bank account on selection of payment mode in Loan 2019-05-16 13:43:07 +05:30
Nabin Hait
b2d9ffa4ca fix: To allow creation of sales invoice without customer 2019-05-16 13:43:07 +05:30
Himanshu
cc4f13a862 validate: check additional salary component exists (#17530) 2019-05-16 10:34:46 +05:30
Saurabh
60681baf80 Merge branch 'hotfix' into fix_bundlestock 2019-05-15 15:28:58 +05:30
Saurabh
ea6049078a Merge pull request #17620 from rohitwaghchaure/auto_set_the_barcode_if_item_has_one_barcode
fix: set barcode on selection of item if item has one barcode
2019-05-15 15:09:51 +05:30
Rohit Waghchaure
d83e8c56b2 fix: set barcode on selection of item if item has one barcode 2019-05-15 14:10:10 +05:30
Deepesh Garg
e0ade62e38 fix: Status updater fixes in PO and SO and test coverage for return (#17490)
* fix: Status updator fixes in sales and purchase cycle

* fix: Test cases for return in so and po
2019-05-15 12:18:12 +05:30
bghayad
c78b921412 Fix for Chart of Account sorting problem (#17563)
* First Commit from Master

* Fix for CoA sorting problem

* Fixing for CoA sorting problem

* Fix for Chart of Account Sorting Problem
2019-05-15 11:58:59 +05:30
Palash Jhabak
9e9e415c5f fix: Cancelled Lab Tests shouldnt show in SI (#17616)
Cancelled Lab Tests were also showing up in Get Items of SI

fixes issue #17607
2019-05-15 11:37:31 +05:30
Saurabh
0692e5eb78 Merge branch 'hotfix' 2019-05-15 08:07:29 +05:30
Saurabh
3fa5eec07b bumped to version 11.1.30 2019-05-15 08:37:29 +06:00
rohitwaghchaure
ab1bf1af19 fix: not able to create the sales invoice without item code (#17610) 2019-05-15 07:45:47 +05:30
sahil28297
15e0861e82 fix(patch): set attribute to none if it does not exist (#17605) 2019-05-15 07:44:45 +05:30
Prasad Ramesh
aa493a25f8 fix: made Sales Partner Comission report visible in Selling module (#17604) 2019-05-15 07:43:39 +05:30
Saurabh
1c2915f74b fix: reload docs before creating custom fields (#17585) 2019-05-15 07:43:16 +05:30
rohitwaghchaure
391b3b67cb fix: limit offset was missing in the get_delivery_notes_to_be_billed method (#17609) 2019-05-15 07:41:10 +05:30
Nabin Hait
0361c50503 refactor: Payroll processing and tax calculation (#17595)
* refactor: Payroll processing and tax calculation

* fix: payroll test cases

* fix: Codacy fixes

* fix: removed debug mode

* fix: payroll test cases

* Update payroll_period.py
2019-05-15 07:38:57 +05:30
Sahil Khan
517a3071cf Merge branch 'hotfix' 2019-05-14 16:48:26 +05:30
Sahil Khan
0e30e705c5 bumped to version 11.1.29 2019-05-14 17:08:26 +05:50
Deepesh Garg
940df7563b Merge pull request #17575 from deepeshgarg007/quotation-filter-fixes
fix: Standard filter and dashboard fixes in quotation and opportunity
2019-05-14 15:10:41 +05:30
deepeshgarg007
f390872944 Merge branch 'hotfix' of https://github.com/frappe/erpnext into quotation-filter-fixes 2019-05-14 14:58:22 +05:30
deepeshgarg007
cfd18d4e03 fix: Lead and customer dashboard fixes 2019-05-14 14:57:22 +05:30
Deepesh Garg
6c73439e7f Merge pull request #17598 from deepeshgarg007/lead-fixes
fix: Change lead to party_name in Lead
2019-05-14 14:41:49 +05:30
deepeshgarg007
2389e2c438 fix: Change lead to party_name 2019-05-14 14:40:18 +05:30
Deepesh Garg
c2341ca8e3 Merge pull request #17596 from deepeshgarg007/territory_group_fixes_hotfix
fix: Make territory filter mandatory
2019-05-14 14:35:26 +05:30
deepeshgarg007
3b810ea8da fix: Make territory filter mandatory 2019-05-14 14:32:36 +05:30
Deepesh Garg
f85d6aeecd Merge pull request #17589 from deepeshgarg007/inactive_items_row_hotfix
fix: Do not append row if item is sold within days since last ordered
2019-05-14 11:56:41 +05:30
rohitwaghchaure
a13762b05f Merge pull request #17581 from saurabh6790/quoation_creation_fix
fix: validate customer while pulling information
2019-05-14 11:51:15 +05:30
rohitwaghchaure
dd5a0a1f26 Merge pull request #17545 from rohitwaghchaure/incorrect_payment_amount_if_advance_amount_in_si
fix: incorrect payment amount in the payment terms if the sales invoice has the advance amount
2019-05-14 11:14:55 +05:30
deepeshgarg007
a6ad0b0ec8 fix: Do not append row if item is sold within days since last order 2019-05-14 08:49:24 +05:30
Saurabh
077e20f7ae fix: valiadte customer while pulling information 2019-05-13 15:21:25 +05:30
Saurabh
73c6d2e44c Merge pull request #17555 from Alchez/hotfix-lead-import-fix
feat(crm): Allow leads to be imported without person name
2019-05-13 13:07:04 +05:30
Saurabh
d7a13ceb10 Merge pull request #17568 from Mangesh-Khairnar/event-fix
feat(training-event): validate event period
2019-05-13 13:06:17 +05:30
Saurabh
6eadd6657d Merge pull request #17574 from rohitwaghchaure/delayed_orders_summary_report
feat: delayed order summary report
2019-05-13 13:05:40 +05:30
Saurabh
0c890a110d Merge branch 'hotfix' into hotfix-lead-import-fix 2019-05-13 12:07:33 +05:30
Saurabh
0f420baaba Merge branch 'hotfix' into event-fix 2019-05-13 11:46:29 +05:30
Aditya Hase
b32d96fc24 fix(accounts): Add missing field (#17571) 2019-05-13 10:21:41 +05:30
Suraj Shetty
cfc9e18749 Merge pull request #17532 from surajshetty3416/fix-rename-account
fix: Show "Merge Account" button only to users with write access
2019-05-13 10:03:16 +05:30
Rohan
7178218821 Merge branch 'hotfix' into hotfix-shipping-override 2019-05-12 22:28:45 +05:30
Deepesh Garg
25d6d08329 Merge pull request #17576 from deepeshgarg007/territory_items_hotfix
fix: Show all territories and items in inactive sales item report
2019-05-12 20:44:06 +05:30
Deepesh Garg
9bf4c754c8 Merge branch 'hotfix' into territory_items_hotfix 2019-05-12 18:40:54 +05:30
deepeshgarg007
79b02db156 fix: Indentation fixes 2019-05-12 18:27:52 +05:30
Rohit Waghchaure
e55dd7233d feat: delayed order summary report 2019-05-12 17:17:55 +05:30
rohitwaghchaure
3ba969ad58 Merge pull request #17573 from adityahase/fix-lead-make-quotation
fix(lead): Map lead name to quotation party_name
2019-05-12 17:10:14 +05:30
rohitwaghchaure
f93cb0a6ba Merge pull request #17567 from rohitwaghchaure/fixed_multiple_bank_reconciliation_issues
fix: fixed multiple bank reconciliation issues
2019-05-12 17:04:58 +05:30
Aditya Hase
e23cfd22ca fix(lead): Map lead name to quotation party_name 2019-05-12 16:20:31 +05:30
Raffael Meyer
9eef60754d remove unused import 2019-05-12 02:24:39 +02:00
Mangesh-Khairnar
0d1b022ea0 feat(training-event): validate event period 2019-05-11 23:30:52 +05:30
deepeshgarg007
aca3772f7d fix: Show all territories and items in inactive sales item report 2019-05-11 21:12:51 +05:30
deepeshgarg007
569815b5ad fix: Standard filter and dashboard fixes in quotation and opportunity 2019-05-11 20:09:29 +05:30
Rohit Waghchaure
80b696ce25 fix: wrong journal entries are showing in the reconcilliation section 2019-05-11 14:58:25 +05:30
rohitwaghchaure
ab7570b7e5 Merge pull request #17558 from rohitwaghchaure/incorrect_stock_balance_showing_in
fix: incorrect stock balance showing in the warehouse tree view
2019-05-11 11:30:24 +05:30
NahuelOperto
c87f8c6f00 fix codecay 2019-05-10 10:46:41 -03:00
Rohit Waghchaure
c5c4de885b fix: bank reconciliation not showing as Settled instead of Reconciled 2019-05-10 19:08:41 +05:30
NahuelOperto
a970bcc56d fix identation 2019-05-10 09:17:52 -03:00
NahuelOperto
5e2d822509 fix error when the product bundle does not have the original item name 2019-05-10 09:00:46 -03:00
Rohit Waghchaure
6be1475882 fix: incorrect stock balance showing in the warehouse tree view 2019-05-10 17:19:50 +05:30
Rohan Bansal
43f05d1de1 feat(crm): Allow leads to be imported without person name 2019-05-10 16:03:16 +05:30
rohitwaghchaure
26bb028ec4 Merge pull request #17549 from sunhoww/pos_batch
fix: POS batch not set correctly
2019-05-10 14:14:44 +05:30
Rohit Waghchaure
1637f0aeaf fix: test cases 2019-05-10 13:42:38 +05:30
Saurabh
353f64caf8 Merge pull request #17541 from rohitwaghchaure/project_update_statue_emails_sending_frequestly
fix: project update status emails are sent frequently
2019-05-10 13:24:24 +05:30
Saurabh
5afb00a7f4 Merge branch 'hotfix' into fix-rename-account 2019-05-10 12:40:00 +05:30
Saurabh
b0ec0f545e Merge pull request #17540 from surajshetty3416/fix-slow-item-search
perf: Index show_in_website field for faster item search
2019-05-10 12:38:06 +05:30
rohitwaghchaure
7088513da9 Update project.py 2019-05-10 12:04:21 +05:30
Mohammad Noureldin
8908d4ee8f 17547:
- Filling in 'customer' arg field if not already set and if 'party_name' is available
- This will fix the logic during which Pricing Rule is constructing the SQL query to list all Pricing Rules related to an item
- The reason to put it in accounts_controller is:
-# This is the palce when args are made before making call which will end using Pricing Rule logic, which means we don't have to go all over the place to add the proper arg field
-# IMHO, it is clean enough in contrast to the case where that code is added to pricing_rule.py for example, cause doing this exposes Pricing Rule to the knowledge about a field called 'party_name' while a Pricing Rule document doesn't have any
2019-05-09 18:21:32 +02:00
Sun Howwrongbum
8133970944 fix: POS batch not set correctly 2019-05-09 20:45:19 +05:30
Rohit Waghchaure
dac7ede911 fix: incorrect payment amount in the payment terms if the sales invoice has the advance amount 2019-05-09 19:50:00 +05:30
Rohit Waghchaure
b052498348 fix: project update status emails sent frequently 2019-05-09 19:04:58 +05:30
Aditya Hase
d62de6c8e5 fix(hr): Use event_status instead of status
Training Feedback DocType has event_status field (not status)
This was broken since PR #10379, PR #17197 made this failure explicit.
2019-05-09 19:01:00 +05:30
Suraj Shetty
d37cc9a5d0 perf: Index show_in_website field for faster item search 2019-05-09 18:49:57 +05:30
Suraj Shetty
c7062d8be7 fix: Check permissions before renaming the account 2019-05-09 14:18:41 +05:30
Suraj Shetty
1435e30ad5 fix: Show "Merge Account" button only to users with write access 2019-05-09 14:16:49 +05:30
Raffael Meyer
3799aabc46 Merge branch 'hotfix' of https://github.com/frappe/erpnext into datev_report 2019-05-09 04:04:33 +02:00
Raffael Meyer
4b2901704c Add download button 2019-05-09 04:03:23 +02:00
Raffael Meyer
e5f7af9e9f Use pandas, more columns, filter by date 2019-05-09 03:54:49 +02:00
Anurag Mishra
6fc136fcb8 Merge branch 'hotfix' into copy_payment_schedule_from_quot_to_SO 2019-05-08 23:07:31 +05:30
rohitwaghchaure
b2ff0bda32 Merge pull request #17526 from rohitwaghchaure/allow_data_import_for_salary_slip
fix: allow data import for salary slip
2019-05-08 22:20:20 +05:30
Rohit Waghchaure
ff42d7b5ed fix: allow data import for salary slip 2019-05-08 20:17:47 +05:30
Anurag Mishra
35a4cae2f6 feat: Adding action Stop or Warn for Quality inspection if it is not submitted
* feat: added action on quality inspection

* feat: added action on quality inspection

* feat: Allow the user to by pass inspection if action is warn ad stop when action is to warn

* patch: for setting default action to 'Stop'

* fix: resolve conflicts

* fix: travis

* Update stock_controller.py
2019-05-08 17:41:04 +05:30
rohitwaghchaure
a76cafecb0 Merge pull request #17521 from rohitwaghchaure/fixed_get_invoiced_item_gross_margin
fix: get totals of gross profit amount on call of the method get_invoiced_item_gross_margin
2019-05-08 16:17:11 +05:30
rohitwaghchaure
715ecc31c8 Merge pull request #17519 from rohitwaghchaure/added_validation_for_stock_entry_purpose
fix: job card issue, added validation in the stock entry
2019-05-08 16:16:39 +05:30
deepeshgarg007
09145674ec bumped to version 11.1.28 2019-05-08 15:58:50 +05:50
Rohit Waghchaure
11eebddb79 fix: get totals of gross profit amount on call of the method get_invoiced_item_gross_margin 2019-05-08 15:31:29 +05:30
Rohit Waghchaure
7d7417af29 fix: job card issue, added validation in the stock entry 2019-05-08 15:07:31 +05:30
rohitwaghchaure
6edb6e0b09 Merge pull request #17506 from Anurag810/rename_column
fix: renamed column avg. buying rate to valuation rate in gross profit report
2019-05-08 14:34:14 +05:30
rohitwaghchaure
e057575661 Merge pull request #17518 from rohitwaghchaure/customer_not_able_to_save
fix: not able to save customer if contribution is not set
2019-05-08 14:33:44 +05:30
Rohit Waghchaure
b7b5eeb92b fix: not able to save customer 2019-05-08 14:28:33 +05:30
rohitwaghchaure
85731053fd Merge pull request #17514 from rohitwaghchaure/pricing_rule_not_working_on_quotation
fix: pricing rule not working properly on the quotation
2019-05-08 11:14:34 +05:30
Rohit Waghchaure
9f3eb9e077 fix: pricing rule not working properly on the quotation 2019-05-08 11:13:56 +05:30
Sahil Khan
5ac8dbfceb Merge branch 'hotfix' 2019-05-07 17:55:28 +05:30
Sahil Khan
f4f2301e5b bumped to version 11.1.27 2019-05-07 18:15:28 +05:50
rohitwaghchaure
7888336524 Merge pull request #17512 from rohitwaghchaure/address_not_set_from_the_lead
fix: address not set on the quotation from the lead
2019-05-07 17:50:09 +05:30
Rohit Waghchaure
b8c2e02c67 fix: address not set on the quotation from the lead 2019-05-07 17:18:00 +05:30
Sahil Khan
a9e9efbd23 Merge branch 'hotfix' 2019-05-07 14:45:45 +05:30
Sahil Khan
2f175e6d85 bumped to version 11.1.26 2019-05-07 15:01:01 +05:50
rohitwaghchaure
df817a858b Merge pull request #17510 from rohitwaghchaure/fixed_lead_dashbord_quotation_redirect
fix: quotation link in the lead dashboard not working and filter from the dashboard was not set in the list view
2019-05-07 14:30:16 +05:30
Rohit Waghchaure
4a73059ed3 fix: quotation link in the lead dashboard not working and filter from the dashboard was not applying 2019-05-07 14:29:39 +05:30
rohitwaghchaure
552615525c Merge pull request #17511 from deepeshgarg007/quotation-refactor-fixes
fix: Dynamic Link fieldname fix in quotation
2019-05-07 14:25:38 +05:30
deepeshgarg007
25e408fd2a fix:Contact person query fix in quotation 2019-05-07 12:43:20 +05:30
rohitwaghchaure
375a6f67ae Merge pull request #17505 from rohitwaghchaure/customer_not_found_in_qtn
fix: not able to make sales order from the lead quotation
2019-05-06 19:26:24 +05:30
Anurag Mishra
01095799e8 fix: renamed column avg. buying rate to valuation rate 2019-05-06 17:41:28 +05:30
Rohit Waghchaure
ead8d82a84 fix: not able to make sales order from the lead quotation 2019-05-06 17:16:57 +05:30
Deepesh Garg
2c229c6403 Merge pull request #17495 from sagarvora/ewb_fixes
fix(regional): imporvements to e-Way Bill JSON generation
2019-05-06 12:31:31 +05:30
Sagar Vora
5fb78a375d fix(regional): imporvements to e-Way Bill JSON generation
- Set pincode correctly in 'Bill To - Ship To' scenario
- Python 2 compatibility (convert to int after rounding)
- Avoid execeeding max character limit in tax amounts by rounding the same to two digits
2019-05-06 11:32:37 +05:30
Tyler Matteson
8fcad571f5 Batch naming series hotfix (#17483)
* fix: not able to make sales order from quotation

* fix: batch naming series unicode() call is py3 incompatible
2019-05-04 23:49:24 +05:30
Himanshu
53d7e667dd fix: patch to remove scheduling tool (#17472)
* fix: patch to remove scheduling tool

* fix: drop table

* patch: delete table if exists

* fix: remove drop table

* use orm
2019-05-04 22:42:35 +05:30
Rohan
7395716476 fix(stock): Allow expired batches to be flushed out of the system (#17477) 2019-05-04 22:40:42 +05:30
Rushabh Mehta
c068b6a885 fix: unlink task rather than deleting it (#17486) 2019-05-04 22:39:00 +05:30
Himanshu Warekar
02d28c5908 fix: use list comprehension 2019-05-04 22:35:08 +05:30
Rohan
90d0d24d1a Update erpnext/selling/doctype/customer/customer.py
Co-Authored-By: hrwX <himanshuwarekar@yahoo.com>
2019-05-04 22:35:08 +05:30
Himanshu Warekar
6aab14f9cf fix: calculate percentage only if sales team exist 2019-05-04 22:35:08 +05:30
Himanshu Warekar
163dbdca34 fix: allocated percentage should be equal to 100 2019-05-04 22:35:08 +05:30
Himanshu Warekar
dcc99a2644 fix: python side validation 2019-05-04 22:35:08 +05:30
Saurabh
f94951a51b Merge branch 'hotfix' into copy_payment_schedule_from_quot_to_SO 2019-05-03 16:48:14 +05:30
Rohit Waghchaure
f5297cf386 fix: not able to make sales order from quotation 2019-05-03 15:52:59 +05:30
Mangesh-Khairnar
9f7fd16882 feat: unlink task from project on task deletion 2019-05-03 13:06:19 +05:30
Nabin Hait
5296ab1f87 Merge pull request #16783 from sahil28297/default_warehouse_for_sales_return
fix: set warehouse from def_warehouse_for_sales_return in sales return
2019-05-03 09:27:04 +05:30
Nabin Hait
e42c14f2cb Merge pull request #17469 from rohitwaghchaure/fixed_sales_order_issue_from_quotation
fix: not able to make sales order from quotation
2019-05-03 09:19:27 +05:30
Rohit Waghchaure
4ef10fd6c3 fix: not able to make sales order from quotation 2019-05-03 01:48:45 +05:30
sahil28297
4c0d0e226b Merge branch 'hotfix' into default_warehouse_for_sales_return 2019-05-03 00:05:22 +05:30
Deepesh Garg
094caaa03e Merge pull request #17465 from deepeshgarg007/inactive-items-fix-hotfix
fix: Inactive sales item report fix
2019-05-02 23:50:57 +05:30
Nabin Hait
ce51553d29 Merge pull request #16907 from sagarvora/ewb
feat(regional 🇮🇳): auto-generate e-Way Bill JSON from Sales Invoice
2019-05-02 21:55:24 +05:30
Nabin Hait
f41fc21274 Merge branch 'hotfix' into ewb 2019-05-02 21:54:38 +05:30
Nabin Hait
1f49b77529 Merge pull request #17460 from nabinhait/project-billing-summary
Refactor: Project billing summary Report
2019-05-02 21:48:35 +05:30
deepeshgarg007
a0012f8c48 fix: Inactive sales item report fix 2019-05-02 19:32:43 +05:30
Nabin Hait
4b1c3ad7ac refactor: Project and billing summary 2019-05-02 18:11:27 +05:30
Anurag Mishra
a063803224 fix: handling case if from date and to date are equal in billing reports 2019-05-02 18:11:27 +05:30
Saurabh
63c7fd90a5 Merge branch 'hotfix' 2019-05-02 16:58:24 +05:30
Saurabh
c9c02c7c85 bumped to version 11.1.25 2019-05-02 17:28:24 +06:00
Nabin Hait
bc7ef1937e Merge pull request #17455 from saurabh6790/multiple_fixes
fix: data pulling based on quotation_to and party_name
2019-05-02 16:01:07 +05:30
Nabin Hait
75b63c5b4c Update set_missing_title_for_quotation.py 2019-05-02 16:00:49 +05:30
Saurabh
625191d20a fix: provision to setup customer name on quotation save and patch for the same 2019-05-02 15:50:01 +05:30
Saurabh
1417c7e828 fix: data pulling based on quotation_to and party_name 2019-05-02 14:12:29 +05:30
Saurabh
a4bbc68945 Merge pull request #17449 from nabinhait/auto-account-creation-company-tree
fix: Validate parent account of child company while creating new account based on parent company
2019-05-02 12:26:23 +05:30
Nabin Hait
2d7a591c61 Merge branch 'hotfix' into auto-account-creation-company-tree 2019-05-02 09:56:53 +05:30
Nabin Hait
9ef79d6c6b Merge branch 'hotfix' into copy_payment_schedule_from_quot_to_SO 2019-05-02 01:00:04 +05:30
Nabin Hait
448a5e1c9c Merge pull request #17447 from nabinhait/woocommerce-multilingual-fix
fix: Multilingual handling in woocommerce integration
2019-05-01 21:15:07 +05:30
Nabin Hait
7be75adc3f fix: Validate parent account of child company while creating new account based on parent company 2019-05-01 20:26:09 +05:30
Nabin Hait
fafee7cf61 Merge pull request #17442 from nabinhait/work-order-bom-image
feat: Added item image in work order and bom
2019-05-01 19:31:24 +05:30
Nabin Hait
16aa23e454 fix: Multilingual handling in woocommerce integration 2019-05-01 19:17:59 +05:30
Nabin Hait
a4d5c5414d Merge pull request #17440 from nabinhait/pe-ref-exchange-rate
fix: Always fetch exchange rate from ref document
2019-05-01 17:17:46 +05:30
Nabin Hait
b104e3595c feat: Added item image in work order and bom 2019-05-01 16:37:32 +05:30
Deepesh Garg
5a06dd1ed1 Merge pull request #17436 from deepeshgarg007/name_fix_hotfix
fix: Rename Inactive Items report to Inactive Sales Items
2019-05-01 16:29:02 +05:30
Nabin Hait
27fe55efe1 fix: Always fetch exchange rate from ref document 2019-05-01 15:32:30 +05:30
Sahil Khan
9089b242ba Merge branch 'hotfix' 2019-05-01 15:13:26 +05:30
Sahil Khan
98e511d236 bumped to version 11.1.24 2019-05-01 15:33:26 +05:50
Nabin Hait
93784d3804 Merge pull request #17430 from nabinhait/deferred-accounting-long-job
fix: Deferred accounting posting moved to long job
2019-05-01 15:04:34 +05:30
Deepesh Garg
d29fde0bf3 Merge branch 'hotfix' into name_fix_hotfix 2019-05-01 14:27:17 +05:30
deepeshgarg007
8326925fe8 fix: Rename Inactive Items report to Inactive Sales Item 2019-05-01 13:36:08 +05:30
rohitwaghchaure
a924b636a4 Merge pull request #17412 from rohitwaghchaure/dont_raise_user_permissions
fix: while saving employee user getting user permissions error
2019-05-01 12:54:52 +05:30
Nabin Hait
3526ed975c moved deferred accounting monthly job to long job 2019-05-01 12:49:44 +05:30
Nabin Hait
d0faec3cc0 Merge pull request #17419 from nabinhait/ss-fixes
fix: a few fixes in payroll
2019-05-01 12:16:51 +05:30
Nabin Hait
661a5ce332 Merge pull request #17393 from ashish-greycube/hotfix_allow_bank_account_import
fix: allow_import_of_bank_account_by_account_manager
2019-05-01 11:17:12 +05:30
Nabin Hait
b289aa3548 Merge pull request #17387 from ashish-greycube/hotfix_correct_party_type
fix: show only party_type doctypes in Party Type field of bank account
2019-05-01 11:15:16 +05:30
Nabin Hait
4ed521162e Merge pull request #17374 from Alchez/hotfix-projects-subject-filter
feat(projects): Add subject filter to Issue and Task
2019-05-01 11:14:08 +05:30
Nabin Hait
8865d05b4c Merge pull request #17396 from chdecultot/hotfix
fix: Multiple corrections to the bank reconciliation tool
2019-05-01 10:59:39 +05:30
Nabin Hait
4df46737ef fix: Null handling 2019-05-01 10:59:02 +05:30
Deepesh Garg
09ac547a80 Merge branch 'hotfix' into ewb 2019-04-30 10:28:57 +05:30
Faris Ansari
c1bbaf07a4 fix: Map item_code to title (#17402)
When making Project from Sales Order, description was mapped
with Task title which can exceed 140 characters easily.
Description should be mapped with description as it is html field.
2019-04-30 10:18:39 +05:30
Nabin Hait
73a081d806 fix: a few fixes in payroll 2019-04-30 00:48:11 +05:30
rohitwaghchaure
e1df414f8b Merge pull request #17413 from rohitwaghchaure/duplicate_error_if_project_created_from_so
hotfix: while making project from sales order, getting duplicate project error
2019-04-29 22:21:18 +05:30
Rohit Waghchaure
cefef3b62d fix: while making project from sales order, getting duplicate project error 2019-04-29 20:34:46 +05:30
Rohit Waghchaure
bd4ee60d1e fix: while saving employee user getting user permissions error 2019-04-29 19:11:17 +05:30
Sahil Khan
f6a9eec23a Merge branch 'hotfix' 2019-04-29 16:35:41 +05:30
Sahil Khan
5742d0836e bumped to version 11.1.23 2019-04-29 16:55:41 +05:50
deepeshgarg007
0555223797 Merge branch 'hotfix' of https://github.com/frappe/erpnext into ewb 2019-04-28 23:22:48 +05:30
deepeshgarg007
de93efb304 fix: Added test cases for ewb json creation 2019-04-28 23:14:02 +05:30
deepeshgarg007
6856033d3c fix: Code cleanup and fixes 2019-04-28 23:13:26 +05:30
Faris Ansari
0735165ef3 fix: Make Customer and lead field dynamic in quotations and opportunity (#17097)
fix: Make Customer and lead field dynamic in quotations and opportunity
2019-04-28 20:46:39 +05:30
Charles-Henri Decultot
1aa5462f36 fix: Codacy 2019-04-26 20:52:12 +02:00
Charles-Henri Decultot
f83514418e fix: Codacy 2019-04-26 20:02:38 +02:00
Charles-Henri Decultot
3c13e8e8b9 fix: Codacy 2019-04-26 18:56:47 +02:00
Charles-Henri Decultot
de0955b8ed fix: Remove leftover method 2019-04-26 14:59:10 +02:00
Charles-Henri Decultot
82af75b853 fix: Hotfix conflict resolved 2019-04-26 14:57:26 +02:00
ashish-greycube
d3ce4f815d codacy review 2019-04-26 14:10:46 +05:30
ashish-greycube
85bf9203ed fix: allow_import_of_bank_account_by_account_manager 2019-04-26 13:56:26 +05:30
ashish-greycube
e82ab87f1c fix: copy_payment_schedule_from_quot_to_SO 2019-04-26 12:12:53 +05:30
rohitwaghchaure
db12f75681 Merge pull request #17385 from surajshetty3416/fix-price-list-hotfix
fix: Price list conversion for other UOM from stock UOM item price
2019-04-26 12:06:46 +05:30
ashish-greycube
3763169978 show only party_type doctypes in Party Type field of bank account 2019-04-26 11:51:34 +05:30
Suraj Shetty
36a8c431f5 fix: Typo 2019-04-26 11:18:26 +05:30
Suraj Shetty
5a67431daa fix: Price list for UOM other than stock UOM
-Fixes conversion from default UOM item price to  other UOMs
2019-04-26 11:18:13 +05:30
Nabin Hait
c4e92b3004 Merge pull request #17381 from nabinhait/tax-exemption
refactor: Employee Tax Exemption
2019-04-26 00:20:27 +05:30
Nabin Hait
2d90e8a2de fix: test cases 2019-04-25 22:29:49 +05:30
Sagar Vora
4dacb89da6 fix: test case and semicolons 2019-04-25 21:45:26 +05:30
Sagar Vora
c552d74746 fix: add missing semicolons 2019-04-25 21:45:26 +05:30
Sagar Vora
2697c2d869 feat(regional | India): auto-generate e-Way Bill JSON from Sales Invoice 2019-04-25 21:45:26 +05:30
Nabin Hait
4a950abf2e fix: test cases 2019-04-25 21:42:01 +05:30
Nabin Hait
7f10f4eea1 Merge pull request #17376 from rohitwaghchaure/trial_balance_error_finance_book
fix: Trial balance finance book issue
2019-04-25 20:35:09 +05:30
Nabin Hait
5c93260eec Merge pull request #17377 from nabinhait/pos-advance-hotfix
fix: Don't allocate advance if pos
2019-04-25 20:33:59 +05:30
Nabin Hait
485d9c133a fix: test cases 2019-04-25 19:54:20 +05:30
deepeshgarg007
891d9aeee9 fix: Remove method from validation 2019-04-25 19:19:01 +05:30
deepeshgarg007
51f0d6d409 fix: Remove fetch_from from customer name 2019-04-25 18:56:08 +05:30
Nabin Hait
80374be724 refactor: Employee Tax Exemption 2019-04-25 18:44:32 +05:30
Nabin Hait
619bf561da fix: Don't allocate advance if pos 2019-04-25 17:47:26 +05:30
Rohit Waghchaure
13c15d0222 fix: Trial balance finance book issue 2019-04-25 17:46:44 +05:30
deepeshgarg007
3d31bccaf6 fix: Change dynamic_field name and minor fixes 2019-04-25 17:29:21 +05:30
deepeshgarg007
3959bf34ee Merge branch 'hotfix' of https://github.com/frappe/erpnext into quotation-fix 2019-04-25 14:57:56 +05:30
Rohan Bansal
1897ed38df enhance(projects): Add subject filter to Issue and Task 2019-04-25 13:40:24 +05:30
rohitwaghchaure
126c4efb2c Merge pull request #17357 from rohitwaghchaure/fix_straight_line_asset_depreciation
fix: Straight line asset depreciation not working if Expected Value After Useful Life is defined
2019-04-25 10:23:15 +05:30
Raffael Meyer
9c923ae418 feat(regional): Report for german tax consultants (DATEV) 2019-04-25 01:09:56 +02:00
Rohit Waghchaure
7d0bc2bd5a fixed test cases 2019-04-25 01:26:27 +05:30
Nabin Hait
0c70ae44c3 Merge pull request #17366 from chdecultot/plaid_settings_erro
fix: Better error message for plaid setting
2019-04-24 23:15:02 +05:30
Nabin Hait
024dc4a4c9 Merge pull request #17316 from alyf-de/validate_iban
feat(accounts): validate Bank Account's IBAN
2019-04-24 22:57:04 +05:30
Deepesh Garg
e3567ff31b Merge pull request #17363 from deepeshgarg007/inactive_items_hotfix
feat: Inactive items hotfix
2019-04-24 22:30:34 +05:30
Charles-Henri Decultot
97842ca804 fix: cleanup development 2019-04-24 18:15:46 +02:00
Charles-Henri Decultot
d14799a9fa fix: verbose error message when api keys are not setup 2019-04-24 18:06:14 +02:00
Raffael Meyer
e534221245 fix: validate IBAN only if it exists 2019-04-24 16:22:34 +02:00
Raffael Meyer
4acfec901e Merge branch 'hotfix' of https://github.com/frappe/erpnext into validate_iban 2019-04-24 16:15:35 +02:00
deepeshgarg007
a981a8a153 fix: Ignore sql injections 2019-04-24 15:14:23 +05:30
deepeshgarg007
11e1c60cd3 fix: Typo fixes 2019-04-24 15:13:59 +05:30
deepeshgarg007
fe7baae9f7 fix: Ordering and datatype fixes in inactive items report 2019-04-24 15:13:46 +05:30
deepeshgarg007
da64113b9a feat: Logic for query and report creation for inactive items 2019-04-24 15:13:28 +05:30
rohitwaghchaure
fb76cb7a78 Merge pull request #17301 from rohitwaghchaure/fixed_received_qty_showing_incorrect
fix: received qty in the purchase order item showing incorrect if user has returned the rejected quantity
2019-04-24 15:08:39 +05:30
deepeshgarg007
1bd69b4490 fix: Reordered and deleted unnecessary filters 2019-04-24 15:06:48 +05:30
deepeshgarg007
62d51d82ea feat: Added filters and columns for inactive items report 2019-04-24 15:06:23 +05:30
deepeshgarg007
6ddc554965 fix: Merge branch hotfix into quotation-fix 2019-04-24 14:53:30 +05:30
Rohit Waghchaure
5a6fc77751 fix: Straight line asset depreciation not working if Expected Value After Useful Life is defined 2019-04-24 11:40:37 +05:30
Nabin Hait
733db826ec Merge branch 'hotfix' into validate_iban 2019-04-23 21:39:47 +05:30
Nabin Hait
6643156df6 Merge pull request #17347 from nabinhait/invoice-advances
fix: don't allocate advances if POS
2019-04-23 21:36:29 +05:30
Nabin Hait
6022f2bcf8 Merge pull request #17349 from rohitwaghchaure/invoiced_items_gross_margin_api
feat: Get invoiced item's gross margin using API
2019-04-23 21:36:02 +05:30
Nabin Hait
b890492dc0 Merge pull request #17348 from nabinhait/salary-slip-rounded
fix: Rounded tax amount in salary slip
2019-04-23 21:35:34 +05:30
Rohit Waghchaure
6ea108f01d feat: Get invoiced item's gross margin using API 2019-04-23 18:56:26 +05:30
Nabin Hait
628bed1f5a Merge branch 'hotfix' into validate_iban 2019-04-23 18:41:46 +05:30
Nabin Hait
4c0e3aa097 Merge pull request #17341 from Alchez/hotfix-return-deliveries
fix(selling): Fix method to also consider return documents
2019-04-23 18:41:11 +05:30
Nabin Hait
631e334a3f Merge pull request #17338 from chdecultot/bank_reco_corrections
fix: Bank reconciliation corrections
2019-04-23 18:40:03 +05:30
Nabin Hait
8f4d92eba2 Merge branch 'hotfix' into validate_iban 2019-04-23 18:39:12 +05:30
Deepesh Garg
2f4193757e fix: Stock Ledger report fix (#17342) 2019-04-23 17:30:11 +05:30
Rohan Bansal
cba64988df fix(selling): Fix method to also consider return documents 2019-04-23 16:39:09 +05:30
Nabin Hait
17e6fce486 fix: Rounded tax amount in salary slip 2019-04-23 15:51:28 +05:30
Nabin Hait
05fb3f2d75 fix: don't allocate advances if POS 2019-04-23 15:49:38 +05:30
Charles-Henri Decultot
af6360b273 Bank reconciliation corrections 2019-04-23 10:44:32 +02:00
Nabin Hait
043a47a9c0 Merge pull request #17329 from nabinhait/income-tax-period-factor
fix: Income tax period factor considering joining and relieving date
2019-04-22 21:07:35 +05:30
Nabin Hait
23e424911c Merge branch 'hotfix' into income-tax-period-factor 2019-04-22 19:28:13 +05:30
Saif
a5fbeaa3d3 fix: Remove duplicate/incorrect patch 2019-04-22 17:29:36 +05:00
Nabin Hait
8aeb4b04bd fix: Income tax period factor considering joining and relieving date 2019-04-22 17:39:02 +05:30
Raffael Meyer
f3b07495f6 fix typo 2019-04-22 12:38:22 +02:00
Raffael Meyer
70f89462a8 fix: consider empty iban 2019-04-22 12:27:12 +02:00
Nabin Hait
bbc7f474c3 Merge pull request #17327 from Anurag810/bom_prowser_patch
fix: (Patch) Removed page Bom-Browser
2019-04-22 15:54:35 +05:30
Anurag Mishra
26fe30685a Merge branch 'hotfix' into bom_prowser_patch 2019-04-22 15:53:05 +05:30
Anurag Mishra
7bdd27f7e2 chore: used frappe.delete_doc_if_exists 2019-04-22 15:50:12 +05:30
Nabin Hait
96ec4aeda0 Merge pull request #17287 from alyf-de/skr
feat(accounts): add German CoA with numbers
2019-04-22 15:44:48 +05:30
Nabin Hait
cce65d41b8 Merge pull request #17325 from PawanMeh/fix_17324
fix: Attendance list not showing employee name
2019-04-22 14:58:07 +05:30
Nabin Hait
a44d46e535 Merge pull request #17320 from nabinhait/payroll-based-on-payment-days
fix: Renamed depends_on_lwp to depends_on_payment_days
2019-04-22 14:55:37 +05:30
Anurag Mishra
4f16d17d21 fix: resolve conflicts 2019-04-22 14:48:15 +05:30
Anurag Mishra
759bb0eb62 fix: (Patch) Removed page Bom-Browser 2019-04-22 14:46:00 +05:30
Sahil Khan
d7aa71aa70 Merge branch 'hotfix' 2019-04-22 14:05:43 +05:30
Sahil Khan
32207ad722 bumped to version 11.1.22 2019-04-22 14:25:43 +05:50
hello@openetech.com
8a32ad206a [fix] #17324 2019-04-22 13:58:30 +05:30
Nabin Hait
16bd2ed967 Merge pull request #17319 from SaiFi0102/Revert-Allocate-Advance-Automatically-V11
fix: Set Allocate Advance Automatically disabled by default (v11)
2019-04-22 13:32:30 +05:30
Nabin Hait
393b12a37f fix: Renamed depends_on_lwp to depends_on_payment_days 2019-04-22 13:26:18 +05:30
Saif Ur Rehman
d1332f6c24 fix: Set Allocate Advance Automatically disabled by default 2019-04-22 12:17:25 +05:00
Saurabh
f36fa088f8 Merge pull request #17302 from sahil28297/new_site_sync
fix(site_sync): return more data in level
2019-04-22 12:46:20 +05:30
Saurabh
bb63103183 Merge branch 'hotfix' into new_site_sync 2019-04-22 12:46:13 +05:30
Anurag Mishra
7760db7563 fix: sales order status for order type 'Maintenance' (#17119)
* fix: Sales order Status for order type 'Maintenance'

* fix: test case for sales order
2019-04-22 12:15:11 +05:30
Saurabh
0ea1e67ce7 Merge branch 'hotfix' into new_site_sync 2019-04-22 11:59:52 +05:30
Nabin Hait
587b52dcd4 Merge pull request #17080 from auliabismar/patch-2
fix: Renumber Aktiva, remove excess 0
2019-04-22 11:21:15 +05:30
Nabin Hait
efcdf2fd42 Merge pull request #17255 from Anurag810/patch_for_salary_structure
fix: (Patch)make salary details submitable if  salary structure is submitted
2019-04-22 11:17:28 +05:30
Nabin Hait
010a05df48 Update set_salary_details_submitable.py 2019-04-22 11:16:47 +05:30
Nabin Hait
58d565a882 Merge pull request #17292 from prasadarr/listing-fixes-hotfix
fix: Allow system manager to access share ledger
2019-04-22 11:13:17 +05:30
Nabin Hait
b655b07f20 Merge pull request #17309 from nabinhait/ar-fix
fix: Total row alignment in AR report
2019-04-22 11:11:45 +05:30
Sahil Khan
afb59fa5c0 fix: import iteritems 2019-04-22 10:47:37 +05:30
Sahil Khan
cb4b86512d fix: syntax error 2019-04-22 10:10:50 +05:30
Raffael Meyer
49f919a4fc fix test's error message 2019-04-22 05:32:35 +02:00
Raffael Meyer
4a9127f9a6 feat(accounts): validate IBAN 2019-04-22 03:46:25 +02:00
Kenneth Sequeira
c4a670c8c8 add salutation in contact display for lead (#17312) 2019-04-20 21:44:38 +05:30
Don-Leopardo
a26e2c064a fix: Campaign Efficiency report only works in english (#17284)
* fix column translation and match

* fix float results

* fix import missing
2019-04-20 21:12:23 +05:30
Sahil Khan
3889d0f0a0 fix: refactor level 2019-04-20 14:26:49 +05:30
rohitwaghchaure
4e81fb20b9 fix: Move erpnext related methods from frappe to erpnext (#17293) 2019-04-20 11:50:45 +05:30
Nabin Hait
dfba52b834 fix: Total row alignment in AR report 2019-04-20 10:57:04 +05:30
Nabin Hait
f665e42e2a Merge pull request #17307 from surajshetty3416/fix-employee-permission-hotfix
fix: Do not create employee user permission if already exists
2019-04-20 01:44:30 +05:30
Nabin Hait
560cc66a36 Merge pull request #17279 from rohitwaghchaure/requested_items_tobe_ordered_issue_for_multi_uom
fix: Requested Items To Be Ordered report showing records even if material request is fully ordered
2019-04-20 01:27:46 +05:30
Suraj Shetty
d08953b72b fix: Do not create employee user permission if already exists 2019-04-19 21:57:39 +05:30
Nabin Hait
34e4ac2398 Merge pull request #17296 from chdecultot/reconciliation_correction
fix: Reconciliation dashboard py3 and matching corrections
2019-04-19 20:02:54 +05:30
Sahil Khan
3dbaa3c2d9 fix(site_sync): return more data in level 2019-04-19 16:31:23 +05:30
Rohit Waghchaure
613d82e12f fix: received qty in the purchase order item showing incorrect if user has returned the rejected quantity 2019-04-19 16:28:19 +05:30
Anurag Mishra
4f2fa173c9 fix: Reopen button does not appear in delivery note (#17295) 2019-04-19 16:06:17 +05:30
Rohit Waghchaure
d36e635e60 fix: Requested Items To Be Ordered report showing records even if material request is fully ordered 2019-04-19 14:54:59 +05:30
Charles-Henri Decultot
e86d21ea15 Py3 and matching corrections 2019-04-19 10:09:06 +02:00
Nabin Hait
b6fda118b9 Merge pull request #17280 from rohitwaghchaure/credit_will_not_be_converted_if_debit_amount_is_there
fix: credit amount not be consider if debit amount is present in the general ledger
2019-04-19 13:18:33 +05:30
Nabin Hait
2c607e5562 Merge pull request #17290 from alyf-de/company_test
fix(test): provide a helpful error message
2019-04-19 13:10:46 +05:30
Nabin Hait
95fce2395a Merge pull request #17289 from sunhoww/patch-1
fix: scan_barcode field adding invalid items
2019-04-19 13:07:06 +05:30
Nabin Hait
0f0dcd9035 Merge pull request #17285 from rohitwaghchaure/task_not_able_to_search_by_name_in_global_search
fix: task name was not able to search by name in global search
2019-04-19 13:06:24 +05:30
Prasad R
ce291c253b fix: show 2 missing doctypes in Accounts
Pricing Term and Exchage Rate Revaluation were missing, added in list
2019-04-19 12:17:19 +05:30
Prasad R
e85c6ad236 fix: Allow system manager to access share ledger 2019-04-19 11:07:19 +05:30
Raffael Meyer
df16cdcf31 fix(test): provide a helpful error message 2019-04-19 00:21:44 +02:00
Raffael Meyer
00303858df fix missing account types 2019-04-19 00:09:37 +02:00
Sun Howwrongbum
6f54a7b7d8 fix: scan_barcode field adding invalid items 2019-04-19 01:44:35 +05:30
Raffael Meyer
fba8bfc0d0 feat(accounts): add German CoA with numbers 2019-04-18 21:27:22 +02:00
Rohit Waghchaure
4db4f21d16 fix: task name was not able to search by name in global search 2019-04-18 22:34:19 +05:30
Rohit Waghchaure
abf9ef0244 fix: credit amount in account's currency not be consider if debit amount is present in the general ledger 2019-04-18 22:01:45 +05:30
Suraj Shetty
22ad81fb57 fix: Remove unwanted parent & parenttype field (#17274) 2019-04-18 15:45:47 +05:30
Shivam Mishra
923c5462a2 Merge pull request #17267 from fproldan/bundlestock
fix: Incorrect stock in "Available Stock for Packing Items" report
2019-04-18 11:04:55 +05:30
Francisco Roldán
753b3d1c28 Merge branch 'hotfix' into bundlestock 2019-04-17 11:44:40 -03:00
Nabin Hait
b9046edb85 Merge pull request #17259 from frappe/kennethsequeira-patch-2
fix: Improve Validation Message in BOM
2019-04-17 17:35:42 +05:30
Nabin Hait
7932eba733 Merge pull request #17266 from deepeshgarg007/gstr1-fixes
fix: GSTR-1 B2C Small report fix
2019-04-17 17:33:20 +05:30
Nabin Hait
5ba9c82922 Merge branch 'hotfix' into gstr1-fixes 2019-04-17 17:33:13 +05:30
Nabin Hait
fc48ce7073 Merge pull request #17250 from saurabh6790/patches_fix
fix: woocommerce settings patch
2019-04-17 17:30:14 +05:30
Nabin Hait
8b9a84b568 Merge pull request #17253 from hrwX/sales_percentage_validate_v11
fix(Customer): validate percentage total
2019-04-17 17:28:50 +05:30
Deepesh Garg
cc4e6a25f6 Merge branch 'hotfix' into kennethsequeira-patch-2 2019-04-17 17:24:45 +05:30
Nabin Hait
17923863de Merge pull request #17256 from Anurag810/fix_report_of_billing_summary
fix: total error arissing due to blank link field
2019-04-17 17:23:19 +05:30
Nabin Hait
32efea5e38 Merge pull request #17262 from rohitwaghchaure/finance_book_blank_issue
fix: If finance book filter is not set then show all the entries
2019-04-17 17:22:33 +05:30
Deepesh Garg
87a2c1d27d Merge branch 'hotfix' into kennethsequeira-patch-2 2019-04-17 17:16:37 +05:30
Nabin Hait
c581d67bba Merge pull request #17120 from hrwX/payment_terms_fix
fix(Purchase Order): fetch payment terms
2019-04-17 17:16:30 +05:30
Himanshu Warekar
1865e0df7c refactor: fetch payment terms in account settings 2019-04-17 15:35:43 +05:30
Himanshu Warekar
308ae1f155 fix: codacy fixes 2019-04-17 12:42:00 +05:30
Himanshu Warekar
2b54cee4aa fix: test case 2019-04-17 12:09:19 +05:30
Himanshu Warekar
ba47f89702 fix: added a single value to fetch payment terms 2019-04-17 11:24:04 +05:30
Nabin Hait
0ea32faf3d Merge pull request #17268 from nabinhait/pr-pi-onload
fix: Pull items from PR to PI
2019-04-16 23:45:48 +05:30
Nabin Hait
7be0736154 fix: removed debug 2019-04-16 23:05:39 +05:30
Nabin Hait
97bf12734a fix: Pull items from PR to PI 2019-04-16 22:11:22 +05:30
deepeshgarg007
4bccd692e5 fix: GSTR1 B2C report fix 2019-04-16 20:50:46 +05:30
NahuelOperto
07f8e6bbfc fix get_item_warehouse_quantity_map method 2019-04-16 11:36:19 -03:00
Rohit Waghchaure
15c7a05879 fix: If finance book filter is not set then show all the entries 2019-04-16 19:28:11 +05:30
Kenneth Sequeira
82e76b2c0c Improve Validation Message in BOM
Update following validation message:

"Price not found for item {0} and price list {1}" to "Price not found for item {0} in price list {1}"
2019-04-16 18:00:21 +05:30
Anurag Mishra
d6757b7af6 fix: total error arissing due to blank link field 2019-04-16 17:39:40 +05:30
Anurag Mishra
b380a02d09 fix: make salary details submitable if salary structure is submitted 2019-04-16 17:07:07 +05:30
Himanshu Warekar
64980fed59 fix: validate percentage total 2019-04-16 16:29:13 +05:30
Saurabh
7df8c0ef82 fix: woocommerce settings patch 2019-04-16 15:57:21 +05:30
deepeshgarg007
28fe73640b fix: Dynamic link fixes in quotation and opportunity 2019-04-16 15:21:51 +05:30
deepeshgarg007
7cfe247b2e Merge branch 'hotfix' of https://github.com/frappe/erpnext into quotation-fix 2019-04-16 13:38:15 +05:30
Saurabh
332b4171c0 Merge branch 'hotfix' 2019-04-16 13:34:52 +05:30
Saurabh
e5544b8c86 bumped to version 11.1.21 2019-04-16 14:04:52 +06:00
sahil28297
38e5e7f616 Merge pull request #17246 from frappe/revert-17226-site_sync
Revert "feat(site_sync): return erpnext data in level"
2019-04-16 13:22:18 +05:30
sahil28297
a595346769 Revert "feat(site_sync): return erpnext data in level" 2019-04-16 13:21:24 +05:30
Nabin Hait
8dace802dc Merge pull request #17243 from hrwX/delivery_note_fix_v11
fix(Delivery Note): show get items even if note has been amended
2019-04-16 13:19:58 +05:30
Himanshu
ac6259dfe8 fix: let user delete the elements of items 2019-04-16 13:18:47 +05:30
Nabin Hait
f801cc953b Merge pull request #17152 from Alchez/hotfix-company-address-label
fix(selling): Add missing label to company address field
2019-04-16 12:45:40 +05:30
Nabin Hait
c117048fde Merge pull request #17226 from sahil28297/site_sync
feat(site_sync): return erpnext data in level
2019-04-16 12:42:45 +05:30
Himanshu Warekar
73fd508ccf fix: show get items even if note has been amended 2019-04-16 12:15:49 +05:30
deepeshgarg007
7cc972969f Merge branch 'hotfix' of https://github.com/frappe/erpnext into quotation-fix 2019-04-16 10:32:32 +05:30
Nabin Hait
734c32b970 Merge pull request #17234 from nabinhait/pr-to-pi
fix: Invoice against partially returned DN/PR
2019-04-16 09:46:24 +05:30
Nabin Hait
fa862e6814 Merge pull request #17236 from hrwX/remove_asset_permission_v11
fix(Asset): Remove user permission for employee in asset
2019-04-16 09:45:54 +05:30
deepeshgarg007
d333d2e6eb fix: Change enquiry_from to opportunity_from in multiple files 2019-04-16 08:53:29 +05:30
deepeshgarg007
3b78a018aa Merge branch hotfix into quotation-fix 2019-04-16 08:46:07 +05:30
Himanshu Warekar
cc581d21f0 Merge branch 'hotfix' of https://github.com/frappe/erpnext into remove_asset_permission_v11 2019-04-15 22:54:42 +05:30
Himanshu Warekar
dca60888ce fix: remove user permission for emp in asset 2019-04-15 22:52:50 +05:30
Nabin Hait
b2465c7a69 fix: Invoice against partially returned DN/PR 2019-04-15 21:02:16 +05:30
rohitwaghchaure
14477c7f51 Merge pull request #17161 from karthikeyan5/hotfix-woocommerce-fix
fix(woocommerce integration): 403 error and adding defaults
2019-04-15 19:34:54 +05:30
deepeshgarg007
f0ee3d26a7 fix: Styling and indentation fixes 2019-04-15 19:20:59 +05:30
deepeshgarg007
2e87202b3b Merge branch 'hotfix' of https://github.com/frappe/erpnext into quotation-fix 2019-04-15 17:58:54 +05:30
Nabin Hait
1024b55f99 Fixed merge conflict 2019-04-15 11:41:54 +05:30
Nabin Hait
9ba7b678fe fix: Bank reconciliation cleanup 2019-04-15 11:33:06 +05:30
Nabin Hait
a8c8e6b78a Merge pull request #16752 from nabinhait/limit-cond-fix
fix: Limit conditions while fetching payment entries
2019-04-15 10:19:12 +05:30
Nabin Hait
ce107086e7 Merge pull request #17083 from frappe/revert-16926-salary-slip-fix
Revert "fix(Salary Slip): Consider Leave without Pay for calculation"
2019-04-15 10:14:12 +05:30
Nabin Hait
49d1449d2b Merge branch 'hotfix' into revert-16926-salary-slip-fix 2019-04-15 10:13:31 +05:30
Nabin Hait
2f6789e54d Merge pull request #17228 from rohitwaghchaure/pos_not_working_if_user_can_access_more_than_one_company
fix: POS not working if user has access of multiple company
2019-04-15 10:12:51 +05:30
Nabin Hait
f2893e5701 Merge pull request #17215 from nabinhait/project-task-opt-tests
perf: Project task optimization
2019-04-15 10:11:16 +05:30
Nabin Hait
870410c9d5 Merge pull request #17180 from netchampfaris/duplicate-variant-check
fix: Validate variant attributes only if is_new
2019-04-15 10:09:12 +05:30
Nabin Hait
30bca30f20 Merge pull request #17185 from netchampfaris/allow-items-not-in-stock
feat: Allow items not in stock to be added in cart
2019-04-15 10:07:49 +05:30
Nabin Hait
80f1d5f63d Merge pull request #17217 from netchampfaris/item-price-packing-unit
fix: Set default value for Packing Unit as 0
2019-04-15 10:07:00 +05:30
Nabin Hait
76d4fa9f2b Merge pull request #17221 from nabinhait/supplier-sales-analytics
fix: supplier wise sales analytics report
2019-04-15 10:05:43 +05:30
Nabin Hait
e17c9d9978 Merge pull request #17225 from hrwX/naming_series
fix(Naming Series): Naming series
2019-04-15 10:05:17 +05:30
deepeshgarg007
e8883e20cd fix: Remove comments and unused code 2019-04-14 22:39:58 +05:30
deepeshgarg007
af4d588f64 fix: Make customer and lead dynamic_link in opportunity 2019-04-14 22:35:06 +05:30
deepeshgarg007
4f0a4a1a2d fix: Customer dashboard fixes 2019-04-14 22:35:06 +05:30
deepeshgarg007
7f7a1b48ed fix: Test case fixes inquotation 2019-04-14 22:35:06 +05:30
deepeshgarg007
f094662f5e fix:Test record fixes 2019-04-14 22:35:06 +05:30
deepeshgarg007
e2fc03e561 fix: Cart test fixes 2019-04-14 22:35:06 +05:30
deepeshgarg007
3987b4b714 fix: Test case fixes in quotation for dynamic column 2019-04-14 22:35:06 +05:30
deepeshgarg007
e889a58724 fix: Patch typo fix and set label in refresh 2019-04-14 22:35:06 +05:30
deepeshgarg007
1638994436 fix: Patch to move customer and lead 2019-04-14 22:35:06 +05:30
deepeshgarg007
ff99492481 fix: Removed redundant code 2019-04-14 22:33:52 +05:30
deepeshgarg007
a65af7a2f5 fix: Quotation Query fix in lead.py 2019-04-14 22:33:52 +05:30
deepeshgarg007
6ba48c58e8 fix: Server side handling of quotation to and get_query fix 2019-04-14 22:33:52 +05:30
deepeshgarg007
3b4f481ca4 fix: Make Customer and lead field dynamic 2019-04-14 22:33:52 +05:30
Rohit Waghchaure
548e93b2d3 fix: POS not working if user has access of multiple company 2019-04-14 19:39:11 +05:30
sahil28297
76eb9b32b3 Merge branch 'hotfix' into site_sync 2019-04-14 18:58:28 +05:30
Sahil Khan
0ac4cfa9b1 fix(site_sync): remove duplicate entry 2019-04-14 18:29:49 +05:30
Himanshu
dc34393b8a fix: allow braces for custom field names 2019-04-14 00:54:24 +05:30
Himanshu
023a865e1e Merge pull request #7 from frappe/hotfix
Hotfix
2019-04-14 00:49:41 +05:30
rohitwaghchaure
d2a7ec1add Merge pull request #17222 from Anurag810/pay_fix
fix: handle for party type member in payment entry(v11)
2019-04-13 00:10:30 +05:30
rohitwaghchaure
564ee5399c Merge pull request #17223 from rohitwaghchaure/user_permissions_are_not_working_for_stock_ledger
fix: user permissions are not working on stock ledger report
2019-04-13 00:09:58 +05:30
karthikeyan5
2518a2ab16 fix(woocommerce integration): travis fix 2019-04-12 19:35:07 +05:30
karthikeyan5
df3e8853ae fix(woocommerce integration): fix strange travis error
the patch was working locally. But, in was failing on travis. The strange thing was that the patch running in travis was looking for woocommerce_settings in the path 'frappe.core.doctype.woocommerce_settings.woocommerce_settings'
2019-04-12 19:35:07 +05:30
karthikeyan5
a0b7ff60b8 fix(woocommerce integration): possible travis fix
possible fix for travis patch error "Error: No module named woocommerce_settings.woocommerce_settings)"
2019-04-12 19:35:07 +05:30
karthikeyan5
97383716e6 fix(woocommerce integration): error in new-site
resolving "Could not find UOM: Nos" error in travis
2019-04-12 19:35:06 +05:30
karthikeyan5
f788117b3e fix(woocommerce integration): defaults in settings 2019-04-12 19:35:06 +05:30
karthikeyan5
6784335e2c fix(woocommerce integration): fixing 403 error 2019-04-12 19:35:06 +05:30
Rohit Waghchaure
c5c9dc5f6d fix: user permissions are not working on stock ledger report 2019-04-12 16:58:51 +05:30
Nabin Hait
819e24ddde fix: supplier wise sales analytics report 2019-04-12 15:11:11 +05:30
Anurag Mishra
313ed4feeb fix: handle for party type member in payment entry 2019-04-12 15:11:06 +05:30
Nabin Hait
5157fa9233 Merge pull request #17150 from nabinhait/ar-credit-note
fix: Show standalone credit note in Accounts receivable report
2019-04-12 14:18:17 +05:30
Faris Ansari
774b96495f fix: Set default value for Packing Unit as 0
The default value 1 assumes Items will be always packed in integer
quantities. This is not the usual case.
2019-04-12 12:38:04 +05:30
Nabin Hait
ea4c2c9e7d fix: task optimisation and test case fixes 2019-04-12 11:33:28 +05:30
Nabin Hait
b42bbf1b6f perf: Optimisation of project and task updation 2019-04-12 11:33:28 +05:30
Nabin Hait
c768febac6 Merge pull request #17206 from rohitwaghchaure/fix_pending_so_items_for_purchase_reques_report
fix: Pending SO Items For Purchase Request report not showing the so, requested and pending quantity correctly
2019-04-12 11:11:16 +05:30
Nabin Hait
0449d30423 Merge pull request #16976 from ESS-LLP/patient_hotfix
fix: Patient relation - patient link is not showing
2019-04-12 11:08:24 +05:30
Nabin Hait
f17dfb0ebe Merge pull request #17157 from Anurag810/vedmata-print-fixes
fix: Vedmata print fixes
2019-04-12 11:07:24 +05:30
Nabin Hait
13273412d1 Merge pull request #17207 from Anurag810/timesheet_report_amount_fixes
fix: timesheet report not showing total amount correctly
2019-04-12 11:05:12 +05:30
Nabin Hait
f198b1d032 Merge branch 'hotfix' into timesheet_report_amount_fixes 2019-04-12 11:05:03 +05:30
Nabin Hait
9512a43d44 Merge pull request #17187 from nabinhait/rounding-adjustment-gle
fix: Rounding Adjustment GL Entry
2019-04-12 11:00:29 +05:30
Anurag Mishra
50db128ff1 fix: timesheet report not showing total amount correctly 2019-04-11 16:07:38 +05:30
Rohit Waghchaure
5eaf7d0517 fix: Pending SO Items For Purchase Request not showing the so quantity correctly if so has duplicate items 2019-04-11 13:56:40 +05:30
Nabin Hait
760b01912a Merge branch 'hotfix' into limit-cond-fix 2019-04-11 11:47:48 +05:30
Nabin Hait
8fd90410f1 Merge branch 'hotfix' into hotfix-shipping-override 2019-04-11 11:46:56 +05:30
Nabin Hait
4c331206f1 Merge branch 'hotfix' into patient_hotfix 2019-04-11 11:46:53 +05:30
Nabin Hait
f62e789173 Merge branch 'hotfix' into fec_improvement 2019-04-11 11:46:43 +05:30
Nabin Hait
02181c017a Merge branch 'hotfix' into patch-2 2019-04-11 11:46:39 +05:30
Nabin Hait
7fece8f431 Merge branch 'hotfix' into revert-16926-salary-slip-fix 2019-04-11 11:46:35 +05:30
Nabin Hait
bd7a165318 Merge branch 'hotfix' into ar-credit-note 2019-04-11 11:46:16 +05:30
Nabin Hait
4114365017 Merge branch 'hotfix' into hotfix-company-address-label 2019-04-11 11:46:08 +05:30
Nabin Hait
aace25ac2b Merge branch 'hotfix' into vedmata-print-fixes 2019-04-11 11:46:00 +05:30
Nabin Hait
697f1186c0 Merge branch 'hotfix' into duplicate-variant-check 2019-04-11 11:45:49 +05:30
Nabin Hait
55bee7a393 Merge branch 'hotfix' into allow-items-not-in-stock 2019-04-11 11:45:42 +05:30
Nabin Hait
c151b58acd Merge branch 'hotfix' into rounding-adjustment-gle 2019-04-11 11:45:36 +05:30
Sahil Khan
ef73452abe feat(sync_site): return erpnext data in levels 2019-04-10 15:29:49 +05:30
Nabin Hait
ff73090ad2 fix: Rounding Adjustment GL Entry 2019-04-09 19:24:54 +05:30
Faris Ansari
b63adcbac7 feat: Allow items not in stock to be added in cart 2019-04-09 18:41:31 +05:30
Faris Ansari
f492d5f61d fix: Validate variant attributes only if is_new 2019-04-09 15:19:10 +05:30
Anurag Mishra
4ac386d0fe fix: Removed Extra page on generating pdf in print formats 2019-04-08 11:43:24 +05:30
Anurag Mishra
4753bd4519 fix: UI on generating pdf in print format 2019-04-08 10:53:19 +05:30
Anurag Mishra
76815cf2be fix: removed before from accounts_controlle.pyr and fetch the gl from frontend 2019-04-06 12:07:40 +05:30
Rohan Bansal
936d147b4b fix(selling): Add missing label to company address field 2019-04-05 18:15:04 +05:30
Nabin Hait
20090306f6 fix: Show standalone credit note in Accounts receivable report 2019-04-05 18:06:07 +05:30
Anurag Mishra
a1a7beb12e fix: Print Auditing print format 2019-04-05 12:35:46 +05:30
Himanshu Warekar
9f2847e86c fix: test case fixes for travis 2019-04-05 11:40:37 +05:30
Himanshu Warekar
44d8224a3b fix: test case fix 2019-04-04 15:40:36 +05:30
Himanshu Warekar
5ba438af80 fix: fetch payment terms 2019-04-03 16:53:19 +05:30
Nabin Hait
3d6b51089c Revert "fix(Salary Slip): Consider Leave without Pay for calculation (#16926)"
This reverts commit 6343a697a2.
2019-04-01 11:09:55 +05:30
Aulia Bismar
f817663f11 Renumber Aktiva, remove excess 0 2019-04-01 10:37:28 +07:00
Nabin Hait
bf5ea691cf fixed merge conflict 2019-03-28 11:35:39 +05:30
Charles-Henri Decultot
91578757ff Addition of third party types in FEC 2019-03-26 08:57:36 +00:00
Jamsheer
48e206d983 fix: Patient relation - patient link is not showing 2019-03-21 16:11:12 +05:30
Himanshu
bed6f4748e Merge pull request #6 from frappe/hotfix
Hotfix
2019-03-18 20:48:26 +05:30
Rohan Bansal
eac87b4764 fix(transaction): Avoid shipping rule charge override by tax template 2019-03-11 15:02:39 +05:30
Himanshu
ee2b523b31 Merge pull request #5 from frappe/hotfix
Hotfix
2019-03-09 00:05:50 +05:30
Sahil Khan
88bd0674ed fix: set warehouse from defalut_warehouse_for_sales_return in sales return 2019-02-26 14:50:20 +05:30
Nabin Hait
4ff2b0114f fix: Removed limit conditionas it does not make sense in get_outstanding function 2019-02-21 17:48:21 +05:30
Nabin Hait
e7cc6649eb fix: Limit conditions while fetching payment entries 2019-02-21 17:23:23 +05:30
Charles-Henri Decultot
4d19d344b6 Merge branch 'hotfix' into plaid_reconciliation 2019-02-19 11:05:00 +00:00
Himanshu
e7bc2beea0 Remove illegal character after break 2019-02-06 15:55:49 +05:30
Himanshu
cd416a3135 Merge pull request #4 from frappe/hotfix
Hotfix
2019-02-06 15:54:33 +05:30
Nabin Hait
2a0e8e24ec Merge branch 'staging-fixes' into plaid_reconciliation 2019-01-24 14:11:00 +05:30
Charles-Henri Decultot
c75300dc43 Purchase invoice modified date 2019-01-07 15:46:25 +00:00
Charles-Henri Decultot
8d36b362d1 Merge conflict resolution 2019-01-07 15:24:39 +00:00
Charles-Henri Decultot
4c57fae726 Codacy correction 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
2d1b5b0769 Codacy corrections 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
1d7646f31f Codacy corrections 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
1a19746904 Codacy corrections 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
e7fec6e659 Codacy corrections 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
c45e271b3e Add button to unlink bank account 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
422d483baf Move actions menu to standard menu 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
c56f771c81 UX corrections + additional tests 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
89923b84b1 UX enhancements 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
c936f07a1e Correct Travis error 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
aea2fbf82d Correct test case for Travis 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
7a1ea42271 Addition of test cases 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
58438f4e5b Duplicate query to avoid SQL injection 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
f6d18e81e9 Modify SQL queries and add a test case 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
e8f3050e27 Codacy corrections 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
cbe63ec418 Codacy corrections 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
94899981d3 Dev cleanup 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
6a4dae3a9d Codacy corrections + sql queries 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
57c6b49d1a Dev cleanup 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
eae7424984 Cleanup dev 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
e394cec194 Bank reconciliation dashboard 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
818492387a WIP 2019-01-07 15:21:57 +00:00
Charles-Henri Decultot
31cb24f48d Bank reconciliation WIP 2019-01-07 15:20:06 +00:00
Charles-Henri Decultot
590d8d3d3e Bank reconciliation wip 2019-01-07 15:20:06 +00:00
Charles-Henri Decultot
6025e498f2 Bank reconciliation wip 2019-01-07 15:20:06 +00:00
Charles-Henri Decultot
09cad814cd Reconciliation dashboard wip 2019-01-07 15:20:06 +00:00
Charles-Henri Decultot
c75a2b1eed Plaid integration 2019-01-07 15:20:06 +00:00
457 changed files with 37527 additions and 23424 deletions

3
.gitignore vendored
View File

@@ -13,4 +13,5 @@ erpnext/docs/current
__pycache__
*~
.vscode/
node_modules/
node_modules/
.idea/

View File

@@ -1,56 +1,80 @@
language: python
dist: trusty
python:
- "2.7"
language: python
services:
- mysql
git:
depth: 1
install:
# fix mongodb travis error
- sudo rm /etc/apt/sources.list.d/mongodb*.list
- pip install flake8==3.3.0
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
- sudo rm /etc/apt/sources.list.d/docker.list
- sudo apt-get install hhvm && rm -rf /home/travis/.kiex/
- sudo apt-get purge -y mysql-common mysql-server mysql-client
- nvm install 10
- pip install python-coveralls
- wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
- sudo python install.py --develop --user travis --without-bench-setup
- sudo pip install -e ~/bench
cache:
- pip
- rm $TRAVIS_BUILD_DIR/.git/shallow
- bash $TRAVIS_BUILD_DIR/travis/bench_init.sh
- cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
before_script:
- mysql -u root -ptravis -e 'create database test_frappe'
- echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
- echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis
- cd ~/frappe-bench
- bench get-app erpnext $TRAVIS_BUILD_DIR
- bench use test_site
- bench reinstall --mariadb-root-username root --mariadb-root-password travis --yes
- bench scheduler disable
- sed -i 's/9000/9001/g' sites/common_site_config.json
- bench start &
- sleep 10
addons:
hosts: test_site
mariadb: 10.3
jobs:
include:
- stage: test
script:
- set -e
- bench run-tests --app erpnext --coverage
after_script:
- coveralls -b apps/erpnext -d ../../sites/.coverage
env: Server Side Test
- # stage
script:
- wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
- bench --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz --mariadb-root-password travis
- bench migrate
env: Patch Testing
- name: "Python 2.7 Server Side Test"
python: 2.7
script: bench --site test_site run-tests --app erpnext --coverage
- name: "Python 3.6 Server Side Test"
python: 3.6
script: bench --site test_site run-tests --app erpnext --coverage
- name: "Python 2.7 Patch Test"
python: 2.7
before_script:
- wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
- bench --site test_site --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz
script: bench --site test_site migrate
- name: "Python 3.6 Patch Test"
python: 3.6
before_script:
- wget http://build.erpnext.com/20171108_190013_955977f8_database.sql.gz
- bench --site test_site --force restore ~/frappe-bench/20171108_190013_955977f8_database.sql.gz
script: bench --site test_site migrate
install:
- cd ~
- nvm install 10
- git clone https://github.com/frappe/bench --depth 1
- pip install -e ./bench
- git clone https://github.com/frappe/frappe --branch $TRAVIS_BRANCH --depth 1
- bench init --skip-assets --frappe-path ~/frappe --python $(which python) frappe-bench
- mkdir ~/frappe-bench/sites/test_site
- cp -r $TRAVIS_BUILD_DIR/.travis/site_config.json ~/frappe-bench/sites/test_site/
- mysql -u root -e "SET GLOBAL character_set_server = 'utf8mb4'"
- mysql -u root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
- mysql -u root -e "CREATE DATABASE test_frappe"
- mysql -u root -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"
- mysql -u root -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"
- mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('travis') WHERE User='root'"
- mysql -u root -e "FLUSH PRIVILEGES"
- wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
- tar -xf /tmp/wkhtmltox.tar.xz -C /tmp
- sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
- sudo chmod o+x /usr/local/bin/wkhtmltopdf
- cd ~/frappe-bench
- sed -i 's/watch:/# watch:/g' Procfile
- sed -i 's/schedule:/# schedule:/g' Procfile
- sed -i 's/socketio:/# socketio:/g' Procfile
- sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile
- bench get-app erpnext $TRAVIS_BUILD_DIR
- bench start &
- bench --site test_site reinstall --yes
after_script:
- pip install python-coveralls
- coveralls -b apps/erpnext -d ../../sites/.coverage

View File

@@ -6,7 +6,8 @@
"mail_login": "test@example.com",
"mail_password": "test",
"admin_password": "admin",
"run_selenium_tests": 1,
"host_name": "http://localhost:8000",
"root_login": "root",
"root_password": "travis",
"host_name": "http://test_site:8000",
"install_apps": ["erpnext"]
}

View File

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

View File

@@ -1,5 +1,5 @@
<div align="center">
<img src="https://github.com/frappe/design/blob/master/logos/erpnext-logo.svg" height="128">
<img src="https://github.com/frappe/design/blob/master/logos/logo-2019/erpnext-logo.png" height="128">
<h2>ERPNext</h2>
<p align="center">
<p>ERP made simple</p>

View File

@@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '11.1.20'
__version__ = '11.1.61'
def get_default_company(user=None):
'''Get default company for user'''

View File

@@ -42,15 +42,14 @@ frappe.ui.form.on('Account', {
// show / hide convert buttons
frm.trigger('add_toolbar_buttons');
}
frm.add_custom_button(__('Update Account Name / Number'), function () {
frm.trigger("update_account_number");
});
}
if(!frm.doc.__islocal) {
frm.add_custom_button(__('Merge Account'), function () {
frm.trigger("merge_account");
});
if (frm.has_perm('write')) {
frm.add_custom_button(__('Update Account Name / Number'), function () {
frm.trigger("update_account_number");
});
frm.add_custom_button(__('Merge Account'), function () {
frm.trigger("merge_account");
});
}
}
},
account_type: function (frm) {

View File

@@ -105,20 +105,27 @@ class Account(NestedSet):
descendants = get_descendants_of('Company', self.company)
if not descendants: return
acc_name_map = {}
acc_name = frappe.db.get_value('Account', self.parent_account, "account_name")
parent_acc_name_map = {}
parent_acc_name = frappe.db.get_value('Account', self.parent_account, "account_name")
for d in frappe.db.get_values('Account',
{"company": ["in", descendants], "account_name": acc_name},
{"company": ["in", descendants], "account_name": parent_acc_name},
["company", "name"], as_dict=True):
acc_name_map[d["company"]] = d["name"]
parent_acc_name_map[d["company"]] = d["name"]
if not acc_name_map: return
if not parent_acc_name_map: return
for company in descendants:
if not parent_acc_name_map.get(company):
frappe.throw(_("While creating account for child Company {0}, parent account {1} not found. Please create the parent account in corresponding COA")
.format(company, parent_acc_name))
doc = frappe.copy_doc(self)
doc.flags.ignore_root_company_validation = True
doc.update({"company": company, "account_currency": None,
"parent": acc_name_map[company], "parent_account": acc_name_map[company]})
doc.update({
"company": company,
"account_currency": None,
"parent_account": parent_acc_name_map[company]
})
doc.save()
frappe.msgprint(_("Account {0} is added in the child company {1}")
.format(doc.name, company))
@@ -261,7 +268,7 @@ def update_account_number(name, account_name, account_number=None):
new_name = get_account_autoname(account_number, account_name, account.company)
if name != new_name:
frappe.rename_doc("Account", name, new_name, ignore_permissions=1)
frappe.rename_doc("Account", name, new_name, force=1)
return new_name
@frappe.whitelist()
@@ -280,7 +287,7 @@ def merge_account(old, new, is_group, root_type, company):
frappe.db.set_value("Account", new, "parent_account",
frappe.db.get_value("Account", old, "parent_account"))
frappe.rename_doc("Account", old, new, merge=1, ignore_permissions=1)
frappe.rename_doc("Account", old, new, merge=1, force=1)
return new

View File

@@ -121,7 +121,11 @@ frappe.treeview_settings["Account"] = {
},
onrender: function(node) {
if(frappe.boot.user.can_read.indexOf("GL Entry") !== -1){
var dr_or_cr = node.data.balance < 0 ? "Cr" : "Dr";
// show Dr if positive since balance is calculated as debit - credit else show Cr
let balance = node.data.balance_in_account_currency || node.data.balance;
let dr_or_cr = balance > 0 ? "Dr": "Cr";
if (node.data && node.data.balance!==undefined) {
$('<span class="balance-area pull-right text-muted small">'
+ (node.data.balance_in_account_currency ?

View File

@@ -1,6 +1,6 @@
{
"country_code": "de",
"name": "Germany - Kontenplan SKR04",
"name": "SKR04 ohne Kontonummern",
"tree": {
"Bilanz - Aktiva": {
"Anlageverm\u00f6gen": {
@@ -1383,8 +1383,7 @@
"Sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge 1": {
"Diskontertr\u00e4ge": {},
"Diskontertr\u00e4ge aus verbundenen Unternehmen": {},
"Laufende Ertr\u00e4ge aus Anteilen an Kapitalgesellschaften 100% / 50% steuerfrei": {},
"Laufende Ertr\u00e4ge aus Anteilen an Kapitalgesellschaften 100% / 50% steuerfrei": {},
"Laufende Ertr\u00e4ge aus Anteilen an Kapitalgesellschaften 100% / 50% steuerfrei": {},
"Sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge 2": {},
"Sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge aus verbundenen Unternehmen": {},
"Sonstige Zinsertr\u00e4ge": {},
@@ -1703,4 +1702,4 @@
"root_type": "Asset"
}
}
}
}

View File

@@ -38,24 +38,24 @@
"Kas": {
"Kas Mata Uang Lain": {
"Kas USD": {
"account_number": "1112.0010",
"account_number": "1112.001",
"account_type": "Cash"
},
"account_number": "1112.000"
},
"Kas Rupiah": {
"Kas Besar": {
"account_number": "1111.0020",
"account_number": "1111.002",
"account_type": "Cash"
},
"Kas Kecil": {
"account_number": "1111.0010",
"account_number": "1111.001",
"account_type": "Cash"
},
"account_number": "1111.000",
"account_type": "Cash"
},
"account_number": "1110.0000"
"account_number": "1110.000"
},
"Pendapatan Yang Akan di Terima": {
"Pendapatan Yang di Terima": {
@@ -98,7 +98,7 @@
},
"account_number": "1130.000"
},
"account_number": "1100.0000"
"account_number": "1100.000"
},
"Aktiva Tetap": {
"Aktiva": {
@@ -121,20 +121,20 @@
"Investasi": {
"Investasi": {
"Deposito": {
"account_number": "1231.003",
"account_number": "1231.300",
"is_group": 1
},
"Investai Saham": {
"Investasi Saham": {
"Investasi Saham": {
"account_number": "1231.0011"
"account_number": "1231.101"
},
"account_number": "1231.001"
"account_number": "1231.100"
},
"Investasi Perumahan": {
"Investasi Perumahan": {
"account_number": "1231.0021"
"account_number": "1231.201"
},
"account_number": "1231.002"
"account_number": "1231.200"
},
"account_number": "1231.000"
},
@@ -142,7 +142,7 @@
},
"account_number": "1200.000"
},
"account_number": "1000.0000",
"account_number": "1000.000",
"root_type": "Asset"
},
"Beban": {
@@ -684,4 +684,4 @@
"root_type": "Income"
}
}
}
}

View File

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

View File

@@ -0,0 +1,134 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:account_subtype",
"beta": 0,
"creation": "2018-10-25 15:46:08.054586",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account_subtype",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Subtype",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 1
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-10-25 15:47:03.841390",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account Subtype",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0,
"track_views": 0
}

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class AccountSubtype(Document):
pass

View File

@@ -0,0 +1,23 @@
/* eslint-disable */
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Account Subtype", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially([
// insert a new Account Subtype
() => frappe.tests.make('Account Subtype', [
// values to be set
{key: 'value'}
]),
() => {
assert.equal(cur_frm.doc.key, 'value');
},
() => done()
]);
});

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import unittest
class TestAccountSubtype(unittest.TestCase):
pass

View File

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

View File

@@ -0,0 +1,134 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:account_type",
"beta": 0,
"creation": "2018-10-25 15:45:45.789963",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account_type",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Type",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 1
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-10-25 15:46:51.042604",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account Type",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0,
"track_views": 0
}

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class AccountType(Document):
pass

View File

@@ -0,0 +1,23 @@
/* eslint-disable */
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Account Type", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially([
// insert a new Account Type
() => frappe.tests.make('Account Type', [
// values to be set
{key: 'value'}
]),
() => {
assert.equal(cur_frm.doc.key, 'value');
},
() => done()
]);
});

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import unittest
class TestAccountType(unittest.TestCase):
pass

View File

@@ -167,39 +167,7 @@
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "status",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Status",
"length": 0,
"no_copy": 0,
"options": "Open\nClosed",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
@@ -273,7 +241,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-04-13 19:14:47.593753",
"modified": "2019-08-01 19:14:47.593753",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Period",

View File

@@ -5,6 +5,9 @@
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
class OverlapError(frappe.ValidationError): pass
class AccountingPeriod(Document):
def validate(self):
@@ -16,7 +19,7 @@ class AccountingPeriod(Document):
def autoname(self):
company_abbr = frappe.get_cached_value('Company', self.company, "abbr")
self.name = " - ".join([self.period_name, company_abbr])
def validate_overlap(self):
existing_accounting_period = frappe.db.sql("""select name from `tabAccounting Period`
where (
@@ -33,12 +36,13 @@ class AccountingPeriod(Document):
}, as_dict=True)
if len(existing_accounting_period) > 0:
frappe.throw("Accounting Period overlaps with {0}".format(existing_accounting_period[0].get("name")))
frappe.throw(_("Accounting Period overlaps with {0}")
.format(existing_accounting_period[0].get("name")), OverlapError)
def get_doctypes_for_closing(self):
docs_for_closing = []
#if not self.closed_documents or len(self.closed_documents) == 0:
doctypes = ["Sales Invoice", "Purchase Invoice", "Journal Entry", "Payroll Entry", "Bank Reconciliation", "Asset", "Purchase Order", "Sales Order", "Leave Application", "Leave Allocation", "Stock Entry"]
doctypes = ["Sales Invoice", "Purchase Invoice", "Journal Entry", "Payroll Entry", "Bank Reconciliation",
"Asset", "Purchase Order", "Sales Order", "Leave Application", "Leave Allocation", "Stock Entry"]
closed_doctypes = [{"document_type": doctype, "closed": 1} for doctype in doctypes]
for closed_doctype in closed_doctypes:
docs_for_closing.append(closed_doctype)
@@ -51,4 +55,4 @@ class AccountingPeriod(Document):
self.append('closed_documents', {
"document_type": doctype_for_closing.document_type,
"closed": doctype_for_closing.closed
})
})

View File

@@ -5,23 +5,42 @@ from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import nowdate, add_months
from erpnext.accounts.general_ledger import ClosedAccountingPeriod
from erpnext.accounts.doctype.accounting_period.accounting_period import OverlapError
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
# class TestAccountingPeriod(unittest.TestCase):
# def test_overlap(self):
# ap1 = create_accounting_period({"start_date":"2018-04-01", "end_date":"2018-06-30", "company":"Wind Power LLC"})
# ap1.save()
# ap2 = create_accounting_period({"start_date":"2018-06-30", "end_date":"2018-07-10", "company":"Wind Power LLC"})
# self.assertRaises(frappe.OverlapError, accounting_period_2.save())
#
# def tearDown(self):
# pass
#
#
# def create_accounting_period(**args):
# accounting_period = frappe.new_doc("Accounting Period")
# accounting_period.start_date = args.start_date or frappe.utils.datetime.date(2018, 4, 1)
# accounting_period.end_date = args.end_date or frappe.utils.datetime.date(2018, 6, 30)
# accounting_period.company = args.company
# accounting_period.period_name = "_Test_Period_Name_1"
#
# return accounting_period
class TestAccountingPeriod(unittest.TestCase):
def test_overlap(self):
ap1 = create_accounting_period(start_date = "2018-04-01",
end_date = "2018-06-30", company = "Wind Power LLC")
ap1.save()
ap2 = create_accounting_period(start_date = "2018-06-30",
end_date = "2018-07-10", company = "Wind Power LLC", period_name = "Test Accounting Period 1")
self.assertRaises(OverlapError, ap2.save)
def test_accounting_period(self):
ap1 = create_accounting_period(period_name = "Test Accounting Period 2")
ap1.save()
doc = create_sales_invoice(do_not_submit=1, cost_center = "_Test Company - _TC", warehouse = "Stores - _TC")
self.assertRaises(ClosedAccountingPeriod, doc.submit)
def tearDown(self):
for d in frappe.get_all("Accounting Period"):
frappe.delete_doc("Accounting Period", d.name)
def create_accounting_period(**args):
args = frappe._dict(args)
accounting_period = frappe.new_doc("Accounting Period")
accounting_period.start_date = args.start_date or nowdate()
accounting_period.end_date = args.end_date or add_months(nowdate(), 1)
accounting_period.company = args.company or "_Test Company"
accounting_period.period_name =args.period_name or "_Test_Period_Name_1"
accounting_period.append("closed_documents", {
"document_type": 'Sales Invoice', "closed": 1
})
return accounting_period

View File

@@ -2,7 +2,29 @@
// For license information, please see license.txt
frappe.ui.form.on('Bank', {
onload: function(frm) {
add_fields_to_mapping_table(frm);
},
refresh: function(frm) {
add_fields_to_mapping_table(frm);
}
});
let add_fields_to_mapping_table = function (frm) {
let options = [];
frappe.model.with_doctype("Bank Transaction", function() {
let meta = frappe.get_meta("Bank Transaction");
meta.fields.forEach(value => {
if (!["Section Break", "Column Break"].includes(value.fieldtype)) {
options.push(value.fieldname);
}
});
});
frappe.meta.get_docfield("Bank Transaction Mapping", "bank_transaction_field",
frm.doc.name).options = options;
frm.fields_dict.bank_transaction_mapping.grid.refresh();
};

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
@@ -15,6 +16,7 @@
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -42,6 +44,134 @@
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"columns": 0,
"fieldname": "data_import_configuration_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Data Import Configuration",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank_transaction_mapping",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bank Transaction Mapping",
"length": 0,
"no_copy": 0,
"options": "Bank Transaction Mapping",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_4",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "plaid_access_token",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Plaid Access Token",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
@@ -55,7 +185,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-04-07 17:00:21.246202",
"modified": "2018-11-27 16:12:13.938776",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank",
@@ -64,7 +194,6 @@
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
@@ -90,5 +219,6 @@
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
"track_seen": 0,
"track_views": 0
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Account', {
@@ -12,6 +12,11 @@ frappe.ui.form.on('Bank Account', {
}
};
});
frm.set_query("party_type", function() {
return {
query: "erpnext.setup.doctype.party_type.party_type.get_party_type",
};
});
},
refresh: function(frm) {
frappe.dynamic_link = { doc: frm.doc, fieldname: 'name', doctype: 'Bank Account' }
@@ -24,5 +29,13 @@ frappe.ui.form.on('Bank Account', {
else {
frappe.contacts.render_address_and_contact(frm);
}
if (frm.doc.integration_id) {
frm.add_custom_button(__("Unlink external integrations"), function() {
frappe.confirm(__("This action will unlink this account from any external service integrating ERPNext with your bank accounts. It cannot be undone. Are you certain ?"), function() {
frm.set_value("integration_id", "");
});
});
}
}
});

File diff suppressed because it is too large Load Diff

View File

@@ -13,16 +13,50 @@ class BankAccount(Document):
"""Load address and contacts in `__onload`"""
load_address_and_contact(self)
def autoname(self):
self.name = self.account_name + " - " + self.bank
def on_trash(self):
delete_contact_and_address('BankAccount', self.name)
def validate(self):
self.validate_company()
self.validate_iban()
def validate_company(self):
if self.is_company_account and not self.company:
frappe.throw(_("Company is manadatory for company account"))
def validate_iban(self):
'''
Algorithm: https://en.wikipedia.org/wiki/International_Bank_Account_Number#Validating_the_IBAN
'''
# IBAN field is optional
if not self.iban:
return
def encode_char(c):
# Position in the alphabet (A=1, B=2, ...) plus nine
return str(9 + ord(c) - 64)
# remove whitespaces, upper case to get the right number from ord()
iban = ''.join(self.iban.split(' ')).upper()
# Move country code and checksum from the start to the end
flipped = iban[4:] + iban[:4]
# Encode characters as numbers
encoded = [encode_char(c) if ord(c) >= 65 and ord(c) <= 90 else c for c in flipped]
try:
to_check = int(''.join(encoded))
except ValueError:
frappe.throw(_('IBAN is not valid'))
if to_check % 97 != 1:
frappe.throw(_('IBAN is not valid'))
@frappe.whitelist()
def make_bank_account(doctype, docname):
doc = frappe.new_doc("Bank Account")

View File

@@ -4,9 +4,46 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe import ValidationError
import unittest
# test_records = frappe.get_test_records('Bank Account')
class TestBankAccount(unittest.TestCase):
pass
def test_validate_iban(self):
valid_ibans = [
'GB82 WEST 1234 5698 7654 32',
'DE91 1000 0000 0123 4567 89',
'FR76 3000 6000 0112 3456 7890 189'
]
invalid_ibans = [
# wrong checksum (3rd place)
'GB72 WEST 1234 5698 7654 32',
'DE81 1000 0000 0123 4567 89',
'FR66 3000 6000 0112 3456 7890 189'
]
bank_account = frappe.get_doc({'doctype':'Bank Account'})
try:
bank_account.validate_iban()
except AttributeError:
msg = _('BankAccount.validate_iban() failed for empty IBAN')
self.fail(msg=msg)
for iban in valid_ibans:
bank_account.iban = iban
try:
bank_account.validate_iban()
except ValidationError:
msg = _('BankAccount.validate_iban() failed for valid IBAN {}'.format(iban))
self.fail(msg=msg)
for not_iban in invalid_ibans:
bank_account.iban = not_iban
msg = _('BankAccount.validate_iban() accepted invalid IBAN {}'.format(not_iban))
with self.assertRaises(ValidationError, msg=msg):
bank_account.validate_iban()

View File

@@ -43,8 +43,13 @@ frappe.ui.form.on('Bank Guarantee', {
reference_docname: function(frm) {
if (frm.doc.reference_docname && frm.doc.reference_doctype) {
let fields_to_fetch = ["project", "grand_total"];
let fields_to_fetch = ["grand_total"];
let party_field = frm.doc.reference_doctype == "Sales Order" ? "customer" : "supplier";
if (frm.doc.reference_doctype == "Sales Order") {
fields_to_fetch.push("project");
}
fields_to_fetch.push(party_field);
frappe.call({
method: "erpnext.accounts.doctype.bank_guarantee.bank_guarantee.get_vouchar_detials",

View File

@@ -22,7 +22,5 @@ class BankGuarantee(Document):
@frappe.whitelist()
def get_vouchar_detials(column_list, doctype, docname):
print (column_list, doctype, docname)
return frappe.db.sql(''' select {columns} from `tab{doctype}` where name=%s'''
.format(columns=", ".join(json.loads(column_list)), doctype=doctype), docname, as_dict=1)[0]

View File

@@ -48,7 +48,7 @@ class BankStatementTransactionEntry(Document):
def get_statement_headers(self):
if not self.bank_settings:
frappe.throw("Bank Data mapper doesn't exist")
frappe.throw(_("Bank Data mapper doesn't exist"))
mapper_doc = frappe.get_doc("Bank Statement Settings", self.bank_settings)
headers = {entry.mapped_header:entry.stmt_header for entry in mapper_doc.header_items}
return headers
@@ -57,7 +57,7 @@ class BankStatementTransactionEntry(Document):
if self.bank_statement is None: return
filename = self.bank_statement.split("/")[-1]
if (len(self.new_transaction_items + self.reconciled_transaction_items) > 0):
frappe.throw("Transactions already retreived from the statement")
frappe.throw(_("Transactions already retreived from the statement"))
date_format = frappe.get_value("Bank Statement Settings", self.bank_settings, "date_format")
if (date_format is None):
@@ -314,7 +314,7 @@ class BankStatementTransactionEntry(Document):
try:
reconcile_against_document(lst)
except:
frappe.throw("Exception occurred while reconciling {0}".format(payment.reference_name))
frappe.throw(_("Exception occurred while reconciling {0}".format(payment.reference_name)))
def submit_payment_entries(self):
for payment in self.new_transaction_items:
@@ -414,7 +414,7 @@ def get_transaction_entries(filename, headers):
elif (filename.lower().endswith("xls")):
rows = get_rows_from_xls_file(filename)
else:
frappe.throw("Only .csv and .xlsx files are supported currently")
frappe.throw(_("Only .csv and .xlsx files are supported currently"))
stmt_headers = headers.values()
for row in rows:

View File

@@ -0,0 +1,32 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Transaction', {
onload(frm) {
frm.set_query('payment_document', 'payment_entries', function() {
return {
"filters": {
"name": ["in", ["Payment Entry", "Journal Entry", "Sales Invoice", "Purchase Invoice", "Expense Claim"]]
}
};
});
}
});
frappe.ui.form.on('Bank Transaction Payments', {
payment_entries_remove: function(frm, cdt, cdn) {
update_clearance_date(frm, cdt, cdn);
}
});
const update_clearance_date = (frm, cdt, cdn) => {
if (frm.doc.docstatus === 1) {
frappe.xcall('erpnext.accounts.doctype.bank_transaction.bank_transaction.unclear_reference_payment',
{doctype: cdt, docname: cdn})
.then(e => {
if (e == "success") {
frappe.show_alert({message:__("Document {0} successfully uncleared", [e]), indicator:'green'});
}
});
}
};

View File

@@ -0,0 +1,833 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
"beta": 0,
"creation": "2018-10-22 18:19:02.784533",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "ACC-BTN-.YYYY.-",
"fetch_if_empty": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
"length": 0,
"no_copy": 1,
"options": "ACC-BTN-.YYYY.-",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 1,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Pending",
"fetch_if_empty": 0,
"fieldname": "status",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
"length": 0,
"no_copy": 0,
"options": "\nPending\nSettled\nUnreconciled\nReconciled",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "bank_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Bank Account",
"length": 0,
"no_copy": 0,
"options": "Bank Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "",
"fetch_from": "bank_account.company",
"fetch_if_empty": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_4",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "debit",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Debit",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "credit",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Credit",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_7",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "currency",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
"options": "Currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_10",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "description",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_14",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "reference_number",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Number",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "transaction_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction ID",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "payment_entries",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Entries",
"length": 0,
"no_copy": 0,
"options": "Bank Transaction Payments",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_18",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "allocated_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allocated Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Bank Transaction",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_17",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fetch_if_empty": 0,
"fieldname": "unallocated_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Unallocated Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-05-11 05:27:55.244721",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1
},
{
"amend": 0,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "date",
"sort_order": "DESC",
"title_field": "bank_account",
"track_changes": 0,
"track_seen": 0,
"track_views": 0
}

View File

@@ -0,0 +1,114 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from erpnext.controllers.status_updater import StatusUpdater
from frappe.utils import flt
from six.moves import reduce
from frappe import _
class BankTransaction(StatusUpdater):
def after_insert(self):
self.unallocated_amount = abs(flt(self.credit) - flt(self.debit))
def on_submit(self):
self.clear_linked_payment_entries()
self.set_status()
def on_update_after_submit(self):
self.update_allocations()
self.clear_linked_payment_entries()
self.set_status(update=True)
def update_allocations(self):
if self.payment_entries:
allocated_amount = reduce(lambda x, y: flt(x) + flt(y), [x.allocated_amount for x in self.payment_entries])
else:
allocated_amount = 0
if allocated_amount:
frappe.db.set_value(self.doctype, self.name, "allocated_amount", flt(allocated_amount))
frappe.db.set_value(self.doctype, self.name, "unallocated_amount", abs(flt(self.credit) - flt(self.debit)) - flt(allocated_amount))
else:
frappe.db.set_value(self.doctype, self.name, "allocated_amount", 0)
frappe.db.set_value(self.doctype, self.name, "unallocated_amount", abs(flt(self.credit) - flt(self.debit)))
amount = self.debit or self.credit
if amount == self.allocated_amount:
frappe.db.set_value(self.doctype, self.name, "status", "Reconciled")
self.reload()
def clear_linked_payment_entries(self):
for payment_entry in self.payment_entries:
allocated_amount = get_total_allocated_amount(payment_entry)
paid_amount = get_paid_amount(payment_entry, self.currency)
if paid_amount and allocated_amount:
if flt(allocated_amount[0]["allocated_amount"]) > flt(paid_amount):
frappe.throw(_("The total allocated amount ({0}) is greated than the paid amount ({1}).".format(flt(allocated_amount[0]["allocated_amount"]), flt(paid_amount))))
else:
if payment_entry.payment_document in ["Payment Entry", "Journal Entry", "Purchase Invoice", "Expense Claim"]:
self.clear_simple_entry(payment_entry)
elif payment_entry.payment_document == "Sales Invoice":
self.clear_sales_invoice(payment_entry)
def clear_simple_entry(self, payment_entry):
frappe.db.set_value(payment_entry.payment_document, payment_entry.payment_entry, "clearance_date", self.date)
def clear_sales_invoice(self, payment_entry):
frappe.db.set_value("Sales Invoice Payment", dict(parenttype=payment_entry.payment_document,
parent=payment_entry.payment_entry), "clearance_date", self.date)
def get_total_allocated_amount(payment_entry):
return frappe.db.sql("""
SELECT
SUM(btp.allocated_amount) as allocated_amount,
bt.name
FROM
`tabBank Transaction Payments` as btp
LEFT JOIN
`tabBank Transaction` bt ON bt.name=btp.parent
WHERE
btp.payment_document = %s
AND
btp.payment_entry = %s
AND
bt.docstatus = 1""", (payment_entry.payment_document, payment_entry.payment_entry), as_dict=True)
def get_paid_amount(payment_entry, currency):
if payment_entry.payment_document in ["Payment Entry", "Sales Invoice", "Purchase Invoice"]:
paid_amount_field = "paid_amount"
if payment_entry.payment_document == 'Payment Entry':
doc = frappe.get_doc("Payment Entry", payment_entry.payment_entry)
paid_amount_field = ("base_paid_amount"
if doc.paid_to_account_currency == currency else "paid_amount")
return frappe.db.get_value(payment_entry.payment_document,
payment_entry.payment_entry, paid_amount_field)
elif payment_entry.payment_document == "Journal Entry":
return frappe.db.get_value(payment_entry.payment_document, payment_entry.payment_entry, "total_credit")
elif payment_entry.payment_document == "Expense Claim":
return frappe.db.get_value(payment_entry.payment_document, payment_entry.payment_entry, "total_amount_reimbursed")
else:
frappe.throw(_("Please reconcile {0}: {1} manually".format(payment_entry.payment_document, payment_entry.payment_entry)))
@frappe.whitelist()
def unclear_reference_payment(doctype, docname):
if frappe.db.exists(doctype, docname):
doc = frappe.get_doc(doctype, docname)
if doctype == "Sales Invoice":
frappe.db.set_value("Sales Invoice Payment", dict(parenttype=doc.payment_document,
parent=doc.payment_entry), "clearance_date", None)
else:
frappe.db.set_value(doc.payment_document, doc.payment_entry, "clearance_date", None)
return doc.payment_entry

View File

@@ -0,0 +1,13 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.listview_settings['Bank Transaction'] = {
add_fields: ["unallocated_amount"],
get_indicator: function(doc) {
if(flt(doc.unallocated_amount)>0) {
return [__("Unreconciled"), "orange", "unallocated_amount,>,0"];
} else if(flt(doc.unallocated_amount)<=0) {
return [__("Reconciled"), "green", "unallocated_amount,=,0"];
}
}
};

View File

@@ -0,0 +1,80 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import json
from frappe.utils import getdate
from frappe.utils.dateutils import parse_date
from six import iteritems
@frappe.whitelist()
def upload_bank_statement():
if getattr(frappe, "uploaded_file", None):
with open(frappe.uploaded_file, "rb") as upfile:
fcontent = upfile.read()
else:
from frappe.utils.file_manager import get_uploaded_content
fname, fcontent = get_uploaded_content()
if frappe.safe_encode(fname).lower().endswith("csv".encode('utf-8')):
from frappe.utils.csvutils import read_csv_content
rows = read_csv_content(fcontent, False)
elif frappe.safe_encode(fname).lower().endswith("xlsx".encode('utf-8')):
from frappe.utils.xlsxutils import read_xlsx_file_from_attached_file
rows = read_xlsx_file_from_attached_file(fcontent=fcontent)
columns = rows[0]
rows.pop(0)
data = rows
return {"columns": columns, "data": data}
@frappe.whitelist()
def create_bank_entries(columns, data, bank_account):
header_map = get_header_mapping(columns, bank_account)
success = 0
errors = 0
for d in json.loads(data):
if all(item is None for item in d) is True:
continue
fields = {}
for key, value in iteritems(header_map):
fields.update({key: d[int(value)-1]})
try:
bank_transaction = frappe.get_doc({
"doctype": "Bank Transaction"
})
bank_transaction.update(fields)
bank_transaction.date = getdate(parse_date(bank_transaction.date))
bank_transaction.bank_account = bank_account
bank_transaction.insert()
bank_transaction.submit()
success += 1
except Exception:
frappe.log_error(frappe.get_traceback())
errors += 1
return {"success": success, "errors": errors}
def get_header_mapping(columns, bank_account):
mapping = get_bank_mapping(bank_account)
header_map = {}
for column in json.loads(columns):
if column["content"] in mapping:
header_map.update({mapping[column["content"]]: column["colIndex"]})
return header_map
def get_bank_mapping(bank_account):
bank_name = frappe.db.get_value("Bank Account", bank_account, "bank")
bank = frappe.get_doc("Bank", bank_name)
mapping = {row.file_field:row.bank_transaction_field for row in bank.bank_transaction_mapping}
return mapping

View File

@@ -0,0 +1,23 @@
/* eslint-disable */
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Bank Transaction", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially([
// insert a new Bank Transaction
() => frappe.tests.make('Bank Transaction', [
// values to be set
{key: 'value'}
]),
() => {
assert.equal(cur_frm.doc.key, 'value');
},
() => done()
]);
});

View File

@@ -0,0 +1,286 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
from erpnext.accounts.page.bank_reconciliation.bank_reconciliation import reconcile, get_linked_payments
test_dependencies = ["Item", "Cost Center"]
class TestBankTransaction(unittest.TestCase):
def setUp(self):
add_transactions()
add_payments()
def tearDown(self):
for bt in frappe.get_all("Bank Transaction"):
doc = frappe.get_doc("Bank Transaction", bt.name)
doc.cancel()
doc.delete()
# Delete directly in DB to avoid validation errors for countries not allowing deletion
frappe.db.sql("""delete from `tabPayment Entry Reference`""")
frappe.db.sql("""delete from `tabPayment Entry`""")
frappe.flags.test_bank_transactions_created = False
frappe.flags.test_payments_created = False
# This test checks if ERPNext is able to provide a linked payment for a bank transaction based on the amount of the bank transaction.
def test_linked_payments(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Re 95282925234 FE/000002917 AT171513000281183046 Conrad Electronic"))
linked_payments = get_linked_payments(bank_transaction.name)
self.assertTrue(linked_payments[0].party == "Conrad Electronic")
# This test validates a simple reconciliation leading to the clearance of the bank transaction and the payment
def test_reconcile(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G"))
payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1200))
reconcile(bank_transaction.name, "Payment Entry", payment.name)
unallocated_amount = frappe.db.get_value("Bank Transaction", bank_transaction.name, "unallocated_amount")
self.assertTrue(unallocated_amount == 0)
clearance_date = frappe.db.get_value("Payment Entry", payment.name, "clearance_date")
self.assertTrue(clearance_date is not None)
# Check if ERPNext can correctly fetch a linked payment based on the party
def test_linked_payments_based_on_party(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000003025 OPSKATTUZWXXX AT776000000098709849 Herr G"))
linked_payments = get_linked_payments(bank_transaction.name)
self.assertTrue(len(linked_payments)==1)
# Check if ERPNext can correctly filter a linked payments based on the debit/credit amount
def test_debit_credit_output(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07"))
linked_payments = get_linked_payments(bank_transaction.name)
self.assertTrue(linked_payments[0].payment_type == "Pay")
# Check error if already reconciled
def test_already_reconciled(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G"))
payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1200))
reconcile(bank_transaction.name, "Payment Entry", payment.name)
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G"))
payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1200))
self.assertRaises(frappe.ValidationError, reconcile, bank_transaction=bank_transaction.name, payment_doctype="Payment Entry", payment_name=payment.name)
# Raise an error if creditor transaction vs creditor payment
def test_invalid_creditor_reconcilation(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="I2015000011 VD/000002514 ATWWXXX AT4701345000003510057 Bio"))
payment = frappe.get_doc("Payment Entry", dict(party="Conrad Electronic", paid_amount=690))
self.assertRaises(frappe.ValidationError, reconcile, bank_transaction=bank_transaction.name, payment_doctype="Payment Entry", payment_name=payment.name)
# Raise an error if debitor transaction vs debitor payment
def test_invalid_debitor_reconcilation(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07"))
payment = frappe.get_doc("Payment Entry", dict(party="Fayva", paid_amount=109080))
self.assertRaises(frappe.ValidationError, reconcile, bank_transaction=bank_transaction.name, payment_doctype="Payment Entry", payment_name=payment.name)
# Raise an error if debitor transaction vs debitor payment
def test_clear_sales_invoice(self):
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="I2015000011 VD/000002514 ATWWXXX AT4701345000003510057 Bio"))
payment = frappe.get_doc("Sales Invoice", dict(customer="Fayva", status=["=", "Paid"]))
reconcile(bank_transaction.name, "Sales Invoice", payment.name)
self.assertEqual(frappe.db.get_value("Bank Transaction", bank_transaction.name, "unallocated_amount"), 0)
self.assertTrue(frappe.db.get_value("Sales Invoice Payment", dict(parent=payment.name), "clearance_date") is not None)
def add_transactions():
if frappe.flags.test_bank_transactions_created:
return
frappe.set_user("Administrator")
try:
frappe.get_doc({
"doctype": "Bank",
"bank_name":"Citi Bank",
}).insert()
except frappe.DuplicateEntryError:
pass
try:
frappe.get_doc({
"doctype": "Bank Account",
"account_name":"Checking Account",
"bank": "Citi Bank",
"account": "_Test Bank - _TC"
}).insert()
except frappe.DuplicateEntryError:
pass
doc = frappe.get_doc({
"doctype": "Bank Transaction",
"description":"1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G",
"date": "2018-10-23",
"debit": 1200,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
doc.submit()
doc = frappe.get_doc({
"doctype": "Bank Transaction",
"description":"1512567 BG/000003025 OPSKATTUZWXXX AT776000000098709849 Herr G",
"date": "2018-10-23",
"debit": 1700,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
doc.submit()
doc = frappe.get_doc({
"doctype": "Bank Transaction",
"description":"Re 95282925234 FE/000002917 AT171513000281183046 Conrad Electronic",
"date": "2018-10-26",
"debit": 690,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
doc.submit()
doc = frappe.get_doc({
"doctype": "Bank Transaction",
"description":"Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07",
"date": "2018-10-27",
"debit": 3900,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
doc.submit()
doc = frappe.get_doc({
"doctype": "Bank Transaction",
"description":"I2015000011 VD/000002514 ATWWXXX AT4701345000003510057 Bio",
"date": "2018-10-27",
"credit": 109080,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
doc.submit()
frappe.flags.test_bank_transactions_created = True
def add_payments():
if frappe.flags.test_payments_created:
return
frappe.set_user("Administrator")
try:
frappe.get_doc({
"doctype": "Supplier",
"supplier_group":"All Supplier Groups",
"supplier_type": "Company",
"supplier_name": "Conrad Electronic"
}).insert()
except frappe.DuplicateEntryError:
pass
pi = make_purchase_invoice(supplier="Conrad Electronic", qty=1, rate=690)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe.reference_no = "Conrad Oct 18"
pe.reference_date = "2018-10-24"
pe.insert()
pe.submit()
try:
frappe.get_doc({
"doctype": "Supplier",
"supplier_group":"All Supplier Groups",
"supplier_type": "Company",
"supplier_name": "Mr G"
}).insert()
except frappe.DuplicateEntryError:
pass
pi = make_purchase_invoice(supplier="Mr G", qty=1, rate=1200)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe.reference_no = "Herr G Oct 18"
pe.reference_date = "2018-10-24"
pe.insert()
pe.submit()
pi = make_purchase_invoice(supplier="Mr G", qty=1, rate=1700)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe.reference_no = "Herr G Nov 18"
pe.reference_date = "2018-11-01"
pe.insert()
pe.submit()
try:
frappe.get_doc({
"doctype": "Supplier",
"supplier_group":"All Supplier Groups",
"supplier_type": "Company",
"supplier_name": "Poore Simon's"
}).insert()
except frappe.DuplicateEntryError:
pass
try:
frappe.get_doc({
"doctype": "Customer",
"customer_group":"All Customer Groups",
"customer_type": "Company",
"customer_name": "Poore Simon's"
}).insert()
except frappe.DuplicateEntryError:
pass
pi = make_purchase_invoice(supplier="Poore Simon's", qty=1, rate=3900)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe.reference_no = "Poore Simon's Oct 18"
pe.reference_date = "2018-10-28"
pe.insert()
pe.submit()
si = create_sales_invoice(customer="Poore Simon's", qty=1, rate=3900)
pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank - _TC")
pe.reference_no = "Poore Simon's Oct 18"
pe.reference_date = "2018-10-28"
pe.insert()
pe.submit()
try:
frappe.get_doc({
"doctype": "Customer",
"customer_group":"All Customer Groups",
"customer_type": "Company",
"customer_name": "Fayva"
}).insert()
except frappe.DuplicateEntryError:
pass
si = create_sales_invoice(customer="Fayva", qty=1, rate=109080)
pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank - _TC")
pe.reference_no = "Fayva Oct 18"
pe.reference_date = "2018-10-29"
pe.insert()
pe.submit()
company = frappe.db.get_single_value('Global Defaults', 'default_company')
frappe.get_doc({
"doctype": "Mode of Payment",
"name": "Cash"
}).append("accounts", {
"company": company,
"default_account": "_Test Bank - _TC"
}).save()
si = create_sales_invoice(customer="Fayva", qty=1, rate=109080, do_not_submit=1)
si.is_pos = 1
si.append("payments", {
"mode_of_payment": "Cash",
"account": "_Test Bank - _TC",
"amount": 109080
})
si.save()
si.submit()
frappe.flags.test_payments_created = True

View File

@@ -0,0 +1,107 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2018-10-24 15:24:56.713277",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank_transaction_field",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Field in Bank Transaction",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "file_field",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Column in Bank File",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2018-10-24 15:24:56.713277",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction Mapping",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0,
"track_views": 0
}

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class BankTransactionMapping(Document):
pass

View File

@@ -0,0 +1,141 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2018-11-28 08:55:40.815355",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "payment_document",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Payment Document",
"length": 0,
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "payment_entry",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Payment Entry",
"length": 0,
"no_copy": 0,
"options": "payment_document",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "allocated_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Allocated Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2018-12-06 10:57:02.635141",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction Payments",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class BankTransactionPayments(Document):
pass

View File

@@ -21,9 +21,29 @@ frappe.ui.form.on('Exchange Rate Revaluation', {
refresh: function(frm) {
if(frm.doc.docstatus==1) {
frm.add_custom_button(__('Make Journal Entry'), function() {
return frm.events.make_jv(frm);
});
frappe.db.get_value("Journal Entry Account", {
'reference_type': 'Exchange Rate Revaluation',
'reference_name': frm.doc.name,
'docstatus': 1
}, "sum(debit) as sum", (r) =>{
let total_amt = 0;
frm.doc.accounts.forEach(d=> {
total_amt = total_amt + d['new_balance_in_base_currency'];
});
if(total_amt === r.sum) {
frm.add_custom_button(__("Journal Entry"), function(){
frappe.route_options = {
'reference_type': 'Exchange Rate Revaluation',
'reference_name': frm.doc.name
};
frappe.set_route("List", "Journal Entry");
}, __("View"));
} else {
frm.add_custom_button(__('Create Journal Entry'), function() {
return frm.events.make_jv(frm);
});
}
}, 'Journal Entry');
}
},
@@ -39,8 +59,6 @@ frappe.ui.form.on('Exchange Rate Revaluation', {
});
frm.events.get_total_gain_loss(frm);
refresh_field("accounts");
} else {
frappe.msgprint(__("No records found"));
}
}
});
@@ -54,7 +72,7 @@ frappe.ui.form.on('Exchange Rate Revaluation', {
d.gain_loss = flt(d.new_balance_in_base_currency, precision("new_balance_in_base_currency", d)) - flt(d.balance_in_base_currency, precision("balance_in_base_currency", d));
total_gain_loss += flt(d.gain_loss, precision("gain_loss", d));
});
frm.set_value("total_gain_loss", flt(total_gain_loss, precision("total_gain_loss")));
frm.refresh_fields();
},

View File

@@ -22,7 +22,7 @@ class ExchangeRateRevaluation(Document):
- flt(d.balance_in_base_currency, d.precision("balance_in_base_currency"))
total_gain_loss += flt(d.gain_loss, d.precision("gain_loss"))
self.total_gain_loss = flt(total_gain_loss, self.precision("total_gain_loss"))
def validate_mandatory(self):
if not (self.company and self.posting_date):
frappe.throw(_("Please select Company and Posting Date to getting entries"))
@@ -33,8 +33,9 @@ class ExchangeRateRevaluation(Document):
company_currency = erpnext.get_company_currency(self.company)
precision = get_field_precision(frappe.get_meta("Exchange Rate Revaluation Account")
.get_field("new_balance_in_base_currency"), company_currency)
for d in self.get_accounts_from_gle():
account_details = self.get_accounts_from_gle()
for d in account_details:
current_exchange_rate = d.balance / d.balance_in_account_currency \
if d.balance_in_account_currency else 0
new_exchange_rate = get_exchange_rate(d.account_currency, company_currency, self.posting_date)
@@ -52,6 +53,10 @@ class ExchangeRateRevaluation(Document):
"new_exchange_rate": new_exchange_rate,
"new_balance_in_base_currency": new_balance_in_base_currency
})
if not accounts:
self.throw_invalid_response_message(account_details)
return accounts
def get_accounts_from_gle(self):
@@ -83,11 +88,18 @@ class ExchangeRateRevaluation(Document):
return account_details
def throw_invalid_response_message(self, account_details):
if account_details:
message = _("No outstanding invoices require exchange rate revaluation")
else:
message = _("No outstanding invoices found")
frappe.msgprint(message)
def make_jv_entry(self):
if self.total_gain_loss == 0:
return
unrealized_exchange_gain_loss_account = frappe.get_cached_value('Company', self.company,
unrealized_exchange_gain_loss_account = frappe.get_cached_value('Company', self.company,
"unrealized_exchange_gain_loss_account")
if not unrealized_exchange_gain_loss_account:
frappe.throw(_("Please set Unrealized Exchange Gain/Loss Account in Company {0}")

View File

@@ -1,461 +1,475 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2018-04-13 18:30:06.110433",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2018-04-13 18:30:06.110433",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "party_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Type",
"length": 0,
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "party_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Type",
"length": 0,
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "party",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party",
"length": 0,
"no_copy": 0,
"options": "party_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "party",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party",
"length": 0,
"no_copy": 0,
"options": "party_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account_currency",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
"length": 0,
"no_copy": 0,
"options": "Currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "account_currency",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
"length": 0,
"no_copy": 0,
"options": "Currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "balance_in_account_currency",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Balance In Account Currency",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "balance_in_account_currency",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Balance In Account Currency",
"length": 0,
"no_copy": 0,
"options": "account_currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "balances",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "balances",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "current_exchange_rate",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Current Exchange Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "current_exchange_rate",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Current Exchange Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "balance_in_base_currency",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Balance In Base Currency",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "balance_in_base_currency",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Balance In Base Currency",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_9",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_9",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "new_exchange_rate",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "New Exchange Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "new_exchange_rate",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "New Exchange Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "new_balance_in_base_currency",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "New Balance In Base Currency",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "new_balance_in_base_currency",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "New Balance In Base Currency",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "gain_loss",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Gain/Loss",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "gain_loss",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Gain/Loss",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2019-01-07 16:52:07.327930",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Exchange Rate Revaluation Account",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2019-06-26 18:57:51.762345",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Exchange Rate Revaluation Account",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}

View File

@@ -167,7 +167,7 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
filters: {
'account': row.account
}
}
};
});
me.frm.set_query("reference_name", "accounts", function(doc, cdt, cdn) {

View File

@@ -425,8 +425,9 @@ class JournalEntry(AccountsController):
pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
"customer_name" if d.party_type=="Customer" else "supplier_name")
party_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
party_account_currency = d.account_currency
if pay_to_recd_from and pay_to_recd_from == d.party:
party_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
party_account_currency = d.account_currency
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
bank_amount += (d.debit_in_account_currency or d.credit_in_account_currency)

View File

@@ -38,7 +38,10 @@ def get_loyalty_details(customer, loyalty_program, expiry_date=None, company=Non
@frappe.whitelist()
def get_loyalty_program_details_with_points(customer, loyalty_program=None, expiry_date=None, company=None, silent=False, include_expired_entry=False, current_transaction_amount=0):
lp_details = get_loyalty_program_details(customer, loyalty_program, company=company, silent=silent)
loyalty_program = frappe.get_doc("Loyalty Program", loyalty_program)
loyalty_program_name = loyalty_program or lp_details.loyalty_program
if not loyalty_program_name: return
loyalty_program = frappe.get_doc("Loyalty Program", loyalty_program_name)
lp_details.update(get_loyalty_details(customer, loyalty_program.name, expiry_date, company, include_expired_entry))
tier_spent_level = sorted([d.as_dict() for d in loyalty_program.collection_rules],

View File

@@ -160,7 +160,7 @@ class PaymentEntry(AccountsController):
d.reference_name, self.party_account_currency)
for field, value in iteritems(ref_details):
if not d.get(field) or force:
if field == 'exchange_rate' or not d.get(field) or force:
d.set(field, value)
def validate_payment_type(self):
@@ -536,9 +536,13 @@ class PaymentEntry(AccountsController):
@frappe.whitelist()
def get_outstanding_reference_documents(args):
if isinstance(args, string_types):
args = json.loads(args)
if args.get('party_type') == 'Member':
return
# confirm that Supplier is not blocked
if args.get('party_type') == 'Supplier':
supplier_status = get_supplier_block_status(args['party'])
@@ -554,7 +558,7 @@ def get_outstanding_reference_documents(args):
# Get negative outstanding sales /purchase invoices
negative_outstanding_invoices = []
if args.get("party_type") not in ["Student", "Employee"] and not args.get("voucher_no"):
if args.get("party_type") in ("Supplier", "Customer") and not args.get("voucher_no"):
negative_outstanding_invoices = get_negative_outstanding_invoices(args.get("party_type"),
args.get("party"), args.get("party_account"), party_account_currency, company_currency)
@@ -585,7 +589,7 @@ def get_outstanding_reference_documents(args):
# Get all SO / PO which are not fully billed or aginst which full advance not paid
orders_to_be_billed = []
if (args.get("party_type") != "Student"):
if (args.get("party_type") in ("Supplier", "Customer")):
orders_to_be_billed = get_orders_to_be_billed(args.get("posting_date"),args.get("party_type"),
args.get("party"), party_account_currency, company_currency)
@@ -597,7 +601,7 @@ def get_orders_to_be_billed(posting_date, party_type, party, party_account_curre
voucher_type = 'Sales Order'
elif party_type == "Supplier":
voucher_type = 'Purchase Order'
elif party_type == "Employee":
else:
voucher_type = None
# Add cost center condition
@@ -609,13 +613,18 @@ def get_orders_to_be_billed(posting_date, party_type, party, party_account_curre
orders = []
if voucher_type:
ref_field = "base_grand_total" if party_account_currency == company_currency else "grand_total"
if party_account_currency == company_currency:
grand_total_field = "base_grand_total"
rounded_total_field = "base_rounded_total"
else:
grand_total_field = "grand_total"
rounded_total_field = "rounded_total"
orders = frappe.db.sql("""
select
name as voucher_no,
{ref_field} as invoice_amount,
({ref_field} - advance_paid) as outstanding_amount,
if({rounded_total_field}, {rounded_total_field}, {grand_total_field}) as invoice_amount,
(if({rounded_total_field}, {rounded_total_field}, {grand_total_field}) - advance_paid) as outstanding_amount,
transaction_date as posting_date
from
`tab{voucher_type}`
@@ -623,17 +632,18 @@ def get_orders_to_be_billed(posting_date, party_type, party, party_account_curre
{party_type} = %s
and docstatus = 1
and ifnull(status, "") != "Closed"
and {ref_field} > advance_paid
and if({rounded_total_field}, {rounded_total_field}, {grand_total_field}) > advance_paid
and abs(100 - per_billed) > 0.01
{condition}
order by
transaction_date, name
""".format(**{
"ref_field": ref_field,
"rounded_total_field": rounded_total_field,
"grand_total_field": grand_total_field,
"voucher_type": voucher_type,
"party_type": scrub(party_type),
"condition": condition
}), party, as_dict=True)
}), (party), as_dict=True)
order_list = []
for d in orders:
@@ -709,9 +719,23 @@ def get_party_details(company, party_type, party, date, cost_center=None):
@frappe.whitelist()
def get_account_details(account, date, cost_center=None):
frappe.has_permission('Payment Entry', throw=True)
# to check if the passed account is accessible if the reference doctype is Payment Entry
account_list = frappe.get_list('Account', {
'name': account
}, reference_doctype='Payment Entry', limit=1)
# There might be some user permissions which will allow account under certain doctypes
# except for Payment Entry, only in such case we should throw permission error
if not account_list:
frappe.throw(_('Account: {0} is not permitted under Payment Entry').format(account))
account_balance = get_balance_on(account, date, cost_center=cost_center,
ignore_account_permission=True)
return frappe._dict({
"account_currency": get_account_currency(account),
"account_balance": get_balance_on(account, date, cost_center=cost_center),
"account_balance": account_balance,
"account_type": frappe.db.get_value("Account", account, "account_type")
})

View File

@@ -13,20 +13,20 @@ class PaymentReconciliation(Document):
def get_unreconciled_entries(self):
self.get_nonreconciled_payment_entries()
self.get_invoice_entries()
def get_nonreconciled_payment_entries(self):
self.check_mandatory_to_fetch()
payment_entries = self.get_payment_entries()
journal_entries = self.get_jv_entries()
self.add_payment_entries(payment_entries + journal_entries)
def get_payment_entries(self):
order_doctype = "Sales Order" if self.party_type=="Customer" else "Purchase Order"
payment_entries = get_advance_payment_entries(self.party_type, self.party,
payment_entries = get_advance_payment_entries(self.party_type, self.party,
self.receivable_payable_account, order_doctype, against_all_orders=True, limit=self.limit)
return payment_entries
def get_jv_entries(self):
@@ -36,12 +36,12 @@ class PaymentReconciliation(Document):
bank_account_condition = "t2.against_account like %(bank_cash_account)s" \
if self.bank_cash_account else "1=1"
limit_cond = "limit %s" % (self.limit or 1000)
limit_cond = "limit %s" % self.limit if self.limit else ""
journal_entries = frappe.db.sql("""
select
"Journal Entry" as reference_type, t1.name as reference_name,
t1.posting_date, t1.remark as remarks, t2.name as reference_row,
"Journal Entry" as reference_type, t1.name as reference_name,
t1.posting_date, t1.remark as remarks, t2.name as reference_row,
{dr_or_cr} as amount, t2.is_advance
from
`tabJournal Entry` t1, `tabJournal Entry Account` t2
@@ -49,8 +49,8 @@ class PaymentReconciliation(Document):
t1.name = t2.parent and t1.docstatus = 1 and t2.docstatus = 1
and t2.party_type = %(party_type)s and t2.party = %(party)s
and t2.account = %(account)s and {dr_or_cr} > 0
and (t2.reference_type is null or t2.reference_type = '' or
(t2.reference_type in ('Sales Order', 'Purchase Order')
and (t2.reference_type is null or t2.reference_type = '' or
(t2.reference_type in ('Sales Order', 'Purchase Order')
and t2.reference_name is not null and t2.reference_name != ''))
and (CASE
WHEN t1.voucher_type in ('Debit Note', 'Credit Note')
@@ -83,7 +83,10 @@ class PaymentReconciliation(Document):
condition = self.check_condition()
non_reconciled_invoices = get_outstanding_invoices(self.party_type, self.party,
self.receivable_payable_account, condition=condition, limit=self.limit)
self.receivable_payable_account, condition=condition)
if self.limit:
non_reconciled_invoices = non_reconciled_invoices[:self.limit]
self.add_invoice_entries(non_reconciled_invoices)
@@ -109,7 +112,7 @@ class PaymentReconciliation(Document):
self.validate_invoice()
dr_or_cr = ("credit_in_account_currency"
if erpnext.get_party_account_type(self.party_type) == 'Receivable' else "debit_in_account_currency")
lst = []
for e in self.get('payments'):
if e.invoice_number and e.allocated_amount:
@@ -127,11 +130,11 @@ class PaymentReconciliation(Document):
'unadjusted_amount' : flt(e.amount),
'allocated_amount' : flt(e.allocated_amount)
}))
if lst:
from erpnext.accounts.utils import reconcile_against_document
reconcile_against_document(lst)
msgprint(_("Successfully Reconciled"))
self.get_unreconciled_entries()

View File

@@ -1,7 +1,6 @@
cur_frm.add_fetch("payment_gateway", "payment_account", "payment_account")
cur_frm.add_fetch("payment_gateway", "payment_gateway", "payment_gateway")
cur_frm.add_fetch("payment_gateway", "message", "message")
cur_frm.add_fetch("payment_gateway", "payment_url_message", "payment_url_message")
cur_frm.add_fetch("payment_gateway_account", "payment_account", "payment_account")
cur_frm.add_fetch("payment_gateway_account", "payment_gateway", "payment_gateway")
cur_frm.add_fetch("payment_gateway_account", "message", "message")
frappe.ui.form.on("Payment Request", "onload", function(frm, dt, dn){
if (frm.doc.reference_doctype) {

View File

@@ -167,7 +167,12 @@ def get_pricing_rule_for_item(args):
if args.transaction_type=="selling":
if args.customer and not (args.customer_group and args.territory):
customer = frappe.get_cached_value("Customer", args.customer, ["customer_group", "territory"])
if args.quotation_to and args.quotation_to != 'Customer':
customer = frappe._dict()
else:
customer = frappe.get_cached_value("Customer", args.customer, ["customer_group", "territory"])
if customer:
args.customer_group, args.territory = customer
@@ -345,7 +350,7 @@ def filter_pricing_rules(args, pricing_rules):
if len(pricing_rules) > 1:
rate_or_discount = list(set([d.rate_or_discount for d in pricing_rules]))
if len(rate_or_discount) == 1 and rate_or_discount[0] == "Discount Percentage":
pricing_rules = filter(lambda x: x.for_price_list==args.price_list, pricing_rules) \
pricing_rules = list(filter(lambda x: x.for_price_list==args.price_list, pricing_rules)) \
or pricing_rules
if len(pricing_rules) > 1 and not args.for_shopping_cart:
@@ -368,7 +373,7 @@ def apply_internal_priority(pricing_rules, field_set, args):
filtered_rules = []
for field in field_set:
if args.get(field):
filtered_rules = filter(lambda x: x[field]==args[field], pricing_rules)
filtered_rules = list(filter(lambda x: x[field]==args[field], pricing_rules))
if filtered_rules: break
return filtered_rules or pricing_rules

View File

@@ -18,9 +18,6 @@ class TestPricingRule(unittest.TestCase):
frappe.db.sql("delete from `tabPricing Rule`")
def test_pricing_rule_for_discount(self):
from erpnext.stock.get_item_details import get_item_details
from frappe import MandatoryError
test_record = {
"doctype": "Pricing Rule",
"title": "_Test Pricing Rule",
@@ -94,9 +91,6 @@ class TestPricingRule(unittest.TestCase):
self.assertEquals(details.get("discount_percentage"), 15)
def test_pricing_rule_for_margin(self):
from erpnext.stock.get_item_details import get_item_details
from frappe import MandatoryError
test_record = {
"doctype": "Pricing Rule",
"title": "_Test Pricing Rule",
@@ -139,9 +133,6 @@ class TestPricingRule(unittest.TestCase):
self.assertEquals(details.get("margin_rate_or_amount"), 10)
def test_pricing_rule_for_variants(self):
from erpnext.stock.get_item_details import get_item_details
from frappe import MandatoryError
if not frappe.db.exists("Item", "Test Variant PRT"):
frappe.get_doc({
"doctype": "Item",

View File

@@ -157,7 +157,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
can_change_release_date: function(date) {
const diff = frappe.datetime.get_diff(date, frappe.datetime.nowdate());
if (diff < 0) {
frappe.throw('New release date should be in the future');
frappe.throw(__('New release date should be in the future'));
return false;
} else {
return true;
@@ -285,6 +285,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
is_paid: function() {
hide_fields(this.frm.doc);
if(cint(this.frm.doc.is_paid)) {
this.frm.set_value("allocate_advances_automatically", 0);
if(!this.frm.doc.company) {
this.frm.set_value("is_paid", 0)
frappe.msgprint(__("Please specify Company to proceed"));
@@ -522,8 +523,13 @@ frappe.ui.form.on("Purchase Invoice", {
},
onload: function(frm) {
if(frm.doc.__onload && !frm.doc.__onload.supplier_tds) {
me.frm.set_df_property("apply_tds", "read_only", 1);
if(frm.doc.__onload) {
if(frm.doc.supplier) {
frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0;
}
if(!frm.doc.__onload.supplier_tds) {
frm.set_df_property("apply_tds", "read_only", 1);
}
}
erpnext.queries.setup_queries(frm, "Warehouse", function() {

File diff suppressed because it is too large Load Diff

View File

@@ -100,6 +100,7 @@ class PurchaseInvoice(BuyingController):
self.validate_fixed_asset()
self.create_remarks()
self.set_status()
self.validate_purchase_receipt_if_update_stock()
validate_inter_company_party(self.doctype, self.supplier, self.company, self.inter_company_invoice_reference)
def validate_release_date(self):
@@ -284,7 +285,7 @@ class PurchaseInvoice(BuyingController):
def update_status_updater_args(self):
if cint(self.update_stock):
self.status_updater.extend([{
self.status_updater.append({
'source_dt': 'Purchase Invoice Item',
'target_dt': 'Purchase Order Item',
'join_field': 'po_detail',
@@ -292,28 +293,29 @@ class PurchaseInvoice(BuyingController):
'target_parent_dt': 'Purchase Order',
'target_parent_field': 'per_received',
'target_ref_field': 'qty',
'source_field': 'qty',
'source_field': 'received_qty',
'second_source_dt': 'Purchase Receipt Item',
'second_source_field': 'received_qty',
'second_join_field': 'purchase_order_item',
'percent_join_field':'purchase_order',
# 'percent_join_field': 'prevdoc_docname',
'overflow_type': 'receipt',
'extra_cond': """ and exists(select name from `tabPurchase Invoice`
where name=`tabPurchase Invoice Item`.parent and update_stock = 1)"""
},
{
'source_dt': 'Purchase Invoice Item',
'target_dt': 'Purchase Order Item',
'join_field': 'po_detail',
'target_field': 'returned_qty',
'target_parent_dt': 'Purchase Order',
# 'target_parent_field': 'per_received',
# 'target_ref_field': 'qty',
'source_field': '-1 * qty',
# 'percent_join_field': 'prevdoc_docname',
# 'overflow_type': 'receipt',
'extra_cond': """ and exists (select name from `tabPurchase Invoice`
where name=`tabPurchase Invoice Item`.parent and update_stock=1 and is_return=1)"""
}
])
})
if cint(self.is_return):
self.status_updater.append({
'source_dt': 'Purchase Invoice Item',
'target_dt': 'Purchase Order Item',
'join_field': 'po_detail',
'target_field': 'returned_qty',
'source_field': '-1 * qty',
'second_source_dt': 'Purchase Receipt Item',
'second_source_field': '-1 * qty',
'second_join_field': 'purchase_order_item',
'overflow_type': 'receipt',
'extra_cond': """ and exists (select name from `tabPurchase Invoice`
where name=`tabPurchase Invoice Item`.parent and update_stock=1 and is_return=1)"""
})
def validate_purchase_receipt_if_update_stock(self):
if self.update_stock:
@@ -327,13 +329,14 @@ class PurchaseInvoice(BuyingController):
self.check_prev_docstatus()
self.update_status_updater_args()
self.update_prevdoc_status()
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype,
self.company, self.base_grand_total)
if not self.is_return:
self.update_against_document_in_jv()
self.update_prevdoc_status()
self.update_billing_status_for_zero_amount_refdoc("Purchase Receipt")
self.update_billing_status_for_zero_amount_refdoc("Purchase Order")
self.update_billing_status_in_pr()
@@ -482,9 +485,13 @@ class PurchaseInvoice(BuyingController):
"credit": flt(item.rm_supp_cost)
}, warehouse_account[self.supplier_warehouse]["account_currency"]))
elif not item.is_fixed_asset or (item.is_fixed_asset and is_cwip_accounting_disabled()):
expense_account = (item.expense_account
if (not item.enable_deferred_expense or self.is_return) else item.deferred_expense_account)
gl_entries.append(
self.get_gl_dict({
"account": item.expense_account if not item.enable_deferred_expense else item.deferred_expense_account,
"account": expense_account,
"against": self.supplier,
"debit": flt(item.base_net_amount, item.precision("base_net_amount")),
"debit_in_account_currency": (flt(item.base_net_amount,
@@ -763,13 +770,14 @@ class PurchaseInvoice(BuyingController):
self.check_for_closed_status()
self.update_status_updater_args()
self.update_prevdoc_status()
if not self.is_return:
from erpnext.accounts.utils import unlink_ref_doc_from_payment_entries
if frappe.db.get_single_value('Accounts Settings', 'unlink_payment_on_cancellation_of_invoice'):
unlink_ref_doc_from_payment_entries(self)
self.update_prevdoc_status()
self.update_billing_status_for_zero_amount_refdoc("Purchase Receipt")
self.update_billing_status_for_zero_amount_refdoc("Purchase Order")
self.update_billing_status_in_pr()
@@ -789,9 +797,8 @@ class PurchaseInvoice(BuyingController):
for d in self.items:
if d.project and d.project not in project_list:
project = frappe.get_doc("Project", d.project)
project.flags.dont_sync_tasks = True
project.update_purchase_costing()
project.save()
project.db_update()
project_list.append(d.project)
def validate_supplier_invoice(self):

View File

@@ -6,8 +6,8 @@ frappe.listview_settings['Purchase Invoice'] = {
add_fields: ["supplier", "supplier_name", "base_grand_total", "outstanding_amount", "due_date", "company",
"currency", "is_return", "release_date", "on_hold"],
get_indicator: function(doc) {
if(cint(doc.is_return)==1) {
return [__("Return"), "darkgrey", "is_return,=,Yes"];
if(flt(doc.outstanding_amount) < 0 && doc.docstatus == 1) {
return [__("Debit Note Issued"), "darkgrey", "outstanding_amount,<,0"]
} else if(flt(doc.outstanding_amount) > 0 && doc.docstatus==1) {
if(cint(doc.on_hold) && !doc.release_date) {
return [__("On Hold"), "darkgrey"];
@@ -18,9 +18,9 @@ frappe.listview_settings['Purchase Invoice'] = {
} else {
return [__("Unpaid"), "orange", "outstanding_amount,>,0|due,>=,Today"];
}
} else if(flt(doc.outstanding_amount) < 0 && doc.docstatus == 1) {
return [__("Debit Note Issued"), "darkgrey", "outstanding_amount,<,0"]
}else if(flt(doc.outstanding_amount)==0 && doc.docstatus==1) {
} else if(cint(doc.is_return)) {
return [__("Return"), "darkgrey", "is_return,=,Yes"];
} else if(flt(doc.outstanding_amount)==0 && doc.docstatus==1) {
return [__("Paid"), "green", "outstanding_amount,=,0"];
}
}

View File

@@ -20,11 +20,13 @@ test_dependencies = ["Item", "Cost Center", "Payment Term", "Payment Terms Templ
test_ignore = ["Serial No"]
class TestPurchaseInvoice(unittest.TestCase):
def setUp(self):
@classmethod
def setUpClass(self):
unlink_payment_on_cancel_of_invoice()
frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1)
def tearDown(self):
@classmethod
def tearDownClass(self):
unlink_payment_on_cancel_of_invoice(0)
def test_gl_entries_without_perpetual_inventory(self):
@@ -91,6 +93,7 @@ class TestPurchaseInvoice(unittest.TestCase):
pi_doc = frappe.get_doc('Purchase Invoice', pi_doc.name)
self.assertRaises(frappe.LinkExistsError, pi_doc.cancel)
unlink_payment_on_cancel_of_invoice()
def test_purchase_invoice_for_blocked_supplier(self):
supplier = frappe.get_doc('Supplier', '_Test Supplier')
@@ -402,9 +405,9 @@ class TestPurchaseInvoice(unittest.TestCase):
pi.save()
pi.submit()
self.assertEqual(pi.payment_schedule[0].payment_amount, 756.15)
self.assertEqual(pi.payment_schedule[0].payment_amount, 606.15)
self.assertEqual(pi.payment_schedule[0].due_date, pi.posting_date)
self.assertEqual(pi.payment_schedule[1].payment_amount, 756.15)
self.assertEqual(pi.payment_schedule[1].payment_amount, 606.15)
self.assertEqual(pi.payment_schedule[1].due_date, add_days(pi.posting_date, 30))
pi.load_from_db()

View File

@@ -432,7 +432,6 @@ def get_customer_id(doc, customer=None):
return cust_id
def make_customer_and_address(customers):
customers_list = []
for customer, data in iteritems(customers):
@@ -449,8 +448,11 @@ def make_customer_and_address(customers):
frappe.db.commit()
return customers_list
def add_customer(data):
customer = data.get('full_name') or data.get('customer')
if frappe.db.exists("Customer", customer.strip()):
return customer.strip()
customer_doc = frappe.new_doc('Customer')
customer_doc.customer_name = data.get('full_name') or data.get('customer')
customer_doc.customer_pos_id = data.get('customer_pos_id')
@@ -462,21 +464,18 @@ def add_customer(data):
frappe.db.commit()
return customer_doc.name
def get_territory(data):
if data.get('territory'):
return data.get('territory')
return frappe.db.get_single_value('Selling Settings','territory') or _('All Territories')
def get_customer_group(data):
if data.get('customer_group'):
return data.get('customer_group')
return frappe.db.get_single_value('Selling Settings', 'customer_group') or frappe.db.get_value('Customer Group', {'is_group': 0}, 'name')
def make_contact(args, customer):
if args.get('email_id') or args.get('phone'):
name = frappe.db.get_value('Dynamic Link',
@@ -502,7 +501,6 @@ def make_contact(args, customer):
doc.flags.ignore_mandatory = True
doc.save(ignore_permissions=True)
def make_address(args, customer):
if not args.get('address_line1'):
return
@@ -517,7 +515,10 @@ def make_address(args, customer):
address = frappe.get_doc('Address', name)
else:
address = frappe.new_doc('Address')
address.country = frappe.get_cached_value('Company', args.get('company'), 'country')
if args.get('company'):
address.country = frappe.get_cached_value('Company',
args.get('company'), 'country')
address.append('links', {
'link_doctype': 'Customer',
'link_name': customer
@@ -529,7 +530,6 @@ def make_address(args, customer):
address.flags.ignore_mandatory = True
address.save(ignore_permissions=True)
def make_email_queue(email_queue):
name_list = []
for key, data in iteritems(email_queue):
@@ -546,7 +546,6 @@ def make_email_queue(email_queue):
return name_list
def validate_item(doc):
for item in doc.get('items'):
if not frappe.db.exists('Item', item.get('item_code')):
@@ -565,7 +564,6 @@ def validate_item(doc):
item_doc.save(ignore_permissions=True)
frappe.db.commit()
def submit_invoice(si_doc, name, doc, name_list):
try:
si_doc.insert()
@@ -581,7 +579,6 @@ def submit_invoice(si_doc, name, doc, name_list):
return name_list
def save_invoice(doc, name, name_list):
try:
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):

View File

@@ -0,0 +1,38 @@
frappe.ui.form.on("Sales Invoice", {
setup: function(frm) {
frm.set_query('transporter', function() {
return {
filters: {
'is_transporter': 1
}
};
});
frm.set_query('driver', function(doc) {
return {
filters: {
'transporter': doc.transporter
}
};
});
},
refresh: function(frm) {
if(frm.doc.docstatus == 1 && !frm.is_dirty()
&& !frm.doc.is_return && !frm.doc.ewaybill) {
frm.add_custom_button('e-Way Bill JSON', () => {
var w = window.open(
frappe.urllib.get_full_url(
"/api/method/erpnext.regional.india.utils.generate_ewb_json?"
+ "dt=" + encodeURIComponent(frm.doc.doctype)
+ "&dn=" + encodeURIComponent(frm.doc.name)
)
);
if (!w) {
frappe.msgprint(__("Please enable pop-ups")); return;
}
}, __("Make"));
}
}
});

View File

@@ -0,0 +1,33 @@
var globalOnload = frappe.listview_settings['Sales Invoice'].onload;
frappe.listview_settings['Sales Invoice'].onload = function (doclist) {
// Provision in case onload event is added to sales_invoice.js in future
if (globalOnload) {
globalOnload(doclist);
}
const action = () => {
const selected_docs = doclist.get_checked_items();
const docnames = doclist.get_checked_items(true);
for (let doc of selected_docs) {
if (doc.docstatus !== 1) {
frappe.throw(__("e-Way Bill JSON can only be generated from a submitted document"));
}
}
var w = window.open(
frappe.urllib.get_full_url(
"/api/method/erpnext.regional.india.utils.generate_ewb_json?"
+ "dt=" + encodeURIComponent(doclist.doctype)
+ "&dn=" + encodeURIComponent(docnames)
)
);
if (!w) {
frappe.msgprint(__("Please enable pop-ups")); return;
}
};
doclist.page.add_actions_menu_item(__('Generate e-Way Bill JSON'), action, false);
};

View File

@@ -44,6 +44,10 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
this.frm.toggle_reqd("due_date", !this.frm.doc.is_return);
if (this.frm.doc.is_return) {
this.frm.return_print_format = "Sales Invoice Return";
}
this.show_general_ledger();
if(doc.update_stock) this.show_stock_ledger();
@@ -131,16 +135,24 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
},
set_default_print_format: function() {
// set default print format to POS type
// set default print format to POS type or Credit Note
if(cur_frm.doc.is_pos) {
if(cur_frm.pos_print_format) {
cur_frm.meta._default_print_format = cur_frm.meta.default_print_format;
cur_frm.meta.default_print_format = cur_frm.pos_print_format;
}
} else if(cur_frm.doc.is_return && !cur_frm.meta.default_print_format) {
if(cur_frm.return_print_format) {
cur_frm.meta._default_print_format = cur_frm.meta.default_print_format;
cur_frm.meta.default_print_format = cur_frm.return_print_format;
}
} else {
if(cur_frm.meta._default_print_format) {
cur_frm.meta.default_print_format = cur_frm.meta._default_print_format;
cur_frm.meta._default_print_format = null;
} else if(in_list([cur_frm.pos_print_format, cur_frm.return_print_format], cur_frm.meta.default_print_format)) {
cur_frm.meta.default_print_format = null;
cur_frm.meta._default_print_format = null;
}
}
},
@@ -174,9 +186,13 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
method: "erpnext.selling.doctype.quotation.quotation.make_sales_invoice",
source_doctype: "Quotation",
target: me.frm,
setters: {
customer: me.frm.doc.customer || undefined,
},
setters: [{
fieldtype: 'Link',
label: __('Customer'),
options: 'Customer',
fieldname: 'party_name',
default: me.frm.doc.customer,
}],
get_query_filters: {
docstatus: 1,
status: ["!=", "Lost"],
@@ -356,6 +372,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
set_pos_data: function() {
if(this.frm.doc.is_pos) {
this.frm.set_value("allocate_advances_automatically", 0);
if(!this.frm.doc.company) {
this.frm.set_value("is_pos", 0);
frappe.msgprint(__("Please specify Company to proceed"));
@@ -370,6 +387,10 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
me.frm.pos_print_format = r.message.print_format;
}
me.frm.script_manager.trigger("update_stock");
if(me.frm.doc.taxes_and_charges) {
me.frm.script_manager.trigger("taxes_and_charges");
}
frappe.model.set_default_values(me.frm.doc);
me.set_dynamic_labels();
me.calculate_taxes_and_totals();

View File

@@ -3630,7 +3630,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "1",
"default": "",
"fetch_if_empty": 0,
"fieldname": "allocate_advances_automatically",
"fieldtype": "Check",
@@ -5816,7 +5816,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2019-04-10 16:10:34.266458",
"modified": "2019-04-22 12:45:41.109345",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@@ -54,8 +54,8 @@ class SalesInvoice(SellingController):
def set_indicator(self):
"""Set indicator for portal"""
if cint(self.is_return) == 1:
self.indicator_title = _("Return")
if self.outstanding_amount < 0:
self.indicator_title = _("Credit Note Issued")
self.indicator_color = "darkgrey"
elif self.outstanding_amount > 0 and getdate(self.due_date) >= getdate(nowdate()):
self.indicator_color = "orange"
@@ -63,8 +63,8 @@ class SalesInvoice(SellingController):
elif self.outstanding_amount > 0 and getdate(self.due_date) < getdate(nowdate()):
self.indicator_color = "red"
self.indicator_title = _("Overdue")
elif self.outstanding_amount < 0:
self.indicator_title = _("Credit Note Issued")
elif cint(self.is_return) == 1:
self.indicator_title = _("Return")
self.indicator_color = "darkgrey"
else:
self.indicator_color = "green"
@@ -78,6 +78,7 @@ class SalesInvoice(SellingController):
self.so_dn_required()
self.validate_proj_cust()
self.validate_pos_return()
self.validate_with_previous_doc()
self.validate_uom_is_integer("stock_uom", "stock_qty")
self.validate_uom_is_integer("uom", "qty")
@@ -166,6 +167,7 @@ class SalesInvoice(SellingController):
self.make_gl_entries()
if not self.is_return:
self.update_billing_status_for_zero_amount_refdoc("Delivery Note")
self.update_billing_status_for_zero_amount_refdoc("Sales Order")
self.check_credit_limit()
@@ -198,6 +200,16 @@ class SalesInvoice(SellingController):
if "Healthcare" in active_domains:
manage_invoice_submit_cancel(self, "on_submit")
def validate_pos_return(self):
if self.is_pos and self.is_return:
total_amount_in_payments = 0
for payment in self.payments:
total_amount_in_payments += payment.amount
invoice_total = self.rounded_total or self.grand_total
if total_amount_in_payments < invoice_total:
frappe.throw(_("Total payments amount can't be greater than {}".format(-invoice_total)))
def validate_pos_paid_amount(self):
if len(self.payments) == 0 and self.is_pos:
frappe.throw(_("At least one mode of payment is required for POS invoice."))
@@ -222,6 +234,7 @@ class SalesInvoice(SellingController):
self.update_billing_status_in_dn()
if not self.is_return:
self.update_billing_status_for_zero_amount_refdoc("Delivery Note")
self.update_billing_status_for_zero_amount_refdoc("Sales Order")
self.update_serial_no(in_cancel=True)
@@ -256,7 +269,7 @@ class SalesInvoice(SellingController):
def update_status_updater_args(self):
if cint(self.update_stock):
self.status_updater.extend([{
self.status_updater.append({
'source_dt':'Sales Invoice Item',
'target_dt':'Sales Order Item',
'target_parent_dt':'Sales Order',
@@ -274,21 +287,20 @@ class SalesInvoice(SellingController):
'overflow_type': 'delivery',
'extra_cond': """ and exists(select name from `tabSales Invoice`
where name=`tabSales Invoice Item`.parent and update_stock = 1)"""
},
{
'source_dt': 'Sales Invoice Item',
'target_dt': 'Sales Order Item',
'join_field': 'so_detail',
'target_field': 'returned_qty',
'target_parent_dt': 'Sales Order',
# 'target_parent_field': 'per_delivered',
# 'target_ref_field': 'qty',
'source_field': '-1 * qty',
# 'percent_join_field': 'sales_order',
# 'overflow_type': 'delivery',
'extra_cond': """ and exists (select name from `tabSales Invoice` where name=`tabSales Invoice Item`.parent and update_stock=1 and is_return=1)"""
}
])
})
if cint(self.is_return):
self.status_updater.append({
'source_dt': 'Sales Invoice Item',
'target_dt': 'Sales Order Item',
'join_field': 'so_detail',
'target_field': 'returned_qty',
'target_parent_dt': 'Sales Order',
'source_field': '-1 * qty',
'second_source_dt': 'Delivery Note Item',
'second_source_field': '-1 * qty',
'second_join_field': 'so_detail',
'extra_cond': """ and exists (select name from `tabSales Invoice` where name=`tabSales Invoice Item`.parent and update_stock=1 and is_return=1)"""
})
def check_credit_limit(self):
from erpnext.selling.doctype.customer.customer import check_credit_limit
@@ -398,14 +410,18 @@ class SalesInvoice(SellingController):
if pos.get('account_for_change_amount'):
self.account_for_change_amount = pos.get('account_for_change_amount')
for fieldname in ('territory', 'naming_series', 'currency', 'taxes_and_charges', 'letter_head', 'tc_name',
'company', 'select_print_heading', 'cash_bank_account', 'company_address',
'write_off_account', 'write_off_cost_center', 'apply_discount_on', 'cost_center'):
for fieldname in ('territory', 'naming_series', 'currency', 'letter_head', 'tc_name',
'company', 'select_print_heading', 'cash_bank_account', 'write_off_account',
'write_off_cost_center', 'apply_discount_on', 'cost_center'):
if (not for_validate) or (for_validate and not self.get(fieldname)):
self.set(fieldname, pos.get(fieldname))
customer_price_list = frappe.get_value("Customer", self.customer, 'default_price_list')
for field in ['taxes_and_charges', 'company_address']:
if pos.get(field):
self.set(field, pos.get(field))
if not customer_price_list:
self.set('selling_price_list', pos.get('selling_price_list'))
@@ -488,7 +504,7 @@ class SalesInvoice(SellingController):
"""Set against account for debit to account"""
against_acc = []
for d in self.get('items'):
if d.income_account not in against_acc:
if d.income_account and d.income_account not in against_acc:
against_acc.append(d.income_account)
self.against_income_account = ','.join(against_acc)
@@ -504,12 +520,15 @@ class SalesInvoice(SellingController):
def so_dn_required(self):
"""check in manage account if sales order / delivery note required or not."""
if self.is_return:
return
dic = {'Sales Order':['so_required', 'is_pos'],'Delivery Note':['dn_required', 'update_stock']}
for i in dic:
if frappe.db.get_single_value('Selling Settings', dic[i][0]) == 'Yes':
for d in self.get('items'):
if frappe.get_cached_value('Item', d.item_code, 'is_stock_item') == 1 \
and not d.get(i.lower().replace(' ','_')) and not self.get(dic[i][1]):
is_stock_item = frappe.get_cached_value('Item', d.item_code, 'is_stock_item')
if (d.item_code and is_stock_item == 1\
and not d.get(i.lower().replace(' ','_')) and not self.get(dic[i][1])):
msgprint(_("{0} is mandatory for Item {1}").format(i,d.item_code), raise_exception=1)
@@ -768,7 +787,14 @@ class SalesInvoice(SellingController):
if item.is_fixed_asset:
asset = frappe.get_doc("Asset", item.asset)
fixed_asset_gl_entries = get_gl_entries_on_asset_disposal(asset, item.base_net_amount)
if (len(asset.finance_books) > 1 and not item.finance_book
and asset.finance_books[0].finance_book):
frappe.throw(_("Select finance book for the item {0} at row {1}")
.format(item.item_code, item.idx))
fixed_asset_gl_entries = get_gl_entries_on_asset_disposal(asset,
item.base_net_amount, item.finance_book)
for gle in fixed_asset_gl_entries:
gle["against"] = self.customer
gl_entries.append(self.get_gl_dict(gle))
@@ -776,10 +802,13 @@ class SalesInvoice(SellingController):
asset.db_set("disposal_date", self.posting_date)
asset.set_status("Sold" if self.docstatus==1 else None)
else:
account_currency = get_account_currency(item.income_account)
income_account = (item.income_account
if (not item.enable_deferred_revenue or self.is_return) else item.deferred_revenue_account)
account_currency = get_account_currency(income_account)
gl_entries.append(
self.get_gl_dict({
"account": item.income_account if not item.enable_deferred_revenue else item.deferred_revenue_account,
"account": income_account,
"against": self.customer,
"credit": flt(item.base_net_amount, item.precision("base_net_amount")),
"credit_in_account_currency": (flt(item.base_net_amount, item.precision("base_net_amount"))
@@ -1022,9 +1051,8 @@ class SalesInvoice(SellingController):
def update_project(self):
if self.project:
project = frappe.get_doc("Project", self.project)
project.flags.dont_sync_tasks = True
project.update_billed_amount()
project.save()
project.db_update()
def verify_payment_amount_is_positive(self):
@@ -1168,6 +1196,8 @@ class SalesInvoice(SellingController):
self.set_missing_values(for_validate = True)
def validate_inter_company_party(doctype, party, company, inter_company_invoice_reference):
if not party:
return
if doctype == "Sales Invoice":
partytype, ref_partytype, internal = "Customer", "Supplier", "is_internal_customer"
ref_doc = "Purchase Invoice"

View File

@@ -6,16 +6,16 @@ frappe.listview_settings['Sales Invoice'] = {
add_fields: ["customer", "customer_name", "base_grand_total", "outstanding_amount", "due_date", "company",
"currency", "is_return"],
get_indicator: function(doc) {
if(cint(doc.is_return)==1) {
return [__("Return"), "darkgrey", "is_return,=,Yes"];
} else if(flt(doc.outstanding_amount)==0) {
return [__("Paid"), "green", "outstanding_amount,=,0"]
} else if(flt(doc.outstanding_amount) < 0) {
if(flt(doc.outstanding_amount) < 0) {
return [__("Credit Note Issued"), "darkgrey", "outstanding_amount,<,0"]
}else if (flt(doc.outstanding_amount) > 0 && doc.due_date >= frappe.datetime.get_today()) {
} else if (flt(doc.outstanding_amount) > 0 && doc.due_date >= frappe.datetime.get_today()) {
return [__("Unpaid"), "orange", "outstanding_amount,>,0|due_date,>,Today"]
} else if (flt(doc.outstanding_amount) > 0 && doc.due_date < frappe.datetime.get_today()) {
return [__("Overdue"), "red", "outstanding_amount,>,0|due_date,<=,Today"]
} else if(cint(doc.is_return)) {
return [__("Return"), "darkgrey", "is_return,=,Yes"];
} else if(flt(doc.outstanding_amount)==0) {
return [__("Paid"), "green", "outstanding_amount,=,0"]
}
},
right_column: "grand_total"

View File

@@ -18,6 +18,8 @@ from erpnext.accounts.doctype.account.test_account import get_inventory_account,
from erpnext.controllers.taxes_and_totals import get_itemised_tax_breakup_data
from erpnext.stock.doctype.item.test_item import create_item
from six import iteritems
from erpnext.regional.india.utils import get_ewb_data
class TestSalesInvoice(unittest.TestCase):
def make(self):
w = frappe.copy_doc(test_records[0])
@@ -26,10 +28,12 @@ class TestSalesInvoice(unittest.TestCase):
w.submit()
return w
def setUp(self):
@classmethod
def setUpClass(self):
unlink_payment_on_cancel_of_invoice()
def tearDown(self):
@classmethod
def tearDownClass(self):
unlink_payment_on_cancel_of_invoice(0)
def test_timestamp_change(self):
@@ -132,6 +136,7 @@ class TestSalesInvoice(unittest.TestCase):
unlink_payment_on_cancel_of_invoice(0)
si = frappe.get_doc('Sales Invoice', si.name)
self.assertRaises(frappe.LinkExistsError, si.cancel)
unlink_payment_on_cancel_of_invoice()
def test_sales_invoice_calculation_export_currency(self):
si = frappe.copy_doc(test_records[2])
@@ -1362,7 +1367,7 @@ class TestSalesInvoice(unittest.TestCase):
"included_in_print_rate": 1
})
si.save()
si.submit()
self.assertEqual(si.net_total, 19453.13)
self.assertEqual(si.grand_total, 24900)
self.assertEqual(si.total_taxes_and_charges, 5446.88)
@@ -1384,6 +1389,50 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEqual(expected_values[gle.account][1], gle.debit)
self.assertEqual(expected_values[gle.account][2], gle.credit)
def test_rounding_adjustment_2(self):
si = create_sales_invoice(rate=400, do_not_save=True)
for rate in [400, 600, 100]:
si.append("items", {
"item_code": "_Test Item",
"gst_hsn_code": "999800",
"warehouse": "_Test Warehouse - _TC",
"qty": 1,
"rate": rate,
"income_account": "Sales - _TC",
"cost_center": "_Test Cost Center - _TC"
})
for tax_account in ["_Test Account VAT - _TC", "_Test Account Service Tax - _TC"]:
si.append("taxes", {
"charge_type": "On Net Total",
"account_head": tax_account,
"description": tax_account,
"rate": 9,
"cost_center": "_Test Cost Center - _TC",
"included_in_print_rate": 1
})
si.save()
si.submit()
self.assertEqual(si.net_total, 1271.19)
self.assertEqual(si.grand_total, 1500)
self.assertEqual(si.total_taxes_and_charges, 228.82)
self.assertEqual(si.rounding_adjustment, -0.01)
expected_values = dict((d[0], d) for d in [
[si.debit_to, 1500, 0.0],
["_Test Account Service Tax - _TC", 0.0, 114.41],
["_Test Account VAT - _TC", 0.0, 114.41],
["Sales - _TC", 0.0, 1271.18]
])
gl_entries = frappe.db.sql("""select account, debit, credit
from `tabGL Entry` where voucher_type='Sales Invoice' and voucher_no=%s
order by account asc""", si.name, as_dict=1)
for gle in gl_entries:
self.assertEqual(expected_values[gle.account][0], gle.account)
self.assertEqual(expected_values[gle.account][1], gle.debit)
self.assertEqual(expected_values[gle.account][2], gle.credit)
def test_sales_invoice_with_shipping_rule(self):
from erpnext.accounts.doctype.shipping_rule.test_shipping_rule \
import create_shipping_rule
@@ -1567,6 +1616,110 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEqual(expected_gle[i][2], gle.credit)
self.assertEqual(getdate(expected_gle[i][3]), gle.posting_date)
def test_eway_bill_json(self):
if not frappe.db.exists('Address', '_Test Address for Eway bill-Billing'):
address = frappe.get_doc({
"address_line1": "_Test Address Line 1",
"address_title": "_Test Address for Eway bill",
"address_type": "Billing",
"city": "_Test City",
"state": "Test State",
"country": "India",
"doctype": "Address",
"is_primary_address": 1,
"phone": "+91 0000000000",
"gstin": "27AAECE4835E1ZR",
"gst_state": "Maharashtra",
"gst_state_number": "27",
"pincode": "401108"
}).insert()
address.append("links", {
"link_doctype": "Company",
"link_name": "_Test Company"
})
address.save()
if not frappe.db.exists('Address', '_Test Customer-Address for Eway bill-Shipping'):
address = frappe.get_doc({
"address_line1": "_Test Address Line 1",
"address_title": "_Test Customer-Address for Eway bill",
"address_type": "Shipping",
"city": "_Test City",
"state": "Test State",
"country": "India",
"doctype": "Address",
"is_primary_address": 1,
"phone": "+91 0000000000",
"gst_state": "Maharashtra",
"gst_state_number": "27",
"pincode": "410038"
}).insert()
address.append("links", {
"link_doctype": "Customer",
"link_name": "_Test Customer"
})
address.save()
gst_settings = frappe.get_doc("GST Settings")
gst_account = frappe.get_all(
"GST Account",
fields=["cgst_account", "sgst_account", "igst_account"],
filters = {"company": "_Test Company"})
if not gst_account:
gst_settings.append("gst_accounts", {
"company": "_Test Company",
"cgst_account": "CGST - _TC",
"sgst_account": "SGST - _TC",
"igst_account": "IGST - _TC",
})
gst_settings.save()
si = create_sales_invoice(do_not_save =1, rate = '60000')
si.distance = 2000
si.company_address = "_Test Address for Eway bill-Billing"
si.customer_address = "_Test Customer-Address for Eway bill-Shipping"
si.vehicle_no = "KA12KA1234"
si.append("taxes", {
"charge_type": "On Net Total",
"account_head": "CGST - _TC",
"cost_center": "Main - _TC",
"description": "CGST @ 9.0",
"rate": 9
})
si.append("taxes", {
"charge_type": "On Net Total",
"account_head": "SGST - _TC",
"cost_center": "Main - _TC",
"description": "SGST @ 9.0",
"rate": 9
})
si.submit()
data = get_ewb_data("Sales Invoice", si.name)
self.assertEqual(data['version'], '1.0.1118')
self.assertEqual(data['billLists'][0]['fromGstin'], '27AAECE4835E1ZR')
self.assertEqual(data['billLists'][0]['fromTrdName'], '_Test Company')
self.assertEqual(data['billLists'][0]['toTrdName'], '_Test Customer')
self.assertEqual(data['billLists'][0]['vehicleType'], 'R')
self.assertEqual(data['billLists'][0]['totalValue'], 60000)
self.assertEqual(data['billLists'][0]['cgstValue'], 5400)
self.assertEqual(data['billLists'][0]['sgstValue'], 5400)
self.assertEqual(data['billLists'][0]['vehicleNo'], 'KA12KA1234')
self.assertEqual(data['billLists'][0]['itemList'][0]['taxableAmount'], 60000)
def create_sales_invoice(**args):
si = frappe.new_doc("Sales Invoice")
args = frappe._dict(args)

View File

@@ -21,6 +21,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "barcode",
"fieldtype": "Data",
"hidden": 0,
@@ -52,6 +53,7 @@
"bold": 1,
"collapsible": 0,
"columns": 4,
"fetch_if_empty": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
@@ -86,6 +88,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": 0,
@@ -116,6 +119,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "item_name",
"fieldtype": "Data",
"hidden": 0,
@@ -149,6 +153,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "customer_item_code",
"fieldtype": "Data",
"hidden": 1,
@@ -180,6 +185,7 @@
"bold": 0,
"collapsible": 1,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
@@ -212,6 +218,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
@@ -247,6 +254,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_8",
"fieldtype": "Column Break",
"hidden": 0,
@@ -278,6 +286,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "image_view",
"fieldtype": "Image",
"hidden": 0,
@@ -311,6 +320,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "image",
"fieldtype": "Attach",
"hidden": 1,
@@ -343,6 +353,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "quantity_and_rate",
"fieldtype": "Section Break",
"hidden": 0,
@@ -374,6 +385,7 @@
"bold": 1,
"collapsible": 0,
"columns": 2,
"fetch_if_empty": 0,
"fieldname": "qty",
"fieldtype": "Float",
"hidden": 0,
@@ -407,6 +419,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "stock_uom",
"fieldtype": "Link",
"hidden": 0,
@@ -439,6 +452,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "col_break2",
"fieldtype": "Column Break",
"hidden": 0,
@@ -469,6 +483,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "uom",
"fieldtype": "Link",
"hidden": 0,
@@ -502,6 +517,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "conversion_factor",
"fieldtype": "Float",
"hidden": 0,
@@ -534,6 +550,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "stock_qty",
"fieldtype": "Float",
"hidden": 0,
@@ -566,6 +583,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_17",
"fieldtype": "Section Break",
"hidden": 0,
@@ -597,6 +615,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "price_list_rate",
"fieldtype": "Currency",
"hidden": 0,
@@ -631,6 +650,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "base_price_list_rate",
"fieldtype": "Currency",
"hidden": 0,
@@ -665,6 +685,7 @@
"bold": 0,
"collapsible": 1,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "discount_and_margin",
"fieldtype": "Section Break",
"hidden": 0,
@@ -698,6 +719,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "price_list_rate",
"fetch_if_empty": 0,
"fieldname": "margin_type",
"fieldtype": "Select",
"hidden": 0,
@@ -732,6 +754,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.margin_type && doc.price_list_rate",
"fetch_if_empty": 0,
"fieldname": "margin_rate_or_amount",
"fieldtype": "Float",
"hidden": 0,
@@ -765,6 +788,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.margin_type && doc.price_list_rate && doc.margin_rate_or_amount",
"fetch_if_empty": 0,
"fieldname": "rate_with_margin",
"fieldtype": "Currency",
"hidden": 0,
@@ -798,6 +822,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_19",
"fieldtype": "Column Break",
"hidden": 0,
@@ -830,6 +855,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "price_list_rate",
"fetch_if_empty": 0,
"fieldname": "discount_percentage",
"fieldtype": "Percent",
"hidden": 0,
@@ -865,6 +891,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "discount_percentage",
"fetch_if_empty": 0,
"fieldname": "discount_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -899,6 +926,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.margin_type && doc.price_list_rate && doc.margin_rate_or_amount",
"fetch_if_empty": 0,
"fieldname": "base_rate_with_margin",
"fieldtype": "Currency",
"hidden": 0,
@@ -932,6 +960,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break1",
"fieldtype": "Section Break",
"hidden": 0,
@@ -962,6 +991,7 @@
"bold": 1,
"collapsible": 0,
"columns": 2,
"fetch_if_empty": 0,
"fieldname": "rate",
"fieldtype": "Currency",
"hidden": 0,
@@ -996,6 +1026,7 @@
"bold": 0,
"collapsible": 0,
"columns": 2,
"fetch_if_empty": 0,
"fieldname": "amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1030,6 +1061,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "col_break3",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1060,6 +1092,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "base_rate",
"fieldtype": "Currency",
"hidden": 0,
@@ -1094,6 +1127,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "base_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1128,6 +1162,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "pricing_rule",
"fieldtype": "Link",
"hidden": 0,
@@ -1160,6 +1195,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_21",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1191,6 +1227,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "net_rate",
"fieldtype": "Currency",
"hidden": 0,
@@ -1224,6 +1261,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "net_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1257,6 +1295,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_24",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1288,6 +1327,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "base_net_rate",
"fieldtype": "Currency",
"hidden": 0,
@@ -1321,6 +1361,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "base_net_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1355,6 +1396,7 @@
"collapsible": 1,
"collapsible_depends_on": "eval:doc.delivered_by_supplier==1",
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "drop_ship",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1387,6 +1429,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "delivered_by_supplier",
"fieldtype": "Check",
"hidden": 0,
@@ -1419,6 +1462,7 @@
"bold": 0,
"collapsible": 1,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "accounting",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1450,6 +1494,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "income_account",
"fieldtype": "Link",
"hidden": 0,
@@ -1486,6 +1531,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "expense_account",
"fieldtype": "Link",
"hidden": 0,
@@ -1519,6 +1565,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "col_break4",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1550,6 +1597,7 @@
"collapsible": 0,
"columns": 0,
"default": ":Company",
"fetch_if_empty": 0,
"fieldname": "cost_center",
"fieldtype": "Link",
"hidden": 0,
@@ -1586,6 +1634,7 @@
"bold": 0,
"collapsible": 1,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "deferred_revenue",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1619,6 +1668,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "enable_deferred_revenue",
"fetch_if_empty": 0,
"fieldname": "deferred_revenue_account",
"fieldtype": "Link",
"hidden": 0,
@@ -1653,6 +1703,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "enable_deferred_revenue",
"fetch_if_empty": 0,
"fieldname": "service_stop_date",
"fieldtype": "Date",
"hidden": 0,
@@ -1686,6 +1737,7 @@
"collapsible": 0,
"columns": 0,
"default": "0",
"fetch_if_empty": 0,
"fieldname": "enable_deferred_revenue",
"fieldtype": "Check",
"hidden": 0,
@@ -1718,6 +1770,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_50",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1750,6 +1803,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "enable_deferred_revenue",
"fetch_if_empty": 0,
"fieldname": "service_start_date",
"fieldtype": "Date",
"hidden": 0,
@@ -1783,6 +1837,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "enable_deferred_revenue",
"fetch_if_empty": 0,
"fieldname": "service_end_date",
"fieldtype": "Date",
"hidden": 0,
@@ -1815,6 +1870,7 @@
"bold": 0,
"collapsible": 1,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_18",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1847,6 +1903,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "weight_per_unit",
"fieldtype": "Float",
"hidden": 0,
@@ -1880,6 +1937,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "total_weight",
"fieldtype": "Float",
"hidden": 0,
@@ -1912,6 +1970,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_21",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1943,6 +2002,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "weight_uom",
"fieldtype": "Link",
"hidden": 0,
@@ -1978,6 +2038,7 @@
"collapsible_depends_on": "eval:doc.serial_no || doc.batch_no",
"columns": 0,
"depends_on": "",
"fetch_if_empty": 0,
"fieldname": "warehouse_and_reference",
"fieldtype": "Section Break",
"hidden": 0,
@@ -2009,6 +2070,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "warehouse",
"fieldtype": "Link",
"hidden": 0,
@@ -2043,6 +2105,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "target_warehouse",
"fieldtype": "Link",
"hidden": 1,
@@ -2077,6 +2140,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "eval:!doc.__islocal",
"fetch_if_empty": 0,
"fieldname": "quality_inspection",
"fieldtype": "Link",
"hidden": 0,
@@ -2110,6 +2174,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "batch_no",
"fieldtype": "Link",
"hidden": 0,
@@ -2142,6 +2207,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "col_break5",
"fieldtype": "Column Break",
"hidden": 0,
@@ -2172,6 +2238,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "allow_zero_valuation_rate",
"fieldtype": "Check",
"hidden": 0,
@@ -2204,6 +2271,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "serial_no",
"fieldtype": "Small Text",
"hidden": 0,
@@ -2238,6 +2306,7 @@
"collapsible": 0,
"columns": 0,
"description": "",
"fetch_if_empty": 0,
"fieldname": "item_group",
"fieldtype": "Link",
"hidden": 1,
@@ -2272,6 +2341,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "brand",
"fieldtype": "Data",
"hidden": 1,
@@ -2305,6 +2375,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "item_tax_rate",
"fieldtype": "Small Text",
"hidden": 1,
@@ -2338,6 +2409,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "actual_batch_qty",
"fieldtype": "Float",
"hidden": 0,
@@ -2372,6 +2444,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "actual_qty",
"fieldtype": "Float",
"hidden": 0,
@@ -2405,6 +2478,7 @@
"bold": 0,
"collapsible": 1,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "edit_references",
"fieldtype": "Section Break",
"hidden": 0,
@@ -2437,6 +2511,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "sales_order",
"fieldtype": "Link",
"hidden": 0,
@@ -2471,6 +2546,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "so_detail",
"fieldtype": "Data",
"hidden": 1,
@@ -2504,6 +2580,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_74",
"fieldtype": "Column Break",
"hidden": 0,
@@ -2535,6 +2612,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "delivery_note",
"fieldtype": "Link",
"hidden": 0,
@@ -2569,6 +2647,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "dn_detail",
"fieldtype": "Data",
"hidden": 1,
@@ -2602,6 +2681,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "delivered_qty",
"fieldtype": "Float",
"hidden": 0,
@@ -2635,6 +2715,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "is_fixed_asset",
"fieldtype": "Check",
"hidden": 1,
@@ -2667,6 +2748,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "asset",
"fieldtype": "Link",
"hidden": 0,
@@ -2700,6 +2782,42 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "asset",
"fetch_if_empty": 0,
"fieldname": "finance_book",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Finance Book",
"length": 0,
"no_copy": 0,
"options": "Finance Book",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_54",
"fieldtype": "Section Break",
"hidden": 0,
@@ -2731,6 +2849,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "page_break",
"fieldtype": "Check",
"hidden": 0,
@@ -2766,7 +2885,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2019-02-18 18:59:52.223628",
"modified": "2019-06-28 17:04:25.870346",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",

View File

@@ -295,7 +295,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2019-03-06 15:58:37.839241",
"modified": "2019-03-19 14:54:56.524556",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Payment",

View File

@@ -314,13 +314,11 @@ class Subscription(Document):
self.save()
@property
def is_postpaid_to_invoice(self):
return getdate(nowdate()) > getdate(self.current_invoice_end) or \
(getdate(nowdate()) >= getdate(self.current_invoice_end) and getdate(self.current_invoice_end) == getdate(self.current_invoice_start)) and \
not self.has_outstanding_invoice()
@property
def is_prepaid_to_invoice(self):
if not self.generate_invoice_at_period_start:
return False
@@ -340,7 +338,7 @@ class Subscription(Document):
2. Change the `Subscription` status to 'Past Due Date'
3. Change the `Subscription` status to 'Cancelled'
"""
if self.is_postpaid_to_invoice or self.is_prepaid_to_invoice:
if self.is_postpaid_to_invoice() or self.is_prepaid_to_invoice():
self.generate_invoice()
if self.current_invoice_is_past_due():
self.status = 'Past Due Date'

View File

@@ -4,6 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from erpnext.utilities.product import get_price
@@ -13,7 +14,7 @@ class SubscriptionPlan(Document):
def validate_interval_count(self):
if self.billing_interval_count < 1:
frappe.throw('Billing Interval Count cannot be less than 1')
frappe.throw(_('Billing Interval Count cannot be less than 1'))
@frappe.whitelist()
def get_plan_rate(plan, quantity=1, customer=None):
@@ -26,7 +27,7 @@ def get_plan_rate(plan, quantity=1, customer=None):
customer_group = frappe.db.get_value("Customer", customer, "customer_group")
else:
customer_group = None
price = get_price(item_code=plan.item, price_list=plan.price_list, customer_group=customer_group, company=None, qty=quantity)
if not price:
return 0

View File

@@ -22,7 +22,7 @@ class TestTaxWithholdingCategory(unittest.TestCase):
invoices = []
# create invoices for lower than single threshold tax rate
for _ in xrange(2):
for _ in range(2):
pi = create_purchase_invoice(supplier = "Test TDS Supplier")
pi.submit()
invoices.append(pi)

View File

@@ -9,11 +9,13 @@ from frappe.model.meta import get_field_precision
from erpnext.accounts.doctype.budget.budget import validate_expense_against_budget
class ClosedAccountingPeriod(frappe.ValidationError): pass
class StockAccountInvalidTransaction(frappe.ValidationError): pass
def make_gl_entries(gl_map, cancel=False, adv_adj=False, merge_entries=True, update_outstanding='Yes', from_repost=False):
if gl_map:
if not cancel:
validate_accounting_period(gl_map)
gl_map = process_gl_map(gl_map, merge_entries)
if gl_map and len(gl_map) > 1:
save_entries(gl_map, adv_adj, update_outstanding, from_repost)
@@ -22,6 +24,27 @@ def make_gl_entries(gl_map, cancel=False, adv_adj=False, merge_entries=True, upd
else:
delete_gl_entries(gl_map, adv_adj=adv_adj, update_outstanding=update_outstanding)
def validate_accounting_period(gl_map):
accounting_periods = frappe.db.sql(""" SELECT
ap.name as name
FROM
`tabAccounting Period` ap, `tabClosed Document` cd
WHERE
ap.name = cd.parent
AND ap.company = %(company)s
AND cd.closed = 1
AND cd.document_type = %(voucher_type)s
AND %(date)s between ap.start_date and ap.end_date
""", {
'date': gl_map[0].posting_date,
'company': gl_map[0].company,
'voucher_type': gl_map[0].voucher_type
}, as_dict=1)
if accounting_periods:
frappe.throw(_("You can't create accounting entries in the closed accounting period {0}")
.format(accounting_periods[0].name), ClosedAccountingPeriod)
def process_gl_map(gl_map, merge_entries=True):
if merge_entries:
gl_map = merge_similar_entries(gl_map)
@@ -135,9 +158,9 @@ def round_off_debit_credit(gl_map):
.format(gl_map[0].voucher_type, gl_map[0].voucher_no, debit_credit_diff))
elif abs(debit_credit_diff) >= (1.0 / (10**precision)):
make_round_off_gle(gl_map, debit_credit_diff)
make_round_off_gle(gl_map, debit_credit_diff, precision)
def make_round_off_gle(gl_map, debit_credit_diff):
def make_round_off_gle(gl_map, debit_credit_diff, precision):
round_off_account, round_off_cost_center = get_round_off_account_and_cost_center(gl_map[0].company)
round_off_account_exists = False
round_off_gle = frappe._dict()
@@ -150,6 +173,10 @@ def make_round_off_gle(gl_map, debit_credit_diff):
debit_credit_diff += flt(d.credit_in_account_currency)
round_off_account_exists = True
if round_off_account_exists and abs(debit_credit_diff) <= (1.0 / (10**precision)):
gl_map.remove(round_off_gle)
return
if not round_off_gle:
for k in ["voucher_type", "voucher_no", "company",
"posting_date", "remarks", "is_opening"]:

View File

@@ -0,0 +1,578 @@
frappe.provide("erpnext.accounts");
frappe.pages['bank-reconciliation'].on_page_load = function(wrapper) {
new erpnext.accounts.bankReconciliation(wrapper);
}
erpnext.accounts.bankReconciliation = class BankReconciliation {
constructor(wrapper) {
this.page = frappe.ui.make_app_page({
parent: wrapper,
title: __("Bank Reconciliation"),
single_column: true
});
this.parent = wrapper;
this.page = this.parent.page;
this.check_plaid_status();
this.make();
}
make() {
const me = this;
me.$main_section = $(`<div class="reconciliation page-main-content"></div>`).appendTo(me.page.main);
const empty_state = __("Upload a bank statement, link or reconcile a bank account")
me.$main_section.append(`<div class="flex justify-center align-center text-muted"
style="height: 50vh; display: flex;"><h5 class="text-muted">${empty_state}</h5></div>`)
me.page.add_field({
fieldtype: 'Link',
label: __('Company'),
fieldname: 'company',
options: "Company",
onchange: function() {
if (this.value) {
me.company = this.value;
} else {
me.company = null;
me.bank_account = null;
}
}
})
me.page.add_field({
fieldtype: 'Link',
label: __('Bank Account'),
fieldname: 'bank_account',
options: "Bank Account",
get_query: function() {
if(!me.company) {
frappe.throw(__("Please select company first"));
return
}
return {
filters: {
"company": me.company
}
}
},
onchange: function() {
if (this.value) {
me.bank_account = this.value;
me.add_actions();
} else {
me.bank_account = null;
me.page.hide_actions_menu();
}
}
})
}
check_plaid_status() {
const me = this;
frappe.db.get_value("Plaid Settings", "Plaid Settings", "enabled", (r) => {
if (r && r.enabled == "1") {
me.plaid_status = "active"
} else {
me.plaid_status = "inactive"
}
})
}
add_actions() {
const me = this;
me.page.show_menu()
me.page.add_menu_item(__("Upload a statement"), function() {
me.clear_page_content();
new erpnext.accounts.bankTransactionUpload(me);
}, true)
if (me.plaid_status==="active") {
me.page.add_menu_item(__("Synchronize this account"), function() {
me.clear_page_content();
new erpnext.accounts.bankTransactionSync(me);
}, true)
}
me.page.add_menu_item(__("Reconcile this account"), function() {
me.clear_page_content();
me.make_reconciliation_tool();
}, true)
}
clear_page_content() {
const me = this;
$(me.page.body).find('.frappe-list').remove();
me.$main_section.empty();
}
make_reconciliation_tool() {
const me = this;
frappe.model.with_doctype("Bank Transaction", () => {
erpnext.accounts.ReconciliationList = new erpnext.accounts.ReconciliationTool({
parent: me.parent,
doctype: "Bank Transaction"
});
})
}
}
erpnext.accounts.bankTransactionUpload = class bankTransactionUpload {
constructor(parent) {
this.parent = parent;
this.data = [];
const assets = [
"/assets/frappe/css/frappe-datatable.css",
"/assets/frappe/js/lib/clusterize.min.js",
"/assets/frappe/js/lib/Sortable.min.js",
"/assets/frappe/js/lib/frappe-datatable.js"
];
frappe.require(assets, () => {
this.make();
});
}
make() {
const me = this;
frappe.upload.make({
args: {
method: 'erpnext.accounts.doctype.bank_transaction.bank_transaction_upload.upload_bank_statement',
allow_multiple: 0
},
no_socketio: true,
sample_url: "e.g. http://example.com/somefile.csv",
callback: function(attachment, r) {
if (!r.exc && r.message) {
me.data = r.message;
me.setup_transactions_dom();
me.create_datatable();
me.add_primary_action();
}
}
})
}
setup_transactions_dom() {
const me = this;
me.parent.$main_section.append(`<div class="transactions-table"></div>`)
}
create_datatable() {
try {
this.datatable = new DataTable('.transactions-table', {
columns: this.data.columns,
data: this.data.data
})
}
catch(err) {
let msg = __(`Your file could not be processed by ERPNext.
<br>It should be a standard CSV or XLSX file.
<br>The headers should be in the first row.`)
frappe.throw(msg)
}
}
add_primary_action() {
const me = this;
me.parent.page.set_primary_action(__("Submit"), function() {
me.add_bank_entries()
}, null, __("Creating bank entries..."))
}
add_bank_entries() {
const me = this;
frappe.xcall('erpnext.accounts.doctype.bank_transaction.bank_transaction_upload.create_bank_entries',
{columns: this.datatable.datamanager.columns, data: this.datatable.datamanager.data, bank_account: me.parent.bank_account}
).then((result) => {
let result_title = result.errors == 0 ? __("{0} bank transaction(s) created", [result.success]) : __("{0} bank transaction(s) created and {1} errors", [result.success, result.errors])
let result_msg = `
<div class="flex justify-center align-center text-muted" style="height: 50vh; display: flex;">
<h5 class="text-muted">${result_title}</h5>
</div>`
me.parent.page.clear_primary_action();
me.parent.$main_section.empty();
me.parent.$main_section.append(result_msg);
if (result.errors == 0) {
frappe.show_alert({message:__("All bank transactions have been created"), indicator:'green'});
} else {
frappe.show_alert({message:__("Please check the error log for details about the import errors"), indicator:'red'});
}
})
}
}
erpnext.accounts.bankTransactionSync = class bankTransactionSync {
constructor(parent) {
this.parent = parent;
this.data = [];
this.init_config()
}
init_config() {
const me = this;
frappe.xcall('erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.plaid_configuration')
.then(result => {
me.plaid_env = result.plaid_env;
me.plaid_public_key = result.plaid_public_key;
me.client_name = result.client_name;
me.sync_transactions()
})
}
sync_transactions() {
const me = this;
frappe.db.get_value("Bank Account", me.parent.bank_account, "bank", (v) => {
frappe.xcall('erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.sync_transactions', {
bank: v['bank'],
bank_account: me.parent.bank_account,
freeze: true
})
.then((result) => {
let result_title = (result.length > 0) ? __("{0} bank transaction(s) created", [result.length]) : __("This bank account is already synchronized")
let result_msg = `
<div class="flex justify-center align-center text-muted" style="height: 50vh; display: flex;">
<h5 class="text-muted">${result_title}</h5>
</div>`
this.parent.$main_section.append(result_msg)
frappe.show_alert({message:__("Bank account '{0}' has been synchronized", [me.parent.bank_account]), indicator:'green'});
})
})
}
}
erpnext.accounts.ReconciliationTool = class ReconciliationTool extends frappe.views.BaseList {
constructor(opts) {
super(opts);
this.show();
}
setup_defaults() {
super.setup_defaults();
this.page_title = __("Bank Reconciliation");
this.doctype = 'Bank Transaction';
this.fields = ['date', 'description', 'debit', 'credit', 'currency']
}
setup_view() {
this.render_header();
}
setup_side_bar() {
//
}
make_standard_filters() {
//
}
freeze() {
this.$result.find('.list-count').html(`<span>${__('Refreshing')}...</span>`);
}
get_args() {
const args = super.get_args();
return Object.assign({}, args, {
...args.filters.push(["Bank Transaction", "docstatus", "=", 1],
["Bank Transaction", "unallocated_amount", ">", 0])
});
}
update_data(r) {
let data = r.message || [];
if (this.start === 0) {
this.data = data;
} else {
this.data = this.data.concat(data);
}
}
render() {
const me = this;
this.$result.find('.list-row-container').remove();
$('[data-fieldname="name"]').remove();
me.data.map((value) => {
const row = $('<div class="list-row-container">').data("data", value).appendTo(me.$result).get(0);
new erpnext.accounts.ReconciliationRow(row, value);
})
}
render_header() {
const me = this;
if ($(this.wrapper).find('.transaction-header').length === 0) {
me.$result.append(frappe.render_template("bank_transaction_header"));
}
}
}
erpnext.accounts.ReconciliationRow = class ReconciliationRow {
constructor(row, data) {
this.data = data;
this.row = row;
this.make();
this.bind_events();
}
make() {
$(this.row).append(frappe.render_template("bank_transaction_row", this.data))
}
bind_events() {
const me = this;
$(me.row).on('click', '.clickable-section', function() {
me.bank_entry = $(this).attr("data-name");
me.show_dialog($(this).attr("data-name"));
})
$(me.row).on('click', '.new-reconciliation', function() {
me.bank_entry = $(this).attr("data-name");
me.show_dialog($(this).attr("data-name"));
})
$(me.row).on('click', '.new-payment', function() {
me.bank_entry = $(this).attr("data-name");
me.new_payment();
})
$(me.row).on('click', '.new-invoice', function() {
me.bank_entry = $(this).attr("data-name");
me.new_invoice();
})
$(me.row).on('click', '.new-expense', function() {
me.bank_entry = $(this).attr("data-name");
me.new_expense();
})
}
new_payment() {
const me = this;
const paid_amount = me.data.credit > 0 ? me.data.credit : me.data.debit;
const payment_type = me.data.credit > 0 ? "Receive": "Pay";
const party_type = me.data.credit > 0 ? "Customer": "Supplier";
frappe.new_doc("Payment Entry", {"payment_type": payment_type, "paid_amount": paid_amount,
"party_type": party_type, "paid_from": me.data.bank_account})
}
new_invoice() {
const me = this;
const invoice_type = me.data.credit > 0 ? "Sales Invoice" : "Purchase Invoice";
frappe.new_doc(invoice_type)
}
new_expense() {
frappe.new_doc("Expense Claim")
}
show_dialog(data) {
const me = this;
frappe.db.get_value("Bank Account", me.data.bank_account, "account", (r) => {
me.gl_account = r.account;
})
frappe.xcall('erpnext.accounts.page.bank_reconciliation.bank_reconciliation.get_linked_payments',
{bank_transaction: data, freeze:true, freeze_message:__("Finding linked payments")}
).then((result) => {
me.make_dialog(result)
})
}
make_dialog(data) {
const me = this;
me.selected_payment = null;
const fields = [
{
fieldtype: 'Section Break',
fieldname: 'section_break_1',
label: __('Automatic Reconciliation')
},
{
fieldtype: 'HTML',
fieldname: 'payment_proposals'
},
{
fieldtype: 'Section Break',
fieldname: 'section_break_2',
label: __('Search for a payment')
},
{
fieldtype: 'Link',
fieldname: 'payment_doctype',
options: 'DocType',
label: 'Payment DocType',
get_query: () => {
return {
filters : {
"name": ["in", ["Payment Entry", "Journal Entry", "Sales Invoice", "Purchase Invoice", "Expense Claim"]]
}
}
},
},
{
fieldtype: 'Column Break',
fieldname: 'column_break_1',
},
{
fieldtype: 'Dynamic Link',
fieldname: 'payment_entry',
options: 'payment_doctype',
label: 'Payment Document',
get_query: () => {
let dt = this.dialog.fields_dict.payment_doctype.value;
if (dt === "Payment Entry") {
return {
query: "erpnext.accounts.page.bank_reconciliation.bank_reconciliation.payment_entry_query",
filters : {
"bank_account": this.data.bank_account,
"company": this.data.company
}
}
} else if (dt === "Journal Entry") {
return {
query: "erpnext.accounts.page.bank_reconciliation.bank_reconciliation.journal_entry_query",
filters : {
"bank_account": this.data.bank_account,
"company": this.data.company
}
}
} else if (dt === "Sales Invoice") {
return {
query: "erpnext.accounts.page.bank_reconciliation.bank_reconciliation.sales_invoices_query"
}
} else if (dt === "Purchase Invoice") {
return {
filters : [
["Purchase Invoice", "ifnull(clearance_date, '')", "=", ""],
["Purchase Invoice", "docstatus", "=", 1],
["Purchase Invoice", "company", "=", this.data.company]
]
}
} else if (dt === "Expense Claim") {
return {
filters : [
["Expense Claim", "ifnull(clearance_date, '')", "=", ""],
["Expense Claim", "docstatus", "=", 1],
["Expense Claim", "company", "=", this.data.company]
]
}
}
},
onchange: function() {
if (me.selected_payment !== this.value) {
me.selected_payment = this.value;
me.display_payment_details(this);
}
}
},
{
fieldtype: 'Section Break',
fieldname: 'section_break_3'
},
{
fieldtype: 'HTML',
fieldname: 'payment_details'
},
];
me.dialog = new frappe.ui.Dialog({
title: __("Choose a corresponding payment"),
fields: fields,
size: "large"
});
const proposals_wrapper = me.dialog.fields_dict.payment_proposals.$wrapper;
if (data && data.length > 0) {
proposals_wrapper.append(frappe.render_template("linked_payment_header"));
data.map(value => {
proposals_wrapper.append(frappe.render_template("linked_payment_row", value))
})
} else {
const empty_data_msg = __("ERPNext could not find any matching payment entry")
proposals_wrapper.append(`<div class="text-center"><h5 class="text-muted">${empty_data_msg}</h5></div>`)
}
$(me.dialog.body).on('click', '.reconciliation-btn', (e) => {
const payment_entry = $(e.target).attr('data-name');
const payment_doctype = $(e.target).attr('data-doctype');
frappe.xcall('erpnext.accounts.page.bank_reconciliation.bank_reconciliation.reconcile',
{bank_transaction: me.bank_entry, payment_doctype: payment_doctype, payment_name: payment_entry})
.then((result) => {
setTimeout(function(){
erpnext.accounts.ReconciliationList.refresh();
}, 2000);
me.dialog.hide();
})
})
me.dialog.show();
}
display_payment_details(event) {
const me = this;
if (event.value) {
let dt = me.dialog.fields_dict.payment_doctype.value;
me.dialog.fields_dict['payment_details'].$wrapper.empty();
frappe.db.get_doc(dt, event.value)
.then(doc => {
let displayed_docs = []
if (dt === "Payment Entry") {
payment.currency = doc.payment_type == "Receive" ? doc.paid_to_account_currency : doc.paid_from_account_currency;
payment.doctype = dt
displayed_docs.push(payment);
} else if (dt === "Journal Entry") {
doc.accounts.forEach(payment => {
if (payment.account === me.gl_account) {
payment.doctype = dt;
payment.posting_date = doc.posting_date;
payment.party = doc.pay_to_recd_from;
payment.reference_no = doc.cheque_no;
payment.reference_date = doc.cheque_date;
payment.currency = payment.account_currency;
payment.paid_amount = payment.credit > 0 ? payment.credit : payment.debit;
payment.name = doc.name;
displayed_docs.push(payment);
}
})
} else if (dt === "Sales Invoice") {
doc.payments.forEach(payment => {
if (payment.clearance_date === null || payment.clearance_date === "") {
payment.doctype = dt;
payment.posting_date = doc.posting_date;
payment.party = doc.customer;
payment.reference_no = doc.remarks;
payment.currency = doc.currency;
payment.paid_amount = payment.amount;
payment.name = doc.name;
displayed_docs.push(payment);
}
})
}
const details_wrapper = me.dialog.fields_dict.payment_details.$wrapper;
details_wrapper.append(frappe.render_template("linked_payment_header"));
displayed_docs.forEach(values => {
details_wrapper.append(frappe.render_template("linked_payment_row", values));
})
})
}
}
}

View File

@@ -0,0 +1,29 @@
{
"content": null,
"creation": "2018-11-24 12:03:14.646669",
"docstatus": 0,
"doctype": "Page",
"idx": 0,
"modified": "2018-11-24 12:03:14.646669",
"modified_by": "Administrator",
"module": "Accounts",
"name": "bank-reconciliation",
"owner": "Administrator",
"page_name": "bank-reconciliation",
"roles": [
{
"role": "System Manager"
},
{
"role": "Accounts Manager"
},
{
"role": "Accounts User"
}
],
"script": null,
"standard": "Yes",
"style": null,
"system_page": 0,
"title": "Bank Reconciliation"
}

View File

@@ -0,0 +1,376 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
import difflib
from frappe.utils import flt
from six import iteritems
from erpnext import get_company_currency
@frappe.whitelist()
def reconcile(bank_transaction, payment_doctype, payment_name):
transaction = frappe.get_doc("Bank Transaction", bank_transaction)
payment_entry = frappe.get_doc(payment_doctype, payment_name)
account = frappe.db.get_value("Bank Account", transaction.bank_account, "account")
gl_entry = frappe.get_doc("GL Entry", dict(account=account, voucher_type=payment_doctype, voucher_no=payment_name))
if transaction.unallocated_amount == 0:
frappe.throw(_("This bank transaction is already fully reconciled"))
if transaction.credit > 0 and gl_entry.credit > 0:
frappe.throw(_("The selected payment entry should be linked with a debtor bank transaction"))
if transaction.debit > 0 and gl_entry.debit > 0:
frappe.throw(_("The selected payment entry should be linked with a creditor bank transaction"))
add_payment_to_transaction(transaction, payment_entry, gl_entry)
return 'reconciled'
def add_payment_to_transaction(transaction, payment_entry, gl_entry):
gl_amount, transaction_amount = (gl_entry.credit, transaction.debit) if gl_entry.credit > 0 else (gl_entry.debit, transaction.credit)
allocated_amount = gl_amount if gl_amount <= transaction_amount else transaction_amount
transaction.append("payment_entries", {
"payment_document": payment_entry.doctype,
"payment_entry": payment_entry.name,
"allocated_amount": allocated_amount
})
transaction.save()
transaction.update_allocations()
@frappe.whitelist()
def get_linked_payments(bank_transaction):
transaction = frappe.get_doc("Bank Transaction", bank_transaction)
bank_account = frappe.db.get_values("Bank Account", transaction.bank_account, ["account", "company"], as_dict=True)
# Get all payment entries with a matching amount
amount_matching = check_matching_amount(bank_account[0].account, bank_account[0].company, transaction)
# Get some data from payment entries linked to a corresponding bank transaction
description_matching = get_matching_descriptions_data(bank_account[0].company, transaction)
if amount_matching:
return check_amount_vs_description(amount_matching, description_matching)
elif description_matching:
description_matching = filter(lambda x: not x.get('clearance_date'), description_matching)
if not description_matching:
return []
return sorted(list(description_matching), key = lambda x: x["posting_date"], reverse=True)
else:
return []
def check_matching_amount(bank_account, company, transaction):
payments = []
amount = transaction.credit if transaction.credit > 0 else transaction.debit
payment_type = "Receive" if transaction.credit > 0 else "Pay"
account_from_to = "paid_to" if transaction.credit > 0 else "paid_from"
currency_field = "paid_to_account_currency as currency" if transaction.credit > 0 else "paid_from_account_currency as currency"
payment_entries = frappe.get_all("Payment Entry", fields=["'Payment Entry' as doctype", "name", "paid_amount", "payment_type", "reference_no", "reference_date",
"party", "party_type", "posting_date", "{0}".format(currency_field)], filters=[["paid_amount", "like", "{0}%".format(amount)],
["docstatus", "=", "1"], ["payment_type", "=", [payment_type, "Internal Transfer"]], ["ifnull(clearance_date, '')", "=", ""], ["{0}".format(account_from_to), "=", "{0}".format(bank_account)]])
if transaction.credit > 0:
journal_entries = frappe.db.sql("""
SELECT
'Journal Entry' as doctype, je.name, je.posting_date, je.cheque_no as reference_no,
je.pay_to_recd_from as party, je.cheque_date as reference_date, jea.debit_in_account_currency as paid_amount
FROM
`tabJournal Entry Account` as jea
JOIN
`tabJournal Entry` as je
ON
jea.parent = je.name
WHERE
(je.clearance_date is null or je.clearance_date='0000-00-00')
AND
jea.account = %s
AND
jea.debit_in_account_currency like %s
AND
je.docstatus = 1
""", (bank_account, amount), as_dict=True)
else:
journal_entries = frappe.db.sql("""
SELECT
'Journal Entry' as doctype, je.name, je.posting_date, je.cheque_no as reference_no,
jea.account_currency as currency, je.pay_to_recd_from as party, je.cheque_date as reference_date,
jea.credit_in_account_currency as paid_amount
FROM
`tabJournal Entry Account` as jea
JOIN
`tabJournal Entry` as je
ON
jea.parent = je.name
WHERE
(je.clearance_date is null or je.clearance_date='0000-00-00')
AND
jea.account = %(bank_account)s
AND
jea.credit_in_account_currency like %(txt)s
AND
je.docstatus = 1
""", {
'bank_account': bank_account,
'txt': '%%%s%%' % amount
}, as_dict=True)
if transaction.credit > 0:
sales_invoices = frappe.db.sql("""
SELECT
'Sales Invoice' as doctype, si.name, si.customer as party,
si.posting_date, sip.amount as paid_amount
FROM
`tabSales Invoice Payment` as sip
JOIN
`tabSales Invoice` as si
ON
sip.parent = si.name
WHERE
(sip.clearance_date is null or sip.clearance_date='0000-00-00')
AND
sip.account = %s
AND
sip.amount like %s
AND
si.docstatus = 1
""", (bank_account, amount), as_dict=True)
else:
sales_invoices = []
if transaction.debit > 0:
purchase_invoices = frappe.get_all("Purchase Invoice",
fields = ["'Purchase Invoice' as doctype", "name", "paid_amount", "supplier as party", "posting_date", "currency"],
filters=[
["paid_amount", "like", "{0}%".format(amount)],
["docstatus", "=", "1"],
["is_paid", "=", "1"],
["ifnull(clearance_date, '')", "=", ""],
["cash_bank_account", "=", "{0}".format(bank_account)]
]
)
mode_of_payments = [x["parent"] for x in frappe.db.get_list("Mode of Payment Account",
filters={"default_account": bank_account}, fields=["parent"])]
company_currency = get_company_currency(company)
expense_claims = frappe.get_all("Expense Claim",
fields=["'Expense Claim' as doctype", "name", "total_sanctioned_amount as paid_amount",
"employee as party", "posting_date", "'{0}' as currency".format(company_currency)],
filters=[
["total_sanctioned_amount", "like", "{0}%".format(amount)],
["docstatus", "=", "1"],
["is_paid", "=", "1"],
["ifnull(clearance_date, '')", "=", ""],
["mode_of_payment", "in", "{0}".format(tuple(mode_of_payments))]
]
)
else:
purchase_invoices = expense_claims = []
for data in [payment_entries, journal_entries, sales_invoices, purchase_invoices, expense_claims]:
if data:
payments.extend(data)
return payments
def get_matching_descriptions_data(company, transaction):
if not transaction.description :
return []
bank_transactions = frappe.db.sql("""
SELECT
bt.name, bt.description, bt.date, btp.payment_document, btp.payment_entry
FROM
`tabBank Transaction` as bt
LEFT JOIN
`tabBank Transaction Payments` as btp
ON
bt.name = btp.parent
WHERE
bt.allocated_amount > 0
AND
bt.docstatus = 1
""", as_dict=True)
selection = []
for bank_transaction in bank_transactions:
if bank_transaction.description:
seq=difflib.SequenceMatcher(lambda x: x == " ", transaction.description, bank_transaction.description)
if seq.ratio() > 0.6:
bank_transaction["ratio"] = seq.ratio()
selection.append(bank_transaction)
document_types = set([x["payment_document"] for x in selection])
links = {}
for document_type in document_types:
links[document_type] = [x["payment_entry"] for x in selection if x["payment_document"]==document_type]
data = []
company_currency = get_company_currency(company)
for key, value in iteritems(links):
if key == "Payment Entry":
data.extend(frappe.get_all("Payment Entry", filters=[["name", "in", value]],
fields=["'Payment Entry' as doctype", "posting_date", "party", "reference_no",
"reference_date", "paid_amount", "paid_to_account_currency as currency", "clearance_date"]))
if key == "Journal Entry":
journal_entries = frappe.get_all("Journal Entry", filters=[["name", "in", value]],
fields=["name", "'Journal Entry' as doctype", "posting_date",
"pay_to_recd_from as party", "cheque_no as reference_no", "cheque_date as reference_date",
"total_credit as paid_amount", "clearance_date"])
for journal_entry in journal_entries:
journal_entry_accounts = frappe.get_all("Journal Entry Account", filters={"parenttype": journal_entry["doctype"], "parent": journal_entry["name"]}, fields=["account_currency"])
journal_entry["currency"] = journal_entry_accounts[0]["account_currency"] if journal_entry_accounts else company_currency
data.extend(journal_entries)
if key == "Sales Invoice":
data.extend(frappe.get_all("Sales Invoice", filters=[["name", "in", value]], fields=["'Sales Invoice' as doctype", "posting_date", "customer_name as party", "paid_amount", "currency"]))
if key == "Purchase Invoice":
data.extend(frappe.get_all("Purchase Invoice", filters=[["name", "in", value]], fields=["'Purchase Invoice' as doctype", "posting_date", "supplier_name as party", "paid_amount", "currency"]))
if key == "Expense Claim":
expense_claims = frappe.get_all("Expense Claim", filters=[["name", "in", value]], fields=["'Expense Claim' as doctype", "posting_date", "employee_name as party", "total_amount_reimbursed as paid_amount"])
data.extend([dict(x,**{"currency": company_currency}) for x in expense_claims])
return data
def check_amount_vs_description(amount_matching, description_matching):
result = []
if description_matching:
for am_match in amount_matching:
for des_match in description_matching:
if des_match.get("clearance_date"):
continue
if am_match["party"] == des_match["party"]:
if am_match not in result:
result.append(am_match)
continue
if "reference_no" in am_match and "reference_no" in des_match:
if difflib.SequenceMatcher(lambda x: x == " ", am_match["reference_no"], des_match["reference_no"]).ratio() > 70:
if am_match not in result:
result.append(am_match)
if result:
return sorted(result, key = lambda x: x["posting_date"], reverse=True)
else:
return sorted(amount_matching, key = lambda x: x["posting_date"], reverse=True)
else:
return sorted(amount_matching, key = lambda x: x["posting_date"], reverse=True)
def get_matching_transactions_payments(description_matching):
payments = [x["payment_entry"] for x in description_matching]
payment_by_ratio = {x["payment_entry"]: x["ratio"] for x in description_matching}
if payments:
reference_payment_list = frappe.get_all("Payment Entry", fields=["name", "paid_amount", "payment_type", "reference_no", "reference_date",
"party", "party_type", "posting_date", "paid_to_account_currency"], filters=[["name", "in", payments]])
return sorted(reference_payment_list, key=lambda x: payment_by_ratio[x["name"]])
else:
return []
def payment_entry_query(doctype, txt, searchfield, start, page_len, filters):
account = frappe.db.get_value("Bank Account", filters.get("bank_account"), "account")
if not account:
return
return frappe.db.sql("""
SELECT
name, party, paid_amount, received_amount, reference_no
FROM
`tabPayment Entry`
WHERE
(clearance_date is null or clearance_date='0000-00-00')
AND (paid_from = %(account)s or paid_to = %(account)s)
AND (name like %(txt)s or party like %(txt)s)
AND docstatus = 1
ORDER BY
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999), name
LIMIT
%(start)s, %(page_len)s""",
{
'txt': "%%%s%%" % txt,
'_txt': txt.replace("%", ""),
'start': start,
'page_len': page_len,
'account': account
}
)
def journal_entry_query(doctype, txt, searchfield, start, page_len, filters):
account = frappe.db.get_value("Bank Account", filters.get("bank_account"), "account")
return frappe.db.sql("""
SELECT
jea.parent, je.pay_to_recd_from,
if(jea.debit_in_account_currency > 0, jea.debit_in_account_currency, jea.credit_in_account_currency)
FROM
`tabJournal Entry Account` as jea
LEFT JOIN
`tabJournal Entry` as je
ON
jea.parent = je.name
WHERE
(je.clearance_date is null or je.clearance_date='0000-00-00')
AND
jea.account = %(account)s
AND
(jea.parent like %(txt)s or je.pay_to_recd_from like %(txt)s)
AND
je.docstatus = 1
ORDER BY
if(locate(%(_txt)s, jea.parent), locate(%(_txt)s, jea.parent), 99999),
jea.parent
LIMIT
%(start)s, %(page_len)s""",
{
'txt': "%%%s%%" % txt,
'_txt': txt.replace("%", ""),
'start': start,
'page_len': page_len,
'account': account
}
)
def sales_invoices_query(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""
SELECT
sip.parent, si.customer, sip.amount, sip.mode_of_payment
FROM
`tabSales Invoice Payment` as sip
LEFT JOIN
`tabSales Invoice` as si
ON
sip.parent = si.name
WHERE
(sip.clearance_date is null or sip.clearance_date='0000-00-00')
AND
(sip.parent like %(txt)s or si.customer like %(txt)s)
ORDER BY
if(locate(%(_txt)s, sip.parent), locate(%(_txt)s, sip.parent), 99999),
sip.parent
LIMIT
%(start)s, %(page_len)s""",
{
'txt': "%%%s%%" % txt,
'_txt': txt.replace("%", ""),
'start': start,
'page_len': page_len
}
)

View File

@@ -0,0 +1,21 @@
<div class="transaction-header">
<div class="level list-row list-row-head text-muted small">
<div class="col-sm-2 ellipsis hidden-xs">
{{ __("Date") }}
</div>
<div class="col-xs-11 col-sm-4 ellipsis list-subject">
{{ __("Description") }}
</div>
<div class="col-sm-2 ellipsis hidden-xs">
{{ __("Debit") }}
</div>
<div class="col-sm-2 ellipsis hidden-xs">
{{ __("Credit") }}
</div>
<div class="col-sm-1 ellipsis hidden-xs">
{{ __("Currency") }}
</div>
<div class="col-sm-1 ellipsis">
</div>
</div>
</div>

View File

@@ -0,0 +1,36 @@
<div class="list-row transaction-item">
<div>
<div class="clickable-section" data-name={{ name }}>
<div class="col-sm-2 ellipsis hidden-xs">
{%= frappe.datetime.str_to_user(date) %}
</div>
<div class="col-xs-8 col-sm-4 ellipsis list-subject">
{{ description }}
</div>
<div class="col-sm-2 ellipsis hidden-xs">
{%= format_currency(debit, currency) %}
</div>
<div class="col-sm-2 ellipsis hidden-xs">
{%= format_currency(credit, currency) %}
</div>
<div class="col-sm-1 ellipsis hidden-xs">
{{ currency }}
</div>
</div>
<div class="col-xs-3 col-sm-1">
<div class="btn-group">
<a class="dropdown-toggle btn btn-default btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span>Actions </span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu reports-dropdown" style="max-height: 300px; overflow-y: auto; right: 0px; left: auto;">
<li><a class="new-reconciliation" data-name={{ name }}>{{ __("Reconcile") }}</a></li>
<li class="divider"></li>
<li><a class="new-payment" data-name={{ name }}>{{ __("New Payment") }}</a></li>
<li><a class="new-invoice" data-name={{ name }}>{{ __("New Invoice") }}</a></li>
<li><a class="new-expense" data-name={{ name }}>{{ __("New Expense") }}</a></li>
</ul>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,21 @@
<div class="transaction-header">
<div class="level list-row list-row-head text-muted small">
<div class="col-xs-3 col-sm-2 ellipsis">
{{ __("Payment Name") }}
</div>
<div class="col-xs-3 col-sm-2 ellipsis">
{{ __("Reference Date") }}
</div>
<div class="col-sm-2 ellipsis hidden-xs">
{{ __("Amount") }}
</div>
<div class="col-sm-2 ellipsis hidden-xs">
{{ __("Party") }}
</div>
<div class="col-xs-3 col-sm-2 ellipsis">
{{ __("Reference Number") }}
</div>
<div class="col-xs-2 col-sm-2">
</div>
</div>
</div>

View File

@@ -0,0 +1,36 @@
<div class="list-row">
<div>
<div class="col-xs-3 col-sm-2 ellipsis">
{{ name }}
</div>
<div class="col-xs-3 col-sm-2 ellipsis">
{% if (typeof reference_date !== "undefined") %}
{%= frappe.datetime.str_to_user(reference_date) %}
{% else %}
{% if (typeof posting_date !== "undefined") %}
{%= frappe.datetime.str_to_user(posting_date) %}
{% endif %}
{% endif %}
</div>
<div class="col-sm-2 ellipsis hidden-xs">
{{ format_currency(paid_amount, currency) }}
</div>
<div class="col-sm-2 ellipsis hidden-xs">
{% if (typeof party !== "undefined") %}
{{ party }}
{% endif %}
</div>
<div class="col-xs-3 col-sm-2 ellipsis">
{% if (typeof reference_no !== "undefined") %}
{{ reference_no }}
{% else %}
{{ "" }}
{% endif %}
</div>
<div class="col-xs-2 col-sm-2">
<div class="text-right margin-bottom">
<button class="btn btn-primary btn-xs reconciliation-btn" data-doctype="{{ doctype }}" data-name="{{ name }}">{{ __("Reconcile") }}</button>
</div>
</div>
</div>
</div>

View File

@@ -1762,6 +1762,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
this.si_docs = this.get_submitted_invoice() || [];
this.email_queue_list = this.get_email_queue() || {};
this.customers_list = this.get_customers_details() || {};
if(this.customer_doc) {
this.freeze = this.customer_doc.display
}
@@ -1957,6 +1958,12 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
}],
function(values){
me.item_batch_no[me.items[0].item_code] = values.batch;
const item = me.frm.doc.items.find(
({ item_code }) => item_code === me.items[0].item_code
);
if (item) {
item.batch_no = values.batch;
}
},
__('Select Batch No'))
}

View File

@@ -44,7 +44,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
frappe.throw(_("Not permitted for {0}").format(party), frappe.PermissionError)
party = frappe.get_doc(party_type, party)
currency = party.default_currency if party.default_currency else get_company_currency(company)
currency = party.default_currency if party.get("default_currency") else get_company_currency(company)
out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company, out.customer_group, out.supplier_group)
out["payment_terms_template"] = get_pyt_term_template(party.name, party_type, company)
@@ -53,7 +53,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
set_other_values(out, party, party_type)
set_price_list(out, party, party_type, price_list, pos_profile)
out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company, out.customer_group, out.supplier_type)
out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company, out.customer_group, out.supplier_group)
if fetch_payment_terms_template:
out["payment_terms_template"] = get_pyt_term_template(party.name, party_type, company)
@@ -140,7 +140,7 @@ def set_other_values(out, party, party_type):
def get_default_price_list(party):
"""Return default price list for party (Document object)"""
if party.default_price_list:
if party.get("default_price_list"):
return party.default_price_list
if party.doctype == "Customer":
@@ -155,7 +155,7 @@ def set_price_list(out, party, party_type, given_price_list, pos=None):
# price list
price_list = get_permitted_documents('Price List')
if price_list:
if price_list and len(price_list) == 1:
price_list = price_list[0]
elif pos and party_type == 'Customer':
customer_price_list = frappe.get_value('Customer', party.name, 'default_price_list')
@@ -450,7 +450,9 @@ def get_timeline_data(doctype, name):
# fetch and append data from Activity Log
data += frappe.db.sql("""select {fields}
from `tabActivity Log`
where reference_doctype="{doctype}" and reference_name="{name}"
where (reference_doctype="{doctype}" and reference_name="{name}")
or (timeline_doctype in ("{doctype}") and timeline_name="{name}")
or (reference_doctype in ("Quotation", "Opportunity") and timeline_name="{name}")
and status!='Success' and creation > {after}
{group_by} order by creation desc
""".format(doctype=frappe.db.escape(doctype), name=frappe.db.escape(name), fields=fields,
@@ -586,4 +588,4 @@ def get_partywise_advanced_payment_amount(party_type, posting_date = None):
.format(("credit") if party_type == "Customer" else "debit", cond) , party_type)
if data:
return frappe._dict(data)
return frappe._dict(data)

View File

@@ -6,17 +6,18 @@
</style>
<div class="page-break">
<div>
{% set gl = frappe.get_list(doctype="GL Entry", fields=["account", "party_type", "party", "debit", "credit", "remarks"], filters={"voucher_type": doc.doctype, "voucher_no": doc.name}) %}
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
and doc.set("select_print_heading", _("Payment Entry")) -%}{%- endif -%}
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
<div class="row margin-bottom">
<div class="col-sm-6">
<div class="col-xs-6">
<table>
<tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr>
</table>
</div>
<div>
<div class="col-xs-6">
<table>
<tr><td><strong>Date: </strong></td><td>{{ frappe.utils.formatdate(doc.creation) }}</td></tr>
</table>
@@ -30,53 +31,46 @@
<th>Party</th>
<th>Amount</th>
</tr>
<tr>
<td class="top-bottom" colspan="5"><strong>Debit</strong></td>
</tr>
{% for entries in gl %}
{% if entries.credit == 0.0 %}
<tr>
<td class="right top-bottom">{{ entries.account }}</td>
<td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td>
<td class="left top-bottom">{{ entries.debit }}</td>
</tr>
<tr>
<td class="top-bottom"colspan="4"><strong> Narration </strong><br>{{ entries.remarks }}</td>
</tr>
{% endif %}
{% endfor %}
<tr>
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
<td class="left" >{{ gl | sum(attribute='debit') }}</td>
</tr>
<tr>
<td class="top-bottom" colspan="5"><strong>Credit</strong></td>
</tr>
{% set total_credit = 0 -%}
{% for entries in doc.gl_entries %}
{% for entries in gl %}
{% if entries.debit == 0.0 %}
<tr>
<td class="right top-bottom">{{ entries.account }}</td>
<td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td>
<td class="left top-bottom">{{ entries.credit }}</td>
{% set total_credit = total_credit + entries.credit -%}
</tr>
<tr>
<td class="top-bottom" colspan="4"><strong> Narration </strong><br>{{ entries.remarks }}</td>
</tr>
{% endif %}
{% endfor %}
<tr>
<td class="right" colspan="3"><strong>Total (credit) </strong></td>
<td class="left" >{{total_credit}}</td>
<td class="left" >{{ gl | sum(attribute='credit') }}</td>
</tr>
{% endif %}
{% endfor %}
<tr>
<td class="top-bottom" colspan="4"> </td>
</tr>
<tr>
<td class="top-bottom" colspan="5"><strong>Debit</strong></td>
</tr>
{% set total_debit = 0 -%}
{% for entries in doc.gl_entries %}
{% if entries.credit == 0.0 %}
<tr>
<td class="right top-bottom">{{ entries.account }}</td>
<td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td>
{% set total_debit = total_debit + entries.debit -%}
<td class="left top-bottom">{{ entries.debit }}</td>
</tr>
<tr>
<td class="top-bottom"colspan="4"><strong> Narration </strong><br>{{ entries.remarks }}</td>
</tr>
<tr>
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
<td class="left" >{{total_debit}}</td>
</tr>
{% endif %}
{% endfor %}
</table>
<div>
</div>

View File

@@ -1,19 +1,23 @@
{
"creation": "2014-08-28 11:11:39.796473",
"custom_format": 0,
"disabled": 0,
"doc_type": "Journal Entry",
"docstatus": 0,
"doctype": "Print Format",
"html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n\n<div class=\"page-break\">\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Credit Note\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n {%- for label, value in (\n (_(\"Credit To\"), doc.pay_to_recd_from),\n (_(\"Date\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Amount\"), \"<strong>\" + doc.get_formatted(\"total_amount\") + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n (_(\"Remarks\"), doc.remark)\n ) -%}\n\n <div class=\"row\">\n <div class=\"col-xs-3\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-xs-9\">{{ value }}</div>\n </div>\n\n {%- endfor -%}\n\n <hr>\n <br>\n <p class=\"strong\">\n {{ _(\"For\") }} {{ doc.company }},<br>\n <br>\n <br>\n <br>\n {{ _(\"Authorized Signatory\") }}\n </p>\n</div>\n\n\n",
"idx": 2,
"modified": "2015-07-22 17:42:01.560817",
"modified_by": "Administrator",
"name": "Credit Note",
"owner": "Administrator",
"parent": "Journal Entry",
"parentfield": "__print_formats",
"parenttype": "DocType",
"print_format_type": "Server",
"align_labels_right": 0,
"creation": "2014-08-28 11:11:39.796473",
"custom_format": 0,
"disabled": 0,
"doc_type": "Journal Entry",
"docstatus": 0,
"doctype": "Print Format",
"format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\", \"options\": \"<div class=\\\"print-heading\\\">\\t\\t\\t\\t<h2>Journal Entry<br><small>{{ doc.name }}</small>\\t\\t\\t\\t</h2></div>\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"voucher_type\", \"print_hide\": 0, \"label\": \"Entry Type\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"posting_date\", \"print_hide\": 0, \"label\": \"Posting Date\"}, {\"fieldname\": \"finance_book\", \"print_hide\": 0, \"label\": \"Finance Book\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"accounts\", \"print_hide\": 0, \"label\": \"Accounting Entries\", \"visible_columns\": [{\"fieldname\": \"account\", \"print_width\": \"250px\", \"print_hide\": 0}, {\"fieldname\": \"bank_account_no\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"party_type\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"party\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"debit_in_account_currency\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"credit_in_account_currency\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"reference_type\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"reference_name\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"reference_due_date\", \"print_width\": \"\", \"print_hide\": 0}, {\"fieldname\": \"project\", \"print_width\": \"\", \"print_hide\": 0}]}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"cheque_no\", \"print_hide\": 0, \"label\": \"Reference Number\"}, {\"fieldname\": \"cheque_date\", \"print_hide\": 0, \"label\": \"Reference Date\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"get_balance\", \"print_hide\": 0, \"label\": \"Make Difference Entry\"}, {\"fieldname\": \"total_amount\", \"print_hide\": 0, \"label\": \"Total Amount\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Reference\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"clearance_date\", \"print_hide\": 0, \"label\": \"Clearance Date\"}, {\"fieldname\": \"remark\", \"print_hide\": 0, \"label\": \"Remark\"}, {\"fieldname\": \"inter_company_journal_entry_reference\", \"print_hide\": 0, \"label\": \"Inter Company Journal Entry Reference\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"due_date\", \"print_hide\": 0, \"label\": \"Due Date\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Printing Settings\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"pay_to_recd_from\", \"print_hide\": 0, \"label\": \"Pay To / Recd From\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"letter_head\", \"print_hide\": 0, \"label\": \"Letter Head\"}, {\"fieldtype\": \"Section Break\", \"label\": \"More Information\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"mode_of_payment\", \"print_hide\": 0, \"label\": \"Mode of Payment\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"stock_entry\", \"print_hide\": 0, \"label\": \"Stock Entry\"}]",
"html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n\n<div class=\"page-break\">\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Credit Note\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n {%- for label, value in (\n (_(\"Credit To\"), doc.pay_to_recd_from),\n (_(\"Date\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Amount\"), \"<strong>\" + doc.get_formatted(\"total_amount\") + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n (_(\"Remarks\"), doc.remark)\n ) -%}\n\n <div class=\"row\">\n <div class=\"col-xs-3\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-xs-9\">{{ value }}</div>\n </div>\n\n {%- endfor -%}\n\n <hr>\n <br>\n <p class=\"strong\">\n {{ _(\"For\") }} {{ doc.company }},<br>\n <br>\n <br>\n <br>\n {{ _(\"Authorized Signatory\") }}\n </p>\n</div>\n\n\n",
"idx": 2,
"line_breaks": 0,
"modified": "2019-04-18 12:10:14.732269",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Credit Note",
"owner": "Administrator",
"parentfield": "__print_formats",
"print_format_builder": 0,
"print_format_type": "Server",
"show_section_headings": 0,
"standard": "Yes"
}

View File

@@ -3,26 +3,25 @@
.table-bordered td.top-bottom {border-top: none !important;border-bottom: none !important;}
.table-bordered td.right{border-right: none !important;}
.table-bordered td.left{border-left: none !important;}
</style>
<div class="page-break">
<div>
{% set gl = frappe.get_list(doctype="GL Entry", fields=["account", "party_type", "party", "debit", "credit", "remarks"], filters={"voucher_type": doc.doctype, "voucher_no": doc.name}) %}
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
and doc.set("select_print_heading", _("Journal Entry")) -%}{%- endif -%}
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
<div class="row margin-bottom">
<div class="col-sm-6">
<div class="row">
<div class="col-xs-6">
<table>
<tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr>
<tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr>
</table>
</div>
<div>
<div class="col-xs-6">
<table>
<tr><td><strong>Date: </strong></td><td>{{ frappe.utils.formatdate(doc.creation) }}</td></tr>
</table>
</div>
</div>
<div class="margin-top">
<div>
<table class="table table-bordered table-condensed">
<tr>
<th>Account</th>
@@ -30,47 +29,43 @@
<th>Party</th>
<th>Amount</th>
</tr>
<tr>
<td class="top-bottom" colspan="5"><strong>Debit</strong></td>
</tr>
{% for entries in gl %}
{% if entries.credit == 0.0 %}
<tr>
<td class="right top-bottom">{{ entries.account }}</td>
<td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td>
<td class="left top-bottom">{{ entries.debit }}</td>
</tr>
{% endif %}
{% endfor %}
<tr>
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
<td class="left" >{{ gl | sum(attribute='debit') }}</td>
</tr>
<tr>
<td class="top-bottom" colspan="5"><strong>Credit</strong></td>
</tr>
{% set total_credit = 0 -%}
{% for entries in doc.gl_entries %}
{% for entries in gl %}
{% if entries.debit == 0.0 %}
<tr>
<td class="right top-bottom">{{ entries.account }}</td>
<td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td>
<td class="left top-bottom">{{ entries.credit }}</td>
{% set total_credit = total_credit + entries.credit -%}
</tr>
<tr>
<td class="right" colspan="3"><strong>Total (credit) </strong></td>
<td class="left" >{{total_credit}}</td>
</tr>
{% endif %}
{% endfor %}
<tr>
<td class="top-bottom" colspan="4"> </td>
<td class="right" colspan="3"><strong>Total (credit) </strong></td>
<td class="left" >{{ gl | sum(attribute='credit') }}</td>
</tr>
<tr>
<td class="top-bottom" colspan="5"><strong>Debit</strong></td>
<td class="top-bottom" colspan="5"><b>Narration: </b>{{ gl[0].remarks }}</td>
</tr>
{% set total_debit = 0 -%}
{% for entries in doc.gl_entries %}
{% if entries.credit == 0.0 %}
<tr>
<td class="right top-bottom">{{ entries.account }}</td>
<td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td>
{% set total_debit = total_debit + entries.debit -%}
<td class="left top-bottom">{{ entries.debit }}</td>
</tr>
<tr>
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
<td class="left" >{{total_debit}}</td>
</tr>
{% endif %}
{% endfor %}
</table>
<div>
</div>

View File

@@ -1,10 +1,11 @@
{%- from "templates/print_formats/standard_macros.html" import add_header -%}
<div class="page-break">
<div>
{% set gl = frappe.get_list(doctype="GL Entry", fields=["account", "party_type", "party", "debit", "credit", "remarks"], filters={"voucher_type": doc.doctype, "voucher_no": doc.name}) %}
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
and doc.set("select_print_heading", _("Purchase Invoice")) -%}{%- endif -%}
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
<div class="row margin-bottom">
<div class="col-sm-6">
<div class="col-xs-6">
<table>
<tr><td><strong>Supplier Name: </strong></td><td>{{ doc.supplier }}</td></tr>
<tr><td><strong>Due Date: </strong></td><td>{{ frappe.utils.formatdate(doc.due_date) }}</td></tr>
@@ -13,7 +14,7 @@
<tr><td><strong>Mobile no: </strong> </td><td>{{doc.contact_mobile}}</td></tr>
</table>
</div>
<div>
<div class="col-xs-6">
<table>
<tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr>
<tr><td><strong>Date: </strong></td><td>{{ frappe.utils.formatdate(doc.creation) }}</td></tr>
@@ -49,21 +50,27 @@
</table>
</div>
<div class="row margin-bottom">
<div class="col-sm-6">
<div class="col-xs-6">
<table>
<tr><td><strong>Total Quantity: </strong></td><td>{{ doc.total_qty }}</td></tr>
<tr><td><strong>Total: </strong></td><td>{{doc.total}}</td></tr>
<tr><td><strong>Net Weight: </strong></td><td>{{ doc.total_net_weight }}</td></tr>
</table>
</div>
<div>
<div class="col-xs-6">
<table>
<tr><td><strong>Tax and Charges: </strong></td><td>{{doc.taxes_and_charges}}</td></tr>
{% for tax in doc.taxes %}
<tr><td><strong>{{ tax.account_head }}: </strong></td><td>{{ tax.tax_amount_after_discount_amount }}</td></tr>
{% if tax.tax_amount_after_discount_amount!= 0 %}
<tr><td><strong>{{ tax.account_head }}: </strong></td><td>{{ tax.tax_amount_after_discount_amount }}</td></tr>
{% endif %}
{% endfor %}
{% if doc.taxes_and_charges_added!= 0 %}
<tr><td><strong> Taxes and Charges Added: </strong></td><td>{{ doc.taxes_and_charges_added }}</td></tr>
{% endif %}
{% if doc.taxes_and_charges_deducted!= 0 %}
<tr><td><strong> Taxes and Charges Deducted: </strong></td><td>{{ doc.taxes_and_charges_deducted }}</td></tr>
{% endif %}
<tr><td><strong> Total Taxes and Charges: </strong></td><td>{{ doc.total_taxes_and_charges }}</td></tr>
<tr><td><strong> Net Payable: </strong></td><td>{{ doc.grand_total }}</td></tr>
</table>
@@ -76,17 +83,17 @@
<th>Account</th>
<th>Party Type</th>
<th>Party</th>
<th>Credit Amount</th>
<th>Debit Amount</th>
<th>Credit Amount</th>
</tr>
{% for entries in doc.gl_entries %}
{% for entries in gl %}
<tr>
<td>{{ loop.index }}</td>
<td>{{ entries.account }}</td>
<td>{{ entries.party_type }}</td>
<td>{{ entries.party }}</td>
<td>{{ entries.credit }}</td>
<td>{{ entries.debit }}</td>
<td>{{ entries.credit }}</td>
</tr>
{% endfor %}
<tr>

View File

@@ -1,10 +1,11 @@
{%- from "templates/print_formats/standard_macros.html" import add_header -%}
<div class="page-break">
<div>
{% set gl = frappe.get_list(doctype="GL Entry", fields=["account", "party_type", "party", "debit", "credit", "remarks"], filters={"voucher_type": doc.doctype, "voucher_no": doc.name}) %}
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
and doc.set("select_print_heading", _("Sales Invoice")) -%}{%- endif -%}
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
<div class="row margin-bottom">
<div class="col-sm-6">
<div class="col-xs-6">
<table>
<tr><td><strong>Customer Name: </strong></td><td>{{ doc.customer }}</td></tr>
<tr><td><strong>Due Date: </strong></td><td>{{ frappe.utils.formatdate(doc.due_date) }}</td></tr>
@@ -13,7 +14,7 @@
<tr><td><strong>Mobile no: </strong> </td><td>{{doc.contact_mobile}}</td></tr>
</table>
</div>
<div>
<div class="col-xs-6">
<table>
<tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr>
<tr><td><strong>Date: </strong></td><td>{{ frappe.utils.formatdate(doc.creation) }}</td></tr>
@@ -45,18 +46,20 @@
</table>
</div>
<div class="row margin-bottom">
<div class="col-sm-6">
<div class="col-xs-6">
<table>
<tr><td><strong>Total Quantity: </strong></td><td>{{ doc.total_qty }}</td></tr>
<tr><td><strong>Total: </strong></td><td>{{doc.total}}</td></tr>
<tr><td><strong>Net Weight: </strong></td><td>{{ doc.total_net_weight }}</td></tr>
</table>
</div>
<div>
<div class="col-xs-6">
<table>
<tr><td><strong>Tax and Charges: </strong></td><td>{{doc.taxes_and_charges}}</td></tr>
{% for tax in doc.taxes %}
<tr><td><strong>{{ tax.account_head }}: </strong></td><td>{{ tax.tax_amount_after_discount_amount }}</td></tr>
{% if tax.tax_amount_after_discount_amount!= 0 %}
<tr><td><strong>{{ tax.account_head }}: </strong></td><td>{{ tax.tax_amount_after_discount_amount }}</td></tr>
{% endif %}
{% endfor %}
<tr><td><strong> Total Taxes and Charges: </strong></td><td>{{ doc.total_taxes_and_charges }}</td></tr>
<tr><td><strong> Net Payable: </strong></td><td>{{ doc.grand_total }}</td></tr>
@@ -70,17 +73,17 @@
<th>Account</th>
<th>Party Type</th>
<th>Party</th>
<th>Credit Amount</th>
<th>Debit Amount</th>
<th>Credit Amount</th>
</tr>
{% for entries in doc.gl_entries %}
{% for entries in gl %}
<tr>
<td>{{ loop.index }}</td>
<td>{{ entries.account }}</td>
<td>{{ entries.party_type }}</td>
<td>{{ entries.party }}</td>
<td>{{ entries.credit }}</td>
<td>{{ entries.debit }}</td>
<td>{{ entries.credit }}</td>
</tr>
{% endfor %}
<tr>

View File

@@ -0,0 +1,129 @@
{%- from "templates/print_formats/standard_macros.html" import add_header, render_field, print_value, fieldmeta,
get_width, get_align_class -%}
{%- macro render_currency(df, doc) -%}
<div class="row {% if df.bold %}important{% endif %} data-field">
<div class="col-xs-{{ "9" if df.fieldtype=="Check" else "5" }}
{%- if doc.align_labels_right %} text-right{%- endif -%}">
<label>{{ _(df.label) }}</label>
</div>
<div class="col-xs-{{ "3" if df.fieldtype=="Check" else "7" }} value">
{% if doc.get(df.fieldname) != None -%}
{{ frappe.utils.fmt_money((doc[df.fieldname])|int|abs, currency=doc.currency) }}
{% endif %}
</div>
</div>
{%- endmacro -%}
{%- macro render_taxes(df, doc) -%}
{%- set data = doc.get(df.fieldname)[df.start:df.end] -%}
<div class="row">
<div class="col-xs-6"></div>
<div class="col-xs-6">
{%- for charge in data -%}
{%- if (charge.tax_amount or doc.flags.print_taxes_with_zero_amount) and (not charge.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}
<div class="row">
<div class="col-xs-5 {%- if doc.align_labels_right %} text-right{%- endif -%}">
<label>{{ charge.get_formatted("description") }}</label></div>
<div class="col-xs-7 text-right">
{{ frappe.utils.fmt_money((charge.tax_amount)|int|abs, currency=doc.currency) }}
</div>
</div>
{%- endif -%}
{%- endfor -%}
</div>
</div>
{%- endmacro -%}
{%- macro render_table(df, doc) -%}
{%- set table_meta = frappe.get_meta(df.options) -%}
{%- set data = doc.get(df.fieldname)[df.start:df.end] -%}
{%- if doc.print_templates and
doc.print_templates.get(df.fieldname) -%}
{% include doc.print_templates[df.fieldname] %}
{%- else -%}
{%- if data -%}
{%- set visible_columns = get_visible_columns(doc.get(df.fieldname),
table_meta, df) -%}
<div {{ fieldmeta(df) }}>
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th style="width: 40px" class="table-sr">{{ _("Sr") }}</th>
{% for tdf in visible_columns %}
{% if (data and not data[0].flags.compact_item_print) or tdf.fieldname in doc.get(df.fieldname)[0].flags.compact_item_fields %}
<th style="width: {{ get_width(tdf) }};" class="{{ get_align_class(tdf) }}" {{ fieldmeta(df) }}>
{{ _(tdf.label) }}</th>
{% endif %}
{% endfor %}
</tr>
</thead>
<tbody>
{% for d in data %}
<tr>
<td class="table-sr">{{ d.idx }}</td>
{% for tdf in visible_columns %}
{% if not d.flags.compact_item_print or tdf.fieldname in doc.get(df.fieldname)[0].flags.compact_item_fields %}
<td class="{{ get_align_class(tdf) }}" {{ fieldmeta(df) }}>
{% if tdf.fieldtype == 'Currency' %}
<div class="value">{{ frappe.utils.fmt_money((d[tdf.fieldname])|int|abs, currency=doc.currency) }}</div></td>
{% else %}
<div class="value">{{ print_value(tdf, d, doc, visible_columns) }}</div></td>
{% endif %}
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{%- endif -%}
{%- endif -%}
{%- endmacro -%}
{% for page in layout %}
<div class="page-break">
<div {% if print_settings.repeat_header_footer %} id="header-html" class="hidden-pdf" {% endif %}>
{{ add_header(loop.index, layout|len, doc, letter_head, no_letterhead, footer, print_settings) }}
</div>
{% if print_settings.repeat_header_footer %}
<div id="footer-html" class="visible-pdf">
{% if not no_letterhead and footer %}
<div class="letter-head-footer">
{{ footer }}
</div>
{% endif %}
<p class="text-center small page-number visible-pdf">
{{ _("Page {0} of {1}").format('<span class="page"></span>', '<span class="topage"></span>') }}
</p>
</div>
{% endif %}
{% for section in page %}
<div class="row section-break">
{% if section.columns.fields %}
{%- if doc.print_line_breaks and loop.index != 1 -%}<hr>{%- endif -%}
{%- if doc.print_section_headings and section.label and section.has_data -%}
<h4 class='col-sm-12'>{{ _(section.label) }}</h4>
{% endif %}
{%- endif -%}
{% for column in section.columns %}
<div class="col-xs-{{ (12 / section.columns|len)|int }} column-break">
{% for df in column.fields %}
{% if df.fieldname == 'taxes' %}
{{ render_taxes(df, doc) }}
{% elif df.fieldtype == 'Currency' %}
{{ render_currency(df, doc) }}
{% elif df.fieldtype =='Table' %}
{{ render_table(df, doc)}}
{% elif doc[df.fieldname] %}
{{ render_field(df, doc) }}
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
{% endfor %}

View File

@@ -0,0 +1,24 @@
{
"align_labels_right": 1,
"creation": "2019-07-24 20:13:30.259953",
"custom_format": 0,
"default_print_language": "en-US",
"disabled": 0,
"doc_type": "Sales Invoice",
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
"html": "",
"idx": 0,
"line_breaks": 1,
"modified": "2019-07-24 20:13:30.259953",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Return",
"owner": "Administrator",
"print_format_builder": 0,
"print_format_type": "Jinja",
"raw_printing": 0,
"show_section_headings": 1,
"standard": "Yes"
}

View File

@@ -44,6 +44,13 @@ frappe.query_reports["Accounts Payable"] = {
"default": "90",
"reqd": 1
},
{
"fieldname":"range4",
"label": __("Ageing Range 4"),
"fieldtype": "Int",
"default": "120",
"reqd": 1
},
{
"fieldname":"finance_book",
"label": __("Finance Book"),
@@ -66,6 +73,12 @@ frappe.query_reports["Accounts Payable"] = {
}
}
},
{
"fieldname":"payment_terms_template",
"label": __("Payment Terms Template"),
"fieldtype": "Link",
"options": "Payment Terms Template"
},
{
"fieldname":"supplier_group",
"label": __("Supplier Group"),

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