Skip to content

fix: recalculate plot costs replace broken SR with ledger update + handover fixes#40

Merged
av-dev2 merged 1 commit into
Aakvatech-Limited:version-15-hotfixfrom
LISACORNEL:latest-fix
May 31, 2026
Merged

fix: recalculate plot costs replace broken SR with ledger update + handover fixes#40
av-dev2 merged 1 commit into
Aakvatech-Limited:version-15-hotfixfrom
LISACORNEL:latest-fix

Conversation

@LISACORNEL
Copy link
Copy Markdown
Collaborator

Summary

  • Recalculate Plot Costs: ERPNext v15's Stock Reconciliation corrupts
    serial number status on first run and crashes with bundle qty mismatch
    on subsequent runs. Replaced entirely with direct db.set_value on
    four targets per plot: Plot Master.allocated_cost/cost_per_sqm,
    Serial No.purchase_rate, Stock Ledger Entry.incoming_rate/ stock_value_difference, and Serial and Batch Bundle.avg_rate/ total_amount. The existing Repost Item Valuation then correctly
    propagates the new cost to GL entries.

  • Plot Handover: Fixed DN warehouse to always read from LandMS Settings
    plot_inventory_warehouse instead of inheriting from SO (which caused
    "serial in different warehouse" error). Set incoming_rate from
    plot.allocated_cost on all DN item paths so COGS = allocated cost.
    Added _cancel_blocking_stock_reconciliations to auto-cancel any legacy
    SRs that would block DN submission with "Serial No Exists In Future
    Transaction" error.

…dger update

ERPNext v15's Stock Reconciliation corrupts serial number status (sets to
Delivered) and fails on second run with serial bundle qty mismatch. Replace
the SR with targeted db.set_value calls on Plot Master, Serial No,
Stock Ledger Entry, and Serial and Batch Bundle so COGS at handover
matches allocated_cost without any stock movement side-effects.

Also fix Plot Handover delivery note creation: always source warehouse
from LandMS Settings (not SO), set incoming_rate from plot.allocated_cost,
and auto-cancel any legacy blocking Stock Reconciliations before DN submit.
@av-dev2 av-dev2 merged commit 5764add into Aakvatech-Limited:version-15-hotfix May 31, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown

Successfully created backport PR for version-15:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants