Wednesday, July 24, 2024
1 change · saas-17.4
Enhancements to existing features
Expense reports reimbursed through payroll are now handled without deleting draft accounting entries, so teams can still review and edit them before posting. The system can automatically reconcile payroll and expense entries more reliably, and gives accountants clearer support when manual reconciliation is needed.
Original PR description
This improves the changes made by 6f1f45e137bbd87498b7e3998fe013716c2e66bf, moving the creation of the `account.move` at the approval step of an expense report. Before…
This improves the changes made by 6f1f45e137bbd87498b7e3998fe013716c2e66bf, moving the creation of the `account.move` at the approval step of an expense report. Before 6f1f45e137bbd87498b7e3998fe013716c2e66bf change: The `hr_payroll_expense` flow worked by relying on the fact that we created the expense sheet move at the very last moment, allowing to set the correct account to its payment term line, to reconcile with the payslip move easily. Before this change: In 6f1f45e137bbd87498b7e3998fe013716c2e66bf, since approving the report creates draft `account.move`s & `account.payment`s. This makes it more difficult to reconcile the two moves. A workaround was found in deleting the draft entry of the expense sheet when flagging it to be reimbursed through a payslip. After this change: This removes that workaround and allows a proper reconciliation of the two `account.move`s by using the draft entry `matching_number` mechanic. There are several improvements: - Avoid deleting a move, thus allowing it to be edited - Automatically reconcile, no matter if the accounts do not match, a misc entry is automatically generated if needed - Manual fallback, if the amounts of the two `account.move`s do not match, we keep the temporary `matching_number` set on the lines to help the accountant manually reconcile. We cannot do it automatically in this case as it requires user input (selecting an account for the write-off entry) task-id: 3955524