voucher_detail_no is supposed to have an index, it was added on
on_doctype_update function of table, however this function is only
called if DocType itself is updated and `on_update` is called on
DocType. Stock ledger Entry doctype hasn't changed since addition of
this index in function.
Before: Lack of this index was causing full table scan in
get_future_sle_to_fix function. (~50 seconds in a reposting job)
After: Single row is fetched (~0.5 second in full reposting job)
Learnings:
1. Add simple indexes via doctype only
2. For complex indexes always change doctype.json file for it to take
effect.
(cherry picked from commit 6019f60d0a)
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
* fix: Maintenance Schedule child table status for legacy data
* fix: Include legacy draft schedules in patch
* fix: Pre-commit formatting
(cherry picked from commit cc143bca0d)
(cherry picked from commit 6ce2111b6d)
* fix: using DN for transfer w/o internal customer (#27798)
This used to be work before though not "advertised", since a lot of
users have started using it as feature, it can't be broken now.
(cherry picked from commit df1f8fddf6)
* fix(ux): use toast instead of popup
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
- Use naming series for Website Item. There could be two items with same name and different item code
- Fix: Website Item Page view breaks if cart is disabled
- Fix: thumbnails not created for Website Items after patch
- Fix: ‘Request for Quote’ button & cart summary not visible if checkout is disabled
(cherry picked from commit 36b519c962)
* fix(Org Chart): use attribute selectors instead of ID selector for node IDs with special chars
* fix: UI tests
(cherry picked from commit 9e08229b7b)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
* fix: wrong company selected when marking attendance for all employees
* fix: enable caching for repeated queries of the same employee
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
* refactor: remove unnecessary list comprehensions
* fix: correct cost distribution logic
While apportioning costs same condition should be present on both sides
so total value is representative of all items to be apportioned.
Here while calculating incoming_items_cost only FG items are considered,
but while apportioning all items with to_warehouse are considered.
Solution: only apportion additional cost on FG items
* test: test cost distribution
* fix: patch for additional cost
fix(patch): consider PCV while patching
- consider Period closing voucher while patching
- recomute rates for SLE of affected stock entries
consider only FG/scrap item SLEs for recomputation of rates
* fix: remove client side logic for addn cost
All of this is done in python code hence removed client side code.
(cherry picked from commit 4685ed5a8c)
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>