Compare commits

..

970 Commits

Author SHA1 Message Date
Frappe PR Bot
ac1af3bce9 chore(release): Bumped to Version 14.10.1
## [14.10.1](https://github.com/frappe/erpnext/compare/v14.10.0...v14.10.1) (2022-12-13)

### Bug Fixes

* `Enough Parts to Build` in `BOM Stock Report` ([3b9e9d2](3b9e9d2c6e))
* `Material Request` reference in internal `Sales Order` ([416d178](416d178209))
* add translation variable order ([ef933a8](ef933a8231))
* Buying and selling check in pricing rule ([f5205a5](f5205a5b5d))
* **ecommerce:** remove query parameters from referer ([40621b9](40621b99c8))
* handle_post_depr_entries_fail, show error alert and send email ([b661f57](b661f5758a))
* incorrect balance on parent company due to key mismatch ([436e93c](436e93c129))
* index error on customer master ([02cc618](02cc618a1f))
* Maintain Same Rate Throughout Sales Cycle doesn't work ([5398cf8](5398cf8f22)), closes [#32923](https://github.com/frappe/erpnext/issues/32923)
* order status in `Production Planning Report` ([a657db6](a657db66b4))
* Permission issue in Tax Detail report ([7a5b80d](7a5b80dfbc))
* **pos:** variable typo: `s_pos` -> `is_pos` ([afbd48f](afbd48f26e))
* Reapply pricing rule on qty change ([c726c16](c726c16702))
* Remove free items ([5e5937d](5e5937d6d0))
* total value in Warehouse Wise Stock Balance ([c5a54d7](c5a54d7912))

### Performance Improvements

* add indexes on payment entry reference (backport [#33288](https://github.com/frappe/erpnext/issues/33288)) ([#33289](https://github.com/frappe/erpnext/issues/33289)) ([ce63086](ce63086813))
2022-12-13 12:30:55 +00:00
Ankush Menat
983cc345f2 Merge pull request #33318 from frappe/version-14-hotfix
chore: release v14
2022-12-13 17:59:30 +05:30
Sagar Sharma
6c3e802657 Merge pull request #33320 from frappe/mergify/bp/version-14-hotfix/pr-33314
fix: `Enough Parts to Build` in `BOM Stock Report` (backport #33314)
2022-12-13 15:58:24 +05:30
Sagar Sharma
4059b768f6 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-33314 2022-12-13 15:24:41 +05:30
Nabin Hait
bd6d249b8a Merge pull request #33322 from frappe/mergify/bp/version-14-hotfix/pr-33300
fix(pos): variable typo: `s_pos` -> `is_pos` (backport #33300)
2022-12-13 15:22:53 +05:30
Sabu Siyad
afbd48f26e fix(pos): variable typo: s_pos -> is_pos
Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit 7d64bf78cf)
2022-12-13 09:52:15 +00:00
s-aga-r
3b9e9d2c6e fix: Enough Parts to Build in BOM Stock Report
(cherry picked from commit 723c64ba73)
2022-12-13 09:50:01 +00:00
Nabin Hait
00ce3382b8 Merge pull request #33316 from frappe/mergify/bp/version-14-hotfix/pr-33313
fix: Permission issue in Tax Detail report (backport #33313)
2022-12-13 15:15:35 +05:30
Nabin Hait
00379c277b Merge pull request #33259 from AnandBaburajan/handle_post_depr_entries_fail
fix: handle asset depreciation entries posting failure, show error alert and send email
2022-12-13 15:05:36 +05:30
Nabin Hait
7a5b80dfbc fix: Permission issue in Tax Detail report
(cherry picked from commit aa787e4030)
2022-12-13 08:58:29 +00:00
Anand Baburajan
db36ddc7c0 Merge branch 'version-14-hotfix' into handle_post_depr_entries_fail 2022-12-13 14:09:11 +05:30
ruthra kumar
dbd0d560a8 Merge pull request #33311 from frappe/mergify/bp/version-14-hotfix/pr-33303
fix: incorrect balance on parent company on consolidate Balance sheet due to key mismatch (backport #33303)
2022-12-13 13:45:41 +05:30
rohitwaghchaure
d707528113 Merge pull request #33301 from frappe/mergify/bp/version-14-hotfix/pr-33281
fix: maintain same rate throughout sales cycle doesn't work with quotation (backport #33281)
2022-12-13 10:59:11 +05:30
ruthra kumar
436e93c129 fix: incorrect balance on parent company due to key mismatch
(cherry picked from commit 7b3316dc31)
2022-12-13 03:37:05 +00:00
Sagar Sharma
8b7c9ced0a Merge pull request #33306 from frappe/mergify/bp/version-14-hotfix/pr-33304
fix: `Material Request` reference in internal `Sales Order` (backport #33304)
2022-12-12 23:53:10 +05:30
s-aga-r
416d178209 fix: Material Request reference in internal Sales Order
(cherry picked from commit 78b438f6cf)
2022-12-12 18:18:53 +00:00
Tunde Akinyanmi
5d410f114a test: refactor test case
(cherry picked from commit 71aa8c5e1c)
2022-12-12 14:10:04 +00:00
Tunde Akinyanmi
1b94200ab7 test: ensure test case sets Selling Settings
(cherry picked from commit d193a14b8f)
2022-12-12 14:10:04 +00:00
Tunde Akinyanmi
5398cf8f22 fix: Maintain Same Rate Throughout Sales Cycle doesn't work
Issue #29976 was partly fixed by #32923 but the problem still persists.
The reason is because an incorrect fieldname was passed to the
`validate_rate_with_reference_doc` method.
This commit fixes it

(cherry picked from commit 97ddfcfc7c)
2022-12-12 14:10:03 +00:00
Anand Baburajan
7a7325fd90 Merge branch 'version-14-hotfix' into handle_post_depr_entries_fail 2022-12-12 16:36:19 +05:30
mergify[bot]
ce63086813 perf: add indexes on payment entry reference (backport #33288) (#33289)
perf: add indexes on payment entry reference (#33288)

Adds index on:
1. reference doctype
2. reference name

*Why not composite index?*

There are three type of queries on this doctype

- filtering ref_doctype - doctype index helps here
- filtering ref_name - name index helps here
- filtering both - name index helps here too. Since it has sufficiently
  high cardinality. Composite index wont help in case where ref_doctype
  isn't specfied.

[skip ci]

(cherry picked from commit 593626f502)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-12-12 13:02:23 +05:30
Anand Baburajan
92ed9fdd03 Merge branch 'version-14-hotfix' into handle_post_depr_entries_fail 2022-12-08 21:26:27 +05:30
rohitwaghchaure
52e07da535 Merge pull request #33262 from frappe/mergify/bp/version-14-hotfix/pr-33258
fix: total value in Warehouse Wise Stock Balance (backport #33258)
2022-12-08 21:14:29 +05:30
Anand Baburajan
9b5620c838 Merge branch 'version-14-hotfix' into handle_post_depr_entries_fail 2022-12-08 21:04:32 +05:30
anandbaburajan
4fbf65dd57 chore: use frappe.db.set_value instead of asset.save 2022-12-08 21:04:08 +05:30
Deepesh Garg
c2aaab9e15 Merge pull request #33272 from frappe/mergify/bp/version-14-hotfix/pr-33200
fix: Buying and selling check in pricing rule (backport #33200)
2022-12-08 20:54:48 +05:30
Deepesh Garg
ad03355333 chore: Update tests
(cherry picked from commit 6192af5cf0)
2022-12-08 13:12:32 +00:00
Deepesh Garg
5e5937d6d0 fix: Remove free items
(cherry picked from commit 0581000990)
2022-12-08 13:12:31 +00:00
Deepesh Garg
033b2a4825 chore: Add POS Invoices
(cherry picked from commit 5f821b93a5)
2022-12-08 13:12:31 +00:00
Deepesh Garg
c726c16702 fix: Reapply pricing rule on qty change
(cherry picked from commit b741ae143c)
2022-12-08 13:12:30 +00:00
Deepesh Garg
f5205a5b5d fix: Buying and selling check in pricing rule
(cherry picked from commit f54838ab56)
2022-12-08 13:12:30 +00:00
Deepesh Garg
b0cccaff01 Merge pull request #33266 from frappe/mergify/bp/version-14-hotfix/pr-33227
fix: add translation variable index (backport #33227)
2022-12-08 18:06:37 +05:30
Deepesh Garg
05056327e7 Merge pull request #33270 from frappe/mergify/bp/version-14-hotfix/pr-33269
fix(ecommerce): remove query parameters from referrer (backport #33269)
2022-12-08 18:06:22 +05:30
Sabu Siyad
40621b99c8 fix(ecommerce): remove query parameters from referer
inclusion of query parameters results in logic failure

example:
- logic check if referrer is `all-products`
- `http://shop.example/all-products` -> `all-products`, valid outcome
- `http://shop.example/all-products?start=1` -> `all-products?start=1`,
  invalid outcome

Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit b6bd408f19)
2022-12-08 11:42:24 +00:00
barredterra
ef933a8231 fix: add translation variable order
(cherry picked from commit 748c74ba52)
2022-12-08 09:47:56 +00:00
Deepesh Garg
8467b2eb25 Merge pull request #33264 from frappe/mergify/bp/version-14-hotfix/pr-33254
fix: index error on customer master (backport #33254)
2022-12-08 15:15:42 +05:30
ruthra kumar
02cc618a1f fix: index error on customer master
(cherry picked from commit cf1e3dc8ea)
2022-12-08 07:23:13 +00:00
Rohit Waghchaure
c5a54d7912 fix: total value in Warehouse Wise Stock Balance
(cherry picked from commit f598da7c81)
2022-12-08 04:43:59 +00:00
anandbaburajan
bb66b64b94 chore: styling 2022-12-08 01:35:10 +05:30
Anand Baburajan
c35e352b3b Merge branch 'version-14-hotfix' into handle_post_depr_entries_fail 2022-12-08 01:29:43 +05:30
anandbaburajan
b661f5758a fix: handle_post_depr_entries_fail, show error alert and send email 2022-12-08 01:00:57 +05:30
Sagar Sharma
162ecdca75 Merge pull request #33256 from frappe/mergify/bp/version-14-hotfix/pr-33255
fix: order status in `Production Planning Report` (backport #33255)
2022-12-08 00:04:01 +05:30
s-aga-r
a657db66b4 fix: order status in Production Planning Report
(cherry picked from commit 632c08f7e0)
2022-12-07 18:06:54 +00:00
Frappe PR Bot
1e351a9e0b chore(release): Bumped to Version 14.10.0
# [14.10.0](https://github.com/frappe/erpnext/compare/v14.9.0...v14.10.0) (2022-12-06)

### Bug Fixes

* add company filter in RFQ Items ([7c1595e](7c1595e2c2))
* Allow item rate udpates for non-stock invoices ([0307656](030765618b))
* Bundle item rates ([82cdf49](82cdf49d32))
* data import mandatory account_head, charge_type ([653cb9f](653cb9fc3b))
* default clear repost logs ([e039a14](e039a14f6f))
* Due date for month end payment term ([9b40b7f](9b40b7f240))
* Error on making stock entry from material request ([701ccc3](701ccc36c8))
* key error on p/l and balance sheet reports on foreign currency ([23a0a53](23a0a5337e))
* key error while filtering on date range and different currency ([08bca7d](08bca7d252))
* **lint:** trailing whitespace ([fae941c](fae941c4e3))
* non empty FG batch picked while completing work order ([e5e6b5d](e5e6b5d81c))
* **pos:** partial return amount update ([91920f4](91920f4d84))
* reload currency exchange settings ([5b5a85e](5b5a85ee3b))
* replace sql code with fields list in get_cached_value ([e18d0ec](e18d0eca3c))
* Tax withholding net total for PI in reports ([f87c3c6](f87c3c6157))
* test case ([39680ed](39680ed28b))
* type error on Sales Pipeline Analytics ([3af2b9b](3af2b9b423))
* use is_last_day_of_the_month in test_scrap_asset ([fc175e2](fc175e2b1f))
* **UX:** Alert on change of item rate in Stock Entry ([b2da76f](b2da76f02c))

### Features

* warehouse wise stock balance ([7027fda](7027fdae39))
2022-12-06 14:37:42 +00:00
Deepesh Garg
8f97b07463 Merge pull request #33233 from frappe/version-14-hotfix
chore: release v14
2022-12-06 20:06:17 +05:30
Deepesh Garg
e5cd4195d9 Merge pull request #33238 from frappe/mergify/bp/version-14-hotfix/pr-33192
fix: Bundle item rates (backport #33192)
2022-12-06 18:57:08 +05:30
Deepesh Garg
8a17680e75 Merge pull request #33239 from frappe/mergify/bp/version-14-hotfix/pr-33146
fix: reload Currency Exchange Settings in patch (backport #33146)
2022-12-06 18:56:52 +05:30
rohitwaghchaure
bc5523318c Merge pull request #33240 from frappe/mergify/bp/version-14-hotfix/pr-33236
feat: warehouse wise stock balance (backport #33236)
2022-12-06 18:03:36 +05:30
Rohit Waghchaure
7027fdae39 feat: warehouse wise stock balance
(cherry picked from commit 861aa9e08a)
2022-12-06 12:29:23 +00:00
barredterra
5b5a85ee3b fix: reload currency exchange settings
(cherry picked from commit 06e094b5fc)
2022-12-06 12:09:03 +00:00
Deepesh Garg
98bb446e98 chore: Update tests
(cherry picked from commit b1242bc56c)
2022-12-06 12:08:06 +00:00
Deepesh Garg
076027a68c chore: Consider bundle qty as well
(cherry picked from commit e5566b31d5)
2022-12-06 12:08:06 +00:00
Deepesh Garg
82cdf49d32 fix: Bundle item rates
(cherry picked from commit 826f45ad60)
2022-12-06 12:08:05 +00:00
Deepesh Garg
cc0f9d4ed5 Merge pull request #33235 from frappe/mergify/bp/version-14-hotfix/pr-33191
fix: key error while filtering on date range and reporting on foreign currency (backport #33191)
2022-12-06 17:36:18 +05:30
ruthra kumar
23a0a5337e fix: key error on p/l and balance sheet reports on foreign currency
(cherry picked from commit a6794c3606)
2022-12-06 16:55:03 +05:30
ruthra kumar
e18d0eca3c fix: replace sql code with fields list in get_cached_value
(cherry picked from commit 19db7e2989)
2022-12-06 16:55:00 +05:30
ruthra kumar
08bca7d252 fix: key error while filtering on date range and different currency
(cherry picked from commit 9b8d6fe411)
2022-12-06 10:14:01 +00:00
Deepesh Garg
ee74c555d5 Merge pull request #33230 from frappe/mergify/bp/version-14-hotfix/pr-33219
fix: Allow item rate updates for non-stock invoices (backport #33219)
2022-12-06 12:30:41 +05:30
Deepesh Garg
030765618b fix: Allow item rate udpates for non-stock invoices
(cherry picked from commit ef9d126254)
2022-12-06 03:43:16 +00:00
rohitwaghchaure
cea7a32abc Merge pull request #33225 from frappe/mergify/bp/version-14-hotfix/pr-33224
fix: non empty FG batch picked while completing work order (backport #33224)
2022-12-05 23:59:07 +05:30
Rohit Waghchaure
e5e6b5d81c fix: non empty FG batch picked while completing work order
(cherry picked from commit 713330cbf6)
2022-12-05 15:00:15 +00:00
ruthra kumar
60f5611fb9 Merge pull request #33223 from frappe/mergify/bp/version-14-hotfix/pr-33222
fix: data import mandatory account_head, charge_type (backport #33222)
2022-12-05 17:56:27 +05:30
ruthra kumar
653cb9fc3b fix: data import mandatory account_head, charge_type
(cherry picked from commit 3814db02eb)
2022-12-05 11:27:34 +00:00
Sagar Sharma
5bdec0b512 Merge pull request #33205 from frappe/mergify/bp/version-14-hotfix/pr-33199
refactor: remove `balance` from `Warehouse Tree` (backport #33199)
2022-12-02 18:27:07 +05:30
s-aga-r
bcbeaea05c refactor: remove balance from Warehouse Tree
(cherry picked from commit 3ce8386ca3)
2022-12-02 08:55:05 +00:00
Deepesh Garg
251440dfec Merge pull request #33203 from frappe/mergify/bp/version-14-hotfix/pr-33193
fix: clear repost logs using Log Settings (backport #33193)
2022-12-02 14:23:29 +05:30
Rohit Waghchaure
39680ed28b fix: test case
(cherry picked from commit 2cce6f2a34)
2022-12-02 08:26:50 +00:00
Rohit Waghchaure
e039a14f6f fix: default clear repost logs
(cherry picked from commit 5949a7ecff)
2022-12-02 08:26:49 +00:00
Deepesh Garg
a05bf0a7ca Merge pull request #33201 from frappe/mergify/bp/version-14-hotfix/pr-33195
fix: type error on Sales Pipeline Analytics (backport #33195)
2022-12-02 13:13:44 +05:30
ruthra kumar
3af2b9b423 fix: type error on Sales Pipeline Analytics
(cherry picked from commit 4856e750f9)
2022-12-02 04:41:21 +00:00
Deepesh Garg
d7306d2ec4 Merge pull request #33197 from frappe/mergify/bp/version-14-hotfix/pr-33183
fix: Due date for month end payment term (backport #33183)
2022-12-02 10:09:55 +05:30
Sagar Sharma
ffa4deac26 Merge pull request #33196 from frappe/mergify/bp/version-14-hotfix/pr-33182
fix: Error on making stock entry from material request (backport #33182)
2022-12-01 21:37:39 +05:30
Sagar Sharma
a80f8ed2f8 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-33182 2022-12-01 19:56:55 +05:30
Sagar Sharma
1214b93e07 Merge pull request #33198 from frappe/mergify/bp/version-14-hotfix/pr-33170
fix(UX): Alert on change of item rate in Stock Entry (backport #33170)
2022-12-01 19:56:16 +05:30
Deepesh Garg
b2da76f02c fix(UX): Alert on change of item rate in Stock Entry
(cherry picked from commit 4bd9289d7d)
2022-12-01 12:47:39 +00:00
Deepesh Garg
9b40b7f240 fix: Due date for month end payment term
(cherry picked from commit bfb81ef56f)
2022-12-01 12:46:55 +00:00
Deepesh Garg
701ccc36c8 fix: Error on making stock entry from material request
(cherry picked from commit 64e5a79a91)
2022-12-01 12:46:12 +00:00
Deepesh Garg
dfd43141e3 Merge pull request #33188 from frappe/mergify/bp/version-14-hotfix/pr-33091
fix(pos): partial return amount update (backport #33091)
2022-12-01 16:17:29 +05:30
Deepesh Garg
6debf39ee8 Merge pull request #33189 from AnandBaburajan/asset_last_day_test_bug_14_htfx
fix: use is_last_day_of_the_month in test_scrap_asset (backport #33185)
2022-12-01 16:17:01 +05:30
anandbaburajan
fc175e2b1f fix: use is_last_day_of_the_month in test_scrap_asset 2022-12-01 13:01:23 +05:30
Sabu Siyad
fae941c4e3 fix(lint): trailing whitespace
Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit c5edbe2e2f)
2022-12-01 06:12:26 +00:00
Sabu Siyad
91920f4d84 fix(pos): partial return amount update
Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit a378619c9a)
2022-12-01 06:12:25 +00:00
Sagar Sharma
6957e2a85c Merge pull request #33175 from frappe/mergify/bp/version-14-hotfix/pr-33174
fix: add company filter in RFQ Items (backport #33174)
2022-11-30 12:25:57 +05:30
s-aga-r
7c1595e2c2 fix: add company filter in RFQ Items
(cherry picked from commit ca0485a503)
2022-11-30 05:07:06 +00:00
Deepesh Garg
6878536a57 Merge pull request #33168 from frappe/mergify/bp/version-14-hotfix/pr-33162
fix: Tax withholding net total for PI in reports (backport #33162)
2022-11-29 19:23:16 +05:30
Deepesh Garg
f87c3c6157 fix: Tax withholding net total for PI in reports
(cherry picked from commit 3eb1ed19a1)
2022-11-29 13:21:16 +00:00
Frappe PR Bot
7d63bcbeb6 chore(release): Bumped to Version 14.9.0
# [14.9.0](https://github.com/frappe/erpnext/compare/v14.8.0...v14.9.0) (2022-11-29)

### Bug Fixes

* `production_item` filter in `Job Card Summary Report` ([c9f4f60](c9f4f60425))
* `Work Order` filter typo in `Job Card Summary Report` ([b157193](b1571932d0))
* Auto repeat date validations ([2aada1a](2aada1a0d9))
* check for session user rather than owner ([c9c7222](c9c7222ded))
* company name with `,` in `Job Card Summary Report` ([9c6d020](9c6d020e49))
* company name with `,` in `Work Order Summary Report` ([bc649b3](bc649b371f))
* create rounding gl entry for PCV during gle post processing ([fd4bcd9](fd4bcd9f7f))
* Debit and Credit not equal while submitting PI containing asset item ([c11a31b](c11a31b390))
* disbursable amount on currrent security price ([5edaf83](5edaf83733))
* Dispatch address display ([ef687e2](ef687e22b8))
* incorrect balance qty ([f92b501](f92b5011da))
* job card for quantity UX ([59e2ab7](59e2ab702f))
* MR Item `description` and `item_name` gets reset on `qty` change ([85d108b](85d108b810))
* only show serial no batch selector only once ([8d0f715](8d0f715087))
* opportunity list doesn't show assigned user (backport [#33110](https://github.com/frappe/erpnext/issues/33110)) ([#33131](https://github.com/frappe/erpnext/issues/33131)) ([0ba2a4d](0ba2a4d084))
* **pos:** filter on customer groups ([c1ae5b0](c1ae5b0af5))
* **pos:** warehouse should be in company ([c03ec80](c03ec80d1a))
* precision in asset test_scrap_asset ([0fe5e9a](0fe5e9a9d1))
* production plan UX ([4607590](46075901ba))
* remove duplicate schema ([cdd13cd](cdd13cd95f))
* remove obsolete comment ([978924a](978924a7e4))
* reposting error `AttributeError: 'datetime.timedelta' object has no attribute 'replace'` ([4b0c9b6](4b0c9b6115))
* reset `voucher_type` and `voucher_no` if `based_on` is set to `Item and Warehouse` ([e530f0b](e530f0b2fb))
* UX for inventory dimension ([f1dd4d0](f1dd4d0449))
* **ux:** Action buttons in Bank Reconciliation ([93b8cc3](93b8cc3042))
* validation msg in stock entry ([65ac84e](65ac84e020))
* Valuation Rate column UX in stock ledger report ([5c065e8](5c065e8a64))

### Features

* add connections to Incoterm doctype ([89b9a06](89b9a06204))
* add doctype Incoterm ([b711931](b7119318a6))
* add german translations for incoterm titles ([f7988de](f7988dea1b))
* add incoterm to purchasing transactions ([88346b1](88346b17e9))
* add incoterm to sales transactions ([fcfe0cb](fcfe0cb9e9))
* create Incoterm records after install ([93e029d](93e029df91))
* create incoterms and migrate shipments ([014896a](014896a595))
* german tax templates ([5652af0](5652af04ba))
* item wise tds calculation for purchase order ([5f8f574](5f8f574e20))
* item wise tds calculation for purchase order. ([2bd8bd2](2bd8bd224b))
* item wise tds in purchase order ([ba36435](ba3643514e))
* make Material Request for sub-assembly items ([5fc4dfa](5fc4dfaad6))
* **pos:** invoice: fitler warehouse by company ([c379baf](c379baf7a2))
* validate repost item valuation against accounts freeze date ([04f50ea](04f50ea76a))
2022-11-29 13:19:34 +00:00
Deepesh Garg
9fc8acf707 Merge pull request #33163 from frappe/version-14-hotfix
chore: release v14
2022-11-29 18:48:14 +05:30
Sagar Sharma
f2f06aaa56 Merge pull request #33159 from frappe/mergify/bp/version-14-hotfix/pr-33136
fix: reset `voucher_type` and `voucher_no` if `based_on` is set to `Transaction` (backport #33136)
2022-11-29 13:24:53 +05:30
s-aga-r
5728300f03 chore: make posting_date and posting_time read-only if based_on is set to Transaction
(cherry picked from commit 4e10352b48)
2022-11-29 06:44:35 +00:00
s-aga-r
e530f0b2fb fix: reset voucher_type and voucher_no if based_on is set to Item and Warehouse
(cherry picked from commit eeec008547)
2022-11-29 06:44:35 +00:00
rohitwaghchaure
8ebf34629d Merge pull request #33158 from frappe/mergify/bp/version-14-hotfix/pr-33013
fix: validate repost item valuation against accounts freeze date (backport #33013)
2022-11-29 12:06:29 +05:30
Sagar Sharma
72351e38f2 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-33013 2022-11-29 11:16:53 +05:30
Deepesh Garg
6fa81089d6 Merge pull request #33152 from frappe/mergify/bp/version-14-hotfix/pr-33143
fix: Auto repeat date validations (backport #33143)
2022-11-29 11:07:46 +05:30
Deepesh Garg
fb6791abe3 Merge pull request #33153 from frappe/mergify/bp/version-14-hotfix/pr-33115
fix: remove product schema block from additional info section on item template (backport #33115)
2022-11-29 11:07:23 +05:30
Deepesh Garg
bf833c4f09 Merge pull request #33151 from frappe/mergify/bp/version-14-hotfix/pr-33138
fix(ux): Action buttons in Bank Reconciliation (backport #33138)
2022-11-29 11:06:48 +05:30
Deepesh Garg
5848147a92 Merge pull request #33155 from frappe/mergify/bp/version-14-hotfix/pr-33098
fix(pos): warehouse selection (backport #33098)
2022-11-29 11:06:21 +05:30
Deepesh Garg
150319d0cb Merge pull request #33156 from frappe/mergify/bp/version-14-hotfix/pr-33116
fix: only show serial no batch selector only once (backport #33116)
2022-11-29 11:06:08 +05:30
Deepesh Garg
b9ff172e13 Merge pull request #33154 from frappe/mergify/bp/version-14-hotfix/pr-33112
fix(pos): filter on customer groups (backport #33112)
2022-11-29 11:05:54 +05:30
Dany Robert
5854f1791c chore: pre-commit
(cherry picked from commit 88a0aa4077)
2022-11-29 05:11:39 +00:00
Dany Robert
c9c7222ded fix: check for session user rather than owner
(cherry picked from commit b482e3876d)
2022-11-29 05:11:39 +00:00
Dany Robert
68d9161a66 chore: pre-commit
(cherry picked from commit be15419bd5)
2022-11-29 05:11:38 +00:00
Dany Robert
04f50ea76a feat: validate repost item valuation against accounts freeze date
(cherry picked from commit 61f05132db)
2022-11-29 05:11:38 +00:00
rohitwaghchaure
4928058ed8 Merge pull request #33149 from frappe/mergify/bp/version-14-hotfix/pr-33144
fix: incorrect balance qty (backport #33144)
2022-11-29 10:41:36 +05:30
Shariq Ansari
8d0f715087 fix: only show serial no batch selector only once
(cherry picked from commit 0f87d329d6)
2022-11-29 04:51:19 +00:00
Sabu Siyad
c379baf7a2 feat(pos): invoice: fitler warehouse by company
Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit 4ad0e2ed7e)
2022-11-29 04:46:19 +00:00
Sabu Siyad
c03ec80d1a fix(pos): warehouse should be in company
Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit 95a620a30d)
2022-11-29 04:46:19 +00:00
Sabu Siyad
c1ae5b0af5 fix(pos): filter on customer groups
Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit cc63415887)
2022-11-29 04:26:25 +00:00
ruthra kumar
cdd13cd95f fix: remove duplicate schema
(cherry picked from commit 2c18a95115)
2022-11-29 04:06:25 +00:00
Deepesh Garg
5abcb478d0 chore: Update condition
(cherry picked from commit 6a47fb6c9e)
2022-11-29 03:59:09 +00:00
Deepesh Garg
2aada1a0d9 fix: Auto repeat date validations
(cherry picked from commit fa15221455)
2022-11-29 03:59:09 +00:00
Deepesh Garg
e093c32d06 Merge pull request #33128 from frappe/mergify/bp/version-14-hotfix/pr-33022
feat: Incoterms in buying and selling (backport #33022)
2022-11-29 09:28:59 +05:30
Deepesh Garg
93b8cc3042 fix(ux): Action buttons in Bank Reconciliation
(cherry picked from commit 6ebe8ad60d)
2022-11-29 03:54:02 +00:00
Rohit Waghchaure
93ec57dd44 test: test case for serialized batched item
(cherry picked from commit b606a9684b)
2022-11-29 03:18:53 +00:00
Rohit Waghchaure
f92b5011da fix: incorrect balance qty
(cherry picked from commit b2105a8be7)
2022-11-29 03:18:53 +00:00
Raffael Meyer
7477bb96c8 chore: resolve merge conflict 2022-11-28 18:51:40 +01:00
Deepesh Garg
6c3fbf03f9 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-33022 2022-11-28 23:06:23 +05:30
Deepesh Garg
0d8112af76 Merge pull request #33133 from frappe/mergify/bp/version-14-hotfix/pr-33129
chore: Supplier invoice no field description (backport #33129)
2022-11-28 22:48:45 +05:30
Deepesh Garg
088c168f96 Merge pull request #33142 from frappe/mergify/bp/version-14-hotfix/pr-33107
feat: german tax templates (backport #33107)
2022-11-28 22:48:20 +05:30
Sagar Sharma
ae26e550d0 Merge pull request #33140 from frappe/mergify/bp/version-14-hotfix/pr-33139
fix: reposting error `AttributeError: 'datetime.timedelta' object has no attribute 'replace'` (backport #33139)
2022-11-28 22:06:21 +05:30
barredterra
5652af04ba feat: german tax templates
(cherry picked from commit 7fd2639e68)
2022-11-28 16:25:02 +00:00
s-aga-r
4b0c9b6115 fix: reposting error AttributeError: 'datetime.timedelta' object has no attribute 'replace'
(cherry picked from commit eeda264eb6)
2022-11-28 16:01:39 +00:00
s-aga-r
65ac84e020 fix: validation msg in stock entry
(cherry picked from commit ba77da0874)
2022-11-28 16:01:39 +00:00
rohitwaghchaure
648a017eda Merge pull request #33137 from frappe/mergify/bp/version-14-hotfix/pr-33135
feat: make Material Request for sub-assembly items (backport #33135)
2022-11-28 18:32:54 +05:30
Rohit Waghchaure
5fc4dfaad6 feat: make Material Request for sub-assembly items
(cherry picked from commit e02f35c8ff)
2022-11-28 11:24:31 +00:00
Deepesh Garg
6e3ad109d2 chore: Supplier invoice no field description
(cherry picked from commit 4f2ece34df)
2022-11-28 07:36:10 +00:00
mergify[bot]
0ba2a4d084 fix: opportunity list doesn't show assigned user (backport #33110) (#33131)
fix: opportunity list doesn't show assigned user (#33110)

Because `db_update` is performed `_assign` property is not updated and
hence lead -> opportunity conversion makes it disappear from list view.

Steps to reproduce:

1. Create lead
2. Assign anyone
3. Create opportunity from lead.
4. Form view shows assigned user, list view wont.

(cherry picked from commit 63b9795d41)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-11-28 11:19:32 +05:30
barredterra
21deb02d81 chore: resolve merge conflicts 2022-11-27 16:30:19 +01:00
Raffael Meyer
978924a7e4 fix: remove obsolete comment
(cherry picked from commit 491857b3c8)
2022-11-27 15:24:20 +00:00
barredterra
89b9a06204 feat: add connections to Incoterm doctype
(cherry picked from commit a5966b6f84)
2022-11-27 15:24:19 +00:00
barredterra
f7988dea1b feat: add german translations for incoterm titles
(cherry picked from commit ffd287d5a6)
2022-11-27 15:24:19 +00:00
barredterra
88346b17e9 feat: add incoterm to purchasing transactions
(cherry picked from commit 77105306f2)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
2022-11-27 15:24:18 +00:00
barredterra
fcfe0cb9e9 feat: add incoterm to sales transactions
(cherry picked from commit 029f22c549)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
2022-11-27 15:24:17 +00:00
barredterra
93e029df91 feat: create Incoterm records after install
(cherry picked from commit ce83f02f24)
2022-11-27 15:24:16 +00:00
barredterra
014896a595 feat: create incoterms and migrate shipments
(cherry picked from commit d2563ee973)

# Conflicts:
#	erpnext/patches.txt
2022-11-27 15:24:16 +00:00
barredterra
b7119318a6 feat: add doctype Incoterm
(cherry picked from commit 1a1bfc8db9)
2022-11-27 15:24:15 +00:00
Deepesh Garg
956b0520d7 Merge pull request #33113 from frappe/mergify/bp/version-14-hotfix/pr-33111
fix: Loan disbursable amount on current security price (backport #33111)
2022-11-27 20:50:09 +05:30
rohitwaghchaure
f365e6b4a2 Merge pull request #33127 from frappe/mergify/bp/version-14-hotfix/pr-33118
fix: production plan UX (backport #33118)
2022-11-27 18:47:39 +05:30
Sagar Sharma
9533a64f6a Merge pull request #33123 from frappe/mergify/bp/version-14-hotfix/pr-33120
fix: `Work Order Summary` and `Job Card Summary` Report (backport #33120)
2022-11-27 10:27:37 +05:30
Rohit Waghchaure
46075901ba fix: production plan UX
(cherry picked from commit 8cb7112e72)
2022-11-27 03:17:28 +00:00
s-aga-r
c9f4f60425 fix: production_item filter in Job Card Summary Report
(cherry picked from commit ef7fd670fc)
2022-11-26 16:24:52 +00:00
s-aga-r
9c6d020e49 fix: company name with , in Job Card Summary Report
(cherry picked from commit 481149814e)
2022-11-26 16:24:52 +00:00
s-aga-r
b1571932d0 fix: Work Order filter typo in Job Card Summary Report
(cherry picked from commit 2e4f3e9317)
2022-11-26 16:24:51 +00:00
s-aga-r
bc649b371f fix: company name with , in Work Order Summary Report
(cherry picked from commit 87b39f045c)
2022-11-26 16:24:50 +00:00
Sagar Sharma
6e5fd55ed4 Merge pull request #33108 from frappe/mergify/bp/version-14-hotfix/pr-33090
fix: MR Item `item_name` and `description` gets reset on `qty` change (backport #33090)
2022-11-26 10:07:50 +05:30
Abhinav Raut
5edaf83733 fix: disbursable amount on currrent security price
(cherry picked from commit fe87c27acd)
2022-11-25 09:48:42 +00:00
s-aga-r
85d108b810 fix: MR Item description and item_name gets reset on qty change
(cherry picked from commit df0fee2312)
2022-11-25 05:49:50 +00:00
Deepesh Garg
ae6ad1e47d Merge pull request #33096 from frappe/mergify/bp/version-14-hotfix/pr-33092
fix: Debit and Credit not equal while submitting PI containing asset item (backport #33092)
2022-11-24 21:22:44 +05:30
Deepesh Garg
98d5cb30d1 Merge pull request #33106 from frappe/mergify/bp/version-14-hotfix/pr-33103
fix: job card "Qty to Manufacture" UX (backport #33103)
2022-11-24 21:22:28 +05:30
Deepesh Garg
8cd2539755 Merge pull request #33104 from frappe/mergify/bp/version-14-hotfix/pr-33100
fix: Dispatch address display (backport #33100)
2022-11-24 21:22:02 +05:30
Rohit Waghchaure
59e2ab702f fix: job card for quantity UX
(cherry picked from commit 87d37e90a2)
2022-11-24 13:54:59 +00:00
Deepesh Garg
ef687e22b8 fix: Dispatch address display
(cherry picked from commit 104fdcb9f9)
2022-11-24 12:31:13 +00:00
Deepesh Garg
517e40e1b8 Merge pull request #33099 from frappe/mergify/bp/version-14-hotfix/pr-33097
fix: precision in asset test_scrap_asset (backport #33097)
2022-11-24 16:58:04 +05:30
anandbaburajan
0fe5e9a9d1 fix: precision in asset test_scrap_asset
(cherry picked from commit 0e726609f1)
2022-11-24 10:44:31 +00:00
Deepesh Garg
c11a31b390 fix: Debit and Credit not equal while submitting PI containing asset item
(cherry picked from commit dc8d635120)
2022-11-24 09:14:06 +00:00
Deepesh Garg
82e41a2721 Merge pull request #33089 from frappe/mergify/bp/version-14-hotfix/pr-33088
fix: Valuation Rate column UX in stock ledger report (backport #33088)
2022-11-23 18:22:15 +05:30
Rohit Waghchaure
5c065e8a64 fix: Valuation Rate column UX in stock ledger report
(cherry picked from commit be19e4f621)
2022-11-23 12:00:49 +00:00
rohitwaghchaure
188b18dc5b Merge pull request #33083 from frappe/mergify/bp/version-14-hotfix/pr-33077
fix: UX for inventory dimension (backport #33077)
2022-11-23 12:33:44 +05:30
Deepesh Garg
5d7c4c182a Merge pull request #33085 from frappe/mergify/bp/version-14-hotfix/pr-33062
fix: create rounding gl entry for PCV during gle post processing (backport #33062)
2022-11-23 11:50:26 +05:30
Deepesh Garg
798717b12b Merge pull request #33082 from frappe/mergify/bp/version-14-hotfix/pr-33063
feat: item wise tds in purchase order (backport #33063)
2022-11-23 11:47:54 +05:30
Deepesh Garg
7a9f384b18 chore: resolve conflicts 2022-11-23 10:58:47 +05:30
Nabin Hait
fd4bcd9f7f fix: create rounding gl entry for PCV during gle post processing
(cherry picked from commit 022d8d5d79)
2022-11-23 05:07:29 +00:00
Rohit Waghchaure
f1dd4d0449 fix: UX for inventory dimension
(cherry picked from commit 0a69523940)
2022-11-23 04:24:36 +00:00
niralisatapara
5f8f574e20 feat: item wise tds calculation for purchase order
(cherry picked from commit 0fdde2e5c0)

# Conflicts:
#	erpnext/patches.txt
2022-11-23 04:22:46 +00:00
niralisatapara
2bd8bd224b feat: item wise tds calculation for purchase order.
(cherry picked from commit 46e8cdf31a)
2022-11-23 04:22:45 +00:00
niralisatapara
ba3643514e feat: item wise tds in purchase order
(cherry picked from commit b9d0b4e2d3)
2022-11-23 04:22:45 +00:00
Frappe PR Bot
df743aec29 chore(release): Bumped to Version 14.8.0
# [14.8.0](https://github.com/frappe/erpnext/compare/v14.7.0...v14.8.0) (2022-11-22)

### Bug Fixes

* Accounting Dimension filtering for Sales and Purchase Report ([b782209](b78220957b))
* add missing commas and brackets ([ecd4eab](ecd4eab2da))
* always send account currency in response ([f2fde83](f2fde8327d))
* Bulk payment generation against invoices ([57b00e3](57b00e3b16))
* cast POS query inputs to integers  (backport [#32975](https://github.com/frappe/erpnext/issues/32975)) ([#32977](https://github.com/frappe/erpnext/issues/32977)) ([55e1592](55e1592b70))
* don't set `rejected-qty` in return SCR ([4de02dc](4de02dc258))
* Don't show payment button for invoices on hold ([7487acd](7487acdeb6))
* hide reject-fields in return SCR ([71d6f2a](71d6f2a490))
* incorrect currency in Exchange rate revaluation ([a26470a](a26470a65f))
* Internal Transfer Material Request cycle and tracking fixed till purchase receipt ([eaf0950](eaf09503a9))
* link to brand doctype. ([b428307](b428307e9f))
* linters failing ([24aafb3](24aafb3866))
* make `is_internal_supplier` read-only ([caef140](caef140a9b))
* minor change ([ac3120b](ac3120b6f9))
* minor issue fixed ([c356d2c](c356d2cabd))
* naming ([a198a55](a198a55d2d))
* Opening journal entry templates ([6aada76](6aada76297))
* **pos:** item selector image border radius ([aaed4ab](aaed4ab958))
* precision in asset tests ([444f241](444f241263))
* **realtime:** Restrict updates to only last modified or current user ([#33034](https://github.com/frappe/erpnext/issues/33034)) ([9e8a835](9e8a8356e9))
* Remove unnecessary filters from Journal Entry ([387665d](387665d221))
* test case added for MR internal Transfer ([2a892f5](2a892f5c52))
* test case updated for mr ([6ddf273](6ddf27380f))
* Timesheet timer button ([53cf6b8](53cf6b8c89))
* update advace paid in SO/PO in account currency ([14235f2](14235f24b2))
* use `list()` on self mutating iteration ([eb968d7](eb968d7f02))
* Viewing account ledger from party master ([da2dfcc](da2dfcc10b))

### Features

* Workstation Type for BOM ([8323775](8323775282))
2022-11-22 16:00:31 +00:00
Deepesh Garg
9bb079d238 Merge pull request #33076 from frappe/version-14-hotfix
chore: release v14
2022-11-22 21:28:58 +05:30
Deepesh Garg
084d81025c Merge pull request #33078 from frappe/mergify/bp/version-14-hotfix/pr-33072
chore: Rearrange supplier invoice section in Purchase Invoice (backport #33072)
2022-11-22 20:41:10 +05:30
Deepesh Garg
995ad90b5a Merge pull request #33079 from frappe/mergify/bp/version-14-hotfix/pr-33068
fix: Don't show payment button for invoices on hold (backport #33068)
2022-11-22 20:40:53 +05:30
Deepesh Garg
f71f907b31 Merge pull request #33080 from frappe/mergify/bp/version-14-hotfix/pr-33069
fix: Remove unnecessary filters from Journal Entry (backport #33069)
2022-11-22 20:40:34 +05:30
Deepesh Garg
387665d221 fix: Remove unnecessary filters from Journal Entry
(cherry picked from commit cd88a53533)
2022-11-22 14:46:02 +00:00
Deepesh Garg
7487acdeb6 fix: Don't show payment button for invoices on hold
(cherry picked from commit 1b9e83251f)
2022-11-22 14:45:39 +00:00
Deepesh Garg
54317b56ea chore: Rearrange supplier invoice section in Purchase Invoice
(cherry picked from commit e96be712b8)
2022-11-22 14:45:05 +00:00
ruthra kumar
a2012cb710 Merge pull request #33073 from frappe/mergify/bp/version-14-hotfix/pr-33071
fix: advance paid updated in account currency for SO/PO (backport #33071)
2022-11-22 14:27:06 +05:30
ruthra kumar
48a3b3f6f3 test: fix test case for SO/PO advance amount
(cherry picked from commit 541cf153f7)
2022-11-22 08:15:57 +00:00
ruthra kumar
14235f24b2 fix: update advace paid in SO/PO in account currency
(cherry picked from commit bf76b85dfd)
2022-11-22 08:15:56 +00:00
Deepesh Garg
622c5837cf Merge pull request #33056 from frappe/mergify/bp/version-14-hotfix/pr-33051
fix: Timesheet timer button (backport #33051)
2022-11-21 14:04:47 +05:30
Deepesh Garg
db0b4d5966 Merge pull request #33055 from frappe/mergify/bp/version-14-hotfix/pr-33052
fix: Viewing account ledger from party master (backport #33052)
2022-11-21 12:49:28 +05:30
Deepesh Garg
53cf6b8c89 fix: Timesheet timer button
(cherry picked from commit 64802d1220)
2022-11-21 05:45:35 +00:00
Deepesh Garg
da2dfcc10b fix: Viewing account ledger from party master
(cherry picked from commit 15e74c5d7b)
2022-11-21 05:45:08 +00:00
Deepesh Garg
8215469b5e Merge pull request #33044 from frappe/mergify/bp/version-14-hotfix/pr-32958
fix: link `Item Price` brand to `Brand` doctype. (backport #32958)
2022-11-20 18:52:26 +05:30
Devin Slauenwhite
a198a55d2d fix: naming
(cherry picked from commit 3a35651441)
2022-11-19 13:45:19 +00:00
Devin Slauenwhite
b428307e9f fix: link to brand doctype.
(cherry picked from commit cee069d426)
2022-11-19 13:45:19 +00:00
Deepesh Garg
5456fec4d5 Merge pull request #33042 from frappe/mergify/bp/version-14-hotfix/pr-33032
fix: Accounting Dimension filtering for Sales and Purchase Report (backport #33032)
2022-11-19 18:52:45 +05:30
Deepesh Garg
3ee3f8e38e Merge pull request #33043 from frappe/mergify/bp/version-14-hotfix/pr-32999
fix: incorrect currency in Exchange rate revaluation (backport #32999)
2022-11-19 18:52:27 +05:30
Deepesh Garg
7bad53104b Merge pull request #33001 from frappe/mergify/bp/version-14-hotfix/pr-32994
chore(patch): remove reload_doc from post model sync update_exchange_rate_settings patch (backport #32994)
2022-11-19 18:46:27 +05:30
ruthra kumar
f2fde8327d fix: always send account currency in response
(cherry picked from commit 5caaccc94b)
2022-11-19 13:00:42 +00:00
ruthra kumar
a26470a65f fix: incorrect currency in Exchange rate revaluation
(cherry picked from commit 68b04e2577)
2022-11-19 13:00:42 +00:00
Deepesh Garg
44dbdba6a0 Merge pull request #33035 from frappe/mergify/bp/version-14-hotfix/pr-33034
fix(realtime): Restrict updates to only last modified or current user (backport #33034)
2022-11-19 18:22:07 +05:30
Deepesh Garg
b78220957b fix: Accounting Dimension filtering for Sales and Purchase Report
(cherry picked from commit 8b394afaa9)
2022-11-19 12:50:39 +00:00
gavin
9e8a8356e9 fix(realtime): Restrict updates to only last modified or current user (#33034)
(cherry picked from commit dd2493a541)
2022-11-18 11:48:47 +00:00
Deepesh Garg
f2283546b5 Merge pull request #33031 from frappe/mergify/bp/version-14-hotfix/pr-33014
fix: Bulk payment generation against invoices (backport #33014)
2022-11-18 16:51:54 +05:30
Faris Ansari
b1215f8ccf Merge pull request #33030 from frappe/mergify/bp/version-14-hotfix/pr-32986 2022-11-18 16:32:45 +05:30
Sagar Sharma
b403c7fdca Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32986 2022-11-18 16:11:51 +05:30
Sagar Sharma
59c35d9f88 Merge pull request #33029 from frappe/mergify/bp/version-14-hotfix/pr-32905
fix: Internal Transfer Material Request cycle and tracking fixed till purchase receipt (backport #32905)
2022-11-18 15:12:28 +05:30
Deepesh Garg
57b00e3b16 fix: Bulk payment generation against invoices
(cherry picked from commit 2dfe849c7d)
2022-11-18 09:41:01 +00:00
Deepesh Garg
a30747b723 Merge pull request #33017 from frappe/mergify/bp/version-14-hotfix/pr-33009
fix(pos): item selector image border radius (backport #33009)
2022-11-18 15:09:47 +05:30
Deepesh Garg
6d22305b9f Merge pull request #33018 from frappe/mergify/bp/version-14-hotfix/pr-33003
fix: precision in asset tests (backport #33003)
2022-11-18 15:09:04 +05:30
s-aga-r
71d6f2a490 fix: hide reject-fields in return SCR
(cherry picked from commit 7dd7617ec7)
2022-11-18 09:31:11 +00:00
s-aga-r
4de02dc258 fix: don't set rejected-qty in return SCR
(cherry picked from commit 8a73e963ce)
2022-11-18 09:31:11 +00:00
s-aga-r
0c73280a9b chore: linters
(cherry picked from commit 12d7b7e9c2)
2022-11-18 07:46:49 +00:00
Vishal
660e3fa081 chore: minor fix
(cherry picked from commit e5dfd53e6f)
2022-11-18 07:46:49 +00:00
Vishal
ac3120b6f9 fix: minor change
(cherry picked from commit ba6189d054)
2022-11-18 07:46:49 +00:00
Vishal
6ddf27380f fix: test case updated for mr
(cherry picked from commit 343b414b40)
2022-11-18 07:46:48 +00:00
Vishal
2a892f5c52 fix: test case added for MR internal Transfer
(cherry picked from commit 89aabdaaaa)
2022-11-18 07:46:48 +00:00
Vishal
c356d2cabd fix: minor issue fixed
(cherry picked from commit d86afddb60)
2022-11-18 07:46:48 +00:00
Vishal
eaf09503a9 fix: Internal Transfer Material Request cycle and tracking fixed till purchase receipt
(cherry picked from commit 71412f6877)
2022-11-18 07:46:47 +00:00
Anand Baburajan
d0ccc858ad Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-33003 2022-11-18 12:05:22 +05:30
Sagar Sharma
f10d6105c5 Merge pull request #33023 from frappe/mergify/bp/version-14-hotfix/pr-33019
fix: use `list()` on self mutating iteration (backport #33019)
2022-11-18 10:59:58 +05:30
Sabu Siyad
eb968d7f02 fix: use list() on self mutating iteration
https://github.com/frappe/erpnext/issues/30325

Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit 546c809cbe)
2022-11-18 04:55:43 +00:00
anandbaburajan
ecd4eab2da fix: add missing commas and brackets
(cherry picked from commit 218da1217a)
2022-11-17 12:22:41 +00:00
anandbaburajan
444f241263 fix: precision in asset tests
(cherry picked from commit b5e5d3b3af)
2022-11-17 12:22:41 +00:00
Sabu Siyad
aaed4ab958 fix(pos): item selector image border radius
Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit 2f4940cc26)
2022-11-17 12:03:22 +00:00
Ankush Menat
00558af873 chore: typo 2022-11-17 14:24:59 +05:30
Sagar Sharma
0378bb9702 Merge pull request #33010 from frappe/mergify/bp/version-14-hotfix/pr-33006
fix: make `is_internal_supplier` read-only in PO (backport #33006)
2022-11-17 14:23:17 +05:30
s-aga-r
caef140a9b fix: make is_internal_supplier read-only
(cherry picked from commit 5efbc2cbf8)
2022-11-17 08:40:41 +00:00
mergify[bot]
4c0b5ceb9e refactor: search queries (backport #33004) (#33007)
refactor: search queries (#33004)

- guard clauses for readability
- use values or format

(cherry picked from commit 34e4903ed7)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-11-17 13:06:46 +05:30
Ankush Menat
1db83247ce chore: hardcode doctype 2022-11-17 12:01:11 +05:30
Ritwik Puri
9a737afb77 chore(patch): remove reload_doc from post model sync update_exchange_rate_settings patch (#32994)
[skip ci]

(cherry picked from commit b03b568e6c)
2022-11-17 06:30:33 +00:00
Deepesh Garg
4a86b20e62 Merge pull request #32996 from frappe/mergify/bp/version-14-hotfix/pr-32983
fix: Opening journal entry templates (backport #32983)
2022-11-17 11:16:34 +05:30
Sagar Sharma
f70a028970 Merge pull request #32997 from frappe/mergify/bp/version-14-hotfix/pr-32911
feat: Workstation Type for BOM (backport #32911)
2022-11-17 10:59:45 +05:30
Rohit Waghchaure
24aafb3866 fix: linters failing
(cherry picked from commit ffa30127e7)
2022-11-16 18:31:29 +00:00
Rohit Waghchaure
bb337455b9 test: test case to check workstation type
(cherry picked from commit 7bd06e6fbc)
2022-11-16 18:31:28 +00:00
Rohit Waghchaure
8323775282 feat: Workstation Type for BOM
(cherry picked from commit 105c272816)
2022-11-16 18:31:25 +00:00
Deepesh Garg
6aada76297 fix: Opening journal entry templates
(cherry picked from commit 33b61aef5a)
2022-11-16 15:13:08 +00:00
Deepesh Garg
2d8332e004 Merge pull request #32990 from frappe/mergify/bp/version-14-hotfix/pr-32989
ci: fix flake8 URL (backport #32989)
2022-11-16 17:05:11 +05:30
Deepesh Garg
b473da8f66 ci: fix flake8 URL
(cherry picked from commit e81bec5fc9)
2022-11-16 10:56:22 +00:00
mergify[bot]
55e1592b70 fix: cast POS query inputs to integers (backport #32975) (#32977)
fix: cast POS query inputs to integers  (#32975)

fix: cast POS query inputs to integers
(cherry picked from commit c013db6ea1)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-11-15 18:50:51 +05:30
Frappe PR Bot
964abce057 chore(release): Bumped to Version 14.7.0
# [14.7.0](https://github.com/frappe/erpnext/compare/v14.6.0...v14.7.0) (2022-11-15)

### Bug Fixes

* add translate function to valitate company msg in chart of accounts importer ([8de4430](8de4430662))
* check type for reference name ([a305793](a30579393e))
* don't set WIP Warehouse if  is checked in WO ([f923183](f923183b64))
* GP incorrect buying amount if no upd on SI and Delivery Note ([2d8f00a](2d8f00afad))
* incorrect fix of conversion factor in PP ([c48d00a](c48d00ad77))
* Label for applicable dimension table ([eb4f8e4](eb4f8e4bd8))
* Maintain same rate between Quotation and Sales Order ([6c155d2](6c155d2825))
* Project filter in timesheet ([37bed12](37bed12df4))
* Purchase Receipt timeout error ([0d5b726](0d5b7269d4))
* repayment schedule regeneration ([2f5033b](2f5033b70f))
* set `WIP Warehouse` in Job Card ([c294652](c294652dab))
* set stock UOM in args to ensure item price is fetched ([a4187b9](a4187b9d8f))
* test cases ([071ee5d](071ee5d81c))
* **ux:** Tab break in Customer and Supplier form ([eeaa932](eeaa9329f6))
* Write Off section visibility for non POS Invoices ([07badbc](07badbc0f2))

### Features

* Repost Payment Ledger entries for vouchers ([de59b50](de59b50407))

### Reverts

* Revert "fix: get `consumed_qty` based on `received_qty` in SCR" ([7fd6c43](7fd6c43752))
* Revert "fix: set `received_qty` before_validate SCR" ([0ecb44d](0ecb44d40c))
2022-11-15 12:59:04 +00:00
Deepesh Garg
c310c8a4b0 Merge pull request #32972 from frappe/version-14-hotfix
chore: release v14
2022-11-15 18:17:10 +05:30
Deepesh Garg
d7340f54cf Merge pull request #32969 from frappe/mergify/bp/version-14-hotfix/pr-32953
chore(payment_entry): Remove dead validations (backport #32953)
2022-11-15 16:32:54 +05:30
Deepesh Garg
19f3d86a12 Merge pull request #32966 from frappe/mergify/bp/version-14-hotfix/pr-32962
fix: Write Off section visibility for non POS Invoices (backport #32962)
2022-11-15 16:31:49 +05:30
Sagar Sharma
48dbf47e76 Merge pull request #32974 from frappe/mergify/bp/version-14-hotfix/pr-32971
Revert "fix: get `consumed_qty` based on `received_qty` in SCR" (backport #32971)
2022-11-15 15:59:45 +05:30
s-aga-r
f10cceb261 test: fix test cases for supplied-items consumed_qty
(cherry picked from commit 369db4eacc)
2022-11-15 09:48:02 +00:00
s-aga-r
7fd6c43752 Revert "fix: get consumed_qty based on received_qty in SCR"
This reverts commit 70c9b8dc50.

(cherry picked from commit 01f56c621c)
2022-11-15 09:48:02 +00:00
s-aga-r
0ecb44d40c Revert "fix: set received_qty before_validate SCR"
This reverts commit c447dfaa9c.

(cherry picked from commit 3706a9b4dc)
2022-11-15 09:48:02 +00:00
Gavin D'souza
30d1491257 chore(payment_entry): Remove dead validations
(cherry picked from commit e1ecc9a819)
2022-11-15 08:34:35 +00:00
Deepesh Garg
ca96c24c8d chore: Resolve conflicts 2022-11-15 13:57:44 +05:30
Deepesh Garg
07badbc0f2 fix: Write Off section visibility for non POS Invoices
(cherry picked from commit 9f5d613c78)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
2022-11-15 07:31:58 +00:00
Deepesh Garg
51b3fda2b6 Merge pull request #32960 from frappe/mergify/bp/version-14-hotfix/pr-32956
fix: Label for applicable dimension table (backport #32956)
2022-11-15 13:01:23 +05:30
rohitwaghchaure
d9820af4f0 Merge pull request #32963 from frappe/mergify/bp/version-14-hotfix/pr-32947
fix: incorrect fix of conversion factor in PP (backport #32947)
2022-11-15 11:38:07 +05:30
Rohit Waghchaure
c48d00ad77 fix: incorrect fix of conversion factor in PP
(cherry picked from commit 490b0e3cdf)
2022-11-15 05:01:36 +00:00
Deepesh Garg
eb4f8e4bd8 fix: Label for applicable dimension table
(cherry picked from commit 8c13f70fc5)
2022-11-15 03:55:20 +00:00
Sagar Sharma
5c5cd7bff5 Merge pull request #32948 from frappe/mergify/bp/version-14-hotfix/pr-32937
refactor: rewrite `job_card.py` queries in QB (backport #32937)
2022-11-14 12:22:56 +05:30
s-aga-r
f886577abb refactor: rewrite job_card.py queries in QB
(cherry picked from commit 7df2921d38)
2022-11-14 05:56:38 +00:00
Deepesh Garg
bad4dccf88 Merge pull request #32944 from frappe/mergify/bp/version-14-hotfix/pr-32938
chore: Remove raw SQL query (backport #32938)
2022-11-14 10:43:50 +05:30
Sagar Vora
a30579393e fix: check type for reference name
(cherry picked from commit b06345af46)
2022-11-13 15:12:10 +00:00
Deepesh Garg
3614584a2f chore: Remove qb doc reference
(cherry picked from commit 4b9921782b)
2022-11-13 15:12:10 +00:00
Deepesh Garg
8a01da3b9e chore: Remove raw SQL query
(cherry picked from commit 42a59d5c17)
2022-11-13 15:12:10 +00:00
Deepesh Garg
94087e4e3a Merge pull request #32941 from frappe/mergify/bp/version-14-hotfix/pr-32866
fix: incorrect buying amount on Gross Profit (backport #32866)
2022-11-13 19:47:57 +05:30
ruthra kumar
a24f6a5ac7 test: buying amount of invoices
1. Invoice with unset `update_stock`, with and without Delivery Notes

(cherry picked from commit 2c8b0b17a7)
2022-11-13 13:46:08 +00:00
ruthra kumar
2d8f00afad fix: GP incorrect buying amount if no upd on SI and Delivery Note
(cherry picked from commit e4d16c31da)
2022-11-13 13:46:08 +00:00
Sagar Sharma
9e47371801 Merge pull request #32935 from frappe/mergify/bp/version-14-hotfix/pr-32913
fix: set stock UOM in args to ensure item price is fetched (backport #32913)
2022-11-12 12:04:26 +05:30
Sagar Vora
a4187b9d8f fix: set stock UOM in args to ensure item price is fetched
(cherry picked from commit 57038c3969)
2022-11-12 04:39:25 +00:00
Deepesh Garg
3dde050c15 Merge pull request #32932 from frappe/mergify/bp/version-14-hotfix/pr-32878
fix: repayment schedule regeneration (backport #32878)
2022-11-11 15:15:52 +05:30
Abhinav Raut
2f5033b70f fix: repayment schedule regeneration
(cherry picked from commit d6ab2b3b87)
2022-11-11 08:53:59 +00:00
Deepesh Garg
de68674933 Merge pull request #32927 from frappe/mergify/bp/version-14-hotfix/pr-32880
fix: add translate function to valitate company msg in chart of accounts importer (backport #32880)
2022-11-11 14:21:53 +05:30
Deepesh Garg
04cf3d1c5d Merge pull request #32926 from frappe/mergify/bp/version-14-hotfix/pr-32923
fix: Maintain same rate between Quotation and Sales Order (backport #32923)
2022-11-11 14:21:38 +05:30
rohitwaghchaure
eac1f47b6f Merge pull request #32928 from frappe/mergify/bp/version-14-hotfix/pr-32895
fix: Purchase Receipt timeout error (backport #32895)
2022-11-11 10:52:52 +05:30
Rohit Waghchaure
071ee5d81c fix: test cases
(cherry picked from commit 7278387879)
2022-11-10 17:13:36 +00:00
Rohit Waghchaure
0d5b7269d4 fix: Purchase Receipt timeout error
(cherry picked from commit 4082149f0e)
2022-11-10 17:13:35 +00:00
Ernesto Ruiz
8de4430662 fix: add translate function to valitate company msg in chart of accounts importer
(cherry picked from commit 637c08d189)
2022-11-10 14:38:22 +00:00
Deepesh Garg
6c155d2825 fix: Maintain same rate between Quotation and Sales Order
(cherry picked from commit 362ec7b673)
2022-11-10 14:23:54 +00:00
Deepesh Garg
6f61685510 Merge pull request #32924 from frappe/mergify/bp/version-14-hotfix/pr-32912
fix(ux): Tab break in Customer and Supplier form (backport #32912)
2022-11-10 19:51:27 +05:30
Sagar Sharma
883355adc4 Merge pull request #32919 from frappe/mergify/bp/version-14-hotfix/pr-32918
fix: WO Skip Material Transfer to WIP Warehouse (backport #32918)
2022-11-10 18:42:36 +05:30
Nabin Hait
eeaa9329f6 fix(ux): Tab break in Customer and Supplier form
(cherry picked from commit fb7ee301b5)
2022-11-10 13:01:14 +00:00
Sagar Sharma
c294652dab fix: set WIP Warehouse in Job Card
(cherry picked from commit e7fa2e08ad)
2022-11-10 11:42:53 +00:00
Sagar Sharma
f923183b64 fix: don't set WIP Warehouse if is checked in WO
(cherry picked from commit 9730cd0aec)
2022-11-10 11:42:53 +00:00
Deepesh Garg
f2a1596369 Merge pull request #32909 from frappe/mergify/bp/version-14-hotfix/pr-32742
feat: Tool to repost PLE manually (backport #32742)
2022-11-10 15:41:22 +05:30
ruthra kumar
7a3e3af0b5 chore: CI fix 2022-11-10 14:17:00 +05:30
mergify[bot]
f8b7cfa6dd refactor: Remove usage of deprecated methods (backport #32914) (#32915)
* refactor: Remove usage of deprecated methods (#32914)

Warn: Just used regex to replace all usage.
```regex
s/frappe.db.set(\(.*\),\(.*\),\(.*\))/\1.db_set(\2, \3)/g
```

Required after: https://github.com/frappe/frappe/pull/18815

(cherry picked from commit 7e1742956c)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.py

* chore: conflicts

* style: black


Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-11-10 11:09:13 +05:30
ruthra kumar
de59b50407 feat: Repost Payment Ledger entries for vouchers
primarily intended to manually correct PLE entries for vouchers
affected by Item Value repost-https://github.com/frappe/erpnext/pull/32567

(cherry picked from commit 0448c0fa36)
2022-11-09 08:57:23 +00:00
ruthra kumar
a399e2d765 refactor: split delete gl utility function into two
(cherry picked from commit 9209ec59c2)
2022-11-09 08:57:23 +00:00
Deepesh Garg
17ccc0e56c Merge pull request #32891 from frappe/mergify/bp/version-14-hotfix/pr-32883
fix: Project filter in timesheet (backport #32883)
2022-11-08 21:44:59 +05:30
Sagar Sharma
5e6a9833c5 Merge pull request #32898 from frappe/mergify/bp/version-14-hotfix/pr-32888
chore: link SCR Return in SCR Dashboard (backport #32888)
2022-11-08 21:38:27 +05:30
Sagar Sharma
02bb523210 chore: link SCR Return in SCR Dashboard
(cherry picked from commit 47248251e2)
2022-11-08 16:07:34 +00:00
Frappe PR Bot
e917212849 chore(release): Bumped to Version 14.6.0
# [14.6.0](https://github.com/frappe/erpnext/compare/v14.5.1...v14.6.0) (2022-11-08)

### Bug Fixes

* `Material Consumption` option in case of `Skip Transfer to WIP` in WO ([8c856cd](8c856cd5fc))
* add translate function to name of chart labels in budget_variance_report.py ([16f364d](16f364da37))
* add translate function to name of chart labels in deferred_revenue_and_expense.py ([b8caa58](b8caa587d2))
* add translate function to period in  stock_analytics.py ([b0c06d5](b0c06d5a04))
* add translate function to period in sales_analytics.py ([e681f06](e681f06883))
* add translate function to string on budget_variance_report.js to match the variance  word translated ([595aaad](595aaad99d))
* Auto advance allocation against partial invoices ([b7763d9](b7763d953a))
* auto increment qty if item table has no items ([d8e403b](d8e403bf5d))
* conflicts ([ab87a95](ab87a950e5))
* correct linters ([8f6f9a4](8f6f9a429a))
* correct linters ([440e208](440e20859f))
* correct linters ([5acc9be](5acc9be5c9))
* Create POS Opening Entry POS Profile filter. ([60af9c0](60af9c0516))
* Disable tax included prices for internal transfers ([#32794](https://github.com/frappe/erpnext/issues/32794)) ([6838e5e](6838e5ea3b))
* for asset's purchase_date, if bill_date is set, use that instead of posting_date ([01a1c96](01a1c96314))
* get `consumed_qty` based on `received_qty` in SCR ([ea9a502](ea9a50278d))
* Increase columns width in Warehouse wise Item Balance Age and Value ([0b09c31](0b09c31cb0))
* linter ([af60c8f](af60c8f759))
* make `BOM` required in SCR Item ([3f79a05](3f79a057e4))
* make `consumed_qty` editable when backflush based on Material Transfer ([2c5a8c4](2c5a8c43f6))
* make `consumed_qty` read-only in SCR Supplied Items ([68229f0](68229f06d1))
* map `BOM` while mapping the return SCR ([e629cba](e629cba2b7))
* mysql syntax issue ([4d9bbd4](4d9bbd4c9c))
* not able to select customer / supplier ([6989cdf](6989cdf4f2))
* refactor code for better translatable string ([2dc24f2](2dc24f22ea))
* refactor code for better translatable string in stock_ageing.py ([0ead516](0ead51642f))
* rename test method ([97445d9](97445d9516))
* Scan Barcode UX ([1944f4d](1944f4df4d))
* set `received_qty` before_validate SCR ([e316558](e316558286))
* test cases ([0feec4c](0feec4ca8a))
* trailing whitespace ([31bada9](31bada9205))
* update advance paid in SO/PO from Payment Ledger ([a561432](a561432908))
* use `flt` instead of `cint` in `get_batch_no` ([6510464](6510464482))

### Features

* Item Wise TDS Calculation ([b9fb104](b9fb1045d7))

### Performance Improvements

* use `get_cached_value` instead of `db.get_value` in controllers ([#32776](https://github.com/frappe/erpnext/issues/32776)) ([34ca17a](34ca17ab11))
2022-11-08 12:15:30 +00:00
Deepesh Garg
4657f8e9ed Merge pull request #32893 from frappe/version-14-hotfix
chore: release v14
2022-11-08 17:43:43 +05:30
Deepesh Garg
19b3152e32 chore: Resolve conflicts 2022-11-08 17:42:29 +05:30
Deepesh Garg
6163a052c8 chore: Linting Issues
(cherry picked from commit 7b5cf6978e)

# Conflicts:
#	erpnext/manufacturing/doctype/workstation/workstation.py
2022-11-08 09:26:03 +00:00
Deepesh Garg
37bed12df4 fix: Project filter in timesheet
(cherry picked from commit 2b65b22aa2)
2022-11-08 09:26:02 +00:00
Sagar Sharma
1426de0530 Merge pull request #32887 from frappe/mergify/bp/version-14-hotfix/pr-32886
chore: remove `debugger` from `stock_entry_list.js` (backport #32886)
2022-11-08 12:14:22 +05:30
Sagar Sharma
beef0510ee chore: remove debugger from stock_entry_list.js
(cherry picked from commit 84ab100d86)
2022-11-08 06:40:55 +00:00
Sagar Sharma
bacd7ecb1d Merge pull request #32884 from frappe/mergify/bp/version-14-hotfix/pr-32877
fix: make `consumed_qty` read-only in SCR Supplied Items (backport #32877)
2022-11-08 09:51:16 +05:30
Sagar Sharma
af60c8f759 fix: linter
(cherry picked from commit 5e8a22be24)
2022-11-07 23:05:58 +05:30
Sagar Sharma
2c5a8c43f6 fix: make consumed_qty editable when backflush based on Material Transfer
(cherry picked from commit bf4b012cec)
2022-11-07 17:29:45 +00:00
Sagar Sharma
68229f06d1 fix: make consumed_qty read-only in SCR Supplied Items
(cherry picked from commit f8d2e276a5)
2022-11-07 17:29:45 +00:00
Deepesh Garg
cc92e6965a Merge pull request #32864 from frappe/mergify/bp/version-14-hotfix/pr-32846
fix: add german translations (backport #32846)
2022-11-07 18:43:06 +05:30
Raffael Meyer
85f98bb51a Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32846 2022-11-07 13:34:28 +01:00
barredterra
8e00e62616 chore: resolve merge conflicts 2022-11-07 13:31:54 +01:00
Deepesh Garg
401979bbe5 Merge pull request #32875 from frappe/mergify/bp/version-14-hotfix/pr-32874
fix: Increase columns width in Warehouse wise Item Balance Age and Value (backport #32874)
2022-11-07 15:41:05 +05:30
Nihantra C. Patel
0b09c31cb0 fix: Increase columns width in Warehouse wise Item Balance Age and Value
(cherry picked from commit 8355c1092c)
2022-11-07 08:05:38 +00:00
Deepesh Garg
c2da8cf7cd Merge pull request #32870 from frappe/mergify/bp/version-14-hotfix/pr-32776
perf: use `get_cached_value` instead of `db.get_value` in controllers (backport #32776)
2022-11-07 13:30:15 +05:30
Deepesh Garg
d36c135103 Merge pull request #32872 from frappe/mergify/bp/version-14-hotfix/pr-32802
fix: `Material Consumption` option in case of `Skip Transfer to WIP` in WO (backport #32802)
2022-11-07 10:16:10 +05:30
Sagar Sharma
8c856cd5fc fix: Material Consumption option in case of Skip Transfer to WIP in WO
(cherry picked from commit 8ea6983734)
2022-11-07 04:06:34 +00:00
Daizy Modi
34ca17ab11 perf: use get_cached_value instead of db.get_value in controllers (#32776)
(cherry picked from commit 4efc947f14)
2022-11-07 03:52:39 +00:00
Sagar Sharma
3d2e8c7fb3 Merge pull request #32868 from frappe/mergify/bp/version-14-hotfix/pr-32867
fix: get `consumed_qty` based on `received_qty` in SCR (backport #32867)
2022-11-06 17:04:34 +05:30
Sagar Sharma
8f78be8525 test: add test case for consumed-qty
(cherry picked from commit 4d8da4420e)
2022-11-06 10:48:35 +00:00
Sagar Sharma
ea9a50278d fix: get consumed_qty based on received_qty in SCR
(cherry picked from commit 70c9b8dc50)
2022-11-06 10:48:34 +00:00
Sagar Sharma
e316558286 fix: set received_qty before_validate SCR
(cherry picked from commit c447dfaa9c)
2022-11-06 10:48:34 +00:00
Deepesh Garg
b9fb1045d7 feat: Item Wise TDS Calculation 2022-11-06 11:50:20 +05:30
Raffael Meyer
e276a5ba83 chore: add german translations (#32846)
Mostly for balance sheet

(cherry picked from commit d2b6490bca)

# Conflicts:
#	erpnext/translations/de.csv
2022-11-06 04:53:21 +00:00
Deepesh Garg
1a0f123c8c Merge pull request #32859 from frappe/mergify/bp/version-14-hotfix/pr-32794
fix: Disable tax included prices for internal transfers (backport #32794)
2022-11-05 21:16:44 +05:30
Deepesh Garg
6838e5ea3b fix: Disable tax included prices for internal transfers (#32794)
* fix: Disable tax-included prices for internal transfers

(cherry picked from commit 8d30ebb12b)
2022-11-05 15:22:07 +00:00
Deepesh Garg
41a5905a75 Merge pull request #32856 from frappe/mergify/bp/version-14-hotfix/pr-32847
fix: Create POS Opening Entry POS Profile filter. (backport #32847)
2022-11-05 20:51:49 +05:30
Sagar Sharma
eb6b267001 Merge pull request #32858 from frappe/mergify/bp/version-14-hotfix/pr-32850
fix: wrong consumed items in SCR return (backport #32850)
2022-11-05 20:12:54 +05:30
Sagar Sharma
0856e65700 test: fix test case
(cherry picked from commit 324bfa9fde)
2022-11-05 11:53:50 +00:00
Sagar Sharma
3f79a057e4 fix: make BOM required in SCR Item
(cherry picked from commit 760c26e9c0)
2022-11-05 11:53:50 +00:00
Sagar Sharma
bd7435ce1e test: add test case
(cherry picked from commit 761e9df1bf)
2022-11-05 11:53:50 +00:00
Sagar Sharma
97445d9516 fix: rename test method
(cherry picked from commit 611d827e0b)
2022-11-05 11:53:49 +00:00
Sagar Sharma
e629cba2b7 fix: map BOM while mapping the return SCR
(cherry picked from commit 54072ec9cd)
2022-11-05 11:53:49 +00:00
Deepesh Garg
cc8a184666 Merge pull request #32855 from frappe/mergify/bp/version-14-hotfix/pr-32844
fix: Auto advance allocation against partial invoices (backport #32844)
2022-11-05 16:59:03 +05:30
Maharshi Patel
60af9c0516 fix: Create POS Opening Entry POS Profile filter.
pos_profile_query was variable instead of function.

(cherry picked from commit 1328a45f2a)
2022-11-05 11:15:32 +00:00
Deepesh Garg
c3b2629412 test: Check parital payment allocation
(cherry picked from commit 428971f127)
2022-11-05 10:58:42 +00:00
Deepesh Garg
b7763d953a fix: Auto advance allocation against partial invoices
(cherry picked from commit 181df2fe63)
2022-11-05 10:58:42 +00:00
Sagar Sharma
3bd024ca8f Merge pull request #32831 from bhavesh95863/patch-2
fix: mysql syntax issue
2022-11-05 11:30:14 +05:30
Sagar Sharma
d443925b1e Merge branch 'version-14-hotfix' into patch-2 2022-11-05 10:29:11 +05:30
Sagar Sharma
2f145f9912 refactor: rewrite query in QB 2022-11-05 10:28:06 +05:30
rohitwaghchaure
d9147c1975 Merge pull request #32841 from frappe/mergify/bp/version-14-hotfix/pr-32799
fix: Scan Barcode UX (backport #32799)
2022-11-04 12:09:36 +05:30
rohitwaghchaure
31bada9205 fix: trailing whitespace 2022-11-04 11:28:41 +05:30
rohitwaghchaure
ab87a950e5 fix: conflicts 2022-11-04 11:21:39 +05:30
Rohit Waghchaure
d8e403bf5d fix: auto increment qty if item table has no items
(cherry picked from commit e5b19e3f70)
2022-11-04 05:36:09 +00:00
Rohit Waghchaure
1944f4df4d fix: Scan Barcode UX
(cherry picked from commit e1f9ba78e5)

# Conflicts:
#	erpnext/public/js/utils/barcode_scanner.js
2022-11-04 05:36:09 +00:00
Deepesh Garg
7e15c4789d Merge pull request #32840 from frappe/mergify/bp/version-14-hotfix/pr-32712
chore: add translation  function to Bank Reconciliation Tool-related files (backport #32712)
2022-11-04 08:33:44 +05:30
Ernesto Ruiz
e334b7dfee chore: add translation function to Bank Reconciliation Tool related files
chore: add translation  function to Bank Reconciliation Tool related files
(cherry picked from commit ad0dd693ac)
2022-11-03 19:36:56 +00:00
Frappe PR Bot
3967773fbe chore(release): Bumped to Version 14.5.1
## [14.5.1](https://github.com/frappe/erpnext/compare/v14.5.0...v14.5.1) (2022-11-03)

### Bug Fixes

* not able to select customer / supplier ([dd4dbd4](dd4dbd4b00))
2022-11-03 08:07:36 +00:00
Deepesh Garg
074c75252a Merge pull request #32835 from frappe/mergify/bp/version-14/pr-32833
fix: not able to select customer / supplier (backport #32832) (backport #32833)
2022-11-03 13:35:52 +05:30
Rohit Waghchaure
dd4dbd4b00 fix: not able to select customer / supplier
(cherry picked from commit b0fc568c80)
(cherry picked from commit 6989cdf4f2)
2022-11-03 06:53:41 +00:00
rohitwaghchaure
2d2a126510 Merge pull request #32833 from frappe/mergify/bp/version-14-hotfix/pr-32832
fix: not able to select customer / supplier (backport #32832)
2022-11-03 12:22:41 +05:30
Deepesh Garg
a10ea5efc9 Merge pull request #32830 from frappe/mergify/bp/version-14-hotfix/pr-32773
fix: for asset's purchase_date, if bill_date is set, use that instead of posting_date (backport #32773)
2022-11-03 12:07:35 +05:30
Rohit Waghchaure
6989cdf4f2 fix: not able to select customer / supplier
(cherry picked from commit b0fc568c80)
2022-11-03 06:25:53 +00:00
Anand Baburajan
f5534d7db3 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32773 2022-11-03 11:53:55 +05:30
Bhavesh Maheshwari
4d9bbd4c9c fix: mysql syntax issue 2022-11-03 10:59:20 +05:30
Deepesh Garg
7a7b1d33c3 Merge pull request #32829 from frappe/mergify/bp/version-14-hotfix/pr-32713
fix: add missing translation function on report related documents (backport #32713)
2022-11-03 10:29:00 +05:30
anandbaburajan
01a1c96314 fix: for asset's purchase_date, if bill_date is set, use that instead of posting_date
(cherry picked from commit f322c608cf)
2022-11-03 04:22:14 +00:00
Ernesto Ruiz
8f6f9a429a fix: correct linters
(cherry picked from commit 4c7fa9482d)
2022-11-03 04:17:23 +00:00
Ernesto Ruiz
440e20859f fix: correct linters
(cherry picked from commit 9c529c61bb)
2022-11-03 04:17:22 +00:00
Ernesto Ruiz
5acc9be5c9 fix: correct linters
(cherry picked from commit b7b53b5857)
2022-11-03 04:17:22 +00:00
Ernesto Ruiz
595aaad99d fix: add translate function to string on budget_variance_report.js to match the variance word translated
(cherry picked from commit 2012bdf4bd)
2022-11-03 04:17:22 +00:00
Ernesto Ruiz
16f364da37 fix: add translate function to name of chart labels in budget_variance_report.py
(cherry picked from commit 48ed6381b3)
2022-11-03 04:17:21 +00:00
Ernesto Ruiz
e681f06883 fix: add translate function to period in sales_analytics.py
(cherry picked from commit 083a78135c)
2022-11-03 04:17:21 +00:00
Ernesto Ruiz
b0c06d5a04 fix: add translate function to period in stock_analytics.py
(cherry picked from commit c1e608d9ef)
2022-11-03 04:17:20 +00:00
Ernesto Ruiz
0ead51642f fix: refactor code for better translatable string in stock_ageing.py
(cherry picked from commit 71a0ae2e59)
2022-11-03 04:17:20 +00:00
Ernesto Ruiz
2dc24f22ea fix: refactor code for better translatable string
(cherry picked from commit a671652ab2)
2022-11-03 04:17:20 +00:00
Ernesto Ruiz
b8caa587d2 fix: add translate function to name of chart labels in deferred_revenue_and_expense.py
(cherry picked from commit a963618b08)
2022-11-03 04:17:19 +00:00
ruthra kumar
b17761c276 Merge pull request #32822 from frappe/mergify/bp/version-14-hotfix/pr-32816
fix: update advance paid in SO/PO from Payment Ledger (backport #32816)
2022-11-02 19:31:33 +05:30
Sagar Sharma
d8c0a147db Merge pull request #32820 from frappe/mergify/bp/version-14-hotfix/pr-32788
fix: use `flt` instead of `cint` in `get_batch_no` (backport #32788)
2022-11-02 19:11:08 +05:30
Sagar Sharma
611dcc11d2 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32788 2022-11-02 17:49:26 +05:30
Sagar Sharma
75d347d757 Merge pull request #32823 from frappe/mergify/bp/version-14-hotfix/pr-32800
fix: test cases (backport #32800)
2022-11-02 17:49:01 +05:30
Rohit Waghchaure
d3fbe3074d test: run tmate
(cherry picked from commit 3f2728e3f7)
2022-11-02 11:44:05 +00:00
Rohit Waghchaure
0feec4ca8a fix: test cases
(cherry picked from commit ddd1b4be3f)
2022-11-02 11:44:05 +00:00
ruthra kumar
cf32e1905c test: SO advance paid on Payment submission and cancellation
(cherry picked from commit 721ac6b847)
2022-11-02 10:59:47 +00:00
ruthra kumar
87dc812a4b test: PO advance paid on payment submission and cancellation
(cherry picked from commit 1a0a8ac7e2)
2022-11-02 10:59:46 +00:00
ruthra kumar
388cf5113b test: refactor use @change_settings decorator when possible
(cherry picked from commit 81d791eea0)
2022-11-02 10:59:46 +00:00
ruthra kumar
a561432908 fix: update advance paid in SO/PO from Payment Ledger
(cherry picked from commit 4487065b67)
2022-11-02 10:59:45 +00:00
Sagar Sharma
6510464482 fix: use flt instead of cint in get_batch_no
(cherry picked from commit 9fb3fb4c83)
2022-11-02 10:25:26 +00:00
Frappe PR Bot
ce5dbf891a chore(release): Bumped to Version 14.5.0
# [14.5.0](https://github.com/frappe/erpnext/compare/v14.4.0...v14.5.0) (2022-11-01)

### Bug Fixes

* add `Sales Order` reference in Material Request Dashboard ([fc63892](fc6389280c))
* Add condition for discount section collapse ([953f78d](953f78d6a9))
* Budget validation for main cost center ([89a1c83](89a1c83431))
* Clear invoice table post importing invoices ([6eafff8](6eafff8694))
* Company bank account filter in Bank Clearance ([797512c](797512ca13))
* Curreny in SOA print for multi-currency party ([195500c](195500cb32))
* duplicate custom fields for inventory dimension ([1152ac3](1152ac3ff1))
* Filter fixes in Accounts Payable report ([29197dc](29197dcd7f))
* Issues while cancel/amending Purchase Invoice with TDS enabled ([74a6479](74a6479f70))
* key error in filter access ([6114241](6114241ff2))
* Mode of payment for returns in POS Sales Invoice ([a260426](a260426dd4))
* Pass project to stock entry items ([4035873](4035873295))
* pro_rata_amount calculation in assets tests ([d1b2786](d1b2786f24))
* Reference due date field type in Journal Entry Accounts table ([faf25c0](faf25c0b95))
* Reset advance paid amount on Oreder cancel and amend ([34bd783](34bd7837e2))
* Total Sales amount update in project via Sales Order ([d742e6d](d742e6d56b))

### Features

* additional filters on Payment terms report ([a03ec0a](a03ec0afb3))
* **pricing rule:** free qty rounding and recursion qty ([#32577](https://github.com/frappe/erpnext/issues/32577)) ([9b66020](9b66020fc7))
2022-11-01 17:19:41 +00:00
Deepesh Garg
fd36ee0fda Merge pull request #32793 from frappe/version-14-hotfix
chore: release v14
2022-11-01 22:48:17 +05:30
Deepesh Garg
d68fa0eff2 Merge pull request #32807 from frappe/mergify/bp/version-14-hotfix/pr-32779
fix: Mode of payment for returns in POS Sales Invoice (backport #32779)
2022-11-01 22:12:11 +05:30
Deepesh Garg
3f72156ea9 chore: Update tests
(cherry picked from commit 5b74161195)
2022-11-01 16:00:18 +00:00
Deepesh Garg
a260426dd4 fix: Mode of payment for returns in POS Sales Invoice
(cherry picked from commit 06e8e28531)
2022-11-01 16:00:18 +00:00
Deepesh Garg
148dc37d92 Merge pull request #32804 from frappe/mergify/bp/version-14-hotfix/pr-32801
fix: Issues while cancel/amending Purchase Invoice with TDS enabled (backport #32801)
2022-11-01 21:29:17 +05:30
Deepesh Garg
74a6479f70 fix: Issues while cancel/amending Purchase Invoice with TDS enabled
(cherry picked from commit f7c9258770)
2022-11-01 15:19:10 +00:00
ruthra kumar
f2f1c160f8 Merge pull request #32797 from frappe/mergify/bp/version-14-hotfix/pr-32577
feat(pricing rule): free qty rounding and recursion qty (backport #32577)
2022-11-01 17:09:46 +05:30
Dany Robert
9b66020fc7 feat(pricing rule): free qty rounding and recursion qty (#32577)
Option to specify recursion start qty and repeating qty

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit 1d83fb20d6)
2022-11-01 11:12:44 +00:00
Deepesh Garg
6af43ba40d Merge pull request #32795 from frappe/mergify/bp/version-14-hotfix/pr-32790
fix: pro_rata_amount calculation in assets tests (backport #32790)
2022-11-01 16:19:49 +05:30
Anand Baburajan
bd531eb898 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32790 2022-11-01 15:21:29 +05:30
Deepesh Garg
15f4812108 Merge pull request #32782 from frappe/mergify/bp/version-14-hotfix/pr-32768
fix: Budget validation for main cost center (backport #32768)
2022-11-01 15:21:16 +05:30
anandbaburajan
4c5b688e0d chore: empty commit to try fixing stuck test
(cherry picked from commit 672fbd3849)
2022-11-01 09:48:04 +00:00
anandbaburajan
d1b2786f24 fix: pro_rata_amount calculation in assets tests
(cherry picked from commit 65e855bfff)
2022-11-01 09:48:04 +00:00
rohitwaghchaure
2eb01aae27 Merge pull request #32783 from frappe/mergify/bp/version-14-hotfix/pr-32730
fix: duplicate custom fields for inventory dimension (backport #32730)
2022-10-31 23:06:29 +05:30
Rohit Waghchaure
1152ac3ff1 fix: duplicate custom fields for inventory dimension
(cherry picked from commit 45ededbed5)
2022-10-31 16:56:17 +00:00
Deepesh Garg
89a1c83431 fix: Budget validation for main cost center
(cherry picked from commit 4e26d42d17)
2022-10-31 16:49:31 +00:00
Deepesh Garg
2a1a61238a Merge pull request #32780 from frappe/mergify/bp/version-14-hotfix/pr-32777
fix: Reset advance paid amount on Order cancel and amend (backport #32777)
2022-10-31 22:07:54 +05:30
Deepesh Garg
34bd7837e2 fix: Reset advance paid amount on Oreder cancel and amend
(cherry picked from commit 92f37ca111)
2022-10-31 16:09:27 +00:00
Deepesh Garg
f66a6693f4 Merge pull request #32761 from frappe/mergify/bp/version-14-hotfix/pr-32759
Pass project to stock entry items (backport #32759)
2022-10-30 09:29:03 +05:30
Hossein Yousefian
4035873295 fix: Pass project to stock entry items
fix: Pass project to stock entry items
(cherry picked from commit 54c2ffc36b)
2022-10-29 16:55:25 +00:00
Deepesh Garg
4a86efedfc Merge pull request #32752 from frappe/mergify/bp/version-14-hotfix/pr-32744
refactor: additional filters on Payment Terms status report (backport #32744)
2022-10-29 17:12:17 +05:30
Sagar Sharma
b7cbc804b2 Merge pull request #32756 from frappe/mergify/bp/version-14-hotfix/pr-32754
fix: add `Sales Order` reference in Material Request Dashboard (backport #32754)
2022-10-29 13:49:16 +05:30
Sagar Sharma
fc6389280c fix: add Sales Order reference in Material Request Dashboard
(cherry picked from commit 15ebf4a0cf)
2022-10-29 07:07:25 +00:00
ruthra kumar
6dbb4a3b0d test: due date filter on Payment Terms report
(cherry picked from commit fed39a53cb)
2022-10-29 05:40:16 +00:00
ruthra kumar
6114241ff2 fix: key error in filter access
(cherry picked from commit 4765f937ea)
2022-10-29 05:40:16 +00:00
ruthra kumar
a03ec0afb3 feat: additional filters on Payment terms report
Filter on Status and Due dates

(cherry picked from commit aadb6b1772)
2022-10-29 05:40:15 +00:00
Deepesh Garg
db5d74b7dc Merge pull request #32748 from frappe/mergify/bp/version-14-hotfix/pr-32722
fix: Reference due date field type in Journal Entry Accounts table (backport #32722)
2022-10-29 11:00:01 +05:30
Deepesh Garg
ad6e0f3af7 Merge pull request #32746 from frappe/mergify/bp/version-14-hotfix/pr-32699
fix: Curreny in SOA print for multi-currency party (backport #32699)
2022-10-29 10:59:49 +05:30
Deepesh Garg
abcf30aaa3 Merge pull request #32745 from frappe/mergify/bp/version-14-hotfix/pr-32692
fix: Clear invoice table post importing invoices (backport #32692)
2022-10-29 10:59:35 +05:30
Deepesh Garg
cc9c876007 Merge pull request #32747 from frappe/mergify/bp/version-14-hotfix/pr-32718
fix: Total Sales amount update in project via Sales Order (backport #32718)
2022-10-29 10:59:10 +05:30
Sagar Sharma
199e77faef Merge pull request #32750 from frappe/mergify/bp/version-14-hotfix/pr-32662
refactor: rewrite stock reports queries in qb (backport #32662)
2022-10-28 22:48:03 +05:30
Sagar Sharma
98428f0bce refactor: rewrite Itemwise Recommended Reorder Level Report queries in QB
(cherry picked from commit 40bd121593)
2022-10-28 15:36:01 +00:00
Sagar Sharma
a4b99a34cb refactor: rewrite Product Bundle Balance Report queries in QB
(cherry picked from commit cde785f1bb)
2022-10-28 15:36:01 +00:00
Sagar Sharma
c4587d8caa refactor: rewrite Stock Ledger Report queries in QB
(cherry picked from commit feaa2dbba8)
2022-10-28 15:36:01 +00:00
Deepesh Garg
faf25c0b95 fix: Reference due date field type in Journal Entry Accounts table
(cherry picked from commit e7caa48e2f)
2022-10-28 15:26:29 +00:00
Deepesh Garg
d742e6d56b fix: Total Sales amount update in project via Sales Order
(cherry picked from commit 6063c4e3c0)
2022-10-28 15:16:42 +00:00
Deepesh Garg
3f0b03c0a4 chore: Use account currency as fallback
(cherry picked from commit a18a715bb4)
2022-10-28 15:12:34 +00:00
Deepesh Garg
195500cb32 fix: Curreny in SOA print for multi-currency party
(cherry picked from commit 49ee873655)
2022-10-28 15:12:34 +00:00
Deepesh Garg
6eafff8694 fix: Clear invoice table post importing invoices
(cherry picked from commit 267e7c3a90)
2022-10-28 15:11:41 +00:00
Deepesh Garg
36f2b65401 Merge pull request #32739 from frappe/mergify/bp/version-14-hotfix/pr-32716
fix: Company bank account filter in Bank Clearance (backport #32716)
2022-10-28 17:19:49 +05:30
Sagar Sharma
f082c9e797 Merge pull request #32740 from frappe/mergify/bp/version-14-hotfix/pr-32738
fix: Added Material Request Reference in Purchase Recipt Dashboard for Tracking (backport #32738)
2022-10-28 16:06:44 +05:30
Vishal
0ab69c0e32 chore: minor linting issue fixed
(cherry picked from commit e8c0157017)
2022-10-28 08:54:44 +00:00
Vishal
de3996e411 chore: Added Material Request Reference in Purchase Recipt Dashboard for Tracking
(cherry picked from commit a04c44fe34)
2022-10-28 08:54:44 +00:00
Deepesh Garg
797512ca13 fix: Company bank account filter in Bank Clearance
(cherry picked from commit f9f78c1086)
2022-10-28 07:24:35 +00:00
Deepesh Garg
d39ec5ef5f Merge pull request #32737 from frappe/mergify/bp/version-14-hotfix/pr-32717
fix: Add condition for discount section collapse (backport #32717)
2022-10-28 11:55:37 +05:30
Deepesh Garg
2dae93c0a1 Merge pull request #32736 from frappe/mergify/bp/version-14-hotfix/pr-32724
fix: Filter fixes in Accounts Payable report (backport #32724)
2022-10-28 11:55:24 +05:30
Deepesh Garg
953f78d6a9 fix: Add condition for discount section collapse
(cherry picked from commit 4cd65027c4)
2022-10-28 05:55:06 +00:00
Deepesh Garg
29197dcd7f fix: Filter fixes in Accounts Payable report
(cherry picked from commit a5a73ba857)
2022-10-28 05:54:25 +00:00
Frappe PR Bot
123d720616 chore(release): Bumped to Version 14.4.0
# [14.4.0](https://github.com/frappe/erpnext/compare/v14.3.1...v14.4.0) (2022-10-26)

### Bug Fixes

* Advance paid amount in orders (backport [#32642](https://github.com/frappe/erpnext/issues/32642)) ([#32648](https://github.com/frappe/erpnext/issues/32648)) ([8a88105](8a88105aed))
* allow to create Sales Order from expired Quotation ([#32641](https://github.com/frappe/erpnext/issues/32641)) ([ccc58f4](ccc58f48e3))
* Billing Address for inter-company purchase docs ([f8934fa](f8934faa73))
* BOM cost update message ([e539579](e539579fb4))
* dont update item info twice ([8876904](887690449d))
* incorrect qty in material request ([da538a3](da538a37ad))
* number of months subscription plan ([fff9e76](fff9e76718))
* overlap error not raised for job card in case of workstation with production capacity ([ed2a093](ed2a093e49))
* party type and party mandatory on updating outstanding ([9a5e238](9a5e238702))
* searchfield not working for cuctsomer, supplier as per customize form ([fb1c307](fb1c30718b))
* unset contact details ([d7a65b1](d7a65b1d41))

### Features

* Basic Payment Ledger report ([5cb9f7b](5cb9f7b3a4))
* Repayment schedule types for term loans ([6ce32fd](6ce32fd5a9))

### Performance Improvements

* cache barcode scan result (backport [#32629](https://github.com/frappe/erpnext/issues/32629)) ([#32672](https://github.com/frappe/erpnext/issues/32672)) ([3300856](3300856fb4))
2022-10-26 05:09:19 +00:00
Deepesh Garg
1c95c67f58 Merge pull request #32707 from frappe/version-14-hotfix
chore: release v14
2022-10-26 10:37:46 +05:30
rohitwaghchaure
753b2edebf Merge pull request #32698 from frappe/mergify/bp/version-14-hotfix/pr-32693
fix: Search field not working for customer, supplier (backport #32693)
2022-10-24 23:14:37 +05:30
Rohit Waghchaure
f50b485225 test: added test case to validate seachfields for customer, supplier
(cherry picked from commit 5f84993bae)
2022-10-24 11:42:16 +00:00
Rohit Waghchaure
fb1c30718b fix: searchfield not working for cuctsomer, supplier as per customize form
(cherry picked from commit 46d148defd)
2022-10-24 11:42:15 +00:00
Deepesh Garg
2705de084f Merge pull request #32689 from frappe/mergify/bp/version-14-hotfix/pr-32424
feat: Repayment schedule types for term loans (backport #32424)
2022-10-23 23:06:58 +05:30
Deepesh Garg
a0ace27f56 chore: resolve conflicts 2022-10-23 19:43:02 +05:30
Deepesh Garg
2348c42c79 chore: Update tests
(cherry picked from commit e59b147a62)
2022-10-23 14:08:36 +00:00
Deepesh Garg
1b3a0be0f1 chore: Add repayment date on option
(cherry picked from commit ef0cb17faf)
2022-10-23 14:08:35 +00:00
Deepesh Garg
b9bf5666bc chore: label post save
(cherry picked from commit bf7a51791a)
2022-10-23 14:08:34 +00:00
Deepesh Garg
25e87641b6 chore: Add patch to update repayment schedule type in loan documents
(cherry picked from commit 679b5ed551)

# Conflicts:
#	erpnext/patches.txt
2022-10-23 14:08:34 +00:00
Deepesh Garg
8550bbde27 chore: Update labels as per repayment type
(cherry picked from commit 2ddee50f27)
2022-10-23 14:08:32 +00:00
Deepesh Garg
7398cbdf12 chore: Remove print statements
(cherry picked from commit 3466461eb3)
2022-10-23 14:08:32 +00:00
Deepesh Garg
6ce32fd5a9 feat: Repayment schedule types for term loans
(cherry picked from commit 76c6ccab5d)
2022-10-23 14:08:32 +00:00
Deepesh Garg
18904456f3 Merge pull request #32686 from frappe/mergify/bp/version-14-hotfix/pr-32650
fix: unset contact details (backport #32650)
2022-10-23 18:32:04 +05:30
barredterra
d7a65b1d41 fix: unset contact details
(cherry picked from commit 23f0bb45b0)
2022-10-23 12:51:49 +00:00
ruthra kumar
eb6db59adf Merge pull request #32679 from frappe/mergify/bp/version-14-hotfix/pr-32635
fix: Integrity Error on PLE while submitting sales invoice (backport #32635)
2022-10-21 12:05:46 +05:30
ruthra kumar
fb2b2edf7e Merge pull request #32678 from frappe/mergify/bp/version-14-hotfix/pr-32651
feat: Payment Ledger report (backport #32651)
2022-10-21 11:56:09 +05:30
ruthra kumar
c2f8f64d1e test: use payable account in tax and to trigger party validation
(cherry picked from commit 8f42e7f703)
2022-10-21 06:07:09 +00:00
ruthra kumar
9a5e238702 fix: party type and party mandatory on updating outstanding
(cherry picked from commit 43b80683eb)
2022-10-21 06:07:09 +00:00
ruthra kumar
77f4c666ee test: invoice outstandings and payments
(cherry picked from commit 6e55b419a6)
2022-10-21 05:56:17 +00:00
ruthra kumar
5cb9f7b3a4 feat: Basic Payment Ledger report
(cherry picked from commit 8f60f0a0cf)
2022-10-21 05:56:17 +00:00
Ankush Menat
e1fc67c730 chore: disable coverage reporting on stable branches 2022-10-20 19:15:50 +05:30
Deepesh Garg
99d410ab75 Merge pull request #32673 from frappe/mergify/bp/version-14-hotfix/pr-32551
fix: number of months subscription plan (backport #32551)
2022-10-20 19:06:54 +05:30
Deepesh Garg
54de569251 Merge pull request #32655 from frappe/mergify/bp/version-14-hotfix/pr-32641
fix: allow to create Sales Order from expired Quotation (backport #32641)
2022-10-20 17:34:04 +05:30
Deepesh Garg
cab3f39f95 chore: Linting issues
(cherry picked from commit 1ca472cc8a)
2022-10-20 11:55:04 +00:00
codezart
fff9e76718 fix: number of months subscription plan
(cherry picked from commit 2d30b36cca)
2022-10-20 11:55:04 +00:00
Deepesh Garg
dbbebd2a73 Merge pull request #32663 from frappe/mergify/bp/version-14-hotfix/pr-32659
fix: Billing Address for inter-company purchase docs (backport #32659)
2022-10-20 17:21:24 +05:30
rohitwaghchaure
9bf101a234 Merge pull request #32669 from frappe/mergify/bp/version-14-hotfix/pr-32667
fix: BOM cost update message (backport #32667)
2022-10-20 16:53:09 +05:30
Ankush Menat
887690449d fix: dont update item info twice
[skip ci]
2022-10-20 16:19:40 +05:30
mergify[bot]
3300856fb4 perf: cache barcode scan result (backport #32629) (#32672)
perf: cache barcode scan result (#32629)

* perf: cache barcode scan result

* feat: BarcodeScanResult type

* fix: use safe `get_value` `set_value`

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
(cherry picked from commit b88e850d55)

Co-authored-by: Devin Slauenwhite <devin.slauenwhite@gmail.com>
2022-10-20 15:57:21 +05:30
Rohit Waghchaure
e539579fb4 fix: BOM cost update message
(cherry picked from commit 9cfe527492)
2022-10-20 09:08:31 +00:00
Deepesh Garg
f8934faa73 fix: Billing Address for inter-company purchase docs
(cherry picked from commit 796f2d3c09)
2022-10-20 06:29:32 +00:00
rohitwaghchaure
2c9845f8cb Merge pull request #32660 from frappe/mergify/bp/version-14-hotfix/pr-32654
fix: incorrect qty in material request created from PP (backport #32654)
2022-10-20 11:58:57 +05:30
Rohit Waghchaure
92b9d3dc6d test: validate qty and purchase uom in material request which is created from PP
(cherry picked from commit 4d5ef721f7)
2022-10-20 04:30:08 +00:00
Rohit Waghchaure
da538a37ad fix: incorrect qty in material request
(cherry picked from commit ad278b2007)
2022-10-20 04:30:08 +00:00
rohitwaghchaure
d6bf85f8bb Merge pull request #32652 from frappe/mergify/bp/version-14-hotfix/pr-32645
fix: overlap error not raised for job card in case of workstation with production capacity (backport #32645)
2022-10-20 09:58:25 +05:30
mergify[bot]
c3024af296 feat(report):added account wise redirection (backport #32529) (#32657)
feat(report): added account wise redirection

* feat(report):added account wise redirection

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit c52b41d311)

Co-authored-by: FinByz Tech Pvt. Ltd <info@finbyz.tech>
2022-10-20 09:39:11 +05:30
Raffael Meyer
ccc58f48e3 fix: allow to create Sales Order from expired Quotation (#32641)
(cherry picked from commit 4ad3002861)
2022-10-19 16:37:53 +00:00
Rohit Waghchaure
ed2a093e49 fix: overlap error not raised for job card in case of workstation with production capacity
(cherry picked from commit 8b2165e0d1)
2022-10-19 11:35:38 +00:00
mergify[bot]
8a88105aed fix: Advance paid amount in orders (backport #32642) (#32648)
fix: Advance paid amount in orders (#32642)

(cherry picked from commit 430492152f)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2022-10-19 15:41:57 +05:30
Frappe PR Bot
9703771b75 chore(release): Bumped to Version 14.3.1
## [14.3.1](https://github.com/frappe/erpnext/compare/v14.3.0...v14.3.1) (2022-10-18)

### Bug Fixes

* `Brand Defaults` filters ([cb0c4b5](cb0c4b5664))
* add project settings to projects workspace (backport [#32568](https://github.com/frappe/erpnext/issues/32568)) ([#32600](https://github.com/frappe/erpnext/issues/32600)) ([af4dafd](af4dafdc64))
* delete old ple's on item value repost ([62cabdf](62cabdf792))
* don't try to update youtube data if disabled in settings (backport [#32588](https://github.com/frappe/erpnext/issues/32588)) ([#32589](https://github.com/frappe/erpnext/issues/32589)) ([ed85683](ed85683fea))
* group warehouse filter not working for Batchwise Balance history report ([faedd85](faedd85b66))
* Ignore linked purchase invoice on cancel ([cc938fb](cc938fb028))
* linter ([831f60f](831f60f439))
* Party account for multi-order invoices ([eaea846](eaea8469fc))
* pricing rule item code UOM apply & conversions (backport [#32566](https://github.com/frappe/erpnext/issues/32566)) ([#32637](https://github.com/frappe/erpnext/issues/32637)) ([ffd82f3](ffd82f3302))
* Renamed Dashboard tab label to Connections ([dac5989](dac5989d72))
* Renamed Notes section to Comments ([9e94dd9](9e94dd9203))
* type-cast while saving an item (backport [#32549](https://github.com/frappe/erpnext/issues/32549)) ([#32578](https://github.com/frappe/erpnext/issues/32578)) ([829a0ff](829a0ff827))
2022-10-18 18:03:17 +00:00
Deepesh Garg
bd62a1d2d3 Merge pull request #32633 from frappe/version-14-hotfix
chore: release v14
2022-10-18 23:31:52 +05:30
mergify[bot]
ffd82f3302 fix: pricing rule item code UOM apply & conversions (backport #32566) (#32637)
fix: pricing rule for non stock UOM and conversions

* fix: pricing rule for non stock UOM and conversions

(cherry picked from commit 96b4211ea1)

Co-authored-by: Maharshi Patel <39730881+maharshivpatel@users.noreply.github.com>
2022-10-18 23:01:08 +05:30
Deepesh Garg
8c658638b4 Merge pull request #32621 from frappe/mergify/bp/version-14-hotfix/pr-32598
refactor: split ple creation function into two (backport #32598)
2022-10-18 15:11:51 +05:30
Sagar Sharma
064e364b4f Merge pull request #32632 from frappe/mergify/bp/version-14-hotfix/pr-32520
refactor: rewrite stock reports queries in qb (backport #32520)
2022-10-18 14:59:18 +05:30
Sagar Sharma
831f60f439 fix: linter 2022-10-18 14:27:56 +05:30
Sagar Sharma
469813d3e1 chore: conflicts 2022-10-18 14:18:44 +05:30
Sagar Sharma
656008dd66 refactor: rewrite Warehouse wise Item Balance Age and Value Report queries in QB
(cherry picked from commit 8103856a41)
2022-10-18 08:22:56 +00:00
Sagar Sharma
362bf5fc19 refactor: rewrite Total Stock Summary Report queries in QB
(cherry picked from commit 7c759b193c)
2022-10-18 08:22:56 +00:00
Sagar Sharma
8af90b2421 refactor: rewrite Supplier-Wise Sales Analytics Report queries in QB
(cherry picked from commit d3c073dc25)
2022-10-18 08:22:55 +00:00
Sagar Sharma
6903fb68d3 refactor: rewrite Stock Projected Qty Report queries in QB
(cherry picked from commit c18f13a45b)
2022-10-18 08:22:55 +00:00
Sagar Sharma
907a41a8da refactor: rewrite Item Prices Report queries in QB
(cherry picked from commit e312d17eae)
2022-10-18 08:22:55 +00:00
Sagar Sharma
e62fdf4af0 refactor: rewrite Delayed Item Report queries in QB
(cherry picked from commit bb59346651)
2022-10-18 08:22:55 +00:00
Sagar Sharma
720370537f refactor: rewrite Batch-Wise Balance History Report queries in QB
(cherry picked from commit 1c1f991d2f)

# Conflicts:
#	erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py
2022-10-18 08:22:54 +00:00
Sagar Sharma
5a85c2d661 refactor: rewrite Batch Item Expiry Status Report queries in QB
(cherry picked from commit 2c9d9577e3)
2022-10-18 08:22:54 +00:00
Sagar Sharma
64e9a25347 Merge pull request #32630 from frappe/mergify/bp/version-14-hotfix/pr-32527
refactor: rewrite buying reports queries in qb (backport #32527)
2022-10-18 10:47:47 +05:30
Sagar Sharma
2191f8a488 refactor: rewrite Procurement Tracker Report queries in QB
(cherry picked from commit e78a706994)
2022-10-18 04:37:03 +00:00
Sagar Sharma
1fbbaa8fcf refactor: rewrite Supplier Quotation Comparison Report queries in QB
(cherry picked from commit a14b9c7bac)
2022-10-18 04:37:02 +00:00
Sagar Sharma
fbb641936e refactor: rewrite Purchase Order Analysis Report queries in QB
(cherry picked from commit a5b3f8cae9)
2022-10-18 04:37:02 +00:00
Deepesh Garg
891a4afb5f Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32598 2022-10-18 10:00:46 +05:30
Deepesh Garg
01c5fbdbfb Merge pull request #32623 from frappe/mergify/bp/version-14-hotfix/pr-32622
fix: Ignore linked purchase invoice on cancel (backport #32622)
2022-10-18 09:12:48 +05:30
Deepesh Garg
cc938fb028 fix: Ignore linked purchase invoice on cancel
(cherry picked from commit faadf78332)
2022-10-17 14:08:50 +00:00
Deepesh Garg
9bcec15ca4 Merge pull request #32619 from frappe/mergify/bp/version-14-hotfix/pr-32618
test: lead creation and deletion restricted to dummy company (backport #32618)
2022-10-17 19:37:36 +05:30
ruthra kumar
a88ac4016a refactor: split ple creation function into two
refactor create_payment_ledger_entry function into 2.
one for generating ple map and one for DB entry creation

(cherry picked from commit 9b50221bf0)
2022-10-17 13:16:20 +00:00
rohitwaghchaure
0654f303bb Merge pull request #32615 from frappe/mergify/bp/version-14-hotfix/pr-32613
fix: group warehouse filter not working for Batch-wise Balance history report (backport #32613)
2022-10-17 18:04:09 +05:30
ruthra kumar
98e7b2dd25 test: lead creation and deletion restricted to dummy company
(cherry picked from commit ced8d2a537)
2022-10-17 11:42:33 +00:00
Rohit Waghchaure
1ee0d990e5 chore: seperate function to apply filter for warehouse in case of QB
(cherry picked from commit 2481574a28)
2022-10-17 09:43:30 +00:00
Rohit Waghchaure
faedd85b66 fix: group warehouse filter not working for Batchwise Balance history report
(cherry picked from commit 6381e75fa5)
2022-10-17 09:43:29 +00:00
Deepesh Garg
2db1da0c8a Merge pull request #32612 from frappe/mergify/bp/version-14-hotfix/pr-32607
chore: Remove HRMS related code (backport #32607)
2022-10-17 14:53:39 +05:30
Deepesh Garg
d9519f24aa chore: Remove HRMS related code (#32607)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
(cherry picked from commit dc3fe85921)
2022-10-17 06:09:25 +00:00
Deepesh Garg
a260c594c1 Merge pull request #32608 from frappe/mergify/bp/version-14-hotfix/pr-32591
fix: Renamed Notes section to Comments (backport #32591)
2022-10-15 18:26:00 +05:30
Nabin Hait
dac5989d72 fix: Renamed Dashboard tab label to Connections
(cherry picked from commit f561d8f689)
2022-10-15 12:13:35 +00:00
Nabin Hait
9e94dd9203 fix: Renamed Notes section to Comments
(cherry picked from commit 56a4a77398)
2022-10-15 12:13:35 +00:00
Deepesh Garg
794167aa36 Merge pull request #32606 from frappe/mergify/bp/version-14-hotfix/pr-32594
fix: Party account for multi-order invoices (backport #32594)
2022-10-15 17:41:14 +05:30
Deepesh Garg
eaea8469fc fix: Party account for multi-order invoices
(cherry picked from commit fd49503ba2)
2022-10-15 11:29:42 +00:00
mergify[bot]
af4dafdc64 fix: add project settings to projects workspace (backport #32568) (#32600)
Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2022-10-14 18:01:43 +05:30
ruthra kumar
a012c55c81 Merge pull request #32592 from frappe/mergify/bp/version-14-hotfix/pr-32567
fix: deduplicate Payment Ledger on Item value repost (backport #32567)
2022-10-13 15:28:57 +05:30
mergify[bot]
6a89cb57b0 chore: drop dead code (backport #32595) (#32596)
chore: drop dead code (#32595)

[skip ci]

(cherry picked from commit 50e9698932)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-10-13 15:27:17 +05:30
ruthra kumar
3c457e2638 test: dedeplication on payment ledger upon repost
(cherry picked from commit eb819368aa)
2022-10-13 08:32:51 +00:00
ruthra kumar
62cabdf792 fix: delete old ple's on item value repost
(cherry picked from commit 65992304bc)
2022-10-13 08:32:51 +00:00
mergify[bot]
ed85683fea fix: don't try to update youtube data if disabled in settings (backport #32588) (#32589)
fix: don't try to update youtube data if disabled in settings (#32588)

fix: cast value from db

[skip ci]

(cherry picked from commit e543dca6a0)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2022-10-13 11:55:36 +05:30
mergify[bot]
829a0ff827 fix: type-cast while saving an item (backport #32549) (#32578)
fix: type-cast while saving an item (#32549)

(cherry picked from commit 43037d893d)

Co-authored-by: Rohan <Alchez@users.noreply.github.com>
2022-10-13 11:54:22 +05:30
Sagar Sharma
0674d42c96 Merge pull request #32586 from frappe/mergify/bp/version-14-hotfix/pr-32576
fix: `Brand Defaults` filters (backport #32576)
2022-10-12 19:25:32 +05:30
Sagar Sharma
cb0c4b5664 fix: Brand Defaults filters
(cherry picked from commit 7da32c7db3)
2022-10-12 13:53:35 +00:00
Frappe PR Bot
36b9926527 chore(release): Bumped to Version 14.3.0
# [14.3.0](https://github.com/frappe/erpnext/compare/v14.2.3...v14.3.0) (2022-10-12)

### Bug Fixes

* consider outgoingrate while valuation rate calculate ([423c019](423c0190e2))
* consider sales rate as incoming rate for transit warehouse in purchase flow ([948b231](948b231e92))
* Do not add tax withheld vouchers post tax withheding in one document ([bd8e61b](bd8e61b2dc))
* Explicitly update modified (backport [#32519](https://github.com/frappe/erpnext/issues/32519)) ([#32575](https://github.com/frappe/erpnext/issues/32575)) ([154904e](154904e960))
* Hanlde rounding loss for internal transfer ([8eda2db](8eda2dbdf8))
* Incoming rate precision fixes for intra company transfer ([b653f43](b653f43b70))
* make readings status mandatory in Quality Inspection ([50d790c](50d790c919))
* minor cleanup ([236a5f3](236a5f37c7))
* more fields reordering related to Tab Break ([db4fbc9](db4fbc9e58))
* PO cancel post advance payment cancel against PO ([bda25c4](bda25c4d5d))
* removed unnecessary imports ([31782d6](31782d6f71))
* set Quality Inspection status based on readings status ([e25db8b](e25db8b1b5))
* single column indexes (backport [#32425](https://github.com/frappe/erpnext/issues/32425)) ([#32513](https://github.com/frappe/erpnext/issues/32513)) ([2f1b8af](2f1b8af13c))
* Tax withholding related fixes ([d5f6938](d5f693806b))
* test case ([0b26131](0b26131b65))
* **test:** `test_rejected_qi_validation` ([943e619](943e6192cc))
* TooManyWritesError during reposting of stock ([73742ff](73742ff565))
* unlink payment on invoice cancellation ([8ba503b](8ba503bf0e))
* use naming_series in budget ([0a24859](0a24859c9c))
* value error on pos submit ([4b65dd7](4b65dd7f2a))

### Features

* **JE:** trigger account field when fetched from template ([17dd1ab](17dd1abb34)), closes [#32409](https://github.com/frappe/erpnext/issues/32409)
* provision to return non consumed components against the work order ([d0f3818](d0f3818060))
* Tab Break in Material Request ([79151be](79151be8ce))
* Tab Break in Purchase Invoice ([89314d4](89314d4171))
* Tab Break in Purchase Order ([5a8329a](5a8329add1))
* Tab Break in Purchase Receipt ([b092791](b092791ac8))
* Tab Break in Quotation ([b0a9f79](b0a9f79e18))
* Tab Break in Sales Order, Delivery Note, Sales Invoice and Purchase Order ([31cd96b](31cd96bc89))
* Tab Break in Supplier Quotation ([22ad3ad](22ad3ad6f3))
2022-10-12 12:21:48 +00:00
Deepesh Garg
d38071eb20 Merge pull request #32560 from frappe/version-14-hotfix
chore: release v14
2022-10-12 17:50:12 +05:30
Deepesh Garg
c4b39c7c1c Merge branch 'version-14' into version-14-hotfix 2022-10-12 17:19:33 +05:30
Deepesh Garg
c83c645ab0 Merge pull request #32579 from frappe/mergify/bp/version-14-hotfix/pr-32563
fix: consider sales rate as incoming rate for transit warehouse in purchase flow (backport #32563)
2022-10-12 17:16:36 +05:30
Deepesh Garg
eab24b8366 Merge pull request #32582 from frappe/mergify/bp/version-14-hotfix/pr-32272
fix: Incoming rate precision fixes for intra company transfer (backport #32272)
2022-10-12 17:05:18 +05:30
rohitwaghchaure
31782d6f71 fix: removed unnecessary imports 2022-10-12 16:34:48 +05:30
Deepesh Garg
2494ccc0a2 chore: check only for inter-company transfers
(cherry picked from commit 9aa5e20ef7)
2022-10-12 10:54:33 +00:00
Deepesh Garg
108720b9c3 chore: fix precision condition
(cherry picked from commit 49601558c6)
2022-10-12 10:54:33 +00:00
Deepesh Garg
4f3e209009 chore: Use proper accounts
(cherry picked from commit 1c05c004cd)
2022-10-12 10:54:33 +00:00
Deepesh Garg
23b18a5e38 chore: Increase precision for other doc fields
(cherry picked from commit c8d2181498)
2022-10-12 10:54:33 +00:00
Deepesh Garg
b386b8c634 chore: GL Entries for SLE diff
(cherry picked from commit df2a0e265b)
2022-10-12 10:54:32 +00:00
Deepesh Garg
49221d47c2 test: Internal tranfer precision loss test
(cherry picked from commit dc20b21fb5)
2022-10-12 10:54:32 +00:00
Deepesh Garg
09e9675653 chore: Increase incoming_rate field precision to 6
(cherry picked from commit b31c3bd35d)
2022-10-12 10:54:32 +00:00
Deepesh Garg
8eda2dbdf8 fix: Hanlde rounding loss for internal transfer
(cherry picked from commit 6e47fd54a0)
2022-10-12 10:54:32 +00:00
Deepesh Garg
b653f43b70 fix: Incoming rate precision fixes for intra company transfer
(cherry picked from commit 083309c056)
2022-10-12 10:54:31 +00:00
Rohit Waghchaure
0b26131b65 fix: test case
(cherry picked from commit 98bf8e1304)
2022-10-12 10:51:00 +00:00
Rohit Waghchaure
423c0190e2 fix: consider outgoingrate while valuation rate calculate
(cherry picked from commit 3266e54e33)
2022-10-12 10:51:00 +00:00
Rohit Waghchaure
948b231e92 fix: consider sales rate as incoming rate for transit warehouse in purchase flow
(cherry picked from commit 683a47f7a1)
2022-10-12 10:50:59 +00:00
Deepesh Garg
23aca6663f Merge pull request #32565 from frappe/mergify/bp/version-14-hotfix/pr-32408
feat: Tab Breaks in all Sales and Purchase cycle transactions (backport #32408)
2022-10-12 14:13:38 +05:30
Deepesh Garg
6c85bdd735 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32408 2022-10-12 13:04:01 +05:30
mergify[bot]
154904e960 fix: Explicitly update modified (backport #32519) (#32575)
fix: Explicitly update modified (#32519)

* fix: Explicitly update modified

required after https://github.com/frappe/frappe/pull/18301

* chore: fix broken translations

(cherry picked from commit 8376fbc982)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-10-12 12:59:06 +05:30
mergify[bot]
03db8b2f5f ci: disable orchestrator (backport #32571) (#32572)
* ci: disable orchestrator (#32571)

(cherry picked from commit 6ce3ce758c)

* chore: correct build count

* chore: no cov

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-10-12 12:14:48 +05:30
Nabin Hait
236a5f37c7 fix: minor cleanup
(cherry picked from commit e71c417f7e)
2022-10-11 10:33:30 +00:00
Nabin Hait
db4fbc9e58 fix: more fields reordering related to Tab Break
(cherry picked from commit 5389a35798)
2022-10-11 10:33:30 +00:00
Nabin Hait
89314d4171 feat: Tab Break in Purchase Invoice
(cherry picked from commit aaf3c2b329)
2022-10-11 10:33:30 +00:00
Nabin Hait
b092791ac8 feat: Tab Break in Purchase Receipt
(cherry picked from commit 35f836c4b7)
2022-10-11 10:33:30 +00:00
Nabin Hait
22ad3ad6f3 feat: Tab Break in Supplier Quotation
(cherry picked from commit 3d9263bf86)
2022-10-11 10:33:29 +00:00
Nabin Hait
79151be8ce feat: Tab Break in Material Request
(cherry picked from commit 2172c5034a)
2022-10-11 10:33:29 +00:00
Nabin Hait
5a8329add1 feat: Tab Break in Purchase Order
(cherry picked from commit 10a25603ac)
2022-10-11 10:33:29 +00:00
Nabin Hait
b0a9f79e18 feat: Tab Break in Quotation
(cherry picked from commit 7546562139)
2022-10-11 10:33:28 +00:00
Nabin Hait
31cd96bc89 feat: Tab Break in Sales Order, Delivery Note, Sales Invoice and Purchase Order
(cherry picked from commit f6613e1e4c)
2022-10-11 10:33:27 +00:00
ruthra kumar
db563483cb Merge pull request #32558 from frappe/mergify/bp/version-14-hotfix/pr-32557
fix: Value error on validation of POS invoices with Serial Nos (backport #32557)
2022-10-11 15:36:36 +05:30
ruthra kumar
6fa1b892f7 test: value error on serial no validation on pos
(cherry picked from commit 9e2bd10d03)
2022-10-11 09:13:36 +00:00
ruthra kumar
4b65dd7f2a fix: value error on pos submit
(cherry picked from commit 4b908ebcd6)
2022-10-11 09:13:35 +00:00
Deepesh Garg
62296c85cd Merge pull request #32543 from frappe/mergify/bp/version-14-hotfix/pr-32497
chore: set `Quality Inspection` status based on readings status (backport #32497)
2022-10-11 14:02:58 +05:30
ruthra kumar
a71be4e99a Merge pull request #32550 from frappe/mergify/bp/version-14-hotfix/pr-32548
fix: allow deletion of cancelled Invoices once payments are unlinked (backport #32548)
2022-10-11 13:47:57 +05:30
Ankush Menat
c9002526b9 chore: update codeowners 2022-10-11 12:33:51 +05:30
Deepesh Garg
b9b08e4d5e Merge pull request #32555 from frappe/mergify/bp/version-14-hotfix/pr-32554
fix: use naming_series in budget (backport #32554)
2022-10-11 11:51:51 +05:30
Sagar Sharma
3c0bca3d74 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32497 2022-10-11 11:45:19 +05:30
Anand Baburajan
27509e2141 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32554 2022-10-11 11:06:44 +05:30
rohitwaghchaure
52dd967b0d Merge pull request #32542 from frappe/mergify/bp/version-14-hotfix/pr-32393
feat: provision to return non consumed components against the work order (backport #32393)
2022-10-11 10:39:18 +05:30
Deepesh Garg
9601e47ae4 Merge pull request #32540 from frappe/mergify/bp/version-14-hotfix/pr-32536
fix: PO cancel post advance payment cancel against PO (backport #32536)
2022-10-11 10:17:10 +05:30
anandbaburajan
0a24859c9c fix: use naming_series in budget
(cherry picked from commit e4d7d8c42d)
2022-10-11 04:46:10 +00:00
ruthra kumar
998367cedc test: update ple on payment unlink for SI's and SO's
(cherry picked from commit 143f905838)
2022-10-10 11:12:38 +00:00
ruthra kumar
8ba503bf0e fix: unlink payment on invoice cancellation
(cherry picked from commit 537d953f4c)
2022-10-10 11:12:38 +00:00
Sagar Sharma
943e6192cc fix(test): test_rejected_qi_validation
(cherry picked from commit 4992e4a2b8)
2022-10-10 05:20:45 +00:00
Sagar Sharma
91b0e7ddbd test: add test cases for Quality Inspection status
(cherry picked from commit fcc1272d42)
2022-10-10 05:20:45 +00:00
Sagar Sharma
e25db8b1b5 fix: set Quality Inspection status based on readings status
(cherry picked from commit 2657ece2cd)
2022-10-10 05:20:44 +00:00
Sagar Sharma
50d790c919 fix: make readings status mandatory in Quality Inspection
(cherry picked from commit d7c3b7633a)
2022-10-10 05:20:44 +00:00
Sagar Sharma
8a4c07a7e8 chore: add Manual Inspection field in Quality Inspection DocType
(cherry picked from commit 39707757a6)
2022-10-10 05:20:44 +00:00
Rohit Waghchaure
d0f3818060 feat: provision to return non consumed components against the work order
(cherry picked from commit d59ed24e6c)
2022-10-10 03:39:25 +00:00
Deepesh Garg
bda25c4d5d fix: PO cancel post advance payment cancel against PO
(cherry picked from commit d806e32030)
2022-10-09 13:06:06 +00:00
Frappe PR Bot
f70103dac6 chore(release): Bumped to Version 14.2.3
## [14.2.3](https://github.com/frappe/erpnext/compare/v14.2.2...v14.2.3) (2022-10-07)

### Bug Fixes

* Do not add tax withheld vouchers post tax withheding in one document ([6060072](6060072d22))
* Tax withholding related fixes ([a226fcf](a226fcf898))
2022-10-07 12:40:22 +00:00
Deepesh Garg
a519d68826 Merge pull request #32525 from frappe/mergify/bp/version-14/pr-32522
fix: Tax withholding related fixes (backport #32522)
2022-10-07 18:08:51 +05:30
Deepesh Garg
49cedca8de Merge pull request #32524 from frappe/mergify/bp/version-14-hotfix/pr-32522
fix: Tax withholding related fixes (backport #32522)
2022-10-07 18:08:39 +05:30
Deepesh Garg
6060072d22 fix: Do not add tax withheld vouchers post tax withheding in one document
(cherry picked from commit 781d160c68)
2022-10-07 12:03:29 +00:00
Deepesh Garg
a226fcf898 fix: Tax withholding related fixes
(cherry picked from commit abf5b6be3e)
2022-10-07 12:03:29 +00:00
Deepesh Garg
bd8e61b2dc fix: Do not add tax withheld vouchers post tax withheding in one document
(cherry picked from commit 781d160c68)
2022-10-07 11:03:40 +00:00
Deepesh Garg
d5f693806b fix: Tax withholding related fixes
(cherry picked from commit abf5b6be3e)
2022-10-07 11:03:40 +00:00
mergify[bot]
5f6bbd4929 chore: drop stale demo page (backport #32515) (#32516)
chore: drop stale demo page (#32515)

(cherry picked from commit 07c4a74838)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-10-06 13:03:29 +05:30
mergify[bot]
2f1b8af13c fix: single column indexes (backport #32425) (#32513)
fix: single column indexes (#32425)

refactor: move single column indexes to doctypes
(cherry picked from commit 8d1db0ea3d)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-10-06 11:37:43 +05:30
Deepesh Garg
3d6a37ea04 Merge pull request #32510 from frappe/mergify/bp/version-14-hotfix/pr-32385
chore: update fr translation (backport #32385)
2022-10-06 09:03:20 +05:30
HENRY Florian
3caf905019 chore: update fr translation (#32385)
(cherry picked from commit 0e4017cbe5)
2022-10-05 17:20:04 +00:00
Deepesh Garg
4941b6e280 Merge pull request #32501 from frappe/mergify/bp/version-14-hotfix/pr-32491
refactor: remove duplicate entries on remarks migration patch (backport #32491)
2022-10-05 18:16:51 +05:30
Deepesh Garg
a02ddc92ef Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32491 2022-10-05 17:30:25 +05:30
Deepesh Garg
6017f6790e Merge pull request #32503 from frappe/mergify/bp/version-14-hotfix/pr-32499
fix: TooManyWritesError during reposting of stock (backport #32499)
2022-10-05 17:29:56 +05:30
Deepesh Garg
3daff104c3 Merge pull request #32505 from frappe/mergify/bp/version-14-hotfix/pr-32478
feat(JE): trigger account field when fetched from template (backport #32478)
2022-10-05 17:28:49 +05:30
Dany Robert
17dd1abb34 feat(JE): trigger account field when fetched from template
Closes #32409

(cherry picked from commit c35adcf5a1)
2022-10-05 10:38:41 +00:00
Rohit Waghchaure
73742ff565 fix: TooManyWritesError during reposting of stock
(cherry picked from commit aaabba9b1e)
2022-10-05 10:36:18 +00:00
ruthra kumar
70e990c4f3 refactor: remove duplicate entries on remarks migration patch
(cherry picked from commit 518ab93e03)
2022-10-05 10:35:06 +00:00
Frappe PR Bot
217e407371 chore(release): Bumped to Version 14.2.2
## [14.2.2](https://github.com/frappe/erpnext/compare/v14.2.1...v14.2.2) (2022-10-04)

### Bug Fixes

* (bulk transaction) key error and better error logging (backport [#32445](https://github.com/frappe/erpnext/issues/32445)) ([#32463](https://github.com/frappe/erpnext/issues/32463)) ([7a80385](7a8038500d))
* add non-stock item filter for `fg_item` in PO ([11f9279](11f92797b9))
* add validation for non-stock item in SCR ([793fa18](793fa18225))
* asset requiring maintenance sold status and added test [v14-hotfix] ([c0a141b](c0a141bfcd))
* asset tests ([6710337](671033755f))
* calculate depreciation properly on asset sale entry and scrap entry ([f5f13c4](f5f13c4611))
* Create accounting dimension fields in asset capitalization ([9ec0d10](9ec0d104a5))
* Disbursement Account in patch to update old loans ([0973989](097398914e))
* don't allow to update `Maintain Stock` if the item has a `BOM` ([e5d1f59](e5d1f59d96))
* fetch swift_number in payment_request ([f09222a](f09222a9e5))
* fix restore asset value after depreciation ([8605245](86052450a5))
* fixes query builder order by issue in postgres (backport [#32441](https://github.com/frappe/erpnext/issues/32441)) ([#32465](https://github.com/frappe/erpnext/issues/32465)) ([8851826](8851826a57))
* Incorrect TCS amount deducted in Sales Invoice ([4d51d73](4d51d73797))
* Item details fetching on making transaction from item dashboard ([db60299](db60299cf3))
* not able to return sold expired batches ([9c56a5f](9c56a5ff7c))
* payment request make bank field Link instead of Read Only ([c8c0f34](c8c0f345d7))
* pick list picked-qty for batch item ([32107c4](32107c4a79))
* refactor asset capitilization ([bad3b33](bad3b330f4))
* searchfields as per customize form not working for Item ([f167abb](f167abbbfd))
* show `Make Purchase Invoice` button based on permission ([fd86876](fd86876a0e))
* supplied items added twice in Stock Entry ([d91ac5e](d91ac5e549))
* test_scrap_asset ([fd232d1](fd232d1db7))
* typo in sales_register's filter mode_of_payment (backport [#32371](https://github.com/frappe/erpnext/issues/32371)) ([#32446](https://github.com/frappe/erpnext/issues/32446)) ([1918b5c](1918b5c4b0))
* update with new Frappe color. fix [#32455](https://github.com/frappe/erpnext/issues/32455) ([#32456](https://github.com/frappe/erpnext/issues/32456)) ([3e7582f](3e7582f55b))

### Reverts

* Revert "fix: fetch swift_number in payment_request" ([d3c151f](d3c151f32b))
2022-10-04 12:13:08 +00:00
Deepesh Garg
90607becb8 Merge pull request #32493 from frappe/version-14-hotfix
chore: release v14
2022-10-04 17:41:32 +05:30
mergify[bot]
d6888bc8c8 refactor(UI): clean up portal pages (backport #29018) (#32489)
refactor(UI): clean up portal pages (#29018)

* refactor: list view for portal pages

* refactor: add align center class

* refactor: change footer btn class(primary)

* refactor: add order style page

* refactor: import order page in website

* refactor: remove table elements

* fix: preview image height

* fix: make string translatable

* refactor: change font variables

* refactor: order preview bg white

* refactor: center align items

* fix: breadcrumb padding

* refactor: make preview image rounded

* refactor: add condition for image container

* refactor: change alignment for mobile view

* fix: make footer button secondary

* refactor: clean code

* refactor: code indentantion

* refactor: remove space

* fix: Payment section cleanup

Co-authored-by: Summayya <frappe@Summayyas-MacBook-Air.local>
Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit da43a5e371)

Co-authored-by: Summayya Hashmani <58825865+sumaiya2908@users.noreply.github.com>
2022-10-04 10:21:50 +05:30
rohitwaghchaure
063f206b9b Merge pull request #32469 from frappe/mergify/bp/version-14-hotfix/pr-32466
fix: not able to return sold expired batches (backport #32466)
2022-10-04 07:34:09 +05:30
mergify[bot]
7a8038500d fix: (bulk transaction) key error and better error logging (backport #32445) (#32463)
fix: (bulk transaction) key error and better error logging (#32445)

* fix: (bulk transaction) key error and better error logging

* chore: pre-commit

* chore: linter - missing comma

(cherry picked from commit 91055151ce)

Co-authored-by: Dany Robert <danyrt@wahni.com>
2022-10-03 17:45:51 +05:30
mergify[bot]
8851826a57 fix: fixes query builder order by issue in postgres (backport #32441) (#32465)
fix: fixes query builder order by issue in postgres (#32441)

* fix: fixes query builder order by issue in postgres

* fix: linter

(cherry picked from commit 69efd2ee24)

Co-authored-by: Shridhar Patil <shridhar.p@zerodha.com>
2022-10-03 16:25:23 +05:30
Sagar Sharma
2a82f16680 Merge pull request #32473 from frappe/mergify/bp/version-14-hotfix/pr-32472
fix: pick list picked-qty for batch item (backport #32472)
2022-10-03 15:24:14 +05:30
Sagar Sharma
32107c4a79 fix: pick list picked-qty for batch item
(cherry picked from commit ba02209f1d)
2022-10-03 09:16:37 +00:00
Deepesh Garg
bbc7559380 Merge pull request #32468 from frappe/mergify/bp/version-14-hotfix/pr-32394
fix: fetch swift number in payment request from bank doctype (backport #32394)
2022-10-03 14:29:06 +05:30
Rohit Waghchaure
9c56a5ff7c fix: not able to return sold expired batches
(cherry picked from commit 0b1727cf79)
2022-10-03 07:45:46 +00:00
Maharshi Patel
c8c0f345d7 fix: payment request make bank field Link instead of Read Only
(cherry picked from commit dc8d49260c)
2022-10-03 07:26:38 +00:00
Maharshi Patel
d3c151f32b Revert "fix: fetch swift_number in payment_request"
This reverts commit f42a8e4e03.

(cherry picked from commit 9245d3b5cd)
2022-10-03 07:26:38 +00:00
Maharshi Patel
f09222a9e5 fix: fetch swift_number in payment_request
There isn't direct link between payment_request and bank so swift_number wasn't fetched using Fetch form. I fixed it by fetching swift_number on_change of bank_account.

(cherry picked from commit f42a8e4e03)
2022-10-03 07:26:38 +00:00
Deepesh Garg
ba80ba07f1 Merge pull request #32461 from frappe/mergify/bp/version-14-hotfix/pr-32456
fix: update with new Frappe color. fix #32455 (backport #32456)
2022-10-03 09:14:57 +05:30
Deepesh Garg
34845b7630 Merge pull request #32459 from frappe/mergify/bp/version-14-hotfix/pr-32454
fix: test_scrap_asset not working on end of month (backport #32454)
2022-10-03 09:04:01 +05:30
Deepesh Garg
ecfa64f22e Merge pull request #32460 from AnandBaburajan/fix_asset_sold_status_v14
fix: status of assets with maintenance_required changing back to 'Partially Depreciated' some time after being sold (backport #32405)
2022-10-03 08:58:40 +05:30
Muvuk
3e7582f55b fix: update with new Frappe color. fix #32455 (#32456)
* Update with new Frappe color.

* refactor: use css variables

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
(cherry picked from commit 73e5a7d671)
2022-10-02 17:02:02 +00:00
Anand Baburajan
6f571218bf Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32454 2022-10-02 19:14:00 +05:30
Anand Baburajan
8ab2f2f925 Merge branch 'version-14-hotfix' into fix_asset_sold_status_v14 2022-10-02 18:31:04 +05:30
Deepesh Garg
2d34761057 Merge pull request #32429 from frappe/mergify/bp/version-14-hotfix/pr-32420
patch: Create accounting dimension fields in asset capitalization (backport #32420)
2022-10-02 18:28:06 +05:30
anandbaburajan
c0a141bfcd fix: asset requiring maintenance sold status and added test [v14-hotfix] 2022-10-02 18:27:37 +05:30
anandbaburajan
fd232d1db7 fix: test_scrap_asset
(cherry picked from commit 47bd4be71b)
2022-10-02 12:15:55 +00:00
Deepesh Garg
df9147f2e5 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32420 2022-10-02 17:45:30 +05:30
Sagar Sharma
8e68219c5b Merge pull request #32440 from frappe/mergify/bp/version-14-hotfix/pr-32428
fix: don't allow to update `Maintain Stock` if the item has a `BOM` (backport #32428)
2022-10-02 12:07:28 +05:30
Sagar Sharma
060ce45572 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32428 2022-10-01 14:32:18 +05:30
Sagar Sharma
432da7d1d1 Merge pull request #32444 from frappe/mergify/bp/version-14-hotfix/pr-32439
fix: add non-stock item filter for `fg_item` in PO (backport #32439)
2022-10-01 14:32:02 +05:30
Sagar Sharma
9318d9a7fc Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32439 2022-10-01 14:31:49 +05:30
Deepesh Garg
faca06d6c3 Merge pull request #32433 from frappe/mergify/bp/version-14-hotfix/pr-32368
chore: remove discount accounting logic from PI and PI Item (backport #32368)
2022-10-01 12:05:10 +05:30
mergify[bot]
1918b5c4b0 fix: typo in sales_register's filter mode_of_payment (backport #32371) (#32446)
fix: typo in sales_register's filter mode_of_payment (#32371)
2022-10-01 12:04:16 +05:30
Deepesh Garg
444f3b5397 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32368 2022-10-01 11:10:03 +05:30
Deepesh Garg
3736f4ecb8 Merge pull request #32430 from frappe/mergify/bp/version-14-hotfix/pr-32402
fix: Item details fetching on making transaction from item dashboard (backport #32402)
2022-10-01 11:03:08 +05:30
Deepesh Garg
5fe2079dcc Merge pull request #32434 from frappe/mergify/bp/version-14-hotfix/pr-32412
fix: Incorrect TCS amount deducted in Sales Invoice (backport #32412)
2022-10-01 11:01:28 +05:30
Sagar Sharma
11f92797b9 fix: add non-stock item filter for fg_item in PO
(cherry picked from commit f95ed7dca2)
2022-09-30 18:29:54 +00:00
Sagar Sharma
17996efbc7 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32428 2022-09-30 23:57:49 +05:30
Sagar Sharma
c2bed24c31 Merge pull request #32438 from frappe/mergify/bp/version-14-hotfix/pr-32436
fix: add validation for non-stock item in SCR (backport #32436)
2022-09-30 23:57:30 +05:30
Sagar Sharma
e5d1f59d96 fix: don't allow to update Maintain Stock if the item has a BOM
(cherry picked from commit 6d0842465b)
2022-09-30 13:39:11 +00:00
Sagar Sharma
793fa18225 fix: add validation for non-stock item in SCR
(cherry picked from commit fa2290657a)
2022-09-30 11:23:50 +00:00
Deepesh Garg
f7ec00ef49 chore: Remove print statements
(cherry picked from commit bff3cd9068)
2022-09-30 10:35:58 +00:00
Deepesh Garg
4d51d73797 fix: Incorrect TCS amount deducted in Sales Invoice
(cherry picked from commit 08443c6421)
2022-09-30 10:35:57 +00:00
ruthra kumar
7a096231fb chore: clean up purchase invoice and purchase invoice item
1. remove discount accounting related fields from purchase invoice and
purchase invoice item
2. clean buying settings doctype

(cherry picked from commit 21095502b9)
2022-09-30 10:29:17 +00:00
Deepesh Garg
db60299cf3 fix: Item details fetching on making transaction from item dashboard
(cherry picked from commit 0439e41a44)
2022-09-30 10:27:15 +00:00
Nabin Hait
9ec0d104a5 fix: Create accounting dimension fields in asset capitalization
(cherry picked from commit fe891aa488)
2022-09-30 10:26:33 +00:00
Sagar Sharma
7243089027 Merge pull request #32418 from frappe/mergify/bp/version-14-hotfix/pr-32404
fix(ux): show `Make Purchase Invoice` button based on permission (backport #32404)
2022-09-29 17:16:25 +05:30
rohitwaghchaure
5aa9c4fd07 Merge pull request #32417 from frappe/mergify/bp/version-14-hotfix/pr-32414
fix: searchfields as per customize form not working for Item (backport #32414)
2022-09-29 15:45:10 +05:30
Sagar Sharma
fd86876a0e fix: show Make Purchase Invoice button based on permission
(cherry picked from commit 80080a3d7b)
2022-09-29 09:26:36 +00:00
Rohit Waghchaure
3f0a3b702d test: added test case
(cherry picked from commit 3656f7d06f)
2022-09-29 09:22:44 +00:00
Rohit Waghchaure
f167abbbfd fix: searchfields as per customize form not working for Item
(cherry picked from commit fd889fd29a)
2022-09-29 09:22:44 +00:00
Nabin Hait
5015f38a8d Merge pull request #32398 from frappe/mergify/bp/version-14-hotfix/pr-32226
fix: calculate depreciation properly on asset sale entry and scrap entry (backport #32226)
2022-09-29 12:34:42 +05:30
anandbaburajan
381231257b chore: fix merge conflicts 2022-09-29 11:59:53 +05:30
Anand Baburajan
f4648ed610 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32226 2022-09-28 22:24:03 +05:30
Sagar Sharma
51fcb3c666 Merge pull request #32407 from frappe/mergify/bp/version-14-hotfix/pr-32406
fix: supplied items added twice in Stock Entry (backport #32406)
2022-09-28 21:44:59 +05:30
Sagar Sharma
7b11da2373 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32406 2022-09-28 21:44:50 +05:30
Deepesh Garg
5c0446d9fc Merge pull request #32411 from frappe/mergify/bp/version-14-hotfix/pr-32403
fix: Disbursement Account in patch to update old loans (backport #32403)
2022-09-28 20:14:01 +05:30
Deepesh Garg
097398914e fix: Disbursement Account in patch to update old loans
(cherry picked from commit be623ce8e8)
2022-09-28 14:07:00 +00:00
Sagar Sharma
d91ac5e549 fix: supplied items added twice in Stock Entry
(cherry picked from commit ac7409bbf3)
2022-09-28 12:20:55 +00:00
Frappe PR Bot
9c915ceeb2 chore(release): Bumped to Version 14.2.1
## [14.2.1](https://github.com/frappe/erpnext/compare/v14.2.0...v14.2.1) (2022-09-28)

### Bug Fixes

* `For Quantity` error msg in `Stock Entry` ([4b6e1f4](4b6e1f4892))
* Add return against indexes for POS Invoice ([3abe4a1](3abe4a16af))
* Add return against indexes for POS Invoice ([32ad36a](32ad36ad0f))
* Add strings to translate function ([2eeff8a](2eeff8a00b))
* add translate function to strings ([f5a3f8b](f5a3f8b486))
* add translate function to strings ([e464de3](e464de3c5d))
* allow to return expired batches using purchase return ([305eb02](305eb02bfc))
* consider overproduction percentage for WO finish button ([4a29c7f](4a29c7fafb))
* difference amount calculation on payment reconciliation ([b389740](b3897406b0))
* get amount in words for debit note ([7554ac9](7554ac9569))
* item_code key error in production plan ([4e31448](4e31448e3d))
* Move subscription process to hourly long quque ([b2f280d](b2f280dee6))
* opening entry causing discepancy between stock and trial balance ([2fd0291](2fd0291afb))
* POS only validate QTY if is_stock_item ([29c4a32](29c4a32c33))
* POS properly validate stock for bundle products ([6b55a01](6b55a01834))
* Reduce font size for Process Statement of accounts print/pdf ([bcfa9b8](bcfa9b8593))
* report chart field type ([931aa62](931aa62072))
* Scrap Asset Accounting Dimensions (backport [#31949](https://github.com/frappe/erpnext/issues/31949)) ([#32376](https://github.com/frappe/erpnext/issues/32376)) ([a28ae4d](a28ae4d653))
* total value in all keys ([24234d5](24234d584d))
* typo on opportunity summary by sales stage report ([a403e72](a403e729d6))
2022-09-28 09:49:04 +00:00
Deepesh Garg
4b8dd1fab6 Merge pull request #32375 from frappe/version-14-hotfix
chore: release v14
2022-09-28 15:17:26 +05:30
Deepesh Garg
fc581464b8 Merge pull request #32396 from frappe/mergify/bp/version-14-hotfix/pr-32379
fix: POS only validate QTY if is_stock_item (backport #32379)
2022-09-28 14:47:41 +05:30
anandbaburajan
b3b7650ac8 chore: add blank lines
(cherry picked from commit c6a7de0e54)

# Conflicts:
#	erpnext/assets/doctype/asset/depreciation.py
2022-09-28 08:59:43 +00:00
anandbaburajan
86052450a5 fix: fix restore asset value after depreciation
(cherry picked from commit 43a3400221)
2022-09-28 08:59:42 +00:00
anandbaburajan
bad3b330f4 fix: refactor asset capitilization
(cherry picked from commit 5a8b28c194)
2022-09-28 08:59:42 +00:00
anandbaburajan
671033755f fix: asset tests
(cherry picked from commit 11ac20e5ee)
2022-09-28 08:59:41 +00:00
anandbaburajan
f5f13c4611 fix: calculate depreciation properly on asset sale entry and scrap entry
(cherry picked from commit ff5cad1cd6)

# Conflicts:
#	erpnext/assets/doctype/asset/depreciation.py
2022-09-28 08:59:41 +00:00
Maharshi Patel
6b55a01834 fix: POS properly validate stock for bundle products
Stock availability was not calculated properly for Product Bundle with non stock item so i have added logic to properly calculate that as well.

(cherry picked from commit e392ea1104)
2022-09-28 08:16:23 +00:00
Maharshi Patel
29c4a32c33 fix: POS only validate QTY if is_stock_item
POS invoice raised " Item not available " validation error even though item is non_stock.

(cherry picked from commit e39e088f18)
2022-09-28 08:16:22 +00:00
Deepesh Garg
c9c203a5eb Merge pull request #32383 from frappe/mergify/bp/version-14-hotfix/pr-32378
fix: Add return against indexes for POS Invoice (backport #32378)
2022-09-28 10:54:44 +05:30
Deepesh Garg
261aac8e26 Merge pull request #32387 from frappe/mergify/bp/version-14-hotfix/pr-32382
fix: Move subscription process to hourly long queue (backport #32382)
2022-09-28 08:09:26 +05:30
Deepesh Garg
b2f280dee6 fix: Move subscription process to hourly long quque
(cherry picked from commit 82a2f31ada)
2022-09-27 18:09:50 +00:00
Deepesh Garg
3abe4a16af fix: Add return against indexes for POS Invoice
(cherry picked from commit cbfe28286a)
2022-09-27 16:52:39 +00:00
Deepesh Garg
32ad36ad0f fix: Add return against indexes for POS Invoice
(cherry picked from commit 1f6205e1ea)
2022-09-27 16:52:38 +00:00
Sagar Sharma
e98c0ab924 Merge pull request #32380 from frappe/mergify/bp/version-14-hotfix/pr-32377
fix: consider overproduction percentage for WO finish button (backport #32377)
2022-09-27 20:18:25 +05:30
Sagar Sharma
4a29c7fafb fix: consider overproduction percentage for WO finish button
(cherry picked from commit 05392e0918)
2022-09-27 12:15:20 +00:00
Sagar Sharma
4b6e1f4892 fix: For Quantity error msg in Stock Entry
(cherry picked from commit 9049db41ae)
2022-09-27 12:15:19 +00:00
mergify[bot]
a28ae4d653 fix: Scrap Asset Accounting Dimensions (backport #31949) (#32376)
fix: Scrap Asset Accounting Dimensions (#31949)

* fix: Scrap Asset Accounting Dimensions

(cherry picked from commit c760ca2323)

Co-authored-by: Maharshi Patel <39730881+maharshivpatel@users.noreply.github.com>
2022-09-27 17:07:38 +05:30
rohitwaghchaure
11be30d68e Merge pull request #32372 from frappe/mergify/bp/version-14-hotfix/pr-32370
fix: Not allowing to return expired batches using purchase return (backport #32370)
2022-09-27 14:58:51 +05:30
Rohit Waghchaure
305eb02bfc fix: allow to return expired batches using purchase return
(cherry picked from commit a4a86ee23f)
2022-09-27 08:51:01 +00:00
rohitwaghchaure
1184fa3313 Merge pull request #32365 from frappe/mergify/bp/version-14-hotfix/pr-32339
fix: opening entry causing discrepancy between stock and trial balance (backport #32339)
2022-09-27 10:56:04 +05:30
Rohit Waghchaure
2fd0291afb fix: opening entry causing discepancy between stock and trial balance
(cherry picked from commit bc3ab45af2)
2022-09-26 15:03:25 +00:00
rohitwaghchaure
959fdcd841 Merge pull request #32364 from frappe/mergify/bp/version-14-hotfix/pr-32049
Allow Item Templates in Work Order Items (backport #32049)
2022-09-26 20:33:21 +05:30
Dhananjay Palshikar
a83e36b801 Allow Item Templates in Work Order Items
Item Variants can be a part of the items tables, however, when BOM items are fetched to be a part of the Work Order items, item variants were being filtered out.
The filtering out does not serve a purpose. Having Item variants in BOMs allows for template like behaviour.

(cherry picked from commit 75396c02d2)
2022-09-26 14:58:05 +00:00
rohitwaghchaure
37d0721f36 Merge pull request #32359 from frappe/mergify/bp/version-14-hotfix/pr-32347
refactor: rewrite `Incorrect Stock Value Report` queries in `QB` (backport #32347)
2022-09-26 20:24:58 +05:30
Deepesh Garg
408f2bda82 Merge pull request #32361 from frappe/mergify/bp/version-14-hotfix/pr-32146
fix: report chart fieldtype (backport #32146)
2022-09-26 18:36:33 +05:30
Deepesh Garg
ddf4d02c7d Merge pull request #32356 from frappe/mergify/bp/version-14-hotfix/pr-32276
fix: add some strings to translate function (backport #32276)
2022-09-26 18:33:32 +05:30
Sagar Sharma
2f5276b794 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32347 2022-09-26 18:18:29 +05:30
Sagar Sharma
e708a33684 Merge pull request #32357 from frappe/mergify/bp/version-14-hotfix/pr-32346
refactor: rewrite `Item Price Stock Report` queries in `QB` (backport #32346)
2022-09-26 18:18:12 +05:30
hendrik
931aa62072 fix: report chart field type
* fix: report chart field type

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit f41d1500b0)
2022-09-26 12:18:17 +00:00
Sagar Sharma
8c6ddb6721 refactor: rewrite Incorrect Stock Value Report queries in QB
(cherry picked from commit b93331e844)
2022-09-26 11:40:00 +00:00
Sagar Sharma
f1d774034c refactor: rewrite Item Price Stock Report queries in QB
(cherry picked from commit 22299d2382)
2022-09-26 11:39:04 +00:00
Deepesh Garg
4a1de87822 Merge pull request #32354 from frappe/mergify/bp/version-14-hotfix/pr-32336
fix: typo on opportunity summary by sales stage report (backport #32336)
2022-09-26 16:58:58 +05:30
Ernesto Ruiz
f5a3f8b486 fix: add translate function to strings
(cherry picked from commit 94199b7867)
2022-09-26 11:09:49 +00:00
Ernesto Ruiz
e464de3c5d fix: add translate function to strings
(cherry picked from commit aa49ec815a)
2022-09-26 11:09:48 +00:00
Ernesto Ruiz
2eeff8a00b fix: Add strings to translate function
(cherry picked from commit 9decebe6e1)
2022-09-26 11:09:48 +00:00
Ernesto Ruiz
a403e729d6 fix: typo on opportunity summary by sales stage report
(cherry picked from commit c4919cf5ec)
2022-09-26 11:08:18 +00:00
ruthra kumar
1c32bf23d7 Merge pull request #32351 from frappe/mergify/bp/version-14-hotfix/pr-32310
fix: total value in all keys (backport #32310)
2022-09-26 12:05:20 +05:30
Ankush Menat
e599b61ac5 chore: drop 1 runner from stable branch 2022-09-26 11:37:14 +05:30
nishibakabeer
24234d584d fix: total value in all keys
Gross and net profit report showing wrong values in monthly quarterly and half yearly filters which is the total value
@ruthra-kumar added in develop branch as suggested ( https://github.com/frappe/erpnext/pull/32020)

(cherry picked from commit 6919f389aa)
2022-09-26 06:03:33 +00:00
ruthra kumar
a69881e8e5 Merge pull request #32349 from frappe/mergify/bp/version-14-hotfix/pr-32303
fix: difference amount calculation and popup on payment reconciliation (backport #32303)
2022-09-26 11:15:43 +05:30
ruthra kumar
b3897406b0 fix: difference amount calculation on payment reconciliation
(cherry picked from commit 122d5f2729)
2022-09-26 04:57:57 +00:00
Deepesh Garg
0136d58d59 Merge pull request #32334 from frappe/mergify/bp/version-14-hotfix/pr-32117
fix: Reduce font size for Process Statement of accounts print/pdf (backport #32117)
2022-09-25 17:21:10 +05:30
Sagar Sharma
3a74ac9194 Merge pull request #32337 from frappe/mergify/bp/version-14-hotfix/pr-32324
refactor: rewrite `Production Planning Report` queries in `QB` (backport #32324)
2022-09-23 10:37:54 +05:30
Sagar Sharma
21a4556f99 refactor: rewrite Production Planning Report queries in QB
(cherry picked from commit 8417b9b99c)
2022-09-23 04:20:22 +00:00
Deepesh Garg
bcfa9b8593 fix: Reduce font size for Process Statement of accounts print/pdf
(cherry picked from commit 6bfd193b0d)
2022-09-22 19:39:17 +00:00
Sagar Sharma
f2dd547451 Merge pull request #32327 from s-aga-r/backport/v14-h/32309
fix: item_code key error in production plan (backport #32309)
2022-09-22 18:32:21 +05:30
Rohit Waghchaure
4e31448e3d fix: item_code key error in production plan 2022-09-22 18:07:20 +05:30
Sagar Sharma
d5d31060c4 Merge pull request #32317 from s-aga-r/backport/v14-h/32304
refactor: rewrite `Exponential Smoothing Forecasting` queries in `QB` (backport #32304)
2022-09-22 01:32:10 +05:30
Sagar Sharma
f5c517d08d refactor: rewrite Exponential Smoothing Forecasting queries in QB 2022-09-21 21:31:37 +05:30
Deepesh Garg
8d5131ef8f Merge pull request #32300 from frappe/mergify/bp/version-14-hotfix/pr-32296
fix: get amount in words for debit note (backport #32296)
2022-09-21 13:07:25 +05:30
Sagar Sharma
0e7c0144cb Merge pull request #32306 from s-aga-r/backport/14/refactor/report/exponential-smoothing-forecasting
refactor: rewrite `BOM Variance Report` queries in `QB` (backport #32297)
2022-09-21 11:51:22 +05:30
Sagar Sharma
d54bf6d91c refactor: rewrite BOM Variance Report queries in QB 2022-09-21 11:16:45 +05:30
Frappe PR Bot
c50d6c5e74 chore(release): Bumped to Version 14.2.0
# [14.2.0](https://github.com/frappe/erpnext/compare/v14.1.2...v14.2.0) (2022-09-20)

### Bug Fixes

* `po_detail` or `sco_rm_detail` not getting set while while mapping SE ([ff210c7](ff210c73eb))
* `sco_rm_detail` in Stock Entry ([a15f0d4](a15f0d427c))
* abbreviation issue on renaming cost center ([f752822](f752822bb3))
* Add child table for tax withheld vouchers ([e807662](e8076629fa))
* always set default expense account in company ([3b79e24](3b79e24c7e))
* **Asset Capitalization:** Hide source items section if table is empty ([003cfe2](003cfe2717))
* **Asset Capitalization:** Reverse depreciation on cancel ([85d1a23](85d1a237ce))
* **Asset Capitalization:** update code for changes in depreciation logic ([dc3c27f](dc3c27fd1b))
* **Asset Capitalization:** validation edge cases ([c311b8e](c311b8ea4f))
* **Asset Captalization:** run_serially on posting_date changed ([132b517](132b517584))
* **Asset:** On Depreciation reversal, remove Journal Entry reference ([e832944](e832944dfe))
* consider posting time for internal transfer PO ([f370c7b](f370c7b50b))
* correct sql output format in CRM patch (backport [#32213](https://github.com/frappe/erpnext/issues/32213)) ([#32215](https://github.com/frappe/erpnext/issues/32215)) ([64aad88](64aad88684))
* create dunning from sales invoice ([17ea6cc](17ea6cc5a5))
* Depreciation posting date only when calculate depreciation is checked ([4939153](4939153f8c))
* disable cwip in asset repair tests ([5cab0aa](5cab0aa1d7))
* fetch description only if empty on the payment schedule ([8876631](887663129e))
* Fetch vouchers to show in Invoice ([f759c29](f759c29d55))
* incorrect gl if tax on multi currency payment entry ([dcfc11d](dcfc11df7a))
* make `po_detail` or `sco_rm_detail` mandatory for SE `Send to Subcontractor` ([908944b](908944b68b))
* merge conflict ([cd613c6](cd613c6033))
* No permission to read doctype ([442f54a](442f54a988))
* Parent Level project linkning on creating PO from project ([cbaffb4](cbaffb4858))
* pending accrual entries ([b9a2499](b9a249918a))
* production plan pending-qty ([5f3caf6](5f3caf6975))
* remove no_copy for ignore_pricing_rule ([c000319](c0003195b8))
* suggestion threshold label and rule was not working for other items with min and max amount ([436b7e3](436b7e3b70))
* TDS deduction via journal entry ([eba46da](eba46dae6c))
* test cases ([f126e88](f126e88e5e))
* test cases ([153ef5f](153ef5f164))
* unknown column error while updating value of maintain-stock in item master ([38488c1](38488c13e6))
* use default supplier currency if default supplier is enabled ([c98413c](c98413c981))
* warehouse filter in `BOM Stock Calculated Report` ([ed9a896](ed9a896f72))

### Features

* Asset Capitalization ([38c3107](38c31077c9))
* Asset Capitalization Form ([6c74896](6c748966e7))
* **Asset Capitalization:** Accounting Fields ([702b5c3](702b5c32c1))
* **Asset Capitalization:** Finance Book field in Asset Row ([3b9bc8e](3b9bc8e4ef))
* **Asset Capitalization:** Submission and Cancellation ([7a5d75b](7a5d75b68d))
2022-09-20 18:31:07 +00:00
Deepesh Garg
08daa237f2 Merge pull request #32292 from frappe/version-14-hotfix
chore: release v14
2022-09-20 23:59:35 +05:30
Sagar Sharma
85cda4a995 Merge pull request #32301 from frappe/mergify/bp/version-14-hotfix/pr-32295
refactor: rewrite `BOM Stock Report` queries in `QB` (backport #32295)
2022-09-20 23:09:25 +05:30
Sagar Sharma
ed9a896f72 fix: warehouse filter in BOM Stock Calculated Report
(cherry picked from commit 390ce5719d)
2022-09-20 17:37:19 +00:00
Sagar Sharma
181dccd8d8 refactor: rewrite BOM Stock Report queries in QB
(cherry picked from commit 8fd7c04920)
2022-09-20 17:37:18 +00:00
ruthra kumar
7554ac9569 fix: get amount in words for debit note
(cherry picked from commit 70f6484d9d)
2022-09-20 12:44:03 +00:00
Deepesh Garg
fcd46aa243 Merge pull request #32294 from frappe/mergify/bp/version-14-hotfix/pr-32284
fix: remove no_copy for ignore_pricing_rule (backport #32284)
2022-09-20 17:16:12 +05:30
Deepesh Garg
d62b983057 chore: Resolve conflicts 2022-09-20 16:45:23 +05:30
Deepesh Garg
b0131a8a80 Merge pull request #32288 from frappe/mergify/bp/version-14-hotfix/pr-32204
fix(UX): More predictable tax withholding application in invoices (backport #32204)
2022-09-20 16:38:44 +05:30
Maharshi Patel
c0003195b8 fix: remove no_copy for ignore_pricing_rule
(cherry picked from commit 8c5b420aea)
2022-09-20 10:50:22 +00:00
Deepesh Garg
957fc440fd Merge pull request #32290 from frappe/mergify/bp/version-14-hotfix/pr-32264
fix: Depreciation posting date only when calculate depreciation is checked (backport #32264)
2022-09-20 15:00:19 +05:30
Deepesh Garg
4939153f8c fix: Depreciation posting date only when calculate depreciation is checked
(cherry picked from commit fac82cf69b)
2022-09-20 09:18:22 +00:00
Deepesh Garg
302f2d10e2 chore: fix tests
(cherry picked from commit 9aa1f84d45)
2022-09-20 09:06:40 +00:00
Deepesh Garg
eba46dae6c fix: TDS deduction via journal entry
(cherry picked from commit 36d0906ea2)
2022-09-20 09:06:40 +00:00
Deepesh Garg
27fdd41a6e test: Add tests
(cherry picked from commit b6184ce471)
2022-09-20 09:06:40 +00:00
Deepesh Garg
f759c29d55 fix: Fetch vouchers to show in Invoice
(cherry picked from commit 3fb1595a4e)
2022-09-20 09:06:40 +00:00
Deepesh Garg
e8076629fa fix: Add child table for tax withheld vouchers
(cherry picked from commit 246c1a9380)
2022-09-20 09:06:39 +00:00
Sagar Sharma
77678ecfeb Merge pull request #32285 from frappe/mergify/bp/version-14-hotfix/pr-32280
refactor: rewrite `Item Shortage Report` queries in QB (backport #32280)
2022-09-20 11:43:55 +05:30
Sagar Sharma
273ed40cfb test: add test cases for Item Shortage Report
(cherry picked from commit 3dc754cac2)
2022-09-20 05:45:04 +00:00
Sagar Sharma
a56b5ed8e5 refactor: rewrite Item Shortage Report queries in QB
(cherry picked from commit f0a78aa559)
2022-09-20 05:45:03 +00:00
ruthra kumar
d7d75be0d7 Merge pull request #32283 from frappe/mergify/bp/version-14-hotfix/pr-32217
fix: incorrect gl if tax on multi currency payment entry (backport #32217)
2022-09-20 11:10:25 +05:30
ruthra kumar
5ba5b7bf51 test: gl entries of payments with advance tax
(cherry picked from commit 5bd5dd7262)
2022-09-20 04:31:10 +00:00
ruthra kumar
dcfc11df7a fix: incorrect gl if tax on multi currency payment entry
(cherry picked from commit f0ae77b23b)
2022-09-20 04:31:10 +00:00
Deepesh Garg
f14b577766 Merge pull request #32278 from frappe/mergify/bp/version-14-hotfix/pr-32235
fix: fetch description only if empty on the payment schedule (backport #32235)
2022-09-20 09:54:17 +05:30
Maharshi Patel
887663129e fix: fetch description only if empty on the payment schedule
added fetch_if_empty on description field of payment_schedule.

(cherry picked from commit f4b64686ae)
2022-09-20 03:44:29 +00:00
Sagar Sharma
327256a516 Merge pull request #32275 from frappe/mergify/bp/version-14-hotfix/pr-32274
fix: `po_detail` or `sco_rm_detail` not getting set while while mapping SE (backport #32274)
2022-09-19 19:46:43 +05:30
Sagar Sharma
ff210c73eb fix: po_detail or sco_rm_detail not getting set while while mapping SE
(cherry picked from commit 3a9c08e7c9)
2022-09-19 13:49:43 +00:00
ruthra kumar
a85dd86832 Merge pull request #32270 from frappe/mergify/bp/version-14-hotfix/pr-32251
fix: use default supplier currency if default supplier is enabled (backport #32251)
2022-09-19 14:04:16 +05:30
ruthra kumar
c98413c981 fix: use default supplier currency if default supplier is enabled
(cherry picked from commit 77fdc37cb7)
2022-09-19 07:33:18 +00:00
Deepesh Garg
198d19b920 Merge pull request #32246 from frappe/mergify/bp/version-14-hotfix/pr-32238
fix: suggestion threshold label and rule was not working for other item with min and max amount (backport #32238)
2022-09-19 10:10:55 +05:30
Deepesh Garg
5a2e286de6 Merge pull request #32255 from frappe/mergify/bp/version-14-hotfix/pr-32244
fix: Parent Level project linkning on creating PO from project (backport #32244)
2022-09-18 19:41:45 +05:30
Sagar Sharma
24ccebc633 Merge pull request #32260 from frappe/mergify/bp/version-14-hotfix/pr-32250
fix: make `po_detail` or `sco_rm_detail` mandatory for SE Send to Subcontractor (backport #32250)
2022-09-18 15:58:48 +05:30
Sagar Sharma
908944b68b fix: make po_detail or sco_rm_detail mandatory for SE Send to Subcontractor
(cherry picked from commit b90875575c)
2022-09-18 09:24:48 +00:00
Deepesh Garg
cbaffb4858 fix: Parent Level project linkning on creating PO from project
(cherry picked from commit 93e134aab0)
2022-09-17 15:00:33 +00:00
Sagar Sharma
7dcb8bb674 Merge pull request #32248 from frappe/mergify/bp/version-14-hotfix/pr-32247
fix: add SCO supplied item reference while mapping the Stock Entry (backport #32247)
2022-09-17 16:09:15 +05:30
Sagar Sharma
a15f0d427c fix: sco_rm_detail in Stock Entry
(cherry picked from commit 2f97370b8e)
2022-09-17 10:12:48 +00:00
Rohit Waghchaure
436b7e3b70 fix: suggestion threshold label and rule was not working for other items with min and max amount
(cherry picked from commit f5bd3fa952)
2022-09-17 06:42:22 +00:00
Sagar Sharma
075d456417 Merge pull request #32240 from frappe/mergify/bp/version-14-hotfix/pr-32236
fix: production plan pending-qty (backport #32236)
2022-09-16 21:31:57 +05:30
Sagar Sharma
ff78906361 test: update test case for production plan pending-qty
(cherry picked from commit bd6af7c613)
2022-09-16 13:00:32 +00:00
Sagar Sharma
5f3caf6975 fix: production plan pending-qty
(cherry picked from commit 5be7d42dfd)
2022-09-16 13:00:31 +00:00
Sagar Sharma
5c09b28d62 Merge pull request #32234 from frappe/mergify/bp/version-14-hotfix/pr-32233
refactor: rewrite Production Plan queries in QB (backport #32233)
2022-09-16 13:57:26 +05:30
Sagar Sharma
b700a0be1f refactor: rewrite Production Plan queries in QB
(cherry picked from commit b8cf3b4c77)
2022-09-16 08:00:08 +00:00
Nabin Hait
cceadcec33 Merge pull request #32231 from frappe/mergify/bp/version-14-hotfix/pr-32225
fix: create dunning from sales invoice (backport #32225)
2022-09-16 13:06:45 +05:30
Nabin Hait
22372e69eb Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-32225 2022-09-16 12:17:14 +05:30
Nabin Hait
88c446b0bf Merge pull request #32232 from nabinhait/asset-repair-test-fix1
fix: disable cwip in asset repair tests
2022-09-16 12:17:01 +05:30
Nabin Hait
5cab0aa1d7 fix: disable cwip in asset repair tests 2022-09-16 11:44:25 +05:30
Nabin Hait
569b4c256a Merge pull request #32230 from frappe/mergify/bp/version-14-hotfix/pr-32219
fix: No permission to read doctype (backport #32219)
2022-09-16 11:37:09 +05:30
Nabin Hait
17ea6cc5a5 fix: create dunning from sales invoice
(cherry picked from commit 29db084dc3)
2022-09-16 05:35:51 +00:00
Nabin Hait
442f54a988 fix: No permission to read doctype
(cherry picked from commit c0da948a4e)
2022-09-16 05:35:29 +00:00
Deepesh Garg
c07e61953a Merge pull request #32228 from frappe/mergify/bp/version-14-hotfix/pr-32222
fix: abbreviation issue on renaming cost center (backport #32222)
2022-09-16 11:03:14 +05:30
Nabin Hait
2102b83bd9 Merge pull request #32229 from frappe/mergify/bp/version-14-hotfix/pr-32221
fix: consider posting time for internal transfer PO (backport #32221)
2022-09-16 09:39:33 +05:30
Rohit Waghchaure
f370c7b50b fix: consider posting time for internal transfer PO
(cherry picked from commit cb763938dc)
2022-09-16 04:08:04 +00:00
Nabin Hait
f752822bb3 fix: abbreviation issue on renaming cost center
(cherry picked from commit af21a11e1e)
2022-09-16 04:07:44 +00:00
Nabin Hait
af5fb78fe2 Merge pull request #32201 from nabinhait/SaiFi0102-asset-capitalization-v14
feat: Asset Capitalization
2022-09-16 09:34:52 +05:30
Sagar Sharma
85cf30cfa8 Merge branch 'version-14-hotfix' into SaiFi0102-asset-capitalization-v14 2022-09-15 08:17:37 +05:30
Frappe PR Bot
14e5f239ac chore(release): Bumped to Version 14.1.2
## [14.1.2](https://github.com/frappe/erpnext/compare/v14.1.1...v14.1.2) (2022-09-14)

### Bug Fixes

* correct sql output format in CRM patch (backport [#32213](https://github.com/frappe/erpnext/issues/32213)) ([#32214](https://github.com/frappe/erpnext/issues/32214)) ([fed2353](fed23536dc))
2022-09-14 13:52:36 +00:00
mergify[bot]
64aad88684 fix: correct sql output format in CRM patch (backport #32213) (#32215)
fix: correct sql output format in CRM patch (#32213)

(cherry picked from commit 97977cdb4b)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-09-14 19:21:40 +05:30
mergify[bot]
fed23536dc fix: correct sql output format in CRM patch (backport #32213) (#32214)
fix: correct sql output format in CRM patch (#32213)

(cherry picked from commit 97977cdb4b)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-09-14 19:21:04 +05:30
Nabin Hait
f126e88e5e fix: test cases 2022-09-14 18:31:15 +05:30
Nabin Hait
3f8c701083 Merge branch 'SaiFi0102-asset-capitalization-v14' of https://github.com/nabinhait/erpnext into SaiFi0102-asset-capitalization-v14 2022-09-14 17:21:57 +05:30
Nabin Hait
153ef5f164 fix: test cases 2022-09-14 17:20:19 +05:30
Deepesh Garg
cbdc46b89e Merge pull request #32210 from frappe/mergify/bp/version-14-hotfix/pr-32208
fix: Loans pending accrual entries (backport #32208)
2022-09-14 15:34:22 +05:30
Abhinav Raut
b9a249918a fix: pending accrual entries
(cherry picked from commit f2209045f8)
2022-09-14 08:45:47 +00:00
Nabin Hait
fb99d3f1b9 Merge branch 'version-14-hotfix' into SaiFi0102-asset-capitalization-v14 2022-09-14 12:56:47 +05:30
Nabin Hait
3b79e24c7e fix: always set default expense account in company 2022-09-14 12:55:49 +05:30
Sagar Sharma
97b462538a Merge pull request #32206 from frappe/mergify/bp/version-14-hotfix/pr-32205
fix: unknown column error while updating value of maintain-stock in item master (backport #32205)
2022-09-14 11:09:05 +05:30
Sagar Sharma
2fe72af359 test: add test case for item master maintain-stock
(cherry picked from commit bf1fa014f4)
2022-09-14 02:44:55 +00:00
Sagar Sharma
38488c13e6 fix: unknown column error while updating value of maintain-stock in item master
(cherry picked from commit 7b878ea3d8)
2022-09-14 02:44:54 +00:00
Frappe PR Bot
740c17c231 chore(release): Bumped to Version 14.1.1
## [14.1.1](https://github.com/frappe/erpnext/compare/v14.1.0...v14.1.1) (2022-09-13)

### Bug Fixes

* AD not getting copied from SCO while creating a Material Transfer ([#32109](https://github.com/frappe/erpnext/issues/32109)) ([09d8fa4](09d8fa4b5d)), closes [#32106](https://github.com/frappe/erpnext/issues/32106)
* add missing warehouse filter in BOM Stock Calculated report ([4e09203](4e09203ddc))
* conflict ([a408722](a408722983))
* consider Stock Entry purpose while getting total supplied qty ([5af0062](5af006278e))
* customer code max characters limit issue ([#32177](https://github.com/frappe/erpnext/issues/32177)) ([93e5100](93e510023a))
* delete linked payment ledger entries no source doc deletion ([ccd0449](ccd0449006))
* drop old notes column from lead and prospect ([ded6e7f](ded6e7f544))
* **Employee:** shorter tab titles (backport [#32192](https://github.com/frappe/erpnext/issues/32192)) ([#32193](https://github.com/frappe/erpnext/issues/32193)) ([027e66f](027e66f637))
* hide "Return of Components" button in closed SCO (backport [#32130](https://github.com/frappe/erpnext/issues/32130)) ([#32131](https://github.com/frappe/erpnext/issues/32131)) ([7840fed](7840fed7a5))
* import error on bank statement import ([467ee97](467ee97938))
* internal transfer flow ([4bac0da](4bac0daf9b))
* inventory dimension filter's label not showing in the reort ([2d2eef6](2d2eef6b29))
* item wise sales register taxes and charges ([53f235b](53f235b630))
* Migrate old lead notes as per the new format ([28b1d4e](28b1d4e2a3))
* option to start reposting from repost item valuation ([6483195](64831952d5))
* pick_list - picked qty getting set to 1 ([3c3ab89](3c3ab897d5))
* promotional scheme min and max amount configuration ([702c16e](702c16eac4))
* QR Code multi currency issue ([d14a9a1](d14a9a1e89))
* Rate for internal PI have non stock UOM items ([c06e241](c06e241fbc))
* remove EmployeeBoardingController (backport [#32139](https://github.com/frappe/erpnext/issues/32139)) ([#32191](https://github.com/frappe/erpnext/issues/32191)) ([944b8a0](944b8a0ed7))
* remove multiple call to ple creation ([a2285d5](a2285d5e5e))
* reposting not working for internal transferred purchase receipt ([7ce6729](7ce6729100))
* require barcode item barcode ([#32111](https://github.com/frappe/erpnext/issues/32111)) ([404668f](404668fcc9)), closes [#31957](https://github.com/frappe/erpnext/issues/31957)
* required_qty in BOM Stock Calculated report ([af883be](af883be065))
* SCO Supplied Items returned-qty ([4568648](4568648d8c))
* Set filter condition and spell in AR ([174c750](174c7503c9))
* status filter for Subcontracting Order in Stock Entry ([844f120](844f120a56))
* Subcontracting Receipt GL Entries (backport [#31918](https://github.com/frappe/erpnext/issues/31918)) ([#32124](https://github.com/frappe/erpnext/issues/32124)) ([f2ab220](f2ab220ce3))
* **UX:** make Item attachments public by default (backport [#32196](https://github.com/frappe/erpnext/issues/32196)) ([#32197](https://github.com/frappe/erpnext/issues/32197)) ([2c4867c](2c4867cc98))
* validate Subcontracting Order in Stock Entry ([d3cc9d4](d3cc9d4fa6))

### Performance Improvements

* lesser SQL queries and no validation ([7bb5f6e](7bb5f6eb23))
2022-09-13 12:13:00 +00:00
Deepesh Garg
5f4b214217 Merge pull request #32199 from frappe/version-14-hotfix
chore: release v14
2022-09-13 17:41:02 +05:30
Deepesh Garg
5b04bebc0a Merge pull request #32198 from frappe/mergify/bp/version-14-hotfix/pr-32190
fix: item wise sales register taxes and charges (backport #32190)
2022-09-13 16:30:59 +05:30
Nabin Hait
38c31077c9 feat: Asset Capitalization
- manual selection of entry type
- GLE cleanup with smaller functions
- GLE considering periodical inventory
- test cases
2022-09-13 16:21:06 +05:30
Nabin Hait
cd613c6033 fix: merge conflict 2022-09-13 16:20:42 +05:30
Deepesh Garg
2e1fb5255e Merge pull request #32195 from frappe/mergify/bp/version-14-hotfix/pr-32091
fix: Migrate old lead notes as per the new format (backport #32091)
2022-09-13 14:41:35 +05:30
Deepesh Garg
9fd8fffb28 Merge pull request #32166 from frappe/mergify/bp/version-14-hotfix/pr-32144
fix: Rate for internal PI have non stock UOM items (backport #32144)
2022-09-13 14:40:31 +05:30
Maharshi Patel
53f235b630 fix: item wise sales register taxes and charges
i have added separate column for other charges. Instead of adding all values to tax_total, it checks if account_type is tax, and then only it adds to total_tax otherwise it adds to the total_other_charges.

(cherry picked from commit 62163ab3d3)
2022-09-13 08:26:13 +00:00
mergify[bot]
2c4867cc98 fix(UX): make Item attachments public by default (backport #32196) (#32197)
fix(UX): make Item attachments public by default (#32196)

(cherry picked from commit fffc245922)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-09-13 13:41:58 +05:30
Deepesh Garg
dda057d257 chore: Resolve conflicts 2022-09-13 13:40:36 +05:30
Nabin Hait
ded6e7f544 fix: drop old notes column from lead and prospect
(cherry picked from commit 4b13452022)
2022-09-13 06:51:27 +00:00
Nabin Hait
7bb5f6eb23 perf: lesser SQL queries and no validation
Co-authored-by: Sagar Vora <sagar@resilient.tech>
(cherry picked from commit 2a100abef1)
2022-09-13 06:51:27 +00:00
Nabin Hait
28b1d4e2a3 fix: Migrate old lead notes as per the new format
(cherry picked from commit 3abd00f3bb)
2022-09-13 06:51:26 +00:00
mergify[bot]
027e66f637 fix(Employee): shorter tab titles (backport #32192) (#32193)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2022-09-13 10:36:12 +05:30
mergify[bot]
944b8a0ed7 fix: remove EmployeeBoardingController (backport #32139) (#32191)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2022-09-13 09:50:36 +05:30
rohitwaghchaure
95da66a201 Merge pull request #32183 from frappe/mergify/bp/version-14-hotfix/pr-32181
fix: promotional scheme min and max amount configuration (backport #32181)
2022-09-13 08:36:54 +05:30
Sagar Sharma
9fbf507877 Merge pull request #32189 from frappe/mergify/bp/version-14-hotfix/pr-32179
fix: pick_list - picked qty getting set to 1 (backport #32179)
2022-09-12 22:42:58 +05:30
Ahmad
3c3ab897d5 fix: pick_list - picked qty getting set to 1
(cherry picked from commit 3256e2b8b7)
2022-09-12 16:50:28 +00:00
Sagar Sharma
60b914b2a6 Merge pull request #32185 from frappe/mergify/bp/version-14-hotfix/pr-32150
refactor: BOM Stock Calculated report, fix required-qty (backport #32150)
2022-09-12 19:49:01 +05:30
Sagar Sharma
581c5cbc38 test: add test cases for BOM Stock Calculated report
(cherry picked from commit e1a98c1ff7)
2022-09-12 13:52:05 +00:00
Sagar Sharma
4e09203ddc fix: add missing warehouse filter in BOM Stock Calculated report
(cherry picked from commit 7a968a5f0d)
2022-09-12 13:52:05 +00:00
Sagar Sharma
af883be065 fix: required_qty in BOM Stock Calculated report
(cherry picked from commit 56192daabf)
2022-09-12 13:52:05 +00:00
Sagar Sharma
08f5f81fa8 refactor: BOM Stock Calculated report
(cherry picked from commit 723fa9eebc)
2022-09-12 13:52:05 +00:00
Rohit Waghchaure
702c16eac4 fix: promotional scheme min and max amount configuration
(cherry picked from commit a8fd92ddc1)
2022-09-12 13:01:02 +00:00
rohitwaghchaure
82440e3124 Merge pull request #32180 from frappe/mergify/bp/version-14-hotfix/pr-32177
fix: customer code max characters limit issue (backport #32177)
2022-09-12 18:28:39 +05:30
rohitwaghchaure
93e510023a fix: customer code max characters limit issue (#32177)
(cherry picked from commit 8f787c08a2)
2022-09-12 11:19:42 +00:00
ruthra kumar
0bc61b3b16 Merge pull request #32176 from frappe/mergify/bp/version-14-hotfix/pr-32175
fix: Set filter condition and spell in AR (backport #32175)
2022-09-12 16:01:41 +05:30
Nihantra C. Patel
174c7503c9 fix: Set filter condition and spell in AR
(cherry picked from commit e2b4ae13fa)
2022-09-12 09:31:27 +00:00
mergify[bot]
3083b4c218 chore: correct license text for GPLv3 (backport #32170) (#32171)
chore: correct license text for GPLv3 (#32170)

[skip ci]

(cherry picked from commit a30f38481d)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-09-12 13:57:49 +05:30
Deepesh Garg
c06e241fbc fix: Rate for internal PI have non stock UOM items
(cherry picked from commit 0f655e4430)

# Conflicts:
#	erpnext/controllers/buying_controller.py
2022-09-12 03:40:43 +00:00
Sagar Sharma
a9e9dad66a Merge pull request #32162 from frappe/mergify/bp/version-14-hotfix/pr-32161
refactor: rewrite Process Loss Report queries in QB (backport #32161)
2022-09-11 20:06:52 +05:30
Sagar Sharma
86e5f362e3 refactor: rewrite Process Loss Report queries in QB
(cherry picked from commit 5245928648)
2022-09-11 14:18:22 +00:00
ruthra kumar
7cc98181ec Merge pull request #32157 from frappe/mergify/bp/version-14-hotfix/pr-32137
refactor(minor): delete linked payment ledger entries on source doc deletion (backport #32137)
2022-09-11 13:41:12 +05:30
ruthra kumar
1ea778a77b Merge pull request #32158 from frappe/mergify/bp/version-14-hotfix/pr-32156
fix: remove duplicate call to ple creation (backport #32156)
2022-09-11 12:43:45 +05:30
ruthra kumar
a2285d5e5e fix: remove multiple call to ple creation
(cherry picked from commit 4adc372f9a)
2022-09-11 06:51:50 +00:00
ruthra kumar
ccd0449006 fix: delete linked payment ledger entries no source doc deletion
(cherry picked from commit 70313df531)
2022-09-11 06:37:22 +00:00
Sagar Sharma
793ee83f39 Merge pull request #32154 from frappe/mergify/bp/version-14-hotfix/pr-32153
refactor: rewrite Work Order Stock Report queries in QB (backport #32153)
2022-09-10 17:16:44 +05:30
Sagar Sharma
9203217678 refactor: rewrite Work Order Stock Report queries in QB
(cherry picked from commit d4c4dddfc3)
2022-09-10 11:21:27 +00:00
rohitwaghchaure
3c1c50f171 Merge pull request #32141 from frappe/mergify/bp/version-14-hotfix/pr-32135
fix: reposting not working for internal transferred purchase receipt (backport #32135)
2022-09-10 16:40:51 +05:30
rohitwaghchaure
a408722983 fix: conflict 2022-09-09 22:44:10 +05:30
Deepesh Garg
16502b30a0 Merge pull request #32148 from frappe/mergify/bp/version-14-hotfix/pr-32110
fix: error on bank statement import (backport #32110)
2022-09-09 17:16:58 +05:30
Sagar Sharma
61a1b2b42b Merge pull request #32147 from frappe/mergify/bp/version-14-hotfix/pr-32145
fix: validate Subcontracting Order Status in Stock Entry (backport #32145)
2022-09-09 17:06:28 +05:30
ruthra kumar
467ee97938 fix: import error on bank statement import
Name collision between frameworks file importer's internal log and
doctype fieldname - import_log.

Frameworks internal log overrode, doctypes field which caused failure
in basic fieldtype validation.

(cherry picked from commit a6fbb80b94)
2022-09-09 09:31:25 +00:00
Sagar Sharma
d3cc9d4fa6 fix: validate Subcontracting Order in Stock Entry
(cherry picked from commit 9a3dcb9ad1)
2022-09-09 09:26:08 +00:00
Sagar Sharma
844f120a56 fix: status filter for Subcontracting Order in Stock Entry
(cherry picked from commit 30909a9b79)
2022-09-09 09:26:08 +00:00
Sagar Sharma
8be12f0858 Merge pull request #32143 from frappe/mergify/bp/version-14-hotfix/pr-32102
fix: consider Stock Entry purpose while getting total supplied qty (backport #32102)
2022-09-09 12:35:47 +05:30
Sagar Sharma
5af006278e fix: consider Stock Entry purpose while getting total supplied qty
(cherry picked from commit 2f00413864)
2022-09-09 06:44:26 +00:00
Rohit Waghchaure
7ce6729100 fix: reposting not working for internal transferred purchase receipt
(cherry picked from commit a03b4ce213)

# Conflicts:
#	erpnext/stock/stock_ledger.py
2022-09-09 04:01:23 +00:00
Sagar Sharma
c4c43bc550 Merge pull request #32134 from frappe/mergify/bp/version-14-hotfix/pr-32128
fix: SCO Supplied Items returned-qty (backport #32128)
2022-09-08 19:59:23 +05:30
Sagar Sharma
62741bf744 test: add test case for returned-qty
(cherry picked from commit aea7188304)
2022-09-08 13:31:38 +00:00
Sagar Sharma
4568648d8c fix: SCO Supplied Items returned-qty
(cherry picked from commit ccb2889cac)
2022-09-08 13:31:38 +00:00
mergify[bot]
7840fed7a5 fix: hide "Return of Components" button in closed SCO (backport #32130) (#32131)
fix: hide "Return of Components" button in closed SCO (#32130)

(cherry picked from commit 3585daab95)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-09-08 18:25:27 +05:30
Sagar Sharma
f2ab220ce3 fix: Subcontracting Receipt GL Entries (backport #31918) (#32124)
fix: Subcontracting Receipt GL Entries
2022-09-08 11:18:00 +05:30
rohitwaghchaure
9b6dd7e71f Merge pull request #32120 from rohitwaghchaure/backport-provision-to-manual-reposting
fix: option to start reposting from repost item valuation
2022-09-07 18:05:38 +05:30
Rohit Waghchaure
64831952d5 fix: option to start reposting from repost item valuation 2022-09-07 18:04:43 +05:30
rohitwaghchaure
d53fd8c592 Merge pull request #32119 from rohitwaghchaure/backport-fixed-label-not-showing-for-filter
fix: inventory dimension filter's label not showing in the reort
2022-09-07 18:03:51 +05:30
Rohit Waghchaure
2d2eef6b29 fix: inventory dimension filter's label not showing in the reort 2022-09-07 18:02:41 +05:30
rohitwaghchaure
c313c37006 Merge pull request #32114 from rohitwaghchaure/backport-fixed-internal-transfer-flow
fix: backport fixed internal transfer flow
2022-09-07 15:44:01 +05:30
Rohit Waghchaure
a00bc2967e test: added test case for internal transfer 2022-09-07 14:29:21 +05:30
Rohit Waghchaure
4bac0daf9b fix: internal transfer flow 2022-09-07 14:29:15 +05:30
Sagar Sharma
404668fcc9 fix: require barcode item barcode (#32111)
fix: require barcode item barcode. (#31957)

* fix: require barcode item barcode.

* fix: make supplier mandatory in Item Supplier DocType

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>

Co-authored-by: Devin Slauenwhite <devin.slauenwhite@gmail.com>
2022-09-07 14:24:12 +05:30
Sagar Sharma
09d8fa4b5d fix: AD not getting copied from SCO while creating a Material Transfer (#32109)
fix: AD not getting copied from SCO while creating a Material Transfer (#32106)
2022-09-07 12:42:12 +05:30
Deepesh Garg
354aaae587 Merge pull request #32088 from frappe/mergify/bp/version-14-hotfix/pr-32086
fix: QR Code multi currency issue (backport #32086)
2022-09-07 07:46:41 +05:30
Frappe PR Bot
7235c3f88f chore(release): Bumped to Version 14.1.0
# [14.1.0](https://github.com/frappe/erpnext/compare/v14.0.3...v14.1.0) (2022-09-06)

### Bug Fixes

* **Appointment:** create lead notes as child table ([00a73c7](00a73c7a57))
* fetch from parent not working for custom field ([76ae4d8](76ae4d87ca))
* force delete old report docs (backport [#32026](https://github.com/frappe/erpnext/issues/32026)) ([#32027](https://github.com/frappe/erpnext/issues/32027)) ([0e9a1fb](0e9a1fb40e))
* include payment against PO in AR/AP report ([4bbd0ec](4bbd0ec985))
* incorrect import parameter for cancel PDA ([f55881a](f55881aef8))
* key error on consolidated financial report ([4409f11](4409f11282))
* KSA VAT report multi currency amount issue ([b96526e](b96526eefd))
* Loan Interest accruals for 0 rated loans ([1b9082e](1b9082e07b))
* Naming series in Journal Entry Template ([5520c6b](5520c6b2f3))
* not able to make variant item ([f871dd4](f871dd4ef6))
* **pos:** error while consolidating pos invoices ([319ee41](319ee41403))
* remove spaces and order import ([055556b](055556b7f1))
* upgrade process to version-14 when currency opportunity wass not set ([4cb685a](4cb685a326))
* validate available qty for consumption in SCR ([26536da](26536da74b))

### Features

* better Item Price list view ([#31954](https://github.com/frappe/erpnext/issues/31954)) ([784fb47](784fb47197))
* tabbed view for Employee form ([#31940](https://github.com/frappe/erpnext/issues/31940)) ([#32095](https://github.com/frappe/erpnext/issues/32095)) ([3c688df](3c688dfa6d))
* two new filters for gross profit ([60fa421](60fa421409))
2022-09-06 16:04:45 +00:00
Deepesh Garg
15733c14e8 Merge pull request #32101 from frappe/version-14-hotfix
chore: version-14 weekly release
2022-09-06 21:31:39 +05:30
rohitwaghchaure
22b2386aa1 Merge pull request #32097 from rohitwaghchaure/backport-fixed-fetch-from-parent
fix: fetch from parent
2022-09-06 12:59:37 +05:30
Rohit Waghchaure
6ab0637b0b test: test cases for PI and DN 2022-09-06 11:54:56 +05:30
Rohit Waghchaure
76ae4d87ca fix: fetch from parent not working for custom field 2022-09-06 11:54:48 +05:30
Rucha Mahabal
3c688dfa6d feat: tabbed view for Employee form (#31940) (#32095) 2022-09-06 11:04:13 +05:30
Sagar Sharma
8b8d054ded Merge pull request #32090 from frappe/mergify/bp/version-14-hotfix/pr-32082
fix: validate available qty for consumption in SCR (backport #32082)
2022-09-05 14:49:35 +05:30
Sagar Sharma
121ec83562 refactor(test): test_update_reserved_qty_for_subcontracting
(cherry picked from commit a349b58306)
2022-09-05 08:50:29 +00:00
Sagar Sharma
26536da74b fix: validate available qty for consumption in SCR
(cherry picked from commit 4a7add2169)
2022-09-05 08:50:28 +00:00
Nabin Hait
f605564094 Merge pull request #32087 from frappe/mergify/bp/version-14-hotfix/pr-32061
fix(Appointment): create lead notes as child table (backport #32061)
2022-09-05 12:56:00 +05:30
hamzaali15
d14a9a1e89 fix: QR Code multi currency issue
When try to scan qr code on app it is showing correct values for multi currencies because it is not getting base amount

(cherry picked from commit b10a2b87b6)
2022-09-05 07:13:08 +00:00
Sagar Vora
b7e8fbe43f test: dont create lead manually, add coverage for notes
(cherry picked from commit 875ff15109)
2022-09-05 06:56:48 +00:00
Sagar Vora
00a73c7a57 fix(Appointment): create lead notes as child table
(cherry picked from commit 58e553151e)
2022-09-05 06:56:47 +00:00
Deepesh Garg
edb100274b Merge pull request #32080 from frappe/mergify/bp/version-14-hotfix/pr-31982
fix: upgrade process to version-14 when currency opportunity was not set (backport #31982)
2022-09-04 22:39:01 +05:30
Deepesh Garg
6976316ada chore: fix message
(cherry picked from commit 118b0c0f86)
2022-09-04 13:34:32 +00:00
Florian HENRY
357f74a580 chore: better text
(cherry picked from commit d19b664ba9)
2022-09-04 13:34:32 +00:00
Florian HENRY
aedd0397b8 chore: remove debug
(cherry picked from commit ac66538651)
2022-09-04 13:34:32 +00:00
Florian HENRY
4cb685a326 fix: upgrade process to version-14 when currency opportunity wass not set
(cherry picked from commit 9d02fbadb4)
2022-09-04 13:34:31 +00:00
Deepesh Garg
afcc0cbccd Merge pull request #32079 from frappe/mergify/bp/version-14-hotfix/pr-31954
feat: better Item Price list view (backport #31954)
2022-09-04 18:15:25 +05:30
Deepesh Garg
29bca45b1e Merge pull request #32077 from frappe/mergify/bp/version-14-hotfix/pr-32045
fix: Naming series in Journal Entry Template (backport #32045)
2022-09-04 18:14:56 +05:30
HENRY Florian
784fb47197 feat: better Item Price list view (#31954)
* feat: better Item Price list view

(cherry picked from commit 86395c6adb)
2022-09-04 12:39:04 +00:00
Solufyin
5520c6b2f3 fix: Naming series in Journal Entry Template
(cherry picked from commit 2085626390)
2022-09-04 11:05:07 +00:00
Deepesh Garg
f873547447 Merge pull request #32074 from frappe/mergify/bp/version-14-hotfix/pr-31850
feat: two new filters for gross profit (backport #31850)
2022-09-04 16:21:54 +05:30
Deepesh Garg
d65d2f617d Merge pull request #32071 from frappe/mergify/bp/version-14-hotfix/pr-32053
fix: KSA VAT report multi currency amount issue (backport #32053)
2022-09-04 15:58:50 +05:30
Deepesh Garg
0438433a4f chore: Linting Issues
(cherry picked from commit ad8d0efa29)
2022-09-04 10:27:23 +00:00
hrzzz
055556b7f1 fix: remove spaces and order import
(cherry picked from commit 3ef551872a)
2022-09-04 10:27:23 +00:00
hrzzz
60fa421409 feat: two new filters for gross profit
(cherry picked from commit 27891ecb77)
2022-09-04 10:27:23 +00:00
Deepesh Garg
dd2fd12d5f Merge pull request #32073 from frappe/mergify/bp/version-14-hotfix/pr-31822
fix(pos): error while consolidating pos invoices (backport #31822)
2022-09-04 15:57:09 +05:30
Saqib Ansari
319ee41403 fix(pos): error while consolidating pos invoices
(cherry picked from commit 33762dbbac)
2022-09-04 07:56:31 +00:00
hamzaali15
b96526eefd fix: KSA VAT report multi currency amount issue
In KSA VAT report amount is not showing correctly for multi currencies because net_amount field is fetched instead of base_net_amount

(cherry picked from commit 56d8962e40)
2022-09-04 07:43:32 +00:00
rohitwaghchaure
78a992c086 Merge pull request #32066 from frappe/mergify/bp/version-14-hotfix/pr-32065
fix: not able to make variant item (backport #32065)
2022-09-03 11:53:48 +05:30
Rohit Waghchaure
f871dd4ef6 fix: not able to make variant item
(cherry picked from commit 92b0f9cd7e)
2022-09-03 06:23:27 +00:00
ruthra kumar
79ecf7751f Merge pull request #32060 from frappe/mergify/bp/version-14-hotfix/pr-32054
fix: type error on cancellation of Process Deferred Accounting (backport #32054)
2022-09-02 17:10:34 +05:30
ruthra kumar
4698dba402 test: pda document submission and cancellation
(cherry picked from commit 1c385541fa)
2022-09-02 11:15:32 +00:00
ruthra kumar
f55881aef8 fix: incorrect import parameter for cancel PDA
(cherry picked from commit 08f2e4edc3)
2022-09-02 11:15:31 +00:00
ruthra kumar
f1b2ba5a84 Merge pull request #32058 from frappe/mergify/bp/version-14-hotfix/pr-32052
fix: key error on consolidated financial report (backport #32052)
2022-09-02 16:41:08 +05:30
ruthra kumar
4409f11282 fix: key error on consolidated financial report
accounts with same name but different account number will throw key
error on consolidated report

(cherry picked from commit 6e8395cccd)
2022-09-02 10:46:42 +00:00
ruthra kumar
84865a8421 Merge pull request #32055 from frappe/mergify/bp/version-14-hotfix/pr-31942
fix: include payment against PO in AR/AP report (backport #31942)
2022-09-02 14:58:25 +05:30
ruthra kumar
d9632e8138 test: payments against so/po will show up as outstanding amount
1. Class will use FrappeTestCase fixture
2. setup and teardown methods are introduced
3. test for payments against SO

(cherry picked from commit 36f5883dda)
2022-09-02 08:15:36 +00:00
ruthra kumar
4bbd0ec985 fix: include payment against PO in AR/AP report
(cherry picked from commit fdd167cac1)
2022-09-02 08:15:36 +00:00
mergify[bot]
92f8f0ec74 chore: set BOM as default value for Backflush Raw Materials of Subcontract Based On (backport #32048) (#32050)
chore: set BOM as default value for Backflush Raw Materials of Subcontract Based On (#32048)

chore: set BOM as default value for Backflush Raw Materials of Subcontract Based On in Buying Settings
(cherry picked from commit 68907ca783)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-09-02 09:10:17 +05:30
Deepesh Garg
aea484be1f Merge pull request #32032 from frappe/mergify/bp/version-14-hotfix/pr-32030
fix: Loan Interest accruals for 0 rated loans (backport #32030)
2022-08-31 21:04:38 +05:30
Deepesh Garg
52fc10d00c chore: Add check for principal amount
(cherry picked from commit a76d3827ec)
2022-08-30 15:47:11 +00:00
Deepesh Garg
1b9082e07b fix: Loan Interest accruals for 0 rated loans
(cherry picked from commit eefc9b7172)
2022-08-30 15:47:11 +00:00
mergify[bot]
0e9a1fb40e fix: force delete old report docs (backport #32026) (#32027)
fix: force delete old report docs (#32026)

(cherry picked from commit ffa3071d36)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-08-30 15:46:08 +05:30
Frappe PR Bot
32abf67c80 chore(release): Bumped to Version 14.0.3
## [14.0.3](https://github.com/frappe/erpnext/compare/v14.0.2...v14.0.3) (2022-08-30)

### Bug Fixes

* AD not getting copied from SCO while creating a SE (backport [#32004](https://github.com/frappe/erpnext/issues/32004)) ([#32007](https://github.com/frappe/erpnext/issues/32007)) ([cee867f](cee867f941))
* Add docstatus filter for voucher_no in Repost Item Valuation ([309da96](309da96442))
* add validation for PO in Stock Entry (backport [#31974](https://github.com/frappe/erpnext/issues/31974)) ([#31975](https://github.com/frappe/erpnext/issues/31975)) ([4d8ced6](4d8ced6c87))
* default supplier not set in the PP ([4cf9fb0](4cf9fb08e1))
* display amount in account currency if party is supplied ([15915d7](15915d7053))
* Explicitly commit "log_error" since its getting called during GET request (backport [#31952](https://github.com/frappe/erpnext/issues/31952)) ([#31953](https://github.com/frappe/erpnext/issues/31953)) ([362976f](362976fa42))
* gl entries for asset repair ([f0f7afa](f0f7afa669))
* lost quotation not to expired ([8717235](8717235a34))
* material request connection on work order ([193502c](193502ce03))
* **patch:** update sla doctype directly (backport [#32014](https://github.com/frappe/erpnext/issues/32014)) ([#32015](https://github.com/frappe/erpnext/issues/32015)) ([1b5a1cb](1b5a1cbaad))
* permissions for Task Type ([#32016](https://github.com/frappe/erpnext/issues/32016)) ([7ca1beb](7ca1beb15d))
* Purchase Order creation from Sales Order ([39ff0cc](39ff0cc6d8))
* Purposes not set ([94ebfa7](94ebfa765c))
* restrict party types to Supplier/Customer for AR/AP report ([c407d1e](c407d1e51a))
* Rounded total for cash and non trade discount invoices ([6c4fcd8](6c4fcd80c6))
* Route condition set for stock ledger (backport [#31935](https://github.com/frappe/erpnext/issues/31935)) ([#31945](https://github.com/frappe/erpnext/issues/31945)) ([a7d23ab](a7d23abc2f))
2022-08-30 09:24:00 +00:00
Deepesh Garg
52b42e9492 Merge pull request #32025 from frappe/version-14-hotfix
chore: weekly version-14 release
2022-08-30 14:52:11 +05:30
Deepesh Garg
77ac7f06d4 Merge pull request #32021 from frappe/mergify/bp/version-14-hotfix/pr-32005
fix: lost quotation not to expired (backport #32005)
2022-08-30 11:08:40 +05:30
MOHAMMED NIYAS
8717235a34 fix: lost quotation not to expired
(cherry picked from commit 69ffef8c0e)
2022-08-30 05:03:44 +00:00
Deepesh Garg
670426f428 Merge pull request #32017 from frappe/mergify/bp/version-14-hotfix/pr-32016
fix: permissions for Task Type (backport #32016)
2022-08-30 08:38:14 +05:30
mergify[bot]
1b5a1cbaad fix(patch): update sla doctype directly (backport #32014) (#32015)
fix(patch): update sla doctype directly (#32014)

fix: update sla doctype directly
(cherry picked from commit 2d41704424)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-08-29 22:17:39 +05:30
Raffael Meyer
7ca1beb15d fix: permissions for Task Type (#32016)
(cherry picked from commit 73f4d5931d)
2022-08-29 16:27:00 +00:00
ruthra kumar
c660db145b Merge pull request #32013 from frappe/mergify/bp/version-14-hotfix/pr-32009
refactor: readd remarks field to payment ledger (backport #32009)
2022-08-29 20:21:43 +05:30
ruthra kumar
0aaf9c4f05 chore: add remarks migration to patches.txt
(cherry picked from commit d522f13d55)
2022-08-29 19:52:33 +05:30
ruthra kumar
b3b0272ec9 chore: patch for migrating remarks to payment ledger
(cherry picked from commit 3a6b095ed4)
2022-08-29 14:19:46 +00:00
ruthra kumar
f7898b4954 refactor: re-add remarks field to payment ledger and AR/AP report
(cherry picked from commit 5782c4469a)
2022-08-29 14:19:46 +00:00
Deepesh Garg
b067eae38c Merge pull request #32008 from frappe/mergify/bp/version-14-hotfix/pr-32006
fix: Rounded total for cash and non trade discount invoices (backport #32006)
2022-08-29 17:46:14 +05:30
mergify[bot]
cee867f941 fix: AD not getting copied from SCO while creating a SE (backport #32004) (#32007)
fix: AD not getting copied from SCO while creating a SE (#32004)

(cherry picked from commit 9dbaaa33f5)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-29 15:50:22 +05:30
Deepesh Garg
6c4fcd80c6 fix: Rounded total for cash and non trade discount invoices
(cherry picked from commit 318da16b99)
2022-08-29 10:06:08 +00:00
Deepesh Garg
11657effa5 Merge pull request #31970 from frappe/mergify/bp/version-14-hotfix/pr-31955
chore: update french translation (backport #31955)
2022-08-28 11:32:54 +05:30
Deepesh Garg
d3b7942f32 Merge pull request #31979 from frappe/mergify/bp/version-14-hotfix/pr-31977
fix: restrict party types to Supplier/Customer for AR/AP report (backport #31977)
2022-08-28 11:25:00 +05:30
mergify[bot]
f407c972d1 chore: allow return of components in SCO (backport #31994) (#31995)
chore: allow return of components in SCO (#31994)

chore: allow return of components in sco
(cherry picked from commit af5cbc881f)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-26 23:15:20 +05:30
Deepesh Garg
0b72295fa2 Merge pull request #31990 from frappe/mergify/bp/version-14-hotfix/pr-31988
chore: remove precision on discount_percentage of Sales Invoice Item (backport #31988)
2022-08-26 18:09:26 +05:30
Deepesh Garg
204b6c0272 Merge pull request #31973 from frappe/mergify/bp/version-14-hotfix/pr-31943
fix: gl entries for asset repair (backport #31943)
2022-08-26 17:34:57 +05:30
Deepesh Garg
1118e25b6d Merge pull request #31985 from frappe/mergify/bp/version-14-hotfix/pr-31984
fix: Purchase Order creation from Sales Order (backport #31984)
2022-08-26 16:05:01 +05:30
ruthra kumar
9b9df70632 chore: remove precision on discount_percentage of Sales Invoice Item
(cherry picked from commit c42fef541a)
2022-08-26 10:34:50 +00:00
Solufyin
39ff0cc6d8 fix: Purchase Order creation from Sales Order
(cherry picked from commit bd4b4ddd8b)
2022-08-26 06:31:51 +00:00
ruthra kumar
c407d1e51a fix: restrict party types to Supplier/Customer for AR/AP report
(cherry picked from commit 6aa8fd0f7b)
2022-08-25 10:50:46 +00:00
mergify[bot]
4d8ced6c87 fix: add validation for PO in Stock Entry (backport #31974) (#31975)
fix: add validation for PO in Stock Entry (#31974)

(cherry picked from commit 8566832dd5)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-25 15:29:48 +05:30
Deepesh Garg
4f832678cf chore: fix against account
(cherry picked from commit c1f6dd46d1)
2022-08-25 07:55:08 +00:00
Nabin Hait
f0f7afa669 fix: gl entries for asset repair
(cherry picked from commit b4a2eb2e65)
2022-08-25 07:55:08 +00:00
Florian HENRY
cb6cbf7818 chore: update fr translation
(cherry picked from commit 299da5d596)
2022-08-25 07:37:06 +00:00
Florian HENRY
3aec1175df chore: update fr translation
(cherry picked from commit 1f6f2747d4)
2022-08-25 07:37:06 +00:00
Florian HENRY
c645995ae3 chore: update french translation
(cherry picked from commit 264f98af14)
2022-08-25 07:37:05 +00:00
rohitwaghchaure
f772c17f3f Merge pull request #31969 from frappe/mergify/bp/version-14-hotfix/pr-31967
fix: material request connection on work order (backport #31967)
2022-08-25 12:30:25 +05:30
Rohit Waghchaure
193502ce03 fix: material request connection on work order
(cherry picked from commit 9ab10def49)
2022-08-25 06:59:56 +00:00
rohitwaghchaure
abd637a238 Merge pull request #31968 from frappe/mergify/bp/version-14-hotfix/pr-31966
fix: default supplier not set in the PP (backport #31966)
2022-08-25 12:26:47 +05:30
Rohit Waghchaure
4cf9fb08e1 fix: default supplier not set in the PP
(cherry picked from commit 5fd468d9ec)
2022-08-25 06:55:46 +00:00
Deepesh Garg
e4ca20654f Merge pull request #31964 from frappe/mergify/bp/version-14-hotfix/pr-31909
fix: Add docstatus filter for voucher_no in Repost Item Valuation (backport #31909)
2022-08-25 11:25:02 +05:30
Deepesh Garg
bc873939eb Merge pull request #31959 from frappe/mergify/bp/version-14-hotfix/pr-31934
refactor: disable discount accounting on Buying module(PI) (backport #31934)
2022-08-25 11:06:58 +05:30
Deepesh Garg
c6d3e9f432 Merge pull request #31958 from frappe/mergify/bp/version-14-hotfix/pr-31950
fix: display amount in account currency if party is supplied (backport #31950)
2022-08-25 11:06:42 +05:30
rohitwaghchaure
54f4504df6 Merge pull request #31963 from frappe/mergify/bp/version-14-hotfix/pr-31951
fix: Purposes not set in Maintenance Visit (backport #31951)
2022-08-25 10:50:50 +05:30
Sagar Sharma
309da96442 fix: Add docstatus filter for voucher_no in Repost Item Valuation
(cherry picked from commit 520306dc87)
2022-08-25 05:20:26 +00:00
Rohit Waghchaure
94ebfa765c fix: Purposes not set
(cherry picked from commit f9a7b31b5b)
2022-08-25 05:19:53 +00:00
ruthra kumar
2577747c5c test: remove discount accounting tests
(cherry picked from commit 277ef04b60)
2022-08-25 05:04:46 +00:00
ruthra kumar
fb387426d6 refactor: disable discount accounting on Buying module(PI)
(cherry picked from commit a956e20f29)
2022-08-25 05:04:46 +00:00
ruthra kumar
15915d7053 fix: display amount in account currency if party is supplied
(cherry picked from commit e5b04d54ff)
2022-08-25 05:04:27 +00:00
mergify[bot]
362976fa42 fix: Explicitly commit "log_error" since its getting called during GET request (backport #31952) (#31953)
fix: Explicitly commit "log_error" since its getting called during GET request (#31952)

(cherry picked from commit 122f1c0ced)

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2022-08-24 18:26:08 +05:30
mergify[bot]
a7d23abc2f fix: Route condition set for stock ledger (backport #31935) (#31945)
fix: Route condition set for stock ledger (#31935)

(cherry picked from commit 0e26df331c)

Co-authored-by: Solufyin <34390782+Solufyin@users.noreply.github.com>
2022-08-24 13:30:25 +05:30
mergify[bot]
4b609322ba chore: add Work Order test dependencies (backport #31936) (#31937)
chore: add Work Order test dependencies (#31936)

(cherry picked from commit fe73d55f70)

Co-authored-by: HENRY Florian <florian.henry@open-concept.pro>
2022-08-23 16:09:26 +05:30
Frappe PR Bot
5778f227ee chore(release): Bumped to Version 14.0.2
## [14.0.2](https://github.com/frappe/erpnext/compare/v14.0.1...v14.0.2) (2022-08-23)

### Bug Fixes

* additional-cost in items table ([da69cc5](da69cc5477))
* base_amount and exchange_rate in additional-cost table ([d48487a](d48487ada2))
* Cash and non trade discount calculation ([b6d2de2](b6d2de2cc1))
* don't allow to create SCR directly (backport [#31924](https://github.com/frappe/erpnext/issues/31924)) ([#31926](https://github.com/frappe/erpnext/issues/31926)) ([0bfb774](0bfb774bdf))
* incorrect buying amount in Gross Profit rpt ([981add9](981add9b6f))
* incorrect tax amt due to different exchange rate in PR and PI ([a767326](a76732613e))
* limited options for no-of-employees in crm ([735a608](735a60807a))
* make rate field read-only in subcontracting receipt item (backport [#31905](https://github.com/frappe/erpnext/issues/31905)) ([#31906](https://github.com/frappe/erpnext/issues/31906)) ([6be77d5](6be77d5729))
* map old data as per new options of no-of-employees ([35e9bfc](35e9bfca38))
* **pos:** edge case while closing pos ([#31892](https://github.com/frappe/erpnext/issues/31892)) ([200a971](200a971743))
* process loan interest accrual ([66e5202](66e5202642))
* recalculate rate of items based on "Recalculate Rate" checkbox ([9e60dd3](9e60dd32e8))
* TDS calculation for advance payment ([78b39d6](78b39d6ca4))
* term loan interest calculation ([8fdbbf3](8fdbbf374d))
* test "test_pending_and_received_qty" ([e099e10](e099e10c8e))
* Test cases ([3afb625](3afb625ff8))
* Unable to make payment entry against Fees using education app ([1aa96de](1aa96defda))

### Performance Improvements

* use `create_custom_fields` ([#31853](https://github.com/frappe/erpnext/issues/31853)) ([6656d23](6656d23e45))
2022-08-23 05:28:37 +00:00
Deepesh Garg
7ac75aab1a Merge pull request #31932 from frappe/version-14-hotfix
chore: weekly version 14 release
2022-08-23 10:57:10 +05:30
Deepesh Garg
e831b6e054 Merge pull request #31930 from frappe/mergify/bp/version-14-hotfix/pr-31910
fix: Cash and non trade discount calculation (backport #31910)
2022-08-23 10:36:15 +05:30
Deepesh Garg
856a64b77c chore: Linting issues
(cherry picked from commit 1cb7ae16ab)
2022-08-23 04:49:57 +00:00
Deepesh Garg
3afb625ff8 fix: Test cases
(cherry picked from commit ae3dce0cbd)
2022-08-23 04:49:57 +00:00
Deepesh Garg
b6d2de2cc1 fix: Cash and non trade discount calculation
(cherry picked from commit 3b15966cc9)
2022-08-23 04:49:57 +00:00
mergify[bot]
0bfb774bdf fix: don't allow to create SCR directly (backport #31924) (#31926)
fix: don't allow to create SCR directly (#31924)

(cherry picked from commit bf5c43322a)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-22 18:38:21 +05:30
Deepesh Garg
d7a8db04a1 Merge pull request #31916 from frappe/mergify/bp/version-14-hotfix/pr-31856
fix: incorrect tax amt due to different exchange rate in PR and PI (backport #31856)
2022-08-22 10:57:53 +05:30
Deepesh Garg
2d5ae811d2 Merge pull request #31917 from frappe/mergify/bp/version-14-hotfix/pr-31871
fix: incorrect buying amount in Gross Profit rpt (backport #31871)
2022-08-22 10:56:47 +05:30
Deepesh Garg
be9607e27b Merge pull request #31915 from frappe/mergify/bp/version-14-hotfix/pr-31894
fix: TDS calculation for advance payment (backport #31894)
2022-08-22 10:32:04 +05:30
Deepesh Garg
fd45a7afbe Merge pull request #31818 from frappe/mergify/bp/version-14-hotfix/pr-31816
fix: limited options for no-of-employees in the crm documents (backport #31816)
2022-08-22 10:31:06 +05:30
Deepesh Garg
0c73af6ee2 Merge pull request #31809 from frappe/mergify/bp/version-14-hotfix/pr-31801
Tds report (backport #31801)
2022-08-22 10:30:42 +05:30
ruthra kumar
981add9b6f fix: incorrect buying amount in Gross Profit rpt
(cherry picked from commit 967dd398e7)
2022-08-22 05:00:26 +00:00
Deepesh Garg
8f5736c500 Merge pull request #31832 from frappe/mergify/bp/version-14-hotfix/pr-31830
fix: Unable to make payment entry against Fees using education app (backport #31830)
2022-08-22 10:29:26 +05:30
Deepesh Garg
052f7c3345 Merge pull request #31827 from frappe/mergify/bp/version-14-hotfix/pr-31799
fix: process loan interest accrual (backport #31799)
2022-08-22 10:28:50 +05:30
Deepesh Garg
fa4a40812c Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-31816 2022-08-22 09:09:16 +05:30
ruthra kumar
a76732613e fix: incorrect tax amt due to different exchange rate in PR and PI
(cherry picked from commit 5fd0770372)
2022-08-22 03:38:43 +00:00
Deepesh Garg
dd602989a8 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-31801 2022-08-22 09:00:36 +05:30
Maharshi Patel
78b39d6ca4 fix: TDS calculation for advance payment
"against_voucher": ["is", "not set"] was used in query due to which if TDS was added on "advance" payment vouchers and then reconciled against purchase invoice. it will not find those vouchers and consider this as first-time threshold due to which it will calculate Tax for all transactions.

(cherry picked from commit a452143782)
2022-08-22 03:30:04 +00:00
Deepesh Garg
77fa64e100 Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-31799 2022-08-22 08:59:57 +05:30
Deepesh Garg
ac04fc60ef Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-31830 2022-08-22 08:59:31 +05:30
mergify[bot]
6be77d5729 fix: make rate field read-only in subcontracting receipt item (backport #31905) (#31906)
fix: make rate field read-only in subcontracting receipt item (#31905)

(cherry picked from commit 588ca68171)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-20 19:28:21 +05:30
Sagar Sharma
37e5b93e2d Merge pull request #31900 from frappe/mergify/bp/version-14-hotfix/pr-31899
fix: repost item valuation for subcontracting receipt  (backport #31899)
2022-08-19 22:41:28 +05:30
Sagar Sharma
19d29d1861 chore: add option for "Subcontracting Receipt" in "Voucher Type"
(cherry picked from commit f92f3e0208)
2022-08-19 16:31:53 +00:00
Sagar Sharma
0db912998a chore: allow subcontracting receipt backdated entry
(cherry picked from commit f8c11847bb)
2022-08-19 16:31:53 +00:00
mergify[bot]
200a971743 fix(pos): edge case while closing pos (#31892) 2022-08-19 17:11:13 +05:30
Sagar Sharma
c0f0986539 Merge pull request #31897 from frappe/mergify/bp/version-14-hotfix/pr-31890
fix: additional-costs in SCO and SCR (backport #31890)
2022-08-19 15:58:06 +05:30
Sagar Sharma
376293326b chore: conflicts 2022-08-19 15:30:50 +05:30
Sagar Sharma
9a29e3c9f2 chore: add test for additional-cost
(cherry picked from commit c247cf728c)
2022-08-19 09:56:52 +00:00
Sagar Sharma
e099e10c8e fix: test "test_pending_and_received_qty"
(cherry picked from commit addd7347d8)
2022-08-19 09:56:52 +00:00
Sagar Sharma
3b222339b8 chore: add additional-cost table in SCR
(cherry picked from commit 256b4245d5)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json
2022-08-19 09:56:51 +00:00
Sagar Sharma
9e60dd32e8 fix: recalculate rate of items based on "Recalculate Rate" checkbox
(cherry picked from commit 2fc6833684)
2022-08-19 09:56:51 +00:00
Sagar Sharma
7ff5414571 chore: move "set_missing_values_in_additional_costs" from SCO to SC"
(cherry picked from commit ea82fe5bc2)
2022-08-19 09:56:50 +00:00
Sagar Sharma
d48487ada2 fix: base_amount and exchange_rate in additional-cost table
(cherry picked from commit eabd3135f0)
2022-08-19 09:56:50 +00:00
Sagar Sharma
da69cc5477 fix: additional-cost in items table
(cherry picked from commit d7ed4093d8)
2022-08-19 09:56:50 +00:00
Sagar Vora
b2a720d847 Merge pull request #31891 from frappe/mergify/bp/version-14-hotfix/pr-31853
perf: use `create_custom_fields` (backport #31853)
2022-08-18 15:57:59 +00:00
Sagar Vora
6656d23e45 perf: use create_custom_fields (#31853)
* perf: use `create_custom_fields`

* fix: default must be a string

(cherry picked from commit aafb735283)
2022-08-18 15:31:42 +00:00
mergify[bot]
ae5c05081d chore: remove unwanted field "provisional_expense_account" from SCR (backport #31847) (#31886)
chore: remove unwanted field "provisional_expense_account" from SCR (#31847)

(cherry picked from commit 7e88eb549f)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-18 17:41:01 +05:30
Frappe PR Bot
028e939cca chore(release): Bumped to Version 14.0.1
## [14.0.1](https://github.com/frappe/erpnext/compare/v14.0.0...v14.0.1) (2022-08-18)

### Bug Fixes

* add asset repair to accounting dimension list ([65bb1d8](65bb1d8cc2))
* Add dimension section in subcontracting doctypes (backport [#31849](https://github.com/frappe/erpnext/issues/31849)) ([#31877](https://github.com/frappe/erpnext/issues/31877)) ([50ad612](50ad612453))
* check item_code in all rows of po_items (backport [#31741](https://github.com/frappe/erpnext/issues/31741)) ([#31842](https://github.com/frappe/erpnext/issues/31842)) ([82f1dd2](82f1dd268d))
* contact search in request for quotation (backport [#31828](https://github.com/frappe/erpnext/issues/31828)) ([#31840](https://github.com/frappe/erpnext/issues/31840)) ([74664a3](74664a34c0))
* delete custom fields on deletion of inventory dimension ([354a9d6](354a9d6169))
* **ecommerce:** remove query to non-existing field (backport [#31771](https://github.com/frappe/erpnext/issues/31771)) ([#31773](https://github.com/frappe/erpnext/issues/31773)) ([8737c10](8737c10ce4))
* getting error to show sales invoice group or print rep… (backport [#31756](https://github.com/frappe/erpnext/issues/31756)) ([#31767](https://github.com/frappe/erpnext/issues/31767)) ([53b9d61](53b9d61c46))
* incorrect produced-qty in production-plan-item (backport [#31706](https://github.com/frappe/erpnext/issues/31706)) ([#31861](https://github.com/frappe/erpnext/issues/31861)) ([010a0ca](010a0ca0a9))
* incorrect rate in BOM exploded items (backport [#31513](https://github.com/frappe/erpnext/issues/31513)) ([#31864](https://github.com/frappe/erpnext/issues/31864)) ([abe1894](abe18945a6))
* intercompany SO throws exception ([1d1f12f](1d1f12f949))
* linter (backport [#31763](https://github.com/frappe/erpnext/issues/31763)) ([#31766](https://github.com/frappe/erpnext/issues/31766)) ([3092131](3092131913))
* Make expense account editable in Purchase Receipt Item (backport [#31730](https://github.com/frappe/erpnext/issues/31730)) ([#31878](https://github.com/frappe/erpnext/issues/31878)) ([b637d4d](b637d4d5f1))
* Make expense account editable in Subcontracting Receipt Item (backport [#31848](https://github.com/frappe/erpnext/issues/31848)) ([#31870](https://github.com/frappe/erpnext/issues/31870)) ([aa5aaa1](aa5aaa113e))
* not able to issue expired batches ([ce5fc5b](ce5fc5b457))
* posting_date of linked vouchers should not affect outstanding ([0faa7b0](0faa7b0432))
* **projects:** Add missing comma ([623f56a](623f56a95c))
* set `billing_address` for purchases in `get_party_details` ([5a28ba8](5a28ba8537))
* set `company_address` for purchases in `party.js` ([4c82533](4c82533239))
* specify allowed doctype in queries (backport [#31761](https://github.com/frappe/erpnext/issues/31761)) ([#31764](https://github.com/frappe/erpnext/issues/31764)) ([6dce122](6dce122825))
* Transit filter for Default Target Warehouse in SE (backport [#31839](https://github.com/frappe/erpnext/issues/31839)) ([#31873](https://github.com/frappe/erpnext/issues/31873)) ([04d3571](04d3571dd9))
2022-08-18 08:30:58 +00:00
Deepesh Garg
216cb9b07b Merge pull request #31881 from frappe/version-14-hotfix
chore: weekly version-14 release
2022-08-18 13:59:28 +05:30
mergify[bot]
50ad612453 fix: Add dimension section in subcontracting doctypes (backport #31849) (#31877)
* fix: Add dimension section in subcontracting doctypes (#31849)

(cherry picked from commit 8704ca783d)

# Conflicts:
#	erpnext/patches.txt

* chore: conflicts

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-18 12:04:07 +05:30
Deepesh Garg
6b71af9008 Merge pull request #31883 from frappe/mergify/bp/version-14-hotfix/pr-31875
fix(projects): Add missing comma (backport #31875)
2022-08-18 11:20:55 +05:30
Deepesh Garg
3c8412efdb Merge pull request #31796 from frappe/mergify/bp/version-14-hotfix/pr-31737
fix: incorrect invoice outstanding in reconciliation tool (backport #31737)
2022-08-18 11:20:26 +05:30
Aditya Hase
623f56a95c fix(projects): Add missing comma
Added with https://github.com/frappe/erpnext/pull/31360

(cherry picked from commit d38778e400)
2022-08-18 05:49:58 +00:00
mergify[bot]
b637d4d5f1 fix: Make expense account editable in Purchase Receipt Item (backport #31730) (#31878)
fix: Make expense account editable in Purchase Receipt Item (#31730)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
(cherry picked from commit 1a6508972e)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2022-08-18 11:16:15 +05:30
rohitwaghchaure
601bc64618 Merge pull request #31869 from frappe/mergify/bp/version-14-hotfix/pr-31860
fix: delete custom fields on deletion of inventory dimension (backport #31860)
2022-08-17 21:45:57 +05:30
mergify[bot]
04d3571dd9 fix: Transit filter for Default Target Warehouse in SE (backport #31839) (#31873)
fix: Transit filter for Default Target Warehouse in SE (#31839)

(cherry picked from commit f1a612245c)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-17 17:26:15 +05:30
mergify[bot]
aa5aaa113e fix: Make expense account editable in Subcontracting Receipt Item (backport #31848) (#31870)
fix: Make expense account editable in Subcontracting Receipt Item (#31848)

(cherry picked from commit 2d04e71412)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-17 16:31:18 +05:30
Rohit Waghchaure
354a9d6169 fix: delete custom fields on deletion of inventory dimension
(cherry picked from commit 0b39a0123e)
2022-08-17 10:14:14 +00:00
rohitwaghchaure
c7e2217c92 Merge pull request #31867 from frappe/mergify/bp/version-14-hotfix/pr-31863
fix: not able to issue expired batches (backport #31863)
2022-08-17 15:43:32 +05:30
Rohit Waghchaure
ce5fc5b457 fix: not able to issue expired batches
(cherry picked from commit 795c94384a)
2022-08-17 09:16:57 +00:00
mergify[bot]
abe18945a6 fix: incorrect rate in BOM exploded items (backport #31513) (#31864)
fix: incorrect rate in BOM exploded items (#31513)

(cherry picked from commit 313625c349)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-17 14:37:40 +05:30
mergify[bot]
010a0ca0a9 fix: incorrect produced-qty in production-plan-item (backport #31706) (#31861)
fix: incorrect produced-qty in production-plan-item (#31706)

(cherry picked from commit 538cd6fdcf)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-17 13:46:33 +05:30
mergify[bot]
74664a34c0 fix: contact search in request for quotation (backport #31828) (#31840)
fix: contact search in request for quotation (#31828)

(cherry picked from commit e5e88bb9f1)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-15 12:19:59 +05:30
mergify[bot]
82f1dd268d fix: check item_code in all rows of po_items (backport #31741) (#31842)
fix: check item_code in all rows of po_items (#31741)

fix: check the item code in each row of PO items
(cherry picked from commit 0047e18a9b)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-14 16:00:54 +05:30
Deepesh Garg
1aa96defda fix: Unable to make payment entry against Fees using education app
(cherry picked from commit 79ac50d0f7)
2022-08-11 15:17:42 +00:00
Abhinav Raut
8fdbbf374d fix: term loan interest calculation
(cherry picked from commit 534d7ce64b)
2022-08-11 10:18:24 +00:00
Abhinav Raut
66e5202642 fix: process loan interest accrual
(cherry picked from commit 9ef8d5c5c3)
2022-08-11 10:18:24 +00:00
Nabin Hait
35e9bfca38 fix: map old data as per new options of no-of-employees
(cherry picked from commit 909945c0ac)
2022-08-09 15:18:25 +00:00
Nabin Hait
735a60807a fix: limited options for no-of-employees in crm
(cherry picked from commit 7ecd67605f)
2022-08-09 15:18:25 +00:00
mergify[bot]
c3fd802351 refactor: use browser native lazy loading (backport #31814) (#31815)
refactor: use browser native lazy loading (#31814)

(cherry picked from commit 08d7c48dc7)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-08-09 18:51:27 +05:30
Deepesh Garg
6046f8bc5e Merge pull request #31798 from frappe/mergify/bp/version-14-hotfix/pr-31779
Bug add accouting dimension in asset repair (backport #31779)
2022-08-09 17:58:35 +05:30
Akash Krishna
d7db8ed12e Tds report (#31801)
* fix: TDS Computation Summary Report not loading, too many values to unpack

(cherry picked from commit 32b30bc5de)
2022-08-09 12:12:33 +00:00
Sagar Vora
adcd21724b Merge pull request #31793 from frappe/mergify/bp/version-14-hotfix/pr-31733
fix: set `billing_address` for purchases in `get_party_details` (backport #31733)
2022-08-08 12:09:43 +00:00
ruthra kumar
04bdff736b chore: patch for creating existing dimensions in asset repair
(cherry picked from commit 80f508c4b1)
2022-08-08 11:10:25 +00:00
ruthra kumar
65bb1d8cc2 fix: add asset repair to accounting dimension list
(cherry picked from commit 452584c4bd)
2022-08-08 11:10:25 +00:00
Deepesh Garg
ebf766cf62 Merge pull request #31794 from frappe/mergify/bp/version-14-hotfix/pr-31777
fix: intercompany SO created from Purchase Order throws exception (backport #31777)
2022-08-08 16:36:46 +05:30
ruthra kumar
80bf47170f test: posting_date should not affect outstanding amount calculation
(cherry picked from commit ef312b8fc4)
2022-08-08 10:59:05 +00:00
ruthra kumar
0faa7b0432 fix: posting_date of linked vouchers should not affect outstanding
posting_date filter should not be applied for linked vouchers.

(cherry picked from commit 5f1562c5b2)
2022-08-08 10:59:05 +00:00
ruthra kumar
1d1f12f949 fix: intercompany SO throws exception
(cherry picked from commit af0a353b79)
2022-08-08 10:36:55 +00:00
Sagar Vora
4c82533239 fix: set company_address for purchases in party.js
(cherry picked from commit d05082987f)
2022-08-08 07:31:44 +00:00
Sagar Vora
5a28ba8537 fix: set billing_address for purchases in get_party_details
(cherry picked from commit a3625b3817)
2022-08-08 07:31:44 +00:00
mergify[bot]
8737c10ce4 fix(ecommerce): remove query to non-existing field (backport #31771) (#31773)
fix(ecommerce): remove query to non-existing field (#31771)

(cherry picked from commit 17b9bfd249)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-08-03 16:49:16 +05:30
Ankush Menat
2defb89962 ci: fix automated release regex (#31770)
[skip ci]
2022-08-03 16:15:32 +05:30
mergify[bot]
53b9d61c46 fix: getting error to show sales invoice group or print rep… (backport #31756) (#31767)
fix: getting error to show sales invoice group or print rep… (#31756)

fix: formatter getting error to show sales invoice group or print report.

1 - When I view the Gross Profit report in Sales Invoice mode, the table is all broken.
Error on browser console:
TypeError: Cannot read properties of undefined (reading 'indent')

2 - When I try to print, no matter the Group (Sales Invoice, Item Code, Item Group...) nothing happens. in browser log console I have the following error:
TypeError: Cannot read properties of undefined (reading 'content')

i fixed both errors and all working perfectly.

(cherry picked from commit ea88451875)

Co-authored-by: HarryPaulo <paulo_fabris@hotmail.com>
2022-08-03 11:22:54 +05:30
mergify[bot]
3092131913 fix: linter (backport #31763) (#31766)
fix: linter (#31763)

(cherry picked from commit 9c580dde39)

Co-authored-by: Devin Slauenwhite <devin.slauenwhite@gmail.com>
2022-08-03 11:17:44 +05:30
mergify[bot]
6dce122825 fix: specify allowed doctype in queries (backport #31761) (#31764)
fix: specify allowed doctype in queries (#31761)

(cherry picked from commit 9baa222976)

Co-authored-by: Sagar Vora <sagar@resilient.tech>
2022-08-03 11:16:41 +05:30
Ankush Menat
248cc48842 ci: setup releases for v14 (#31759)
[skip ci]
2022-08-02 12:11:36 +05:30
Deepesh Garg
ebd8f2f45b chore: verison bump and change log 2022-08-01 22:29:34 +05:30
1666 changed files with 164825 additions and 104050 deletions

View File

@@ -2,32 +2,65 @@
"env": {
"browser": true,
"node": true,
"es2022": true
"es6": true
},
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module"
},
"extends": "eslint:recommended",
"rules": {
"indent": "off",
"brace-style": "off",
"no-mixed-spaces-and-tabs": "off",
"no-useless-escape": "off",
"space-unary-ops": ["error", { "words": true }],
"linebreak-style": "off",
"quotes": ["off"],
"semi": "off",
"camelcase": "off",
"no-unused-vars": "off",
"no-console": ["warn"],
"no-extra-boolean-cast": ["off"],
"no-control-regex": ["off"]
"indent": [
"error",
"tab",
{ "SwitchCase": 1 }
],
"brace-style": [
"error",
"1tbs"
],
"space-unary-ops": [
"error",
{ "words": true }
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"off"
],
"semi": [
"warn",
"always"
],
"camelcase": [
"off"
],
"no-unused-vars": [
"warn"
],
"no-redeclare": [
"warn"
],
"no-console": [
"warn"
],
"no-extra-boolean-cast": [
"off"
],
"no-control-regex": [
"off"
],
"space-before-blocks": "warn",
"keyword-spacing": "warn",
"comma-spacing": "warn",
"key-spacing": "warn"
},
"root": true,
"globals": {
"frappe": true,
"Vue": true,
"SetVueGlobals": true,
"erpnext": true,
"hub": true,
"$": true,
@@ -64,10 +97,8 @@
"is_null": true,
"in_list": true,
"has_common": true,
"posthog": true,
"has_words": true,
"validate_email": true,
"open_web_template_values_editor": true,
"get_number_format": true,
"format_number": true,
"format_currency": true,
@@ -123,6 +154,7 @@
"before": true,
"beforeEach": true,
"onScan": true,
"html2canvas": true,
"extend_cscript": true,
"localforage": true
}

View File

@@ -66,8 +66,7 @@ ignore =
F841,
E713,
E712,
B023,
B028
B023
max-line-length = 200

View File

@@ -3,71 +3,52 @@ import requests
from urllib.parse import urlparse
WEBSITE_REPOS = [
docs_repos = [
"frappe_docs",
"erpnext_documentation",
"erpnext_com",
"frappe_io",
]
DOCUMENTATION_DOMAINS = [
"docs.erpnext.com",
"frappeframework.com",
]
def uri_validator(x):
result = urlparse(x)
return all([result.scheme, result.netloc, result.path])
def is_valid_url(url: str) -> bool:
parts = urlparse(url)
return all((parts.scheme, parts.netloc, parts.path))
def is_documentation_link(word: str) -> bool:
if not word.startswith("http") or not is_valid_url(word):
return False
parsed_url = urlparse(word)
if parsed_url.netloc in DOCUMENTATION_DOMAINS:
return True
if parsed_url.netloc == "github.com":
parts = parsed_url.path.split("/")
if len(parts) == 5 and parts[1] == "frappe" and parts[2] in WEBSITE_REPOS:
return True
return False
def contains_documentation_link(body: str) -> bool:
return any(
is_documentation_link(word)
for line in body.splitlines()
for word in line.split()
)
def check_pull_request(number: str) -> "tuple[int, str]":
response = requests.get(f"https://api.github.com/repos/frappe/erpnext/pulls/{number}")
if not response.ok:
return 1, "Pull Request Not Found! ⚠️"
payload = response.json()
title = (payload.get("title") or "").lower().strip()
head_sha = (payload.get("head") or {}).get("sha")
body = (payload.get("body") or "").lower()
if (
not title.startswith("feat")
or not head_sha
or "no-docs" in body
or "backport" in body
):
return 0, "Skipping documentation checks... 🏃"
if contains_documentation_link(body):
return 0, "Documentation Link Found. You're Awesome! 🎉"
return 1, "Documentation Link Not Found! ⚠️"
def docs_link_exists(body):
for line in body.splitlines():
for word in line.split():
if word.startswith('http') and uri_validator(word):
parsed_url = urlparse(word)
if parsed_url.netloc == "github.com":
parts = parsed_url.path.split('/')
if len(parts) == 5 and parts[1] == "frappe" and parts[2] in docs_repos:
return True
elif parsed_url.netloc == "docs.erpnext.com":
return True
if __name__ == "__main__":
exit_code, message = check_pull_request(sys.argv[1])
print(message)
sys.exit(exit_code)
pr = sys.argv[1]
response = requests.get("https://api.github.com/repos/frappe/erpnext/pulls/{}".format(pr))
if response.ok:
payload = response.json()
title = (payload.get("title") or "").lower().strip()
head_sha = (payload.get("head") or {}).get("sha")
body = (payload.get("body") or "").lower()
if (title.startswith("feat")
and head_sha
and "no-docs" not in body
and "backport" not in body
):
if docs_link_exists(body):
print("Documentation Link Found. You're Awesome! 🎉")
else:
print("Documentation Link Not Found! ⚠️")
sys.exit(1)
else:
print("Skipping documentation checks... 🏃")

View File

@@ -4,15 +4,12 @@ set -e
cd ~ || exit
sudo apt update
sudo apt remove mysql-server mysql-client
sudo apt install libcups2-dev redis-server mariadb-client-10.6
sudo apt update && sudo apt install redis-server libcups2-dev
pip install frappe-bench
githubbranch=${GITHUB_BASE_REF:-${GITHUB_REF##*/}}
frappeuser=${FRAPPE_USER:-"frappe"}
frappebranch=${FRAPPE_BRANCH:-$githubbranch}
frappebranch=${FRAPPE_BRANCH:-${GITHUB_BASE_REF:-${GITHUB_REF##*/}}}
git clone "https://github.com/${frappeuser}/frappe" --branch "${frappebranch}" --depth 1
bench init --skip-assets --frappe-path ~/frappe --python "$(which python)" frappe-bench
@@ -27,14 +24,15 @@ fi
if [ "$DB" == "mariadb" ];then
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "SET GLOBAL character_set_server = 'utf8mb4'"
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
mysql --host 127.0.0.1 --port 3306 -u root -e "SET GLOBAL character_set_server = 'utf8mb4'"
mysql --host 127.0.0.1 --port 3306 -u root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "CREATE DATABASE test_frappe"
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"
mysql --host 127.0.0.1 --port 3306 -u root -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"
mysql --host 127.0.0.1 --port 3306 -u root -e "CREATE DATABASE test_frappe"
mysql --host 127.0.0.1 --port 3306 -u root -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "FLUSH PRIVILEGES"
mysql --host 127.0.0.1 --port 3306 -u root -e "UPDATE mysql.user SET Password=PASSWORD('travis') WHERE User='root'"
mysql --host 127.0.0.1 --port 3306 -u root -e "FLUSH PRIVILEGES"
fi
if [ "$DB" == "postgres" ];then
@@ -44,17 +42,12 @@ fi
install_whktml() {
if [ "$(lsb_release -rs)" = "22.04" ]; then
wget -O /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo apt install /tmp/wkhtmltox.deb
else
echo "Please update this script to support wkhtmltopdf for $(lsb_release -ds)"
exit 1
fi
wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
tar -xf /tmp/wkhtmltox.tar.xz -C /tmp
sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
sudo chmod o+x /usr/local/bin/wkhtmltopdf
}
install_whktml &
wkpid=$!
cd ~/frappe-bench || exit
@@ -63,13 +56,11 @@ sed -i 's/schedule:/# schedule:/g' Procfile
sed -i 's/socketio:/# socketio:/g' Procfile
sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile
bench get-app payments --branch ${githubbranch%"-hotfix"}
bench get-app payments
bench get-app erpnext "${GITHUB_WORKSPACE}"
if [ "$TYPE" == "server" ]; then bench setup requirements --dev; fi
wait $wkpid
bench start &>> ~/frappe-bench/bench_start.log &
bench start &> bench_run_logs.txt &
CI=Yes bench build --app frappe &
bench --site test_site reinstall --yes

View File

@@ -9,8 +9,8 @@
"mail_password": "test",
"admin_password": "admin",
"root_login": "root",
"root_password": "root",
"root_password": "travis",
"host_name": "http://test_site:8000",
"install_apps": ["payments", "erpnext"],
"install_apps": ["erpnext"],
"throttle_user_limit": 100
}

60
.github/helper/translation.py vendored Normal file
View File

@@ -0,0 +1,60 @@
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*?.*?\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[\"']")
starts_with_f_pattern = re.compile(r"_\(f")
# skip first argument
files = sys.argv[1:]
files_to_scan = [_file for _file in files if _file.endswith(('.py', '.js'))]
for _file in files_to_scan:
with open(_file, 'r') as f:
print(f'Checking: {_file}')
file_lines = f.readlines()
for line_number, line in enumerate(file_lines, 1):
if 'frappe-lint: disable-translate' in line:
continue
start_matches = start_pattern.search(line)
if start_matches:
starts_with_f = starts_with_f_pattern.search(line)
if starts_with_f:
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}\n{line.strip()[:100]}')
continue
else:
continue
match = pattern.search(line)
error_found = False
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:]
match = pattern.match(line)
if not match:
error_found = True
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}\n{line.strip()[:100]}')
if error_found:
errors_encounter += 1
if errors_encounter > 0:
print('\nVisit "https://frappeframework.com/docs/user/en/translations" to learn about valid translation strings.')
sys.exit(1)
else:
print('\nGood To Go!')

26
.github/workflows/backport.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Backport
on:
pull_request_target:
types:
- closed
- labeled
jobs:
main:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout Actions
uses: actions/checkout@v2
with:
repository: "frappe/backport"
path: ./actions
ref: develop
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run backport
uses: ./actions/backport
with:
token: ${{secrets.BACKPORT_BOT_TOKEN}}
labelsToAdd: "backport"
title: "{{originalTitle}}"

View File

@@ -9,22 +9,21 @@ jobs:
name: linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v2
with:
python-version: '3.10'
cache: pip
- name: Install and Run Pre-commit
uses: pre-commit/action@v3.0.0
uses: pre-commit/action@v2.0.3
- name: Download Semgrep rules
run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules
- name: Download semgrep
run: pip install semgrep
run: pip install semgrep==0.97.0
- name: Run Semgrep rules
run: semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness

View File

@@ -11,7 +11,7 @@ on:
workflow_dispatch:
concurrency:
group: patch-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
group: patch-develop-${{ github.event.number }}
cancel-in-progress: true
jobs:
@@ -23,12 +23,12 @@ jobs:
services:
mysql:
image: mariadb:10.6
image: mariadb:10.3
env:
MARIADB_ROOT_PASSWORD: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: YES
ports:
- 3306:3306
options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Clone
@@ -43,14 +43,14 @@ jobs:
fi
- name: Setup Python
uses: "actions/setup-python@v4"
uses: "gabrielfalcao/pyenv-action@v9"
with:
python-version: '3.10'
versions: 3.10:latest, 3.7:latest
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 18
node-version: 14
check-latest: true
- name: Add to Hosts
@@ -92,6 +92,7 @@ jobs:
- name: Install
run: |
pip install frappe-bench
pyenv global $(pyenv versions | grep '3.10')
bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
env:
DB: mariadb
@@ -100,60 +101,42 @@ jobs:
- name: Run Patch Tests
run: |
cd ~/frappe-bench/
bench remove-app payments --force
jq 'del(.install_apps)' ~/frappe-bench/sites/test_site/site_config.json > tmp.json
mv tmp.json ~/frappe-bench/sites/test_site/site_config.json
wget https://erpnext.com/files/v13-erpnext.sql.gz
bench --site test_site --force restore ~/frappe-bench/v13-erpnext.sql.gz
wget https://erpnext.com/files/v10-erpnext.sql.gz
bench --site test_site --force restore ~/frappe-bench/v10-erpnext.sql.gz
git -C "apps/frappe" remote set-url upstream https://github.com/frappe/frappe.git
git -C "apps/erpnext" remote set-url upstream https://github.com/frappe/erpnext.git
pyenv global $(pyenv versions | grep '3.7')
for version in $(seq 12 13)
do
echo "Updating to v$version"
branch_name="version-$version-hotfix"
function update_to_version() {
version=$1
git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name
git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name
branch_name="version-$version-hotfix"
echo "Updating to v$version"
git -C "apps/frappe" checkout -q -f $branch_name
git -C "apps/erpnext" checkout -q -f $branch_name
# Fetch and checkout branches
git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name
git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name
git -C "apps/frappe" checkout -q -f $branch_name
git -C "apps/erpnext" checkout -q -f $branch_name
rm -rf ~/frappe-bench/env
bench setup env
bench pip install -e ./apps/payments
bench pip install -e ./apps/erpnext
# Resetup env and install apps
pgrep honcho | xargs kill
rm -rf ~/frappe-bench/env
bench -v setup env
bench pip install -e ./apps/erpnext
bench start &>> ~/frappe-bench/bench_start.log &
bench --site test_site migrate
done
bench --site test_site migrate
}
update_to_version 14
echo "Updating to latest version"
git -C "apps/frappe" checkout -q -f "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}"
git -C "apps/erpnext" checkout -q -f "$GITHUB_SHA"
pgrep honcho | xargs kill
pyenv global $(pyenv versions | grep '3.10')
rm -rf ~/frappe-bench/env
bench -v setup env
bench pip install -e ./apps/payments
bench pip install -e ./apps/erpnext
bench start &>> ~/frappe-bench/bench_start.log &
bench --site test_site migrate
- name: Show bench output
if: ${{ always() }}
run: |
cd ~/frappe-bench
cat bench_start.log || true
cd logs
for f in ./*.log*; do
echo "Printing log: $f";
cat $f
done
bench --site test_site install-app payments

View File

@@ -2,14 +2,14 @@ name: Generate Semantic Release
on:
push:
branches:
- version-15
- version-14
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Entire Repository
uses: actions/checkout@v4
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
@@ -17,7 +17,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
node-version: 16
- name: Setup dependencies
run: |

View File

@@ -1,38 +0,0 @@
# This action:
#
# 1. Generates release notes using github API.
# 2. Strips unnecessary info like chore/style etc from notes.
# 3. Updates release info.
# This action needs to be maintained on all branches that do releases.
name: 'Release Notes'
on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag of release like v13.0.0'
required: true
type: string
release:
types: [released]
permissions:
contents: read
jobs:
regen-notes:
name: 'Regenerate release notes'
runs-on: ubuntu-latest
steps:
- name: Update notes
run: |
NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/generate-notes -f tag_name=$RELEASE_TAG | jq -r '.body' | sed -E '/^\* (chore|ci|test|docs|style)/d' )
RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/tags/$RELEASE_TAG | jq -r '.id')
gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/$RELEASE_ID -f body="$NEW_NOTES"
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
RELEASE_TAG: ${{ github.event.inputs.tag_name || github.event.release.tag_name }}

View File

@@ -21,7 +21,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 14
check-latest: true
- name: Check commit titles

View File

@@ -7,24 +7,27 @@ on:
- '**.css'
- '**.md'
- '**.html'
schedule:
# Run everday at midnight UTC / 5:30 IST
- cron: "0 0 * * *"
- '**.csv'
push:
branches: [ develop ]
paths-ignore:
- '**.js'
- '**.md'
workflow_dispatch:
inputs:
user:
description: 'Frappe Framework repository user (add your username for forks)'
description: 'user'
required: true
default: 'frappe'
type: string
branch:
description: 'Frappe Framework branch'
description: 'Branch name'
default: 'develop'
required: false
type: string
concurrency:
group: server-mariadb-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
group: server-mariadb-develop-${{ github.event.number }}
cancel-in-progress: true
jobs:
@@ -36,18 +39,18 @@ jobs:
fail-fast: false
matrix:
container: [1, 2, 3, 4]
container: [1, 2, 3]
name: Python Unit Tests
services:
mysql:
image: mariadb:10.6
image: mariadb:10.3
env:
MARIADB_ROOT_PASSWORD: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: YES
ports:
- 3306:3306
options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Clone
@@ -56,7 +59,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
python-version: '3.10'
- name: Check for valid Python & Merge Conflicts
run: |
@@ -69,7 +72,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 18
node-version: 14
check-latest: true
- name: Add to Hosts
@@ -117,12 +120,7 @@ jobs:
FRAPPE_BRANCH: ${{ github.event.inputs.branch }}
- name: Run Tests
run: 'cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --total-builds 4 --build-number ${{ matrix.container }}'
run: 'cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --total-builds 3 --build-number ${{ matrix.container }}'
env:
TYPE: server
CI_BUILD_ID: ${{ github.run_id }}
ORCHESTRATOR_URL: http://test-orchestrator.frappe.io
- name: Show bench output
if: ${{ always() }}
run: cat ~/frappe-bench/bench_start.log || true

View File

@@ -9,7 +9,7 @@ on:
types: [opened, labelled, synchronize, reopened]
concurrency:
group: server-postgres-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
group: server-postgres-develop-${{ github.event.number }}
cancel-in-progress: true
jobs:
@@ -59,7 +59,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 18
node-version: 14
check-latest: true
- name: Add to Hosts

View File

@@ -9,14 +9,11 @@ pull_request_rules:
- author!=nabinhait
- author!=ankush
- author!=deepeshgarg007
- author!=frappe-pr-bot
- author!=mergify[bot]
- or:
- base=version-13
- base=version-12
- base=version-14
- base=version-15
actions:
close:
comment:

View File

@@ -16,31 +16,12 @@ repos:
- id: check-merge-conflict
- id: check-ast
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.44.0
hooks:
- id: eslint
types_or: [javascript]
args: ['--quiet']
# Ignore any files that might contain jinja / bundles
exclude: |
(?x)^(
erpnext/public/dist/.*|
cypress/.*|
.*node_modules.*|
.*boilerplate.*|
erpnext/public/js/controllers/.*|
erpnext/templates/pages/order.js|
erpnext/templates/includes/.*
)$
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: [
'flake8-bugbear',
'flake8-tuple',
]
args: ['--config', '.github/helper/.flake8_strict']
exclude: ".*setup.py$"
@@ -51,8 +32,8 @@ repos:
- id: black
additional_dependencies: ['click==8.0.4']
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
- repo: https://github.com/timothycrosley/isort
rev: 5.9.1
hooks:
- id: isort
exclude: ".*setup.py$"

View File

@@ -1,5 +1,5 @@
{
"branches": ["version-15"],
"branches": ["version-14"],
"plugins": [
"@semantic-release/commit-analyzer", {
"preset": "angular",
@@ -10,7 +10,7 @@
"@semantic-release/release-notes-generator",
[
"@semantic-release/exec", {
"prepareCmd": 'sed -ir "s/[0-9]*\.[0-9]*\.[0-9]*/${nextRelease.version}/" erpnext/__init__.py'
"prepareCmd": 'sed -ir -E "s/\"[0-9]+\.[0-9]+\.[0-9]+\"/\"${nextRelease.version}\"/" erpnext/__init__.py'
}
],
[

View File

@@ -3,22 +3,26 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
erpnext/accounts/ @deepeshgarg007 @ruthra-kumar
erpnext/assets/ @anandbaburajan @deepeshgarg007
erpnext/regional @deepeshgarg007 @ruthra-kumar
erpnext/selling @deepeshgarg007 @ruthra-kumar
erpnext/support/ @deepeshgarg007
pos*
erpnext/accounts/ @nextchamp-saqib @deepeshgarg007 @ruthra-kumar
erpnext/assets/ @nextchamp-saqib @deepeshgarg007 @ruthra-kumar
erpnext/loan_management/ @nextchamp-saqib @deepeshgarg007
erpnext/regional @nextchamp-saqib @deepeshgarg007 @ruthra-kumar
erpnext/selling @nextchamp-saqib @deepeshgarg007 @ruthra-kumar
erpnext/support/ @nextchamp-saqib @deepeshgarg007
pos* @nextchamp-saqib
erpnext/buying/ @rohitwaghchaure @s-aga-r
erpnext/maintenance/ @rohitwaghchaure @s-aga-r
erpnext/manufacturing/ @rohitwaghchaure @s-aga-r
erpnext/quality_management/ @rohitwaghchaure @s-aga-r
erpnext/stock/ @rohitwaghchaure @s-aga-r
erpnext/subcontracting @rohitwaghchaure @s-aga-r
erpnext/controllers/ @deepeshgarg007 @rohitwaghchaure
erpnext/patches/ @deepeshgarg007
erpnext/crm/ @NagariaHussain
erpnext/education/ @rutwikhdev
erpnext/projects/ @ruchamahabal
.github/ @deepeshgarg007
pyproject.toml @phot0n
erpnext/controllers/ @deepeshgarg007 @nextchamp-saqib @rohitwaghchaure
erpnext/patches/ @deepeshgarg007 @nextchamp-saqib
.github/ @ankush
pyproject.toml @ankush

View File

@@ -65,7 +65,7 @@ New passwords will be created for the ERPNext "Administrator" user, the MariaDB
1. [Frappe School](https://frappe.school) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
2. [Official documentation](https://docs.erpnext.com/) - Extensive documentation for ERPNext.
3. [Discussion Forum](https://discuss.erpnext.com/) - Engage with community of ERPNext users and service providers.
4. [Telegram Group](https://erpnext_public.t.me) - Get instant help from huge community of users.
4. [Telegram Group](https://t.me/erpnexthelp) - Get instant help from huge community of users.
## Contributing

View File

@@ -1,9 +1,8 @@
import functools
import inspect
import frappe
__version__ = "15.1.0"
__version__ = "14.10.1"
def get_default_company(user=None):
@@ -121,14 +120,12 @@ def get_region(company=None):
You can also set global company flag in `frappe.flags.company`
"""
if not company:
company = frappe.local.flags.company
if company:
return frappe.get_cached_value("Company", company, "country")
return frappe.flags.country or frappe.get_system_settings("country")
if company or frappe.flags.company:
return frappe.get_cached_value("Company", company or frappe.flags.company, "country")
elif frappe.flags.country:
return frappe.flags.country
else:
return frappe.get_system_settings("country")
def allow_regional(fn):
@@ -139,7 +136,6 @@ def allow_regional(fn):
def myfunction():
pass"""
@functools.wraps(fn)
def caller(*args, **kwargs):
overrides = frappe.get_hooks("regional_overrides", {}).get(get_region())
function_path = f"{inspect.getmodule(fn).__name__}.{fn.__name__}"

View File

@@ -4,19 +4,18 @@
"creation": "2020-07-17 11:25:34.593061",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"erpnext.utils.get_fiscal_year()\",\"to_fiscal_year\":\"erpnext.utils.get_fiscal_year()\"}",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"frappe.sys_defaults.fiscal_year\",\"to_fiscal_year\":\"frappe.sys_defaults.fiscal_year\"}",
"filters_json": "{\"period\":\"Monthly\",\"budget_against\":\"Cost Center\",\"show_cumulative\":0}",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"modified": "2023-07-19 13:13:13.307073",
"modified": "2020-07-22 12:24:49.144210",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Variance",
"number_of_groups": 0,
"owner": "Administrator",
"report_name": "Budget Variance Report",
"roles": [],
"timeseries": 0,
"type": "Bar",
"use_report_chart": 1,

View File

@@ -4,19 +4,18 @@
"creation": "2020-07-17 11:25:34.448572",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"erpnext.utils.get_fiscal_year()\",\"to_fiscal_year\":\"erpnext.utils.get_fiscal_year()\"}",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"frappe.sys_defaults.fiscal_year\",\"to_fiscal_year\":\"frappe.sys_defaults.fiscal_year\"}",
"filters_json": "{\"filter_based_on\":\"Fiscal Year\",\"period_start_date\":\"2020-04-01\",\"period_end_date\":\"2021-03-31\",\"periodicity\":\"Yearly\",\"include_default_book_entries\":1}",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"modified": "2023-07-19 13:08:56.470390",
"modified": "2020-07-22 12:33:48.888943",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Profit and Loss",
"number_of_groups": 0,
"owner": "Administrator",
"report_name": "Profit and Loss Statement",
"roles": [],
"timeseries": 0,
"type": "Bar",
"use_report_chart": 1,

View File

@@ -76,7 +76,7 @@ def get(
def build_result(account, dates, gl_entries):
result = [[getdate(date), 0.0] for date in dates]
root_type = frappe.get_cached_value("Account", account, "root_type")
root_type = frappe.db.get_value("Account", account, "root_type")
# start with the first date
date_index = 0

View File

@@ -136,7 +136,7 @@ def convert_deferred_revenue_to_income(
send_mail(deferred_process)
def get_booking_dates(doc, item, posting_date=None, prev_posting_date=None):
def get_booking_dates(doc, item, posting_date=None):
if not posting_date:
posting_date = add_days(today(), -1)
@@ -146,42 +146,39 @@ def get_booking_dates(doc, item, posting_date=None, prev_posting_date=None):
"deferred_revenue_account" if doc.doctype == "Sales Invoice" else "deferred_expense_account"
)
if not prev_posting_date:
prev_gl_entry = frappe.db.sql(
"""
select name, posting_date from `tabGL Entry` where company=%s and account=%s and
voucher_type=%s and voucher_no=%s and voucher_detail_no=%s
and is_cancelled = 0
order by posting_date desc limit 1
""",
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
as_dict=True,
)
prev_gl_entry = frappe.db.sql(
"""
select name, posting_date from `tabGL Entry` where company=%s and account=%s and
voucher_type=%s and voucher_no=%s and voucher_detail_no=%s
and is_cancelled = 0
order by posting_date desc limit 1
""",
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
as_dict=True,
)
prev_gl_via_je = frappe.db.sql(
"""
SELECT p.name, p.posting_date FROM `tabJournal Entry` p, `tabJournal Entry Account` c
WHERE p.name = c.parent and p.company=%s and c.account=%s
and c.reference_type=%s and c.reference_name=%s
and c.reference_detail_no=%s and c.docstatus < 2 order by posting_date desc limit 1
""",
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
as_dict=True,
)
prev_gl_via_je = frappe.db.sql(
"""
SELECT p.name, p.posting_date FROM `tabJournal Entry` p, `tabJournal Entry Account` c
WHERE p.name = c.parent and p.company=%s and c.account=%s
and c.reference_type=%s and c.reference_name=%s
and c.reference_detail_no=%s and c.docstatus < 2 order by posting_date desc limit 1
""",
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
as_dict=True,
)
if prev_gl_via_je:
if (not prev_gl_entry) or (
prev_gl_entry and prev_gl_entry[0].posting_date < prev_gl_via_je[0].posting_date
):
prev_gl_entry = prev_gl_via_je
if prev_gl_entry:
start_date = getdate(add_days(prev_gl_entry[0].posting_date, 1))
else:
start_date = item.service_start_date
if prev_gl_via_je:
if (not prev_gl_entry) or (
prev_gl_entry and prev_gl_entry[0].posting_date < prev_gl_via_je[0].posting_date
):
prev_gl_entry = prev_gl_via_je
if prev_gl_entry:
start_date = getdate(add_days(prev_gl_entry[0].posting_date, 1))
else:
start_date = getdate(add_days(prev_posting_date, 1))
start_date = item.service_start_date
end_date = get_last_day(start_date)
if end_date >= item.service_end_date:
end_date = item.service_end_date
@@ -341,18 +338,12 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
"enable_deferred_revenue" if doc.doctype == "Sales Invoice" else "enable_deferred_expense"
)
accounts_frozen_upto = frappe.db.get_single_value("Accounts Settings", "acc_frozen_upto")
accounts_frozen_upto = frappe.get_cached_value("Accounts Settings", "None", "acc_frozen_upto")
def _book_deferred_revenue_or_expense(
item,
via_journal_entry,
submit_journal_entry,
book_deferred_entries_based_on,
prev_posting_date=None,
item, via_journal_entry, submit_journal_entry, book_deferred_entries_based_on
):
start_date, end_date, last_gl_entry = get_booking_dates(
doc, item, posting_date=posting_date, prev_posting_date=prev_posting_date
)
start_date, end_date, last_gl_entry = get_booking_dates(doc, item, posting_date=posting_date)
if not (start_date and end_date):
return
@@ -386,12 +377,9 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
if not amount:
return
gl_posting_date = end_date
prev_posting_date = None
# check if books nor frozen till endate:
if accounts_frozen_upto and getdate(end_date) <= getdate(accounts_frozen_upto):
gl_posting_date = get_last_day(add_days(accounts_frozen_upto, 1))
prev_posting_date = end_date
if accounts_frozen_upto and (end_date) <= getdate(accounts_frozen_upto):
end_date = get_last_day(add_days(accounts_frozen_upto, 1))
if via_journal_entry:
book_revenue_via_journal_entry(
@@ -400,7 +388,7 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
debit_account,
amount,
base_amount,
gl_posting_date,
end_date,
project,
account_currency,
item.cost_center,
@@ -416,7 +404,7 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
against,
amount,
base_amount,
gl_posting_date,
end_date,
project,
account_currency,
item.cost_center,
@@ -430,11 +418,7 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
if getdate(end_date) < getdate(posting_date) and not last_gl_entry:
_book_deferred_revenue_or_expense(
item,
via_journal_entry,
submit_journal_entry,
book_deferred_entries_based_on,
prev_posting_date,
item, via_journal_entry, submit_journal_entry, book_deferred_entries_based_on
)
via_journal_entry = cint(

View File

@@ -1,83 +1,67 @@
// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.ui.form.on("Account", {
setup: function (frm) {
frm.add_fetch("parent_account", "report_type", "report_type");
frm.add_fetch("parent_account", "root_type", "root_type");
frappe.ui.form.on('Account', {
setup: function(frm) {
frm.add_fetch('parent_account', 'report_type', 'report_type');
frm.add_fetch('parent_account', 'root_type', 'root_type');
},
onload: function (frm) {
frm.set_query("parent_account", function (doc) {
onload: function(frm) {
frm.set_query('parent_account', function(doc) {
return {
filters: {
is_group: 1,
company: doc.company,
},
"is_group": 1,
"company": doc.company
}
};
});
},
refresh: function (frm) {
frm.toggle_display("account_name", frm.is_new());
refresh: function(frm) {
frm.toggle_display('account_name', frm.is_new());
// hide fields if group
frm.toggle_display(["tax_rate"], cint(frm.doc.is_group) == 0);
frm.toggle_display(['account_type', 'tax_rate'], cint(frm.doc.is_group) == 0);
// disable fields
frm.toggle_enable(["is_group", "company"], false);
frm.toggle_enable(['is_group', 'company'], false);
if (cint(frm.doc.is_group) == 0) {
frm.toggle_display(
"freeze_account",
frm.doc.__onload && frm.doc.__onload.can_freeze_account
);
frm.toggle_display('freeze_account', frm.doc.__onload
&& frm.doc.__onload.can_freeze_account);
}
// read-only for root accounts
if (!frm.is_new()) {
if (!frm.doc.parent_account) {
frm.set_read_only();
frm.set_intro(
__("This is a root account and cannot be edited.")
);
frm.set_intro(__("This is a root account and cannot be edited."));
} else {
// credit days and type if customer or supplier
frm.set_intro(null);
frm.trigger("account_type");
frm.trigger('account_type');
// show / hide convert buttons
frm.trigger("add_toolbar_buttons");
frm.trigger('add_toolbar_buttons');
}
if (frm.has_perm("write")) {
frm.add_custom_button(
__("Merge Account"),
function () {
frm.trigger("merge_account");
},
__("Actions")
);
frm.add_custom_button(
__("Update Account Name / Number"),
function () {
frm.trigger("update_account_number");
},
__("Actions")
);
if (frm.has_perm('write')) {
frm.add_custom_button(__('Merge Account'), function () {
frm.trigger("merge_account");
}, __('Actions'));
frm.add_custom_button(__('Update Account Name / Number'), function () {
frm.trigger("update_account_number");
}, __('Actions'));
}
}
},
account_type: function (frm) {
if (frm.doc.is_group == 0) {
frm.toggle_display(["tax_rate"], frm.doc.account_type == "Tax");
frm.toggle_display("warehouse", frm.doc.account_type == "Stock");
frm.toggle_display(['tax_rate'], frm.doc.account_type == 'Tax');
frm.toggle_display('warehouse', frm.doc.account_type == 'Stock');
}
},
add_toolbar_buttons: function (frm) {
frm.add_custom_button(
__("Chart of Accounts"),
() => {
frappe.set_route("Tree", "Account");
},
__("View")
);
add_toolbar_buttons: function(frm) {
frm.add_custom_button(__('Chart of Accounts'), () => {
frappe.set_route("Tree", "Account");
}, __('View'));
if (frm.doc.is_group == 1) {
frm.add_custom_button(__('Convert to Non-Group'), function () {
@@ -95,88 +79,84 @@ frappe.ui.form.on("Account", {
frm.add_custom_button(__('General Ledger'), function () {
frappe.route_options = {
"account": frm.doc.name,
"from_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
"to_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
"from_date": frappe.sys_defaults.year_start_date,
"to_date": frappe.sys_defaults.year_end_date,
"company": frm.doc.company
};
frappe.set_route("query-report", "General Ledger");
}, __('View'));
frm.add_custom_button(
__("Convert to Group"),
function () {
return frappe.call({
doc: frm.doc,
method: "convert_ledger_to_group",
callback: function () {
frm.refresh();
},
});
},
__("Actions")
);
frm.add_custom_button(__('Convert to Group'), function () {
return frappe.call({
doc: frm.doc,
method: 'convert_ledger_to_group',
callback: function() {
frm.refresh();
}
});
}, __('Actions'));
}
},
merge_account: function (frm) {
merge_account: function(frm) {
var d = new frappe.ui.Dialog({
title: __("Merge with Existing Account"),
title: __('Merge with Existing Account'),
fields: [
{
label: "Name",
fieldname: "name",
fieldtype: "Data",
reqd: 1,
default: frm.doc.name,
},
"label" : "Name",
"fieldname": "name",
"fieldtype": "Data",
"reqd": 1,
"default": frm.doc.name
}
],
primary_action: function () {
primary_action: function() {
var data = d.get_values();
frappe.call({
method: "erpnext.accounts.doctype.account.account.merge_account",
args: {
old: frm.doc.name,
new: data.name,
is_group: frm.doc.is_group,
root_type: frm.doc.root_type,
company: frm.doc.company
},
callback: function (r) {
if (!r.exc) {
if (r.message) {
callback: function(r) {
if(!r.exc) {
if(r.message) {
frappe.set_route("Form", "Account", r.message);
}
d.hide();
}
},
}
});
},
primary_action_label: __("Merge"),
primary_action_label: __('Merge')
});
d.show();
},
update_account_number: function (frm) {
update_account_number: function(frm) {
var d = new frappe.ui.Dialog({
title: __("Update Account Number / Name"),
title: __('Update Account Number / Name'),
fields: [
{
label: "Account Name",
fieldname: "account_name",
fieldtype: "Data",
reqd: 1,
default: frm.doc.account_name,
"label": "Account Name",
"fieldname": "account_name",
"fieldtype": "Data",
"reqd": 1,
"default": frm.doc.account_name
},
{
label: "Account Number",
fieldname: "account_number",
fieldtype: "Data",
default: frm.doc.account_number,
},
"label": "Account Number",
"fieldname": "account_number",
"fieldtype": "Data",
"default": frm.doc.account_number
}
],
primary_action: function () {
primary_action: function() {
var data = d.get_values();
if (
data.account_number === frm.doc.account_number &&
data.account_name === frm.doc.account_name
) {
if(data.account_number === frm.doc.account_number && data.account_name === frm.doc.account_name) {
d.hide();
return;
}
@@ -186,29 +166,23 @@ frappe.ui.form.on("Account", {
args: {
account_number: data.account_number,
account_name: data.account_name,
name: frm.doc.name,
name: frm.doc.name
},
callback: function (r) {
if (!r.exc) {
if (r.message) {
callback: function(r) {
if(!r.exc) {
if(r.message) {
frappe.set_route("Form", "Account", r.message);
} else {
frm.set_value(
"account_number",
data.account_number
);
frm.set_value(
"account_name",
data.account_name
);
frm.set_value("account_number", data.account_number);
frm.set_value("account_name", data.account_name);
}
d.hide();
}
},
}
});
},
primary_action_label: __("Update"),
primary_action_label: __('Update')
});
d.show();
},
}
});

View File

@@ -18,6 +18,7 @@
"root_type",
"report_type",
"account_currency",
"inter_company_account",
"column_break1",
"parent_account",
"account_type",
@@ -33,11 +34,15 @@
{
"fieldname": "properties",
"fieldtype": "Section Break",
"oldfieldtype": "Section Break"
"oldfieldtype": "Section Break",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "column_break0",
"fieldtype": "Column Break",
"show_days": 1,
"show_seconds": 1,
"width": "50%"
},
{
@@ -48,7 +53,9 @@
"no_copy": 1,
"oldfieldname": "account_name",
"oldfieldtype": "Data",
"reqd": 1
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "account_number",
@@ -56,13 +63,17 @@
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Account Number",
"read_only": 1
"read_only": 1,
"show_days": 1,
"show_seconds": 1
},
{
"default": "0",
"fieldname": "is_group",
"fieldtype": "Check",
"label": "Is Group"
"label": "Is Group",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "company",
@@ -74,7 +85,9 @@
"options": "Company",
"read_only": 1,
"remember_last_selected_value": 1,
"reqd": 1
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "root_type",
@@ -82,7 +95,9 @@
"in_standard_filter": 1,
"label": "Root Type",
"options": "\nAsset\nLiability\nIncome\nExpense\nEquity",
"read_only": 1
"read_only": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "report_type",
@@ -90,18 +105,32 @@
"in_standard_filter": 1,
"label": "Report Type",
"options": "\nBalance Sheet\nProfit and Loss",
"read_only": 1
"read_only": 1,
"show_days": 1,
"show_seconds": 1
},
{
"depends_on": "eval:doc.is_group==0",
"fieldname": "account_currency",
"fieldtype": "Link",
"label": "Currency",
"options": "Currency"
"options": "Currency",
"show_days": 1,
"show_seconds": 1
},
{
"default": "0",
"fieldname": "inter_company_account",
"fieldtype": "Check",
"label": "Inter Company Account",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"show_days": 1,
"show_seconds": 1,
"width": "50%"
},
{
@@ -113,7 +142,9 @@
"oldfieldtype": "Link",
"options": "Account",
"reqd": 1,
"search_index": 1
"search_index": 1,
"show_days": 1,
"show_seconds": 1
},
{
"description": "Setting Account Type helps in selecting this Account in transactions.",
@@ -123,7 +154,9 @@
"label": "Account Type",
"oldfieldname": "account_type",
"oldfieldtype": "Select",
"options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nCurrent Asset\nCurrent Liability\nDepreciation\nDirect Expense\nDirect Income\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nIndirect Expense\nIndirect Income\nLiability\nPayable\nReceivable\nRound Off\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary"
"options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nDepreciation\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nPayable\nReceivable\nRound Off\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary",
"show_days": 1,
"show_seconds": 1
},
{
"description": "Rate at which this tax is applied",
@@ -131,7 +164,9 @@
"fieldtype": "Float",
"label": "Rate",
"oldfieldname": "tax_rate",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"show_days": 1,
"show_seconds": 1
},
{
"description": "If the account is frozen, entries are allowed to restricted users.",
@@ -140,13 +175,17 @@
"label": "Frozen",
"oldfieldname": "freeze_account",
"oldfieldtype": "Select",
"options": "No\nYes"
"options": "No\nYes",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "balance_must_be",
"fieldtype": "Select",
"label": "Balance must be",
"options": "\nDebit\nCredit"
"options": "\nDebit\nCredit",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "lft",
@@ -155,7 +194,9 @@
"label": "Lft",
"print_hide": 1,
"read_only": 1,
"search_index": 1
"search_index": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "rgt",
@@ -164,7 +205,9 @@
"label": "Rgt",
"print_hide": 1,
"read_only": 1,
"search_index": 1
"search_index": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "old_parent",
@@ -172,27 +215,33 @@
"hidden": 1,
"label": "Old Parent",
"print_hide": 1,
"read_only": 1
"read_only": 1,
"show_days": 1,
"show_seconds": 1
},
{
"default": "0",
"depends_on": "eval:(doc.report_type == 'Profit and Loss' && !doc.is_group)",
"fieldname": "include_in_gross",
"fieldtype": "Check",
"label": "Include in gross"
"label": "Include in gross",
"show_days": 1,
"show_seconds": 1
},
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disable"
"label": "Disable",
"show_days": 1,
"show_seconds": 1
}
],
"icon": "fa fa-money",
"idx": 1,
"is_tree": 1,
"links": [],
"modified": "2023-07-20 18:18:44.405723",
"modified": "2020-06-11 15:15:54.338622",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",
@@ -243,6 +292,7 @@
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 1,
"share": 1,
"write": 1
}
@@ -251,6 +301,5 @@
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "ASC",
"states": [],
"track_changes": 1
}

View File

@@ -18,10 +18,6 @@ class BalanceMismatchError(frappe.ValidationError):
pass
class InvalidAccountMergeError(frappe.ValidationError):
pass
class Account(NestedSet):
nsm_parent_field = "parent_account"
@@ -49,7 +45,6 @@ class Account(NestedSet):
if frappe.local.flags.allow_unverified_charts:
return
self.validate_parent()
self.validate_parent_child_account_type()
self.validate_root_details()
validate_field_number("Account", self.name, self.account_number, self.company, "account_number")
self.validate_group_or_ledger()
@@ -60,24 +55,10 @@ class Account(NestedSet):
self.validate_account_currency()
self.validate_root_company_and_sync_account_to_children()
def validate_parent_child_account_type(self):
if self.parent_account:
if self.account_type in [
"Direct Income",
"Indirect Income",
"Current Asset",
"Current Liability",
"Direct Expense",
"Indirect Expense",
]:
parent_account_type = frappe.db.get_value("Account", self.parent_account, ["account_type"])
if parent_account_type == self.account_type:
throw(_("Only Parent can be of type {0}").format(self.account_type))
def validate_parent(self):
"""Fetch Parent Details and validate parent account"""
if self.parent_account:
par = frappe.get_cached_value(
par = frappe.db.get_value(
"Account", self.parent_account, ["name", "is_group", "company"], as_dict=1
)
if not par:
@@ -101,7 +82,7 @@ class Account(NestedSet):
def set_root_and_report_type(self):
if self.parent_account:
par = frappe.get_cached_value(
par = frappe.db.get_value(
"Account", self.parent_account, ["report_type", "root_type"], as_dict=1
)
@@ -111,7 +92,7 @@ class Account(NestedSet):
self.root_type = par.root_type
if self.is_group:
db_value = self.get_doc_before_save()
db_value = frappe.db.get_value("Account", self.name, ["report_type", "root_type"], as_dict=1)
if db_value:
if self.report_type != db_value.report_type:
frappe.db.sql(
@@ -130,13 +111,13 @@ class Account(NestedSet):
)
def validate_root_details(self):
doc_before_save = self.get_doc_before_save()
if doc_before_save and not doc_before_save.parent_account:
throw(_("Root cannot be edited."), RootNotEditable)
# does not exists parent
if frappe.db.exists("Account", self.name):
if not frappe.db.get_value("Account", self.name, "parent_account"):
throw(_("Root cannot be edited."), RootNotEditable)
if not self.parent_account and not self.is_group:
throw(_("The root account {0} must be a group").format(frappe.bold(self.name)))
frappe.throw(_("The root account {0} must be a group").format(frappe.bold(self.name)))
def validate_root_company_and_sync_account_to_children(self):
# ignore validation while creating new compnay or while syncing to child companies
@@ -146,9 +127,7 @@ class Account(NestedSet):
return
ancestors = get_root_company(self.company)
if ancestors:
if frappe.get_cached_value(
"Company", self.company, "allow_account_creation_against_child_company"
):
if frappe.get_value("Company", self.company, "allow_account_creation_against_child_company"):
return
if not frappe.db.get_value(
"Account", {"account_name": self.account_name, "company": ancestors[0]}, "name"
@@ -159,7 +138,7 @@ class Account(NestedSet):
if not descendants:
return
parent_acc_name_map = {}
parent_acc_name, parent_acc_number = frappe.get_cached_value(
parent_acc_name, parent_acc_number = frappe.db.get_value(
"Account", self.parent_account, ["account_name", "account_number"]
)
filters = {
@@ -180,28 +159,27 @@ class Account(NestedSet):
self.create_account_for_child_company(parent_acc_name_map, descendants, parent_acc_name)
def validate_group_or_ledger(self):
doc_before_save = self.get_doc_before_save()
if not doc_before_save or cint(doc_before_save.is_group) == cint(self.is_group):
if self.get("__islocal"):
return
if self.check_gle_exists():
throw(_("Account with existing transaction cannot be converted to ledger"))
elif self.is_group:
if self.account_type and not self.flags.exclude_account_type_check:
throw(_("Cannot covert to Group because Account Type is selected."))
elif self.check_if_child_exists():
throw(_("Account with child nodes cannot be set as ledger"))
existing_is_group = frappe.db.get_value("Account", self.name, "is_group")
if cint(self.is_group) != cint(existing_is_group):
if self.check_gle_exists():
throw(_("Account with existing transaction cannot be converted to ledger"))
elif self.is_group:
if self.account_type and not self.flags.exclude_account_type_check:
throw(_("Cannot covert to Group because Account Type is selected."))
elif self.check_if_child_exists():
throw(_("Account with child nodes cannot be set as ledger"))
def validate_frozen_accounts_modifier(self):
doc_before_save = self.get_doc_before_save()
if not doc_before_save or doc_before_save.freeze_account == self.freeze_account:
return
frozen_accounts_modifier = frappe.get_cached_value(
"Accounts Settings", "Accounts Settings", "frozen_accounts_modifier"
)
if not frozen_accounts_modifier or frozen_accounts_modifier not in frappe.get_roles():
throw(_("You are not authorized to set Frozen value"))
old_value = frappe.db.get_value("Account", self.name, "freeze_account")
if old_value and old_value != self.freeze_account:
frozen_accounts_modifier = frappe.db.get_value(
"Accounts Settings", None, "frozen_accounts_modifier"
)
if not frozen_accounts_modifier or frozen_accounts_modifier not in frappe.get_roles():
throw(_("You are not authorized to set Frozen value"))
def validate_balance_must_be_debit_or_credit(self):
from erpnext.accounts.utils import get_balance_on
@@ -223,11 +201,8 @@ class Account(NestedSet):
)
def validate_account_currency(self):
self.currency_explicitly_specified = True
if not self.account_currency:
self.account_currency = frappe.get_cached_value("Company", self.company, "default_currency")
self.currency_explicitly_specified = False
gl_currency = frappe.db.get_value("GL Entry", {"account": self.name}, "account_currency")
@@ -248,9 +223,9 @@ class Account(NestedSet):
)
# validate if parent of child company account to be added is a group
if frappe.get_cached_value(
"Account", self.parent_account, "is_group"
) and not frappe.get_cached_value("Account", parent_acc_name_map[company], "is_group"):
if frappe.db.get_value("Account", self.parent_account, "is_group") and not frappe.db.get_value(
"Account", parent_acc_name_map[company], "is_group"
):
msg = _(
"While creating account for Child Company {0}, parent account {1} found as a ledger account."
).format(company_bold, parent_acc_name_bold)
@@ -273,10 +248,8 @@ class Account(NestedSet):
{
"company": company,
# parent account's currency should be passed down to child account's curreny
# if currency explicitly specified by user, child will inherit. else, default currency will be used.
"account_currency": self.account_currency
if self.currency_explicitly_specified
else erpnext.get_company_currency(company),
# if it is None, it picks it up from default company currency, which might be unintended
"account_currency": erpnext.get_company_currency(company),
"parent_account": parent_acc_name_map[company],
}
)
@@ -404,27 +377,23 @@ def validate_account_number(name, account_number, company):
@frappe.whitelist()
def update_account_number(name, account_name, account_number=None, from_descendant=False):
account = frappe.get_cached_doc("Account", name)
account = frappe.db.get_value("Account", name, "company", as_dict=True)
if not account:
return
old_acc_name, old_acc_number = account.account_name, account.account_number
old_acc_name, old_acc_number = frappe.db.get_value(
"Account", name, ["account_name", "account_number"]
)
# check if account exists in parent company
ancestors = get_ancestors_of("Company", account.company)
allow_independent_account_creation = frappe.get_cached_value(
allow_independent_account_creation = frappe.get_value(
"Company", account.company, "allow_account_creation_against_child_company"
)
if ancestors and not allow_independent_account_creation:
for ancestor in ancestors:
old_name = frappe.db.get_value(
"Account",
{"account_number": old_acc_number, "account_name": old_acc_name, "company": ancestor},
"name",
)
if old_name:
if frappe.db.get_value("Account", {"account_name": old_acc_name, "company": ancestor}, "name"):
# same account in parent company exists
allow_child_account_creation = _("Allow Account Creation Against Child Company")
@@ -464,35 +433,24 @@ def update_account_number(name, account_name, account_number=None, from_descenda
@frappe.whitelist()
def merge_account(old, new):
def merge_account(old, new, is_group, root_type, company):
# Validate properties before merging
new_account = frappe.get_cached_doc("Account", new)
old_account = frappe.get_cached_doc("Account", old)
if not new_account:
if not frappe.db.exists("Account", new):
throw(_("Account {0} does not exist").format(new))
if (
cint(new_account.is_group),
new_account.root_type,
new_account.company,
cstr(new_account.account_currency),
) != (
cint(old_account.is_group),
old_account.root_type,
old_account.company,
cstr(old_account.account_currency),
):
val = list(frappe.db.get_value("Account", new, ["is_group", "root_type", "company"]))
if val != [cint(is_group), root_type, company]:
throw(
msg=_(
"""Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency"""
),
title=("Invalid Accounts"),
exc=InvalidAccountMergeError,
_(
"""Merging is only possible if following properties are same in both records. Is Group, Root Type, Company"""
)
)
if old_account.is_group and new_account.parent_account == old:
new_account.db_set("parent_account", frappe.get_cached_value("Account", old, "parent_account"))
if is_group and frappe.db.get_value("Account", new, "parent_account") == old:
frappe.db.set_value(
"Account", new, "parent_account", frappe.db.get_value("Account", old, "parent_account")
)
frappe.rename_doc("Account", old, new, merge=1, force=1)

View File

@@ -56,41 +56,36 @@ frappe.treeview_settings["Account"] = {
accounts = nodes;
}
frappe.db.get_single_value("Accounts Settings", "show_balance_in_coa").then((value) => {
if(value) {
const get_balances = frappe.call({
method: 'erpnext.accounts.utils.get_account_balances',
args: {
accounts: accounts,
company: cur_tree.args.company
},
});
const get_balances = frappe.call({
method: 'erpnext.accounts.utils.get_account_balances',
args: {
accounts: accounts,
company: cur_tree.args.company
},
});
get_balances.then(r => {
if (!r.message || r.message.length == 0) return;
get_balances.then(r => {
if (!r.message || r.message.length == 0) return;
for (let account of r.message) {
for (let account of r.message) {
const node = cur_tree.nodes && cur_tree.nodes[account.value];
if (!node || node.is_root) continue;
const node = cur_tree.nodes && cur_tree.nodes[account.value];
if (!node || node.is_root) continue;
// show Dr if positive since balance is calculated as debit - credit else show Cr
const balance = account.balance_in_account_currency || account.balance;
const dr_or_cr = balance > 0 ? "Dr": "Cr";
const format = (value, currency) => format_currency(Math.abs(value), currency);
// show Dr if positive since balance is calculated as debit - credit else show Cr
const balance = account.balance_in_account_currency || account.balance;
const dr_or_cr = balance > 0 ? "Dr": "Cr";
const format = (value, currency) => format_currency(Math.abs(value), currency);
if (account.balance!==undefined) {
node.parent && node.parent.find('.balance-area').remove();
$('<span class="balance-area pull-right">'
+ (account.balance_in_account_currency ?
(format(account.balance_in_account_currency, account.account_currency) + " / ") : "")
+ format(account.balance, account.company_currency)
+ " " + dr_or_cr
+ '</span>').insertBefore(node.$ul);
}
}
});
if (account.balance!==undefined) {
node.parent && node.parent.find('.balance-area').remove();
$('<span class="balance-area pull-right">'
+ (account.balance_in_account_currency ?
(format(account.balance_in_account_currency, account.account_currency) + " / ") : "")
+ format(account.balance, account.company_currency)
+ " " + dr_or_cr
+ '</span>').insertBefore(node.$ul);
}
}
});
},
@@ -194,8 +189,8 @@ frappe.treeview_settings["Account"] = {
click: function(node, btn) {
frappe.route_options = {
"account": node.label,
"from_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
"to_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
"from_date": frappe.sys_defaults.year_start_date,
"to_date": frappe.sys_defaults.year_end_date,
"company": frappe.treeview_settings['Account'].treeview.page.fields_dict.company.get_value()
};
frappe.set_route("query-report", "General Ledger");

View File

@@ -29,7 +29,6 @@ def create_charts(
"root_type",
"is_group",
"tax_rate",
"account_currency",
]:
account_number = cstr(child.get("account_number")).strip()
@@ -54,7 +53,7 @@ def create_charts(
"account_number": account_number,
"account_type": child.get("account_type"),
"account_currency": child.get("account_currency")
or frappe.get_cached_value("Company", company, "default_currency"),
or frappe.db.get_value("Company", company, "default_currency"),
"tax_rate": child.get("tax_rate"),
}
)
@@ -96,17 +95,7 @@ def identify_is_group(child):
is_group = child.get("is_group")
elif len(
set(child.keys())
- set(
[
"account_name",
"account_type",
"root_type",
"is_group",
"tax_rate",
"account_number",
"account_currency",
]
)
- set(["account_name", "account_type", "root_type", "is_group", "tax_rate", "account_number"])
):
is_group = 1
else:
@@ -159,7 +148,7 @@ def get_charts_for_country(country, with_standard=False):
) or frappe.local.flags.allow_unverified_charts:
charts.append(content["name"])
country_code = frappe.get_cached_value("Country", country, "code")
country_code = frappe.db.get_value("Country", country, "code")
if country_code:
folders = ("verified",)
if frappe.local.flags.allow_unverified_charts:
@@ -196,7 +185,6 @@ def get_account_tree_from_existing_company(existing_company):
"root_type",
"tax_rate",
"account_number",
"account_currency",
],
order_by="lft, rgt",
)
@@ -279,7 +267,6 @@ def build_tree_from_json(chart_template, chart_data=None, from_coa_importer=Fals
"root_type",
"is_group",
"tax_rate",
"account_currency",
]:
continue

View File

@@ -0,0 +1,289 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
"""
Import chart of accounts from OpenERP sources
"""
import ast
import json
import os
from xml.etree import ElementTree as ET
import frappe
from frappe.utils.csvutils import read_csv_content
path = "/Users/nabinhait/projects/odoo/addons"
accounts = {}
charts = {}
all_account_types = []
all_roots = {}
def go():
global accounts, charts
default_account_types = get_default_account_types()
country_dirs = []
for basepath, folders, files in os.walk(path):
basename = os.path.basename(basepath)
if basename.startswith("l10n_"):
country_dirs.append(basename)
for country_dir in country_dirs:
accounts, charts = {}, {}
country_path = os.path.join(path, country_dir)
manifest = ast.literal_eval(open(os.path.join(country_path, "__openerp__.py")).read())
data_files = (
manifest.get("data", []) + manifest.get("init_xml", []) + manifest.get("update_xml", [])
)
files_path = [os.path.join(country_path, d) for d in data_files]
xml_roots = get_xml_roots(files_path)
csv_content = get_csv_contents(files_path)
prefix = country_dir if csv_content else None
account_types = get_account_types(
xml_roots.get("account.account.type", []), csv_content.get("account.account.type", []), prefix
)
account_types.update(default_account_types)
if xml_roots:
make_maps_for_xml(xml_roots, account_types, country_dir)
if csv_content:
make_maps_for_csv(csv_content, account_types, country_dir)
make_account_trees()
make_charts()
create_all_roots_file()
def get_default_account_types():
default_types_root = []
default_types_root.append(
ET.parse(os.path.join(path, "account", "data", "data_account_type.xml")).getroot()
)
return get_account_types(default_types_root, None, prefix="account")
def get_xml_roots(files_path):
xml_roots = frappe._dict()
for filepath in files_path:
fname = os.path.basename(filepath)
if fname.endswith(".xml"):
tree = ET.parse(filepath)
root = tree.getroot()
for node in root[0].findall("record"):
if node.get("model") in [
"account.account.template",
"account.chart.template",
"account.account.type",
]:
xml_roots.setdefault(node.get("model"), []).append(root)
break
return xml_roots
def get_csv_contents(files_path):
csv_content = {}
for filepath in files_path:
fname = os.path.basename(filepath)
for file_type in ["account.account.template", "account.account.type", "account.chart.template"]:
if fname.startswith(file_type) and fname.endswith(".csv"):
with open(filepath, "r") as csvfile:
try:
csv_content.setdefault(file_type, []).append(read_csv_content(csvfile.read()))
except Exception as e:
continue
return csv_content
def get_account_types(root_list, csv_content, prefix=None):
types = {}
account_type_map = {
"cash": "Cash",
"bank": "Bank",
"tr_cash": "Cash",
"tr_bank": "Bank",
"receivable": "Receivable",
"tr_receivable": "Receivable",
"account rec": "Receivable",
"payable": "Payable",
"tr_payable": "Payable",
"equity": "Equity",
"stocks": "Stock",
"stock": "Stock",
"tax": "Tax",
"tr_tax": "Tax",
"tax-out": "Tax",
"tax-in": "Tax",
"charges_personnel": "Chargeable",
"fixed asset": "Fixed Asset",
"cogs": "Cost of Goods Sold",
}
for root in root_list:
for node in root[0].findall("record"):
if node.get("model") == "account.account.type":
data = {}
for field in node.findall("field"):
if (
field.get("name") == "code"
and field.text.lower() != "none"
and account_type_map.get(field.text)
):
data["account_type"] = account_type_map[field.text]
node_id = prefix + "." + node.get("id") if prefix else node.get("id")
types[node_id] = data
if csv_content and csv_content[0][0] == "id":
for row in csv_content[1:]:
row_dict = dict(zip(csv_content[0], row))
data = {}
if row_dict.get("code") and account_type_map.get(row_dict["code"]):
data["account_type"] = account_type_map[row_dict["code"]]
if data and data.get("id"):
node_id = prefix + "." + data.get("id") if prefix else data.get("id")
types[node_id] = data
return types
def make_maps_for_xml(xml_roots, account_types, country_dir):
"""make maps for `charts` and `accounts`"""
for model, root_list in xml_roots.items():
for root in root_list:
for node in root[0].findall("record"):
if node.get("model") == "account.account.template":
data = {}
for field in node.findall("field"):
if field.get("name") == "name":
data["name"] = field.text
if field.get("name") == "parent_id":
parent_id = field.get("ref") or field.get("eval")
data["parent_id"] = parent_id
if field.get("name") == "user_type":
value = field.get("ref")
if account_types.get(value, {}).get("account_type"):
data["account_type"] = account_types[value]["account_type"]
if data["account_type"] not in all_account_types:
all_account_types.append(data["account_type"])
data["children"] = []
accounts[node.get("id")] = data
if node.get("model") == "account.chart.template":
data = {}
for field in node.findall("field"):
if field.get("name") == "name":
data["name"] = field.text
if field.get("name") == "account_root_id":
data["account_root_id"] = field.get("ref")
data["id"] = country_dir
charts.setdefault(node.get("id"), {}).update(data)
def make_maps_for_csv(csv_content, account_types, country_dir):
for content in csv_content.get("account.account.template", []):
for row in content[1:]:
data = dict(zip(content[0], row))
account = {
"name": data.get("name"),
"parent_id": data.get("parent_id:id") or data.get("parent_id/id"),
"children": [],
}
user_type = data.get("user_type/id") or data.get("user_type:id")
if account_types.get(user_type, {}).get("account_type"):
account["account_type"] = account_types[user_type]["account_type"]
if account["account_type"] not in all_account_types:
all_account_types.append(account["account_type"])
accounts[data.get("id")] = account
if not account.get("parent_id") and data.get("chart_template_id:id"):
chart_id = data.get("chart_template_id:id")
charts.setdefault(chart_id, {}).update({"account_root_id": data.get("id")})
for content in csv_content.get("account.chart.template", []):
for row in content[1:]:
if row:
data = dict(zip(content[0], row))
charts.setdefault(data.get("id"), {}).update(
{
"account_root_id": data.get("account_root_id:id") or data.get("account_root_id/id"),
"name": data.get("name"),
"id": country_dir,
}
)
def make_account_trees():
"""build tree hierarchy"""
for id in accounts.keys():
account = accounts[id]
if account.get("parent_id"):
if accounts.get(account["parent_id"]):
# accounts[account["parent_id"]]["children"].append(account)
accounts[account["parent_id"]][account["name"]] = account
del account["parent_id"]
del account["name"]
# remove empty children
for id in accounts.keys():
if "children" in accounts[id] and not accounts[id].get("children"):
del accounts[id]["children"]
def make_charts():
"""write chart files in app/setup/doctype/company/charts"""
for chart_id in charts:
src = charts[chart_id]
if not src.get("name") or not src.get("account_root_id"):
continue
if not src["account_root_id"] in accounts:
continue
filename = src["id"][5:] + "_" + chart_id
print("building " + filename)
chart = {}
chart["name"] = src["name"]
chart["country_code"] = src["id"][5:]
chart["tree"] = accounts[src["account_root_id"]]
for key, val in chart["tree"].items():
if key in ["name", "parent_id"]:
chart["tree"].pop(key)
if type(val) == dict:
val["root_type"] = ""
if chart:
fpath = os.path.join(
"erpnext", "erpnext", "accounts", "doctype", "account", "chart_of_accounts", filename + ".json"
)
with open(fpath, "r") as chartfile:
old_content = chartfile.read()
if not old_content or (
json.loads(old_content).get("is_active", "No") == "No"
and json.loads(old_content).get("disabled", "No") == "No"
):
with open(fpath, "w") as chartfile:
chartfile.write(json.dumps(chart, indent=4, sort_keys=True))
all_roots.setdefault(filename, chart["tree"].keys())
def create_all_roots_file():
with open("all_roots.txt", "w") as f:
for filename, roots in sorted(all_roots.items()):
f.write(filename)
f.write("\n----------------------\n")
for r in sorted(roots):
f.write(r.encode("utf-8"))
f.write("\n")
f.write("\n\n\n")
if __name__ == "__main__":
go()

View File

@@ -2,438 +2,397 @@
"country_code": "at",
"name": "Austria - Chart of Accounts",
"tree": {
"Klasse 0 Aktiva: Anlageverm\u00f6gen": {
"0100 Konzessionen ": {"account_type": "Fixed Asset"},
"0110 Patentrechte und Lizenzen ": {"account_type": "Fixed Asset"},
"0120 Datenverarbeitungsprogramme ": {"account_type": "Fixed Asset"},
"0130 Marken, Warenzeichen und Musterschutzrechte, sonstige Urheberrechte ": {"account_type": "Fixed Asset"},
"0140 Pacht- und Mietrechte ": {"account_type": "Fixed Asset"},
"0150 Bezugs- und ähnliche Rechte ": {"account_type": "Fixed Asset"},
"0160 Geschäfts-/Firmenwert ": {"account_type": "Fixed Asset"},
"0170 Umgründungsmehrwert ": {"account_type": "Fixed Asset"},
"0180 Geleistete Anzahlungen auf immaterielle Vermögensgegenstände": {"account_type": "Fixed Asset"},
"0190 Kumulierte Abschreibungen zu immateriellen Vermögensgegenständen ": {"account_type": "Fixed Asset"},
"0200 Unbebaute Grundstücke, soweit nicht landwirtschaftlich genutzt ": {"account_type": "Fixed Asset"},
"0210 Bebaute Grundstücke (Grundwert) ": {"account_type": "Fixed Asset"},
"0220 Landwirtschaftlich genutzte Grundstücke ": {"account_type": "Fixed Asset"},
"0230 Grundstücksgleiche Rechte ": {"account_type": "Fixed Asset"},
"0300 Betriebs- und Geschäftsgebäude auf eigenem Grund ": {"account_type": "Fixed Asset"},
"0310 Wohn- und Sozialgebäude auf eigenem Grund ": {"account_type": "Fixed Asset"},
"0320 Betriebs- und Geschäftsgebäude auf fremdem Grund ": {"account_type": "Fixed Asset"},
"0330 Wohn- und Sozialgebäude auf fremdem Grund ": {"account_type": "Fixed Asset"},
"0340 Grundstückseinrichtungen auf eigenem Grund ": {"account_type": "Fixed Asset"},
"0350 Grundstückseinrichtungen auf fremdem Grund ": {"account_type": "Fixed Asset"},
"0360 Bauliche Investitionen in fremden (gepachteten) Betriebs- und Geschäftsgebäuden": {"account_type": "Fixed Asset"},
"0370 Bauliche Investitionen in fremden (gepachteten) Wohn- und Sozialgebäuden": {"account_type": "Fixed Asset"},
"0390 Kumulierte Abschreibungen zu Grundstücken ": {"account_type": "Fixed Asset"},
"0400 Maschinen und Geräte ": {"account_type": "Fixed Asset"},
"0500 Maschinenwerkzeuge ": {"account_type": "Fixed Asset"},
"0510 Allgemeine Werkzeuge und Handwerkzeuge ": {"account_type": "Fixed Asset"},
"0520 Prototypen, Formen, Modelle ": {"account_type": "Fixed Asset"},
"0530 Andere Erzeugungshilfsmittel (auch Softwarewerkzeuge)": {"account_type": "Fixed Asset"},
"0540 Hebezeuge und Montageanlagen ": {"account_type": "Fixed Asset"},
"0550 Geringwertige Vermögensgegenstände, soweit im Erzeugungsprozess ": {"account_type": "Fixed Asset"},
"0560 Festwerte technische Anlagen und Maschinen ": {"account_type": "Fixed Asset"},
"0590 Kumulierte Abschreibungen zu technischen Anlagen und Maschinen ": {"account_type": "Fixed Asset"},
"0600 Betriebs- und Geschäftsausstattung, soweit nicht gesondert angeführt ": {"account_type": "Fixed Asset"},
"0610 Andere Anlagen, soweit nicht gesondert angeführt ": {"account_type": "Fixed Asset"},
"0620 Büromaschinen, EDV-Anlagen ": {"account_type": "Fixed Asset"},
"0630 PKW und Kombis ": {"account_type": "Fixed Asset"},
"0640 LKW ": {"account_type": "Fixed Asset"},
"0650 Andere Beförderungsmittel ": {"account_type": "Fixed Asset"},
"0660 Gebinde ": {"account_type": "Fixed Asset"},
"0670 Geringwertige Vermögensgegenstände, soweit nicht im Erzeugungssprozess verwendet": {"account_type": "Fixed Asset"},
"0680 Festwerte außer technische Anlagen und Maschinen ": {"account_type": "Fixed Asset"},
"0690 Kumulierte Abschreibungen zu anderen Anlagen, Betriebs- und Geschäftsausstattung": {"account_type": "Fixed Asset"},
"0700 Geleistete Anzahlungen auf Sachanlagen ": {"account_type": "Fixed Asset"},
"0710 Anlagen in Bau ": {"account_type": "Fixed Asset"},
"0790 Kumulierte Abschreibungen zu geleisteten Anzahlungen auf Sachanlagen ": {"account_type": "Fixed Asset"},
"0800 Anteile an verbundenen Unternehmen ": {"account_type": "Fixed Asset"},
"0810 Beteiligungen an Gemeinschaftsunternehmen ": {"account_type": "Fixed Asset"},
"0820 Beteiligungen an angeschlossenen (assoziierten) Unternehmen ": {"account_type": "Fixed Asset"},
"0830 Eigene Anteile, Anteile an herrschenden oder mit Mehrheit beteiligten ": {"account_type": "Fixed Asset"},
"0840 Sonstige Beteiligungen ": {"account_type": "Fixed Asset"},
"0850 Ausleihungen an verbundene Unternehmen ": {"account_type": "Fixed Asset"},
"0860 Ausleihungen an Unternehmen mit Beteiligungsverhältnis": {"account_type": "Fixed Asset"},
"0870 Ausleihungen an Gesellschafter ": {"account_type": "Fixed Asset"},
"0880 Sonstige Ausleihungen ": {"account_type": "Fixed Asset"},
"0890 Anteile an Kapitalgesellschaften ohne Beteiligungscharakter ": {"account_type": "Fixed Asset"},
"0900 Anteile an Personengesellschaften ohne Beteiligungscharakter ": {"account_type": "Fixed Asset"},
"0910 Genossenschaftsanteile ohne Beteiligungscharakter ": {"account_type": "Fixed Asset"},
"0920 Anteile an Investmentfonds ": {"account_type": "Fixed Asset"},
"0930 Festverzinsliche Wertpapiere des Anlagevermögens ": {"account_type": "Fixed Asset"},
"0980 Geleistete Anzahlungen auf Finanzanlagen ": {"account_type": "Fixed Asset"},
"0990 Kumulierte Abschreibungen zu Finanzanlagen ": {"account_type": "Fixed Asset"},
"root_type": "Asset"
},
"Klasse 1 Aktiva: Vorr\u00e4te": {
"1000 Bezugsverrechnung": {"account_type": "Stock"},
"1100 Rohstoffe": {"account_type": "Stock"},
"1200 Bezogene Teile": {"account_type": "Stock"},
"1300 Hilfsstoffe": {"account_type": "Stock"},
"1350 Betriebsstoffe": {"account_type": "Stock"},
"1360 Vorrat Energietraeger": {"account_type": "Stock"},
"1400 Unfertige Erzeugnisse": {"account_type": "Stock"},
"1500 Fertige Erzeugnisse": {"account_type": "Stock"},
"1600 Handelswarenvorrat": {"account_type": "Stock Received But Not Billed"},
"1700 Noch nicht abrechenbare Leistungen": {"account_type": "Stock"},
"1900 Wertberichtigungen": {"account_type": "Stock"},
"1800 Geleistete Anzahlungen": {"account_type": "Stock"},
"1900 Wertberichtigungen": {"account_type": "Stock"},
"root_type": "Asset"
},
"Klasse 3 Passiva: Verbindlichkeiten": {
"3000 Allgemeine Verbindlichkeiten (Schuld)": {"account_type": "Payable"},
"3010 R\u00fcckstellungen f\u00fcr Pensionen": {"account_type": "Payable"},
"3020 Steuerr\u00fcckstellungen": {"account_type": "Tax"},
"3041 Sonstige R\u00fcckstellungen": {"account_type": "Payable"},
"3110 Verbindlichkeiten gegen\u00fcber Bank": {"account_type": "Payable"},
"3150 Verbindlichkeiten Darlehen": {"account_type": "Payable"},
"3185 Verbindlichkeiten Kreditkarte": {"account_type": "Payable"},
"3380 Verbindlichkeiten aus der Annahme gezogener Wechsel u. d. Ausstellungen eigener Wechsel": {
"account_type": "Payable"
},
"3400 Verbindlichkeiten gegen\u00fc. verb. Untern., Verbindl. gegen\u00fc. Untern., mit denen eine Beteiligungsverh\u00e4lnis besteht": {},
"3460 Verbindlichkeiten gegenueber Gesellschaftern": {"account_type": "Payable"},
"3470 Einlagen stiller Gesellschafter": {"account_type": "Payable"},
"3585 Verbindlichkeiten Lohnsteuer": {"account_type": "Tax"},
"3590 Verbindlichkeiten Kommunalabgaben": {"account_type": "Tax"},
"3595 Verbindlichkeiten Dienstgeberbeitrag": {"account_type": "Tax"},
"3600 Verbindlichkeiten Sozialversicherung": {"account_type": "Payable"},
"3640 Verbindlichkeiten Loehne und Gehaelter": {"account_type": "Payable"},
"3700 Sonstige Verbindlichkeiten": {"account_type": "Payable"},
"3900 Passive Rechnungsabgrenzungsposten": {"account_type": "Payable"},
"3100 Anleihen (einschlie\u00dflich konvertibler)": {"account_type": "Payable"},
"3200 Erhaltene Anzahlungen auf Bestellungen": {"account_type": "Payable"},
"3040 R\u00fcckstellungen f\u00fcr Abfertigung": {"account_type": "Payable"},
"3530 USt. \u00a719 (reverse charge)": {
"Summe Abschreibungen und Aufwendungen": {
"7010 bis 7080 Abschreibungen auf das Anlageverm\u00f6gen (ausgenommen Finanzanlagen)": {},
"7100 bis 7190 Sonstige Steuern": {
"account_type": "Tax"
},
"3500 Verbindlichkeiten aus Umsatzsteuer": {"account_type": "Tax"},
"3580 Umsatzsteuer Zahllast": {
"account_type": "Tax"
},
"3510 Umsatzsteuer Inland 20%": {
"account_type": "Tax"
},
"3515 Umsatzsteuer Inland 10%": {
"account_type": "Tax"
},
"3520 Umsatzsteuer aus i.g. Erwerb 20%": {
"account_type": "Tax"
},
"3525 Umsatzsteuer aus i.g. Erwerb 10%": {
"account_type": "Tax"
},
"3560 Umsatzsteuer-Evidenzkonto f\u00fcr erhaltene Anzahlungen auf Bestellungen": {},
"3360 Verbindlichkeiten aus Lieferungen u. Leistungen EU": {
"account_type": "Payable"
},
"3000 Verbindlichkeiten aus Lieferungen u. Leistungen Inland": {
"account_type": "Payable"
},
"3370 Verbindlichkeiten aus Lieferungen u. Leistungen sonst. Ausland": {
"account_type": "Payable"
},
"3400 Verbindlichkeiten gegen\u00fcber verbundenen Unternehmen": {},
"3570 Verrechnung Finanzamt": {
"account_type": "Tax"
},
"root_type": "Liability"
},
"Klasse 2 Aktiva: Umlaufverm\u00f6gen, Rechnungsabgrenzungen": {
"2030 Forderungen aus Lieferungen und Leistungen Inland (0% USt, umsatzsteuerfrei)": {
"account_type": "Receivable"
},
"2010 Forderungen aus Lieferungen und Leistungen Inland (10% USt, umsatzsteuerfrei)": {
"account_type": "Receivable"
},
"2000 Forderungen aus Lieferungen und Leistungen Inland (20% USt, umsatzsteuerfrei)": {
"account_type": "Receivable"
},
"2040 Forderungen aus Lieferungen und Leistungen Inland (sonstiger USt-Satz)": {
"account_type": "Receivable"
},
"2100 Forderungen aus Lieferungen und Leistungen EU": {
"account_type": "Receivable"
},
"2150 Forderungen aus Lieferungen und Leistungen Ausland (Nicht-EU)": {
"account_type": "Receivable"
},
"2200 Forderungen gegen\u00fcber verbundenen Unternehmen": {
"account_type": "Receivable"
},
"2250 Forderungen gegen\u00fcber Unternehmen, mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
"account_type": "Receivable"
},
"2300 Sonstige Forderungen und Verm\u00f6gensgegenst\u00e4nde": {
"account_type": "Receivable"
},
"2630 Sonstige Wertpapiere": {
"account_type": "Stock"
},
"2750 Kassenbest\u00e4nde in Fremdw\u00e4hrung": {
"account_type": "Cash"
},
"2900 Aktive Rechnungsabrenzungsposten": {
"account_type": "Receivable"
},
"2600 Anteile an verbundenen Unternehmen": {
"account_type": "Equity"
},
"2680 Besitzwechsel ohne Forderungen": {
"account_type": "Receivable"
},
"2950 Aktiviertes Disagio": {
"account_type": "Receivable"
},
"2610 Eigene Anteile und Wertpapiere an mit Mehrheit beteiligten Unternehmen": {
"account_type": "Receivable"
},
"2570 Einfuhrumsatzsteuer (bezahlt)": {"account_type": "Tax"},
"2460 Eingeforderte aber noch nicht eingezahlte Einlagen": {
"account_type": "Receivable"
},
"2180 Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland": {
"account_type": "Receivable"
},
"2130 Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. EU": {
"account_type": "Receivable"
},
"2080 Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Inland ": {
"account_type": "Receivable"
},
"2270 Einzelwertberichtigungen zu Forderungen gegen\u00fcber Unternehmen mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
"account_type": "Receivable"
},
"2230 Einzelwertberichtigungen zu Forderungen gegen\u00fcber verbundenen Unternehmen": {
"account_type": "Receivable"
},
"2470 Einzelwertberichtigungen zu sonstigen Forderungen und Verm\u00f6gensgegenst\u00e4nden": {
"account_type": "Receivable"
},
"2700 Kassenbestand": {
"account_type": "Cash"
},
"2190 Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. sonstiges Ausland": {
"account_type": "Receivable"
},
"2130 Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. EU": {
"account_type": "Receivable"
},
"2100 Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Inland ": {
"account_type": "Receivable"
},
"2280 Pauschalwertberichtigungen zu Forderungen gegen\u00fcber Unternehmen mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
"account_type": "Receivable"
},
"2240 Pauschalwertberichtigungen zu Forderungen gegen\u00fcber verbundenen Unternehmen": {
"account_type": "Receivable"
},
"2480 Pauschalwertberichtigungen zu sonstigen Forderungen und Verm\u00f6gensgegenst\u00e4nden": {
"account_type": "Receivable"
},
"2740 Postwertzeichen": {
"account_type": "Cash"
},
"2780 Schecks in Euro": {
"account_type": "Cash"
},
"2800 Guthaben bei Bank": {
"account_type": "Bank"
},
"2801 Guthaben bei Bank - Sparkonto": {
"account_type": "Bank"
},
"2810 Guthaben bei Paypal": {
"account_type": "Bank"
},
"2930 Mietvorauszahlungen": {
"account_type": "Receivable"
},
"2980 Abgrenzung latenter Steuern": {
"account_type": "Receivable"
},
"2500 Vorsteuer": {
"account_type": "Receivable"
},
"2510 Vorsteuer Inland 10%": {
"account_type": "Tax"
},
"2895 Schwebende Geldbewegugen": {
"account_type": "Bank"
},
"2513 Vorsteuer Inland 5%": {
"account_type": "Tax"
},
"2515 Vorsteuer Inland 20%": {
"account_type": "Tax"
},
"2520 Vorsteuer aus innergemeinschaftlichem Erwerb 10%": {
"account_type": "Tax"
},
"2525 Vorsteuer aus innergemeinschaftlichem Erwerb 20%": {
"account_type": "Tax"
},
"2530 Vorsteuer \u00a719/Art 19 ( reverse charge ) ": {
"account_type": "Tax"
},
"2690 Wertberichtigungen zu Wertpapieren und Anteilen": {
"account_type": "Receivable"
},
"root_type": "Asset"
"7200 bis 7290 Instandhaltung u. Reinigung durh Dritte, Entsorgung, Beleuchtung": {},
"7300 bis 7310 Transporte durch Dritte": {},
"7320 bis 7330 Kfz - Aufwand": {},
"7340 bis 7350 Reise- und Fahraufwand": {},
"7360 bis 7370 Tag- und N\u00e4chtigungsgelder": {},
"7380 bis 7390 Nachrichtenaufwand": {},
"7400 bis 7430 Miet- und Pachtaufwand": {},
"7440 bis 7470 Leasingaufwand": {},
"7480 bis 7490 Lizenzaufwand": {},
"7500 bis 7530 Aufwand f\u00fcr beigestelltes Personal": {},
"7540 bis 7570 Provisionen an Dritte": {},
"7580 bis 7590 Aufsichtsratsverg\u00fctungen": {},
"7610 bis 7620 Druckerzeugnisse und Vervielf\u00e4ltigungen": {},
"7650 bis 7680 Werbung und Repr\u00e4sentationen": {},
"7700 bis 7740 Versicherungen": {},
"7750 bis 7760 Beratungs- und Pr\u00fcfungsaufwand": {},
"7800 bis 7810 Schadensf\u00e4lle": {},
"7840 bis 7880 Verschiedene betriebliche Aufwendungen": {},
"7910 bis 7950 Aufwandsstellenrechung der Hersteller": {},
"Abschreibungen auf aktivierte Aufwendungen f\u00fcr das Ingangs. u. Erweitern des Betriebes": {},
"Abschreibungen vom Umlaufverm\u00f6gen, soweit diese die im Unternehmen \u00fcblichen Abschreibungen \u00fcbersteigen": {},
"Aufwandsstellenrechnung": {},
"Aus- und Fortbildung": {},
"Buchwert abgegangener Anlagen, ausgenommen Finanzanlagen": {},
"B\u00fcromaterial und Drucksorten": {},
"Fachliteratur und Zeitungen ": {},
"Herstellungskosten der zur Erzielung der Umsatzerl\u00f6se erbrachten Leistungen": {},
"Mitgliedsbeitr\u00e4ge": {},
"Skontoertr\u00e4ge auf sonstige betriebliche Aufwendungen": {},
"Sonstige betrieblichen Aufwendungen": {},
"Spenden und Trinkgelder": {},
"Spesen des Geldverkehrs": {},
"Verluste aus dem Abgang vom Anlageverm\u00f6gen, ausgenommen Finanzanlagen": {},
"Vertriebskosten": {},
"Verwaltungskosten": {},
"root_type": "Expense"
},
"Klasse 4: Betriebliche Erträge": {
"4000 Erlöse 20 %": {"account_type": "Income Account"},
"4020 Erl\u00f6se 0 % steuerbefreit": {"account_type": "Income Account"},
"4010 Erl\u00f6se 10 %": {"account_type": "Income Account"},
"4030 Erl\u00f6se 13 %": {"account_type": "Income Account"},
"4040 Erl\u00f6se 0 % innergemeinschaftliche Lieferungen": {"account_type": "Income Account"},
"4400 Erl\u00f6sreduktion 0 % steuerbefreit": {"account_type": "Expense Account"},
"4410 Erl\u00f6sreduktion 10 %": {"account_type": "Expense Account"},
"4420 Erl\u00f6sreduktion 20 %": {"account_type": "Expense Account"},
"4430 Erl\u00f6sreduktion 13 %": {"account_type": "Expense Account"},
"4440 Erl\u00f6sreduktion 0 % innergemeinschaftliche Lieferungen": {"account_type": "Expense Account"},
"4500 Ver\u00e4nderungen des Bestandes an fertigen und unfertigen Erzeugn. sowie an noch nicht abrechenbaren Leistungen": {"account_type": "Income Account"},
"4580 Aktivierte Eigenleistungen": {"account_type": "Income Account"},
"4600 Erl\u00f6se aus dem Abgang vom Anlageverm\u00f6gen, ausgen. Finanzanlagen": {"account_type": "Income Account"},
"4630 Ertr\u00e4ge aus dem Abgang vom Anlageverm\u00f6gen, ausgen. Finanzanlagen": {"account_type": "Income Account"},
"4660 Ertr\u00e4ge aus der Zuschreibung zum Anlageverm\u00f6gen, ausgen. Finanzanlagen": {"account_type": "Income Account"},
"4700 Ertr\u00e4ge aus der Aufl\u00f6sung von R\u00fcckstellungen": {"account_type": "Income Account"},
"4800 \u00dcbrige betriebliche Ertr\u00e4ge": {"account_type": "Income Account"},
"Summe Betriebliche Ertr\u00e4ge": {
"4400 bis 4490 Erl\u00f6sschm\u00e4lerungen": {},
"4500 bis 4570 Ver\u00e4nderungen des Bestandes an fertigen und unfertigen Erzeugn. sowie an noch nicht abrechenbaren Leistungen": {},
"4580 bis 4590 andere aktivierte Eigenleistungen": {},
"4600 bis 4620 Erl\u00f6se aus dem Abgang vom Anlageverm\u00f6gen, ausgen. Finanzanlagen": {},
"4630 bis 4650 Ertr\u00e4ge aus dem Abgang vom Anlageverm\u00f6gen, ausgen. Finanzanlagen": {},
"4660 bis 4670 Ertr\u00e4ge aus der Zuschreibung zum Anlageverm\u00f6gen, ausgen. Finanzanlagen": {},
"4700 bis 4790 Ertr\u00e4ge aus der Aufl\u00f6sung von R\u00fcckstellungen": {},
"4800 bis 4990 \u00dcbrige betriebliche Ertr\u00e4ge": {},
"Erl\u00f6se 0 % Ausfuhrlieferungen/Drittl\u00e4nder": {},
"Erl\u00f6se 10 %": {},
"Erl\u00f6se 20 %": {},
"Erl\u00f6se aus im Inland stpfl. EG Lieferungen 10 % USt": {},
"Erl\u00f6se aus im Inland stpfl. EG Lieferungen 20 % USt": {},
"Erl\u00f6se i.g. Lieferungen (stfr)": {},
"root_type": "Income"
},
"Klasse 5: Aufwand f\u00fcr Material und Leistungen": {
"5000 Einkauf Partnerleistungen": {"account_type": "Cost of Goods Sold"},
"5100 Verbrauch an Rohstoffen": {"account_type": "Cost of Goods Sold"},
"5200 Verbrauch von bezogenen Fertig- und Einzelteilen": {"account_type": "Cost of Goods Sold"},
"5300 Verbrauch von Hilfsstoffen": {"account_type": "Cost of Goods Sold"},
"5340 Verbrauch Verpackungsmaterial": {"account_type": "Cost of Goods Sold"},
"5470 Verbrauch von Kleinmaterial": {"account_type": "Cost of Goods Sold"},
"5450 Verbrauch von Reinigungsmaterial": {"account_type": "Cost of Goods Sold"},
"5400 Verbrauch von Betriebsstoffen": {"account_type": "Cost of Goods Sold"},
"5500 Verbrauch von Werkzeugen und anderen Erzeugungshilfsmittel": {"account_type": "Cost of Goods Sold"},
"5600 Verbrauch von Brenn- und Treibstoffen, Energie und Wasser": {"account_type": "Cost of Goods Sold"},
"5700 Bearbeitung durch Dritte": {"account_type": "Cost of Goods Sold"},
"5900 Aufwandsstellenrechnung Material": {"account_type": "Cost of Goods Sold"},
"5820 Skontoertr\u00e4ge (20% USt.)": {"account_type": "Income Account"},
"5810 Skontoertr\u00e4ge (10% USt.)": {"account_type": "Income Account"},
"5010 Handelswareneinkauf 10 %": {"account_type": "Cost of Goods Sold"},
"5020 Handelswareneinkauf 20 %": {"account_type": "Cost of Goods Sold"},
"5040 Handelswareneinkauf innergemeinschaftlicher Erwerb 10 % VSt/10 % USt": {"account_type": "Cost of Goods Sold"},
"5050 Handelswareneinkauf innergemeinschaftlicher Erwerb 20 % VSt/20 % USt": {"account_type": "Cost of Goods Sold"},
"5070 Handelswareneinkauf innergemeinschaftlicher Erwerb ohne Vorsteuerabzug und 10 % USt": {"account_type": "Cost of Goods Sold"},
"5080 Handelswareneinkauf innergemeinschaftlicher Erwerb ohne Vorsteuerabzug und 20 % USt": {"account_type": "Cost of Goods Sold"},
"root_type": "Expense"
},
"Klasse 6: Personalaufwand": {
"6000 L\u00f6hne": {"account_type": "Payable"},
"6200 Geh\u00e4lter": {"account_type": "Payable"},
"6400 Aufwendungen f\u00fcr Abfertigungen": {"account_type": "Payable"},
"6450 Aufwendungen f\u00fcr Altersversorgung": {"account_type": "Payable"},
"6500 Gesetzlicher Sozialaufwand Arbeiter": {"account_type": "Payable"},
"6560 Gesetzlicher Sozialaufwand Angestellte": {"account_type": "Payable"},
"6600 Lohnabh\u00e4ngige Abgaben und Pflichtbeitr\u00e4gte": {"account_type": "Payable"},
"6660 Gehaltsabh\u00e4ngige Abgaben und Pflichtbeitr\u00e4gte": {"account_type": "Payable"},
"6700 Sonstige Sozialaufwendungen": {"account_type": "Payable"},
"6900 Aufwandsstellenrechnung Personal": {"account_type": "Payable"},
"root_type": "Expense"
},
"Klasse 7: Abschreibungen und sonstige betriebliche Aufwendungen": {
"7010 Abschreibungen auf das Anlageverm\u00f6gen (ausgenommen Finanzanlagen)": {"account_type": "Depreciation"},
"7100 Sonstige Steuern und Geb\u00fchren": {"account_type": "Tax"},
"7200 Instandhaltung u. Reinigung durch Dritte, Entsorgung, Energie": {"account_type": "Expense Account"},
"7300 Transporte durch Dritte": {"account_type": "Expense Account"},
"7310 Fahrrad - Aufwand": {"account_type": "Expense Account"},
"7320 Kfz - Aufwand": {"account_type": "Expense Account"},
"7330 LKW - Aufwand": {"account_type": "Expense Account"},
"7340 Lastenrad - Aufwand": {"account_type": "Expense Account"},
"7350 Reise- und Fahraufwand": {"account_type": "Expense Account"},
"7360 Tag- und N\u00e4chtigungsgelder": {"account_type": "Expense Account"},
"7380 Nachrichtenaufwand": {"account_type": "Expense Account"},
"7400 Miet- und Pachtaufwand": {"account_type": "Expense Account"},
"7440 Leasingaufwand": {"account_type": "Expense Account"},
"7480 Lizenzaufwand": {"account_type": "Expense Account"},
"7500 Aufwand f\u00fcr beigestelltes Personal": {"account_type": "Expense Account"},
"7540 Provisionen an Dritte": {"account_type": "Expense Account"},
"7580 Aufsichtsratsverg\u00fctungen": {"account_type": "Expense Account"},
"7610 Druckerzeugnisse und Vervielf\u00e4ltigungen": {"account_type": "Expense Account"},
"7650 Werbung und Repr\u00e4sentationen": {"account_type": "Expense Account"},
"7700 Versicherungen": {"account_type": "Expense Account"},
"7750 Beratungs- und Pr\u00fcfungsaufwand": {"account_type": "Expense Account"},
"7800 Forderungsverluste und Schadensf\u00e4lle": {"account_type": "Expense Account"},
"7840 Verschiedene betriebliche Aufwendungen": {"account_type": "Expense Account"},
"7910 Aufwandsstellenrechung der Hersteller": {"account_type": "Expense Account"},
"7060 Sofortabschreibungen geringwertig": {"account_type": "Expense Account"},
"7070 Abschreibungen vom Umlaufverm\u00f6gen, soweit diese die im Unternehmen \u00fcblichen Abschreibungen \u00fcbersteigen": {"account_type": "Depreciation"},
"7900 Aufwandsstellenrechnung": {"account_type": "Expense Account"},
"7770 Aus- und Fortbildung": {"account_type": "Expense Account"},
"7820 Buchwert abgegangener Anlagen, ausgenommen Finanzanlagen": {"account_type": "Expense Account"},
"7600 B\u00fcromaterial und Drucksorten": {"account_type": "Expense Account"},
"7630 Fachliteratur und Zeitungen ": {"account_type": "Expense Account"},
"7960 Herstellungskosten der zur Erzielung der Umsatzerl\u00f6se erbrachten Leistungen": {"account_type": "Expense Account"},
"7780 Mitgliedsbeitr\u00e4ge": {"account_type": "Expense Account"},
"7880 Skontoertr\u00e4ge auf sonstige betriebliche Aufwendungen": {"account_type": "Expense Account"},
"7990 Sonstige betrieblichen Aufwendungen": {"account_type": "Expense Account"},
"7680 Spenden und Trinkgelder": {"account_type": "Expense Account"},
"7790 Spesen des Geldverkehrs": {"account_type": "Expense Account"},
"7830 Verluste aus dem Abgang vom Anlageverm\u00f6gen, ausgenommen Finanzanlagen": {"account_type": "Expense Account"},
"7970 Vertriebskosten": {"account_type": "Expense Account"},
"7980 Verwaltungskosten": {"account_type": "Expense Account"},
"root_type": "Expense"
},
"Klasse 8: Finanz- und ausserordentliche Ertr\u00e4ge und Aufwendungen": {
"8000 Ertr\u00e4ge aus Beteiligungen": {"account_type": "Income Account"},
"8050 Ertr\u00e4ge aus anderen Wertpapieren und Ausleihungen des Finanzanlageverm\u00f6gens": {"account_type": "Income Account"},
"8100 Zinsen aus Bankguthaben": {"account_type": "Income Account"},
"8110 Zinsen aus gewaehrten Darlehen": {"account_type": "Income Account"},
"8130 Verzugszinsenertraege": {"account_type": "Income Account"},
"8220 Aufwendungen aus Beteiligungen": {"account_type": "Expense Account"},
"8260 Aufwendungen aus sonst. Fiananzanlagen und aus Wertpapieren des Umlaufverm\u00f6gens": {},
"8280 Zinsen und \u00e4hnliche Aufwendungem": {"account_type": "Expense Account"},
"8400 Au\u00dferordentliche Ertr\u00e4ge": {"account_type": "Income Account"},
"8450 Au\u00dferordentliche Aufwendungen": {"account_type": "Expense Account"},
"8500 Steuern vom Einkommen und vom Ertrag": {
"account_type": "Tax"
},
"8600 Aufl\u00f6sung unversteuerten R\u00fccklagen": {"account_type": "Income Account"},
"8700 Aufl\u00f6sung von Kapitalr\u00fccklagen": {"account_type": "Income Account"},
"8750 Aufl\u00f6sung von Gewinnr\u00fccklagen": {"account_type": "Income Account"},
"8800 Zuweisung zu unversteuerten R\u00fccklagen": {"account_type": "Expense Account"},
"8900 Zuweisung zu Gewinnr\u00fccklagen": {"account_type": "Expense Account"},
"8100 Buchwert abgegangener Beteiligungen": {"account_type": "Expense Account"},
"8130 Buchwert abgegangener Wertpapiere des Umlaufverm\u00f6gens": {"account_type": "Expense Account"},
"8120 Buchwert abgegangener sonstiger Finanzanlagen": {"account_type": "Expense Account"},
"8990 Gewinnabfuhr bzw. Verlust\u00fcberrechnung aus Ergebnisabf\u00fchrungsvertr\u00e4gen": {"account_type": "Expense Account"},
"8350 nicht ausgenutzte Lieferantenskonti": {"account_type": "Expense Account"},
"root_type": "Income"
},
"Klasse 9 Passiva: Eigenkapital, R\u00fccklagen, stille Einlagen, Abschlusskonten": {
"9000 Gezeichnetes bzw. gewidmetes Kapital": {
"Summe Eigenkapital R\u00fccklagen Abschlusskonten": {
"9000 bis 9180 Gezeichnetes bzw. gewidmetes Kapital": {
"account_type": "Equity"
},
"9200 Kapitalr\u00fccklagen": {
"9200 bis 9290 Kapitalr\u00fccklagen": {
"account_type": "Equity"
},
"9300 Gewinnr\u00fccklagen": {
"9300 bis 9380 Gewinnr\u00fccklagen": {
"account_type": "Equity"
},
"9400 Bewertungsreserven uns sonst. unversteuerte R\u00fccklagen": {
"9400 bis 9590 Bewertungsreserven uns sonst. unversteuerte R\u00fccklagen": {
"account_type": "Equity"
},
"9600 Private Entnahmen": {"account_type": "Equity"},
"9610 Privatsteuern": {"account_type": "Equity"},
"9700 Einlagen stiller Gesellschafter ": {"account_type": "Equity"},
"9900 Evidenzkonto": {"account_type": "Equity"},
"9800 Er\u00f6ffnungsbilanzkonto (EBK)": {"account_type": "Equity"},
"9880 Jahresergebnis laut Gewinn- und Verlustrechnung (G+V)": {"account_type": "Equity"},
"9850 Schlussbilanzkonto (SBK)": {"account_type": "Round Off"},
"9190 nicht eingeforderte ausstehende Einlagen und berechtigte Entnahmen von Gesellschaftern": {
"9600 bis 9690 Privat und Verrechnungskonten bei Einzelunternehmen und Personengesellschaften": {},
"9700 bis 9790 Einlagen stiller Gesellschafter ": {},
"9900 bis 9999 Evidenzkonten": {},
"Bilanzgewinn (-verlust )": {
"account_type": "Equity"
},
"Er\u00f6ffnungsbilanz": {},
"Gewinn- und Verlustrechnung": {},
"Schlussbilanz": {},
"nicht eingeforderte ausstehende Einlagen": {
"account_type": "Equity"
},
"root_type": "Equity"
},
"Summe Finanzertr\u00e4ge und Aufwendungen": {
"8000 bis 8040 Ertr\u00e4ge aus Beteiligungen": {},
"8050 bis 8090 Ertr\u00e4ge aus anderen Wertpapieren und Ausleihungen des Finanzanlageverm\u00f6gens": {},
"8100 bis 8130 Sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge": {},
"8220 bis 8250 Aufwendungen aus Beteiligungen": {},
"8260 bis 8270 Aufwendungen aus sonst. Fiananzanlagen und aus Wertpapieren des Umlaufverm\u00f6gens": {},
"8280 bis 8340 Zinsen und \u00e4hnliche Aufwendungem": {},
"8400 bis 8440 Au\u00dferordentliche Ertr\u00e4ge": {},
"8450 bis 8490 Au\u00dferordentliche Aufwendungen": {},
"8500 bis 8590 Steuern vom Einkommen und vom Ertrag": {
"account_type": "Tax"
},
"8600 bis 8690 Aufl\u00f6sung unversteuerten R\u00fccklagen": {},
"8700 bis 8740 Aufl\u00f6sung von Kapitalr\u00fccklagen": {},
"8750 bis 8790 Aufl\u00f6sung von Gewinnr\u00fccklagen": {},
"8800 bis 8890 Zuweisung von unversteuerten R\u00fccklagen": {},
"Buchwert abgegangener Beteiligungen": {},
"Buchwert abgegangener Wertpapiere des Umlaufverm\u00f6gens": {},
"Buchwert abgegangener sonstiger Finanzanlagen": {},
"Erl\u00f6se aus dem Abgang von Beteiligungen": {},
"Erl\u00f6se aus dem Abgang von Wertpapieren des Umlaufverm\u00f6gens": {},
"Erl\u00f6se aus dem Abgang von sonstigen Finanzanlagen": {},
"Ertr\u00e4ge aus dem Abgang von und der Zuschreibung zu Finanzanlagen": {},
"Ertr\u00e4ge aus dem Abgang von und der Zuschreibung zu Wertpapieren des Umlaufverm\u00f6gens": {},
"Gewinabfuhr bzw. Verlust\u00fcberrechnung aus Ergebnisabf\u00fchrungsvertr\u00e4gen": {},
"nicht ausgenutzte Lieferantenskonti": {},
"root_type": "Income"
},
"Summe Fremdkapital": {
"3020 bis 3030 Steuerr\u00fcckstellungen": {},
"3040 bis 3090 Sonstige R\u00fcckstellungen": {},
"3110 bis 3170 Verbindlichkeiten gegen\u00fcber Kredidinstituten": {},
"3180 bis 3190 Verbindlichkeiten gegen\u00fcber Finanzinstituten": {},
"3380 bis 3390 Verbindlichkeiten aus der Annahme gezogener Wechsel u. d. Ausstellungen eigener Wechsel": {
"account_type": "Payable"
},
"3400 bis 3470 Verbindlichkeiten gegen\u00fc. verb. Untern., Verbindl. gegen\u00fc. Untern., mit denen eine Beteiligungsverh\u00e4lnis besteht": {},
"3600 bis 3690 Verbindlichkeiten im Rahmen der sozialen Sicherheit": {},
"3700 bis 3890 \u00dcbrige sonstige Verbindlichkeiten": {},
"3900 bis 3990 Passive Rechnungsabgrenzungsposten": {},
"Anleihen (einschlie\u00dflich konvertibler)": {},
"Erhaltene Anzahlungenauf Bestellungen": {},
"R\u00fcckstellungen f\u00fcr Abfertigung": {},
"R\u00fcckstellungen f\u00fcr Pensionen": {},
"USt. \u00a719 /art (reverse charge)": {
"account_type": "Tax"
},
"Umsatzsteuer": {},
"Umsatzsteuer Zahllast": {
"account_type": "Tax"
},
"Umsatzsteuer aus i.g. Erwerb 10%": {
"account_type": "Tax"
},
"Umsatzsteuer aus i.g. Erwerb 20%": {
"account_type": "Tax"
},
"Umsatzsteuer aus i.g. Lieferungen 10%": {
"account_type": "Tax"
},
"Umsatzsteuer aus i.g. Lieferungen 20%": {
"account_type": "Tax"
},
"Umsatzsteuer-Evidenzkonto f\u00fcr erhaltene Anzahlungen auf Bestellungen": {},
"Verbindlichkeiten aus Lieferungen u. Leistungen EU": {
"account_type": "Payable"
},
"Verbindlichkeiten aus Lieferungen u. Leistungen Inland": {
"account_type": "Payable"
},
"Verbindlichkeiten aus Lieferungen u. Leistungen sonst. Ausland": {
"account_type": "Payable"
},
"Verbindlichkeiten gegen\u00fcber Gesellschaften": {},
"Verrechnung Finanzamt": {
"account_type": "Tax"
},
"root_type": "Liability"
},
"Summe Kontoklasse 0 Anlageverm\u00f6gen": {
"44 bis 49 Sonstige Maschinen und maschinelle Anlagen": {},
"920 bis 930 Festverzinsliche Wertpapiere des Anlageverm\u00f6gens": {},
"940 bis 970 Sonstige Finanzanlagen, Wertrechte": {},
"Allgemeine Werkzeuge und Handwerkzeuge": {},
"Andere Bef\u00f6rderungsmittel": {},
"Andere Betriebs- und Gesch\u00e4ftsausstattung": {},
"Andere Erzeugungshilfsmittel": {},
"Anlagen im Bau": {},
"Anteile an Investmentfonds": {},
"Anteile an Kapitalgesellschaften ohne Beteiligungscharakter": {},
"Anteile an Personengesellschaften ohne Beteiligungscharakter": {},
"Anteile an verbundenen Unternehmen": {},
"Antriebsmaschinen": {},
"Aufwendungen f\u00fcs das Ingangssetzen u. Erweitern eines Betriebes": {},
"Ausleihungen an verbundene Unternehmen": {},
"Ausleihungen an verbundene Unternehmen, mit denen ein Beteiligungsverh\u00e4lnis besteht": {},
"Bauliche Investitionen in fremden (gepachteten) Betriebs- und Gesch\u00e4ftsgeb\u00e4uden": {},
"Bauliche Investitionen in fremden (gepachteten) Wohn- und Sozialgeb\u00e4uden": {},
"Bebaute Grundst\u00fccke (Grundwert)": {},
"Beheizungs- und Beleuchtungsanlagen": {},
"Beteiligungen an Gemeinschaftunternehmen": {},
"Beteiligungen an angeschlossenen (assoziierten) Unternehmen": {},
"Betriebs- und Gesch\u00e4ftsgeb\u00e4ude auf eigenem Grund": {},
"Betriebs- und Gesch\u00e4ftsgeb\u00e4ude auf fremdem Grund": {},
"B\u00fcromaschinen, EDV - Anlagen": {},
"Datenverarbeitungsprogramme": {},
"Energieversorgungsanlagen": {},
"Fertigungsmaschinen": {},
"Gebinde": {},
"Geleistete Anzahlungen": {},
"Genossenschaften ohne Beteiligungscharakter": {},
"Geringwertige Verm\u00f6gensgegenst\u00e4nde, soweit im Erzeugerprozess verwendet": {},
"Geringwertige Verm\u00f6gensgegenst\u00e4nde, soweit nicht im Erzeugungsprozess verwendet": {},
"Gesch\u00e4fts(Firmen)wert": {},
"Grundst\u00fcckseinrichtunten auf eigenem Grund": {},
"Grundst\u00fcckseinrichtunten auf fremdem Grund": {},
"Grundst\u00fccksgleiche Rechte": {},
"Hebezeuge und Montageanlagen": {},
"Konzessionen": {},
"Kumulierte Abschreibungen": {},
"LKW": {},
"Marken, Warenzeichen und Musterschutzrechte": {},
"Maschinenwerkzeuge": {},
"Nachrichten- und Kontrollanlagen": {},
"PKW": {},
"Pacht- und Mietrechte": {},
"Patentrechte und Lizenzen": {},
"Sonstige Ausleihungen": {},
"Sonstige Beteiligungen": {},
"Transportanlagen": {},
"Unbebaute Grundst\u00fccke": {},
"Vorrichtungen, Formen und Modelle": {},
"Wohn- und Sozialgeb\u00e4ude auf eigenem Grund": {},
"Wohn- und Sozialgeb\u00e4ude auf fremdem Grund": {},
"root_type": "Asset"
},
"Summe Personalaufwand": {
"6000 bis 6190 L\u00f6hne": {},
"6200 bis 6390 Geh\u00e4lter": {},
"6400 bis 6440 Aufwendungen f\u00fcr Abfertigungen": {},
"6450 bis 6490 Aufwendungen f\u00fcr Altersversorgung": {},
"6500 bis 6550 Gesetzlicher Sozialaufwand Arbeiter": {},
"6560 bis 6590 Gesetzlicher Sozialaufwand Angestellte": {},
"6600 bis 6650 Lohnabh\u00e4ngige Abgaben und Pflichtbeitr\u00e4gte": {},
"6660 bis 6690 Gehaltsabh\u00e4ngige Abgaben und Pflichtbeitr\u00e4gte": {},
"6700 bis 6890 Sonstige Sozialaufwendungen": {},
"Aufwandsstellenrechnung": {},
"root_type": "Expense"
},
"Summe Umlaufverm\u00f6gen": {
"2000 bis 2007 Forderungen aus Lief. und Leist. Inland": {
"account_type": "Receivable"
},
"2100 bis 2120 Forderungen aus Lief. und Leist. EU": {
"account_type": "Receivable"
},
"2150 bis 2170 Forderungen aus Lief. und Leist. Ausland": {
"account_type": "Receivable"
},
"2200 bis 2220 Forderungen gegen\u00fcber verbundenen Unternehmen": {
"account_type": "Receivable"
},
"2250 bis 2270 Forderungen gegen\u00fcber Unternehmen, mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
"account_type": "Receivable"
},
"2300 bis 2460 Sonstige Forderungen und Verm\u00f6gensgegenst\u00e4nde": {
"account_type": "Receivable"
},
"2630 bis 2670 Sonstige Wertpapiere": {
"account_type": "Receivable"
},
"2750 bis 2770 Kassenbest\u00e4nde in Fremdw\u00e4hrung": {
"account_type": "Receivable"
},
"Aktive Rechnungsabrenzungsposten": {
"account_type": "Receivable"
},
"Anteile an verbundenen Unternehmen": {
"account_type": "Receivable"
},
"Bank / Guthaben bei Kreditinstituten": {
"account_type": "Receivable"
},
"Besitzwechsel ...": {
"account_type": "Receivable"
},
"Disagio": {
"account_type": "Receivable"
},
"Eigene Anteile (Wertpapiere)": {
"account_type": "Receivable"
},
"Einfuhrumsatzsteuer (bezahlt)": {},
"Eingeforderte aber noch nicht eingezahlte Einlagen": {
"account_type": "Receivable"
},
"Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland": {
"account_type": "Receivable"
},
"Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. EU": {
"account_type": "Receivable"
},
"Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Inland ": {
"account_type": "Receivable"
},
"Einzelwertberichtigungen zu Forderungen gegen\u00fcber Unternehmen mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
"account_type": "Receivable"
},
"Einzelwertberichtigungen zu Forderungen gegen\u00fcber verbundenen Unternehmen": {
"account_type": "Receivable"
},
"Einzelwertberichtigungen zu sonstigen Forderungen und Verm\u00f6gensgegenst\u00e4nden": {
"account_type": "Receivable"
},
"Kassenbestand": {
"account_type": "Receivable"
},
"Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland": {
"account_type": "Receivable"
},
"Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. EU": {
"account_type": "Receivable"
},
"Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Inland ": {
"account_type": "Receivable"
},
"Pauschalwertberichtigungen zu Forderungen gegen\u00fcber Unternehmen mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
"account_type": "Receivable"
},
"Pauschalwertberichtigungen zu Forderungen gegen\u00fcber verbundenen Unternehmen": {
"account_type": "Receivable"
},
"Pauschalwertberichtigungen zu sonstigen Forderungen und Verm\u00f6gensgegenst\u00e4nden": {
"account_type": "Receivable"
},
"Postwertzeichen": {
"account_type": "Receivable"
},
"Schecks in Inlandsw\u00e4hrung": {
"account_type": "Receivable"
},
"Sonstige Anteile": {
"account_type": "Receivable"
},
"Stempelmarken": {
"account_type": "Receivable"
},
"Steuerabgrenzung": {
"account_type": "Receivable"
},
"Unterschiedsbetrag gem. Abschnitt XII Pensionskassengesetz": {
"account_type": "Receivable"
},
"Unterschiedsbetrag zur gebotenen Pensionsr\u00fcckstellung": {
"account_type": "Receivable"
},
"Vorsteuer": {
"account_type": "Receivable"
},
"Vorsteuer aus ig. Erwerb 10%": {
"account_type": "Tax"
},
"Vorsteuer aus ig. Erwerb 20%": {
"account_type": "Tax"
},
"Vorsteuer \u00a719/Art 19 ( reverse charge ) ": {
"account_type": "Tax"
},
"Wertberichtigungen": {
"account_type": "Receivable"
},
"root_type": "Asset"
},
"Summe Vorr\u00e4te": {
"1000 bis 1090 Bezugsverrechnung": {},
"1100 bis 1190 Rohstoffe": {},
"1200 bis 1290 Bezogene Teile": {},
"1300 bis 1340 Hilfsstoffe": {},
"1350 bis 1390 Betriebsstoffe": {},
"1400 bis 1490 Unfertige Erzeugniss": {},
"1500 bis 1590 Fertige Erzeugniss": {},
"1600 bis 1690 Waren": {},
"1700 bis 1790 Noch nicht abgerechenbare Leistungen": {},
"1900 bis 1990 Wertberichtigungen": {},
"geleistete Anzahlungen": {},
"root_type": "Asset"
},
"Summe Wareneinsatz": {
"5100 bis 5190 Verbrauch an Rohstoffen": {},
"5200 bis 5290 Verbrauch von bezogenen Fertig- und Einzelteilen": {},
"5300 bis 5390 Verbrauch von Hilfsstoffen": {},
"5400 bis 5490 Verbrauch von Betriebsstoffen": {},
"5500 bis 5590 Verbrauch von Werkzeugen und anderen Erzeugungshilfsmittel": {},
"5600 bis 5690 Verbrauch von Brenn- und Treibstoffen, Energie und Wasser": {},
"5700 bis 5790 Sonstige bezogene Herstellungsleistungen": {},
"Aufwandsstellenrechnung": {},
"Skontoertr\u00e4ge auf Materialaufwand": {},
"Skontoertr\u00e4ge auf sonstige bezogene Herstellungsleistungen": {},
"Wareneinkauf 10 %": {},
"Wareneinkauf 20 %": {},
"Wareneinkauf igErwerb 10 % VSt/10 % USt": {},
"Wareneinkauf igErwerb 20 % VSt/20 % USt": {},
"Wareneinkauf igErwerb ohne Vorsteuerabzug und 10 % USt": {},
"Wareneinkauf igErwerb ohne Vorsteuerabzug und 20 % USt": {},
"root_type": "Expense"
}
}
}
}
}

View File

@@ -437,20 +437,12 @@
},
"Sales": {
"Sales from Other Regions": {
"Sales from Other Region": {
"account_type": "Income Account"
}
"Sales from Other Region": {}
},
"Sales of same region": {
"Management Consultancy Fees 1": {
"account_type": "Income Account"
},
"Sales Account": {
"account_type": "Income Account"
},
"Sales of I/C": {
"account_type": "Income Account"
}
"Management Consultancy Fees 1": {},
"Sales Account": {},
"Sales of I/C": {}
}
},
"root_type": "Income"

View File

@@ -1,38 +1,38 @@
{
"country_code": "de",
"name": "SKR03 mit Kontonummern",
"tree": {
"Aktiva": {
"is_group": 1,
"country_code": "de",
"name": "SKR03 mit Kontonummern",
"tree": {
"Aktiva": {
"is_group": 1,
"root_type": "Asset",
"A - Anlagevermögen": {
"is_group": 1,
"EDV-Software": {
"account_number": "0027",
"account_type": "Fixed Asset"
},
"Geschäftsausstattung": {
"account_number": "0410",
"account_type": "Fixed Asset"
},
"Büroeinrichtung": {
"account_number": "0420",
"account_type": "Fixed Asset"
},
"Darlehen": {
"account_number": "0565"
},
"Maschinen": {
"account_number": "0210",
"account_type": "Fixed Asset"
},
"Betriebsausstattung": {
"account_number": "0400",
"account_type": "Fixed Asset"
},
"Ladeneinrichtung": {
"account_number": "0430",
"account_type": "Fixed Asset"
"A - Anlagevermögen": {
"is_group": 1,
"EDV-Software": {
"account_number": "0027",
"account_type": "Fixed Asset"
},
"Gesch\u00e4ftsausstattung": {
"account_number": "0410",
"account_type": "Fixed Asset"
},
"B\u00fcroeinrichtung": {
"account_number": "0420",
"account_type": "Fixed Asset"
},
"Darlehen": {
"account_number": "0565"
},
"Maschinen": {
"account_number": "0210",
"account_type": "Fixed Asset"
},
"Betriebsausstattung": {
"account_number": "0400",
"account_type": "Fixed Asset"
},
"Ladeneinrichtung": {
"account_number": "0430",
"account_type": "Fixed Asset"
},
"Accumulated Depreciation": {
"account_type": "Accumulated Depreciation"
@@ -60,46 +60,36 @@
"Durchlaufende Posten": {
"account_number": "1590"
},
"Verrechnungskonto Gewinnermittlung § 4 Abs. 3 EStG, nicht ergebniswirksam": {
"Gewinnermittlung \u00a74/3 nicht Ergebniswirksam": {
"account_number": "1371"
},
"Abziehbare Vorsteuer": {
"account_type": "Tax",
"is_group": 1,
"Abziehbare Vorsteuer 7 %": {
"account_number": "1571",
"account_type": "Tax",
"tax_rate": 7.0
"Abziehbare Vorsteuer 7%": {
"account_number": "1571"
},
"Abziehbare Vorsteuer 19 %": {
"account_number": "1576",
"account_type": "Tax",
"tax_rate": 19.0
"Abziehbare Vorsteuer 19%": {
"account_number": "1576"
},
"Abziehbare Vorsteuer nach § 13b UStG 19 %": {
"account_number": "1577",
"account_type": "Tax",
"tax_rate": 19.0
"Abziehbare Vorsteuer nach \u00a713b UStG 19%": {
"account_number": "1577"
},
"Leistungen \u00a713b UStG 19% Vorsteuer, 19% Umsatzsteuer": {
"account_number": "3120"
}
}
},
"III. Wertpapiere": {
"is_group": 1,
"Anteile an verbundenen Unternehmen (Umlaufvermögen)": {
"account_number": "1340"
},
"Anteile an herrschender oder mit Mehrheit beteiligter Gesellschaft": {
"account_number": "1344"
},
"Sonstige Wertpapiere": {
"account_number": "1348"
}
"is_group": 1
},
"IV. Kassenbestand, Bundesbankguthaben, Guthaben bei Kreditinstituten und Schecks.": {
"is_group": 1,
"Kasse": {
"is_group": 1,
"account_type": "Cash",
"is_group": 1,
"Kasse": {
"is_group": 1,
"account_number": "1000",
"account_type": "Cash"
}
@@ -121,21 +111,21 @@
"C - Rechnungsabgrenzungsposten": {
"is_group": 1,
"Aktive Rechnungsabgrenzung": {
"account_number": "0980"
"account_number": "0980"
}
},
"D - Aktive latente Steuern": {
"is_group": 1,
"Aktive latente Steuern": {
"account_number": "0983"
"account_number": "0983"
}
},
"E - Aktiver Unterschiedsbetrag aus der Vermögensverrechnung": {
"is_group": 1
}
},
"Passiva": {
"is_group": 1,
},
"Passiva": {
"is_group": 1,
"root_type": "Liability",
"A. Eigenkapital": {
"is_group": 1,
@@ -210,32 +200,26 @@
},
"Umsatzsteuer": {
"is_group": 1,
"Umsatzsteuer 7 %": {
"account_number": "1771",
"account_type": "Tax",
"tax_rate": 7.0
"account_type": "Tax",
"Umsatzsteuer 7%": {
"account_number": "1771"
},
"Umsatzsteuer 19 %": {
"account_number": "1776",
"account_type": "Tax",
"tax_rate": 19.0
"Umsatzsteuer 19%": {
"account_number": "1776"
},
"Umsatzsteuer-Vorauszahlung": {
"account_number": "1780",
"account_type": "Tax"
"account_number": "1780"
},
"Umsatzsteuer-Vorauszahlung 1/11": {
"account_number": "1781"
},
"Umsatzsteuer nach § 13b UStG 19 %": {
"account_number": "1787",
"account_type": "Tax",
"tax_rate": 19.0
"Umsatzsteuer \u00a7 13b UStG 19%": {
"account_number": "1787"
},
"Umsatzsteuer Vorjahr": {
"account_number": "1790"
},
"Umsatzsteuer frühere Jahre": {
"Umsatzsteuer fr\u00fchere Jahre": {
"account_number": "1791"
}
}
@@ -250,56 +234,44 @@
"E. Passive latente Steuern": {
"is_group": 1
}
},
"Erlöse u. Erträge 2/8": {
"is_group": 1,
"root_type": "Income",
"Erlöskonten 8": {
},
"Erl\u00f6se u. Ertr\u00e4ge 2/8": {
"is_group": 1,
"root_type": "Income",
"Erl\u00f6skonten 8": {
"is_group": 1,
"Erlöse": {
"account_number": "8200",
"account_type": "Income Account"
},
"Erlöse USt. 19 %": {
"account_number": "8400",
"account_type": "Income Account"
},
"Erlöse USt. 7 %": {
"account_number": "8300",
"account_type": "Income Account"
}
},
"Ertragskonten 2": {
"is_group": 1,
"sonstige Zinsen und ähnliche Erträge": {
"account_number": "2650",
"account_type": "Income Account"
},
"Außerordentliche Erträge": {
"account_number": "2500",
"account_type": "Income Account"
},
"Sonstige Erträge": {
"account_number": "2700",
"account_type": "Income Account"
}
}
},
"Aufwendungen 2/4": {
"is_group": 1,
"Erl\u00f6se": {
"account_number": "8200",
"account_type": "Income Account"
},
"Erl\u00f6se USt. 19%": {
"account_number": "8400",
"account_type": "Income Account"
},
"Erl\u00f6se USt. 7%": {
"account_number": "8300",
"account_type": "Income Account"
}
},
"Ertragskonten 2": {
"is_group": 1,
"sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge": {
"account_number": "2650",
"account_type": "Income Account"
},
"Au\u00dferordentliche Ertr\u00e4ge": {
"account_number": "2500",
"account_type": "Income Account"
},
"Sonstige Ertr\u00e4ge": {
"account_number": "2700",
"account_type": "Income Account"
}
}
},
"Aufwendungen 2/4": {
"is_group": 1,
"root_type": "Expense",
"Fremdleistungen": {
"account_number": "3100",
"account_type": "Expense Account"
},
"Fremdleistungen ohne Vorsteuer": {
"account_number": "3109",
"account_type": "Expense Account"
},
"Bauleistungen eines im Inland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer": {
"account_number": "3120",
"account_type": "Expense Account"
},
"Wareneingang": {
"account_number": "3200"
},
@@ -326,234 +298,234 @@
"Gegenkonto 4996-4998": {
"account_number": "4999"
},
"Abschreibungen": {
"is_group": 1,
"Abschreibungen": {
"is_group": 1,
"Abschreibungen auf Sachanlagen (ohne AfA auf Kfz und Gebäude)": {
"account_number": "4830",
"account_type": "Accumulated Depreciation"
"account_number": "4830",
"account_type": "Accumulated Depreciation"
},
"Abschreibungen auf Gebäude": {
"account_number": "4831",
"account_type": "Depreciation"
"account_number": "4831",
"account_type": "Depreciation"
},
"Abschreibungen auf Kfz": {
"account_number": "4832",
"account_type": "Depreciation"
"account_number": "4832",
"account_type": "Depreciation"
},
"Sofortabschreibung GWG": {
"account_number": "4855",
"account_type": "Expense Account"
"account_number": "4855",
"account_type": "Expense Account"
}
},
"Kfz-Kosten": {
"is_group": 1,
"Kfz-Steuer": {
"account_number": "4510",
"account_type": "Expense Account"
},
"Kfz-Versicherungen": {
"account_number": "4520",
"account_type": "Expense Account"
},
"laufende Kfz-Betriebskosten": {
"account_number": "4530",
"account_type": "Expense Account"
},
"Kfz-Reparaturen": {
"account_number": "4540",
"account_type": "Expense Account"
},
"Fremdfahrzeuge": {
"account_number": "4570",
"account_type": "Expense Account"
},
"sonstige Kfz-Kosten": {
"account_number": "4580",
"account_type": "Expense Account"
}
},
"Personalkosten": {
"is_group": 1,
"Gehälter": {
"account_number": "4120",
"account_type": "Expense Account"
},
"gesetzliche soziale Aufwendungen": {
"account_number": "4130",
"account_type": "Expense Account"
},
"Aufwendungen für Altersvorsorge": {
"account_number": "4165",
"account_type": "Expense Account"
},
"Vermögenswirksame Leistungen": {
"account_number": "4170",
"account_type": "Expense Account"
},
"Aushilfslöhne": {
"account_number": "4190",
"account_type": "Expense Account"
}
},
"Raumkosten": {
"is_group": 1,
"Miete und Nebenkosten": {
"account_number": "4210",
"account_type": "Expense Account"
},
"Gas, Wasser, Strom (Verwaltung, Vertrieb)": {
"account_number": "4240",
"account_type": "Expense Account"
},
"Reinigung": {
"account_number": "4250",
"account_type": "Expense Account"
}
},
"Reparatur/Instandhaltung": {
"is_group": 1,
"Reparaturen und Instandhaltungen von anderen Anlagen und Betriebs- und Geschäftsausstattung": {
"account_number": "4805",
"account_type": "Expense Account"
}
},
"Versicherungsbeiträge": {
"is_group": 1,
"Versicherungen": {
"account_number": "4360",
"account_type": "Expense Account"
},
"Beiträge": {
"account_number": "4380",
"account_type": "Expense Account"
},
"sonstige Ausgaben": {
"account_number": "4390",
"account_type": "Expense Account"
},
"steuerlich abzugsfähige Verspätungszuschläge und Zwangsgelder": {
"account_number": "4396",
"account_type": "Expense Account"
}
},
"Werbe-/Reisekosten": {
"is_group": 1,
"Werbekosten": {
"account_number": "4610",
"account_type": "Expense Account"
},
"Aufmerksamkeiten": {
"account_number": "4653",
"account_type": "Expense Account"
},
"nicht abzugsfähige Betriebsausg. aus Werbe-, Repräs.- u. Reisekosten": {
"account_number": "4665",
"account_type": "Expense Account"
},
"Reisekosten Unternehmer": {
"account_number": "4670",
"account_type": "Expense Account"
}
},
"verschiedene Kosten": {
"is_group": 1,
"Porto": {
"account_number": "4910",
"account_type": "Expense Account"
},
"Telekom": {
"account_number": "4920",
"account_type": "Expense Account"
},
"Mobilfunk D2": {
"account_number": "4921",
"account_type": "Expense Account"
},
"Internet": {
"account_number": "4922",
"account_type": "Expense Account"
},
"Bürobedarf": {
"account_number": "4930",
"account_type": "Expense Account"
},
"Zeitschriften, Bücher": {
"account_number": "4940",
"account_type": "Expense Account"
},
"Fortbildungskosten": {
"account_number": "4945",
"account_type": "Expense Account"
},
"Buchführungskosten": {
"account_number": "4955",
"account_type": "Expense Account"
},
"Abschluß- u. Prüfungskosten": {
"account_number": "4957",
"account_type": "Expense Account"
},
"Nebenkosten des Geldverkehrs": {
"account_number": "4970",
"account_type": "Expense Account"
},
"Werkzeuge und Kleingeräte": {
"account_number": "4985",
"account_type": "Expense Account"
}
},
"Zinsaufwendungen": {
"is_group": 1,
"Zinsaufwendungen für kurzfristige Verbindlichkeiten": {
"account_number": "2110",
"account_type": "Expense Account"
},
"Zinsaufwendungen für KFZ Finanzierung": {
"account_number": "2121",
"account_type": "Expense Account"
}
}
},
"Anfangsbestand 9": {
"is_group": 1,
"root_type": "Equity",
"Saldenvortragskonten": {
"is_group": 1,
"Saldenvortrag Sachkonten": {
"account_number": "9000"
},
"Saldenvorträge Debitoren": {
"account_number": "9008"
},
"Saldenvorträge Kreditoren": {
"account_number": "9009"
}
}
},
"Privatkonten 1": {
"is_group": 1,
"root_type": "Equity",
"Privatentnahmen/-einlagen": {
"is_group": 1,
"Privatentnahme allgemein": {
"account_number": "1800"
},
"Privatsteuern": {
"account_number": "1810"
},
"Sonderausgaben beschränkt abzugsfähig": {
"account_number": "1820"
},
"Sonderausgaben unbeschränkt abzugsfähig": {
"account_number": "1830"
},
"Außergewöhnliche Belastungen": {
"account_number": "1850"
},
"Privateinlagen": {
"account_number": "1890"
}
}
}
}
},
"Kfz-Kosten": {
"is_group": 1,
"Kfz-Steuer": {
"account_number": "4510",
"account_type": "Expense Account"
},
"Kfz-Versicherungen": {
"account_number": "4520",
"account_type": "Expense Account"
},
"laufende Kfz-Betriebskosten": {
"account_number": "4530",
"account_type": "Expense Account"
},
"Kfz-Reparaturen": {
"account_number": "4540",
"account_type": "Expense Account"
},
"Fremdfahrzeuge": {
"account_number": "4570",
"account_type": "Expense Account"
},
"sonstige Kfz-Kosten": {
"account_number": "4580",
"account_type": "Expense Account"
}
},
"Personalkosten": {
"is_group": 1,
"Geh\u00e4lter": {
"account_number": "4120",
"account_type": "Expense Account"
},
"gesetzliche soziale Aufwendungen": {
"account_number": "4130",
"account_type": "Expense Account"
},
"Aufwendungen f\u00fcr Altersvorsorge": {
"account_number": "4165",
"account_type": "Expense Account"
},
"Verm\u00f6genswirksame Leistungen": {
"account_number": "4170",
"account_type": "Expense Account"
},
"Aushilfsl\u00f6hne": {
"account_number": "4190",
"account_type": "Expense Account"
}
},
"Raumkosten": {
"is_group": 1,
"Miete und Nebenkosten": {
"account_number": "4210",
"account_type": "Expense Account"
},
"Gas, Wasser, Strom (Verwaltung, Vertrieb)": {
"account_number": "4240",
"account_type": "Expense Account"
},
"Reinigung": {
"account_number": "4250",
"account_type": "Expense Account"
}
},
"Reparatur/Instandhaltung": {
"is_group": 1,
"Reparatur u. Instandh. von Anlagen/Maschinen u. Betriebs- u. Gesch\u00e4ftsausst.": {
"account_number": "4805",
"account_type": "Expense Account"
}
},
"Versicherungsbeitr\u00e4ge": {
"is_group": 1,
"Versicherungen": {
"account_number": "4360",
"account_type": "Expense Account"
},
"Beitr\u00e4ge": {
"account_number": "4380",
"account_type": "Expense Account"
},
"sonstige Ausgaben": {
"account_number": "4390",
"account_type": "Expense Account"
},
"steuerlich abzugsf\u00e4hige Versp\u00e4tungszuschl\u00e4ge und Zwangsgelder": {
"account_number": "4396",
"account_type": "Expense Account"
}
},
"Werbe-/Reisekosten": {
"is_group": 1,
"Werbekosten": {
"account_number": "4610",
"account_type": "Expense Account"
},
"Aufmerksamkeiten": {
"account_number": "4653",
"account_type": "Expense Account"
},
"nicht abzugsf\u00e4hige Betriebsausg. aus Werbe-, Repr\u00e4s.- u. Reisekosten": {
"account_number": "4665",
"account_type": "Expense Account"
},
"Reisekosten Unternehmer": {
"account_number": "4670",
"account_type": "Expense Account"
}
},
"verschiedene Kosten": {
"is_group": 1,
"Porto": {
"account_number": "4910",
"account_type": "Expense Account"
},
"Telekom": {
"account_number": "4920",
"account_type": "Expense Account"
},
"Mobilfunk D2": {
"account_number": "4921",
"account_type": "Expense Account"
},
"Internet": {
"account_number": "4922",
"account_type": "Expense Account"
},
"B\u00fcrobedarf": {
"account_number": "4930",
"account_type": "Expense Account"
},
"Zeitschriften, B\u00fccher": {
"account_number": "4940",
"account_type": "Expense Account"
},
"Fortbildungskosten": {
"account_number": "4945",
"account_type": "Expense Account"
},
"Buchf\u00fchrungskosten": {
"account_number": "4955",
"account_type": "Expense Account"
},
"Abschlu\u00df- u. Pr\u00fcfungskosten": {
"account_number": "4957",
"account_type": "Expense Account"
},
"Nebenkosten des Geldverkehrs": {
"account_number": "4970",
"account_type": "Expense Account"
},
"Werkzeuge und Kleinger\u00e4te": {
"account_number": "4985",
"account_type": "Expense Account"
}
},
"Zinsaufwendungen": {
"is_group": 1,
"Zinsaufwendungen f\u00fcr kurzfristige Verbindlichkeiten": {
"account_number": "2110",
"account_type": "Expense Account"
},
"Zinsaufwendungen f\u00fcr KFZ Finanzierung": {
"account_number": "2121",
"account_type": "Expense Account"
}
}
},
"Anfangsbestand 9": {
"is_group": 1,
"root_type": "Equity",
"Saldenvortragskonten": {
"is_group": 1,
"Saldenvortrag Sachkonten": {
"account_number": "9000"
},
"Saldenvortr\u00e4ge Debitoren": {
"account_number": "9008"
},
"Saldenvortr\u00e4ge Kreditoren": {
"account_number": "9009"
}
}
},
"Privatkonten 1": {
"is_group": 1,
"root_type": "Equity",
"Privatentnahmen/-einlagen": {
"is_group": 1,
"Privatentnahme allgemein": {
"account_number": "1800"
},
"Privatsteuern": {
"account_number": "1810"
},
"Sonderausgaben beschr\u00e4nkt abzugsf\u00e4hig": {
"account_number": "1820"
},
"Sonderausgaben unbeschr\u00e4nkt abzugsf\u00e4hig": {
"account_number": "1830"
},
"Au\u00dfergew\u00f6hnliche Belastungen": {
"account_number": "1850"
},
"Privateinlagen": {
"account_number": "1890"
}
}
}
}
}

View File

@@ -69,7 +69,8 @@
"Persediaan Barang": {
"Persediaan Barang": {
"account_number": "1141.000",
"account_type": "Stock"
"account_type": "Stock",
"is_group": 1
},
"Uang Muka Pembelian": {
"Uang Muka Pembelian": {
@@ -669,8 +670,7 @@
},
"Penjualan Barang Dagangan": {
"Penjualan": {
"account_number": "4110.000",
"account_type": "Income Account"
"account_number": "4110.000"
},
"Potongan Penjualan": {
"account_number": "4130.000"

View File

@@ -109,7 +109,8 @@
}
},
"INVENTARIOS": {
"account_type": "Stock"
"account_type": "Stock",
"is_group": 1
}
},
"ACTIVO LARGO PLAZO": {
@@ -397,18 +398,10 @@
"INGRESOS POR SERVICIOS 1": {}
},
"VENTAS": {
"VENTAS EXPORTACION": {
"account_type": "Income Account"
},
"VENTAS INMUEBLES": {
"account_type": "Income Account"
},
"VENTAS NACIONALES": {
"account_type": "Income Account"
},
"VENTAS NACIONALES AL DETAL": {
"account_type": "Income Account"
}
"VENTAS EXPORTACION": {},
"VENTAS INMUEBLES": {},
"VENTAS NACIONALES": {},
"VENTAS NACIONALES AL DETAL": {}
}
}
},

View File

@@ -2,13 +2,75 @@
"country_code": "nl",
"name": "Netherlands - Grootboekschema",
"tree": {
"FABRIKAGEREKENINGEN": {
"is_group": 1,
"root_type": "Expense"
},
"FINANCIELE REKENINGEN, KORTLOPENDE VORDERINGEN EN SCHULDEN": {
"Bank": {
"RABO Bank": {
"account_type": "Bank"
},
"account_type": "Bank"
},
},
"KORTLOPENDE SCHULDEN": {
"Af te dragen Btw-verlegd": {
"account_type": "Tax"
},
"Afdracht loonheffing": {},
"Btw af te dragen hoog": {
"account_type": "Tax"
},
"Btw af te dragen laag": {
"account_type": "Tax"
},
"Btw af te dragen overig": {
"account_type": "Tax"
},
"Btw oude jaren": {
"account_type": "Tax"
},
"Btw te vorderen hoog": {
"account_type": "Tax"
},
"Btw te vorderen laag": {
"account_type": "Tax"
},
"Btw te vorderen overig": {
"account_type": "Tax"
},
"Btw-afdracht": {
"account_type": "Tax"
},
"Crediteuren": {
"account_type": "Payable"
},
"Dividend": {},
"Dividendbelasting": {},
"Energiekosten 1": {},
"Investeringsaftrek": {},
"Loonheffing": {},
"Overige te betalen posten": {},
"Pensioenpremies 1": {},
"Premie WIR": {},
"Rekening-courant inkoopvereniging": {},
"Rente": {},
"Sociale lasten 1": {},
"Stock Recieved niet gefactureerd": {
"account_type": "Stock Received But Not Billed"
},
"Tanti\u00e8mes 1": {},
"Te vorderen Btw-verlegd": {
"account_type": "Tax"
},
"Telefoon/telefax 1": {},
"Termijnen onderh. werk": {},
"Vakantiedagen": {},
"Vakantiegeld 1": {},
"Vakantiezegels": {},
"Vennootschapsbelasting": {},
"Vooruit ontvangen bedr.": {}
},
"LIQUIDE MIDDELEN": {
"ABN-AMRO bank": {},
"Bankbetaalkaarten": {},
@@ -29,110 +91,6 @@
},
"account_type": "Cash"
},
"TUSSENREKENINGEN": {
"Betaalwijze cadeaubonnen": {
"account_type": "Cash"
},
"Betaalwijze chipknip": {
"account_type": "Cash"
},
"Betaalwijze contant": {
"account_type": "Cash"
},
"Betaalwijze pin": {
"account_type": "Cash"
},
"Inkopen Nederland hoog": {
"account_type": "Cash"
},
"Inkopen Nederland laag": {
"account_type": "Cash"
},
"Inkopen Nederland onbelast": {
"account_type": "Cash"
},
"Inkopen Nederland overig": {
"account_type": "Cash"
},
"Inkopen Nederland verlegd": {
"account_type": "Cash"
},
"Inkopen binnen EU hoog": {
"account_type": "Cash"
},
"Inkopen binnen EU laag": {
"account_type": "Cash"
},
"Inkopen binnen EU overig": {
"account_type": "Cash"
},
"Inkopen buiten EU hoog": {
"account_type": "Cash"
},
"Inkopen buiten EU laag": {
"account_type": "Cash"
},
"Inkopen buiten EU overig": {
"account_type": "Cash"
},
"Kassa 1": {
"account_type": "Cash"
},
"Kassa 2": {
"account_type": "Cash"
},
"Netto lonen": {
"account_type": "Cash"
},
"Tegenrekening Inkopen": {
"account_type": "Cash"
},
"Tussenrek. autom. betalingen": {
"account_type": "Cash"
},
"Tussenrek. autom. loonbetalingen": {
"account_type": "Cash"
},
"Tussenrek. cadeaubonbetalingen": {
"account_type": "Cash"
},
"Tussenrekening balans": {
"account_type": "Cash"
},
"Tussenrekening chipknip": {
"account_type": "Cash"
},
"Tussenrekening correcties": {
"account_type": "Cash"
},
"Tussenrekening pin": {
"account_type": "Cash"
},
"Vraagposten": {
"account_type": "Cash"
},
"VOORRAAD GRONDSTOFFEN, HULPMATERIALEN EN HANDELSGOEDEREN": {
"Emballage": {},
"Gereed product 1": {},
"Gereed product 2": {},
"Goederen 1": {},
"Goederen 2": {},
"Goederen in consignatie": {},
"Goederen onderweg": {},
"Grondstoffen 1": {},
"Grondstoffen 2": {},
"Halffabrikaten 1": {},
"Halffabrikaten 2": {},
"Hulpstoffen 1": {},
"Hulpstoffen 2": {},
"Kantoorbenodigdheden": {},
"Onderhanden werk": {},
"Verpakkingsmateriaal": {},
"Zegels": {},
"root_type": "Asset"
},
"root_type": "Asset"
},
"VORDERINGEN": {
"Debiteuren": {
"account_type": "Receivable"
@@ -146,299 +104,278 @@
"Voorziening dubieuze debiteuren": {}
},
"root_type": "Asset"
},
"KORTLOPENDE SCHULDEN": {
"Af te dragen Btw-verlegd": {
"account_type": "Tax"
},
"Afdracht loonheffing": {},
"Btw af te dragen hoog": {
"account_type": "Tax"
},
"Btw af te dragen laag": {
"account_type": "Tax"
},
"Btw af te dragen overig": {
"account_type": "Tax"
},
"Btw oude jaren": {
"account_type": "Tax"
},
"Btw te vorderen hoog": {
"account_type": "Tax"
},
"Btw te vorderen laag": {
"account_type": "Tax"
},
"Btw te vorderen overig": {
"account_type": "Tax"
},
"Btw-afdracht": {
"account_type": "Tax"
},
"Crediteuren": {
"account_type": "Payable"
},
"Dividend": {},
"Dividendbelasting": {},
"Energiekosten 1": {},
"Investeringsaftrek": {},
"Loonheffing": {},
"Overige te betalen posten": {},
"Pensioenpremies 1": {},
"Premie WIR": {},
"Rekening-courant inkoopvereniging": {},
"Rente": {},
"Sociale lasten 1": {},
"Stock Recieved niet gefactureerd": {
"account_type": "Stock Received But Not Billed"
},
"Tanti\u00e8mes 1": {},
"Te vorderen Btw-verlegd": {
"account_type": "Tax"
},
"Telefoon/telefax 1": {},
"Termijnen onderh. werk": {},
"Vakantiedagen": {},
"Vakantiegeld 1": {},
"Vakantiezegels": {},
"Vennootschapsbelasting": {},
"Vooruit ontvangen bedr.": {},
"is_group": 1,
"root_type": "Liability"
},
"FABRIKAGEREKENINGEN": {
},
"INDIRECTE KOSTEN": {
"is_group": 1,
"root_type": "Expense",
"INDIRECTE KOSTEN": {
"is_group": 1,
"root_type": "Expense"
},
"KOSTENREKENINGEN": {
"AFSCHRIJVINGEN": {
"Aanhangwagens": {},
"Aankoopkosten": {},
"Aanloopkosten": {},
"Auteursrechten": {},
"Bedrijfsgebouwen": {},
"Bedrijfsinventaris": {
"account_type": "Depreciation"
},
"Drankvergunningen": {},
"Fabrieksinventaris": {
"account_type": "Depreciation"
},
"Gebouwen": {},
"Gereedschappen": {},
"Goodwill": {},
"Grondverbetering": {},
"Heftrucks": {},
"Kantine-inventaris": {},
"Kantoorinventaris": {
"account_type": "Depreciation"
},
"Kantoormachines": {},
"Licenties": {},
"Machines 1": {},
"Magazijninventaris": {},
"Octrooien": {},
"Ontwikkelingskosten": {},
"Pachtersinvestering": {},
"Parkeerplaats": {},
"Personenauto's": {
"account_type": "Depreciation"
},
"Rijwielen en bromfietsen": {},
"Tonnagevergunningen": {},
"Verbouwingen": {},
"Vergunningen": {},
"Voorraadverschillen": {},
"Vrachtauto's": {},
"Winkels": {},
"Woon-winkelhuis": {},
"root_type": "Expense"
},
"KOSTENREKENINGEN": {
"AFSCHRIJVINGEN": {
"Aanhangwagens": {},
"Aankoopkosten": {},
"Aanloopkosten": {},
"Auteursrechten": {},
"Bedrijfsgebouwen": {},
"Bedrijfsinventaris": {
"account_type": "Depreciation"
},
"ALGEMENE KOSTEN": {
"Accountantskosten": {},
"Advieskosten": {},
"Assuranties 1": {},
"Bankkosten": {},
"Juridische kosten": {},
"Overige algemene kosten": {},
"Toev. Ass. eigen risico": {}
"Drankvergunningen": {},
"Fabrieksinventaris": {
"account_type": "Depreciation"
},
"BEDRIJFSKOSTEN": {
"Assuranties 2": {},
"Energie (krachtstroom)": {},
"Gereedschappen 1": {},
"Hulpmaterialen 1": {},
"Huur inventaris": {},
"Huur machines": {},
"Leasing invent.operational": {},
"Leasing mach. operational": {},
"Onderhoud inventaris": {},
"Onderhoud machines": {},
"Ophalen/vervoer afval": {},
"Overige bedrijfskosten": {}
"Gebouwen": {},
"Gereedschappen": {},
"Goodwill": {},
"Grondverbetering": {},
"Heftrucks": {},
"Kantine-inventaris": {},
"Kantoorinventaris": {
"account_type": "Depreciation"
},
"FINANCIERINGSKOSTEN 1": {
"Overige rentebaten": {},
"Overige rentelasten": {},
"Rente bankkrediet": {},
"Rente huurkoopcontracten": {},
"Rente hypotheek": {},
"Rente leasecontracten": {},
"Rente lening o/g": {},
"Rente lening u/g": {}
"Kantoormachines": {},
"Licenties": {},
"Machines 1": {},
"Magazijninventaris": {},
"Octrooien": {},
"Ontwikkelingskosten": {},
"Pachtersinvestering": {},
"Parkeerplaats": {},
"Personenauto's": {
"account_type": "Depreciation"
},
"HUISVESTINGSKOSTEN": {
"Assurantie onroerend goed": {},
"Belastingen onr. Goed": {},
"Energiekosten": {},
"Groot onderhoud onr. Goed": {},
"Huur": {},
"Huurwaarde woongedeelte": {},
"Onderhoud onroerend goed": {},
"Ontvangen huren": {},
"Overige huisvestingskosten": {},
"Pacht": {},
"Schoonmaakkosten": {},
"Toevoeging egalisatieres. Groot onderhoud": {}
},
"KANTOORKOSTEN": {
"Administratiekosten": {},
"Contributies/abonnementen": {},
"Huur kantoorapparatuur": {},
"Internetaansluiting": {},
"Kantoorbenodigdh./drukw.": {},
"Onderhoud kantoorinvent.": {},
"Overige kantoorkosten": {},
"Porti": {},
"Telefoon/telefax": {}
},
"OVERIGE BATEN EN LASTEN": {
"Betaalde schadevergoed.": {},
"Boekverlies vaste activa": {},
"Boekwinst van vaste activa": {},
"K.O. regeling OB": {},
"Kasverschillen": {},
"Kosten loonbelasting": {},
"Kosten omzetbelasting": {},
"Nadelige koersverschillen": {},
"Naheffing bedrijfsver.": {},
"Ontvangen schadevergoed.": {},
"Overige baten": {},
"Overige lasten": {},
"Voordelige koersverschil.": {}
},
"PERSONEELSKOSTEN": {
"Autokostenvergoeding": {},
"Bedrijfskleding": {},
"Belastingvrije uitkeringen": {},
"Bijzondere beloningen": {},
"Congressen, seminars en symposia": {},
"Gereedschapsgeld": {},
"Geschenken personeel": {},
"Gratificaties": {},
"Inhouding pensioenpremies": {},
"Inhouding sociale lasten": {},
"Kantinekosten": {},
"Lonen en salarissen": {},
"Loonwerk": {},
"Managementvergoedingen": {},
"Opleidingskosten": {},
"Oprenting stamrechtverpl.": {},
"Overhevelingstoeslag": {},
"Overige kostenverg.": {},
"Overige personeelskosten": {},
"Overige uitkeringen": {},
"Pensioenpremies": {},
"Provisie 1": {},
"Reiskosten": {},
"Rijwielvergoeding": {},
"Sociale lasten": {},
"Tanti\u00e8mes": {},
"Thuiswerkers": {},
"Toev. Backservice pens.verpl.": {},
"Toevoeging pensioenverpl.": {},
"Uitkering ziekengeld": {},
"Uitzendkrachten": {},
"Vakantiebonnen": {},
"Vakantiegeld": {},
"Vergoeding studiekosten": {},
"Wervingskosten personeel": {}
},
"VERKOOPKOSTEN": {
"Advertenties": {},
"Afschrijving dubieuze deb.": {},
"Beurskosten": {},
"Etalagekosten": {},
"Exportkosten": {},
"Kascorrecties": {},
"Overige verkoopkosten": {},
"Provisie": {},
"Reclame": {},
"Reis en verblijfkosten": {},
"Relatiegeschenken": {},
"Representatiekosten": {},
"Uitgaande vrachten": {},
"Veilingkosten": {},
"Verpakkingsmateriaal 1": {},
"Websitekosten": {}
},
"VERVOERSKOSTEN": {
"Assuranties auto's": {},
"Brandstoffen": {},
"Leasing auto's": {},
"Onderhoud personenauto's": {},
"Onderhoud vrachtauto's": {},
"Overige vervoerskosten": {},
"Priv\u00e9-gebruik auto's": {},
"Wegenbelasting": {}
},
"VOORRAAD GEREED PRODUCT EN ONDERHANDEN WERK": {
"Betalingskort. crediteuren": {},
"Garantiekosten": {},
"Hulpmaterialen": {},
"Inkomende vrachten": {
"account_type": "Expenses Included In Valuation"
},
"Inkoop import buiten EU hoog": {},
"Inkoop import buiten EU laag": {},
"Inkoop import buiten EU overig": {},
"Inkoopbonussen": {},
"Inkoopkosten": {},
"Inkoopprovisie": {},
"Inkopen BTW verlegd": {},
"Inkopen EU hoog tarief": {},
"Inkopen EU laag tarief": {},
"Inkopen EU overig": {},
"Inkopen hoog": {},
"Inkopen laag": {},
"Inkopen nul": {},
"Inkopen overig": {},
"Invoerkosten": {},
"Kosten inkoopvereniging": {},
"Kostprijs omzet grondstoffen": {
"account_type": "Cost of Goods Sold"
},
"Kostprijs omzet handelsgoederen": {},
"Onttrekking uitgev.garantie": {},
"Priv\u00e9-gebruik goederen": {},
"Stock aanpassing": {
"account_type": "Stock Adjustment"
},
"Tegenrekening inkoop": {},
"Toev. Voorz. incour. grondst.": {},
"Toevoeging garantieverpl.": {},
"Toevoeging voorz. incour. handelsgoed.": {},
"Uitbesteed werk": {},
"Voorz. Incourourant grondst.": {},
"Voorz.incour. handelsgoed.": {},
"root_type": "Expense"
},
"root_type": "Expense"
}
"Rijwielen en bromfietsen": {},
"Tonnagevergunningen": {},
"Verbouwingen": {},
"Vergunningen": {},
"Voorraadverschillen": {},
"Vrachtauto's": {},
"Winkels": {},
"Woon-winkelhuis": {},
"account_type": "Depreciation"
},
"ALGEMENE KOSTEN": {
"Accountantskosten": {},
"Advieskosten": {},
"Assuranties 1": {},
"Bankkosten": {},
"Juridische kosten": {},
"Overige algemene kosten": {},
"Toev. Ass. eigen risico": {}
},
"BEDRIJFSKOSTEN": {
"Assuranties 2": {},
"Energie (krachtstroom)": {},
"Gereedschappen 1": {},
"Hulpmaterialen 1": {},
"Huur inventaris": {},
"Huur machines": {},
"Leasing invent.operational": {},
"Leasing mach. operational": {},
"Onderhoud inventaris": {},
"Onderhoud machines": {},
"Ophalen/vervoer afval": {},
"Overige bedrijfskosten": {}
},
"FINANCIERINGSKOSTEN 1": {
"Overige rentebaten": {},
"Overige rentelasten": {},
"Rente bankkrediet": {},
"Rente huurkoopcontracten": {},
"Rente hypotheek": {},
"Rente leasecontracten": {},
"Rente lening o/g": {},
"Rente lening u/g": {}
},
"HUISVESTINGSKOSTEN": {
"Assurantie onroerend goed": {},
"Belastingen onr. Goed": {},
"Energiekosten": {},
"Groot onderhoud onr. Goed": {},
"Huur": {},
"Huurwaarde woongedeelte": {},
"Onderhoud onroerend goed": {},
"Ontvangen huren": {},
"Overige huisvestingskosten": {},
"Pacht": {},
"Schoonmaakkosten": {},
"Toevoeging egalisatieres. Groot onderhoud": {}
},
"KANTOORKOSTEN": {
"Administratiekosten": {},
"Contributies/abonnementen": {},
"Huur kantoorapparatuur": {},
"Internetaansluiting": {},
"Kantoorbenodigdh./drukw.": {},
"Onderhoud kantoorinvent.": {},
"Overige kantoorkosten": {},
"Porti": {},
"Telefoon/telefax": {}
},
"OVERIGE BATEN EN LASTEN": {
"Betaalde schadevergoed.": {},
"Boekverlies vaste activa": {},
"Boekwinst van vaste activa": {},
"K.O. regeling OB": {},
"Kasverschillen": {},
"Kosten loonbelasting": {},
"Kosten omzetbelasting": {},
"Nadelige koersverschillen": {},
"Naheffing bedrijfsver.": {},
"Ontvangen schadevergoed.": {},
"Overige baten": {},
"Overige lasten": {},
"Voordelige koersverschil.": {}
},
"PERSONEELSKOSTEN": {
"Autokostenvergoeding": {},
"Bedrijfskleding": {},
"Belastingvrije uitkeringen": {},
"Bijzondere beloningen": {},
"Congressen, seminars en symposia": {},
"Gereedschapsgeld": {},
"Geschenken personeel": {},
"Gratificaties": {},
"Inhouding pensioenpremies": {},
"Inhouding sociale lasten": {},
"Kantinekosten": {},
"Lonen en salarissen": {},
"Loonwerk": {},
"Managementvergoedingen": {},
"Opleidingskosten": {},
"Oprenting stamrechtverpl.": {},
"Overhevelingstoeslag": {},
"Overige kostenverg.": {},
"Overige personeelskosten": {},
"Overige uitkeringen": {},
"Pensioenpremies": {},
"Provisie 1": {},
"Reiskosten": {},
"Rijwielvergoeding": {},
"Sociale lasten": {},
"Tanti\u00e8mes": {},
"Thuiswerkers": {},
"Toev. Backservice pens.verpl.": {},
"Toevoeging pensioenverpl.": {},
"Uitkering ziekengeld": {},
"Uitzendkrachten": {},
"Vakantiebonnen": {},
"Vakantiegeld": {},
"Vergoeding studiekosten": {},
"Wervingskosten personeel": {}
},
"VERKOOPKOSTEN": {
"Advertenties": {},
"Afschrijving dubieuze deb.": {},
"Beurskosten": {},
"Etalagekosten": {},
"Exportkosten": {},
"Kascorrecties": {},
"Overige verkoopkosten": {},
"Provisie": {},
"Reclame": {},
"Reis en verblijfkosten": {},
"Relatiegeschenken": {},
"Representatiekosten": {},
"Uitgaande vrachten": {},
"Veilingkosten": {},
"Verpakkingsmateriaal 1": {},
"Websitekosten": {}
},
"VERVOERSKOSTEN": {
"Assuranties auto's": {},
"Brandstoffen": {},
"Leasing auto's": {},
"Onderhoud personenauto's": {},
"Onderhoud vrachtauto's": {},
"Overige vervoerskosten": {},
"Priv\u00e9-gebruik auto's": {},
"Wegenbelasting": {}
},
"root_type": "Expense"
},
"TUSSENREKENINGEN": {
"Betaalwijze cadeaubonnen": {
"account_type": "Cash"
},
"Betaalwijze chipknip": {
"account_type": "Cash"
},
"Betaalwijze contant": {
"account_type": "Cash"
},
"Betaalwijze pin": {
"account_type": "Cash"
},
"Inkopen Nederland hoog": {
"account_type": "Cash"
},
"Inkopen Nederland laag": {
"account_type": "Cash"
},
"Inkopen Nederland onbelast": {
"account_type": "Cash"
},
"Inkopen Nederland overig": {
"account_type": "Cash"
},
"Inkopen Nederland verlegd": {
"account_type": "Cash"
},
"Inkopen binnen EU hoog": {
"account_type": "Cash"
},
"Inkopen binnen EU laag": {
"account_type": "Cash"
},
"Inkopen binnen EU overig": {
"account_type": "Cash"
},
"Inkopen buiten EU hoog": {
"account_type": "Cash"
},
"Inkopen buiten EU laag": {
"account_type": "Cash"
},
"Inkopen buiten EU overig": {
"account_type": "Cash"
},
"Kassa 1": {
"account_type": "Cash"
},
"Kassa 2": {
"account_type": "Cash"
},
"Netto lonen": {
"account_type": "Cash"
},
"Tegenrekening Inkopen": {
"account_type": "Cash"
},
"Tussenrek. autom. betalingen": {
"account_type": "Cash"
},
"Tussenrek. autom. loonbetalingen": {
"account_type": "Cash"
},
"Tussenrek. cadeaubonbetalingen": {
"account_type": "Cash"
},
"Tussenrekening balans": {
"account_type": "Cash"
},
"Tussenrekening chipknip": {
"account_type": "Cash"
},
"Tussenrekening correcties": {
"account_type": "Cash"
},
"Tussenrekening pin": {
"account_type": "Cash"
},
"Vraagposten": {
"account_type": "Cash"
},
"root_type": "Asset"
},
"VASTE ACTIVA, EIGEN VERMOGEN, LANGLOPEND VREEMD VERMOGEN EN VOORZIENINGEN": {
"EIGEN VERMOGEN": {
@@ -665,7 +602,7 @@
"account_type": "Equity"
}
},
"root_type": "Equity"
"root_type": "Asset"
},
"VERKOOPRESULTATEN": {
"Diensten fabric. 0% niet-EU": {},
@@ -690,6 +627,67 @@
"Verleende Kredietbep. fabricage": {},
"Verleende Kredietbep. handel": {},
"root_type": "Income"
},
"VOORRAAD GEREED PRODUCT EN ONDERHANDEN WERK": {
"Betalingskort. crediteuren": {},
"Garantiekosten": {},
"Hulpmaterialen": {},
"Inkomende vrachten": {
"account_type": "Expenses Included In Valuation"
},
"Inkoop import buiten EU hoog": {},
"Inkoop import buiten EU laag": {},
"Inkoop import buiten EU overig": {},
"Inkoopbonussen": {},
"Inkoopkosten": {},
"Inkoopprovisie": {},
"Inkopen BTW verlegd": {},
"Inkopen EU hoog tarief": {},
"Inkopen EU laag tarief": {},
"Inkopen EU overig": {},
"Inkopen hoog": {},
"Inkopen laag": {},
"Inkopen nul": {},
"Inkopen overig": {},
"Invoerkosten": {},
"Kosten inkoopvereniging": {},
"Kostprijs omzet grondstoffen": {
"account_type": "Cost of Goods Sold"
},
"Kostprijs omzet handelsgoederen": {},
"Onttrekking uitgev.garantie": {},
"Priv\u00e9-gebruik goederen": {},
"Stock aanpassing": {
"account_type": "Stock Adjustment"
},
"Tegenrekening inkoop": {},
"Toev. Voorz. incour. grondst.": {},
"Toevoeging garantieverpl.": {},
"Toevoeging voorz. incour. handelsgoed.": {},
"Uitbesteed werk": {},
"Voorz. Incourourant grondst.": {},
"Voorz.incour. handelsgoed.": {},
"root_type": "Expense"
},
"VOORRAAD GRONDSTOFFEN, HULPMATERIALEN EN HANDELSGOEDEREN": {
"Emballage": {},
"Gereed product 1": {},
"Gereed product 2": {},
"Goederen 1": {},
"Goederen 2": {},
"Goederen in consignatie": {},
"Goederen onderweg": {},
"Grondstoffen 1": {},
"Grondstoffen 2": {},
"Halffabrikaten 1": {},
"Halffabrikaten 2": {},
"Hulpstoffen 1": {},
"Hulpstoffen 2": {},
"Kantoorbenodigdheden": {},
"Onderhanden werk": {},
"Verpakkingsmateriaal": {},
"Zegels": {},
"root_type": "Asset"
}
}
}

View File

@@ -5,17 +5,10 @@
import unittest
import frappe
from frappe.test_runner import make_test_records
from erpnext.accounts.doctype.account.account import (
InvalidAccountMergeError,
merge_account,
update_account_number,
)
from erpnext.accounts.doctype.account.account import merge_account, update_account_number
from erpnext.stock import get_company_default_inventory_account, get_warehouse_account
test_dependencies = ["Company"]
class TestAccount(unittest.TestCase):
def test_rename_account(self):
@@ -51,53 +44,49 @@ class TestAccount(unittest.TestCase):
frappe.delete_doc("Account", "1211-11-4 - 6 - Debtors 1 - Test - - _TC")
def test_merge_account(self):
create_account(
account_name="Current Assets",
is_group=1,
parent_account="Application of Funds (Assets) - _TC",
company="_Test Company",
)
create_account(
account_name="Securities and Deposits",
is_group=1,
parent_account="Current Assets - _TC",
company="_Test Company",
)
create_account(
account_name="Earnest Money",
parent_account="Securities and Deposits - _TC",
company="_Test Company",
)
create_account(
account_name="Cash In Hand",
is_group=1,
parent_account="Current Assets - _TC",
company="_Test Company",
)
create_account(
account_name="Receivable INR",
parent_account="Current Assets - _TC",
company="_Test Company",
account_currency="INR",
)
create_account(
account_name="Receivable USD",
parent_account="Current Assets - _TC",
company="_Test Company",
account_currency="USD",
)
if not frappe.db.exists("Account", "Current Assets - _TC"):
acc = frappe.new_doc("Account")
acc.account_name = "Current Assets"
acc.is_group = 1
acc.parent_account = "Application of Funds (Assets) - _TC"
acc.company = "_Test Company"
acc.insert()
if not frappe.db.exists("Account", "Securities and Deposits - _TC"):
acc = frappe.new_doc("Account")
acc.account_name = "Securities and Deposits"
acc.parent_account = "Current Assets - _TC"
acc.is_group = 1
acc.company = "_Test Company"
acc.insert()
if not frappe.db.exists("Account", "Earnest Money - _TC"):
acc = frappe.new_doc("Account")
acc.account_name = "Earnest Money"
acc.parent_account = "Securities and Deposits - _TC"
acc.company = "_Test Company"
acc.insert()
if not frappe.db.exists("Account", "Cash In Hand - _TC"):
acc = frappe.new_doc("Account")
acc.account_name = "Cash In Hand"
acc.is_group = 1
acc.parent_account = "Current Assets - _TC"
acc.company = "_Test Company"
acc.insert()
if not frappe.db.exists("Account", "Accumulated Depreciation - _TC"):
acc = frappe.new_doc("Account")
acc.account_name = "Accumulated Depreciation"
acc.parent_account = "Fixed Assets - _TC"
acc.company = "_Test Company"
acc.account_type = "Accumulated Depreciation"
acc.insert()
doc = frappe.get_doc("Account", "Securities and Deposits - _TC")
parent = frappe.db.get_value("Account", "Earnest Money - _TC", "parent_account")
self.assertEqual(parent, "Securities and Deposits - _TC")
merge_account("Securities and Deposits - _TC", "Cash In Hand - _TC")
merge_account(
"Securities and Deposits - _TC", "Cash In Hand - _TC", doc.is_group, doc.root_type, doc.company
)
parent = frappe.db.get_value("Account", "Earnest Money - _TC", "parent_account")
# Parent account of the child account changes after merging
@@ -106,28 +95,30 @@ class TestAccount(unittest.TestCase):
# Old account doesn't exist after merging
self.assertFalse(frappe.db.exists("Account", "Securities and Deposits - _TC"))
doc = frappe.get_doc("Account", "Current Assets - _TC")
# Raise error as is_group property doesn't match
self.assertRaises(
InvalidAccountMergeError,
frappe.ValidationError,
merge_account,
"Current Assets - _TC",
"Accumulated Depreciation - _TC",
doc.is_group,
doc.root_type,
doc.company,
)
doc = frappe.get_doc("Account", "Capital Stock - _TC")
# Raise error as root_type property doesn't match
self.assertRaises(
InvalidAccountMergeError,
frappe.ValidationError,
merge_account,
"Capital Stock - _TC",
"Softwares - _TC",
)
# Raise error as currency doesn't match
self.assertRaises(
InvalidAccountMergeError,
merge_account,
"Receivable INR - _TC",
"Receivable USD - _TC",
doc.is_group,
doc.root_type,
doc.company,
)
def test_account_sync(self):
@@ -197,58 +188,6 @@ class TestAccount(unittest.TestCase):
frappe.delete_doc("Account", "1234 - Test Rename Sync Account - _TC4")
frappe.delete_doc("Account", "1234 - Test Rename Sync Account - _TC5")
def test_account_currency_sync(self):
"""
In a parent->child company setup, child should inherit parent account currency if explicitly specified.
"""
make_test_records("Company")
frappe.local.flags.pop("ignore_root_company_validation", None)
def create_bank_account():
acc = frappe.new_doc("Account")
acc.account_name = "_Test Bank JPY"
acc.parent_account = "Temporary Accounts - _TC6"
acc.company = "_Test Company 6"
return acc
acc = create_bank_account()
# Explicitly set currency
acc.account_currency = "JPY"
acc.insert()
self.assertTrue(
frappe.db.exists(
{
"doctype": "Account",
"account_name": "_Test Bank JPY",
"account_currency": "JPY",
"company": "_Test Company 7",
}
)
)
frappe.delete_doc("Account", "_Test Bank JPY - _TC6")
frappe.delete_doc("Account", "_Test Bank JPY - _TC7")
acc = create_bank_account()
# default currency is used
acc.insert()
self.assertTrue(
frappe.db.exists(
{
"doctype": "Account",
"account_name": "_Test Bank JPY",
"account_currency": "USD",
"company": "_Test Company 7",
}
)
)
frappe.delete_doc("Account", "_Test Bank JPY - _TC6")
frappe.delete_doc("Account", "_Test Bank JPY - _TC7")
def test_child_company_account_rename_sync(self):
frappe.local.flags.pop("ignore_root_company_validation", None)
@@ -358,7 +297,7 @@ def _make_test_records(verbose=None):
# fixed asset depreciation
["_Test Fixed Asset", "Current Assets", 0, "Fixed Asset", None],
["_Test Accumulated Depreciations", "Current Assets", 0, "Accumulated Depreciation", None],
["_Test Depreciations", "Expenses", 0, "Depreciation", None],
["_Test Depreciations", "Expenses", 0, None, None],
["_Test Gain/Loss on Asset Disposal", "Expenses", 0, None, None],
# Receivable / Payable Account
["_Test Receivable", "Current Assets", 0, "Receivable", None],
@@ -406,20 +345,11 @@ def create_account(**kwargs):
"Account", filters={"account_name": kwargs.get("account_name"), "company": kwargs.get("company")}
)
if account:
account = frappe.get_doc("Account", account)
account.update(
dict(
is_group=kwargs.get("is_group", 0),
parent_account=kwargs.get("parent_account"),
)
)
account.save()
return account.name
return account
else:
account = frappe.get_doc(
dict(
doctype="Account",
is_group=kwargs.get("is_group", 0),
account_name=kwargs.get("account_name"),
account_type=kwargs.get("account_type"),
parent_account=kwargs.get("parent_account"),

View File

@@ -1,8 +0,0 @@
// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Account Closing Balance", {
// refresh(frm) {
// },
// });

View File

@@ -1,164 +0,0 @@
{
"actions": [],
"creation": "2023-02-21 15:20:59.586811",
"default_view": "List",
"doctype": "DocType",
"document_type": "Document",
"engine": "InnoDB",
"field_order": [
"closing_date",
"account",
"cost_center",
"debit",
"credit",
"account_currency",
"debit_in_account_currency",
"credit_in_account_currency",
"project",
"company",
"finance_book",
"period_closing_voucher",
"is_period_closing_voucher_entry"
],
"fields": [
{
"fieldname": "closing_date",
"fieldtype": "Date",
"in_filter": 1,
"in_list_view": 1,
"label": "Closing Date",
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
"search_index": 1
},
{
"fieldname": "account",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Account",
"oldfieldname": "account",
"oldfieldtype": "Link",
"options": "Account",
"search_index": 1
},
{
"fieldname": "cost_center",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center"
},
{
"fieldname": "debit",
"fieldtype": "Currency",
"label": "Debit Amount",
"oldfieldname": "debit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency"
},
{
"fieldname": "credit",
"fieldtype": "Currency",
"label": "Credit Amount",
"oldfieldname": "credit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency"
},
{
"fieldname": "account_currency",
"fieldtype": "Link",
"label": "Account Currency",
"options": "Currency"
},
{
"fieldname": "debit_in_account_currency",
"fieldtype": "Currency",
"label": "Debit Amount in Account Currency",
"options": "account_currency"
},
{
"fieldname": "credit_in_account_currency",
"fieldtype": "Currency",
"label": "Credit Amount in Account Currency",
"options": "account_currency"
},
{
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"options": "Project"
},
{
"fieldname": "company",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"search_index": 1
},
{
"fieldname": "finance_book",
"fieldtype": "Link",
"label": "Finance Book",
"options": "Finance Book"
},
{
"fieldname": "period_closing_voucher",
"fieldtype": "Link",
"in_standard_filter": 1,
"label": "Period Closing Voucher",
"options": "Period Closing Voucher",
"search_index": 1
},
{
"default": "0",
"fieldname": "is_period_closing_voucher_entry",
"fieldtype": "Check",
"label": "Is Period Closing Voucher Entry"
}
],
"icon": "fa fa-list",
"in_create": 1,
"links": [],
"modified": "2023-03-06 08:56:36.393237",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account Closing Balance",
"owner": "Administrator",
"permissions": [
{
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User"
},
{
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager"
},
{
"export": 1,
"read": 1,
"report": 1,
"role": "Auditor"
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@@ -1,127 +0,0 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
from frappe.utils import cint, cstr
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
get_accounting_dimensions,
)
class AccountClosingBalance(Document):
pass
def make_closing_entries(closing_entries, voucher_name, company, closing_date):
accounting_dimensions = get_accounting_dimensions()
previous_closing_entries = get_previous_closing_entries(
company, closing_date, accounting_dimensions
)
combined_entries = closing_entries + previous_closing_entries
merged_entries = aggregate_with_last_account_closing_balance(
combined_entries, accounting_dimensions
)
for key, value in merged_entries.items():
cle = frappe.new_doc("Account Closing Balance")
cle.update(value)
cle.update(value["dimensions"])
cle.update(
{
"period_closing_voucher": voucher_name,
"closing_date": closing_date,
}
)
cle.flags.ignore_permissions = True
cle.flags.ignore_links = True
cle.submit()
def aggregate_with_last_account_closing_balance(entries, accounting_dimensions):
merged_entries = {}
for entry in entries:
key, key_values = generate_key(entry, accounting_dimensions)
merged_entries.setdefault(
key,
{
"debit": 0,
"credit": 0,
"debit_in_account_currency": 0,
"credit_in_account_currency": 0,
},
)
merged_entries[key]["dimensions"] = key_values
merged_entries[key]["debit"] += entry.get("debit")
merged_entries[key]["credit"] += entry.get("credit")
merged_entries[key]["debit_in_account_currency"] += entry.get("debit_in_account_currency")
merged_entries[key]["credit_in_account_currency"] += entry.get("credit_in_account_currency")
return merged_entries
def generate_key(entry, accounting_dimensions):
key = [
cstr(entry.get("account")),
cstr(entry.get("account_currency")),
cstr(entry.get("cost_center")),
cstr(entry.get("project")),
cstr(entry.get("finance_book")),
cint(entry.get("is_period_closing_voucher_entry")),
]
key_values = {
"company": cstr(entry.get("company")),
"account": cstr(entry.get("account")),
"account_currency": cstr(entry.get("account_currency")),
"cost_center": cstr(entry.get("cost_center")),
"project": cstr(entry.get("project")),
"finance_book": cstr(entry.get("finance_book")),
"is_period_closing_voucher_entry": cint(entry.get("is_period_closing_voucher_entry")),
}
for dimension in accounting_dimensions:
key.append(cstr(entry.get(dimension)))
key_values[dimension] = cstr(entry.get(dimension))
return tuple(key), key_values
def get_previous_closing_entries(company, closing_date, accounting_dimensions):
entries = []
last_period_closing_voucher = frappe.db.get_all(
"Period Closing Voucher",
filters={"docstatus": 1, "company": company, "posting_date": ("<", closing_date)},
fields=["name"],
order_by="posting_date desc",
limit=1,
)
if last_period_closing_voucher:
account_closing_balance = frappe.qb.DocType("Account Closing Balance")
query = frappe.qb.from_(account_closing_balance).select(
account_closing_balance.company,
account_closing_balance.account,
account_closing_balance.account_currency,
account_closing_balance.debit,
account_closing_balance.credit,
account_closing_balance.debit_in_account_currency,
account_closing_balance.credit_in_account_currency,
account_closing_balance.cost_center,
account_closing_balance.project,
account_closing_balance.finance_book,
account_closing_balance.is_period_closing_voucher_entry,
)
for dimension in accounting_dimensions:
query = query.select(account_closing_balance[dimension])
query = query.where(
account_closing_balance.period_closing_voucher == last_period_closing_voucher[0].name
)
entries = query.run(as_dict=1)
return entries

View File

@@ -1,9 +0,0 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestAccountClosingBalance(FrappeTestCase):
pass

View File

@@ -15,17 +15,6 @@ frappe.ui.form.on('Accounting Dimension', {
};
});
frm.set_query("offsetting_account", "dimension_defaults", function(doc, cdt, cdn) {
let d = locals[cdt][cdn];
return {
filters: {
company: d.company,
root_type: ["in", ["Asset", "Liability"]],
is_group: 0
}
}
});
if (!frm.is_new()) {
frm.add_custom_button(__('Show {0}', [frm.doc.document_type]), function () {
frappe.set_route("List", frm.doc.document_type);

View File

@@ -39,8 +39,6 @@ class AccountingDimension(Document):
if not self.is_new():
self.validate_document_type_change()
self.validate_dimension_defaults()
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:
@@ -48,27 +46,17 @@ class AccountingDimension(Document):
message += _("Please create a new Accounting Dimension if required.")
frappe.throw(message)
def validate_dimension_defaults(self):
companies = []
for default in self.get("dimension_defaults"):
if default.company not in companies:
companies.append(default.company)
else:
frappe.throw(_("Company {0} is added more than once").format(frappe.bold(default.company)))
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, queue="long", enqueue_after_commit=True
)
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)
else:
frappe.enqueue(delete_accounting_dimension, doc=self, queue="long", enqueue_after_commit=True)
frappe.enqueue(delete_accounting_dimension, doc=self, queue="long")
def set_fieldname_and_label(self):
if not self.label:
@@ -265,28 +253,21 @@ def get_dimension_with_children(doctype, dimensions):
@frappe.whitelist()
def get_dimensions(with_cost_center_and_project=False):
c = frappe.qb.DocType("Accounting Dimension Detail")
p = frappe.qb.DocType("Accounting Dimension")
dimension_filters = (
frappe.qb.from_(p)
.select(p.label, p.fieldname, p.document_type)
.where(p.disabled == 0)
.run(as_dict=1)
)
default_dimensions = (
frappe.qb.from_(c)
.inner_join(p)
.on(c.parent == p.name)
.select(p.fieldname, c.company, c.default_dimension)
.run(as_dict=1)
dimension_filters = frappe.db.sql(
"""
SELECT label, fieldname, document_type
FROM `tabAccounting Dimension`
WHERE disabled = 0
""",
as_dict=1,
)
if isinstance(with_cost_center_and_project, str):
if with_cost_center_and_project.lower().strip() == "true":
with_cost_center_and_project = True
else:
with_cost_center_and_project = False
default_dimensions = frappe.db.sql(
"""SELECT p.fieldname, c.company, c.default_dimension
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(
@@ -302,30 +283,3 @@ def get_dimensions(with_cost_center_and_project=False):
default_dimensions_map[dimension.company][dimension.fieldname] = dimension.default_dimension
return dimension_filters, default_dimensions_map
def create_accounting_dimensions_for_doctype(doctype):
accounting_dimensions = frappe.db.get_all(
"Accounting Dimension", fields=["fieldname", "label", "document_type", "disabled"]
)
if not accounting_dimensions:
return
for d in accounting_dimensions:
field = frappe.db.get_value("Custom Field", {"dt": doctype, "fieldname": d.fieldname})
if field:
continue
df = {
"fieldname": d.fieldname,
"label": d.label,
"fieldtype": "Link",
"options": d.document_type,
"insert_after": "accounting_dimensions_section",
}
create_custom_field(doctype, df, ignore_validate=True)
frappe.clear_cache(doctype=doctype)

View File

@@ -84,22 +84,12 @@ def create_dimension():
frappe.set_user("Administrator")
if not frappe.db.exists("Accounting Dimension", {"document_type": "Department"}):
dimension = frappe.get_doc(
frappe.get_doc(
{
"doctype": "Accounting Dimension",
"document_type": "Department",
}
)
dimension.append(
"dimension_defaults",
{
"company": "_Test Company",
"reference_document": "Department",
"default_dimension": "_Test Department - _TC",
},
)
dimension.insert()
dimension.save()
).insert()
else:
dimension = frappe.get_doc("Accounting Dimension", "Department")
dimension.disabled = 0

View File

@@ -8,10 +8,7 @@
"reference_document",
"default_dimension",
"mandatory_for_bs",
"mandatory_for_pl",
"column_break_lqns",
"automatically_post_balancing_accounting_entry",
"offsetting_account"
"mandatory_for_pl"
],
"fields": [
{
@@ -53,23 +50,6 @@
"fieldtype": "Check",
"in_list_view": 1,
"label": "Mandatory For Profit and Loss Account"
},
{
"default": "0",
"fieldname": "automatically_post_balancing_accounting_entry",
"fieldtype": "Check",
"label": "Automatically post balancing accounting entry"
},
{
"fieldname": "offsetting_account",
"fieldtype": "Link",
"label": "Offsetting Account",
"mandatory_depends_on": "eval: doc.automatically_post_balancing_accounting_entry",
"options": "Account"
},
{
"fieldname": "column_break_lqns",
"fieldtype": "Column Break"
}
],
"istable": 1,

View File

@@ -68,16 +68,6 @@ frappe.ui.form.on('Accounting Dimension Filter', {
frm.refresh_field("dimensions");
frm.trigger('setup_filters');
},
apply_restriction_on_values: function(frm) {
/** If restriction on values is not applied, we should set "allow_or_restrict" to "Restrict" with an empty allowed dimension table.
* Hence it's not "restricted" on any value.
*/
if (!frm.doc.apply_restriction_on_values) {
frm.set_value("allow_or_restrict", "Restrict");
frm.clear_table("dimensions");
frm.refresh_field("dimensions");
}
}
});
frappe.ui.form.on('Allowed Dimension', {

View File

@@ -10,7 +10,6 @@
"disabled",
"column_break_2",
"company",
"apply_restriction_on_values",
"allow_or_restrict",
"section_break_4",
"accounts",
@@ -25,80 +24,94 @@
"fieldtype": "Select",
"in_list_view": 1,
"label": "Accounting Dimension",
"reqd": 1
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "column_break_2",
"fieldtype": "Column Break"
"fieldtype": "Column Break",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "section_break_4",
"fieldtype": "Section Break",
"hide_border": 1
"hide_border": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "column_break_6",
"fieldtype": "Column Break"
"fieldtype": "Column Break",
"show_days": 1,
"show_seconds": 1
},
{
"depends_on": "eval:doc.apply_restriction_on_values == 1;",
"fieldname": "allow_or_restrict",
"fieldtype": "Select",
"label": "Allow Or Restrict Dimension",
"options": "Allow\nRestrict",
"reqd": 1
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "accounts",
"fieldtype": "Table",
"label": "Applicable On Account",
"options": "Applicable On Account",
"reqd": 1
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"depends_on": "eval:doc.accounting_dimension && doc.apply_restriction_on_values",
"depends_on": "eval:doc.accounting_dimension",
"fieldname": "dimensions",
"fieldtype": "Table",
"label": "Applicable Dimension",
"mandatory_depends_on": "eval:doc.apply_restriction_on_values == 1;",
"options": "Allowed Dimension"
"options": "Allowed Dimension",
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disabled"
"label": "Disabled",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"reqd": 1
"reqd": 1,
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "dimension_filter_help",
"fieldtype": "HTML",
"label": "Dimension Filter Help"
"label": "Dimension Filter Help",
"show_days": 1,
"show_seconds": 1
},
{
"fieldname": "section_break_10",
"fieldtype": "Section Break"
},
{
"default": "1",
"fieldname": "apply_restriction_on_values",
"fieldtype": "Check",
"label": "Apply restriction on dimension values"
"fieldtype": "Section Break",
"show_days": 1,
"show_seconds": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-06-07 14:59:41.869117",
"modified": "2021-02-03 12:04:58.678402",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Dimension Filter",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
@@ -141,6 +154,5 @@
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}

View File

@@ -8,12 +8,6 @@ from frappe.model.document import Document
class AccountingDimensionFilter(Document):
def before_save(self):
# If restriction is not applied on values, then remove all the dimensions and set allow_or_restrict to Restrict
if not self.apply_restriction_on_values:
self.allow_or_restrict = "Restrict"
self.set("dimensions", [])
def validate(self):
self.validate_applicable_accounts()
@@ -50,12 +44,12 @@ def get_dimension_filter_map():
a.applicable_on_account, d.dimension_value, p.accounting_dimension,
p.allow_or_restrict, a.is_mandatory
FROM
`tabApplicable On Account` a,
`tabApplicable On Account` a, `tabAllowed Dimension` d,
`tabAccounting Dimension Filter` p
LEFT JOIN `tabAllowed Dimension` d ON d.parent = p.name
WHERE
p.name = a.parent
AND p.disabled = 0
AND p.name = d.parent
""",
as_dict=1,
)
@@ -82,5 +76,4 @@ def build_map(map_object, dimension, account, filter_value, allow_or_restrict, i
(dimension, account),
{"allowed_dimensions": [], "is_mandatory": is_mandatory, "allow_or_restrict": allow_or_restrict},
)
if filter_value:
map_object[(dimension, account)]["allowed_dimensions"].append(filter_value)
map_object[(dimension, account)]["allowed_dimensions"].append(filter_value)

View File

@@ -64,7 +64,6 @@ def create_accounting_dimension_filter():
"accounting_dimension": "Cost Center",
"allow_or_restrict": "Allow",
"company": "_Test Company",
"apply_restriction_on_values": 1,
"accounts": [
{
"applicable_on_account": "Sales - _TC",
@@ -86,7 +85,6 @@ def create_accounting_dimension_filter():
"doctype": "Accounting Dimension Filter",
"accounting_dimension": "Department",
"allow_or_restrict": "Allow",
"apply_restriction_on_values": 1,
"company": "_Test Company",
"accounts": [{"applicable_on_account": "Sales - _TC", "is_mandatory": 1}],
"dimensions": [{"accounting_dimension": "Department", "dimension_value": "Accounts - _TC"}],

View File

@@ -20,11 +20,5 @@ frappe.ui.form.on('Accounting Period', {
}
});
}
frm.set_query("document_type", "closed_documents", () => {
return {
query: "erpnext.controllers.queries.get_doctypes_for_closing",
}
});
}
});

View File

@@ -11,10 +11,6 @@ class OverlapError(frappe.ValidationError):
pass
class ClosedAccountingPeriod(frappe.ValidationError):
pass
class AccountingPeriod(Document):
def validate(self):
self.validate_overlap()
@@ -69,42 +65,3 @@ class AccountingPeriod(Document):
"closed_documents",
{"document_type": doctype_for_closing.document_type, "closed": doctype_for_closing.closed},
)
def validate_accounting_period_on_doc_save(doc, method=None):
if doc.doctype == "Bank Clearance":
return
elif doc.doctype == "Asset":
if doc.is_existing_asset:
return
else:
date = doc.available_for_use_date
elif doc.doctype == "Asset Repair":
date = doc.completion_date
else:
date = doc.posting_date
ap = frappe.qb.DocType("Accounting Period")
cd = frappe.qb.DocType("Closed Document")
accounting_period = (
frappe.qb.from_(ap)
.from_(cd)
.select(ap.name)
.where(
(ap.name == cd.parent)
& (ap.company == doc.company)
& (cd.closed == 1)
& (cd.document_type == doc.doctype)
& (date >= ap.start_date)
& (date <= ap.end_date)
)
).run(as_dict=1)
if accounting_period:
frappe.throw(
_("You cannot create a {0} within the closed Accounting Period {1}").format(
doc.doctype, frappe.bold(accounting_period[0]["name"])
),
ClosedAccountingPeriod,
)

View File

@@ -6,11 +6,9 @@ import unittest
import frappe
from frappe.utils import add_months, nowdate
from erpnext.accounts.doctype.accounting_period.accounting_period import (
ClosedAccountingPeriod,
OverlapError,
)
from erpnext.accounts.doctype.accounting_period.accounting_period import OverlapError
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.accounts.general_ledger import ClosedAccountingPeriod
test_dependencies = ["Item"]
@@ -35,9 +33,9 @@ class TestAccountingPeriod(unittest.TestCase):
ap1.save()
doc = create_sales_invoice(
do_not_save=1, cost_center="_Test Company - _TC", warehouse="Stores - _TC"
do_not_submit=1, cost_center="_Test Company - _TC", warehouse="Stores - _TC"
)
self.assertRaises(ClosedAccountingPeriod, doc.save)
self.assertRaises(ClosedAccountingPeriod, doc.submit)
def tearDown(self):
for d in frappe.get_all("Accounting Period"):

View File

@@ -19,8 +19,8 @@
"column_break_17",
"enable_common_party_accounting",
"allow_multi_currency_invoices_against_single_party_account",
"journals_section",
"merge_similar_account_heads",
"report_setting_section",
"use_custom_cash_flow",
"deferred_accounting_settings_section",
"book_deferred_entries_based_on",
"column_break_18",
@@ -31,17 +31,12 @@
"determine_address_tax_category_from",
"column_break_19",
"add_taxes_from_item_tax_template",
"book_tax_discount_loss",
"round_row_wise_tax",
"print_settings",
"show_inclusive_tax_in_print",
"show_taxes_as_table_in_print",
"column_break_12",
"show_payment_schedule_in_print",
"currency_exchange_section",
"allow_stale",
"section_break_jpd0",
"auto_reconcile_payments",
"stale_days",
"invoicing_settings_tab",
"accounts_transactions_settings_section",
@@ -59,14 +54,9 @@
"closing_settings_tab",
"period_closing_settings_section",
"acc_frozen_upto",
"ignore_account_closing_balance",
"column_break_25",
"frozen_accounts_modifier",
"tab_break_dpet",
"show_balance_in_coa",
"banking_tab",
"enable_party_matching",
"enable_fuzzy_matching"
"report_settings_sb"
],
"fields": [
{
@@ -177,9 +167,20 @@
"fieldtype": "Int",
"label": "Stale Days"
},
{
"fieldname": "report_settings_sb",
"fieldtype": "Section Break",
"label": "Report Settings"
},
{
"default": "0",
"description": "Only select this if you have set up the Cash Flow Mapper documents",
"fieldname": "use_custom_cash_flow",
"fieldtype": "Check",
"label": "Enable Custom Cash Flow Format"
},
{
"default": "0",
"description": "Payment Terms from orders will be fetched into the invoices as is",
"fieldname": "automatically_fetch_payment_terms",
"fieldtype": "Check",
"label": "Automatically Fetch Payment Terms from Order"
@@ -335,93 +336,17 @@
"fieldtype": "Tab Break",
"label": "POS"
},
{
"fieldname": "report_setting_section",
"fieldtype": "Section Break",
"label": "Report Setting"
},
{
"default": "0",
"description": "Enabling this will allow creation of multi-currency invoices against single party account in company currency",
"fieldname": "allow_multi_currency_invoices_against_single_party_account",
"fieldtype": "Check",
"label": "Allow multi-currency invoices against single party account "
},
{
"fieldname": "tab_break_dpet",
"fieldtype": "Tab Break",
"label": "Chart Of Accounts"
},
{
"default": "1",
"fieldname": "show_balance_in_coa",
"fieldtype": "Check",
"label": "Show Balances in Chart Of Accounts"
},
{
"default": "0",
"description": "Split Early Payment Discount Loss into Income and Tax Loss",
"fieldname": "book_tax_discount_loss",
"fieldtype": "Check",
"label": "Book Tax Loss on Early Payment Discount"
},
{
"fieldname": "journals_section",
"fieldtype": "Section Break",
"label": "Journals"
},
{
"default": "0",
"description": "Rows with Same Account heads will be merged on Ledger",
"fieldname": "merge_similar_account_heads",
"fieldtype": "Check",
"label": "Merge Similar Account Heads"
},
{
"fieldname": "section_break_jpd0",
"fieldtype": "Section Break",
"label": "Payment Reconciliations"
},
{
"default": "0",
"fieldname": "auto_reconcile_payments",
"fieldtype": "Check",
"label": "Auto Reconcile Payments"
},
{
"default": "0",
"fieldname": "show_taxes_as_table_in_print",
"fieldtype": "Check",
"label": "Show Taxes as Table in Print"
},
{
"fieldname": "banking_tab",
"fieldtype": "Tab Break",
"label": "Banking"
},
{
"default": "0",
"description": "Auto match and set the Party in Bank Transactions",
"fieldname": "enable_party_matching",
"fieldtype": "Check",
"label": "Enable Automatic Party Matching"
},
{
"default": "0",
"depends_on": "enable_party_matching",
"description": "Approximately match the description/party name against parties",
"fieldname": "enable_fuzzy_matching",
"fieldtype": "Check",
"label": "Enable Fuzzy Matching"
},
{
"default": "0",
"description": "Financial reports will be generated using GL Entry doctypes (should be enabled if Period Closing Voucher is not posted for all years sequentially or missing) ",
"fieldname": "ignore_account_closing_balance",
"fieldtype": "Check",
"label": "Ignore Account Closing Balance"
},
{
"default": "0",
"description": "Tax Amount will be rounded on a row(items) level",
"fieldname": "round_row_wise_tax",
"fieldtype": "Check",
"label": "Round Tax Amount Row-wise"
}
],
"icon": "icon-cog",
@@ -429,7 +354,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2023-08-28 00:12:02.740633",
"modified": "2022-11-27 21:49:52.538655",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",

View File

@@ -14,32 +14,21 @@ from erpnext.stock.utils import check_pending_reposting
class AccountsSettings(Document):
def on_update(self):
frappe.clear_cache()
def validate(self):
old_doc = self.get_doc_before_save()
clear_cache = False
frappe.db.set_default(
"add_taxes_from_item_tax_template", self.get("add_taxes_from_item_tax_template", 0)
)
if old_doc.add_taxes_from_item_tax_template != self.add_taxes_from_item_tax_template:
frappe.db.set_default(
"add_taxes_from_item_tax_template", self.get("add_taxes_from_item_tax_template", 0)
)
clear_cache = True
if old_doc.enable_common_party_accounting != self.enable_common_party_accounting:
frappe.db.set_default(
"enable_common_party_accounting", self.get("enable_common_party_accounting", 0)
)
clear_cache = True
frappe.db.set_default(
"enable_common_party_accounting", self.get("enable_common_party_accounting", 0)
)
self.validate_stale_days()
if old_doc.show_payment_schedule_in_print != self.show_payment_schedule_in_print:
self.enable_payment_schedule_in_print()
if old_doc.acc_frozen_upto != self.acc_frozen_upto:
self.validate_pending_reposts()
if clear_cache:
frappe.clear_cache()
self.enable_payment_schedule_in_print()
self.validate_pending_reposts()
def validate_stale_days(self):
if not self.allow_stale and cint(self.stale_days) <= 0:

View File

@@ -8,6 +8,9 @@ frappe.ui.form.on('Bank', {
},
refresh: function(frm) {
add_fields_to_mapping_table(frm);
frappe.dynamic_link = { doc: frm.doc, fieldname: 'name', doctype: 'Bank' };
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
if (frm.doc.__islocal) {
@@ -102,7 +105,7 @@ erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
}
onScriptLoaded(me) {
me.linkHandler = Plaid.create({ // eslint-disable-line no-undef
me.linkHandler = Plaid.create({
env: me.plaid_env,
token: me.token,
onSuccess: me.plaid_success
@@ -115,10 +118,6 @@ erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
}
plaid_success(token, response) {
frappe.xcall('erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.update_bank_account_ids', {
response: response,
}).then(() => {
frappe.show_alert({ message: __('Plaid Link Updated'), indicator: 'green' });
});
frappe.show_alert({ message: __('Plaid Link Updated'), indicator: 'green' });
}
};

View File

@@ -13,7 +13,6 @@
"account_type",
"account_subtype",
"column_break_7",
"disabled",
"is_default",
"is_company_account",
"company",
@@ -200,16 +199,10 @@
"fieldtype": "Data",
"in_global_search": 1,
"label": "Branch Code"
},
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disabled"
}
],
"links": [],
"modified": "2023-09-22 21:31:34.763977",
"modified": "2022-05-04 15:49:42.620630",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Account",

View File

@@ -70,12 +70,13 @@ def make_bank_account(doctype, docname):
return doc
@frappe.whitelist()
def get_party_bank_account(party_type, party):
return frappe.db.get_value(party_type, party, "default_bank_account")
@frappe.whitelist()
def get_bank_account_details(bank_account):
return frappe.get_cached_value(
return frappe.db.get_value(
"Bank Account", bank_account, ["account", "bank", "bank_account_no"], as_dict=1
)

View File

@@ -37,11 +37,14 @@ frappe.ui.form.on("Bank Clearance", {
refresh: function(frm) {
frm.disable_save();
frm.add_custom_button(__('Get Payment Entries'), () =>
frm.trigger("get_payment_entries")
);
frm.change_custom_button_type(__('Get Payment Entries'), null, 'primary');
if (frm.doc.account && frm.doc.from_date && frm.doc.to_date) {
frm.add_custom_button(__('Get Payment Entries'), () =>
frm.trigger("get_payment_entries")
);
frm.change_custom_button_type('Get Payment Entries', null, 'primary');
}
},
update_clearance_date: function(frm) {
@@ -53,8 +56,8 @@ frappe.ui.form.on("Bank Clearance", {
frm.refresh_fields();
if (!frm.doc.payment_entries.length) {
frm.change_custom_button_type(__('Get Payment Entries'), null, 'primary');
frm.change_custom_button_type(__('Update Clearance Date'), null, 'default');
frm.change_custom_button_type('Get Payment Entries', null, 'primary');
frm.change_custom_button_type('Update Clearance Date', null, 'default');
}
}
});
@@ -72,8 +75,8 @@ frappe.ui.form.on("Bank Clearance", {
frm.trigger("update_clearance_date")
);
frm.change_custom_button_type(__('Get Payment Entries'), null, 'default');
frm.change_custom_button_type(__('Update Clearance Date'), null, 'primary');
frm.change_custom_button_type('Get Payment Entries', null, 'default');
frm.change_custom_button_type('Update Clearance Date', null, 'primary');
}
}
});

View File

@@ -5,6 +5,7 @@
import frappe
from frappe import _, msgprint
from frappe.model.document import Document
from frappe.query_builder.custom import ConstantColumn
from frappe.utils import flt, fmt_money, getdate
import erpnext
@@ -21,24 +22,159 @@ class BankClearance(Document):
if not self.account:
frappe.throw(_("Account is mandatory to get payment entries"))
entries = []
condition = ""
if not self.include_reconciled_entries:
condition = "and (clearance_date IS NULL or clearance_date='0000-00-00')"
# get entries from all the apps
for method_name in frappe.get_hooks("get_payment_entries_for_bank_clearance"):
entries += (
frappe.get_attr(method_name)(
self.from_date,
self.to_date,
self.account,
self.bank_account,
self.include_reconciled_entries,
self.include_pos_transactions,
)
or []
journal_entries = frappe.db.sql(
"""
select
"Journal Entry" as payment_document, t1.name as payment_entry,
t1.cheque_no as cheque_number, t1.cheque_date,
sum(t2.debit_in_account_currency) as debit, sum(t2.credit_in_account_currency) as credit,
t1.posting_date, t2.against_account, t1.clearance_date, t2.account_currency
from
`tabJournal Entry` t1, `tabJournal Entry Account` t2
where
t2.parent = t1.name and t2.account = %(account)s and t1.docstatus=1
and t1.posting_date >= %(from)s and t1.posting_date <= %(to)s
and ifnull(t1.is_opening, 'No') = 'No' {condition}
group by t2.account, t1.name
order by t1.posting_date ASC, t1.name DESC
""".format(
condition=condition
),
{"account": self.account, "from": self.from_date, "to": self.to_date},
as_dict=1,
)
if self.bank_account:
condition += "and bank_account = %(bank_account)s"
payment_entries = frappe.db.sql(
"""
select
"Payment Entry" as payment_document, name as payment_entry,
reference_no as cheque_number, reference_date as cheque_date,
if(paid_from=%(account)s, paid_amount, 0) as credit,
if(paid_from=%(account)s, 0, received_amount) as debit,
posting_date, ifnull(party,if(paid_from=%(account)s,paid_to,paid_from)) as against_account, clearance_date,
if(paid_to=%(account)s, paid_to_account_currency, paid_from_account_currency) as account_currency
from `tabPayment Entry`
where
(paid_from=%(account)s or paid_to=%(account)s) and docstatus=1
and posting_date >= %(from)s and posting_date <= %(to)s
{condition}
order by
posting_date ASC, name DESC
""".format(
condition=condition
),
{
"account": self.account,
"from": self.from_date,
"to": self.to_date,
"bank_account": self.bank_account,
},
as_dict=1,
)
loan_disbursement = frappe.qb.DocType("Loan Disbursement")
loan_disbursements = (
frappe.qb.from_(loan_disbursement)
.select(
ConstantColumn("Loan Disbursement").as_("payment_document"),
loan_disbursement.name.as_("payment_entry"),
loan_disbursement.disbursed_amount.as_("credit"),
ConstantColumn(0).as_("debit"),
loan_disbursement.reference_number.as_("cheque_number"),
loan_disbursement.reference_date.as_("cheque_date"),
loan_disbursement.disbursement_date.as_("posting_date"),
loan_disbursement.applicant.as_("against_account"),
)
.where(loan_disbursement.docstatus == 1)
.where(loan_disbursement.disbursement_date >= self.from_date)
.where(loan_disbursement.disbursement_date <= self.to_date)
.where(loan_disbursement.clearance_date.isnull())
.where(loan_disbursement.disbursement_account.isin([self.bank_account, self.account]))
.orderby(loan_disbursement.disbursement_date)
.orderby(loan_disbursement.name, order=frappe.qb.desc)
).run(as_dict=1)
loan_repayment = frappe.qb.DocType("Loan Repayment")
query = (
frappe.qb.from_(loan_repayment)
.select(
ConstantColumn("Loan Repayment").as_("payment_document"),
loan_repayment.name.as_("payment_entry"),
loan_repayment.amount_paid.as_("debit"),
ConstantColumn(0).as_("credit"),
loan_repayment.reference_number.as_("cheque_number"),
loan_repayment.reference_date.as_("cheque_date"),
loan_repayment.applicant.as_("against_account"),
loan_repayment.posting_date,
)
.where(loan_repayment.docstatus == 1)
.where(loan_repayment.clearance_date.isnull())
.where(loan_repayment.posting_date >= self.from_date)
.where(loan_repayment.posting_date <= self.to_date)
.where(loan_repayment.payment_account.isin([self.bank_account, self.account]))
)
if frappe.db.has_column("Loan Repayment", "repay_from_salary"):
query = query.where((loan_repayment.repay_from_salary == 0))
query = query.orderby(loan_repayment.posting_date).orderby(
loan_repayment.name, order=frappe.qb.desc
)
loan_repayments = query.run(as_dict=True)
pos_sales_invoices, pos_purchase_invoices = [], []
if self.include_pos_transactions:
pos_sales_invoices = frappe.db.sql(
"""
select
"Sales Invoice Payment" as payment_document, sip.name as payment_entry, sip.amount as debit,
si.posting_date, si.customer as against_account, sip.clearance_date,
account.account_currency, 0 as credit
from `tabSales Invoice Payment` sip, `tabSales Invoice` si, `tabAccount` account
where
sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name
and account.name = sip.account and si.posting_date >= %(from)s and si.posting_date <= %(to)s
order by
si.posting_date ASC, si.name DESC
""",
{"account": self.account, "from": self.from_date, "to": self.to_date},
as_dict=1,
)
pos_purchase_invoices = frappe.db.sql(
"""
select
"Purchase Invoice" as payment_document, pi.name as payment_entry, pi.paid_amount as credit,
pi.posting_date, pi.supplier as against_account, pi.clearance_date,
account.account_currency, 0 as debit
from `tabPurchase Invoice` pi, `tabAccount` account
where
pi.cash_bank_account=%(account)s and pi.docstatus=1 and account.name = pi.cash_bank_account
and pi.posting_date >= %(from)s and pi.posting_date <= %(to)s
order by
pi.posting_date ASC, pi.name DESC
""",
{"account": self.account, "from": self.from_date, "to": self.to_date},
as_dict=1,
)
entries = sorted(
entries,
list(payment_entries)
+ list(journal_entries)
+ list(pos_sales_invoices)
+ list(pos_purchase_invoices)
+ list(loan_disbursements)
+ list(loan_repayments),
key=lambda k: getdate(k["posting_date"]),
)
@@ -91,111 +227,3 @@ class BankClearance(Document):
msgprint(_("Clearance Date updated"))
else:
msgprint(_("Clearance Date not mentioned"))
def get_payment_entries_for_bank_clearance(
from_date, to_date, account, bank_account, include_reconciled_entries, include_pos_transactions
):
entries = []
condition = ""
if not include_reconciled_entries:
condition = "and (clearance_date IS NULL or clearance_date='0000-00-00')"
journal_entries = frappe.db.sql(
"""
select
"Journal Entry" as payment_document, t1.name as payment_entry,
t1.cheque_no as cheque_number, t1.cheque_date,
sum(t2.debit_in_account_currency) as debit, sum(t2.credit_in_account_currency) as credit,
t1.posting_date, t2.against_account, t1.clearance_date, t2.account_currency
from
`tabJournal Entry` t1, `tabJournal Entry Account` t2
where
t2.parent = t1.name and t2.account = %(account)s and t1.docstatus=1
and t1.posting_date >= %(from)s and t1.posting_date <= %(to)s
and ifnull(t1.is_opening, 'No') = 'No' {condition}
group by t2.account, t1.name
order by t1.posting_date ASC, t1.name DESC
""".format(
condition=condition
),
{"account": account, "from": from_date, "to": to_date},
as_dict=1,
)
if bank_account:
condition += "and bank_account = %(bank_account)s"
payment_entries = frappe.db.sql(
"""
select
"Payment Entry" as payment_document, name as payment_entry,
reference_no as cheque_number, reference_date as cheque_date,
if(paid_from=%(account)s, paid_amount + total_taxes_and_charges, 0) as credit,
if(paid_from=%(account)s, 0, received_amount) as debit,
posting_date, ifnull(party,if(paid_from=%(account)s,paid_to,paid_from)) as against_account, clearance_date,
if(paid_to=%(account)s, paid_to_account_currency, paid_from_account_currency) as account_currency
from `tabPayment Entry`
where
(paid_from=%(account)s or paid_to=%(account)s) and docstatus=1
and posting_date >= %(from)s and posting_date <= %(to)s
{condition}
order by
posting_date ASC, name DESC
""".format(
condition=condition
),
{
"account": account,
"from": from_date,
"to": to_date,
"bank_account": bank_account,
},
as_dict=1,
)
pos_sales_invoices, pos_purchase_invoices = [], []
if include_pos_transactions:
pos_sales_invoices = frappe.db.sql(
"""
select
"Sales Invoice Payment" as payment_document, sip.name as payment_entry, sip.amount as debit,
si.posting_date, si.customer as against_account, sip.clearance_date,
account.account_currency, 0 as credit
from `tabSales Invoice Payment` sip, `tabSales Invoice` si, `tabAccount` account
where
sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name
and account.name = sip.account and si.posting_date >= %(from)s and si.posting_date <= %(to)s
order by
si.posting_date ASC, si.name DESC
""",
{"account": account, "from": from_date, "to": to_date},
as_dict=1,
)
pos_purchase_invoices = frappe.db.sql(
"""
select
"Purchase Invoice" as payment_document, pi.name as payment_entry, pi.paid_amount as credit,
pi.posting_date, pi.supplier as against_account, pi.clearance_date,
account.account_currency, 0 as debit
from `tabPurchase Invoice` pi, `tabAccount` account
where
pi.cash_bank_account=%(account)s and pi.docstatus=1 and account.name = pi.cash_bank_account
and pi.posting_date >= %(from)s and pi.posting_date <= %(to)s
order by
pi.posting_date ASC, pi.name DESC
""",
{"account": account, "from": from_date, "to": to_date},
as_dict=1,
)
entries = (
list(payment_entries)
+ list(journal_entries)
+ list(pos_sales_invoices)
+ list(pos_purchase_invoices)
)
return entries

View File

@@ -8,76 +8,26 @@ from frappe.utils import add_months, getdate
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.tests.utils import if_lending_app_installed, if_lending_app_not_installed
from erpnext.loan_management.doctype.loan.test_loan import (
create_loan,
create_loan_accounts,
create_loan_type,
create_repayment_entry,
make_loan_disbursement_entry,
)
class TestBankClearance(unittest.TestCase):
@classmethod
def setUpClass(cls):
clear_payment_entries()
clear_loan_transactions()
make_bank_account()
create_loan_accounts()
create_loan_masters()
add_transactions()
# Basic test case to test if bank clearance tool doesn't break
# Detailed test can be added later
@if_lending_app_not_installed
def test_bank_clearance(self):
bank_clearance = frappe.get_doc("Bank Clearance")
bank_clearance.account = "_Test Bank Clearance - _TC"
bank_clearance.from_date = add_months(getdate(), -1)
bank_clearance.to_date = getdate()
bank_clearance.get_payment_entries()
self.assertEqual(len(bank_clearance.payment_entries), 1)
@if_lending_app_installed
def test_bank_clearance_with_loan(self):
from lending.loan_management.doctype.loan.test_loan import (
create_loan,
create_loan_accounts,
create_loan_product,
create_repayment_entry,
make_loan_disbursement_entry,
)
def create_loan_masters():
create_loan_product(
"Clearance Loan",
"Clearance Loan",
2000000,
13.5,
25,
0,
5,
"Cash",
"_Test Bank Clearance - _TC",
"_Test Bank Clearance - _TC",
"Loan Account - _TC",
"Interest Income Account - _TC",
"Penalty Income Account - _TC",
)
def make_loan():
loan = create_loan(
"_Test Customer",
"Clearance Loan",
280000,
"Repay Over Number of Periods",
20,
applicant_type="Customer",
)
loan.submit()
make_loan_disbursement_entry(loan.name, loan.loan_amount, disbursement_date=getdate())
repayment_entry = create_repayment_entry(
loan.name, "_Test Customer", getdate(), loan.loan_amount
)
repayment_entry.save()
repayment_entry.submit()
create_loan_accounts()
create_loan_masters()
make_loan()
bank_clearance = frappe.get_doc("Bank Clearance")
bank_clearance.account = "_Test Bank Clearance - _TC"
bank_clearance.from_date = add_months(getdate(), -1)
@@ -86,19 +36,6 @@ class TestBankClearance(unittest.TestCase):
self.assertEqual(len(bank_clearance.payment_entries), 3)
def clear_payment_entries():
frappe.db.delete("Payment Entry")
@if_lending_app_installed
def clear_loan_transactions():
for dt in [
"Loan Disbursement",
"Loan Repayment",
]:
frappe.db.delete(dt)
def make_bank_account():
if not frappe.db.get_value("Account", "_Test Bank Clearance - _TC"):
frappe.get_doc(
@@ -112,8 +49,42 @@ def make_bank_account():
).insert()
def create_loan_masters():
create_loan_type(
"Clearance Loan",
2000000,
13.5,
25,
0,
5,
"Cash",
"_Test Bank Clearance - _TC",
"_Test Bank Clearance - _TC",
"Loan Account - _TC",
"Interest Income Account - _TC",
"Penalty Income Account - _TC",
)
def add_transactions():
make_payment_entry()
make_loan()
def make_loan():
loan = create_loan(
"_Test Customer",
"Clearance Loan",
280000,
"Repay Over Number of Periods",
20,
applicant_type="Customer",
)
loan.submit()
make_loan_disbursement_entry(loan.name, loan.loan_amount, disbursement_date=getdate())
repayment_entry = create_repayment_entry(loan.name, "_Test Customer", getdate(), loan.loan_amount)
repayment_entry.save()
repayment_entry.submit()
def make_payment_entry():

View File

@@ -18,30 +18,16 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
},
onload: function (frm) {
// Set default filter dates
let today = frappe.datetime.get_today()
frm.doc.bank_statement_from_date = frappe.datetime.add_months(today, -1);
frm.doc.bank_statement_to_date = today;
frm.trigger('bank_account');
},
filter_by_reference_date: function (frm) {
if (frm.doc.filter_by_reference_date) {
frm.set_value("bank_statement_from_date", "");
frm.set_value("bank_statement_to_date", "");
} else {
frm.set_value("from_reference_date", "");
frm.set_value("to_reference_date", "");
}
},
refresh: function (frm) {
frm.disable_save();
frappe.require("bank-reconciliation-tool.bundle.js", () =>
frm.trigger("make_reconciliation_tool")
);
frm.add_custom_button(__("Upload Bank Statement"), () =>
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",
@@ -63,26 +49,10 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
},
})
);
},
frm.add_custom_button(__('Auto Reconcile'), function() {
frappe.call({
method: "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.auto_reconcile_vouchers",
args: {
bank_account: frm.doc.bank_account,
from_date: frm.doc.bank_statement_from_date,
to_date: frm.doc.bank_statement_to_date,
filter_by_reference_date: frm.doc.filter_by_reference_date,
from_reference_date: frm.doc.from_reference_date,
to_reference_date: frm.doc.to_reference_date,
},
})
});
frm.add_custom_button(__('Get Unreconciled Entries'), function() {
frm.trigger("make_reconciliation_tool");
});
frm.change_custom_button_type(__('Get Unreconciled Entries'), null, 'primary');
after_save: function (frm) {
frm.trigger("make_reconciliation_tool");
},
bank_account: function (frm) {
@@ -96,7 +66,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
r.account,
"account_currency",
(r) => {
frm.doc.account_currency = r.account_currency;
frm.currency = r.account_currency;
frm.trigger("render_chart");
}
);
@@ -162,19 +132,19 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
}
},
render_chart(frm) {
render_chart: frappe.utils.debounce((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,
frm.doc.bank_statement_closing_balance,
cleared_balance: frm.cleared_balance,
currency: frm.doc.account_currency,
currency: frm.currency,
}
);
},
}, 500),
render(frm) {
if (frm.doc.bank_account) {
@@ -190,9 +160,6 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
).$wrapper,
bank_statement_from_date: frm.doc.bank_statement_from_date,
bank_statement_to_date: frm.doc.bank_statement_to_date,
filter_by_reference_date: frm.doc.filter_by_reference_date,
from_reference_date: frm.doc.from_reference_date,
to_reference_date: frm.doc.to_reference_date,
bank_statement_closing_balance:
frm.doc.bank_statement_closing_balance,
cards_manager: frm.cards_manager,

View File

@@ -10,11 +10,7 @@
"column_break_1",
"bank_statement_from_date",
"bank_statement_to_date",
"from_reference_date",
"to_reference_date",
"filter_by_reference_date",
"column_break_2",
"account_currency",
"account_opening_balance",
"bank_statement_closing_balance",
"section_break_1",
@@ -40,13 +36,13 @@
"fieldtype": "Column Break"
},
{
"depends_on": "eval: doc.bank_account && !doc.filter_by_reference_date",
"depends_on": "eval: doc.bank_account",
"fieldname": "bank_statement_from_date",
"fieldtype": "Date",
"label": "From Date"
},
{
"depends_on": "eval: doc.bank_account && !doc.filter_by_reference_date",
"depends_on": "eval: doc.bank_statement_from_date",
"fieldname": "bank_statement_to_date",
"fieldtype": "Date",
"label": "To Date"
@@ -60,7 +56,7 @@
"fieldname": "account_opening_balance",
"fieldtype": "Currency",
"label": "Account Opening Balance",
"options": "account_currency",
"options": "Currency",
"read_only": 1
},
{
@@ -68,7 +64,7 @@
"fieldname": "bank_statement_closing_balance",
"fieldtype": "Currency",
"label": "Closing Balance",
"options": "account_currency"
"options": "Currency"
},
{
"fieldname": "section_break_1",
@@ -85,40 +81,14 @@
},
{
"fieldname": "no_bank_transactions",
"fieldtype": "HTML",
"options": "<div class=\"text-muted text-center\">No Matching Bank Transactions Found</div>"
},
{
"depends_on": "eval:doc.filter_by_reference_date",
"fieldname": "from_reference_date",
"fieldtype": "Date",
"label": "From Reference Date"
},
{
"depends_on": "eval:doc.filter_by_reference_date",
"fieldname": "to_reference_date",
"fieldtype": "Date",
"label": "To Reference Date"
},
{
"default": "0",
"fieldname": "filter_by_reference_date",
"fieldtype": "Check",
"label": "Filter by Reference Date"
},
{
"fieldname": "account_currency",
"fieldtype": "Link",
"hidden": 1,
"label": "Account Currency",
"options": "Currency"
"fieldtype": "HTML"
}
],
"hide_toolbar": 1,
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2023-03-07 11:02:24.535714",
"modified": "2021-04-21 11:13:49.831769",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Tool",
@@ -137,6 +107,5 @@
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
"sort_order": "DESC"
}

View File

@@ -8,16 +8,14 @@ import frappe
from frappe import _
from frappe.model.document import Document
from frappe.query_builder.custom import ConstantColumn
from frappe.utils import cint, flt
from pypika.terms import Parameter
from frappe.utils import flt
from erpnext import get_default_cost_center
from erpnext.accounts.doctype.bank_transaction.bank_transaction import get_total_allocated_amount
from erpnext.accounts.doctype.bank_transaction.bank_transaction import get_paid_amount
from erpnext.accounts.report.bank_reconciliation_statement.bank_reconciliation_statement import (
get_amounts_not_reflected_in_system,
get_entries,
)
from erpnext.accounts.utils import get_account_currency, get_balance_on
from erpnext.accounts.utils import get_balance_on
class BankReconciliationTool(Document):
@@ -30,7 +28,7 @@ def get_bank_transactions(bank_account, from_date=None, to_date=None):
filters = []
filters.append(["bank_account", "=", bank_account])
filters.append(["docstatus", "=", 1])
filters.append(["unallocated_amount", ">", 0.0])
filters.append(["unallocated_amount", ">", 0])
if to_date:
filters.append(["date", "<=", to_date])
if from_date:
@@ -52,7 +50,6 @@ def get_bank_transactions(bank_account, from_date=None, to_date=None):
"party",
],
filters=filters,
order_by="date",
)
return transactions
@@ -68,7 +65,7 @@ def get_account_balance(bank_account, till_date):
balance_as_per_system = get_balance_on(filters["account"], filters["report_date"])
total_debit, total_credit = 0.0, 0.0
total_debit, total_credit = 0, 0
for d in data:
total_debit += flt(d.debit)
total_credit += flt(d.credit)
@@ -142,19 +139,17 @@ def create_journal_entry_bts(
second_account
)
)
company = frappe.get_value("Account", company_account, "company")
accounts = []
# Multi Currency?
accounts.append(
{
"account": second_account,
"credit_in_account_currency": bank_transaction.deposit,
"debit_in_account_currency": bank_transaction.withdrawal,
"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,
"cost_center": get_default_cost_center(company),
}
)
@@ -162,12 +157,15 @@ def create_journal_entry_bts(
{
"account": company_account,
"bank_account": bank_transaction.bank_account,
"credit_in_account_currency": bank_transaction.withdrawal,
"debit_in_account_currency": bank_transaction.deposit,
"cost_center": get_default_cost_center(company),
"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,
@@ -186,22 +184,16 @@ def create_journal_entry_bts(
journal_entry.insert()
journal_entry.submit()
if bank_transaction.deposit > 0.0:
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,
}
]
[{"payment_doctype": "Journal Entry", "payment_name": journal_entry.name, "amount": paid_amount}]
)
return reconcile_vouchers(bank_transaction_name, vouchers)
return reconcile_vouchers(bank_transaction.name, vouchers)
@frappe.whitelist()
@@ -225,7 +217,7 @@ def create_payment_entry_bts(
as_dict=True,
)[0]
paid_amount = bank_transaction.unallocated_amount
payment_type = "Receive" if bank_transaction.deposit > 0.0 else "Pay"
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")
@@ -264,89 +256,9 @@ def create_payment_entry_bts(
payment_entry.submit()
vouchers = json.dumps(
[
{
"payment_doctype": "Payment Entry",
"payment_name": payment_entry.name,
"amount": paid_amount,
}
]
[{"payment_doctype": "Payment Entry", "payment_name": payment_entry.name, "amount": paid_amount}]
)
return reconcile_vouchers(bank_transaction_name, vouchers)
@frappe.whitelist()
def auto_reconcile_vouchers(
bank_account,
from_date=None,
to_date=None,
filter_by_reference_date=None,
from_reference_date=None,
to_reference_date=None,
):
frappe.flags.auto_reconcile_vouchers = True
reconciled, partially_reconciled = set(), set()
bank_transactions = get_bank_transactions(bank_account)
for transaction in bank_transactions:
linked_payments = get_linked_payments(
transaction.name,
["payment_entry", "journal_entry"],
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
)
if not linked_payments:
continue
vouchers = list(
map(
lambda entry: {
"payment_doctype": entry.get("doctype"),
"payment_name": entry.get("name"),
"amount": entry.get("paid_amount"),
},
linked_payments,
)
)
updated_transaction = reconcile_vouchers(transaction.name, json.dumps(vouchers))
if updated_transaction.status == "Reconciled":
reconciled.add(updated_transaction.name)
elif flt(transaction.unallocated_amount) != flt(updated_transaction.unallocated_amount):
# Partially reconciled (status = Unreconciled & unallocated amount changed)
partially_reconciled.add(updated_transaction.name)
alert_message, indicator = get_auto_reconcile_message(partially_reconciled, reconciled)
frappe.msgprint(title=_("Auto Reconciliation"), msg=alert_message, indicator=indicator)
frappe.flags.auto_reconcile_vouchers = False
return reconciled, partially_reconciled
def get_auto_reconcile_message(partially_reconciled, reconciled):
"""Returns alert message and indicator for auto reconciliation depending on result state."""
alert_message, indicator = "", "blue"
if not partially_reconciled and not reconciled:
alert_message = _("No matches occurred via auto reconciliation")
return alert_message, indicator
indicator = "green"
if reconciled:
alert_message += _("{0} Transaction(s) Reconciled").format(len(reconciled))
alert_message += "<br>"
if partially_reconciled:
alert_message += _("{0} {1} Partially Reconciled").format(
len(partially_reconciled),
_("Transactions") if len(partially_reconciled) > 1 else _("Transaction"),
)
return alert_message, indicator
return reconcile_vouchers(bank_transaction.name, vouchers)
@frappe.whitelist()
@@ -354,82 +266,80 @@ 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)
transaction.add_payment_entries(vouchers)
company_account = frappe.db.get_value("Bank Account", transaction.bank_account, "account")
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,
company_account,
)
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,
from_date=None,
to_date=None,
filter_by_reference_date=None,
from_reference_date=None,
to_reference_date=None,
):
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]
(gl_account, company) = (bank_account.account, bank_account.company)
matching = check_matching(
gl_account,
company,
transaction,
document_types,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
)
return subtract_allocations(gl_account, matching)
(account, company) = (bank_account.account, bank_account.company)
matching = check_matching(account, company, transaction, document_types)
return matching
def subtract_allocations(gl_account, vouchers):
"Look up & subtract any existing Bank Transaction allocations"
copied = []
for voucher in vouchers:
rows = get_total_allocated_amount(voucher.get("doctype"), voucher.get("name"))
filtered_row = list(filter(lambda row: row.get("gl_account") == gl_account, rows))
if amount := None if not filtered_row else filtered_row[0]["total"]:
voucher["paid_amount"] -= amount
copied.append(voucher)
return copied
def check_matching(
bank_account,
company,
transaction,
document_types,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
):
exact_match = True if "exact_match" in document_types else False
queries = get_queries(
bank_account,
company,
transaction,
document_types,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
exact_match,
)
def check_matching(bank_account, company, transaction, document_types):
# combine all types of vouchers
subquery = get_queries(bank_account, company, transaction, document_types)
filters = {
"amount": transaction.unallocated_amount,
"payment_type": "Receive" if transaction.deposit > 0.0 else "Pay",
"payment_type": "Receive" if transaction.deposit > 0 else "Pay",
"reference_no": transaction.reference_number,
"party_type": transaction.party_type,
"party": transaction.party,
@@ -437,28 +347,24 @@ def check_matching(
}
matching_vouchers = []
for query in queries:
matching_vouchers.extend(frappe.db.sql(query, filters, as_dict=True))
return (
sorted(matching_vouchers, key=lambda x: x["rank"], reverse=True) if matching_vouchers else []
)
matching_vouchers.extend(get_loan_vouchers(bank_account, transaction, document_types, filters))
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,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
exact_match,
):
def get_queries(bank_account, company, transaction, document_types):
# get queries to get matching vouchers
account_from_to = "paid_to" if transaction.deposit > 0.0 else "paid_from"
amount_condition = "=" if "exact_match" in document_types else "<="
account_from_to = "paid_to" if transaction.deposit > 0 else "paid_from"
queries = []
# get matching queries from all the apps
@@ -469,13 +375,8 @@ def get_queries(
company,
transaction,
document_types,
exact_match,
amount_condition,
account_from_to,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
)
or []
)
@@ -484,302 +385,238 @@ def get_queries(
def get_matching_queries(
bank_account,
company,
transaction,
document_types,
exact_match,
account_from_to,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
bank_account, company, transaction, document_types, amount_condition, account_from_to
):
queries = []
currency = get_account_currency(bank_account)
if "payment_entry" in document_types:
query = get_pe_matching_query(
exact_match,
account_from_to,
transaction,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
)
queries.append(query)
pe_amount_matching = get_pe_matching_query(amount_condition, account_from_to, transaction)
queries.extend([pe_amount_matching])
if "journal_entry" in document_types:
query = get_je_matching_query(
exact_match,
transaction,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
)
queries.append(query)
je_amount_matching = get_je_matching_query(amount_condition, transaction)
queries.extend([je_amount_matching])
if transaction.deposit > 0.0 and "sales_invoice" in document_types:
query = get_si_matching_query(exact_match, currency)
queries.append(query)
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.0:
if transaction.withdrawal > 0:
if "purchase_invoice" in document_types:
query = get_pi_matching_query(exact_match, currency)
queries.append(query)
if "bank_transaction" in document_types:
query = get_bt_matching_query(exact_match, transaction)
queries.append(query)
pi_amount_matching = get_pi_matching_query(amount_condition)
queries.extend([pi_amount_matching])
return queries
def get_bt_matching_query(exact_match, transaction):
# get matching bank transaction query
# find bank transactions in the same bank account with opposite sign
# same bank account must have same company and currency
bt = frappe.qb.DocType("Bank Transaction")
def get_loan_vouchers(bank_account, transaction, document_types, filters):
vouchers = []
amount_condition = True if "exact_match" in document_types else False
field = "deposit" if transaction.withdrawal > 0.0 else "withdrawal"
amount_equality = getattr(bt, field) == transaction.unallocated_amount
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
amount_condition = amount_equality if exact_match else getattr(bt, field) > 0.0
if transaction.withdrawal > 0 and "loan_disbursement" in document_types:
vouchers.extend(get_ld_matching_query(bank_account, amount_condition, filters))
ref_rank = (
frappe.qb.terms.Case().when(bt.reference_number == transaction.reference_number, 1).else_(0)
)
unallocated_rank = (
frappe.qb.terms.Case().when(bt.unallocated_amount == transaction.unallocated_amount, 1).else_(0)
)
if transaction.deposit > 0 and "loan_repayment" in document_types:
vouchers.extend(get_lr_matching_query(bank_account, amount_condition, filters))
party_condition = (
(bt.party_type == transaction.party_type)
& (bt.party == transaction.party)
& bt.party.isnotnull()
)
party_rank = frappe.qb.terms.Case().when(party_condition, 1).else_(0)
return vouchers
def get_ld_matching_query(bank_account, amount_condition, filters):
loan_disbursement = frappe.qb.DocType("Loan Disbursement")
matching_reference = loan_disbursement.reference_number == filters.get("reference_number")
matching_party = loan_disbursement.applicant_type == filters.get(
"party_type"
) and loan_disbursement.applicant == filters.get("party")
rank = frappe.qb.terms.Case().when(matching_reference, 1).else_(0)
rank1 = frappe.qb.terms.Case().when(matching_party, 1).else_(0)
query = (
frappe.qb.from_(bt)
frappe.qb.from_(loan_disbursement)
.select(
(ref_rank + amount_rank + party_rank + unallocated_rank + 1).as_("rank"),
ConstantColumn("Bank Transaction").as_("doctype"),
bt.name,
bt.unallocated_amount.as_("paid_amount"),
bt.reference_number.as_("reference_no"),
bt.date.as_("reference_date"),
bt.party,
bt.party_type,
bt.date.as_("posting_date"),
bt.currency,
rank + rank1 + 1,
ConstantColumn("Loan Disbursement").as_("doctype"),
loan_disbursement.name,
loan_disbursement.disbursed_amount,
loan_disbursement.reference_number,
loan_disbursement.reference_date,
loan_disbursement.applicant_type,
loan_disbursement.disbursement_date,
)
.where(bt.status != "Reconciled")
.where(bt.name != transaction.name)
.where(bt.bank_account == transaction.bank_account)
.where(amount_condition)
.where(bt.docstatus == 1)
.where(loan_disbursement.docstatus == 1)
.where(loan_disbursement.clearance_date.isnull())
.where(loan_disbursement.disbursement_account == bank_account)
)
return str(query)
if amount_condition:
query.where(loan_disbursement.disbursed_amount == filters.get("amount"))
else:
query.where(loan_disbursement.disbursed_amount <= filters.get("amount"))
vouchers = query.run(as_list=True)
return vouchers
def get_pe_matching_query(
exact_match,
account_from_to,
transaction,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
):
def get_lr_matching_query(bank_account, amount_condition, filters):
loan_repayment = frappe.qb.DocType("Loan Repayment")
matching_reference = loan_repayment.reference_number == filters.get("reference_number")
matching_party = loan_repayment.applicant_type == filters.get(
"party_type"
) and loan_repayment.applicant == filters.get("party")
rank = frappe.qb.terms.Case().when(matching_reference, 1).else_(0)
rank1 = frappe.qb.terms.Case().when(matching_party, 1).else_(0)
query = (
frappe.qb.from_(loan_repayment)
.select(
rank + rank1 + 1,
ConstantColumn("Loan Repayment").as_("doctype"),
loan_repayment.name,
loan_repayment.amount_paid,
loan_repayment.reference_number,
loan_repayment.reference_date,
loan_repayment.applicant_type,
loan_repayment.posting_date,
)
.where(loan_repayment.docstatus == 1)
.where(loan_repayment.clearance_date.isnull())
.where(loan_repayment.payment_account == bank_account)
)
if frappe.db.has_column("Loan Repayment", "repay_from_salary"):
query = query.where((loan_repayment.repay_from_salary == 0))
if amount_condition:
query.where(loan_repayment.amount_paid == filters.get("amount"))
else:
query.where(loan_repayment.amount_paid <= filters.get("amount"))
vouchers = query.run()
return vouchers
def get_pe_matching_query(amount_condition, account_from_to, transaction):
# get matching payment entries query
to_from = "to" if transaction.deposit > 0.0 else "from"
currency_field = f"paid_{to_from}_account_currency"
payment_type = "Receive" if transaction.deposit > 0.0 else "Pay"
pe = frappe.qb.DocType("Payment Entry")
ref_condition = pe.reference_no == transaction.reference_number
ref_rank = frappe.qb.terms.Case().when(ref_condition, 1).else_(0)
amount_equality = pe.paid_amount == transaction.unallocated_amount
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
amount_condition = amount_equality if exact_match else pe.paid_amount > 0.0
party_condition = (
(pe.party_type == transaction.party_type)
& (pe.party == transaction.party)
& pe.party.isnotnull()
)
party_rank = frappe.qb.terms.Case().when(party_condition, 1).else_(0)
filter_by_date = pe.posting_date.between(from_date, to_date)
if cint(filter_by_reference_date):
filter_by_date = pe.reference_date.between(from_reference_date, to_reference_date)
query = (
frappe.qb.from_(pe)
.select(
(ref_rank + amount_rank + party_rank + 1).as_("rank"),
ConstantColumn("Payment Entry").as_("doctype"),
pe.name,
pe.paid_amount,
pe.reference_no,
pe.reference_date,
pe.party,
pe.party_type,
pe.posting_date,
getattr(pe, currency_field).as_("currency"),
)
.where(pe.docstatus == 1)
.where(pe.payment_type.isin([payment_type, "Internal Transfer"]))
.where(pe.clearance_date.isnull())
.where(getattr(pe, account_from_to) == Parameter("%(bank_account)s"))
.where(amount_condition)
.where(filter_by_date)
.orderby(pe.reference_date if cint(filter_by_reference_date) else pe.posting_date)
)
if frappe.flags.auto_reconcile_vouchers == True:
query = query.where(ref_condition)
return str(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(
exact_match,
transaction,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
):
def get_je_matching_query(amount_condition, transaction):
# get matching journal entry query
# We have mapping at the bank level
# So one bank could have both types of bank accounts like asset and liability
# So cr_or_dr should be judged only on basis of withdrawal and deposit and not account type
cr_or_dr = "credit" if transaction.withdrawal > 0.0 else "debit"
je = frappe.qb.DocType("Journal Entry")
jea = frappe.qb.DocType("Journal Entry Account")
cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit"
ref_condition = je.cheque_no == transaction.reference_number
ref_rank = frappe.qb.terms.Case().when(ref_condition, 1).else_(0)
return f"""
amount_field = f"{cr_or_dr}_in_account_currency"
amount_equality = getattr(jea, amount_field) == transaction.unallocated_amount
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
filter_by_date = je.posting_date.between(from_date, to_date)
if cint(filter_by_reference_date):
filter_by_date = je.cheque_date.between(from_reference_date, to_reference_date)
query = (
frappe.qb.from_(jea)
.join(je)
.on(jea.parent == je.name)
.select(
(ref_rank + amount_rank + 1).as_("rank"),
ConstantColumn("Journal Entry").as_("doctype"),
SELECT
(CASE WHEN je.cheque_no=%(reference_no)s THEN 1 ELSE 0 END
+ 1) AS rank ,
'Journal Entry' as doctype,
je.name,
getattr(jea, amount_field).as_("paid_amount"),
je.cheque_no.as_("reference_no"),
je.cheque_date.as_("reference_date"),
je.pay_to_recd_from.as_("party"),
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"),
)
.where(je.docstatus == 1)
.where(je.voucher_type != "Opening Entry")
.where(je.clearance_date.isnull())
.where(jea.account == Parameter("%(bank_account)s"))
.where(amount_equality if exact_match else getattr(jea, amount_field) > 0.0)
.where(je.docstatus == 1)
.where(filter_by_date)
.orderby(je.cheque_date if cint(filter_by_reference_date) else je.posting_date)
)
if frappe.flags.auto_reconcile_vouchers == True:
query = query.where(ref_condition)
return str(query)
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(exact_match, currency):
# get matching sales invoice query
si = frappe.qb.DocType("Sales Invoice")
sip = frappe.qb.DocType("Sales Invoice Payment")
amount_equality = sip.amount == Parameter("%(amount)s")
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
amount_condition = amount_equality if exact_match else sip.amount > 0.0
party_condition = si.customer == Parameter("%(party)s")
party_rank = frappe.qb.terms.Case().when(party_condition, 1).else_(0)
query = (
frappe.qb.from_(sip)
.join(si)
.on(sip.parent == si.name)
.select(
(party_rank + amount_rank + 1).as_("rank"),
ConstantColumn("Sales Invoice").as_("doctype"),
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"),
ConstantColumn("").as_("reference_no"),
ConstantColumn("").as_("reference_date"),
si.customer.as_("party"),
ConstantColumn("Customer").as_("party_type"),
sip.amount as paid_amount,
'' as reference_no,
'' as reference_date,
si.customer as party,
'Customer' as party_type,
si.posting_date,
si.currency,
)
.where(si.docstatus == 1)
.where(sip.clearance_date.isnull())
.where(sip.account == Parameter("%(bank_account)s"))
.where(amount_condition)
.where(si.currency == currency)
)
si.currency
return str(query)
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(exact_match, currency):
# get matching purchase invoice query when they are also used as payment entries (is_paid)
purchase_invoice = frappe.qb.DocType("Purchase Invoice")
amount_equality = purchase_invoice.paid_amount == Parameter("%(amount)s")
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
amount_condition = amount_equality if exact_match else purchase_invoice.paid_amount > 0.0
party_condition = purchase_invoice.supplier == Parameter("%(party)s")
party_rank = frappe.qb.terms.Case().when(party_condition, 1).else_(0)
query = (
frappe.qb.from_(purchase_invoice)
.select(
(party_rank + amount_rank + 1).as_("rank"),
ConstantColumn("Purchase Invoice").as_("doctype"),
purchase_invoice.name,
purchase_invoice.paid_amount,
ConstantColumn("").as_("reference_no"),
ConstantColumn("").as_("reference_date"),
purchase_invoice.supplier.as_("party"),
ConstantColumn("Supplier").as_("party_type"),
purchase_invoice.posting_date,
purchase_invoice.currency,
)
.where(purchase_invoice.docstatus == 1)
.where(purchase_invoice.is_paid == 1)
.where(purchase_invoice.clearance_date.isnull())
.where(purchase_invoice.cash_bank_account == Parameter("%(bank_account)s"))
.where(amount_condition)
.where(purchase_invoice.currency == currency)
)
return str(query)
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
"""

View File

@@ -1,100 +1,9 @@
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
# import frappe
import unittest
import frappe
from frappe import qb
from frappe.tests.utils import FrappeTestCase, change_settings
from frappe.utils import add_days, flt, getdate, today
from erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool import (
auto_reconcile_vouchers,
get_bank_transactions,
)
from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_entry
from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
class TestBankReconciliationTool(AccountsTestMixin, FrappeTestCase):
def setUp(self):
self.create_company()
self.create_customer()
self.clear_old_entries()
bank_dt = qb.DocType("Bank")
q = qb.from_(bank_dt).delete().where(bank_dt.name == "HDFC").run()
self.create_bank_account()
def tearDown(self):
frappe.db.rollback()
def create_bank_account(self):
bank = frappe.get_doc(
{
"doctype": "Bank",
"bank_name": "HDFC",
}
).save()
self.bank_account = (
frappe.get_doc(
{
"doctype": "Bank Account",
"account_name": "HDFC _current_",
"bank": bank,
"is_company_account": True,
"account": self.bank, # account from Chart of Accounts
}
)
.insert()
.name
)
def test_auto_reconcile(self):
# make payment
from_date = add_days(today(), -1)
to_date = today()
payment = create_payment_entry(
company=self.company,
posting_date=from_date,
payment_type="Receive",
party_type="Customer",
party=self.customer,
paid_from=self.debit_to,
paid_to=self.bank,
paid_amount=100,
).save()
payment.reference_no = "123"
payment = payment.save().submit()
# make bank transaction
bank_transaction = (
frappe.get_doc(
{
"doctype": "Bank Transaction",
"date": to_date,
"deposit": 100,
"bank_account": self.bank_account,
"reference_number": "123",
}
)
.save()
.submit()
)
# assert API output pre reconciliation
transactions = get_bank_transactions(self.bank_account, from_date, to_date)
self.assertEqual(len(transactions), 1)
self.assertEqual(transactions[0].name, bank_transaction.name)
# auto reconcile
auto_reconcile_vouchers(
bank_account=self.bank_account,
from_date=from_date,
to_date=to_date,
filter_by_reference_date=False,
)
# assert API output post reconciliation
transactions = get_bank_transactions(self.bank_account, from_date, to_date)
self.assertEqual(len(transactions), 0)
class TestBankReconciliationTool(unittest.TestCase):
pass

View File

@@ -352,11 +352,10 @@ frappe.ui.form.on("Bank Statement Import", {
export_errored_rows(frm) {
open_url_post(
"/api/method/erpnext.accounts.doctype.bank_statement_import.bank_statement_import.download_errored_template",
"/api/method/frappe.core.doctype.data_import.data_import.download_errored_template",
{
data_import_name: frm.doc.name,
},
true
}
);
},

View File

@@ -53,20 +53,21 @@ class BankStatementImport(DataImport):
if "Bank Account" not in json.dumps(preview["columns"]):
frappe.throw(_("Please add the Bank Account column"))
from frappe.utils.background_jobs import is_job_enqueued
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"))
job_id = f"bank_statement_import::{self.name}"
if not is_job_enqueued(job_id):
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_id=job_id,
job_name=self.name,
data_import=self.name,
bank_account=self.bank_account,
import_file_path=self.import_file,

View File

@@ -1,178 +0,0 @@
from typing import Tuple, Union
import frappe
from frappe.utils import flt
from rapidfuzz import fuzz, process
class AutoMatchParty:
"""
Matches by Account/IBAN and then by Party Name/Description sequentially.
Returns when a result is obtained.
Result (if present) is of the form: (Party Type, Party,)
"""
def __init__(self, **kwargs) -> None:
self.__dict__.update(kwargs)
def get(self, key):
return self.__dict__.get(key, None)
def match(self) -> Union[Tuple, None]:
result = None
result = AutoMatchbyAccountIBAN(
bank_party_account_number=self.bank_party_account_number,
bank_party_iban=self.bank_party_iban,
deposit=self.deposit,
).match()
fuzzy_matching_enabled = frappe.db.get_single_value("Accounts Settings", "enable_fuzzy_matching")
if not result and fuzzy_matching_enabled:
result = AutoMatchbyPartyNameDescription(
bank_party_name=self.bank_party_name, description=self.description, deposit=self.deposit
).match()
return result
class AutoMatchbyAccountIBAN:
def __init__(self, **kwargs) -> None:
self.__dict__.update(kwargs)
def get(self, key):
return self.__dict__.get(key, None)
def match(self):
if not (self.bank_party_account_number or self.bank_party_iban):
return None
result = self.match_account_in_party()
return result
def match_account_in_party(self) -> Union[Tuple, None]:
"""Check if there is a IBAN/Account No. match in Customer/Supplier/Employee"""
result = None
parties = get_parties_in_order(self.deposit)
or_filters = self.get_or_filters()
for party in parties:
party_result = frappe.db.get_all(
"Bank Account", or_filters=or_filters, pluck="party", limit_page_length=1
)
if party == "Employee" and not party_result:
# Search in Bank Accounts first for Employee, and then Employee record
if "bank_account_no" in or_filters:
or_filters["bank_ac_no"] = or_filters.pop("bank_account_no")
party_result = frappe.db.get_all(
party, or_filters=or_filters, pluck="name", limit_page_length=1
)
if party_result:
result = (
party,
party_result[0],
)
break
return result
def get_or_filters(self) -> dict:
or_filters = {}
if self.bank_party_account_number:
or_filters["bank_account_no"] = self.bank_party_account_number
if self.bank_party_iban:
or_filters["iban"] = self.bank_party_iban
return or_filters
class AutoMatchbyPartyNameDescription:
def __init__(self, **kwargs) -> None:
self.__dict__.update(kwargs)
def get(self, key):
return self.__dict__.get(key, None)
def match(self) -> Union[Tuple, None]:
# fuzzy search by customer/supplier & employee
if not (self.bank_party_name or self.description):
return None
result = self.match_party_name_desc_in_party()
return result
def match_party_name_desc_in_party(self) -> Union[Tuple, None]:
"""Fuzzy search party name and/or description against parties in the system"""
result = None
parties = get_parties_in_order(self.deposit)
for party in parties:
filters = {"status": "Active"} if party == "Employee" else {"disabled": 0}
names = frappe.get_all(party, filters=filters, pluck=party.lower() + "_name")
for field in ["bank_party_name", "description"]:
if not self.get(field):
continue
result, skip = self.fuzzy_search_and_return_result(party, names, field)
if result or skip:
break
if result or skip:
# Skip If: It was hard to distinguish between close matches and so match is None
# OR if the right match was found
break
return result
def fuzzy_search_and_return_result(self, party, names, field) -> Union[Tuple, None]:
skip = False
result = process.extract(query=self.get(field), choices=names, scorer=fuzz.token_set_ratio)
party_name, skip = self.process_fuzzy_result(result)
if not party_name:
return None, skip
return (
party,
party_name,
), skip
def process_fuzzy_result(self, result: Union[list, None]):
"""
If there are multiple valid close matches return None as result may be faulty.
Return the result only if one accurate match stands out.
Returns: Result, Skip (whether or not to discontinue matching)
"""
PARTY, SCORE, CUTOFF = 0, 1, 80
if not result or not len(result):
return None, False
first_result = result[0]
if len(result) == 1:
return (first_result[PARTY] if first_result[SCORE] > CUTOFF else None), True
second_result = result[1]
if first_result[SCORE] > CUTOFF:
# If multiple matches with the same score, return None but discontinue matching
# Matches were found but were too close to distinguish between
if first_result[SCORE] == second_result[SCORE]:
return None, True
return first_result[PARTY], True
else:
return None, False
def get_parties_in_order(deposit: float) -> list:
parties = ["Supplier", "Employee", "Customer"] # most -> least likely to receive
if flt(deposit) > 0:
parties = ["Customer", "Supplier", "Employee"] # most -> least likely to pay
return parties

View File

@@ -12,14 +12,8 @@ frappe.ui.form.on("Bank Transaction", {
};
});
},
refresh(frm) {
if (!frm.is_dirty() && frm.doc.payment_entries.length > 0) {
frm.add_custom_button(__("Unreconcile Transaction"), () => {
frm.call("remove_payment_entries").then(() => frm.refresh());
});
}
},
bank_account: function (frm) {
bank_account: function(frm) {
set_bank_statement_filter(frm);
},
@@ -40,7 +34,6 @@ frappe.ui.form.on("Bank Transaction", {
"Journal Entry",
"Sales Invoice",
"Purchase Invoice",
"Bank Transaction",
];
}
});
@@ -56,7 +49,7 @@ const update_clearance_date = (frm, cdt, cdn) => {
frappe
.xcall(
"erpnext.accounts.doctype.bank_transaction.bank_transaction.unclear_reference_payment",
{ doctype: cdt, docname: cdn, bt_name: frm.doc.name }
{ doctype: cdt, docname: cdn }
)
.then((e) => {
if (e == "success") {

View File

@@ -20,11 +20,9 @@
"currency",
"section_break_10",
"description",
"reference_number",
"column_break_10",
"transaction_id",
"transaction_type",
"section_break_14",
"reference_number",
"transaction_id",
"payment_entries",
"section_break_18",
"allocated_amount",
@@ -33,11 +31,7 @@
"unallocated_amount",
"party_section",
"party_type",
"party",
"column_break_3czf",
"bank_party_name",
"bank_party_account_number",
"bank_party_iban"
"party"
],
"fields": [
{
@@ -67,7 +61,7 @@
"fieldtype": "Select",
"in_standard_filter": 1,
"label": "Status",
"options": "\nPending\nSettled\nUnreconciled\nReconciled\nCancelled"
"options": "\nPending\nSettled\nUnreconciled\nReconciled"
},
{
"fieldname": "bank_account",
@@ -196,40 +190,11 @@
"label": "Withdrawal",
"oldfieldname": "credit",
"options": "currency"
},
{
"fieldname": "column_break_10",
"fieldtype": "Column Break"
},
{
"fieldname": "transaction_type",
"fieldtype": "Data",
"label": "Transaction Type",
"length": 50
},
{
"fieldname": "column_break_3czf",
"fieldtype": "Column Break"
},
{
"fieldname": "bank_party_name",
"fieldtype": "Data",
"label": "Party Name/Account Holder (Bank Statement)"
},
{
"fieldname": "bank_party_iban",
"fieldtype": "Data",
"label": "Party IBAN (Bank Statement)"
},
{
"fieldname": "bank_party_account_number",
"fieldtype": "Data",
"label": "Party Account No. (Bank Statement)"
}
],
"is_submittable": 1,
"links": [],
"modified": "2023-06-06 13:58:12.821411",
"modified": "2022-03-21 19:05:04.208222",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction",

View File

@@ -1,6 +1,9 @@
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from functools import reduce
import frappe
from frappe.utils import flt
@@ -15,158 +18,73 @@ class BankTransaction(StatusUpdater):
self.clear_linked_payment_entries()
self.set_status()
if frappe.db.get_single_value("Accounts Settings", "enable_party_matching"):
self.auto_set_party()
_saving_flag = False
# nosemgrep: frappe-semgrep-rules.rules.frappe-modifying-but-not-comitting
def on_update_after_submit(self):
"Run on save(). Avoid recursion caused by multiple saves"
if not self._saving_flag:
self._saving_flag = True
self.clear_linked_payment_entries()
self.update_allocations()
self._saving_flag = False
self.update_allocations()
self.clear_linked_payment_entries()
self.set_status(update=True)
def on_cancel(self):
self.clear_linked_payment_entries(for_cancel=True)
self.set_status(update=True)
def update_allocations(self):
"The doctype does not allow modifications after submission, so write to the db direct"
if self.payment_entries:
allocated_amount = sum(p.allocated_amount for p in self.payment_entries)
allocated_amount = reduce(
lambda x, y: flt(x) + flt(y), [x.allocated_amount for x in self.payment_entries]
)
else:
allocated_amount = 0.0
allocated_amount = 0
amount = abs(flt(self.withdrawal) - flt(self.deposit))
self.db_set("allocated_amount", flt(allocated_amount))
self.db_set("unallocated_amount", amount - flt(allocated_amount))
self.reload()
self.set_status(update=True)
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.withdrawal) - flt(self.deposit)) - flt(allocated_amount),
)
def add_payment_entries(self, vouchers):
"Add the vouchers with zero allocation. Save() will perform the allocations and clearance"
if 0.0 >= self.unallocated_amount:
frappe.throw(frappe._("Bank Transaction {0} is already fully reconciled").format(self.name))
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.withdrawal) - flt(self.deposit))
)
added = False
for voucher in vouchers:
# Can't add same voucher twice
found = False
for pe in self.payment_entries:
if (
pe.payment_document == voucher["payment_doctype"]
and pe.payment_entry == voucher["payment_name"]
):
found = True
if not found:
pe = {
"payment_document": voucher["payment_doctype"],
"payment_entry": voucher["payment_name"],
"allocated_amount": 0.0, # Temporary
}
child = self.append("payment_entries", pe)
added = True
# runs on_update_after_submit
if added:
self.save()
def allocate_payment_entries(self):
"""Refactored from bank reconciliation tool.
Non-zero allocations must be amended/cleared manually
Get the bank transaction amount (b) and remove as we allocate
For each payment_entry if allocated_amount == 0:
- get the amount already allocated against all transactions (t), need latest date
- get the voucher amount (from gl) (v)
- allocate (a = v - t)
- a = 0: should already be cleared, so clear & remove payment_entry
- 0 < a <= u: allocate a & clear
- 0 < a, a > u: allocate u
- 0 > a: Error: already over-allocated
- clear means: set the latest transaction date as clearance date
"""
remaining_amount = self.unallocated_amount
for payment_entry in self.payment_entries:
if payment_entry.allocated_amount == 0.0:
unallocated_amount, should_clear, latest_transaction = get_clearance_details(
self, payment_entry
)
if 0.0 == unallocated_amount:
if should_clear:
latest_transaction.clear_linked_payment_entry(payment_entry)
self.db_delete_payment_entry(payment_entry)
elif remaining_amount <= 0.0:
self.db_delete_payment_entry(payment_entry)
elif 0.0 < unallocated_amount and unallocated_amount <= remaining_amount:
payment_entry.db_set("allocated_amount", unallocated_amount)
remaining_amount -= unallocated_amount
if should_clear:
latest_transaction.clear_linked_payment_entry(payment_entry)
elif 0.0 < unallocated_amount and unallocated_amount > remaining_amount:
payment_entry.db_set("allocated_amount", remaining_amount)
remaining_amount = 0.0
elif 0.0 > unallocated_amount:
self.db_delete_payment_entry(payment_entry)
frappe.throw(frappe._("Voucher {0} is over-allocated by {1}").format(unallocated_amount))
amount = self.deposit or self.withdrawal
if amount == self.allocated_amount:
frappe.db.set_value(self.doctype, self.name, "status", "Reconciled")
self.reload()
def db_delete_payment_entry(self, payment_entry):
frappe.db.delete("Bank Transaction Payments", {"name": payment_entry.name})
@frappe.whitelist()
def remove_payment_entries(self):
for payment_entry in self.payment_entries:
self.remove_payment_entry(payment_entry)
# runs on_update_after_submit
self.save()
def remove_payment_entry(self, payment_entry):
"Clear payment entry and clearance"
self.clear_linked_payment_entry(payment_entry, for_cancel=True)
self.remove(payment_entry)
def clear_linked_payment_entries(self, for_cancel=False):
if for_cancel:
for payment_entry in self.payment_entries:
self.clear_linked_payment_entry(payment_entry, for_cancel)
else:
self.allocate_payment_entries()
for payment_entry in self.payment_entries:
if payment_entry.payment_document == "Sales Invoice":
self.clear_sales_invoice(payment_entry, for_cancel=for_cancel)
elif payment_entry.payment_document in get_doctypes_for_bank_reconciliation():
self.clear_simple_entry(payment_entry, for_cancel=for_cancel)
def clear_linked_payment_entry(self, payment_entry, for_cancel=False):
clearance_date = None if for_cancel else self.date
set_voucher_clearance(
payment_entry.payment_document, payment_entry.payment_entry, clearance_date, self
def clear_simple_entry(self, payment_entry, for_cancel=False):
if payment_entry.payment_document == "Payment Entry":
if (
frappe.db.get_value("Payment Entry", payment_entry.payment_entry, "payment_type")
== "Internal Transfer"
):
if len(get_reconciled_bank_transactions(payment_entry)) < 2:
return
clearance_date = self.date if not for_cancel else None
frappe.db.set_value(
payment_entry.payment_document, payment_entry.payment_entry, "clearance_date", clearance_date
)
def auto_set_party(self):
from erpnext.accounts.doctype.bank_transaction.auto_match_party import AutoMatchParty
if self.party_type and self.party:
return
result = AutoMatchParty(
bank_party_account_number=self.bank_party_account_number,
bank_party_iban=self.bank_party_iban,
bank_party_name=self.bank_party_name,
description=self.description,
deposit=self.deposit,
).match()
if result:
party_type, party = result
frappe.db.set_value(
"Bank Transaction", self.name, field={"party_type": party_type, "party": party}
)
def clear_sales_invoice(self, payment_entry, for_cancel=False):
clearance_date = self.date if not for_cancel else None
frappe.db.set_value(
"Sales Invoice Payment",
dict(parenttype=payment_entry.payment_document, parent=payment_entry.payment_entry),
"clearance_date",
clearance_date,
)
@frappe.whitelist()
@@ -175,114 +93,38 @@ def get_doctypes_for_bank_reconciliation():
return frappe.get_hooks("bank_reconciliation_doctypes")
def get_clearance_details(transaction, payment_entry):
"""
There should only be one bank gle for a voucher.
Could be none for a Bank Transaction.
But if a JE, could affect two banks.
Should only clear the voucher if all bank gles are allocated.
"""
gl_bank_account = frappe.db.get_value("Bank Account", transaction.bank_account, "account")
gles = get_related_bank_gl_entries(payment_entry.payment_document, payment_entry.payment_entry)
bt_allocations = get_total_allocated_amount(
payment_entry.payment_document, payment_entry.payment_entry
def get_reconciled_bank_transactions(payment_entry):
reconciled_bank_transactions = frappe.get_all(
"Bank Transaction Payments",
filters={"payment_entry": payment_entry.payment_entry},
fields=["parent"],
)
unallocated_amount = min(
transaction.unallocated_amount,
get_paid_amount(payment_entry, transaction.currency, gl_bank_account),
)
unmatched_gles = len(gles)
latest_transaction = transaction
for gle in gles:
if gle["gl_account"] == gl_bank_account:
if gle["amount"] <= 0.0:
frappe.throw(
frappe._("Voucher {0} value is broken: {1}").format(
payment_entry.payment_entry, gle["amount"]
)
)
unmatched_gles -= 1
unallocated_amount = gle["amount"]
for a in bt_allocations:
if a["gl_account"] == gle["gl_account"]:
unallocated_amount = gle["amount"] - a["total"]
if frappe.utils.getdate(transaction.date) < a["latest_date"]:
latest_transaction = frappe.get_doc("Bank Transaction", a["latest_name"])
else:
# Must be a Journal Entry affecting more than one bank
for a in bt_allocations:
if a["gl_account"] == gle["gl_account"] and a["total"] == gle["amount"]:
unmatched_gles -= 1
return unallocated_amount, unmatched_gles == 0, latest_transaction
return reconciled_bank_transactions
def get_related_bank_gl_entries(doctype, docname):
# nosemgrep: frappe-semgrep-rules.rules.frappe-using-db-sql
result = frappe.db.sql(
def get_total_allocated_amount(payment_entry):
return frappe.db.sql(
"""
SELECT
ABS(gle.credit_in_account_currency - gle.debit_in_account_currency) AS amount,
gle.account AS gl_account
SUM(btp.allocated_amount) as allocated_amount,
bt.name
FROM
`tabGL Entry` gle
`tabBank Transaction Payments` as btp
LEFT JOIN
`tabAccount` ac ON ac.name=gle.account
`tabBank Transaction` bt ON bt.name=btp.parent
WHERE
ac.account_type = 'Bank'
AND gle.voucher_type = %(doctype)s
AND gle.voucher_no = %(docname)s
AND is_cancelled = 0
""",
dict(doctype=doctype, docname=docname),
btp.payment_document = %s
AND
btp.payment_entry = %s
AND
bt.docstatus = 1""",
(payment_entry.payment_document, payment_entry.payment_entry),
as_dict=True,
)
return result
def get_total_allocated_amount(doctype, docname):
"""
Gets the sum of allocations for a voucher on each bank GL account
along with the latest bank transaction name & date
NOTE: query may also include just saved vouchers/payments but with zero allocated_amount
"""
# nosemgrep: frappe-semgrep-rules.rules.frappe-using-db-sql
result = frappe.db.sql(
"""
SELECT total, latest_name, latest_date, gl_account FROM (
SELECT
ROW_NUMBER() OVER w AS rownum,
SUM(btp.allocated_amount) OVER(PARTITION BY ba.account) AS total,
FIRST_VALUE(bt.name) OVER w AS latest_name,
FIRST_VALUE(bt.date) OVER w AS latest_date,
ba.account AS gl_account
FROM
`tabBank Transaction Payments` btp
LEFT JOIN `tabBank Transaction` bt ON bt.name=btp.parent
LEFT JOIN `tabBank Account` ba ON ba.name=bt.bank_account
WHERE
btp.payment_document = %(doctype)s
AND btp.payment_entry = %(docname)s
AND bt.docstatus = 1
WINDOW w AS (PARTITION BY ba.account ORDER BY bt.date desc)
) temp
WHERE
rownum = 1
""",
dict(doctype=doctype, docname=docname),
as_dict=True,
)
for row in result:
# Why is this *sometimes* a byte string?
if isinstance(row["latest_name"], bytes):
row["latest_name"] = row["latest_name"].decode()
row["latest_date"] = frappe.utils.getdate(row["latest_date"])
return result
def get_paid_amount(payment_entry, currency, gl_bank_account):
def get_paid_amount(payment_entry, currency, bank_account):
if payment_entry.payment_document in ["Payment Entry", "Sales Invoice", "Purchase Invoice"]:
paid_amount_field = "paid_amount"
@@ -295,7 +137,7 @@ def get_paid_amount(payment_entry, currency, gl_bank_account):
)
elif doc.payment_type == "Pay":
paid_amount_field = (
"paid_amount" if doc.paid_from_account_currency == currency else "base_paid_amount"
"paid_amount" if doc.paid_to_account_currency == currency else "base_paid_amount"
)
return frappe.db.get_value(
@@ -303,13 +145,10 @@ def get_paid_amount(payment_entry, currency, gl_bank_account):
)
elif payment_entry.payment_document == "Journal Entry":
return abs(
frappe.db.get_value(
"Journal Entry Account",
{"parent": payment_entry.payment_entry, "account": gl_bank_account},
"sum(debit_in_account_currency-credit_in_account_currency)",
)
or 0
return frappe.db.get_value(
"Journal Entry Account",
{"parent": payment_entry.payment_entry, "account": bank_account},
"sum(credit_in_account_currency)",
)
elif payment_entry.payment_document == "Expense Claim":
@@ -327,12 +166,6 @@ def get_paid_amount(payment_entry, currency, gl_bank_account):
payment_entry.payment_document, payment_entry.payment_entry, "amount_paid"
)
elif payment_entry.payment_document == "Bank Transaction":
dep, wth = frappe.db.get_value(
"Bank Transaction", payment_entry.payment_entry, ("deposit", "withdrawal")
)
return abs(flt(wth) - flt(dep))
else:
frappe.throw(
"Please reconcile {0}: {1} manually".format(
@@ -341,48 +174,18 @@ def get_paid_amount(payment_entry, currency, gl_bank_account):
)
def set_voucher_clearance(doctype, docname, clearance_date, self):
if doctype in get_doctypes_for_bank_reconciliation():
if (
doctype == "Payment Entry"
and frappe.db.get_value("Payment Entry", docname, "payment_type") == "Internal Transfer"
and len(get_reconciled_bank_transactions(doctype, docname)) < 2
):
return
frappe.db.set_value(doctype, docname, "clearance_date", clearance_date)
elif doctype == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
dict(parenttype=doctype, parent=docname),
"clearance_date",
clearance_date,
)
elif doctype == "Bank Transaction":
# For when a second bank transaction has fixed another, e.g. refund
bt = frappe.get_doc(doctype, docname)
if clearance_date:
vouchers = [{"payment_doctype": "Bank Transaction", "payment_name": self.name}]
bt.add_payment_entries(vouchers)
else:
for pe in bt.payment_entries:
if pe.payment_document == self.doctype and pe.payment_entry == self.name:
bt.remove(pe)
bt.save()
break
def get_reconciled_bank_transactions(doctype, docname):
return frappe.get_all(
"Bank Transaction Payments",
filters={"payment_document": doctype, "payment_entry": docname},
pluck="parent",
)
@frappe.whitelist()
def unclear_reference_payment(doctype, docname, bt_name):
bt = frappe.get_doc("Bank Transaction", bt_name)
set_voucher_clearance(doctype, docname, None, bt)
return docname
def unclear_reference_payment(doctype, docname):
if frappe.db.exists(doctype, docname):
doc = frappe.get_doc(doctype, docname)
if doctype == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
dict(parenttype=doc.payment_document, parent=doc.payment_entry),
"clearance_date",
None,
)
else:
frappe.db.set_value(doc.payment_document, doc.payment_entry, "clearance_date", None)
return doc.payment_entry

View File

@@ -74,7 +74,7 @@ def get_header_mapping(columns, bank_account):
def get_bank_mapping(bank_account):
bank_name = frappe.get_cached_value("Bank Account", bank_account, "bank")
bank_name = frappe.db.get_value("Bank Account", bank_account, "bank")
bank = frappe.get_doc("Bank", bank_name)
mapping = {row.file_field: row.bank_transaction_field for row in bank.bank_transaction_mapping}

View File

@@ -1,151 +0,0 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.tests.utils import FrappeTestCase
from frappe.utils import nowdate
from erpnext.accounts.doctype.bank_transaction.test_bank_transaction import create_bank_account
class TestAutoMatchParty(FrappeTestCase):
@classmethod
def setUpClass(cls):
create_bank_account()
frappe.db.set_single_value("Accounts Settings", "enable_party_matching", 1)
frappe.db.set_single_value("Accounts Settings", "enable_fuzzy_matching", 1)
return super().setUpClass()
@classmethod
def tearDownClass(cls):
frappe.db.set_single_value("Accounts Settings", "enable_party_matching", 0)
frappe.db.set_single_value("Accounts Settings", "enable_fuzzy_matching", 0)
def test_match_by_account_number(self):
create_supplier_for_match(account_no="000000003716541159")
doc = create_bank_transaction(
withdrawal=1200,
transaction_id="562213b0ca1bf838dab8f2c6a39bbc3b",
account_no="000000003716541159",
iban="DE02000000003716541159",
)
self.assertEqual(doc.party_type, "Supplier")
self.assertEqual(doc.party, "John Doe & Co.")
def test_match_by_iban(self):
create_supplier_for_match(iban="DE02000000003716541159")
doc = create_bank_transaction(
withdrawal=1200,
transaction_id="c5455a224602afaa51592a9d9250600d",
account_no="000000003716541159",
iban="DE02000000003716541159",
)
self.assertEqual(doc.party_type, "Supplier")
self.assertEqual(doc.party, "John Doe & Co.")
def test_match_by_party_name(self):
create_supplier_for_match(supplier_name="Jackson Ella W.")
doc = create_bank_transaction(
withdrawal=1200,
transaction_id="1f6f661f347ff7b1ea588665f473adb1",
party_name="Ella Jackson",
iban="DE04000000003716545346",
)
self.assertEqual(doc.party_type, "Supplier")
self.assertEqual(doc.party, "Jackson Ella W.")
def test_match_by_description(self):
create_supplier_for_match(supplier_name="Microsoft")
doc = create_bank_transaction(
description="Auftraggeber: microsoft payments Buchungstext: msft ..e3006b5hdy. ref. j375979555927627/5536",
withdrawal=1200,
transaction_id="8df880a2d09c3bed3fea358ca5168c5a",
party_name="",
)
self.assertEqual(doc.party_type, "Supplier")
self.assertEqual(doc.party, "Microsoft")
def test_skip_match_if_multiple_close_results(self):
create_supplier_for_match(supplier_name="Adithya Medical & General Stores")
create_supplier_for_match(supplier_name="Adithya Medical And General Stores")
doc = create_bank_transaction(
description="Paracetamol Consignment, SINV-0009",
withdrawal=24.85,
transaction_id="3a1da4ee2dc5a980138d56ef3460cbd9",
party_name="Adithya Medical & General",
)
# Mapping is skipped as both Supplier names have the same match score
self.assertEqual(doc.party_type, None)
self.assertEqual(doc.party, None)
def create_supplier_for_match(supplier_name="John Doe & Co.", iban=None, account_no=None):
if frappe.db.exists("Supplier", {"supplier_name": supplier_name}):
# Update related Bank Account details
if not (iban or account_no):
return
frappe.db.set_value(
dt="Bank Account",
dn={"party": supplier_name},
field={"iban": iban, "bank_account_no": account_no},
)
return
# Create Supplier and Bank Account for the same
supplier = frappe.new_doc("Supplier")
supplier.supplier_name = supplier_name
supplier.supplier_group = "Services"
supplier.supplier_type = "Company"
supplier.insert()
if not frappe.db.exists("Bank", "TestBank"):
bank = frappe.new_doc("Bank")
bank.bank_name = "TestBank"
bank.insert(ignore_if_duplicate=True)
if not frappe.db.exists("Bank Account", supplier.name + " - " + "TestBank"):
bank_account = frappe.new_doc("Bank Account")
bank_account.account_name = supplier.name
bank_account.bank = "TestBank"
bank_account.iban = iban
bank_account.bank_account_no = account_no
bank_account.party_type = "Supplier"
bank_account.party = supplier.name
bank_account.insert()
def create_bank_transaction(
description=None,
withdrawal=0,
deposit=0,
transaction_id=None,
party_name=None,
account_no=None,
iban=None,
):
doc = frappe.new_doc("Bank Transaction")
doc.update(
{
"doctype": "Bank Transaction",
"description": description or "1512567 BG/000002918 OPSKATTUZWXXX AT776000000098709837 Herr G",
"date": nowdate(),
"withdrawal": withdrawal,
"deposit": deposit,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank",
"transaction_id": transaction_id,
"bank_party_name": party_name,
"bank_party_account_number": account_no,
"bank_party_iban": iban,
}
)
doc.insert()
doc.submit()
doc.reload()
return doc

View File

@@ -5,7 +5,6 @@ import json
import unittest
import frappe
from frappe import utils
from frappe.tests.utils import FrappeTestCase
from erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool import (
@@ -16,7 +15,6 @@ from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_paymen
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.tests.utils import if_lending_app_installed
test_dependencies = ["Item", "Cost Center"]
@@ -24,13 +22,14 @@ test_dependencies = ["Item", "Cost Center"]
class TestBankTransaction(FrappeTestCase):
def setUp(self):
for dt in [
"Loan Repayment",
"Bank Transaction",
"Payment Entry",
"Payment Entry Reference",
"POS Profile",
]:
frappe.db.delete(dt)
clear_loan_transactions()
make_pos_profile()
add_transactions()
add_vouchers()
@@ -41,13 +40,8 @@ class TestBankTransaction(FrappeTestCase):
"Bank Transaction",
dict(description="Re 95282925234 FE/000002917 AT171513000281183046 Conrad Electronic"),
)
linked_payments = get_linked_payments(
bank_transaction.name,
["payment_entry", "exact_match"],
from_date=bank_transaction.date,
to_date=utils.today(),
)
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):
@@ -87,13 +81,8 @@ class TestBankTransaction(FrappeTestCase):
"Bank Transaction",
dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07"),
)
linked_payments = get_linked_payments(
bank_transaction.name,
["payment_entry", "exact_match"],
from_date=bank_transaction.date,
to_date=utils.today(),
)
self.assertTrue(linked_payments[0]["paid_amount"])
linked_payments = get_linked_payments(bank_transaction.name, ["payment_entry", "exact_match"])
self.assertTrue(linked_payments[0][3])
# Check error if already reconciled
def test_already_reconciled(self):
@@ -160,9 +149,8 @@ class TestBankTransaction(FrappeTestCase):
is not None
)
@if_lending_app_installed
def test_matching_loan_repayment(self):
from lending.loan_management.doctype.loan.test_loan import create_loan_accounts
from erpnext.loan_management.doctype.loan.test_loan import create_loan_accounts
create_loan_accounts()
bank_account = frappe.get_doc(
@@ -188,12 +176,7 @@ class TestBankTransaction(FrappeTestCase):
repayment_entry = create_loan_and_repayment()
linked_payments = get_linked_payments(bank_transaction.name, ["loan_repayment", "exact_match"])
self.assertEqual(linked_payments[0]["name"], repayment_entry.name)
@if_lending_app_installed
def clear_loan_transactions():
frappe.db.delete("Loan Repayment")
self.assertEqual(linked_payments[0][2], repayment_entry.name)
def create_bank_account(bank_name="Citi Bank", account_name="_Test Bank - _TC"):
@@ -406,22 +389,19 @@ def add_vouchers():
si.submit()
@if_lending_app_installed
def create_loan_and_repayment():
from lending.loan_management.doctype.loan.test_loan import (
from erpnext.loan_management.doctype.loan.test_loan import (
create_loan,
create_loan_product,
create_loan_type,
create_repayment_entry,
make_loan_disbursement_entry,
)
from lending.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual import (
from erpnext.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual import (
process_loan_interest_accrual_for_term_loans,
)
from erpnext.setup.doctype.employee.test_employee import make_employee
create_loan_product(
"Personal Loan",
create_loan_type(
"Personal Loan",
500000,
8.4,
@@ -442,7 +422,7 @@ def create_loan_and_repayment():
"applicant_type": "Employee",
"company": "_Test Company",
"applicant": applicant,
"loan_product": "Personal Loan",
"loan_type": "Personal Loan",
"loan_amount": 5000,
"repayment_method": "Repay Fixed Amount per Period",
"monthly_repayment_amount": 500,

View File

@@ -59,7 +59,7 @@ class Budget(Document):
account_list = []
for d in self.get("accounts"):
if d.account:
account_details = frappe.get_cached_value(
account_details = frappe.db.get_value(
"Account", d.account, ["is_group", "company", "report_type"], as_dict=1
)
@@ -125,27 +125,14 @@ def validate_expense_against_budget(args, expense_amount=0):
if not args.account:
return
default_dimensions = [
{
"fieldname": "project",
"document_type": "Project",
},
{
"fieldname": "cost_center",
"document_type": "Cost Center",
},
]
for dimension in default_dimensions + get_accounting_dimensions(as_list=False):
budget_against = dimension.get("fieldname")
for budget_against in ["project", "cost_center"] + get_accounting_dimensions():
if (
args.get(budget_against)
and args.account
and frappe.db.get_value("Account", {"name": args.account, "root_type": "Expense"})
):
doctype = dimension.get("document_type")
doctype = frappe.unscrub(budget_against)
if frappe.get_cached_value("DocType", doctype, "is_tree"):
lft, rgt = frappe.db.get_value(doctype, args.get(budget_against), ["lft", "rgt"])
@@ -197,11 +184,6 @@ def validate_budget_records(args, budget_records, expense_amount):
amount = expense_amount or get_amount(args, budget)
yearly_action, monthly_action = get_actions(args, budget)
if yearly_action in ("Stop", "Warn"):
compare_expense_with_budget(
args, flt(budget.budget_amount), _("Annual"), yearly_action, budget.budget_against, amount
)
if monthly_action in ["Stop", "Warn"]:
budget_amount = get_accumulated_monthly_budget(
budget.monthly_distribution, args.posting_date, args.fiscal_year, budget.budget_amount
@@ -213,28 +195,28 @@ def validate_budget_records(args, budget_records, expense_amount):
args, budget_amount, _("Accumulated Monthly"), monthly_action, budget.budget_against, amount
)
if (
yearly_action in ("Stop", "Warn")
and monthly_action != "Stop"
and yearly_action != monthly_action
):
compare_expense_with_budget(
args, flt(budget.budget_amount), _("Annual"), yearly_action, budget.budget_against, amount
)
def compare_expense_with_budget(args, budget_amount, action_for, action, budget_against, amount=0):
actual_expense = get_actual_expense(args)
total_expense = actual_expense + amount
if total_expense > budget_amount:
if actual_expense > budget_amount:
error_tense = _("is already")
diff = actual_expense - budget_amount
else:
error_tense = _("will be")
diff = total_expense - budget_amount
actual_expense = amount or get_actual_expense(args)
if actual_expense > budget_amount:
diff = actual_expense - budget_amount
currency = frappe.get_cached_value("Company", args.company, "default_currency")
msg = _("{0} Budget for Account {1} against {2} {3} is {4}. It {5} exceed by {6}").format(
msg = _("{0} Budget for Account {1} against {2} {3} is {4}. It will exceed by {5}").format(
_(action_for),
frappe.bold(args.account),
frappe.unscrub(args.budget_against_field),
args.budget_against_field,
frappe.bold(budget_against),
frappe.bold(fmt_money(budget_amount, currency=currency)),
error_tense,
frappe.bold(fmt_money(diff, currency=currency)),
)
@@ -245,9 +227,9 @@ def compare_expense_with_budget(args, budget_amount, action_for, action, budget_
action = "Warn"
if action == "Stop":
frappe.throw(msg, BudgetError, title=_("Budget Exceeded"))
frappe.throw(msg, BudgetError)
else:
frappe.msgprint(msg, indicator="orange", title=_("Budget Exceeded"))
frappe.msgprint(msg, indicator="orange")
def get_actions(args, budget):
@@ -324,7 +306,7 @@ def get_other_condition(args, budget, for_doc):
if args.get("fiscal_year"):
date_field = "schedule_date" if for_doc == "Material Request" else "transaction_date"
start_date, end_date = frappe.get_cached_value(
start_date, end_date = frappe.db.get_value(
"Fiscal Year", args.get("fiscal_year"), ["year_start_date", "year_end_date"]
)
@@ -369,9 +351,7 @@ def get_actual_expense(args):
"""
select sum(gle.debit) - sum(gle.credit)
from `tabGL Entry` gle
where
is_cancelled = 0
and gle.account=%(account)s
where gle.account=%(account)s
{condition1}
and gle.fiscal_year=%(fiscal_year)s
and gle.company=%(company)s
@@ -399,7 +379,7 @@ def get_accumulated_monthly_budget(monthly_distribution, posting_date, fiscal_ye
):
distribution.setdefault(d.month, d.percentage_allocation)
dt = frappe.get_cached_value("Fiscal Year", fiscal_year, "year_start_date")
dt = frappe.db.get_value("Fiscal Year", fiscal_year, "year_start_date")
accumulated_percentage = 0.0
while dt <= getdate(posting_date):

View File

@@ -0,0 +1,6 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Cash Flow Mapper', {
});

View File

@@ -0,0 +1,275 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 1,
"autoname": "field:section_name",
"beta": 0,
"creation": "2018-02-08 10:00:14.066519",
"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": "section_name",
"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": "Section 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": 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": "section_header",
"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": "Section 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": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "e.g Adjustments for:",
"fieldname": "section_leader",
"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": "Section Leader",
"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": "section_subtotal",
"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": "Section Subtotal",
"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": "section_footer",
"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": "Section Footer",
"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": "accounts",
"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": "Accounts",
"length": 0,
"no_copy": 0,
"options": "Cash Flow Mapping Template Details",
"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": "position",
"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": "Position",
"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": 0,
"max_attachments": 0,
"modified": "2018-02-15 18:28:55.034933",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cash Flow Mapper",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"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
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "name",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

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

View File

@@ -0,0 +1,25 @@
DEFAULT_MAPPERS = [
{
"doctype": "Cash Flow Mapper",
"section_footer": "Net cash generated by operating activities",
"section_header": "Cash flows from operating activities",
"section_leader": "Adjustments for",
"section_name": "Operating Activities",
"position": 0,
"section_subtotal": "Cash generated from operations",
},
{
"doctype": "Cash Flow Mapper",
"position": 1,
"section_footer": "Net cash used in investing activities",
"section_header": "Cash flows from investing activities",
"section_name": "Investing Activities",
},
{
"doctype": "Cash Flow Mapper",
"position": 2,
"section_footer": "Net cash used in financing activites",
"section_header": "Cash flows from financing activities",
"section_name": "Financing Activities",
},
]

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import unittest
class TestCashFlowMapper(unittest.TestCase):
pass

View File

@@ -0,0 +1,43 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Cash Flow Mapping', {
refresh: function(frm) {
frm.events.disable_unchecked_fields(frm);
},
reset_check_fields: function(frm) {
frm.fields.filter(field => field.df.fieldtype === 'Check')
.map(field => frm.set_df_property(field.df.fieldname, 'read_only', 0));
},
has_checked_field(frm) {
const val = frm.fields.filter(field => field.value === 1);
return val.length ? 1 : 0;
},
_disable_unchecked_fields: function(frm) {
// get value of clicked field
frm.fields.filter(field => field.value === 0)
.map(field => frm.set_df_property(field.df.fieldname, 'read_only', 1));
},
disable_unchecked_fields: function(frm) {
frm.events.reset_check_fields(frm);
const checked = frm.events.has_checked_field(frm);
if (checked) {
frm.events._disable_unchecked_fields(frm);
}
},
is_working_capital: function(frm) {
frm.events.disable_unchecked_fields(frm);
},
is_finance_cost: function(frm) {
frm.events.disable_unchecked_fields(frm);
},
is_income_tax_liability: function(frm) {
frm.events.disable_unchecked_fields(frm);
},
is_income_tax_expense: function(frm) {
frm.events.disable_unchecked_fields(frm);
},
is_finance_cost_adjustment: function(frm) {
frm.events.disable_unchecked_fields(frm);
}
});

View File

@@ -0,0 +1,359 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 1,
"autoname": "field:mapping_name",
"beta": 0,
"creation": "2018-02-08 09:28:44.678364",
"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": "mapping_name",
"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": "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": 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": "label",
"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": "Label",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 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": "accounts",
"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": "Accounts",
"length": 0,
"no_copy": 0,
"options": "Cash Flow Mapping Accounts",
"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": "sb_1",
"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": "Select Maximum Of 1",
"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,
"default": "0",
"fieldname": "is_finance_cost",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Finance Cost",
"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,
"default": "0",
"fieldname": "is_working_capital",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Working Capital",
"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,
"default": "0",
"fieldname": "is_finance_cost_adjustment",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Finance Cost Adjustment",
"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,
"default": "0",
"fieldname": "is_income_tax_liability",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Income Tax Liability",
"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,
"default": "0",
"fieldname": "is_income_tax_expense",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Income Tax Expense",
"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": 0,
"max_attachments": 0,
"modified": "2018-02-15 08:25:18.693533",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cash Flow Mapping",
"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": "Administrator",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "name",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -0,0 +1,22 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
from frappe import _
from frappe.model.document import Document
class CashFlowMapping(Document):
def validate(self):
self.validate_checked_options()
def validate_checked_options(self):
checked_fields = [
d for d in self.meta.fields if d.fieldtype == "Check" and self.get(d.fieldname) == 1
]
if len(checked_fields) > 1:
frappe.throw(
_("You can only select a maximum of one option from the list of check boxes."),
title=_("Error"),
)

View File

@@ -0,0 +1,28 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import unittest
import frappe
class TestCashFlowMapping(unittest.TestCase):
def setUp(self):
if frappe.db.exists("Cash Flow Mapping", "Test Mapping"):
frappe.delete_doc("Cash Flow Mappping", "Test Mapping")
def tearDown(self):
frappe.delete_doc("Cash Flow Mapping", "Test Mapping")
def test_multiple_selections_not_allowed(self):
doc = frappe.new_doc("Cash Flow Mapping")
doc.mapping_name = "Test Mapping"
doc.label = "Test label"
doc.append("accounts", {"account": "Accounts Receivable - _TC"})
doc.is_working_capital = 1
doc.is_finance_cost = 1
self.assertRaises(frappe.ValidationError, doc.insert)
doc.is_finance_cost = 0
doc.insert()

View File

@@ -0,0 +1,73 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "field:account",
"beta": 0,
"creation": "2018-02-08 09:25:34.353995",
"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": "account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"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-02-08 09:25:34.353995",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cash Flow Mapping Accounts",
"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

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

View File

@@ -0,0 +1,6 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Cash Flow Mapping Template', {
});

View File

@@ -0,0 +1,123 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2018-02-08 10:20:18.316801",
"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": "template_name",
"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": "Template 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": 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": "mapping",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cash Flow Mapping",
"length": 0,
"no_copy": 0,
"options": "Cash Flow Mapping Template Details",
"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": 0,
"max_attachments": 0,
"modified": "2018-02-08 10:20:18.316801",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cash Flow Mapping Template",
"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
}
],
"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

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

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import unittest
class TestCashFlowMappingTemplate(unittest.TestCase):
pass

View File

@@ -0,0 +1,6 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Cash Flow Mapping Template Details', {
});

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