Compare commits

..

1344 Commits

Author SHA1 Message Date
Saurabh
e0222723f0 Merge branch 'version-13-pre-release' into version-13 2021-04-07 11:13:40 +05:30
Saurabh
547fd31a37 bumped to version 13.0.1 2021-04-07 11:33:40 +05:50
Nabin Hait
aa809ceffe fix: Patch fixes for v13 upgrade (#25220) 2021-04-07 10:57:46 +05:30
Saurabh
d05686d27d Merge branch 'version-13-pre-release' into version-13 2021-04-01 22:59:49 +05:30
Saurabh
e7b3047eca chore: Bump version to v13.0.0 2021-04-01 22:59:28 +05:30
Anuja Pawar
87dea3923b fix: Picked Qty conversion from Stock Qty to Qty while creating DN from Pick List (#25106)
* fix: picked qty from Stock Qty to Qty in DN

* fix: suggested changes and added test

* fix: sider changes

* fix: sider changes
2021-04-01 22:05:08 +05:30
Saurabh
f9b9298a6d fix: reload doc in patch (#25144) 2021-04-01 21:59:35 +05:30
Jannat Patel
c01b2caaa3 fix: serial no refresh issue (#25129) 2021-04-01 20:48:51 +05:30
Suraj Shetty
5921f434b6 Merge pull request #25142 from surajshetty3416/fix-get_route_options_for_new_doc-version-13-pre-release
fix: get_route_options_for_new_doc for Project
2021-04-01 19:59:51 +05:30
Suraj Shetty
c5347c4a34 fix: get_route_options_for_new_doc for project 2021-04-01 19:59:29 +05:30
Nabin Hait
db5f0f79b1 chore: added v13 change log (#25140) 2021-04-01 19:59:02 +05:30
Rucha Mahabal
0773d6772d fix(POS): local variable 'customer_currency' referenced before assignment (#25137) 2021-04-01 17:47:19 +05:30
Marica
f4e7e72f67 Merge pull request #25131 from marination/qc-back-update-pre-release
fix: Query values incorrectly escaped while back updating Quality Inspection
2021-04-01 17:39:56 +05:30
Sagar Vora
98d250995d fix(India): create property setters for shorter naming series (#25134) 2021-04-01 16:52:28 +05:30
marination
a3da206b64 fix: Don't string format args as they may not be escaped properly
- Append even conditional args to args list and send to query executer
- It will escape all values that are sent to it
- String formatting without escaping causes issues with % sign, etc.
2021-04-01 15:45:33 +05:30
Rucha Mahabal
6717773c28 fix: Travis (#25078)
* fix(test): set default accounts in mode of payment

* fix(test): import_doc params in shopify settings test

* fix: syntax error in salary slip test

* fix(test): use Temporary Opening account for Stock Reco opening entry

* fix(test): skip GST doc naming validations for tests

* fix(test): Salary Structure Assignment date edge case

* fix(test): GST doc naming validations

* fix: sider

* revert: skip GST doc naming validations for tests
2021-04-01 15:30:34 +05:30
Nabin Hait
7f7b3608bb fix: merge conflict 2021-04-01 15:05:53 +05:30
Nabin Hait
11eb30d082 fix: merge conflict 2021-04-01 15:03:11 +05:30
rohitwaghchaure
bee9c73730 Merge pull request #25125 from rohitwaghchaure/repost-not-completed-transactions-v13-pre
fix: repost not completed backdated transactions
2021-04-01 15:00:43 +05:30
Rohit Waghchaure
58ca5a7329 fix: repost not completed backdated transactions 2021-04-01 14:59:49 +05:30
Rucha Mahabal
d765b21825 fix: Salary Structure object has no attribute set_totals (#25114) 2021-04-01 14:39:52 +05:30
Marica
8617c0ab99 Merge pull request #25070 from marination/update-items-bin
fix: Update Bin via Update Item on Purchase/Sales Order
2021-03-31 22:21:41 +05:30
Afshan
2fef245607 fix: don't set Company:company:default_currency as default for currency link fields (#25111) 2021-03-31 21:57:04 +05:30
marination
85a7ec91a1 fix: Run Patches to updated Reserved, Requested and Ordered Qty 2021-03-31 21:07:59 +05:30
Anupam Kumar
35415fa575 fix: added flag for dont_fetch_price_list_rate in transaction (#25083) 2021-03-31 19:39:33 +05:30
Prssanna Desai
9920d4062c Merge pull request #25103 from prssanna/redesign-fixes-v13 2021-03-31 19:02:10 +05:30
Anupam Kumar
526497bc43 Merge pull request #25104 from anupamvs/purchase-side-margin-beta
feat: price margin in buying
2021-03-31 18:38:58 +05:30
Prssanna Desai
e9236ab60f Merge pull request #25102 from prssanna/pos-print-v13 2021-03-31 18:36:07 +05:30
Anupam
ad520e08ba feat: price margin in buying 2021-03-31 18:31:12 +05:30
prssanna
bcd63f04da style: missing semicolon 2021-03-31 18:26:52 +05:30
prssanna
5cdb1cb7a9 fix: item variant dialog dropdown issue 2021-03-31 18:26:45 +05:30
prssanna
56ab3fb132 fix: issue web list style 2021-03-31 18:26:37 +05:30
prssanna
b5843dbdcd fix: print recepit dialog 2021-03-31 18:21:51 +05:30
prssanna
b6ce868199 fix: POS print receipt 2021-03-31 18:21:38 +05:30
Rucha Mahabal
75ce336c84 chore: add sider config (#24892) (#25098)
Co-authored-by: Sagar Vora <sagar@resilient.tech>

Co-authored-by: Mohammad Hasnain Mohsin Rajan <hasnain2808@gmail.com>
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-03-31 16:27:20 +05:30
Jannat Patel
c814aab0b6 fix: delivery note print error (#25081) 2021-03-31 16:24:31 +05:30
Prssanna Desai
c5ae9ee0e1 fix: do not set standard link in Sales Invoice as custom (#25097) 2021-03-31 16:16:12 +05:30
Deepesh Garg
c482c9592f fix: Purchase from registered composition dealer (#25057)
* fix: Purchase from registered composition dealer

* fix: Test case for GSTR 3b report
2021-03-31 16:04:46 +05:30
Saqib
fb4051bddd feat: discount configuration on early payments (#25089)
* feat: discount configuration on early payments

Co-authored-by: Nabin Hait <nabinhait@gmail.com>

* fix: remove duplicate patch call

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-03-31 15:52:51 +05:30
Saqib
4d0939de8d feat: introduce parameter group in quality inspection (#25094)
* feat: introduce parameter group in quality inspection

* chore: make parameter group optional
2021-03-31 15:51:48 +05:30
rohitwaghchaure
968885af26 Merge pull request #25091 from rohitwaghchaure/fixed-multiply-issue-material-request
fix: can't multiply sequence by non-int of type 'float'
2021-03-31 15:31:30 +05:30
Rohit Waghchaure
94c145f3c3 fix: can't multiply sequence by non-int of type 'float' 2021-03-31 15:28:26 +05:30
Saqib
f239dbdd03 feat: tax collected at source using tax withholding category (#25090)
* refactor: tax withholding category against customer

* feat: pan and tax withholding category fields for customer

* fix: test

* feat: charging tcs on sales invoice

* fix: tcs chargable amount

* fix: tcs amount calculation

* fix: sider
2021-03-31 15:15:29 +05:30
Marica
f4426c825e Merge pull request #25079 from marination/drop-ship-pre-release
fix: PO not created against all selected suppliers (drop shipping)
2021-03-31 14:36:34 +05:30
Saqib
df1ef6f8e5 fix: make round off GLE always non-opening (#25087) 2021-03-31 14:23:09 +05:30
rohitwaghchaure
83b3e87497 Merge pull request #25076 from rohitwaghchaure/fixed-bom-stock-calculated-report
fix: bom stock calculated report
2021-03-31 13:51:32 +05:30
marination
59bff8a2f1 fix: Test
- Preserve order of supplier list while removing duplicates
- Dont use list of set, but list of dict with unique keys
2021-03-31 13:17:25 +05:30
marination
1b903e39c8 fix: Sider (unused variables) 2021-03-31 13:17:13 +05:30
marination
1999ae0a91 fix: PO not created against all selected suppliers (drop shipping)
- Return list of created POs instead of first doc
- test case added
2021-03-31 13:17:00 +05:30
Sagar Vora
e50324aed7 perf: reduce number of queries for checking if future SL entry exists (#25064) 2021-03-31 12:44:03 +05:30
Sagar Vora
368cb45147 fix(Italy): setup, validations, optimisations (#25065) 2021-03-31 12:43:33 +05:30
Rohit Waghchaure
410d36beca fix: bom stock calculated report 2021-03-31 12:11:00 +05:30
Afshan
91a8a74d54 fix: column width in Recruitment Analytics report (#25074) 2021-03-31 11:30:04 +05:30
Anupam Kumar
08eaf3c6b8 Merge pull request #25071 from anupamvs/add-to-transit-prere
fix: unable to submit stock entry
2021-03-31 02:34:19 +05:30
Anupam
41229ba705 fix: unable to submit stock entry 2021-03-31 02:32:25 +05:30
marination
a5de6c779b fix: Cleaned up and fixed validation and bin updation on deletion
- Created separate smaller functions for validation and bin updation of deleted row
- Made sure previous doc (linked doc) was also updated after deletion of row
- Tests to check bin updation on add/update/delete
- Made reserved qty for subcontrating read only in bin
2021-03-31 02:03:26 +05:30
Andy Zhu
ba3578929e Update accounts_controller.py
Updating Bin quantity based on doctype to optimize running efficiency.
2021-03-31 02:03:16 +05:30
Andy Zhu
c0ba6eafd5 fix: Update Items on Purchase Order
1. set warehouse using `get_item_warehouse`
2. update "reserved_qty" for sales order
2021-03-31 02:03:10 +05:30
Andy Zhu
a21e347bf1 fix: Update Items on Purchase Order
If user add rows or remove rows to update items on purchase order, the quantity in bin won't get updated.
This fix is not mature yet but to give an tempopary solution for fixing this issue.
2021-03-31 02:03:02 +05:30
Prssanna Desai
7e442c74b6 Merge pull request #25020 from prssanna/help-links-fix-v13 2021-03-30 19:29:30 +05:30
Deepesh Garg
6be78db62c Merge pull request #25052 from deepeshgarg007/gst_rounding_v13_beta
feat: Normal rounding for GST Taxes
2021-03-30 17:01:45 +05:30
Rucha Mahabal
469ef122aa Merge pull request #25059 from ruchamahabal/non-profit-fixes
fix: Non Profit fixes
2021-03-30 12:44:55 +05:30
Rucha Mahabal
04c0296558 fix: add filters to account link fields in Non Profit Settings
- fetch memberships ordered by date in certificate
2021-03-30 12:30:40 +05:30
Anupam Kumar
9be11afbde feat: price margin in buying (#25058) 2021-03-30 12:09:46 +05:30
Rucha Mahabal
a54eecb230 fix: membership renewal validation (#24963) 2021-03-30 12:02:52 +05:30
Rucha Mahabal
146cbb10f8 fix: calculate 80g certificate amount on validate for memberships (#24925) 2021-03-30 12:02:28 +05:30
Rucha Mahabal
5f4a2bfc61 fix(Non Profit): Membership and Donation API fixes (#24900)
* fix: Donation fixes

- differentiate between subscription payment and payment

- issue with donation amount

* fix: existing membership validation

* fix: ignore subscription payments while capturing donations
2021-03-30 12:02:09 +05:30
Rucha Mahabal
170d2efd35 fix(Payroll): Exchange Rate not getting set in Salary Slip (#25013) 2021-03-30 11:02:46 +05:30
Sagar Vora
7f43c051df fix(Italy): setup, validations, optimisations 2021-03-29 21:18:26 +05:30
Deepesh Garg
237033704f fix: Add test case 2021-03-29 16:42:59 +05:30
Deepesh Garg
c2548ddc75 feat: Normal rounding for GST Taxes 2021-03-29 16:42:47 +05:30
Saurabh
7366b5d3eb Merge branch 'version-13-beta-pre-release' into version-13-beta 2021-03-28 15:54:56 +05:30
Saurabh
ceb026c5ab bumped to version 13.0.0-beta.14 2021-03-28 16:14:56 +05:50
rohitwaghchaure
b38ea0cc8b fix: patch (#25014)
* fix: patch

* fix: pricing_rule test cases
2021-03-28 15:51:32 +05:30
rohitwaghchaure
f4901b4f22 Merge pull request #25034 from anupamvs/naming-pre-release
fix: unable to submit stock entry
2021-03-27 19:50:06 +05:30
Anupam
d429138dcc fix: added flag for dont_fetch_price_list_rate in transaction 2021-03-27 19:31:23 +05:30
rohitwaghchaure
6c7f029597 Merge pull request #25016 from hasnain2808/fix-ams-error-v13-pre-release
fix: ams integration breaks when error raised
2021-03-27 09:59:51 +05:30
Anupam
4adaf7ed2e Merge branch 'version-13-beta-pre-release' of https://github.com/frappe/erpnext into naming-pre-release 2021-03-27 00:56:48 +05:30
Anupam
5d994d8aa1 fix: unable to submit stock entry 2021-03-27 00:54:19 +05:30
rohitwaghchaure
e825d2ab51 Merge pull request #25027 from rohitwaghchaure/feat-recursice-pricing-rule-pre
Feat recursice pricing rule pre
2021-03-26 19:09:39 +05:30
Rohit Waghchaure
256b9c7bf9 fix: total weight not set for free items 2021-03-26 19:05:46 +05:30
Rohit Waghchaure
0486276789 fix: don't club same free item 2021-03-26 19:05:45 +05:30
Rohit Waghchaure
fce552b811 fix: nonetype object has no attribute options 2021-03-26 19:05:45 +05:30
Rohit Waghchaure
cd8422a840 feat: recursive product discount 2021-03-26 19:05:43 +05:30
rohitwaghchaure
2c191c105f Merge pull request #25026 from ruchamahabal/production-raw-material-enhancements-v13
feat(Production Plan): Enhancements in Material Request Plan Item
2021-03-26 18:59:34 +05:30
Rucha Mahabal
44853da7c2 feat: Show Required Qty as per BOM in Material Request Items 2021-03-26 18:55:16 +05:30
Rucha Mahabal
4cd68cdecb feat: Add more fields to raw material download 2021-03-26 18:55:08 +05:30
Rucha Mahabal
d74ff72527 fix: Ordered and Reserved Qty for Production not getting fetched in Items 2021-03-26 18:55:00 +05:30
Rucha Mahabal
28a885a3a9 feat: show ordered and reserved qty in Material Request Plan Item table 2021-03-26 18:54:51 +05:30
Rucha Mahabal
efe2b425b1 feat(Production Plan): Consider Safety Stock in Required Qty Calculation 2021-03-26 18:54:34 +05:30
Saqib
f66aab6d98 fix: e-invoicing option visible even if settings disabled (#25021) 2021-03-26 16:40:51 +05:30
prssanna
5243eea532 style: fix formatting 2021-03-26 15:47:08 +05:30
prssanna
0ae0368d34 fix: re-execute add_standard_navbar_items patch
- check that same items aren't appended again
2021-03-26 15:47:07 +05:30
prssanna
eeb3121622 fix: missing help links in navbar help dropdown 2021-03-26 15:47:07 +05:30
hasnain2808@gmail.com
e9c801e4bd fix: ams integration breaks when error raised 2021-03-26 14:32:02 +05:30
Nabin Hait
2a39b74ad2 fix: Fixes on job card and salary slip (#25011)
* fix: map conversion factor while making stock entry from job card

* fix: fetch additional salary in salary slip
2021-03-26 10:49:39 +05:30
Mohammad Hasnain Mohsin Rajan
f29c075bc3 fix: patch regional fields for old companies (#24999)
* fix: patch regional fields for old companies

* chore: fix sider
2021-03-25 12:56:13 +05:30
Nabin Hait
d4499277b4 chore: Added change log 2021-03-25 12:18:22 +05:30
Nabin Hait
91026e026f chore: Added change log 2021-03-25 11:53:07 +05:30
rohitwaghchaure
d7d7df2fdd Merge pull request #24995 from rohitwaghchaure/incorrect-field-for-company
fix: incorrect fieldname
2021-03-24 16:45:41 +05:30
Rohit Waghchaure
244f3eeedc fix: incorrect fieldname 2021-03-24 16:42:22 +05:30
rohitwaghchaure
3c490088c4 Merge pull request #24991 from rohitwaghchaure/repost-not-completed-transactions-pre
fix: repost not completed backdated transactions
2021-03-24 12:38:42 +05:30
Rohit Waghchaure
9165327cf6 fix: repost not completed backdated transactions 2021-03-24 11:32:26 +05:30
Anupam Kumar
5c172044d7 fix: validate_series (#24987) 2021-03-23 21:13:06 +05:30
Deepesh Garg
d26ed25c3e fix: Period list for exponential smoothing forecasting report (#24983) 2021-03-23 21:11:06 +05:30
Jannat Patel
d7b139182b fix: serial no trim issue (#24981)
* fix: serial no trim issue

* fix: sider
2021-03-23 21:09:54 +05:30
Anupam
940c75f8ac fix: validate_series 2021-03-23 16:54:54 +05:30
Marica
5c7138c86b Merge pull request #24985 from ankush/allow_zero_valuation_SR_v13b_pr
fix: Allow zero valuation in stock reconciliation
2021-03-23 14:58:38 +05:30
Ankush Menat
2ba198576c fix: set valuation rate for customer items to zero
- In stock reconciliation always set valuation rate of customer provided
items to zero during validation.
- Let user know the valuation has been changed.
2021-03-23 14:03:09 +05:30
Ankush Menat
2a391298a7 test: customer item in stock reconciliation 2021-03-23 14:03:00 +05:30
Ankush Menat
6a534ea82b fix: Allow zero valuation in stock reconciliation
Stock reconciliation can not be done for customer provided item as they
have zero valuation. This change adds a checkbox in item table to allow
such items.

Related issue: ISS-20-21-10248
2021-03-23 14:02:52 +05:30
Marica
4ccda9f799 chore: Allow changing Work Stations in WO. (#24898) 2021-03-23 10:45:57 +05:30
Deepesh Garg
d1f15b2a88 fix: TDS check getting checked after reload (#24973) 2021-03-23 10:45:06 +05:30
Anuja Pawar
c7c921495b fix: payment reference on adding cost center in PE and Issue Summary Report error fixes (#24951) 2021-03-22 11:21:15 +05:30
Rucha Mahabal
dffa647071 fix: membership renewal validation (#24963) (#24964) 2021-03-20 22:24:55 +05:30
rohitwaghchaure
98a40d81d5 Merge pull request #24957 from rohitwaghchaure/revert-stock-balance-value-calculation-v13-pre
fix: revert stock balance value calculation
2021-03-19 16:22:51 +05:30
Rohit Waghchaure
67d94ac0cc fix: revert stock balance value calculation 2021-03-19 16:21:30 +05:30
Deepesh Garg
23af1ed372 Merge pull request #24947 from deepeshgarg007/multi_currency_lcv_issues_v13
fix: Allow user to update exchange rate in Multi-currency LCV
2021-03-18 21:21:57 +05:30
Deepesh Garg
b75cbeee4d fix: Allow user to update exchange rate in Multi-currency LCV 2021-03-18 21:20:44 +05:30
Deepesh Garg
a5de22cb8e Merge pull request #24918 from deepeshgarg007/nil_exempt_gstr_3b_v13
fix(India): Incorrect Nil Exempt and Non GST amount in GSTR3B report
2021-03-18 21:02:41 +05:30
Sagar Vora
95e9b2fd6e refactor(payroll): simplified logic for additional salary (#24907) 2021-03-17 19:58:56 +05:30
Rucha Mahabal
bacfaa4396 fix: calculate 80g certificate amount on validate for memberships (#24925) (#24926) 2021-03-17 19:51:59 +05:30
Deepesh Garg
438d9cad90 fix: Remove print statement 2021-03-17 18:04:05 +05:30
Deepesh Garg
f9519c7e13 fix: Group nil exempted and non gst items separately 2021-03-17 18:03:58 +05:30
Deepesh Garg
a5987782bd fix(India): Incorrect Nil Exempt and Non GST amount in GSTR3B report 2021-03-17 15:49:44 +05:30
Rucha Mahabal
00cce433a5 fix(Non Profit): Membership and Donation API fixes (#24900) (#24905)
* fix: Donation fixes

- differentiate between subscription payment and payment

- issue with donation amount

* fix: existing membership validation

* fix: ignore subscription payments while capturing donations
2021-03-16 20:52:53 +05:30
Deepesh Garg
65165fcc80 Merge pull request #24894 from deepeshgarg007/add_account_method_v13
fix: Add method for regional round off account back
2021-03-16 13:25:24 +05:30
Deepesh Garg
d4a3cf1395 Merge branch 'version-13-beta-pre-release' of https://github.com/frappe/erpnext into add_account_method_v13 2021-03-16 13:24:33 +05:30
Deepesh Garg
635c480771 fix: Add method for regional round off account back 2021-03-16 13:22:20 +05:30
Marica
3f14aafa67 Merge pull request #24891 from marination/pos-opening-entry-pre-release
fix: POS Opening Entry with empty balance detail rows
2021-03-16 12:44:22 +05:30
marination
dd7d71ca2e fix: POS Opening Entry with empty balance detail rows 2021-03-16 12:05:37 +05:30
Deepesh Garg
7f2e45e0f4 fix: Unequal debit and credit issue on RCM Invoice (#24838)
* fix: Unequal debit and credit issue on RCM Invoice

* fix: Travis
2021-03-15 18:04:47 +05:30
rohitwaghchaure
e838d1c7f0 Merge pull request #24882 from rohitwaghchaure/fixed-validation-for-job-card-v13-beta
fix: validation of job card in stock entry
2021-03-15 17:35:35 +05:30
Rohit Waghchaure
00a0e8da10 fix: validation of job card in stock entry 2021-03-15 14:15:10 +05:30
Marica
51c500d446 fix: Don't throw exception on invoice lines when there is no item_code (fixes #24640) (#24864)
Co-authored-by: casesolved-co-uk <richard@casesolved.co.uk>
2021-03-12 15:51:45 +05:30
Afshan
9ab3bedd0a fix: added correct path in hooks (#24865) 2021-03-12 15:51:23 +05:30
rohitwaghchaure
90ea17fbd6 Merge pull request #24825 from rohitwaghchaure/allow-to-set-item-in-batch-naming-pre
fix: allow to select item code in batch naming
2021-03-12 11:52:43 +05:30
Nabin Hait
fe3529b194 fix: merge conflict 2021-03-11 16:45:41 +05:30
Nabin Hait
b5792872e9 Merge branch 'Anurag810-gratuity' into develop 2021-03-11 16:14:45 +05:30
Nabin Hait
6e3668dc30 fix: merge conflict 2021-03-11 16:14:27 +05:30
Ankush Menat
2b61491adb fix: use account_name only in consolidated report (#24840)
Don't use account_number and only rely on account_name for preparing
consolidated financial statement.

Related issue: ISS-20-21-10217
2021-03-11 16:05:58 +05:30
Rucha Mahabal
0b29f87fa2 feat(Non Profit): 80G Certificates and Donations (#24848)
* feat(Non Profit): 80G Certificates and Donations

* fix(Membership): Generate Invoice for membership webhook only if automation is enabled (#24849)
2021-03-11 16:02:23 +05:30
Rucha Mahabal
d1e331f77f fix(Membership): Generate Invoice for membership webhook only if automation is enabled (#24849) 2021-03-11 15:27:22 +05:30
Rucha Mahabal
be2c1fca7b feat(Non Profit): 80G Certificates and Donations (#24657)
* feat: 80G Certificates

* feat: add non-profit custom fields for India

* feat: 80G Certificate print format for memberships

* feat: Donation doctype and API endpoint to capture donations via razorpay

* chore: Rename Membership Settings to Non Profit Settings

* chore: clean up Non Profit Settings

- Rename fields, better labels

- patch for renaming

* feat: Webhook secret generation for Razorpay donations in Non-Profit Settings

* feat: Payment Entry for donations

- added Donor as Party Type

- setting for automating payment entries for donations created via web form

* fix: linter and sider issues

* fix: translation syntax

* feat: PAN Details custom field for Indian donors

* feat: 80G certificates for Donations with Print Format

* fix: sider

* feat: validations for donor and donation

- create donor for website user from donations

- validate donor email

* feat: extract member name from subscription notes

* test: Donation

* test: Tax Exemption 80G Certificate

* chore: styling fixes

* fix: tests

* fix: sider

* feat: extract PAN number from additional subscription notes

* feat: Add creation user field in Non Profit Settings

fix: Payment Entry not generating for memberships and donations

* feat: update desk page

* fix: tests
2021-03-11 13:19:44 +05:30
Marica
63eb6bdb3c Merge pull request #24643 from CaseSolvedUK/sinvfix-v13
fix: Don't throw exception on invoice lines when there is no item_code
2021-03-11 10:47:24 +05:30
casesolved-co-uk
a780306ec7 fix: Don't throw exception on invoice lines when there is no item_code (fixes #24640) 2021-03-10 15:50:45 +00:00
Anupam Kumar
6f0fabc54e fix: gle issue in internal transfer(Purchase) (#24830) 2021-03-10 18:36:46 +05:30
rohitwaghchaure
a2063b1337 Merge pull request #24832 from ankush/consolidated_report_acc_name_fix
fix: use account_name only in consolidated report
2021-03-10 17:41:19 +05:30
Ankush Menat
59fdee4dfa Merge branch 'develop' into consolidated_report_acc_name_fix 2021-03-10 16:35:59 +05:30
Rucha Mahabal
c7fff34cf5 fix(travis): Customer Testcase Failing (#24833) 2021-03-10 15:51:44 +05:30
Ankush Menat
000fa824d3 fix: use account_name only in consolidated report
Don't use account_number and only rely on account_name for preparing
consolidated financial statement.

Related issue: ISS-20-21-10217
2021-03-10 15:23:48 +05:30
rohitwaghchaure
a0e7787f7b fix: removed show cancelled entries checkbox from the stock ledger report (#24826) 2021-03-10 13:46:42 +05:30
Anupam Kumar
77eaf2939a fix: rate of stock uom division by zero error (#24829) 2021-03-10 12:04:54 +05:30
Raffael Meyer
20cc2bb0d8 fix: autoname for Item Tax Template
* fix: autoname for Item Tax Template

Use title + company abbreviation instead of just title.

* fix: test records of Item Tax Template

* fix: rename item tax templates in test records

* Revert "fix: test records of Item Tax Template"

This reverts commit 53875c54ff.

* fix: rename hardcoded item tax templates in tests

* fix: rename hardcoded Item Tax Templates in tests

(2)

* fix: delete Item Tax Template with company
2021-03-10 10:24:43 +05:30
Marica
6ccd64c2ec Merge pull request #24464 from sgtpepper9907/feat-make-patient-age-translateable
feat: Make patient age translateable
2021-03-10 10:15:38 +05:30
Afshan
0623a34210 fix: added supplier warehouse field back again (#24827) 2021-03-10 09:46:38 +05:30
David Angulo
fe0f46c5b3 fix sider 2021-03-09 13:28:08 -06:00
David Angulo
06e99dfe7b fix sider 2021-03-09 13:23:48 -06:00
David Angulo
358153b04b fix sider 2021-03-09 13:19:12 -06:00
Francisco Roldán
894cff5aa4 fix: lms program and index missing context variables when is no data available (#24828)
* fix: program and index

* fix: moved default value to  get_course_progress
2021-03-09 23:35:24 +05:30
Afshan
27bcb2a064 fix: renamed "supplier_warehouse" to "set_from_warehouse" (#24816)
* fix: reverting and adding new field for supplier warehouse
2021-03-09 22:25:48 +05:30
Anupam Kumar
832098f042 fix: In-Transit Feature enhancements (#24652) 2021-03-09 21:14:25 +05:30
Syed Mujeer Hashmi
ec829786e9 fix: Add student category to student applicant (#24779)
* fix: Add student category to student applicant

Student category will be automatically fetched during program
enrollment while importing students into the system.

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>

* fix: Allow student category during program enrollment

Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>
2021-03-09 21:04:55 +05:30
Rohan
db2d196296 fix: do not send emails to disabled users from Employee Onboarding (#24795) 2021-03-09 21:03:45 +05:30
Rohit Waghchaure
535406cb0c fix: allow to select item code in batch naming 2021-03-09 21:01:12 +05:30
Jannat Patel
d7ac2394e8 fix: error in bulk attendance (#24806)
* fix: error in bulk attendance

* fix: no date selected scenario

* fix: translation and sider
2021-03-09 20:41:58 +05:30
Sagar Vora
78777d6ed4 fix: fetch Material Requests of type Customer Provided in Stock Entry using Get Items From (#24756)
Co-authored-by: walstanb <walstanb@gmail.com>
2021-03-09 20:35:08 +05:30
Afshan
e314b8b209 fix: general ledger report (#24770) 2021-03-09 20:31:57 +05:30
Afshan
9f6015a4e9 fix: batch no in POS (#24771)
* fix: batch no in list

* fix: check for batch no to be list
2021-03-09 20:31:14 +05:30
Shariq Ansari
261c42186f fix: updating phone icon setup logic for readonly fields (#24787)
* fix: updating phone icon setup logic for readonly fields

* fix: sider fix
2021-03-09 20:28:00 +05:30
Jannat Patel
fa73074250 fix: salary structure assign to employee (#24798)
* fix: salary structure assign to employee

* fix: pass data from dialog
2021-03-09 20:27:29 +05:30
Raffael Meyer
79b5be1830 fix: Group German VAT Accounts (#24804)
* fix: group account for tax assets and liabilities (germany)

* fix: spacing
2021-03-09 20:26:43 +05:30
Deepesh Garg
06a6ee37cb fix: Ignore mandatory fields in opening invoice via Opening Invoice Creation tool (#24821) 2021-03-09 20:23:26 +05:30
Deepesh Garg
47c6d2e00f Merge pull request #24814 from AfshanKhan/fix-tds-computation-summary
fix: sending proper arguments for TDS Computation Summary report
2021-03-09 20:01:30 +05:30
Deepesh Garg
6249798d84 Merge pull request #24801 from ankush/dont_update_pe_title
fix: do not update PE title during data import
2021-03-09 19:47:21 +05:30
Deepesh Garg
79005a4a76 Merge pull request #24820 from resilient-tech/fix-company-breadcrumbs
fix: breadcrumbs for company
2021-03-09 19:46:39 +05:30
Marica
dfc5c45e50 Merge pull request #24701 from shariquerik/item-attribute-fix
fix: item attributes not editable until refresh
2021-03-09 18:44:59 +05:30
Marica
e1ee9034ef Merge branch 'develop' into item-attribute-fix 2021-03-09 18:35:44 +05:30
Marica
916b75a3a3 Merge pull request #24768 from ankush/salary_slip_error
chore: improve error message for missing fields.
2021-03-09 18:23:09 +05:30
Marica
5accf8adf5 Merge branch 'develop' into salary_slip_error 2021-03-09 18:20:54 +05:30
Ankush Menat
9b4e5bfa87 chore: improve error message for missing fields. 2021-03-09 13:59:14 +05:30
Marica
9d0a93dd92 Merge pull request #24761 from danielchalmers/patch-6
fix: Remove obsolete section titles from Quality Meeting doctype
2021-03-09 13:36:38 +05:30
Marica
5471265f92 Merge branch 'develop' into patch-6 2021-03-09 13:32:23 +05:30
walstanb
be98ee26cd fix: breadcrumbs for company 2021-03-09 13:03:52 +05:30
Marica
baa406e99f Merge pull request #24794 from alyf-de/set_value_instead_of_sql
fix: use set_value instead of sql
2021-03-09 11:54:31 +05:30
Afshan
d1fb363a37 Merge branch 'develop' into fix-tds-computation-summary 2021-03-08 22:50:04 +05:30
Deepesh Garg
98cc7b1751 Merge pull request #24817 from AfshanKhan/fix-get_round_off_applicable_accounts-arguments
fix: call get_round_off_applicable_accounts() function when arguments available
2021-03-08 22:20:25 +05:30
Afshan
d95b59e90c fix: call function when arguments available 2021-03-08 18:19:53 +05:30
Ankush Menat
afc766bbf1 Merge branch 'develop' into dont_update_pe_title 2021-03-08 15:44:15 +05:30
Ankush Menat
5571b988dd fix: make title field read only 2021-03-08 15:43:03 +05:30
Ankush Menat
cc46866cd9 fix: do not update PE title during data import
Related issue: ISS-20-21-10132
2021-03-08 15:42:39 +05:30
Afshan
1002e36c53 fix: removed unused import 2021-03-08 14:39:19 +05:30
Afshan
fa932e2a3e fix: sending proper arguments for report 2021-03-08 14:36:40 +05:30
Deepesh Garg
48b0f0da96 Merge pull request #24776 from ankush/gst_invoice_validation
fix: Add warning for invalid GST invoice numbers
2021-03-07 18:09:00 +05:30
rohitwaghchaure
15c0199e07 Merge pull request #24811 from rohitwaghchaure/minor-fixes-for-work-order
fix: minor changes in work order
2021-03-07 12:53:29 +05:30
Rohit Waghchaure
4c089b5852 minor fixes 2021-03-07 12:17:59 +05:30
Deepesh Garg
45870317f2 Merge pull request #24797 from UrvashiKishnani/patch-1
fix: total row in AR/AP summary report
2021-03-06 21:28:04 +05:30
Saqib
92b0691c68 fix: einvoice button visiblity condition (#24800) 2021-03-06 19:00:08 +05:30
Deepesh Garg
36a0085905 Merge pull request #24799 from danielchalmers/patch-8
fix: typo in Charts of Account doctype
2021-03-06 13:11:26 +05:30
Deepesh Garg
3e0a9383b4 Merge pull request #24789 from ankush/track_settings
fix: track setting changes
2021-03-06 13:09:58 +05:30
Deepesh Garg
9cbdfe17e4 Merge pull request #24793 from alyf-de/tax_category_quick_entry
fix: make quick entry for Tax Category work
2021-03-06 13:04:58 +05:30
Saurabh
202ef92fa1 Merge branch 'version-13-beta-pre-release' into version-13-beta 2021-03-05 09:34:01 +05:30
Saurabh
4e1206bf21 bumped to version 13.0.0-beta.13 2021-03-05 09:54:01 +05:50
Saqib Ansari
49e4693abf fix(patch): updating pos closing reference in merge log 2021-03-04 11:58:45 +05:30
Daniel Chalmers
9b4a258c89 Chart Of Accounts -> Chart of Accounts 2021-03-04 00:15:46 -06:00
UrvashiKishnani
27ea23223d fix: total row in AR/AP summary report 2021-03-04 09:21:25 +04:00
Raffael Meyer
f1d13a4ff3 Merge branch 'develop' into track_settings 2021-03-03 12:40:37 +01:00
barredterra
1521b31795 fix: use set_value instead of sql 2021-03-03 12:33:48 +01:00
barredterra
53d261702a fix: make quick entry for Tax Category work 2021-03-03 11:52:48 +01:00
Ankush Menat
7c4c42ad67 refactor: move regex patterns to global variables 2021-03-03 14:56:19 +05:30
Ankush Menat
7c78220eac Merge branch 'develop' into gst_invoice_validation 2021-03-03 13:38:14 +05:30
Ankush Menat
9b3f5d5f67 test: add tests for gst invoice name checks 2021-03-03 13:36:59 +05:30
Ankush Menat
a44df63a91 fix: Add warning for invalid GST invoice numbers
GST Invoice numbers should be 16 characters alphanumeric with dash(/) or
slash(-) only. Add check for doc.name before saving and warn about
naming series.
2021-03-03 11:26:12 +05:30
Deepesh Garg
82c6223196 Merge pull request #24745 from ankush/no_team_updates
fix(HR): hide "more" button from team updates
2021-03-02 18:55:34 +05:30
Deepesh Garg
ecde26409b Update team_updates.js 2021-03-02 18:54:50 +05:30
Deepesh Garg
846500e8bc Merge pull request #24751 from danielchalmers/patch-2
chore: Add description field & enable quick entry
2021-03-02 18:53:51 +05:30
Deepesh Garg
11092d0824 feat: Additon of leave details in Salary Slip (#24674)
* feat: Additon of leave details in Salary Slip

* fix: Change leaves to leave
2021-03-02 18:38:31 +05:30
Deepesh Garg
a5c4558f8b feat: Additon of leave details in Salary Slip (#24674)
* feat: Additon of leave details in Salary Slip

* fix: Change leaves to leave
2021-03-02 18:36:48 +05:30
Deepesh Garg
7a5b6021b9 Merge pull request #24772 from anupamvs/si-timesheet
feat: provision to pull timesheet in sales invoice
2021-03-02 18:05:42 +05:30
Ankush Menat
7d892438f0 fix: track setting changes 2021-03-02 17:50:58 +05:30
Deepesh Garg
f06c166ee4 Merge pull request #24773 from UrvashiKishnani/patch-1
fix: GL Entries for AP/AR Summary
2021-03-02 17:49:13 +05:30
Jannat Patel
b27d4f6095 fix: salary slip working hours increment (#24784) 2021-03-02 17:44:42 +05:30
Nabin Hait
d96be3f9f1 Reposting patch and earned leave rounding (#24783)
* fix: rounding of earned leave is optional (#24782)

* fix: reposting patch fixes (#24775)
2021-03-02 17:02:47 +05:30
Nabin Hait
190106a8b8 fix: rounding of earned leave is optional (#24782) 2021-03-02 13:38:14 +05:30
Nabin Hait
bd10d7c028 fix: reposting patch fixes (#24775) 2021-03-02 13:37:45 +05:30
Anupam
47ce85484b feat: provistion to pull timesheet in sales invoice 2021-03-02 11:31:26 +05:30
UrvashiKishnani
810a36105c fix: GL Entries for AP/AR Summary without SQL join
SQL query modified to fetch only those GL Entries for Accounts Payable Summary and Accounts Receivable Summary reports where the corresponding payment entry is not in cancelled state.
2021-03-02 08:20:03 +04:00
Deepesh Garg
f45756d821 Merge pull request #24735 from FHenry/fix_create_item_tax_with_salespurchasetax
fix: add item taxes at the same times as sales and purchase taxes
2021-03-01 20:52:42 +05:30
Deepesh Garg
236a232de0 Merge pull request #24769 from rohitwaghchaure/allow-to-set-item-in-batch-naming
fix: allow to select item code in batch naming
2021-03-01 20:25:14 +05:30
Daniel Chalmers
2efdfa26b4 fix: Change FieldType from Text to Text Editor in Non-Conformance DocType (#24760)
* Enable Text Editors

Enable rich Text Editors for Corrective Action and Preventive Action fields. Closes #24759

* Update non_conformance.json
2021-03-01 15:44:16 +05:30
UrvashiKishnani
10e4b9d4e8 fix: GL Entries for AP/AR Summary
SQL query modified to fetch only those GL Entries for Accounts Payable Summary and Accounts Receivable Summary reports where the corresponding payment entry is in submitted state.
2021-03-01 12:50:07 +04:00
Rohit Waghchaure
eb6b3cfe6d fix: allow to select item code in batch naming 2021-03-01 11:32:39 +05:30
Anuja Pawar
8755339cba fix: to update sales person's incentives on save (#24179) 2021-03-01 10:44:13 +05:30
Saqib
fa777555b7 fix(india): inflated item tax rate for e-invoicing (#24752) 2021-02-28 20:46:23 +05:30
Deepesh Garg
d7a81be56d Merge pull request #24742 from deepeshgarg007/project_filter_search_fields
fix: Add searchfields in project query
2021-02-27 18:20:56 +05:30
Deepesh Garg
6fdd859a10 Merge pull request #24700 from deepeshgarg007/rounding_issue_fix
fix: Issue on posting inter-warehouse transfer invoice
2021-02-27 17:30:01 +05:30
Deepesh Garg
b5819c74c8 Merge branch 'develop' of https://github.com/frappe/erpnext into project_filter_search_fields 2021-02-27 17:29:11 +05:30
Daniel Chalmers
28da945ecd Update quality_meeting.json 2021-02-26 21:14:12 -06:00
Daniel Chalmers
56f6dbb666 Remove obsolete section titles 2021-02-26 21:11:56 -06:00
Daniel Chalmers
aa09628358 Skill fields: enable allow_in_quick_entry 2021-02-26 15:24:34 -06:00
rohitwaghchaure
630ce6e531 Merge pull request #24754 from rohitwaghchaure/fixed-repost-item-valuation-patch
fix: reposting patch
2021-02-26 23:58:29 +05:30
rohitwaghchaure
0e89d71d34 Merge pull request #24755 from rohitwaghchaure/fixed-repost-item-valuation-patch-v13-pre
fix: reposting patch
2021-02-26 23:58:10 +05:30
Rohit Waghchaure
9f13a060f0 fix: reposting patch 2021-02-26 17:44:54 +05:30
Rohit Waghchaure
c603fd638b fix: reposting patch 2021-02-26 17:42:52 +05:30
Saqib
3dfa017f1d refactor: (coa importer) create coa tree with account no & account name (#23601) 2021-02-26 16:50:22 +05:30
Saqib
2a1b1537f9 fix(pos): rounded total and search fixes (#24738) 2021-02-26 16:49:28 +05:30
Daniel Chalmers
9803835436 Add "description" field to Skill doctype
Lets us describe a skill past just the title. Closes #23592
2021-02-26 00:33:48 -06:00
Deepesh Garg
28ca4ec79d Merge branch 'develop' into fix_create_item_tax_with_salespurchasetax 2021-02-26 10:43:15 +05:30
Deepesh Garg
f8a7e000f5 Merge pull request #24746 from deepeshgarg007/unique_remove
fix: Remove unique check from represents company field
2021-02-25 22:41:22 +05:30
Deepesh Garg
27da2bb63a fix: Remove unique check from represents company field 2021-02-25 22:39:47 +05:30
Ankush Menat
027db0b41e fix(HR): hide "more" button from team updates 2021-02-25 21:29:00 +05:30
Deepesh Garg
b85fb0c3a4 Merge branch 'develop' into rounding_issue_fix 2021-02-25 20:17:35 +05:30
Ankush Menat
dca307e7cc feat: track changes to HR settings (#24739)
related issue: FR-ISS-259927
2021-02-25 19:05:07 +05:30
Syed Mujeer Hashmi
286e00bdf2 fix: Fetch Task subject from Task (#24729) 2021-02-25 19:02:54 +05:30
Afshan
1be997beb4 fix: reference variable in pricing rule (#24711) 2021-02-25 19:01:32 +05:30
Deepesh Garg
2d0b277ce0 Merge pull request #24054 from gwhitney/other_app_acc_dims
feat(Accounting Dimension): accounting dimension doctypes for other apps
2021-02-25 18:48:42 +05:30
Anurag Mishra
02f50a93e5 fix: copy variants property and Attributes whil duplicatinh item Tamplate (#24662) 2021-02-25 18:47:17 +05:30
Anuja Pawar
118a4ffb08 fix: rounding error in finished goods qty (#24653) 2021-02-25 18:44:44 +05:30
Mohammad Hasnain Mohsin Rajan
8cdba8ab64 fix: ams integration breaks when error raised (#24383) 2021-02-25 18:36:19 +05:30
Deepesh Garg
6af3c3fa2a Merge pull request #24722 from danielchalmers/patch-1
fix: Allow renaming skills
2021-02-25 15:44:44 +05:30
Deepesh Garg
2e320cfdc3 Merge pull request #24588 from deepeshgarg007/subscription_fix_new
fix: Multiple fixes in subscription
2021-02-25 15:41:51 +05:30
Deepesh Garg
7a837170ea Merge branch 'develop' of https://github.com/frappe/erpnext into other_app_acc_dims 2021-02-25 15:41:03 +05:30
Deepesh Garg
b990e71b4c fix: Add search field in project query 2021-02-25 14:01:22 +05:30
Deepesh Garg
834a8b740d Merge branch 'develop' into subscription_fix_new 2021-02-25 11:24:27 +05:30
Deepesh Garg
409c37ebeb Merge pull request #24723 from ankush/opening_round_gl
fix: make round off GLE always non-opening
2021-02-25 09:04:45 +05:30
Ankush Menat
325a461c34 Merge branch 'develop' into opening_round_gl 2021-02-25 07:53:48 +05:30
Daniel Chalmers
d3e122259d Update skill.json 2021-02-24 17:13:48 -06:00
Florian HENRY
e11ce57f3c fix: add item taxes at the same times as sales and purchase taxes 2021-02-24 21:45:29 +01:00
Afshan
684fc4e27b fix: asset category name disappear (#24728) 2021-02-24 19:08:56 +05:30
Afshan
6bd2bbc953 fix: show custom button for saved projects (#24730)
* fix: show custom button for saved projects

* fix: slider
2021-02-24 18:13:10 +05:30
rohitwaghchaure
d0baa90b50 Merge pull request #24715 from rohitwaghchaure/fixed-patch-item-reposting-develop
fix: patch failing because of incorrect gl entries
2021-02-24 17:18:43 +05:30
Afshan
84184559bc fix: currency symbol in update items (#24726) 2021-02-24 16:51:11 +05:30
Saurabh
d713ac4505 Merge branch 'version-13-beta-pre-release' into version-13-beta 2021-02-24 15:01:19 +05:30
Saurabh
fefacced13 bumped to version 13.0.0-beta.12 2021-02-24 15:21:19 +05:50
Shariq Ansari
1dba7d2161 fix: Added parent task expected end date validation (#24611)
* fix: Added parent task expected end date validation

* fix: implemented suggested code

* fix: updated test case
2021-02-24 12:39:23 +05:30
rohitwaghchaure
8212b62598 Merge pull request #24724 from rohitwaghchaure/change-log-for-v13-beta-12
chore: change log
2021-02-24 12:31:05 +05:30
Rucha Mahabal
402fcbd489 Merge pull request #24716 from pateljannat/issue-custom-buttons
fix: custom buttons in issue
2021-02-24 11:47:29 +05:30
Rohit Waghchaure
f613d41408 chore: change log 2021-02-24 11:20:29 +05:30
Ankush Menat
23c30e43f0 fix: make round off GLE always non-opening
Opening GL entries can not be for profit and loss accounts. Round off
accounts are by default P&L account. Hence when making opening entry,
make round off entries as non-opening.

Related issue: ISS-20-21-09677
2021-02-24 11:03:24 +05:30
Daniel Chalmers
c04ed62863 Allow renaming skills 2021-02-23 22:02:09 -06:00
rohitwaghchaure
8faf8e4b25 Merge pull request #24718 from rohitwaghchaure/fixed-patch-item-reposting-pre-release
fix: patch failing because of incorrect gl entries
2021-02-24 00:43:16 +05:30
Rohit Waghchaure
39b5ad8e69 fix: patch failing because of incorrect gl entries 2021-02-23 18:35:36 +05:30
Rohit Waghchaure
bc8c9de26d fix: patch failing because of incorrect gl entries 2021-02-23 18:26:48 +05:30
Deepesh Garg
231aec9257 Merge pull request #24478 from nextchamp-saqib/tcs_calculation
feat: tax collected at source using tax withholding category
2021-02-23 18:04:38 +05:30
pateljannat
1e2772d389 fix: custom buttons in issue 2021-02-23 17:55:51 +05:30
Ankush Menat
d5656f4b76 fix(india): Escape json characters in text fields (#24699)
Escape all text fields and add helpful error message if JSON decode
error does happen.
2021-02-23 17:26:37 +05:30
Nabin Hait
d46b23699c fix: optimize reposting of gle and sle (#24702)
* fix(india): escape for special characters in JSON (#24695)

JSON does not accept special whitespace characters like tab, carriage
return, line feed

Ref: https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf

Related issue: ISS-20-21-09811

* fix: Accounting Dimension creation background job timeout

* fix(regional): vehicle no is mandatory for ewaybill generation (#24679)

* fix: vehicle no required for e-invoice

* fix: ewaybill generation dialog condition

* fix: excluding unidentified accounts from gstr-1

* fix: optimize reposting of sle and gle (#24694)

* fix: optimize update_gl_entries_after method

* fix: Optimized reposting patch

* fix: accounting dimensions

* added reload_doc in patch

* Update item_reposting_for_incorrect_sl_and_gl.py

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>

* fix: Replaced spaces with tabs

* fix: merge conflict

* fix: test cases

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
Co-authored-by: pateljannat <pateljannat2308@gmail.com>
Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2021-02-23 16:38:52 +05:30
Saqib
eb1233425e Merge branch 'develop' into tcs_calculation 2021-02-23 15:58:18 +05:30
Saqib Ansari
85c91ca2db Merge branch 'develop' into tcs_calculation 2021-02-23 15:56:29 +05:30
Saqib Ansari
2fb3647a4c Merge branch 'develop' into tcs_calculation 2021-02-23 15:55:36 +05:30
Deepesh Garg
c532b99a4c Merge pull request #24708 from AfshanKhan/fix-column-name-BOM-Stock-Calculated-report
fix: column names in report BOM Stock Calculated
2021-02-23 13:56:14 +05:30
Afshan
ae63d66b8f fix: column names 2021-02-23 13:38:52 +05:30
Deepesh Garg
3dd0e49525 Merge pull request #24703 from deepeshgarg007/loan_test_precision_fix_new
fix: Precision fixes in loans
2021-02-23 11:22:52 +05:30
Deepesh Garg
8f8d9744f1 Merge pull request #24629 from deepeshgarg007/loan_dashboard
feat: Loans Dashboard
2021-02-23 11:22:32 +05:30
Deepesh Garg
b5a2320b33 fix: Precision fixes in loans 2021-02-22 23:04:48 +05:30
Nabin Hait
19f8fa59d3 fix: optimize reposting of sle and gle (#24694)
* fix: optimize update_gl_entries_after method

* fix: Optimized reposting patch

* fix: accounting dimensions

* added reload_doc in patch

* Update item_reposting_for_incorrect_sl_and_gl.py

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2021-02-22 22:27:22 +05:30
Mohammad Hasnain Mohsin Rajan
07f40596bc feat(Bank Reconciliation): Redesign (#24273)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-22 22:19:47 +05:30
Nabin Hait
866cf70d3a fix: validate pan 2021-02-22 21:35:00 +05:30
shariquerik
f5d6bd77e5 fix: item attributes not editable until refresh 2021-02-22 21:27:14 +05:30
Deepesh Garg
c839177f8e fix: Issue on posting inter-warehouse transfer invoice 2021-02-22 21:04:51 +05:30
Marica
214951a9c6 Merge pull request #24631 from AfshanKhan/fix-valuation-errror-customer-provided
fix: check if customer provided item while setting opening stock
2021-02-22 20:10:27 +05:30
Nabin Hait
69a6bed106 fix: Replaced spaces with tabs 2021-02-22 20:03:23 +05:30
Shridhar Patil
58399f6524 fix: next follow up date should be always greater then current time (#24308) 2021-02-22 19:37:38 +05:30
Nabin Hait
0ca74ce04b fix: Fixes related to client script renaming (#24698) 2021-02-22 19:32:51 +05:30
Ankush Menat
98a0feab89 fix(india): escape for special characters in JSON (#24695)
JSON does not accept special whitespace characters like tab, carriage
return, line feed

Ref: https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf

Related issue: ISS-20-21-09811
2021-02-22 19:30:02 +05:30
Deepesh Garg
bb8cd1cdaa feat: Basic validation for indian PAN No. in Supplier (#24687) 2021-02-22 19:28:45 +05:30
Shariq Ansari
8676bedd18 fix: Add phone icon on read only phone fields (#24680)
* fix: Add phone icon on read only phone fields

* fix: sider fix
2021-02-22 19:28:01 +05:30
Saqib
14472f6bab fix(regional): vehicle no is mandatory for ewaybill generation (#24679)
* fix: vehicle no required for e-invoice

* fix: ewaybill generation dialog condition
2021-02-22 19:27:23 +05:30
Afshan
fdafb55fba fix: error message when making reverse journal entry (#24665) 2021-02-22 19:25:57 +05:30
Marica
28c834ac95 Merge branch 'develop' into fix-valuation-errror-customer-provided 2021-02-22 16:00:28 +05:30
rohitwaghchaure
311bb6452f Merge pull request #24691 from deepeshgarg007/accounting_dimension_timeout
fix: Accounting Dimension creation background job timeout
2021-02-22 15:29:41 +05:30
Deepesh Garg
0c15f75524 Merge pull request #24696 from frappe/revert-24505-loan_exposure_report_fix
Revert "fix: Error handling in loan reports and precision fixes"
2021-02-22 15:13:11 +05:30
Deepesh Garg
d780f56ba8 Revert "fix: Error handling in loan reports and precision fixes" 2021-02-22 15:12:35 +05:30
Afshan
133ebc1d51 Merge branch 'develop' into fix-valuation-errror-customer-provided 2021-02-22 14:16:33 +05:30
Marica
ed1c7649cd Merge pull request #24553 from nextchamp-saqib/quality-inspection-parameter-group
feat: introduce parameter group in quality inspection
2021-02-22 13:53:14 +05:30
Marica
4a1ffcf742 Merge branch 'develop' into quality-inspection-parameter-group 2021-02-22 11:34:34 +05:30
Afshan
01b4ee8a3c Merge branch 'develop' into fix-valuation-errror-customer-provided 2021-02-22 11:17:45 +05:30
Deepesh Garg
aa46def745 fix: Accounting Dimension creation background job timeout 2021-02-21 21:54:23 +05:30
Deepesh Garg
e4964a0c6c fix: Update color in charts 2021-02-21 21:03:42 +05:30
Deepesh Garg
e53fd87669 fix: Rearrange cards 2021-02-21 20:57:56 +05:30
Deepesh Garg
cbb4fe2cce fix: Add cards 2021-02-21 20:57:30 +05:30
Deepesh Garg
a6d0610730 Merge pull request #24505 from deepeshgarg007/loan_exposure_report_fix
fix: Error handling in loan reports and precision fixes
2021-02-20 17:57:09 +05:30
Deepesh Garg
e12398e75e Merge pull request #24682 from frappe/michellealva-leave
fix: typo in Leave Balance Report
2021-02-20 17:53:04 +05:30
Deepesh Garg
75b01e3d72 Merge pull request #24683 from frappe/michellealva-patch-1
fix: Typo in Leave Application
2021-02-20 17:52:38 +05:30
Deepesh Garg
bbadebcf64 Merge branch 'develop' into loan_exposure_report_fix 2021-02-20 17:32:17 +05:30
Deepesh Garg
6f29f67a83 Merge pull request #24667 from pateljannat/gstr-1-unidentified-accounts-issue
fix: excluding unidentified accounts from gstr-1
2021-02-20 17:27:56 +05:30
Michelle Alva
43f126ed13 fix: Typo in Leave Application
Change "Leaves" to "Leave"
2021-02-20 10:46:22 +05:30
Michelle Alva
ab149f196e fix: typo in Leave Balance Report
Change Leaves to Leave
2021-02-20 10:43:47 +05:30
rohitwaghchaure
1aad27a539 Merge pull request #24612 from rohitwaghchaure/fixed-validation-for-job-card
fix: [minor] validation of job card in stock entry
2021-02-19 21:22:57 +05:30
Saqib Ansari
8c7c682f17 chore: make parameter group optional 2021-02-19 20:35:23 +05:30
Deepesh Garg
6a5ef261f2 feat: Normal rounding for GST Taxes (#24488)
* feat: Normal rounding for GST Taxes

* fix: Add test case

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-19 14:30:23 +05:30
Deepesh Garg
811ff5c397 Merge pull request #24669 from deepeshgarg007/transaction_delete_fix
fix: Do not delete GST Accounts from GST Settings on clearing transactions from Company Master
2021-02-19 10:54:56 +05:30
Deepesh Garg
7efbbcf3aa fix: Do not delete GST Accounts from GST Settings on clearing transactions from Company Master 2021-02-19 10:53:58 +05:30
Marica
a43aea0dc1 Merge pull request #24482 from pateljannat/rfq-contact-email-set
fix: RFQ contact email set
2021-02-19 10:23:07 +05:30
Deepesh Garg
bc857522ad fix: Loan Interest Accrual Chart 2021-02-19 10:13:56 +05:30
Ankush Menat
3248da9089 fix(India): Add GST state code for Ladakh 2021-02-18 21:32:48 +05:30
Anupam Kumar
b1997da488 feat: capture Rate of stock UOM in purchase (#24315)
* feat: capture Rate of stock UOM in purchase

* fix: review changes

* added server side code

* added stock uom rate in sales transactions

* fix: review changes

* fix: resolving conflicts

* adding patch

* fix: removing patch
2021-02-18 21:32:05 +05:30
Jannat Patel
4cef0f5983 fix: salary slip attribute error (#24455)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-02-18 21:30:13 +05:30
Ankush Menat
d9c84dff0f fix(selling): cancel sales order with cancelled PE
Allow cancelling sales order with cancelled payment entry. Ignoring GL
entries while cancelling the document is required to cancel it, reverse
entries are created by accounts controller.

Related issue: ISS-20-21-09586
2021-02-18 21:29:12 +05:30
Ankush Menat
3508ed176b test(selling): add test for cancelling sales order
Add failing test to reproduce bug in cancelling sales order with advance
payments

Related issue: ISS-20-21-09586
2021-02-18 21:29:03 +05:30
Nabin Hait
186a045e28 fix: update qty in future sle (#24649)
* fix: update qty in future sle

* fix: validate cancellation due to ongoing reposting

* fix: process sle against current timestamp
2021-02-18 21:28:28 +05:30
Nabin Hait
deddcc513d fix: stock and account balance syncing (#24644)
* fix: stock and account balance syncing

* fix: stock and account balance syncing

* fix: stock and account balance syncing

* fix: minor fix
2021-02-18 21:28:16 +05:30
Rohit Waghchaure
83f5468ca1 fix: patch 2021-02-18 21:28:03 +05:30
rohitwaghchaure
7797e9d3ac fix: added patch to fix incorrect stock qty and account value (#24628) 2021-02-18 21:27:01 +05:30
Nabin Hait
f2be0805f7 fix: formatting query args (#24627) 2021-02-18 21:25:59 +05:30
rohitwaghchaure
76f616565e fix: Consolidated Financial Statement report not works if child company account not present in parent company (#24580)
Fixed conflicts
2021-02-18 21:25:40 +05:30
Ankush Menat
4b2cbdc2dd fix: update total in words after updating items (#24602)
* fix: Update total in words after Updating items

Update total in words after Updating items in sales/purchase orders.
Port of #24592

Closes ISS-20-21-09425

* test: Add test for total & words after update item

Add test for total & words after updating items in sales order.
2021-02-18 21:25:00 +05:30
rohitwaghchaure
83792ec009 fix: reposting issue with same posting date and posting time (#24570)
* fix: reposting issue with same posting date and posting time

* Update erpnext/stock/stock_ledger.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-18 21:24:48 +05:30
Nabin Hait
56e6ca6285 fix: couple of travis fixes (#24554)
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2021-02-18 21:24:31 +05:30
Afshan
33f4419a78 fix: StopIteration error when e-invoice not enabled (#24548)
* fix: StopIteration error when e-invoice not enabled

* chore: update message

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2021-02-18 21:23:38 +05:30
Deepesh Garg
d60a40ae82 fix: Add accounts user role permission for accounting dimension filter 2021-02-18 21:23:20 +05:30
Afshan
83768b68c1 fix: emp disappear (#24525)
* fix: emp disappear

* fix: renamed set_totals_call to set_totals

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-18 21:20:14 +05:30
Saqib
90ff48baa3 refactor: POS Invoice merging and cancellation (#24351)
* feat: pos invoice merging with background jobs

* fix: invoice threshold for queueing job

* refactor: cancellation flow of point of sale

* feat: tests for cancellation of pos closing

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-02-18 21:00:34 +05:30
Saqib
e965d0ff90 fix: discount amount calculation on net total (#24497) 2021-02-18 20:59:46 +05:30
Saqib
fd4bed1a38 fix(e-invoice): do not validate gstin for exports (#24561) 2021-02-18 20:59:26 +05:30
Saqib
ade96589b4 fix(e-invoice): skip e-invoice generation for non-taxable invoices (#24568) 2021-02-18 20:58:54 +05:30
Saqib
18c7c45cfe fix: NoneType has no len() (#24600) 2021-02-18 20:55:53 +05:30
Saqib
4fb547179d fix: customer_currency referenced before assignment (#24607) 2021-02-18 20:53:49 +05:30
Saqib
a439d19917 feat(pos): mpesa related fixes & additions (#24306)
* fix: switching of mode of payments

* feat: transaction limit for mpesa integration

* feat: resend payment request if one fails

* feat: make new request only for failed ones

* fix: invalid amount for mpesa request

* fix: payment successful message not shown

* fix: url and business shortcode for live env

* fix: duplicate items validation for pos invoices

* fix: pos closing entry queued status

* fix: peroid end date for amended pos closing
2021-02-18 20:53:26 +05:30
Saqib
57c2e07c45 fix: validate cancellation only if irn generated (#24608) 2021-02-18 20:45:27 +05:30
Anupam Kumar
4dad1f01ba fix: contact permmission issue (#24503) 2021-02-18 20:26:39 +05:30
Rucha Mahabal
73c2d23a9a feat: Department Wise Appointment Type charges (#24572)
* feat: Appointment Type Service Items

Co-Authored-By: muhammad <muhammadmp@users.noreply.github.com>

* fix: set practitioner service item charges mandatory on item selection

Co-Authored-By: muhammad <muhammadmp@users.noreply.github.com>

* feat: use charges from appointment type during billing

* feat: handle appointment charges priority for invoice automation

* test: patient appointment auto invoicing scenarios

* fix: sider

* fix: minor fixes

Co-authored-by: muhammad <muhammadmp@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-18 20:22:41 +05:30
Anupam Kumar
6485eeb302 fix: portal permission issue (#24577) 2021-02-18 20:21:39 +05:30
pateljannat
4858b40813 fix: excluding unidentified accounts from gstr-1 2021-02-18 18:44:29 +05:30
Marica
77d72d59ef Merge branch 'develop' into quality-inspection-parameter-group 2021-02-18 16:55:44 +05:30
Marica
f3ca4bcb70 Merge branch 'develop' into rfq-contact-email-set 2021-02-18 16:51:50 +05:30
Rucha Mahabal
ccc80927f6 feat: Department Wise Appointment Type charges (#24572)
* feat: Appointment Type Service Items

Co-Authored-By: muhammad <muhammadmp@users.noreply.github.com>

* fix: set practitioner service item charges mandatory on item selection

Co-Authored-By: muhammad <muhammadmp@users.noreply.github.com>

* feat: use charges from appointment type during billing

* feat: handle appointment charges priority for invoice automation

* test: patient appointment auto invoicing scenarios

* fix: sider

* fix: minor fixes

Co-authored-by: muhammad <muhammadmp@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-18 16:41:10 +05:30
Raffael Meyer
d44e60f17c feat: add Print Language to Lead and Opportunity (#24317)
* fix: move "Print Language" to "More Information"

* feat: add "Print Language" in "More Information"

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-02-18 16:24:37 +05:30
Rucha Mahabal
e7bf87cc84 fix: POS return for Serialized Items (#24292)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2021-02-18 16:04:35 +05:30
Jannat Patel
ef5c714de2 fix: salary slip attribute error (#24455)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-02-18 15:52:29 +05:30
Rohit Waghchaure
c697cb8b2d fix: validation of job card in stock entry 2021-02-18 15:10:12 +05:30
Nabin Hait
d826bee13a fix: update qty in future sle (#24649)
* fix: update qty in future sle

* fix: validate cancellation due to ongoing reposting

* fix: process sle against current timestamp
2021-02-18 14:14:21 +05:30
Deepesh Garg
c5b94adc87 Merge pull request #24651 from ankush/ignore_gl_while_cancelling_so
fix(selling): cancel sales order with cancelled PE
2021-02-17 18:39:35 +05:30
rohitwaghchaure
03a1484aed Merge pull request #24621 from rohitwaghchaure/fixed-consolidated-report-not-working-develop
fix: Consolidated Financial Statement report not works if child compa…
2021-02-17 16:35:43 +05:30
Marica
208d1942c3 Merge branch 'develop' into quality-inspection-parameter-group 2021-02-17 12:56:35 +05:30
Marica
a9de890993 Merge pull request #24534 from pateljannat/item_group_on_update_items
fix: item_group on update items
2021-02-17 11:17:49 +05:30
Marica
7de7bb5202 Merge branch 'develop' into item_group_on_update_items 2021-02-16 23:06:20 +05:30
Marica
b43c2e5d7c Merge pull request #24613 from marination/shopping-cart
fix: Shopping cart breaks without Payment Gateway Account
2021-02-16 23:05:19 +05:30
Marica
4441cebbb3 Merge branch 'develop' into shopping-cart 2021-02-16 20:55:00 +05:30
Ankush Menat
3f16902b00 fix(selling): cancel sales order with cancelled PE
Allow cancelling sales order with cancelled payment entry. Ignoring GL
entries while cancelling the document is required to cancel it, reverse
entries are created by accounts controller.

Related issue: ISS-20-21-09586
2021-02-16 18:53:40 +05:30
Ankush Menat
f9d4d9a095 test(selling): add test for cancelling sales order
Add failing test to reproduce bug in cancelling sales order with advance
payments

Related issue: ISS-20-21-09586
2021-02-16 18:45:39 +05:30
prssanna
9c36dc3798 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2021-02-16 16:17:32 +05:30
prssanna
7166b6740f fix: duplicate css property 2021-02-16 16:17:17 +05:30
Nabin Hait
9b178bcd10 fix: stock and account balance syncing (#24644)
* fix: stock and account balance syncing

* fix: stock and account balance syncing

* fix: stock and account balance syncing

* fix: minor fix
2021-02-16 14:57:00 +05:30
Prssanna Desai
f1c0f680f4 Merge pull request #24645 from prssanna/hub-image
fix: broken image style
2021-02-16 12:02:28 +05:30
prssanna
7e8113c7e8 fix: broken image style 2021-02-16 12:00:35 +05:30
rohitwaghchaure
29878e5c3b Merge pull request #24642 from rohitwaghchaure/fixed-patch-item_reposting_for_incorrect_sl_and_gl
fix: patch
2021-02-16 10:39:31 +05:30
Rohit Waghchaure
9a40c1b2e1 fix: patch 2021-02-16 10:35:10 +05:30
rohitwaghchaure
d60ff83b6f fix: added patch to fix incorrect stock qty and account value (#24628) 2021-02-16 09:12:27 +05:30
Deepesh Garg
79f63526cb Merge pull request #24632 from ankush/ladakh_gst_addition
fix(India): Add GST state code for Ladakh
2021-02-15 21:11:54 +05:30
Deepesh Garg
e2324c77fe fix: Test Cases 2021-02-15 20:01:32 +05:30
Nabin Hait
243661b37b fix: formatting query args (#24627) 2021-02-15 19:27:49 +05:30
Rushabh Mehta
8cc6a2d62c fix(typo): erpnext-logo.png 2021-02-15 17:40:50 +05:30
Rushabh Mehta
b0735732f9 fix(minor): add erpnext-logo.png 2021-02-15 17:38:55 +05:30
Deepesh Garg
df4eed4c0d Merge pull request #24615 from ruchamahabal/packed-item-fixes_v13
fix: Issues with packing items
2021-02-15 16:44:10 +05:30
Deepesh Garg
47f5f4757a Merge branch 'develop' into fixed-consolidated-report-not-working-develop 2021-02-15 16:35:31 +05:30
Deepesh Garg
b6cd97e5fc Merge pull request #24320 from pateljannat/ldc-validations
fix: validation for ldc against supplier and section code
2021-02-15 16:33:41 +05:30
Deepesh Garg
535dc4aea2 fix: Do not round off per day interest 2021-02-15 15:54:25 +05:30
Ankush Menat
57c3d373a7 fix(India): Add GST state code for Ladakh 2021-02-15 15:03:50 +05:30
Afshan
e963362dfd fix: check if customer provided item while setting opening stock 2021-02-15 15:00:37 +05:30
Deepesh Garg
429fb3bba8 Merge branch 'develop' of https://github.com/frappe/erpnext into loan_exposure_report_fix 2021-02-15 14:10:10 +05:30
Deepesh Garg
9bf05ad927 feat: Loans Dashboard 2021-02-15 13:32:50 +05:30
Richard Case
fd4e7bdbb1 fix: plaid client version to support latest API (#24531) 2021-02-15 11:58:27 +05:30
Marica
45db1c5d74 Merge branch 'develop' into shopping-cart 2021-02-15 10:35:05 +05:30
rohitwaghchaure
164ffac4ef fix: Consolidated Financial Statement report not works if child company account not present in parent company (#24580)
Fixed conflicts
2021-02-12 17:33:07 +05:30
Nabin Hait
85252e7aef Merge branch 'develop' into packed-item-fixes_v13 2021-02-12 12:39:38 +05:30
Afshan
c44d6b9546 fix: NoneType object has no attribute len() (#24616) 2021-02-12 12:24:41 +05:30
Marica
87fcae4efd Merge branch 'develop' into shopping-cart 2021-02-12 12:16:13 +05:30
Rucha Mahabal
ad1f2b41f4 fix: Issues with packing items 2021-02-12 11:29:24 +05:30
Saqib Ansari
138e98fef2 Merge branch 'develop' into quality-inspection-parameter-group 2021-02-12 11:19:25 +05:30
Nabin Hait
1e6cce3593 Merge branch 'develop' into item_group_on_update_items 2021-02-11 21:59:38 +05:30
Jannat Patel
bb0d8f8038 Update accounts_controller.py 2021-02-11 20:59:28 +05:30
Anupam Kumar
7e1dcf911d feat: capture Rate of stock UOM in purchase (#24315)
* feat: capture Rate of stock UOM in purchase

* fix: review changes

* added server side code

* added stock uom rate in sales transactions

* fix: review changes

* fix: resolving conflicts

* adding patch

* fix: removing patch
2021-02-11 20:19:30 +05:30
Afshan
ee87484134 fix: calculated discount percentage (#24510)
* fix: calculated discount percentage

* fix: slider

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-11 20:11:58 +05:30
Jannat Patel
0a7939277c fix: dynamic links for reports (#24462)
* fix: dynamic links for reports

* fix: revert changes for payment period report

* fix: link doctypes
2021-02-11 20:11:06 +05:30
marination
e2d0715cdf fix: Server side validation for missing payment gateway account 2021-02-11 19:06:10 +05:30
marination
8615227090 fix: Shopping cart breaks without Payment Gateway Account 2021-02-11 18:51:35 +05:30
Saqib
f25ab6f826 fix: validate cancellation only if irn generated (#24608) 2021-02-11 17:50:57 +05:30
Jannat Patel
6756d3b561 Merge branch 'develop' into item_group_on_update_items 2021-02-11 16:29:34 +05:30
Marica
819b8d0266 Merge branch 'develop' into rfq-contact-email-set 2021-02-11 14:45:09 +05:30
Saqib
0681a480c2 feat(pos): mpesa related fixes & additions (#24306)
* fix: switching of mode of payments

* feat: transaction limit for mpesa integration

* feat: resend payment request if one fails

* feat: make new request only for failed ones

* fix: invalid amount for mpesa request

* fix: payment successful message not shown

* fix: url and business shortcode for live env

* fix: duplicate items validation for pos invoices

* fix: pos closing entry queued status

* fix: peroid end date for amended pos closing
2021-02-11 14:06:15 +05:30
Shariq Ansari
a46a83b476 fix: Assignment Rule Unassign Condition doesn't work (#24551)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-11 13:41:10 +05:30
Nabin Hait
aa235b36e0 Update erpnext/controllers/accounts_controller.py
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-02-11 13:26:53 +05:30
Marica
a5039e8f85 Merge branch 'develop' into rfq-contact-email-set 2021-02-11 13:23:56 +05:30
Shariq Ansari
47f784aa9c fix: Lead not getting linked to call logs (#24593)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-11 13:23:51 +05:30
rohitwaghchaure
aa00eb9898 fix: reposting issue with same posting date and posting time (#24570)
* fix: reposting issue with same posting date and posting time

* Update erpnext/stock/stock_ledger.py

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-11 13:23:01 +05:30
Saqib
e37a5c2646 fix: customer_currency referenced before assignment (#24607) 2021-02-11 13:10:52 +05:30
Saqib
e07eb86498 Merge branch 'develop' into tcs_calculation 2021-02-11 12:13:47 +05:30
Saqib
15f4672ffa fix: pos closing valdation (#24605) 2021-02-11 12:11:44 +05:30
Jannat Patel
30c8873f24 fix: validation for disabled warehouse (#24539)
* fix: validation for disabled warehouse

* fix: better function name

* fix: validation in stock ledger entry
2021-02-11 11:46:48 +05:30
Kanchan Chauhan
bb05acb60d fix(Leave Application): List view fix (#24550) 2021-02-11 11:18:59 +05:30
Nabin Hait
9d3f242f39 Update subscription.js 2021-02-11 11:17:33 +05:30
Nabin Hait
b58b8ec2fb Merge branch 'develop' into quality-inspection-parameter-group 2021-02-11 11:14:02 +05:30
Anupam Kumar
e816ed89e6 fix: portal permission issue (#24577) 2021-02-11 11:12:13 +05:30
Anuja Pawar
e3c72a3d71 fix: fix filters for the report (#24594) 2021-02-11 11:06:12 +05:30
Afshan
8609d31430 fix: amend cancelled job offer (#24589) 2021-02-11 11:05:48 +05:30
Ankush Menat
df6e20887d fix: update total in words after updating items (#24602)
* fix: Update total in words after Updating items

Update total in words after Updating items in sales/purchase orders.
Port of #24592

Closes ISS-20-21-09425

* test: Add test for total & words after update item

Add test for total & words after updating items in sales order.
2021-02-11 11:04:39 +05:30
Nabin Hait
79ba299abc Merge branch 'develop' into subscription_fix_new 2021-02-11 11:03:45 +05:30
Suraj Shetty
969d37da4c Merge pull request #24598 from surajshetty3416/fix-favicon 2021-02-10 22:18:10 +05:30
Saqib
7b2afaf349 fix: NoneType has no len() (#24600) 2021-02-10 17:21:12 +05:30
Prssanna Desai
161e3954a8 Merge branch 'develop' into fix-favicon 2021-02-10 16:37:13 +05:30
Rucha Mahabal
3237f5bb88 fix: Inpatient Medication Orders report test (#24596) 2021-02-10 16:36:49 +05:30
Prssanna Desai
a751b6bb7a Merge pull request #24599 from frappe/product-query-fix
fix: also fetch item variants if hide variants is disabled
2021-02-10 16:36:40 +05:30
prssanna
fd0e8a4e23 fix: also fetch item variants if hide variants is disabled 2021-02-10 16:31:41 +05:30
Suraj Shetty
5f27c9e100 chore: Remove unnecessary image files 2021-02-10 15:48:58 +05:30
Suraj Shetty
6fa44fefc3 fix: Use new favicon 2021-02-10 15:48:32 +05:30
Marica
bb87950e96 Merge branch 'develop' into rfq-contact-email-set 2021-02-10 12:02:14 +05:30
pateljannat
1ab95413be fix: conditions simplified 2021-02-09 17:35:17 +05:30
Deepesh Garg
516b3ae1bc fix: get company attribute 2021-02-09 16:47:55 +05:30
Deepesh Garg
45cec6928b fix: get company attribute 2021-02-09 16:44:12 +05:30
Deepesh Garg
5006a2065e fix: Comment 2021-02-09 16:38:11 +05:30
Anurag Mishra
5164223b99 fix: error on group by filter (#24587)
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-02-09 16:22:28 +05:30
pateljannat
637ddff6e9 fix: code cleanup 2021-02-09 16:17:30 +05:30
Deepesh Garg
e56daeb347 fix: Multiple fixes in subscription 2021-02-09 16:13:45 +05:30
Suraj Shetty
1016ff48fc fix: Create new call popup if call popup does not exists 2021-02-09 12:17:29 +05:30
Marica
6330e20d16 Merge pull request #24565 from marination/stock-dashboard-font-weight
fix: (ui) Empty State text font weight in Item Dashboard
2021-02-09 11:03:18 +05:30
Deepesh Garg
236c9ae453 Merge pull request #24578 from marination/acc-dimension-update-fix
fix: Avoid changing Ref. Doctype in Accounting Dimension after creation
2021-02-09 06:51:58 +05:30
Suraj Shetty
fbc3988037 Merge pull request #24581 from surajshetty3416/fix-telephony 2021-02-08 20:27:04 +05:30
Saqib
8991d4ed0b fix: fetching of standalone cr/dr notes for reconciliation (#24575) 2021-02-08 20:19:11 +05:30
Suraj Shetty
dcc9947d10 fix: Update call_popup
- Setup missed & call ended listeners
- Show contacts based on links
2021-02-08 20:13:23 +05:30
Suraj Shetty
c5248b30eb fix: Do not re-use call popup if call ID is different 2021-02-08 18:50:05 +05:30
Suraj Shetty
ba26020a82 fix: Show audio interface in call log which has recording URL
- Also, remove unneccesary column & section break in call log doctype
2021-02-08 18:45:55 +05:30
Suraj Shetty
723e6dd73f fix: Update style of call log shown in timeline 2021-02-08 18:43:26 +05:30
Suraj Shetty
c4d67c2afe refactor: Move call_popup style from less to scss
- Add style for audio
2021-02-08 18:42:27 +05:30
marination
5a7ddba9a3 fix: Avoid changing Ref. Doctype in Accounting Dimension after creation 2021-02-08 17:06:23 +05:30
Afshan
53dbe39d12 fix: StopIteration error when e-invoice not enabled (#24548)
* fix: StopIteration error when e-invoice not enabled

* chore: update message

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
2021-02-08 12:32:42 +05:30
Saqib
9490122abb fix(e-invoice): skip e-invoice generation for non-taxable invoices (#24568) 2021-02-08 11:40:56 +05:30
Marica
0aef0fd764 Merge branch 'develop' into stock-dashboard-font-weight 2021-02-08 10:34:17 +05:30
marination
a97eb6a052 fix: Empty State text font weight in Item Dashboard 2021-02-07 22:27:40 +05:30
Saqib
f29b811a56 fix(e-invoice): do not validate gstin for exports (#24561) 2021-02-06 17:55:20 +05:30
Anuja Pawar
ffb36aac8f fix: fixing item_code not found error in the report (#24483) 2021-02-05 23:35:47 +05:30
Nabin Hait
c4a1bb0e1c fix: couple of travis fixes (#24554)
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2021-02-05 23:34:18 +05:30
prssanna
4742a25942 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2021-02-05 17:35:29 +05:30
prssanna
91b41db9e3 fix: check if product_info exists before setting price 2021-02-05 17:34:56 +05:30
Prssanna Desai
ec337f64d9 Merge pull request #24556 from anupamvs/s-c-changes 2021-02-05 17:26:55 +05:30
Anupam
d7f4aefd00 feat: added continue-shopping button on cart 2021-02-05 16:17:20 +05:30
Prssanna Desai
b8f4cdfbce Merge pull request #24555 from prssanna/product-query-fix
fix: check if product_info exists
2021-02-05 14:54:23 +05:30
prssanna
a7820f310c fix: check if product_info exists 2021-02-05 14:52:31 +05:30
Afshan
b814b002ce fix: creating salary slip from timesheet (#24541) 2021-02-05 11:34:55 +05:30
Saqib Ansari
8c3da162ba feat: introduce parameter group in quality inspection 2021-02-04 19:39:41 +05:30
Saqib
0f2dc0eb73 Merge branch 'develop' into tcs_calculation 2021-02-04 18:38:26 +05:30
Deepesh Garg
eff675f45b Merge pull request #24536 from deepeshgarg007/accounts_user_perm
fix: Add accounts user role permission for accounting dimension filter
2021-02-03 12:10:12 +05:30
Deepesh Garg
dce73d1881 fix: Add accounts user role permission for accounting dimension filter 2021-02-03 12:06:36 +05:30
pateljannat
0701f08ab6 fix: item_group on update items 2021-02-03 11:53:14 +05:30
Nabin Hait
7177579051 fix: Dependant sle logic fixes (#24489)
* fix: Dependant sle logic fixes

* fix: negative qty validation

* fix: Travis fixes
2021-02-02 22:03:07 +05:30
Saurabh
df589594cd Merge branch 'version-13-beta-pre-release' into version-13-beta 2021-02-02 20:58:26 +05:30
Saurabh
7645e5319d bumped to version 13.0.0-beta.11 2021-02-02 21:15:21 +05:50
Afshan
c0f8f32801 fix: fetch query for employee (#24529) 2021-02-02 20:27:23 +05:30
Saurabh
17433d2c90 fix: version number 2021-02-02 17:40:11 +05:30
Nabin Hait
243d59b0c3 Reposting logic fixes (#24520)
* fix: Dependant sle logic fixes

* fix: negative qty validation

* fix: Travis fixes

* fix: test fix
2021-02-02 16:55:13 +05:30
Afshan
10b00f9d0d fix: separation of salary creation from payroll (#24528)
* fix: separation of salary creation from payroll

* fix: removed unnecessary veriable

* fix: check existing sal slips

* fix: existing checks

* style: refactoring query
2021-02-02 16:24:01 +05:30
Saqib Ansari
ef65d6463e Merge branch 'develop' into tcs_calculation 2021-02-02 13:53:20 +05:30
Anupam Kumar
7d64a291b8 fix: contact permmission issue (#24503) 2021-02-02 12:43:13 +05:30
Afshan
91a02868cb fix: emp disappear (#24525)
* fix: emp disappear

* fix: renamed set_totals_call to set_totals

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-02 11:04:25 +05:30
Afshan
8676089794 fix: emp disappear (#24524)
* fix: emp disappear

* fix: renamed set_totals_call to set_totals

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-02-02 11:02:22 +05:30
Nabin Hait
bf97eb2d3b core: Added change log (#24526) 2021-02-02 10:57:55 +05:30
Suraj Shetty
54a253616a Merge pull request #24508 from frappe/rebrand-ui 2021-02-02 09:07:35 +05:30
rohitwaghchaure
f9642eb333 Merge pull request #24522 from rohitwaghchaure/fixed-pricing-rule-travis-issues-develop
fix: test cases for pricing rule
2021-02-01 23:07:37 +05:30
Rohit Waghchaure
d4d639c7ed fix: test cases for pricing rule 2021-02-01 23:01:18 +05:30
rohitwaghchaure
6d462e058b Merge pull request #24521 from rohitwaghchaure/fixed-pricing-rule-travis-issues
fix: test cases for pricing rule
2021-02-01 23:00:24 +05:30
Rohit Waghchaure
5c28416daa fix: test cases for pricing rule 2021-02-01 22:58:22 +05:30
Suraj Shetty
d809de6579 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 22:40:46 +05:30
Suraj Shetty
852e67c5ee fix(patch): Use db_set to ignore validation 2021-02-01 22:40:40 +05:30
prssanna
6f1664223d style: missing semicolon 2021-02-01 20:43:30 +05:30
prssanna
44a055b52f Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 20:39:20 +05:30
Marica
0ea2587679 fix: Numeric/Non-numeric QI UX (#24516)
* chore: Show 1 field each of both types of Insoections in grid view

* fix: Make QI check Numeric by default and make checkbox "Numeric"

- Reducing cognitive load
2021-02-01 20:38:53 +05:30
Marica
003ae90e12 fix: Numeric/Non-numeric QI UX (#24517)
* chore: Show 1 field each of both types of Insoections in grid view

* fix: Make QI check Numeric by default and make checkbox "Numeric"

- Reducing cognitive load
2021-02-01 20:38:32 +05:30
prssanna
73d60aa498 style: fix formatting 2021-02-01 20:38:17 +05:30
Suraj Shetty
cfb5f58141 style: Fix formatting issues 2021-02-01 20:37:18 +05:30
Saurabh
9dcb286c31 fix: consider select perm while setting party details (#24518) 2021-02-01 20:36:15 +05:30
Suraj Shetty
723bd9676d style: Fix formatting issues 2021-02-01 20:34:21 +05:30
prssanna
62442d1c52 style: fix formatting 2021-02-01 20:26:09 +05:30
rohitwaghchaure
bf7317d4e2 fix: multiple pricing rule issue (#24509) 2021-02-01 20:22:14 +05:30
rohitwaghchaure
68edf749ec fix: multiple pricing rule issue (#24515) 2021-02-01 20:22:02 +05:30
Saurabh
081f506992 fix: consider select perm while setting party details (#24514) 2021-02-01 20:18:44 +05:30
prssanna
9a69c0e21e Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 20:13:01 +05:30
prssanna
526ea46ae2 fix: formatting issues 2021-02-01 20:12:47 +05:30
Suraj Shetty
159063db29 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 20:09:58 +05:30
Suraj Shetty
8586c08639 chore: Update translation syntax checker 2021-02-01 20:09:42 +05:30
Suraj Shetty
f57efd1150 style: Fix invalid translation syntax usages 2021-02-01 20:09:20 +05:30
Marica
2fa840e5d4 chore: Use sql to set naming series in older projects (#24513)
* chore: Use sql to set naming series in older projects

* fix: Remove unncessary db.commit()
2021-02-01 20:07:00 +05:30
Marica
fb016edb7a chore: Use sql to set naming series in older projects (#24512)
* chore: Use sql to set naming series in older projects

* fix: Remove unncessary db.commit()
2021-02-01 20:05:29 +05:30
prssanna
53225f5cbb Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 20:01:54 +05:30
prssanna
11eae6d51a fix: add default product-image css class 2021-02-01 20:01:37 +05:30
Suraj Shetty
8fef3a3814 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 19:52:12 +05:30
Suraj Shetty
1ab79da7d1 style: Fix formatting issues 2021-02-01 19:51:25 +05:30
prssanna
ba54c4f1b3 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 19:50:46 +05:30
prssanna
a3585e40f7 style: fix formatting 2021-02-01 19:50:27 +05:30
Suraj Shetty
8030abe1bd Merge branches 'rebrand-ui' and 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 19:41:03 +05:30
Suraj Shetty
f67bf7ae98 chore: Fix formatting issues 2021-02-01 19:40:44 +05:30
prssanna
1d346702ed chore: add .stylelintrc file 2021-02-01 19:07:32 +05:30
prssanna
7863118994 fix: docs link for store page in shopping cart settings 2021-02-01 18:57:30 +05:30
Saqib Ansari
cee3670167 chore: clean up sales invoice form 2021-02-01 15:45:26 +05:30
Suraj Shetty
13d48a0c20 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 15:11:07 +05:30
Suraj Shetty
055b81da7b Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2021-02-01 15:10:52 +05:30
Saqib
beebaf6e1e refactor: assets form cleanup with rebrand ui (#24494) 2021-02-01 11:22:57 +05:30
Deepesh Garg
ab88ec208e fix: Error handling in loan reports 2021-01-31 12:31:46 +05:30
Deepesh Garg
a67daefb41 Merge pull request #24496 from frappe/template-task-parent-child-deadlock
fix: Template task parent child deadlock
2021-01-30 18:50:24 +05:30
prssanna
2aebf99968 fix: add removed get_employee_emails function 2021-01-29 15:55:21 +05:30
Saqib
fb75f0935f Merge branch 'develop' into tcs_calculation 2021-01-29 14:26:48 +05:30
Saqib
77d5f59376 fix: discount amount calculation on net total (#24497) 2021-01-29 14:24:08 +05:30
pateljannat
fd91973ac1 fix: template task parent child deadlock 2021-01-29 13:18:39 +05:30
pateljannat
290f02acdb Merge branch 'version-13-beta-pre-release' of https://github.com/frappe/erpnext into version-13-beta-pre-release 2021-01-29 12:37:49 +05:30
rohitwaghchaure
275e29c819 Merge pull request #24495 from rohitwaghchaure/fixed-extra-trasnferred_qty_issue-develop-pre
fix: extra transferred qty has not consumed against work order
2021-01-29 12:34:18 +05:30
Rohit Waghchaure
aeba3d311c fix: extra transferred qty has not consumed against work order 2021-01-29 12:33:09 +05:30
rohitwaghchaure
cf3e0cf271 Merge pull request #24365 from rohitwaghchaure/fixed-extra-trasnferred_qty_issue-develop
fix: extra transferred qty has not consumed against work order
2021-01-29 12:28:28 +05:30
Saqib Ansari
3b2327ba8d fix: sider 2021-01-29 12:08:35 +05:30
Suraj Shetty
ba599f7676 chore: Update eslintrc - add cur_pos as global 2021-01-29 09:05:32 +05:30
Suraj Shetty
0a8939e1c1 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-29 08:56:22 +05:30
Deepesh Garg
989c853e3b Merge pull request #24490 from deepeshgarg007/report_ltv_ratio_fix
fix: LTV ratio in interest report
2021-01-28 23:28:40 +05:30
Deepesh Garg
7e3f5e04ab fix: LTV ration in interest report 2021-01-28 23:25:23 +05:30
Saqib
675a8330a4 refactor: POS Invoice merging and cancellation (#24351)
* feat: pos invoice merging with background jobs

* fix: invoice threshold for queueing job

* refactor: cancellation flow of point of sale

* feat: tests for cancellation of pos closing

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-01-28 18:42:43 +05:30
leela
3234df5581 feat: improved call log doctype
* Added links and some more fields into Call Log Doctype
* Display call info in the call log link pages
2021-01-28 18:34:58 +05:30
Saqib
62dfff5dde Merge branch 'develop' into tcs_calculation 2021-01-28 18:08:13 +05:30
Saqib Ansari
4d9b6066a2 fix: tcs amount calculation 2021-01-28 18:07:08 +05:30
Saqib
ac9e6ff704 fix(pos): multiple pos fixes and additions (#24227)
* fix: make custom fields in pos invoice similar to sales invoice

* feat: allow/disallow rate & discount change

* fix: any pos profile can be selected while creating pos opening

* fix: cannot add item to cart

* fix: validate phone payment only if payment request exists

* fix: replace pos payment method patch

* chore: rearrange item & customer group filter

* fix: allow/disallow invoice level discount

* fix: updating qty of item with uom having space char

* fix: move configuration checbox to config section

* fix: invalid item rate trigger

* fix: cannot remove item from draft invoices

* fix: customer currency not set in pos invoice

* fix: duplicate item error message

* fix: sales uom not fetched in pos invoice

* fix: cannot add taxes to pos invoice for uae region

* fix: cannot merge pos invoice into credit note

* fix: tax calculation while merging pos invoices

* feat: delete draft orders from order list

* fix: merging of pos invoice with pricing rules
2021-01-28 17:58:55 +05:30
Nabin Hait
a6213ccd61 Merge branch 'develop' into version-13-beta-pre-release 2021-01-28 17:36:08 +05:30
Anupam Kumar
0d9a8ae4d2 feat: shopping portal changes (#24445)
* feat: shopping portal changes

* fix: review changes

* review changes
2021-01-28 17:32:57 +05:30
Anupam
e6f925e5e6 review changes 2021-01-28 15:58:03 +05:30
Marica
56c6805d79 Merge branch 'develop' into fixed-extra-trasnferred_qty_issue-develop 2021-01-28 15:03:15 +05:30
Marica
26f6fa326c Merge pull request #24451 from marination/project-naming-series-patch
fix: Patch to Add Naming Series to old projects
2021-01-28 14:50:25 +05:30
Marica
9580adad0c Merge branch 'develop' into project-naming-series-patch 2021-01-28 14:32:11 +05:30
Marica
a16ad3063f Merge pull request #24127 from deepeshgarg007/lcv_multicurrency
feat: Multi currency in landed cost voucher
2021-01-28 13:35:37 +05:30
Marica
7aa16bafff Merge branch 'develop' into lcv_multicurrency 2021-01-28 13:29:36 +05:30
Deepesh Garg
b4be292217 fix: Item valuation for internal stock transfers (#24200)
* fix: Item valuation for internal stocktransfers

* fix: Consider conversion factor for invoices

* fix: Add missing set warehouse fields

* fix: Add validations and other fixes

* fix: Fixes in flow

* fix: Internal sales item link in Purchase Invoice

* fix: Debugging

* fix: Debug travis

* fix: Remove commented code

* fix: Rate forcing in sales order

* fix: Unreallized profit in Sales Register

* fix: Item wise gst sales register fix

* fix: From warehouse in Purchase Order

* fix: Target field in Sales Invoice

* fix: remove self

* fix: GST Purchasse register and other fixes

* fix: Add shipping_address to no field map

* fix: Ref doc map

* fix: Test Cases

* fix: address mapping between sales and purchase document

* fix: Import Error

* fix: Tax updation for internal invoices

* fix: Purchase Order and Invoice linking

* fix: Internal Party validation fix

* fix: validation

* fix(india): GST Taxes for intra state transfer

* fix(india): GST Taxes for intra state transfer

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-01-28 13:09:56 +05:30
Marica
465974cff0 Merge branch 'develop' into project-naming-series-patch 2021-01-28 13:01:28 +05:30
Marica
ed6368d782 Merge pull request #24481 from marination/stock-entry-indicator
chore: Set Stock Entry Form Indicators in setup
2021-01-28 13:00:24 +05:30
Marica
9e11521764 Merge pull request #24466 from marination/stock-entry-qi
fix: Always show QI Template in Item
2021-01-28 12:45:49 +05:30
Mohamed Almubarak
f7ea340181 fix(template): cards on second row overlaps the one before (#23454)
* Update macros.html

fix second row of cards overlapps with the one before

* Update macros.html

fix(template): second row of cards overlaps with the one before

* Update macros.html

fix(template): second row of cards overlaps with the one before
2021-01-28 12:32:13 +05:30
Jannat Patel
9f8cbe9101 Material request wrong status issue (#24019)
* fix: material request status fix

* fix: changing precision to global defaults for material request status

* fix: adding back the removed flt

* fix: sider issues fixed

Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
2021-01-28 12:29:52 +05:30
Saqib
8e55677f10 feat: deleting account & stock entries on deletion of transaction (#24298)
* feat: control for deleting account & stock entries on deletion of a transaction

* chore: change label & fieldname

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-01-28 12:26:45 +05:30
Jannat Patel
3914aca647 fix: check for tax rate (#24376) 2021-01-28 12:25:15 +05:30
Anurag Mishra
5756bf50e6 fix: removed all day event from shift assignment calendar (#24397)
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-01-28 12:24:39 +05:30
Afshan
e5529ad461 fix: validate tax template for tax category (#24402)
* fix: validate tax template for tax category

* Update sales_taxes_and_charges_template.py
2021-01-28 12:22:39 +05:30
Raffael Meyer
f6f4376463 feat: remove german sales invoice validation (#24441)
This can be better achieved via Customize Form
(mandatory and mandatory_depends_on)
2021-01-28 12:16:26 +05:30
Marica
cc22814df5 Merge branch 'develop' into lcv_multicurrency 2021-01-28 12:15:09 +05:30
Marica
cdccf4be52 Merge branch 'develop' into stock-entry-qi 2021-01-28 12:12:03 +05:30
Deepesh Garg
16bcd01f6d feat: Provision to disable serial no and batch selector (#24398)
* feat: feat: Provision to disbale serial no and batch selector

* fix: Sider issues

* fix: Linting issues
2021-01-28 12:09:35 +05:30
Deepesh Garg
bd9bdc5797 feat: Batch wise item pricing (#24470)
* feat: Batch wise item pricing

* fix: Rate for items with no batch

* fix: Add test case for batch pricing

* fix: Sider Issues

* fix: Add item filter for batch
2021-01-28 12:05:57 +05:30
marination
27bac2aaec fix: Missing semi-colon 2021-01-28 12:04:14 +05:30
pateljannat
55e7c5644c fix:rfq contact email set 2021-01-28 12:00:18 +05:30
marination
bc370b3ee5 chore: Set Stock Entry Form Indicators in setup
- Makes it easier to override via customisations
- Style consistency with other forms that set indicator in setup as well
2021-01-28 11:44:26 +05:30
Marica
ea7c2dbfaf Merge branch 'develop' into stock-entry-qi 2021-01-28 11:31:43 +05:30
Saqib
31eb740aef Merge branch 'develop' into tcs_calculation 2021-01-27 19:47:19 +05:30
Saqib Ansari
ae9a9a2167 fix: tcs chargable amount 2021-01-27 19:36:29 +05:30
Saqib Ansari
ff12f91486 feat: charging tcs on sales invoice 2021-01-27 19:17:38 +05:30
prssanna
74feaf85dc fix: website order page style 2021-01-27 17:41:15 +05:30
Saqib Ansari
6db14d02d2 fix: test 2021-01-27 17:11:34 +05:30
Saqib Ansari
58250aac10 feat: pan and tax withholding category fields for customer 2021-01-27 16:59:36 +05:30
Saqib Ansari
6f718a31f0 refactor: tax withholding category against customer 2021-01-27 16:59:07 +05:30
Afshan
907e2990d0 fix: remove function to get earning deduction components (#24465)
* fix: remove function to get earning deduction components

* fix: slider
2021-01-27 15:34:42 +05:30
Saqib
5ba2f58355 fix: e_invoice print format not showing other charges (#24474) 2021-01-27 12:34:08 +05:30
prssanna
2d1d900c88 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-27 10:58:17 +05:30
prssanna
72053cc4ab fix: cart address overflow 2021-01-27 10:57:34 +05:30
Deepesh Garg
dade7a4583 fix: Translation Syntax 2021-01-26 21:11:55 +05:30
Deepesh Garg
a0d61524c1 fix: Add distribute manually option in LCV 2021-01-26 17:05:00 +05:30
Deepesh Garg
ff3adfd1cf Merge pull request #24468 from deepeshgarg007/lse_report_fix
fix: Division by 0 error in security exposure reports
2021-01-26 10:13:39 +05:30
Deepesh Garg
7a4db2214a fix: Division by 0 error in security exposure reports 2021-01-26 10:10:35 +05:30
Deepesh Garg
224fdf34e4 Merge branch 'develop' of https://github.com/frappe/erpnext into lcv_multicurrency 2021-01-25 22:16:02 +05:30
Raffael Meyer
1991ba7910 feat: temporary against account (#24086)
* feat: add temporaray against account nmber to datev settings

* feat: use temporary against account in datev report

* test: add temp against account number to test data

* test: include temp against aaccount in filters
2021-01-25 21:22:10 +05:30
Marica
35455d2de6 Merge branch 'develop' into project-naming-series-patch 2021-01-25 21:16:02 +05:30
marination
b0ef8fb7c5 fix: Always show QI Template in Item 2021-01-25 21:00:24 +05:30
David Angulo
e1e4810a46 feat: Make patient age translateable 2021-01-25 08:29:11 -06:00
rohitwaghchaure
fa3ec3c346 Merge pull request #23969 from marination/putaway
feat: Putaway
2021-01-25 16:42:04 +05:30
Suraj Shetty
0c34a711eb Merge branch 'develop' of github.com:frappe/erpnext into version-13-beta-pre-release 2021-01-25 16:06:38 +05:30
Anupam
8541d9738f fix: review changes 2021-01-25 14:18:26 +05:30
Marica
62a1caf6c4 Merge branch 'develop' into lcv_multicurrency 2021-01-25 12:39:16 +05:30
Marica
ec4f42d4a9 Merge branch 'develop' into project-naming-series-patch 2021-01-25 11:29:23 +05:30
Deepesh Garg
164079127f Merge pull request #24446 from deepeshgarg007/patch-fix-1-new
fix: Project Template patch
2021-01-25 10:37:43 +05:30
Deepesh Garg
befe32cbe1 Merge pull request #24456 from deepeshgarg007/ltv_in_report
fix: Add loan to value field in Loan Interest Report
2021-01-24 19:18:42 +05:30
Deepesh Garg
91eb9bb5c2 fix: Add loan to value field in Loan Interest Report 2021-01-24 19:15:57 +05:30
Kaviya Periyasamy
c680547be3 fix(einvoice): QRCode generation (#24412) 2021-01-24 10:59:37 +05:30
rohitwaghchaure
13df7a0ca6 Merge pull request #24033 from ruchamahabal/patient-history-enhancements
feat: Patient History Enhancements
2021-01-23 18:19:16 +05:30
Rucha Mahabal
8dc9d2f103 Merge pull request #24410 from ruchamahabal/service-units-in-appointment
feat: Allow selecting admission service unit in Patient Appointment for inpatients
2021-01-23 15:14:17 +05:30
Rucha Mahabal
ab920b55a7 Merge branch 'develop' into service-units-in-appointment 2021-01-23 13:27:03 +05:30
Rucha Mahabal
edf5da3394 Merge branch 'develop' into patient-history-enhancements 2021-01-23 13:26:36 +05:30
Rucha Mahabal
ee28328006 fix(travis): Issue Analytics Report Test (#24453) 2021-01-23 13:26:24 +05:30
Rucha Mahabal
6f4ad3b73d fix: sider 2021-01-23 12:52:41 +05:30
Rucha Mahabal
cb1da4d07c fix: doctype meta not loading while setting up fields 2021-01-22 19:26:56 +05:30
Marica
6b0d334d25 Merge pull request #24399 from pateljannat/item-wise-purchase-registry-item-name-error
fix: Item wise purchase registry item_name error
2021-01-22 19:20:51 +05:30
Deepesh Garg
5b4ece5054 fix: Update patch 2021-01-22 17:12:35 +05:30
marination
7ba60570e7 fix: Spaces to Tabs 2021-01-22 16:55:06 +05:30
marination
c908deea61 fix: Patch to Add Naming Series to old projects 2021-01-22 16:10:01 +05:30
Rucha Mahabal
75a93d9057 feat: fetch date field for custom doctypes 2021-01-22 15:51:25 +05:30
Afshan
217440952f fix: slider 2021-01-22 15:39:59 +05:30
Afshan
02d495f1fb fix: added query for fetching salary component 2021-01-22 15:39:59 +05:30
prssanna
2aa1efb70e fix: broken image style 2021-01-22 15:31:38 +05:30
Anurag Mishra
dfa78eb27d fix(HR): Remove payroll card from HR workspace
fix(HR): Remove payroll card from HR workspace
2021-01-22 13:56:09 +05:30
Rucha Mahabal
6058ea88e8 fix: SLA not applied automatically when priority is missing (#24447) 2021-01-22 13:35:08 +05:30
Marica
5631d014a7 Merge branch 'develop' into item-wise-purchase-registry-item-name-error 2021-01-22 12:35:35 +05:30
Deepesh Garg
0d26d24164 Merge pull request #24414 from Alchez/dev-irs-1099-year
fix: use supplied year for IRS 1099 forms
2021-01-22 12:17:43 +05:30
Deepesh Garg
cf7209f3d4 fix: Project Template patch 2021-01-22 11:47:13 +05:30
Anupam
988ea8d61d feat: shopping portal changes 2021-01-22 10:53:50 +05:30
Jannat Patel
02a7af1e6c fix: full form for opportunity in crm dashboard (#24436)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-01-22 10:03:29 +05:30
Rucha Mahabal
858ad20dd0 Merge branch 'develop' into service-units-in-appointment 2021-01-22 09:09:29 +05:30
Rucha Mahabal
7201498801 Merge branch 'develop' into patient-history-enhancements 2021-01-22 09:04:37 +05:30
Rucha Mahabal
b9a21c4824 feat: added search to the Select fields dialog in Patient History Settings 2021-01-22 09:00:40 +05:30
Rucha Mahabal
ded08245cc fix: duplicate filters added on patient change 2021-01-22 08:52:17 +05:30
rohitwaghchaure
3afc6b1333 Merge pull request #24437 from AfshanKhan/fix-stock-ageing
fix: stock ageing should not take cancelled stock entries.
2021-01-21 23:09:41 +05:30
Rucha Mahabal
8d60d301c8 Merge pull request #23865 from scmmishra/membership-enhancements-2
feat: enhancements to erpnext membership
2021-01-21 21:10:53 +05:30
Rucha Mahabal
7a21e40527 Merge branch 'develop' into membership-enhancements-2 2021-01-21 20:21:17 +05:30
Rucha Mahabal
02e424fae2 chore: Add description for settings 2021-01-21 20:16:17 +05:30
Rucha Mahabal
bcc0674d37 fix: test 2021-01-21 19:52:13 +05:30
Abhishek Balam
ea30e0a37d fix: change modified date 2021-01-21 19:38:37 +05:30
Abhishek Balam
ae3a9c1ead fix: remove payroll card from HR workspace 2021-01-21 19:33:19 +05:30
Suraj Shetty
f0ff23eac3 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-21 19:07:57 +05:30
Saqib
577d2bed6e fix: failing einvoice test (#24434) 2021-01-21 18:43:55 +05:30
Suraj Shetty
bed55bb7ba fix: Use multisql to support postgres 2021-01-21 18:36:50 +05:30
Afshan
96edfd93c9 fix: stock ageing should not take cancelled stock entries. 2021-01-21 18:22:35 +05:30
Rucha Mahabal
eee71f37d8 fix: test 2021-01-21 17:47:20 +05:30
Suraj Shetty
5f52f8d473 fix: Temporarily comment out help article link in issue timeline 2021-01-21 16:50:47 +05:30
Suraj Shetty
8670dda5b7 fix: Use abbr method for abbr 2021-01-21 16:47:04 +05:30
Rucha Mahabal
f1cca59d80 feat: update expiry for memberships 2021-01-21 16:36:15 +05:30
Suraj Shetty
2dcdeb8231 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-21 15:33:42 +05:30
Suraj Shetty
17ed3fc270 fix: Set css_style fallback 2021-01-21 15:33:36 +05:30
prssanna
f3d321fb82 fix: remove console.log 2021-01-21 15:31:42 +05:30
Rucha Mahabal
b9781a4675 fix: membership test cases 2021-01-21 15:13:29 +05:30
Suraj Shetty
0c0155e885 fix: Make birthday messages translatable 2021-01-21 14:59:19 +05:30
Suraj Shetty
8b1a720ae8 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-21 14:32:45 +05:30
Suraj Shetty
164fe37fa0 fix: Employee birthday reminder 2021-01-21 14:32:35 +05:30
Rucha Mahabal
f3e3f80102 Merge branch 'develop' into membership-enhancements-2 2021-01-21 13:24:39 +05:30
Rucha Mahabal
d98b506478 fix: patch 2021-01-21 13:23:59 +05:30
prssanna
9f1a156307 Merge branch 'shopping-cart' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-21 13:04:58 +05:30
Rucha Mahabal
b48eab972e fix: sider issues 2021-01-21 13:00:10 +05:30
Marica
d1e6303d67 Merge branch 'develop' into item-wise-purchase-registry-item-name-error 2021-01-21 12:14:47 +05:30
Rucha Mahabal
3af46cc6cc fix: show custom buttons after save 2021-01-21 11:59:34 +05:30
Rucha Mahabal
4284ad880b fix: create member from membership for website users only 2021-01-21 11:54:14 +05:30
Rucha Mahabal
53d0eebbe8 fix: patch for renaming field in Membership Settings 2021-01-20 23:22:08 +05:30
Rucha Mahabal
bc49815d54 refactor: missing validations, code clean-up 2021-01-20 23:14:27 +05:30
Rucha Mahabal
fa4b3ba505 fix: basic validations for Membership Type Linked Item 2021-01-20 21:59:27 +05:30
Rucha Mahabal
3575939386 fix: sider issues 2021-01-20 20:48:51 +05:30
pateljannat
f110759897 fix: date validation 2021-01-20 18:12:48 +05:30
prssanna
b00eb1b0cc feat: shopping cart page 2021-01-20 17:52:54 +05:30
prssanna
706eae7cac fix: product page fixes 2021-01-20 17:47:25 +05:30
prssanna
ac7bc78afe fix: show product price in item card 2021-01-20 17:46:19 +05:30
prssanna
599322871a fix: product query issues 2021-01-20 17:44:08 +05:30
Afshan
b8b23663e6 fix: query for salary component in salary structure
fix: query for salary component in salary structure
2021-01-20 17:42:06 +05:30
Afshan
36e3e05a0e fix: query for salary componet in salary structure 2021-01-20 16:48:42 +05:30
Afshan
53edb872c7 Merge pull request #24424 from AfshanKhan/fix-add-stat-comp-in-sal-struct
fix: allow statistical component in salary structure.
2021-01-20 15:21:04 +05:30
Afshan
912647f4f2 fix: allow statistical component in salary structure. 2021-01-20 13:58:32 +05:30
Saqib
e2ed2324c3 fix: (e-invoicing) qrcode image generation (#24395)
* fix: invalid taxable value of item for e-invoice

* fix: qrcode image duplicate error

* fix: net total discount calculation

* fix: auto fetch auth token
2021-01-20 13:17:42 +05:30
Rucha Mahabal
bd02a42904 Merge branch 'develop' into membership-enhancements-2 2021-01-20 12:49:37 +05:30
Afshan
0ff9acfc9f Merge pull request #24415 from AfshanKhan/sal-comp-err
fix: select sal comp while making sal struct
2021-01-20 12:37:53 +05:30
Deepesh Garg
60a8ba5cbd Merge branch 'develop' of https://github.com/frappe/erpnext into lcv_multicurrency 2021-01-20 10:30:52 +05:30
Suraj Shetty
2e67a41c27 fix: Update birthday avatar code 2021-01-20 10:12:01 +05:30
Afshan
c69ab6d184 fix: select sal comp while making sal struct 2021-01-19 19:29:31 +05:30
Rohan Bansal
97b9995f8f fix: use supplied year for IRS 1099 forms 2021-01-19 19:10:03 +05:30
rohitwaghchaure
c474caba70 Merge pull request #24354 from rohitwaghchaure/fixed-incorrect-key-in-subcontract-develop
fix: incorrect serial no in the subcontracted purchase receipt
2021-01-19 15:08:53 +05:30
Rucha Mahabal
a28579a130 fix: sider issues 2021-01-19 14:16:44 +05:30
Rucha Mahabal
f39cbd3a1d test: appointment booking for admission service unit 2021-01-19 13:59:03 +05:30
Suraj Shetty
c858bb8122 fix: Rename patch 2021-01-19 10:47:50 +05:30
Jannat Patel
953960b193 Merge branch 'develop' into item-wise-purchase-registry-item-name-error 2021-01-19 10:44:49 +05:30
Deepesh Garg
6fb66f9428 Merge pull request #24362 from ruchamahabal/year-to-date-in-salary-components
feat(Payroll): compute Year to Date for Salary Slip components
2021-01-19 09:40:47 +05:30
Suraj Shetty
bbc6bfd3c3 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-19 09:34:06 +05:30
marination
957615bec8 fix: Stricter validations
- Validation for overreceipt on Purchase Invoice, Stock Entry, Purchase Receipt & Stock Reconciliation
- Every incoming stock transaction must be checked to avoid overcapacity
- However application of rule and splitting only on certain doctypes
- Validate capacity < stock balance on save in putaway rule, irrespective
2021-01-18 23:47:24 +05:30
Marica
6ac51edc56 Merge branch 'develop' into putaway 2021-01-18 17:47:25 +05:30
Saqib
7b8eac958e feat: re-linking bank accounts with plaid (#24392) 2021-01-18 16:44:41 +05:30
Suraj Shetty
e560d7428e fix: Update split issue & help article 2021-01-18 16:43:22 +05:30
pateljannat
6bec696396 fix: item_group fallback 2021-01-18 16:21:56 +05:30
pateljannat
fa2b0d43bd fix: handled invoices with no item_code 2021-01-18 15:27:40 +05:30
Rucha Mahabal
20e5315480 feat: Allow selecting admission service unit in Patient Appointment for inpatients 2021-01-18 14:56:55 +05:30
Rucha Mahabal
ea19434af4 feat: Issue Analytics Script Report (#23604)
* feat: Issue Analytics Report

* feat: add more filters, code clean-up

* fix: add report link to desk page

* test: Issue Analytics Report

* fix: sider issues

* fix: test

* debug: travis

* debug: travis

* fix: travis

* fix: travis

Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-01-18 13:53:52 +05:30
Deepesh Garg
c3d82a889a Merge pull request #24370 from deepeshgarg007/loan_report_and_enhancements
feat: Loan report and enhancements
2021-01-18 12:26:45 +05:30
Deepesh Garg
52172252b4 fix: Interest calculations in Loan Interest Report 2021-01-18 12:07:54 +05:30
Deepesh Garg
2cb12e6f70 fix: Loan Security name fetch 2021-01-17 18:38:21 +05:30
Deepesh Garg
dd25ecb70d fix: Add reports in Desk Page 2021-01-17 17:52:02 +05:30
Deepesh Garg
ec60063155 fix: Auto Loan Write Off 2021-01-17 17:39:51 +05:30
Deepesh Garg
914ab7e4b0 fix: Add filters and currency in reports 2021-01-17 14:40:32 +05:30
Deepesh Garg
addea9697d feat: Loan Exposure report 2021-01-17 11:36:51 +05:30
Deepesh Garg
7976d12ed0 fix: Applicant-Wise Loan Security Exposure report 2021-01-16 18:10:01 +05:30
Deepesh Garg
b015934644 Merge pull request #23912 from deepeshgarg007/accounting_dimension_filters
feat: Configurable accounting dimension filters and validations
2021-01-16 13:57:12 +05:30
Deepesh Garg
1564d6ee1f fix: Test Case 2021-01-15 19:51:15 +05:30
Deepesh Garg
0c4d61269a fix: test case 2021-01-15 15:57:18 +05:30
Deepesh Garg
e30b33a3b8 fix: Linting issues 2021-01-15 15:47:15 +05:30
Deepesh Garg
cbed6f970a Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2021-01-15 15:43:59 +05:30
Suraj Shetty
cde1566606 fix: Typo 2021-01-15 15:28:50 +05:30
Suraj Shetty
f75d1bb043 fix: Typo 2021-01-15 14:53:51 +05:30
Suraj Shetty
22cdfbea87 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2021-01-15 14:48:35 +05:30
Suraj Shetty
3d00e25232 refactor: Employee birthday reminder 2021-01-15 14:48:28 +05:30
Kanchan Chauhan
d2c71350cd refactor(Job Application): New fields in Job Applicant and webform (#23326)
* refactor(Job Application): New fields in Job Applicant and webform

* fix: translation syntax

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-01-15 13:56:03 +05:30
Rohan
b1d08126b0 feat: add "Sync Now" to Plaid Settings (#23602) 2021-01-15 12:56:30 +05:30
Rucha Mahabal
004e51ed9f Merge branch 'develop' into patient-history-enhancements 2021-01-15 12:09:53 +05:30
Rucha Mahabal
1873c389e5 feat: Only allow submittable doctypes for Patient Medical Record 2021-01-15 02:12:57 +05:30
Rucha Mahabal
b15a19c6e0 test: Medical Record creation for custom doctypes 2021-01-15 01:27:30 +05:30
Rucha Mahabal
060d647248 fix: travis 2021-01-15 00:19:14 +05:30
Deepesh Garg
923af36979 Merge pull request #24378 from Anuja-pawar/fix_payment_period_based_on_invoice_date_report
fix: Payment Period based on invoice date report fix/refactor
2021-01-14 22:24:23 +05:30
Anuja P
47b42e6441 fix: Translation fixes 2021-01-14 21:20:00 +05:30
Anuja P
5ead7ee6cf fix:Payment Period based on invoice date report fix/refactor 2021-01-14 20:58:34 +05:30
Deepesh Garg
c96ea002a0 Merge pull request #24375 from deepeshgarg007/plv_cost_center_ignore_v13
fix: Ignore group cost center validation for period closing voucher
2021-01-14 19:47:56 +05:30
Deepesh Garg
847c706d2f fix: Ignore group cost center validation for period closing voucher 2021-01-14 19:44:41 +05:30
Anuja Pawar
4569e52b45 fix: fix for not having fiscal year while creating new company (#24130)
* fix: Fiscal year fix while creating new company

* fix: for failing Travis

* fix: suggested changes

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-01-14 19:24:30 +05:30
Mohammad Hasnain Mohsin Rajan
00981206ad fix: last purchase rate not updating when voucher cancelled if only one voucher is present (#24322)
* fix: last purchase rate not updating

* chore: use orm for updating

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
2021-01-14 19:23:18 +05:30
Deepesh Garg
660d4a1097 Merge pull request #24346 from GangaManoj/timesheet-linking
fix: Link timesheets with corresponding projects
2021-01-14 18:49:40 +05:30
Deepesh Garg
3f015f7142 fix: Update fieldnames 2021-01-14 18:44:14 +05:30
Marica
5a1c469bf4 Merge pull request #23210 from michellealva/naming-series-proj
chore: Add Naming Series for Project DocType
2021-01-14 17:19:16 +05:30
Marica
3c878505cb Merge branch 'develop' into naming-series-proj 2021-01-14 16:34:51 +05:30
Marica
2b75342811 Merge pull request #24294 from marination/mr-se-warehouse-validation
fix: Don't validate warehouse values between Material Request and Stock Entry
2021-01-14 15:09:00 +05:30
Rucha Mahabal
5495c3789f Merge pull request #24355 from ruchamahabal/inpatient-visits-billing
feat(Healthcare Settings): Do Not Bill Patient Encounters for Inpatients
2021-01-14 14:45:49 +05:30
Rucha Mahabal
751719ea0d Merge branch 'develop' into patient-history-enhancements 2021-01-14 14:08:50 +05:30
marination
bc9eaac342 fix: Clear merge conflicts
- 'get_project_template' was removed a month back
- in 'make_project' insert the project directly as a check for it is there in the beginning.
2021-01-14 13:47:40 +05:30
Rucha Mahabal
6c90e26982 feat: add descriptions for YTD and MTD fields 2021-01-14 13:42:40 +05:30
Marica
17614c9860 Merge branch 'develop' into mr-se-warehouse-validation 2021-01-14 13:02:45 +05:30
Rucha Mahabal
6b9efa894f Merge branch 'develop' into inpatient-visits-billing 2021-01-14 12:31:43 +05:30
marination
814858061f fix: test for raising MR-SE mismatch error
- Make test add mismatched item code instead of warehouse, since warehouse can be different.
2021-01-14 12:13:08 +05:30
Rucha Mahabal
49702c1487 test: year to date computation for salary slip components 2021-01-14 11:57:24 +05:30
Rohit Waghchaure
56c7b554a6 fix: extra transferred qty has not consumed against work order 2021-01-14 11:54:32 +05:30
Rucha Mahabal
2c315a738e feat: Salary Slip with Year to Date Print Format 2021-01-14 10:06:24 +05:30
Rucha Mahabal
fdad94f983 feat(Payroll): compute Year to Date for Salary Slip components 2021-01-14 00:40:58 +05:30
Anuja Pawar
e62ce4b172 fix: Add button PO, PI, SI, DN and, Quotation Dashboard (#24187) 2021-01-13 21:13:12 +05:30
Anupam Kumar
4a649a4fce fix: removing payment_field from loan repayment closuer (#24291) 2021-01-13 21:10:49 +05:30
Afshan
33fac19bce fix: calculation of remaining_sub_periods if relieving date before month start date (#24319) 2021-01-13 21:06:04 +05:30
Anuja Pawar
0b04e23f6d fix: BOM Stock Report UoM correction (#24339) 2021-01-13 21:04:03 +05:30
Jannat Patel
00ccec7314 fix: subscription prepaid date validation (#24356) 2021-01-13 21:02:15 +05:30
Saqib
53cb9f9f47 fix(e-invoicing): ux issues (#24358)
* fix: overseas invoice rounding adjustment

* fix: overseas shipping address

* fix: qrcode for document name having forward slash

* feat: sandbox mode toggle

* fix: cannot delete sales invoice if linked to e invoice req log
2021-01-13 21:00:44 +05:30
Kanchan Chauhan
511434190d fix(work order): Actual start and end dates update (#24360)
Currently, even when the Work Order (without Operations) is completed and Stock Entries are there, the Actual Start Date and Actual End Date is not updated. 

For some reason need to db_set, then it updates the Actual Start Date and Actual End Date
2021-01-13 20:59:43 +05:30
Rucha Mahabal
ef5f0c0461 feat: Issue Summary Script Report (#23603)
* feat: Issue Summary Report

* feat: Add Issue Metrics to Issue Summary Report

* fix: code clean-up

* feat: Added Report Summary

* feat: Add SLA status fields

* fix: add report link to desk page

* fix: sider issues

Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-01-13 19:59:16 +05:30
Anurag Mishra
5ef50d3914 fix: validated GST state
fix: validated GST state
2021-01-13 15:27:29 +05:30
Anurag Mishra
1e396dcb2a fix: validated GST state 2021-01-13 14:01:57 +05:30
Jannat Patel
8aeadc743e fix: assessment plan error handling for course field (#23961)
* fix: assessment plan error handling for course field

* fix: message rectification

* fix(travis): clean-up tests

* fix: travis

* fix: tests

Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-01-13 12:56:04 +05:30
Marica
1ff7743d81 Merge branch 'develop' into naming-series-proj 2021-01-13 10:40:24 +05:30
rohitwaghchaure
1c362c81f2 Merge pull request #24324 from marination/bom-rm-rate-company-based
fix: Company Wise Valuation Rate for RM in BOM
2021-01-13 10:39:39 +05:30
Rucha Mahabal
0f05925ff4 test: Do Not Bill Patient Encounters for Inpatients 2021-01-13 09:46:33 +05:30
Rucha Mahabal
1354197c72 feat(Healthcare Settings): Do Not Bill Patient Encounters for Inpatients 2021-01-13 09:12:50 +05:30
Rohit Waghchaure
7cd7bf7f96 fix: incorrect key 2021-01-13 00:13:57 +05:30
rohitwaghchaure
bc465a3045 Merge pull request #24332 from rohitwaghchaure/fixed-payment-entry-multi-currency-issue-develop
fix: payment entry multi-currency issue
2021-01-13 00:13:14 +05:30
Marica
7edb69498c Merge pull request #24338 from marination/batch-selector
fix: Batch/Serial Selector for Scanned Batched Item
2021-01-12 21:10:13 +05:30
Marica
b8c5cd7331 Merge branch 'develop' into mr-se-warehouse-validation 2021-01-12 20:16:58 +05:30
Marica
30cc040d50 Merge branch 'develop' into batch-selector 2021-01-12 20:14:35 +05:30
Marica
cb079cd8c4 Merge branch 'develop' into naming-series-proj 2021-01-12 19:57:55 +05:30
Marica
98e3dcac2a Merge pull request #24293 from anupamvs/qi-reading-status
fix: added empty value in Quality Inspection Reading status
2021-01-12 19:43:57 +05:30
Marica
69f66664ce Merge branch 'develop' into qi-reading-status 2021-01-12 19:32:47 +05:30
Anurag Mishra
7ff06d6ee5 Merge pull request #24349 from Anurag810/dunning_fixes
fix: not able to create dunning from sales invoice
2021-01-12 18:40:10 +05:30
Anurag Mishra
36fa0512d2 fix: not able to create dunning from sales invoice 2021-01-12 17:02:19 +05:30
Deepesh Garg
59e2114419 Merge pull request #24311 from wojosc/patch-14
fix: Update item_tax_template_dashboard.py
2021-01-12 13:09:35 +05:30
Rushabh Mehta
b6c7ba2eea fix(minor): Rename loan workspace to loan management for naming 2021-01-12 11:34:11 +05:30
Deepesh Garg
7fd2b35a7d Merge pull request #24092 from pateljannat/project-template-and-tasks
feat: Project template with dependent tasks
2021-01-12 11:28:35 +05:30
Marica
69abc27316 Merge branch 'develop' into qi-reading-status 2021-01-12 11:15:36 +05:30
Anupam
c53ad88503 fix: resolved commit 2021-01-12 10:51:29 +05:30
Rushabh Mehta
37aa81526a fix(minor): clear merge conflicts 2021-01-12 10:29:00 +05:30
Marica
0600d572ba Merge branch 'develop' into batch-selector 2021-01-12 10:28:47 +05:30
Rushabh Mehta
7619d3d6d6 fix(merge): develop 2021-01-12 09:16:21 +05:30
Rucha Mahabal
80911577f5 Merge pull request #24340 from ruchamahabal/make-ipme-entries-editable
fix: allow medication entries to be deleted from the table
2021-01-11 17:59:02 +05:30
rohitwaghchaure
c92da35997 Merge pull request #22944 from anupamvs/opportunity-status
fix: Opportunity Status fix
2021-01-11 17:34:06 +05:30
Rucha Mahabal
8549358708 Merge branch 'develop' into make-ipme-entries-editable 2021-01-11 15:31:08 +05:30
Marica
aef71a8abe Merge branch 'develop' into batch-selector 2021-01-11 14:22:11 +05:30
Marica
8bb8ff673a Merge pull request #24072 from pateljannat/partially-submit-drop-ship-items-issue
fix: drop ship partial order fixed
2021-01-11 14:19:04 +05:30
Marica
cffc489d57 Merge branch 'develop' into partially-submit-drop-ship-items-issue 2021-01-11 13:39:49 +05:30
Saqib
d43bb4db41 fix(pos): error while merging pos invoices into sales invoice (#24337) 2021-01-11 12:59:35 +05:30
marination
7646d7b741 fix: Batch/Serial Selector for Batched Item 2021-01-11 12:51:15 +05:30
Jannat Patel
dcda8b9e8c feat: Patient appointment status changes (#24201)
* feat: patient appointment status changes

* fix: sider

* fix: sider

* fix: test status on cancel of docs and test refactor

Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-01-11 12:50:39 +05:30
Rucha Mahabal
aff3f611d3 fix: allow medication entries to be deleted from the table 2021-01-11 12:48:11 +05:30
Jannat Patel
8a07de9ee0 Merge branch 'develop' into project-template-and-tasks 2021-01-11 10:57:09 +05:30
Marica
298e2fe9a5 Merge pull request #24181 from marination/qi-ux
feat: Value Based and Numeric Quality Inspection
2021-01-11 10:38:06 +05:30
pateljannat
2460e101a7 fix: indicator ofor template task 2021-01-11 10:05:54 +05:30
Deepesh Garg
d3634f6dac feat: Loan Interest Report 2021-01-10 19:26:45 +05:30
Deepesh Garg
1b208e0695 fix: Add total loan interest amount field in loans 2021-01-10 12:29:55 +05:30
Ganga Manoj
2ffa4b9ce4 fix: Link timesheets with corresponding projects 2021-01-08 20:58:00 +05:30
Marica
b9d5ae9285 Merge branch 'develop' into qi-ux 2021-01-08 20:28:28 +05:30
Marica
c7aecb8148 Merge pull request #24329 from marination/qc-back-update-se
fix: Back Update from QC based on Batch No
2021-01-08 19:53:13 +05:30
Marica
63a91fc742 Merge branch 'develop' into qi-ux 2021-01-08 18:42:54 +05:30
Marica
ace08b1e48 Merge branch 'develop' into qc-back-update-se 2021-01-08 18:42:19 +05:30
marination
b7637f49cd fix: Remove QI link on cancel wherever same QI name exists 2021-01-08 18:35:49 +05:30
Anurag Mishra
05f6edfe0a Merge branch 'develop' into fixed-payment-entry-multi-currency-issue-develop 2021-01-08 17:27:22 +05:30
Rushabh Mehta
f8a6dde8d8 fix(minor): routing 2021-01-08 14:37:38 +05:30
Anurag Mishra
0b3e538cbc Merge pull request #24330 from ruchamahabal/fix-additional-salary-payroll
fix: Components formulated from additional salary not being fetched in Payroll Entry
2021-01-08 13:43:42 +05:30
Rohit Waghchaure
3777c6aa38 fix: payment entry multi-currency issue 2021-01-08 12:59:15 +05:30
Rucha Mahabal
a93151502c fix: Components formulated from additional salary not being fetched in Payroll Entry 2021-01-08 12:10:26 +05:30
marination
c4963bfdb2 fix: Back Update from QC based on Batch No 2021-01-08 09:56:04 +05:30
marination
ff6ee9d4e7 fix: Formula field description and Rearrange grid view
- Missing closing quote in Formula field description
- In grid view of child table in QI, show only input fields
2021-01-08 09:14:43 +05:30
Leela vadlamudi
df9144c198 feat: Voice Call Settings doctype added (#24126)
(cherry picked from commit 29778e2fba)
2021-01-07 17:20:40 +05:30
Marica
5cfdd0f503 Merge branch 'develop' into qi-ux 2021-01-07 15:47:55 +05:30
Marica
d91c7e2b38 Merge branch 'develop' into mr-se-warehouse-validation 2021-01-07 15:41:21 +05:30
marination
fab080c875 fix: Company Wise Valuation Rate for RM in BOM 2021-01-07 15:25:39 +05:30
pateljannat
fd5ebe9d4a fix: patch and columns 2021-01-07 15:16:15 +05:30
Jannat Patel
a586b0ba17 Merge branch 'develop' into project-template-and-tasks 2021-01-07 13:01:02 +05:30
pateljannat
3c55463b4b fix: validation for ldc against supplier and section code 2021-01-07 12:41:44 +05:30
Anurag Mishra
dbb994238e fix: editable employee grid
fix: editable employee grid
2021-01-07 12:10:57 +05:30
Anurag Mishra
77ba72c4ff Merge branch 'develop' into payroll_fixes2.0 2021-01-06 14:23:53 +05:30
Anurag Mishra
e7fa6f6a1c fix: edditable employee grid 2021-01-06 13:25:09 +05:30
Shivam Mishra
9fc44f1606 Merge pull request #24182 from scmmishra/fix-dont-set-primary 2021-01-06 12:52:44 +05:30
Jannat Patel
5a579089c2 fix: indentation 2021-01-06 11:21:13 +05:30
Deepesh Garg
5e15a5d230 Merge pull request #24186 from frappe/validate_regional_germany
fix: regional validation of sales invoice (germany)
2021-01-06 09:35:05 +05:30
Deepesh Garg
e72c51204b Merge pull request #24189 from timgates42/bugfix_typo_update
docs: fix simple typo, udpate -> update
2021-01-06 09:34:11 +05:30
Deepesh Garg
f2863f9d16 Merge pull request #24313 from deepeshgarg007/ytd_error_fix_v13
fix: Consider only submitted salary slips
2021-01-06 09:30:00 +05:30
Deepesh Garg
ad8be7c1fe fix: Consider only submitted salary slips 2021-01-06 09:29:03 +05:30
Rucha Mahabal
a7a609d4ff Merge pull request #24281 from ruchamahabal/allow-discharge
feat: Allow Discharge despite Unbilled Healthcare Services
2021-01-06 09:27:26 +05:30
Deepesh Garg
6f18d4c0f6 Merge pull request #24312 from deepeshgarg007/sanctioned_loan_unpledge
fix: Sanctioned loan security unpledge
2021-01-06 09:13:19 +05:30
Deepesh Garg
05fe7ac29c fix: fieldname 2021-01-06 09:10:28 +05:30
Deepesh Garg
dd768a07c5 fix: Sanctioned loan security unpledge 2021-01-05 23:55:00 +05:30
Wolfram Schmidt
5eef19723d Update item_tax_template_dashboard.py
added missing backlink. In Item Groups I can set Item Tax Temple in Table taxes.
2021-01-05 18:47:11 +01:00
Nabin Hait
f7b9b0687e fix: tax calculation on salary slip for the first month (#24272)
* fix: tax calculation on salary slip for the first month

* fix: net pay precision issue

* fix: net pay precision issue

Co-authored-by: Anurag Mishra <32095923+Anurag810@users.noreply.github.com>
2021-01-05 20:43:11 +05:30
Deepesh Garg
357c370fe2 Merge pull request #24304 from deepeshgarg007/ytd_mtd_cal_fix
fix: Do not consider current salary slip in sum
2021-01-05 17:43:18 +05:30
Deepesh Garg
b01b108dfa fix: do not consider current salary slip in sum 2021-01-05 17:34:16 +05:30
Saurabh
994fa48cd4 Merge branch 'develop' into fix-dont-set-primary 2021-01-05 16:32:56 +05:30
Saqib
80e0952ba7 refactor: fetch & validate address from erpnext rather than gst portal 2021-01-05 16:04:25 +05:30
Saqib
a56a5ccefa refactor: fetch & validate address from erpnext rather than gst portal (#24297) 2021-01-05 15:59:17 +05:30
Marica
ba6e50b15e Merge branch 'develop' into qi-ux 2021-01-05 15:15:10 +05:30
Anurag Mishra
b864b09d40 Merge branch 'develop' into gratuity 2021-01-05 14:47:38 +05:30
Anurag Mishra
112b3894cc Merge pull request #24296 from AfshanKhan/fix-add-comp-in-leave-ledger
fix: set company in leave allocation and leave ledger entry
2021-01-05 14:45:16 +05:30
Marica
eab1867235 Merge branch 'develop' into qi-ux 2021-01-05 14:23:05 +05:30
Anurag Mishra
239fe7336e fix: charts not displaying when tree_type changed
fix: charts not displaying when tree_type changed
2021-01-05 14:03:03 +05:30
Saqib
60460a6d23 fix(e-invoicing): minor calculation fixes (#24282) 2021-01-05 13:54:04 +05:30
Saqib
1f591ab02e fix(e-invoicing): minor calculation fixes (#24285) 2021-01-05 13:53:51 +05:30
Afshan
f79c4d3560 Merge branch 'develop' into fix-add-comp-in-leave-ledger 2021-01-05 13:27:15 +05:30
Jannat Patel
16a809483b fix: indentation 2021-01-05 12:28:45 +05:30
marination
b8aeb9ea88 fix: Indentation and missing semi-colon
- Fix incorrect indentation after merge conflict
- Sider
2021-01-05 12:16:25 +05:30
Rucha Mahabal
d643bb7c4b Merge branch 'develop' into allow-discharge 2021-01-05 12:07:26 +05:30
Jannat Patel
06a401ffbf fix: incoming rate attribute error (#24287)
Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
2021-01-05 11:54:34 +05:30
Marica
41ea77ce31 Merge branch 'develop' into putaway 2021-01-05 11:24:05 +05:30
Marica
95344f01e6 Merge branch 'develop' into qi-ux 2021-01-05 10:44:52 +05:30
Jannat Patel
7d0f35c4ab Merge branch 'develop' into partially-submit-drop-ship-items-issue 2021-01-05 10:42:30 +05:30
Rucha Mahabal
f97e668130 Merge branch 'develop' into allow-discharge 2021-01-05 10:38:16 +05:30
Deepesh Garg
bfa71c23ae Merge pull request #23965 from vorasmit/remarks-fix-develop
fix: add remarks to sales invoice
2021-01-05 09:54:53 +05:30
Nabin Hait
72fa368e8f Merge branch 'develop' into mr-se-warehouse-validation 2021-01-05 09:30:16 +05:30
Nabin Hait
5a8f141eda Merge branch 'develop' into fix-add-comp-in-leave-ledger 2021-01-05 09:29:44 +05:30
Marica
099162814c Merge branch 'develop' into qi-ux 2021-01-05 09:27:40 +05:30
Nabin Hait
517fd8b9e6 fix: Ignore customer and supplier while deleting company transactions (#24279)
* fix: Ignore customer and supplier while deleting company transactions

* fix: Test cases fixed based on Travis
2021-01-05 09:23:39 +05:30
Afshan
0da201c6a5 fix: set company in leave allocation and leave ledger entry 2021-01-04 19:04:05 +05:30
marination
0c883853b3 fix: Dont validate warehouse values between MR to Stock Entry
- Remove validation thta checks if warehouse in Stock Entry is the same as MR that it was pulled from
2021-01-04 18:48:50 +05:30
Anupam
27fd9e4d7d fix: added empty value in Quality Inspection Reading status 2021-01-04 18:18:00 +05:30
Deepesh Garg
797a742cb2 Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2021-01-04 14:24:00 +05:30
Deepesh Garg
a873ae0d9f fix: Check for custom dimensions 2021-01-04 14:23:31 +05:30
Jannat Patel
5f9a219429 Merge pull request #4 from frappe/develop
sync fork
2021-01-04 12:18:54 +05:30
Rucha Mahabal
7206e12c2f test: Allow Discharge despite Unbilled Services 2021-01-04 12:11:00 +05:30
Rucha Mahabal
03b25be9e9 feat: Allow Discharge despite Unbilled Healthcare Services 2021-01-04 11:16:59 +05:30
marination
7877d5a7c2 fix: Create QI Parameters (links) in test cases 2021-01-04 11:10:04 +05:30
Saurabh
adb8bbe958 Merge branch 'version-13-beta-pre-release' into version-13-beta 2021-01-02 19:59:56 +05:30
Saurabh
0feaab5261 bumped to version 13.0.0-beta.9 2021-01-02 20:19:56 +05:50
Afshan
a245f667d0 fix: pos error pop up (#24237) 2021-01-02 10:30:22 +05:30
Deepesh Garg
ffca52a348 Merge pull request #24254 from nextchamp-saqib/loan-patch-fix
fix: update old loan patch
2021-01-01 13:50:52 +05:30
vorasmit
3ef965f253 Update patches.txt 2021-01-01 10:55:20 +05:30
vorasmit
8c39ab68df Delete update_sales_invoice_remarks.py 2021-01-01 10:54:57 +05:30
rohitwaghchaure
2adf8d07b6 Merge pull request #24266 from rohitwaghchaure/incorrect-valudation-rate-fg
fix: incorrect valuation rate for finished good
2020-12-31 20:53:52 +05:30
Anurag Mishra
b901d4002a Merge pull request #24264 from AfshanKhan/fix-sal-struc-assign-payroll-acc
fix: setting correct account for sal struct assignment if not specified.
2020-12-31 18:26:46 +05:30
Anurag Mishra
f5e566a29c Merge pull request #24265 from AfshanKhan/allow-cancel-leave-policy
fix: allow leave policy assignment to be canceled.
2020-12-31 18:26:08 +05:30
Afshan
47bc42740b Merge branch 'develop' into fix-sal-struc-assign-payroll-acc 2020-12-31 17:41:44 +05:30
Afshan
4edcf813e7 Merge branch 'develop' into allow-cancel-leave-policy 2020-12-31 17:41:34 +05:30
Rohit Waghchaure
16bce49f18 fix: incorrect valuation rate for finished good 2020-12-31 17:39:52 +05:30
Anurag Mishra
d7ea2bd705 Merge pull request #24177 from AfshanKhan/fix-perm-empl-sal-slip
fix: error popup for submitted doc
2020-12-31 17:07:30 +05:30
Afshan
e69148c266 fix: allow leave policy assignment to be cancelled. 2020-12-31 16:45:00 +05:30
Afshan
8b60fe6125 fix: setting correct account for sal struct assignment if not specified. 2020-12-31 16:10:39 +05:30
Saqib
f8f015c961 fix: cannot submit e-invoice if legal name not found 2020-12-31 13:28:08 +05:30
Saqib
2b67d57480 fix: cannot submit e-invoice if legal name not found 2020-12-31 13:26:05 +05:30
Saqib Ansari
d5d571ab9d fix: update old loan patch 2020-12-31 12:55:35 +05:30
Saurabh
5049d83a0c Merge branch 'version-13-beta-pre-release' into version-13-beta 2020-12-31 11:52:59 +05:30
Saurabh
08b89d1ce0 bumped to version 13.0.0-beta.8 2020-12-31 12:12:58 +05:50
Saqib
fc7a11e2aa fix (e-invoicing): item & invoice value calculation (#24253) 2020-12-31 11:35:46 +05:30
Deepesh Garg
23ab5c5cc0 fix: Multiplle sider issues 2020-12-31 11:29:06 +05:30
Deepesh Garg
133ce286f9 Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2020-12-31 11:24:14 +05:30
Deepesh Garg
f57089532a Merge pull request #24252 from deepeshgarg007/partial_security_unpledge
fix: Partial loan security unpledging
2020-12-30 21:37:52 +05:30
Mohammad Hasnain Mohsin Rajan
11176852eb Merge branch 'develop' into bugfix_typo_update 2020-12-30 20:59:38 +05:30
Deepesh Garg
9716216632 fix: check for string types 2020-12-30 20:33:35 +05:30
Deepesh Garg
a60707873c fix: Partial loan security unpledging 2020-12-30 20:24:15 +05:30
Karthikeyan S
a25cb9a563 fix(GST E Invoice): update live URLs for adaequare GSP (#24251) 2020-12-30 19:41:00 +05:30
Karthikeyan S
aa44c754de fix(GST E Invoice): update live URLs for adaequare GSP (#24248) 2020-12-30 19:22:37 +05:30
Deepesh Garg
5891b48cf6 Merge pull request #24176 from GangaManoj/Year-to-Date
feat: Add year_to_date field (cumulative salary for a fiscal year)
2020-12-30 16:53:47 +05:30
rohitwaghchaure
bb0fd33ac5 Merge pull request #24169 from Anurag810/payroll-entry-fixes
fix: allow addition and removal of employee in payroll Entry
2020-12-30 16:50:02 +05:30
Shivam Mishra
45a56288bb feat: style adjustments to product page 2020-12-30 15:51:50 +05:30
Shivam Mishra
31a651365d feat: update item group website slider 2020-12-30 15:51:34 +05:30
Deepesh Garg
66dcaf3ab2 fix: Salary structure assignment in tests 2020-12-30 15:47:22 +05:30
Saqib
f946bbd032 fix: minor e-invoicing issues (#24239)
* fix: invoice value set to zero if rounded total disabled

* fix: unit rate & gross amount calculation

* fix: e-invoice-setup patch

* chore: no need to re-run the patch

* fix: item value & invoice value calculations
2020-12-30 14:43:42 +05:30
Deepesh Garg
97d055dfc3 fix: Test Case 2020-12-30 14:06:13 +05:30
Anurag Mishra
b7631af741 Merge branch 'develop' into payroll-entry-fixes 2020-12-30 13:22:13 +05:30
Deepesh Garg
8b7ebe5044 fix: Test Case cleanup and fixes 2020-12-30 12:45:46 +05:30
Deepesh Garg
20133bd1df fix: Remove comments 2020-12-29 22:19:12 +05:30
Deepesh Garg
7e4eacba8d Merge branch 'develop' of https://github.com/frappe/erpnext into Year-to-Date 2020-12-29 22:13:55 +05:30
Deepesh Garg
353f8f4d85 fix: Add test case for YTD 2020-12-29 22:13:40 +05:30
Anurag Mishra
15af7a4afc Merge pull request #24226 from AfshanKhan/asset-report
fix: asset depreciation ledger
2020-12-29 18:58:56 +05:30
Deepesh Garg
60b77f9865 Merge branch 'develop' of https://github.com/frappe/erpnext into Year-to-Date 2020-12-29 18:26:32 +05:30
rohitwaghchaure
b09ddc4672 Merge pull request #24233 from rohitwaghchaure/back-dates-allow-field-issue
fix: option name for the field 'Role Allowed to Create/Edit Back-dated Transactions'
2020-12-29 17:52:43 +05:30
Shivam Mishra
355943c3a0 feat: only show attributes that have an item 2020-12-29 17:46:18 +05:30
Shivam Mishra
2a6c4ec26e chore: remove dead code 2020-12-29 17:20:12 +05:30
Shivam Mishra
565b178721 feat: use ProductFiltersBuilder in all products page 2020-12-29 17:18:58 +05:30
Shivam Mishra
7055969ef3 feat: update item group template 2020-12-29 17:18:41 +05:30
Shivam Mishra
425bae8bf6 feat: use ProductQuery and ProductFiltersBuilder to build item group page 2020-12-29 17:18:22 +05:30
Shivam Mishra
298608ef40 feat: add product filters generator for item group and all products 2020-12-29 17:17:44 +05:30
Shivam Mishra
ed21350871 fix: page limit filter bug 2020-12-29 17:17:18 +05:30
Shivam Mishra
2dd26f7551 chore: cleanup product query 2020-12-29 17:17:03 +05:30
Shivam Mishra
b06ed4908f feat: add filter tables in item group 2020-12-29 17:16:29 +05:30
Shivam Mishra
134f6b1b6c chore: update style rules 2020-12-29 17:16:08 +05:30
Deepesh Garg
ff51540eed Merge branch 'accounting_dimension_filters' of github.com:deepeshgarg007/erpnext into accounting_dimension_filters 2020-12-29 17:02:07 +05:30
Deepesh Garg
e061004956 fix: Improve validation message 2020-12-29 17:00:39 +05:30
Raffael Meyer
a3462f6b0c Merge branch 'develop' into validate_regional_germany 2020-12-29 11:58:57 +01:00
Rohit Waghchaure
81285204dc fix: option name for the field 'Role Allowed to Create/Edit Back-dated Transactions' 2020-12-29 16:25:45 +05:30
Deepesh Garg
4a8c2c4cb5 Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2020-12-29 15:10:36 +05:30
rohitwaghchaure
25bc9851f0 Merge pull request #24220 from rohitwaghchaure/fixed-finished-product-qty
fix: finished good produced qty validation
2020-12-29 13:41:03 +05:30
Shivam Mishra
aa42886851 fix: template json 2020-12-29 13:28:35 +05:30
Anurag Mishra
dfe8f7601b Merge branch 'develop' into gratuity 2020-12-29 13:27:03 +05:30
Anurag Mishra
5af8d2b883 Merge branch 'develop' into payroll-entry-fixes 2020-12-29 13:09:42 +05:30
Afshan
91e3c07d77 fix: assest depreciation ledger 2020-12-28 19:42:46 +05:30
marination
a69e81a151 chore: Made 'Parameter' a link field in QI and QI Template
- Added doctype Quality Inspection Parameter
- Made 'Parameter' a link field in QI and QI Template
- Added patch to create Quality Inspection Parameter records for every parameter in the system
2020-12-28 18:07:22 +05:30
marination
29a03bd5a1 feat: Add 'Manual Inspection' checkbox
- fix merge conflict in js file
- Dont auto set status if manual inspection is checked
- Added 'Manual Inspection' checkbox in QI readings table
2020-12-28 16:59:13 +05:30
Deepesh Garg
b75f198648 Merge pull request #24223 from frappe/revert-24087-batch-wise-pricing
Revert "feat: Batch wise item selling pricing"
2020-12-28 15:42:42 +05:30
pateljannat
88471854d5 fix: sider 2020-12-28 15:40:23 +05:30
rohitwaghchaure
527b7e16e5 Revert "feat: Batch wise item selling pricing" 2020-12-28 15:29:30 +05:30
Marica
62f9cc6c5a Merge branch 'develop' into qi-ux 2020-12-28 15:09:15 +05:30
rohitwaghchaure
72e8ec5eee Merge pull request #24087 from deepeshgarg007/batch-wise-pricing
feat: Batch wise item selling pricing
2020-12-28 14:37:33 +05:30
Rohit Waghchaure
40d2c6a0cc fix: finished good produced qty validation 2020-12-28 14:08:45 +05:30
pateljannat
aa8ff81061 Merge branch 'project-template-and-tasks' of https://github.com/pateljannat/erpnext into project-template-and-tasks 2020-12-28 12:35:27 +05:30
pateljannat
71f203dbc5 fix: template task status, subject in project template task 2020-12-28 12:35:19 +05:30
Shivam Mishra
c640065a66 feat: cleanup json 2020-12-28 12:16:29 +05:30
Rucha Mahabal
e1b9707ec1 Merge pull request #24152 from ruchamahabal/fix-therapy-type-filter
fix: filter Therapy Types and Therapy Plan in Patient Appointment
2020-12-28 11:36:34 +05:30
Deepesh Garg
d3814b2676 Merge branch develop into batch-wise-pricing 2020-12-28 10:48:29 +05:30
Jannat Patel
c09100d738 Merge branch 'develop' into partially-submit-drop-ship-items-issue 2020-12-28 10:20:27 +05:30
Deepesh Garg
7c300859ed fix: Test Cases 2020-12-26 20:14:51 +05:30
Deepesh Garg
d4fc451c2a Merge pull request #24191 from nextchamp-saqib/accounting-entries-for-asset
fix: accounting entries of asset when submitting purchase receipt
2020-12-26 19:14:32 +05:30
Saqib
60a1d25196 fix: cancelling of asset value adjustement (#24193) 2020-12-26 13:01:49 +05:30
rohitwaghchaure
9f1e1f6c23 Merge pull request #24207 from rohitwaghchaure/fixed-serial-no-return-issue
fix: partial serial no return issue
2020-12-26 12:12:04 +05:30
Deepesh Garg
4f8da4c313 fix: Test Cases 2020-12-26 11:37:51 +05:30
Nabin Hait
0788df412c fix: Removed permissions from UAE VAT Settings 2020-12-25 20:54:01 +05:30
Deepesh Garg
5269f02919 Merge branch 'develop' of https://github.com/frappe/erpnext into lcv_multicurrency 2020-12-25 18:35:26 +05:30
Deepesh Garg
bfc17e487c fix: Commonify code for Stock Entry 2020-12-25 18:34:39 +05:30
Nabin Hait
b99c77b753 Reposting fixes (#24202)
* fix: finished item validation and rate

* fix: Check if stock and account balance in sync after reposting

* fix: validate stock accounts in journal entry

* fix: validate expense against budget
2020-12-25 18:12:35 +05:30
hasnain2808@gmail.com
46d5f4c7f1 refactor(analytics report): linting 2020-12-25 16:34:43 +05:30
rohitwaghchaure
fa0a075e95 Merge pull request #24196 from scmmishra/fix-file-url-employee
fix: use file_url to save file and not file name
2020-12-25 16:22:15 +05:30
rohitwaghchaure
ebcd4c454e Merge pull request #24209 from rohitwaghchaure/added-shipment-link-in-delivery-note
fix: added shipment link in delivery note dashboard
2020-12-25 16:07:35 +05:30
Rohit Waghchaure
dab1ab990d fix: partial serial no return issue 2020-12-25 15:25:16 +05:30
rohitwaghchaure
de10d7dcf2 Update shipment.py 2020-12-25 15:15:55 +05:30
Rohit Waghchaure
5bcc6c6b15 fix: added shipment link in delivery note dashboard 2020-12-25 15:02:53 +05:30
Saqib
6d74f5b59b feat: GST E Invoicing (#23455)
* feat: init e-invoice settings

* feat: read public key file

* feat: rsa encryption with public key

* feat: save token and sek from auth request

* chore: handle error response

* feat: AES decryption of SEK with appkey

* feat: decrypt json data with SEK

* feat: make e invoice from erpnext sales invoice

* feat: generate IRN

* feat: decode signed json and QR code

* chore: validations

* feat: cancel IRN

* feat: complete e-invoice schema

* chore: move e-invoice settings to regional

* chore: split einvoice settings and operations

* chore: rename schema to template & js cleanup

* feat: make IRN field on regional setup

* feat: Generate & Cancel IRN from Sales Invoice

* chore: minor fixes

* fix: item discount

* chore: show irn cancelled check after cancellation

* fix: hide cancel irn dialog on error

* fix: public key is required on validate

* fix: cannot find attached key file

* fix: validation if e invoicing is disabled

* fix: do not show generate irn for invalid supply type

* fix: update irn_cancelled after cancelling irn

* chore: show irn field for proper gst_category

* feat: e-way bill details in e-invoice

* fix: save e-way bill no on irn generation

* chore: no copy on e invoice custom fields

* feat: cancel e-way bill before cancelling IRN

* feat: manual download / upload json

* chore: group e-invoicing actions

* fix: fn name

* chore: save signed invoice and qrcode after uplaoding irn

* fix: fetch token if not valid

* chore: move einvoicing stuff to seperate folder

* feat: QRCode Image and E-Invoice Print Format

* fix: bug

* fix: invalid syntax

* chore: code cleanup

* chore: clean up e invoice actions

* fix: download & upload e-invoice

* fix: print format

* fix: validations

* fix: add permissions on regional setup

* feat: add patch

* fix: validate document name

* fix: return date

* fix: credit note einvoice

* fix: validations

* fix: error logging

* fix: e_invoice module not found

* fix: add missing package

* fix: rename e_invoice_utils.py

* fix: einvoice field validation

* fix: patch

* fix: invoice totals calculation

* fix: other charges calculation

* chore: improve document name validation message

* fix: qr code image string

* feat: initialize GSP connector

* chore: remove unwanted fields

* fix: qr code generation

* feat: fetch and cache GSTIN details

* feat: generate & cancel IRN

* feat: cancel eway bill

* chore: remove unwanted fuctions

* chore: clean up einvoice actions

* fix: attach qrcode on irn generation

* fix: generate & cancel IRN

* fix: show/hide eway bill fields

* fix: valiations

* feat: generate eway bill from IRN

* chore: remove unwanted imports

* chore: error logging

* feat: header & footer in GST E Invoice

* chore: remove test pincode

* fix: invalid syntax

* feat: cess non advolem on einvoice item

* chore: remove fetch token from e invocie settings

* fix: imports

* fix: error handling

* feat: update timeline on einvoice actions

* fix: qrcode image size

* fix: exclude intra company transactions

* fix: eway bill test

* fix: ewaybill mandatory conditions

* chore: add tests

* fix: returning condition

* feat: log e-invocing requests

* chore: add ack date and ack no field for print formats

* fix: sider issues

* feat: show e-invoice preview before IRN generation

* fix: use as_list for error message

* fix: minor ux issues

* fix: dialog is undefined

* fix: error handling

* feat: add docs link to e invoice settings

* feat: multiple gstins for e invoicing

* fix: uncomment test condition

* fix: remove test pincode

* fix: cannot cancel irn without submitting sales invoice

* chore: code cleanup

* fix: sider issues

* fix: e invoice request log permissions

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-12-25 10:26:43 +05:30
rohitwaghchaure
4e9361f74b Merge pull request #24204 from rohitwaghchaure/pricing-rule-not-working-margin
fix: multiple pricing rule with margin type as Percentage is not working
2020-12-25 09:33:39 +05:30
Rohit Waghchaure
aea62da544 fix: multiple pricing rule with margin type not working 2020-12-24 22:44:31 +05:30
Shivam Mishra
c54aca3f44 chore: cleanup comments 2020-12-24 18:02:50 +05:30
Shivam Mishra
a90b6a73dd fix: syntax error 2020-12-24 18:02:07 +05:30
Shivam Mishra
419c889a9a feat: add docstrings 2020-12-24 17:58:18 +05:30
Shivam Mishra
293f483cb4 feat: add ProductQuery engine 2020-12-24 17:54:07 +05:30
rohitwaghchaure
b9352b729a Merge pull request #24063 from rohitwaghchaure/fixed-job-card-cacncel-flow-develop
fix: don't cancel job card if manufacturing entry has made
2020-12-24 17:46:45 +05:30
rohitwaghchaure
630258f493 Merge pull request #24164 from rohitwaghchaure/do-not-manufacture-same-serial-no-two-develop
fix: do not manufacture same serial no multiple times
2020-12-24 17:46:26 +05:30
Rucha Mahabal
d013d94e8d Merge branch 'develop' into fix-therapy-type-filter 2020-12-24 17:44:25 +05:30
Rohit Waghchaure
304100db3b fix: don't cancel job card if manufacturing entry has made 2020-12-24 16:36:37 +05:30
Rohit Waghchaure
ed20819432 fix: travis 2020-12-24 16:24:10 +05:30
Shivam Mishra
d0437cfb59 feat: clear document cache on validate 2020-12-24 14:15:09 +05:30
Shivam Mishra
bba2726333 fix: minor styling fixes 2020-12-24 14:14:17 +05:30
Anurag Mishra
527a156512 feat: validated employees whose salary has been already precessed 2020-12-24 13:59:12 +05:30
Jannat Patel
29dd7e5fc4 Merge branch 'develop' into partially-submit-drop-ship-items-issue 2020-12-24 13:44:42 +05:30
prssanna
eb0e596d43 feat: store home page and product page 2020-12-24 11:40:33 +05:30
prssanna
7a38f41350 Merge branch 'shopping-cart' of https://github.com/frappe/erpnext into shopping-cart 2020-12-24 11:39:41 +05:30
prssanna
79c3d6f71d Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into shopping-cart 2020-12-24 11:36:59 +05:30
Rucha Mahabal
d2f91e8c11 fix: Do not cancel reference document on Quality Inspection cancellation (#24197) 2020-12-24 11:03:36 +05:30
Rushabh Mehta
ab1c2b7631 fix(minor): routing 2020-12-23 23:26:58 +05:30
Anurag Mishra
3278d02cd2 fix: sider 2020-12-23 18:07:54 +05:30
Anurag Mishra
1446749b63 fix: changes requested 2020-12-23 18:07:54 +05:30
Nabin Hait
eb065d6d40 fix: fixed gl entries 2020-12-23 18:07:54 +05:30
Nabin Hait
4da7a15ac0 fix: Fixed typo 2020-12-23 18:07:54 +05:30
Anurag Mishra
b71611dd3d feat: Added Form dashboard 2020-12-23 18:07:54 +05:30
Anurag Mishra
4cc333996c fix: test 2020-12-23 18:07:54 +05:30
Anurag Mishra
ba6ff6e227 fix: conflict 2020-12-23 18:07:53 +05:30
Anurag Mishra
708065cb85 fix: test cases 2020-12-23 18:07:53 +05:30
Anurag Mishra
af9f172be8 fix: requested changes and sider 2020-12-23 18:07:53 +05:30
Anurag Mishra
66b697cd05 feat: fix test for Gratuity 2020-12-23 18:07:53 +05:30
Anurag Mishra
550e60a69d feat: fix test for Gratuity 2020-12-23 18:07:53 +05:30
Anurag Mishra
b88af3a3f7 feat: Accrural Entry for Gratuity beafore Payment 2020-12-23 18:07:53 +05:30
Anurag Mishra
78fdd5d9b4 fix: update status on salary Slip submission 2020-12-23 18:07:53 +05:30
Anurag Mishra
46e1c09b45 style: Broken into smaller function 2020-12-23 18:07:53 +05:30
Anurag Mishra
4d6c3c9449 Fix: Changes Requested, Sider, codacy, Transalation 2020-12-23 18:07:53 +05:30
Anurag Mishra
493eea19e8 feat: added link from desk page and some minor fixes 2020-12-23 18:07:53 +05:30
Anurag Mishra
25c356894d test: gratuity 2020-12-23 18:07:53 +05:30
Anurag Mishra
f63df91186 patch: to create standard Gratuity Rule for india and UAE 2020-12-23 18:07:53 +05:30
Anurag Mishra
e1464a7bf0 feat: Indian Standard Gratuity Rule 2020-12-23 18:07:06 +05:30
Anurag Mishra
34a7250a2d fix: Some enhancements and better validation 2020-12-23 18:07:06 +05:30
Anurag Mishra
0761301c2e feat: Added all 3 standard slab for UAE 2020-12-23 18:07:06 +05:30
Anurag Mishra
47f3a3a5bd feat: validation for if no slab found 2020-12-23 18:07:06 +05:30
Anurag Mishra
6f1538026a feat: added minimum year for gratuity and condition utilisation 2020-12-23 18:07:06 +05:30
Anurag Mishra
30299c6f49 feat: validating and ordeing the rule slabr 2020-12-23 18:07:06 +05:30
Anurag Mishra
dedc0015c0 feat(HR): Working day calulation based on attendance or Leave 2020-12-23 18:07:06 +05:30
Anurag Mishra
49b326fc08 feat(HR): Gratuity Payment 2020-12-23 18:07:05 +05:30
Anurag Mishra
fc2cb3a85e Feat: gratuity 2020-12-23 18:07:05 +05:30
Deepesh Garg
aa7ab211be Merge pull request #24171 from deepeshgarg007/breadcrum_schema
fix: Add breadcrumbs to item group page
2020-12-23 16:52:48 +05:30
Shivam Mishra
1ab4f09ee9 fix: use file_url to save file and not file name 2020-12-23 15:18:41 +05:30
Anurag Mishra
d884216c6f fix: leave policy dashboard fix
fix: leave policy dashboard fix
2020-12-23 13:19:12 +05:30
Anurag Mishra
d556847fca fix: allow addition and removal of employee in payroll Entry 2020-12-23 12:59:48 +05:30
Nabin Hait
0411a43c6e fix: set finished good item rate based on qty 2020-12-23 12:14:41 +05:30
Saqib Ansari
09c6842199 fix: accounting entries of asset when submitting purchase receipt 2020-12-23 11:29:26 +05:30
Tim Gates
1fb412e3f6 docs: fix simple typo, udpate -> update
There is a small typo in erpnext/patches/v4_0/map_charge_to_taxes_and_charges.py.

Should read `update` rather than `udpate`.
2020-12-23 11:39:37 +11:00
barredterra
df8ea19406 fix: whitespace 2020-12-22 17:34:31 +01:00
barredterra
2acd8cbc02 fix: sider 2020-12-22 17:34:22 +01:00
Jannat Patel
b07914d185 Merge branch 'develop' into project-template-and-tasks 2020-12-22 20:47:30 +05:30
pateljannat
8dec1c142f fix: removed unused imports 2020-12-22 19:55:31 +05:30
Deepesh Garg
e5e2ad646a fix: Test Cases 2020-12-22 19:53:07 +05:30
pateljannat
6cf018c762 fix: holiday update in tests 2020-12-22 19:40:41 +05:30
pateljannat
4ebee5014e feat: aholiday check before setting start and end date in task 2020-12-22 18:14:46 +05:30
barredterra
511be6466d Revert "fix: fail silently"
This reverts commit 6900a79421.
2020-12-22 11:43:33 +01:00
barredterra
a69021018a test: add test for accounts controller 2020-12-22 11:38:09 +01:00
barredterra
5adbe49ca6 refactor: translation syntax 2020-12-22 11:37:43 +01:00
barredterra
6900a79421 fix: fail silently 2020-12-22 11:37:13 +01:00
Deepesh Garg
e1320c7e47 Merge branch 'develop' of https://github.com/frappe/erpnext into lcv_multicurrency 2020-12-22 13:32:59 +05:30
Jannat Patel
8224b1c1e5 Merge pull request #3 from frappe/version-13-beta-pre-release
Version 13 beta pre release
2020-12-22 13:11:02 +05:30
Deepesh Garg
468f67a4de fix: Add parent for all-products page 2020-12-22 12:44:09 +05:30
Mohammad Hasnain Mohsin Rajan
61b92b312a Merge branch 'develop' into fix-analytics-reports 2020-12-22 12:41:43 +05:30
Shivam Mishra
46bc7ca69f feat: use call icon 2020-12-22 12:32:36 +05:30
Shivam Mishra
64fa0e8729 fix: wrap assignees in a list 2020-12-22 12:32:36 +05:30
barredterra
1725fbc59a feat: separate equity tree in CoA SKR04 2020-12-22 12:32:36 +05:30
Rucha Mahabal
7574a14d57 fix: Remove patch for setting next date in Subscription (#24158) 2020-12-22 12:32:36 +05:30
Rucha Mahabal
5f53b140e2 fix: Auto Repeat Import (#24157) 2020-12-22 12:32:36 +05:30
Rucha Mahabal
7d848b1785 refactor: Auto Repeat next schedule date function params (#23959)
* refactor: Auto Repeat next schedule date function params

* refactor: Auto Repeat next schedule date function params
2020-12-22 12:32:36 +05:30
prssanna
ec959bc3b9 fix: override field_map for job card gantt 2020-12-22 12:32:36 +05:30
pateljannat
3a26f26671 fix: get_doc to avoid modified error 2020-12-22 11:56:59 +05:30
Shivam Mishra
59a2029c87 Merge branch 'shopping-cart' of https://github.com/frappe/erpnext into shopping-cart 2020-12-22 11:28:33 +05:30
Shivam Mishra
7d3876d51a feat: shopping cart search 2020-12-22 11:17:14 +05:30
Shivam Mishra
721251f09f feat: add product category cards 2020-12-22 11:17:14 +05:30
Shivam Mishra
b4946c31b4 refactor: use h1 for slidetitle 2020-12-22 11:17:14 +05:30
Shivam Mishra
e40926b4cc fix: don't use primary action for create 2020-12-22 11:17:14 +05:30
Shivam Mishra
09c8aaa87a feat: add slider template 2020-12-22 11:17:14 +05:30
Shivam Mishra
fa102e4713 feat: add templates for online store 2020-12-22 11:17:14 +05:30
Ganga Manoj
090783804b fix: Improve month_to_date computation 2020-12-21 23:52:05 +05:30
Ganga Manoj
c36cab81f2 fix: Update year_to_date and month_to_date field labels to show company currency 2020-12-21 23:46:02 +05:30
pateljannat
9466e42e70 fix: change request modifications 2020-12-21 20:52:20 +05:30
Nabin Hait
a77b8c9fcc Repost item valuation (#24031)
* feat: Reposting logic for future finished/transferred item

* feat: added fields to identify needs to recalculate rate while reposting

* refactor: Set rate for outgoing and finished items

* refactor: Arranged fields in Stock Entry item table and added fields to identify finished and scrap item

* refactor: Arranged fields in Stock Entry item table and added fields to identify finished and scrap item

* refactor: Get outgoing rate for purchase return

* refactor: Get incoming rate for sales return

* test: Added tests for reposting valuation of transferred/finished/returned items

* feat: added incoming rate field in DN, SI and Packed Item table

* feat: get incoming rate for returned item

* fix: no error while getting valuation rate in stock entry

* fix: update stock ledger for DN and SI

* feat: update item valuation rate in PR and PI based on supplied items cost

* feat: SLE reposting logic for sales return and subcontracted item with test cases

* feat: update qty in future sle

* feat: repost future sle and gle via Repost Item Valuation

* fix: Skip unwanted function calling while reposting

* fix: repost sle for specific item and warehouse

* test: Modified tests for backdated stock reco

* fix: ignore cancelled sle in few methods

* feat: role allowed to do backdated entry

* feat: Show reposting status on stock valuation related reports

* fix: minor fixes

* fix: fixed sider issues

* fix: serial no fix related to immutable ledger

* fix: Test cases fixes related to perpetual inventory

* fix: Test cases fixed

* fix: Fixed reposting on cancel and test cases

* feat: Restart reposting item valuation

* refactor: Code cleanup using small functions and test case fixes

* fix: minor fixes

* fix: Raise on error while reposting item valuation

* fix: minor fix

* fix: Tests fixed

* fix: skip some validation ig gle made from reposting

* fix: test fixes

* fix: debugging stock and account validation

* fix: debugging stock and account validation

* fix: debugging travis for stock and account sync validation

* fix: debugging travis

* fix: debugging travis

* fix: debugging travis
2020-12-21 14:45:50 +05:30
marination
eae31f02cc fix: Sider (missing semi-colons) 2020-12-21 13:58:44 +05:30
Shivam Mishra
0e222173ea fix: don't set primary action if workflow is set 2020-12-21 13:44:03 +05:30
marination
68f91c9640 chore: Added tests for new ux
- Test for value based inspection
- tweaks in test for formula based inspection
- tweaks in create_quality_inspection as status in child row is auto set now
2020-12-21 12:24:45 +05:30
marination
0c4f97368d chore: UX improvement
- Removed 'single reading' checkbox, unnecessary
- Removed 'Mean' field and added computed mean to formula data
- Changed 'Value Based' to 'Non-Numeric'
- Re-arranged fields
2020-12-21 11:44:48 +05:30
Ganga Manoj
ddd9fe49fc feat: Add month_to_date field 2020-12-18 23:58:05 +05:30
Ganga Manoj
59fbf702da feat: Compute month_to_date 2020-12-18 23:52:11 +05:30
Ganga Manoj
1b1df6b6bc feat: Add month_to_date field 2020-12-18 23:51:05 +05:30
marination
d6277cdc7f feat: Value Based and Numeric Quality Inspection
- Acceptance Formula is optional
- Choose between Value based and Numeric QI
- If numeric, select single or multiple readings
- Added Min, Max and Mean Values for numeric inspection to avoid formula usage
- Deprecated code cleanup in js file
2020-12-18 21:37:19 +05:30
Ganga Manoj
89a02d7d3f feat: Changed Fiscal Year to Payroll Period 2020-12-18 15:31:45 +05:30
Rushabh Mehta
2cd41bca06 fix(routes): desk to app 2020-12-18 13:17:58 +05:30
Afshan
a81519f557 fix: error popup for submitted doc 2020-12-18 11:16:01 +05:30
Rushabh Mehta
6afa83f2c7 fix(requirements): update to latest pandas 2020-12-18 11:05:55 +05:30
Ganga Manoj
9f1e018e4f feat: Compute year_to_date 2020-12-18 01:35:27 +05:30
Ganga Manoj
04f48a011d feat: Add year_to_date field 2020-12-18 01:31:00 +05:30
pateljannat
b8e656512e fix: test cleanup 2020-12-17 20:22:06 +05:30
Deepesh Garg
d4ee05c5fb Merge pull request #24172 from deepeshgarg007/ttax_category_typo
fix: Typo in tax category doctype query
2020-12-17 18:48:03 +05:30
Deepesh Garg
b074334dcf fix: Typo in tax category doctype query 2020-12-17 18:46:59 +05:30
pateljannat
79b71462cb fix: patch 2020-12-17 18:21:34 +05:30
Deepesh Garg
5a06908bbc fix: Add breadccrumbs to item group page 2020-12-17 17:38:53 +05:30
pateljannat
09f0e9111d fix: patch 2020-12-17 17:20:21 +05:30
Anurag Mishra
611b42733b fix: leave policy dashboard fix and roles 2020-12-17 16:34:15 +05:30
Anurag Mishra
5e8e0037d6 Merge branch 'develop' into do-not-manufacture-same-serial-no-two-develop 2020-12-17 16:01:42 +05:30
Anurag Mishra
7e641f457c Merge pull request #24166 from scmmishra/appointment-fix
fix: wrap assignees in a list
2020-12-17 16:00:48 +05:30
pateljannat
2dbb1d6bc7 fix: indentation 2020-12-17 15:49:52 +05:30
Shivam Mishra
1872e2c1ac fix: wrap assignees in a list 2020-12-17 14:29:52 +05:30
Deepesh Garg
5432ee3364 Merge pull request #24095 from frappe/skr04_equity_dev
feat: separate equity tree in CoA SKR04
2020-12-17 12:37:28 +05:30
Deepesh Garg
51892efd60 fix: Translation issues 2020-12-17 12:35:22 +05:30
Deepesh Garg
f48296ddf0 Merge branch 'develop' of https://github.com/frappe/erpnext into lcv_multicurrency 2020-12-17 12:20:16 +05:30
Deepesh Garg
6f99c0850c fix: Linting Issues 2020-12-17 12:19:58 +05:30
pateljannat
2f4c88b228 Merge branch 'project-template-and-tasks' of https://github.com/pateljannat/erpnext into project-template-and-tasks 2020-12-17 11:56:06 +05:30
pateljannat
f2bff8e220 fix: patch relaod doctype 2020-12-17 11:54:59 +05:30
Deepesh Garg
d6cd02d29d fix: Add tests 2020-12-17 09:21:24 +05:30
Deepesh Garg
5a2030c2f2 fix: Add server side methods and other fixes 2020-12-17 09:21:11 +05:30
Rucha Mahabal
f1854f9196 Merge branch 'develop' into fix-therapy-type-filter 2020-12-17 08:46:39 +05:30
Rohit Waghchaure
c9f63accdd fix: do not manufacture same serial no multiple times 2020-12-17 00:18:17 +05:30
Suraj Shetty
70cfc4df15 fix: Remove dashboard page from home 2020-12-16 20:55:47 +05:30
Jannat Patel
28098d6f93 Merge branch 'develop' into project-template-and-tasks 2020-12-16 20:09:27 +05:30
Rucha Mahabal
21168eab7f fix: Remove patch for setting next date in Subscription (#24158) 2020-12-16 19:39:34 +05:30
pateljannat
2528d5ee15 fix: tests 2020-12-16 18:29:49 +05:30
Rucha Mahabal
23d6afe43a fix: Auto Repeat Import (#24157) 2020-12-16 18:21:08 +05:30
Prssanna Desai
df2067003e Merge pull request #24154 from prssanna/job-card-gantt-v13 2020-12-16 17:01:43 +05:30
Prssanna Desai
421bfee874 Merge branch 'develop' into job-card-gantt-v13 2020-12-16 16:59:50 +05:30
prssanna
ff59f18012 fix: override field_map for job card gantt 2020-12-16 16:56:30 +05:30
pateljannat
d44f45c57b fix: sider issues 2020-12-16 16:28:09 +05:30
hasnain2808@gmail.com
2da0035a0f Merge branch 'develop' into fix-analytics-reports 2020-12-16 16:14:23 +05:30
Rucha Mahabal
f2a431d866 fix: filter Therapy Types and Therapy Plan in Patient Appointment 2020-12-16 16:09:58 +05:30
Rucha Mahabal
5a8a52b9c6 fix: Therapy Type and Therapy Plan field visibility in Patient Appointment 2020-12-16 15:54:06 +05:30
Deepesh Garg
924f99bead fix: Help message 2020-12-16 15:42:50 +05:30
Deepesh Garg
4638f604ed Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2020-12-16 14:59:30 +05:30
Rucha Mahabal
b184d43e75 refactor: Auto Repeat next schedule date function params (#23959)
* refactor: Auto Repeat next schedule date function params

* refactor: Auto Repeat next schedule date function params
2020-12-16 14:51:42 +05:30
hasnain2808@gmail.com
9962ba86d0 fix: charts not displaying when tree_type changed 2020-12-16 14:41:04 +05:30
Your Name
3ebe511eb9 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-16 08:19:47 +00:00
pateljannat
87b477a311 feat: patch for project template tasks 2020-12-16 13:37:21 +05:30
Shivam Mishra
c634e24b60 Merge pull request #24147 from scmmishra/desk-enhancements 2020-12-16 13:27:04 +05:30
Shivam Mishra
fd044b032f Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into desk-enhancements 2020-12-16 13:21:10 +05:30
Deepesh Garg
bc462fa140 Merge pull request #24146 from deepeshgarg007/tax_template_update_customer
fix: Tax template update on customer address change
2020-12-16 13:02:00 +05:30
Deepesh Garg
96a5e4effa fix: Tax template update on customer address change 2020-12-16 13:00:55 +05:30
Rucha Mahabal
02ebc9a11e Merge branch 'develop' into patient-history-enhancements 2020-12-16 12:51:45 +05:30
Rushabh Mehta
34fc528500 fix(minor): debounce taxes call 2020-12-16 09:44:11 +05:30
Leela vadlamudi
29778e2fba feat: Voice Call Settings doctype added (#24126) 2020-12-15 21:23:17 +05:30
Mohammad Hasnain Mohsin Rajan
c553453825 fix: user is not a field (#24129) 2020-12-15 16:29:10 +05:30
Shivam Mishra
23f638a47c Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-15 13:21:35 +05:30
Saqib Ansari
d050816e17 fix: overflow of customer selector 2020-12-15 12:02:26 +05:30
pateljannat
a6fef7ae6b feat: parent-child relation tasks 2020-12-15 11:50:18 +05:30
pateljannat
caf67e608f fix: tests 2020-12-15 10:00:31 +05:30
pateljannat
23f0debf88 fix: tests 2020-12-15 10:00:21 +05:30
Raffael Meyer
f2206c27e7 fix: allow other github links in same PR (#23995) 2020-12-15 09:35:16 +05:30
Rucha Mahabal
85213fa8cb fix(Asset): set current asset value before calculating difference amount (#24119) 2020-12-15 09:32:02 +05:30
Afshan
89d14fdf68 fix: minor ui changes (#24125)
* fix: minor ui changes

* fix: slider
2020-12-15 09:31:30 +05:30
Afshan
58e8e06ab7 fix: retention filters (#24123)
* fix: retention filters

* fix: slider
2020-12-15 09:17:17 +05:30
Afshan
e64718b2ae fix: selecting salary component (#24121) 2020-12-15 09:16:27 +05:30
Deepesh Garg
46f3c65b00 feat: Multi currency in landed cost voucher 2020-12-14 23:09:19 +05:30
pateljannat
f9751f1f95 feat: project template having dependent tasks 2020-12-14 16:20:02 +05:30
Marica
406af27b9e Merge branch 'develop' into putaway 2020-12-14 13:07:50 +05:30
marination
c47d38dc18 chore: Stock Entry Tests and fixes
- Maintain item-warehouse wise rules for Stock Entry Material Transfer
- Test cases for Stock Entry with more use cases
- Sider fixes
2020-12-14 12:12:49 +05:30
Suraj Shetty
f2511c84b5 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-14 09:05:48 +05:30
Suraj Shetty
ada5facdf5 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-11 12:57:49 +05:30
Suraj Shetty
dc13d4b0fc Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-11 12:57:04 +05:30
Jannat Patel
79fe7758d4 Merge branch 'develop' into partially-submit-drop-ship-items-issue 2020-12-11 11:57:09 +05:30
pateljannat
06961a261e fix: conflicts 2020-12-11 11:46:43 +05:30
pateljannat
fa72671929 fix: partial order for drop ship 2020-12-11 11:16:54 +05:30
Suraj Shetty
c9209237da fix: Progress bar style 2020-12-10 22:45:27 +05:30
pateljannat
6574404536 Merge branch 'project-template-and-tasks' of https://github.com/pateljannat/erpnext into project-template-and-tasks 2020-12-10 20:55:40 +05:30
pateljannat
e15ef1e19f fix: corrected tests 2020-12-10 20:55:25 +05:30
Raffael Meyer
7f387452ca Merge branch 'develop' into skr04_equity_dev 2020-12-10 10:51:55 +01:00
Rushabh Mehta
39154e5296 fix(minor): add debounce to calls 2020-12-10 12:37:16 +05:30
barredterra
52d37edf98 feat: separate equity tree in CoA SKR04 2020-12-09 17:57:29 +01:00
Deepesh Garg
249595a2d8 fix: Sider Issues 2020-12-09 18:13:23 +05:30
Jannat Patel
ad705d04a7 Merge branch 'develop' into project-template-and-tasks 2020-12-09 18:12:25 +05:30
pateljannat
f936e8a334 fix: sider issues fixed 2020-12-09 17:09:22 +05:30
marination
a5d8d32775 chore: Test and fixes
- Tests as per new design flow
- Fixed duplicate data bug in Warehouse Capacity Summary
- Set Amount currently on applying rule in client side
- Apply rules on server side before validate
2020-12-09 16:27:18 +05:30
Deepesh Garg
c41fb7556b fix: Add test case for batch pricing 2020-12-09 15:55:39 +05:30
pateljannat
811629a961 feat: tasks in project template and tests 2020-12-09 15:52:05 +05:30
Deepesh Garg
bc0a2859e4 fix: Rate for items with no batch 2020-12-09 12:40:09 +05:30
Deepesh Garg
91e1136d2c feat: Batch wise item pricing 2020-12-08 22:53:03 +05:30
marination
0f3cfc502b feat: Trigger rule application from client side
- Table is reset and overwritten with applied rules on checkbox trigger
- Sider fixes
2020-12-08 19:44:29 +05:30
Rushabh Mehta
fec8dba16c fix(merge): merge develop 2020-12-08 16:23:09 +05:30
Marica
0b68243979 Merge branch 'develop' into putaway 2020-12-08 11:44:00 +05:30
Jannat Patel
18cf2f31d1 Merge pull request #1 from frappe/develop
Sync fork
2020-12-08 11:36:40 +05:30
pateljannat
c82b52855c fix: template filter for tasks 2020-12-08 11:07:59 +05:30
marination
fac4035f23 feat: Apply Putaway Rules within transaction itself
- Added checkbox 'Apply Putaway Rule' in PR and SE
- Added link to rule in child tables
- Rule is applied on Save
- Validation for over receipt
- Apply Rule on Stock Entry as well for Material Transfer and Receipt
2020-12-07 21:35:49 +05:30
pateljannat
71b1a0ca7d fix: cancelling both test po created 2020-12-07 19:09:29 +05:30
pateljannat
32e77d73cf fix: added supplier to second item in test 2020-12-07 17:39:37 +05:30
pateljannat
89624ad622 fix: sider issue fixed 2020-12-07 16:50:03 +05:30
pateljannat
5597e386b4 fix: added test for drop ship partial order 2020-12-07 15:53:45 +05:30
pateljannat
c32ac223ed feat: adding task field in project template 2020-12-07 14:53:15 +05:30
pateljannat
7fef622b13 fix: drop ship partial order fixed 2020-12-04 19:18:36 +05:30
Shivam Mishra
be9550955f Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-04 14:18:17 +05:30
Deepesh Garg
7b2d518059 fix: Dimension filters in accounting reports 2020-12-04 11:28:26 +05:30
Glen Whitney
dea6a90a1f feat(Accounting Dimension): other apps may have accounting dimension doctypes
Prior to this change, there was simply a single hardcoded list of doctypes
  with accounting dimensions in ERPNext. However, when extending the
  capabilities of ERPNext using an add-on app rather than by modifying
  ERPNext itself, it may well be necessary to create new doctypes in other
  apps that will have accounting dimensions as well.

  So, this PR moves the list of doctypes with accounting dimensions into
  hooks.py so it can be accumulated from multiple apps. It also allows the
  list of doctypes in make_dimension_in_accounting_doctypes be specifiable,
  for more convenient use in the after_install hooks of other apps.
2020-12-03 22:27:44 +00:00
Saqib Ansari
f4d645f87a perf: async pos app start 2020-12-03 19:30:12 +05:30
Saqib Ansari
a6a37b7c81 fix: scroll elements 2020-12-03 19:24:07 +05:30
Shivam Mishra
2fa3cac814 feat: update workspace folders 2020-12-03 15:48:57 +05:30
Shivam Mishra
2895645f86 feat: rename desk page to workspace 2020-12-03 15:39:53 +05:30
Deepesh Garg
12b45b3f2a Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2020-12-02 12:46:23 +05:30
Deepesh Garg
59820004b8 fix: Exception naming 2020-12-02 12:34:59 +05:30
Deepesh Garg
ab5053ef9c fix: Accounting dimension import in PCV 2020-12-02 12:34:40 +05:30
Rucha Mahabal
288853d8f0 Merge branch 'develop' into patient-history-enhancements 2020-12-01 13:44:16 +05:30
Shivam Mishra
9aaca25edb feat: update desk page json 2020-12-01 13:39:54 +05:30
Shivam Mishra
de68f74b4c chore: update all desk pages 2020-12-01 12:51:38 +05:30
Shivam Mishra
0b774e8ea5 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-12-01 11:30:53 +05:30
Saqib Ansari
188e0ecbcb fix: submit order summary center alignment 2020-11-30 17:53:57 +05:30
Rucha Mahabal
f6756838ba fix: patch 2020-11-30 17:51:56 +05:30
Saqib Ansari
02d1491e39 fix: order summary qty alignment 2020-11-30 17:42:51 +05:30
Rucha Mahabal
b5b8c5474a refactor: move call to fetch doctype fields to server-side 2020-11-30 16:09:15 +05:30
Rucha Mahabal
0d43ea5ebb refactor: show Patient History feed as per configured date instead of creation 2020-11-30 15:00:42 +05:30
Shivam Mishra
27e7c264f2 fix: link type 2020-11-30 14:58:16 +05:30
Shivam Mishra
3e6cdea51f feat: delete config python files 2020-11-30 14:58:16 +05:30
Shivam Mishra
61388d412b feat: update desk pages 2020-11-30 14:58:00 +05:30
rohitwaghchaure
9707b4789e fix: stock ageing report not working (#23923) 2020-11-30 14:58:00 +05:30
Afshan
7e2d8ca916 fix: Handle the "no leave_allocation found" case (#23922)
* fix: Handle the "no leave_allocation found" case

* fix: format of error msg
2020-11-30 14:58:00 +05:30
Marica
1466ed4579 fix: Don't copy terms and discount from SO to PO (#23903)
* fix: Dont copy terms, discount and required by from SO to PO

* fix: Let delivery date and required by date get mapped
2020-11-30 14:58:00 +05:30
Suraj Shetty
c8b5f982ac fix: Typo (Enchashment > Encashment) (#23919) 2020-11-30 14:58:00 +05:30
Afshan
8c3b2d0a0d fix: change query to frappe.get_all 2020-11-30 14:58:00 +05:30
Afshan
beb1811523 fix: payroll attendance error 2020-11-30 14:58:00 +05:30
marination
d0ee615c2c chore: Pricing Rule with Item Price Test 2020-11-30 14:58:00 +05:30
marination
8e2ce641c3 fix: Dont overrule Item Price via Pricing Rule Rate if 0 2020-11-30 14:58:00 +05:30
Anurag Mishra
58a3fea1b7 fix: Error handling in Upload Attendance (#23907) 2020-11-30 14:58:00 +05:30
Raffael Meyer
896e4b1722 fix: improve UX of DATEV report (#23892)
* feat(DATEV Settings): button to show report

* feat(desk): add DATEV to Reports under Accounting

* fix(report DATEV): last calendar month as default

* fix: let user create DATEV Settings

(Instead of showing an error message.)
2020-11-30 14:58:00 +05:30
Kenneth Sequeira
39102e68df fix: make contract template editable (#23891) 2020-11-30 14:58:00 +05:30
rohitwaghchaure
10c168e257 fix: default cost center in item master not set in stock entry (#23877)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2020-11-30 14:58:00 +05:30
Raffael Meyer
59be7ff144 feat: make account number length configurable (#23845) 2020-11-30 14:58:00 +05:30
Raffael Meyer
1ea12079da fix: fiscal year can be shorter than 12 months (#23838)
* fix: replace unnecessary SQL query

* feat: checkbox "Is Short Year"

Also, set checkbox and dates only once.

* fix: toggle no longer necessary

Date fields use set_only_once.

* feat: short years can be less than 12 months

* fix: if short year, don't add 12 months to start date

* test: short year

* fix: move short fiscal year to test records
2020-11-30 14:58:00 +05:30
Marica
ecce3bca2f chore: PO cleanup (#23774)
* chore: Subcontracting section and items section enhancement

- Set target warehouse moved to Items section
- Added subcontraction label to supply RM section

* chore: PO & PO Item Form Cleanup

* chore: PO Get Items from cleanup

* fix: Taxes and Charges field visibility

* chore: Cleanup

* fix: Translation styling
2020-11-30 14:58:00 +05:30
Rohit Waghchaure
d6a2b390dc fix: not able to save bom 2020-11-30 14:58:00 +05:30
Deepesh Garg
7b16c55c9a feat: Sync old shopify orders (#23841)
* feat: Sync old shopify orders

* fix: Old orders syncing by date

* fix: Remove unnecessary code

* fix: Remove unintentional changes

Co-authored-by: Saurabh <saurabh@erpnext.com>
2020-11-30 14:58:00 +05:30
Anurag Mishra
a81e872cdb fix: added wrong absent days calculation in salary slip 2020-11-30 14:57:27 +05:30
Rucha Mahabal
ed3fc20731 fix: sider issues 2020-11-30 14:56:24 +05:30
Rucha Mahabal
7a69a3367c Merge branch 'develop' into patient-history-enhancements 2020-11-30 14:16:46 +05:30
Rucha Mahabal
4ee293d2f4 fix: handle non-configured fields 2020-11-30 14:12:48 +05:30
Rucha Mahabal
5e3c51bf7d refactor: format value using standard formatters 2020-11-30 13:35:00 +05:30
Rucha Mahabal
c538a4a31d refactor: remove medical record creation methods from individual doctypes 2020-11-30 13:22:34 +05:30
Rucha Mahabal
c0fcc807d3 feat: hooks for updating and deleting medical records 2020-11-30 13:22:01 +05:30
Rucha Mahabal
4097e89f8b feat: Standard doctype config for Patient History 2020-11-30 12:48:39 +05:30
Rucha Mahabal
f3df5c9f3c feat: patch to setup standard doctype config in Patient History Settings 2020-11-30 12:16:28 +05:30
Rucha Mahabal
06e7cc2c35 fix: Handle table field rendering in Patient Medical record 2020-11-30 12:01:48 +05:30
Rucha Mahabal
4d6d115a4d feat: date range filter for Patient History 2020-11-29 23:16:12 +05:30
Rucha Mahabal
4af3d4e4bb fix: feed not visible when filter is reset 2020-11-29 22:43:56 +05:30
Rucha Mahabal
fc1e352adf feat: Doctype filter for Patient History 2020-11-29 22:38:14 +05:30
Rucha Mahabal
cbdbb9e65d chore: code clean-up 2020-11-28 23:58:00 +05:30
Rucha Mahabal
a75f79762f feat: Link for individual documents in Patient History 2020-11-28 23:09:07 +05:30
Rucha Mahabal
c91e03c891 feat: Create Patient Medical Record on configured doctype submission 2020-11-28 20:24:06 +05:30
Rucha Mahabal
f2932d7208 feat: set date field in Settings for Patient Medical Record 2020-11-28 19:19:58 +05:30
Rucha Mahabal
2c114053ad feat: Patient History Settings 2020-11-27 15:05:28 +05:30
Shivam Mishra
94ebbc550e Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-26 13:41:52 +05:30
marination
1087d97c03 feat: Warehouse Capacity Summary
- Added Page Warehouse Capacity Summary
- Added Page to Desk and Putaway List View
- Reused Item Dashboard/Stock Balance page render code
- Added naming series to Putaway Rule
2020-11-26 10:45:44 +05:30
Deepesh Garg
1a4390de44 Merge branch 'develop' of https://github.com/frappe/erpnext into accounting_dimension_filters 2020-11-25 14:51:11 +05:30
Deepesh Garg
6b9dda5f3e fix: Move filter setup to doctype controllers 2020-11-25 14:49:10 +05:30
Deepesh Garg
92b3449789 fix: Label changes 2020-11-25 14:01:57 +05:30
Deepesh Garg
4e991fe668 fix: Define specific exceptions and fix tests 2020-11-25 13:46:07 +05:30
Deepesh Garg
df065f7044 fix: form layout and naming fixes 2020-11-25 13:44:52 +05:30
Deepesh Garg
6c17b84cae fix: Replace raw query with ORM 2020-11-25 13:42:16 +05:30
marination
2ed80656aa chore: Code Cleanup
- Validate capacity < stock level only on new rule
- Mention stock uom while validating capacity in new rule
- Separate function to format and display unassigned items
- Format ORM args
2020-11-24 21:07:56 +05:30
marination
2fbaa5dc58 Merge branch 'putaway' of https://github.com/marination/erpnext into putaway 2020-11-24 17:39:19 +05:30
marination
68a49efc80 chore: Added Putaway Rule to Desk Page and added Priority to List View 2020-11-24 17:38:34 +05:30
Marica
e762bc67eb Merge branch 'develop' into putaway 2020-11-24 17:28:34 +05:30
Saqib Ansari
ac164c66ed perf: get recent transaction only when component is visible 2020-11-24 16:09:11 +05:30
Saqib Ansari
7f1d7894c2 fix: cannot find erpnext.payments 2020-11-24 16:08:38 +05:30
marination
ccbd432b56 chore: Added Tests
- Fixed Sider Issues
- Added perms to Putaway Rule
- Added Unit Tests to check warehouse assignment
2020-11-24 12:47:13 +05:30
marination
0cec1477f2 chore: Format unassigned Items dialog and add freeze message 2020-11-23 19:19:35 +05:30
Saqib Ansari
c1afc95e3c chore: remove unused code 2020-11-23 18:40:06 +05:30
Saqib Ansari
96feae608d refactor: build point of sale min js 2020-11-23 18:39:56 +05:30
Saqib Ansari
937dc467a0 fix: no transactions placeholder 2020-11-23 18:34:08 +05:30
Saqib Ansari
eeee7e9427 fix: post submission invoice recipt screen 2020-11-23 18:34:03 +05:30
Saqib Ansari
69ef766a93 feat: number pad in payment screen 2020-11-23 18:33:55 +05:30
Saqib Ansari
fa0ef218dd fix: customer details spacing 2020-11-23 18:33:45 +05:30
Saqib Ansari
f719380a0d fix: discount and taxes spacing 2020-11-23 18:33:40 +05:30
Saqib Ansari
fada84cc47 fix: remove console and asset loading 2020-11-23 18:33:34 +05:30
Saqib Ansari
d0d6fc2e17 fix: cannot open past order summary 2020-11-23 18:33:29 +05:30
Saqib Ansari
b0b6aa9124 refactor: past order list and summary with new ui 2020-11-23 18:33:22 +05:30
Saqib Ansari
7202e9f658 refactor: pos payment with new ui 2020-11-23 18:33:05 +05:30
Saqib Ansari
fc3315a6d7 feat: pos item details with new ui 2020-11-23 18:32:58 +05:30
Saqib Ansari
cc208839cf feat: pos cart with new ui 2020-11-23 18:32:49 +05:30
Saqib Ansari
210baafad4 feat: pos customer selector new ui 2020-11-23 18:32:07 +05:30
Saqib Ansari
0fb2e02b56 feat: pos item selector new ui 2020-11-23 18:32:00 +05:30
marination
90598ea19c chore: Multi UOM support for Putaway
- Added UOM & conversion factor field in Putaway Rule
- Items are split and assigned as per UOM
- Handled Whole UOMs too
2020-11-23 17:35:13 +05:30
marination
9596276b95 fix: Linter and Sider 2020-11-23 10:32:17 +05:30
marination
c7991f8561 feat: Putaway Rule 2020-11-20 11:53:20 +05:30
Smit Vora
8aeb340dc8 fix: add remarks to sales invoice 2020-11-19 19:18:48 +05:30
marination
86e03325c3 Merge branch 'develop' of https://github.com/frappe/erpnext into putaway 2020-11-19 14:07:48 +05:30
Nabin Hait
93bb7b0000 Merge branch 'develop' into membership-enhancements-2 2020-11-19 13:05:17 +05:30
Nabin Hait
2afc0bd87b Merge branch 'develop' into naming-series-proj 2020-11-19 08:24:32 +05:30
Shivam Mishra
1a74dd4237 feat: add product category cards 2020-11-18 17:56:37 +05:30
Shivam Mishra
ca3809831c refactor: use h1 for slidetitle 2020-11-18 17:39:17 +05:30
Shivam Mishra
3bec3cfef1 fix: don't use primary action for create 2020-11-18 17:10:02 +05:30
Shivam Mishra
8cf3bdd044 feat: add slider template 2020-11-18 17:09:45 +05:30
Rushabh Mehta
542bc01718 fix(minor): update routes 2020-11-18 15:00:34 +05:30
Shivam Mishra
f9e4f6b57a feat: add templates for online store 2020-11-17 16:38:09 +05:30
Deepesh Garg
350972ece4 fix: Account filters 2020-11-17 13:51:58 +05:30
Deepesh Garg
8b4d92d4fc fix: Disable filters after test 2020-11-17 13:19:29 +05:30
Shivam Mishra
e0b2e31f86 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-17 12:28:14 +05:30
Deepesh Garg
6456c3dc24 fix: Linting and test cases 2020-11-17 11:10:00 +05:30
Deepesh Garg
4bd52b4842 fix: Add test case 2020-11-16 23:01:36 +05:30
Deepesh Garg
d82c0f3bea fix: Add disable and mandatory check for accounting dimension filters 2020-11-16 20:32:16 +05:30
Marica
06f522cb27 Merge branch 'develop' into naming-series-proj 2020-11-16 13:32:24 +05:30
Deepesh Garg
0c6319194e fix: GL Entry validation for dimensions 2020-11-16 13:20:19 +05:30
marination
d51c953c22 chore: Fix Tests, use project name instead of project_name field 2020-11-16 12:48:40 +05:30
Deepesh Garg
9e9ea96582 fix: linting 2020-11-16 12:03:47 +05:30
Deepesh Garg
1f9b03345d fix: Remove project filter 2020-11-16 09:55:35 +05:30
Deepesh Garg
f916bc048f fix: Remove cost center query from doctypes 2020-11-15 22:44:39 +05:30
Deepesh Garg
6e5748e2a3 fix: dimension filter query 2020-11-15 22:43:48 +05:30
Deepesh Garg
96e874bfda fix: dimension filter query 2020-11-15 22:43:01 +05:30
Deepesh Garg
8b6370bb45 feat: Add accounting dimension filter doctype 2020-11-15 22:41:36 +05:30
Marica
510b389838 Merge branch 'develop' into naming-series-proj 2020-11-13 13:37:19 +05:30
Shivam Mishra
dc1e240642 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-12 11:33:47 +05:30
Shivam Mishra
bed717b442 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-12 11:32:59 +05:30
marination
c1b0e65f9f feat: Putaway 2020-11-12 09:54:44 +05:30
prssanna
922432616f Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-10 17:24:15 +05:30
prssanna
e3b71b9b24 fix: compact item print style 2020-11-10 17:23:24 +05:30
Shivam Mishra
723e220a34 chore: remove commented code 2020-11-09 14:07:40 +05:30
Shivam Mishra
12fafa3e7a chore: remove validation for old member field 2020-11-09 14:07:39 +05:30
Shivam Mishra
7e1cdf9b97 feat(breaking): update get_last_membership to fetch correct details 2020-11-09 14:07:39 +05:30
Shivam Mishra
c04321e645 test(membership): add test for invoicing and validation 2020-11-09 14:06:53 +05:30
Shivam Mishra
286ec04197 test(membership): setup test defaults 2020-11-09 14:06:23 +05:30
Shivam Mishra
e0f4dd0643 fix: fieldtype for auto_create_for_web_forms 2020-11-09 14:06:23 +05:30
Shivam Mishra
9d9fa74e6b refactor(member): drop email column
* remove email column
* update controller methods
* add patch to add value from email to email_id
2020-11-09 14:06:23 +05:30
Shivam Mishra
d75ff1a93e feat: generate invoice on payment authorized 2020-11-09 14:06:23 +05:30
Shivam Mishra
e927224fbc feat: update membership setting doctype
* rename enable_auto_invoicing to enable_invoicing
* add option to make_payment entry
2020-11-09 14:05:39 +05:30
Suraj Shetty
1183980e0e Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-09 13:14:11 +05:30
Suraj Shetty
c2d97e9d9c Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-11-06 10:26:19 +05:30
Shivam Mishra
2d1f8341f9 feat: update onboarding for accounts 2020-10-30 15:55:19 +05:30
Shivam Mishra
18ef17f3ba feat: add tour for sales taxes template 2020-10-30 15:55:19 +05:30
prssanna
71e5b60df1 refactor: refactor contextual print setting implementation 2020-10-29 14:19:34 +05:30
Faris Ansari
bc6a2b2f9c wip 2020-10-28 13:54:11 +05:30
rohitwaghchaure
58016b07e0 Merge branch 'develop' into opportunity-status 2020-10-24 19:09:38 +05:30
Nabin Hait
f30c389e4d Merge branch 'develop' into naming-series-proj 2020-10-22 21:46:13 +05:30
prssanna
13c6e2f320 feat: contextual setting for print uom after quantity 2020-10-22 17:19:00 +05:30
prssanna
d7b704c90f Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-10-22 15:39:47 +05:30
prssanna
b57b3c9f6c feat: hook to fetch additional print settings in print view 2020-10-22 15:37:47 +05:30
Shivam Mishra
5e00ed926c feat: update icons 2020-10-21 12:30:22 +05:30
Shivam Mishra
9d468a8daf Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-10-21 11:38:31 +05:30
Shivam Mishra
2c2e7297ae feat: update accounts onboarding 2020-10-19 14:44:02 +05:30
Shivam Mishra
8261df29c4 feat: update splash logo 2020-10-19 13:52:35 +05:30
Shivam Mishra
5418818683 feat: add tour for account settings 2020-10-16 14:24:22 +05:30
prssanna
5ee7bca185 Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-10-16 11:32:10 +05:30
prssanna
12d4be7f3f feat: icons in leaderboard 2020-10-16 11:31:47 +05:30
Shivam Mishra
cb8457b9ae feat: add description to Accounts onboarding 2020-10-15 13:53:12 +05:30
Anupam
d8a002cd8e Merge branch 'opportunity-status' of https://github.com/anupamvs/erpnext into opportunity-status 2020-10-14 11:48:42 +05:30
Shivam Mishra
55f52e8135 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-10-13 20:09:22 +05:30
Anupam Kumar
67a7279d1f Merge branch 'develop' into opportunity-status 2020-10-13 18:11:23 +05:30
Anupam
73d944da21 fix: review changes 2020-10-13 18:11:05 +05:30
Shivam Mishra
6a506b63bf fix: variables path 2020-10-05 12:41:30 +05:30
Shivam Mishra
1323a9a990 feat: set app name for ERPNext in install and patch 2020-09-30 16:33:14 +05:30
Shivam Mishra
9a4d603403 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-09-25 11:44:37 +05:30
Suraj Shetty
67095d239f fix: Custom dashboard sections 2020-09-10 17:15:52 +05:30
Shivam Mishra
2b405b9bb3 feat: add icon to healthcare desk page 2020-09-10 15:37:54 +05:30
Anupam Kumar
924618e1e3 Merge branch 'develop' into opportunity-status 2020-09-06 21:24:32 +05:30
gavin
c09b92d673 Merge branch 'develop' into naming-series-proj 2020-09-03 15:23:06 +05:30
Michelle Alva
d8c38249e0 fix: Change naming series
Co-authored-by: Himanshu <himanshuwarekar@yahoo.com>
2020-09-03 09:04:21 +05:30
marination
099d6718c9 fix: Dont Copy or Print Naming Series 2020-09-02 11:54:55 +05:30
marination
f51cf9f23e fix: Crop Cycle Test 2020-09-02 11:43:36 +05:30
Suraj Shetty
9cc87f8b9a Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui 2020-09-01 13:55:49 +05:30
Suraj Shetty
df00c5c846 fix: Update erpnext logo 2020-09-01 13:55:34 +05:30
Marica
a222081316 Merge branch 'develop' into naming-series-proj 2020-09-01 12:35:11 +05:30
michellealva
f46c1c5164 fix: Change property of field 2020-08-30 21:37:45 +05:30
michellealva
288ced24db feat: Add Naming Series for Project DocType 2020-08-30 19:33:27 +05:30
prssanna
fa400820bb fix: move leaderboard style to frappe 2020-08-28 15:02:04 +05:30
Shivam Mishra
a6cb27cb8e chore: trigger build 2020-08-28 13:10:46 +05:30
Suraj Shetty
f39bb116cc Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-08-27 19:27:49 +05:30
prssanna
a324e9bd12 fix: remove text-muted and small class fromtree items 2020-08-27 19:26:14 +05:30
Suraj Shetty
a49af09705 fix: Primary button icon 2020-08-27 18:57:43 +05:30
Suraj Shetty
b6ebcd7559 refactor: Replace darkgray indicator with gray indicator 2020-08-27 18:57:18 +05:30
prssanna
744169833c fix: replace indicator color darkgrey with darkgray 2020-08-27 17:06:10 +05:30
Suraj Shetty
99dfb9556d refactor: Simplify code 2020-08-23 16:56:46 +05:30
Suraj Shetty
314551ceb2 refactor: Use right css clas name 2020-08-23 16:36:56 +05:30
Suraj Shetty
a43e760703 fix: Item dashboard style 2020-08-23 16:36:28 +05:30
Suraj Shetty
ecc7eedd10 fix: Update erpnext logo 2020-08-23 16:35:39 +05:30
Suraj Shetty
6f9f40992c Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-08-23 16:33:50 +05:30
Anupam K
9d82953242 fix: Opportunity Status fix 2020-08-06 23:58:56 +05:30
Shivam Mishra
de80553d89 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-08-03 12:34:05 +05:30
Shivam Mishra
11111cd9a9 Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui 2020-07-30 21:29:02 +05:30
Shivam Mishra
b6fb13258f feat: move financial statement switcher to page toolbar 2020-07-23 17:02:32 +05:30
Shivam Mishra
f59d927f73 feat: update summary items 2020-07-23 17:02:32 +05:30
Shivam Mishra
840550e25f refactor: change sequence for profit and loss statement 2020-07-23 17:02:32 +05:30
Shivam Mishra
be5e129259 feat: update icons for erpnext settings shortcuts 2020-07-23 17:02:32 +05:30
Shivam Mishra
1358efe896 feat: update icons 2020-07-23 17:02:32 +05:30
973 changed files with 39071 additions and 23417 deletions

View File

@@ -92,6 +92,7 @@
"cur_page": true,
"cur_list": true,
"cur_tree": true,
"cur_pos": true,
"msg_dialog": true,
"is_null": true,
"in_list": true,
@@ -149,6 +150,7 @@
"it": true,
"context": true,
"before": true,
"beforeEach": true
"beforeEach": true,
"onScan": true
}
}

32
.flake8 Normal file
View File

@@ -0,0 +1,32 @@
[flake8]
ignore =
E121,
E126,
E127,
E128,
E203,
E225,
E226,
E231,
E241,
E251,
E261,
E265,
E302,
E303,
E305,
E402,
E501,
E741,
W291,
W292,
W293,
W391,
W503,
W504,
F403,
B007,
B950,
W191,
max-line-length = 200

View File

@@ -21,8 +21,8 @@ def docs_link_exists(body):
if word.startswith('http') and uri_validator(word):
parsed_url = urlparse(word)
if parsed_url.netloc == "github.com":
_, org, repo, _type, ref = parsed_url.path.split('/')
if org == "frappe" and repo in docs_repos:
parts = parsed_url.path.split('/')
if len(parts) == 5 and parts[1] == "frappe" and parts[2] in docs_repos:
return True

View File

@@ -2,7 +2,7 @@ import re
import sys
errors_encounter = 0
pattern = re.compile(r"_\(([\"']{,3})(?P<message>((?!\1).)*)\1(\s*,\s*context\s*=\s*([\"'])(?P<py_context>((?!\5).)*)\5)*(\s*,\s*(.)*?\s*(,\s*([\"'])(?P<js_context>((?!\11).)*)\11)*)*\)")
pattern = re.compile(r"_\(([\"']{,3})(?P<message>((?!\1).)*)\1(\s*,\s*context\s*=\s*([\"'])(?P<py_context>((?!\5).)*)\5)*(\s*,(\s*?.*?\n*?)*(,\s*([\"'])(?P<js_context>((?!\11).)*)\11)*)*\)")
words_pattern = re.compile(r"_{1,2}\([\"'`]{1,3}.*?[a-zA-Z]")
start_pattern = re.compile(r"_{1,2}\([f\"'`]{1,3}")
f_string_pattern = re.compile(r"_\(f[\"']")
@@ -28,7 +28,7 @@ for _file in files_to_scan:
has_f_string = f_string_pattern.search(line)
if has_f_string:
errors_encounter += 1
print(f'\nF-strings are not supported for translations at line number {line_number + 1}\n{line.strip()[:100]}')
print(f'\nF-strings are not supported for translations at line number {line_number}\n{line.strip()[:100]}')
continue
else:
continue
@@ -36,7 +36,7 @@ for _file in files_to_scan:
match = pattern.search(line)
error_found = False
if not match and line.endswith(',\n'):
if not match and line.endswith((',\n', '[\n')):
# concat remaining text to validate multiline pattern
line = "".join(file_lines[line_number - 1:])
line = line[start_matches.start() + 1:]
@@ -44,11 +44,11 @@ for _file in files_to_scan:
if not match:
error_found = True
print(f'\nTranslation syntax error at line number {line_number + 1}\n{line.strip()[:100]}')
print(f'\nTranslation syntax error at line number {line_number}\n{line.strip()[:100]}')
if not error_found and not words_pattern.search(line):
error_found = True
print(f'\nTranslation is useless because it has no words at line number {line_number + 1}\n{line.strip()[:100]}')
print(f'\nTranslation is useless because it has no words at line number {line_number}\n{line.strip()[:100]}')
if error_found:
errors_encounter += 1

9
erpnext/.stylelintrc Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": ["stylelint-config-recommended"],
"plugins": ["stylelint-scss"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"no-descending-specificity": null
}
}

View File

@@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '13.0.0-beta.7'
__version__ = '13.0.1'
def get_default_company(user=None):
'''Get default company for user'''
@@ -109,7 +109,7 @@ def get_region(company=None):
'''
if company or frappe.flags.company:
return frappe.get_cached_value('Company',
company or frappe.flags.company, 'country')
company or frappe.flags.company, 'country')
elif frappe.flags.country:
return frappe.flags.country
else:
@@ -132,16 +132,10 @@ def allow_regional(fn):
return caller
def get_last_membership():
def get_last_membership(member):
'''Returns last membership if exists'''
last_membership = frappe.get_all('Membership', 'name,to_date,membership_type',
dict(member=frappe.session.user, paid=1), order_by='to_date desc', limit=1)
dict(member=member, paid=1), order_by='to_date desc', limit=1)
return last_membership and last_membership[0]
def is_member():
'''Returns true if the user is still a member'''
last_membership = get_last_membership()
if last_membership and getdate(last_membership.to_date) > getdate():
return True
return False
if last_membership:
return last_membership[0]

View File

@@ -1,161 +0,0 @@
{
"cards": [
{
"hidden": 0,
"label": "Accounting Masters",
"links": "[\n {\n \"description\": \"Company (not Customer or Supplier) master.\",\n \"label\": \"Company\",\n \"name\": \"Company\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tree of financial accounts.\",\n \"icon\": \"fa fa-sitemap\",\n \"label\": \"Chart of Accounts\",\n \"name\": \"Account\",\n \"onboard\": 1,\n \"route\": \"#Tree/Account\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Accounts Settings\",\n \"name\": \"Accounts Settings\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Financial / accounting year.\",\n \"label\": \"Fiscal Year\",\n \"name\": \"Fiscal Year\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Accounting Dimension\",\n \"name\": \"Accounting Dimension\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Finance Book\",\n \"name\": \"Finance Book\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Accounting Period\",\n \"name\": \"Accounting Period\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Payment Terms based on conditions\",\n \"label\": \"Payment Term\",\n \"name\": \"Payment Term\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "General Ledger",
"links": "[\n {\n \"description\": \"Accounting journal entries.\",\n \"label\": \"Journal Entry\",\n \"name\": \"Journal Entry\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Make journal entries from a template.\",\n \"label\": \"Journal Entry Template\",\n \"name\": \"Journal Entry Template\",\n \"type\": \"doctype\"\n },\n \n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"General Ledger\",\n \"name\": \"General Ledger\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Customer Ledger Summary\",\n \"name\": \"Customer Ledger Summary\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Supplier Ledger Summary\",\n \"name\": \"Supplier Ledger Summary\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Accounts Receivable",
"links": "[\n {\n \"description\": \"Bills raised to Customers.\",\n \"label\": \"Sales Invoice\",\n \"name\": \"Sales Invoice\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Customer database.\",\n \"label\": \"Customer\",\n \"name\": \"Customer\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Bank/Cash transactions against party or for internal transfer\",\n \"label\": \"Payment Entry\",\n \"name\": \"Payment Entry\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Payment Request\",\n \"label\": \"Payment Request\",\n \"name\": \"Payment Request\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Accounts Receivable\",\n \"name\": \"Accounts Receivable\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Accounts Receivable Summary\",\n \"name\": \"Accounts Receivable Summary\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Sales Register\",\n \"name\": \"Sales Register\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Item-wise Sales Register\",\n \"name\": \"Item-wise Sales Register\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Order\",\n \"is_query_report\": true,\n \"label\": \"Sales Order Analysis\",\n \"name\": \"Sales Order Analysis\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Delivered Items To Be Billed\",\n \"name\": \"Delivered Items To Be Billed\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Accounts Payable",
"links": "[\n {\n \"description\": \"Bills raised by Suppliers.\",\n \"label\": \"Purchase Invoice\",\n \"name\": \"Purchase Invoice\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Supplier database.\",\n \"label\": \"Supplier\",\n \"name\": \"Supplier\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Bank/Cash transactions against party or for internal transfer\",\n \"label\": \"Payment Entry\",\n \"name\": \"Payment Entry\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Accounts Payable\",\n \"name\": \"Accounts Payable\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Accounts Payable Summary\",\n \"name\": \"Accounts Payable Summary\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Purchase Register\",\n \"name\": \"Purchase Register\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Item-wise Purchase Register\",\n \"name\": \"Item-wise Purchase Register\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Order\"\n ],\n \"doctype\": \"Purchase Order\",\n \"is_query_report\": true,\n \"label\": \"Purchase Order Analysis\",\n \"name\": \"Purchase Order Analysis\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Received Items To Be Billed\",\n \"name\": \"Received Items To Be Billed\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Reports",
"links": "[\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Trial Balance for Party\",\n \"name\": \"Trial Balance for Party\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Journal Entry\"\n ],\n \"doctype\": \"Journal Entry\",\n \"is_query_report\": true,\n \"label\": \"Payment Period Based On Invoice Date\",\n \"name\": \"Payment Period Based On Invoice Date\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Sales Partners Commission\",\n \"name\": \"Sales Partners Commission\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Customer\"\n ],\n \"doctype\": \"Customer\",\n \"is_query_report\": true,\n \"label\": \"Customer Credit Balance\",\n \"name\": \"Customer Credit Balance\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Sales Payment Summary\",\n \"name\": \"Sales Payment Summary\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Address\"\n ],\n \"doctype\": \"Address\",\n \"is_query_report\": true,\n \"label\": \"Address And Contacts\",\n \"name\": \"Address And Contacts\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"DATEV Export\",\n \"name\": \"DATEV\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Financial Statements",
"links": "[\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Trial Balance\",\n \"name\": \"Trial Balance\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Profit and Loss Statement\",\n \"name\": \"Profit and Loss Statement\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Balance Sheet\",\n \"name\": \"Balance Sheet\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Cash Flow\",\n \"name\": \"Cash Flow\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Consolidated Financial Statement\",\n \"name\": \"Consolidated Financial Statement\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Multi Currency",
"links": "[\n {\n \"description\": \"Enable / disable currencies.\",\n \"label\": \"Currency\",\n \"name\": \"Currency\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Currency exchange rate master.\",\n \"label\": \"Currency Exchange\",\n \"name\": \"Currency Exchange\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Exchange Rate Revaluation master.\",\n \"label\": \"Exchange Rate Revaluation\",\n \"name\": \"Exchange Rate Revaluation\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Settings",
"links": "[\n {\n \"description\": \"Setup Gateway accounts.\",\n \"label\": \"Payment Gateway Account\",\n \"name\": \"Payment Gateway Account\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Template of terms or contract.\",\n \"label\": \"Terms and Conditions Template\",\n \"name\": \"Terms and Conditions\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"e.g. Bank, Cash, Credit Card\",\n \"label\": \"Mode of Payment\",\n \"name\": \"Mode of Payment\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Bank Statement",
"links": "[\n {\n \"label\": \"Bank\",\n \"name\": \"Bank\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Bank Account\",\n \"name\": \"Bank Account\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Bank Clearance\",\n \"name\": \"Bank Clearance\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Bank Reconciliation\",\n \"name\": \"bank-reconciliation\",\n \"type\": \"page\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Bank Reconciliation Statement\",\n \"name\": \"Bank Reconciliation Statement\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Subscription Management",
"links": "[\n {\n \"label\": \"Subscription Plan\",\n \"name\": \"Subscription Plan\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Subscription\",\n \"name\": \"Subscription\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Subscription Settings\",\n \"name\": \"Subscription Settings\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Goods and Services Tax (GST India)",
"links": "[\n {\n \"label\": \"GST Settings\",\n \"name\": \"GST Settings\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"GST HSN Code\",\n \"name\": \"GST HSN Code\",\n \"type\": \"doctype\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GSTR-1\",\n \"name\": \"GSTR-1\",\n \"type\": \"report\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GSTR-2\",\n \"name\": \"GSTR-2\",\n \"type\": \"report\"\n },\n {\n \"label\": \"GSTR 3B Report\",\n \"name\": \"GSTR 3B Report\",\n \"type\": \"doctype\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GST Sales Register\",\n \"name\": \"GST Sales Register\",\n \"type\": \"report\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GST Purchase Register\",\n \"name\": \"GST Purchase Register\",\n \"type\": \"report\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GST Itemised Sales Register\",\n \"name\": \"GST Itemised Sales Register\",\n \"type\": \"report\"\n },\n {\n \"is_query_report\": true,\n \"label\": \"GST Itemised Purchase Register\",\n \"name\": \"GST Itemised Purchase Register\",\n \"type\": \"report\"\n },\n {\n \"country\": \"India\",\n \"description\": \"C-Form records\",\n \"label\": \"C-Form\",\n \"name\": \"C-Form\",\n \"type\": \"doctype\"\n },\n {\n \"country\": \"India\",\n \"label\": \"Lower Deduction Certificate\",\n \"name\": \"Lower Deduction Certificate\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Share Management",
"links": "[\n {\n \"description\": \"List of available Shareholders with folio numbers\",\n \"label\": \"Shareholder\",\n \"name\": \"Shareholder\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"List of all share transactions\",\n \"label\": \"Share Transfer\",\n \"name\": \"Share Transfer\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Share Transfer\"\n ],\n \"doctype\": \"Share Transfer\",\n \"is_query_report\": true,\n \"label\": \"Share Ledger\",\n \"name\": \"Share Ledger\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Share Transfer\"\n ],\n \"doctype\": \"Share Transfer\",\n \"is_query_report\": true,\n \"label\": \"Share Balance\",\n \"name\": \"Share Balance\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Cost Center and Budgeting",
"links": "[\n {\n \"description\": \"Tree of financial Cost Centers.\",\n \"icon\": \"fa fa-sitemap\",\n \"label\": \"Chart of Cost Centers\",\n \"name\": \"Cost Center\",\n \"route\": \"#Tree/Cost Center\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Define budget for a financial year.\",\n \"label\": \"Budget\",\n \"name\": \"Budget\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Accounting Dimension\",\n \"name\": \"Accounting Dimension\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Cost Center\"\n ],\n \"doctype\": \"Cost Center\",\n \"is_query_report\": true,\n \"label\": \"Budget Variance Report\",\n \"name\": \"Budget Variance Report\",\n \"type\": \"report\"\n },\n {\n \"description\": \"Seasonality for setting budgets, targets etc.\",\n \"label\": \"Monthly Distribution\",\n \"name\": \"Monthly Distribution\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Opening and Closing",
"links": "[\n {\n \"label\": \"Opening Invoice Creation Tool\",\n \"name\": \"Opening Invoice Creation Tool\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Chart of Accounts Importer\",\n \"name\": \"Chart of Accounts Importer\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Close Balance Sheet and book Profit or Loss.\",\n \"label\": \"Period Closing Voucher\",\n \"name\": \"Period Closing Voucher\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Taxes",
"links": "[\n {\n \"description\": \"Tax template for selling transactions.\",\n \"label\": \"Sales Taxes and Charges Template\",\n \"name\": \"Sales Taxes and Charges Template\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tax template for buying transactions.\",\n \"label\": \"Purchase Taxes and Charges Template\",\n \"name\": \"Purchase Taxes and Charges Template\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tax template for item tax rates.\",\n \"label\": \"Item Tax Template\",\n \"name\": \"Item Tax Template\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tax Category for overriding tax rates.\",\n \"label\": \"Tax Category\",\n \"name\": \"Tax Category\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tax Rule for transactions.\",\n \"label\": \"Tax Rule\",\n \"name\": \"Tax Rule\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Tax Withholding rates to be applied on transactions.\",\n \"label\": \"Tax Withholding Category\",\n \"name\": \"Tax Withholding Category\",\n \"type\": \"doctype\"\n }\n]"
},
{
"hidden": 0,
"label": "Profitability",
"links": "[\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Gross Profit\",\n \"name\": \"Gross Profit\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"GL Entry\"\n ],\n \"doctype\": \"GL Entry\",\n \"is_query_report\": true,\n \"label\": \"Profitability Analysis\",\n \"name\": \"Profitability Analysis\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Sales Invoice\"\n ],\n \"doctype\": \"Sales Invoice\",\n \"is_query_report\": true,\n \"label\": \"Sales Invoice Trends\",\n \"name\": \"Sales Invoice Trends\",\n \"type\": \"report\"\n },\n {\n \"dependencies\": [\n \"Purchase Invoice\"\n ],\n \"doctype\": \"Purchase Invoice\",\n \"is_query_report\": true,\n \"label\": \"Purchase Invoice Trends\",\n \"name\": \"Purchase Invoice Trends\",\n \"type\": \"report\"\n }\n]"
},
{
"hidden": 0,
"label": "Value-Added Tax (VAT UAE)",
"links": "[\n {\n \"country\": \"United Arab Emirates\",\n \"label\": \"UAE VAT Settings\",\n \"name\": \"UAE VAT Settings\",\n \"type\": \"doctype\"\n },\n {\n \"country\": \"United Arab Emirates\",\n \"is_query_report\": true,\n \"label\": \"UAE VAT 201\",\n \"name\": \"UAE VAT 201\",\n \"type\": \"report\"\n }\n\n]"
}
],
"category": "Modules",
"charts": [
{
"chart_name": "Profit and Loss",
"label": "Profit and Loss"
}
],
"creation": "2020-03-02 15:41:59.515192",
"developer_mode_only": 0,
"disable_user_customization": 0,
"docstatus": 0,
"doctype": "Desk Page",
"extends_another_page": 0,
"hide_custom": 0,
"idx": 0,
"is_standard": 1,
"label": "Accounting",
"modified": "2020-11-11 18:35:11.542909",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting",
"onboarding": "Accounts",
"owner": "Administrator",
"pin_to_bottom": 0,
"pin_to_top": 0,
"shortcuts": [
{
"label": "Chart Of Accounts",
"link_to": "Account",
"type": "DocType"
},
{
"label": "Sales Invoice",
"link_to": "Sales Invoice",
"type": "DocType"
},
{
"label": "Purchase Invoice",
"link_to": "Purchase Invoice",
"type": "DocType"
},
{
"label": "Journal Entry",
"link_to": "Journal Entry",
"type": "DocType"
},
{
"label": "Payment Entry",
"link_to": "Payment Entry",
"type": "DocType"
},
{
"label": "Accounts Receivable",
"link_to": "Accounts Receivable",
"type": "Report"
},
{
"label": "General Ledger",
"link_to": "General Ledger",
"type": "Report"
},
{
"label": "Trial Balance",
"link_to": "Trial Balance",
"type": "Report"
},
{
"label": "Dashboard",
"link_to": "Accounts",
"type": "Dashboard"
}
]
}

View File

@@ -120,17 +120,17 @@ frappe.treeview_settings["Account"] = {
} else {
treeview.new_node();
}
}, "octicon octicon-plus");
}, "add");
},
onrender: function(node) {
if(frappe.boot.user.can_read.indexOf("GL Entry") !== -1){
if (frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
// 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">'
$('<span class="balance-area pull-right">'
+ (node.data.balance_in_account_currency ?
(format_currency(Math.abs(node.data.balance_in_account_currency),
node.data.account_currency) + " / ") : "")

View File

@@ -63,17 +63,21 @@
"Gewinnermittlung \u00a74/3 nicht Ergebniswirksam": {
"account_number": "1371"
},
"Abziehbare VSt. 7%": {
"account_number": "1571"
},
"Abziehbare VSt. 19%": {
"account_number": "1576"
},
"Abziehbare VStr. nach \u00a713b UStG 19%": {
"account_number": "1577"
},
"Leistungen \u00a713b UStG 19% Vorsteuer, 19% Umsatzsteuer": {
"account_number": "3120"
"Abziehbare Vorsteuer": {
"account_type": "Tax",
"is_group": 1,
"Abziehbare Vorsteuer 7%": {
"account_number": "1571"
},
"Abziehbare Vorsteuer 19%": {
"account_number": "1576"
},
"Abziehbare Vorsteuer nach \u00a713b UStG 19%": {
"account_number": "1577"
},
"Leistungen \u00a713b UStG 19% Vorsteuer, 19% Umsatzsteuer": {
"account_number": "3120"
}
}
},
"III. Wertpapiere": {
@@ -196,6 +200,7 @@
},
"Umsatzsteuer": {
"is_group": 1,
"account_type": "Tax",
"Umsatzsteuer 7%": {
"account_number": "1771"
},

View File

@@ -292,18 +292,21 @@
"Umsatzsteuerforderungen fr\u00fchere Jahre": {}
},
"Sonstige Verm\u00f6gensgegenst\u00e4nde oder sonstige Verbindlichkeiten": {
"Abziehbare Vorsteuer": {},
"Abziehbare Vorsteuer 16%": {},
"Abziehbare Vorsteuer 19%": {},
"Abziehbare Vorsteuer 7%": {},
"Abziehbare Vorsteuer aus der Auslagerung von Gegenst\u00e4nden aus einem Unsatzsteuerlager": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb 16%": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb 19%": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb von Neufahrzeugen von Lieferanten ohne Ust-Identifikationsnummer": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG ": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG 16%": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG 19%": {},
"Abziehbare Vorsteuer": {
"account_type": "Tax",
"is_group": 1,
"Abziehbare Vorsteuer 16%": {},
"Abziehbare Vorsteuer 19%": {},
"Abziehbare Vorsteuer 7%": {},
"Abziehbare Vorsteuer aus der Auslagerung von Gegenst\u00e4nden aus einem Unsatzsteuerlager": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb 16%": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb 19%": {},
"Abziehbare Vorsteuer aus innergemeinschaftlichem Erwerb von Neufahrzeugen von Lieferanten ohne Ust-Identifikationsnummer": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG ": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG 16%": {},
"Abziehbare Vorsteuer nach \u00a7 13b UStG 19%": {}
},
"Aufl\u00f6sung Vorsteuer aus Vorjahr \u00a7 4/3 EStG": {},
"Aufzuteilende Vorsteuer": {},
"Aufzuteilende Vorsteuer 16%": {},
@@ -673,23 +676,26 @@
"Sonstige Verrechnungskonten (Interimskonto)": {
"account_type": "Stock Received But Not Billed"
},
"Umsatzsteuer": {},
"Umsatzsteuer 16%": {},
"Umsatzsteuer 19%": {},
"Umsatzsteuer 7%": {},
"Umsatzsteuer Vorjahr": {},
"Umsatzsteuer aus der Auslagerung von Gegenst\u00e4nden aus einem Umsatzsteuerlager": {},
"Umsatzsteuer aus im Inland steuerpflichtigen EG-Lieferungen": {},
"Umsatzsteuer aus im Inland steuerpflichtigen EG-Lieferungen 19%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb ": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb 16%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb 19%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb ohne Vorsteuerabzug": {},
"Umsatzsteuer fr\u00fchere Jahre": {},
"Umsatzsteuer laufendes Jahr": {},
"Umsatzsteuer nach \u00a713b UStG": {},
"Umsatzsteuer nach \u00a713b UStG 16%": {},
"Umsatzsteuer nach \u00a713b UStG 19%": {},
"Umsatzsteuer": {
"account_type": "Tax",
"is_group": 1,
"Umsatzsteuer 16%": {},
"Umsatzsteuer 19%": {},
"Umsatzsteuer 7%": {},
"Umsatzsteuer Vorjahr": {},
"Umsatzsteuer aus der Auslagerung von Gegenst\u00e4nden aus einem Umsatzsteuerlager": {},
"Umsatzsteuer aus im Inland steuerpflichtigen EG-Lieferungen": {},
"Umsatzsteuer aus im Inland steuerpflichtigen EG-Lieferungen 19%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb ": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb 16%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb 19%": {},
"Umsatzsteuer aus innergemeinschaftlichem Erwerb ohne Vorsteuerabzug": {},
"Umsatzsteuer fr\u00fchere Jahre": {},
"Umsatzsteuer laufendes Jahr": {},
"Umsatzsteuer nach \u00a713b UStG": {},
"Umsatzsteuer nach \u00a713b UStG 16%": {},
"Umsatzsteuer nach \u00a713b UStG 19%": {}
},
"Umsatzsteuer- Vorauszahlungen": {},
"Umsatzsteuer- Vorauszahlungen 1/11": {},
"Verbindlichkeiten aus Lohn- und Kirchensteuer": {}

View File

@@ -659,6 +659,7 @@
},
"Abziehbare Vorsteuer (Gruppe)": {
"is_group": 1,
"account_type": "Tax",
"Abziehbare Vorsteuer": {
"account_number": "1400"
},
@@ -910,98 +911,8 @@
},
"is_group": 1
},
"Passiva": {
"Passiva - Verbindlichkeiten": {
"root_type": "Liability",
"A - Eigenkapital": {
"account_type": "Equity",
"is_group": 1,
"I - Gezeichnetes Kapital": {
"account_type": "Equity",
"is_group": 1,
"Gezeichnetes Kapital": {
"account_type": "Equity",
"account_number": "2900"
},
"Ausstehende Einlagen auf das gezeichnete Kapital": {
"account_number": "2910",
"is_group": 1
}
},
"II - Kapitalr\u00fccklage": {
"account_type": "Equity",
"is_group": 1,
"Kapitalr\u00fccklage": {
"account_number": "2920"
}
},
"III - Gewinnr\u00fccklagen": {
"account_type": "Equity",
"1 - gesetzliche R\u00fccklage": {
"account_type": "Equity",
"is_group": 1,
"Gesetzliche R\u00fccklage": {
"account_number": "2930"
}
},
"2 - R\u00fccklage f. Anteile an einem herrschenden oder mehrheitlich beteiligten Unternehmen": {
"account_type": "Equity",
"is_group": 1
},
"3 - satzungsm\u00e4\u00dfige R\u00fccklagen": {
"account_type": "Equity",
"is_group": 1,
"Satzungsm\u00e4\u00dfige R\u00fccklagen": {
"account_number": "2950"
}
},
"4 - andere Gewinnr\u00fccklagen": {
"account_type": "Equity",
"is_group": 1,
"Gewinnr\u00fccklagen aus den \u00dcbergangsvorschriften BilMoG": {
"is_group": 1,
"Gewinnr\u00fccklagen (BilMoG)": {
"account_number": "2963"
},
"Gewinnr\u00fccklagen aus Zuschreibung Sachanlageverm\u00f6gen (BilMoG)": {
"account_number": "2964"
},
"Gewinnr\u00fccklagen aus Zuschreibung Finanzanlageverm\u00f6gen (BilMoG)": {
"account_number": "2965"
},
"Gewinnr\u00fccklagen aus Aufl\u00f6sung der Sonderposten mit R\u00fccklageanteil (BilMoG)": {
"account_number": "2966"
}
},
"Latente Steuern (Gewinnr\u00fccklage Haben) aus erfolgsneutralen Verrechnungen": {
"account_number": "2967"
},
"Latente Steuern (Gewinnr\u00fccklage Soll) aus erfolgsneutralen Verrechnungen": {
"account_number": "2968"
},
"Rechnungsabgrenzungsposten (Gewinnr\u00fccklage Soll) aus erfolgsneutralen Verrechnungen": {
"account_number": "2969"
}
},
"is_group": 1
},
"IV - Gewinnvortrag/Verlustvortrag": {
"account_type": "Equity",
"is_group": 1,
"Gewinnvortrag vor Verwendung": {
"account_number": "2970"
},
"Verlustvortrag vor Verwendung": {
"account_number": "2978"
}
},
"V - Jahres\u00fcberschu\u00df/Jahresfehlbetrag": {
"account_type": "Equity",
"is_group": 1
},
"Einlagen stiller Gesellschafter": {
"account_number": "9295"
}
},
"B - R\u00fcckstellungen": {
"is_group": 1,
"1 - R\u00fcckstellungen f. Pensionen und \u00e4hnliche Verplicht.": {
@@ -1618,6 +1529,143 @@
},
"is_group": 1
},
"Passiva - Eigenkapital": {
"root_type": "Equity",
"A - Eigenkapital": {
"account_type": "Equity",
"is_group": 1,
"I - Gezeichnetes Kapital": {
"account_type": "Equity",
"is_group": 1,
"Gezeichnetes Kapital": {
"account_number": "2900",
"account_type": "Equity"
},
"Gesch\u00e4ftsguthaben der verbleibenden Mitglieder": {
"account_number": "2901"
},
"Gesch\u00e4ftsguthaben der ausscheidenden Mitglieder": {
"account_number": "2902"
},
"Gesch\u00e4ftsguthaben aus gek\u00fcndigten Gesch\u00e4ftsanteilen": {
"account_number": "2903"
},
"R\u00fcckst\u00e4ndige f\u00e4llige Einzahlungen auf Gesch\u00e4ftsanteile, vermerkt": {
"account_number": "2906"
},
"Gegenkonto R\u00fcckst\u00e4ndige f\u00e4llige Einzahlungen auf Gesch\u00e4ftsanteile, vermerkt": {
"account_number": "2907"
},
"Kapitalerh\u00f6hung aus Gesellschaftsmitteln": {
"account_number": "2908"
},
"Ausstehende Einlagen auf das gezeichnete Kapital, nicht eingefordert": {
"account_number": "2910"
}
},
"II - Kapitalr\u00fccklage": {
"account_type": "Equity",
"is_group": 1,
"Kapitalr\u00fccklage": {
"account_number": "2920"
},
"Kapitalr\u00fccklage durch Ausgabe von Anteilen \u00fcber Nennbetrag": {
"account_number": "2925"
},
"Kapitalr\u00fccklage durch Ausgabe von Schuldverschreibungen": {
"account_number": "2926"
},
"Kapitalr\u00fccklage durch Zuzahlungen gegen Gew\u00e4hrung eines Vorzugs": {
"account_number": "2927"
},
"Kapitalr\u00fccklage durch Zuzahlungen in das Eigenkapital": {
"account_number": "2928"
},
"Nachschusskapital (Gegenkonto 1299)": {
"account_number": "2929"
}
},
"III - Gewinnr\u00fccklagen": {
"account_type": "Equity",
"1 - gesetzliche R\u00fccklage": {
"account_type": "Equity",
"is_group": 1,
"Gesetzliche R\u00fccklage": {
"account_number": "2930"
}
},
"2 - R\u00fccklage f. Anteile an einem herrschenden oder mehrheitlich beteiligten Unternehmen": {
"account_type": "Equity",
"is_group": 1,
"R\u00fccklage f. Anteile an einem herrschenden oder mehrheitlich beteiligten Unternehmen": {
"account_number": "2935"
}
},
"3 - satzungsm\u00e4\u00dfige R\u00fccklagen": {
"account_type": "Equity",
"is_group": 1,
"Satzungsm\u00e4\u00dfige R\u00fccklagen": {
"account_number": "2950"
}
},
"4 - andere Gewinnr\u00fccklagen": {
"account_type": "Equity",
"is_group": 1,
"Andere Gewinnr\u00fccklagen": {
"account_number": "2960"
},
"Andere Gewinnr\u00fccklagen aus dem Erwerb eigener Anteile": {
"account_number": "2961"
},
"Eigenkapitalanteil von Wertaufholungen": {
"account_number": "2962"
},
"Gewinnr\u00fccklagen aus den \u00dcbergangsvorschriften BilMoG": {
"is_group": 1,
"Gewinnr\u00fccklagen (BilMoG)": {
"account_number": "2963"
},
"Gewinnr\u00fccklagen aus Zuschreibung Sachanlageverm\u00f6gen (BilMoG)": {
"account_number": "2964"
},
"Gewinnr\u00fccklagen aus Zuschreibung Finanzanlageverm\u00f6gen (BilMoG)": {
"account_number": "2965"
},
"Gewinnr\u00fccklagen aus Aufl\u00f6sung der Sonderposten mit R\u00fccklageanteil (BilMoG)": {
"account_number": "2966"
}
},
"Latente Steuern (Gewinnr\u00fccklage Haben) aus erfolgsneutralen Verrechnungen": {
"account_number": "2967"
},
"Latente Steuern (Gewinnr\u00fccklage Soll) aus erfolgsneutralen Verrechnungen": {
"account_number": "2968"
},
"Rechnungsabgrenzungsposten (Gewinnr\u00fccklage Soll) aus erfolgsneutralen Verrechnungen": {
"account_number": "2969"
}
},
"is_group": 1
},
"IV - Gewinnvortrag/Verlustvortrag": {
"account_type": "Equity",
"is_group": 1,
"Gewinnvortrag vor Verwendung": {
"account_number": "2970"
},
"Verlustvortrag vor Verwendung": {
"account_number": "2978"
}
},
"V - Jahres\u00fcberschu\u00df/Jahresfehlbetrag": {
"account_type": "Equity",
"is_group": 1
},
"Einlagen stiller Gesellschafter": {
"account_number": "9295"
}
}
},
"1 - Umsatzerl\u00f6se": {
"root_type": "Income",
"is_group": 1,

View File

@@ -254,7 +254,8 @@ def create_account(**kwargs):
account_name = kwargs.get('account_name'),
account_type = kwargs.get('account_type'),
parent_account = kwargs.get('parent_account'),
company = kwargs.get('company')
company = kwargs.get('company'),
account_currency = kwargs.get('account_currency')
))
account.save()

View File

@@ -2,7 +2,6 @@
// For license information, please see license.txt
frappe.ui.form.on('Accounting Dimension', {
refresh: function(frm) {
frm.set_query('document_type', () => {
let invalid_doctypes = frappe.model.core_doctypes_list;

View File

@@ -30,6 +30,7 @@
"fieldtype": "Link",
"label": "Reference Document Type",
"options": "DocType",
"read_only_depends_on": "eval:!doc.__islocal",
"reqd": 1
},
{
@@ -48,7 +49,7 @@
}
],
"links": [],
"modified": "2020-03-22 20:34:39.805728",
"modified": "2021-02-08 16:37:53.936656",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Dimension",

View File

@@ -29,15 +29,25 @@ class AccountingDimension(Document):
if exists and self.is_new():
frappe.throw("Document Type already used as a dimension")
if not self.is_new():
self.validate_document_type_change()
def validate_document_type_change(self):
doctype_before_save = frappe.db.get_value("Accounting Dimension", self.name, "document_type")
if doctype_before_save != self.document_type:
message = _("Cannot change Reference Document Type.")
message += _("Please create a new Accounting Dimension if required.")
frappe.throw(message)
def after_insert(self):
if frappe.flags.in_test:
make_dimension_in_accounting_doctypes(doc=self)
else:
frappe.enqueue(make_dimension_in_accounting_doctypes, doc=self)
frappe.enqueue(make_dimension_in_accounting_doctypes, doc=self, queue='long')
def on_trash(self):
if frappe.flags.in_test:
delete_accounting_dimension(doc=self)
delete_accounting_dimension(doc=self, queue='long')
else:
frappe.enqueue(delete_accounting_dimension, doc=self)
@@ -48,8 +58,13 @@ class AccountingDimension(Document):
if not self.fieldname:
self.fieldname = scrub(self.label)
def make_dimension_in_accounting_doctypes(doc):
doclist = get_doctypes_with_dimensions()
def on_update(self):
frappe.flags.accounting_dimensions = None
def make_dimension_in_accounting_doctypes(doc, doclist=None):
if not doclist:
doclist = get_doctypes_with_dimensions()
doc_count = len(get_accounting_dimensions())
count = 0
@@ -69,13 +84,13 @@ def make_dimension_in_accounting_doctypes(doc):
"owner": "Administrator"
}
if doctype == "Budget":
add_dimension_to_budget_doctype(df, doc)
else:
meta = frappe.get_meta(doctype, cached=False)
fieldnames = [d.fieldname for d in meta.get("fields")]
meta = frappe.get_meta(doctype, cached=False)
fieldnames = [d.fieldname for d in meta.get("fields")]
if df['fieldname'] not in fieldnames:
if df['fieldname'] not in fieldnames:
if doctype == "Budget":
add_dimension_to_budget_doctype(df.copy(), doc)
else:
create_custom_field(doctype, df)
count += 1
@@ -165,23 +180,17 @@ def toggle_disabling(doc):
frappe.clear_cache(doctype=doctype)
def get_doctypes_with_dimensions():
doclist = ["GL Entry", "Sales Invoice", "Purchase Invoice", "Payment Entry", "Asset",
"Expense Claim", "Expense Claim Detail", "Expense Taxes and Charges", "Stock Entry", "Budget", "Payroll Entry", "Delivery Note",
"Sales Invoice Item", "Purchase Invoice Item", "Purchase Order Item", "Journal Entry Account", "Material Request Item", "Delivery Note Item",
"Purchase Receipt Item", "Stock Entry Detail", "Payment Entry Deduction", "Sales Taxes and Charges", "Purchase Taxes and Charges", "Shipping Rule",
"Landed Cost Item", "Asset Value Adjustment", "Loyalty Program", "Fee Schedule", "Fee Structure", "Stock Reconciliation",
"Travel Request", "Fees", "POS Profile", "Opening Invoice Creation Tool", "Opening Invoice Creation Tool Item", "Subscription",
"Subscription Plan"]
return doclist
return frappe.get_hooks("accounting_dimension_doctypes")
def get_accounting_dimensions(as_list=True):
accounting_dimensions = frappe.get_all("Accounting Dimension", fields=["label", "fieldname", "disabled", "document_type"])
if frappe.flags.accounting_dimensions is None:
frappe.flags.accounting_dimensions = frappe.get_all("Accounting Dimension",
fields=["label", "fieldname", "disabled", "document_type"])
if as_list:
return [d.fieldname for d in accounting_dimensions]
return [d.fieldname for d in frappe.flags.accounting_dimensions]
else:
return accounting_dimensions
return frappe.flags.accounting_dimensions
def get_checks_for_pl_and_bs_accounts():
dimensions = frappe.db.sql("""SELECT p.label, p.disabled, p.fieldname, c.default_dimension, c.company, c.mandatory_for_pl, c.mandatory_for_bs
@@ -203,7 +212,7 @@ def get_dimension_with_children(doctype, dimension):
return all_dimensions
@frappe.whitelist()
def get_dimension_filters():
def get_dimensions(with_cost_center_and_project=False):
dimension_filters = frappe.db.sql("""
SELECT label, fieldname, document_type
FROM `tabAccounting Dimension`
@@ -214,6 +223,18 @@ def get_dimension_filters():
FROM `tabAccounting Dimension Detail` c, `tabAccounting Dimension` p
WHERE c.parent = p.name""", as_dict=1)
if with_cost_center_and_project:
dimension_filters.extend([
{
'fieldname': 'cost_center',
'document_type': 'Cost Center'
},
{
'fieldname': 'project',
'document_type': 'Project'
}
])
default_dimensions_map = {}
for dimension in default_dimensions:
default_dimensions_map.setdefault(dimension.company, {})

View File

@@ -11,37 +11,7 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import d
class TestAccountingDimension(unittest.TestCase):
def setUp(self):
frappe.set_user("Administrator")
if not frappe.db.exists("Accounting Dimension", {"document_type": "Department"}):
dimension = frappe.get_doc({
"doctype": "Accounting Dimension",
"document_type": "Department",
}).insert()
else:
dimension1 = frappe.get_doc("Accounting Dimension", "Department")
dimension1.disabled = 0
dimension1.save()
if not frappe.db.exists("Accounting Dimension", {"document_type": "Location"}):
dimension1 = frappe.get_doc({
"doctype": "Accounting Dimension",
"document_type": "Location",
})
dimension1.append("dimension_defaults", {
"company": "_Test Company",
"reference_document": "Location",
"default_dimension": "Block 1",
"mandatory_for_bs": 1
})
dimension1.insert()
dimension1.save()
else:
dimension1 = frappe.get_doc("Accounting Dimension", "Location")
dimension1.disabled = 0
dimension1.save()
create_dimension()
def test_dimension_against_sales_invoice(self):
si = create_sales_invoice(do_not_save=1)
@@ -101,6 +71,38 @@ class TestAccountingDimension(unittest.TestCase):
def tearDown(self):
disable_dimension()
def create_dimension():
frappe.set_user("Administrator")
if not frappe.db.exists("Accounting Dimension", {"document_type": "Department"}):
frappe.get_doc({
"doctype": "Accounting Dimension",
"document_type": "Department",
}).insert()
else:
dimension = frappe.get_doc("Accounting Dimension", "Department")
dimension.disabled = 0
dimension.save()
if not frappe.db.exists("Accounting Dimension", {"document_type": "Location"}):
dimension1 = frappe.get_doc({
"doctype": "Accounting Dimension",
"document_type": "Location",
})
dimension1.append("dimension_defaults", {
"company": "_Test Company",
"reference_document": "Location",
"default_dimension": "Block 1",
"mandatory_for_bs": 1
})
dimension1.insert()
dimension1.save()
else:
dimension1 = frappe.get_doc("Accounting Dimension", "Location")
dimension1.disabled = 0
dimension1.save()
def disable_dimension():
dimension1 = frappe.get_doc("Accounting Dimension", "Department")

View File

@@ -0,0 +1,82 @@
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Accounting Dimension Filter', {
refresh: function(frm, cdt, cdn) {
if (frm.doc.accounting_dimension) {
frm.set_df_property('dimensions', 'label', frm.doc.accounting_dimension, cdn, 'dimension_value');
}
let help_content =
`<table class="table table-bordered" style="background-color: #f9f9f9;">
<tr><td>
<p>
<i class="fa fa-hand-right"></i>
{{__('Note: On checking Is Mandatory the accounting dimension will become mandatory against that specific account for all accounting transactions')}}
</p>
</td></tr>
</table>`;
frm.set_df_property('dimension_filter_help', 'options', help_content);
},
onload: function(frm) {
frm.set_query('applicable_on_account', 'accounts', function() {
return {
filters: {
'company': frm.doc.company
}
};
});
frappe.db.get_list('Accounting Dimension',
{fields: ['document_type']}).then((res) => {
let options = ['Cost Center', 'Project'];
res.forEach((dimension) => {
options.push(dimension.document_type);
});
frm.set_df_property('accounting_dimension', 'options', options);
});
frm.trigger('setup_filters');
},
setup_filters: function(frm) {
let filters = {};
if (frm.doc.accounting_dimension) {
frappe.model.with_doctype(frm.doc.accounting_dimension, function() {
if (frappe.model.is_tree(frm.doc.accounting_dimension)) {
filters['is_group'] = 0;
}
if (frappe.meta.has_field(frm.doc.accounting_dimension, 'company')) {
filters['company'] = frm.doc.company;
}
frm.set_query('dimension_value', 'dimensions', function() {
return {
filters: filters
};
});
});
}
},
accounting_dimension: function(frm) {
frm.clear_table("dimensions");
let row = frm.add_child("dimensions");
row.accounting_dimension = frm.doc.accounting_dimension;
frm.refresh_field("dimensions");
frm.trigger('setup_filters');
},
});
frappe.ui.form.on('Allowed Dimension', {
dimensions_add: function(frm, cdt, cdn) {
let row = locals[cdt][cdn];
row.accounting_dimension = frm.doc.accounting_dimension;
frm.refresh_field("dimensions");
}
});

View File

@@ -0,0 +1,158 @@
{
"actions": [],
"autoname": "format:{accounting_dimension}-{#####}",
"creation": "2020-11-08 18:28:11.906146",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"accounting_dimension",
"disabled",
"column_break_2",
"company",
"allow_or_restrict",
"section_break_4",
"accounts",
"column_break_6",
"dimensions",
"section_break_10",
"dimension_filter_help"
],
"fields": [
{
"fieldname": "accounting_dimension",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Accounting Dimension",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "section_break_4",
"fieldtype": "Section Break",
"hide_border": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "column_break_6",
"fieldtype": "Column Break",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "allow_or_restrict",
"fieldtype": "Select",
"label": "Allow Or Restrict Dimension",
"options": "Allow\nRestrict",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "accounts",
"fieldtype": "Table",
"label": "Applicable On Account",
"options": "Applicable On Account",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"depends_on": "eval:doc.accounting_dimension",
"fieldname": "dimensions",
"fieldtype": "Table",
"label": "Applicable Dimension",
"options": "Allowed Dimension",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disabled",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "dimension_filter_help",
"fieldtype": "HTML",
"label": "Dimension Filter Help",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "section_break_10",
"fieldtype": "Section Break",
"show_days": 1,
"show_seconds": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-02-03 12:04:58.678402",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Dimension Filter",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
# Copyright, (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, scrub
from frappe.model.document import Document
class AccountingDimensionFilter(Document):
def validate(self):
self.validate_applicable_accounts()
def validate_applicable_accounts(self):
accounts = frappe.db.sql(
"""
SELECT a.applicable_on_account as account
FROM `tabApplicable On Account` a, `tabAccounting Dimension Filter` d
WHERE d.name = a.parent
and d.name != %s
and d.accounting_dimension = %s
""", (self.name, self.accounting_dimension), as_dict=1)
account_list = [d.account for d in accounts]
for account in self.get('accounts'):
if account.applicable_on_account in account_list:
frappe.throw(_("Row {0}: {1} account already applied for Accounting Dimension {2}").format(
account.idx, frappe.bold(account.applicable_on_account), frappe.bold(self.accounting_dimension)))
def get_dimension_filter_map():
filters = frappe.db.sql("""
SELECT
a.applicable_on_account, d.dimension_value, p.accounting_dimension,
p.allow_or_restrict, a.is_mandatory
FROM
`tabApplicable On Account` a, `tabAllowed Dimension` d,
`tabAccounting Dimension Filter` p
WHERE
p.name = a.parent
AND p.disabled = 0
AND p.name = d.parent
""", as_dict=1)
dimension_filter_map = {}
for f in filters:
f.fieldname = scrub(f.accounting_dimension)
build_map(dimension_filter_map, f.fieldname, f.applicable_on_account, f.dimension_value,
f.allow_or_restrict, f.is_mandatory)
return dimension_filter_map
def build_map(map_object, dimension, account, filter_value, allow_or_restrict, is_mandatory):
map_object.setdefault((dimension, account), {
'allowed_dimensions': [],
'is_mandatory': is_mandatory,
'allow_or_restrict': allow_or_restrict
})
map_object[(dimension, account)]['allowed_dimensions'].append(filter_value)

View File

@@ -0,0 +1,99 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, 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.accounting_dimension.test_accounting_dimension import create_dimension, disable_dimension
from erpnext.exceptions import InvalidAccountDimensionError, MandatoryAccountDimensionError
class TestAccountingDimensionFilter(unittest.TestCase):
def setUp(self):
create_dimension()
create_accounting_dimension_filter()
self.invoice_list = []
def test_allowed_dimension_validation(self):
si = create_sales_invoice(do_not_save=1)
si.items[0].cost_center = 'Main - _TC'
si.department = 'Accounts - _TC'
si.location = 'Block 1'
si.save()
self.assertRaises(InvalidAccountDimensionError, si.submit)
self.invoice_list.append(si)
def test_mandatory_dimension_validation(self):
si = create_sales_invoice(do_not_save=1)
si.department = ''
si.location = 'Block 1'
# Test with no department for Sales Account
si.items[0].department = ''
si.items[0].cost_center = '_Test Cost Center 2 - _TC'
si.save()
self.assertRaises(MandatoryAccountDimensionError, si.submit)
self.invoice_list.append(si)
def tearDown(self):
disable_dimension_filter()
disable_dimension()
for si in self.invoice_list:
si.load_from_db()
if si.docstatus == 1:
si.cancel()
def create_accounting_dimension_filter():
if not frappe.db.get_value('Accounting Dimension Filter',
{'accounting_dimension': 'Cost Center'}):
frappe.get_doc({
'doctype': 'Accounting Dimension Filter',
'accounting_dimension': 'Cost Center',
'allow_or_restrict': 'Allow',
'company': '_Test Company',
'accounts': [{
'applicable_on_account': 'Sales - _TC',
}],
'dimensions': [{
'accounting_dimension': 'Cost Center',
'dimension_value': '_Test Cost Center 2 - _TC'
}]
}).insert()
else:
doc = frappe.get_doc('Accounting Dimension Filter', {'accounting_dimension': 'Cost Center'})
doc.disabled = 0
doc.save()
if not frappe.db.get_value('Accounting Dimension Filter',
{'accounting_dimension': 'Department'}):
frappe.get_doc({
'doctype': 'Accounting Dimension Filter',
'accounting_dimension': 'Department',
'allow_or_restrict': 'Allow',
'company': '_Test Company',
'accounts': [{
'applicable_on_account': 'Sales - _TC',
'is_mandatory': 1
}],
'dimensions': [{
'accounting_dimension': 'Department',
'dimension_value': 'Accounts - _TC'
}]
}).insert()
else:
doc = frappe.get_doc('Accounting Dimension Filter', {'accounting_dimension': 'Department'})
doc.disabled = 0
doc.save()
def disable_dimension_filter():
doc = frappe.get_doc('Accounting Dimension Filter', {'accounting_dimension': 'Cost Center'})
doc.disabled = 1
doc.save()
doc = frappe.get_doc('Accounting Dimension Filter', {'accounting_dimension': 'Department'})
doc.disabled = 1
doc.save()

View File

@@ -6,3 +6,46 @@ frappe.ui.form.on('Accounts Settings', {
}
});
frappe.tour['Accounts Settings'] = [
{
fieldname: "acc_frozen_upto",
title: "Accounts Frozen Upto",
description: __("Freeze accounting transactions up to specified date, nobody can make/modify entry except the specified Role."),
},
{
fieldname: "frozen_accounts_modifier",
title: "Role Allowed to Set Frozen Accounts & Edit Frozen Entries",
description: __("Users with this Role are allowed to set frozen accounts and create/modify accounting entries against frozen accounts.")
},
{
fieldname: "determine_address_tax_category_from",
title: "Determine Address Tax Category From",
description: __("Tax category can be set on Addresses. An address can be Shipping or Billing address. Set which addres to select when applying Tax Category.")
},
{
fieldname: "over_billing_allowance",
title: "Over Billing Allowance Percentage",
description: __("The percentage by which you can overbill transactions. For example, if the order value is $100 for an Item and percentage here is set as 10% then you are allowed to bill for $110.")
},
{
fieldname: "credit_controller",
title: "Credit Controller",
description: __("Select the role that is allowed to submit transactions that exceed credit limits set. The credit limit can be set in the Customer form.")
},
{
fieldname: "make_payment_via_journal_entry",
title: "Make Payment via Journal Entry",
description: __("When checked, if user proceeds to make payment from an invoice, the system will open a Journal Entry instead of a Payment Entry.")
},
{
fieldname: "unlink_payment_on_cancellation_of_invoice",
title: "Unlink Payment on Cancellation of Invoice",
description: __("If checked, system will unlink the payment against the respective invoice.")
},
{
fieldname: "unlink_advance_payment_on_cancelation_of_order",
title: "Unlink Advance Payment on Cancellation of Order",
description: __("Similar to the previous option, this unlinks any advance payments made against Purchase/Sales Orders.")
}
];

View File

@@ -21,6 +21,7 @@
"book_asset_depreciation_entry_automatically",
"add_taxes_from_item_tax_template",
"automatically_fetch_payment_terms",
"delete_linked_ledger_entries",
"deferred_accounting_settings_section",
"automatically_process_deferred_accounting_entry",
"book_deferred_entries_based_on",
@@ -219,6 +220,12 @@
"fieldtype": "Select",
"label": "Book Deferred Entries Based On",
"options": "Days\nMonths"
},
{
"default": "0",
"fieldname": "delete_linked_ledger_entries",
"fieldtype": "Check",
"label": "Delete Accounting and Stock Ledger Entries on deletion of Transaction"
}
],
"icon": "icon-cog",
@@ -226,7 +233,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2020-10-13 11:32:52.268826",
"modified": "2021-01-05 13:04:00.118892",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
@@ -254,4 +261,4 @@
"sort_field": "modified",
"sort_order": "ASC",
"track_changes": 1
}
}

View File

@@ -0,0 +1,43 @@
{
"actions": [],
"creation": "2020-11-08 18:22:36.001131",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"accounting_dimension",
"dimension_value"
],
"fields": [
{
"fieldname": "accounting_dimension",
"fieldtype": "Link",
"label": "Accounting Dimension",
"options": "DocType",
"read_only": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "dimension_value",
"fieldtype": "Dynamic Link",
"in_list_view": 1,
"options": "accounting_dimension",
"show_days": 1,
"show_seconds": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2020-11-23 09:56:19.744200",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Allowed Dimension",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
# import frappe
from frappe.model.document import Document
class BankStatementTransactionInvoiceItem(Document):
class AllowedDimension(Document):
pass

View File

@@ -0,0 +1,46 @@
{
"actions": [],
"creation": "2020-11-08 18:20:00.944449",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"applicable_on_account",
"is_mandatory"
],
"fields": [
{
"fieldname": "applicable_on_account",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Accounts",
"options": "Account",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"columns": 2,
"default": "0",
"fieldname": "is_mandatory",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Is Mandatory",
"show_days": 1,
"show_seconds": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2020-11-22 19:55:13.324136",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Applicable On Account",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
# import frappe
from frappe.model.document import Document
class BankStatementTransactionPaymentItem(Document):
class ApplicableOnAccount(Document):
pass

View File

@@ -1,5 +1,6 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.provide('erpnext.integrations');
frappe.ui.form.on('Bank', {
onload: function(frm) {
@@ -20,7 +21,12 @@ frappe.ui.form.on('Bank', {
frm.set_df_property('address_and_contact', 'hidden', 0);
frappe.contacts.render_address_and_contact(frm);
}
},
if (frm.doc.plaid_access_token) {
frm.add_custom_button(__('Refresh Plaid Link'), () => {
new erpnext.integrations.refreshPlaidLink(frm.doc.plaid_access_token);
});
}
}
});
@@ -40,4 +46,79 @@ let add_fields_to_mapping_table = function (frm) {
frm.doc.name).options = options;
frm.fields_dict.bank_transaction_mapping.grid.refresh();
};
};
erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
constructor(access_token) {
this.access_token = access_token;
this.plaidUrl = 'https://cdn.plaid.com/link/v2/stable/link-initialize.js';
this.init_config();
}
async init_config() {
this.plaid_env = await frappe.db.get_single_value('Plaid Settings', 'plaid_env');
this.token = await this.get_link_token_for_update();
this.init_plaid();
}
async get_link_token_for_update() {
const token = frappe.xcall(
'erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.get_link_token_for_update',
{ access_token: this.access_token }
)
if (!token) {
frappe.throw(__('Cannot retrieve link token for update. Check Error Log for more information'));
}
return token;
}
init_plaid() {
const me = this;
me.loadScript(me.plaidUrl)
.then(() => {
me.onScriptLoaded(me);
})
.then(() => {
if (me.linkHandler) {
me.linkHandler.open();
}
})
.catch((error) => {
me.onScriptError(error);
});
}
loadScript(src) {
return new Promise(function (resolve, reject) {
if (document.querySelector("script[src='" + src + "']")) {
resolve();
return;
}
const el = document.createElement('script');
el.type = 'text/javascript';
el.async = true;
el.src = src;
el.addEventListener('load', resolve);
el.addEventListener('error', reject);
el.addEventListener('abort', reject);
document.head.appendChild(el);
});
}
onScriptLoaded(me) {
me.linkHandler = Plaid.create({
env: me.plaid_env,
token: me.token,
onSuccess: me.plaid_success
});
}
onScriptError(error) {
frappe.msgprint(__("There was an issue connecting to Plaid's authentication server. Check browser console for more information"));
console.log(error);
}
plaid_success(token, response) {
frappe.show_alert({ message: __('Plaid Link Updated'), indicator: 'green' });
}
};

View File

@@ -86,6 +86,7 @@
},
{
"default": "0",
"description": "Setting the account as a Company Account is necessary for Bank Reconciliation",
"fieldname": "is_company_account",
"fieldtype": "Check",
"label": "Is Company Account"
@@ -207,7 +208,7 @@
}
],
"links": [],
"modified": "2020-07-17 13:59:50.795412",
"modified": "2020-10-23 16:48:06.303658",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Account",

View File

@@ -0,0 +1,162 @@
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.provide("erpnext.accounts.bank_reconciliation");
frappe.ui.form.on("Bank Reconciliation Tool", {
setup: function (frm) {
frm.set_query("bank_account", function () {
return {
filters: {
company: ["in", frm.doc.company],
},
};
});
},
refresh: function (frm) {
frappe.require("assets/js/bank-reconciliation-tool.min.js", () =>
frm.trigger("make_reconciliation_tool")
);
frm.upload_statement_button = frm.page.set_secondary_action(
__("Upload Bank Statement"),
() =>
frappe.call({
method:
"erpnext.accounts.doctype.bank_statement_import.bank_statement_import.upload_bank_statement",
args: {
dt: frm.doc.doctype,
dn: frm.doc.name,
company: frm.doc.company,
bank_account: frm.doc.bank_account,
},
callback: function (r) {
if (!r.exc) {
var doc = frappe.model.sync(r.message);
frappe.set_route(
"Form",
doc[0].doctype,
doc[0].name
);
}
},
})
);
},
after_save: function (frm) {
frm.trigger("make_reconciliation_tool");
},
bank_account: function (frm) {
frappe.db.get_value(
"Bank Account",
frm.bank_account,
"account",
(r) => {
frappe.db.get_value(
"Account",
r.account,
"account_currency",
(r) => {
frm.currency = r.account_currency;
}
);
}
);
frm.trigger("get_account_opening_balance");
},
bank_statement_from_date: function (frm) {
frm.trigger("get_account_opening_balance");
},
make_reconciliation_tool(frm) {
frm.get_field("reconciliation_tool_cards").$wrapper.empty();
if (frm.doc.bank_account && frm.doc.bank_statement_to_date) {
frm.trigger("get_cleared_balance").then(() => {
if (
frm.doc.bank_account &&
frm.doc.bank_statement_from_date &&
frm.doc.bank_statement_to_date &&
frm.doc.bank_statement_closing_balance
) {
frm.trigger("render_chart");
frm.trigger("render");
frappe.utils.scroll_to(
frm.get_field("reconciliation_tool_cards").$wrapper,
true,
30
);
}
});
}
},
get_account_opening_balance(frm) {
if (frm.doc.bank_account && frm.doc.bank_statement_from_date) {
frappe.call({
method:
"erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance",
args: {
bank_account: frm.doc.bank_account,
till_date: frm.doc.bank_statement_from_date,
},
callback: (response) => {
frm.set_value("account_opening_balance", response.message);
},
});
}
},
get_cleared_balance(frm) {
if (frm.doc.bank_account && frm.doc.bank_statement_to_date) {
return frappe.call({
method:
"erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance",
args: {
bank_account: frm.doc.bank_account,
till_date: frm.doc.bank_statement_to_date,
},
callback: (response) => {
frm.cleared_balance = response.message;
},
});
}
},
render_chart(frm) {
frm.cards_manager = new erpnext.accounts.bank_reconciliation.NumberCardManager(
{
$reconciliation_tool_cards: frm.get_field(
"reconciliation_tool_cards"
).$wrapper,
bank_statement_closing_balance:
frm.doc.bank_statement_closing_balance,
cleared_balance: frm.cleared_balance,
currency: frm.currency,
}
);
},
render(frm) {
if (frm.doc.bank_account) {
frm.bank_reconciliation_data_table_manager = new erpnext.accounts.bank_reconciliation.DataTableManager(
{
company: frm.doc.company,
bank_account: frm.doc.bank_account,
$reconciliation_tool_dt: frm.get_field(
"reconciliation_tool_dt"
).$wrapper,
$no_bank_transactions: frm.get_field(
"no_bank_transactions"
).$wrapper,
bank_statement_from_date: frm.doc.bank_statement_from_date,
bank_statement_to_date: frm.doc.bank_statement_to_date,
bank_statement_closing_balance:
frm.doc.bank_statement_closing_balance,
cards_manager: frm.cards_manager,
}
);
}
},
});

View File

@@ -0,0 +1,113 @@
{
"actions": [],
"creation": "2020-12-02 10:13:02.148040",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"company",
"bank_account",
"column_break_1",
"bank_statement_from_date",
"bank_statement_to_date",
"column_break_2",
"account_opening_balance",
"bank_statement_closing_balance",
"section_break_1",
"reconciliation_tool_cards",
"reconciliation_tool_dt",
"no_bank_transactions"
],
"fields": [
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company"
},
{
"fieldname": "bank_account",
"fieldtype": "Link",
"label": "Bank Account",
"options": "Bank Account"
},
{
"fieldname": "column_break_1",
"fieldtype": "Column Break"
},
{
"depends_on": "eval: doc.bank_account",
"fieldname": "bank_statement_from_date",
"fieldtype": "Date",
"label": "Bank Statement From Date"
},
{
"depends_on": "eval: doc.bank_statement_from_date",
"fieldname": "bank_statement_to_date",
"fieldtype": "Date",
"label": "Bank Statement To Date"
},
{
"fieldname": "column_break_2",
"fieldtype": "Column Break"
},
{
"depends_on": "eval: doc.bank_statement_from_date",
"fieldname": "account_opening_balance",
"fieldtype": "Currency",
"label": "Account Opening Balance",
"options": "Currency",
"read_only": 1
},
{
"depends_on": "eval: doc.bank_statement_to_date",
"fieldname": "bank_statement_closing_balance",
"fieldtype": "Currency",
"label": "Bank Statement Closing Balance",
"options": "Currency"
},
{
"depends_on": "eval: doc.bank_statement_closing_balance",
"fieldname": "section_break_1",
"fieldtype": "Section Break",
"label": "Reconcile"
},
{
"fieldname": "reconciliation_tool_cards",
"fieldtype": "HTML"
},
{
"fieldname": "reconciliation_tool_dt",
"fieldtype": "HTML"
},
{
"fieldname": "no_bank_transactions",
"fieldtype": "HTML",
"options": "<div class=\"text-muted text-center\">No Matching Bank Transactions Found</div>"
}
],
"hide_toolbar": 1,
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2021-02-02 01:35:53.043578",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Tool",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -0,0 +1,452 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import json
import frappe
from frappe.model.document import Document
from frappe import _
from frappe.utils import flt
from erpnext import get_company_currency
from erpnext.accounts.utils import get_balance_on
from erpnext.accounts.report.bank_reconciliation_statement.bank_reconciliation_statement import get_entries, get_amounts_not_reflected_in_system
from erpnext.accounts.doctype.bank_transaction.bank_transaction import get_paid_amount
class BankReconciliationTool(Document):
pass
@frappe.whitelist()
def get_bank_transactions(bank_account, from_date = None, to_date = None):
# returns bank transactions for a bank account
filters = []
filters.append(['bank_account', '=', bank_account])
filters.append(['docstatus', '=', 1])
filters.append(['unallocated_amount', '>', 0])
if to_date:
filters.append(['date', '<=', to_date])
if from_date:
filters.append(['date', '>=', from_date])
transactions = frappe.get_all(
'Bank Transaction',
fields = ['date', 'deposit', 'withdrawal', 'currency',
'description', 'name', 'bank_account', 'company',
'unallocated_amount', 'reference_number', 'party_type', 'party'],
filters = filters
)
return transactions
@frappe.whitelist()
def get_account_balance(bank_account, till_date):
# returns account balance till the specified date
account = frappe.db.get_value('Bank Account', bank_account, 'account')
filters = frappe._dict({
"account": account,
"report_date": till_date,
"include_pos_transactions": 1
})
data = get_entries(filters)
balance_as_per_system = get_balance_on(filters["account"], filters["report_date"])
total_debit, total_credit = 0,0
for d in data:
total_debit += flt(d.debit)
total_credit += flt(d.credit)
amounts_not_reflected_in_system = get_amounts_not_reflected_in_system(filters)
bank_bal = flt(balance_as_per_system) - flt(total_debit) + flt(total_credit) \
+ amounts_not_reflected_in_system
return bank_bal
@frappe.whitelist()
def update_bank_transaction(bank_transaction_name, reference_number, party_type=None, party=None):
# updates bank transaction based on the new parameters provided by the user from Vouchers
bank_transaction = frappe.get_doc("Bank Transaction", bank_transaction_name)
bank_transaction.reference_number = reference_number
bank_transaction.party_type = party_type
bank_transaction.party = party
bank_transaction.save()
return frappe.db.get_all('Bank Transaction',
filters={
'name': bank_transaction_name
},
fields=['date', 'deposit', 'withdrawal', 'currency',
'description', 'name', 'bank_account', 'company',
'unallocated_amount', 'reference_number',
'party_type', 'party'],
)[0]
@frappe.whitelist()
def create_journal_entry_bts( bank_transaction_name, reference_number=None, reference_date=None, posting_date=None, entry_type=None,
second_account=None, mode_of_payment=None, party_type=None, party=None, allow_edit=None):
# Create a new journal entry based on the bank transaction
bank_transaction = frappe.db.get_values(
"Bank Transaction", bank_transaction_name,
fieldname=["name", "deposit", "withdrawal", "bank_account"] ,
as_dict=True
)[0]
company_account = frappe.get_value("Bank Account", bank_transaction.bank_account, "account")
account_type = frappe.db.get_value("Account", second_account, "account_type")
if account_type in ["Receivable", "Payable"]:
if not (party_type and party):
frappe.throw(_("Party Type and Party is required for Receivable / Payable account {0}").format( second_account))
accounts = []
# Multi Currency?
accounts.append({
"account": second_account,
"credit_in_account_currency": bank_transaction.deposit
if bank_transaction.deposit > 0
else 0,
"debit_in_account_currency":bank_transaction.withdrawal
if bank_transaction.withdrawal > 0
else 0,
"party_type":party_type,
"party":party,
})
accounts.append({
"account": company_account,
"bank_account": bank_transaction.bank_account,
"credit_in_account_currency": bank_transaction.withdrawal
if bank_transaction.withdrawal > 0
else 0,
"debit_in_account_currency":bank_transaction.deposit
if bank_transaction.deposit > 0
else 0,
})
company = frappe.get_value("Account", company_account, "company")
journal_entry_dict = {
"voucher_type" : entry_type,
"company" : company,
"posting_date" : posting_date,
"cheque_date" : reference_date,
"cheque_no" : reference_number,
"mode_of_payment" : mode_of_payment
}
journal_entry = frappe.new_doc('Journal Entry')
journal_entry.update(journal_entry_dict)
journal_entry.set("accounts", accounts)
if allow_edit:
return journal_entry
journal_entry.insert()
journal_entry.submit()
if bank_transaction.deposit > 0:
paid_amount = bank_transaction.deposit
else:
paid_amount = bank_transaction.withdrawal
vouchers = json.dumps([{
"payment_doctype":"Journal Entry",
"payment_name":journal_entry.name,
"amount":paid_amount}])
return reconcile_vouchers(bank_transaction.name, vouchers)
@frappe.whitelist()
def create_payment_entry_bts( bank_transaction_name, reference_number=None, reference_date=None, party_type=None, party=None, posting_date=None,
mode_of_payment=None, project=None, cost_center=None, allow_edit=None):
# Create a new payment entry based on the bank transaction
bank_transaction = frappe.db.get_values(
"Bank Transaction", bank_transaction_name,
fieldname=["name", "unallocated_amount", "deposit", "bank_account"] ,
as_dict=True
)[0]
paid_amount = bank_transaction.unallocated_amount
payment_type = "Receive" if bank_transaction.deposit > 0 else "Pay"
company_account = frappe.get_value("Bank Account", bank_transaction.bank_account, "account")
company = frappe.get_value("Account", company_account, "company")
payment_entry_dict = {
"company" : company,
"payment_type" : payment_type,
"reference_no" : reference_number,
"reference_date" : reference_date,
"party_type" : party_type,
"party" : party,
"posting_date" : posting_date,
"paid_amount": paid_amount,
"received_amount": paid_amount
}
payment_entry = frappe.new_doc("Payment Entry")
payment_entry.update(payment_entry_dict)
if mode_of_payment:
payment_entry.mode_of_payment = mode_of_payment
if project:
payment_entry.project = project
if cost_center:
payment_entry.cost_center = cost_center
if payment_type == "Receive":
payment_entry.paid_to = company_account
else:
payment_entry.paid_from = company_account
payment_entry.validate()
if allow_edit:
return payment_entry
payment_entry.insert()
payment_entry.submit()
vouchers = json.dumps([{
"payment_doctype":"Payment Entry",
"payment_name":payment_entry.name,
"amount":paid_amount}])
return reconcile_vouchers(bank_transaction.name, vouchers)
@frappe.whitelist()
def reconcile_vouchers(bank_transaction_name, vouchers):
# updated clear date of all the vouchers based on the bank transaction
vouchers = json.loads(vouchers)
transaction = frappe.get_doc("Bank Transaction", bank_transaction_name)
if transaction.unallocated_amount == 0:
frappe.throw(_("This bank transaction is already fully reconciled"))
total_amount = 0
for voucher in vouchers:
voucher['payment_entry'] = frappe.get_doc(voucher['payment_doctype'], voucher['payment_name'])
total_amount += get_paid_amount(frappe._dict({
'payment_document': voucher['payment_doctype'],
'payment_entry': voucher['payment_name'],
}), transaction.currency)
if total_amount > transaction.unallocated_amount:
frappe.throw(_("The Sum Total of Amounts of All Selected Vouchers Should be Less than the Unallocated Amount of the Bank Transaction"))
account = frappe.db.get_value("Bank Account", transaction.bank_account, "account")
for voucher in vouchers:
gl_entry = frappe.db.get_value("GL Entry", dict(account=account, voucher_type=voucher['payment_doctype'], voucher_no=voucher['payment_name']), ['credit', 'debit'], as_dict=1)
gl_amount, transaction_amount = (gl_entry.credit, transaction.deposit) if gl_entry.credit > 0 else (gl_entry.debit, transaction.withdrawal)
allocated_amount = gl_amount if gl_amount >= transaction_amount else transaction_amount
transaction.append("payment_entries", {
"payment_document": voucher['payment_entry'].doctype,
"payment_entry": voucher['payment_entry'].name,
"allocated_amount": allocated_amount
})
transaction.save()
transaction.update_allocations()
return frappe.get_doc("Bank Transaction", bank_transaction_name)
@frappe.whitelist()
def get_linked_payments(bank_transaction_name, document_types = None):
# get all matching payments for a bank transaction
transaction = frappe.get_doc("Bank Transaction", bank_transaction_name)
bank_account = frappe.db.get_values(
"Bank Account",
transaction.bank_account,
["account", "company"],
as_dict=True)[0]
(account, company) = (bank_account.account, bank_account.company)
matching = check_matching(account, company, transaction, document_types)
return matching
def check_matching(bank_account, company, transaction, document_types):
# combine all types of vocuhers
subquery = get_queries(bank_account, company, transaction, document_types)
filters = {
"amount": transaction.unallocated_amount,
"payment_type" : "Receive" if transaction.deposit > 0 else "Pay",
"reference_no": transaction.reference_number,
"party_type": transaction.party_type,
"party": transaction.party,
"bank_account": bank_account
}
matching_vouchers = []
for query in subquery:
matching_vouchers.extend(
frappe.db.sql(query, filters,)
)
return sorted(matching_vouchers, key = lambda x: x[0], reverse=True) if matching_vouchers else []
def get_queries(bank_account, company, transaction, document_types):
# get queries to get matching vouchers
amount_condition = "=" if "exact_match" in document_types else "<="
account_from_to = "paid_to" if transaction.deposit > 0 else "paid_from"
queries = []
if "payment_entry" in document_types:
pe_amount_matching = get_pe_matching_query(amount_condition, account_from_to, transaction)
queries.extend([pe_amount_matching])
if "journal_entry" in document_types:
je_amount_matching = get_je_matching_query(amount_condition, transaction)
queries.extend([je_amount_matching])
if transaction.deposit > 0 and "sales_invoice" in document_types:
si_amount_matching = get_si_matching_query(amount_condition)
queries.extend([si_amount_matching])
if transaction.withdrawal > 0:
if "purchase_invoice" in document_types:
pi_amount_matching = get_pi_matching_query(amount_condition)
queries.extend([pi_amount_matching])
if "expense_claim" in document_types:
ec_amount_matching = get_ec_matching_query(bank_account, company, amount_condition)
queries.extend([ec_amount_matching])
return queries
def get_pe_matching_query(amount_condition, account_from_to, transaction):
# get matching payment entries query
if transaction.deposit > 0:
currency_field = "paid_to_account_currency as currency"
else:
currency_field = "paid_from_account_currency as currency"
return f"""
SELECT
(CASE WHEN reference_no=%(reference_no)s THEN 1 ELSE 0 END
+ CASE WHEN (party_type = %(party_type)s AND party = %(party)s ) THEN 1 ELSE 0 END
+ 1 ) AS rank,
'Payment Entry' as doctype,
name,
paid_amount,
reference_no,
reference_date,
party,
party_type,
posting_date,
{currency_field}
FROM
`tabPayment Entry`
WHERE
paid_amount {amount_condition} %(amount)s
AND docstatus = 1
AND payment_type IN (%(payment_type)s, 'Internal Transfer')
AND ifnull(clearance_date, '') = ""
AND {account_from_to} = %(bank_account)s
"""
def get_je_matching_query(amount_condition, transaction):
# get matching journal entry query
cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit"
return f"""
SELECT
(CASE WHEN je.cheque_no=%(reference_no)s THEN 1 ELSE 0 END
+ 1) AS rank ,
'Journal Entry' as doctype,
je.name,
jea.{cr_or_dr}_in_account_currency as paid_amount,
je.cheque_no as reference_no,
je.cheque_date as reference_date,
je.pay_to_recd_from as party,
jea.party_type,
je.posting_date,
jea.account_currency as currency
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.{cr_or_dr}_in_account_currency {amount_condition} %(amount)s
AND je.docstatus = 1
"""
def get_si_matching_query(amount_condition):
# get matchin sales invoice query
return f"""
SELECT
( CASE WHEN si.customer = %(party)s THEN 1 ELSE 0 END
+ 1 ) AS rank,
'Sales Invoice' as doctype,
si.name,
sip.amount as paid_amount,
'' as reference_no,
'' as reference_date,
si.customer as party,
'Customer' as party_type,
si.posting_date,
si.currency
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 = %(bank_account)s
AND sip.amount {amount_condition} %(amount)s
AND si.docstatus = 1
"""
def get_pi_matching_query(amount_condition):
# get matching purchase invoice query
return f"""
SELECT
( CASE WHEN supplier = %(party)s THEN 1 ELSE 0 END
+ 1 ) AS rank,
'Purchase Invoice' as doctype,
name,
paid_amount,
'' as reference_no,
'' as reference_date,
supplier as party,
'Supplier' as party_type,
posting_date,
currency
FROM
`tabPurchase Invoice`
WHERE
paid_amount {amount_condition} %(amount)s
AND docstatus = 1
AND is_paid = 1
AND ifnull(clearance_date, '') = ""
AND cash_bank_account = %(bank_account)s
"""
def get_ec_matching_query(bank_account, company, amount_condition):
# get matching Expense Claim query
mode_of_payments = [x["parent"] for x in frappe.db.get_list("Mode of Payment Account",
filters={"default_account": bank_account}, fields=["parent"])]
mode_of_payments = '(\'' + '\', \''.join(mode_of_payments) + '\' )'
company_currency = get_company_currency(company)
return f"""
SELECT
( CASE WHEN employee = %(party)s THEN 1 ELSE 0 END
+ 1 ) AS rank,
'Expense Claim' as doctype,
name,
total_sanctioned_amount as paid_amount,
'' as reference_no,
'' as reference_date,
employee as party,
'Employee' as party_type,
posting_date,
'{company_currency}' as currency
FROM
`tabExpense Claim`
WHERE
total_sanctioned_amount {amount_condition} %(amount)s
AND docstatus = 1
AND is_paid = 1
AND ifnull(clearance_date, '') = ""
AND mode_of_payment in {mode_of_payments}
"""

View File

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

View File

@@ -0,0 +1,3 @@
.warnings .warning {
margin-bottom: 40px;
}

View File

@@ -0,0 +1,574 @@
// Copyright (c) 2019, Frappe Technologies and contributors
// For license information, please see license.txt
frappe.ui.form.on("Bank Statement Import", {
setup(frm) {
frappe.realtime.on("data_import_refresh", ({ data_import }) => {
frm.import_in_progress = false;
if (data_import !== frm.doc.name) return;
frappe.model.clear_doc("Bank Statement Import", frm.doc.name);
frappe.model
.with_doc("Bank Statement Import", frm.doc.name)
.then(() => {
frm.refresh();
});
});
frappe.realtime.on("data_import_progress", (data) => {
frm.import_in_progress = true;
if (data.data_import !== frm.doc.name) {
return;
}
let percent = Math.floor((data.current * 100) / data.total);
let seconds = Math.floor(data.eta);
let minutes = Math.floor(data.eta / 60);
let eta_message =
// prettier-ignore
seconds < 60
? __('About {0} seconds remaining', [seconds])
: minutes === 1
? __('About {0} minute remaining', [minutes])
: __('About {0} minutes remaining', [minutes]);
let message;
if (data.success) {
let message_args = [data.current, data.total, eta_message];
message =
frm.doc.import_type === "Insert New Records"
? __("Importing {0} of {1}, {2}", message_args)
: __("Updating {0} of {1}, {2}", message_args);
}
if (data.skipping) {
message = __(
"Skipping {0} of {1}, {2}",
[
data.current,
data.total,
eta_message,
]
);
}
frm.dashboard.show_progress(
__("Import Progress"),
percent,
message
);
frm.page.set_indicator(__("In Progress"), "orange");
// hide progress when complete
if (data.current === data.total) {
setTimeout(() => {
frm.dashboard.hide();
frm.refresh();
}, 2000);
}
});
frm.set_query("reference_doctype", () => {
return {
filters: {
name: ["in", frappe.boot.user.can_import],
},
};
});
frm.get_field("import_file").df.options = {
restrictions: {
allowed_file_types: [".csv", ".xls", ".xlsx"],
},
};
frm.has_import_file = () => {
return frm.doc.import_file || frm.doc.google_sheets_url;
};
},
refresh(frm) {
frm.page.hide_icon_group();
frm.trigger("update_indicators");
frm.trigger("import_file");
frm.trigger("show_import_log");
frm.trigger("show_import_warnings");
frm.trigger("toggle_submit_after_import");
frm.trigger("show_import_status");
frm.trigger("show_report_error_button");
if (frm.doc.status === "Partial Success") {
frm.add_custom_button(__("Export Errored Rows"), () =>
frm.trigger("export_errored_rows")
);
}
if (frm.doc.status.includes("Success")) {
frm.add_custom_button(
__("Go to {0} List", [frm.doc.reference_doctype]),
() => frappe.set_route("List", frm.doc.reference_doctype)
);
}
},
onload_post_render(frm) {
frm.trigger("update_primary_action");
},
update_primary_action(frm) {
if (frm.is_dirty()) {
frm.enable_save();
return;
}
frm.disable_save();
if (frm.doc.status !== "Success") {
if (!frm.is_new() && frm.has_import_file()) {
let label =
frm.doc.status === "Pending"
? __("Start Import")
: __("Retry");
frm.page.set_primary_action(label, () =>
frm.events.start_import(frm)
);
} else {
frm.page.set_primary_action(__("Save"), () => frm.save());
}
}
},
update_indicators(frm) {
const indicator = frappe.get_indicator(frm.doc);
if (indicator) {
frm.page.set_indicator(indicator[0], indicator[1]);
} else {
frm.page.clear_indicator();
}
},
show_import_status(frm) {
let import_log = JSON.parse(frm.doc.import_log || "[]");
let successful_records = import_log.filter((log) => log.success);
let failed_records = import_log.filter((log) => !log.success);
if (successful_records.length === 0) return;
let message;
if (failed_records.length === 0) {
let message_args = [successful_records.length];
if (frm.doc.import_type === "Insert New Records") {
message =
successful_records.length > 1
? __("Successfully imported {0} records.", message_args)
: __("Successfully imported {0} record.", message_args);
} else {
message =
successful_records.length > 1
? __("Successfully updated {0} records.", message_args)
: __("Successfully updated {0} record.", message_args);
}
} else {
let message_args = [successful_records.length, import_log.length];
if (frm.doc.import_type === "Insert New Records") {
message =
successful_records.length > 1
? __(
"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
)
: __(
"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
);
} else {
message =
successful_records.length > 1
? __(
"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
)
: __(
"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
);
}
}
frm.dashboard.set_headline(message);
},
show_report_error_button(frm) {
if (frm.doc.status === "Error") {
frappe.db
.get_list("Error Log", {
filters: { method: frm.doc.name },
fields: ["method", "error"],
order_by: "creation desc",
limit: 1,
})
.then((result) => {
if (result.length > 0) {
frm.add_custom_button("Report Error", () => {
let fake_xhr = {
responseText: JSON.stringify({
exc: result[0].error,
}),
};
frappe.request.report_error(fake_xhr, {});
});
}
});
}
},
start_import(frm) {
frm.call({
method: "form_start_import",
args: { data_import: frm.doc.name },
btn: frm.page.btn_primary,
}).then((r) => {
if (r.message === true) {
frm.disable_save();
}
});
},
download_template() {
let method =
"/api/method/frappe.core.doctype.data_import.data_import.download_template";
open_url_post(method, {
doctype: "Bank Transaction",
export_records: "5_records",
export_fields: {
"Bank Transaction": [
"date",
"deposit",
"withdrawal",
"description",
"reference_number",
],
},
});
},
reference_doctype(frm) {
frm.trigger("toggle_submit_after_import");
},
toggle_submit_after_import(frm) {
frm.toggle_display("submit_after_import", false);
let doctype = frm.doc.reference_doctype;
if (doctype) {
frappe.model.with_doctype(doctype, () => {
let meta = frappe.get_meta(doctype);
frm.toggle_display("submit_after_import", meta.is_submittable);
});
}
},
google_sheets_url(frm) {
if (!frm.is_dirty()) {
frm.trigger("import_file");
} else {
frm.trigger("update_primary_action");
}
},
refresh_google_sheet(frm) {
frm.trigger("import_file");
},
import_file(frm) {
frm.toggle_display("section_import_preview", frm.has_import_file());
if (!frm.has_import_file()) {
frm.get_field("import_preview").$wrapper.empty();
return;
} else {
frm.trigger("update_primary_action");
}
// load import preview
frm.get_field("import_preview").$wrapper.empty();
$('<span class="text-muted">')
.html(__("Loading import file..."))
.appendTo(frm.get_field("import_preview").$wrapper);
frm.call({
method: "get_preview_from_template",
args: {
data_import: frm.doc.name,
import_file: frm.doc.import_file,
google_sheets_url: frm.doc.google_sheets_url,
},
error_handlers: {
TimestampMismatchError() {
// ignore this error
},
},
}).then((r) => {
let preview_data = r.message;
frm.events.show_import_preview(frm, preview_data);
frm.events.show_import_warnings(frm, preview_data);
});
},
// method: 'frappe.core.doctype.data_import.data_import.get_preview_from_template',
show_import_preview(frm, preview_data) {
let import_log = JSON.parse(frm.doc.import_log || "[]");
if (
frm.import_preview &&
frm.import_preview.doctype === frm.doc.reference_doctype
) {
frm.import_preview.preview_data = preview_data;
frm.import_preview.import_log = import_log;
frm.import_preview.refresh();
return;
}
frappe.require("/assets/js/data_import_tools.min.js", () => {
frm.import_preview = new frappe.data_import.ImportPreview({
wrapper: frm.get_field("import_preview").$wrapper,
doctype: frm.doc.reference_doctype,
preview_data,
import_log,
frm,
events: {
remap_column(changed_map) {
let template_options = JSON.parse(
frm.doc.template_options || "{}"
);
template_options.column_to_field_map =
template_options.column_to_field_map || {};
Object.assign(
template_options.column_to_field_map,
changed_map
);
frm.set_value(
"template_options",
JSON.stringify(template_options)
);
frm.save().then(() => frm.trigger("import_file"));
},
},
});
});
},
export_errored_rows(frm) {
open_url_post(
"/api/method/frappe.core.doctype.data_import.data_import.download_errored_template",
{
data_import_name: frm.doc.name,
}
);
},
show_import_warnings(frm, preview_data) {
let columns = preview_data.columns;
let warnings = JSON.parse(frm.doc.template_warnings || "[]");
warnings = warnings.concat(preview_data.warnings || []);
frm.toggle_display("import_warnings_section", warnings.length > 0);
if (warnings.length === 0) {
frm.get_field("import_warnings").$wrapper.html("");
return;
}
// group warnings by row
let warnings_by_row = {};
let other_warnings = [];
for (let warning of warnings) {
if (warning.row) {
warnings_by_row[warning.row] =
warnings_by_row[warning.row] || [];
warnings_by_row[warning.row].push(warning);
} else {
other_warnings.push(warning);
}
}
let html = "";
html += Object.keys(warnings_by_row)
.map((row_number) => {
let message = warnings_by_row[row_number]
.map((w) => {
if (w.field) {
let label =
w.field.label +
(w.field.parent !== frm.doc.reference_doctype
? ` (${w.field.parent})`
: "");
return `<li>${label}: ${w.message}</li>`;
}
return `<li>${w.message}</li>`;
})
.join("");
return `
<div class="warning" data-row="${row_number}">
<h5 class="text-uppercase">${__("Row {0}", [row_number])}</h5>
<div class="body"><ul>${message}</ul></div>
</div>
`;
})
.join("");
html += other_warnings
.map((warning) => {
let header = "";
if (warning.col) {
let column_number = `<span class="text-uppercase">${__(
"Column {0}",
[warning.col]
)}</span>`;
let column_header = columns[warning.col].header_title;
header = `${column_number} (${column_header})`;
}
return `
<div class="warning" data-col="${warning.col}">
<h5>${header}</h5>
<div class="body">${warning.message}</div>
</div>
`;
})
.join("");
frm.get_field("import_warnings").$wrapper.html(`
<div class="row">
<div class="col-sm-10 warnings">${html}</div>
</div>
`);
},
show_failed_logs(frm) {
frm.trigger("show_import_log");
},
show_import_log(frm) {
let import_log = JSON.parse(frm.doc.import_log || "[]");
let logs = import_log;
frm.toggle_display("import_log", false);
frm.toggle_display("import_log_section", logs.length > 0);
if (logs.length === 0) {
frm.get_field("import_log_preview").$wrapper.empty();
return;
}
let rows = logs
.map((log) => {
let html = "";
if (log.success) {
if (frm.doc.import_type === "Insert New Records") {
html = __(
"Successfully imported {0}", [
`<span class="underline">${frappe.utils.get_form_link(
frm.doc.reference_doctype,
log.docname,
true
)}<span>`,
]
);
} else {
html = __(
"Successfully updated {0}", [
`<span class="underline">${frappe.utils.get_form_link(
frm.doc.reference_doctype,
log.docname,
true
)}<span>`,
]
);
}
} else {
let messages = log.messages
.map(JSON.parse)
.map((m) => {
let title = m.title
? `<strong>${m.title}</strong>`
: "";
let message = m.message
? `<div>${m.message}</div>`
: "";
return title + message;
})
.join("");
let id = frappe.dom.get_unique_id();
html = `${messages}
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#${id}" aria-expanded="false" aria-controls="${id}" style="margin-top: 15px;">
${__("Show Traceback")}
</button>
<div class="collapse" id="${id}" style="margin-top: 15px;">
<div class="well">
<pre>${log.exception}</pre>
</div>
</div>`;
}
let indicator_color = log.success ? "green" : "red";
let title = log.success ? __("Success") : __("Failure");
if (frm.doc.show_failed_logs && log.success) {
return "";
}
return `<tr>
<td>${log.row_indexes.join(", ")}</td>
<td>
<div class="indicator ${indicator_color}">${title}</div>
</td>
<td>
${html}
</td>
</tr>`;
})
.join("");
if (!rows && frm.doc.show_failed_logs) {
rows = `<tr><td class="text-center text-muted" colspan=3>
${__("No failed logs")}
</td></tr>`;
}
frm.get_field("import_log_preview").$wrapper.html(`
<table class="table table-bordered">
<tr class="text-muted">
<th width="10%">${__("Row Number")}</th>
<th width="10%">${__("Status")}</th>
<th width="80%">${__("Message")}</th>
</tr>
${rows}
</table>
`);
},
show_missing_link_values(frm, missing_link_values) {
let can_be_created_automatically = missing_link_values.every(
(d) => d.has_one_mandatory_field
);
let html = missing_link_values
.map((d) => {
let doctype = d.doctype;
let values = d.missing_values;
return `
<h5>${doctype}</h5>
<ul>${values.map((v) => `<li>${v}</li>`).join("")}</ul>
`;
})
.join("");
if (can_be_created_automatically) {
// prettier-ignore
let message = __('There are some linked records which needs to be created before we can import your file. Do you want to create the following missing records automatically?');
frappe.confirm(message + html, () => {
frm.call("create_missing_link_values", {
missing_link_values,
}).then((r) => {
let records = r.message;
frappe.msgprint(__(
"Created {0} records successfully.", [
records.length,
]
));
});
});
} else {
frappe.msgprint(
// prettier-ignore
__('The following records needs to be created before we can import your file.') + html
);
}
},
});

View File

@@ -0,0 +1,227 @@
{
"actions": [],
"autoname": "format:Bank Statement Import on {creation}",
"beta": 1,
"creation": "2019-08-04 14:16:08.318714",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"company",
"bank_account",
"bank",
"column_break_4",
"google_sheets_url",
"refresh_google_sheet",
"html_5",
"import_file",
"download_template",
"status",
"template_options",
"import_warnings_section",
"template_warnings",
"import_warnings",
"section_import_preview",
"import_preview",
"import_log_section",
"import_log",
"show_failed_logs",
"import_log_preview",
"reference_doctype",
"import_type",
"submit_after_import",
"mute_emails"
],
"fields": [
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"reqd": 1,
"set_only_once": 1
},
{
"fieldname": "bank_account",
"fieldtype": "Link",
"label": "Bank Account",
"options": "Bank Account",
"reqd": 1,
"set_only_once": 1
},
{
"depends_on": "eval:doc.bank_account",
"fetch_from": "bank_account.bank",
"fieldname": "bank",
"fieldtype": "Link",
"label": "Bank",
"options": "Bank",
"read_only": 1,
"set_only_once": 1
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "download_template",
"fieldtype": "Button",
"label": "Download Template"
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "import_file",
"fieldtype": "Attach",
"in_list_view": 1,
"label": "Import File"
},
{
"fieldname": "import_preview",
"fieldtype": "HTML",
"label": "Import Preview"
},
{
"fieldname": "section_import_preview",
"fieldtype": "Section Break",
"label": "Preview"
},
{
"fieldname": "template_options",
"fieldtype": "Code",
"hidden": 1,
"label": "Template Options",
"options": "JSON",
"read_only": 1
},
{
"fieldname": "import_log",
"fieldtype": "Code",
"label": "Import Log",
"options": "JSON"
},
{
"fieldname": "import_log_section",
"fieldtype": "Section Break",
"label": "Import Log"
},
{
"fieldname": "import_log_preview",
"fieldtype": "HTML",
"label": "Import Log Preview"
},
{
"default": "Pending",
"fieldname": "status",
"fieldtype": "Select",
"hidden": 1,
"label": "Status",
"options": "Pending\nSuccess\nPartial Success\nError",
"read_only": 1
},
{
"fieldname": "template_warnings",
"fieldtype": "Code",
"hidden": 1,
"label": "Template Warnings",
"options": "JSON"
},
{
"fieldname": "import_warnings_section",
"fieldtype": "Section Break",
"label": "Import File Errors and Warnings"
},
{
"fieldname": "import_warnings",
"fieldtype": "HTML",
"label": "Import Warnings"
},
{
"default": "0",
"fieldname": "show_failed_logs",
"fieldtype": "Check",
"label": "Show Failed Logs"
},
{
"depends_on": "eval:!doc.__islocal && !doc.import_file",
"fieldname": "html_5",
"fieldtype": "HTML",
"options": "<h5 class=\"text-muted uppercase\">Or</h5>"
},
{
"depends_on": "eval:!doc.__islocal && !doc.import_file\n",
"description": "Must be a publicly accessible Google Sheets URL",
"fieldname": "google_sheets_url",
"fieldtype": "Data",
"label": "Import from Google Sheets"
},
{
"depends_on": "eval:doc.google_sheets_url && !doc.__unsaved",
"fieldname": "refresh_google_sheet",
"fieldtype": "Button",
"label": "Refresh Google Sheet"
},
{
"default": "Bank Transaction",
"fieldname": "reference_doctype",
"fieldtype": "Link",
"hidden": 1,
"in_list_view": 1,
"label": "Document Type",
"options": "DocType",
"reqd": 1,
"set_only_once": 1
},
{
"default": "Insert New Records",
"fieldname": "import_type",
"fieldtype": "Select",
"hidden": 1,
"in_list_view": 1,
"label": "Import Type",
"options": "\nInsert New Records\nUpdate Existing Records",
"reqd": 1,
"set_only_once": 1
},
{
"default": "1",
"fieldname": "submit_after_import",
"fieldtype": "Check",
"hidden": 1,
"label": "Submit After Import",
"set_only_once": 1
},
{
"default": "1",
"fieldname": "mute_emails",
"fieldtype": "Check",
"hidden": 1,
"label": "Don't Send Emails",
"set_only_once": 1
},
{
"fieldname": "column_break_4",
"fieldtype": "Column Break"
}
],
"hide_toolbar": 1,
"links": [],
"modified": "2021-02-10 19:29:59.027325",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Import",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -0,0 +1,205 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import csv
import json
import re
import openpyxl
from openpyxl.styles import Font
from openpyxl.utils import get_column_letter
from six import string_types
import frappe
from frappe.core.doctype.data_import.importer import Importer, ImportFile
from frappe.utils.background_jobs import enqueue
from frappe.utils.xlsxutils import handle_html, ILLEGAL_CHARACTERS_RE
from frappe import _
from frappe.core.doctype.data_import.data_import import DataImport
class BankStatementImport(DataImport):
def __init__(self, *args, **kwargs):
super(BankStatementImport, self).__init__(*args, **kwargs)
def validate(self):
doc_before_save = self.get_doc_before_save()
if (
not (self.import_file or self.google_sheets_url)
or (doc_before_save and doc_before_save.import_file != self.import_file)
or (doc_before_save and doc_before_save.google_sheets_url != self.google_sheets_url)
):
template_options_dict = {}
column_to_field_map = {}
bank = frappe.get_doc("Bank", self.bank)
for i in bank.bank_transaction_mapping:
column_to_field_map[i.file_field] = i.bank_transaction_field
template_options_dict["column_to_field_map"] = column_to_field_map
self.template_options = json.dumps(template_options_dict)
self.template_warnings = ""
self.validate_import_file()
self.validate_google_sheets_url()
def start_import(self):
from frappe.core.page.background_jobs.background_jobs import get_info
from frappe.utils.scheduler import is_scheduler_inactive
if is_scheduler_inactive() and not frappe.flags.in_test:
frappe.throw(
_("Scheduler is inactive. Cannot import data."), title=_("Scheduler Inactive")
)
enqueued_jobs = [d.get("job_name") for d in get_info()]
if self.name not in enqueued_jobs:
enqueue(
start_import,
queue="default",
timeout=6000,
event="data_import",
job_name=self.name,
data_import=self.name,
bank_account=self.bank_account,
import_file_path=self.import_file,
bank=self.bank,
template_options=self.template_options,
now=frappe.conf.developer_mode or frappe.flags.in_test,
)
return True
return False
@frappe.whitelist()
def get_preview_from_template(data_import, import_file=None, google_sheets_url=None):
return frappe.get_doc("Bank Statement Import", data_import).get_preview_from_template(
import_file, google_sheets_url
)
@frappe.whitelist()
def form_start_import(data_import):
return frappe.get_doc("Bank Statement Import", data_import).start_import()
@frappe.whitelist()
def download_errored_template(data_import_name):
data_import = frappe.get_doc("Bank Statement Import", data_import_name)
data_import.export_errored_rows()
def start_import(data_import, bank_account, import_file_path, bank, template_options):
"""This method runs in background job"""
update_mapping_db(bank, template_options)
data_import = frappe.get_doc("Bank Statement Import", data_import)
import_file = ImportFile("Bank Transaction", file = import_file_path, import_type="Insert New Records")
data = import_file.raw_data
add_bank_account(data, bank_account)
write_files(import_file, data)
try:
i = Importer(data_import.reference_doctype, data_import=data_import)
i.import_data()
except Exception:
frappe.db.rollback()
data_import.db_set("status", "Error")
frappe.log_error(title=data_import.name)
finally:
frappe.flags.in_import = False
frappe.publish_realtime("data_import_refresh", {"data_import": data_import.name})
def update_mapping_db(bank, template_options):
bank = frappe.get_doc("Bank", bank)
for d in bank.bank_transaction_mapping:
d.delete()
for d in json.loads(template_options)["column_to_field_map"].items():
bank.append("bank_transaction_mapping", {"bank_transaction_field": d[1] ,"file_field": d[0]} )
bank.save()
def add_bank_account(data, bank_account):
bank_account_loc = None
if "Bank Account" not in data[0]:
data[0].append("Bank Account")
else:
for loc, header in enumerate(data[0]):
if header == "Bank Account":
bank_account_loc = loc
for row in data[1:]:
if bank_account_loc:
row[bank_account_loc] = bank_account
else:
row.append(bank_account)
def write_files(import_file, data):
full_file_path = import_file.file_doc.get_full_path()
parts = import_file.file_doc.get_extension()
extension = parts[1]
extension = extension.lstrip(".")
if extension == "csv":
with open(full_file_path, 'w', newline='') as file:
writer = csv.writer(file)
writer.writerows(data)
elif extension == "xlsx" or "xls":
write_xlsx(data, "trans", file_path = full_file_path)
def write_xlsx(data, sheet_name, wb=None, column_widths=None, file_path=None):
# from xlsx utils with changes
column_widths = column_widths or []
if wb is None:
wb = openpyxl.Workbook(write_only=True)
ws = wb.create_sheet(sheet_name, 0)
for i, column_width in enumerate(column_widths):
if column_width:
ws.column_dimensions[get_column_letter(i + 1)].width = column_width
row1 = ws.row_dimensions[1]
row1.font = Font(name='Calibri', bold=True)
for row in data:
clean_row = []
for item in row:
if isinstance(item, string_types) and (sheet_name not in ['Data Import Template', 'Data Export']):
value = handle_html(item)
else:
value = item
if isinstance(item, string_types) and next(ILLEGAL_CHARACTERS_RE.finditer(value), None):
# Remove illegal characters from the string
value = re.sub(ILLEGAL_CHARACTERS_RE, '', value)
clean_row.append(value)
ws.append(clean_row)
wb.save(file_path)
return True
@frappe.whitelist()
def upload_bank_statement(**args):
args = frappe._dict(args)
bsi = frappe.new_doc("Bank Statement Import")
if args.company:
bsi.update({
"company": args.company,
})
if args.bank_account:
bsi.update({
"bank_account": args.bank_account
})
return bsi

View File

@@ -0,0 +1,36 @@
let imports_in_progress = [];
frappe.listview_settings['Bank Statement Import'] = {
onload(listview) {
frappe.realtime.on('data_import_progress', data => {
if (!imports_in_progress.includes(data.data_import)) {
imports_in_progress.push(data.data_import);
}
});
frappe.realtime.on('data_import_refresh', data => {
imports_in_progress = imports_in_progress.filter(
d => d !== data.data_import
);
listview.refresh();
});
},
get_indicator: function(doc) {
var colors = {
'Pending': 'orange',
'Not Started': 'orange',
'Partial Success': 'orange',
'Success': 'green',
'In Progress': 'orange',
'Error': 'red'
};
let status = doc.status;
if (imports_in_progress.includes(doc.name)) {
status = 'In Progress';
}
if (status == 'Pending') {
status = 'Not Started';
}
return [__(status), colors[status], 'status,=,' + doc.status];
},
hide_name_column: true
};

View File

@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestBankStatementImport(unittest.TestCase):
pass

View File

@@ -1,8 +0,0 @@
// Copyright (c) 2017, sathishpy@gmail.com and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Statement Settings', {
refresh: function(frm) {
}
});

View File

@@ -1,272 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 1,
"beta": 0,
"creation": "2017-11-13 13:38:10.863592",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank",
"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": "Bank Account",
"length": 0,
"no_copy": 0,
"options": "Bank",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "'%d/%m/%Y'",
"fieldname": "date_format",
"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": "Date Format",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "statement_header_mapping",
"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": "Statement Header Mapping",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "header_items",
"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": "Statement Headers",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Settings Item",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "transaction_data_mapping",
"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": "Transaction Data Mapping",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mapped_items",
"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": "Mapped Items",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Transaction Settings Item",
"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": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-04-07 18:57:04.048423",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Settings",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 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,
"apply_user_permissions": 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
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1,11 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class BankStatementSettings(Document):
def autoname(self):
self.name = self.bank + "-Statement-Settings"

View File

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

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestBankStatementSettings(unittest.TestCase):
pass

View File

@@ -1,101 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2018-01-08 00:16:42.762980",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mapped_header",
"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": "Mapped Header",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stmt_header",
"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": "Bank Header",
"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,
"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-01-08 00:19:14.841134",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Settings Item",
"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
}

View File

@@ -1,100 +0,0 @@
// Copyright (c) 2017, sathishpy@gmail.com and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Statement Transaction Entry', {
setup: function(frm) {
frm.events.account_filters(frm)
frm.events.invoice_filter(frm)
},
refresh: function(frm) {
frm.set_df_property("bank_account", "read_only", frm.doc.__islocal ? 0 : 1);
frm.set_df_property("from_date", "read_only", frm.doc.__islocal ? 0 : 1);
frm.set_df_property("to_date", "read_only", frm.doc.__islocal ? 0 : 1);
},
invoke_doc_function(frm, method) {
frappe.call({
doc: frm.doc,
method: method,
callback: function(r) {
if(!r.exe) {
frm.refresh_fields();
}
}
});
},
account_filters: function(frm) {
frm.fields_dict['bank_account'].get_query = function(doc, dt, dn) {
return {
filters:[
["Account", "account_type", "in", ["Bank"]]
]
}
};
frm.fields_dict['receivable_account'].get_query = function(doc, dt, dn) {
return {
filters: {"account_type": "Receivable"}
}
};
frm.fields_dict['payable_account'].get_query = function(doc, dt, dn) {
return {
filters: {"account_type": "Payable"}
}
};
},
invoice_filter: function(frm) {
frm.set_query("invoice", "payment_invoice_items", function(doc, cdt, cdn) {
let row = locals[cdt][cdn]
if (row.party_type == "Customer") {
return {
filters:[[row.invoice_type, "customer", "in", [row.party]],
[row.invoice_type, "status", "!=", "Cancelled" ],
[row.invoice_type, "posting_date", "<", row.transaction_date ],
[row.invoice_type, "outstanding_amount", ">", 0 ]]
}
} else if (row.party_type == "Supplier") {
return {
filters:[[row.invoice_type, "supplier", "in", [row.party]],
[row.invoice_type, "status", "!=", "Cancelled" ],
[row.invoice_type, "posting_date", "<", row.transaction_date ],
[row.invoice_type, "outstanding_amount", ">", 0 ]]
}
}
});
},
match_invoices: function(frm) {
frm.events.invoke_doc_function(frm, "populate_matching_invoices");
},
create_payments: function(frm) {
frm.events.invoke_doc_function(frm, "create_payment_entries");
},
submit_payments: function(frm) {
frm.events.invoke_doc_function(frm, "submit_payment_entries");
},
});
frappe.ui.form.on('Bank Statement Transaction Invoice Item', {
party_type: function(frm, cdt, cdn) {
let row = locals[cdt][cdn];
if (row.party_type == "Customer") {
row.invoice_type = "Sales Invoice";
} else if (row.party_type == "Supplier") {
row.invoice_type = "Purchase Invoice";
} else if (row.party_type == "Account") {
row.invoice_type = "Journal Entry";
}
refresh_field("invoice_type", row.name, "payment_invoice_items");
},
invoice_type: function(frm, cdt, cdn) {
let row = locals[cdt][cdn];
if (row.invoice_type == "Purchase Invoice") {
row.party_type = "Supplier";
} else if (row.invoice_type == "Sales Invoice") {
row.party_type = "Customer";
}
refresh_field("party_type", row.name, "payment_invoice_items");
}
});

View File

@@ -1,792 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 1,
"beta": 0,
"creation": "2017-11-07 13:48:13.123185",
"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_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": "Bank 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": "from_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "From 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": 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": "to_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "To 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": 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": "bank_settings",
"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": "Bank Statement Settings",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Settings",
"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_3",
"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": "bank",
"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": "Bank",
"length": 0,
"no_copy": 0,
"options": "Bank",
"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": "receivable_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": 0,
"label": "Receivable 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": "payable_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": 0,
"label": "Payable 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": "bank_statement",
"fieldtype": "Attach",
"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 Statement",
"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": "",
"fieldname": "section_break_6",
"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": "Bank Transaction Entries",
"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_transaction_items",
"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": "New Transactions",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Transaction Payment Item",
"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,
"depends_on": "eval:doc.new_transaction_items && doc.new_transaction_items.length",
"fieldname": "section_break_9",
"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,
"depends_on": "",
"fieldname": "match_invoices",
"fieldtype": "Button",
"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": "Match Transaction to Invoices",
"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": "column_break_14",
"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": "create_payments",
"fieldtype": "Button",
"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": "Create New Payment/Journal Entry",
"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": "column_break_16",
"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": "submit_payments",
"fieldtype": "Button",
"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": "Submit/Reconcile Payments",
"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": "eval:doc.new_transaction_items && doc.new_transaction_items.length",
"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,
"label": "Matching Invoices",
"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": "payment_invoice_items",
"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 Invoice Items",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Transaction Invoice Item",
"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": "reconciled_transactions",
"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": "Reconciled Transactions",
"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": "reconciled_transaction_items",
"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": "Reconciled Transactions",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Transaction Payment Item",
"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": "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 Statement Transaction Entry",
"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
}
],
"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": "2018-09-14 18:04:44.170455",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Transaction Entry",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 1,
"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": 1,
"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
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1,443 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from erpnext.accounts.utils import get_outstanding_invoices
from frappe.utils import nowdate
from datetime import datetime
import csv, os, re, io
import difflib
import copy
class BankStatementTransactionEntry(Document):
def autoname(self):
self.name = self.bank_account + "-" + self.from_date + "-" + self.to_date
if self.bank:
mapper_name = self.bank + "-Statement-Settings"
if not frappe.db.exists("Bank Statement Settings", mapper_name):
self.create_settings(self.bank)
self.bank_settings = mapper_name
def create_settings(self, bank):
mapper = frappe.new_doc("Bank Statement Settings")
mapper.bank = bank
mapper.date_format = "%Y-%m-%d"
mapper.bank_account = self.bank_account
for header in ["Date", "Particulars", "Withdrawals", "Deposits", "Balance"]:
header_item = mapper.append("header_items", {})
header_item.mapped_header = header_item.stmt_header = header
mapper.save()
def on_update(self):
if (not self.bank_statement):
self.reconciled_transaction_items = self.new_transaction_items = []
return
if len(self.new_transaction_items + self.reconciled_transaction_items) == 0:
self.populate_payment_entries()
else:
self.match_invoice_to_payment()
def validate(self):
if not self.new_transaction_items:
self.populate_payment_entries()
def get_statement_headers(self):
if not self.bank_settings:
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
def populate_payment_entries(self):
if self.bank_statement is None: return
file_url = self.bank_statement
if (len(self.new_transaction_items + self.reconciled_transaction_items) > 0):
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):
date_format = '%Y-%m-%d'
if self.bank_settings:
mapped_items = frappe.get_doc("Bank Statement Settings", self.bank_settings).mapped_items
statement_headers = self.get_statement_headers()
transactions = get_transaction_entries(file_url, statement_headers)
for entry in transactions:
date = entry[statement_headers["Date"]].strip()
#print("Processing entry DESC:{0}-W:{1}-D:{2}-DT:{3}".format(entry["Particulars"], entry["Withdrawals"], entry["Deposits"], entry["Date"]))
if (not date): continue
transaction_date = datetime.strptime(date, date_format).date()
if (self.from_date and transaction_date < datetime.strptime(self.from_date, '%Y-%m-%d').date()): continue
if (self.to_date and transaction_date > datetime.strptime(self.to_date, '%Y-%m-%d').date()): continue
bank_entry = self.append('new_transaction_items', {})
bank_entry.transaction_date = transaction_date
bank_entry.description = entry[statement_headers["Particulars"]]
mapped_item = next((entry for entry in mapped_items if entry.mapping_type == "Transaction" and frappe.safe_decode(entry.bank_data.lower()) in frappe.safe_decode(bank_entry.description.lower())), None)
if (mapped_item is not None):
bank_entry.party_type = mapped_item.mapped_data_type
bank_entry.party = mapped_item.mapped_data
else:
bank_entry.party_type = "Supplier" if not entry[statement_headers["Deposits"]].strip() else "Customer"
party_list = frappe.get_all(bank_entry.party_type, fields=["name"])
parties = [party.name for party in party_list]
matches = difflib.get_close_matches(frappe.safe_decode(bank_entry.description.lower()), parties, 1, 0.4)
if len(matches) > 0: bank_entry.party = matches[0]
bank_entry.amount = -float(entry[statement_headers["Withdrawals"]]) if not entry[statement_headers["Deposits"]].strip() else float(entry[statement_headers["Deposits"]])
self.map_unknown_transactions()
self.map_transactions_on_journal_entry()
def map_transactions_on_journal_entry(self):
for entry in self.new_transaction_items:
vouchers = frappe.db.sql("""select name, posting_date from `tabJournal Entry`
where posting_date='{0}' and total_credit={1} and cheque_no='{2}' and docstatus != 2
""".format(entry.transaction_date, abs(entry.amount), frappe.safe_decode(entry.description)), as_dict=True)
if (len(vouchers) == 1):
entry.reference_name = vouchers[0].name
def populate_matching_invoices(self):
self.payment_invoice_items = []
self.map_unknown_transactions()
added_invoices = []
for entry in self.new_transaction_items:
if (not entry.party or entry.party_type == "Account"): continue
account = self.receivable_account if entry.party_type == "Customer" else self.payable_account
invoices = get_outstanding_invoices(entry.party_type, entry.party, account)
transaction_date = datetime.strptime(entry.transaction_date, "%Y-%m-%d").date()
outstanding_invoices = [invoice for invoice in invoices if invoice.posting_date <= transaction_date]
amount = abs(entry.amount)
matching_invoices = [invoice for invoice in outstanding_invoices if invoice.outstanding_amount == amount]
sorted(outstanding_invoices, key=lambda k: k['posting_date'])
for e in (matching_invoices + outstanding_invoices):
added = next((inv for inv in added_invoices if inv == e.get('voucher_no')), None)
if (added is not None): continue
ent = self.append('payment_invoice_items', {})
ent.transaction_date = entry.transaction_date
ent.payment_description = frappe.safe_decode(entry.description)
ent.party_type = entry.party_type
ent.party = entry.party
ent.invoice = e.get('voucher_no')
added_invoices += [ent.invoice]
ent.invoice_type = "Sales Invoice" if entry.party_type == "Customer" else "Purchase Invoice"
ent.invoice_date = e.get('posting_date')
ent.outstanding_amount = e.get('outstanding_amount')
ent.allocated_amount = min(float(e.get('outstanding_amount')), amount)
amount -= float(e.get('outstanding_amount'))
if (amount <= 5): break
self.match_invoice_to_payment()
self.populate_matching_vouchers()
self.map_transactions_on_journal_entry()
def match_invoice_to_payment(self):
added_payments = []
for entry in self.new_transaction_items:
if (not entry.party or entry.party_type == "Account"): continue
entry.account = self.receivable_account if entry.party_type == "Customer" else self.payable_account
amount = abs(entry.amount)
payment, matching_invoices = None, []
for inv_entry in self.payment_invoice_items:
if (inv_entry.payment_description != frappe.safe_decode(entry.description) or inv_entry.transaction_date != entry.transaction_date): continue
if (inv_entry.party != entry.party): continue
matching_invoices += [inv_entry.invoice_type + "|" + inv_entry.invoice]
payment = get_payments_matching_invoice(inv_entry.invoice, entry.amount, entry.transaction_date)
doc = frappe.get_doc(inv_entry.invoice_type, inv_entry.invoice)
inv_entry.invoice_date = doc.posting_date
inv_entry.outstanding_amount = doc.outstanding_amount
inv_entry.allocated_amount = min(float(doc.outstanding_amount), amount)
amount -= inv_entry.allocated_amount
if (amount < 0): break
amount = abs(entry.amount)
if (payment is None):
order_doctype = "Sales Order" if entry.party_type=="Customer" else "Purchase Order"
from erpnext.controllers.accounts_controller import get_advance_payment_entries
payment_entries = get_advance_payment_entries(entry.party_type, entry.party, entry.account, order_doctype, against_all_orders=True)
payment_entries += self.get_matching_payments(entry.party, amount, entry.transaction_date)
payment = next((payment for payment in payment_entries if payment.amount == amount and payment not in added_payments), None)
if (payment is None):
print("Failed to find payments for {0}:{1}".format(entry.party, amount))
continue
added_payments += [payment]
entry.reference_type = payment.reference_type
entry.reference_name = payment.reference_name
entry.mode_of_payment = "Wire Transfer"
entry.outstanding_amount = min(amount, 0)
if (entry.payment_reference is None):
entry.payment_reference = frappe.safe_decode(entry.description)
entry.invoices = ",".join(matching_invoices)
#print("Matching payment is {0}:{1}".format(entry.reference_type, entry.reference_name))
def get_matching_payments(self, party, amount, pay_date):
query = """select 'Payment Entry' as reference_type, name as reference_name, paid_amount as amount
from `tabPayment Entry` where party='{0}' and paid_amount={1} and posting_date='{2}' and docstatus != 2
""".format(party, amount, pay_date)
matching_payments = frappe.db.sql(query, as_dict=True)
return matching_payments
def map_unknown_transactions(self):
for entry in self.new_transaction_items:
if (entry.party): continue
inv_type = "Sales Invoice" if (entry.amount > 0) else "Purchase Invoice"
party_type = "customer" if (entry.amount > 0) else "supplier"
query = """select posting_date, name, {0}, outstanding_amount
from `tab{1}` where ROUND(outstanding_amount)={2} and posting_date < '{3}'
""".format(party_type, inv_type, round(abs(entry.amount)), entry.transaction_date)
invoices = frappe.db.sql(query, as_dict = True)
if(len(invoices) > 0):
entry.party = invoices[0].get(party_type)
def populate_matching_vouchers(self):
for entry in self.new_transaction_items:
if (not entry.party or entry.reference_name): continue
print("Finding matching voucher for {0}".format(frappe.safe_decode(entry.description)))
amount = abs(entry.amount)
invoices = []
vouchers = get_matching_journal_entries(self.from_date, self.to_date, entry.party, self.bank_account, amount)
if len(vouchers) == 0: continue
for voucher in vouchers:
added = next((entry.invoice for entry in self.payment_invoice_items if entry.invoice == voucher.voucher_no), None)
if (added):
print("Found voucher {0}".format(added))
continue
print("Adding voucher {0} {1} {2}".format(voucher.voucher_no, voucher.posting_date, voucher.debit))
ent = self.append('payment_invoice_items', {})
ent.invoice_date = voucher.posting_date
ent.invoice_type = "Journal Entry"
ent.invoice = voucher.voucher_no
ent.payment_description = frappe.safe_decode(entry.description)
ent.allocated_amount = max(voucher.debit, voucher.credit)
invoices += [ent.invoice_type + "|" + ent.invoice]
entry.reference_type = "Journal Entry"
entry.mode_of_payment = "Wire Transfer"
entry.reference_name = ent.invoice
#entry.account = entry.party
entry.invoices = ",".join(invoices)
break
def create_payment_entries(self):
for payment_entry in self.new_transaction_items:
if (not payment_entry.party): continue
if (payment_entry.reference_name): continue
print("Creating payment entry for {0}".format(frappe.safe_decode(payment_entry.description)))
if (payment_entry.party_type == "Account"):
payment = self.create_journal_entry(payment_entry)
invoices = [payment.doctype + "|" + payment.name]
payment_entry.invoices = ",".join(invoices)
else:
payment = self.create_payment_entry(payment_entry)
invoices = [entry.reference_doctype + "|" + entry.reference_name for entry in payment.references if entry is not None]
payment_entry.invoices = ",".join(invoices)
payment_entry.mode_of_payment = payment.mode_of_payment
payment_entry.account = self.receivable_account if payment_entry.party_type == "Customer" else self.payable_account
payment_entry.reference_name = payment.name
payment_entry.reference_type = payment.doctype
frappe.msgprint(_("Successfully created payment entries"))
def create_payment_entry(self, pe):
payment = frappe.new_doc("Payment Entry")
payment.posting_date = pe.transaction_date
payment.payment_type = "Receive" if pe.party_type == "Customer" else "Pay"
payment.mode_of_payment = "Wire Transfer"
payment.party_type = pe.party_type
payment.party = pe.party
payment.paid_to = self.bank_account if pe.party_type == "Customer" else self.payable_account
payment.paid_from = self.receivable_account if pe.party_type == "Customer" else self.bank_account
payment.paid_amount = payment.received_amount = abs(pe.amount)
payment.reference_no = pe.description
payment.reference_date = pe.transaction_date
payment.save()
for inv_entry in self.payment_invoice_items:
if (pe.description != inv_entry.payment_description or pe.transaction_date != inv_entry.transaction_date): continue
if (pe.party != inv_entry.party): continue
reference = payment.append("references", {})
reference.reference_doctype = inv_entry.invoice_type
reference.reference_name = inv_entry.invoice
reference.allocated_amount = inv_entry.allocated_amount
print ("Adding invoice {0} {1}".format(reference.reference_name, reference.allocated_amount))
payment.setup_party_account_field()
payment.set_missing_values()
#payment.set_exchange_rate()
#payment.set_amounts()
#print("Created payment entry {0}".format(payment.as_dict()))
payment.save()
return payment
def create_journal_entry(self, pe):
je = frappe.new_doc("Journal Entry")
je.is_opening = "No"
je.voucher_type = "Bank Entry"
je.cheque_no = pe.description
je.cheque_date = pe.transaction_date
je.remark = pe.description
je.posting_date = pe.transaction_date
if (pe.amount < 0):
je.append("accounts", {"account": pe.party, "debit_in_account_currency": abs(pe.amount)})
je.append("accounts", {"account": self.bank_account, "credit_in_account_currency": abs(pe.amount)})
else:
je.append("accounts", {"account": pe.party, "credit_in_account_currency": pe.amount})
je.append("accounts", {"account": self.bank_account, "debit_in_account_currency": pe.amount})
je.save()
return je
def update_payment_entry(self, payment):
lst = []
invoices = payment.invoices.strip().split(',')
if (len(invoices) == 0): return
amount = float(abs(payment.amount))
for invoice_entry in invoices:
if (not invoice_entry.strip()): continue
invs = invoice_entry.split('|')
invoice_type, invoice = invs[0], invs[1]
outstanding_amount = frappe.get_value(invoice_type, invoice, 'outstanding_amount')
lst.append(frappe._dict({
'voucher_type': payment.reference_type,
'voucher_no' : payment.reference_name,
'against_voucher_type' : invoice_type,
'against_voucher' : invoice,
'account' : payment.account,
'party_type': payment.party_type,
'party': frappe.get_value("Payment Entry", payment.reference_name, "party"),
'unadjusted_amount' : float(amount),
'allocated_amount' : min(outstanding_amount, amount)
}))
amount -= outstanding_amount
if lst:
from erpnext.accounts.utils import reconcile_against_document
try:
reconcile_against_document(lst)
except:
frappe.throw(_("Exception occurred while reconciling {0}").format(payment.reference_name))
def submit_payment_entries(self):
for payment in self.new_transaction_items:
if payment.reference_name is None: continue
doc = frappe.get_doc(payment.reference_type, payment.reference_name)
if doc.docstatus == 1:
if (payment.reference_type == "Journal Entry"): continue
if doc.unallocated_amount == 0: continue
print("Reconciling payment {0}".format(payment.reference_name))
self.update_payment_entry(payment)
else:
print("Submitting payment {0}".format(payment.reference_name))
if (payment.reference_type == "Payment Entry"):
if (payment.payment_reference):
doc.reference_no = payment.payment_reference
doc.mode_of_payment = payment.mode_of_payment
doc.save()
doc.submit()
self.move_reconciled_entries()
self.populate_matching_invoices()
def move_reconciled_entries(self):
idx = 0
while idx < len(self.new_transaction_items):
entry = self.new_transaction_items[idx]
try:
print("Checking transaction {0}: {2} in {1} entries".format(idx, len(self.new_transaction_items), frappe.safe_decode(entry.description)))
except UnicodeEncodeError:
pass
idx += 1
if entry.reference_name is None: continue
doc = frappe.get_doc(entry.reference_type, entry.reference_name)
if doc.docstatus == 1 and (entry.reference_type == "Journal Entry" or doc.unallocated_amount == 0):
self.remove(entry)
rc_entry = self.append('reconciled_transaction_items', {})
dentry = entry.as_dict()
dentry.pop('idx', None)
rc_entry.update(dentry)
idx -= 1
def get_matching_journal_entries(from_date, to_date, account, against, amount):
query = """select voucher_no, posting_date, account, against, debit_in_account_currency as debit, credit_in_account_currency as credit
from `tabGL Entry`
where posting_date between '{0}' and '{1}' and account = '{2}' and against = '{3}' and debit = '{4}'
""".format(from_date, to_date, account, against, amount)
jv_entries = frappe.db.sql(query, as_dict=True)
#print("voucher query:{0}\n Returned {1} entries".format(query, len(jv_entries)))
return jv_entries
def get_payments_matching_invoice(invoice, amount, pay_date):
query = """select pe.name as reference_name, per.reference_doctype as reference_type, per.outstanding_amount, per.allocated_amount
from `tabPayment Entry Reference` as per JOIN `tabPayment Entry` as pe on pe.name = per.parent
where per.reference_name='{0}' and (posting_date='{1}' or reference_date='{1}') and pe.docstatus != 2
""".format(invoice, pay_date)
payments = frappe.db.sql(query, as_dict=True)
if (len(payments) == 0): return
payment = next((payment for payment in payments if payment.allocated_amount == amount), payments[0])
#Hack: Update the reference type which is set to invoice type
payment.reference_type = "Payment Entry"
return payment
def is_headers_present(headers, row):
for header in headers:
if header not in row:
return False
return True
def get_header_index(headers, row):
header_index = {}
for header in headers:
if header in row:
header_index[header] = row.index(header)
return header_index
def get_transaction_info(headers, header_index, row):
transaction = {}
for header in headers:
transaction[header] = row[header_index[header]]
if (transaction[header] == None):
transaction[header] = ""
return transaction
def get_transaction_entries(file_url, headers):
header_index = {}
rows, transactions = [], []
if (file_url.lower().endswith("xlsx")):
from frappe.utils.xlsxutils import read_xlsx_file_from_attached_file
rows = read_xlsx_file_from_attached_file(file_url=file_url)
elif (file_url.lower().endswith("csv")):
from frappe.utils.csvutils import read_csv_content
_file = frappe.get_doc("File", {"file_url": file_url})
filepath = _file.get_full_path()
with open(filepath,'rb') as csvfile:
rows = read_csv_content(csvfile.read())
elif (file_url.lower().endswith("xls")):
filename = file_url.split("/")[-1]
rows = get_rows_from_xls_file(filename)
else:
frappe.throw(_("Only .csv and .xlsx files are supported currently"))
stmt_headers = headers.values()
for row in rows:
if len(row) == 0 or row[0] == None or not row[0]: continue
#print("Processing row {0}".format(row))
if header_index:
transaction = get_transaction_info(stmt_headers, header_index, row)
transactions.append(transaction)
elif is_headers_present(stmt_headers, row):
header_index = get_header_index(stmt_headers, row)
return transactions
def get_rows_from_xls_file(filename):
_file = frappe.get_doc("File", {"file_name": filename})
filepath = _file.get_full_path()
import xlrd
book = xlrd.open_workbook(filepath)
sheets = book.sheets()
rows = []
for row in range(1, sheets[0].nrows):
row_values = []
for col in range(1, sheets[0].ncols):
row_values.append(sheets[0].cell_value(row, col))
rows.append(row_values)
return rows

View File

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

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestBankStatementTransactionEntry(unittest.TestCase):
pass

View File

@@ -1,365 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2017-11-07 13:58:53.827058",
"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": "transaction_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": "Transaction 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": 4,
"fieldname": "payment_description",
"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": "Payment 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,
"fieldname": "party_type",
"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": "Party Type",
"length": 0,
"no_copy": 0,
"options": "Customer\nSupplier\nAccount",
"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": 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_4",
"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": 2,
"fieldname": "invoice_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Invoice Date",
"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": 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": "invoice_type",
"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": "Invoice Type",
"length": 0,
"no_copy": 0,
"options": "Sales Invoice\nPurchase Invoice\nJournal Entry",
"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": 2,
"fieldname": "invoice",
"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": "invoice",
"length": 0,
"no_copy": 0,
"options": "invoice_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": 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": 1,
"fieldname": "outstanding_amount",
"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": "Outstanding 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": 1,
"fieldname": "allocated_amount",
"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": "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
}
],
"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-09-14 19:03:30.949831",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Transaction Invoice Item",
"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

@@ -1,494 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2017-11-07 14:03:05.651413",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 1,
"fieldname": "transaction_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Transaction Date",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 4,
"fieldname": "description",
"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": "Description",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 1,
"fieldname": "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": "Amount",
"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,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 1,
"fieldname": "party_type",
"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": "Party Type",
"length": 0,
"no_copy": 0,
"options": "Customer\nSupplier\nAccount",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"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": 1,
"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,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "reference_type",
"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": "Reference Type",
"length": 0,
"no_copy": 0,
"options": "Payment Entry\nJournal Entry",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 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": 0,
"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": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mode_of_payment",
"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": "Mode of Payment",
"length": 0,
"no_copy": 0,
"options": "Mode of Payment",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "outstanding_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": "outstanding_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,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_10",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "reference_name",
"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": "Reference Name",
"length": 0,
"no_copy": 0,
"options": "reference_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "payment_reference",
"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": "Payment Reference",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "invoices",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Invoices",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"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": "2017-11-15 19:18:52.876221",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Transaction Payment Item",
"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
}

View File

@@ -1,8 +0,0 @@
// Copyright (c) 2017, sathishpy@gmail.com and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Statement Settings', {
refresh: function(frm) {
}
});

View File

@@ -1,266 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 1,
"beta": 0,
"creation": "2017-11-13 13:38:10.863592",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 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": 1,
"in_standard_filter": 0,
"label": "Bank Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "'%d/%m/%Y'",
"fieldname": "date_format",
"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": "Date Format",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "statement_header_mapping",
"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": "Statement Header Mapping",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "header_items",
"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": "Statement Headers",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Settings Item",
"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,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "transaction_data_mapping",
"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": "Transaction Data Mapping",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mapped_items",
"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": "Mapped Items",
"length": 0,
"no_copy": 0,
"options": "Bank Statement Transaction Settings Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"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-01-12 10:34:32.840487",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Settings",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 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,
"apply_user_permissions": 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
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1,11 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class BankStatementSettings(Document):
def autoname(self):
self.name = self.bank_account + "-Mappings"

View File

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

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, sathishpy@gmail.com and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestBankStatementSettings(unittest.TestCase):
pass

View File

@@ -1,166 +0,0 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2017-11-13 13:42:00.335432",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Transaction",
"fieldname": "mapping_type",
"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": "Mapping Type",
"length": 0,
"no_copy": 0,
"options": "Transaction",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "bank_data",
"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": "Bank Data",
"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,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Account",
"fieldname": "mapped_data_type",
"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": "Mapped Data Type",
"length": 0,
"no_copy": 0,
"options": "Account\nCustomer\nSupplier\nAccount",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mapped_data",
"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": "Mapped Data",
"length": 0,
"no_copy": 0,
"options": "mapped_data_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": 1,
"search_index": 0,
"set_only_once": 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-01-08 00:13:49.973501",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Transaction Settings Item",
"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
}

View File

@@ -1,32 +1,70 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Transaction', {
frappe.ui.form.on("Bank Transaction", {
onload(frm) {
frm.set_query('payment_document', 'payment_entries', function() {
frm.set_query("payment_document", "payment_entries", function () {
return {
"filters": {
"name": ["in", ["Payment Entry", "Journal Entry", "Sales Invoice", "Purchase Invoice", "Expense Claim"]]
}
filters: {
name: [
"in",
[
"Payment Entry",
"Journal Entry",
"Sales Invoice",
"Purchase Invoice",
"Expense Claim",
],
],
},
};
});
}
},
bank_account: function (frm) {
set_bank_statement_filter(frm);
},
setup: function (frm) {
frm.set_query("party_type", function () {
return {
filters: {
name: ["in", Object.keys(frappe.boot.party_account_types)],
},
};
});
},
});
frappe.ui.form.on('Bank Transaction Payments', {
payment_entries_remove: function(frm, cdt, cdn) {
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 => {
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'});
frappe.show_alert({
message: __("Document {0} successfully uncleared", [e]),
indicator: "green",
});
}
});
}
};
};
function set_bank_statement_filter(frm) {
frm.set_query("bank_statement", function () {
return {
filters: {
bank_account: frm.doc.bank_account,
},
};
});
}

View File

@@ -1,833 +1,245 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"actions": [],
"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",
"field_order": [
"naming_series",
"date",
"column_break_2",
"status",
"bank_account",
"company",
"section_break_4",
"deposit",
"withdrawal",
"column_break_7",
"currency",
"section_break_10",
"description",
"section_break_14",
"reference_number",
"transaction_id",
"payment_entries",
"section_break_18",
"allocated_amount",
"amended_from",
"column_break_17",
"unallocated_amount",
"party_section",
"party_type",
"party"
],
"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
"set_only_once": 1
},
{
"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
"label": "Date"
},
{
"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
"fieldtype": "Column Break"
},
{
"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
"options": "\nPending\nSettled\nUnreconciled\nReconciled"
},
{
"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
"options": "Bank Account"
},
{
"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
"read_only": 1
},
{
"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
"fieldtype": "Section Break"
},
{
"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
"fieldtype": "Column Break"
},
{
"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
"options": "Currency"
},
{
"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
"fieldtype": "Section Break"
},
{
"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
"label": "Description"
},
{
"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
"fieldtype": "Section Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"allow_on_submit": 1,
"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
"label": "Reference Number"
},
{
"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
"options": "Bank Transaction Payments"
},
{
"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
"fieldtype": "Section Break"
},
{
"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
"label": "Allocated Amount"
},
{
"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
"read_only": 1
},
{
"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
"fieldtype": "Column Break"
},
{
"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
"label": "Unallocated Amount"
},
{
"fieldname": "party_section",
"fieldtype": "Section Break",
"label": "Payment From / To"
},
{
"allow_on_submit": 1,
"fieldname": "party_type",
"fieldtype": "Link",
"label": "Party Type",
"options": "DocType"
},
{
"allow_on_submit": 1,
"fieldname": "party",
"fieldtype": "Dynamic Link",
"label": "Party",
"options": "party_type"
},
{
"fieldname": "deposit",
"oldfieldname": "debit",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Deposit"
},
{
"fieldname": "withdrawal",
"oldfieldname": "credit",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Withdrawal"
}
],
"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",
"links": [],
"modified": "2020-12-30 19:40:54.221070",
"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
"track_changes": 1
}

View File

@@ -11,7 +11,7 @@ from frappe import _
class BankTransaction(StatusUpdater):
def after_insert(self):
self.unallocated_amount = abs(flt(self.credit) - flt(self.debit))
self.unallocated_amount = abs(flt(self.withdrawal) - flt(self.deposit))
def on_submit(self):
self.clear_linked_payment_entries()
@@ -30,13 +30,13 @@ class BankTransaction(StatusUpdater):
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))
frappe.db.set_value(self.doctype, self.name, "unallocated_amount", abs(flt(self.withdrawal) - flt(self.deposit)) - 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)))
frappe.db.set_value(self.doctype, self.name, "unallocated_amount", abs(flt(self.withdrawal) - flt(self.deposit)))
amount = self.debit or self.credit
amount = self.deposit or self.withdrawal
if amount == self.allocated_amount:
frappe.db.set_value(self.doctype, self.name, "status", "Reconciled")
@@ -44,18 +44,11 @@ class BankTransaction(StatusUpdater):
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 payment_entry.payment_document in ["Payment Entry", "Journal Entry", "Purchase Invoice", "Expense Claim"]:
self.clear_simple_entry(payment_entry)
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)
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)
@@ -112,3 +105,4 @@ def unclear_reference_payment(doctype, docname):
frappe.db.set_value(doc.payment_document, doc.payment_entry, "clearance_date", None)
return doc.payment_entry

View File

@@ -5,10 +5,11 @@ from __future__ import unicode_literals
import frappe
import unittest
import json
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
from erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool import reconcile_vouchers, get_linked_payments
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
test_dependencies = ["Item", "Cost Center"]
@@ -17,7 +18,7 @@ class TestBankTransaction(unittest.TestCase):
def setUp(self):
make_pos_profile()
add_transactions()
add_payments()
add_vouchers()
def tearDown(self):
for bt in frappe.get_all("Bank Transaction"):
@@ -38,14 +39,18 @@ class TestBankTransaction(unittest.TestCase):
# 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")
linked_payments = get_linked_payments(bank_transaction.name, ['payment_entry', 'exact_match'])
self.assertTrue(linked_payments[0][6] == "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)
vouchers = json.dumps([{
"payment_doctype":"Payment Entry",
"payment_name":payment.name,
"amount":bank_transaction.unallocated_amount}])
reconcile_vouchers(bank_transaction.name, vouchers)
unallocated_amount = frappe.db.get_value("Bank Transaction", bank_transaction.name, "unallocated_amount")
self.assertTrue(unallocated_amount == 0)
@@ -53,45 +58,40 @@ class TestBankTransaction(unittest.TestCase):
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")
linked_payments = get_linked_payments(bank_transaction.name, ['payment_entry', 'exact_match'])
print(linked_payments)
self.assertTrue(linked_payments[0][3])
# 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)
vouchers = json.dumps([{
"payment_doctype":"Payment Entry",
"payment_name":payment.name,
"amount":bank_transaction.unallocated_amount}])
reconcile_vouchers(bank_transaction.name, vouchers)
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)
vouchers = json.dumps([{
"payment_doctype":"Payment Entry",
"payment_name":payment.name,
"amount":bank_transaction.unallocated_amount}])
self.assertRaises(frappe.ValidationError, reconcile_vouchers, bank_transaction_name=bank_transaction.name, vouchers=vouchers)
# 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)
vouchers = json.dumps([{
"payment_doctype":"Sales Invoice",
"payment_name":payment.name,
"amount":bank_transaction.unallocated_amount}])
reconcile_vouchers(bank_transaction.name, vouchers=vouchers)
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)
@@ -126,7 +126,7 @@ def add_transactions():
"doctype": "Bank Transaction",
"description":"1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G",
"date": "2018-10-23",
"debit": 1200,
"deposit": 1200,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
@@ -136,7 +136,7 @@ def add_transactions():
"doctype": "Bank Transaction",
"description":"1512567 BG/000003025 OPSKATTUZWXXX AT776000000098709849 Herr G",
"date": "2018-10-23",
"debit": 1700,
"deposit": 1700,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
@@ -146,7 +146,7 @@ def add_transactions():
"doctype": "Bank Transaction",
"description":"Re 95282925234 FE/000002917 AT171513000281183046 Conrad Electronic",
"date": "2018-10-26",
"debit": 690,
"withdrawal": 690,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
@@ -156,7 +156,7 @@ def add_transactions():
"doctype": "Bank Transaction",
"description":"Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07",
"date": "2018-10-27",
"debit": 3900,
"deposit": 3900,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
@@ -166,7 +166,7 @@ def add_transactions():
"doctype": "Bank Transaction",
"description":"I2015000011 VD/000002514 ATWWXXX AT4701345000003510057 Bio",
"date": "2018-10-27",
"credit": 109080,
"withdrawal": 109080,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank"
}).insert()
@@ -174,7 +174,7 @@ def add_transactions():
frappe.flags.test_bank_transactions_created = True
def add_payments():
def add_vouchers():
if frappe.flags.test_payments_created:
return
@@ -192,6 +192,7 @@ def add_payments():
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"
@@ -242,10 +243,15 @@ def add_payments():
except frappe.DuplicateEntryError:
pass
pi = make_purchase_invoice(supplier="Poore Simon's", qty=1, rate=3900)
pi = make_purchase_invoice(supplier="Poore Simon's", qty=1, rate=3900, is_paid=1, do_not_save =1)
pi.cash_bank_account = "_Test Bank - _TC"
pi.insert()
pi.submit()
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.paid_amount = 690
pe.received_amount = 690
pe.insert()
pe.submit()
@@ -295,4 +301,4 @@ def add_payments():
si.save()
si.submit()
frappe.flags.test_payments_created = True
frappe.flags.test_payments_created = True

View File

@@ -1,24 +1,9 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.provide("erpnext.accounts.dimensions");
frappe.ui.form.on('Budget', {
onload: function(frm) {
frm.set_query("cost_center", function() {
return {
filters: {
company: frm.doc.company
}
}
})
frm.set_query("project", function() {
return {
filters: {
company: frm.doc.company
}
}
})
frm.set_query("account", "accounts", function() {
return {
filters: {
@@ -26,16 +11,18 @@ frappe.ui.form.on('Budget', {
report_type: "Profit and Loss",
is_group: 0
}
}
})
};
});
frm.set_query("monthly_distribution", function() {
return {
filters: {
fiscal_year: frm.doc.fiscal_year
}
}
})
};
});
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
},
refresh: function(frm) {

View File

@@ -122,8 +122,10 @@ class TestBudget(unittest.TestCase):
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
project = frappe.get_value("Project", {"project_name": "_Test Project"})
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 40000, "_Test Cost Center - _TC", project="_Test Project", posting_date=nowdate())
"_Test Bank - _TC", 40000, "_Test Cost Center - _TC", project=project, posting_date=nowdate())
self.assertRaises(BudgetError, jv.submit)
@@ -147,8 +149,11 @@ class TestBudget(unittest.TestCase):
budget = make_budget(budget_against="Project")
project = frappe.get_value("Project", {"project_name": "_Test Project"})
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 250000, "_Test Cost Center - _TC", project="_Test Project", posting_date=nowdate())
"_Test Bank - _TC", 250000, "_Test Cost Center - _TC",
project=project, posting_date=nowdate())
self.assertRaises(BudgetError, jv.submit)
@@ -159,10 +164,10 @@ class TestBudget(unittest.TestCase):
budget = make_budget(budget_against="Cost Center")
month = now_datetime().month
if month > 10:
month = 10
if month > 9:
month = 9
for i in range(month):
for i in range(month+1):
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", posting_date=nowdate(), submit=True)
@@ -181,12 +186,14 @@ class TestBudget(unittest.TestCase):
budget = make_budget(budget_against="Project")
month = now_datetime().month
if month > 10:
month = 10
if month > 9:
month = 9
for i in range(month):
project = frappe.get_value("Project", {"project_name": "_Test Project"})
for i in range(month + 1):
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", posting_date=nowdate(), submit=True, project="_Test Project")
"_Test Bank - _TC", 20000, "_Test Cost Center - _TC", posting_date=nowdate(), submit=True,
project=project)
self.assertTrue(frappe.db.get_value("GL Entry",
{"voucher_type": "Journal Entry", "voucher_no": jv.name}))
@@ -289,7 +296,7 @@ def make_budget(**args):
budget = frappe.new_doc("Budget")
if budget_against == "Project":
budget.project = "_Test Project"
budget.project = frappe.get_value("Project", {"project_name": "_Test Project"})
else:
budget.cost_center =cost_center or "_Test Cost Center - _TC"

View File

@@ -22,9 +22,10 @@ def validate_company(company):
'allow_account_creation_against_child_company'])
if parent_company and (not allow_account_creation_against_child_company):
frappe.throw(_("""{0} is a child company. Please import accounts against parent company
or enable {1} in company master""").format(frappe.bold(company),
frappe.bold('Allow Account Creation Against Child Company')), title='Wrong Company')
msg = _("{} is a child company. ").format(frappe.bold(company))
msg += _("Please import accounts against parent company or enable {} in company master.").format(
frappe.bold('Allow Account Creation Against Child Company'))
frappe.throw(msg, title=_('Wrong Company'))
if frappe.db.get_all('GL Entry', {"company": company}, "name", limit=1):
return False
@@ -74,7 +75,9 @@ def generate_data_from_csv(file_doc, as_dict=False):
if as_dict:
data.append({frappe.scrub(header): row[index] for index, header in enumerate(headers)})
else:
if not row[1]: row[1] = row[0]
if not row[1]:
row[1] = row[0]
row[3] = row[2]
data.append(row)
# convert csv data
@@ -96,7 +99,9 @@ def generate_data_from_excel(file_doc, extension, as_dict=False):
if as_dict:
data.append({frappe.scrub(header): row[index] for index, header in enumerate(headers)})
else:
if not row[1]: row[1] = row[0]
if not row[1]:
row[1] = row[0]
row[3] = row[2]
data.append(row)
return data
@@ -147,7 +152,13 @@ def build_forest(data):
from frappe import _
for row in data:
account_name, parent_account = row[0:2]
account_name, parent_account, account_number, parent_account_number = row[0:4]
if account_number:
account_name = "{} - {}".format(account_number, account_name)
if parent_account_number:
parent_account_number = cstr(parent_account_number).strip()
parent_account = "{} - {}".format(parent_account_number, parent_account)
if parent_account == account_name == child:
return [parent_account]
elif account_name == child:
@@ -159,20 +170,23 @@ def build_forest(data):
charts_map, paths = {}, []
line_no = 3
line_no = 2
error_messages = []
for i in data:
account_name, dummy, account_number, is_group, account_type, root_type = i
account_name, parent_account, account_number, parent_account_number, is_group, account_type, root_type = i
if not account_name:
error_messages.append("Row {0}: Please enter Account Name".format(line_no))
if account_number:
account_number = cstr(account_number).strip()
account_name = "{} - {}".format(account_number, account_name)
charts_map[account_name] = {}
if cint(is_group) == 1: charts_map[account_name]["is_group"] = is_group
if account_type: charts_map[account_name]["account_type"] = account_type
if root_type: charts_map[account_name]["root_type"] = root_type
if account_number: charts_map[account_name]["account_number"] = account_number
path = return_parent(data, account_name)[::-1]
paths.append(path) # List of path is created
line_no += 1
@@ -221,7 +235,7 @@ def download_template(file_type, template_type):
def get_template(template_type):
fields = ["Account Name", "Parent Account", "Account Number", "Is Group", "Account Type", "Root Type"]
fields = ["Account Name", "Parent Account", "Account Number", "Parent Account Number", "Is Group", "Account Type", "Root Type"]
writer = UnicodeWriter()
writer.writerow(fields)
@@ -241,23 +255,23 @@ def get_template(template_type):
def get_sample_template(writer):
template = [
["Application Of Funds(Assets)", "", "", 1, "", "Asset"],
["Sources Of Funds(Liabilities)", "", "", 1, "", "Liability"],
["Equity", "", "", 1, "", "Equity"],
["Expenses", "", "", 1, "", "Expense"],
["Income", "", "", 1, "", "Income"],
["Bank Accounts", "Application Of Funds(Assets)", "", 1, "Bank", "Asset"],
["Cash In Hand", "Application Of Funds(Assets)", "", 1, "Cash", "Asset"],
["Stock Assets", "Application Of Funds(Assets)", "", 1, "Stock", "Asset"],
["Cost Of Goods Sold", "Expenses", "", 0, "Cost of Goods Sold", "Expense"],
["Asset Depreciation", "Expenses", "", 0, "Depreciation", "Expense"],
["Fixed Assets", "Application Of Funds(Assets)", "", 0, "Fixed Asset", "Asset"],
["Accounts Payable", "Sources Of Funds(Liabilities)", "", 0, "Payable", "Liability"],
["Accounts Receivable", "Application Of Funds(Assets)", "", 1, "Receivable", "Asset"],
["Stock Expenses", "Expenses", "", 0, "Stock Adjustment", "Expense"],
["Sample Bank", "Bank Accounts", "", 0, "Bank", "Asset"],
["Cash", "Cash In Hand", "", 0, "Cash", "Asset"],
["Stores", "Stock Assets", "", 0, "Stock", "Asset"],
["Application Of Funds(Assets)", "", "", "", 1, "", "Asset"],
["Sources Of Funds(Liabilities)", "", "", "", 1, "", "Liability"],
["Equity", "", "", "", 1, "", "Equity"],
["Expenses", "", "", "", 1, "", "Expense"],
["Income", "", "", "", 1, "", "Income"],
["Bank Accounts", "Application Of Funds(Assets)", "", "", 1, "Bank", "Asset"],
["Cash In Hand", "Application Of Funds(Assets)", "", "", 1, "Cash", "Asset"],
["Stock Assets", "Application Of Funds(Assets)", "", "", 1, "Stock", "Asset"],
["Cost Of Goods Sold", "Expenses", "", "", 0, "Cost of Goods Sold", "Expense"],
["Asset Depreciation", "Expenses", "", "", 0, "Depreciation", "Expense"],
["Fixed Assets", "Application Of Funds(Assets)", "", "", 0, "Fixed Asset", "Asset"],
["Accounts Payable", "Sources Of Funds(Liabilities)", "", "", 0, "Payable", "Liability"],
["Accounts Receivable", "Application Of Funds(Assets)", "", "", 1, "Receivable", "Asset"],
["Stock Expenses", "Expenses", "", "", 0, "Stock Adjustment", "Expense"],
["Sample Bank", "Bank Accounts", "", "", 0, "Bank", "Asset"],
["Cash", "Cash In Hand", "", "", 0, "Cash", "Asset"],
["Stores", "Stock Assets", "", "", 0, "Stock", "Asset"],
]
for row in template:

View File

@@ -11,8 +11,10 @@ from frappe.model.meta import get_field_precision
from erpnext.accounts.party import validate_party_gle_currency, validate_party_frozen_disabled
from erpnext.accounts.utils import get_account_currency
from erpnext.accounts.utils import get_fiscal_year
from erpnext.exceptions import InvalidAccountCurrency
from erpnext.exceptions import InvalidAccountCurrency, InvalidAccountDimensionError, MandatoryAccountDimensionError
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_checks_for_pl_and_bs_accounts
from erpnext.accounts.doctype.accounting_dimension_filter.accounting_dimension_filter import get_dimension_filter_map
from six import iteritems
exclude_from_linked_with = True
class GLEntry(Document):
@@ -25,29 +27,30 @@ class GLEntry(Document):
def validate(self):
self.flags.ignore_submit_comment = True
self.check_mandatory()
self.validate_and_set_fiscal_year()
self.pl_must_have_cost_center()
self.validate_cost_center()
if not self.flags.from_repost:
self.check_mandatory()
self.validate_cost_center()
self.check_pl_account()
self.validate_party()
self.validate_currency()
def on_update_with_args(self, adv_adj, update_outstanding = 'Yes', from_repost=False):
if not from_repost:
def on_update(self):
adv_adj = self.flags.adv_adj
if not self.flags.from_repost:
self.validate_account_details(adv_adj)
self.validate_dimensions_for_pl_and_bs()
self.validate_allowed_dimensions()
validate_balance_type(self.account, adv_adj)
validate_frozen_account(self.account, adv_adj)
validate_frozen_account(self.account, adv_adj)
validate_balance_type(self.account, adv_adj)
# Update outstanding amt on against voucher
if self.against_voucher_type in ['Journal Entry', 'Sales Invoice', 'Purchase Invoice', 'Fees'] \
and self.against_voucher and update_outstanding == 'Yes' and not from_repost:
update_outstanding_amt(self.account, self.party_type, self.party, self.against_voucher_type,
self.against_voucher)
# Update outstanding amt on against voucher
if (self.against_voucher_type in ['Journal Entry', 'Sales Invoice', 'Purchase Invoice', 'Fees']
and self.against_voucher and self.flags.update_outstanding == 'Yes'):
update_outstanding_amt(self.account, self.party_type, self.party, self.against_voucher_type,
self.against_voucher)
def check_mandatory(self):
mandatory = ['account','voucher_type','voucher_no','company']
@@ -55,7 +58,7 @@ class GLEntry(Document):
if not self.get(k):
frappe.throw(_("{0} is required").format(_(self.meta.get_label(k))))
account_type = frappe.db.get_value("Account", self.account, "account_type")
account_type = frappe.get_cached_value("Account", self.account, "account_type")
if not (self.party_type and self.party):
if account_type == "Receivable":
frappe.throw(_("{0} {1}: Customer is required against Receivable account {2}")
@@ -70,17 +73,15 @@ class GLEntry(Document):
.format(self.voucher_type, self.voucher_no, self.account))
def pl_must_have_cost_center(self):
if frappe.db.get_value("Account", self.account, "report_type") == "Profit and Loss":
if frappe.get_cached_value("Account", self.account, "report_type") == "Profit and Loss":
if not self.cost_center and self.voucher_type != 'Period Closing Voucher':
frappe.throw(_("{0} {1}: Cost Center is required for 'Profit and Loss' account {2}. Please set up a default Cost Center for the Company.")
.format(self.voucher_type, self.voucher_no, self.account))
def validate_dimensions_for_pl_and_bs(self):
account_type = frappe.db.get_value("Account", self.account, "report_type")
for dimension in get_checks_for_pl_and_bs_accounts():
if account_type == "Profit and Loss" \
and self.company == dimension.company and dimension.mandatory_for_pl and not dimension.disabled:
if not self.get(dimension.fieldname):
@@ -93,6 +94,25 @@ class GLEntry(Document):
frappe.throw(_("Accounting Dimension <b>{0}</b> is required for 'Balance Sheet' account {1}.")
.format(dimension.label, self.account))
def validate_allowed_dimensions(self):
dimension_filter_map = get_dimension_filter_map()
for key, value in iteritems(dimension_filter_map):
dimension = key[0]
account = key[1]
if self.account == account:
if value['is_mandatory'] and not self.get(dimension):
frappe.throw(_("{0} is mandatory for account {1}").format(
frappe.bold(frappe.unscrub(dimension)), frappe.bold(self.account)), MandatoryAccountDimensionError)
if value['allow_or_restrict'] == 'Allow':
if self.get(dimension) and self.get(dimension) not in value['allowed_dimensions']:
frappe.throw(_("Invalid value {0} for {1} against account {2}").format(
frappe.bold(self.get(dimension)), frappe.bold(frappe.unscrub(dimension)), frappe.bold(self.account)), InvalidAccountDimensionError)
else:
if self.get(dimension) and self.get(dimension) in value['allowed_dimensions']:
frappe.throw(_("Invalid value {0} for {1} against account {2}").format(
frappe.bold(self.get(dimension)), frappe.bold(frappe.unscrub(dimension)), frappe.bold(self.account)), InvalidAccountDimensionError)
def check_pl_account(self):
if self.is_opening=='Yes' and \
@@ -120,26 +140,18 @@ class GLEntry(Document):
.format(self.voucher_type, self.voucher_no, self.account, self.company))
def validate_cost_center(self):
if not hasattr(self, "cost_center_company"):
self.cost_center_company = {}
if not self.cost_center: return
def _get_cost_center_company():
if not self.cost_center_company.get(self.cost_center):
self.cost_center_company[self.cost_center] = frappe.db.get_value(
"Cost Center", self.cost_center, "company")
is_group, company = frappe.get_cached_value('Cost Center',
self.cost_center, ['is_group', 'company'])
return self.cost_center_company[self.cost_center]
def _check_is_group():
return cint(frappe.get_cached_value('Cost Center', self.cost_center, 'is_group'))
if self.cost_center and _get_cost_center_company() != self.company:
if company != self.company:
frappe.throw(_("{0} {1}: Cost Center {2} does not belong to Company {3}")
.format(self.voucher_type, self.voucher_no, self.cost_center, self.company))
if self.cost_center and _check_is_group():
frappe.throw(_("""{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions""")
.format(self.voucher_type, self.voucher_no, frappe.bold(self.cost_center)))
if (self.voucher_type != 'Period Closing Voucher' and is_group):
frappe.throw(_("""{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions""").format(
self.voucher_type, self.voucher_no, frappe.bold(self.cost_center)))
def validate_party(self):
validate_party_frozen_disabled(self.party_type, self.party)
@@ -149,7 +161,7 @@ class GLEntry(Document):
account_currency = get_account_currency(self.account)
if not self.account_currency:
self.account_currency = company_currency
self.account_currency = account_currency or company_currency
if account_currency != self.account_currency:
frappe.throw(_("{0} {1}: Accounting Entry for {2} can only be made in currency: {3}")
@@ -163,7 +175,6 @@ class GLEntry(Document):
if not self.fiscal_year:
self.fiscal_year = get_fiscal_year(self.posting_date, company=self.company)[0]
def validate_balance_type(account, adv_adj=False):
if not adv_adj and account:
balance_must_be = frappe.db.get_value("Account", account, "balance_must_be")
@@ -229,7 +240,7 @@ def update_outstanding_amt(account, party_type, party, against_voucher_type, aga
def validate_frozen_account(account, adv_adj=None):
frozen_account = frappe.db.get_value("Account", account, "freeze_account")
frozen_account = frappe.get_cached_value("Account", account, "freeze_account")
if frozen_account == 'Yes' and not adv_adj:
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,
'frozen_accounts_modifier')

View File

@@ -1,7 +1,7 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:title",
"creation": "2018-11-22 22:45:00.370913",
"doctype": "DocType",
"document_type": "Setup",
@@ -20,8 +20,7 @@
"in_list_view": 1,
"label": "Title",
"no_copy": 1,
"reqd": 1,
"unique": 1
"reqd": 1
},
{
"fieldname": "taxes",
@@ -33,12 +32,14 @@
{
"fieldname": "company",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Company",
"options": "Company",
"reqd": 1
}
],
"modified": "2020-09-18 17:26:09.703215",
"links": [],
"modified": "2021-03-08 19:50:21.416513",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Item Tax Template",
@@ -81,5 +82,6 @@
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1
}

View File

@@ -11,6 +11,11 @@ class ItemTaxTemplate(Document):
def validate(self):
self.validate_tax_accounts()
def autoname(self):
if self.company and self.title:
abbr = frappe.get_cached_value('Company', self.company, 'abbr')
self.name = '{0} - {1}'.format(self.title, abbr)
def validate_tax_accounts(self):
"""Check whether Tax Rate is not entered twice for same Tax Type"""
check_list = []

View File

@@ -20,7 +20,8 @@ def get_data():
'items': ['Purchase Invoice', 'Purchase Order', 'Purchase Receipt']
},
{
'items': ['Item']
'label': _('Stock'),
'items': ['Item Groups', 'Item']
}
]
}

View File

@@ -120,6 +120,8 @@ frappe.ui.form.on("Journal Entry", {
}
}
});
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
},
voucher_type: function(frm){
@@ -197,6 +199,7 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
this.load_defaults();
this.setup_queries();
this.setup_balance_formatter();
erpnext.accounts.dimensions.setup_dimension_filters(this.frm, this.frm.doctype);
},
onload_post_render: function() {
@@ -222,15 +225,6 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
return erpnext.journal_entry.account_query(me.frm);
});
me.frm.set_query("cost_center", "accounts", function(doc, cdt, cdn) {
return {
filters: {
company: me.frm.doc.company,
is_group: 0
}
};
});
me.frm.set_query("party_type", "accounts", function(doc, cdt, cdn) {
const row = locals[cdt][cdn];
@@ -406,6 +400,8 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
}
}
cur_frm.cscript.update_totals(doc);
erpnext.accounts.dimensions.copy_dimension_from_first_row(this.frm, cdt, cdn, 'accounts');
},
});

View File

@@ -102,7 +102,7 @@ class JournalEntry(AccountsController):
if account_currency == previous_account_currency:
if self.total_credit != doc.total_debit or self.total_debit != doc.total_credit:
frappe.throw(_("Total Credit/ Debit Amount should be same as linked Journal Entry"))
def validate_stock_accounts(self):
stock_accounts = get_stock_accounts(self.company, self.doctype, self.name)
for account in stock_accounts:
@@ -229,11 +229,11 @@ class JournalEntry(AccountsController):
if d.reference_type=="Journal Entry":
account_root_type = frappe.db.get_value("Account", d.account, "root_type")
if account_root_type == "Asset" and flt(d.debit) > 0:
frappe.throw(_("For {0}, only credit accounts can be linked against another debit entry")
.format(d.account))
frappe.throw(_("Row #{0}: For {1}, you can select reference document only if account gets credited")
.format(d.idx, d.account))
elif account_root_type == "Liability" and flt(d.credit) > 0:
frappe.throw(_("For {0}, only debit accounts can be linked against another credit entry")
.format(d.account))
frappe.throw(_("Row #{0}: For {1}, you can select reference document only if account gets debited")
.format(d.idx, d.account))
if d.reference_name == self.name:
frappe.throw(_("You can not enter current voucher in 'Against Journal Entry' column"))
@@ -1077,4 +1077,4 @@ def make_reverse_journal_entry(source_name, target_doc=None):
},
}, target_doc)
return doclist
return doclist

View File

@@ -160,7 +160,7 @@ class TestJournalEntry(unittest.TestCase):
self.assertFalse(gle)
def test_reverse_journal_entry(self):
from erpnext.accounts.doctype.journal_entry.journal_entry import make_reverse_journal_entry
from erpnext.accounts.doctype.journal_entry.journal_entry import make_reverse_journal_entry
jv = make_journal_entry("_Test Bank USD - _TC",
"Sales - _TC", 100, exchange_rate=50, save=False)
@@ -299,15 +299,20 @@ class TestJournalEntry(unittest.TestCase):
def test_jv_with_project(self):
from erpnext.projects.doctype.project.test_project import make_project
project = make_project({
'project_name': 'Journal Entry Project',
'project_template_name': 'Test Project Template',
'start_date': '2020-01-01'
})
if not frappe.db.exists("Project", {"project_name": "Journal Entry Project"}):
project = make_project({
'project_name': 'Journal Entry Project',
'project_template_name': 'Test Project Template',
'start_date': '2020-01-01'
})
project_name = project.name
else:
project_name = frappe.get_value("Project", {"project_name": "_Test Project"})
jv = make_journal_entry("_Test Cash - _TC", "_Test Bank - _TC", 100, save=False)
for d in jv.accounts:
d.project = project.project_name
d.project = project_name
jv.voucher_type = "Bank Entry"
jv.multi_currency = 0
jv.cheque_no = "112233"
@@ -317,10 +322,10 @@ class TestJournalEntry(unittest.TestCase):
expected_values = {
"_Test Cash - _TC": {
"project": project.project_name
"project": project_name
},
"_Test Bank - _TC": {
"project": project.project_name
"project": project_name
}
}

View File

@@ -1,6 +1,8 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.provide("erpnext.accounts.dimensions");
frappe.ui.form.on('Loyalty Program', {
setup: function(frm) {
var help_content =
@@ -46,20 +48,17 @@ frappe.ui.form.on('Loyalty Program', {
};
});
frm.set_query("cost_center", function() {
return {
filters: {
company: frm.doc.company
}
};
});
frm.set_value("company", frappe.defaults.get_user_default("Company"));
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
},
refresh: function(frm) {
if (frm.doc.loyalty_program_type === "Single Tier Program" && frm.doc.collection_rules.length > 1) {
frappe.throw(__("Please select the Multiple Tier Program type for more than one collection rules."));
}
},
company: function(frm) {
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
}
});

View File

@@ -12,7 +12,7 @@ class ModeofPayment(Document):
self.validate_accounts()
self.validate_repeating_companies()
self.validate_pos_mode_of_payment()
def validate_repeating_companies(self):
"""Error when Same Company is entered multiple times in accounts"""
accounts_list = []
@@ -31,10 +31,10 @@ class ModeofPayment(Document):
def validate_pos_mode_of_payment(self):
if not self.enabled:
pos_profiles = frappe.db.sql("""SELECT sip.parent FROM `tabSales Invoice Payment` sip
pos_profiles = frappe.db.sql("""SELECT sip.parent FROM `tabSales Invoice Payment` sip
WHERE sip.parenttype = 'POS Profile' and sip.mode_of_payment = %s""", (self.name))
pos_profiles = list(map(lambda x: x[0], pos_profiles))
if pos_profiles:
message = "POS Profile " + frappe.bold(", ".join(pos_profiles)) + " contains \
Mode of Payment " + frappe.bold(str(self.name)) + ". Please remove them to disable this mode."

View File

@@ -36,6 +36,8 @@ frappe.ui.form.on('Opening Invoice Creation Tool', {
frm.dashboard.show_progress(data.title, (data.count / data.total) * 100, data.message);
frm.page.set_indicator(__('In Progress'), 'orange');
});
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
},
refresh: function(frm) {
@@ -100,6 +102,7 @@ frappe.ui.form.on('Opening Invoice Creation Tool', {
}
})
}
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
},
invoice_type: function(frm) {
@@ -118,7 +121,8 @@ frappe.ui.form.on('Opening Invoice Creation Tool', {
frappe.render_template('opening_invoice_creation_tool_dashboard', {
data: opening_invoices_summary,
max_count: max_count
})
}),
__("Opening Invoices Summary")
);
section.on('click', '.invoice-link', function() {

View File

@@ -64,11 +64,11 @@ class OpeningInvoiceCreationTool(Document):
prepare_invoice_summary(doctype, invoices)
return invoices_summary, max_count
def validate_company(self):
if not self.company:
frappe.throw(_("Please select the Company"))
def set_missing_values(self, row):
row.qty = row.qty or 1.0
row.temporary_opening_account = row.temporary_opening_account or get_temporary_opening_account(self.company)
@@ -198,6 +198,7 @@ def start_import(invoices):
try:
publish(idx, len(invoices), d.doctype)
doc = frappe.get_doc(d)
doc.flags.ignore_mandatory = True
doc.insert()
doc.submit()
frappe.db.commit()
@@ -210,7 +211,7 @@ def start_import(invoices):
frappe.db.commit()
if errors:
frappe.msgprint(_("You had {} errors while creating opening invoices. Check {} for more details")
.format(errors, "<a href='#List/Error Log' class='variant-click'>Error Log</a>"), indicator="red", title=_("Error Occured"))
.format(errors, "<a href='/app/List/Error Log' class='variant-click'>Error Log</a>"), indicator="red", title=_("Error Occured"))
return names
def publish(index, total, doctype):

View File

@@ -1,4 +1,3 @@
<h5 style="margin-top: 0px;">{{ __("Opening Invoices Summary") }}</h5>
{% $.each(data, (company, summary) => { %}
<h6 style="margin: 15px 0px -10px 0px;"><a class="company-link"> {{ company }}</a></h6>

View File

@@ -1,6 +1,7 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
{% include "erpnext/public/js/controllers/accounts.js" %}
frappe.provide("erpnext.accounts.dimensions");
frappe.ui.form.on('Payment Entry', {
onload: function(frm) {
@@ -8,6 +9,8 @@ frappe.ui.form.on('Payment Entry', {
if (!frm.doc.paid_from) frm.set_value("paid_from_account_currency", null);
if (!frm.doc.paid_to) frm.set_value("paid_to_account_currency", null);
}
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
},
setup: function(frm) {
@@ -88,24 +91,17 @@ frappe.ui.form.on('Payment Entry', {
}
});
frm.set_query("cost_center", "deductions", function() {
return {
filters: {
"is_group": 0,
"company": frm.doc.company
}
}
});
frm.set_query("reference_doctype", "references", function() {
if (frm.doc.party_type=="Customer") {
if (frm.doc.party_type == "Customer") {
var doctypes = ["Sales Order", "Sales Invoice", "Journal Entry", "Dunning"];
} else if (frm.doc.party_type=="Supplier") {
} else if (frm.doc.party_type == "Supplier") {
var doctypes = ["Purchase Order", "Purchase Invoice", "Journal Entry"];
} else if (frm.doc.party_type=="Employee") {
} else if (frm.doc.party_type == "Employee") {
var doctypes = ["Expense Claim", "Journal Entry"];
} else if (frm.doc.party_type=="Student") {
} else if (frm.doc.party_type == "Student") {
var doctypes = ["Fees"];
} else if (frm.doc.party_type == "Donor") {
var doctypes = ["Donation"];
} else {
var doctypes = ["Journal Entry"];
}
@@ -134,7 +130,7 @@ frappe.ui.form.on('Payment Entry', {
const child = locals[cdt][cdn];
const filters = {"docstatus": 1, "company": doc.company};
const party_type_doctypes = ['Sales Invoice', 'Sales Order', 'Purchase Invoice',
'Purchase Order', 'Expense Claim', 'Fees', 'Dunning'];
'Purchase Order', 'Expense Claim', 'Fees', 'Dunning', 'Donation'];
if (in_list(party_type_doctypes, child.reference_doctype)) {
filters[doc.party_type.toLowerCase()] = doc.party;
@@ -167,6 +163,7 @@ frappe.ui.form.on('Payment Entry', {
company: function(frm) {
frm.events.hide_unhide_fields(frm);
frm.events.set_dynamic_labels(frm);
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
},
contact_person: function(frm) {
@@ -286,7 +283,7 @@ frappe.ui.form.on('Payment Entry', {
let party_types = Object.keys(frappe.boot.party_account_types);
if(frm.doc.party_type && !party_types.includes(frm.doc.party_type)){
frm.set_value("party_type", "");
frappe.throw(__("Party can only be one of "+ party_types.join(", ")));
frappe.throw(__("Party can only be one of {0}", [party_types.join(", ")]));
}
frm.set_query("party", function() {
@@ -401,6 +398,8 @@ frappe.ui.form.on('Payment Entry', {
set_account_currency_and_balance: function(frm, account, currency_field,
balance_field, callback_function) {
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
if (frm.doc.posting_date && account) {
frappe.call({
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_account_details",
@@ -427,6 +426,14 @@ frappe.ui.form.on('Payment Entry', {
if(!frm.doc.paid_amount && frm.doc.received_amount)
frm.events.received_amount(frm);
if (frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency
&& frm.doc.paid_amount != frm.doc.received_amount) {
if (company_currency != frm.doc.paid_from_account_currency &&
frm.doc.payment_type == "Pay") {
frm.doc.paid_amount = frm.doc.received_amount;
}
}
}
},
() => {
@@ -598,12 +605,22 @@ frappe.ui.form.on('Payment Entry', {
{fieldtype:"Column Break"},
{fieldtype:"Float", label: __("Less Than Amount"), fieldname:"outstanding_amt_less_than"},
{fieldtype:"Section Break"},
{fieldtype:"Link", label:__("Cost Center"), fieldname:"cost_center", options:"Cost Center",
"get_query": function() {
return {
"filters": {"company": frm.doc.company}
}
}
},
{fieldtype:"Column Break"},
{fieldtype:"Section Break"},
{fieldtype:"Check", label: __("Allocate Payment Amount"), fieldname:"allocate_payment_amount", default:1},
];
frappe.prompt(fields, function(filters){
frappe.flags.allocate_payment_amount = true;
frm.events.validate_filters_data(frm, filters);
frm.doc.cost_center = filters.cost_center;
frm.events.get_outstanding_documents(frm, filters);
}, __("Filters"), __("Get Outstanding Documents"));
},
@@ -620,13 +637,13 @@ frappe.ui.form.on('Payment Entry', {
let to_field = fields[key][1];
if (filters[from_field] && !filters[to_field]) {
frappe.throw(__("Error: {0} is mandatory field",
[to_field.replace(/_/g, " ")]
));
frappe.throw(
__("Error: {0} is mandatory field", [to_field.replace(/_/g, " ")])
);
} else if (filters[from_field] && filters[from_field] > filters[to_field]) {
frappe.throw(__("{0}: {1} must be less than {2}",
[key, from_field.replace(/_/g, " "), to_field.replace(/_/g, " ")]
));
frappe.throw(
__("{0}: {1} must be less than {2}", [key, from_field.replace(/_/g, " "), to_field.replace(/_/g, " ")])
);
}
}
},
@@ -675,6 +692,8 @@ frappe.ui.form.on('Payment Entry', {
c.total_amount = d.invoice_amount;
c.outstanding_amount = d.outstanding_amount;
c.bill_no = d.bill_no;
c.payment_term = d.payment_term;
c.allocated_amount = d.allocated_amount;
if(!in_list(["Sales Order", "Purchase Order", "Expense Claim", "Fees"], d.voucher_type)) {
if(flt(d.outstanding_amount) > 0)
@@ -700,7 +719,8 @@ frappe.ui.form.on('Payment Entry', {
(frm.doc.payment_type=="Receive" && frm.doc.party_type=="Customer") ||
(frm.doc.payment_type=="Pay" && frm.doc.party_type=="Supplier") ||
(frm.doc.payment_type=="Pay" && frm.doc.party_type=="Employee") ||
(frm.doc.payment_type=="Receive" && frm.doc.party_type=="Student")
(frm.doc.payment_type=="Receive" && frm.doc.party_type=="Student") ||
(frm.doc.payment_type=="Receive" && frm.doc.party_type=="Donor")
) {
if(total_positive_outstanding > total_negative_outstanding)
if (!frm.doc.paid_amount)
@@ -743,7 +763,8 @@ frappe.ui.form.on('Payment Entry', {
(frm.doc.payment_type=="Receive" && frm.doc.party_type=="Customer") ||
(frm.doc.payment_type=="Pay" && frm.doc.party_type=="Supplier") ||
(frm.doc.payment_type=="Pay" && frm.doc.party_type=="Employee") ||
(frm.doc.payment_type=="Receive" && frm.doc.party_type=="Student")
(frm.doc.payment_type=="Receive" && frm.doc.party_type=="Student") ||
(frm.doc.payment_type=="Receive" && frm.doc.party_type=="Donor")
) {
if(total_positive_outstanding_including_order > paid_amount) {
var remaining_outstanding = total_positive_outstanding_including_order - paid_amount;
@@ -755,12 +776,15 @@ frappe.ui.form.on('Payment Entry', {
} else if (in_list(["Customer", "Supplier"], frm.doc.party_type)) {
if(paid_amount > total_negative_outstanding) {
if(total_negative_outstanding == 0) {
frappe.msgprint(__("Cannot {0} {1} {2} without any negative outstanding invoice",
[frm.doc.payment_type,
(frm.doc.party_type=="Customer" ? "to" : "from"), frm.doc.party_type]));
frappe.msgprint(
__("Cannot {0} {1} {2} without any negative outstanding invoice", [frm.doc.payment_type,
(frm.doc.party_type=="Customer" ? "to" : "from"), frm.doc.party_type])
);
return false
} else {
frappe.msgprint(__("Paid Amount cannot be greater than total negative outstanding amount {0}", [total_negative_outstanding]));
frappe.msgprint(
__("Paid Amount cannot be greater than total negative outstanding amount {0}", [total_negative_outstanding])
);
return false;
}
} else {
@@ -772,10 +796,13 @@ frappe.ui.form.on('Payment Entry', {
}
$.each(frm.doc.references || [], function(i, row) {
row.allocated_amount = 0 //If allocate payment amount checkbox is unchecked, set zero to allocate amount
if(frappe.flags.allocate_payment_amount != 0){
if(row.outstanding_amount > 0 && allocated_positive_outstanding > 0) {
if(row.outstanding_amount >= allocated_positive_outstanding) {
if (frappe.flags.allocate_payment_amount == 0) {
//If allocate payment amount checkbox is unchecked, set zero to allocate amount
row.allocated_amount = 0;
} else if (frappe.flags.allocate_payment_amount != 0 && !row.allocated_amount) {
if (row.outstanding_amount > 0 && allocated_positive_outstanding > 0) {
if (row.outstanding_amount >= allocated_positive_outstanding) {
row.allocated_amount = allocated_positive_outstanding;
} else {
row.allocated_amount = row.outstanding_amount;
@@ -783,9 +810,11 @@ frappe.ui.form.on('Payment Entry', {
allocated_positive_outstanding -= flt(row.allocated_amount);
} else if (row.outstanding_amount < 0 && allocated_negative_outstanding) {
if(Math.abs(row.outstanding_amount) >= allocated_negative_outstanding)
if (Math.abs(row.outstanding_amount) >= allocated_negative_outstanding) {
row.allocated_amount = -1*allocated_negative_outstanding;
else row.allocated_amount = row.outstanding_amount;
} else {
row.allocated_amount = row.outstanding_amount;
};
allocated_negative_outstanding -= Math.abs(flt(row.allocated_amount));
}
@@ -900,6 +929,12 @@ frappe.ui.form.on('Payment Entry', {
frappe.msgprint(__("Row #{0}: Reference Document Type must be one of Expense Claim or Journal Entry", [row.idx]));
return false;
}
if (frm.doc.party_type == "Donor" && row.reference_doctype != "Donation") {
frappe.model.set_value(row.doctype, row.name, "reference_doctype", null);
frappe.msgprint(__("Row #{0}: Reference Document Type must be Donation", [row.idx]));
return false;
}
}
if (row) {
@@ -1051,11 +1086,6 @@ frappe.ui.form.on('Payment Entry', {
frm.set_value("paid_from_account_balance", r.message.paid_from_account_balance);
frm.set_value("paid_to_account_balance", r.message.paid_to_account_balance);
frm.set_value("party_balance", r.message.party_balance);
},
() => {
if(frm.doc.payment_type != "Internal") {
frm.clear_table("references");
}
}
]);

View File

@@ -536,7 +536,8 @@
"fieldtype": "Data",
"hidden": 1,
"label": "Title",
"print_hide": 1
"print_hide": 1,
"read_only": 1
},
{
"depends_on": "party",
@@ -588,7 +589,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2020-10-30 13:56:20.007336",
"modified": "2021-03-08 13:05:16.958866",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
@@ -632,4 +633,4 @@
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1
}
}

View File

@@ -72,6 +72,7 @@ class PaymentEntry(AccountsController):
self.update_outstanding_amounts()
self.update_advance_paid()
self.update_expense_claim()
self.update_donation()
self.update_payment_schedule()
self.set_status()
@@ -82,6 +83,7 @@ class PaymentEntry(AccountsController):
self.update_outstanding_amounts()
self.update_advance_paid()
self.update_expense_claim()
self.update_donation(cancel=1)
self.delink_advance_entry_references()
self.update_payment_schedule(cancel=1)
self.set_payment_req_status()
@@ -242,9 +244,11 @@ class PaymentEntry(AccountsController):
elif self.party_type == "Supplier":
valid_reference_doctypes = ("Purchase Order", "Purchase Invoice", "Journal Entry")
elif self.party_type == "Employee":
valid_reference_doctypes = ("Expense Claim", "Journal Entry", "Employee Advance")
valid_reference_doctypes = ("Expense Claim", "Journal Entry", "Employee Advance", "Gratuity")
elif self.party_type == "Shareholder":
valid_reference_doctypes = ("Journal Entry")
elif self.party_type == "Donor":
valid_reference_doctypes = ("Donation")
for d in self.get("references"):
if not d.allocated_amount:
@@ -329,33 +333,50 @@ class PaymentEntry(AccountsController):
invoice_payment_amount_map = {}
invoice_paid_amount_map = {}
for reference in self.get('references'):
if reference.payment_term and reference.reference_name:
key = (reference.payment_term, reference.reference_name)
for ref in self.get('references'):
if ref.payment_term and ref.reference_name:
key = (ref.payment_term, ref.reference_name)
invoice_payment_amount_map.setdefault(key, 0.0)
invoice_payment_amount_map[key] += reference.allocated_amount
invoice_payment_amount_map[key] += ref.allocated_amount
if not invoice_paid_amount_map.get(key):
payment_schedule = frappe.get_all('Payment Schedule', filters={'parent': reference.reference_name},
fields=['paid_amount', 'payment_amount', 'payment_term'])
payment_schedule = frappe.get_all(
'Payment Schedule',
filters={'parent': ref.reference_name},
fields=['paid_amount', 'payment_amount', 'payment_term', 'discount', 'outstanding']
)
for term in payment_schedule:
invoice_key = (term.payment_term, reference.reference_name)
invoice_key = (term.payment_term, ref.reference_name)
invoice_paid_amount_map.setdefault(invoice_key, {})
invoice_paid_amount_map[invoice_key]['outstanding'] = term.payment_amount - term.paid_amount
invoice_paid_amount_map[invoice_key]['outstanding'] = term.outstanding
invoice_paid_amount_map[invoice_key]['discounted_amt'] = ref.total_amount * (term.discount / 100)
for key, allocated_amount in iteritems(invoice_payment_amount_map):
outstanding = flt(invoice_paid_amount_map.get(key, {}).get('outstanding'))
discounted_amt = flt(invoice_paid_amount_map.get(key, {}).get('discounted_amt'))
for key, amount in iteritems(invoice_payment_amount_map):
if cancel:
frappe.db.sql(""" UPDATE `tabPayment Schedule` SET paid_amount = `paid_amount` - %s
WHERE parent = %s and payment_term = %s""", (amount, key[1], key[0]))
frappe.db.sql("""
UPDATE `tabPayment Schedule`
SET
paid_amount = `paid_amount` - %s,
discounted_amount = `discounted_amount` - %s,
outstanding = `outstanding` + %s
WHERE parent = %s and payment_term = %s""",
(allocated_amount - discounted_amt, discounted_amt, allocated_amount, key[1], key[0]))
else:
outstanding = flt(invoice_paid_amount_map.get(key, {}).get('outstanding'))
if amount > outstanding:
if allocated_amount > outstanding:
frappe.throw(_('Cannot allocate more than {0} against payment term {1}').format(outstanding, key[0]))
if amount and outstanding:
frappe.db.sql(""" UPDATE `tabPayment Schedule` SET paid_amount = `paid_amount` + %s
WHERE parent = %s and payment_term = %s""", (amount, key[1], key[0]))
if allocated_amount and outstanding:
frappe.db.sql("""
UPDATE `tabPayment Schedule`
SET
paid_amount = `paid_amount` + %s,
discounted_amount = `discounted_amount` + %s,
outstanding = `outstanding` - %s
WHERE parent = %s and payment_term = %s""",
(allocated_amount - discounted_amt, discounted_amt, allocated_amount, key[1], key[0]))
def set_status(self):
if self.docstatus == 2:
@@ -455,6 +476,10 @@ class PaymentEntry(AccountsController):
.format(total_negative_outstanding), InvalidPaymentEntry)
def set_title(self):
if frappe.flags.in_import and self.title:
# do not set title dynamically if title exists during data import.
return
if self.payment_type in ("Receive", "Pay"):
self.title = self.party
else:
@@ -604,7 +629,7 @@ class PaymentEntry(AccountsController):
if self.payment_type in ("Receive", "Pay") and self.party:
for d in self.get("references"):
if d.allocated_amount \
and d.reference_doctype in ("Sales Order", "Purchase Order", "Employee Advance"):
and d.reference_doctype in ("Sales Order", "Purchase Order", "Employee Advance", "Gratuity"):
frappe.get_doc(d.reference_doctype, d.reference_name).set_total_advance_paid()
def update_expense_claim(self):
@@ -614,6 +639,13 @@ class PaymentEntry(AccountsController):
doc = frappe.get_doc("Expense Claim", d.reference_name)
update_reimbursed_amount(doc, self.name)
def update_donation(self, cancel=0):
if self.payment_type == "Receive" and self.party_type == "Donor" and self.party:
for d in self.get("references"):
if d.reference_doctype=="Donation" and d.reference_name:
is_paid = 0 if cancel else 1
frappe.db.set_value("Donation", d.reference_name, "paid", is_paid)
def on_recurring(self, reference_doc, auto_repeat_doc):
self.reference_no = reference_doc.name
self.reference_date = nowdate()
@@ -693,6 +725,8 @@ def get_outstanding_reference_documents(args):
outstanding_invoices = get_outstanding_invoices(args.get("party_type"), args.get("party"),
args.get("party_account"), filters=args, condition=condition)
outstanding_invoices = split_invoices_based_on_payment_terms(outstanding_invoices)
for d in outstanding_invoices:
d["exchange_rate"] = 1
if party_account_currency != company_currency:
@@ -720,6 +754,46 @@ def get_outstanding_reference_documents(args):
return data
def split_invoices_based_on_payment_terms(outstanding_invoices):
invoice_ref_based_on_payment_terms = {}
for idx, d in enumerate(outstanding_invoices):
if d.voucher_type in ['Sales Invoice', 'Purchase Invoice']:
payment_term_template = frappe.db.get_value(d.voucher_type, d.voucher_no, 'payment_terms_template')
if payment_term_template:
allocate_payment_based_on_payment_terms = frappe.db.get_value(
'Payment Terms Template', payment_term_template, 'allocate_payment_based_on_payment_terms')
if allocate_payment_based_on_payment_terms:
payment_schedule = frappe.get_all('Payment Schedule', filters={'parent': d.voucher_no}, fields=["*"])
for payment_term in payment_schedule:
if payment_term.outstanding > 0.1:
invoice_ref_based_on_payment_terms.setdefault(idx, [])
invoice_ref_based_on_payment_terms[idx].append(frappe._dict({
'due_date': d.due_date,
'currency': d.currency,
'voucher_no': d.voucher_no,
'voucher_type': d.voucher_type,
'posting_date': d.posting_date,
'invoice_amount': flt(d.invoice_amount),
'outstanding_amount': flt(d.outstanding_amount),
'payment_amount': payment_term.payment_amount,
'payment_term': payment_term.payment_term,
'allocated_amount': payment_term.outstanding
}))
if invoice_ref_based_on_payment_terms:
for idx, ref in invoice_ref_based_on_payment_terms.items():
voucher_no = outstanding_invoices[idx]['voucher_no']
voucher_type = outstanding_invoices[idx]['voucher_type']
frappe.msgprint(_("Spliting {} {} into {} rows as per payment terms").format(
voucher_type, voucher_no, len(ref)), alert=True)
outstanding_invoices.pop(idx - 1)
outstanding_invoices += invoice_ref_based_on_payment_terms[idx]
return outstanding_invoices
def get_orders_to_be_billed(posting_date, party_type, party,
company, party_account_currency, company_currency, cost_center=None, filters=None):
if party_type == "Customer":
@@ -913,6 +987,9 @@ def get_reference_details(reference_doctype, reference_name, party_account_curre
total_amount = ref_doc.get("grand_total")
exchange_rate = 1
outstanding_amount = ref_doc.get("outstanding_amount")
elif reference_doctype == "Donation":
total_amount = ref_doc.get("amount")
exchange_rate = 1
elif reference_doctype == "Dunning":
total_amount = ref_doc.get("dunning_amount")
exchange_rate = 1
@@ -932,6 +1009,8 @@ def get_reference_details(reference_doctype, reference_name, party_account_curre
exchange_rate = ref_doc.get("exchange_rate")
if party_account_currency != ref_doc.currency:
total_amount = flt(total_amount) * flt(exchange_rate)
elif ref_doc.doctype == "Gratuity":
total_amount = ref_doc.amount
if not total_amount:
if party_account_currency == company_currency:
total_amount = ref_doc.base_grand_total
@@ -955,6 +1034,8 @@ def get_reference_details(reference_doctype, reference_name, party_account_curre
outstanding_amount = flt(outstanding_amount) * flt(exchange_rate)
if party_account_currency == company_currency:
exchange_rate = 1
elif reference_doctype == "Gratuity":
outstanding_amount = ref_doc.amount - flt(ref_doc.paid_amount)
else:
outstanding_amount = flt(total_amount) - flt(ref_doc.advance_paid)
else:
@@ -996,7 +1077,7 @@ def get_amounts_based_on_ref_doc(reference_doctype, ref_doc, party_account_curre
total_amount = flt(ref_doc.total_sanctioned_amount) + flt(ref_doc.total_taxes_and_charges)
elif ref_doc.doctype == "Employee Advance":
total_amount, exchange_rate = get_total_amount_exchange_rate_for_employee_advance(party_account_currency, ref_doc)
if not total_amount:
total_amount, exchange_rate = get_total_amount_exchange_rate_base_on_currency(
party_account_currency, company_currency, ref_doc)
@@ -1069,6 +1150,8 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
paid_amount, received_amount = set_paid_amount_and_received_amount(
dt, party_account_currency, bank, outstanding_amount, payment_type, bank_amount, doc)
paid_amount, received_amount, discount_amount = apply_early_payment_discount(paid_amount, received_amount, doc)
pe = frappe.new_doc("Payment Entry")
pe.payment_type = payment_type
pe.company = doc.company
@@ -1138,11 +1221,20 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
pe.setup_party_account_field()
pe.set_missing_values()
if party_account and bank:
if dt == "Employee Advance":
reference_doc = doc
pe.set_exchange_rate(ref_doc=reference_doc)
pe.set_amounts()
if discount_amount:
pe.set_gain_or_loss(account_details={
'account': frappe.get_cached_value('Company', pe.company, "default_discount_account"),
'cost_center': pe.cost_center or frappe.get_cached_value('Company', pe.company, "cost_center"),
'amount': discount_amount * (-1 if payment_type == "Pay" else 1)
})
pe.set_difference_amount()
return pe
def get_bank_cash_account(doc, bank_account):
@@ -1160,10 +1252,12 @@ def set_party_type(dt):
party_type = "Customer"
elif dt in ("Purchase Invoice", "Purchase Order"):
party_type = "Supplier"
elif dt in ("Expense Claim", "Employee Advance"):
elif dt in ("Expense Claim", "Employee Advance", "Gratuity"):
party_type = "Employee"
elif dt in ("Fees"):
elif dt == "Fees":
party_type = "Student"
elif dt == "Donation":
party_type = "Donor"
return party_type
def set_party_account(dt, dn, doc, party_type):
@@ -1177,6 +1271,8 @@ def set_party_account(dt, dn, doc, party_type):
party_account = doc.advance_account
elif dt == "Expense Claim":
party_account = doc.payable_account
elif dt == "Gratuity":
party_account = doc.payable_account
else:
party_account = get_party_account(party_type, doc.get(party_type.lower()), doc.company)
return party_account
@@ -1189,7 +1285,7 @@ def set_party_account_currency(dt, party_account, doc):
return party_account_currency
def set_payment_type(dt, doc):
if (dt == "Sales Order" or (dt in ("Sales Invoice", "Fees", "Dunning") and doc.outstanding_amount > 0)) \
if (dt in ("Sales Order", "Donation") or (dt in ("Sales Invoice", "Fees", "Dunning") and doc.outstanding_amount > 0)) \
or (dt=="Purchase Invoice" and doc.outstanding_amount < 0):
payment_type = "Receive"
else:
@@ -1222,6 +1318,12 @@ def set_grand_total_and_outstanding_amount(party_amount, dt, party_account_curre
elif dt == "Dunning":
grand_total = doc.grand_total
outstanding_amount = doc.grand_total
elif dt == "Donation":
grand_total = doc.amount
outstanding_amount = doc.amount
elif dt == "Gratuity":
grand_total = doc.amount
outstanding_amount = flt(doc.amount) - flt(doc.paid_amount)
else:
if party_account_currency == doc.company_currency:
grand_total = flt(doc.get("base_rounded_total") or doc.base_grand_total)
@@ -1253,6 +1355,33 @@ def set_paid_amount_and_received_amount(dt, party_account_currency, bank, outsta
paid_amount = received_amount * doc.get('exchange_rate', 1)
return paid_amount, received_amount
def apply_early_payment_discount(paid_amount, received_amount, doc):
total_discount = 0
if doc.doctype in ['Sales Invoice', 'Purchase Invoice'] and doc.payment_schedule:
for term in doc.payment_schedule:
if not term.discounted_amount and term.discount and getdate(nowdate()) <= term.discount_date:
if term.discount_type == 'Percentage':
discount_amount = flt(doc.get('grand_total')) * (term.discount / 100)
else:
discount_amount = term.discount
discount_amount_in_foreign_currency = discount_amount * doc.get('conversion_rate', 1)
if doc.doctype == 'Sales Invoice':
paid_amount -= discount_amount
received_amount -= discount_amount_in_foreign_currency
else:
received_amount -= discount_amount
paid_amount -= discount_amount_in_foreign_currency
total_discount += discount_amount
if total_discount:
money = frappe.utils.fmt_money(total_discount, currency=doc.get('currency'))
frappe.msgprint(_("Discount of {} applied as per Payment Term").format(money), alert=1)
return paid_amount, received_amount, total_discount
def get_reference_as_per_payment_terms(payment_schedule, dt, dn, doc, grand_total, outstanding_amount):
references = []
for payment_term in payment_schedule:
@@ -1326,4 +1455,4 @@ def make_payment_order(source_name, target_doc=None):
}, target_doc, set_missing_values)
return doclist
return doclist

View File

@@ -193,6 +193,34 @@ class TestPaymentEntry(unittest.TestCase):
self.assertEqual(si.payment_schedule[0].paid_amount, 200.0)
self.assertEqual(si.payment_schedule[1].paid_amount, 36.0)
def test_payment_entry_against_payment_terms_with_discount(self):
si = create_sales_invoice(do_not_save=1, qty=1, rate=200)
create_payment_terms_template_with_discount()
si.payment_terms_template = 'Test Discount Template'
frappe.db.set_value('Company', si.company, 'default_discount_account', 'Write Off - _TC')
si.append('taxes', {
"charge_type": "On Net Total",
"account_head": "_Test Account Service Tax - _TC",
"cost_center": "_Test Cost Center - _TC",
"description": "Service Tax",
"rate": 18
})
si.save()
si.submit()
pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Cash - _TC")
pe.submit()
si.load_from_db()
self.assertEqual(pe.references[0].payment_term, '30 Credit Days with 10% Discount')
self.assertEqual(si.payment_schedule[0].payment_amount, 236.0)
self.assertEqual(si.payment_schedule[0].paid_amount, 212.40)
self.assertEqual(si.payment_schedule[0].outstanding, 0)
self.assertEqual(si.payment_schedule[0].discounted_amount, 23.6)
def test_payment_against_purchase_invoice_to_check_status(self):
pi = make_purchase_invoice(supplier="_Test Supplier USD", debit_to="_Test Payable USD - _TC",
@@ -591,6 +619,26 @@ def create_payment_terms_template():
}]
}).insert()
def create_payment_terms_template_with_discount():
create_payment_term('30 Credit Days with 10% Discount')
if not frappe.db.exists('Payment Terms Template', 'Test Discount Template'):
payment_term_template = frappe.get_doc({
'doctype': 'Payment Terms Template',
'template_name': 'Test Discount Template',
'allocate_payment_based_on_payment_terms': 1,
'terms': [{
'doctype': 'Payment Terms Template Detail',
'payment_term': '30 Credit Days with 10% Discount',
'invoice_portion': 100,
'credit_days_based_on': 'Day(s) after invoice date',
'credit_days': 2,
'discount': 10,
'discount_validity_based_on': 'Day(s) after invoice date',
'discount_validity': 1
}]
}).insert()
def create_payment_term(name):
if not frappe.db.exists('Payment Term', name):

View File

@@ -58,7 +58,7 @@
"fieldname": "total_amount",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Total Amount",
"label": "Grand Total",
"print_hide": 1,
"read_only": 1
},
@@ -92,9 +92,10 @@
"options": "Payment Term"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2020-03-13 12:07:19.362539",
"modified": "2021-02-10 11:25:47.144392",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry Reference",

View File

@@ -88,19 +88,19 @@ class PaymentReconciliation(Document):
voucher_type = ('Sales Invoice'
if self.party_type == 'Customer' else "Purchase Invoice")
return frappe.db.sql(""" SELECT `tab{doc}`.name as reference_name, %(voucher_type)s as reference_type,
(sum(`tabGL Entry`.{dr_or_cr}) - sum(`tabGL Entry`.{reconciled_dr_or_cr})) as amount,
return frappe.db.sql(""" SELECT doc.name as reference_name, %(voucher_type)s as reference_type,
(sum(gl.{dr_or_cr}) - sum(gl.{reconciled_dr_or_cr})) as amount,
account_currency as currency
FROM `tab{doc}`, `tabGL Entry`
FROM `tab{doc}` doc, `tabGL Entry` gl
WHERE
(`tab{doc}`.name = `tabGL Entry`.against_voucher or `tab{doc}`.name = `tabGL Entry`.voucher_no)
and `tab{doc}`.{party_type_field} = %(party)s
and `tab{doc}`.is_return = 1 and `tab{doc}`.return_against IS NULL
and `tabGL Entry`.against_voucher_type = %(voucher_type)s
and `tab{doc}`.docstatus = 1 and `tabGL Entry`.party = %(party)s
and `tabGL Entry`.party_type = %(party_type)s and `tabGL Entry`.account = %(account)s
and `tabGL Entry`.is_cancelled = 0
GROUP BY `tab{doc}`.name
(doc.name = gl.against_voucher or doc.name = gl.voucher_no)
and doc.{party_type_field} = %(party)s
and doc.is_return = 1 and ifnull(doc.return_against, "") = ""
and gl.against_voucher_type = %(voucher_type)s
and doc.docstatus = 1 and gl.party = %(party)s
and gl.party_type = %(party_type)s and gl.account = %(account)s
and gl.is_cancelled = 0
GROUP BY doc.name
Having
amount > 0
""".format(
@@ -113,7 +113,7 @@ class PaymentReconciliation(Document):
'party_type': self.party_type,
'voucher_type': voucher_type,
'account': self.receivable_payable_account
}, as_dict=1)
}, as_dict=1, debug=1)
def add_payment_entries(self, entries):
self.set('payments', [])

View File

@@ -3,6 +3,7 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import json
import frappe
from frappe import _
from frappe.model.document import Document
@@ -82,18 +83,37 @@ class PaymentRequest(Document):
self.make_communication_entry()
elif self.payment_channel == "Phone":
controller = get_payment_gateway_controller(self.payment_gateway)
payment_record = dict(
reference_doctype="Payment Request",
reference_docname=self.name,
payment_reference=self.reference_name,
grand_total=self.grand_total,
sender=self.email_to,
currency=self.currency,
payment_gateway=self.payment_gateway
)
controller.validate_transaction_currency(self.currency)
controller.request_for_payment(**payment_record)
self.request_phone_payment()
def request_phone_payment(self):
controller = get_payment_gateway_controller(self.payment_gateway)
request_amount = self.get_request_amount()
payment_record = dict(
reference_doctype="Payment Request",
reference_docname=self.name,
payment_reference=self.reference_name,
request_amount=request_amount,
sender=self.email_to,
currency=self.currency,
payment_gateway=self.payment_gateway
)
controller.validate_transaction_currency(self.currency)
controller.request_for_payment(**payment_record)
def get_request_amount(self):
data_of_completed_requests = frappe.get_all("Integration Request", filters={
'reference_doctype': self.doctype,
'reference_docname': self.name,
'status': 'Completed'
}, pluck="data")
if not data_of_completed_requests:
return self.grand_total
request_amounts = sum([json.loads(d).get('request_amount') for d in data_of_completed_requests])
return request_amounts
def on_cancel(self):
self.check_if_payment_entry_exists()
@@ -351,8 +371,8 @@ def make_payment_request(**args):
if args.order_type == "Shopping Cart" or args.mute_email:
pr.flags.mute_email = True
pr.insert(ignore_permissions=True)
if args.submit_doc:
pr.insert(ignore_permissions=True)
pr.submit()
if args.order_type == "Shopping Cart":
@@ -412,8 +432,8 @@ def get_existing_payment_request_amount(ref_dt, ref_dn):
def get_gateway_details(args):
"""return gateway and payment account of default payment gateway"""
if args.get("payment_gateway"):
return get_payment_gateway_account(args.get("payment_gateway"))
if args.get("payment_gateway_account"):
return get_payment_gateway_account(args.get("payment_gateway_account"))
if args.order_type == "Shopping Cart":
payment_gateway_account = frappe.get_doc("Shopping Cart Settings").payment_gateway_account

View File

@@ -2,7 +2,7 @@ frappe.listview_settings['Payment Request'] = {
add_fields: ["status"],
get_indicator: function(doc) {
if(doc.status == "Draft") {
return [__("Draft"), "darkgrey", "status,=,Draft"];
return [__("Draft"), "gray", "status,=,Draft"];
}
if(doc.status == "Requested") {
return [__("Requested"), "green", "status,=,Requested"];
@@ -19,5 +19,5 @@ frappe.listview_settings['Payment Request'] = {
else if(doc.status == "Cancelled") {
return [__("Cancelled"), "red", "status,=,Cancelled"];
}
}
}
}

View File

@@ -45,7 +45,8 @@ class TestPaymentRequest(unittest.TestCase):
def test_payment_request_linkings(self):
so_inr = make_sales_order(currency="INR")
pr = make_payment_request(dt="Sales Order", dn=so_inr.name, recipient_id="saurabh@erpnext.com")
pr = make_payment_request(dt="Sales Order", dn=so_inr.name, recipient_id="saurabh@erpnext.com",
payment_gateway_account="_Test Gateway - INR")
self.assertEqual(pr.reference_doctype, "Sales Order")
self.assertEqual(pr.reference_name, so_inr.name)
@@ -54,7 +55,8 @@ class TestPaymentRequest(unittest.TestCase):
conversion_rate = get_exchange_rate("USD", "INR")
si_usd = create_sales_invoice(currency="USD", conversion_rate=conversion_rate)
pr = make_payment_request(dt="Sales Invoice", dn=si_usd.name, recipient_id="saurabh@erpnext.com")
pr = make_payment_request(dt="Sales Invoice", dn=si_usd.name, recipient_id="saurabh@erpnext.com",
payment_gateway_account="_Test Gateway - USD")
self.assertEqual(pr.reference_doctype, "Sales Invoice")
self.assertEqual(pr.reference_name, si_usd.name)
@@ -68,7 +70,7 @@ class TestPaymentRequest(unittest.TestCase):
so_inr = make_sales_order(currency="INR")
pr = make_payment_request(dt="Sales Order", dn=so_inr.name, recipient_id="saurabh@erpnext.com",
mute_email=1, submit_doc=1, return_doc=1)
mute_email=1, payment_gateway_account="_Test Gateway - INR", submit_doc=1, return_doc=1)
pe = pr.set_as_paid()
so_inr = frappe.get_doc("Sales Order", so_inr.name)
@@ -79,7 +81,7 @@ class TestPaymentRequest(unittest.TestCase):
currency="USD", conversion_rate=50)
pr = make_payment_request(dt="Sales Invoice", dn=si_usd.name, recipient_id="saurabh@erpnext.com",
mute_email=1, payment_gateway="_Test Gateway - USD", submit_doc=1, return_doc=1)
mute_email=1, payment_gateway_account="_Test Gateway - USD", submit_doc=1, return_doc=1)
pe = pr.set_as_paid()
@@ -106,7 +108,7 @@ class TestPaymentRequest(unittest.TestCase):
currency="USD", conversion_rate=50)
pr = make_payment_request(dt="Sales Invoice", dn=si_usd.name, recipient_id="saurabh@erpnext.com",
mute_email=1, payment_gateway="_Test Gateway - USD", submit_doc=1, return_doc=1)
mute_email=1, payment_gateway_account="_Test Gateway - USD", submit_doc=1, return_doc=1)
pe = pr.create_payment_entry()
pr.load_from_db()

View File

@@ -6,11 +6,23 @@
"engine": "InnoDB",
"field_order": [
"payment_term",
"section_break_15",
"description",
"section_break_4",
"due_date",
"invoice_portion",
"payment_amount",
"mode_of_payment",
"column_break_5",
"invoice_portion",
"section_break_6",
"discount_type",
"discount_date",
"column_break_9",
"discount",
"section_break_9",
"payment_amount",
"discounted_amount",
"column_break_3",
"outstanding",
"paid_amount"
],
"fields": [
@@ -25,6 +37,7 @@
},
{
"columns": 2,
"fetch_from": "payment_term.description",
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
@@ -62,14 +75,82 @@
"options": "Mode of Payment"
},
{
"depends_on": "paid_amount",
"fieldname": "paid_amount",
"fieldtype": "Currency",
"label": "Paid Amount"
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break"
},
{
"default": "0",
"depends_on": "discounted_amount",
"fieldname": "discounted_amount",
"fieldtype": "Currency",
"label": "Discounted Amount",
"read_only": 1
},
{
"fetch_from": "payment_amount",
"fieldname": "outstanding",
"fieldtype": "Currency",
"label": "Outstanding",
"read_only": 1
},
{
"fieldname": "column_break_5",
"fieldtype": "Column Break"
},
{
"depends_on": "discount",
"fieldname": "discount_date",
"fieldtype": "Date",
"label": "Discount Date",
"mandatory_depends_on": "discount"
},
{
"default": "Percentage",
"fetch_from": "payment_term.discount_type",
"fieldname": "discount_type",
"fieldtype": "Select",
"label": "Discount Type",
"options": "Percentage\nAmount"
},
{
"fetch_from": "payment_term.discount",
"fieldname": "discount",
"fieldtype": "Float",
"label": "Discount"
},
{
"fieldname": "section_break_9",
"fieldtype": "Section Break"
},
{
"collapsible": 1,
"fieldname": "section_break_15",
"fieldtype": "Section Break",
"label": "Description"
},
{
"fieldname": "section_break_6",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_9",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_4",
"fieldtype": "Section Break"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2020-03-13 17:58:24.729526",
"modified": "2021-02-15 21:03:12.540546",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Schedule",

View File

@@ -1,2 +1,22 @@
// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Payment Term', {
onload(frm) {
frm.trigger('set_dynamic_description');
},
discount(frm) {
frm.trigger('set_dynamic_description');
},
discount_type(frm) {
frm.trigger('set_dynamic_description');
},
set_dynamic_description(frm) {
if (frm.doc.discount) {
let description = __("{0}% of total invoice value will be given as discount.", [frm.doc.discount]);
if (frm.doc.discount_type == 'Amount') {
description = __("{0} will be given as discount.", [fmt_money(frm.doc.discount)]);
}
frm.set_df_property("discount", "description", description);
}
}
});

View File

@@ -1,386 +1,166 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:payment_term_name",
"beta": 0,
"creation": "2017-08-10 15:24:54.876365",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:payment_term_name",
"creation": "2017-08-10 15:24:54.876365",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"payment_term_name",
"invoice_portion",
"mode_of_payment",
"column_break_3",
"due_date_based_on",
"credit_days",
"credit_months",
"section_break_8",
"discount_type",
"discount",
"column_break_11",
"discount_validity_based_on",
"discount_validity",
"section_break_6",
"description"
],
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"fieldname": "payment_term_name",
"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": "Payment Term Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"bold": 1,
"fieldname": "payment_term_name",
"fieldtype": "Data",
"label": "Payment Term Name",
"unique": 1
},
{
"description": "Provide the invoice portion in percent",
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"fieldname": "invoice_portion",
"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": "Invoice Portion",
"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
},
"bold": 1,
"fieldname": "invoice_portion",
"fieldtype": "Float",
"label": "Invoice Portion (%)"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mode_of_payment",
"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": "Mode of Payment",
"length": 0,
"no_copy": 0,
"options": "Mode of Payment",
"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
},
"fieldname": "mode_of_payment",
"fieldtype": "Link",
"label": "Mode of Payment",
"options": "Mode of Payment"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_3",
"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
},
"fieldname": "column_break_3",
"fieldtype": "Column Break"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"fieldname": "due_date_based_on",
"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": "Due Date Based On",
"length": 0,
"no_copy": 0,
"options": "Day(s) after invoice date\nDay(s) after the end of the invoice month\nMonth(s) after the end of the invoice month",
"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
},
"bold": 1,
"fieldname": "due_date_based_on",
"fieldtype": "Select",
"label": "Due Date Based On",
"options": "Day(s) after invoice date\nDay(s) after the end of the invoice month\nMonth(s) after the end of the invoice month"
},
{
"description": "Give number of days according to prior selection",
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:in_list(['Day(s) after invoice date', 'Day(s) after the end of the invoice month'], doc.due_date_based_on)",
"fieldname": "credit_days",
"fieldtype": "Int",
"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": "Credit Days",
"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
},
"bold": 1,
"depends_on": "eval:in_list(['Day(s) after invoice date', 'Day(s) after the end of the invoice month'], doc.due_date_based_on)",
"fieldname": "credit_days",
"fieldtype": "Int",
"label": "Credit Days"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.due_date_based_on=='Month(s) after the end of the invoice month'",
"fieldname": "credit_months",
"fieldtype": "Int",
"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": "Credit Months",
"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
},
"depends_on": "eval:doc.due_date_based_on=='Month(s) after the end of the invoice month'",
"fieldname": "credit_months",
"fieldtype": "Int",
"label": "Credit Months"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_6",
"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
},
"fieldname": "section_break_6",
"fieldtype": "Section Break"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"columns": 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": 0,
"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
"bold": 1,
"fieldname": "description",
"fieldtype": "Small Text",
"label": "Description"
},
{
"fieldname": "section_break_8",
"fieldtype": "Section Break",
"label": "Discount Settings"
},
{
"default": "Percentage",
"fieldname": "discount_type",
"fieldtype": "Select",
"label": "Discount Type",
"options": "Percentage\nAmount"
},
{
"fieldname": "discount",
"fieldtype": "Float",
"label": "Discount"
},
{
"default": "Day(s) after invoice date",
"depends_on": "discount",
"fieldname": "discount_validity_based_on",
"fieldtype": "Select",
"label": "Discount Validity Based On",
"options": "Day(s) after invoice date\nDay(s) after the end of the invoice month\nMonth(s) after the end of the invoice month"
},
{
"depends_on": "discount",
"fieldname": "discount_validity",
"fieldtype": "Int",
"label": "Discount Validity",
"mandatory_depends_on": "discount"
},
{
"fieldname": "column_break_11",
"fieldtype": "Column Break"
}
],
"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": "2020-10-14 10:47:32.830478",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Term",
"name_case": "",
"owner": "Administrator",
],
"links": [],
"modified": "2021-02-15 20:30:56.256403",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Term",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 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,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
},
{
"amend": 0,
"apply_user_permissions": 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,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"write": 1
},
},
{
"amend": 0,
"apply_user_permissions": 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,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"share": 1,
"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": 1,
"track_seen": 0
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -3,11 +3,6 @@
frappe.ui.form.on('Payment Terms Template', {
setup: function(frm) {
frm.add_fetch("payment_term", "description", "description");
frm.add_fetch("payment_term", "invoice_portion", "invoice_portion");
frm.add_fetch("payment_term", "due_date_based_on", "due_date_based_on");
frm.add_fetch("payment_term", "credit_days", "credit_days");
frm.add_fetch("payment_term", "credit_months", "credit_months");
frm.add_fetch("payment_term", "mode_of_payment", "mode_of_payment");
}
});

View File

@@ -13,7 +13,6 @@ from frappe import _
class PaymentTermsTemplate(Document):
def validate(self):
self.validate_invoice_portion()
self.validate_credit_days()
self.check_duplicate_terms()
def validate_invoice_portion(self):
@@ -24,11 +23,6 @@ class PaymentTermsTemplate(Document):
if flt(total_portion, 2) != 100.00:
frappe.msgprint(_('Combined invoice portion must equal 100%'), raise_exception=1, indicator='red')
def validate_credit_days(self):
for term in self.terms:
if cint(term.credit_days) < 0:
frappe.msgprint(_('Credit Days cannot be a negative number'), raise_exception=1, indicator='red')
def check_duplicate_terms(self):
terms = []
for term in self.terms:

View File

@@ -1,278 +1,164 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "",
"beta": 0,
"creation": "2017-08-10 15:34:09.409562",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"actions": [],
"creation": "2017-08-10 15:34:09.409562",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"payment_term",
"section_break_13",
"description",
"section_break_4",
"invoice_portion",
"mode_of_payment",
"column_break_3",
"due_date_based_on",
"credit_days",
"credit_months",
"section_break_8",
"discount_type",
"discount",
"column_break_11",
"discount_validity_based_on",
"discount_validity"
],
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "payment_term",
"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 Term",
"length": 0,
"no_copy": 0,
"options": "Payment Term",
"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
},
"columns": 2,
"fieldname": "payment_term",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Payment Term",
"options": "Payment Term"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"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,
"options": "",
"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
},
"columns": 2,
"fetch_from": "payment_term.description",
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"default": "0",
"fieldname": "invoice_portion",
"fieldtype": "Percent",
"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": "Invoice Portion",
"length": 0,
"no_copy": 0,
"options": "",
"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
},
"columns": 2,
"fetch_from": "payment_term.invoice_portion",
"fetch_if_empty": 1,
"fieldname": "invoice_portion",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Invoice Portion (%)",
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "due_date_based_on",
"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": "Due Date Based On",
"length": 0,
"no_copy": 0,
"options": "Day(s) after invoice date\nDay(s) after the end of the invoice month\nMonth(s) after the end of the invoice month",
"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
},
"columns": 2,
"fetch_from": "payment_term.due_date_based_on",
"fetch_if_empty": 1,
"fieldname": "due_date_based_on",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Due Date Based On",
"options": "Day(s) after invoice date\nDay(s) after the end of the invoice month\nMonth(s) after the end of the invoice month",
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"default": "0",
"depends_on": "eval:in_list(['Day(s) after invoice date', 'Day(s) after the end of the invoice month'], doc.due_date_based_on)",
"fieldname": "credit_days",
"fieldtype": "Int",
"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 Days",
"length": 0,
"no_copy": 0,
"options": "",
"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
},
"columns": 2,
"default": "0",
"depends_on": "eval:in_list(['Day(s) after invoice date', 'Day(s) after the end of the invoice month'], doc.due_date_based_on)",
"fetch_from": "payment_term.credit_days",
"fetch_if_empty": 1,
"fieldname": "credit_days",
"fieldtype": "Int",
"in_list_view": 1,
"label": "Credit Days",
"non_negative": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0",
"depends_on": "eval:doc.due_date_based_on=='Month(s) after the end of the invoice month'",
"fieldname": "credit_months",
"fieldtype": "Int",
"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": "Credit Months",
"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
},
"default": "0",
"depends_on": "eval:doc.due_date_based_on=='Month(s) after the end of the invoice month'",
"fetch_from": "payment_term.credit_months",
"fetch_if_empty": 1,
"fieldname": "credit_months",
"fieldtype": "Int",
"label": "Credit Months",
"non_negative": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "mode_of_payment",
"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": "Mode of Payment",
"length": 0,
"no_copy": 0,
"options": "Mode of Payment",
"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
"fetch_from": "payment_term.mode_of_payment",
"fieldname": "mode_of_payment",
"fieldtype": "Link",
"label": "Mode of Payment",
"options": "Mode of Payment"
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_8",
"fieldtype": "Section Break",
"label": "Discount Settings"
},
{
"default": "Percentage",
"fetch_from": "payment_term.discount_type",
"fetch_if_empty": 1,
"fieldname": "discount_type",
"fieldtype": "Select",
"label": "Discount Type",
"options": "Percentage\nAmount"
},
{
"fetch_from": "payment_term.discount",
"fetch_if_empty": 1,
"fieldname": "discount",
"fieldtype": "Float",
"label": "Discount"
},
{
"fieldname": "column_break_11",
"fieldtype": "Column Break"
},
{
"default": "Day(s) after invoice date",
"depends_on": "discount",
"fetch_from": "payment_term.discount_validity_based_on",
"fetch_if_empty": 1,
"fieldname": "discount_validity_based_on",
"fieldtype": "Select",
"label": "Discount Validity Based On",
"options": "Day(s) after invoice date\nDay(s) after the end of the invoice month\nMonth(s) after the end of the invoice month"
},
{
"collapsible": 1,
"fieldname": "section_break_13",
"fieldtype": "Section Break",
"label": "Description"
},
{
"depends_on": "discount",
"fetch_from": "payment_term.discount_validity",
"fetch_if_empty": 1,
"fieldname": "discount_validity",
"fieldtype": "Int",
"label": "Discount Validity",
"mandatory_depends_on": "discount"
},
{
"fieldname": "section_break_4",
"fieldtype": "Section Break"
}
],
"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-08-21 16:15:55.143025",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Terms Template Detail",
"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
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-02-24 11:56:12.410807",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Terms Template Detail",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -8,7 +8,7 @@ from frappe import _
from erpnext.accounts.utils import get_account_currency
from erpnext.controllers.accounts_controller import AccountsController
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (get_accounting_dimensions,
get_dimension_filters)
get_dimensions)
class PeriodClosingVoucher(AccountsController):
def validate(self):
@@ -58,7 +58,7 @@ class PeriodClosingVoucher(AccountsController):
for dimension in accounting_dimensions:
dimension_fields.append('t1.{0}'.format(dimension))
dimension_filters, default_dimensions = get_dimension_filters()
dimension_filters, default_dimensions = get_dimensions()
pl_accounts = self.get_pl_balances(dimension_fields)

View File

@@ -3,6 +3,7 @@
frappe.ui.form.on('POS Closing Entry', {
onload: function(frm) {
frm.ignore_doctypes_on_cancel_all = ['POS Invoice Merge Log'];
frm.set_query("pos_profile", function(doc) {
return {
filters: { 'user': doc.user }
@@ -20,7 +21,7 @@ frappe.ui.form.on('POS Closing Entry', {
return { filters: { 'status': 'Open', 'docstatus': 1 } };
});
if (frm.doc.docstatus === 0) frm.set_value("period_end_date", frappe.datetime.now_datetime());
if (frm.doc.docstatus === 0 && !frm.doc.amended_from) frm.set_value("period_end_date", frappe.datetime.now_datetime());
if (frm.doc.docstatus === 1) set_html_data(frm);
},

View File

@@ -6,11 +6,13 @@
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"period_details_section",
"period_start_date",
"period_end_date",
"column_break_3",
"posting_date",
"pos_opening_entry",
"status",
"section_break_5",
"company",
"column_break_7",
@@ -64,7 +66,8 @@
},
{
"fieldname": "section_break_5",
"fieldtype": "Section Break"
"fieldtype": "Section Break",
"label": "User Details"
},
{
"fieldname": "company",
@@ -120,7 +123,7 @@
"collapsible_depends_on": "eval:doc.docstatus==0",
"fieldname": "section_break_13",
"fieldtype": "Section Break",
"label": "Details"
"label": "Totals"
},
{
"default": "0",
@@ -184,11 +187,32 @@
"label": "POS Opening Entry",
"options": "POS Opening Entry",
"reqd": 1
},
{
"allow_on_submit": 1,
"default": "Draft",
"fieldname": "status",
"fieldtype": "Select",
"hidden": 1,
"label": "Status",
"options": "Draft\nSubmitted\nQueued\nCancelled",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "period_details_section",
"fieldtype": "Section Break",
"label": "Period Details"
}
],
"is_submittable": 1,
"links": [],
"modified": "2020-05-29 15:03:22.226113",
"links": [
{
"link_doctype": "POS Invoice Merge Log",
"link_fieldname": "pos_closing_entry"
}
],
"modified": "2021-02-01 13:47:20.722104",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Closing Entry",

View File

@@ -6,13 +6,12 @@ from __future__ import unicode_literals
import frappe
import json
from frappe import _
from frappe.model.document import Document
from frappe.utils import getdate, get_datetime, flt
from collections import defaultdict
from frappe.utils import get_datetime, flt
from erpnext.controllers.status_updater import StatusUpdater
from erpnext.controllers.taxes_and_totals import get_itemised_tax_breakup_data
from erpnext.accounts.doctype.pos_invoice_merge_log.pos_invoice_merge_log import merge_pos_invoices
from erpnext.accounts.doctype.pos_invoice_merge_log.pos_invoice_merge_log import consolidate_pos_invoices, unconsolidate_pos_invoices
class POSClosingEntry(Document):
class POSClosingEntry(StatusUpdater):
def validate(self):
if frappe.db.get_value("POS Opening Entry", self.pos_opening_entry, "status") != "Open":
frappe.throw(_("Selected POS Opening Entry should be open."), title=_("Invalid Opening Entry"))
@@ -21,11 +20,16 @@ class POSClosingEntry(Document):
self.validate_pos_invoices()
def validate_pos_closing(self):
user = frappe.get_all("POS Closing Entry",
filters = { "user": self.user, "docstatus": 1, "pos_profile": self.pos_profile },
or_filters = {
"period_start_date": ("between", [self.period_start_date, self.period_end_date]),
"period_end_date": ("between", [self.period_start_date, self.period_end_date])
user = frappe.db.sql("""
SELECT name FROM `tabPOS Closing Entry`
WHERE
user = %(user)s AND docstatus = 1 AND pos_profile = %(profile)s AND
(period_start_date between %(start)s and %(end)s OR period_end_date between %(start)s and %(end)s)
""", {
'user': self.user,
'profile': self.pos_profile,
'start': self.period_start_date,
'end': self.period_end_date
})
if user:
@@ -57,20 +61,29 @@ class POSClosingEntry(Document):
if not invalid_rows:
return
error_list = [_("Row #{}: {}").format(row.get('idx'), row.get('msg')) for row in invalid_rows]
frappe.throw(error_list, title=_("Invalid POS Invoices"), as_list=True)
error_list = []
for row in invalid_rows:
for msg in row.get('msg'):
error_list.append(_("Row #{}: {}").format(row.get('idx'), msg))
def on_submit(self):
merge_pos_invoices(self.pos_transactions)
opening_entry = frappe.get_doc("POS Opening Entry", self.pos_opening_entry)
opening_entry.pos_closing_entry = self.name
opening_entry.set_status()
opening_entry.save()
frappe.throw(error_list, title=_("Invalid POS Invoices"), as_list=True)
def get_payment_reconciliation_details(self):
currency = frappe.get_cached_value('Company', self.company, "default_currency")
return frappe.render_template("erpnext/accounts/doctype/pos_closing_entry/closing_voucher_details.html",
{"data": self, "currency": currency})
def on_submit(self):
consolidate_pos_invoices(closing_entry=self)
def on_cancel(self):
unconsolidate_pos_invoices(closing_entry=self)
def update_opening_entry(self, for_cancel=False):
opening_entry = frappe.get_doc("POS Opening Entry", self.pos_opening_entry)
opening_entry.pos_closing_entry = self.name if not for_cancel else None
opening_entry.set_status()
opening_entry.save()
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs

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