Cancelling Sales Invoice also cancel Salary Slip and non linked Sales Invoices

Every update a new bad surprise in production environments…

Why are Salary Slips Cancelled when I want to Cancel a Sales Invoice?
They are not linked to the sales invoice, the Sales invoice is linked to the timesheets. Also timesheets do not need to be cancelled, only be set to billed or unbilled like it was the logic before. It cannot be that a whole project calculation and payroll is in the trash when somehow a Sales Invoice gets cancelled to do a correction.

Same problem is also existent when cancelling a Payroll entry. All timesheets linked are getting cancelled instead of switching from Salary Slip to Submitted only.


ERPNext: v14.18.3 (version-14)

Frappe Framework: v14.28.2 (version-14)

Frappe HR: v14.1.2 (version-14)

Payments: v0.0.1 (develop)

Looks like a documented and holistic mental model of side-effects in an ERP system might help to bring the battle against regression to the next level, where traditional unit, end2end and regression-testing are probably close to exhausted.

Probably, a first step would be to increase observability of whenever a control flow passes the DocType + DocTypeItems boundary.

Next step would likely be to define interfaces and messages between the DocType domains and finally, only allow signals between DocTypes upon which the target domain has the sole responsibility to act, no direct external-effects.

1 Like