-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31918 from s-aga-r/fix/subcontracting-receipt/gl-…
…entries fix: Subcontracting Receipt GL Entries
- Loading branch information
Showing
8 changed files
with
311 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
erpnext/patches/v14_0/fix_subcontracting_receipt_gl_entries.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
import frappe | ||
|
||
from erpnext.stock.report.stock_and_account_value_comparison.stock_and_account_value_comparison import ( | ||
get_data, | ||
) | ||
|
||
|
||
def execute(): | ||
data = [] | ||
|
||
for company in frappe.db.get_list("Company", pluck="name"): | ||
data += get_data( | ||
frappe._dict( | ||
{ | ||
"company": company, | ||
} | ||
) | ||
) | ||
|
||
if data: | ||
for d in data: | ||
if d and d.get("voucher_type") == "Subcontracting Receipt": | ||
doc = frappe.new_doc("Repost Item Valuation") | ||
doc.voucher_type = d.get("voucher_type") | ||
doc.voucher_no = d.get("voucher_no") | ||
doc.save() | ||
doc.submit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.