Compare commits

...

107 Commits

Author SHA1 Message Date
Frappe PR Bot
37a7da3371 chore(release): Bumped to Version 14.70.13
## [14.70.13](https://github.com/frappe/erpnext/compare/v14.70.12...v14.70.13) (2024-07-31)

### Bug Fixes

* builtins.KeyError: ('ABC', 'Store - CP') (backport [#42505](https://github.com/frappe/erpnext/issues/42505)) ([#42508](https://github.com/frappe/erpnext/issues/42508)) ([0256c64](0256c64634))
* consider payment entries for checking if tds is deducted ([e7432fc](e7432fc60d))
* dynamic condition in the pricing rule not working (backport [#42467](https://github.com/frappe/erpnext/issues/42467)) ([#42543](https://github.com/frappe/erpnext/issues/42543)) ([53034c3](53034c332b))
* **gross profit:** incorrect valuation rate on different warehouses ([1a7efbb](1a7efbb654))
* ignore duplicates while creating default templates ([99bc8e8](99bc8e849c))
* incorrect cost_center on AR/AP report ([0e2abbd](0e2abbd08e))
* keep status as In Progress for RIV for Timeout Error (backport [#42274](https://github.com/frappe/erpnext/issues/42274)) ([#42504](https://github.com/frappe/erpnext/issues/42504)) ([8e8d0c7](8e8d0c7bd0))
* parenttype in item wise purchase and sales register ([97f2e88](97f2e88f4c))
* performance issue for the report Purchase Order Analysis report (backport [#42503](https://github.com/frappe/erpnext/issues/42503)) ([#42506](https://github.com/frappe/erpnext/issues/42506)) ([f42f1bb](f42f1bb35f))
* price_list_currency not found error (backport [#42534](https://github.com/frappe/erpnext/issues/42534)) ([#42538](https://github.com/frappe/erpnext/issues/42538)) ([3ba6f40](3ba6f40063))
* warehouse filter in Product Bundle Balance (backport [#42532](https://github.com/frappe/erpnext/issues/42532)) ([#42536](https://github.com/frappe/erpnext/issues/42536)) ([0441984](0441984405))
2024-07-31 06:00:37 +00:00
ruthra kumar
81c362dbe4 Merge pull request #42542 from frappe/version-14-hotfix
chore: release v14
2024-07-31 11:29:23 +05:30
mergify[bot]
53034c332b fix: dynamic condition in the pricing rule not working (backport #42467) (#42543)
fix: dynamic condition in the pricing rule not working (#42467)

(cherry picked from commit 0e817f42ef)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-30 17:01:24 +05:30
mergify[bot]
0441984405 fix: warehouse filter in Product Bundle Balance (backport #42532) (#42536)
fix: warehouse filter in Product Bundle Balance (#42532)

(cherry picked from commit 0ecfa709d8)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-30 14:53:31 +05:30
mergify[bot]
3ba6f40063 fix: price_list_currency not found error (backport #42534) (#42538)
fix: price_list_currency not found error (#42534)

(cherry picked from commit 23fed831a0)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-30 14:52:45 +05:30
mergify[bot]
8e8d0c7bd0 fix: keep status as In Progress for RIV for Timeout Error (backport #42274) (#42504)
* fix: keep status as In Progress for RIV for Timeout Error (#42274)

(cherry picked from commit 10280d6140)

# Conflicts:
#	erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-30 14:25:51 +05:30
mergify[bot]
f42f1bb35f fix: performance issue for the report Purchase Order Analysis report (backport #42503) (#42506)
* fix: performance issue for the report Purchase Order Analysis report (#42503)

(cherry picked from commit cb522f8f22)

# Conflicts:
#	erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-30 14:25:23 +05:30
mergify[bot]
0256c64634 fix: builtins.KeyError: ('ABC', 'Store - CP') (backport #42505) (#42508)
fix: builtins.KeyError: ('ABC', 'Store - CP') (#42505)

(cherry picked from commit 25dac1f18e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-30 14:25:01 +05:30
ruthra kumar
e4f583d25a Merge pull request #42529 from frappe/mergify/bp/version-14-hotfix/pr-42528
chore: button name should reflect what it creates (backport #42528)
2024-07-30 12:12:32 +05:30
ruthra kumar
7259c0fe30 chore: button name should reflect what it creates
(cherry picked from commit 0b6e7f83cd)
2024-07-30 06:31:17 +00:00
ruthra kumar
02547115e5 Merge pull request #42335 from frappe/mergify/bp/version-14-hotfix/pr-42330
fix: incorrect valuation rate for items from different warehouses in Gross Profit (backport #42330)
2024-07-29 10:17:04 +05:30
ruthra kumar
0bc9825238 Merge pull request #42491 from frappe/mergify/bp/version-14-hotfix/pr-42477
fix: incorrect cost_center on AR/AP report (backport #42477)
2024-07-26 20:10:43 +05:30
ruthra kumar
bb66126dfa test: invoice cost center reported in AR/AP report
(cherry picked from commit 9a0894fd65)
2024-07-26 14:14:32 +00:00
ruthra kumar
0e2abbd08e fix: incorrect cost_center on AR/AP report
(cherry picked from commit 3e19041fa3)
2024-07-26 14:14:32 +00:00
Smit Vora
ff78fab176 Merge pull request #42483 from frappe/mergify/bp/version-14-hotfix/pr-42305
fix: consider payment entries for checking if tds is deducted (backport #42305)
2024-07-26 15:17:05 +05:30
Smit Vora
04840762dd Merge pull request #42481 from frappe/mergify/bp/version-14-hotfix/pr-42444
fix: parenttype in purchase and sales item query (backport #42444)
2024-07-26 15:16:44 +05:30
ljain112
e7432fc60d fix: consider payment entries for checking if tds is deducted
(cherry picked from commit 40b59de4cd)
2024-07-26 09:11:50 +00:00
ljain112
97f2e88f4c fix: parenttype in item wise purchase and sales register
(cherry picked from commit 35981b8730)
2024-07-26 08:56:42 +00:00
ruthra kumar
37f24ae763 Merge pull request #42473 from frappe/mergify/bp/version-14-hotfix/pr-42472
refactor: index on Purchase Invoice 'release_date' (backport #42472)
2024-07-25 21:51:16 +05:30
ruthra kumar
25b9127bae refactor: index on Purchase Invoice 'release_date'
(cherry picked from commit 764dd12b10)
2024-07-25 15:57:59 +00:00
ruthra kumar
6e74e6f314 Merge pull request #42464 from frappe/mergify/bp/version-14-hotfix/pr-42462
refactor: provision for re-evaluating Exchange Rates in monthly frequency (backport #42462)
2024-07-24 22:11:22 +05:30
ruthra kumar
240118ee8b chore: resolve conflict 2024-07-24 18:48:32 +05:30
ruthra kumar
c1fd95ac66 refactor: hooks for monthly re-evaluation jobs
(cherry picked from commit fc4e5f165c)

# Conflicts:
#	erpnext/hooks.py
2024-07-24 13:15:15 +00:00
ruthra kumar
8e340bb7fd refactor: provision for monthly re-evaluation
(cherry picked from commit ce2b9e0f1a)

# Conflicts:
#	erpnext/setup/doctype/company/company.json
#	erpnext/setup/doctype/company/company.py
2024-07-24 13:15:15 +00:00
ruthra kumar
96a6172999 Merge pull request #42455 from frappe/mergify/bp/version-14-hotfix/pr-42390
refactor: cleaning up stale code related to reposting (backport #42390)
2024-07-24 17:35:24 +05:30
Smit Vora
d0d587432d Merge pull request #42439 from frappe/mergify/bp/version-14-hotfix/pr-42377
fix: ignore duplicates while creating default templates (backport #42377)
2024-07-24 14:25:46 +05:30
ruthra kumar
07509b5e99 chore: resolve conflicts 2024-07-24 13:07:15 +05:30
ruthra kumar
99d5b6dc71 chore: resolve conflicts 2024-07-24 13:04:57 +05:30
ruthra kumar
56b1582027 refactor(test): remove assert on 'repost_required'
(cherry picked from commit e71cb4eab7)
2024-07-24 07:29:10 +00:00
ruthra kumar
149109649d refactor: remove attribute check on 'repost_required'
(cherry picked from commit 07fc952a43)

# Conflicts:
#	erpnext/accounts/doctype/journal_entry/journal_entry.py
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.py
2024-07-24 07:29:09 +00:00
ruthra kumar
0284328e2c refactor: repost without checking on flag
(cherry picked from commit 09f429ffba)
2024-07-24 07:29:09 +00:00
ruthra kumar
a243873ab0 chore: remove stale UI code related to repost
(cherry picked from commit fe46e1d089)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
2024-07-24 07:29:09 +00:00
ruthra kumar
197e043fc9 chore: remove 'repost_required' from Journal Entry
(cherry picked from commit e81373bb6a)

# Conflicts:
#	erpnext/accounts/doctype/journal_entry/journal_entry.json
#	erpnext/accounts/doctype/journal_entry/journal_entry.py
2024-07-24 07:29:09 +00:00
ruthra kumar
925a164101 chore: remove 'repost_required' from purchase invoice
(cherry picked from commit a467888a67)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
2024-07-24 07:29:08 +00:00
ruthra kumar
8f1a4b9717 chore: remove stale 'repost_required' flag from sales invoice
(cherry picked from commit 06c5334f2a)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.py
2024-07-24 07:29:08 +00:00
ruthra kumar
67d4020241 chore: remove stale code from sales invoice
(cherry picked from commit f3fda9ce98)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.js
2024-07-24 07:29:08 +00:00
Frappe PR Bot
fe4b2e36cc chore(release): Bumped to Version 14.70.12
## [14.70.12](https://github.com/frappe/erpnext/compare/v14.70.11...v14.70.12) (2024-07-24)

### Bug Fixes

* missing cr/dr notes on payment reconciliation ([90ee21f](90ee21f868))
* remove proprietorship and update it with individual (backport [#42307](https://github.com/frappe/erpnext/issues/42307)) ([8c1f619](8c1f6196b8))
* set pos data if not return doc ([6ecb064](6ecb064264))
* Show the rows in AR/AP report where outstanding equals to 0.01 ([2936988](2936988cc6))
2024-07-24 07:26:52 +00:00
ruthra kumar
6759b90f85 Merge pull request #42448 from frappe/version-14-hotfix
chore: release v14
2024-07-24 12:55:36 +05:30
Smit Vora
99bc8e849c fix: ignore duplicates while creating default templates
(cherry picked from commit cf55c2ab3d)
2024-07-23 04:56:31 +00:00
ruthra kumar
7a25d33547 Merge pull request #42408 from frappe/mergify/bp/version-14-hotfix/pr-42407
test: basic test case for item-wise purchase register (backport #42407)
2024-07-21 20:08:19 +05:30
ruthra kumar
2466e28bf5 test: basic test case for item-wise purchase register
(cherry picked from commit c3c5d3f615)
2024-07-19 11:21:08 +00:00
ruthra kumar
1096528bb9 Merge pull request #42401 from frappe/mergify/bp/version-14-hotfix/pr-42386
fix: set pos data if not return doc (backport #42386)
2024-07-19 10:57:20 +05:30
ljain112
6ecb064264 fix: set pos data if not return doc
(cherry picked from commit 65d672da65)
2024-07-19 04:56:26 +00:00
ruthra kumar
92300b27c9 Merge pull request #42384 from frappe/mergify/bp/version-14-hotfix/pr-42374
fix: Show the rows in AR/AP report where outstanding equals to 0.01 (backport #42374)
2024-07-18 15:08:55 +05:30
ruthra kumar
4fa9626de0 chore: resolve conflict 2024-07-18 14:41:09 +05:30
ruthra kumar
9b828b829a test: AR/AP report on miniscule outstanding
(cherry picked from commit bb9e42cce2)
2024-07-18 08:15:39 +00:00
Nabin Hait
2936988cc6 fix: Show the rows in AR/AP report where outstanding equals to 0.01
(cherry picked from commit e1dedc5402)

# Conflicts:
#	erpnext/patches.txt
2024-07-18 08:15:38 +00:00
ruthra kumar
9fca232578 Merge pull request #42382 from frappe/mergify/bp/version-14-hotfix/pr-42369
fix: missing cr/dr notes on payment reconciliation (backport #42369)
2024-07-18 13:43:36 +05:30
ruthra kumar
fac22e93d0 chore: resolve conflict 2024-07-18 12:44:34 +05:30
ruthra kumar
3109efaf09 test: payment filter should not affect dr/cr notes
(cherry picked from commit 2d686c06ea)

# Conflicts:
#	erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py
2024-07-18 07:12:45 +00:00
ruthra kumar
90ee21f868 fix: missing cr/dr notes on payment reconciliation
(cherry picked from commit a30af68e9e)
2024-07-18 07:12:45 +00:00
Smit Vora
36c46bb344 Merge pull request #42366 from vorasmit/update-prop-backport
fix: remove redundant proprietorship field from customer type and supplier type (backport #42307)
2024-07-17 18:55:40 +05:30
Sanket322
8c1f6196b8 fix: remove proprietorship and update it with individual (backport #42307) 2024-07-17 14:03:52 +05:30
Frappe PR Bot
12a31de25a chore(release): Bumped to Version 14.70.11
## [14.70.11](https://github.com/frappe/erpnext/compare/v14.70.10...v14.70.11) (2024-07-17)

### Bug Fixes

* missing discount on POS Credit Notes ([ac48c3d](ac48c3d4e7))
2024-07-17 05:11:39 +00:00
ruthra kumar
3b9400755e Merge pull request #42353 from frappe/version-14-hotfix
chore: release v14
2024-07-17 10:40:24 +05:30
ruthra kumar
2ce7300c3c Merge pull request #42337 from frappe/mergify/bp/version-14-hotfix/pr-42294
refactor: make reposting implicit (backport #42294)
2024-07-15 15:41:23 +05:30
ruthra kumar
b96b3b51b6 chore: resolve conflicts 2024-07-15 15:22:06 +05:30
ruthra kumar
8f03769bf2 chore: contextual comments
(cherry picked from commit 794a62aecb)
2024-07-15 09:41:56 +00:00
ruthra kumar
d20f3ab492 refactor(test): reposting happens implicitly
(cherry picked from commit c283cda169)
2024-07-15 09:41:56 +00:00
ruthra kumar
980ca1d8c5 refactor(test): no need to assert repost_required flag
Reposting happens implicitly upon 'Update After Submit'

(cherry picked from commit 8f135e9859)

# Conflicts:
#	erpnext/accounts/doctype/journal_entry/test_journal_entry.py
2024-07-15 09:41:56 +00:00
ruthra kumar
4668a2d7d8 refactor: make reposting implicit
(cherry picked from commit 722ef92324)

# Conflicts:
#	erpnext/accounts/doctype/journal_entry/journal_entry.py
2024-07-15 09:41:56 +00:00
ruthra kumar
1a7efbb654 fix(gross profit): incorrect valuation rate on different warehouses
(cherry picked from commit f9d2dd0a62)
2024-07-15 08:50:15 +00:00
ruthra kumar
ccc2a47e73 Merge pull request #42290 from frappe/mergify/bp/version-14-hotfix/pr-42192
refactor: tests for item wise sales register report (backport #42192)
2024-07-12 09:28:05 +05:30
ruthra kumar
f98716cc2a refactor(test): clear old records 2024-07-11 21:03:29 +05:30
ruthra kumar
7903e8d669 refactor(test): use each instance UOM for assertion
(cherry picked from commit cf4fbfb601)
2024-07-11 12:34:13 +00:00
ruthra kumar
9a50a0a129 refactor: test suite for item-wise sales register
(cherry picked from commit 3aaa22e672)
2024-07-11 12:34:12 +00:00
ruthra kumar
1646517dc4 chore: rename test suite for payable report
(cherry picked from commit 9474f72776)
2024-07-11 12:34:12 +00:00
ruthra kumar
38811e792c Merge pull request #42288 from frappe/mergify/bp/version-14-hotfix/pr-42287
fix: missing discount on POS Credit Notes (backport #42287)
2024-07-11 17:33:26 +05:30
ruthra kumar
edfb408464 chore: resolve conflict 2024-07-11 17:31:20 +05:30
ruthra kumar
ac48c3d4e7 fix: missing discount on POS Credit Notes
(cherry picked from commit 1049550951)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.js
2024-07-11 11:58:57 +00:00
Frappe PR Bot
1d66b7e5a3 chore(release): Bumped to Version 14.70.10
## [14.70.10](https://github.com/frappe/erpnext/compare/v14.70.9...v14.70.10) (2024-07-10)

### Bug Fixes

* add missing german translations ([d5c1c62](d5c1c62622))
* empty item-wise sales/purchase register reports on initial load ([13895fa](13895fa060))
* fetch expence account from asset category ([4d6a71a](4d6a71ab4b))
* group by in item-wise purchase register ([62ad466](62ad466a3b))
* **Holiday List:** sort holidays on save to avoid disorienting the user (backport [#42236](https://github.com/frappe/erpnext/issues/42236)) ([#42251](https://github.com/frappe/erpnext/issues/42251)) ([fcf6500](fcf6500144))
* manual pick allow to pick more than available stock (backport [#42155](https://github.com/frappe/erpnext/issues/42155)) ([#42158](https://github.com/frappe/erpnext/issues/42158)) ([454e147](454e147592))
* multiple free items on same Item Group ([701dd9e](701dd9e19b))
* removed max discount validation for sales return ([4195c50](4195c50f02))
* stock qty validation in SCR (backport [#42124](https://github.com/frappe/erpnext/issues/42124)) ([#42224](https://github.com/frappe/erpnext/issues/42224)) ([e2f8e02](e2f8e02c73))
* tax on stock_rbnb on repost of Purchase Receipt ([106c154](106c154a16))
* **tds:** use doctype reference when mapping keys across multiple doctypes ([51cbbee](51cbbee4ca))
* updated logic for calculating tax_withholding_net_total in payment entry ([49e5066](49e50662b6))
* use standard method to get `_doc_before_save` ([9fde733](9fde7330e0))
2024-07-10 10:43:56 +00:00
ruthra kumar
ab9bde86f9 Merge pull request #42254 from frappe/version-14-hotfix
chore: release v14
2024-07-10 16:12:40 +05:30
ruthra kumar
5c75bb8775 Merge pull request #42271 from frappe/mergify/bp/version-14-hotfix/pr-42247
fix: don't merge tax into stock account on purchase receipt repost (backport #42247)
2024-07-10 15:52:00 +05:30
ruthra kumar
115a0123ed chore: resolve conflict 2024-07-10 15:30:24 +05:30
ruthra kumar
fdf1dfe46e test: tax account heads on PR report without LCV
(cherry picked from commit 9562628ed6)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
2024-07-10 09:58:30 +00:00
ruthra kumar
106c154a16 fix: tax on stock_rbnb on repost of Purchase Receipt
(cherry picked from commit 8633080dff)
2024-07-10 09:58:30 +00:00
Smit Vora
00e8b862dd Merge pull request #42264 from frappe/mergify/bp/version-14-hotfix/pr-42127
fix: removed max discount validation for sales return (backport #42127)
2024-07-10 15:22:51 +05:30
ljain112
4195c50f02 fix: removed max discount validation for sales return
(cherry picked from commit db807d433b)
2024-07-10 07:01:54 +00:00
Smit Vora
fdb8e5b379 Merge pull request #42262 from ljain112/fix-tds-backport
fix(tds): use doctype reference when mapping keys across multiple doctype (backport #42258)
2024-07-10 12:27:28 +05:30
ljain112
51cbbee4ca fix(tds): use doctype reference when mapping keys across multiple doctypes 2024-07-10 11:55:35 +05:30
Sagar Vora
5000c09759 Merge pull request #42261 from frappe/mergify/bp/version-14-hotfix/pr-42060
fix: updated logic for calculating tax_withholding_net_total in payment entry (backport #42060)
2024-07-10 11:24:31 +05:30
ljain112
49e50662b6 fix: updated logic for calculating tax_withholding_net_total in payment entry
(cherry picked from commit c8a34cde7f)
2024-07-10 05:53:37 +00:00
ruthra kumar
f2f1f32826 Merge pull request #42163 from frappe/mergify/bp/version-14-hotfix/pr-42162
refactor: remove obsolete function call (backport #42162)
2024-07-10 10:28:37 +05:30
mergify[bot]
fcf6500144 fix(Holiday List): sort holidays on save to avoid disorienting the user (backport #42236) (#42251)
* fix(Holiday List): sort holidays on save to avoid disorienting the user (#42236)

fix: sort holidays on save to avoid disorienting the user
(cherry picked from commit ad137250fc)

# Conflicts:
#	erpnext/setup/doctype/holiday_list/holiday_list.py

* chore: fix conflicts

---------

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2024-07-09 18:44:08 +05:30
Raffael Meyer
f2d5a69af4 Merge pull request #42237 from frappe/mergify/bp/version-14-hotfix/pr-42235
fix: add missing german translations (backport #42235)
2024-07-08 19:53:18 +02:00
barredterra
d5c1c62622 fix: add missing german translations
(cherry picked from commit 2f89461ace)
2024-07-08 17:51:41 +00:00
mergify[bot]
e2f8e02c73 fix: stock qty validation in SCR (backport #42124) (#42224)
* fix: stock qty validation in SCR (#42124)

(cherry picked from commit 99f2735ad3)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-08 17:06:23 +05:30
Frappe PR Bot
30cba7ee2c chore(release): Bumped to Version 14.70.9
## [14.70.9](https://github.com/frappe/erpnext/compare/v14.70.8...v14.70.9) (2024-07-05)

### Bug Fixes

* blank item-wise sales/purchase register reports on first load ([0f275a9](0f275a9ff0))
* group by in item-wise purchase register ([1840267](18402677da))
2024-07-05 02:47:14 +00:00
ruthra kumar
21a60c9927 Merge pull request #42190 from frappe/mergify/bp/version-14/pr-41975
fix: group by in item-wise purchase register (backport #41975)
2024-07-05 08:15:53 +05:30
ruthra kumar
0f275a9ff0 fix: blank item-wise sales/purchase register reports on first load 2024-07-05 07:50:37 +05:30
Nihantra C. Patel
18402677da fix: group by in item-wise purchase register
(cherry picked from commit 3fab00135b)
2024-07-05 02:05:26 +00:00
ruthra kumar
e9357c193d Merge pull request #42184 from frappe/mergify/bp/version-14-hotfix/pr-42183
fix: empty item-wise sales/purchase register reports on initial load (backport #42183)
2024-07-04 15:10:30 +05:30
ruthra kumar
13895fa060 fix: empty item-wise sales/purchase register reports on initial load
(cherry picked from commit ee862126e4)
2024-07-04 09:36:58 +00:00
ruthra kumar
64f8498576 Merge pull request #42180 from frappe/mergify/bp/version-14-hotfix/pr-41975
fix: group by in item-wise purchase register (backport #41975)
2024-07-04 14:59:50 +05:30
Nihantra C. Patel
62ad466a3b fix: group by in item-wise purchase register
(cherry picked from commit 3fab00135b)
2024-07-04 09:09:07 +00:00
Khushi Rawat
45899b3017 Merge pull request #42174 from khushi8112/fetch-expence-account-from-asset-category
fix: fetch expense account from asset category
2024-07-04 13:14:39 +05:30
ruthra kumar
d92a042bf7 Merge pull request #42172 from frappe/mergify/bp/version-14-hotfix/pr-42143
refactor: validation to prevent recursion with mixed conditions (backport #42143)
2024-07-04 09:20:35 +05:30
Khushi Rawat
4d6a71ab4b fix: fetch expence account from asset category 2024-07-04 01:45:01 +05:30
ruthra kumar
d5fa968078 chore: resolve conflicts 2024-07-03 20:59:27 +05:30
ruthra kumar
71cbebd31b test: validation on mixed condition and recursion on pricing rule
(cherry picked from commit eb4af58bf0)

# Conflicts:
#	erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py
2024-07-03 15:26:56 +00:00
ruthra kumar
99317768f6 test: validation on mixed condition with recursion
(cherry picked from commit 9bd4e7b709)

# Conflicts:
#	erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py
2024-07-03 15:26:56 +00:00
ruthra kumar
9fde7330e0 fix: use standard method to get _doc_before_save
(cherry picked from commit 9d7be293ae)
2024-07-03 15:26:56 +00:00
ruthra kumar
49fb6bec6a refactor: validation to prevent recursion with mixed conditions
(cherry picked from commit 406dfd528f)
2024-07-03 15:26:55 +00:00
ruthra kumar
0f1f5b6f3d Merge pull request #42169 from frappe/mergify/bp/version-14-hotfix/pr-42165
fix: multiple free items on same Item Group (backport #42165)
2024-07-03 20:55:34 +05:30
mergify[bot]
454e147592 fix: manual pick allow to pick more than available stock (backport #42155) (#42158)
* fix: manual pick allow to pick more than available stock (#42155)

(cherry picked from commit 938dd4b2aa)

# Conflicts:
#	erpnext/stock/doctype/pick_list/test_pick_list.py

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-03 19:28:18 +05:30
ruthra kumar
701dd9e19b fix: multiple free items on same Item Group
(cherry picked from commit c4ae0d283f)
2024-07-03 12:28:35 +00:00
Markus Lobedann
2cf82561f6 refactor: remove obsolete function call (#42162)
(cherry picked from commit 4512432816)
2024-07-03 10:22:23 +00:00
58 changed files with 805 additions and 215 deletions

View File

@@ -3,7 +3,7 @@ import inspect
import frappe
__version__ = "14.70.8"
__version__ = "14.70.13"
def get_default_company(user=None):

View File

@@ -557,7 +557,7 @@
"table_fieldname": "payment_entries"
}
],
"modified": "2023-11-23 12:11:04.128015",
"modified": "2024-07-18 15:32:29.413598",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",

View File

@@ -74,7 +74,6 @@ class PaymentEntry(AccountsController):
self.set_exchange_rate()
self.validate_mandatory()
self.validate_reference_documents()
self.set_tax_withholding()
self.set_amounts()
self.validate_amounts()
self.apply_taxes()
@@ -89,6 +88,7 @@ class PaymentEntry(AccountsController):
self.validate_allocated_amount()
self.validate_paid_invoices()
self.ensure_supplier_is_not_blocked()
self.set_tax_withholding()
self.set_status()
def on_submit(self):
@@ -674,9 +674,7 @@ class PaymentEntry(AccountsController):
if not self.apply_tax_withholding_amount:
return
order_amount = self.get_order_net_total()
net_total = flt(order_amount) + flt(self.unallocated_amount)
net_total = self.calculate_tax_withholding_net_total()
# Adding args as purchase invoice to get TDS amount
args = frappe._dict(
@@ -720,7 +718,26 @@ class PaymentEntry(AccountsController):
for d in to_remove:
self.remove(d)
def get_order_net_total(self):
def calculate_tax_withholding_net_total(self):
net_total = 0
order_details = self.get_order_wise_tax_withholding_net_total()
for d in self.references:
tax_withholding_net_total = order_details.get(d.reference_name)
if not tax_withholding_net_total:
continue
net_taxable_outstanding = max(
0, d.outstanding_amount - (d.total_amount - tax_withholding_net_total)
)
net_total += min(net_taxable_outstanding, d.allocated_amount)
net_total += self.unallocated_amount
return net_total
def get_order_wise_tax_withholding_net_total(self):
if self.party_type == "Supplier":
doctype = "Purchase Order"
else:
@@ -728,12 +745,15 @@ class PaymentEntry(AccountsController):
docnames = [d.reference_name for d in self.references if d.reference_doctype == doctype]
tax_withholding_net_total = frappe.db.get_value(
doctype, {"name": ["in", docnames]}, ["sum(base_tax_withholding_net_total)"]
return frappe._dict(
frappe.db.get_all(
doctype,
filters={"name": ["in", docnames]},
fields=["name", "base_tax_withholding_net_total"],
as_list=True,
)
)
return tax_withholding_net_total
def apply_taxes(self):
self.initialize_taxes()
self.determine_exclusive_rate()

View File

@@ -36,7 +36,7 @@ frappe.ui.form.on("Payment Order", {
// payment Entry
if (frm.doc.docstatus === 1 && frm.doc.payment_order_type === "Payment Request") {
frm.add_custom_button(__("Create Payment Entries"), function () {
frm.add_custom_button(__("Create Journal Entries"), function () {
frm.trigger("make_payment_records");
});
}

View File

@@ -200,6 +200,7 @@ class PaymentReconciliation(Document):
conditions.append(doc.docstatus == 1)
conditions.append(doc[frappe.scrub(self.party_type)] == self.party)
conditions.append(doc.is_return == 1)
conditions.append(doc.outstanding_amount != 0)
if self.payment_name:
conditions.append(doc.name.like(f"%{self.payment_name}%"))

View File

@@ -1335,6 +1335,46 @@ class TestPaymentReconciliation(FrappeTestCase):
# Should not raise frappe.exceptions.ValidationError: Payment Entry has been modified after you pulled it. Please pull it again.
pr.reconcile()
def test_cr_note_payment_limit_filter(self):
transaction_date = nowdate()
amount = 100
for _ in range(6):
self.create_sales_invoice(qty=1, rate=amount, posting_date=transaction_date)
cr_note = self.create_sales_invoice(
qty=-1, rate=amount, posting_date=transaction_date, do_not_save=True, do_not_submit=True
)
cr_note.is_return = 1
cr_note = cr_note.save().submit()
pr = self.create_payment_reconciliation()
pr.get_unreconciled_entries()
self.assertEqual(len(pr.invoices), 6)
self.assertEqual(len(pr.payments), 6)
invoices = [x.as_dict() for x in pr.get("invoices")]
payments = [x.as_dict() for x in pr.get("payments")]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
pr.reconcile()
pr.get_unreconciled_entries()
self.assertEqual(pr.get("invoices"), [])
self.assertEqual(pr.get("payments"), [])
self.create_sales_invoice(qty=1, rate=amount, posting_date=transaction_date)
cr_note = self.create_sales_invoice(
qty=-1, rate=amount, posting_date=transaction_date, do_not_save=True, do_not_submit=True
)
cr_note.is_return = 1
cr_note = cr_note.save().submit()
# Limit should not affect in fetching the unallocated cr_note
pr.invoice_limit = 5
pr.payment_limit = 5
pr.get_unreconciled_entries()
self.assertEqual(len(pr.invoices), 1)
self.assertEqual(len(pr.payments), 1)
def make_customer(customer_name, currency=None):
if not frappe.db.exists("Customer", customer_name):

View File

@@ -31,6 +31,7 @@ class PricingRule(Document):
self.validate_price_list_with_currency()
self.validate_dates()
self.validate_condition()
self.validate_mixed_with_recursion()
if not self.margin_type:
self.margin_rate_or_amount = 0.0
@@ -201,6 +202,10 @@ class PricingRule(Document):
):
frappe.throw(_("Invalid condition expression"))
def validate_mixed_with_recursion(self):
if self.mixed_conditions and self.is_recursive:
frappe.throw(_("Recursive Discounts with Mixed condition is not supported by the system"))
# --------------------------------------------------------------------------------

View File

@@ -1087,6 +1087,18 @@ class TestPricingRule(unittest.TestCase):
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 1")
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 2")
def test_validation_on_mixed_condition_with_recursion(self):
pricing_rule = make_pricing_rule(
discount_percentage=10,
selling=1,
priority=2,
min_qty=4,
title="_Test Pricing Rule with Min Qty - 2",
)
pricing_rule.mixed_conditions = True
pricing_rule.is_recursive = True
self.assertRaises(frappe.ValidationError, pricing_rule.save)
test_dependencies = ["Campaign"]

View File

@@ -77,6 +77,7 @@ class PromotionalScheme(Document):
self.validate_applicable_for()
self.validate_pricing_rules()
self.validate_mixed_with_recursion()
def validate_applicable_for(self):
if self.applicable_for:
@@ -94,7 +95,7 @@ class PromotionalScheme(Document):
docnames = []
# If user has changed applicable for
if self._doc_before_save.applicable_for == self.applicable_for:
if self.get_doc_before_save() and self.get_doc_before_save().applicable_for == self.applicable_for:
return
docnames = frappe.get_all("Pricing Rule", filters={"promotional_scheme": self.name})
@@ -108,6 +109,7 @@ class PromotionalScheme(Document):
frappe.delete_doc("Pricing Rule", docname.name)
def on_update(self):
self.validate()
pricing_rules = (
frappe.get_all(
"Pricing Rule",
@@ -119,6 +121,15 @@ class PromotionalScheme(Document):
)
self.update_pricing_rules(pricing_rules)
def validate_mixed_with_recursion(self):
if self.mixed_conditions:
if self.product_discount_slabs:
for slab in self.product_discount_slabs:
if slab.is_recursive:
frappe.throw(
_("Recursive Discounts with Mixed condition is not supported by the system")
)
def update_pricing_rules(self, pricing_rules):
rules = {}
count = 0

View File

@@ -107,6 +107,25 @@ class TestPromotionalScheme(unittest.TestCase):
price_rules = frappe.get_all("Pricing Rule", filters={"promotional_scheme": ps.name})
self.assertEqual(price_rules, [])
def test_validation_on_recurse_with_mixed_condition(self):
ps = make_promotional_scheme()
ps.set("price_discount_slabs", [])
ps.set(
"product_discount_slabs",
[
{
"rule_description": "12+1",
"min_qty": 12,
"free_item": "_Test Item 2",
"free_qty": 1,
"is_recursive": 1,
"recurse_for": 12,
}
],
)
ps.mixed_conditions = True
self.assertRaises(frappe.ValidationError, ps.save)
def make_promotional_scheme(**args):
args = frappe._dict(args)

View File

@@ -59,25 +59,6 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
this.show_stock_ledger();
}
if (this.frm.doc.repost_required && this.frm.doc.docstatus===1) {
this.frm.set_intro(__("Accounting entries for this invoice need to be reposted. Please click on 'Repost' button to update."));
this.frm.add_custom_button(__('Repost Accounting Entries'),
() => {
this.frm.call({
doc: this.frm.doc,
method: 'repost_accounting_entries',
freeze: true,
freeze_message: __('Reposting...'),
callback: (r) => {
if (!r.exc) {
frappe.msgprint(__('Accounting Entries are reposted.'));
me.frm.refresh();
}
}
});
}).removeClass('btn-default').addClass('btn-warning');
}
if(!doc.is_return && doc.docstatus == 1 && doc.outstanding_amount != 0){
if(doc.on_hold) {
this.frm.add_custom_button(

View File

@@ -170,7 +170,6 @@
"against_expense_account",
"column_break_63",
"unrealized_profit_loss_account",
"repost_required",
"subscription_section",
"auto_repeat",
"update_auto_repeat_reference",
@@ -361,7 +360,8 @@
"description": "Once set, this invoice will be on hold till the set date",
"fieldname": "release_date",
"fieldtype": "Date",
"label": "Release Date"
"label": "Release Date",
"search_index": 1
},
{
"fieldname": "cb_17",
@@ -1590,15 +1590,6 @@
"fieldtype": "Check",
"label": "Use Company Default Round Off Cost Center"
},
{
"default": "0",
"fieldname": "repost_required",
"fieldtype": "Check",
"hidden": 1,
"label": "Repost Required",
"options": "Account",
"read_only": 1
},
{
"default": "0",
"fieldname": "use_transaction_date_exchange_rate",
@@ -1619,7 +1610,7 @@
"idx": 204,
"is_submittable": 1,
"links": [],
"modified": "2024-03-20 15:57:00.736868",
"modified": "2024-07-25 19:42:36.931278",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",

View File

@@ -590,17 +590,17 @@ class PurchaseInvoice(BuyingController):
self.process_common_party_accounting()
def on_update_after_submit(self):
if hasattr(self, "repost_required"):
fields_to_check = [
"cash_bank_account",
"write_off_account",
"unrealized_profit_loss_account",
]
child_tables = {"items": ("expense_account",), "taxes": ("account_head",)}
self.needs_repost = self.check_if_fields_updated(fields_to_check, child_tables)
if self.needs_repost:
self.validate_for_repost()
self.db_set("repost_required", self.needs_repost)
fields_to_check = [
"cash_bank_account",
"write_off_account",
"unrealized_profit_loss_account",
"is_opening",
]
child_tables = {"items": ("expense_account",), "taxes": ("account_head",)}
self.needs_repost = self.check_if_fields_updated(fields_to_check, child_tables)
if self.needs_repost:
self.validate_for_repost()
self.repost_accounting_entries()
def make_gl_entries(self, gl_entries=None, from_repost=False):
update_outstanding = "No" if (cint(self.is_paid) or self.write_off_account) else "Yes"
@@ -1498,6 +1498,9 @@ class PurchaseInvoice(BuyingController):
self.db_set("release_date", None)
def set_tax_withholding(self):
self.set("advance_tax", [])
self.set("tax_withheld_vouchers", [])
if not self.apply_tds:
return
@@ -1539,8 +1542,6 @@ class PurchaseInvoice(BuyingController):
self.remove(d)
## Add pending vouchers on which tax was withheld
self.set("tax_withheld_vouchers", [])
for voucher_no, voucher_details in voucher_wise_amount.items():
self.append(
"tax_withheld_vouchers",
@@ -1555,7 +1556,6 @@ class PurchaseInvoice(BuyingController):
self.calculate_taxes_and_totals()
def allocate_advance_tds(self, tax_withholding_details, advance_taxes):
self.set("advance_tax", [])
for tax in advance_taxes:
allocated_amount = 0
pending_amount = flt(tax.tax_amount - tax.allocated_amount)

View File

@@ -1908,18 +1908,15 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
check_gl_entries(self, pi.name, expected_gle, nowdate())
pi.items[0].expense_account = "Service - _TC"
# Ledger reposted implicitly upon 'Update After Submit'
pi.save()
pi.load_from_db()
self.assertTrue(pi.repost_required)
pi.repost_accounting_entries()
expected_gle = [
["Creditors - _TC", 0.0, 1000, nowdate()],
["Service - _TC", 1000, 0.0, nowdate()],
]
check_gl_entries(self, pi.name, expected_gle, nowdate())
pi.load_from_db()
self.assertFalse(pi.repost_required)
def test_default_cost_center_for_purchase(self):
from erpnext.accounts.doctype.cost_center.test_cost_center import create_cost_center

View File

@@ -49,25 +49,6 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
this.frm.toggle_reqd("due_date", !this.frm.doc.is_return);
if (this.frm.doc.repost_required && this.frm.doc.docstatus===1) {
this.frm.set_intro(__("Accounting entries for this invoice needs to be reposted. Please click on 'Repost' button to update."));
this.frm.add_custom_button(__('Repost Accounting Entries'),
() => {
this.frm.call({
doc: this.frm.doc,
method: 'repost_accounting_entries',
freeze: true,
freeze_message: __('Reposting...'),
callback: (r) => {
if (!r.exc) {
frappe.msgprint(__('Accounting Entries are reposted'));
me.frm.refresh();
}
}
});
}).removeClass('btn-default').addClass('btn-warning');
}
if (this.frm.doc.is_return) {
this.frm.return_print_format = "Sales Invoice Return";
}
@@ -428,12 +409,16 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
frappe.msgprint(__("Please specify Company to proceed"));
} else {
var me = this;
const for_validate = me.frm.doc.is_return ? true : false;
return this.frm.call({
doc: me.frm.doc,
method: "set_missing_values",
callback: function(r) {
if(!r.exc) {
if(r.message && r.message.print_format) {
args: {
for_validate: for_validate,
},
callback: function (r) {
if (!r.exc) {
if (r.message && r.message.print_format) {
me.frm.pos_print_format = r.message.print_format;
}
me.frm.trigger("update_stock");

View File

@@ -213,7 +213,6 @@
"is_internal_customer",
"is_discounted",
"remarks",
"repost_required",
"connections_tab"
],
"fields": [
@@ -2184,7 +2183,7 @@
"link_fieldname": "consolidated_invoice"
}
],
"modified": "2024-05-08 18:02:28.549041",
"modified": "2024-07-18 15:30:39.428519",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@@ -385,7 +385,6 @@ class SalesInvoice(SellingController):
self.repost_future_sle_and_gle()
self.db_set("status", "Cancelled")
self.db_set("repost_required", 0)
if frappe.db.get_single_value("Selling Settings", "sales_update_frequency") == "Each Transaction":
update_company_current_month_sales(self.company)
@@ -532,23 +531,23 @@ class SalesInvoice(SellingController):
data.sales_invoice = sales_invoice
def on_update_after_submit(self):
if hasattr(self, "repost_required"):
fields_to_check = [
"additional_discount_account",
"cash_bank_account",
"account_for_change_amount",
"write_off_account",
"loyalty_redemption_account",
"unrealized_profit_loss_account",
]
child_tables = {
"items": ("income_account", "expense_account", "discount_account"),
"taxes": ("account_head",),
}
self.needs_repost = self.check_if_fields_updated(fields_to_check, child_tables)
if self.needs_repost:
self.validate_for_repost()
self.db_set("repost_required", self.needs_repost)
fields_to_check = [
"additional_discount_account",
"cash_bank_account",
"account_for_change_amount",
"write_off_account",
"loyalty_redemption_account",
"unrealized_profit_loss_account",
"is_opening",
]
child_tables = {
"items": ("income_account", "expense_account", "discount_account"),
"taxes": ("account_head",),
}
self.needs_repost = self.check_if_fields_updated(fields_to_check, child_tables)
if self.needs_repost:
self.validate_for_repost()
self.repost_accounting_entries()
def set_paid_amount(self):
paid_amount = 0.0

View File

@@ -2884,13 +2884,9 @@ class TestSalesInvoice(FrappeTestCase):
si.items[0].income_account = "Service - _TC"
si.additional_discount_account = "_Test Account Sales - _TC"
si.taxes[0].account_head = "TDS Payable - _TC"
# Ledger reposted implicitly upon 'Update After Submit'
si.save()
si.load_from_db()
self.assertTrue(si.repost_required)
si.repost_accounting_entries()
expected_gle = [
["_Test Account Sales - _TC", 22.0, 0.0, nowdate()],
["Debtors - _TC", 88, 0.0, nowdate()],
@@ -2900,9 +2896,6 @@ class TestSalesInvoice(FrappeTestCase):
check_gl_entries(self, si.name, expected_gle, add_days(nowdate(), -1))
si.load_from_db()
self.assertFalse(si.repost_required)
def test_asset_depreciation_on_sale_with_pro_rata(self):
"""
Tests if an Asset set to depreciate yearly on June 30, that gets sold on Sept 30, creates an additional depreciation entry on its date of sale.

View File

@@ -236,6 +236,11 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N
vouchers, voucher_wise_amount = get_invoice_vouchers(
parties, tax_details, inv.company, party_type=party_type
)
payment_entry_vouchers = get_payment_entry_vouchers(
parties, tax_details, inv.company, party_type=party_type
)
advance_vouchers = get_advance_vouchers(
parties,
company=inv.company,
@@ -243,7 +248,8 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N
to_date=tax_details.to_date,
party_type=party_type,
)
taxable_vouchers = vouchers + advance_vouchers
taxable_vouchers = vouchers + advance_vouchers + payment_entry_vouchers
tax_deducted_on_advances = 0
if inv.doctype == "Purchase Invoice":
@@ -355,6 +361,20 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"):
return vouchers, voucher_wise_amount
def get_payment_entry_vouchers(parties, tax_details, company, party_type="Supplier"):
payment_entry_filters = {
"party_type": party_type,
"party": ("in", parties),
"docstatus": 1,
"apply_tax_withholding_amount": 1,
"posting_date": ["between", (tax_details.from_date, tax_details.to_date)],
"tax_withholding_category": tax_details.get("tax_withholding_category"),
"company": company,
}
return frappe.db.get_all("Payment Entry", filters=payment_entry_filters, pluck="name")
def get_advance_vouchers(parties, company=None, from_date=None, to_date=None, party_type="Supplier"):
"""
Use Payment Ledger to fetch unallocated Advance Payments

View File

@@ -7,7 +7,7 @@ from erpnext.accounts.report.accounts_payable.accounts_payable import execute
from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase):
class TestAccountsPayable(AccountsTestMixin, FrappeTestCase):
def setUp(self):
self.create_company()
self.create_customer()

View File

@@ -139,6 +139,7 @@ class ReceivablePayableReport:
paid_in_account_currency=0.0,
credit_note_in_account_currency=0.0,
outstanding_in_account_currency=0.0,
cost_center=ple.cost_center,
)
self.get_invoices(ple)
@@ -253,7 +254,7 @@ class ReceivablePayableReport:
row.paid -= amount
row.paid_in_account_currency -= amount_in_account_currency
if ple.cost_center:
if not row.cost_center and ple.cost_center:
row.cost_center = str(ple.cost_center)
def update_sub_total_row(self, row, party):
@@ -288,13 +289,13 @@ class ReceivablePayableReport:
must_consider = False
if self.filters.get("for_revaluation_journals"):
if (abs(row.outstanding) > 0.0 / 10**self.currency_precision) or (
abs(row.outstanding_in_account_currency) > 0.0 / 10**self.currency_precision
if (abs(row.outstanding) >= 0.0 / 10**self.currency_precision) or (
abs(row.outstanding_in_account_currency) >= 0.0 / 10**self.currency_precision
):
must_consider = True
else:
if (abs(row.outstanding) > 1.0 / 10**self.currency_precision) and (
(abs(row.outstanding_in_account_currency) > 1.0 / 10**self.currency_precision)
if (abs(row.outstanding) >= 1.0 / 10**self.currency_precision) and (
(abs(row.outstanding_in_account_currency) >= 1.0 / 10**self.currency_precision)
or (row.voucher_no in self.err_journals)
):
must_consider = True

View File

@@ -53,11 +53,13 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase):
si = si.submit()
return si
def create_payment_entry(self, docname):
def create_payment_entry(self, docname, do_not_submit=False):
pe = get_payment_entry("Sales Invoice", docname, bank_account=self.cash, party_amount=40)
pe.paid_from = self.debit_to
pe.insert()
pe.submit()
if not do_not_submit:
pe.submit()
return pe
def create_credit_note(self, docname, do_not_submit=False):
credit_note = create_sales_invoice(
@@ -955,3 +957,69 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase):
self.assertEqual(
expected_data, [row.invoiced, row.outstanding, row.remaining_balance, row.future_amount]
)
def test_accounts_receivable_output_for_minor_outstanding(self):
"""
AR/AP should report miniscule outstanding of 0.01. Or else there will be slight difference with General Ledger/Trial Balance
"""
filters = {
"company": self.company,
"report_date": today(),
"range1": 30,
"range2": 60,
"range3": 90,
"range4": 120,
}
# check invoice grand total and invoiced column's value for 3 payment terms
si = self.create_sales_invoice(no_payment_schedule=True)
pe = get_payment_entry("Sales Invoice", si.name, bank_account=self.cash, party_amount=99.99)
pe.paid_from = self.debit_to
pe.save().submit()
report = execute(filters)
expected_data_after_payment = [100, 100, 99.99, 0.01]
self.assertEqual(len(report[1]), 1)
row = report[1][0]
self.assertEqual(
expected_data_after_payment,
[row.invoice_grand_total, row.invoiced, row.paid, row.outstanding],
)
def test_cost_center_on_report_output(self):
filters = {
"company": self.company,
"report_date": today(),
"range1": 30,
"range2": 60,
"range3": 90,
"range4": 120,
}
# check invoice grand total and invoiced column's value for 3 payment terms
si = self.create_sales_invoice(no_payment_schedule=True, do_not_submit=True)
si.cost_center = self.cost_center
si.save().submit()
new_cc = frappe.get_doc(
{
"doctype": "Cost Center",
"cost_center_name": "East Wing",
"parent_cost_center": self.company + " - " + self.company_abbr,
"company": self.company,
}
)
new_cc.save()
# check invoice grand total, invoiced, paid and outstanding column's value after payment
pe = self.create_payment_entry(si.name, do_not_submit=True)
pe.cost_center = new_cc.name
pe.save().submit()
report = execute(filters)
expected_data_after_payment = [si.name, si.cost_center, 60]
self.assertEqual(len(report[1]), 1)
row = report[1][0]
self.assertEqual(expected_data_after_payment, [row.voucher_no, row.cost_center, row.outstanding])

View File

@@ -694,7 +694,8 @@ class GrossProfitGenerator:
def get_average_buying_rate(self, row, item_code):
args = row
if item_code not in self.average_buying_rate:
key = (item_code, row.warehouse)
if key not in self.average_buying_rate:
args.update(
{
"voucher_type": row.parenttype,
@@ -705,9 +706,9 @@ class GrossProfitGenerator:
)
average_buying_rate = get_incoming_rate(args)
self.average_buying_rate[item_code] = flt(average_buying_rate)
self.average_buying_rate[key] = flt(average_buying_rate)
return self.average_buying_rate[item_code]
return self.average_buying_rate[key]
def get_last_purchase_rate(self, item_code, row):
purchase_invoice = frappe.qb.DocType("Purchase Invoice")

View File

@@ -46,7 +46,7 @@ frappe.query_reports["Item-wise Purchase Register"] = {
label: __("Group By"),
fieldname: "group_by",
fieldtype: "Select",
options: ["Supplier", "Item Group", "Item", "Invoice"],
options: ["", "Supplier", "Item Group", "Item", "Invoice"],
},
],
formatter: function (value, row, column, data, default_formatter) {

View File

@@ -306,14 +306,15 @@ def apply_conditions(query, pi, pii, filters):
query = query.orderby(pi.posting_date, order=Order.desc)
query = query.orderby(pii.item_group, order=Order.desc)
else:
query = apply_group_by_conditions(filters, "Purchase Invoice")
query = apply_group_by_conditions(query, pi, pii, filters)
return query
def get_items(filters, additional_table_columns):
pi = frappe.qb.DocType("Purchase Invoice")
pii = frappe.qb.DocType("Purchase Invoice Item")
doctype = "Purchase Invoice"
pi = frappe.qb.DocType(doctype)
pii = frappe.qb.DocType(f"{doctype} Item")
Item = frappe.qb.DocType("Item")
query = (
frappe.qb.from_(pi)
@@ -350,6 +351,7 @@ def get_items(filters, additional_table_columns):
pi.mode_of_payment,
)
.where(pi.docstatus == 1)
.where(pii.parenttype == doctype)
)
if filters.get("supplier"):

View File

@@ -0,0 +1,63 @@
import frappe
from frappe.tests.utils import FrappeTestCase
from frappe.utils import getdate, today
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.accounts.report.item_wise_purchase_register.item_wise_purchase_register import execute
from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
class TestItemWisePurchaseRegister(AccountsTestMixin, FrappeTestCase):
def setUp(self):
self.create_company()
self.create_supplier()
self.create_item()
def tearDown(self):
frappe.db.rollback()
def create_purchase_invoice(self, do_not_submit=False):
pi = make_purchase_invoice(
item=self.item,
company=self.company,
supplier=self.supplier,
is_return=False,
update_stock=False,
do_not_save=1,
rate=100,
price_list_rate=100,
qty=1,
)
pi = pi.save()
if not do_not_submit:
pi = pi.submit()
return pi
def test_basic_report_output(self):
pi = self.create_purchase_invoice()
filters = frappe._dict({"from_date": today(), "to_date": today(), "company": self.company})
report = execute(filters)
self.assertEqual(len(report[1]), 1)
expected_result = {
"item_code": pi.items[0].item_code,
"invoice": pi.name,
"posting_date": getdate(),
"supplier": pi.supplier,
"credit_to": pi.credit_to,
"company": self.company,
"expense_account": pi.items[0].expense_account,
"stock_qty": 1.0,
"stock_uom": pi.items[0].stock_uom,
"rate": 100.0,
"amount": 100.0,
"total_tax": 0,
"total": 100.0,
"currency": "INR",
}
report_output = {k: v for k, v in report[1][0].items() if k in expected_result}
self.assertDictEqual(report_output, expected_result)

View File

@@ -64,7 +64,7 @@ frappe.query_reports["Item-wise Sales Register"] = {
label: __("Group By"),
fieldname: "group_by",
fieldtype: "Select",
options: ["Customer Group", "Customer", "Item Group", "Item", "Territory", "Invoice"],
options: ["", "Customer Group", "Customer", "Item Group", "Item", "Territory", "Invoice"],
},
],
formatter: function (value, row, column, data, default_formatter) {

View File

@@ -407,8 +407,9 @@ def apply_group_by_conditions(query, si, ii, filters):
def get_items(filters, additional_query_columns, additional_conditions=None):
si = frappe.qb.DocType("Sales Invoice")
sii = frappe.qb.DocType("Sales Invoice Item")
doctype = "Sales Invoice"
si = frappe.qb.DocType(doctype)
sii = frappe.qb.DocType(f"{doctype} Item")
item = frappe.qb.DocType("Item")
query = (
@@ -456,6 +457,7 @@ def get_items(filters, additional_query_columns, additional_conditions=None):
sii.qty,
)
.where(si.docstatus == 1)
.where(sii.parenttype == doctype)
)
if additional_query_columns:

View File

@@ -0,0 +1,65 @@
import frappe
from frappe.tests.utils import FrappeTestCase
from frappe.utils import getdate, today
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register import execute
from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
class TestItemWiseSalesRegister(AccountsTestMixin, FrappeTestCase):
def setUp(self):
self.create_company()
self.create_customer()
self.create_item()
self.clear_old_entries()
def tearDown(self):
frappe.db.rollback()
def create_sales_invoice(self, do_not_submit=False):
si = create_sales_invoice(
item=self.item,
company=self.company,
customer=self.customer,
debit_to=self.debit_to,
posting_date=today(),
parent_cost_center=self.cost_center,
cost_center=self.cost_center,
rate=100,
price_list_rate=100,
do_not_save=1,
)
si = si.save()
if not do_not_submit:
si = si.submit()
return si
def test_basic_report_output(self):
si = self.create_sales_invoice()
filters = frappe._dict({"from_date": today(), "to_date": today(), "company": self.company})
report = execute(filters)
self.assertEqual(len(report[1]), 1)
expected_result = {
"item_code": si.items[0].item_code,
"invoice": si.name,
"posting_date": getdate(),
"customer": si.customer,
"debit_to": si.debit_to,
"company": self.company,
"income_account": si.items[0].income_account,
"stock_qty": 1.0,
"stock_uom": si.items[0].stock_uom,
"rate": 100.0,
"amount": 100.0,
"total_tax": 0,
"total_other_charges": 0,
"total": 100.0,
"currency": "INR",
}
report_output = {k: v for k, v in report[1][0].items() if k in expected_result}
self.assertDictEqual(report_output, expected_result)

View File

@@ -12,7 +12,7 @@ def execute(filters=None):
else:
party_naming_by = frappe.db.get_single_value("Buying Settings", "supp_master_name")
filters.update({"naming_series": party_naming_by})
filters["naming_series"] = party_naming_by
validate_filters(filters)
(
@@ -63,21 +63,23 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map, journal_entry_
tax_withholding_category = tds_accounts.get(entry.account)
# or else the consolidated value from the voucher document
if not tax_withholding_category:
tax_withholding_category = tax_category_map.get(name)
tax_withholding_category = tax_category_map.get((voucher_type, name))
# or else from the party default
if not tax_withholding_category:
tax_withholding_category = party_map.get(party, {}).get("tax_withholding_category")
rate = tax_rate_map.get(tax_withholding_category)
if net_total_map.get(name):
if net_total_map.get((voucher_type, name)):
if voucher_type == "Journal Entry" and tax_amount and rate:
# back calcalute total amount from rate and tax_amount
if rate:
total_amount = grand_total = base_total = tax_amount / (rate / 100)
elif voucher_type == "Purchase Invoice":
total_amount, grand_total, base_total, bill_no, bill_date = net_total_map.get(name)
total_amount, grand_total, base_total, bill_no, bill_date = net_total_map.get(
(voucher_type, name)
)
else:
total_amount, grand_total, base_total = net_total_map.get(name)
total_amount, grand_total, base_total = net_total_map.get((voucher_type, name))
else:
total_amount += entry.credit
@@ -97,7 +99,7 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map, journal_entry_
}
if filters.naming_series == "Naming Series":
row.update({"party_name": party_map.get(party, {}).get(party_name)})
row["party_name"] = party_map.get(party, {}).get(party_name)
row.update(
{
@@ -279,7 +281,6 @@ def get_tds_docs(filters):
journal_entries = []
tax_category_map = frappe._dict()
net_total_map = frappe._dict()
frappe._dict()
journal_entry_party_map = frappe._dict()
bank_accounts = frappe.get_all("Account", {"is_group": 0, "account_type": "Bank"}, pluck="name")
@@ -412,7 +413,7 @@ def get_doc_info(vouchers, doctype, tax_category_map, net_total_map=None):
)
for entry in entries:
tax_category_map.update({entry.name: entry.tax_withholding_category})
tax_category_map[(doctype, entry.name)] = entry.tax_withholding_category
if doctype == "Purchase Invoice":
value = [
entry.base_tax_withholding_net_total,
@@ -427,7 +428,8 @@ def get_doc_info(vouchers, doctype, tax_category_map, net_total_map=None):
value = [entry.paid_amount, entry.paid_amount_after_tax, entry.base_paid_amount]
else:
value = [entry.total_amount] * 3
net_total_map.update({entry.name: value})
net_total_map[(doctype, entry.name)] = value
def get_tax_rate_map(filters):

View File

@@ -1571,6 +1571,18 @@ def auto_create_exchange_rate_revaluation_weekly() -> None:
create_err_and_its_journals(companies)
def auto_create_exchange_rate_revaluation_monthly() -> None:
"""
Executed by background job
"""
companies = frappe.db.get_all(
"Company",
filters={"auto_exchange_rate_revaluation": 1, "auto_err_frequency": "Montly"},
fields=["name", "submit_err_jv"],
)
create_err_and_its_journals(companies)
def get_payment_ledger_entries(gl_entries, cancel=0):
ple_map = []
if gl_entries:

View File

@@ -1689,12 +1689,12 @@ def create_asset(**args):
return asset
def create_asset_category():
def create_asset_category(enable_cwip=1):
asset_category = frappe.new_doc("Asset Category")
asset_category.asset_category_name = "Computers"
asset_category.total_number_of_depreciations = 3
asset_category.frequency_of_depreciation = 3
asset_category.enable_cwip_accounting = 1
asset_category.enable_cwip_accounting = enable_cwip
asset_category.append(
"accounts",
{

View File

@@ -170,7 +170,7 @@
"fieldname": "supplier_type",
"fieldtype": "Select",
"label": "Supplier Type",
"options": "Company\nIndividual\nProprietorship\nPartnership",
"options": "Company\nIndividual\nPartnership",
"reqd": 1
},
{

View File

@@ -43,9 +43,10 @@ def get_data(filters):
query = (
frappe.qb.from_(po)
.from_(po_item)
.inner_join(po_item)
.on(po_item.parent == po.name)
.left_join(pi_item)
.on(pi_item.po_detail == po_item.name)
.on((pi_item.po_detail == po_item.name) & (pi_item.docstatus == 1))
.select(
po.transaction_date.as_("date"),
po_item.schedule_date.as_("required_date"),

View File

@@ -742,6 +742,9 @@ class AccountsController(TransactionBase):
# reset pricing rule fields if pricing_rule_removed
item.set(fieldname, value)
elif fieldname == "expense_account" and not item.get("expense_account"):
item.expense_account = value
if self.doctype in ["Purchase Invoice", "Sales Invoice"] and item.meta.get_field(
"is_fixed_asset"
):
@@ -2373,16 +2376,12 @@ class AccountsController(TransactionBase):
@frappe.whitelist()
def repost_accounting_entries(self):
if self.repost_required:
repost_ledger = frappe.new_doc("Repost Accounting Ledger")
repost_ledger.company = self.company
repost_ledger.append("vouchers", {"voucher_type": self.doctype, "voucher_no": self.name})
repost_ledger.flags.ignore_permissions = True
repost_ledger.insert()
repost_ledger.submit()
self.db_set("repost_required", 0)
else:
frappe.throw(_("No updates pending for reposting"))
repost_ledger = frappe.new_doc("Repost Accounting Ledger")
repost_ledger.company = self.company
repost_ledger.append("vouchers", {"voucher_type": self.doctype, "voucher_no": self.name})
repost_ledger.flags.ignore_permissions = True
repost_ledger.insert()
repost_ledger.submit()
@frappe.whitelist()

View File

@@ -31,7 +31,7 @@ class SellingController(StockController):
def validate(self):
super().validate()
self.validate_items()
if not self.get("is_debit_note"):
if not (self.get("is_debit_note") or self.get("is_return")):
self.validate_max_discount()
self.validate_selling_price()
self.set_qty_as_per_stock_uom()

View File

@@ -463,6 +463,7 @@ scheduler_events = {
"monthly_long": [
"erpnext.accounts.deferred_revenue.process_deferred_accounting",
"erpnext.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual.process_loan_interest_accrual_for_demand_loans",
"erpnext.accounts.utils.auto_create_exchange_rate_revaluation_monthly",
],
}

View File

@@ -271,6 +271,7 @@ erpnext.patches.v13_0.create_accounting_dimensions_for_asset_repair
erpnext.patches.v14_0.update_reference_due_date_in_journal_entry
erpnext.patches.v14_0.france_depreciation_warning
erpnext.patches.v14_0.clear_reconciliation_values_from_singles
erpnext.patches.v14_0.update_proprietorship_to_individual
[post_model_sync]
execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings')

View File

@@ -0,0 +1,7 @@
import frappe
def execute():
for doctype in ["Customer", "Supplier"]:
field = doctype.lower() + "_type"
frappe.db.set_value(doctype, {field: "Proprietorship"}, field, "Individual")

View File

@@ -1614,12 +1614,15 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
apply_product_discount(args) {
const items = this.frm.doc.items.filter(d => (d.is_free_item)) || [];
const exist_items = items.map(row => (row.item_code, row.pricing_rules));
const exist_items = items.map(row => { return {item_code: row.item_code, pricing_rules: row.pricing_rules};});
args.free_item_data.forEach(pr_row => {
let row_to_modify = {};
if (!items || !in_list(exist_items, (pr_row.item_code, pr_row.pricing_rules))) {
// If there are no free items, or if the current free item doesn't exist in the table, add it
if (!items || !exist_items.filter(e_row => {
return e_row.item_code == pr_row.item_code && e_row.pricing_rules == pr_row.pricing_rules;
}).length) {
row_to_modify = frappe.model.add_child(this.frm.doc,
this.frm.doc.doctype + ' Item', 'items');
@@ -1642,6 +1645,12 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
apply_price_list(item, reset_plc_conversion) {
// We need to reset plc_conversion_rate sometimes because the call to
// `erpnext.stock.get_item_details.apply_price_list` is sensitive to its value
if (this.frm.doc.doctype === "Material Request") {
return;
}
if (!reset_plc_conversion) {
this.frm.set_value("plc_conversion_rate", "");
}
@@ -1657,7 +1666,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
me.in_apply_price_list = true;
return this.frm.call({
method: "erpnext.stock.get_item_details.apply_price_list",
args: { args: args },
args: { args: args, doc: me.frm.doc },
callback: function(r) {
if (!r.exc) {
frappe.run_serially([

View File

@@ -36,7 +36,6 @@ frappe.ui.form.on("Import Supplier Invoice", {
toggle_read_only_fields: function (frm) {
if (["File Import Completed", "Processing File Data"].includes(frm.doc.status)) {
cur_frm.set_read_only();
cur_frm.refresh_fields();
frm.set_df_property("import_invoices", "hidden", 1);
} else {
frm.set_df_property("import_invoices", "hidden", 0);

View File

@@ -131,7 +131,7 @@
"label": "Customer Type",
"oldfieldname": "customer_type",
"oldfieldtype": "Select",
"options": "Company\nIndividual\nProprietorship\nPartnership",
"options": "Company\nIndividual\nPartnership",
"reqd": 1
},
{

View File

@@ -698,7 +698,7 @@
"fieldname": "auto_err_frequency",
"fieldtype": "Select",
"label": "Frequency",
"options": "Daily\nWeekly"
"options": "Daily\nWeekly\nMonthly"
},
{
"default": "0",
@@ -712,7 +712,7 @@
"image_field": "company_logo",
"is_tree": 1,
"links": [],
"modified": "2024-05-27 17:32:49.057386",
"modified": "2024-07-24 18:17:56.413971",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",

View File

@@ -19,6 +19,7 @@ class HolidayList(Document):
def validate(self):
self.validate_days()
self.total_holidays = len(self.holidays)
self.sort_holidays()
@frappe.whitelist()
def get_weekly_off_dates(self):
@@ -33,8 +34,6 @@ class HolidayList(Document):
self.append("holidays", {"description": _(self.weekly_off), "holiday_date": d, "weekly_off": 1})
self.sort_holidays()
@frappe.whitelist()
def get_supported_countries(self):
from holidays.utils import list_supported_countries
@@ -76,8 +75,6 @@ class HolidayList(Document):
"holidays", {"description": holiday_name, "holiday_date": holiday_date, "weekly_off": 0}
)
self.sort_holidays()
def sort_holidays(self):
self.holidays.sort(key=lambda x: getdate(x.holiday_date))
for i in range(len(self.holidays)):

View File

@@ -162,7 +162,7 @@ def make_taxes_and_charges_template(company_name, doctype, template):
doc.flags.ignore_links = True
doc.flags.ignore_validate = True
doc.flags.ignore_mandatory = True
doc.insert(ignore_permissions=True)
doc.insert(ignore_permissions=True, ignore_if_duplicate=True)
return doc
@@ -195,7 +195,7 @@ def make_item_tax_template(company_name, template):
# Ingone validations to make doctypes faster
doc.flags.ignore_links = True
doc.flags.ignore_validate = True
doc.insert(ignore_permissions=True)
doc.insert(ignore_permissions=True, ignore_if_duplicate=True)
return doc
@@ -232,7 +232,7 @@ def get_or_create_account(company_name, account):
doc = frappe.get_doc(account)
doc.flags.ignore_links = True
doc.flags.ignore_validate = True
doc.insert(ignore_permissions=True, ignore_mandatory=True)
doc.insert(ignore_permissions=True, ignore_mandatory=True, ignore_if_duplicate=True)
return doc

View File

@@ -156,6 +156,33 @@ class TestItem(FrappeTestCase):
for key, value in to_check.items():
self.assertEqual(value, details.get(key), key)
def test_get_asset_item_details(self):
from erpnext.assets.doctype.asset.test_asset import create_asset_category, create_fixed_asset_item
create_asset_category(0)
create_fixed_asset_item()
details = get_item_details(
{
"item_code": "Macbook Pro",
"company": "_Test Company",
"currency": "INR",
"doctype": "Purchase Receipt",
}
)
self.assertEqual(details.get("expense_account"), "_Test Fixed Asset - _TC")
frappe.db.set_value("Asset Category", "Computers", "enable_cwip_accounting", "1")
details = get_item_details(
{
"item_code": "Macbook Pro",
"company": "_Test Company",
"currency": "INR",
"doctype": "Purchase Receipt",
}
)
self.assertEqual(details.get("expense_account"), "CWIP Account - _TC")
def test_item_tax_template(self):
expected_item_tax_template = [
{

View File

@@ -6,7 +6,7 @@ from collections import OrderedDict, defaultdict
from itertools import groupby
import frappe
from frappe import _
from frappe import _, bold
from frappe.model.document import Document
from frappe.model.mapper import map_child_doc
from frappe.query_builder import Case
@@ -26,6 +26,9 @@ from erpnext.stock.get_item_details import get_conversion_factor
class PickList(Document):
def validate(self):
self.validate_for_qty()
if self.pick_manually and self.get("locations"):
self.validate_stock_qty()
self.check_serial_no_status()
def before_save(self):
self.update_status()
@@ -35,6 +38,60 @@ class PickList(Document):
if self.get("locations"):
self.validate_sales_order_percentage()
def validate_stock_qty(self):
from erpnext.stock.doctype.batch.batch import get_batch_qty
for row in self.get("locations"):
if row.batch_no and not row.qty:
batch_qty = get_batch_qty(row.batch_no, row.warehouse, row.item_code)
if row.qty > batch_qty:
frappe.throw(
_(
"At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}."
).format(row.idx, row.item_code, batch_qty, row.batch_no, bold(row.warehouse)),
title=_("Insufficient Stock"),
)
continue
bin_qty = frappe.db.get_value(
"Bin",
{"item_code": row.item_code, "warehouse": row.warehouse},
"actual_qty",
)
if row.qty > bin_qty:
frappe.throw(
_(
"At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}."
).format(row.idx, row.qty, bold(row.item_code), bin_qty, bold(row.warehouse)),
title=_("Insufficient Stock"),
)
def check_serial_no_status(self):
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
for row in self.get("locations"):
if not row.serial_no:
continue
picked_serial_nos = get_serial_nos(row.serial_no)
validated_serial_nos = frappe.get_all(
"Serial No",
filters={"name": ("in", picked_serial_nos), "warehouse": row.warehouse},
pluck="name",
)
incorrect_serial_nos = set(picked_serial_nos) - set(validated_serial_nos)
if incorrect_serial_nos:
frappe.throw(
_("The Serial No at Row #{0}: {1} is not available in warehouse {2}.").format(
row.idx, ", ".join(incorrect_serial_nos), row.warehouse
),
title=_("Incorrect Warehouse"),
)
def validate_sales_order_percentage(self):
# set percentage picked in SO
for location in self.get("locations"):

View File

@@ -802,3 +802,45 @@ class TestPickList(FrappeTestCase):
a = set(picked_serial_no)
b = set([x for x in location.serial_no.split("\n") if x])
self.assertSetEqual(b, b.difference(a))
def test_validate_picked_qty_with_manual_option(self):
warehouse = "_Test Warehouse - _TC"
non_serialized_item = make_item(
"Test Non Serialized Pick List Item For Manual Option", properties={"is_stock_item": 1}
).name
serialized_item = make_item(
"Test Serialized Pick List Item For Manual Option",
properties={"is_stock_item": 1, "has_serial_no": 1, "serial_no_series": "SN-HSNMSPLI-.####"},
).name
batched_item = make_item(
"Test Batched Pick List Item For Manual Option",
properties={
"is_stock_item": 1,
"has_batch_no": 1,
"batch_number_series": "SN-HBNMSPLI-.####",
"create_new_batch": 1,
},
).name
make_stock_entry(item=non_serialized_item, to_warehouse=warehouse, qty=10, basic_rate=100)
make_stock_entry(item=serialized_item, to_warehouse=warehouse, qty=10, basic_rate=100)
make_stock_entry(item=batched_item, to_warehouse=warehouse, qty=10, basic_rate=100)
so = make_sales_order(
item_code=non_serialized_item, qty=10, rate=100, do_not_save=True, warehouse=warehouse
)
so.append("items", {"item_code": serialized_item, "qty": 10, "rate": 100, "warehouse": warehouse})
so.append("items", {"item_code": batched_item, "qty": 10, "rate": 100, "warehouse": warehouse})
so.set_missing_values()
so.save()
so.submit()
pl = create_pick_list(so.name)
pl.pick_manually = 1
for row in pl.locations:
row.qty = row.qty + 10
self.assertRaises(frappe.ValidationError, pl.save)

View File

@@ -558,15 +558,7 @@ class PurchaseReceipt(BuyingController):
landed_cost_entries = get_item_account_wise_additional_cost(self.name)
if d.is_fixed_asset:
account_type = (
"capital_work_in_progress_account"
if is_cwip_accounting_enabled(d.asset_category)
else "fixed_asset_account"
)
stock_asset_account_name = get_asset_account(
account_type, asset_category=d.asset_category, company=self.company
)
stock_asset_account_name = d.expense_account
stock_value_diff = (
flt(d.base_net_amount) + flt(d.item_tax_amount) + flt(d.landed_cost_voucher_amount)
@@ -670,7 +662,6 @@ class PurchaseReceipt(BuyingController):
def make_tax_gl_entries(self, gl_entries, via_landed_cost_voucher=False):
negative_expense_to_be_booked = sum([flt(d.item_tax_amount) for d in self.get("items")])
is_asset_pr = any(d.is_fixed_asset for d in self.get("items"))
# Cost center-wise amount breakup for other charges included for valuation
valuation_tax = {}
for tax in self.get("taxes"):
@@ -695,26 +686,10 @@ class PurchaseReceipt(BuyingController):
against_account = ", ".join([d.account for d in gl_entries if flt(d.debit) > 0])
total_valuation_amount = sum(valuation_tax.values())
amount_including_divisional_loss = negative_expense_to_be_booked
stock_rbnb = (
self.get("asset_received_but_not_billed")
if is_asset_pr
else self.get_company_default("stock_received_but_not_billed")
)
i = 1
for tax in self.get("taxes"):
if valuation_tax.get(tax.name):
if via_landed_cost_voucher or self.is_landed_cost_booked_for_any_item():
account = tax.account_head
else:
negative_expense_booked_in_pi = frappe.db.sql(
"""select name from `tabPurchase Invoice Item` pi
where docstatus = 1 and purchase_receipt=%s
and exists(select name from `tabGL Entry` where voucher_type='Purchase Invoice'
and voucher_no=pi.parent and account=%s)""",
(self.name, tax.account_head),
)
account = stock_rbnb if negative_expense_booked_in_pi else tax.account_head
account = tax.account_head
if i == len(valuation_tax):
applicable_amount = amount_including_divisional_loss
else:

View File

@@ -2499,6 +2499,110 @@ class TestPurchaseReceipt(FrappeTestCase):
lcv.save().submit()
return lcv
def test_tax_account_heads_on_item_repost_without_lcv(self):
"""
PO -> PR -> PI
Backdated `Repost Item valuation` should not merge tax account heads into stock_rbnb if Purchase Receipt was created first
This scenario is without LCV
"""
from erpnext.accounts.doctype.account.test_account import create_account
from erpnext.buying.doctype.purchase_order.test_purchase_order import (
create_purchase_order,
make_pr_against_po,
)
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import make_purchase_invoice
stock_rbnb = "Stock Received But Not Billed - _TC"
stock_in_hand = "Stock In Hand - _TC"
test_cc = "_Test Cost Center - _TC"
test_company = "_Test Company"
creditors = "Creditors - _TC"
company_doc = frappe.get_doc("Company", test_company)
company_doc.enable_perpetual_inventory = True
company_doc.stock_received_but_not_billed = stock_rbnb
company_doc.default_inventory_account = stock_in_hand
company_doc.save()
packaging_charges_account = create_account(
account_name="Packaging Charges",
parent_account="Indirect Expenses - _TC",
company=test_company,
account_type="Tax",
)
po = create_purchase_order(qty=10, rate=100, do_not_save=1)
po.taxes = []
po.append(
"taxes",
{
"category": "Valuation and Total",
"account_head": packaging_charges_account,
"cost_center": test_cc,
"description": "Test",
"add_deduct_tax": "Add",
"charge_type": "Actual",
"tax_amount": 250,
},
)
po.save().submit()
pr = make_pr_against_po(po.name, received_qty=10)
pr_gl_entries = get_gl_entries(pr.doctype, pr.name, skip_cancelled=True)
expected_pr_gles = [
{"account": stock_rbnb, "debit": 0.0, "credit": 1000.0, "cost_center": test_cc},
{"account": stock_in_hand, "debit": 1250.0, "credit": 0.0, "cost_center": test_cc},
{"account": packaging_charges_account, "debit": 0.0, "credit": 250.0, "cost_center": test_cc},
]
self.assertEqual(expected_pr_gles, pr_gl_entries)
# Make PI against Purchase Receipt
pi = make_purchase_invoice(pr.name).save().submit()
pi_gl_entries = get_gl_entries(pi.doctype, pi.name, skip_cancelled=True)
expected_pi_gles = [
{"account": stock_rbnb, "debit": 1000.0, "credit": 0.0, "cost_center": test_cc},
{"account": packaging_charges_account, "debit": 250.0, "credit": 0.0, "cost_center": test_cc},
{"account": creditors, "debit": 0.0, "credit": 1250.0, "cost_center": None},
]
self.assertEqual(expected_pi_gles, pi_gl_entries)
# Trigger Repost Item Valudation on a older date
repost_doc = frappe.get_doc(
{
"doctype": "Repost Item Valuation",
"based_on": "Item and Warehouse",
"item_code": pr.items[0].item_code,
"warehouse": pr.items[0].warehouse,
"posting_date": add_days(pr.posting_date, -1),
"posting_time": "00:00:00",
"company": pr.company,
"allow_negative_stock": 1,
"via_landed_cost_voucher": 0,
"allow_zero_rate": 0,
}
)
repost_doc.save().submit()
pr_gles_after_repost = get_gl_entries(pr.doctype, pr.name, skip_cancelled=True)
expected_pr_gles_after_repost = [
{"account": stock_rbnb, "debit": 0.0, "credit": 1000.0, "cost_center": test_cc},
{"account": stock_in_hand, "debit": 1250.0, "credit": 0.0, "cost_center": test_cc},
{"account": packaging_charges_account, "debit": 0.0, "credit": 250.0, "cost_center": test_cc},
]
self.assertEqual(len(pr_gles_after_repost), len(expected_pr_gles_after_repost))
self.assertEqual(expected_pr_gles_after_repost, pr_gles_after_repost)
# teardown
pi.reload()
pi.cancel()
pr.reload()
pr.cancel()
company_doc.enable_perpetual_inventory = False
company_doc.stock_received_but_not_billed = None
company_doc.default_inventory_account = None
company_doc.save()
def prepare_data_for_internal_transfer():
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier

View File

@@ -237,9 +237,23 @@ def repost(doc):
doc.log_error("Unable to repost item valuation")
message = frappe.message_log.pop() if frappe.message_log else ""
status = "Failed"
# If failed because of timeout, set status to In Progress
if traceback and "timeout" in traceback.lower():
status = "In Progress"
if traceback:
message += "<br>" + "Traceback: <br>" + traceback
frappe.db.set_value(doc.doctype, doc.name, "error_log", message)
frappe.db.set_value(
doc.doctype,
doc.name,
{
"error_log": message,
"status": status,
},
)
outgoing_email_account = frappe.get_cached_value(
"Email Account", {"default_outgoing": 1, "enable_outgoing": 1}, "name"
@@ -247,7 +261,6 @@ def repost(doc):
if outgoing_email_account and not isinstance(e, RecoverableErrors):
notify_error_to_stock_managers(doc, message)
doc.set_status("Failed")
finally:
if not frappe.flags.in_test:
frappe.db.commit()

View File

@@ -327,12 +327,26 @@ def get_basic_details(args, item, overwrite_warehouse=True):
expense_account = None
if args.get("doctype") == "Purchase Invoice" and item.is_fixed_asset:
from erpnext.assets.doctype.asset_category.asset_category import get_asset_category_account
if item.is_fixed_asset:
from erpnext.assets.doctype.asset.asset import get_asset_account, is_cwip_accounting_enabled
expense_account = get_asset_category_account(
fieldname="fixed_asset_account", item=args.item_code, company=args.company
)
if is_cwip_accounting_enabled(item.asset_category):
expense_account = get_asset_account(
"capital_work_in_progress_account",
asset_category=item.asset_category,
company=args.company,
)
elif args.get("doctype") in (
"Purchase Invoice",
"Purchase Receipt",
"Purchase Order",
"Material Request",
):
from erpnext.assets.doctype.asset_category.asset_category import get_asset_category_account
expense_account = get_asset_category_account(
fieldname="fixed_asset_account", item=args.item_code, company=args.company
)
# Set the UOM to the Default Sales UOM or Default Purchase UOM if configured in the Item Master
if not args.get("uom"):
@@ -1283,7 +1297,7 @@ def get_batch_qty(batch_no, warehouse, item_code):
@frappe.whitelist()
def apply_price_list(args, as_doc=False):
def apply_price_list(args, as_doc=False, doc=None):
"""Apply pricelist on a document-like dict object and return as
{'parent': dict, 'children': list}
@@ -1322,7 +1336,7 @@ def apply_price_list(args, as_doc=False):
for item in item_list:
args_copy = frappe._dict(args.copy())
args_copy.update(item)
item_details = apply_price_list_on_item(args_copy)
item_details = apply_price_list_on_item(args_copy, doc=doc)
children.append(item_details)
if as_doc:
@@ -1340,10 +1354,10 @@ def apply_price_list(args, as_doc=False):
return {"parent": parent, "children": children}
def apply_price_list_on_item(args):
def apply_price_list_on_item(args, doc=None):
item_doc = frappe.db.get_value("Item", args.item_code, ["name", "variant_of"], as_dict=1)
item_details = get_price_list_rate(args, item_doc)
item_details.update(get_pricing_rule_for_item(args))
item_details.update(get_pricing_rule_for_item(args, doc=doc))
return item_details

View File

@@ -3,6 +3,14 @@
frappe.query_reports["Product Bundle Balance"] = {
filters: [
{
fieldname: "company",
label: __("Company"),
fieldtype: "Link",
options: "Company",
default: frappe.defaults.get_user_default("Company"),
reqd: 1,
},
{
fieldname: "date",
label: __("Date"),

View File

@@ -224,6 +224,9 @@ def get_stock_ledger_entries(filters, items):
.where((sle2.name.isnull()) & (sle.docstatus < 2) & (sle.item_code.isin(items)))
)
if filters.get("company"):
query = query.where(sle.company == filters.get("company"))
if date := filters.get("date"):
query = query.where(sle.posting_date <= date)
else:
@@ -237,7 +240,7 @@ def get_stock_ledger_entries(filters, items):
if warehouse_details:
wh = frappe.qb.DocType("Warehouse")
query = query.where(
ExistsCriterion(
sle.warehouse.isin(
frappe.qb.from_(wh)
.select(wh.name)
.where((wh.lft >= warehouse_details.lft) & (wh.rgt <= warehouse_details.rgt))

View File

@@ -209,7 +209,9 @@ def repost_future_sle(
)
affected_transactions.update(obj.affected_transactions)
distinct_item_warehouses[(args[i].get("item_code"), args[i].get("warehouse"))].reposting_status = True
key = (args[i].get("item_code"), args[i].get("warehouse"))
if distinct_item_warehouses.get(key):
distinct_item_warehouses[key].reposting_status = True
if obj.new_items_found:
for _item_wh, data in distinct_item_warehouses.items():

View File

@@ -240,6 +240,12 @@ class SubcontractingReceipt(SubcontractingController):
)
def validate_available_qty_for_consumption(self):
if (
frappe.db.get_single_value("Buying Settings", "backflush_raw_materials_of_subcontract_based_on")
== "BOM"
):
return
for item in self.get("supplied_items"):
precision = item.precision("consumed_qty")
if (

View File

@@ -75,6 +75,7 @@ class TestSubcontractingReceipt(FrappeTestCase):
self.assertEqual(scr.get("items")[0].rm_supp_cost, flt(rm_supp_cost))
def test_available_qty_for_consumption(self):
set_backflush_based_on("BOM")
make_stock_entry(item_code="_Test Item", qty=100, target="_Test Warehouse 1 - _TC", basic_rate=100)
make_stock_entry(
item_code="_Test Item Home Desktop 100",
@@ -119,7 +120,7 @@ class TestSubcontractingReceipt(FrappeTestCase):
)
scr = make_subcontracting_receipt(sco.name)
scr.save()
self.assertRaises(frappe.ValidationError, scr.submit)
scr.submit()
def test_subcontracting_gle_fg_item_rate_zero(self):
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import get_gl_entries
@@ -556,6 +557,21 @@ class TestSubcontractingReceipt(FrappeTestCase):
# consumed_qty should be (accepted_qty * qty_consumed_per_unit) = (6 * 1) = 6
self.assertEqual(scr.supplied_items[0].consumed_qty, 6)
# Do not transfer materials to the supplier warehouse and check whether system allows to consumed directly from the supplier's warehouse
sco = get_subcontracting_order(service_items=service_items)
# Transfer RM's
rm_items = get_rm_items(sco.supplied_items)
itemwise_details = make_stock_in_entry(rm_items=rm_items, warehouse="_Test Warehouse 1 - _TC")
# Create Subcontracting Receipt
scr = make_subcontracting_receipt(sco.name)
scr.submit()
self.assertEqual(scr.docstatus, 1)
for item in scr.supplied_items:
self.assertFalse(item.available_qty_for_consumption)
def test_supplied_items_cost_after_reposting(self):
# Set Backflush Based On as "BOM"
set_backflush_based_on("BOM")

View File

@@ -1248,6 +1248,8 @@ Is Default,Ist Standard,
Is Existing Asset,Vermögenswert existiert bereits.,
Is Frozen,Ist gesperrt,
Is Group,Ist Gruppe,
Is Group Warehouse,Ist Lagergruppe,
Is Rejected Warehouse,Ist Lager für abgelehnte Ware,
Issue,Anfrage,
Issue Material,Material ausgeben,
Issued,Ausgestellt,
@@ -1311,6 +1313,7 @@ Items for Raw Material Request,Artikel für Rohstoffanforderung,
Job Card,Jobkarte,
Job card {0} created,Jobkarte {0} erstellt,
Join,Beitreten,
Joining,Beitritt,
Journal Entries {0} are un-linked,Buchungssätze {0} sind nicht verknüpft,
Journal Entry,Buchungssatz,
Journal Entry {0} does not have account {1} or already matched against other voucher,Buchungssatz {0} gehört nicht zu Konto {1} oder ist bereits mit einem anderen Beleg abgeglichen,
@@ -2033,6 +2036,7 @@ Product Search,Produkt Suche,
Production,Produktion,
Production Item,Produktions-Artikel,
Products,Produkte,
Profile,Profil,
Profit and Loss,Gewinn und Verlust,
Profit for the year,Jahresüberschuss,
Program,Programm,
@@ -2094,6 +2098,9 @@ Qty To Manufacture,Herzustellende Menge,
Qty Total,Gesamtmenge,
Qty for {0},Menge für {0},
Qualification,Qualifikation,
Qualification Status,Qualifikationsstatus,
Qualified By,Qualifiziert von,
Qualified on,Qualifiziert am,
Quality,Qualität,
Quality Action,Qualitätsmaßnahme,
Quality Goal.,Qualitätsziel.,
@@ -3295,6 +3302,7 @@ Warehouse Type,Lagertyp,
'Date' is required,&#39;Datum&#39; ist erforderlich,
Budgets,Budgets,
Bundle Qty,Bundle Menge,
Company Details,Unternehmensdetails,
Company GSTIN,Unternehmen GSTIN,
Company field is required,Firmenfeld ist erforderlich,
Creating Dimensions...,Dimensionen erstellen ...,
@@ -3659,6 +3667,7 @@ Performance,Performance,
Period based On,Zeitraum basierend auf,
Perpetual inventory required for the company {0} to view this report.,"Permanente Bestandsaufnahme erforderlich, damit das Unternehmen {0} diesen Bericht anzeigen kann.",
Phone,Telefon,
Phone Ext.,Telefon Ext.,
Pick List,Auswahlliste,
Plaid authentication error,Plaid-Authentifizierungsfehler,
Plaid public token error,Plaid public token error,
@@ -5096,7 +5105,7 @@ Number of Depreciations Booked,Anzahl der gebuchten Abschreibungen,
Finance Books,Finanzbücher,
Straight Line,Gerade Linie,
Double Declining Balance,Doppelte degressive,
Manual,Handbuch,
Manual,Manuell,
Value After Depreciation,Wert nach Abschreibung,
Total Number of Depreciations,Gesamtzahl der Abschreibungen,
Frequency of Depreciation (Months),Die Häufigkeit der Abschreibungen (Monate),
@@ -5156,6 +5165,7 @@ Maintenance Team Name,Name des Wartungsteams,
Maintenance Team Members,Mitglieder des Wartungsteams,
Purpose,Zweck,
Stock Manager,Lagerleiter,
Stock Movement,Lagerbewegung,
Asset Movement Item,Vermögensbewegungsgegenstand,
Source Location,Quellspeicherort,
From Employee,Von Mitarbeiter,
@@ -5252,6 +5262,7 @@ Default Bank Account,Standardbankkonto,
Is Transporter,Ist Transporter,
Represents Company,Repräsentiert das Unternehmen,
Supplier Type,Lieferantentyp,
Allow Purchase,Einkauf zulassen,
Allow Purchase Invoice Creation Without Purchase Order,Erstellen von Eingangsrechnung ohne Bestellung zulassen,
Allow Purchase Invoice Creation Without Purchase Receipt,Erstellen von Eingangsrechnung ohne Kaufbeleg ohne Kaufbeleg zulassen,
Warn RFQs,Warnung Ausschreibungen,
@@ -6028,6 +6039,7 @@ Occupational Hazards and Environmental Factors,Berufsrisiken und Umweltfaktoren,
Other Risk Factors,Andere Risikofaktoren,
Patient Details,Patientendetails,
Additional information regarding the patient,Zusätzliche Informationen zum Patienten,
Additional Info,Zusätzliche Informationen,
HLC-APP-.YYYY.-,HLC-APP-.YYYY.-,
Patient Age,Patient Alter,
Get Prescribed Clinical Procedures,Holen Sie sich vorgeschriebene klinische Verfahren,
@@ -6194,6 +6206,7 @@ Date Of Retirement,Zeitpunkt der Pensionierung,
Department and Grade,Abteilung und Klasse,
Reports to,Vorgesetzter,
Attendance and Leave Details,Anwesenheits- und Urlaubsdetails,
Attendance & Leaves,Anwesenheit & Urlaub,
Attendance Device ID (Biometric/RF tag ID),Anwesenheitsgeräte-ID (biometrische / RF-Tag-ID),
Applicable Holiday List,Geltende Feiertagsliste,
Default Shift,Standardverschiebung,
@@ -6746,7 +6759,7 @@ Default Costing Rate,Standardkosten,
Default Billing Rate,Standard-Rechnungspreis,
Dependent Task,Abhängiger Vorgang,
Project Type,Projekttyp,
% Complete Method,% abgeschlossene Methode,
% Complete Method,Fertigstellung bemessen nach,
Task Completion,Aufgabenerledigung,
Task Progress,Vorgangsentwicklung,
% Completed,% abgeschlossen,
@@ -6909,6 +6922,7 @@ Restaurant Reservation,Restaurant Reservierung,
Waitlisted,Auf der Warteliste,
No Show,Nicht angetreten,
No of People,Anzahl von Personen,
No of Employees,Anzahl der Mitarbeiter,
Reservation Time,Reservierungszeit,
Reservation End Time,Reservierungsendzeit,
No of Seats,Anzahl der Sitze,
@@ -6920,6 +6934,7 @@ Default Company Bank Account,Standard-Bankkonto des Unternehmens,
From Lead,Aus Lead,
Account Manager,Kundenberater,
Accounts Manager,Buchhalter,
Allow Sales,Verkauf zulassen,
Allow Sales Invoice Creation Without Sales Order,Ermöglichen Sie die Erstellung von Ausgangsrechnungen ohne Auftrag,
Allow Sales Invoice Creation Without Delivery Note,Ermöglichen Sie die Erstellung von Ausgangsrechnungen ohne Lieferschein,
Default Price List,Standardpreisliste,
@@ -6979,7 +6994,8 @@ Not Delivered,Nicht geliefert,
Fully Delivered,Komplett geliefert,
Partly Delivered,Teilweise geliefert,
Not Applicable,Nicht andwendbar,
% Delivered,% geliefert,
% Delivered,% Geliefert,
% Picked,% Kommissioniert,
% of materials delivered against this Sales Order,% der für diesen Auftrag gelieferten Materialien,
% of materials billed against this Sales Order,% der Materialien welche zu diesem Auftrag gebucht wurden,
Not Billed,Nicht abgerechnet,
@@ -7113,6 +7129,7 @@ New Income,Neuer Verdienst,
New Expenses,Neue Ausgaben,
Annual Income,Jährliches Einkommen,
Annual Expenses,Jährliche Kosten,
Annual Revenue,Jährlicher Umsatz,
Bank Balance,Kontostand,
Bank Credit Balance,Bankguthaben,
Receivables,Forderungen,
@@ -7595,6 +7612,7 @@ Actual Qty After Transaction,Tatsächliche Anzahl nach Transaktionen,
Stock Value Difference,Lagerwert-Differenz,
Stock Queue (FIFO),Lagerverfahren (FIFO),
Is Cancelled,Ist storniert,
Is Cash or Non Trade Discount,Ist Bar- oder Nicht-Handelsrabatt,
Stock Reconciliation,Bestandsabgleich,
This tool helps you to update or fix the quantity and valuation of stock in the system. It is typically used to synchronise the system values and what actually exists in your warehouses.,"Dieses Werkzeug hilft Ihnen dabei, die Menge und die Bewertung von Bestand im System zu aktualisieren oder zu ändern. Es wird in der Regel verwendet, um die Systemwerte und den aktuellen Bestand Ihrer Lager zu synchronisieren.",
Reconciliation JSON,Abgleich JSON (JavaScript Object Notation),
@@ -7696,6 +7714,7 @@ Warranty / AMC Status,Status der Garantie / des jährlichen Wartungsvertrags,
Resolved By,Entschieden von,
Service Address,Serviceadresse,
If different than customer address,Falls abweichend von Kundenadresse,
"If yes, then this warehouse will be used to store rejected materials","Falls aktiviert, wird dieses Lager verwendet, um abgelehnte Ware zu lagern",
Raised By,Gemeldet durch,
From Company,Von Unternehmen,
Rename Tool,Werkzeug zum Umbenennen,
@@ -8940,6 +8959,7 @@ Print Receipt,Druckeingang,
Edit Receipt,Beleg bearbeiten,
Focus on search input,Konzentrieren Sie sich auf die Sucheingabe,
Focus on Item Group filter,Fokus auf Artikelgruppenfilter,
Footer will display correctly only in PDF,Die Fußzeile wird nur im PDF korrekt angezeigt,
Checkout Order / Submit Order / New Order,Kaufabwicklung / Bestellung abschicken / Neue Bestellung,
Add Order Discount,Bestellrabatt hinzufügen,
Item Code: {0} is not available under warehouse {1}.,Artikelcode: {0} ist unter Lager {1} nicht verfügbar.,
Can't render this file because it is too large.