frappe / frappe/erpnext

Missing General Ledger Entries After Canceling Reconciliation When enable Immutable Ledger

Open
#50,737 3 comments 0 reactions 1 assignee Claimed by @diptanilsaha View on GitHub
accounts bug valid
Dominant language
Python
Stars
39.2k
Forks
12.8k
Avg merge
1d 1h
Merged PRs (30d)
554

Description

### Information about bug

1. Enable Immutable Ledger
2. create advance payment entry

```
MariaDB [_8ca0136b36f7c43d]> select name,creation,posting_date,account,against,voucher_type,voucher_no,voucher_subtype,against_voucher_type,against_voucher,debit,credit,is_opening,is_cancelled,docstatus from `tabGL Entry` order by creation;
Empty set (0.000 sec)

MariaDB [_8ca0136b36f7c43d]> select name,creation,posting_date,account,against,voucher_type,voucher_no,voucher_subtype,against_voucher_type,against_voucher,debit,credit,is_opening,is_cancelled,docstatus from `tabGL Entry` order by creation;
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+--------------------+-----------------+----------------------+--------------------+----------------+----------------+------------+--------------+-----------+
| name | creation | posting_date | account | against | voucher_type | voucher_no | voucher_subtype | against_voucher_type | against_voucher | debit | credit | is_opening | is_cancelled | docstatus |
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+--------------------+-----------------+----------------------+--------------------+----------------+----------------+------------+--------------+-----------+
| 484485dea8 | 2025-11-25 15:58:45.640471 | 2025-10-01 | 2203 - 预收账款 - 源 | 1110 - 现金 - 源 | Payment Entry | ACC-PAY-2025-00003 | Receive | Payment Entry | ACC-PAY-2025-00003 | 0.000000000 | 1000.000000000 | Yes | 0 | 1 |
| b9f9b3ed38 | 2025-11-25 15:58:45.647619 | 2025-10-01 | 1110 - 现金 - 源 | 测试客户 | Payment Entry | ACC-PAY-2025-00003 | Receive | NULL | NULL | 1000.000000000 | 0.000000000 | Yes | 0 | 1 |
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+--------------------+-----------------+----------------------+--------------------+----------------+----------------+------------+--------------+-----------+
```

3. create sales invoice

```
MariaDB [_8ca0136b36f7c43d]> select name,creation,posting_date,account,against,voucher_type,voucher_no,voucher_subtype,against_voucher_type,against_voucher,debit,credit,is_opening,is_cancelled,docstatus from `tabGL Entry` order by creation;
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+---------------------+-----------------+----------------------+---------------------+----------------+----------------+------------+--------------+-----------+
| name | creation | posting_date | account | against | voucher_type | voucher_no | voucher_subtype | against_voucher_type | against_voucher | debit | credit | is_opening | is_cancelled | docstatus |
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+---------------------+-----------------+----------------------+---------------------+----------------+----------------+------------+--------------+-----------+
| 484485dea8 | 2025-11-25 15:58:45.640471 | 2025-10-01 | 2203 - 预收账款 - 源 | 1110 - 现金 - 源 | Payment Entry | ACC-PAY-2025-00003 | Receive | Payment Entry | ACC-PAY-2025-00003 | 0.000000000 | 1000.000000000 | Yes | 0 | 1 |
| b9f9b3ed38 | 2025-11-25 15:58:45.647619 | 2025-10-01 | 1110 - 现金 - 源 | 测试客户 | Payment Entry | ACC-PAY-2025-00003 | Receive | NULL | NULL | 1000.000000000 | 0.000000000 | Yes | 0 | 1 |
| b8817a9380 | 2025-11-25 15:59:19.961904 | 2025-10-20 | 1310 - 应收账款 - 源 | 4110 - 销售 - 源 | Sales Invoice | ACC-SINV-2025-00002 | Sales Invoice | Sales Invoice | ACC-SINV-2025-00002 | 1000.000000000 | 0.000000000 | No | 0 | 1 |
| e4e87fdd1d | 2025-11-25 15:59:19.964129 | 2025-10-20 | 4110 - 销售 - 源 | 测试客户 | Sales Invoice | ACC-SINV-2025-00002 | Sales Invoice | NULL | NULL | 0.000000000 | 1000.000000000 | No | 0 | 1 |
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+---------------------+-----------------+----------------------+---------------------+----------------+----------------+------------+--------------+-----------+
```

4. Reconciliation

