mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-29 22:58:25 +00:00
Address code-review findings on the Phase-0 safety net: - Per-test savepoint/rollback isolation so cumulative SLE fields (qty_after_transaction, stock_value, valuation_rate) are deterministic regardless of test order or leftover state (were order-coupled before). - Backdate prerequisite stock to PREREQUISITE_DATE so balances are positive and independent of the wall-clock date. - Capture has_serial_and_batch_bundle (boolean linkage, not the volatile docname) so a dropped serial/batch bundle link is caught. - Add pr_batch_item and pr_serial_item scenarios to exercise SerialBatchBundleService (the largest extraction, previously uncovered). Goldens regenerated. Verified deterministic across repeated assert runs.
48 lines
1.1 KiB
JSON
48 lines
1.1 KiB
JSON
{
|
|
"gl": [
|
|
{
|
|
"account": "Stock Adjustment - TCP1",
|
|
"account_currency": "INR",
|
|
"against": "Stock In Hand - TCP1",
|
|
"cost_center": "Main - TCP1",
|
|
"credit": 1500.0,
|
|
"credit_in_account_currency": 1500.0,
|
|
"debit": 0.0,
|
|
"debit_in_account_currency": 0.0,
|
|
"is_opening": "No",
|
|
"party": null,
|
|
"party_type": null,
|
|
"posting_date": "2024-01-15"
|
|
},
|
|
{
|
|
"account": "Stock In Hand - TCP1",
|
|
"account_currency": "INR",
|
|
"against": "Stock Adjustment - TCP1",
|
|
"cost_center": "Main - TCP1",
|
|
"credit": 0.0,
|
|
"credit_in_account_currency": 0.0,
|
|
"debit": 1500.0,
|
|
"debit_in_account_currency": 1500.0,
|
|
"is_opening": "No",
|
|
"party": null,
|
|
"party_type": null,
|
|
"posting_date": "2024-01-15"
|
|
}
|
|
],
|
|
"sle": [
|
|
{
|
|
"actual_qty": 0.0,
|
|
"has_serial_and_batch_bundle": false,
|
|
"incoming_rate": 0.0,
|
|
"item_code": "_Test Item",
|
|
"posting_date": "2024-01-15",
|
|
"qty_after_transaction": 10.0,
|
|
"stock_uom": "_Test UOM",
|
|
"stock_value": 1500.0,
|
|
"stock_value_difference": 1500.0,
|
|
"valuation_rate": 150.0,
|
|
"warehouse": "Stores - TCP1"
|
|
}
|
|
]
|
|
}
|