test: add void payment entry workflow test#387
Conversation
📝 Draft Changelog EntryChangelog: Enhanced Void Payment Entry WorkflowThis update adds a new dialog when voiding payment entries that allows users to select an "as of" date for the void transaction. When selecting the "Void" workflow option in the Payment Entry interface, users will now be prompted to choose a specific date for when the void should take effect. The system validates that the selected date is not before the payment entry's original posting date, ensuring proper accounting records. The documentation has been expanded to include more detailed information about permissions related to payment entry workflows, helping administrators better understand and configure access controls for these processes. GitHub-flavoured markdown version of this changelog is ready for inclusion in release notes. This changelog entry was automatically generated by the Changelog Generator Action. |
|
For Payment Ledger Entries (PLE), I ran a test to see what the Accounts Payable report showed for a Voided Payment Entry - if I used a date prior to the Void date, did it remove the Invoice from results, presuming it was paid? Unfortunately, no - it applied the same behavior as a Cancel - it created an offsetting PLE, then DELINKED both that and the original payment one. All PLE queries for reports ignore delinked entries, so it effectively made it as if the payment never existed. ERPNext has slightly different behavior for PLE if the immutable ledger feature is enabled - it creates the offsetting PLE using current date, but keeps them linked. So the A/P report shows the Invoice is paid with report date between the original payment date up to cancellation date, then outstanding afterwards. So I created an override here that's similar to that - Voided Payment Entries will create an offsetting PLE using the void date, but the PLEs are still linked. (Note that if the immutable ledger feature is enabled, then that behavior persists - it will use the cancellation date for the PLE's posting date). For testing (in a new reinstall since there were some light changes to fixtures):
|
Closes #382