* fix: Multiple issues in purchase invoice submission
* fix: Base grand total calculation
* chore: Calculate base grand total separately only in multi currency docs
* fix: Add gl entry for round off
* fix: never get cutomer price on purchase document
chores: syntax
chore: typo in stock_entry get_uom_details (#33998)
fix: typo in stock_entry get_uom_details
chores: syntax
* feat: add test for get_item_detail price list oriented
* feat: add test for get_item_detail price price oriented
* feat: add test for get_item_detail price price oriented
* chore: clean test code
* 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>
- Use `get_default_bom` in sales_order.py (reduce duplicate utility functions)
- Remove redundant if else in `get_work_order_items`
- `get_default_bom`: If no BOM and template exists try to fetch template BOM
- test: `get_work_order_items` via SO and if right BOM is picked
* fix: Auto Insert Item Price If Missing when discount and blank UOM
fixes wrong item price insert when discount is used and adds uom=stock_uom instead of blank as price is converted to stock uom
* unit tests added for item with discount
I have added test for auto_insert_price where discount is used.
* unit test issue fixed
fixed make_sales_order as some of the test that depended on it were failing due to passing of incorrect parameters.
Co-authored-by: Ankush Menat <me@ankush.dev>
* fix: auto update price list rate
* fix: hide field when auto insert isn't enabled
(cherry picked from commit bb3957eba35a5204a1a01e412dee596532bd525e)
Co-authored-by: Sagar Sharma <63660334+s-aga-r@users.noreply.github.com>
[skip ci]