Ankush 9152715f90
perf: various minor perf fixes for ledger postings (#26775)
* perf: only validate if voucher is journal entry

* perf: optimize merge GLE

- Order fields such that comparison will fail faster
- Break out of loops if not matched

* perf: don't try to match SLE if count mismatch

* refactor: simplify initialize_previous_data

* perf: use cache for fetching valuation_method

These are set only once fields

* refactor: simplify get_future_stock_vouchers

* refactor: simplify get_voucherwise_gl_entries

* perf: fetch only required fields for GL comparison

`select *` fetches all fields, output of this function is only used for
comparing.

* perf: reorder conditions in PL cost center check

* perf: reduce query while validating new gle

* perf: use cache for validating warehouse props

These properties don't change often, no need to query everytime.

* perf: use cached stock settings to validate SLE

* docs: update misleading docstring

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-08-11 11:17:50 +05:30
..
2021-05-28 09:10:34 +05:30
2020-11-25 14:01:57 +05:30
2020-05-01 13:26:26 +05:30
2020-11-25 14:01:57 +05:30
2021-05-28 12:58:18 +05:30
2021-07-16 15:58:50 +05:30
2020-07-23 15:45:03 +05:30
2021-06-15 20:18:06 +05:30
2020-12-23 18:07:53 +05:30
2021-08-01 14:45:24 +05:30
2021-06-15 20:18:06 +05:30
2021-07-01 12:47:28 +05:30