diff --git a/erpnext/accounts/doctype/loyalty_program/loyalty_program.py b/erpnext/accounts/doctype/loyalty_program/loyalty_program.py index f3ad84bf6d3..1e844afc4b0 100644 --- a/erpnext/accounts/doctype/loyalty_program/loyalty_program.py +++ b/erpnext/accounts/doctype/loyalty_program/loyalty_program.py @@ -168,8 +168,9 @@ def validate_loyalty_points(ref_doc, points_to_redeem): loyalty_amount = flt(points_to_redeem * loyalty_program_details.conversion_factor) - if loyalty_amount > ref_doc.rounded_total: - frappe.throw(_("You can't redeem Loyalty Points having more value than the Rounded Total.")) + total_amount = ref_doc.grand_total if ref_doc.is_rounded_total_disabled() else ref_doc.rounded_total + if loyalty_amount > total_amount: + frappe.throw(_("You can't redeem Loyalty Points having more value than the Total Amount.")) if not ref_doc.loyalty_amount and ref_doc.loyalty_amount != loyalty_amount: ref_doc.loyalty_amount = loyalty_amount diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 68f5f4eab76..963fb3556a6 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -405,7 +405,9 @@ class PartyLedgerSummaryReport: gl = qb.DocType("GL Entry") query = ( qb.from_(gl) - .select(gl.voucher_type, gl.voucher_no) + .select( + gl.posting_date, gl.account, gl.party, gl.voucher_type, gl.voucher_no, gl.debit, gl.credit + ) .where( (gl.docstatus < 2) & (gl.is_cancelled == 0) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 4b52859cabd..b6c1f636b18 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -480,6 +480,10 @@ erpnext.bom.BomController = class BomController extends erpnext.TransactionContr child.bom_no = ""; } + if (doc.item == child.item_code) { + child.do_not_explode = 1; + } + get_bom_material_detail(doc, cdt, cdn, scrap_items); } diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 5643f6db0f5..c7597c80fc6 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1369,6 +1369,7 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t { "Sales Order": { "doctype": "Purchase Order", + "field_map": {"dispatch_address_name": "dispatch_address"}, "field_no_map": [ "address_display", "contact_display", @@ -1488,6 +1489,7 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None): { "Sales Order": { "doctype": "Purchase Order", + "field_map": {"dispatch_address_name": "dispatch_address"}, "field_no_map": [ "address_display", "contact_display", diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 640577bb72c..459a33ea1ba 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -148,7 +148,7 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te bin_join_selection, bin_join_condition = "", "" if hide_unavailable_items: bin_join_selection = "LEFT JOIN `tabBin` bin ON bin.item_code = item.name" - bin_join_condition = "AND item.is_stock_item = 0 OR (item.is_stock_item = 1 AND bin.warehouse = %(warehouse)s AND bin.actual_qty > 0)" + bin_join_condition = "AND (item.is_stock_item = 0 OR (item.is_stock_item = 1 AND bin.warehouse = %(warehouse)s AND bin.actual_qty > 0))" items_data = frappe.db.sql( """ diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index cf1bb9a3229..45afd1a0ad4 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -520,17 +520,19 @@ class StockEntry(StockController): if acc_details.account_type == "Stock": frappe.throw( _( - "At row {0}: the Difference Account must not be a Stock type account, please change the Account Type for the account {1} or select a different account" + "At row #{0}: the Difference Account must not be a Stock type account, please change the Account Type for the account {1} or select a different account" ).format(d.idx, get_link_to_form("Account", d.expense_account)), - OpeningEntryAccountError, + title=_("Difference Account in Items Table"), ) if self.purpose != "Material Issue" and acc_details.account_type == "Cost of Goods Sold": frappe.msgprint( _( - "At row {0}: You have selected the Difference Account {1}, which is a Cost of Goods Sold type account. Please select a different account" + "At row #{0}: you have selected the Difference Account {1}, which is a Cost of Goods Sold type account. Please select a different account" ).format(d.idx, bold(get_link_to_form("Account", d.expense_account))), - title=_("Warning : Cost of Goods Sold Account"), + title=_("Cost of Goods Sold Account in Items Table"), + indicator="orange", + alert=1, ) def validate_warehouse(self):