```
MariaDB [_8ca0136b36f7c43d]> select name,creation,posting_date,account,against,voucher_type,voucher_no,voucher_subtype,against_voucher_type,against_voucher,debit,credit,is_opening,is_cancelled,docstatus from `tabGL Entry` order by creation;
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+---------------------+-----------------+----------------------+---------------------+----------------+----------------+------------+--------------+-----------+
| name | creation | posting_date | account | against | voucher_type | voucher_no | voucher_subtype | against_voucher_type | against_voucher | debit | credit | is_opening | is_cancelled | docstatus |
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+---------------------+-----------------+----------------------+---------------------+----------------+----------------+------------+--------------+-----------+
| 484485dea8 | 2025-11-25 15:58:45.640471 | 2025-10-01 | 2203 - 预收账款 - 源 | 1110 - 现金 - 源 | Payment Entry | ACC-PAY-2025-00003 | Receive | Payment Entry | ACC-PAY-2025-00003 | 0.000000000 | 1000.000000000 | Yes | 0 | 1 |
| b9f9b3ed38 | 2025-11-25 15:58:45.647619 | 2025-10-01 | 1110 - 现金 - 源 | 测试客户 | Payment Entry | ACC-PAY-2025-00003 | Receive | NULL | NULL | 1000.000000000 | 0.000000000 | Yes | 0 | 1 |
| b8817a9380 | 2025-11-25 15:59:19.961904 | 2025-10-20 | 1310 - 应收账款 - 源 | 4110 - 销售 - 源 | Sales Invoice | ACC-SINV-2025-00002 | Sales Invoice | Sales Invoice | ACC-SINV-2025-00002 | 1000.000000000 | 0.000000000 | No | 0 | 1 |
| e4e87fdd1d | 2025-11-25 15:59:19.964129 | 2025-10-20 | 4110 - 销售 - 源 | 测试客户 | Sales Invoice | ACC-SINV-2025-00002 | Sales Invoice | NULL | NULL | 0.000000000 | 1000.000000000 | No | 0 | 1 |
| 95083cf004 | 2025-11-25 16:00:13.361622 | 2025-10-20 | 1310 - 应收账款 - 源 | NULL | Payment Entry | ACC-PAY-2025-00003 | Receive | Sales Invoice | ACC-SINV-2025-00002 | 0.000000000 | 1000.000000000 | Yes | 0 | 1 |
| 51937ee371 | 2025-11-25 16:00:13.364288 | 2025-10-20 | 2203 - 预收账款 - 源 | NULL | Payment Entry | ACC-PAY-2025-00003 | Receive | Payment Entry | ACC-PAY-2025-00003 | 1000.000000000 | 0.000000000 | Yes | 0 | 1 |
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+---------------------+-----------------+----------------------+---------------------+----------------+----------------+------------+--------------+-----------+
```

5. Canceling Reconciliation
```
MariaDB [_8ca0136b36f7c43d]> select name,creation,posting_date,account,against,voucher_type,voucher_no,voucher_subtype,against_voucher_type,against_voucher,debit,credit,is_opening,is_cancelled,docstatus from `tabGL Entry` order by creation;
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+---------------------+-----------------+----------------------+---------------------+----------------+----------------+------------+--------------+-----------+
| name | creation | posting_date | account | against | voucher_type | voucher_no | voucher_subtype | against_voucher_type | against_voucher | debit | credit | is_opening | is_cancelled | docstatus |
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+---------------------+-----------------+----------------------+---------------------+----------------+----------------+------------+--------------+-----------+
| 484485dea8 | 2025-11-25 15:58:45.640471 | 2025-10-01 | 2203 - 预收账款 - 源 | 1110 - 现金 - 源 | Payment Entry | ACC-PAY-2025-00003 | Receive | Payment Entry | ACC-PAY-2025-00003 | 0.000000000 | 1000.000000000 | Yes | 0 | 1 |
| b9f9b3ed38 | 2025-11-25 15:58:45.647619 | 2025-10-01 | 1110 - 现金 - 源 | 测试客户 | Payment Entry | ACC-PAY-2025-00003 | Receive | NULL | NULL | 1000.000000000 | 0.000000000 | Yes | 0 | 1 |
| b8817a9380 | 2025-11-25 15:59:19.961904 | 2025-10-20 | 1310 - 应收账款 - 源 | 4110 - 销售 - 源 | Sales Invoice | ACC-SINV-2025-00002 | Sales Invoice | Sales Invoice | ACC-SINV-2025-00002 | 1000.000000000 | 0.000000000 | No | 0 | 1 |
| e4e87fdd1d | 2025-11-25 15:59:19.964129 | 2025-10-20 | 4110 - 销售 - 源 | 测试客户 | Sales Invoice | ACC-SINV-2025-00002 | Sales Invoice | NULL | NULL | 0.000000000 | 1000.000000000 | No | 0 | 1 |
| 95083cf004 | 2025-11-25 16:00:13.361622 | 2025-10-20 | 1310 - 应收账款 - 源 | NULL | Payment Entry | ACC-PAY-2025-00003 | Receive | NULL | NULL | 0.000000000 | 1000.000000000 | Yes | 0 | 1 |
| 51937ee371 | 2025-11-25 16:00:13.364288 | 2025-10-20 | 2203 - 预收账款 - 源 | NULL | Payment Entry | ACC-PAY-2025-00003 | Receive | Payment Entry | ACC-PAY-2025-00003 | 1000.000000000 | 0.000000000 | Yes | 0 | 1 |
+------------+----------------------------+--------------+---------------------------+---------------------+---------------+---------------------+-----------------+----------------------+---------------------+----------------+----------------+------------+--------------+-----------+
6 rows in set (0.000 sec)
```

The GL Entry not added after Canceling Reconciliation.

It seems strange when viewing the GL Entry report.

Image

### Module

accounts

### Version

erpnext 15.x.x-develop develop (58e217b)
frappe 15.x.x-develop develop (20c7df9)

### Installation method

manual install

### Relevant log output / Stack trace / Full Error Message.

```shell

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.