### Information about bug
New PR is not being repost
### Module
stock
### Ve…rsion
Frappe Chat: v0.0.1 (main)
ERPNext: v14.63.3 (version-14)
Frappe Framework: v14.66.2 (version-14)
Frappe HR: v14.22.0 (version-14)
India Compliance: v14.24.3 (version-14)
### Installation method
manual install
### Relevant log output / Stack trace / Full Error Message.
```shell
{"message": "Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.", "title": "Message", "indicator": "red", "raise_exception": 1}
Traceback:
Traceback with variables (most recent call last): File "apps/erpnext/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py", line 240, in repost repost_gl_entries(doc) doc = e = ValidationError('Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.') File "apps/erpnext/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py", line 305, in repost_gl_entries repost_gle_for_stock_vouchers( doc = directly_dependent_transactions = [('Purchase Receipt', 'PRE/23-24/07581'), ('Stock Entry', 'STE/2402/03827'), ('Stock Entry', 'STE/2402/03840')] repost_affected_transaction = {('Stock Entry', 'STE/2402/03840'), ('Purchase Receipt', 'PRE/23-24/07581'), ('Stock Entry', 'STE/2402/03827')} File "apps/erpnext/erpnext/accounts/utils.py", line 1322, in repost_gle_for_stock_vouchers expected_gle = toggle_debit_credit_if_negative(voucher_obj.get_gl_entries(warehouse_account)) stock_vouchers = [('Purchase Receipt', 'PRE/23-24/07581'), ('Stock Entry', 'STE/2402/03827'), ('Stock Entry', 'STE/2402/03840')] posting_date = datetime.date(2024, 2, 26) company = 'Blisstering Electronics Private Limited' warehouse_account = {'All Warehouses - BEPL': {'name': 'All Warehouses - BEPL', 'account': '1410 - Stock In Hand - BEPL', 'parent_warehouse': '', 'company': 'Blisstering Electronics Private Limited', 'is_group': 1, 'account_currency': 'INR'}, 'Work In Progress - BEPL': {'name': 'Work In Progress - BEPL', 'account': '1420 - Work-In-Progress - BEPL', 'parent_warehouse': 'All Warehouses - BEPL', 'company': 'Blisstering Electronics Private Limited', 'is_group': 1, 'account_currency': 'INR'}, 'SMT WIP - BEPL': {'name': 'SMT WIP - BEPL', 'account': '1420 - Work-In-Progress - BEPL', 'parent_warehouse': 'Work In Progress - BEPL', 'company': 'Blisstering Electronics Private Limited', 'is_group': 0, 'account_currency': 'INR'}, 'MI OQC - BEPL': {'name': 'MI OQC - BEPL', 'account': '1420 - Work-In-Progress - BEPL', 'parent_warehouse': 'Work In Progress - BEPL', 'company': 'Blisstering Electronics Private Limited', 'is_group': 0, 'account_currency': 'INR'}, 'MI WIP - BEPL': {'name': 'MI WIP - BEPL', 'account': '1420 -... repost_doc = toggle_debit_credit_if_negative = precision = 7 stock_vouchers_chunk = [('Purchase Receipt', 'PRE/23-24/07581'), ('Stock Entry', 'STE/2402/03827'), ('Stock Entry', 'STE/2402/03840')] gle = {('Purchase Receipt', 'PRE/23-24/07581'): [{'name': 'ACC-GLE-2024-36213', 'account': '1410 - Stock In Hand - BEPL', 'credit': 0.0, 'debit': 77310.0, 'cost_center': 'Main - BEPL', 'project': None, 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581'}, {'name': 'ACC-GLE-2024-36214', 'account': '2210 - Stock Received But Not Billed - BEPL', 'credit': 77310.0, 'debit': 0.0, 'cost_center': 'Main - BEPL', 'project': None, 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581'}, {'name': 'ACC-GLE-2024-36403', 'account': '1410 - Stock In Hand - BEPL', 'credit': 0.0, 'debit': 77310.0, 'cost_center': 'Main - BEPL', 'project': None, 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581'}, {'name': 'ACC-GLE-2024-36404', 'account': '2210 - Stock Received But Not Billed - BEPL', 'credit': 77310.0, 'debit': 0.0, 'cost_center': 'Main - BEPL', 'project': None, 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581'}, {'name': 'de13721864', 'account':... voucher_type = 'Purchase Receipt' voucher_no = 'PRE/23-24/07581' existing_gle = [{'name': 'ACC-GLE-2024-36213', 'account': '1410 - Stock In Hand - BEPL', 'credit': 0.0, 'debit': 77310.0, 'cost_center': 'Main - BEPL', 'project': None, 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581'}, {'name': 'ACC-GLE-2024-36214', 'account': '2210 - Stock Received But Not Billed - BEPL', 'credit': 77310.0, 'debit': 0.0, 'cost_center': 'Main - BEPL', 'project': None, 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581'}, {'name': 'ACC-GLE-2024-36403', 'account': '1410 - Stock In Hand - BEPL', 'credit': 0.0, 'debit': 77310.0, 'cost_center': 'Main - BEPL', 'project': None, 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581'}, {'name': 'ACC-GLE-2024-36404', 'account': '2210 - Stock Received But Not Billed - BEPL', 'credit': 77310.0, 'debit': 0.0, 'cost_center': 'Main - BEPL', 'project': None, 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581'}, {'name': 'de13721864', 'account': '1410 - Stock In Hand - BEPL', 'credit': ... voucher_obj = File "apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py", line 317, in get_gl_entries update_regional_gl_entries(gl_entries, self) self = warehouse_account = {'All Warehouses - BEPL': {'name': 'All Warehouses - BEPL', 'account': '1410 - Stock In Hand - BEPL', 'parent_warehouse': '', 'company': 'Blisstering Electronics Private Limited', 'is_group': 1, 'account_currency': 'INR'}, 'Work In Progress - BEPL': {'name': 'Work In Progress - BEPL', 'account': '1420 - Work-In-Progress - BEPL', 'parent_warehouse': 'All Warehouses - BEPL', 'company': 'Blisstering Electronics Private Limited', 'is_group': 1, 'account_currency': 'INR'}, 'SMT WIP - BEPL': {'name': 'SMT WIP - BEPL', 'account': '1420 - Work-In-Progress - BEPL', 'parent_warehouse': 'Work In Progress - BEPL', 'company': 'Blisstering Electronics Private Limited', 'is_group': 0, 'account_currency': 'INR'}, 'MI OQC - BEPL': {'name': 'MI OQC - BEPL', 'account': '1420 - Work-In-Progress - BEPL', 'parent_warehouse': 'Work In Progress - BEPL', 'company': 'Blisstering Electronics Private Limited', 'is_group': 0, 'account_currency': 'INR'}, 'MI WIP - BEPL': {'name': 'MI WIP - BEPL', 'account': '1420 -... process_gl_map = gl_entries = [{'company': 'Blisstering Electronics Private Limited', 'posting_date': datetime.date(2024, 2, 26), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'remarks': 'Accounting Entry for Stock', 'debit': 18660.0, 'credit': 0.0, 'debit_in_account_currency': 18660.0, 'credit_in_account_currency': 0, 'is_opening': 'No', 'party_type': None, 'party': None, 'project': None, 'post_net_value': None, 'company_gstin': '09AAGCB7154D1ZQ', 'account': '1410 - Stock In Hand - BEPL', 'cost_center': 'Main - BEPL', 'against': '2210 - Stock Received But Not Billed - BEPL', 'account_currency': 'INR'}, {'company': 'Blisstering Electronics Private Limited', 'posting_date': datetime.date(2024, 2, 26), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'remarks': 'Accounting Entry for Stock', 'debit': -18660.0, 'credit': 0.0, 'debit_in_account_currency': -18660.0, 'credit_in_account_currency': 0, 'is_opening': 'No', 'part... File "apps/erpnext/erpnext/__init__.py", line 151, in caller return frappe.get_attr(overrides[function_path][-1])(*args, **kwargs) args = ([{'company': 'Blisstering Electronics Private Limited', 'posting_date': datetime.date(2024, 2, 26), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'remarks': 'Accounting Entry for Stock', 'debit': 18660.0, 'credit': 0.0, 'debit_in_account_currency': 18660.0, 'credit_in_account_currency': 0, 'is_opening': 'No', 'party_type': None, 'party': None, 'project': None, 'post_net_value': None, 'company_gstin': '09AAGCB7154D1ZQ', 'account': '1410 - Stock In Hand - BEPL', 'cost_center': 'Main - BEPL', 'against': '2210 - Stock Received But Not Billed - BEPL', 'account_currency': 'INR'}, {'company': 'Blisstering Electronics Private Limited', 'posting_date': datetime.date(2024, 2, 26), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'remarks': 'Accounting Entry for Stock', 'debit': -18660.0, 'credit': 0.0, 'debit_in_account_currency': -18660.0, 'credit_in_account_currency': 0, 'is_opening': 'No', 'par... kwargs = {} overrides = {'hrms.hr.utils.calculate_annual_eligible_hra_exemption': ['hrms.regional.india.utils.calculate_annual_eligible_hra_exemption'], 'hrms.hr.utils.calculate_hra_exemption_for_period': ['hrms.regional.india.utils.calculate_hra_exemption_for_period'], 'erpnext.controllers.taxes_and_totals.get_regional_round_off_accounts': ['india_compliance.gst_india.overrides.transaction.get_regional_round_off_accounts'], 'erpnext.controllers.accounts_controller.update_gl_dict_with_regional_fields': ['india_compliance.gst_india.overrides.gl_entry.update_gl_dict_with_regional_fields'], 'erpnext.controllers.accounts_controller.get_advance_payment_entries_for_regional': ['india_compliance.gst_india.overrides.payment_entry.get_advance_payment_entries_for_regional'], 'erpnext.accounts.doctype.payment_reconciliation.payment_reconciliation.adjust_allocations_for_taxes': ['india_compliance.gst_india.overrides.payment_entry.adjust_allocations_for_taxes_in_payment_reconciliation'], 'erpnext.accounts.doctype.purchase... function_path = 'erpnext.stock.doctype.purchase_receipt.purchase_receipt.update_regional_gl_entries' fn = File "apps/india_compliance/india_compliance/gst_india/overrides/ineligible_itc.py", line 474, in update_regional_gl_entries DOCTYPE_MAPPING[doc.doctype](doc).update_gl_entries(gl_entries) gl_entries = [{'company': 'Blisstering Electronics Private Limited', 'posting_date': datetime.date(2024, 2, 26), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'remarks': 'Accounting Entry for Stock', 'debit': 18660.0, 'credit': 0.0, 'debit_in_account_currency': 18660.0, 'credit_in_account_currency': 0, 'is_opening': 'No', 'party_type': None, 'party': None, 'project': None, 'post_net_value': None, 'company_gstin': '09AAGCB7154D1ZQ', 'account': '1410 - Stock In Hand - BEPL', 'cost_center': 'Main - BEPL', 'against': '2210 - Stock Received But Not Billed - BEPL', 'account_currency': 'INR'}, {'company': 'Blisstering Electronics Private Limited', 'posting_date': datetime.date(2024, 2, 26), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'remarks': 'Accounting Entry for Stock', 'debit': -18660.0, 'credit': 0.0, 'debit_in_account_currency': -18660.0, 'credit_in_account_currency': 0, 'is_opening': 'No', 'part... doc = File "apps/india_compliance/india_compliance/gst_india/overrides/ineligible_itc.py", line 76, in update_gl_entries self.update_stock_ledger_entries() self = gl_entries = [{'company': 'Blisstering Electronics Private Limited', 'posting_date': datetime.date(2024, 2, 26), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'remarks': 'Accounting Entry for Stock', 'debit': 18660.0, 'credit': 0.0, 'debit_in_account_currency': 18660.0, 'credit_in_account_currency': 0, 'is_opening': 'No', 'party_type': None, 'party': None, 'project': None, 'post_net_value': None, 'company_gstin': '09AAGCB7154D1ZQ', 'account': '1410 - Stock In Hand - BEPL', 'cost_center': 'Main - BEPL', 'against': '2210 - Stock Received But Not Billed - BEPL', 'account_currency': 'INR'}, {'company': 'Blisstering Electronics Private Limited', 'posting_date': datetime.date(2024, 2, 26), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'remarks': 'Accounting Entry for Stock', 'debit': -18660.0, 'credit': 0.0, 'debit_in_account_currency': -18660.0, 'credit_in_account_currency': 0, 'is_opening': 'No', 'part... File "apps/india_compliance/india_compliance/gst_india/overrides/ineligible_itc.py", line 69, in update_stock_ledger_entries self.doc.update_stock_ledger() self = File "apps/erpnext/erpnext/controllers/buying_controller.py", line 589, in update_stock_ledger self.make_sl_entries( self = allow_negative_stock = False via_landed_cost_voucher = False sl_entries = [{'item_code': 'D30072516', 'warehouse': 'Stores - BEPL', 'posting_date': datetime.date(2024, 2, 26), 'posting_time': datetime.timedelta(seconds=36468, microseconds=500239), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'voucher_detail_no': 'b4c04ebc2c', 'actual_qty': 3000.0, 'stock_uom': 'Nos', 'incoming_rate': 6.22, 'company': 'Blisstering Electronics Private Limited', 'batch_no': '2602202400006', 'serial_no': '', 'project': None, 'is_cancelled': 1, 'recalculate_rate': 0}, {'item_code': 'D30078178', 'warehouse': 'Stores - BEPL', 'posting_date': datetime.date(2024, 2, 26), 'posting_time': datetime.timedelta(seconds=36468, microseconds=500239), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'voucher_detail_no': '855aa590c2', 'actual_qty': 5000.0, 'stock_uom': 'Nos', 'incoming_rate': 1.68, 'company': 'Blisstering Electronics Private Limited', 'batch_no': '2602202400007', 'serial_no': '',... stock_items = ['RM-LED-2953', 'D30078181', 'RM-LED-2123', 'D30078179', 'D30078177', 'D30078178', 'D30072516'] d = rejected_qty = 0.0 pr_qty = 5000.0 sle = {'item_code': 'RM-LED-2953', 'warehouse': 'Stores - BEPL', 'posting_date': datetime.date(2024, 2, 26), 'posting_time': datetime.timedelta(seconds=36468, microseconds=500239), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'voucher_detail_no': 'dc465827a7', 'actual_qty': 5000.0, 'stock_uom': 'Nos', 'incoming_rate': 2.06, 'company': 'Blisstering Electronics Private Limited', 'batch_no': '2602202400012', 'serial_no': '', 'project': None, 'is_cancelled': 1, 'recalculate_rate': 0} val_rate_db_precision = 6 incoming_rate = 2.06 File "apps/erpnext/erpnext/controllers/stock_controller.py", line 506, in make_sl_entries make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher) self = sl_entries = [{'item_code': 'D30072516', 'warehouse': 'Stores - BEPL', 'posting_date': datetime.date(2024, 2, 26), 'posting_time': datetime.timedelta(seconds=36468, microseconds=500239), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'voucher_detail_no': 'b4c04ebc2c', 'actual_qty': 3000.0, 'stock_uom': 'Nos', 'incoming_rate': 6.22, 'company': 'Blisstering Electronics Private Limited', 'batch_no': '2602202400006', 'serial_no': '', 'project': None, 'is_cancelled': 1, 'recalculate_rate': 0}, {'item_code': 'D30078178', 'warehouse': 'Stores - BEPL', 'posting_date': datetime.date(2024, 2, 26), 'posting_time': datetime.timedelta(seconds=36468, microseconds=500239), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'voucher_detail_no': '855aa590c2', 'actual_qty': 5000.0, 'stock_uom': 'Nos', 'incoming_rate': 1.68, 'company': 'Blisstering Electronics Private Limited', 'batch_no': '2602202400007', 'serial_no': '',... allow_negative_stock = False via_landed_cost_voucher = False make_sl_entries = File "apps/erpnext/erpnext/stock/stock_ledger.py", line 45, in make_sl_entries validate_cancellation(sl_entries) sl_entries = [{'item_code': 'D30072516', 'warehouse': 'Stores - BEPL', 'posting_date': datetime.date(2024, 2, 26), 'posting_time': datetime.timedelta(seconds=36468, microseconds=500239), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'voucher_detail_no': 'b4c04ebc2c', 'actual_qty': 3000.0, 'stock_uom': 'Nos', 'incoming_rate': 6.22, 'company': 'Blisstering Electronics Private Limited', 'batch_no': '2602202400006', 'serial_no': '', 'project': None, 'is_cancelled': 1, 'recalculate_rate': 0}, {'item_code': 'D30078178', 'warehouse': 'Stores - BEPL', 'posting_date': datetime.date(2024, 2, 26), 'posting_time': datetime.timedelta(seconds=36468, microseconds=500239), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'voucher_detail_no': '855aa590c2', 'actual_qty': 5000.0, 'stock_uom': 'Nos', 'incoming_rate': 1.68, 'company': 'Blisstering Electronics Private Limited', 'batch_no': '2602202400007', 'serial_no': '',... allow_negative_stock = False via_landed_cost_voucher = False future_sle_exists = cancel = 1 File "apps/erpnext/erpnext/stock/stock_ledger.py", line 139, in validate_cancellation frappe.throw( args = [{'item_code': 'D30072516', 'warehouse': 'Stores - BEPL', 'posting_date': datetime.date(2024, 2, 26), 'posting_time': datetime.timedelta(seconds=36468, microseconds=500239), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'voucher_detail_no': 'b4c04ebc2c', 'actual_qty': 3000.0, 'stock_uom': 'Nos', 'incoming_rate': 6.22, 'company': 'Blisstering Electronics Private Limited', 'batch_no': '2602202400006', 'serial_no': '', 'project': None, 'is_cancelled': 1, 'recalculate_rate': 0}, {'item_code': 'D30078178', 'warehouse': 'Stores - BEPL', 'posting_date': datetime.date(2024, 2, 26), 'posting_time': datetime.timedelta(seconds=36468, microseconds=500239), 'fiscal_year': '2023-2024', 'voucher_type': 'Purchase Receipt', 'voucher_no': 'PRE/23-24/07581', 'voucher_detail_no': '855aa590c2', 'actual_qty': 5000.0, 'stock_uom': 'Nos', 'incoming_rate': 1.68, 'company': 'Blisstering Electronics Private Limited', 'batch_no': '2602202400007', 'serial_no': '',... repost_entry = {'name': 'e65c9bb8b2', 'status': 'In Progress'} File "apps/frappe/frappe/__init__.py", line 536, in throw msgprint( msg = 'Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.' exc = title = None is_minimizable = False wide = False as_list = False File "apps/frappe/frappe/__init__.py", line 504, in msgprint _raise_exception() title = None as_table = False as_list = False indicator = 'red' alert = False primary_action = None is_minimizable = False wide = False realtime = False sys = out = {'message': 'Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1} _raise_exception = ._raise_exception at 0x7f883a925360> _strip_html_tags = inspect = msg = 'Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.' raise_exception = strip_html_tags = File "apps/frappe/frappe/__init__.py", line 450, in _raise_exception raise raise_exception(msg) inspect = msg = 'Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.' raise_exception = frappe.exceptions.ValidationError: Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.
```