- Implement Log clearing interface in BOM Update Log
- Add additional info in sidebar: Log clearing only happens for 'Update Cost' type logs
- 'Replace BOM' logs have important info and is used in BOM timeline, so we'll let users decide if they wanna keep or discard it
- Delete `BOM Update Batch` table on 'Completed' log, to save space
- Hide Progress section on 'Completed' log
- Enqueue `on_submit` for 'Update Cost' job, getting leaf boms could take time for huge DBs. Users have to wait for screen to unfreeze.
- Add error handling to `process_boms_cost_level_wise` (Called via cron job and on submit, both in background)
* refactor: if() to CASE WHEN
* fix: remove duplicate order by
* fix: remove extraneous table
* style: reformat to black spec
Co-authored-by: Ankush Menat <ankush@frappe.io>
Payment entry has option to select outstanding invoices using a popup
form. This change refactors the pop to use payment ledger to fetch +ve
outstanding invoices.
* refactor: DB independent quoting and truthy/falsy values
* style: reformat to black spec
* fix: ifnull -> coalesce
* fix: coalesce -> Coalesce
* fix: revert pypika comparison
* refactor: convert queries to QB
* fix: incorrect value types for query
`=` query makes no sense with list of values
* fix: remove warehouse docstatus condition
* fix: keep using base rate as rate
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix: Respect system precision for user facing balance qty values
- `get_precision` -> `set_precision`
- Use system wide currency precision for `stock_value`
- Round of qty defiiciency as per user defined precision (system flt precision), so that it is WYSIWYG for users
* fix: Consider system precision when validating future negative qty
* test: Immediate Negative Qty precision test
- Test for Immediate Negative Qty precision
- Stock Entry Negative Qty message: Format available qty in system precision
- Pass `stock_uom` as confugrable option in `make_item`
* test: Future Negative Qty validation with precision
* fix: Use `get_field_precision` for currency precision as it used to
- `get_field_precision` defaults to number format for precision (maintain old behaviour)
- Don't pass `currency` to `get_field_precision` as its not used anymore
If invoice is made without item code then UOM, Stock UOM and
conversion_factor all need to be manually added, this is confusing and
leads missing them out leads to errors.
Simplest solution:
- if either UOM exists then set both to same uom conversion factor to
- also set conversion factor based on UOM conversions
* Fix a potential variable misuse bug
* chore: Separate check (separate line) for empty table in Pricing Rule
* chore: Code readability & check for field in row (now row itself)
Co-authored-by: marination <maricadsouza221197@gmail.com>
* refactor: use CURRENT_DATE instead of CURDATE()
* style: reformat to black spec
* refactor: use QB for auto_close queries
Co-authored-by: Ankush Menat <ankush@frappe.io>