Compare commits

...

169 Commits

Author SHA1 Message Date
Frappe PR Bot
9876019c69 chore(release): Bumped to Version 13.52.12
## [13.52.12](https://github.com/frappe/erpnext/compare/v13.52.11...v13.52.12) (2023-08-22)

### Bug Fixes

* disallow mulitple SO with same PO No ([3b9ac9f](3b9ac9f46a))
* timeout error coming during reposting (backport [#36715](https://github.com/frappe/erpnext/issues/36715)) ([#36753](https://github.com/frappe/erpnext/issues/36753)) ([783bb93](783bb93913))
2023-08-22 16:59:52 +00:00
Deepesh Garg
f4fb878282 Merge pull request #36762 from frappe/version-13-hotfix
chore: release v13
2023-08-22 22:28:20 +05:30
mergify[bot]
783bb93913 fix: timeout error coming during reposting (backport #36715) (#36753)
fix: timeout error coming during reposting (#36715)

(cherry picked from commit 620b21fec5)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-08-22 13:22:48 +05:30
Frappe PR Bot
cfbd9af100 chore(release): Bumped to Version 13.52.11
## [13.52.11](https://github.com/frappe/erpnext/compare/v13.52.10...v13.52.11) (2023-08-17)

### Bug Fixes

* disallow mulitple SO with same PO No ([bdaae81](bdaae81171))
2023-08-17 10:12:01 +00:00
ruthra kumar
966c296872 Merge pull request #36680 from frappe/mergify/bp/version-13/pr-36590
fix: disallow mulitple SO with same Purchase Order No if not enabled in Settings (backport #36590)
2023-08-17 15:40:34 +05:30
ruthra kumar
0ff871e38e chore: resolve conflict 2023-08-17 09:11:47 +05:30
ruthra kumar
9df10dbc40 refactor(test): don't set po_no by default
(cherry picked from commit 64614cd915)

# Conflicts:
#	erpnext/stock/doctype/delivery_note/test_delivery_note.py
2023-08-17 03:33:56 +00:00
ruthra kumar
bdaae81171 fix: disallow mulitple SO with same PO No
(cherry picked from commit dbd3fdbb41)
2023-08-17 03:33:56 +00:00
ruthra kumar
066cf0e3bc Merge pull request #36671 from frappe/mergify/bp/version-13-hotfix/pr-36590
fix: disallow mulitple SO with same Purchase Order No if not enabled in Settings (backport #36590)
2023-08-16 16:21:33 +05:30
ruthra kumar
829298066f chore: resolve conflict 2023-08-16 15:02:04 +05:30
ruthra kumar
006da22d3f refactor(test): don't set po_no by default
(cherry picked from commit 64614cd915)

# Conflicts:
#	erpnext/stock/doctype/delivery_note/test_delivery_note.py
2023-08-16 09:12:18 +00:00
ruthra kumar
3b9ac9f46a fix: disallow mulitple SO with same PO No
(cherry picked from commit dbd3fdbb41)
2023-08-16 09:12:17 +00:00
Frappe PR Bot
8f977f40f0 chore(release): Bumped to Version 13.52.10
## [13.52.10](https://github.com/frappe/erpnext/compare/v13.52.9...v13.52.10) (2023-08-16)

### Bug Fixes

* Allow backdated repayment cancels for term loans ([c417365](c417365e03))
* payment allocation in invoice payment schedule ([#36440](https://github.com/frappe/erpnext/issues/36440)) ([e5b3860](e5b38607ce))

### Performance Improvements

* **invoice:** Faster return amount query (backport [#36556](https://github.com/frappe/erpnext/issues/36556)) ([#36558](https://github.com/frappe/erpnext/issues/36558)) ([a801bba](a801bba83e))
2023-08-16 02:46:48 +00:00
Deepesh Garg
3bc7c88133 Merge pull request #36657 from frappe/version-13-hotfix
chore: release v13
2023-08-16 08:15:05 +05:30
mergify[bot]
84b6f68108 chore: add validation for depreciation expense account in asset category (backport #36659) (#36662)
chore: add validation for depreciation expense account in asset category (#36659)

(cherry picked from commit e0c79d3b53)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-08-15 18:26:33 +05:30
mergify[bot]
e5b38607ce fix: payment allocation in invoice payment schedule (#36440)
fix: payment allocation in invoice payment schedule (#36440)
2023-08-13 13:21:04 +05:30
Deepesh Garg
b3c9d0d910 Merge pull request #36624 from frappe/mergify/bp/version-13-hotfix/pr-36614
fix: Allow backdated repayment cancels for term loans (#36614)
2023-08-13 13:20:02 +05:30
Deepesh Garg
c417365e03 fix: Allow backdated repayment cancels for term loans
(cherry picked from commit 1377cf4cf1)
2023-08-13 06:28:38 +00:00
mergify[bot]
b2a4175d43 chore: set default filter dates if missing (backport #36597) (#36599)
chore: set default filter dates if missing (#36597)

(cherry picked from commit 98e82e0d99)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-08-11 09:17:08 +00:00
mergify[bot]
a801bba83e perf(invoice): Faster return amount query (backport #36556) (#36558)
perf(invoice): Faster return amount query (#36556)

perf: Faster return amount query
(cherry picked from commit b0c79a0467)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-08-09 14:07:52 +05:30
Frappe PR Bot
3ccb511e25 chore(release): Bumped to Version 13.52.9
## [13.52.9](https://github.com/frappe/erpnext/compare/v13.52.8...v13.52.9) (2023-08-08)

### Bug Fixes

* Tax withholding against order via Payment Entry ([#36493](https://github.com/frappe/erpnext/issues/36493)) ([5dbca09](5dbca09899))
2023-08-08 18:37:46 +00:00
Deepesh Garg
8c51f2e5a1 Merge pull request #36545 from frappe/version-13-hotfix
chore: release v13
2023-08-09 00:05:16 +05:30
mergify[bot]
5dbca09899 fix: Tax withholding against order via Payment Entry (#36493)
* fix: Tax withholding against order via Payment Entry (#36493)

* fix: Tax withholding against order via Payment Entry

* test: Add test case

* fix: Nonetype exceptions

(cherry picked from commit 93767eb7fc)

# Conflicts:
#	erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py

* chore: resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-08-07 17:15:22 +05:30
mergify[bot]
9ec7bb9be3 chore: better cost center validation for assets (backport #36477) (#36478)
chore: better cost center validation for assets (#36477)

(cherry picked from commit 38a612c62e)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-08-03 17:19:05 +05:30
Frappe PR Bot
0281afcead chore(release): Bumped to Version 13.52.8
## [13.52.8](https://github.com/frappe/erpnext/compare/v13.52.7...v13.52.8) (2023-08-01)

### Bug Fixes

* added validation for unique serial numbers in pos invoice ([#36302](https://github.com/frappe/erpnext/issues/36302)) ([a165b37](a165b37fd7))
* only publish repost progress to doc subscriber (backport [#36400](https://github.com/frappe/erpnext/issues/36400)) ([#36403](https://github.com/frappe/erpnext/issues/36403)) ([e9df064](e9df06406f))
* removed "fetch_from" (backport [#36365](https://github.com/frappe/erpnext/issues/36365)) ([#36387](https://github.com/frappe/erpnext/issues/36387)) ([c574494](c574494ddd))

### Performance Improvements

* use `LEFT JOIN` instead of `NOT EXISTS` (backport [#36221](https://github.com/frappe/erpnext/issues/36221)) ([#36384](https://github.com/frappe/erpnext/issues/36384)) ([cdc86bd](cdc86bd76c))
2023-08-01 18:04:50 +00:00
Deepesh Garg
348e4616cb Merge pull request #36441 from frappe/version-13-hotfix
chore: release v13
2023-08-01 23:33:11 +05:30
RitvikSardana
a165b37fd7 fix: added validation for unique serial numbers in pos invoice (#36302)
* fix: added validation for unique serial numbers in pos invoice

* fix: updated title of validation

* fix: removed extra whitespace

* fix: added validation for duplicate batch numbers

---------

Co-authored-by: Ritvik Sardana <ritviksardana@Ritviks-MacBook-Air.local>
2023-07-31 23:28:10 +05:30
mergify[bot]
cdc86bd76c perf: use LEFT JOIN instead of NOT EXISTS (backport #36221) (#36384)
* perf: use `LEFT JOIN` instead of `NOT EXISTS`

(cherry picked from commit 58d867503b)

# Conflicts:
#	erpnext/manufacturing/doctype/bom_update_log/bom_updation_utils.py

* fix: long queue `process_boms_cost_level_wise`

(cherry picked from commit 148d466ae5)

* chore: `conflicts`

* fix: failing test case

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2023-07-31 17:39:31 +05:30
mergify[bot]
e9df06406f fix: only publish repost progress to doc subscriber (backport #36400) (#36403)
* fix: only publish repost progress to doc subscriber (#36400)

Huge size of string gets blasted to everyone on site. Due to some memory
leak (cause unknown) till sockets are open the strings are also in
process' memory.

related https://github.com/frappe/frappe/issues/21863

(cherry picked from commit c0642cf528)

# Conflicts:
#	erpnext/stock/stock_ledger.py

* chore: conflicts

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-07-29 18:14:26 +05:30
mergify[bot]
c574494ddd fix: removed "fetch_from" (backport #36365) (#36387)
fix: removed "fetch_from"

* fix: removed ("fetch_from": "goal.objective")
The field ended up being disabled because of this.

(cherry picked from commit 1c687a4afd)

Co-authored-by: xdlumertz <alexandrelumertz@gmail.com>
2023-07-28 18:15:24 +05:30
Frappe PR Bot
46966f4b7c chore(release): Bumped to Version 13.52.7
## [13.52.7](https://github.com/frappe/erpnext/compare/v13.52.6...v13.52.7) (2023-07-26)

### Bug Fixes

* allow both custodian and location while creating asset (backport [#36263](https://github.com/frappe/erpnext/issues/36263)) ([#36270](https://github.com/frappe/erpnext/issues/36270)) ([e4f28e8](e4f28e8a5b))
* apply discount on item after applying price list ([#36125](https://github.com/frappe/erpnext/issues/36125)) ([bde9e89](bde9e89582))
* group by in fixed asset register (copy [#36310](https://github.com/frappe/erpnext/issues/36310)) ([#36312](https://github.com/frappe/erpnext/issues/36312)) ([a5e1c47](a5e1c4798f))
2023-07-26 04:10:14 +00:00
Deepesh Garg
ded3b62c5a Merge pull request #36295 from frappe/version-13-hotfix
chore: release v13
2023-07-26 09:38:32 +05:30
mergify[bot]
a5e1c4798f fix: group by in fixed asset register (copy #36310) (#36312)
fix: group by in fixed asset register

(cherry picked from commit 1151e47f46)

Co-authored-by: anandbaburajan <anandbaburajan@gmail.com>
2023-07-25 21:01:47 +05:30
Anand Baburajan
bde9e89582 fix: apply discount on item after applying price list (#36125) 2023-07-25 20:32:57 +05:30
mergify[bot]
e4f28e8a5b fix: allow both custodian and location while creating asset (backport #36263) (#36270)
fix: allow both custodian and location while creating asset (#36263)

(cherry picked from commit 2b47f5815e)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-07-24 16:25:23 +05:30
Frappe PR Bot
128ea0d7fc chore(release): Bumped to Version 13.52.6
## [13.52.6](https://github.com/frappe/erpnext/compare/v13.52.5...v13.52.6) (2023-07-18)

### Bug Fixes

* allow manual asset receipt mov from nowhere (backport [#36093](https://github.com/frappe/erpnext/issues/36093)) ([#36095](https://github.com/frappe/erpnext/issues/36095)) ([2993eb5](2993eb5ce9))
* HSN code not showing up in GST itemised register reports ([#36142](https://github.com/frappe/erpnext/issues/36142)) ([1d3917b](1d3917b335))
* improve "Update Items" modal ([#36105](https://github.com/frappe/erpnext/issues/36105)) ([3bc899f](3bc899f354))

### Performance Improvements

* index in `Item` and `Item Variant Attribute` (backport [#36133](https://github.com/frappe/erpnext/issues/36133)) ([#36145](https://github.com/frappe/erpnext/issues/36145)) ([120de24](120de249dd))
2023-07-18 12:21:14 +00:00
Deepesh Garg
9566f4101d Merge pull request #36178 from frappe/version-13-hotfix
chore: release v13
2023-07-18 17:49:47 +05:30
Sagar Vora
4854c2e7f7 Merge pull request #36165 from frappe/mergify/bp/version-13-hotfix/pr-36163 2023-07-17 15:47:54 +05:30
Sagar Vora
a93c4b6c65 chore: use consistent quotes
(cherry picked from commit bccb718cc2)
2023-07-17 10:17:01 +00:00
mergify[bot]
287c67f7a2 chore: add validation for account type of party type and account (#36141)
chore: add validation for account type of party type and account (#36141)

chore: add validation to check if account type of party type and account match
(cherry picked from commit 305c37917f)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-07-17 11:51:45 +05:30
mergify[bot]
120de249dd perf: index in Item and Item Variant Attribute (backport #36133) (#36145)
* perf: index `variant_of` and `attribute` in `Item Variant Attribute`

(cherry picked from commit e4128a5c91)

* perf: index `disabled` in `Item`

(cherry picked from commit 04400eb2e4)

# Conflicts:
#	erpnext/stock/doctype/item/item.json

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2023-07-15 10:20:32 +05:30
Frappe PR Bot
cefa78b864 chore(release): Bumped to Version 13.52.5
## [13.52.5](https://github.com/frappe/erpnext/compare/v13.52.4...v13.52.5) (2023-07-14)

### Bug Fixes

* HSN code not showing up in GST itemised register reports (backport [#36142](https://github.com/frappe/erpnext/issues/36142)) ([#36143](https://github.com/frappe/erpnext/issues/36143)) ([73366de](73366de12f))
2023-07-14 14:49:30 +00:00
mergify[bot]
73366de12f fix: HSN code not showing up in GST itemised register reports (backport #36142) (#36143)
fix: HSN code not showing up in GST itemised register reports (#36142)

fix: hsn code not showing up in gst itemised registers
(cherry picked from commit 1d3917b335)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-07-14 20:18:07 +05:30
Anand Baburajan
1d3917b335 fix: HSN code not showing up in GST itemised register reports (#36142)
fix: hsn code not showing up in gst itemised registers
2023-07-14 20:16:49 +05:30
mergify[bot]
3bc899f354 fix: improve "Update Items" modal (#36105)
fix: improve "Update Items" modal (#36105)

* fix: make "Update Items" modal larger

* fix: remove conversion factor from overview

Conversion factor doesn't make much sense without two different UOMs
next to it, hence moving it to row detail view

(cherry picked from commit d5fe1432f8)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2023-07-14 13:03:43 +05:30
Ankush Menat
6b113c6abc ci: fix repo name in relase notes workflow
[skip ci]

(cherry picked from commit b5f6a1cc20)
2023-07-14 12:05:21 +05:30
mergify[bot]
82e2ff8731 ci: regen release notes with GH API (backport #36098) (#36100)
ci: regen release notes with GH API (#36098)

[skip ci]

(cherry picked from commit 0340bfc90d)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-07-12 12:18:34 +05:30
mergify[bot]
2993eb5ce9 fix: allow manual asset receipt mov from nowhere (backport #36093) (#36095)
* fix: allow manual asset receipt mov from nowhere (#36093)

(cherry picked from commit 4aaa1a15d7)

# Conflicts:
#	erpnext/assets/doctype/asset_movement/asset_movement.py

* chore: fix conflict

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-07-12 09:39:47 +05:30
Frappe PR Bot
12e27e96a8 chore(release): Bumped to Version 13.52.4
## [13.52.4](https://github.com/frappe/erpnext/compare/v13.52.3...v13.52.4) (2023-07-11)

### Bug Fixes

* also check on_hold ([#35910](https://github.com/frappe/erpnext/issues/35910)) ([5aa02b8](5aa02b8571))
* circular dependency during reposting causing timeout error ([ba69be1](ba69be1ced))
* **Employee Advance:** check if return amount is set before validating ([#36080](https://github.com/frappe/erpnext/issues/36080)) ([beaf13e](beaf13e00e))
* error messages while evaluating formulas and handle line boundaries ([#35989](https://github.com/frappe/erpnext/issues/35989)) ([4af57a7](4af57a7318))
* gst_hsn_code is ambiguous on gst reports ([3a00052](3a00052b49))
* incorrect status in MR created from PP (backport [#36085](https://github.com/frappe/erpnext/issues/36085)) ([#36087](https://github.com/frappe/erpnext/issues/36087)) ([e05bb10](e05bb103f3))
* payment entry `voucher_type` error ([#35779](https://github.com/frappe/erpnext/issues/35779)) ([9c3ec41](9c3ec41803))
* **Payment Entry:** compare rounded amount ([#36011](https://github.com/frappe/erpnext/issues/36011)) ([b04c190](b04c190e33))
* precision causing outstanding issue on partly paid invoices ([#36030](https://github.com/frappe/erpnext/issues/36030)) ([cf3ec93](cf3ec935a7))
* single column indexes ([#32425](https://github.com/frappe/erpnext/issues/32425)) ([53f7764](53f7764c67))

### Reverts

* Revert "perf: improve item wise register reports (backport #35908) (#35912)" ([b992366](b992366246)), closes [#35908](https://github.com/frappe/erpnext/issues/35908) [#35912](https://github.com/frappe/erpnext/issues/35912)
2023-07-11 14:12:25 +00:00
Deepesh Garg
30c9b15cdd Merge pull request #36084 from frappe/version-13-hotfix
chore: release v13
2023-07-11 19:41:00 +05:30
rohitwaghchaure
1d6bc68d87 Merge pull request #36090 from frappe/mergify/bp/version-13-hotfix/pr-36088
fix: circular dependency during reposting causing timeout error (backport #36088)
2023-07-11 19:09:36 +05:30
Rohit Waghchaure
ba69be1ced fix: circular dependency during reposting causing timeout error
(cherry picked from commit c16a5814d4)
2023-07-11 12:59:59 +00:00
Saurabh
4af57a7318 fix: error messages while evaluating formulas and handle line boundaries (#35989)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2023-07-11 18:04:31 +05:30
mergify[bot]
e05bb103f3 fix: incorrect status in MR created from PP (backport #36085) (#36087)
fix: incorrect status in MR created from PP (#36085)

(cherry picked from commit be5881280f)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2023-07-11 17:44:41 +05:30
Deepesh Garg
6f2fb89c49 Merge branch 'version-13' into version-13-hotfix 2023-07-11 16:17:56 +05:30
Rucha Mahabal
beaf13e00e fix(Employee Advance): check if return amount is set before validating (#36080) 2023-07-11 14:12:21 +05:30
mergify[bot]
9c3ec41803 fix: payment entry voucher_type error (#35779)
* fix: payment entry `voucher_type` error (#35779)

* fix: payment entry `voucher_type` error

* chore: linters

(cherry picked from commit 361a357088)

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

* chore: resolve conflicts

---------

Co-authored-by: Dany Robert <danyrt@wahni.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-07-11 10:19:55 +05:30
Anand Baburajan
06c85fa252 Revert "fix: gst_hsn_code is ambiguous on gst reports" (#36072) 2023-07-10 23:45:11 +05:30
mergify[bot]
0248fee533 refactor(Payment Entry): translatable strings (#36017)
* refactor(Payment Entry): translatable strings (#36017)

* refactor(Payment Entry): translatable strings

* fix: German translations

(cherry picked from commit af28f95c60)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.py
#	erpnext/translations/de.csv

* chore: resolve conflicts

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2023-07-10 21:02:05 +05:30
RJPvT
5aa02b8571 fix: also check on_hold (#35910) 2023-07-10 19:43:12 +05:30
mergify[bot]
53f7764c67 fix: single column indexes (#32425)
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>
2023-07-10 18:12:55 +05:30
mergify[bot]
cf3ec935a7 fix: precision causing outstanding issue on partly paid invoices (#36030)
fix: precision causing outstanding issue on partly paid invoices (#36030)

* fix: precision causing outstanding issue on partly paid invoices

* chore: linters

(cherry picked from commit 5c820ecc20)

Co-authored-by: Dany Robert <danyrt@wahni.com>
2023-07-10 16:49:41 +05:30
mergify[bot]
2732276498 chore: add asset depr posting error in error log (backport #36052) (#36056)
chore: add asset depr posting error in error log (#36052)

(cherry picked from commit 0f9a6ee70a)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-07-10 14:12:43 +05:30
Frappe PR Bot
77eb11a6e3 chore(release): Bumped to Version 13.52.3
## [13.52.3](https://github.com/frappe/erpnext/compare/v13.52.2...v13.52.3) (2023-07-09)

### Reverts

* Revert "perf: improve item wise register reports (backport #35908) (#35912)" ([0feb393](0feb393fff)), closes [#35908](https://github.com/frappe/erpnext/issues/35908) [#35912](https://github.com/frappe/erpnext/issues/35912)
2023-07-09 07:53:45 +00:00
Deepesh Garg
5cfe4195ba Merge pull request #36035 from frappe/mergify/bp/version-13/pr-36034
Revert "perf: improve item wise register reports (backport #35908)" (backport #36034)
2023-07-09 13:22:03 +05:30
Deepesh Garg
0feb393fff Revert "perf: improve item wise register reports (backport #35908) (#35912)"
This reverts commit 41344593c9.

(cherry picked from commit b992366246)
2023-07-09 06:15:33 +00:00
Deepesh Garg
4b20f2a083 Merge pull request #36034 from frappe/revert-35912-mergify/bp/version-13-hotfix/pr-35908
Revert "perf: improve item wise register reports (backport #35908)"
2023-07-09 11:44:45 +05:30
Deepesh Garg
b992366246 Revert "perf: improve item wise register reports (backport #35908) (#35912)"
This reverts commit 41344593c9.
2023-07-09 11:42:23 +05:30
Frappe PR Bot
6490b7d561 chore(release): Bumped to Version 13.52.2
## [13.52.2](https://github.com/frappe/erpnext/compare/v13.52.1...v13.52.2) (2023-07-08)

### Bug Fixes

* gst_hsn_code is ambiguous on gst reports ([2893ae7](2893ae72f5))
2023-07-08 13:17:58 +00:00
ruthra kumar
a4d8f9cb94 Merge pull request #36031 from frappe/mergify/bp/version-13/pr-36028
fix: gst_hsn_code is ambiguous on gst reports (backport #36028)
2023-07-08 18:46:34 +05:30
ruthra kumar
2893ae72f5 fix: gst_hsn_code is ambiguous on gst reports
(cherry picked from commit 3a00052b49)
2023-07-08 12:38:53 +00:00
ruthra kumar
93acde7748 Merge pull request #36028 from ruthra-kumar/fix_ambiguous_gst_hsn_code
fix: gst_hsn_code is ambiguous on gst reports
2023-07-08 17:51:17 +05:30
ruthra kumar
3a00052b49 fix: gst_hsn_code is ambiguous on gst reports 2023-07-08 06:49:39 +05:30
Frappe PR Bot
1116cee831 chore(release): Bumped to Version 13.52.1
## [13.52.1](https://github.com/frappe/erpnext/compare/v13.52.0...v13.52.1) (2023-07-05)

### Bug Fixes

* **Payment Entry:** compare rounded amount ([#36011](https://github.com/frappe/erpnext/issues/36011)) ([a7d26b0](a7d26b0c20))
* **Payment Entry:** compare rounded amount ([#36011](https://github.com/frappe/erpnext/issues/36011)) ([a370dc3](a370dc3dcc))
2023-07-05 16:23:25 +00:00
Deepesh Garg
a7d26b0c20 fix(Payment Entry): compare rounded amount (#36011)
fix(Payment Entry): compare rounded amount (#36011)
2023-07-05 21:47:04 +05:30
mergify[bot]
a370dc3dcc fix(Payment Entry): compare rounded amount (#36011)
fix(Payment Entry): compare rounded amount (#36011)

(cherry picked from commit 4badac8e9e)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
(cherry picked from commit b04c190e33)
2023-07-05 16:09:00 +00:00
mergify[bot]
b04c190e33 fix(Payment Entry): compare rounded amount (#36011)
fix(Payment Entry): compare rounded amount (#36011)

(cherry picked from commit 4badac8e9e)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2023-07-05 21:38:11 +05:30
Frappe PR Bot
77d019cc3b chore(release): Bumped to Version 13.52.0
# [13.52.0](https://github.com/frappe/erpnext/compare/v13.51.7...v13.52.0) (2023-07-05)

### Bug Fixes

* conflicts ([b9833db](b9833db7bd))
* Expense Account filter in Sales Invoice ([#35944](https://github.com/frappe/erpnext/issues/35944)) ([b63fbe4](b63fbe4286))
* Further sort purchase_order_analysis to get consistent response ([0ef0ff4](0ef0ff470f))
* reposting has not changed valuation rate ([d4e680c](d4e680c109))
* Update no copy for received_qty field ([#35965](https://github.com/frappe/erpnext/issues/35965)) ([10c9640](10c9640cbd))

### Features

* **DATEV:** against account for opening entries ([#35941](https://github.com/frappe/erpnext/issues/35941)) ([0602ddc](0602ddcfc8))
2023-07-05 09:49:20 +00:00
Deepesh Garg
fd84119273 Merge pull request #35997 from frappe/version-13-hotfix
chore: release v13
2023-07-05 15:17:37 +05:30
Suraj Shetty
9b9d839835 Merge pull request #35986 from frappe/fix-report-sorting 2023-07-04 11:48:28 +05:30
Suraj Shetty
0ef0ff470f fix: Further sort purchase_order_analysis to get consistent response 2023-07-04 11:09:38 +05:30
mergify[bot]
10c9640cbd fix: Update no copy for received_qty field (#35965)
* fix: Update no copy for received_qty field (#35965)

(cherry picked from commit 5448859254)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
#	erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json

* chore: resolve conflicts

* chore: resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-07-03 16:38:26 +05:30
Raffael Meyer
da1218f324 chore: bump pandas (#35939) 2023-07-03 14:04:22 +05:30
rohitwaghchaure
407e5b5fa3 Merge pull request #35970 from frappe/mergify/bp/version-13-hotfix/pr-35955
fix: incorrect reposting causing stock adjustment entry (backport #35955)
2023-07-03 11:08:20 +05:30
rohitwaghchaure
b9833db7bd fix: conflicts 2023-07-03 09:53:16 +05:30
Rohit Waghchaure
d4e680c109 fix: reposting has not changed valuation rate
(cherry picked from commit c0c693d8b0)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
2023-07-03 04:21:32 +00:00
mergify[bot]
b63fbe4286 fix: Expense Account filter in Sales Invoice (#35944)
fix: Expense Account filter in Sales Invoice (#35944)

(cherry picked from commit d54f52474a)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-07-01 18:14:17 +05:30
Raffael Meyer
0602ddcfc8 feat(DATEV): against account for opening entries (#35941)
* fix: add missing german translations

* feat(DATEV): against account for opening entries

Allow to specify a separate temporary against account
for opening entries

* feat(DATEV Settings): validate account no. length

* style: format with black

* style: format with black

* test: new settings field, rename filter
2023-06-30 20:02:12 +05:30
mergify[bot]
18c3a668d9 chore: update translations (#35905)
chore: update translations

chore: update translations
(cherry picked from commit 1d1103f39c)

Co-authored-by: RJPvT <48353029+RJPvT@users.noreply.github.com>
2023-06-29 13:29:56 +05:30
Frappe PR Bot
26489121f3 chore(release): Bumped to Version 13.51.7
## [13.51.7](https://github.com/frappe/erpnext/compare/v13.51.6...v13.51.7) (2023-06-28)

### Bug Fixes

* asset movement (backport [#35918](https://github.com/frappe/erpnext/issues/35918)) ([#35924](https://github.com/frappe/erpnext/issues/35924)) ([0bcd047](0bcd0476a2))
* employee link fields in payroll reports ([#619](https://github.com/frappe/erpnext/issues/619)) ([#35845](https://github.com/frappe/erpnext/issues/35845)) ([6c4dff3](6c4dff38da))
* filter parent warehouses not showing (backport [#35897](https://github.com/frappe/erpnext/issues/35897)) ([#35900](https://github.com/frappe/erpnext/issues/35900)) ([bcfd770](bcfd7708f2))
* frappe.exceptions.DoesNotExistError: DocType KSA VAT Setting ([#35797](https://github.com/frappe/erpnext/issues/35797)) ([3785fe6](3785fe6927)), closes [#35795](https://github.com/frappe/erpnext/issues/35795)
* show non-depreciable assets in fixed asset register (backport [#35858](https://github.com/frappe/erpnext/issues/35858)) ([#35861](https://github.com/frappe/erpnext/issues/35861)) ([2e2c319](2e2c319f20))
* TDS amount calculation post LDC breach ([#35886](https://github.com/frappe/erpnext/issues/35886)) ([4dd088c](4dd088cba4))
* use correct fieldname for purchase receipt column in item_wise_purchase_register report (backport [#35828](https://github.com/frappe/erpnext/issues/35828)) ([#35848](https://github.com/frappe/erpnext/issues/35848)) ([de529f0](de529f0adf))
* **ux:** PO Get Items From Open Material Requests (backport [#35894](https://github.com/frappe/erpnext/issues/35894)) ([#35896](https://github.com/frappe/erpnext/issues/35896)) ([12b6257](12b62571b8))

### Performance Improvements

* improve item wise register reports (backport [#35908](https://github.com/frappe/erpnext/issues/35908)) ([#35912](https://github.com/frappe/erpnext/issues/35912)) ([4134459](41344593c9))
2023-06-28 16:08:20 +00:00
Deepesh Garg
41902c3676 Merge pull request #35902 from frappe/version-13-hotfix
chore: release v13
2023-06-28 21:33:23 +05:30
mergify[bot]
0bcd0476a2 fix: asset movement (backport #35918) (#35924)
* fix: asset movement (#35918)

fix: asset movement fixes
(cherry picked from commit e16c14863b)

# Conflicts:
#	erpnext/assets/doctype/asset_movement/asset_movement.py

* chore: fix conflict

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-28 21:00:02 +05:30
mergify[bot]
41344593c9 perf: improve item wise register reports (backport #35908) (#35912)
perf: improve item wise register reports (#35908)

(cherry picked from commit 33ee01174b)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-28 10:25:33 +05:30
mergify[bot]
bcfd7708f2 fix: filter parent warehouses not showing (backport #35897) (#35900)
* fix: filter parent warehouses not showing (#35897)

(cherry picked from commit af418d2342)

* chore: add company filter for parent warehouse

---------

Co-authored-by: HLD <hanglaoda@hotmail.com>
Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2023-06-27 14:27:33 +05:30
mergify[bot]
4dd088cba4 fix: TDS amount calculation post LDC breach (#35886)
* fix: TDS amount calculation post LDC breach

(cherry picked from commit 1f9ef6c48f)

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

* chore: resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-06-27 13:12:06 +05:30
mergify[bot]
12b62571b8 fix(ux): PO Get Items From Open Material Requests (backport #35894) (#35896)
fix(ux): PO Get Items From Open Material Requests

(cherry picked from commit 3a00bf83d6)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2023-06-27 12:30:08 +05:30
Ashish Shah
3785fe6927 fix: frappe.exceptions.DoesNotExistError: DocType KSA VAT Setting (#35797)
fix: frappe.exceptions.DoesNotExistError: DocType KSA VAT Setting not found

When migrating from v12->v13 migration fails
While migrating the doctype is not reloaded before adding permission. #35795
2023-06-24 16:40:12 +05:30
mergify[bot]
de529f0adf fix: use correct fieldname for purchase receipt column in item_wise_purchase_register report (backport #35828) (#35848)
fix: use correct fieldname for purchase receipt column in item_wise_purcchase_register report

(cherry picked from commit dcfc86e3af)

Co-authored-by: phot0n <ritwikpuri5678@gmail.com>
2023-06-23 11:37:38 +05:30
mergify[bot]
2e2c319f20 fix: show non-depreciable assets in fixed asset register (backport #35858) (#35861)
fix: show non-depreciable assets in fixed asset register (#35858)

fix: show non-depr assets in fixed asset register
(cherry picked from commit 42d09448ee)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-23 08:25:11 +05:30
mergify[bot]
8939e95c62 chore: asset scrap and restore fixes [v14] (backport #35851) (#35854)
* chore: asset scrap and restore fixes [v14] (#35851)

chore: better err msg on cancelling JE for asset scrap and allow restoring non-depr assets
(cherry picked from commit 69780da099)

# Conflicts:
#	erpnext/assets/doctype/asset/depreciation.py

* chore: fix conflict

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-22 23:01:59 +05:30
Rucha Mahabal
6c4dff38da fix: employee link fields in payroll reports (#619) (#35845) 2023-06-22 18:10:54 +05:30
saeedkola
000ebe4479 Fixes issue of asset value_after_depreciation field getting updated twice if workflow is enabled in Journal Entry (#35821)
* Fixes issue of asset value_after_depreciation field getting updated twice if workflow is enabled in Journal Entry

* chore: remove unnecessary line break

* chore: formatting

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-21 14:42:16 +05:30
Daizy Modi
0fe95bf77e chore: remove whitelisting for methods not used from UI (#35592) 2023-06-21 10:33:28 +05:30
Frappe PR Bot
60a170d1a4 chore(release): Bumped to Version 13.51.6
## [13.51.6](https://github.com/frappe/erpnext/compare/v13.51.5...v13.51.6) (2023-06-21)

### Bug Fixes

* account group totals calculation to consider include_in_gross ([f22969d](f22969d266))
* add total col for gross and net profit ([e899c30](e899c30428))
* add validation for QI in PR (backport [#35677](https://github.com/frappe/erpnext/issues/35677)) ([#35758](https://github.com/frappe/erpnext/issues/35758)) ([0a8b714](0a8b7148a5))
* Allocated amount validation for other party types ([#35741](https://github.com/frappe/erpnext/issues/35741)) ([3d0add8](3d0add81fa))
* date and finance book fixes in fixed asset register (backport [#35751](https://github.com/frappe/erpnext/issues/35751)) ([#35800](https://github.com/frappe/erpnext/issues/35800)) ([aa8446d](aa8446d794))
* don't add GL Entry for Acc. Depr. while scrapping non-depreciable assets (backport [#35714](https://github.com/frappe/erpnext/issues/35714)) ([#35716](https://github.com/frappe/erpnext/issues/35716)) ([0e11317](0e11317303))
* fix get outstanding invoices btn and add get outstanding orders btn (backport [#35776](https://github.com/frappe/erpnext/issues/35776)) ([#35788](https://github.com/frappe/erpnext/issues/35788)) ([04990d5](04990d51db))
* Incorrect field while calculating Tax withholding net total ([571c977](571c977e8e))
* Incorrect field while calculating Tax withholding net total ([b95d459](b95d459812))
* loan interest accrual date ([#35695](https://github.com/frappe/erpnext/issues/35695)) ([46d0b7d](46d0b7d317))

### Performance Improvements

* index `purpose` in `Stock Entry` (backport [#35782](https://github.com/frappe/erpnext/issues/35782)) ([#35784](https://github.com/frappe/erpnext/issues/35784)) ([7239e83](7239e839a0))
2023-06-21 02:06:13 +00:00
Deepesh Garg
51dd0ec876 Merge pull request #35806 from frappe/version-13-hotfix
chore: release v13
2023-06-21 07:34:34 +05:30
mergify[bot]
aa8446d794 fix: date and finance book fixes in fixed asset register (backport #35751) (#35800)
* fix: date and finance book fixes in fixed asset register (#35751)

* fix: handle finance books properly and show all assets by default in fixed asset register

* chore: rename value to depr amount

* chore: get asset value for correct fb properly

* chore: rename include_default_book_entries to include_default_book_assets

(cherry picked from commit 0d12588583)

# Conflicts:
#	erpnext/assets/report/fixed_asset_register/fixed_asset_register.py

* chore: resolving conflicts and renaming entries to assets

* chore: formatting

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-20 13:03:06 +05:30
mergify[bot]
7239e839a0 perf: index purpose in Stock Entry (backport #35782) (#35784)
* perf: index `purpose` in `Stock Entry`

(cherry picked from commit 4f941ac5c0)

# Conflicts:
#	erpnext/stock/doctype/stock_entry/stock_entry.json

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2023-06-20 12:02:04 +05:30
mergify[bot]
04990d51db fix: fix get outstanding invoices btn and add get outstanding orders btn (backport #35776) (#35788)
* fix: fix get outstanding invoices btn and add get outstanding orders btn (#35776)

* fix: fix get outstanding invoices btn and add get outstanding orders btn

* chore: remove unnecessary arg

(cherry picked from commit c1da3ddbbf)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.json
#	erpnext/accounts/doctype/payment_entry/payment_entry.py

* chore: resolving conflicts

* chore: resolving conflicts properly

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-19 20:42:28 +05:30
Frappe PR Bot
0ec74b059e chore(release): Bumped to Version 13.51.5
## [13.51.5](https://github.com/frappe/erpnext/compare/v13.51.4...v13.51.5) (2023-06-19)

### Bug Fixes

* Allocated amount validation for other party types ([#35741](https://github.com/frappe/erpnext/issues/35741)) ([75b3423](75b3423ab1))
2023-06-19 11:38:29 +00:00
Deepesh Garg
2a6e80214c Merge pull request #35775 from frappe/mergify/bp/version-13/pr-35771
fix: Allocated amount validation for other party types (#35741)
2023-06-19 17:06:48 +05:30
ruthra kumar
af10d8080b Merge pull request #35780 from frappe/mergify/bp/version-13-hotfix/pr-35320
fix: Gross and Net Profit Report - incorrect calculation of totals (backport #35320)
2023-06-19 16:48:17 +05:30
Anoop Kurungadam
e899c30428 fix: add total col for gross and net profit
(cherry picked from commit cb9b4fbb91)
2023-06-19 10:26:00 +00:00
Anoop Kurungadam
a53832e16e refactor: merge separate loops for calculating group / leaf node totals
rename function
remove return statement as the list is  mutated

(cherry picked from commit 1a3b9c5bdf)
2023-06-19 10:26:00 +00:00
Anoop Kurungadam
c6885e6789 refactor: remove unused parameters
(cherry picked from commit 50822f207e)
2023-06-19 10:26:00 +00:00
Anoop Kurungadam
f22969d266 fix: account group totals calculation to consider include_in_gross
(cherry picked from commit 8dcb9302b4)
2023-06-19 10:26:00 +00:00
mergify[bot]
75b3423ab1 fix: Allocated amount validation for other party types (#35741)
* fix: Allocated amount validation for other party types (#35741)

* fix: Allocated amount validation for other party types

* chore: Validation for return allocations

* chore: minor typo

---------

Co-authored-by: anandbaburajan <anandbaburajan@gmail.com>
(cherry picked from commit 9d27a25e5f)

* chore: remove unnecessary donor party type check

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
(cherry picked from commit 3d0add81fa)
2023-06-19 07:23:46 +00:00
mergify[bot]
3d0add81fa fix: Allocated amount validation for other party types (#35741)
* fix: Allocated amount validation for other party types (#35741)

* fix: Allocated amount validation for other party types

* chore: Validation for return allocations

* chore: minor typo

---------

Co-authored-by: anandbaburajan <anandbaburajan@gmail.com>
(cherry picked from commit 9d27a25e5f)

* chore: remove unnecessary donor party type check

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-19 12:53:00 +05:30
mergify[bot]
46d0b7d317 fix: loan interest accrual date (#35695)
fix: loan interest accrual date (#35695)

fix: loan interest accrual date

---------

Co-authored-by: Abhinav Raut <abhinav.raut@zerodha.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit 2a24423ad2)

Co-authored-by: Abhinav Raut <abhinavrautcs@gmail.com>
2023-06-19 09:14:01 +05:30
mergify[bot]
0a8b7148a5 fix: add validation for QI in PR (backport #35677) (#35758)
fix: add validation for QI in PR

(cherry picked from commit 2c1ab569a7)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2023-06-17 13:08:06 +05:30
Frappe PR Bot
6400a574b6 chore(release): Bumped to Version 13.51.4
## [13.51.4](https://github.com/frappe/erpnext/compare/v13.51.3...v13.51.4) (2023-06-16)

### Bug Fixes

* Incorrect field while calculating Tax withholding net total ([a98a13b](a98a13b683))
2023-06-16 06:54:26 +00:00
Deepesh Garg
eaa1589331 Merge pull request #35734 from frappe/mergify/bp/version-13/pr-35733
fix: Incorrect field while calculating Tax withholding net total (backport #35733)
2023-06-16 12:22:48 +05:30
Deepesh Garg
d49a8ad74f chore: resolve conflicts 2023-06-16 12:22:23 +05:30
Deepesh Garg
a98a13b683 fix: Incorrect field while calculating Tax withholding net total
(cherry picked from commit 571c977e8e)

# Conflicts:
#	erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
2023-06-16 06:51:29 +00:00
Deepesh Garg
e37b6bbbf1 Merge pull request #35733 from deepeshgarg007/tax_withholding_limit_consumed
fix: Incorrect field while calculating Tax withholding net total
2023-06-16 12:20:44 +05:30
Deepesh Garg
bcc8a45c4e Merge branch 'version-13-hotfix' into tax_withholding_limit_consumed 2023-06-16 12:18:57 +05:30
Deepesh Garg
571c977e8e fix: Incorrect field while calculating Tax withholding net total 2023-06-16 12:17:31 +05:30
Frappe PR Bot
ac9f1fefe6 chore(release): Bumped to Version 13.51.3
## [13.51.3](https://github.com/frappe/erpnext/compare/v13.51.2...v13.51.3) (2023-06-16)

### Bug Fixes

* Incorrect field while calculating Tax withholding net total ([f8a8cf3](f8a8cf3046))
2023-06-16 05:51:43 +00:00
Deepesh Garg
513da54b6d Merge pull request #35731 from frappe/mergify/bp/version-13/pr-35730
fix: Incorrect field while calculating Tax withholding net total (#35730)
2023-06-16 11:20:00 +05:30
Deepesh Garg
f8a8cf3046 fix: Incorrect field while calculating Tax withholding net total
(cherry picked from commit b95d459812)
2023-06-16 05:49:03 +00:00
Deepesh Garg
1685305b53 Merge pull request #35730 from deepeshgarg007/tax_ithholding_v13
fix: Incorrect field while calculating Tax withholding net total
2023-06-16 11:18:22 +05:30
Deepesh Garg
b95d459812 fix: Incorrect field while calculating Tax withholding net total 2023-06-16 11:15:42 +05:30
mergify[bot]
0e11317303 fix: don't add GL Entry for Acc. Depr. while scrapping non-depreciable assets (backport #35714) (#35716)
* fix: don't add GL Entry for Acc. Depr. while scrapping non-depreciable assets (#35714)

fix: on asset scrap, don't add gl entry for acc. depr. if no acc. depr.
(cherry picked from commit bb39a2cac7)

# Conflicts:
#	erpnext/assets/doctype/asset/depreciation.py

* chore: fix conflict

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-15 17:40:42 +05:30
Frappe PR Bot
9a659254e3 chore(release): Bumped to Version 13.51.2
## [13.51.2](https://github.com/frappe/erpnext/compare/v13.51.1...v13.51.2) (2023-06-14)

### Bug Fixes

* **accounts:** validate payment entry references with latest data. (backport [#31166](https://github.com/frappe/erpnext/issues/31166)) ([#35674](https://github.com/frappe/erpnext/issues/35674)) ([4d4f218](4d4f218175))
* Asset Depreciation Ledger Report - Add Total Row Checkbox Enabled ([3831c79](3831c7920d))
* calculate wdv depr schedule properly for existing assets [v13] ([#35615](https://github.com/frappe/erpnext/issues/35615)) ([97f4af8](97f4af8d97))
* CSS not applied to product title (backport [#35582](https://github.com/frappe/erpnext/issues/35582)) ([#35635](https://github.com/frappe/erpnext/issues/35635)) ([1b69b37](1b69b37229))
* don't set default payment amount in case of invoice return (backport [#35645](https://github.com/frappe/erpnext/issues/35645)) ([#35648](https://github.com/frappe/erpnext/issues/35648)) ([8e3636f](8e3636ff53))
* Lower deduction certificate not getting applied ([#35667](https://github.com/frappe/erpnext/issues/35667)) ([c2bf8e3](c2bf8e3502))
* make showing taxes as table in print configurable ([#35672](https://github.com/frappe/erpnext/issues/35672)) ([4c2c037](4c2c037a86))
* Project in item-wise sales register ([#35596](https://github.com/frappe/erpnext/issues/35596)) ([9d5b500](9d5b500060))
* savepoint policy assignment submission, log errors & inform the user about failures ([#35507](https://github.com/frappe/erpnext/issues/35507)) ([4a35ff0](4a35ff0e57))

### Performance Improvements

* refactor `get_all_nodes` in Org Chart ([986a90e](986a90efe0))
2023-06-14 06:09:31 +00:00
Deepesh Garg
e75ca14a88 Merge pull request #35665 from frappe/version-13-hotfix
chore: release v13
2023-06-14 11:37:59 +05:30
mergify[bot]
c2bf8e3502 fix: Lower deduction certificate not getting applied (#35667)
* fix: Lower deduction certificate not getting applied (#35667)

(cherry picked from commit 937c0feefe)

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

* chore: Resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-06-14 09:01:54 +05:30
mergify[bot]
4d4f218175 fix(accounts): validate payment entry references with latest data. (backport #31166) (#35674)
* fix(accounts): validate payment entry references with latest data. (#31166)

* test: payment entry over allocation.

* fix: validate allocated_amount against latest outstanding amount.

* fix: payment entry get outstanding documents for advance payments

* fix: only fetch latest outstanding_amount.

* fix: throw if reference is allocated

* test: throw error if a reference has been partially allocated after inital creation.

* chore: test name

* fix: remove unused part of test

* chore: linter

* chore: more user friendly error messages

* fix: only validate outstanding amount if partly paid and don't filter by cost center

* chore: minor refactor for doc.cost_center

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit 20de27d480)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/test_payment_entry.py

* chore: resolve conflicts

* chore: resolve more conflicts

* chore: don't validate allocated amount in case of donation

---------

Co-authored-by: Devin Slauenwhite <devin.slauenwhite@gmail.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-13 23:01:51 +05:30
mergify[bot]
4c2c037a86 fix: make showing taxes as table in print configurable (#35672)
* fix: make showing taxes as table in print configurable (#35672)

(cherry picked from commit 491a50a027)

# Conflicts:
#	erpnext/accounts/doctype/accounts_settings/accounts_settings.json

* chore: fixing conflicts

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-13 21:38:16 +05:30
mergify[bot]
4f79214ae6 Stock aging report fix when called in dashboard chart (backport #35671) (#35676)
fix: get_range_age conditions fixed (#35671)

see https://github.com/frappe/erpnext/issues/35669

(cherry picked from commit 9f669d4c2f)

Co-authored-by: Hossein Yousefian <86075967+ihosseinu@users.noreply.github.com>
2023-06-13 19:24:21 +05:30
Rucha Mahabal
5b37abd2d6 Merge pull request #35663 from ruchamahabal/perf-org-charts-v13 2023-06-13 13:20:09 +05:30
Rucha Mahabal
a24d488817 test: get children for org chart 2023-06-13 12:29:53 +05:30
Rucha Mahabal
986a90efe0 perf: refactor get_all_nodes in Org Chart 2023-06-13 12:07:15 +05:30
Rucha Mahabal
4a35ff0e57 fix: savepoint policy assignment submission, log errors & inform the user about failures (#35507) 2023-06-13 12:03:55 +05:30
mergify[bot]
8e3636ff53 fix: don't set default payment amount in case of invoice return (backport #35645) (#35648)
* fix: don't set default payment amount in case of invoice return (#35645)

(cherry picked from commit 79483cc90e)

# Conflicts:
#	erpnext/public/js/controllers/taxes_and_totals.js

* chore: fixing conflict

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-06-12 18:44:56 +05:30
Trusted Computer
1b69b37229 fix: CSS not applied to product title (backport #35582) (#35635)
In an erpnext website, the /all-products route shows website items that have been published to the web site.

In the list view (erpnext/e_commerce/product_ui/list.js), the css class is null for the product title. Instead, inline style statements have been added in that can not be modified by overriding CSS.

This fix uses a similar approach to that which is taken in the grid view (erpnext/e_commerce/product_ui/grid.js). It removes the null CSS parameter in the product title link as well as the inline style statement. Then, as in the grid view, the product title is wrapped in a div tag with the product_title CSS class.

This makes it possible to style the product title as desired with a CSS override.
2023-06-12 14:39:41 +05:30
Anand Baburajan
97f4af8d97 fix: calculate wdv depr schedule properly for existing assets [v13] (#35615)
* fix: calculate wdv depr schedule properly for existing assets

* fix: calculate wdv depr schedule properly for existing assets properly
2023-06-08 23:16:35 +05:30
mergify[bot]
9d5b500060 fix: Project in item-wise sales register (#35596)
fix: Project in item-wise sales register (#35596)

(cherry picked from commit f732cac678)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-06-07 22:36:49 +05:30
AJAY NATARAJAN
3831c7920d fix: Asset Depreciation Ledger Report - Add Total Row Checkbox Enabled 2023-06-07 21:48:27 +05:30
Frappe PR Bot
f182fc1f8e chore(release): Bumped to Version 13.51.1
## [13.51.1](https://github.com/frappe/erpnext/compare/v13.51.0...v13.51.1) (2023-06-07)

### Bug Fixes

* Interest Accrual on Loan Topup ([#35555](https://github.com/frappe/erpnext/issues/35555)) ([1415f40](1415f40dfb))
* Task gantt popup style ([5544801](55448017d7))
2023-06-07 06:18:08 +00:00
Deepesh Garg
1897d6f214 Merge pull request #35570 from frappe/version-13-hotfix
chore: release v13
2023-06-07 11:46:43 +05:30
mergify[bot]
1415f40dfb fix: Interest Accrual on Loan Topup (#35555)
fix: Interest Accrual on Loan Topup (#35555)

* fix: Interest Accrual on Loan Topup

* chore: CI

* chore: Ignore test

(cherry picked from commit 2ffcca6f10)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-06-07 10:11:54 +05:30
Suraj Shetty
09cf050b0d Merge pull request #35532 from frappe/mergify/bp/version-13-hotfix/pr-35530
fix: Task gantt popup style and info (backport #35530)
2023-06-02 11:11:35 +05:30
Suraj Shetty
55448017d7 fix: Task gantt popup style
(cherry picked from commit f7b2d103e7)
2023-06-02 05:39:53 +00:00
ruthra kumar
202513ae6a Merge pull request #35520 from frappe/mergify/bp/version-13-hotfix/pr-35112
refactor(Gross Profit): simplify group by invoice logic (backport #35112)
2023-06-01 15:13:02 +05:30
ruthra kumar
e3a8a8d195 refactor: simplify group by invoice logic
(cherry picked from commit 092c4b4c58)
2023-06-01 09:05:35 +00:00
Sagar Vora
169af8f9f8 Merge pull request #35502 from frappe/mergify/bp/version-13-hotfix/pr-35500 2023-05-31 14:46:24 +05:30
Sagar Vora
f0580b0e4d chore: remove whitelisting for method not accessed from UI
(cherry picked from commit 517d8a03ec)
2023-05-31 09:15:46 +00:00
Frappe PR Bot
b5b34c14b2 chore(release): Bumped to Version 13.51.0
# [13.51.0](https://github.com/frappe/erpnext/compare/v13.50.6...v13.51.0) (2023-05-31)

### Bug Fixes

* force to do reposting for cancelled document ([0228933](022893391b))
* **Gross Profit:** 'company' column is ambiguous in filter ([270eb1d](270eb1db4d))
* incorrect `POS Reserved Qty` in `Stock Projected Qty` Report ([#35437](https://github.com/frappe/erpnext/issues/35437)) ([139a193](139a193f1d))
* incorrect depr schedule and posting dates on selling of existing assets [v13] ([#35404](https://github.com/frappe/erpnext/issues/35404)) ([20d3381](20d3381010))
* monthly WDV depr schedule for existing assets [v13] ([#35461](https://github.com/frappe/erpnext/issues/35461)) ([6f43829](6f43829c32))
* retention stock entry: grab conversion factor from source ([d8dd22a](d8dd22adaf))

### Features

* Allow ceil & floor functions in salary slip formulae ([#35475](https://github.com/frappe/erpnext/issues/35475)) ([63fba9d](63fba9db39))
2023-05-31 05:49:42 +00:00
Deepesh Garg
839a1f0454 Merge pull request #35474 from frappe/version-13-hotfix
chore: release v13
2023-05-31 11:14:32 +05:30
Rucha Mahabal
63fba9db39 feat: Allow ceil & floor functions in salary slip formulae (#35475) 2023-05-30 16:11:44 +05:30
Sagar Sharma
00fd08c7bc Merge pull request #35468 from frappe/mergify/bp/version-13-hotfix/pr-35459
fix: retention stock entry: grab conversion factor from source (backport #35459)
2023-05-30 11:30:41 +05:30
Marc de Lima Lucio
d8dd22adaf fix: retention stock entry: grab conversion factor from source
(cherry picked from commit 6954f538c9)
2023-05-30 05:36:33 +00:00
Anand Baburajan
6f43829c32 fix: monthly WDV depr schedule for existing assets [v13] (#35461)
fix: monthly wdv depr schedule for existing assets
2023-05-29 23:18:04 +05:30
Sagar Sharma
3e95d56240 Merge pull request #35456 from frappe/mergify/bp/version-13-hotfix/pr-35328
fix: force to do reposting for cancelled document (backport #35328)
2023-05-29 15:56:54 +05:30
s-aga-r
44cb62824d chore: conflicts 2023-05-29 15:22:22 +05:30
Rohit Waghchaure
022893391b fix: force to do reposting for cancelled document
(cherry picked from commit 6e661e7c0e)

# Conflicts:
#	erpnext/controllers/stock_controller.py
2023-05-29 09:38:35 +00:00
mergify[bot]
139a193f1d fix: incorrect POS Reserved Qty in Stock Projected Qty Report (#35437)
* fix: incorrect `POS Reserved Qty` in `Stock Projected Qty` Report

(cherry picked from commit 027de41600)

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

* chore: `conflicts`

---------

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2023-05-29 09:24:20 +05:30
ruthra kumar
4f5ee6876d Merge pull request #35420 from frappe/mergify/bp/version-13-hotfix/pr-35417
fix(Gross Profit): 'company' column is ambiguous in filter (backport #35417)
2023-05-25 16:44:56 +05:30
ruthra kumar
270eb1db4d fix(Gross Profit): 'company' column is ambiguous in filter
(cherry picked from commit 448712f719)
2023-05-25 09:37:39 +00:00
Anand Baburajan
20d3381010 fix: incorrect depr schedule and posting dates on selling of existing assets [v13] (#35404)
fix: calc depr amount properly on selling of existing assets and fix incorrect posting dates
2023-05-24 14:24:18 +05:30
88 changed files with 1999 additions and 1148 deletions

38
.github/workflows/release_notes.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
# 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

@@ -4,7 +4,7 @@ import frappe
from erpnext.hooks import regional_overrides
__version__ = "13.50.6"
__version__ = "13.52.12"
def get_default_company(user=None):

View File

@@ -40,6 +40,7 @@
"submit_journal_entries",
"print_settings",
"show_inclusive_tax_in_print",
"show_taxes_as_table_in_print",
"column_break_12",
"show_payment_schedule_in_print",
"currency_exchange_section",
@@ -293,6 +294,12 @@
"fieldname": "book_tax_discount_loss",
"fieldtype": "Check",
"label": "Book Tax Loss on Early Payment Discount"
},
{
"default": "0",
"fieldname": "show_taxes_as_table_in_print",
"fieldtype": "Check",
"label": "Show Taxes as Table in Print"
}
],
"icon": "icon-cog",
@@ -300,7 +307,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2023-04-14 17:22:03.680886",
"modified": "2023-06-13 18:47:46.430291",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",

View File

@@ -330,12 +330,10 @@ class JournalEntry(AccountsController):
d.db_update()
def unlink_asset_reference(self):
if self.voucher_type != "Depreciation Entry":
return
for d in self.get("accounts"):
if (
d.reference_type == "Asset"
self.voucher_type == "Depreciation Entry"
and d.reference_type == "Asset"
and d.reference_name
and d.account_type == "Depreciation"
and d.debit
@@ -362,6 +360,15 @@ class JournalEntry(AccountsController):
else:
asset.db_set("value_after_depreciation", asset.value_after_depreciation + d.debit)
asset.set_status()
elif self.voucher_type == "Journal Entry" and d.reference_type == "Asset" and d.reference_name:
journal_entry_for_scrap = frappe.db.get_value(
"Asset", d.reference_name, "journal_entry_for_scrap"
)
if journal_entry_for_scrap == self.name:
frappe.throw(
_("Journal Entry for Asset scrapping cannot be cancelled. Please restore the Asset.")
)
def unlink_inter_company_jv(self):
if (
@@ -393,6 +400,15 @@ class JournalEntry(AccountsController):
d.idx, d.account
)
)
elif (
d.party_type
and frappe.db.get_value("Party Type", d.party_type, "account_type") != account_type
):
frappe.throw(
_("Row {0}: Account {1} and Party Type {2} have different account types").format(
d.idx, d.account, d.party_type
)
)
def check_credit_limit(self):
customers = list(

View File

@@ -623,7 +623,7 @@ frappe.ui.form.on('Payment Entry', {
frm.events.set_unallocated_amount(frm);
},
get_outstanding_invoice: function(frm) {
get_outstanding_invoices_or_orders: function(frm, get_outstanding_invoices, get_orders_to_be_billed) {
const today = frappe.datetime.get_today();
const fields = [
{fieldtype:"Section Break", label: __("Posting Date")},
@@ -653,12 +653,29 @@ frappe.ui.form.on('Payment Entry', {
{fieldtype:"Check", label: __("Allocate Payment Amount"), fieldname:"allocate_payment_amount", default:1},
];
let btn_text = "";
if (get_outstanding_invoices) {
btn_text = "Get Outstanding Invoices";
}
else if (get_orders_to_be_billed) {
btn_text = "Get Outstanding Orders";
}
frappe.prompt(fields, function(filters){
frappe.flags.allocate_payment_amount = true;
frm.events.validate_filters_data(frm, filters);
frm.doc.cost_center = filters.cost_center;
frm.events.get_outstanding_documents(frm, filters);
}, __("Filters"), __("Get Outstanding Documents"));
frm.events.get_outstanding_documents(frm, filters, get_outstanding_invoices, get_orders_to_be_billed);
}, __("Filters"), __(btn_text));
},
get_outstanding_invoices: function(frm) {
frm.events.get_outstanding_invoices_or_orders(frm, true, false);
},
get_outstanding_orders: function(frm) {
frm.events.get_outstanding_invoices_or_orders(frm, false, true);
},
validate_filters_data: function(frm, filters) {
@@ -684,7 +701,7 @@ frappe.ui.form.on('Payment Entry', {
}
},
get_outstanding_documents: function(frm, filters) {
get_outstanding_documents: function(frm, filters, get_outstanding_invoices, get_orders_to_be_billed) {
frm.clear_table("references");
if(!frm.doc.party) {
@@ -708,6 +725,13 @@ frappe.ui.form.on('Payment Entry', {
args[key] = filters[key];
}
if (get_outstanding_invoices) {
args["get_outstanding_invoices"] = true;
}
else if (get_orders_to_be_billed) {
args["get_orders_to_be_billed"] = true;
}
frappe.flags.allocate_payment_amount = filters['allocate_payment_amount'];
return frappe.call({

View File

@@ -48,7 +48,8 @@
"base_received_amount",
"base_received_amount_after_tax",
"section_break_14",
"get_outstanding_invoice",
"get_outstanding_invoices",
"get_outstanding_orders",
"references",
"section_break_34",
"total_allocated_amount",
@@ -353,12 +354,6 @@
"fieldtype": "Section Break",
"label": "Reference"
},
{
"depends_on": "eval:doc.docstatus==0",
"fieldname": "get_outstanding_invoice",
"fieldtype": "Button",
"label": "Get Outstanding Invoice"
},
{
"fieldname": "references",
"fieldtype": "Table",
@@ -726,12 +721,24 @@
"fieldname": "section_break_60",
"fieldtype": "Section Break",
"hide_border": 1
},
{
"depends_on": "eval:doc.docstatus==0",
"fieldname": "get_outstanding_invoices",
"fieldtype": "Button",
"label": "Get Outstanding Invoices"
},
{
"depends_on": "eval:doc.docstatus==0",
"fieldname": "get_outstanding_orders",
"fieldtype": "Button",
"label": "Get Outstanding Orders"
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2022-02-23 20:08:39.559814",
"modified": "2023-06-19 11:38:04.387219",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",

View File

@@ -7,7 +7,16 @@ from functools import reduce
import frappe
from frappe import ValidationError, _, scrub, throw
from frappe.utils import cint, comma_or, flt, get_link_to_form, getdate, nowdate
from frappe.utils import (
cint,
comma_and,
comma_or,
flt,
fmt_money,
get_link_to_form,
getdate,
nowdate,
)
from six import iteritems, string_types
import erpnext
@@ -150,19 +159,68 @@ class PaymentEntry(AccountsController):
)
def validate_allocated_amount(self):
if self.payment_type == "Internal Transfer":
return
if self.party_type in ("Customer", "Supplier"):
self.validate_allocated_amount_with_latest_data()
else:
fail_message = _("Row #{0}: Allocated Amount cannot be greater than outstanding amount.")
for d in self.get("references"):
if (flt(d.allocated_amount)) > 0 and flt(d.allocated_amount) > flt(d.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
# Check for negative outstanding invoices as well
if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(d.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
def validate_allocated_amount_with_latest_data(self):
latest_references = get_outstanding_reference_documents(
{
"posting_date": self.posting_date,
"company": self.company,
"party_type": self.party_type,
"payment_type": self.payment_type,
"party": self.party,
"party_account": self.paid_from if self.payment_type == "Receive" else self.paid_to,
"get_outstanding_invoices": True,
"get_orders_to_be_billed": True,
}
)
# Group latest_references by (voucher_type, voucher_no)
latest_lookup = {}
for d in latest_references:
d = frappe._dict(d)
latest_lookup.update({(d.voucher_type, d.voucher_no): d})
for d in self.get("references"):
if (flt(d.allocated_amount)) > 0:
if flt(d.allocated_amount) > flt(d.outstanding_amount):
frappe.throw(
_("Row #{0}: Allocated Amount cannot be greater than outstanding amount.").format(d.idx)
)
latest = latest_lookup.get((d.reference_doctype, d.reference_name))
# The reference has already been fully paid
if not latest:
frappe.throw(
_("{0} {1} has already been fully paid.").format(_(d.reference_doctype), d.reference_name)
)
# The reference has already been partly paid
elif latest.outstanding_amount < latest.invoice_amount and flt(
d.outstanding_amount, d.precision("outstanding_amount")
) != flt(latest.outstanding_amount, d.precision("outstanding_amount")):
frappe.throw(
_(
"{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts."
).format(_(d.reference_doctype), d.reference_name)
)
fail_message = _("Row #{0}: Allocated Amount cannot be greater than outstanding amount.")
if (flt(d.allocated_amount)) > 0 and flt(d.allocated_amount) > flt(latest.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
# Check for negative outstanding invoices as well
if flt(d.allocated_amount) < 0:
if flt(d.allocated_amount) < flt(d.outstanding_amount):
frappe.throw(
_("Row #{0}: Allocated Amount cannot be greater than outstanding amount.").format(d.idx)
)
if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(latest.outstanding_amount):
frappe.throw(fail_message.format(d.idx))
def delink_advance_entry_references(self):
for reference in self.references:
@@ -270,7 +328,7 @@ class PaymentEntry(AccountsController):
def validate_party_details(self):
if self.party:
if not frappe.db.exists(self.party_type, self.party):
frappe.throw(_("Invalid {0}: {1}").format(self.party_type, self.party))
frappe.throw(_("{0} {1} does not exist").format(_(self.party_type), self.party))
def set_exchange_rate(self, ref_doc=None):
self.set_source_exchange_rate(ref_doc)
@@ -327,7 +385,9 @@ class PaymentEntry(AccountsController):
continue
if d.reference_doctype not in valid_reference_doctypes:
frappe.throw(
_("Reference Doctype must be one of {0}").format(comma_or(valid_reference_doctypes))
_("Reference Doctype must be one of {0}").format(
comma_or((_(d) for d in valid_reference_doctypes))
)
)
elif d.reference_name:
@@ -340,7 +400,7 @@ class PaymentEntry(AccountsController):
if self.party != ref_doc.get(scrub(self.party_type)):
frappe.throw(
_("{0} {1} is not associated with {2} {3}").format(
d.reference_doctype, d.reference_name, self.party_type, self.party
_(d.reference_doctype), d.reference_name, _(self.party_type), self.party
)
)
else:
@@ -361,18 +421,18 @@ class PaymentEntry(AccountsController):
if ref_party_account != self.party_account:
frappe.throw(
_("{0} {1} is associated with {2}, but Party Account is {3}").format(
d.reference_doctype, d.reference_name, ref_party_account, self.party_account
_(d.reference_doctype), d.reference_name, ref_party_account, self.party_account
)
)
if ref_doc.doctype == "Purchase Invoice" and ref_doc.get("on_hold"):
frappe.throw(
_("{0} {1} is on hold").format(d.reference_doctype, d.reference_name),
title=_("Invalid Invoice"),
_("{0} {1} is on hold").format(_(d.reference_doctype), d.reference_name),
title=_("Invalid Purchase Invoice"),
)
if ref_doc.docstatus != 1:
frappe.throw(_("{0} {1} must be submitted").format(d.reference_doctype, d.reference_name))
frappe.throw(_("{0} {1} must be submitted").format(_(d.reference_doctype), d.reference_name))
def validate_paid_invoices(self):
no_oustanding_refs = {}
@@ -388,14 +448,13 @@ class PaymentEntry(AccountsController):
if outstanding_amount <= 0 and not is_return:
no_oustanding_refs.setdefault(d.reference_doctype, []).append(d)
for k, v in no_oustanding_refs.items():
for reference_doctype, references in no_oustanding_refs.items():
frappe.msgprint(
_(
"{} - {} now have {} as they had no outstanding amount left before submitting the Payment Entry."
"References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount."
).format(
_(k),
frappe.bold(", ".join(d.reference_name for d in v)),
frappe.bold(_("negative outstanding amount")),
frappe.bold(comma_and((d.reference_name for d in references))),
_(reference_doctype),
)
+ "<br><br>"
+ _("If this is undesirable please cancel the corresponding Payment Entry."),
@@ -430,7 +489,7 @@ class PaymentEntry(AccountsController):
if not valid:
frappe.throw(
_("Against Journal Entry {0} does not have any unmatched {1} entry").format(
d.reference_name, dr_or_cr
d.reference_name, _(dr_or_cr)
)
)
@@ -497,7 +556,7 @@ class PaymentEntry(AccountsController):
if allocated_amount > outstanding:
frappe.throw(
_("Row #{0}: Cannot allocate more than {1} against payment term {2}").format(
idx, outstanding, key[0]
idx, fmt_money(outstanding), key[0]
)
)
@@ -557,7 +616,9 @@ class PaymentEntry(AccountsController):
if not self.apply_tax_withholding_amount:
return
net_total = self.paid_amount
order_amount = self.get_order_net_total()
net_total = flt(order_amount) + flt(self.unallocated_amount)
# Adding args as purchase invoice to get TDS amount
args = frappe._dict(
@@ -602,6 +663,20 @@ class PaymentEntry(AccountsController):
for d in to_remove:
self.remove(d)
def get_order_net_total(self):
if self.party_type == "Supplier":
doctype = "Purchase Order"
else:
doctype = "Sales Order"
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_net_total)"]
)
return tax_withholding_net_total
def apply_taxes(self):
self.initialize_taxes()
self.determine_exclusive_rate()
@@ -774,7 +849,7 @@ class PaymentEntry(AccountsController):
_("Cannot {0} {1} {2} without any negative outstanding invoice").format(
_(self.payment_type),
(_("to") if self.party_type == "Customer" else _("from")),
self.party_type,
_(self.party_type),
),
InvalidPaymentEntry,
)
@@ -782,7 +857,7 @@ class PaymentEntry(AccountsController):
elif paid_amount - additional_charges > total_negative_outstanding:
frappe.throw(
_("Paid Amount cannot be greater than total negative outstanding amount {0}").format(
total_negative_outstanding
fmt_money(total_negative_outstanding)
),
InvalidPaymentEntry,
)
@@ -1278,6 +1353,9 @@ def get_outstanding_reference_documents(args):
if args.get("party_type") == "Member":
return
if not args.get("get_outstanding_invoices") and not args.get("get_orders_to_be_billed"):
args["get_outstanding_invoices"] = True
# confirm that Supplier is not blocked
if args.get("party_type") == "Supplier":
supplier_status = get_supplier_block_status(args["party"])
@@ -1318,32 +1396,48 @@ def get_outstanding_reference_documents(args):
if args.get("company"):
condition += " and company = {0}".format(frappe.db.escape(args.get("company")))
outstanding_invoices = get_outstanding_invoices(
args.get("party_type"),
args.get("party"),
args.get("party_account"),
args.get("company"),
filters=args,
condition=condition,
)
outstanding_invoices = []
negative_outstanding_invoices = []
outstanding_invoices = split_invoices_based_on_payment_terms(outstanding_invoices)
if args.get("get_outstanding_invoices"):
outstanding_invoices = get_outstanding_invoices(
args.get("party_type"),
args.get("party"),
args.get("party_account"),
args.get("company"),
filters=args,
condition=condition,
)
for d in outstanding_invoices:
d["exchange_rate"] = 1
if party_account_currency != company_currency:
if d.voucher_type in ("Sales Invoice", "Purchase Invoice", "Expense Claim"):
d["exchange_rate"] = frappe.db.get_value(d.voucher_type, d.voucher_no, "conversion_rate")
elif d.voucher_type == "Journal Entry":
d["exchange_rate"] = get_exchange_rate(
party_account_currency, company_currency, d.posting_date
)
if d.voucher_type in ("Purchase Invoice"):
d["bill_no"] = frappe.db.get_value(d.voucher_type, d.voucher_no, "bill_no")
outstanding_invoices = split_invoices_based_on_payment_terms(outstanding_invoices)
for d in outstanding_invoices:
d["exchange_rate"] = 1
if party_account_currency != company_currency:
if d.voucher_type in ("Sales Invoice", "Purchase Invoice", "Expense Claim"):
d["exchange_rate"] = frappe.db.get_value(d.voucher_type, d.voucher_no, "conversion_rate")
elif d.voucher_type == "Journal Entry":
d["exchange_rate"] = get_exchange_rate(
party_account_currency, company_currency, d.posting_date
)
if d.voucher_type in ("Purchase Invoice"):
d["bill_no"] = frappe.db.get_value(d.voucher_type, d.voucher_no, "bill_no")
# Get negative outstanding sales /purchase invoices
negative_outstanding_invoices = []
if args.get("party_type") not in ["Student", "Employee"] and not args.get("voucher_no"):
negative_outstanding_invoices = get_negative_outstanding_invoices(
args.get("party_type"),
args.get("party"),
args.get("party_account"),
party_account_currency,
company_currency,
condition=condition,
)
# Get all SO / PO which are not fully billed or against which full advance not paid
orders_to_be_billed = []
if args.get("party_type") != "Student":
if args.get("get_orders_to_be_billed") and args.get("party_type") != "Student":
orders_to_be_billed = get_orders_to_be_billed(
args.get("posting_date"),
args.get("party_type"),
@@ -1354,25 +1448,22 @@ def get_outstanding_reference_documents(args):
filters=args,
)
# Get negative outstanding sales /purchase invoices
negative_outstanding_invoices = []
if args.get("party_type") not in ["Student", "Employee"] and not args.get("voucher_no"):
negative_outstanding_invoices = get_negative_outstanding_invoices(
args.get("party_type"),
args.get("party"),
args.get("party_account"),
party_account_currency,
company_currency,
condition=condition,
)
data = negative_outstanding_invoices + outstanding_invoices + orders_to_be_billed
if not data:
if args.get("get_outstanding_invoices") and args.get("get_orders_to_be_billed"):
ref_document_type = "invoices or orders"
elif args.get("get_outstanding_invoices"):
ref_document_type = "invoices"
elif args.get("get_orders_to_be_billed"):
ref_document_type = "orders"
frappe.msgprint(
_(
"No outstanding invoices found for the {0} {1} which qualify the filters you have specified."
).format(_(args.get("party_type")).lower(), frappe.bold(args.get("party")))
"No outstanding {0} found for the {1} {2} which qualify the filters you have specified."
).format(
_(ref_document_type), _(args.get("party_type")).lower(), frappe.bold(args.get("party"))
)
)
return data
@@ -1446,66 +1537,71 @@ def get_orders_to_be_billed(
cost_center=None,
filters=None,
):
voucher_type = None
if party_type == "Customer":
voucher_type = "Sales Order"
elif party_type == "Supplier":
voucher_type = "Purchase Order"
elif party_type == "Employee":
voucher_type = None
if not voucher_type:
return []
# Add cost center condition
if voucher_type:
doc = frappe.get_doc({"doctype": voucher_type})
condition = ""
if doc and hasattr(doc, "cost_center"):
condition = " and cost_center='%s'" % cost_center
doc = frappe.get_doc({"doctype": voucher_type})
condition = ""
if doc and hasattr(doc, "cost_center") and doc.cost_center:
condition = " and cost_center='%s'" % cost_center
orders = []
if voucher_type:
if party_account_currency == company_currency:
grand_total_field = "base_grand_total"
rounded_total_field = "base_rounded_total"
else:
grand_total_field = "grand_total"
rounded_total_field = "rounded_total"
if party_account_currency == company_currency:
grand_total_field = "base_grand_total"
rounded_total_field = "base_rounded_total"
else:
grand_total_field = "grand_total"
rounded_total_field = "rounded_total"
orders = frappe.db.sql(
"""
select
name as voucher_no,
if({rounded_total_field}, {rounded_total_field}, {grand_total_field}) as invoice_amount,
(if({rounded_total_field}, {rounded_total_field}, {grand_total_field}) - advance_paid) as outstanding_amount,
transaction_date as posting_date
from
`tab{voucher_type}`
where
{party_type} = %s
and docstatus = 1
and company = %s
and ifnull(status, "") != "Closed"
and if({rounded_total_field}, {rounded_total_field}, {grand_total_field}) > advance_paid
and abs(100 - per_billed) > 0.01
{condition}
order by
transaction_date, name
""".format(
**{
"rounded_total_field": rounded_total_field,
"grand_total_field": grand_total_field,
"voucher_type": voucher_type,
"party_type": scrub(party_type),
"condition": condition,
}
),
(party, company),
as_dict=True,
)
orders = frappe.db.sql(
"""
select
name as voucher_no,
if({rounded_total_field}, {rounded_total_field}, {grand_total_field}) as invoice_amount,
(if({rounded_total_field}, {rounded_total_field}, {grand_total_field}) - advance_paid) as outstanding_amount,
transaction_date as posting_date
from
`tab{voucher_type}`
where
{party_type} = %s
and docstatus = 1
and company = %s
and ifnull(status, "") != "Closed"
and if({rounded_total_field}, {rounded_total_field}, {grand_total_field}) > advance_paid
and abs(100 - per_billed) > 0.01
{condition}
order by
transaction_date, name
""".format(
**{
"rounded_total_field": rounded_total_field,
"grand_total_field": grand_total_field,
"voucher_type": voucher_type,
"party_type": scrub(party_type),
"condition": condition,
}
),
(party, company),
as_dict=True,
)
order_list = []
for d in orders:
if not (
flt(d.outstanding_amount) >= flt(filters.get("outstanding_amt_greater_than"))
and flt(d.outstanding_amount) <= flt(filters.get("outstanding_amt_less_than"))
if (
filters
and filters.get("outstanding_amt_greater_than")
and filters.get("outstanding_amt_less_than")
and not (
flt(filters.get("outstanding_amt_greater_than"))
<= flt(d.outstanding_amount)
<= flt(filters.get("outstanding_amt_less_than"))
)
):
continue
@@ -1526,6 +1622,8 @@ def get_negative_outstanding_invoices(
cost_center=None,
condition=None,
):
if party_type not in ["Customer", "Supplier"]:
return []
voucher_type = "Sales Invoice" if party_type == "Customer" else "Purchase Invoice"
supplier_condition = ""
if voucher_type == "Purchase Invoice":
@@ -1574,7 +1672,7 @@ def get_negative_outstanding_invoices(
def get_party_details(company, party_type, party, date, cost_center=None):
bank_account = ""
if not frappe.db.exists(party_type, party):
frappe.throw(_("Invalid {0}: {1}").format(party_type, party))
frappe.throw(_("{0} {1} does not exist").format(_(party_type), party))
party_account = get_party_account(party_type, party, company)
@@ -1859,7 +1957,7 @@ def get_payment_entry(
if dt in ("Sales Order", "Purchase Order") and flt(doc.per_billed, 2) >= (
100.0 + over_billing_allowance
):
frappe.throw(_("Can only make payment against unbilled {0}").format(dt))
frappe.throw(_("Can only make payment against unbilled {0}").format(_(dt)))
party_type = set_party_type(dt)
party_account = set_party_account(dt, dn, doc, party_type)

View File

@@ -999,6 +999,30 @@ class TestPaymentEntry(unittest.TestCase):
self.assertTrue("is on hold" in str(err.exception).lower())
def test_duplicate_payment_entry_allocate_amount(self):
si = create_sales_invoice()
pe_draft = get_payment_entry("Sales Invoice", si.name)
pe_draft.insert()
pe = get_payment_entry("Sales Invoice", si.name)
pe.submit()
self.assertRaises(frappe.ValidationError, pe_draft.submit)
def test_duplicate_payment_entry_partial_allocate_amount(self):
si = create_sales_invoice()
pe_draft = get_payment_entry("Sales Invoice", si.name)
pe_draft.insert()
pe = get_payment_entry("Sales Invoice", si.name)
pe.received_amount = si.total / 2
pe.references[0].allocated_amount = si.total / 2
pe.submit()
self.assertRaises(frappe.ValidationError, pe_draft.submit)
def create_payment_entry(**args):
payment_entry = frappe.new_doc("Payment Entry")

View File

@@ -345,7 +345,8 @@
"no_copy": 1,
"options": "POS Invoice",
"print_hide": 1,
"read_only": 1
"read_only": 1,
"search_index": 1
},
{
"default": "0",
@@ -1572,7 +1573,7 @@
"icon": "fa fa-file-text",
"is_submittable": 1,
"links": [],
"modified": "2022-09-27 13:00:24.166684",
"modified": "2022-09-30 03:49:50.455199",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Invoice",

View File

@@ -1,9 +1,10 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
import collections
import frappe
from frappe import _
from frappe.query_builder.functions import IfNull, Sum
from frappe.utils import cint, flt, get_link_to_form, getdate, nowdate
from six import iteritems
@@ -43,6 +44,7 @@ class POSInvoice(SalesInvoice):
self.validate_debit_to_acc()
self.validate_write_off_account()
self.validate_change_amount()
self.validate_duplicate_serial_and_batch_no()
self.validate_change_account()
self.validate_item_cost_centers()
self.validate_warehouse()
@@ -153,6 +155,27 @@ class POSInvoice(SalesInvoice):
title=_("Item Unavailable"),
)
def validate_duplicate_serial_and_batch_no(self):
serial_nos = []
batch_nos = []
for row in self.get("items"):
if row.serial_no:
serial_nos = row.serial_no.split("\n")
if row.batch_no and not row.serial_no:
batch_nos.append(row.batch_no)
if serial_nos:
for key, value in collections.Counter(serial_nos).items():
if value > 1:
frappe.throw(_("Duplicate Serial No {0} found").format("key"))
if batch_nos:
for key, value in collections.Counter(batch_nos).items():
if value > 1:
frappe.throw(_("Duplicate Batch No {0} found").format("key"))
def validate_pos_reserved_batch_qty(self, item):
filters = {"item_code": item.item_code, "warehouse": item.warehouse, "batch_no": item.batch_no}
@@ -675,18 +698,22 @@ def get_bin_qty(item_code, warehouse):
def get_pos_reserved_qty(item_code, warehouse):
reserved_qty = frappe.db.sql(
"""select sum(p_item.qty) as qty
from `tabPOS Invoice` p, `tabPOS Invoice Item` p_item
where p.name = p_item.parent
and ifnull(p.consolidated_invoice, '') = ''
and p_item.docstatus = 1
and p_item.item_code = %s
and p_item.warehouse = %s
""",
(item_code, warehouse),
as_dict=1,
)
p_inv = frappe.qb.DocType("POS Invoice")
p_item = frappe.qb.DocType("POS Invoice Item")
reserved_qty = (
frappe.qb.from_(p_inv)
.from_(p_item)
.select(Sum(p_item.qty).as_("qty"))
.where(
(p_inv.name == p_item.parent)
& (IfNull(p_inv.consolidated_invoice, "") == "")
& (p_inv.is_return == 0)
& (p_item.docstatus == 1)
& (p_item.item_code == item_code)
& (p_item.warehouse == warehouse)
)
).run(as_dict=True)
return reserved_qty[0].qty or 0 if reserved_qty else 0
@@ -747,7 +774,3 @@ def add_return_modes(doc, pos_profile):
]:
payment_mode = get_mode_of_payment_info(mode_of_payment, doc.company)
append_payment(payment_mode[0])
def on_doctype_update():
frappe.db.add_index("POS Invoice", ["return_against"])

View File

@@ -1580,6 +1580,52 @@ class TestPurchaseInvoice(unittest.TestCase, StockTestMixin):
self.assertTrue(return_pi.docstatus == 1)
def test_payment_allocation_for_payment_terms(self):
from erpnext.buying.doctype.purchase_order.test_purchase_order import (
create_pr_against_po,
create_purchase_order,
)
from erpnext.selling.doctype.sales_order.test_sales_order import (
automatically_fetch_payment_terms,
)
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import (
make_purchase_invoice as make_pi_from_pr,
)
automatically_fetch_payment_terms()
frappe.db.set_value(
"Payment Terms Template",
"_Test Payment Term Template",
"allocate_payment_based_on_payment_terms",
0,
)
po = create_purchase_order(do_not_save=1)
po.payment_terms_template = "_Test Payment Term Template"
po.save()
po.submit()
pr = create_pr_against_po(po.name, received_qty=4)
pi = make_pi_from_pr(pr.name)
self.assertEqual(pi.payment_schedule[0].payment_amount, 1000)
frappe.db.set_value(
"Payment Terms Template",
"_Test Payment Term Template",
"allocate_payment_based_on_payment_terms",
1,
)
pi = make_pi_from_pr(pr.name)
self.assertEqual(pi.payment_schedule[0].payment_amount, 2500)
automatically_fetch_payment_terms(enable=0)
frappe.db.set_value(
"Payment Terms Template",
"_Test Payment Term Template",
"allocate_payment_based_on_payment_terms",
0,
)
def check_gl_entries(doc, voucher_no, expected_gle, posting_date):
gl_entries = frappe.db.sql(

View File

@@ -176,6 +176,7 @@
"fieldname": "received_qty",
"fieldtype": "Float",
"label": "Received Qty",
"no_copy": 1,
"read_only": 1
},
{
@@ -872,7 +873,7 @@
"idx": 1,
"istable": 1,
"links": [],
"modified": "2022-10-12 03:37:29.032732",
"modified": "2023-07-02 18:39:41.495723",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",

View File

@@ -653,19 +653,6 @@ frappe.ui.form.on('Sales Invoice', {
}
}
// expense account
frm.fields_dict['items'].grid.get_field('expense_account').get_query = function(doc) {
if (erpnext.is_perpetual_inventory_enabled(doc.company)) {
return {
filters: {
'report_type': 'Profit and Loss',
'company': doc.company,
"is_group": 0
}
}
}
}
// discount account
frm.fields_dict['items'].grid.get_field('discount_account').get_query = function(doc) {
return {

View File

@@ -1107,7 +1107,7 @@ class SalesInvoice(SellingController):
if self.is_return:
fixed_asset_gl_entries = get_gl_entries_on_asset_regain(
asset, item.base_net_amount, item.finance_book
asset, item.base_net_amount, item.finance_book, self.posting_date
)
asset.db_set("disposal_date", None)
@@ -1122,7 +1122,7 @@ class SalesInvoice(SellingController):
asset.reload()
fixed_asset_gl_entries = get_gl_entries_on_asset_disposal(
asset, item.base_net_amount, item.finance_book
asset, item.base_net_amount, item.finance_book, self.posting_date
)
asset.db_set("disposal_date", self.posting_date)
@@ -1580,15 +1580,13 @@ class SalesInvoice(SellingController):
frappe.db.set_value("Customer", self.customer, "loyalty_program_tier", lp_details.tier_name)
def get_returned_amount(self):
from frappe.query_builder.functions import Coalesce, Sum
from frappe.query_builder.functions import Sum
doc = frappe.qb.DocType(self.doctype)
returned_amount = (
frappe.qb.from_(doc)
.select(Sum(doc.grand_total))
.where(
(doc.docstatus == 1) & (doc.is_return == 1) & (Coalesce(doc.return_against, "") == self.name)
)
.where((doc.docstatus == 1) & (doc.is_return == 1) & (doc.return_against == self.name))
).run()
return abs(returned_amount[0][0]) if returned_amount[0][0] else 0

View File

@@ -5,7 +5,7 @@
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import cint, getdate
from frappe.utils import cint, flt, getdate
class TaxWithholdingCategory(Document):
@@ -518,10 +518,19 @@ def get_invoice_total_without_tcs(inv, tax_details):
def get_tds_amount_from_ldc(ldc, parties, pan_no, tax_details, posting_date, net_total):
tds_amount = 0
limit_consumed = frappe.db.get_value(
"Purchase Invoice",
{"supplier": ("in", parties), "apply_tds": 1, "docstatus": 1},
"sum(net_total)",
limit_consumed = flt(
frappe.db.get_all(
"Purchase Invoice",
filters={
"supplier": ("in", parties),
"apply_tds": 1,
"docstatus": 1,
"tax_withholding_category": ldc.tax_withholding_category,
"posting_date": ("between", (ldc.valid_from, ldc.valid_upto)),
},
fields=["sum(base_net_total) as limit_consumed"],
)[0].get("limit_consumed")
)
if is_valid_certificate(
@@ -535,10 +544,10 @@ def get_tds_amount_from_ldc(ldc, parties, pan_no, tax_details, posting_date, net
def get_ltds_amount(current_amount, deducted_amount, certificate_limit, rate, tax_details):
if current_amount < (certificate_limit - deducted_amount):
if certificate_limit - flt(deducted_amount) - flt(current_amount) >= 0:
return current_amount * rate / 100
else:
ltds_amount = certificate_limit - deducted_amount
ltds_amount = certificate_limit - flt(deducted_amount)
tds_amount = current_amount - ltds_amount
return ltds_amount * rate / 100 + tds_amount * tax_details.rate / 100
@@ -549,9 +558,9 @@ def is_valid_certificate(
):
valid = False
if (
getdate(valid_from) <= getdate(posting_date) <= getdate(valid_upto)
) and certificate_limit > deducted_amount:
available_amount = flt(certificate_limit) - flt(deducted_amount)
if (getdate(valid_from) <= getdate(posting_date) <= getdate(valid_upto)) and available_amount > 0:
valid = True
return valid

View File

@@ -186,6 +186,42 @@ class TestTaxWithholdingCategory(unittest.TestCase):
for d in reversed(invoices):
d.cancel()
def test_tds_deduction_for_po_via_payment_entry(self):
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
frappe.db.set_value(
"Supplier", "Test TDS Supplier8", "tax_withholding_category", "Cumulative Threshold TDS"
)
order = create_purchase_order(supplier="Test TDS Supplier8", rate=40000, do_not_save=True)
# Add some tax on the order
order.append(
"taxes",
{
"category": "Total",
"charge_type": "Actual",
"account_head": "_Test Account VAT - _TC",
"cost_center": "Main - _TC",
"tax_amount": 8000,
"description": "Test",
"add_deduct_tax": "Add",
},
)
order.save()
order.apply_tds = 1
order.tax_withholding_category = "Cumulative Threshold TDS"
order.submit()
self.assertEqual(order.taxes[0].tax_amount, 4000)
payment = get_payment_entry(order.doctype, order.name)
payment.apply_tax_withholding_amount = 1
payment.tax_withholding_category = "Cumulative Threshold TDS"
payment.submit()
self.assertEqual(payment.taxes[0].tax_amount, 4000)
def test_multi_category_single_supplier(self):
frappe.db.set_value(
"Supplier", "Test TDS Supplier5", "tax_withholding_category", "Test Service Category"
@@ -275,6 +311,37 @@ def cancel_invoices():
frappe.get_doc("Sales Invoice", d).cancel()
def create_purchase_order(**args):
# return purchase order doc object
item = frappe.db.get_value("Item", {"item_name": "TDS Item"}, "name")
args = frappe._dict(args)
po = frappe.get_doc(
{
"doctype": "Purchase Order",
"transaction_date": today(),
"schedule_date": today(),
"apply_tds": 0 if args.do_not_apply_tds else 1,
"supplier": args.supplier,
"company": "_Test Company",
"taxes_and_charges": "",
"currency": "INR",
"taxes": [],
"items": [
{
"doctype": "Purchase Order Item",
"item_code": item,
"qty": args.qty or 1,
"rate": args.rate or 10000,
"cost_center": "Main - _TC",
"expense_account": "Stock Received But Not Billed - _TC",
}
],
}
)
po.save()
return po
def create_purchase_invoice(**args):
# return sales invoice doc object
item = frappe.db.get_value("Item", {"item_name": "TDS Item"}, "name")
@@ -351,6 +418,8 @@ def create_records():
"Test TDS Supplier4",
"Test TDS Supplier5",
"Test TDS Supplier6",
"Test TDS Supplier7",
"Test TDS Supplier8",
]:
if frappe.db.exists("Supplier", name):
continue

View File

@@ -1,20 +1,23 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2016-04-08 14:49:58.133098",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 2,
"is_standard": "Yes",
"modified": "2017-02-24 20:08:26.084484",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Depreciation Ledger",
"owner": "Administrator",
"ref_doctype": "Asset",
"report_name": "Asset Depreciation Ledger",
"report_type": "Script Report",
"add_total_row": 1,
"columns": [],
"creation": "2016-04-08 14:49:58.133098",
"disable_prepared_report": 0,
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"filters": [],
"idx": 2,
"is_standard": "Yes",
"modified": "2023-06-06 09:00:07.435151",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Depreciation Ledger",
"owner": "Administrator",
"prepared_report": 0,
"ref_doctype": "Asset",
"report_name": "Asset Depreciation Ledger",
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"

View File

@@ -1,20 +1,23 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2016-04-08 14:56:37.235981",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 2,
"is_standard": "Yes",
"modified": "2017-02-24 20:08:18.660476",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Depreciations and Balances",
"owner": "Administrator",
"ref_doctype": "Asset",
"report_name": "Asset Depreciations and Balances",
"report_type": "Script Report",
"add_total_row": 1,
"columns": [],
"creation": "2016-04-08 14:56:37.235981",
"disable_prepared_report": 0,
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"filters": [],
"idx": 2,
"is_standard": "Yes",
"modified": "2023-06-06 11:33:29.611277",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Depreciations and Balances",
"owner": "Administrator",
"prepared_report": 0,
"ref_doctype": "Asset",
"report_name": "Asset Depreciations and Balances",
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"

View File

@@ -125,12 +125,14 @@ def get_revenue(data, period_list, include_in_gross=1):
data_to_be_removed = True
while data_to_be_removed:
revenue, data_to_be_removed = remove_parent_with_no_child(revenue, period_list)
revenue = adjust_account(revenue, period_list)
revenue, data_to_be_removed = remove_parent_with_no_child(revenue)
adjust_account_totals(revenue, period_list)
return copy.deepcopy(revenue)
def remove_parent_with_no_child(data, period_list):
def remove_parent_with_no_child(data):
data_to_be_removed = False
for parent in data:
if "is_group" in parent and parent.get("is_group") == 1:
@@ -147,16 +149,19 @@ def remove_parent_with_no_child(data, period_list):
return data, data_to_be_removed
def adjust_account(data, period_list, consolidated=False):
leaf_nodes = [item for item in data if item["is_group"] == 0]
def adjust_account_totals(data, period_list):
totals = {}
for node in leaf_nodes:
set_total(node, node["total"], data, totals)
for d in data:
for period in period_list:
key = period if consolidated else period.key
d["total"] = totals[d["account"]]
return data
for d in reversed(data):
if d.get("is_group"):
for period in period_list:
# reset totals for group accounts as totals set by get_data doesn't consider include_in_gross check
d[period.key] = sum(
item[period.key] for item in data if item.get("parent_account") == d.get("account")
)
else:
set_total(d, d["total"], data, totals)
d["total"] = totals[d["account"]]
def set_total(node, value, complete_list, totals):
@@ -191,6 +196,9 @@ def get_profit(
if profit_loss[key]:
has_value = True
if not profit_loss.get("total"):
profit_loss["total"] = 0
profit_loss["total"] += profit_loss[key]
if has_value:
return profit_loss
@@ -229,6 +237,9 @@ def get_net_profit(
if profit_loss[key]:
has_value = True
if not profit_loss.get("total"):
profit_loss["total"] = 0
profit_loss["total"] += profit_loss[key]
if has_value:
return profit_loss

View File

@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from collections import OrderedDict
import frappe
from frappe import _, qb, scrub
@@ -666,7 +667,7 @@ class GrossProfitGenerator(object):
def load_invoice_items(self):
conditions = ""
if self.filters.company:
conditions += " and company = %(company)s"
conditions += " and `tabSales Invoice`.company = %(company)s"
if self.filters.from_date:
conditions += " and posting_date >= %(from_date)s"
if self.filters.to_date:
@@ -760,30 +761,30 @@ class GrossProfitGenerator(object):
Turns list of Sales Invoice Items to a tree of Sales Invoices with their Items as children.
"""
parents = []
grouped = OrderedDict()
for row in self.si_list:
if row.parent not in parents:
parents.append(row.parent)
# initialize list with a header row for each new parent
grouped.setdefault(row.parent, [self.get_invoice_row(row)]).append(
row.update(
{"indent": 1.0, "parent_invoice": row.parent, "invoice_or_item": row.item_code}
) # descendant rows will have indent: 1.0 or greater
)
parents_index = 0
for index, row in enumerate(self.si_list):
if parents_index < len(parents) and row.parent == parents[parents_index]:
invoice = self.get_invoice_row(row)
self.si_list.insert(index, invoice)
parents_index += 1
# if item is a bundle, add it's components as seperate rows
if frappe.db.exists("Product Bundle", row.item_code):
bundled_items = self.get_bundle_items(row)
for x in bundled_items:
bundle_item = self.get_bundle_item_row(row, x)
grouped.get(row.parent).append(bundle_item)
else:
# skipping the bundle items rows
if not row.indent:
row.indent = 1.0
row.parent_invoice = row.parent
row.invoice_or_item = row.item_code
self.si_list.clear()
if frappe.db.exists("Product Bundle", row.item_code):
self.add_bundle_items(row, index)
for items in grouped.values():
self.si_list.extend(items)
def get_invoice_row(self, row):
# header row format
return frappe._dict(
{
"parent_invoice": "",
@@ -812,13 +813,6 @@ class GrossProfitGenerator(object):
}
)
def add_bundle_items(self, product_bundle, index):
bundle_items = self.get_bundle_items(product_bundle)
for i, item in enumerate(bundle_items):
bundle_item = self.get_bundle_item_row(product_bundle, item)
self.si_list.insert((index + i + 1), bundle_item)
def get_bundle_items(self, product_bundle):
return frappe.get_all(
"Product Bundle Item", filters={"parent": product_bundle.item_code}, fields=["item_code", "qty"]

View File

@@ -87,7 +87,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
"project": d.project,
"company": d.company,
"purchase_order": d.purchase_order,
"purchase_receipt": d.purchase_receipt,
"purchase_receipt": purchase_receipt,
"expense_account": expense_account,
"stock_qty": d.stock_qty,
"stock_uom": d.stock_uom,
@@ -241,7 +241,7 @@ def get_columns(additional_table_columns, filters):
},
{
"label": _("Purchase Receipt"),
"fieldname": "Purchase Receipt",
"fieldname": "purchase_receipt",
"fieldtype": "Link",
"options": "Purchase Receipt",
"width": 100,

View File

@@ -399,8 +399,9 @@ def get_items(filters, additional_query_columns, additional_conditions=None):
`tabSales Invoice`.posting_date, `tabSales Invoice`.debit_to,
`tabSales Invoice`.unrealized_profit_loss_account,
`tabSales Invoice`.is_internal_customer,
`tabSales Invoice`.project, `tabSales Invoice`.customer, `tabSales Invoice`.remarks,
`tabSales Invoice`.customer, `tabSales Invoice`.remarks,
`tabSales Invoice`.territory, `tabSales Invoice`.company, `tabSales Invoice`.base_net_total,
`tabSales Invoice Item`.project,
`tabSales Invoice Item`.item_code, `tabSales Invoice Item`.description,
`tabSales Invoice Item`.`item_name`, `tabSales Invoice Item`.`item_group`,
`tabSales Invoice Item`.sales_order, `tabSales Invoice Item`.delivery_note,

View File

@@ -810,7 +810,7 @@ def get_held_invoices(party_type, party):
if party_type == "Supplier":
held_invoices = frappe.db.sql(
"select name from `tabPurchase Invoice` where release_date IS NOT NULL and release_date > CURDATE()",
"select name from `tabPurchase Invoice` where on_hold = 1 and release_date IS NOT NULL and release_date > CURDATE()",
as_dict=1,
)
held_invoices = set(d["name"] for d in held_invoices)

View File

@@ -27,6 +27,7 @@ from erpnext.accounts.general_ledger import make_reverse_gl_entries
from erpnext.assets.doctype.asset.depreciation import (
get_depreciation_accounts,
get_disposal_account_and_cost_center,
is_first_day_of_the_month,
is_last_day_of_the_month,
)
from erpnext.assets.doctype.asset_category.asset_category import get_asset_category_account
@@ -147,17 +148,33 @@ class Asset(AccountsController):
frappe.throw(_("Item {0} must be a non-stock item").format(self.item_code))
def validate_cost_center(self):
if not self.cost_center:
return
cost_center_company = frappe.db.get_value("Cost Center", self.cost_center, "company")
if cost_center_company != self.company:
frappe.throw(
_("Selected Cost Center {} doesn't belongs to {}").format(
frappe.bold(self.cost_center), frappe.bold(self.company)
),
title=_("Invalid Cost Center"),
if self.cost_center:
cost_center_company, cost_center_is_group = frappe.db.get_value(
"Cost Center", self.cost_center, ["company", "is_group"]
)
if cost_center_company != self.company:
frappe.throw(
_("Cost Center {} doesn't belong to Company {}").format(
frappe.bold(self.cost_center), frappe.bold(self.company)
),
title=_("Invalid Cost Center"),
)
if cost_center_is_group:
frappe.throw(
_(
"Cost Center {} is a group cost center and group cost centers cannot be used in transactions"
).format(frappe.bold(self.cost_center)),
title=_("Invalid Cost Center"),
)
else:
if not frappe.get_cached_value("Company", self.company, "depreciation_cost_center"):
frappe.throw(
_(
"Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {}"
).format(frappe.bold(self.company)),
title=_("Missing Cost Center"),
)
def validate_in_use_date(self):
if not self.available_for_use_date:
@@ -339,13 +356,9 @@ class Asset(AccountsController):
if should_get_last_day:
schedule_date = get_last_day(schedule_date)
# schedule date will be a year later from start date
# so monthly schedule date is calculated by removing 11 months from it
monthly_schedule_date = add_months(schedule_date, -finance_book.frequency_of_depreciation + 1)
# if asset is being sold
if date_of_disposal:
from_date = self.get_from_date(finance_book.finance_book)
from_date = self.get_from_date_for_disposal(finance_book)
depreciation_amount, days, months = self.get_pro_rata_amt(
finance_book,
depreciation_amount,
@@ -369,9 +382,9 @@ class Asset(AccountsController):
# For first row
if (
(has_pro_rata or has_wdv_or_dd_non_yearly_pro_rata)
n == 0
and (has_pro_rata or has_wdv_or_dd_non_yearly_pro_rata)
and not self.opening_accumulated_depreciation
and n == 0
):
from_date = add_days(
self.available_for_use_date, -1
@@ -383,10 +396,26 @@ class Asset(AccountsController):
finance_book.depreciation_start_date,
has_wdv_or_dd_non_yearly_pro_rata,
)
# For first depr schedule date will be the start date
# so monthly schedule date is calculated by removing month difference between use date and start date
monthly_schedule_date = add_months(finance_book.depreciation_start_date, -months + 1)
elif n == 0 and has_wdv_or_dd_non_yearly_pro_rata and self.opening_accumulated_depreciation:
if not is_first_day_of_the_month(getdate(self.available_for_use_date)):
from_date = get_last_day(
add_months(
getdate(self.available_for_use_date),
((self.number_of_depreciations_booked - 1) * finance_book.frequency_of_depreciation),
)
)
else:
from_date = add_months(
getdate(add_days(self.available_for_use_date, -1)),
(self.number_of_depreciations_booked * finance_book.frequency_of_depreciation),
)
depreciation_amount, days, months = self.get_pro_rata_amt(
finance_book,
depreciation_amount,
from_date,
finance_book.depreciation_start_date,
has_wdv_or_dd_non_yearly_pro_rata,
)
# For last row
elif has_pro_rata and n == cint(number_of_pending_depreciations) - 1:
@@ -411,9 +440,7 @@ class Asset(AccountsController):
depreciation_amount_without_pro_rata, depreciation_amount, finance_book.finance_book
)
monthly_schedule_date = add_months(schedule_date, 1)
schedule_date = add_days(schedule_date, days)
last_schedule_date = schedule_date
if not depreciation_amount:
continue
@@ -490,16 +517,19 @@ class Asset(AccountsController):
for idx, s in enumerate(self.schedules, 1):
s.idx = idx
def get_from_date(self, finance_book):
def get_from_date_for_disposal(self, finance_book):
if not self.get("schedules"):
return self.available_for_use_date
return add_months(
getdate(self.available_for_use_date),
(self.number_of_depreciations_booked * finance_book.frequency_of_depreciation),
)
if len(self.finance_books) == 1:
return self.schedules[-1].schedule_date
from_date = ""
for schedule in self.get("schedules"):
if schedule.finance_book == finance_book:
if schedule.finance_book == finance_book.finance_book:
from_date = schedule.schedule_date
if from_date:

View File

@@ -8,6 +8,7 @@ from frappe.utils import (
add_months,
cint,
flt,
get_first_day,
get_last_day,
get_link_to_form,
getdate,
@@ -32,6 +33,7 @@ def post_depreciation_entries(date=None):
date = today()
failed_asset_names = []
error_log_names = []
for asset_name in get_depreciable_assets(date):
try:
@@ -40,10 +42,12 @@ def post_depreciation_entries(date=None):
except Exception as e:
frappe.db.rollback()
failed_asset_names.append(asset_name)
error_log = frappe.log_error(e)
error_log_names.append(error_log.name)
if failed_asset_names:
set_depr_entry_posting_status_for_failed_assets(failed_asset_names)
notify_depr_entry_posting_error(failed_asset_names)
notify_depr_entry_posting_error(failed_asset_names, error_log_names)
frappe.db.commit()
@@ -135,15 +139,15 @@ def make_depreciation_entry(asset_name, date=None):
je.flags.ignore_permissions = True
je.flags.planned_depr_entry = True
je.save()
if not je.meta.get_workflow():
je.submit()
d.db_set("journal_entry", je.name)
idx = cint(d.finance_book_id)
finance_books = asset.get("finance_books")[idx - 1]
finance_books.value_after_depreciation -= d.depreciation_amount
finance_books.db_update()
if not je.meta.get_workflow():
je.submit()
idx = cint(d.finance_book_id)
finance_books = asset.get("finance_books")[idx - 1]
finance_books.value_after_depreciation -= d.depreciation_amount
finance_books.db_update()
asset.db_set("depr_entry_posting_status", "Successful")
@@ -215,7 +219,7 @@ def set_depr_entry_posting_status_for_failed_assets(failed_asset_names):
frappe.db.set_value("Asset", asset_name, "depr_entry_posting_status", "Failed")
def notify_depr_entry_posting_error(failed_asset_names):
def notify_depr_entry_posting_error(failed_asset_names, error_log_names):
recipients = get_users_with_role("Accounts Manager")
if not recipients:
@@ -223,7 +227,8 @@ def notify_depr_entry_posting_error(failed_asset_names):
subject = _("Error while posting depreciation entries")
asset_links = get_comma_separated_asset_links(failed_asset_names)
asset_links = get_comma_separated_links(failed_asset_names, "Asset")
error_log_links = get_comma_separated_links(error_log_names, "Error Log")
message = (
_("Hello,")
@@ -233,23 +238,26 @@ def notify_depr_entry_posting_error(failed_asset_names):
)
+ "."
+ "<br><br>"
+ _(
"Please raise a support ticket and share this email, or forward this email to your development team so that they can find the issue in the developer console by manually creating the depreciation entry via the asset's depreciation schedule table."
+ _("Here are the error logs for the aforementioned failed depreciation entries: {0}").format(
error_log_links
)
+ "."
+ "<br><br>"
+ _("Please share this email with your support team so that they can find and fix the issue.")
)
frappe.sendmail(recipients=recipients, subject=subject, message=message)
def get_comma_separated_asset_links(asset_names):
asset_links = []
def get_comma_separated_links(names, doctype):
links = []
for asset_name in asset_names:
asset_links.append(get_link_to_form("Asset", asset_name))
for name in names:
links.append(get_link_to_form(doctype, name))
asset_links = ", ".join(asset_links)
links = ", ".join(links)
return asset_links
return links
@frappe.whitelist()
@@ -279,7 +287,7 @@ def scrap_asset(asset_name):
je.company = asset.company
je.remark = "Scrap Entry for asset {0}".format(asset_name)
for entry in get_gl_entries_on_asset_disposal(asset):
for entry in get_gl_entries_on_asset_disposal(asset, date):
entry.update({"reference_type": "Asset", "reference_name": asset_name})
je.append("accounts", entry)
@@ -343,6 +351,9 @@ def modify_depreciation_schedule_for_asset_repairs(asset):
def reverse_depreciation_entry_made_after_disposal(asset, date):
from erpnext.accounts.doctype.journal_entry.journal_entry import make_reverse_journal_entry
if not asset.calculate_depreciation:
return
row = -1
finance_book = asset.get("schedules")[0].get("finance_book")
for schedule in asset.get("schedules"):
@@ -403,7 +414,10 @@ def disposal_happens_in_the_future(posting_date_of_disposal):
return False
def get_gl_entries_on_asset_regain(asset, selling_amount=0, finance_book=None):
def get_gl_entries_on_asset_regain(asset, selling_amount=0, finance_book=None, date=None):
if not date:
date = getdate()
(
fixed_asset_account,
asset,
@@ -420,23 +434,30 @@ def get_gl_entries_on_asset_regain(asset, selling_amount=0, finance_book=None):
"debit_in_account_currency": asset.gross_purchase_amount,
"debit": asset.gross_purchase_amount,
"cost_center": depreciation_cost_center,
"posting_date": date,
},
{
"account": accumulated_depr_account,
"credit_in_account_currency": accumulated_depr_amount,
"credit": accumulated_depr_amount,
"cost_center": depreciation_cost_center,
"posting_date": date,
},
]
profit_amount = abs(flt(value_after_depreciation)) - abs(flt(selling_amount))
if profit_amount:
get_profit_gl_entries(profit_amount, gl_entries, disposal_account, depreciation_cost_center)
get_profit_gl_entries(
profit_amount, gl_entries, disposal_account, depreciation_cost_center, date
)
return gl_entries
def get_gl_entries_on_asset_disposal(asset, selling_amount=0, finance_book=None):
def get_gl_entries_on_asset_disposal(asset, selling_amount=0, finance_book=None, date=None):
if not date:
date = getdate()
(
fixed_asset_account,
asset,
@@ -453,18 +474,26 @@ def get_gl_entries_on_asset_disposal(asset, selling_amount=0, finance_book=None)
"credit_in_account_currency": asset.gross_purchase_amount,
"credit": asset.gross_purchase_amount,
"cost_center": depreciation_cost_center,
},
{
"account": accumulated_depr_account,
"debit_in_account_currency": accumulated_depr_amount,
"debit": accumulated_depr_amount,
"cost_center": depreciation_cost_center,
"posting_date": date,
},
]
if accumulated_depr_amount:
gl_entries.append(
{
"account": accumulated_depr_account,
"debit_in_account_currency": accumulated_depr_amount,
"debit": accumulated_depr_amount,
"cost_center": depreciation_cost_center,
"posting_date": date,
},
)
profit_amount = flt(selling_amount) - flt(value_after_depreciation)
if profit_amount:
get_profit_gl_entries(profit_amount, gl_entries, disposal_account, depreciation_cost_center)
get_profit_gl_entries(
profit_amount, gl_entries, disposal_account, depreciation_cost_center, date
)
return gl_entries
@@ -491,7 +520,12 @@ def get_asset_details(asset, finance_book=None):
)
def get_profit_gl_entries(profit_amount, gl_entries, disposal_account, depreciation_cost_center):
def get_profit_gl_entries(
profit_amount, gl_entries, disposal_account, depreciation_cost_center, date=None
):
if not date:
date = getdate()
debit_or_credit = "debit" if profit_amount < 0 else "credit"
gl_entries.append(
{
@@ -499,6 +533,7 @@ def get_profit_gl_entries(profit_amount, gl_entries, disposal_account, depreciat
"cost_center": depreciation_cost_center,
debit_or_credit: abs(profit_amount),
debit_or_credit + "_in_account_currency": abs(profit_amount),
"posting_date": date,
}
)
@@ -523,3 +558,9 @@ def is_last_day_of_the_month(date):
last_day_of_the_month = get_last_day(date)
return getdate(last_day_of_the_month) == getdate(date)
def is_first_day_of_the_month(date):
first_day_of_the_month = get_first_day(date)
return getdate(first_day_of_the_month) == getdate(date)

View File

@@ -298,6 +298,79 @@ class TestAsset(AssetSetup):
si.cancel()
self.assertEqual(frappe.db.get_value("Asset", asset.name, "status"), "Partially Depreciated")
def test_gle_made_by_asset_sale_for_existing_asset(self):
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
asset = create_asset(
calculate_depreciation=1,
available_for_use_date="2020-04-01",
purchase_date="2020-04-01",
expected_value_after_useful_life=0,
total_number_of_depreciations=5,
number_of_depreciations_booked=2,
frequency_of_depreciation=12,
depreciation_start_date="2023-03-31",
opening_accumulated_depreciation=24000,
gross_purchase_amount=60000,
submit=1,
)
expected_depr_values = [
["2023-03-31", 12000, 36000],
["2024-03-31", 12000, 48000],
["2025-03-31", 12000, 60000],
]
for i, schedule in enumerate(asset.schedules):
self.assertEqual(getdate(expected_depr_values[i][0]), schedule.schedule_date)
self.assertEqual(expected_depr_values[i][1], schedule.depreciation_amount)
self.assertEqual(expected_depr_values[i][2], schedule.accumulated_depreciation_amount)
post_depreciation_entries(date="2023-03-31")
si = create_sales_invoice(
item_code="Macbook Pro", asset=asset.name, qty=1, rate=40000, posting_date=getdate("2023-05-23")
)
asset.load_from_db()
self.assertEqual(frappe.db.get_value("Asset", asset.name, "status"), "Sold")
expected_values = [["2023-03-31", 12000, 36000], ["2023-05-23", 1742.47, 37742.47]]
for i, schedule in enumerate(asset.schedules):
self.assertEqual(getdate(expected_values[i][0]), schedule.schedule_date)
self.assertEqual(expected_values[i][1], schedule.depreciation_amount)
self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount)
self.assertTrue(schedule.journal_entry)
expected_gle = (
(
"_Test Accumulated Depreciations - _TC",
37742.47,
0.0,
),
(
"_Test Fixed Asset - _TC",
0.0,
60000.0,
),
(
"_Test Gain/Loss on Asset Disposal - _TC",
0.0,
17742.47,
),
("Debtors - _TC", 40000.0, 0.0),
)
gle = frappe.db.sql(
"""select account, debit, credit from `tabGL Entry`
where voucher_type='Sales Invoice' and voucher_no = %s
order by account""",
si.name,
)
self.assertSequenceEqual(gle, expected_gle)
def test_asset_with_maintenance_required_status_after_sale(self):
asset = create_asset(
calculate_depreciation=1,
@@ -613,14 +686,14 @@ class TestDepreciationMethods(AssetSetup):
number_of_depreciations_booked=1,
opening_accumulated_depreciation=50000,
expected_value_after_useful_life=10000,
depreciation_start_date="2030-12-31",
depreciation_start_date="2031-12-31",
total_number_of_depreciations=3,
frequency_of_depreciation=12,
)
self.assertEqual(asset.status, "Draft")
expected_schedules = [["2030-12-31", 33333.50, 83333.50], ["2031-12-31", 6666.50, 90000.0]]
expected_schedules = [["2031-12-31", 33333.50, 83333.50], ["2032-12-31", 6666.50, 90000.0]]
schedules = [
[cstr(d.schedule_date), d.depreciation_amount, d.accumulated_depreciation_amount]

View File

@@ -33,6 +33,7 @@ frappe.ui.form.on('Asset Category', {
var d = locals[cdt][cdn];
return {
"filters": {
"account_type": "Depreciation",
"root_type": ["in", ["Expense", "Income"]],
"is_group": 0,
"company": d.company_name

View File

@@ -53,7 +53,7 @@ class AssetCategory(Document):
account_type_map = {
"fixed_asset_account": {"account_type": ["Fixed Asset"]},
"accumulated_depreciation_account": {"account_type": ["Accumulated Depreciation"]},
"depreciation_expense_account": {"root_type": ["Expense", "Income"]},
"depreciation_expense_account": {"account_type": ["Depreciation"]},
"capital_work_in_progress_account": {"account_type": ["Capital Work in Progress"]},
}
for d in self.accounts:
@@ -96,7 +96,6 @@ class AssetCategory(Document):
frappe.throw(msg, title=_("Missing Account"))
@frappe.whitelist()
def get_asset_category_account(
fieldname, item=None, asset=None, account=None, asset_category=None, company=None
):

View File

@@ -63,26 +63,28 @@ frappe.ui.form.on('Asset Movement', {
fieldnames_to_be_altered = {
target_location: { read_only: 0, reqd: 1 },
source_location: { read_only: 1, reqd: 0 },
from_employee: { read_only: 0, reqd: 1 },
from_employee: { read_only: 0, reqd: 0 },
to_employee: { read_only: 1, reqd: 0 }
};
}
else if (frm.doc.purpose === 'Issue') {
fieldnames_to_be_altered = {
target_location: { read_only: 1, reqd: 0 },
source_location: { read_only: 1, reqd: 1 },
source_location: { read_only: 1, reqd: 0 },
from_employee: { read_only: 1, reqd: 0 },
to_employee: { read_only: 0, reqd: 1 }
};
}
Object.keys(fieldnames_to_be_altered).forEach(fieldname => {
let property_to_be_altered = fieldnames_to_be_altered[fieldname];
Object.keys(property_to_be_altered).forEach(property => {
let value = property_to_be_altered[property];
frm.set_df_property(fieldname, property, value, cdn, 'assets');
if (fieldnames_to_be_altered) {
Object.keys(fieldnames_to_be_altered).forEach(fieldname => {
let property_to_be_altered = fieldnames_to_be_altered[fieldname];
Object.keys(property_to_be_altered).forEach(property => {
let value = property_to_be_altered[property];
frm.fields_dict['assets'].grid.update_docfield_property(fieldname, property, value);
});
});
});
frm.refresh_field('assets');
frm.refresh_field('assets');
}
}
});

View File

@@ -37,6 +37,7 @@
"reqd": 1
},
{
"default": "Now",
"fieldname": "transaction_date",
"fieldtype": "Datetime",
"in_list_view": 1,
@@ -95,10 +96,11 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2021-01-22 12:30:55.295670",
"modified": "2023-06-28 16:54:26.571083",
"modified_by": "Administrator",
"module": "Assets",
"name": "Asset Movement",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
@@ -148,5 +150,6 @@
}
],
"sort_field": "modified",
"sort_order": "DESC"
"sort_order": "DESC",
"states": []
}

View File

@@ -28,26 +28,20 @@ class AssetMovement(Document):
def validate_location(self):
for d in self.assets:
if self.purpose in ["Transfer", "Issue"]:
if not d.source_location:
d.source_location = frappe.db.get_value("Asset", d.asset, "location")
if not d.source_location:
frappe.throw(_("Source Location is required for the Asset {0}").format(d.asset))
current_location = frappe.db.get_value("Asset", d.asset, "location")
if d.source_location:
current_location = frappe.db.get_value("Asset", d.asset, "location")
if current_location != d.source_location:
frappe.throw(
_("Asset {0} does not belongs to the location {1}").format(d.asset, d.source_location)
)
else:
d.source_location = current_location
if self.purpose == "Issue":
if d.target_location:
frappe.throw(
_(
"Issuing cannot be done to a location. \
Please enter employee who has issued Asset {0}"
"Issuing cannot be done to a location. Please enter employee to issue the Asset {0} to"
).format(d.asset),
title="Incorrect Movement Purpose",
)
@@ -69,28 +63,19 @@ class AssetMovement(Document):
frappe.throw(_("Source and Target Location cannot be same"))
if self.purpose == "Receipt":
# only when asset is bought and first entry is made
if not d.source_location and not (d.target_location or d.to_employee):
if not (d.source_location) and not (d.target_location or d.to_employee):
frappe.throw(
_("Target Location or To Employee is required while receiving Asset {0}").format(d.asset)
)
elif d.source_location:
# when asset is received from an employee
if d.target_location and not d.from_employee:
frappe.throw(
_("From employee is required while receiving Asset {0} to a target location").format(
d.asset
)
)
if d.from_employee and not d.target_location:
frappe.throw(
_("Target Location is required while receiving Asset {0} from an employee").format(d.asset)
)
if d.to_employee and d.target_location:
elif d.to_employee and d.target_location:
frappe.throw(
_(
"Asset {0} cannot be received at a location and \
given to employee in a single movement"
"Asset {0} cannot be received at a location and given to an employee in a single movement"
).format(d.asset)
)
@@ -110,12 +95,12 @@ class AssetMovement(Document):
)
def on_submit(self):
self.set_latest_location_in_asset()
self.set_latest_location_and_custodian_in_asset()
def on_cancel(self):
self.set_latest_location_in_asset()
self.set_latest_location_and_custodian_in_asset()
def set_latest_location_in_asset(self):
def set_latest_location_and_custodian_in_asset(self):
current_location, current_employee = "", ""
cond = "1=1"

View File

@@ -47,7 +47,7 @@ class TestAssetMovement(unittest.TestCase):
if not frappe.db.exists("Location", "Test Location 2"):
frappe.get_doc({"doctype": "Location", "location_name": "Test Location 2"}).insert()
movement1 = create_asset_movement(
create_asset_movement(
purpose="Transfer",
company=asset.company,
assets=[
@@ -58,7 +58,7 @@ class TestAssetMovement(unittest.TestCase):
)
self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location 2")
create_asset_movement(
movement1 = create_asset_movement(
purpose="Transfer",
company=asset.company,
assets=[
@@ -70,21 +70,32 @@ class TestAssetMovement(unittest.TestCase):
self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location")
movement1.cancel()
self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location")
self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location 2")
employee = make_employee("testassetmovemp@example.com", company="_Test Company")
create_asset_movement(
purpose="Issue",
company=asset.company,
assets=[{"asset": asset.name, "source_location": "Test Location", "to_employee": employee}],
assets=[{"asset": asset.name, "source_location": "Test Location 2", "to_employee": employee}],
reference_doctype="Purchase Receipt",
reference_name=pr.name,
)
# after issuing asset should belong to an employee not at a location
# after issuing, asset should belong to an employee not at a location
self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), None)
self.assertEqual(frappe.db.get_value("Asset", asset.name, "custodian"), employee)
create_asset_movement(
purpose="Receipt",
company=asset.company,
assets=[{"asset": asset.name, "from_employee": employee, "target_location": "Test Location"}],
reference_doctype="Purchase Receipt",
reference_name=pr.name,
)
# after receiving, asset should belong to a location not at an employee
self.assertEqual(frappe.db.get_value("Asset", asset.name, "location"), "Test Location")
def test_last_movement_cancellation(self):
pr = make_purchase_receipt(
item_code="Macbook Pro", qty=1, rate=100000.0, location="Test Location"

View File

@@ -19,56 +19,6 @@ frappe.query_reports["Fixed Asset Register"] = {
options: "\nIn Location\nDisposed",
default: 'In Location'
},
{
"fieldname":"filter_based_on",
"label": __("Period Based On"),
"fieldtype": "Select",
"options": ["Fiscal Year", "Date Range"],
"default": "Fiscal Year",
"reqd": 1
},
{
"fieldname":"from_date",
"label": __("Start Date"),
"fieldtype": "Date",
"default": frappe.datetime.add_months(frappe.datetime.nowdate(), -12),
"depends_on": "eval: doc.filter_based_on == 'Date Range'",
"reqd": 1
},
{
"fieldname":"to_date",
"label": __("End Date"),
"fieldtype": "Date",
"default": frappe.datetime.nowdate(),
"depends_on": "eval: doc.filter_based_on == 'Date Range'",
"reqd": 1
},
{
"fieldname":"from_fiscal_year",
"label": __("Start Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": frappe.defaults.get_user_default("fiscal_year"),
"depends_on": "eval: doc.filter_based_on == 'Fiscal Year'",
"reqd": 1
},
{
"fieldname":"to_fiscal_year",
"label": __("End Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": frappe.defaults.get_user_default("fiscal_year"),
"depends_on": "eval: doc.filter_based_on == 'Fiscal Year'",
"reqd": 1
},
{
"fieldname":"date_based_on",
"label": __("Date Based On"),
"fieldtype": "Select",
"options": ["Purchase Date", "Available For Use Date"],
"default": "Purchase Date",
"reqd": 1
},
{
fieldname:"asset_category",
label: __("Asset Category"),
@@ -89,22 +39,67 @@ frappe.query_reports["Fixed Asset Register"] = {
default: "--Select a group--",
reqd: 1
},
{
fieldname:"finance_book",
label: __("Finance Book"),
fieldtype: "Link",
options: "Finance Book",
depends_on: "eval: doc.filter_by_finance_book == 1",
},
{
fieldname:"filter_by_finance_book",
label: __("Filter by Finance Book"),
fieldtype: "Check"
},
{
fieldname:"only_existing_assets",
label: __("Only existing assets"),
fieldtype: "Check"
},
{
fieldname:"finance_book",
label: __("Finance Book"),
fieldtype: "Link",
options: "Finance Book",
},
{
"fieldname": "include_default_book_assets",
"label": __("Include Default Book Assets"),
"fieldtype": "Check",
"default": 1
},
{
"fieldname":"filter_based_on",
"label": __("Period Based On"),
"fieldtype": "Select",
"options": ["--Select a period--", "Fiscal Year", "Date Range"],
"default": "--Select a period--",
},
{
"fieldname":"from_date",
"label": __("Start Date"),
"fieldtype": "Date",
"default": frappe.datetime.add_months(frappe.datetime.nowdate(), -12),
"depends_on": "eval: doc.filter_based_on == 'Date Range'",
},
{
"fieldname":"to_date",
"label": __("End Date"),
"fieldtype": "Date",
"default": frappe.datetime.nowdate(),
"depends_on": "eval: doc.filter_based_on == 'Date Range'",
},
{
"fieldname":"from_fiscal_year",
"label": __("Start Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": frappe.defaults.get_user_default("fiscal_year"),
"depends_on": "eval: doc.filter_based_on == 'Fiscal Year'",
},
{
"fieldname":"to_fiscal_year",
"label": __("End Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": frappe.defaults.get_user_default("fiscal_year"),
"depends_on": "eval: doc.filter_based_on == 'Fiscal Year'",
},
{
"fieldname":"date_based_on",
"label": __("Date Based On"),
"fieldtype": "Select",
"options": ["Purchase Date", "Available For Use Date"],
"default": "Purchase Date",
"depends_on": "eval: doc.filter_based_on == 'Date Range' || doc.filter_based_on == 'Fiscal Year'",
},
]
};

View File

@@ -2,18 +2,20 @@
# For license information, please see license.txt
from itertools import chain
import frappe
from frappe import _
from frappe.query_builder.functions import Sum
from frappe.utils import cstr, flt, formatdate, getdate
from frappe.query_builder.functions import IfNull, Sum
from frappe.utils import add_months, cstr, flt, formatdate, getdate, nowdate, today
from erpnext.accounts.report.financial_statements import (
get_fiscal_year_data,
get_period_list,
validate_fiscal_year,
)
from erpnext.accounts.utils import get_fiscal_year
from erpnext.assets.doctype.asset.asset import get_asset_value_after_depreciation
from erpnext.assets.doctype.asset.depreciation import get_depreciation_accounts
def execute(filters=None):
@@ -36,15 +38,26 @@ def get_conditions(filters):
if filters.get("company"):
conditions["company"] = filters.company
if filters.filter_based_on == "Date Range":
if not filters.from_date and not filters.to_date:
filters.from_date = add_months(nowdate(), -12)
filters.to_date = nowdate()
conditions[date_field] = ["between", [filters.from_date, filters.to_date]]
if filters.filter_based_on == "Fiscal Year":
elif filters.filter_based_on == "Fiscal Year":
if not filters.from_fiscal_year and not filters.to_fiscal_year:
default_fiscal_year = get_fiscal_year(today())[0]
filters.from_fiscal_year = default_fiscal_year
filters.to_fiscal_year = default_fiscal_year
fiscal_year = get_fiscal_year_data(filters.from_fiscal_year, filters.to_fiscal_year)
validate_fiscal_year(fiscal_year, filters.from_fiscal_year, filters.to_fiscal_year)
filters.year_start_date = getdate(fiscal_year.year_start_date)
filters.year_end_date = getdate(fiscal_year.year_end_date)
conditions[date_field] = ["between", [filters.year_start_date, filters.year_end_date]]
if filters.get("only_existing_assets"):
conditions["is_existing_asset"] = filters.get("only_existing_assets")
if filters.get("asset_category"):
@@ -53,69 +66,73 @@ def get_conditions(filters):
conditions["cost_center"] = filters.get("cost_center")
if status:
# In Store assets are those that are not sold or scrapped
# In Store assets are those that are not sold or scrapped or capitalized or decapitalized
operand = "not in"
if status not in "In Location":
operand = "in"
conditions["status"] = (operand, ["Sold", "Scrapped"])
conditions["status"] = (operand, ["Sold", "Scrapped", "Capitalized", "Decapitalized"])
return conditions
def get_data(filters):
data = []
conditions = get_conditions(filters)
depreciation_amount_map = get_finance_book_value_map(filters)
pr_supplier_map = get_purchase_receipt_supplier_map()
pi_supplier_map = get_purchase_invoice_supplier_map()
assets_linked_to_fb = get_assets_linked_to_fb(filters)
company_fb = frappe.get_cached_value("Company", filters.company, "default_finance_book")
if filters.include_default_book_assets and company_fb:
finance_book = company_fb
elif filters.finance_book:
finance_book = filters.finance_book
else:
finance_book = None
depreciation_amount_map = get_asset_depreciation_amount_map(filters, finance_book)
group_by = frappe.scrub(filters.get("group_by"))
if group_by == "asset_category":
fields = ["asset_category", "gross_purchase_amount", "opening_accumulated_depreciation"]
assets_record = frappe.db.get_all("Asset", filters=conditions, fields=fields, group_by=group_by)
if group_by in ("asset_category", "location"):
data = get_group_by_data(group_by, conditions, assets_linked_to_fb, depreciation_amount_map)
return data
elif group_by == "location":
fields = ["location", "gross_purchase_amount", "opening_accumulated_depreciation"]
assets_record = frappe.db.get_all("Asset", filters=conditions, fields=fields, group_by=group_by)
else:
fields = [
"name as asset_id",
"asset_name",
"status",
"department",
"company",
"cost_center",
"calculate_depreciation",
"purchase_receipt",
"asset_category",
"purchase_date",
"gross_purchase_amount",
"location",
"available_for_use_date",
"purchase_invoice",
"opening_accumulated_depreciation",
]
assets_record = frappe.db.get_all("Asset", filters=conditions, fields=fields)
assets_linked_to_fb = None
if filters.filter_by_finance_book:
assets_linked_to_fb = frappe.db.get_all(
doctype="Asset Finance Book",
filters={"finance_book": filters.finance_book or ("is", "not set")},
pluck="parent",
)
fields = [
"name as asset_id",
"asset_name",
"status",
"department",
"company",
"cost_center",
"calculate_depreciation",
"purchase_receipt",
"asset_category",
"purchase_date",
"gross_purchase_amount",
"location",
"available_for_use_date",
"purchase_invoice",
"opening_accumulated_depreciation",
]
assets_record = frappe.db.get_all("Asset", filters=conditions, fields=fields)
for asset in assets_record:
if assets_linked_to_fb and asset.asset_id not in assets_linked_to_fb:
if (
assets_linked_to_fb
and asset.calculate_depreciation
and asset.asset_id not in assets_linked_to_fb
):
continue
asset_value = get_asset_value_after_depreciation(asset.asset_id, filters.finance_book)
asset_value = get_asset_value_after_depreciation(
asset.asset_id, finance_book
) or get_asset_value_after_depreciation(asset.asset_id)
row = {
"asset_id": asset.asset_id,
"asset_name": asset.asset_name,
@@ -126,7 +143,7 @@ def get_data(filters):
or pi_supplier_map.get(asset.purchase_invoice),
"gross_purchase_amount": asset.gross_purchase_amount,
"opening_accumulated_depreciation": asset.opening_accumulated_depreciation,
"depreciated_amount": get_depreciation_amount_of_asset(asset, depreciation_amount_map, filters),
"depreciated_amount": depreciation_amount_map.get(asset.asset_id) or 0.0,
"available_for_use_date": asset.available_for_use_date,
"location": asset.location,
"asset_category": asset.asset_category,
@@ -140,14 +157,23 @@ def get_data(filters):
def prepare_chart_data(data, filters):
labels_values_map = {}
date_field = frappe.scrub(filters.date_based_on)
if filters.filter_based_on not in ("Date Range", "Fiscal Year"):
filters_filter_based_on = "Date Range"
date_field = "purchase_date"
filters_from_date = min(data, key=lambda a: a.get(date_field)).get(date_field)
filters_to_date = max(data, key=lambda a: a.get(date_field)).get(date_field)
else:
filters_filter_based_on = filters.filter_based_on
date_field = frappe.scrub(filters.date_based_on)
filters_from_date = filters.from_date
filters_to_date = filters.to_date
period_list = get_period_list(
filters.from_fiscal_year,
filters.to_fiscal_year,
filters.from_date,
filters.to_date,
filters.filter_based_on,
filters_from_date,
filters_to_date,
filters_filter_based_on,
"Monthly",
company=filters.company,
ignore_fiscal_year=True,
@@ -184,57 +210,127 @@ def prepare_chart_data(data, filters):
}
def get_depreciation_amount_of_asset(asset, depreciation_amount_map, filters):
if asset.calculate_depreciation:
depr_amount = depreciation_amount_map.get(asset.asset_id) or 0.0
else:
depr_amount = get_manual_depreciation_amount_of_asset(asset, filters)
def get_assets_linked_to_fb(filters):
afb = frappe.qb.DocType("Asset Finance Book")
return flt(depr_amount, 2)
def get_finance_book_value_map(filters):
date = filters.to_date if filters.filter_based_on == "Date Range" else filters.year_end_date
return frappe._dict(
frappe.db.sql(
""" Select
parent, SUM(depreciation_amount)
FROM `tabDepreciation Schedule`
WHERE
parentfield='schedules'
AND schedule_date<=%s
AND journal_entry IS NOT NULL
AND ifnull(finance_book, '')=%s
GROUP BY parent""",
(date, cstr(filters.finance_book or "")),
)
query = frappe.qb.from_(afb).select(
afb.parent,
)
if filters.include_default_book_assets:
company_fb = frappe.get_cached_value("Company", filters.company, "default_finance_book")
def get_manual_depreciation_amount_of_asset(asset, filters):
date = filters.to_date if filters.filter_based_on == "Date Range" else filters.year_end_date
if filters.finance_book and company_fb and cstr(filters.finance_book) != cstr(company_fb):
frappe.throw(_("To use a different finance book, please uncheck 'Include Default Book Assets'"))
(_, _, depreciation_expense_account) = get_depreciation_accounts(asset)
query = query.where(
(afb.finance_book.isin([cstr(filters.finance_book), cstr(company_fb), ""]))
| (afb.finance_book.isnull())
)
else:
query = query.where(
(afb.finance_book.isin([cstr(filters.finance_book), ""])) | (afb.finance_book.isnull())
)
assets_linked_to_fb = list(chain(*query.run(as_list=1)))
return assets_linked_to_fb
def get_asset_depreciation_amount_map(filters, finance_book):
start_date = (
filters.from_date if filters.filter_based_on == "Date Range" else filters.year_start_date
)
end_date = filters.to_date if filters.filter_based_on == "Date Range" else filters.year_end_date
asset = frappe.qb.DocType("Asset")
gle = frappe.qb.DocType("GL Entry")
aca = frappe.qb.DocType("Asset Category Account")
company = frappe.qb.DocType("Company")
result = (
query = (
frappe.qb.from_(gle)
.select(Sum(gle.debit))
.where(gle.against_voucher == asset.asset_id)
.where(gle.account == depreciation_expense_account)
.join(asset)
.on(gle.against_voucher == asset.name)
.join(aca)
.on((aca.parent == asset.asset_category) & (aca.company_name == asset.company))
.join(company)
.on(company.name == asset.company)
.select(asset.name.as_("asset"), Sum(gle.debit).as_("depreciation_amount"))
.where(
gle.account == IfNull(aca.depreciation_expense_account, company.depreciation_expense_account)
)
.where(gle.debit != 0)
.where(gle.is_cancelled == 0)
.where(gle.posting_date <= date)
).run()
.where(company.name == filters.company)
.where(asset.docstatus == 1)
)
if result and result[0] and result[0][0]:
depr_amount = result[0][0]
if filters.only_existing_assets:
query = query.where(asset.is_existing_asset == 1)
if filters.asset_category:
query = query.where(asset.asset_category == filters.asset_category)
if filters.cost_center:
query = query.where(asset.cost_center == filters.cost_center)
if filters.status:
if filters.status == "In Location":
query = query.where(asset.status.notin(["Sold", "Scrapped", "Capitalized", "Decapitalized"]))
else:
query = query.where(asset.status.isin(["Sold", "Scrapped", "Capitalized", "Decapitalized"]))
if finance_book:
query = query.where(
(gle.finance_book.isin([cstr(finance_book), ""])) | (gle.finance_book.isnull())
)
else:
depr_amount = 0
query = query.where((gle.finance_book.isin([""])) | (gle.finance_book.isnull()))
if filters.filter_based_on in ("Date Range", "Fiscal Year"):
query = query.where(gle.posting_date >= start_date)
query = query.where(gle.posting_date <= end_date)
return depr_amount
query = query.groupby(asset.name)
asset_depr_amount_map = query.run()
return dict(asset_depr_amount_map)
def get_group_by_data(group_by, conditions, assets_linked_to_fb, depreciation_amount_map):
fields = [
group_by,
"name",
"gross_purchase_amount",
"opening_accumulated_depreciation",
"calculate_depreciation",
]
assets = frappe.db.get_all("Asset", filters=conditions, fields=fields)
data = []
for a in assets:
if assets_linked_to_fb and a.calculate_depreciation and a.name not in assets_linked_to_fb:
continue
a["depreciated_amount"] = depreciation_amount_map.get(a["name"], 0.0)
a["asset_value"] = (
a["gross_purchase_amount"] - a["opening_accumulated_depreciation"] - a["depreciated_amount"]
)
del a["name"]
del a["calculate_depreciation"]
idx = ([i for i, d in enumerate(data) if a[group_by] == d[group_by]] or [None])[0]
if idx is None:
data.append(a)
else:
for field in (
"gross_purchase_amount",
"opening_accumulated_depreciation",
"depreciated_amount",
"asset_value",
):
data[idx][field] = data[idx][field] + a[field]
return data
def get_purchase_receipt_supplier_map():
@@ -275,35 +371,35 @@ def get_columns(filters):
"fieldtype": "Link",
"fieldname": frappe.scrub(filters.get("group_by")),
"options": filters.get("group_by"),
"width": 120,
"width": 216,
},
{
"label": _("Gross Purchase Amount"),
"fieldname": "gross_purchase_amount",
"fieldtype": "Currency",
"options": "company:currency",
"width": 100,
"width": 250,
},
{
"label": _("Opening Accumulated Depreciation"),
"fieldname": "opening_accumulated_depreciation",
"fieldtype": "Currency",
"options": "company:currency",
"width": 90,
"width": 250,
},
{
"label": _("Depreciated Amount"),
"fieldname": "depreciated_amount",
"fieldtype": "Currency",
"options": "company:currency",
"width": 100,
"width": 250,
},
{
"label": _("Asset Value"),
"fieldname": "asset_value",
"fieldtype": "Currency",
"options": "company:currency",
"width": 100,
"width": 250,
},
]

View File

@@ -242,7 +242,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
source_name: this.frm.doc.supplier,
target: this.frm,
setters: {
company: me.frm.doc.company
company: this.frm.doc.company
},
get_query_filters: {
docstatus: ["!=", 2],

View File

@@ -84,7 +84,7 @@ def get_data(conditions, filters):
and po.docstatus = 1
{0}
GROUP BY poi.name
ORDER BY po.transaction_date ASC
ORDER BY po.transaction_date ASC, poi.item_code ASC
""".format(
conditions
),

View File

@@ -891,6 +891,9 @@ class AccountsController(TransactionBase):
return is_inclusive
def should_show_taxes_as_table_in_print(self):
return cint(frappe.db.get_single_value("Accounts Settings", "show_taxes_as_table_in_print"))
def validate_advance_entries(self):
order_field = "sales_order" if self.doctype == "Sales Invoice" else "purchase_order"
order_list = list(set(d.get(order_field) for d in self.get("items") if d.get(order_field)))
@@ -1632,8 +1635,13 @@ class AccountsController(TransactionBase):
)
self.append("payment_schedule", data)
allocate_payment_based_on_payment_terms = frappe.db.get_value(
"Payment Terms Template", self.payment_terms_template, "allocate_payment_based_on_payment_terms"
)
if not (
automatically_fetch_payment_terms
and allocate_payment_based_on_payment_terms
and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype)
):
for d in self.get("payment_schedule"):

View File

@@ -30,10 +30,16 @@ def set_print_templates_for_taxes(doc, settings):
doc.print_templates.update(
{
"total": "templates/print_formats/includes/total.html",
"taxes": "templates/print_formats/includes/taxes.html",
}
)
if not doc.should_show_taxes_as_table_in_print():
doc.print_templates.update(
{
"taxes": "templates/print_formats/includes/taxes.html",
}
)
def format_columns(display_columns, compact_fields):
compact_fields = compact_fields + ["image", "item_code", "item_name"]

View File

@@ -678,7 +678,7 @@ class StockController(AccountsController):
message += _("Please adjust the qty or edit {0} to proceed.").format(rule_link)
return message
def repost_future_sle_and_gle(self):
def repost_future_sle_and_gle(self, force=False):
args = frappe._dict(
{
"posting_date": self.posting_date,
@@ -689,7 +689,10 @@ class StockController(AccountsController):
}
)
if future_sle_exists(args) or repost_required_for_queue(self):
if self.docstatus == 2:
force = True
if force or future_sle_exists(args) or repost_required_for_queue(self):
item_based_reposting = cint(
frappe.db.get_single_value("Stock Reposting Settings", "item_based_reposting")
)

View File

@@ -188,7 +188,8 @@
"in_list_view": 1,
"label": "Item Group",
"options": "Item Group",
"read_only": 1
"read_only": 1,
"search_index": 1
},
{
"default": "1",
@@ -234,7 +235,8 @@
"fieldname": "brand",
"fieldtype": "Link",
"label": "Brand",
"options": "Brand"
"options": "Brand",
"search_index": 1
},
{
"collapsible": 1,
@@ -346,7 +348,7 @@
"index_web_pages_for_search": 1,
"links": [],
"make_attachments_public": 1,
"modified": "2022-09-13 04:05:11.614087",
"modified": "2022-09-30 04:01:52.090732",
"modified_by": "Administrator",
"module": "E-commerce",
"name": "Website Item",

View File

@@ -409,9 +409,6 @@ def on_doctype_update():
# since route is a Text column, it needs a length for indexing
frappe.db.add_index("Website Item", ["route(500)"])
frappe.db.add_index("Website Item", ["item_group"])
frappe.db.add_index("Website Item", ["brand"])
def check_if_user_is_customer(user=None):
from frappe.contacts.doctype.contact.contact import get_contact_name

View File

@@ -78,9 +78,10 @@ erpnext.ProductList = class {
let title_html = `<div style="display: flex; margin-left: -15px;">`;
title_html += `
<div class="col-8" style="margin-right: -15px;">
<a class="" href="/${ item.route || '#' }"
style="color: var(--gray-800); font-weight: 500;">
<a href="/${ item.route || '#' }">
<div class="product-title">
${ title }
</div>
</a>
</div>
`;
@@ -201,4 +202,4 @@ erpnext.ProductList = class {
}
}
};
};

View File

@@ -108,8 +108,8 @@ class EmployeeAdvance(Document):
EmployeeAdvanceOverPayment,
)
if flt(return_amount) > self.paid_amount - self.claimed_amount:
frappe.throw(_("Return amount cannot be greater unclaimed amount"))
if flt(return_amount) > 0 and flt(return_amount) > (self.paid_amount - self.claimed_amount):
frappe.throw(_("Return amount cannot be greater than unclaimed amount"))
self.db_set("paid_amount", paid_amount)
self.db_set("return_amount", return_amount)

View File

@@ -333,7 +333,6 @@ def get_leave_allocation_for_period(
).run()[0][0] or 0.0
@frappe.whitelist()
def get_carry_forwarded_leaves(employee, leave_type, date, carry_forward=None):
"""Returns carry forwarded leaves for the given employee"""
unused_leaves = 0.0

View File

@@ -8,7 +8,15 @@ from math import ceil
import frappe
from frappe import _, bold
from frappe.model.document import Document
from frappe.utils import date_diff, flt, formatdate, get_last_day, get_link_to_form, getdate
from frappe.utils import (
comma_and,
date_diff,
flt,
formatdate,
get_last_day,
get_link_to_form,
getdate,
)
from six import string_types
@@ -66,7 +74,6 @@ class LeavePolicyAssignment(Document):
).format(frappe.bold(get_link_to_form("Leave Type", leave_type.name)))
frappe.msgprint(msg, indicator="orange", alert=True)
@frappe.whitelist()
def grant_leave_alloc_for_employee(self):
if self.leaves_allocated:
frappe.throw(_("Leave already have been assigned for this Leave Policy Assignment"))
@@ -207,7 +214,6 @@ def add_current_month_if_applicable(months_passed, date_of_joining, based_on_doj
@frappe.whitelist()
def create_assignment_for_multiple_employees(employees, data):
if isinstance(employees, string_types):
employees = json.loads(employees)
@@ -215,6 +221,8 @@ def create_assignment_for_multiple_employees(employees, data):
data = frappe._dict(json.loads(data))
docs_name = []
failed = []
for employee in employees:
assignment = frappe.new_doc("Leave Policy Assignment")
assignment.employee = employee
@@ -225,18 +233,45 @@ def create_assignment_for_multiple_employees(employees, data):
assignment.leave_period = data.leave_period or None
assignment.carry_forward = data.carry_forward
assignment.save()
try:
assignment.submit()
except frappe.exceptions.ValidationError:
continue
frappe.db.commit()
savepoint = "before_assignment_submission"
try:
frappe.db.savepoint(savepoint)
assignment.submit()
except Exception as e:
frappe.db.rollback(save_point=savepoint)
frappe.log_error(title=f"Leave Policy Assignment submission failed for {assignment.name}")
failed.append(assignment.name)
docs_name.append(assignment.name)
if failed:
show_assignment_submission_status(failed)
return docs_name
def show_assignment_submission_status(failed):
frappe.clear_messages()
assignment_list = [get_link_to_form("Leave Policy Assignment", entry) for entry in failed]
msg = _("Failed to submit some leave policy assignments:")
msg += " " + comma_and(assignment_list, False) + "<hr>"
msg += (
_("Check {0} for more details")
.format("<a href='/app/List/Error Log?reference_doctype=Leave Policy Assignment'>{0}</a>")
.format(_("Error Log"))
)
frappe.msgprint(
msg,
indicator="red",
title=_("Submission Failed"),
is_minimizable=True,
)
def get_leave_type_details():
leave_type_details = frappe._dict()
leave_types = frappe.get_all(

View File

@@ -52,7 +52,7 @@ frappe.listview_settings['Leave Policy Assignment'] = {
get_query() {
let filters = {"is_active": 1};
if (cur_dialog.fields_dict.company.value)
filters["company"] = cur_dialog.fields_dict.company.value;
filters["company"] = cur_dialog?.fields_dict?.company?.value;
return {
filters: filters

View File

@@ -1,4 +1,5 @@
import frappe
from frappe.query_builder.functions import Count
@frappe.whitelist()
@@ -15,31 +16,34 @@ def get_children(parent=None, company=None, exclude_node=None):
if exclude_node:
filters.append(["name", "!=", exclude_node])
employees = frappe.get_list(
employees = frappe.get_all(
"Employee",
fields=["employee_name as name", "name as id", "reports_to", "image", "designation as title"],
fields=[
"employee_name as name",
"name as id",
"lft",
"rgt",
"reports_to",
"image",
"designation as title",
],
filters=filters,
order_by="name",
)
for employee in employees:
is_expandable = frappe.db.count("Employee", filters={"reports_to": employee.get("id")})
employee.connections = get_connections(employee.id)
employee.expandable = 1 if is_expandable else 0
employee.connections = get_connections(employee.id, employee.lft, employee.rgt)
employee.expandable = bool(employee.connections)
return employees
def get_connections(employee):
num_connections = 0
def get_connections(employee: str, lft: int, rgt: int) -> int:
Employee = frappe.qb.DocType("Employee")
query = (
frappe.qb.from_(Employee)
.select(Count(Employee.name))
.where((Employee.lft > lft) & (Employee.rgt < rgt))
).run()
nodes_to_expand = frappe.get_list("Employee", filters=[["reports_to", "=", employee]])
num_connections += len(nodes_to_expand)
while nodes_to_expand:
parent = nodes_to_expand.pop(0)
descendants = frappe.get_list("Employee", filters=[["reports_to", "=", parent.name]])
num_connections += len(descendants)
nodes_to_expand.extend(descendants)
return num_connections
return query[0][0]

View File

@@ -0,0 +1,52 @@
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import unittest
import frappe
from frappe.tests.utils import FrappeTestCase
from erpnext.hr.doctype.employee.test_employee import make_employee
from erpnext.hr.page.organizational_chart.organizational_chart import get_children
class TestOrganizationalChart(FrappeTestCase):
def setUp(self):
self.company = create_company("Test Org Chart").name
frappe.db.delete("Employee", {"company": self.company})
def test_get_children(self):
company = create_company("Test Org Chart").name
emp1 = make_employee("testemp1@mail.com", company=self.company)
emp2 = make_employee("testemp2@mail.com", company=self.company, reports_to=emp1)
emp3 = make_employee("testemp3@mail.com", company=self.company, reports_to=emp1)
make_employee("testemp4@mail.com", company=self.company, reports_to=emp2)
# root node
children = get_children(company=self.company)
self.assertEqual(len(children), 1)
self.assertEqual(children[0].id, emp1)
self.assertEqual(children[0].connections, 3)
# root's children
children = get_children(parent=emp1, company=self.company)
self.assertEqual(len(children), 2)
self.assertEqual(children[0].id, emp2)
self.assertEqual(children[0].connections, 1)
self.assertEqual(children[1].id, emp3)
self.assertEqual(children[1].connections, 0)
def create_company(name):
if frappe.db.exists("Company", name):
return frappe.get_doc("Company", name)
company = frappe.new_doc("Company")
company.update(
{
"company_name": name,
"default_currency": "USD",
"country": "United States",
}
)
return company.insert()

View File

@@ -160,4 +160,3 @@ class TestLoanDisbursement(unittest.TestCase):
interest = per_day_interest * 15
self.assertEqual(amounts["pending_principal_amount"], 1500000)
self.assertEqual(amounts["interest_amount"], flt(interest + previous_interest, 2))

View File

@@ -22,7 +22,7 @@ class LoanInterestAccrual(AccountsController):
frappe.throw(_("Interest Amount or Principal Amount is mandatory"))
if not self.last_accrual_date:
self.last_accrual_date = get_last_accrual_date(self.loan)
self.last_accrual_date = get_last_accrual_date(self.loan, self.posting_date)
def on_submit(self):
self.make_gl_entries()
@@ -274,14 +274,14 @@ def make_loan_interest_accrual_entry(args):
def get_no_of_days_for_interest_accural(loan, posting_date):
last_interest_accrual_date = get_last_accrual_date(loan.name)
last_interest_accrual_date = get_last_accrual_date(loan.name, posting_date)
no_of_days = date_diff(posting_date or nowdate(), last_interest_accrual_date) + 1
return no_of_days
def get_last_accrual_date(loan):
def get_last_accrual_date(loan, posting_date):
last_posting_date = frappe.db.sql(
""" SELECT MAX(posting_date) from `tabLoan Interest Accrual`
WHERE loan = %s and docstatus = 1""",
@@ -289,12 +289,30 @@ def get_last_accrual_date(loan):
)
if last_posting_date[0][0]:
last_interest_accrual_date = last_posting_date[0][0]
# interest for last interest accrual date is already booked, so add 1 day
return add_days(last_posting_date[0][0], 1)
last_disbursement_date = get_last_disbursement_date(loan, posting_date)
if last_disbursement_date and getdate(last_disbursement_date) > add_days(
getdate(last_interest_accrual_date), 1
):
last_interest_accrual_date = last_disbursement_date
return add_days(last_interest_accrual_date, 1)
else:
return frappe.db.get_value("Loan", loan, "disbursement_date")
def get_last_disbursement_date(loan, posting_date):
last_disbursement_date = frappe.db.get_value(
"Loan Disbursement",
{"docstatus": 1, "against_loan": loan, "posting_date": ("<", posting_date)},
"MAX(posting_date)",
)
return last_disbursement_date
def days_in_year(year):
days = 365

View File

@@ -102,7 +102,7 @@ class LoanRepayment(AccountsController):
if flt(self.total_interest_paid, precision) > flt(self.interest_payable, precision):
if not self.is_term_loan:
# get last loan interest accrual date
last_accrual_date = get_last_accrual_date(self.against_loan)
last_accrual_date = get_last_accrual_date(self.against_loan, self.posting_date)
# get posting date upto which interest has to be accrued
per_day_interest = get_per_day_interest(
@@ -250,6 +250,9 @@ class LoanRepayment(AccountsController):
)
def check_future_accruals(self):
if self.is_term_loan:
return
future_accrual_date = frappe.db.get_value(
"Loan Interest Accrual",
{"posting_date": (">", self.posting_date), "docstatus": 1, "loan": self.against_loan},
@@ -724,7 +727,7 @@ def get_amounts(amounts, against_loan, posting_date):
if due_date:
pending_days = date_diff(posting_date, due_date) + 1
else:
last_accrual_date = get_last_accrual_date(against_loan_doc.name)
last_accrual_date = get_last_accrual_date(against_loan_doc.name, posting_date)
pending_days = date_diff(posting_date, last_accrual_date) + 1
if pending_days > 0:

View File

@@ -79,6 +79,7 @@ class BOMUpdateLog(Document):
else:
frappe.enqueue(
method="erpnext.manufacturing.doctype.bom_update_log.bom_update_log.process_boms_cost_level_wise",
queue="long",
update_doc=self,
now=frappe.flags.in_test,
)

View File

@@ -157,12 +157,21 @@ def get_next_higher_level_boms(
def get_leaf_boms() -> List[str]:
"Get BOMs that have no dependencies."
return frappe.db.sql_list(
"""select name from `tabBOM` bom
where docstatus=1 and is_active=1
and not exists(select bom_no from `tabBOM Item`
where parent=bom.name and ifnull(bom_no, '')!='')"""
)
bom = frappe.qb.DocType("BOM")
bom_item = frappe.qb.DocType("BOM Item")
boms = (
frappe.qb.from_(bom)
.left_join(bom_item)
.on((bom.name == bom_item.parent) & (bom_item.bom_no != ""))
.select(bom.name)
.where((bom.docstatus == 1) & (bom.is_active == 1) & (bom_item.bom_no.isnull()))
.distinct()
).run(as_list=True)
boms = [bom[0] for bom in boms]
return boms
def _generate_dependence_map() -> defaultdict:

View File

@@ -675,10 +675,9 @@ class ProductionPlan(Document):
material_request.flags.ignore_permissions = 1
material_request.run_method("set_missing_values")
material_request.save()
if self.get("submit_material_request"):
material_request.submit()
else:
material_request.save()
frappe.flags.mute_messages = False

View File

@@ -145,7 +145,6 @@ class AdditionalSalary(Document):
return amount_per_day * no_of_days
@frappe.whitelist()
def get_additional_salaries(employee, start_date, end_date, component_type):
from frappe.query_builder import Criterion

View File

@@ -1,17 +1,18 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import datetime
import math
from datetime import date
import frappe
from frappe import _, msgprint
from frappe.model.naming import make_autoname
from frappe.utils import (
add_days,
ceil,
cint,
cstr,
date_diff,
floor,
flt,
formatdate,
get_first_day,
@@ -45,6 +46,7 @@ from erpnext.payroll.doctype.payroll_period.payroll_period import (
get_payroll_period,
get_period_factor,
)
from erpnext.payroll.utils import prepare_error_msg, sanitize_expression
from erpnext.utilities.transaction_base import TransactionBase
@@ -57,8 +59,10 @@ class SalarySlip(TransactionBase):
"float": float,
"long": int,
"round": round,
"date": datetime.date,
"date": date,
"getdate": getdate,
"ceil": ceil,
"floor": floor,
}
def autoname(self):
@@ -723,32 +727,53 @@ class SalarySlip(TransactionBase):
return data, default_data
def eval_condition_and_formula(self, d, data):
def eval_condition_and_formula(self, struct_row, data):
try:
condition = d.condition.strip().replace("\n", " ") if d.condition else None
condition = sanitize_expression(struct_row.condition)
if condition:
if not frappe.safe_eval(condition, self.whitelisted_globals, data):
return None
amount = d.amount
if d.amount_based_on_formula:
formula = d.formula.strip().replace("\n", " ") if d.formula else None
amount = struct_row.amount
if struct_row.amount_based_on_formula:
formula = sanitize_expression(struct_row.formula)
if formula:
amount = flt(frappe.safe_eval(formula, self.whitelisted_globals, data), d.precision("amount"))
amount = flt(
frappe.safe_eval(formula, self.whitelisted_globals, data), struct_row.precision("amount")
)
if amount:
data[d.abbr] = amount
data[struct_row.abbr] = amount
return amount
except NameError as err:
frappe.throw(
_("{0} <br> This error can be due to missing or deleted field.").format(err),
title=_("Name error"),
except NameError as ne:
message = prepare_error_msg(
row=struct_row,
error=ne,
expression=formula or condition,
description=_("This error can be due to missing or deleted field."),
)
except SyntaxError as err:
frappe.throw(_("Syntax error in formula or condition: {0}").format(err))
frappe.throw(message, title=_("Name error"))
except SyntaxError as se:
message = prepare_error_msg(
row=struct_row,
error=se,
expression=formula or condition,
description=_("Please check the syntax of your formula."),
)
frappe.throw(message, title=_("Syntax error"))
except Exception as e:
frappe.throw(_("Error in formula or condition: {0}").format(e))
raise
message = prepare_error_msg(
row=struct_row,
error=e,
expression=formula or condition,
description=_("This error can be due to invalid formula or condition."),
)
frappe.throw(message, title=_("Error in formula or condition"))
def add_employee_benefits(self, payroll_period):
for struct_row in self._salary_structure_doc.get("earnings"):
@@ -959,7 +984,7 @@ class SalarySlip(TransactionBase):
tax_slab.allow_tax_exemption, payroll_period=payroll_period
)
future_structured_taxable_earnings = current_taxable_earnings.taxable_earnings * (
math.ceil(remaining_sub_periods) - 1
ceil(remaining_sub_periods) - 1
)
# get taxable_earnings, addition_earnings for current actual payment days

66
erpnext/payroll/utils.py Normal file
View File

@@ -0,0 +1,66 @@
from typing import Optional
import frappe
from frappe import _
from frappe.utils import get_link_to_form
def sanitize_expression(string: Optional[str] = None) -> Optional[str]:
"""
Sanitizes an expression string by removing leading/trailing spaces, newlines, and line boundaries.
Args:
string (Optional[str]): The input string to be sanitized (default: None).
Returns:
Optional[str]: The sanitized string or None if the input string is empty or None.
Example:
expression = "\r\n gross_pay > 10000\n "
sanitized_expr = sanitize_expression(expression)
"""
if not string:
return None
parts = string.strip().splitlines()
string = " ".join(parts)
return string
def prepare_error_msg(*, row: dict, error: str, expression: str, description: str) -> str:
"""
Prepares an error message string with formatted information about the error.
Args:
row (dict): A dictionary representing the row data.
error (str): The error message.
expression (str): The expression that caused the error.
description (str): Additional description or hint for the error (optional).
Returns:
str: The formatted error message string.
Example:
row = {
"parenttype": "Salary Structure",
"parent": "Salary Structure-00001",
"parentfield": "earnings",
"idx": 1
}
error = "SyntaxError: invalid syntax"
expression = " 200 if (gross_pay>10000 and month!= 'Feb')) else 0 "
description = "Check the syntax of the expression."
error_msg = prepare_error_msg(row=row, error=error, expression=expression, description=description)
"""
msg = _("Error in {0} while evaluating the {1} {2} at row {3}").format(
row.parentfield.title(), row.parenttype, get_link_to_form(row.parenttype, row.parent), row.idx
)
msg += "<br><br>{0}: {1}<br><br>{2}: {3}".format(
frappe.bold(_("Expression:")), expression, frappe.bold(_("Error:")), error
)
if description:
msg += "<br><br>{0}: {1}".format(frappe.bold(_("Hint:")), description)
return msg

View File

@@ -25,20 +25,38 @@ frappe.listview_settings['Task'] = {
}
return [__(doc.status), colors[doc.status], "status,=," + doc.status];
},
gantt_custom_popup_html: function(ganttobj, task) {
var html = `<h5><a style="text-decoration:underline"\
href="/app/task/${ganttobj.id}""> ${ganttobj.name} </a></h5>`;
gantt_custom_popup_html: function (ganttobj, task) {
let html = `
<a class="text-white mb-2 inline-block cursor-pointer"
href="/app/task/${ganttobj.id}"">
${ganttobj.name}
</a>
`;
if(task.project) html += `<p>Project: ${task.project}</p>`;
html += `<p>Progress: ${ganttobj.progress}</p>`;
if (task.project) {
html += `<p class="mb-1">${__("Project")}:
<a class="text-white inline-block"
href="/app/project/${task.project}"">
${task.project}
</a>
</p>`;
}
html += `<p class="mb-1">
${__("Progress")}:
<span class="text-white">${ganttobj.progress}%</span>
</p>`;
if(task._assign_list) {
html += task._assign_list.reduce(
(html, user) => html + frappe.avatar(user)
, '');
if (task._assign) {
const assign_list = JSON.parse(task._assign);
const assignment_wrapper = `
<span>Assigned to:</span>
<span class="text-white">
${assign_list.map((user) => frappe.user_info(user).fullname).join(", ")}
</span>
`;
html += assignment_wrapper;
}
return html;
}
return `<div class="p-3" style="min-width: 220px">${html}</div>`;
},
};

View File

@@ -764,11 +764,13 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
precision("base_grand_total")
);
}
this.frm.doc.payments.find(pay => {
if (pay.default) {
pay.amount = total_amount_to_pay;
}
});
if(!this.frm.doc.is_return){
this.frm.doc.payments.find(payment => {
if (payment.default) {
payment.amount = total_amount_to_pay;
}
});
}
this.frm.refresh_fields();
},

View File

@@ -173,7 +173,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
this.frm.set_query("expense_account", "items", function(doc) {
return {
filters: {
"company": doc.company
"company": doc.company,
"report_type": "Profit and Loss",
"is_group": 0
}
};
});
@@ -1066,6 +1068,16 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
this.frm.set_df_property("conversion_rate", "read_only", erpnext.stale_rate_allowed() ? 0 : 1);
},
apply_discount_on_item: function(doc, cdt, cdn, field) {
var item = frappe.get_doc(cdt, cdn);
if(!item.price_list_rate) {
item[field] = 0.0;
} else {
this.price_list_rate(doc, cdt, cdn);
}
this.set_gross_profit(item);
},
shipping_rule: function() {
var me = this;
if(this.frm.doc.shipping_rule) {
@@ -1718,6 +1730,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
() => {
if(args.items.length) {
me._set_values_for_item_list(r.message.children);
$.each(r.message.children || [], function(i, d) {
me.apply_discount_on_item(d, d.doctype, d.name, 'discount_percentage');
});
}
},
() => { me.in_apply_price_list = false; }

View File

@@ -566,7 +566,6 @@ erpnext.utils.update_child_items = function(opts) {
fields.splice(3, 0, {
fieldtype: 'Float',
fieldname: "conversion_factor",
in_list_view: 1,
label: __("Conversion Factor"),
precision: get_precision('conversion_factor')
})
@@ -574,6 +573,7 @@ erpnext.utils.update_child_items = function(opts) {
new frappe.ui.Dialog({
title: __("Update Items"),
size: "extra-large",
fields: [
{
fieldname: "trans_items",

View File

@@ -1,4 +1,5 @@
{
"actions": [],
"autoname": "format:{####}",
"creation": "2019-05-26 15:03:43.996455",
"doctype": "DocType",
@@ -12,7 +13,6 @@
],
"fields": [
{
"fetch_from": "goal.objective",
"fieldname": "objective",
"fieldtype": "Text",
"in_list_view": 1,
@@ -38,14 +38,17 @@
}
],
"istable": 1,
"modified": "2019-05-26 16:12:54.832058",
"links": [],
"modified": "2023-07-28 18:10:23.351246",
"modified_by": "Administrator",
"module": "Quality Management",
"name": "Quality Goal Objective",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}

View File

@@ -14,7 +14,8 @@
"section_break_4",
"account_number_length",
"column_break_6",
"temporary_against_account_number"
"temporary_against_account_number",
"opening_against_account_number"
],
"fields": [
{
@@ -70,14 +71,23 @@
},
{
"allow_in_quick_entry": 1,
"default": "9999",
"description": "Will be used as against account for all normal ledger entries",
"fieldname": "temporary_against_account_number",
"fieldtype": "Data",
"label": "Temporary Against Account Number",
"reqd": 1
},
{
"default": "9000",
"description": "Will be used as against account for opening ledger entries",
"fieldname": "opening_against_account_number",
"fieldtype": "Data",
"label": "Opening Against Account Number"
}
],
"links": [],
"modified": "2020-11-19 19:00:09.088816",
"modified": "2023-06-30 00:56:59.556731",
"modified_by": "Administrator",
"module": "Regional",
"name": "DATEV Settings",

View File

@@ -1,10 +1,26 @@
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe import _, throw
from frappe.model.document import Document
class DATEVSettings(Document):
pass
def validate(self):
if (
self.temporary_against_account_number
and len(self.temporary_against_account_number) != self.account_number_length
):
throw(
_("Temporary Against Account Number must be {0} digits long").format(
self.account_number_length
)
)
if (
self.opening_against_account_number
and len(self.opening_against_account_number) != self.account_number_length
):
throw(
_("Opening Against Account Number must be {0} digits long").format(self.account_number_length)
)

View File

@@ -132,8 +132,12 @@ def execute(filters=None):
"""Entry point for frappe."""
data = []
if filters and validate(filters):
fn = "temporary_against_account_number"
filters[fn] = frappe.get_value("DATEV Settings", filters.get("company"), fn)
temp, opening = frappe.get_value(
"DATEV Settings",
filters.get("company"),
["temporary_against_account_number", "opening_against_account_number"],
)
filters.update({"against_account": temp, "opening_account": opening or temp})
data = get_transactions(filters, as_dict=0)
return COLUMNS, data
@@ -315,7 +319,7 @@ def run_query(filters, extra_fields, extra_joins, extra_filters, as_dict=1):
acc.account_number as 'Konto',
/* against number or, if empty, party against number */
%(temporary_against_account_number)s as 'Gegenkonto (ohne BU-Schlüssel)',
CASE gl.is_opening when 'Yes' then %(opening_account)s else %(against_account)s end as 'Gegenkonto (ohne BU-Schlüssel)',
'' as 'BU-Schlüssel',
@@ -530,18 +534,22 @@ def download_datev_csv(filters):
filters = json.loads(filters)
validate(filters)
company = filters.get("company")
fiscal_year = get_fiscal_year(date=filters.get("from_date"), company=company)
filters["fiscal_year_start"] = fiscal_year[1]
# set chart of accounts used
coa = frappe.get_value("Company", company, "chart_of_accounts")
filters["skr"] = "04" if "SKR04" in coa else ("03" if "SKR03" in coa else "")
datev_settings = frappe.get_doc("DATEV Settings", company)
filters["account_number_length"] = datev_settings.account_number_length
filters["temporary_against_account_number"] = datev_settings.temporary_against_account_number
filters.update(
{
"fiscal_year_start": fiscal_year[1],
"skr": "04" if "SKR04" in coa else ("03" if "SKR03" in coa else ""),
"account_number_length": datev_settings.account_number_length,
"against_account": datev_settings.temporary_against_account_number,
"opening_account": datev_settings.opening_against_account_number
or datev_settings.temporary_against_account_number,
}
)
transactions = get_transactions(filters)
account_names = get_account_names(filters)

View File

@@ -139,7 +139,9 @@ def make_datev_settings(company):
"client": company.name,
"client_number": "12345",
"consultant_number": "67890",
"account_number_length": 4,
"temporary_against_account_number": "9999",
"opening_against_account_number": "9000",
}
).insert()
@@ -152,7 +154,8 @@ class TestDatev(TestCase):
"company": self.company.name,
"from_date": today(),
"to_date": today(),
"temporary_against_account_number": "9999",
"against_account": "9999",
"opening_account": "9000",
}
make_datev_settings(self.company)

View File

@@ -21,16 +21,14 @@ def get_columns(filters):
columns = [
{
"label": _("Employee"),
"options": "Employee",
"fieldname": "employee",
"fieldtype": "Link",
"options": "Employee",
"width": 200,
},
{
"label": _("Employee Name"),
"options": "Employee",
"fieldname": "employee_name",
"fieldtype": "Link",
"width": 160,
},
{"label": _("Amount"), "fieldname": "amount", "fieldtype": "Currency", "width": 140},

View File

@@ -18,16 +18,14 @@ def get_columns(filters):
columns = [
{
"label": _("Employee"),
"options": "Employee",
"fieldname": "employee",
"fieldtype": "Link",
"options": "Employee",
"width": 200,
},
{
"label": _("Employee Name"),
"options": "Employee",
"fieldname": "employee_name",
"fieldtype": "Link",
"width": 160,
},
{"label": _("PF Account"), "fieldname": "pf_account", "fieldtype": "Data", "width": 140},

View File

@@ -35,6 +35,7 @@ def add_print_formats():
def add_permissions():
frappe.reload_doc("regional", "doctype", "ksa_vat_setting", force=True)
"""Add Permissions for KSA VAT Setting."""
add_permission("KSA VAT Setting", "All", 0)
for role in ("Accounts Manager", "Accounts User", "System Manager"):

View File

@@ -96,18 +96,26 @@ class SalesOrder(SellingController):
and customer = %s",
(self.po_no, self.name, self.customer),
)
if (
so
and so[0][0]
and not cint(
if so and so[0][0]:
if cint(
frappe.db.get_single_value("Selling Settings", "allow_against_multiple_purchase_orders")
)
):
frappe.msgprint(
_("Warning: Sales Order {0} already exists against Customer's Purchase Order {1}").format(
so[0][0], self.po_no
):
frappe.msgprint(
_("Warning: Sales Order {0} already exists against Customer's Purchase Order {1}").format(
frappe.bold(so[0][0]), frappe.bold(self.po_no)
)
)
else:
frappe.throw(
_(
"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}"
).format(
frappe.bold(so[0][0]),
frappe.bold(self.po_no),
frappe.bold(_("'Allow Multiple Sales Orders Against a Customer's Purchase Order'")),
get_link_to_form("Selling Settings", "Selling Settings"),
)
)
)
def validate_for_items(self):
for d in self.get("items"):

View File

@@ -1741,7 +1741,7 @@ def make_sales_order(**args):
so.company = args.company or "_Test Company"
so.customer = args.customer or "_Test Customer"
so.currency = args.currency or "INR"
so.po_no = args.po_no or "12345"
so.po_no = args.po_no or ""
if args.selling_price_list:
so.selling_price_list = args.selling_price_list

View File

@@ -145,16 +145,6 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
this.apply_discount_on_item(doc, cdt, cdn, 'discount_amount');
},
apply_discount_on_item: function(doc, cdt, cdn, field) {
var item = frappe.get_doc(cdt, cdn);
if(!item.price_list_rate) {
item[field] = 0.0;
} else {
this.price_list_rate(doc, cdt, cdn);
}
this.set_gross_profit(item);
},
commission_rate: function() {
this.calculate_commission();
},

View File

@@ -697,7 +697,7 @@ class TestDeliveryNote(FrappeTestCase):
def test_dn_billing_status_case1(self):
# SO -> DN -> SI
so = make_sales_order()
so = make_sales_order(po_no="12345")
dn = create_dn_against_so(so.name, delivered_qty=2)
self.assertEqual(dn.status, "To Bill")
@@ -724,7 +724,7 @@ class TestDeliveryNote(FrappeTestCase):
make_sales_invoice,
)
so = make_sales_order()
so = make_sales_order(po_no="12345")
si = make_sales_invoice(so.name)
si.get("items")[0].qty = 5
@@ -768,7 +768,7 @@ class TestDeliveryNote(FrappeTestCase):
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
so = make_sales_order()
so = make_sales_order(po_no="12345")
dn1 = make_delivery_note(so.name)
dn1.get("items")[0].qty = 2
@@ -814,7 +814,7 @@ class TestDeliveryNote(FrappeTestCase):
from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_delivery_note
from erpnext.selling.doctype.sales_order.sales_order import make_sales_invoice
so = make_sales_order()
so = make_sales_order(po_no="12345")
si = make_sales_invoice(so.name)
si.submit()
@@ -1180,6 +1180,10 @@ class TestDeliveryNote(FrappeTestCase):
self.assertTrue(return_dn.docstatus == 1)
def tearDown(self):
frappe.db.rollback()
frappe.db.set_single_value("Selling Settings", "dont_reserve_sales_order_qty_on_sales_return", 0)
def create_delivery_note(**args):
dn = frappe.new_doc("Delivery Note")

View File

@@ -213,7 +213,8 @@
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disabled"
"label": "Disabled",
"search_index": 1
},
{
"default": "0",
@@ -956,7 +957,7 @@
"index_web_pages_for_search": 1,
"links": [],
"make_attachments_public": 1,
"modified": "2022-09-13 04:08:17.431731",
"modified": "2023-07-14 17:18:18.658942",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item",

View File

@@ -1,370 +1,90 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "",
"beta": 0,
"creation": "2015-05-19 05:12:30.344797",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Other",
"editable_grid": 1,
"actions": [],
"creation": "2015-05-19 05:12:30.344797",
"doctype": "DocType",
"document_type": "Other",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"variant_of",
"attribute",
"column_break_2",
"attribute_value",
"numeric_values",
"section_break_4",
"from_range",
"increment",
"column_break_8",
"to_range"
],
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "variant_of",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Variant Of",
"length": 0,
"no_copy": 0,
"options": "Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "variant_of",
"fieldtype": "Link",
"label": "Variant Of",
"options": "Item",
"search_index": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "attribute",
"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": "Attribute",
"length": 0,
"no_copy": 0,
"options": "Item Attribute",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "attribute",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Attribute",
"options": "Item Attribute",
"reqd": 1,
"search_index": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "column_break_2",
"fieldtype": "Column Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "attribute_value",
"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": "Attribute Value",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "attribute_value",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Attribute Value"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "has_variants",
"fieldname": "numeric_values",
"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": "Numeric Values",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"default": "0",
"depends_on": "has_variants",
"fieldname": "numeric_values",
"fieldtype": "Check",
"label": "Numeric Values"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "numeric_values",
"fieldname": "section_break_4",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"depends_on": "numeric_values",
"fieldname": "section_break_4",
"fieldtype": "Section Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "from_range",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Range",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "from_range",
"fieldtype": "Float",
"label": "From Range"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "increment",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Increment",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "increment",
"fieldtype": "Float",
"label": "Increment"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_8",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
"fieldname": "column_break_8",
"fieldtype": "Column Break"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fieldname": "to_range",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Range",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"fieldname": "to_range",
"fieldtype": "Float",
"label": "To Range"
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "",
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2019-01-03 15:36:59.129006",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Variant Attribute",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0,
"track_views": 0
],
"istable": 1,
"links": [],
"modified": "2023-07-14 17:15:19.112119",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Variant Attribute",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@@ -113,6 +113,7 @@ class PurchaseReceipt(BuyingController):
self.set_status()
self.po_required()
self.validate_items_quality_inspection()
self.validate_with_previous_doc()
self.validate_uom_is_integer("uom", ["qty", "received_qty"])
self.validate_uom_is_integer("stock_uom", "stock_qty")
@@ -183,6 +184,26 @@ class PurchaseReceipt(BuyingController):
if not d.purchase_order:
frappe.throw(_("Purchase Order number required for Item {0}").format(d.item_code))
def validate_items_quality_inspection(self):
for item in self.get("items"):
if item.quality_inspection:
qi = frappe.db.get_value(
"Quality Inspection",
item.quality_inspection,
["reference_type", "reference_name", "item_code"],
as_dict=True,
)
if qi.reference_type != self.doctype or qi.reference_name != self.name:
msg = f"""Row #{item.idx}: Please select a valid Quality Inspection with Reference Type
{frappe.bold(self.doctype)} and Reference Name {frappe.bold(self.name)}."""
frappe.throw(_(msg))
if qi.item_code != item.item_code:
msg = f"""Row #{item.idx}: Please select a valid Quality Inspection with Item Code
{frappe.bold(item.item_code)}."""
frappe.throw(_(msg))
def get_already_received_qty(self, po, po_detail):
qty = frappe.db.sql(
"""select sum(qty) from `tabPurchase Receipt Item`

View File

@@ -1849,6 +1849,153 @@ class TestPurchaseReceipt(FrappeTestCase):
pr.items[0].delivery_note_item = delivery_note_item
pr.save()
def test_purchase_receipt_with_backdated_landed_cost_voucher(self):
from erpnext.controllers.sales_and_purchase_return import make_return_doc
from erpnext.stock.doctype.landed_cost_voucher.test_landed_cost_voucher import (
create_landed_cost_voucher,
)
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
item_code = "_Test Purchase Item With Landed Cost"
create_item(item_code)
warehouse = create_warehouse("_Test Purchase Warehouse With Landed Cost")
warehouse1 = create_warehouse("_Test Purchase Warehouse With Landed Cost 1")
warehouse2 = create_warehouse("_Test Purchase Warehouse With Landed Cost 2")
warehouse3 = create_warehouse("_Test Purchase Warehouse With Landed Cost 3")
pr = make_purchase_receipt(
item_code=item_code,
warehouse=warehouse,
posting_date=add_days(today(), -10),
posting_time="10:59:59",
qty=100,
rate=275.00,
)
pr_return = make_return_doc("Purchase Receipt", pr.name)
pr_return.posting_date = add_days(today(), -9)
pr_return.items[0].qty = 2 * -1
pr_return.items[0].received_qty = 2 * -1
pr_return.submit()
ste1 = make_stock_entry(
purpose="Material Transfer",
posting_date=add_days(today(), -8),
source=warehouse,
target=warehouse1,
item_code=item_code,
qty=20,
company=pr.company,
)
ste1.reload()
self.assertEqual(ste1.items[0].valuation_rate, 275.00)
ste2 = make_stock_entry(
purpose="Material Transfer",
posting_date=add_days(today(), -7),
source=warehouse,
target=warehouse2,
item_code=item_code,
qty=20,
company=pr.company,
)
ste2.reload()
self.assertEqual(ste2.items[0].valuation_rate, 275.00)
ste3 = make_stock_entry(
purpose="Material Transfer",
posting_date=add_days(today(), -6),
source=warehouse,
target=warehouse3,
item_code=item_code,
qty=20,
company=pr.company,
)
ste3.reload()
self.assertEqual(ste3.items[0].valuation_rate, 275.00)
ste4 = make_stock_entry(
purpose="Material Transfer",
posting_date=add_days(today(), -5),
source=warehouse1,
target=warehouse,
item_code=item_code,
qty=20,
company=pr.company,
)
ste4.reload()
self.assertEqual(ste4.items[0].valuation_rate, 275.00)
ste5 = make_stock_entry(
purpose="Material Transfer",
posting_date=add_days(today(), -4),
source=warehouse,
target=warehouse1,
item_code=item_code,
qty=20,
company=pr.company,
)
ste5.reload()
self.assertEqual(ste5.items[0].valuation_rate, 275.00)
ste6 = make_stock_entry(
purpose="Material Transfer",
posting_date=add_days(today(), -3),
source=warehouse1,
target=warehouse,
item_code=item_code,
qty=20,
company=pr.company,
)
ste6.reload()
self.assertEqual(ste6.items[0].valuation_rate, 275.00)
ste7 = make_stock_entry(
purpose="Material Transfer",
posting_date=add_days(today(), -3),
source=warehouse,
target=warehouse1,
item_code=item_code,
qty=20,
company=pr.company,
)
ste7.reload()
self.assertEqual(ste7.items[0].valuation_rate, 275.00)
create_landed_cost_voucher("Purchase Receipt", pr.name, pr.company, charges=2500 * -1)
pr.reload()
valuation_rate = pr.items[0].valuation_rate
ste1.reload()
self.assertEqual(ste1.items[0].valuation_rate, valuation_rate)
ste2.reload()
self.assertEqual(ste2.items[0].valuation_rate, valuation_rate)
ste3.reload()
self.assertEqual(ste3.items[0].valuation_rate, valuation_rate)
ste4.reload()
self.assertEqual(ste4.items[0].valuation_rate, valuation_rate)
ste5.reload()
self.assertEqual(ste5.items[0].valuation_rate, valuation_rate)
ste6.reload()
self.assertEqual(ste6.items[0].valuation_rate, valuation_rate)
ste7.reload()
self.assertEqual(ste7.items[0].valuation_rate, valuation_rate)
def prepare_data_for_internal_transfer():
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier

View File

@@ -204,6 +204,7 @@
"fieldname": "received_qty",
"fieldtype": "Float",
"label": "Received Quantity",
"no_copy": 1,
"oldfieldname": "received_qty",
"oldfieldtype": "Currency",
"print_hide": 1,
@@ -993,7 +994,7 @@
"idx": 1,
"istable": 1,
"links": [],
"modified": "2022-10-12 03:37:59.516609",
"modified": "2023-07-02 18:40:48.152637",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt Item",
@@ -1004,4 +1005,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -294,3 +294,19 @@ class TestRepostItemValuation(FrappeTestCase, StockTestMixin):
self.assertRaises(frappe.ValidationError, riv.save)
accounts_settings.acc_frozen_upto = ""
accounts_settings.save()
def test_create_repost_entry_for_cancelled_document(self):
pr = make_purchase_receipt(
company="_Test Company with perpetual inventory",
warehouse="Stores - TCP1",
get_multiple_items=True,
)
self.assertTrue(pr.docstatus == 1)
self.assertFalse(frappe.db.exists("Repost Item Valuation", {"voucher_no": pr.name}))
pr.load_from_db()
pr.cancel()
self.assertTrue(pr.docstatus == 2)
self.assertTrue(frappe.db.exists("Repost Item Valuation", {"voucher_no": pr.name}))

View File

@@ -122,7 +122,8 @@
"oldfieldname": "purpose",
"oldfieldtype": "Select",
"options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nMaterial Transfer for Manufacture\nMaterial Consumption for Manufacture\nManufacture\nRepack\nSend to Subcontractor",
"read_only": 1
"read_only": 1,
"search_index": 1
},
{
"fieldname": "company",
@@ -619,7 +620,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2022-05-02 05:21:39.060501",
"modified": "2023-06-19 18:23:40.748114",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Entry",

View File

@@ -2271,7 +2271,7 @@ def move_sample_to_retention_warehouse(company, items):
"basic_rate": item.get("valuation_rate"),
"uom": item.get("uom"),
"stock_uom": item.get("stock_uom"),
"conversion_factor": 1.0,
"conversion_factor": item.get("conversion_factor") or 1.0,
"serial_no": sample_serial_nos,
"batch_no": item.get("batch_no"),
},

View File

@@ -13,10 +13,11 @@ frappe.ui.form.on("Warehouse", {
};
});
frm.set_query("parent_warehouse", function () {
frm.set_query("parent_warehouse", function (doc) {
return {
filters: {
is_group: 1,
company: doc.company,
},
};
});

View File

@@ -96,14 +96,14 @@ def get_range_age(filters: Filters, fifo_queue: List, to_date: str, item_dict: D
range1 = range2 = range3 = above_range3 = 0.0
for item in fifo_queue:
age = date_diff(to_date, item[1])
age = flt(date_diff(to_date, item[1]))
qty = flt(item[0]) if not item_dict["has_serial_no"] else 1.0
if age <= filters.range1:
if age <= flt(filters.range1):
range1 = flt(range1 + qty, precision)
elif age <= filters.range2:
elif age <= flt(filters.range2):
range2 = flt(range2 + qty, precision)
elif age <= filters.range3:
elif age <= flt(filters.range3):
range3 = flt(range3 + qty, precision)
else:
above_range3 = flt(above_range3 + qty, precision)

View File

@@ -278,6 +278,8 @@ def update_args_in_repost_item_valuation(
frappe.publish_realtime(
"item_reposting_progress",
{"name": doc.name, "items_to_be_repost": json.dumps(args, default=str), "current_index": index},
doctype=doc.doctype,
docname=doc.name,
)
@@ -502,6 +504,7 @@ class update_entries_after(object):
def update_distinct_item_warehouses(self, dependant_sle):
key = (dependant_sle.item_code, dependant_sle.warehouse)
val = frappe._dict({"sle": dependant_sle})
if key not in self.distinct_item_warehouses:
self.distinct_item_warehouses[key] = val
self.new_items_found = True
@@ -509,10 +512,28 @@ class update_entries_after(object):
existing_sle_posting_date = (
self.distinct_item_warehouses[key].get("sle", {}).get("posting_date")
)
dependent_voucher_detail_nos = self.get_dependent_voucher_detail_nos(key)
if getdate(dependant_sle.posting_date) < getdate(existing_sle_posting_date):
val.sle_changed = True
dependent_voucher_detail_nos.append(dependant_sle.voucher_detail_no)
val.dependent_voucher_detail_nos = dependent_voucher_detail_nos
self.distinct_item_warehouses[key] = val
self.new_items_found = True
elif dependant_sle.voucher_detail_no not in set(dependent_voucher_detail_nos):
# Future dependent voucher needs to be repost to get the correct stock value
# If dependent voucher has not reposted, then add it to the list
dependent_voucher_detail_nos.append(dependant_sle.voucher_detail_no)
self.new_items_found = True
val.dependent_voucher_detail_nos = dependent_voucher_detail_nos
self.distinct_item_warehouses[key] = val
def get_dependent_voucher_detail_nos(self, key):
if "dependent_voucher_detail_nos" not in self.distinct_item_warehouses[key]:
self.distinct_item_warehouses[key].dependent_voucher_detail_nos = []
return self.distinct_item_warehouses[key].dependent_voucher_detail_nos
def process_sle(self, sle):
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
@@ -1154,8 +1175,11 @@ def get_sle_by_voucher_detail_no(voucher_detail_no, excluded_sle=None):
[
"item_code",
"warehouse",
"actual_qty",
"qty_after_transaction",
"posting_date",
"posting_time",
"voucher_detail_no",
"timestamp(posting_date, posting_time) as timestamp",
],
as_dict=1,

View File

@@ -15,7 +15,7 @@
{% for item, taxes in itemised_tax.items() %}
<tr>
<td>{{ item }}</td>
<td class='text-right'>
<td class="text-right">
{% if doc.get('is_return') %}
{{ frappe.utils.fmt_money((itemised_taxable_amount.get(item, 0))|abs, None, doc.currency) }}
{% else %}
@@ -25,7 +25,7 @@
{% for tax_account in tax_accounts %}
{% set tax_details = taxes.get(tax_account) %}
{% if tax_details %}
<td class='text-right'>
<td class="text-right">
{% if tax_details.tax_rate or not tax_details.tax_amount %}
({{ tax_details.tax_rate }}%)
{% endif %}

View File

@@ -158,7 +158,7 @@ Advertising,Werbung,
Aerospace,Luft- und Raumfahrt,
Against,Zu,
Against Account,Gegenkonto,
Against Journal Entry {0} does not have any unmatched {1} entry,"""Zu Buchungssatz"" {0} hat nur abgeglichene {1} Buchungen",
Against Journal Entry {0} does not have any unmatched {1} entry,Buchungssatz {0} hat keinen offenen Eintrag auf der {1}-Seite,
Against Journal Entry {0} is already adjusted against some other voucher,"""Zu Buchungssatz"" {0} ist bereits mit einem anderen Beleg abgeglichen",
Against Supplier Invoice {0} dated {1},Zu Eingangsrechnung {0} vom {1},
Against Voucher,Gegenbeleg,
@@ -209,10 +209,10 @@ Amount of Integrated Tax,Betrag der integrierten Steuer,
Amount of TDS Deducted,Betrag der abgezogenen TDS,
Amount should not be less than zero.,Betrag sollte nicht kleiner als Null sein.,
Amount to Bill,Rechnungsbetrag,
Amount {0} {1} against {2} {3},Menge {0} {1} gegen {2} {3},
Amount {0} {1} deducted against {2},Menge {0} {1} abgezogen gegen {2},
Amount {0} {1} transferred from {2} to {3},Menge {0} {1} übertragen von {2} auf {3},
Amount {0} {1} {2} {3},Menge {0} {1} {2} {3},
Amount {0} {1} against {2} {3},Betrag {0} {1} gegen {2} {3},
Amount {0} {1} deducted against {2},Betrag {0} {1} abgezogen gegen {2},
Amount {0} {1} transferred from {2} to {3},Betrag {0} {1} wurde von {2} zu {3} transferiert,
Amount {0} {1} {2} {3},Betrag {0} {1} {2} {3},
Amt,Menge,
"An Item Group exists with same name, please change the item name or rename the item group",Eine Artikelgruppe mit dem gleichen Namen existiert bereits. Bitte den Artikelnamen ändern oder die Artikelgruppe umbenennen,
An academic term with this 'Academic Year' {0} and 'Term Name' {1} already exists. Please modify these entries and try again.,"Ein Semester mit ""Semesterjahr""'{0} und ""Semesternamen"" {1} ist bereits vorhanden. Bitte ändern Sie diese entsprechend und versuchen Sie es erneut.",
@@ -281,7 +281,7 @@ Asset Name,Name Vermögenswert,
Asset Received But Not Billed,"Vermögenswert erhalten, aber nicht in Rechnung gestellt",
Asset Value Adjustment,Anpassung Vermögenswert,
"Asset cannot be cancelled, as it is already {0}","Vermögenswert kann nicht rückgängig gemacht werden, da es ohnehin schon {0} ist",
Asset scrapped via Journal Entry {0},Vermögenswert über Journaleintrag {0} entsorgt,
Asset scrapped via Journal Entry {0},Vermögenswert über Buchungssatz {0} entsorgt,
"Asset {0} cannot be scrapped, as it is already {1}",Anlagewert-{0} ist bereits entsorgt {1},
Asset {0} does not belong to company {1},Vermögenswert {0} gehört nicht zu Unternehmen {1}.,
Asset {0} must be submitted,Vermögenswert {0} muss eingereicht werden.,
@@ -442,7 +442,7 @@ Can be approved by {0},Kann von {0} genehmigt werden,
"Can not filter based on Account, if grouped by Account","Wenn nach Konto gruppiert wurde, kann nicht auf Grundlage des Kontos gefiltert werden.",
"Can not filter based on Voucher No, if grouped by Voucher","Wenn nach Beleg gruppiert wurde, kann nicht auf Grundlage von Belegen gefiltert werden.",
"Can not mark Inpatient Record Discharged, there are Unbilled Invoices {0}","Kann den entlassenen Krankenhauskatheter nicht markieren, es gibt keine fakturierten Rechnungen {0}",
Can only make payment against unbilled {0},Zahlung kann nur zu einer noch nicht abgerechneten {0} erstellt werden,
Can only make payment against unbilled {0},Zahlung kann nur zu einem noch nicht abgerechneten Beleg vom Typ {0} erstellt werden,
Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total',"Kann sich nur auf eine Zeile beziehen, wenn die Berechnungsart der Kosten entweder ""auf vorherige Zeilensumme"" oder ""auf vorherigen Zeilenbetrag"" ist",
"Can't change valuation method, as there are transactions against some items which does not have it's own valuation method","Kann die Bewertungsmethode nicht ändern, da es Transaktionen gegen einige Posten gibt, für die es keine eigene Bewertungsmethode gibt",
Can't create standard criteria. Please rename the criteria,Kann keine Standardkriterien erstellen. Bitte benennen Sie die Kriterien um,
@@ -450,7 +450,7 @@ Cancel,Abbrechen,
Cancel Material Visit {0} before cancelling this Warranty Claim,Materialkontrolle {0} stornieren vor Abbruch dieses Garantieantrags,
Cancel Material Visits {0} before cancelling this Maintenance Visit,Materialkontrolle {0} stornieren vor Abbruch dieses Wartungsbesuchs,
Cancel Subscription,Abonnement beenden,
Cancel the journal entry {0} first,Brechen Sie zuerst den Journaleintrag {0} ab,
Cancel the journal entry {0} first,Brechen Sie zuerst den Buchungssatz {0} ab,
Canceled,Abgebrochen,
"Cannot Submit, Employees left to mark attendance","Kann nicht übergeben werden, Mitarbeiter sind zur Teilnahme zugelassen",
Cannot be a fixed asset item as Stock Ledger is created.,"Kann keine Anlageposition sein, wenn das Stock Ledger erstellt wird.",
@@ -474,11 +474,13 @@ Cannot deduct when category is for 'Valuation' or 'Vaulation and Total',"Kann ni
"Cannot delete Serial No {0}, as it is used in stock transactions","Die Seriennummer {0} kann nicht gelöscht werden, da sie in Lagertransaktionen verwendet wird",
Cannot enroll more than {0} students for this student group.,Kann nicht mehr als {0} Studenten für diese Studentengruppe einschreiben.,
Cannot find active Leave Period,Aktive Abwesenheitszeit kann nicht gefunden werden,
Cannot produce more Item {0} than Sales Order quantity {1},"Es können nicht mehr Artikel {0} produziert werden, als die über Kundenaufträge bestellte Stückzahl {1}",
Cannot produce more Item {0} than Sales Order quantity {1},"Es können nicht mehr Artikel {0} produziert werden, als die über den Auftrag bestellte Stückzahl {1}",
Cannot pay to Customer without any negative outstanding invoice,"Es kann nicht an den Kunden gezahlt werden, ohne dass eine Gutschrift vorhanden ist",
Cannot promote Employee with status Left,Mitarbeiter mit Status &quot;Links&quot; kann nicht gefördert werden,
Cannot receive from Supplier without any negative outstanding invoice,"Es kann nicht vom Lieferanten empfangen werden, ohne dass eine Gutschrift vorhanden ist",
Cannot refer row number greater than or equal to current row number for this Charge type,"Für diese Berechnungsart kann keine Zeilennummern zugeschrieben werden, die größer oder gleich der aktuellen Zeilennummer ist",
Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row,"Die Berechnungsart kann für die erste Zeile nicht auf ""bezogen auf Menge der vorhergenden Zeile"" oder auf ""bezogen auf Gesamtmenge der vorhergenden Zeile"" gesetzt werden",
Cannot set as Lost as Sales Order is made.,"Kann nicht als verloren gekennzeichnet werden, da ein Kundenauftrag dazu existiert.",
Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row,"Die Berechnungsart kann für die erste Zeile nicht auf „Bezogen auf Betrag der vorhergenden Zeile oder auf „Bezogen auf Gesamtbetrag der vorhergenden Zeilen“ gesetzt werden",
Cannot set as Lost as Sales Order is made.,"Kann nicht als verloren gekennzeichnet werden, da ein Auftrag dazu existiert.",
Cannot set authorization on basis of Discount for {0},Genehmigung kann nicht auf der Basis des Rabattes für {0} festgelegt werden,
Cannot set multiple Item Defaults for a company.,Es können nicht mehrere Artikelstandards für ein Unternehmen festgelegt werden.,
Cannot set quantity less than delivered quantity,Menge kann nicht kleiner als gelieferte Menge sein,
@@ -514,7 +516,7 @@ Change Template Code,Vorlagencode ändern,
Changing Customer Group for the selected Customer is not allowed.,Die Änderung der Kundengruppe für den ausgewählten Kunden ist nicht zulässig.,
Chapter,Gruppe,
Chapter information.,Gruppeninformation,
Charge of type 'Actual' in row {0} cannot be included in Item Rate,"Kosten für den Typ ""real"" in Zeile {0} können nicht in den Artikelpreis mit eingeschlossen werden",
Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount,"Kosten für den Typ „Tatsächlich“ in Zeile {0} können nicht in den Artikelpreis oder den bezahlen Betrag einfließen",
Chargeble,Belastung,
Charges are updated in Purchase Receipt against each item,Kosten werden im Kaufbeleg für jede Position aktualisiert,
"Charges will be distributed proportionately based on item qty or amount, as per your selection",Die Kosten werden gemäß Ihrer Wahl anteilig verteilt basierend auf Artikelmenge oder -preis,
@@ -657,7 +659,7 @@ Create Inter Company Journal Entry,Erstellen Sie einen Inter Company Journal Ein
Create Invoice,Rechnung erstellen,
Create Invoices,Rechnungen erstellen,
Create Job Card,Jobkarte erstellen,
Create Journal Entry,Journaleintrag erstellen,
Create Journal Entry,Buchungssatz erstellen,
Create Lead,Lead erstellen,
Create Leads,Leads erstellen,
Create Maintenance Visit,Wartungsbesuch anlegen,
@@ -837,7 +839,7 @@ Did not find any item called {0},Hat keinen Artikel finden genannt {0},
Diff Qty,Diff Menge,
Difference Account,Differenzkonto,
"Difference Account must be a Asset/Liability type account, since this Stock Reconciliation is an Opening Entry","Differenzkonto muss ein Vermögens-/Verbindlichkeiten-Konto sein, da dieser Lagerabgleich eine Eröffnungsbuchung ist",
Difference Amount,Differenzmenge,
Difference Amount,Differenzbetrag,
Difference Amount must be zero,Differenzbetrag muss Null sein,
Different UOM for items will lead to incorrect (Total) Net Weight value. Make sure that Net Weight of each item is in the same UOM.,"Unterschiedliche Maßeinheiten für Artikel führen zu falschen Werten für das (Gesamt-)Nettogewicht. Es muss sicher gestellt sein, dass das Nettogewicht jedes einzelnen Artikels in der gleichen Maßeinheit angegeben ist.",
Direct Expenses,Direkte Aufwendungen,
@@ -1032,7 +1034,7 @@ Fieldname,Feldname,
Fields,Felder,
Fill the form and save it,Formular ausfüllen und speichern,
Filter Employees By (Optional),Mitarbeiter filtern nach (optional),
"Filter Fields Row #{0}: Fieldname <b>{1}</b> must be of type ""Link"" or ""Table MultiSelect""",Filterfelder Zeile # {0}: Feldname <b>{1}</b> muss vom Typ &quot;Link&quot; oder &quot;Tabelle MultiSelect&quot; sein,
"Filter Fields Row #{0}: Fieldname <b>{1}</b> must be of type ""Link"" or ""Table MultiSelect""",Filterfelder Zeile {0}: Feldname <b>{1}</b> muss vom Typ &quot;Link&quot; oder &quot;Tabelle MultiSelect&quot; sein,
Filter Total Zero Qty,Gesamtmenge filtern,
Finance Book,Finanzbuch,
Financial / accounting year.,Finanz-/Rechnungsjahr,
@@ -1306,6 +1308,7 @@ Invalid GSTIN! A GSTIN must have 15 characters.,Ungültige GSTIN! Eine GSTIN mus
Invalid GSTIN! First 2 digits of GSTIN should match with State number {0}.,Ungültige GSTIN! Die ersten beiden Ziffern von GSTIN sollten mit der Statusnummer {0} übereinstimmen.,
Invalid GSTIN! The input you've entered doesn't match the format of GSTIN.,Ungültige GSTIN! Die von Ihnen eingegebene Eingabe stimmt nicht mit dem Format von GSTIN überein.,
Invalid Posting Time,Ungültige Buchungszeit,
Invalid Purchase Invoice,Ungültige Einkaufsrechnung,
Invalid attribute {0} {1},Ungültiges Attribut {0} {1},
Invalid quantity specified for item {0}. Quantity should be greater than 0.,Ungültzige Anzahl für Artikel {0} angegeben. Anzahl sollte größer als 0 sein.,
Invalid reference {0} {1},Ungültige Referenz {0} {1},
@@ -1771,7 +1774,7 @@ Odometer,Tacho,
Office Equipments,Büroausstattung,
Office Maintenance Expenses,Büro-Wartungskosten,
Office Rent,Büromiete,
On Hold,In Wartestellung,
On Hold,Auf Eis gelegt,
On Net Total,Auf Nettosumme,
One customer can be part of only single Loyalty Program.,Ein Kunde kann Teil eines einzigen Treueprogramms sein.,
Online Auctions,Online-Auktionen,
@@ -1861,7 +1864,7 @@ Packing Slip,Packzettel,
Packing Slip(s) cancelled,Packzettel storniert,
Paid,Bezahlt,
Paid Amount,Gezahlter Betrag,
Paid Amount cannot be greater than total negative outstanding amount {0},Gezahlten Betrag kann nicht größer sein als die Gesamt negativ ausstehenden Betrag {0},
Paid Amount cannot be greater than total negative outstanding amount {0},"Der gezahlte Betrag darf nicht größer sein als der gesamte, negative, ausstehende Betrag {0}",
Paid amount + Write Off Amount can not be greater than Grand Total,Summe aus gezahltem Betrag + ausgebuchter Betrag darf nicht größer der Gesamtsumme sein,
Paid and Not Delivered,Bezahlt und nicht ausgeliefert,
Parameter,Parameter,
@@ -1914,7 +1917,7 @@ Payment Terms,Zahlungsbedingungen,
Payment Terms Template,Vorlage Zahlungsbedingungen,
Payment Terms based on conditions,Zahlungsbedingungen basieren auf Bedingungen,
Payment Type,Zahlungsart,
"Payment Type must be one of Receive, Pay and Internal Transfer","Zahlungsart muss eine der Receive sein, Pay und interne Übertragung",
"Payment Type must be one of Receive, Pay and Internal Transfer","Zahlungsart muss entweder 'Empfangen', 'Zahlen' oder 'Interner Transfer' sein",
Payment against {0} {1} cannot be greater than Outstanding Amount {2},Zahlung zu {0} {1} kann nicht größer als ausstehender Betrag {2} sein,
Payment of {0} from {1} to {2},Zahlung von {0} von {1} an {2},
Payment request {0} created,Zahlungsaufforderung {0} erstellt,
@@ -2299,9 +2302,9 @@ Read blog,Blog lesen,
Read the ERPNext Manual,Lesen Sie das ERPNext-Handbuch,
Reading Uploaded File,Hochgeladene Datei lesen,
Real Estate,Immobilien,
Reason For Putting On Hold,Grund für das Halten,
Reason for Hold,Grund für das Halten,
Reason for hold: ,Grund für das Halten:,
Reason For Putting On Hold,Grund für das auf Eis legen,
Reason for Hold,Grund für das auf Eis legen,
Reason for hold: ,Grund für das auf Eis legen:,
Receipt,Kaufbeleg,
Receipt document must be submitted,Eingangsbeleg muss vorgelegt werden,
Receivable,Forderung,
@@ -2321,18 +2324,20 @@ Ref Date,Ref-Datum,
Reference,Referenz,
Reference #{0} dated {1},Referenz #{0} vom {1},
Reference Date,Referenzdatum,
Reference Doctype must be one of {0},Referenz Doctype muss man von {0},
Reference Doctype must be one of {0},Referenz-Typ muss eine von {0} sein,
Reference Document,Referenzdokument,
Reference Document Type,Referenz-Dokumententyp,
Reference No & Reference Date is required for {0},Referenznr. & Referenz-Tag sind erforderlich für {0},
Reference No and Reference Date is mandatory for Bank transaction,Referenznummer und Referenzdatum ist obligatorisch für Bankengeschäft,
Reference No is mandatory if you entered Reference Date,"Referenznr. ist zwingend erforderlich, wenn Referenz-Tag eingegeben wurde",
Reference No and Reference Date is mandatory for Bank transaction,Referenznummer und Referenzdatum sind Pflichtfelder,
Reference No is mandatory if you entered Reference Date,"Referenznummer ist ein Pflichtfeld, wenn ein Referenzdatum eingegeben wurde",
Reference No.,Referenznummer.,
Reference Number,Referenznummer,
Reference Owner,Referenz Besitzer,
Reference Type,Referenz-Typ,
"Reference: {0}, Item Code: {1} and Customer: {2}","Referenz: {0}, Item Code: {1} und Kunde: {2}",
References,Referenzen,
References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount.,"Die Referenzen {0} vom Typ {1} hatten keinen ausstehenden Betrag mehr, bevor die Zahlung gebucht wurde. Jetzt haben sie einen negativen ausstehenden Betrag.",
If this is undesirable please cancel the corresponding Payment Entry.,"Falls dies nicht erwünscht ist, stornieren Sie bitte die entsprechende Zahlung.",
Refresh Token,Aktualisieren Token,
Region,Region,
Register,Neu registrieren,
@@ -2410,7 +2415,7 @@ Return,Zurück,
Return / Credit Note,Return / Gutschrift,
Return / Debit Note,Return / Lastschrift,
Returns,Retouren,
Reverse Journal Entry,Journaleintrag umkehren,
Reverse Journal Entry,Buchungssatz umkehren,
Review Invitation Sent,Einladung überprüfen gesendet,
Review and Action,Überprüfung und Aktion,
Role,Rolle,
@@ -2423,63 +2428,64 @@ Root cannot have a parent cost center,Root kann keine übergeordnete Kostenstell
Round Off,Abschliessen,
Rounded Total,Gerundete Gesamtsumme,
Route,Route,
Row # {0}: ,Zeile # {0}:,
Row # {0}: Batch No must be same as {1} {2},Zeile # {0}: Chargennummer muss dieselbe sein wie {1} {2},
Row # {0}: Cannot return more than {1} for Item {2},Zeile # {0}: Es kann nicht mehr als {1} für Artikel {2} zurückgegeben werden,
Row # {0}: Rate cannot be greater than the rate used in {1} {2},"Row # {0}: Die Rate kann nicht größer sein als die Rate, die in {1} {2}",
Row # {0}: Serial No is mandatory,Zeile # {0}: Seriennummer ist zwingend erforderlich,
Row # {0}: Serial No {1} does not match with {2} {3},Zeile # {0}: Seriennummer {1} stimmt nicht mit {2} {3} überein,
Row #{0} (Payment Table): Amount must be negative,Zeilennr. {0} (Zahlungstabelle): Betrag muss negativ sein,
Row #{0} (Payment Table): Amount must be positive,Zeile # {0} (Zahlungstabelle): Betrag muss positiv sein,
Row #{0}: Account {1} does not belong to company {2},Zeile # {0}: Konto {1} gehört nicht zur Unternehmen {2},
Row #{0}: Allocated Amount cannot be greater than outstanding amount.,Zeile # {0}: Zugeordneter Betrag darf nicht größer als ausstehender Betrag sein.,
"Row #{0}: Asset {1} cannot be submitted, it is already {2}","Zeile Nr. {0}: Vermögenswert {1} kann nicht vorgelegt werden, es ist bereits {2}",
Row #{0}: Cannot set Rate if amount is greater than billed amount for Item {1}.,"Zeilennr. {0}: Die Rate kann nicht festgelegt werden, wenn der Betrag für Artikel {1} höher als der Rechnungsbetrag ist.",
Row #{0}: Clearance date {1} cannot be before Cheque Date {2},Row # {0}: Räumungsdatum {1} kann nicht vor dem Scheck Datum sein {2},
Row #{0}: Duplicate entry in References {1} {2},Zeile # {0}: Eintrag in Referenzen {1} {2} duplizieren,
Row #{0}: Expected Delivery Date cannot be before Purchase Order Date,Row # {0}: Voraussichtlicher Liefertermin kann nicht vor Bestelldatum sein,
Row #{0}: Item added,Zeile # {0}: Element hinzugefügt,
Row #{0}: Journal Entry {1} does not have account {2} or already matched against another voucher,Row # {0}: Journal Entry {1} nicht Konto {2} oder bereits abgestimmt gegen einen anderen Gutschein,
Row #{0}: Not allowed to change Supplier as Purchase Order already exists,"Zeile #{0}: Es ist nicht erlaubt den Lieferanten zu wechseln, da bereits ein Lieferantenauftrag vorhanden ist",
Row #{0}: Please set reorder quantity,Zeile #{0}: Bitte Nachbestellmenge angeben,
Row #{0}: Please specify Serial No for Item {1},Zeile #{0}: Bitte Seriennummer für Artikel {1} angeben,
Row #{0}: Qty increased by 1,Zeile # {0}: Menge um 1 erhöht,
Row #{0}: Rate must be same as {1}: {2} ({3} / {4}) ,Zeile #{0}: Preis muss derselbe wie {1}: {2} ({3} / {4}) sein,
Row #{0}: Reference Document Type must be one of Expense Claim or Journal Entry,Row # {0}: Referenzdokumenttyp muss einer der Kostenansprüche oder des Journaleintrags sein,
"Row #{0}: Reference Document Type must be one of Purchase Order, Purchase Invoice or Journal Entry","Row # {0}: Referenzdokumenttyp muss eine der Bestellung, Rechnung oder Kaufjournaleintrag sein",
Row #{0}: Rejected Qty can not be entered in Purchase Return,Zeile #{0}: Abgelehnte Menge kann nicht in Kaufrückgabe eingegeben werden,
Row #{0}: Rejected Warehouse is mandatory against rejected Item {1},Row # {0}: Abgelehnt Warehouse ist obligatorisch gegen zurückgewiesen Artikel {1},
Row #{0}: Reqd by Date cannot be before Transaction Date,Zeilennr. {0}: Erforderlich nach Datum darf nicht vor dem Transaktionsdatum liegen,
Row #{0}: Set Supplier for item {1},Zeile #{0}: Lieferanten für Artikel {1} einstellen,
Row #{0}: Status must be {1} for Invoice Discounting {2},Zeile # {0}: Status muss {1} für Rechnungsrabatt {2} sein,
"Row #{0}: The batch {1} has only {2} qty. Please select another batch which has {3} qty available or split the row into multiple rows, to deliver/issue from multiple batches","Zeile # {0}: Der Batch {1} hat nur {2} Menge. Bitte wähle eine andere Charge aus, die {3} Menge zur Verfügung hat oder die Zeile in mehrere Zeilen aufteilt, um aus mehreren Chargen zu liefern / auszutauschen",
Row #{0}: Timings conflicts with row {1},Zeile #{0}: Timing-Konflikte mit Zeile {1},
Row #{0}: {1} can not be negative for item {2},Row # {0}: {1} kann für Artikel nicht negativ sein {2},
Row No {0}: Amount cannot be greater than Pending Amount against Expense Claim {1}. Pending Amount is {2},Zeile Nr. {0}: Betrag kann nicht größer als der ausstehende Betrag zur Aufwandsabrechnung {1} sein. Ausstehender Betrag ist {2},
Row # {0}: ,Zeile {0}:,
Row # {0}: Batch No must be same as {1} {2},Zeile {0}: Chargennummer muss dieselbe sein wie {1} {2},
Row # {0}: Cannot return more than {1} for Item {2},Zeile {0}: Es kann nicht mehr als {1} für Artikel {2} zurückgegeben werden,
Row # {0}: Rate cannot be greater than the rate used in {1} {2},"Zeile {0}: Die Rate kann nicht größer sein als die Rate, die in {1} {2}",
Row # {0}: Serial No is mandatory,Zeile {0}: Seriennummer ist zwingend erforderlich,
Row # {0}: Serial No {1} does not match with {2} {3},Zeile {0}: Seriennummer {1} stimmt nicht mit {2} {3} überein,
Row #{0} (Payment Table): Amount must be negative,Zeile {0} (Zahlungstabelle): Betrag muss negativ sein,
Row #{0} (Payment Table): Amount must be positive,Zeile {0} (Zahlungstabelle): Betrag muss positiv sein,
Row #{0}: Account {1} does not belong to company {2},Zeile {0}: Konto {1} gehört nicht zur Unternehmen {2},
Row #{0}: Allocated Amount cannot be greater than outstanding amount.,Zeile {0}: Zugeordneter Betrag darf nicht größer als ausstehender Betrag sein.,
"Row #{0}: Asset {1} cannot be submitted, it is already {2}","Zeile {0}: Vermögenswert {1} kann nicht vorgelegt werden, es ist bereits {2}",
Row #{0}: Cannot set Rate if amount is greater than billed amount for Item {1}.,"Zeile {0}: Die Rate kann nicht festgelegt werden, wenn der Betrag für Artikel {1} höher als der Rechnungsbetrag ist.",
Row #{0}: Cannot allocate more than {1} against payment term {2},Zeile {0}: Es kann nicht mehr als {1} zu Zahlungsbedingung {2} zugeordnet werden,
Row #{0}: Clearance date {1} cannot be before Cheque Date {2},Zeile {0}: Räumungsdatum {1} kann nicht vor dem Scheck Datum sein {2},
Row #{0}: Duplicate entry in References {1} {2},Referenz {1} {2} in Zeile {0} kommt doppelt vor,
Row #{0}: Expected Delivery Date cannot be before Purchase Order Date,Zeile {0}: Voraussichtlicher Liefertermin kann nicht vor Bestelldatum sein,
Row #{0}: Item added,Zeile {0}: Element hinzugefügt,
Row #{0}: Journal Entry {1} does not have account {2} or already matched against another voucher,Zeile {0}: Buchungssatz {1} betrifft nicht Konto {2} oder bereits mit einem anderen Beleg verrechnet,
Row #{0}: Not allowed to change Supplier as Purchase Order already exists,"Zeile {0}: Es ist nicht erlaubt den Lieferanten zu wechseln, da bereits eine Bestellung vorhanden ist",
Row #{0}: Please set reorder quantity,Zeile {0}: Bitte Nachbestellmenge angeben,
Row #{0}: Please specify Serial No for Item {1},Zeile {0}: Bitte Seriennummer für Artikel {1} angeben,
Row #{0}: Qty increased by 1,Zeile {0}: Menge um 1 erhöht,
Row #{0}: Rate must be same as {1}: {2} ({3} / {4}) ,Zeile {0}: Preis muss derselbe wie {1}: {2} ({3} / {4}) sein,
Row #{0}: Reference Document Type must be one of Expense Claim or Journal Entry,Zeile {0}: Referenzdokumenttyp muss entweder 'Auslagenabrechnung' oder 'Buchungssatz' sein,
"Row #{0}: Reference Document Type must be one of Purchase Order, Purchase Invoice or Journal Entry","Zeile {0}: Referenzdokumenttyp muss eine der Bestellung, Eingangsrechnung oder Buchungssatz sein",
Row #{0}: Rejected Qty can not be entered in Purchase Return,Zeile {0}: Abgelehnte Menge kann nicht in Kaufrückgabe eingegeben werden,
Row #{0}: Rejected Warehouse is mandatory against rejected Item {1},Zeile {0}: Abgelehnt Warehouse ist obligatorisch gegen zurückgewiesen Artikel {1},
Row #{0}: Reqd by Date cannot be before Transaction Date,Zeile {0}: Erforderlich nach Datum darf nicht vor dem Transaktionsdatum liegen,
Row #{0}: Set Supplier for item {1},Zeile {0}: Lieferanten für Artikel {1} einstellen,
Row #{0}: Status must be {1} for Invoice Discounting {2},Zeile {0}: Status muss {1} für Rechnungsrabatt {2} sein,
"Row #{0}: The batch {1} has only {2} qty. Please select another batch which has {3} qty available or split the row into multiple rows, to deliver/issue from multiple batches","Zeile {0}: Der Batch {1} hat nur {2} Menge. Bitte wähle eine andere Charge aus, die {3} Menge zur Verfügung hat oder die Zeile in mehrere Zeilen aufteilt, um aus mehreren Chargen zu liefern / auszutauschen",
Row #{0}: Timings conflicts with row {1},Zeile {0}: Timing-Konflikte mit Zeile {1},
Row #{0}: {1} can not be negative for item {2},Zeile {0}: {1} kann für Artikel nicht negativ sein {2},
Row No {0}: Amount cannot be greater than Pending Amount against Expense Claim {1}. Pending Amount is {2},Zeile {0}: Der Betrag kann nicht größer als der ausstehende Betrag der Auslagenabrechnung {1} sein. Der ausstehende Betrag ist {2},
Row {0} : Operation is required against the raw material item {1},Zeile {0}: Vorgang ist für die Rohmaterialposition {1} erforderlich,
Row {0}# Allocated amount {1} cannot be greater than unclaimed amount {2},Zeile {0} # Der zugewiesene Betrag {1} darf nicht größer sein als der nicht beanspruchte Betrag {2},
Row {0}# Item {1} cannot be transferred more than {2} against Purchase Order {3},Zeile {0} # Artikel {1} kann nicht mehr als {2} gegen Bestellung {3} übertragen werden.,
Row {0}# Paid Amount cannot be greater than requested advance amount,Zeile Nr. {0}: Bezahlter Betrag darf nicht größer sein als der geforderte Anzahlungsbetrag,
Row {0}: Activity Type is mandatory.,Row {0}: Leistungsart ist obligatorisch.,
Row {0}: Advance against Customer must be credit,Row {0}: Voraus gegen Kunde muss Kredit,
Row {0}: Advance against Supplier must be debit,Row {0}: Voraus gegen Lieferant muss belasten werden,
Row {0}# Paid Amount cannot be greater than requested advance amount,Zeile {0}: Bezahlter Betrag darf nicht größer sein als der geforderte Anzahlungsbetrag,
Row {0}: Activity Type is mandatory.,Zeile {0}: Leistungsart ist obligatorisch.,
Row {0}: Advance against Customer must be credit,Zeile {0}: Voraus gegen Kunde muss Kredit,
Row {0}: Advance against Supplier must be debit,Zeile {0}: Voraus gegen Lieferant muss belasten werden,
Row {0}: Allocated amount {1} must be less than or equals to Payment Entry amount {2},Zeile {0}: Zugewiesener Betrag {1} muss kleiner oder gleich der Zahlungsmenge {2} sein,
Row {0}: Allocated amount {1} must be less than or equals to invoice outstanding amount {2},Zeile {0}: Zugeteilte Menge {1} muss kleiner als oder gleich dem ausstehenden Betrag in Rechnung {2} sein,
Row {0}: An Reorder entry already exists for this warehouse {1},Zeile {0}: Es gibt bereits eine Nachbestellungsbuchung für dieses Lager {1},
Row {0}: Bill of Materials not found for the Item {1},Zeile {0}: Bill of Materials nicht für den Artikel gefunden {1},
Row {0}: Conversion Factor is mandatory,Row {0}: Umrechnungsfaktor ist zwingend erfoderlich,
Row {0}: Conversion Factor is mandatory,Zeile {0}: Umrechnungsfaktor ist zwingend erfoderlich,
Row {0}: Cost center is required for an item {1},Zeile {0}: Kostenstelle ist für einen Eintrag {1} erforderlich,
Row {0}: Credit entry can not be linked with a {1},Zeile {0}: Habenbuchung kann nicht mit ein(em) {1} verknüpft werden,
Row {0}: Currency of the BOM #{1} should be equal to the selected currency {2},Zeile {0}: Währung der Stückliste # {1} sollte der gewählten Währung entsprechen {2},
Row {0}: Debit entry can not be linked with a {1},Zeile {0}: Sollbuchung kann nicht mit ein(em) {1} verknüpft werden,
Row {0}: Depreciation Start Date is required,Zeile {0}: Das Abschreibungsstartdatum ist erforderlich,
Row {0}: Enter location for the asset item {1},Zeile Nr. {0}: Geben Sie den Speicherort für das Vermögenswert {1} ein.,
Row {0}: Enter location for the asset item {1},Zeile {0}: Geben Sie einen Ort für den Vermögenswert {1} ein.,
Row {0}: Exchange Rate is mandatory,Zeile {0}: Wechselkurs ist erforderlich,
Row {0}: Expected Value After Useful Life must be less than Gross Purchase Amount,Zeile {0}: Erwarteter Wert nach Nutzungsdauer muss kleiner als Brutto Kaufbetrag sein,
Row {0}: From Time and To Time is mandatory.,Row {0}: Von Zeit und zu Zeit ist obligatorisch.,
Row {0}: From Time and To Time is mandatory.,Zeile {0}: Von Zeit und zu Zeit ist obligatorisch.,
Row {0}: From Time and To Time of {1} is overlapping with {2},Zeile {0}: Zeitüberlappung in {1} mit {2},
Row {0}: From time must be less than to time,Zeile {0}: Von Zeit zu Zeit muss kleiner sein,
Row {0}: Hours value must be greater than zero.,Row {0}: Stunden-Wert muss größer als Null sein.,
Row {0}: Hours value must be greater than zero.,Zeile {0}: Stunden-Wert muss größer als Null sein.,
Row {0}: Invalid reference {1},Zeile {0}: Ungültige Referenz {1},
Row {0}: Party / Account does not match with {1} / {2} in {3} {4},Zeile {0}: Gruppe / Konto stimmt nicht mit {1} / {2} in {3} {4} überein,
Row {0}: Party Type and Party is required for Receivable / Payable account {1},Zeile {0}: Gruppen-Typ und Gruppe sind für Forderungen-/Verbindlichkeiten-Konto {1} zwingend erforderlich,
@@ -2875,7 +2881,7 @@ Supplier Group master.,Lieferantengruppenstamm,
Supplier Id,Lieferanten-ID,
Supplier Invoice Date cannot be greater than Posting Date,Lieferant Rechnungsdatum kann nicht größer sein als Datum der Veröffentlichung,
Supplier Invoice No,Lieferantenrechnungsnr.,
Supplier Invoice No exists in Purchase Invoice {0},Lieferantenrechnung existiert in Kauf Rechnung {0},
Supplier Invoice No exists in Purchase Invoice {0},Die Rechnungsnummer des Lieferanten wurde bereits in Eingangsrechnung {0} verwendet,
Supplier Name,Lieferantenname,
Supplier Part No,Lieferant Teile-Nr,
Supplier Quotation,Lieferantenangebot,
@@ -2935,7 +2941,7 @@ Template of terms or contract.,Vorlage für Geschäftsbedingungen oder Vertrag,
Templates of supplier scorecard criteria.,Vorlagen der Lieferanten-Scorecard-Kriterien.,
Templates of supplier scorecard variables.,Vorlagen der Lieferanten-Scorecard-Variablen.,
Templates of supplier standings.,Vorlagen der Lieferantenwertung.,
Temporarily on Hold,Vorübergehend in der Warteschleife,
Temporarily on Hold,Vorübergehend auf Eis gelegt,
Temporary,Temporär,
Temporary Accounts,Temporäre Konten,
Temporary Opening,Temporäre Eröffnungskonten,
@@ -3077,7 +3083,7 @@ Total Budget,Gesamtbudget; Gesamtetat,
Total Collected: {0},Gesammelt gesammelt: {0},
Total Commission,Gesamtprovision,
Total Contribution Amount: {0},Gesamtbeitragsbetrag: {0},
Total Credit/ Debit Amount should be same as linked Journal Entry,Der Gesamtkreditbetrag sollte identisch mit dem verknüpften Journaleintrag sein,
Total Credit/ Debit Amount should be same as linked Journal Entry,Der Gesamtkreditbetrag sollte identisch mit dem verknüpften Buchungssatz sein,
Total Debit must be equal to Total Credit. The difference is {0},Gesamt-Soll muss gleich Gesamt-Haben sein. Die Differenz ist {0},
Total Deduction,Gesamtabzug,
Total Invoiced Amount,Gesamtrechnungsbetrag,
@@ -3410,7 +3416,7 @@ on,Am,
{0} is not in Optional Holiday List,{0} befindet sich nicht in der optionalen Feiertagsliste,
{0} is not in a valid Payroll Period,{0} befindet sich nicht in einer gültigen Abrechnungsperiode,
{0} is now the default Fiscal Year. Please refresh your browser for the change to take effect.,"{0} ist jetzt das Standardgeschäftsjahr. Bitte aktualisieren Sie Ihren Browser, damit die Änderungen wirksam werden.",
{0} is on hold till {1},{0} ist zurückgestellt bis {1},
{0} is on hold till {1},{0} ist auf Eis gelegt bis {1},
{0} item found.,{0} Artikel gefunden.,
{0} items found.,{0} Artikel gefunden.,
{0} items in progress,{0} Elemente in Bearbeitung,
@@ -3430,6 +3436,8 @@ on,Am,
{0} variants created.,{0} Varianten erstellt.,
{0} {1} created,{0} {1} erstellt,
{0} {1} does not exist,{0} {1} existiert nicht,
{0} {1} has already been fully paid.,{0} {1} wurde bereits vollständig bezahlt.,
{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts.,"{0} {1} wurde bereits teilweise bezahlt. Bitte nutzen Sie den Button 'Ausstehende Rechnungen aufrufen', um die aktuell ausstehenden Beträge zu erhalten.",
{0} {1} has been modified. Please refresh.,{0} {1} wurde geändert. Bitte aktualisieren.,
{0} {1} has not been submitted so the action cannot be completed,"{0} {1} sind nicht gebucht, deshalb kann die Aktion nicht abgeschlossen werden",
"{0} {1} is associated with {2}, but Party Account is {3}","{0} {1} ist mit {2} verbunden, aber das Gegenkonto ist {3}",
@@ -3441,9 +3449,10 @@ on,Am,
{0} {1} is frozen,{0} {1} ist gesperrt,
{0} {1} is fully billed,{0} {1} wird voll in Rechnung gestellt,
{0} {1} is not active,{0} {1} ist nicht aktiv,
{0} {1} is not associated with {2} {3},{0} {1} ist nicht mit {2} {3} verknüpft,
{0} {1} is not associated with {2} {3},{0} {1} gehört nicht zu {2} {3},
{0} {1} is not present in the parent company,{0} {1} ist in der Muttergesellschaft nicht vorhanden,
{0} {1} is not submitted,{0} {1} wurde nicht übertragen,
{0} {1} is on hold,{0} {1} liegt derzeit auf Eis,
{0} {1} is {2},{0} {1} ist {2},
{0} {1} must be submitted,{0} {1} muss vorgelegt werden,
{0} {1} not in any active Fiscal Year.,{0} {1} nicht in einem aktiven Geschäftsjahr.,
@@ -3575,7 +3584,7 @@ Account is not set for the dashboard chart {0},Konto ist nicht für das Dashboar
Account {0} does not belong to company {1},Konto {0} gehört nicht zu Firma {1},
Account {0} does not exists in the dashboard chart {1},Konto {0} ist im Dashboard-Diagramm {1} nicht vorhanden,
Account: <b>{0}</b> is capital Work in progress and can not be updated by Journal Entry,Konto: <b>{0}</b> ist in Bearbeitung und kann von Journal Entry nicht aktualisiert werden,
Account: {0} is not permitted under Payment Entry,Konto: {0} ist unter Zahlungseingang nicht zulässig,
Account: {0} is not permitted under Payment Entry,Konto {0} kann nicht in Zahlung verwendet werden,
Accounting Dimension <b>{0}</b> is required for 'Balance Sheet' account {1}.,Die Buchhaltungsdimension <b>{0}</b> ist für das Bilanzkonto <b>{1}</b> erforderlich.,
Accounting Dimension <b>{0}</b> is required for 'Profit and Loss' account {1}.,Die Buchhaltungsdimension <b>{0}</b> ist für das Konto {1} &quot;Gewinn und Verlust&quot; erforderlich.,
Accounting Masters,Accounting Masters,
@@ -3639,6 +3648,8 @@ Billing Interval Count cannot be less than 1,Die Anzahl der Abrechnungsintervall
Blue,Blau,
Book,Buchen,
Book Appointment,Einen Termin verabreden,
Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.,"Die Option 'Anzahlungen als Verbindlichkeit buchen' ist aktiviert. Das Ausgangskonto wurde von {0} auf {1} geändert.",
Book Advance Payments in Separate Party Account,Anzahlungen als Verbindlichkeit buchen,
Brand,Marke,
Browse,Durchsuchen,
Call Connected,Anruf verbunden,
@@ -3860,6 +3871,7 @@ No correct answer is set for {0},Für {0} ist keine richtige Antwort festgelegt.
No description,Keine Beschreibung,
No issue has been raised by the caller.,Der Anrufer hat kein Problem angesprochen.,
No items to publish,Keine Artikel zu veröffentlichen,
No outstanding {0} found for the {1} {2} which qualify the filters you have specified.,"Für {1} {2} wurden kein ausstehender Beleg vom Typ {0} gefunden, der den angegebenen Filtern entspricht.",
No outstanding invoices found,Keine offenen Rechnungen gefunden,
No outstanding invoices found for the {0} {1} which qualify the filters you have specified.,"Für {0} {1} wurden keine ausstehenden Rechnungen gefunden, die die von Ihnen angegebenen Filter qualifizieren.",
No outstanding invoices require exchange rate revaluation,Keine ausstehenden Rechnungen erfordern eine Neubewertung des Wechselkurses,
@@ -3955,8 +3967,8 @@ Publish More Items,Veröffentlichen Sie weitere Elemente,
Publish Your First Items,Veröffentlichen Sie Ihre ersten Artikel,
Publish {0} Items,{0} Elemente veröffentlichen,
Published Items,Veröffentlichte Artikel,
Purchase Invoice cannot be made against an existing asset {0},Kaufrechnung kann nicht für ein vorhandenes Asset erstellt werden {0},
Purchase Invoices,Rechnungen kaufen,
Purchase Invoice cannot be made against an existing asset {0},Eingangsrechnung kann nicht für ein vorhandenes Asset erstellt werden {0},
Purchase Invoices,Eingangsrechnungen,
Purchase Orders,Kauforder,
Purchase Receipt doesn't have any Item for which Retain Sample is enabled.,"Der Kaufbeleg enthält keinen Artikel, für den die Option &quot;Probe aufbewahren&quot; aktiviert ist.",
Purchase Return,Warenrücksendung,
@@ -3995,20 +4007,20 @@ Review,Rezension,
Room,Zimmer,
Room Type,Zimmertyp,
Row # ,Zeile #,
Row #{0}: Accepted Warehouse and Supplier Warehouse cannot be same,Zeile # {0}: Akzeptiertes Lager und Lieferantenlager können nicht identisch sein,
Row #{0}: Cannot delete item {1} which has already been billed.,Zeile # {0}: Der bereits abgerechnete Artikel {1} kann nicht gelöscht werden.,
Row #{0}: Cannot delete item {1} which has already been delivered,"Zeile # {0}: Element {1}, das bereits geliefert wurde, kann nicht gelöscht werden",
Row #{0}: Cannot delete item {1} which has already been received,"Zeile # {0}: Element {1}, das bereits empfangen wurde, kann nicht gelöscht werden",
Row #{0}: Cannot delete item {1} which has work order assigned to it.,"Zeile # {0}: Element {1}, dem ein Arbeitsauftrag zugewiesen wurde, kann nicht gelöscht werden.",
Row #{0}: Cannot delete item {1} which is assigned to customer's purchase order.,"Zeile # {0}: Artikel {1}, der der Bestellung des Kunden zugeordnet ist, kann nicht gelöscht werden.",
Row #{0}: Cannot select Supplier Warehouse while suppling raw materials to subcontractor,"Zeile # {0}: Supplier Warehouse kann nicht ausgewählt werden, während Rohstoffe an Subunternehmer geliefert werden",
Row #{0}: Cost Center {1} does not belong to company {2},Zeile # {0}: Kostenstelle {1} gehört nicht zu Firma {2},
Row #{0}: Operation {1} is not completed for {2} qty of finished goods in Work Order {3}. Please update operation status via Job Card {4}.,Zeile # {0}: Vorgang {1} ist für {2} Fertigwarenmenge im Fertigungsauftrag {3} nicht abgeschlossen. Bitte aktualisieren Sie den Betriebsstatus über die Jobkarte {4}.,
Row #{0}: Payment document is required to complete the transaction,"Zeile # {0}: Der Zahlungsbeleg ist erforderlich, um die Transaktion abzuschließen",
Row #{0}: Serial No {1} does not belong to Batch {2},Zeile # {0}: Seriennummer {1} gehört nicht zu Charge {2},
Row #{0}: Service End Date cannot be before Invoice Posting Date,Zeile # {0}: Das Service-Enddatum darf nicht vor dem Rechnungsbuchungsdatum liegen,
Row #{0}: Service Start Date cannot be greater than Service End Date,Zeile # {0}: Das Servicestartdatum darf nicht höher als das Serviceenddatum sein,
Row #{0}: Service Start and End Date is required for deferred accounting,Zeile # {0}: Das Start- und Enddatum des Service ist für die aufgeschobene Abrechnung erforderlich,
Row #{0}: Accepted Warehouse and Supplier Warehouse cannot be same,Zeile {0}: Akzeptiertes Lager und Lieferantenlager können nicht identisch sein,
Row #{0}: Cannot delete item {1} which has already been billed.,Zeile {0}: Der bereits abgerechnete Artikel {1} kann nicht gelöscht werden.,
Row #{0}: Cannot delete item {1} which has already been delivered,"Zeile {0}: Element {1}, das bereits geliefert wurde, kann nicht gelöscht werden",
Row #{0}: Cannot delete item {1} which has already been received,"Zeile {0}: Element {1}, das bereits empfangen wurde, kann nicht gelöscht werden",
Row #{0}: Cannot delete item {1} which has work order assigned to it.,"Zeile {0}: Element {1}, dem ein Arbeitsauftrag zugewiesen wurde, kann nicht gelöscht werden.",
Row #{0}: Cannot delete item {1} which is assigned to customer's purchase order.,"Zeile {0}: Artikel {1}, der der Bestellung des Kunden zugeordnet ist, kann nicht gelöscht werden.",
Row #{0}: Cannot select Supplier Warehouse while suppling raw materials to subcontractor,"Zeile {0}: Supplier Warehouse kann nicht ausgewählt werden, während Rohstoffe an Subunternehmer geliefert werden",
Row #{0}: Cost Center {1} does not belong to company {2},Zeile {0}: Kostenstelle {1} gehört nicht zu Firma {2},
Row #{0}: Operation {1} is not completed for {2} qty of finished goods in Work Order {3}. Please update operation status via Job Card {4}.,Zeile {0}: Vorgang {1} ist für {2} Fertigwarenmenge im Fertigungsauftrag {3} nicht abgeschlossen. Bitte aktualisieren Sie den Betriebsstatus über die Jobkarte {4}.,
Row #{0}: Payment document is required to complete the transaction,"Zeile {0}: Der Zahlungsbeleg ist erforderlich, um die Transaktion abzuschließen",
Row #{0}: Serial No {1} does not belong to Batch {2},Zeile {0}: Seriennummer {1} gehört nicht zu Charge {2},
Row #{0}: Service End Date cannot be before Invoice Posting Date,Zeile {0}: Das Service-Enddatum darf nicht vor dem Rechnungsbuchungsdatum liegen,
Row #{0}: Service Start Date cannot be greater than Service End Date,Zeile {0}: Das Servicestartdatum darf nicht höher als das Serviceenddatum sein,
Row #{0}: Service Start and End Date is required for deferred accounting,Zeile {0}: Das Start- und Enddatum des Service ist für die aufgeschobene Abrechnung erforderlich,
Row {0}: Invalid Item Tax Template for item {1},Zeile {0}: Ungültige Artikelsteuervorlage für Artikel {1},
Row {0}: Quantity not available for {4} in warehouse {1} at posting time of the entry ({2} {3}),Zeile {0}: Menge für {4} in Lager {1} zum Buchungszeitpunkt des Eintrags nicht verfügbar ({2} {3}),
Row {0}: user has not applied the rule {1} on the item {2},Zeile {0}: Der Nutzer hat die Regel {1} nicht auf das Element {2} angewendet.,
@@ -4275,7 +4287,7 @@ to,An,
Cards,Karten,
Percentage,Prozentsatz,
Failed to setup defaults for country {0}. Please contact support@erpnext.com,Fehler beim Einrichten der Standardeinstellungen für Land {0}. Bitte wenden Sie sich an support@erpnext.com,
Row #{0}: Item {1} is not a Serialized/Batched Item. It cannot have a Serial No/Batch No against it.,Zeile # {0}: Element {1} ist kein serialisiertes / gestapeltes Element. Es kann keine Seriennummer / Chargennummer dagegen haben.,
Row #{0}: Item {1} is not a Serialized/Batched Item. It cannot have a Serial No/Batch No against it.,Zeile {0}: Element {1} ist kein serialisiertes / gestapeltes Element. Es kann keine Seriennummer / Chargennummer dagegen haben.,
Please set {0},Bitte {0} setzen,
Please set {0},Bitte setzen Sie {0},supplier
Draft,Entwurf,"docstatus,=,0"
@@ -4362,7 +4374,7 @@ Row {0}: {1} is required in the expenses table to book an expense claim.,"Zeile
Set the default account for the {0} {1},Legen Sie das Standardkonto für {0} {1} fest,
(Half Day),(Halber Tag),
Income Tax Slab,Einkommensteuerplatte,
Row #{0}: Cannot set amount or formula for Salary Component {1} with Variable Based On Taxable Salary,Zeile # {0}: Betrag oder Formel für Gehaltskomponente {1} mit Variable basierend auf steuerpflichtigem Gehalt kann nicht festgelegt werden,
Row #{0}: Cannot set amount or formula for Salary Component {1} with Variable Based On Taxable Salary,Zeile {0}: Betrag oder Formel für Gehaltskomponente {1} mit Variable basierend auf steuerpflichtigem Gehalt kann nicht festgelegt werden,
Row #{}: {} of {} should be {}. Please modify the account or select a different account.,Zeile # {}: {} von {} sollte {} sein. Bitte ändern Sie das Konto oder wählen Sie ein anderes Konto aus.,
Row #{}: Please asign task to a member.,Zeile # {}: Bitte weisen Sie einem Mitglied eine Aufgabe zu.,
Process Failed,Prozess fehlgeschlagen,
@@ -4371,10 +4383,11 @@ Please set Warehouse in Woocommerce Settings,Bitte stellen Sie Warehouse in den
Row {0}: Delivery Warehouse ({1}) and Customer Warehouse ({2}) can not be same,Zeile {0}: Lieferlager ({1}) und Kundenlager ({2}) können nicht identisch sein,
Row {0}: Due Date in the Payment Terms table cannot be before Posting Date,Zeile {0}: Fälligkeitsdatum in der Tabelle &quot;Zahlungsbedingungen&quot; darf nicht vor dem Buchungsdatum liegen,
Cannot find {} for item {}. Please set the same in Item Master or Stock Settings.,{} Für Element {} kann nicht gefunden werden. Bitte stellen Sie dasselbe in den Artikelstamm- oder Lagereinstellungen ein.,
Row #{0}: The batch {1} has already expired.,Zeile # {0}: Der Stapel {1} ist bereits abgelaufen.,
Row #{0}: The batch {1} has already expired.,Zeile {0}: Der Stapel {1} ist bereits abgelaufen.,
Start Year and End Year are mandatory,Startjahr und Endjahr sind obligatorisch,
GL Entry,Buchung zum Hauptbuch,
Cannot allocate more than {0} against payment term {1},Es kann nicht mehr als {0} für die Zahlungsbedingung {1} zugeordnet werden.,
Cannot receive from customer against negative outstanding,Negativer Gesamtbetrag kann nicht vom Kunden empfangen werden,
The root account {0} must be a group,Das Root-Konto {0} muss eine Gruppe sein,
Shipping rule not applicable for country {0} in Shipping Address,Versandregel gilt nicht für Land {0} in Versandadresse,
Get Payments from,Zahlungen erhalten von,
@@ -4517,7 +4530,7 @@ Determine Address Tax Category From,Adresssteuerkategorie bestimmen von,
Over Billing Allowance (%),Mehr als Abrechnungsbetrag (%),
Credit Controller,Kredit-Controller,
Check Supplier Invoice Number Uniqueness,"Aktivieren, damit dieselbe Lieferantenrechnungsnummer nur einmal vorkommen kann",
Make Payment via Journal Entry,Zahlung über Journaleintrag,
Make Payment via Journal Entry,Zahlung über Buchungssatz,
Unlink Payment on Cancellation of Invoice,Zahlung bei Stornierung der Rechnung aufheben,
Book Asset Depreciation Entry Automatically,Vermögensabschreibung automatisch verbuchen,
Automatically Add Taxes and Charges from Item Tax Template,Steuern und Gebühren aus Artikelsteuervorlage automatisch hinzufügen,
@@ -4586,7 +4599,7 @@ Bank Statement Transaction Entry,Kontoauszug Transaktionseintrag,
Bank Transaction Entries,Banktransaktionseinträge,
New Transactions,Neue Transaktionen,
Match Transaction to Invoices,Transaktion mit Rechnungen abgleichen,
Create New Payment/Journal Entry,Erstellen Sie eine neue Zahlung / Journaleintrag,
Create New Payment/Journal Entry,Erstellen Sie eine neue Zahlung / Buchungssatz,
Submit/Reconcile Payments,Zahlungen absenden / abstimmen,
Matching Invoices,Passende Rechnungen,
Payment Invoice Items,Zahlung Rechnungspositionen,
@@ -4839,6 +4852,7 @@ Account Paid To,Eingangskonto,
Paid Amount (Company Currency),Gezahlter Betrag (Unternehmenswährung),
Received Amount,erhaltenen Betrag,
Received Amount (Company Currency),Erhaltene Menge (Gesellschaft Währung),
Received Amount cannot be greater than Paid Amount,Der erhaltene Betrag darf nicht größer sein als der gezahlte Betrag,
Get Outstanding Invoice,Erhalten Sie eine ausstehende Rechnung,
Payment References,Bezahlung Referenzen,
Writeoff,Abschreiben,
@@ -4986,7 +5000,7 @@ Apply Tax Withholding Amount,Steuereinbehaltungsbetrag anwenden,
Accounting Dimensions ,Buchhaltung Dimensionen,
Supplier Invoice Details,Lieferant Rechnungsdetails,
Supplier Invoice Date,Lieferantenrechnungsdatum,
Return Against Purchase Invoice,Zurück zur Einkaufsrechnung,
Return Against Purchase Invoice,Gutschrift zur Eingangsrechnung,
Select Supplier Address,Lieferantenadresse auswählen,
Contact Person,Kontaktperson,
Select Shipping Address,Lieferadresse auswählen,
@@ -5036,7 +5050,7 @@ Terms,Geschäftsbedingungen,
Terms and Conditions1,Allgemeine Geschäftsbedingungen1,
Group same items,Gruppe gleichen Artikel,
Print Language,Drucksprache,
"Once set, this invoice will be on hold till the set date","Einmal eingestellt, wird diese Rechnung bis zum festgelegten Datum gehalten",
"Once set, this invoice will be on hold till the set date","Einmal eingestellt, liegt diese Rechnung bis zum festgelegten Datum auf Eis",
Credit To,Gutschreiben auf,
Party Account Currency,Gruppenkonten-Währung,
Against Expense Account,Zu Aufwandskonto,
@@ -5360,7 +5374,7 @@ Asset Owner,Eigentümer des Vermögenswertes,
Asset Owner Company,Eigentümergesellschaft,
Custodian,Depotbank,
Disposal Date,Verkauf Datum,
Journal Entry for Scrap,Journaleintrag für Ausschuss,
Journal Entry for Scrap,Buchungssatz für Ausschuss,
Available-for-use Date,Verfügbarkeitsdatum,
Calculate Depreciation,Abschreibung berechnen,
Allow Monthly Depreciation,Monatliche Abschreibung zulassen,
@@ -5522,8 +5536,8 @@ Default Bank Account,Standardbankkonto,
Is Transporter,Ist Transporter,
Represents Company,Repräsentiert das Unternehmen,
Supplier Type,Lieferantentyp,
Allow Purchase Invoice Creation Without Purchase Order,Erstellen von Kaufrechnungen ohne Bestellung zulassen,
Allow Purchase Invoice Creation Without Purchase Receipt,Zulassen der Erstellung von Kaufrechnungen ohne Kaufbeleg,
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,
Warn POs,Warnen Sie POs,
Prevent RFQs,Vermeidung von Ausschreibungen,
@@ -7802,7 +7816,7 @@ Enable Perpetual Inventory,Permanente Inventur aktivieren,
Default Inventory Account,Standard Inventurkonto,
Stock Adjustment Account,Bestandskorrektur-Konto,
Fixed Asset Depreciation Settings,Einstellungen Abschreibung von Anlagevermögen,
Series for Asset Depreciation Entry (Journal Entry),Serie für Abschreibungs-Eintrag (Journaleintrag),
Series for Asset Depreciation Entry (Journal Entry),Serie für Abschreibungs-Eintrag (Buchungssatz),
Gain/Loss Account on Asset Disposal,Gewinn-/Verlustrechnung auf die Veräußerung von Vermögenswerten,
Asset Depreciation Cost Center,Kostenstelle für Vermögenswertabschreibung,
Budget Detail,Budget-Detail,
@@ -8597,10 +8611,10 @@ Automatically Process Deferred Accounting Entry,Aufgeschobene Buchungsbuchung au
Bank Clearance,Bankfreigabe,
Bank Clearance Detail,Bankfreigabedetail,
Update Cost Center Name / Number,Name / Nummer der Kostenstelle aktualisieren,
Journal Entry Template,Journaleintragsvorlage,
Journal Entry Template,Buchungssatz-Vorlage,
Template Title,Vorlagentitel,
Journal Entry Type,Journaleintragstyp,
Journal Entry Template Account,Journaleintragsvorlagenkonto,
Journal Entry Type,Buchungssatz-Typ,
Journal Entry Template Account,Buchungssatzvorlagenkonto,
Process Deferred Accounting,Aufgeschobene Buchhaltung verarbeiten,
Manual entry cannot be created! Disable automatic entry for deferred accounting in accounts settings and try again,Manuelle Eingabe kann nicht erstellt werden! Deaktivieren Sie die automatische Eingabe für die verzögerte Buchhaltung in den Konteneinstellungen und versuchen Sie es erneut,
End date cannot be before start date,Das Enddatum darf nicht vor dem Startdatum liegen,
@@ -8676,7 +8690,7 @@ Deferred Accounting Settings,Aufgeschobene Buchhaltungseinstellungen,
Book Deferred Entries Based On,Buch verzögerte Einträge basierend auf,
Days,Tage,
Months,Monate,
Book Deferred Entries Via Journal Entry,Buch verzögerte Einträge über Journaleintrag,
Book Deferred Entries Via Journal Entry,Separaten Buchungssatz für latente Buchungen erstellen,
Submit Journal Entries,Journaleinträge senden,
If this is unchecked Journal Entries will be saved in a Draft state and will have to be submitted manually,"Wenn dieses Kontrollkästchen deaktiviert ist, werden Journaleinträge in einem Entwurfsstatus gespeichert und müssen manuell übermittelt werden",
Enable Distributed Cost Center,Aktivieren Sie die verteilte Kostenstelle,
@@ -8704,7 +8718,7 @@ Dunning Letter,Mahnbrief,
Reference Detail No,Referenz Detail Nr,
Custom Remarks,Benutzerdefinierte Bemerkungen,
Please select a Company first.,Bitte wählen Sie zuerst eine Firma aus.,
"Row #{0}: Reference Document Type must be one of Sales Order, Sales Invoice, Journal Entry or Dunning","Zeile # {0}: Der Referenzdokumenttyp muss Kundenauftrag, Verkaufsrechnung, Journaleintrag oder Mahnwesen sein",
"Row #{0}: Reference Document Type must be one of Sales Order, Sales Invoice, Journal Entry or Dunning","Zeile {0}: Der Referenzdokumenttyp muss Auftrag, Ausgangsrechnung, Buchungssatz oder Mahnung sein",
POS Closing Entry,POS Closing Entry,
POS Opening Entry,POS-Eröffnungseintrag,
POS Transactions,POS-Transaktionen,
@@ -8824,9 +8838,9 @@ Depreciation Posting Date,Buchungsdatum der Abschreibung,
"By default, the Supplier Name is set as per the Supplier Name entered. If you want Suppliers to be named by a ","Standardmäßig wird der Lieferantenname gemäß dem eingegebenen Lieferantennamen festgelegt. Wenn Sie möchten, dass Lieferanten von a benannt werden",
choose the 'Naming Series' option.,Wählen Sie die Option &quot;Naming Series&quot;.,
Configure the default Price List when creating a new Purchase transaction. Item prices will be fetched from this Price List.,Konfigurieren Sie die Standardpreisliste beim Erstellen einer neuen Kauftransaktion. Artikelpreise werden aus dieser Preisliste abgerufen.,
"If this option is configured 'Yes', ERPNext will prevent you from creating a Purchase Invoice or Receipt without creating a Purchase Order first. This configuration can be overridden for a particular supplier by enabling the 'Allow Purchase Invoice Creation Without Purchase Order' checkbox in the Supplier master.","Wenn diese Option auf &quot;Ja&quot; konfiguriert ist, verhindert ERPNext, dass Sie eine Kaufrechnung oder einen Beleg erstellen können, ohne zuvor eine Bestellung zu erstellen. Diese Konfiguration kann für einen bestimmten Lieferanten überschrieben werden, indem das Kontrollkästchen &quot;Erstellung von Einkaufsrechnungen ohne Bestellung zulassen&quot; im Lieferantenstamm aktiviert wird.",
"If this option is configured 'Yes', ERPNext will prevent you from creating a Purchase Invoice without creating a Purchase Receipt first. This configuration can be overridden for a particular supplier by enabling the 'Allow Purchase Invoice Creation Without Purchase Receipt' checkbox in the Supplier master.","Wenn diese Option auf &quot;Ja&quot; konfiguriert ist, verhindert ERPNext, dass Sie eine Kaufrechnung erstellen können, ohne zuvor einen Kaufbeleg zu erstellen. Diese Konfiguration kann für einen bestimmten Lieferanten überschrieben werden, indem das Kontrollkästchen &quot;Erstellung von Kaufrechnungen ohne Kaufbeleg zulassen&quot; im Lieferantenstamm aktiviert wird.",
Quantity & Stock,Menge &amp; Lager,
"If this option is configured 'Yes', ERPNext will prevent you from creating a Purchase Invoice or Receipt without creating a Purchase Order first. This configuration can be overridden for a particular supplier by enabling the 'Allow Purchase Invoice Creation Without Purchase Order' checkbox in the Supplier master.","Wenn diese Option auf 'Ja' gesetzt ist, validiert ERPNext, dass Sie eine Bestellung angelegt haben, bevor Sie eine Eingangsrechnung oder einen Kaufbeleg erfassen können. Diese Konfiguration kann für einzelne Lieferanten überschrieben werden, indem Sie die Option 'Erstellung von Eingangsrechnungen ohne Bestellung zulassen' im Lieferantenstamm aktivieren.",
"If this option is configured 'Yes', ERPNext will prevent you from creating a Purchase Invoice without creating a Purchase Receipt first. This configuration can be overridden for a particular supplier by enabling the 'Allow Purchase Invoice Creation Without Purchase Receipt' checkbox in the Supplier master.","Wenn diese Option auf 'Ja' gesetzt ist, validiert ERPNext, dass Sie einen Kaufbeleg angelegt haben, bevor Sie eine Eingangsrechnung erfasen können. Diese Konfiguration kann für einzelne Lieferanten überschrieben werden, indem Sie die Option 'Erstellung von Kaufrechnungen ohne Kaufbeleg zulassen' im Lieferantenstamm aktivieren.",
Quantity & Stock,Menge & Lager,
Call Details,Anrufdetails,
Authorised By,Authorisiert von,
Signee (Company),Unterzeichner (Firma),
@@ -9063,7 +9077,7 @@ Rented To Date,Bisher vermietet,
Monthly Eligible Amount,Monatlicher förderfähiger Betrag,
Total Eligible HRA Exemption,Insgesamt berechtigte HRA-Befreiung,
Validating Employee Attendance...,Überprüfung der Mitarbeiterbeteiligung ...,
Submitting Salary Slips and creating Journal Entry...,Einreichen von Gehaltsabrechnungen und Erstellen eines Journaleintrags ...,
Submitting Salary Slips and creating Journal Entry...,Gehaltsabrechnungen werden gebucht und Buchungssätze erstellt...,
Calculate Payroll Working Days Based On,Berechnen Sie die Arbeitstage der Personalabrechnung basierend auf,
Consider Unmarked Attendance As,Betrachten Sie die nicht markierte Teilnahme als,
Fraction of Daily Salary for Half Day,Bruchteil des Tagesgehalts für einen halben Tag,
@@ -9116,12 +9130,12 @@ Show 'Scan Barcode' field above every child table to insert Items with ease.,"Ze
"If blank, parent Warehouse Account or company default will be considered in transactions","Wenn leer, wird das übergeordnete Lagerkonto oder der Firmenstandard bei Transaktionen berücksichtigt",
Service Level Agreement Details,Details zum Service Level Agreement,
Service Level Agreement Status,Status des Service Level Agreements,
On Hold Since,In der Warteschleife seit,
On Hold Since,Auf Eis gelegt seit,
Total Hold Time,Gesamte Haltezeit,
Response Details,Antwortdetails,
Average Response Time,Durchschnittliche Reaktionszeit,
User Resolution Time,Benutzerauflösungszeit,
SLA is on hold since {0},"SLA wird gehalten, da {0}",
SLA is on hold since {0},"SLA ist seit {0} auf Eis gelegt",
Pause SLA On Status,SLA On Status anhalten,
Pause SLA On,SLA anhalten Ein,
Greetings Section,Grüße Abschnitt,
@@ -9335,6 +9349,7 @@ Total Assets,Gesamtvermögen,
New Assets (This Year),Neue Vermögenswerte (dieses Jahr),
Row #{}: Depreciation Posting Date should not be equal to Available for Use Date.,Zeile # {}: Das Buchungsdatum der Abschreibung sollte nicht dem Datum der Verfügbarkeit entsprechen.,
Incorrect Date,Falsches Datum,
Incorrect Payment Type,Falsche Zahlungsart,
Invalid Gross Purchase Amount,Ungültiger Bruttokaufbetrag,
There are active maintenance or repairs against the asset. You must complete all of them before cancelling the asset.,"Es gibt aktive Wartungs- oder Reparaturarbeiten am Vermögenswert. Sie müssen alle Schritte ausführen, bevor Sie das Asset stornieren können.",
% Complete,% Komplett,
@@ -9357,7 +9372,7 @@ Please check your Plaid client ID and secret values,Bitte überprüfen Sie Ihre
Bank transaction creation error,Fehler beim Erstellen der Banküberweisung,
Unit of Measurement,Maßeinheit,
Fiscal Year {0} Does Not Exist,Geschäftsjahr {0} existiert nicht,
Row # {0}: Returned Item {1} does not exist in {2} {3},Zeile # {0}: Zurückgegebenes Element {1} ist in {2} {3} nicht vorhanden,
Row # {0}: Returned Item {1} does not exist in {2} {3},Zeile {0}: Zurückgegebenes Element {1} ist in {2} {3} nicht vorhanden,
Valuation type charges can not be marked as Inclusive,Bewertungsgebühren können nicht als Inklusiv gekennzeichnet werden,
You do not have permissions to {} items in a {}.,Sie haben keine Berechtigungen für {} Elemente in einem {}.,
Insufficient Permissions,Nicht ausreichende Berechtigungen,
@@ -9368,7 +9383,7 @@ Invalid Value,Ungültiger Wert,
The value {0} is already assigned to an existing Item {1}.,Der Wert {0} ist bereits einem vorhandenen Element {1} zugeordnet.,
"To still proceed with editing this Attribute Value, enable {0} in Item Variant Settings.","Aktivieren Sie {0} in den Einstellungen für Elementvarianten, um mit der Bearbeitung dieses Attributwerts fortzufahren.",
Edit Not Allowed,Bearbeiten nicht erlaubt,
Row #{0}: Item {1} is already fully received in Purchase Order {2},Zeile # {0}: Artikel {1} ist bereits vollständig in der Bestellung {2} eingegangen.,
Row #{0}: Item {1} is already fully received in Purchase Order {2},Zeile {0}: Artikel {1} ist bereits vollständig in der Bestellung {2} eingegangen.,
You cannot create or cancel any accounting entries with in the closed Accounting Period {0},Sie können im abgeschlossenen Abrechnungszeitraum {0} keine Buchhaltungseinträge mit erstellen oder stornieren.,
POS Invoice should have {} field checked.,Für die POS-Rechnung sollte das Feld {} aktiviert sein.,
Invalid Item,Ungültiger Artikel,
@@ -9470,7 +9485,7 @@ Only submittted unpledge requests can be approved,Es können nur übermittelte n
Interest Amount or Principal Amount is mandatory,Der Zinsbetrag oder der Kapitalbetrag ist obligatorisch,
Disbursed Amount cannot be greater than {0},Der ausgezahlte Betrag darf nicht größer als {0} sein.,
Row {0}: Loan Security {1} added multiple times,Zeile {0}: Darlehenssicherheit {1} wurde mehrmals hinzugefügt,
Row #{0}: Child Item should not be a Product Bundle. Please remove Item {1} and Save,Zeile # {0}: Untergeordnetes Element sollte kein Produktpaket sein. Bitte entfernen Sie Artikel {1} und speichern Sie,
Row #{0}: Child Item should not be a Product Bundle. Please remove Item {1} and Save,Zeile {0}: Untergeordnetes Element sollte kein Produktpaket sein. Bitte entfernen Sie Artikel {1} und speichern Sie,
Credit limit reached for customer {0},Kreditlimit für Kunde erreicht {0},
Could not auto create Customer due to the following missing mandatory field(s):,Der Kunde konnte aufgrund der folgenden fehlenden Pflichtfelder nicht automatisch erstellt werden:,
Please create Customer from Lead {0}.,Bitte erstellen Sie einen Kunden aus Lead {0}.,
@@ -9482,7 +9497,7 @@ Payroll date can not be less than employee's joining date.,Das Abrechnungsdatum
From date can not be less than employee's joining date.,Ab dem Datum darf das Beitrittsdatum des Mitarbeiters nicht unterschritten werden.,
To date can not be greater than employee's relieving date.,Bisher kann das Entlastungsdatum des Mitarbeiters nicht überschritten werden.,
Payroll date can not be greater than employee's relieving date.,Das Abrechnungsdatum darf nicht größer sein als das Entlastungsdatum des Mitarbeiters.,
Row #{0}: Please enter the result value for {1},Zeile # {0}: Bitte geben Sie den Ergebniswert für {1} ein,
Row #{0}: Please enter the result value for {1},Zeile {0}: Bitte geben Sie den Ergebniswert für {1} ein,
Mandatory Results,Obligatorische Ergebnisse,
Sales Invoice or Patient Encounter is required to create Lab Tests,Für die Erstellung von Labortests ist eine Verkaufsrechnung oder eine Patientenbegegnung erforderlich,
Insufficient Data,Unzureichende Daten,
@@ -9490,12 +9505,12 @@ Lab Test(s) {0} created successfully,Labortest (e) {0} erfolgreich erstellt,
Test :,Prüfung :,
Sample Collection {0} has been created,Die Probensammlung {0} wurde erstellt,
Normal Range: ,Normalbereich:,
Row #{0}: Check Out datetime cannot be less than Check In datetime,Zeile # {0}: Die Check-out-Datumszeit darf nicht kleiner als die Check-In-Datumszeit sein,
Row #{0}: Check Out datetime cannot be less than Check In datetime,Zeile {0}: Die Check-out-Datumszeit darf nicht kleiner als die Check-In-Datumszeit sein,
"Missing required details, did not create Inpatient Record","Fehlende erforderliche Details, keine stationäre Aufzeichnung erstellt",
Unbilled Invoices,Nicht in Rechnung gestellte Rechnungen,
Standard Selling Rate should be greater than zero.,Die Standardverkaufsrate sollte größer als Null sein.,
Conversion Factor is mandatory,Der Umrechnungsfaktor ist obligatorisch,
Row #{0}: Conversion Factor is mandatory,Zeile # {0}: Der Umrechnungsfaktor ist obligatorisch,
Row #{0}: Conversion Factor is mandatory,Zeile {0}: Der Umrechnungsfaktor ist obligatorisch,
Sample Quantity cannot be negative or 0,Die Probenmenge darf nicht negativ oder 0 sein,
Invalid Quantity,Ungültige Menge,
"Please set defaults for Customer Group, Territory and Selling Price List in Selling Settings","Bitte legen Sie in den Verkaufseinstellungen die Standardeinstellungen für Kundengruppe, Gebiet und Verkaufspreisliste fest",
@@ -9687,7 +9702,7 @@ Row #{}: No batch selected against item: {}. Please select a batch or remove it
Payment amount cannot be less than or equal to 0,Der Zahlungsbetrag darf nicht kleiner oder gleich 0 sein,
Please enter the phone number first,Bitte geben Sie zuerst die Telefonnummer ein,
Row #{}: {} {} does not exist.,Zeile # {}: {} {} existiert nicht.,
Row #{0}: {1} is required to create the Opening {2} Invoices,"Zeile # {0}: {1} ist erforderlich, um die Eröffnungsrechnungen {2} zu erstellen",
Row #{0}: {1} is required to create the Opening {2} Invoices,"Zeile {0}: {1} ist erforderlich, um die Eröffnungsrechnungen {2} zu erstellen",
You had {} errors while creating opening invoices. Check {} for more details,Beim Erstellen von Eröffnungsrechnungen sind {} Fehler aufgetreten. Überprüfen Sie {} auf weitere Details,
Error Occured,Fehler aufgetreten,
Opening Invoice Creation In Progress,Öffnen der Rechnungserstellung läuft,
@@ -9699,7 +9714,7 @@ Stock Transactions for Item {0} under warehouse {1} cannot be posted before this
Posting future stock transactions are not allowed due to Immutable Ledger,Das Buchen zukünftiger Lagertransaktionen ist aufgrund des unveränderlichen Hauptbuchs nicht zulässig,
A BOM with name {0} already exists for item {1}.,Für Artikel {1} ist bereits eine Stückliste mit dem Namen {0} vorhanden.,
{0}{1} Did you rename the item? Please contact Administrator / Tech support,{0} {1} Haben Sie den Artikel umbenannt? Bitte wenden Sie sich an den Administrator / technischen Support,
At row #{0}: the sequence id {1} cannot be less than previous row sequence id {2},In Zeile # {0}: Die Sequenz-ID {1} darf nicht kleiner sein als die vorherige Zeilen-Sequenz-ID {2}.,
At row #{0}: the sequence id {1} cannot be less than previous row sequence id {2},In Zeile {0}: Die Sequenz-ID {1} darf nicht kleiner sein als die vorherige Zeilen-Sequenz-ID {2}.,
The {0} ({1}) must be equal to {2} ({3}),Die {0} ({1}) muss gleich {2} ({3}) sein.,
"{0}, complete the operation {1} before the operation {2}.","{0}, schließen Sie die Operation {1} vor der Operation {2} ab.",
Cannot ensure delivery by Serial No as Item {0} is added with and without Ensure Delivery by Serial No.,"Die Lieferung per Seriennummer kann nicht sichergestellt werden, da Artikel {0} mit und ohne Lieferung per Seriennummer hinzugefügt wird.",
@@ -9896,3 +9911,11 @@ Total Equity,Eigenkapital,
Warehouse wise Stock Value,Warenwert nach Lager,
Discount Validity,Frist für den Rabatt,
Discount Validity Based On,Frist für den Rabatt berechnet sich nach,
Account Number Length,Kontonummer Länge,
Temporary Against Account Number,Temporäre Gegenkontonummer,
Change DATEV Settings,DATEV-Einstellungen ändern,
Opening Against Account Number,Gegenkontonummer für Eröffnungsbuchungen,
Will be used as against account for all normal ledger entries,Wird als Gegenkonto für alle normalen Buchungen verwendet,
Will be used as against account for opening ledger entries,Wird als Gegenkonto für alle Eröffnungsbuchungen verwendet,
Temporary Against Account Number must be {0} digits long,Temporäre Gegenkontonummer muss {0} Ziffern lang sein,
Opening Against Account Number must be {0} digits long,Gegenkontonummer für Eröffnungsbuchungen muss {0} Ziffern lang sein,
Can't render this file because it is too large.

View File

@@ -875,7 +875,7 @@ Donor,schenker,
Donor Type information.,Donor Type informatie.,
Donor information.,Donorinformatie.,
Download JSON,JSON downloaden,
Draft,Droogte,
Draft,Concept,
Drop Ship,Drop Ship,
Drug,drug,
Due / Reference Date cannot be after {0},Verval- / Referentiedatum kan niet na {0} zijn,
@@ -4280,7 +4280,7 @@ Failed to setup defaults for country {0}. Please contact support@erpnext.com,Kan
Row #{0}: Item {1} is not a Serialized/Batched Item. It cannot have a Serial No/Batch No against it.,Rij # {0}: artikel {1} is geen geserialiseerd / batch artikel. Het kan geen serienummer / batchnummer hebben.,
Please set {0},Stel {0} in,
Please set {0},Stel {0} in,supplier
Draft,Droogte,"docstatus,=,0"
Draft,Concept,"docstatus,=,0"
Cancelled,Geannuleerd,"docstatus,=,2"
Please setup Instructor Naming System in Education > Education Settings,Stel het instructeursysteem in onder onderwijs&gt; onderwijsinstellingen,
Please set Naming Series for {0} via Setup > Settings > Naming Series,Stel Naming Series in op {0} via Instellingen&gt; Instellingen&gt; Naming Series,
@@ -8192,7 +8192,7 @@ Actual Batch Quantity,Werkelijke batchhoeveelheid,
Prevdoc DocType,Prevdoc DocType,
Parent Detail docname,Bovenliggende Detail docname,
"Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.","Genereren van pakbonnen voor pakketten te leveren. Gebruikt voor pakket nummer, inhoud van de verpakking en het gewicht te melden.",
Indicates that the package is a part of this delivery (Only Draft),Geeft aan dat het pakket een onderdeel is van deze levering (alleen ontwerp),
Indicates that the package is a part of this delivery (Only Draft),Geeft aan dat het pakket een onderdeel is van deze levering (alleen concept),
MAT-PAC-.YYYY.-,MAT-PAC-.YYYY.-,
From Package No.,Van Pakket No,
Identification of the package for the delivery (for print),Identificatie van het pakket voor de levering (voor afdrukken),
Can't render this file because it is too large.

View File

@@ -1,7 +1,7 @@
# frappe # https://github.com/frappe/frappe is installed during bench-init
gocardless-pro~=1.22.0
googlemaps # used in ERPNext, but dependency is defined in Frappe
pandas~=1.1.5
pandas>=1.1.5,<2.0.0
plaid-python~=7.2.1
pycountry~=20.7.3
PyGithub~=1.54.1
@@ -10,4 +10,4 @@ python-youtube~=0.8.0
taxjar~=1.9.2
tweepy~=3.10.0
Unidecode~=1.2.0
redisearch==2.0.0
redisearch==2.0.0