Qty 0 is allowed when creating Credit or Debit Note this caused ZeroDivisionError during unit_rate calculation.
fixed the issue by adding required conditionals.
- PIs for petty items (that do not need an Item record) are allowed using Item Name field
- If a different UOM is used in this case, conversion factor stays 0 and causes an error
- Fallback to 1 in `set_incoming_rate` for buying
- Selling will need a proper item, so this change is not needed there
(cherry picked from commit aa043fe961)
fix(UX): dont apply price list when changing batch on mapped docs (#31503)
fix(UX): dont apply price list batch change on mapped docs
(cherry picked from commit 7e40c86c56)
Co-authored-by: Ankush Menat <ankush@frappe.io>
fix: offset some scheduled jobs to avoid locks (#31466)
If your site has multiple background workers then there's possibility
that two jobs will execute in parallal, this creates problem when both
are on operating on same data.
This PR adds a separate section for hourly and daily jobs which have
frequency offset from default frequency to avoid such conflicts.
(cherry picked from commit 5d73697c64)
Co-authored-by: Ankush Menat <ankush@frappe.io>
fix: dont update RM items table if not required (#31408)
Currently on PO update RM item table is auto computed again and again,
if there was any transfer/consumption against that then it will be lost.
This change:
1. Disables updating RM table if no change in qty of FG was made. Since
RM table can't possibly be different with same FG qty.
2. Blocks update completely if qty is changed and RM items are already
transferred.
(cherry picked from commit dd11f26eba)
Co-authored-by: Ankush Menat <ankush@frappe.io>
refactor: clean up product bundle client side code (#31455)
refactor: clean up product bundle cient side code
- Remove deprecated CUR_FRM scripts
- Remove client side fetches and move it to doctype schema
(cherry picked from commit 20dac08f5f)
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix(Salary Slip): Components not updated when amount evaluates to 0 due to payment days
* fix: remove 0 valued components that have been updated later
- 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)