Devin Slauenwhite 20de27d480
fix(accounts): validate payment entry references with latest data. (#31166)
* test: payment entry over allocation.

* fix: validate allocated_amount against latest outstanding amount.

* fix: payment entry get outstanding documents for advance payments

* fix: only fetch latest outstanding_amount.

* fix: throw if reference is allocated

* test: throw error if a reference has been partially allocated after inital creation.

* chore: test name

* fix: remove unused part of test

* chore: linter

* chore: more user friendly error messages

* fix: only validate outstanding amount if partly paid and don't filter by cost center

* chore: minor refactor for doc.cost_center

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-06-13 19:06:53 +05:30
..
2021-11-25 23:58:16 +05:30
2022-03-28 18:52:46 +05:30
2021-11-05 11:16:29 +05:30
2022-03-28 18:52:46 +05:30
2022-03-28 18:52:46 +05:30
2021-11-05 11:16:29 +05:30