chore: Update tests
This commit is contained in:
parent
0581000990
commit
6192af5cf0
@ -250,7 +250,13 @@ def get_other_conditions(conditions, values, args):
|
|||||||
and ifnull(`tabPricing Rule`.valid_upto, '2500-12-31')"""
|
and ifnull(`tabPricing Rule`.valid_upto, '2500-12-31')"""
|
||||||
values["transaction_date"] = args.get("transaction_date")
|
values["transaction_date"] = args.get("transaction_date")
|
||||||
|
|
||||||
if args.get("doctype") in ["Sales Order", "Delivery Note", "Sales Invoice", "POS Invoice"]:
|
if args.get("doctype") in [
|
||||||
|
"Quotation",
|
||||||
|
"Sales Order",
|
||||||
|
"Delivery Note",
|
||||||
|
"Sales Invoice",
|
||||||
|
"POS Invoice",
|
||||||
|
]:
|
||||||
conditions += """ and ifnull(`tabPricing Rule`.selling, 0) = 1"""
|
conditions += """ and ifnull(`tabPricing Rule`.selling, 0) = 1"""
|
||||||
else:
|
else:
|
||||||
conditions += """ and ifnull(`tabPricing Rule`.buying, 0) = 1"""
|
conditions += """ and ifnull(`tabPricing Rule`.buying, 0) = 1"""
|
||||||
|
@ -113,7 +113,7 @@ def get_item_details(args, doc=None, for_validate=False, overwrite_warehouse=Tru
|
|||||||
if args.get(key) is None:
|
if args.get(key) is None:
|
||||||
args[key] = value
|
args[key] = value
|
||||||
|
|
||||||
data = get_pricing_rule_for_item(args, doc, for_validate=for_validate)
|
data = get_pricing_rule_for_item(args, doc=doc, for_validate=for_validate)
|
||||||
|
|
||||||
out.update(data)
|
out.update(data)
|
||||||
|
|
||||||
|
@ -110,6 +110,7 @@ def get_price(item_code, price_list, customer_group, company, qty=1):
|
|||||||
"conversion_rate": 1,
|
"conversion_rate": 1,
|
||||||
"for_shopping_cart": True,
|
"for_shopping_cart": True,
|
||||||
"currency": frappe.db.get_value("Price List", price_list, "currency"),
|
"currency": frappe.db.get_value("Price List", price_list, "currency"),
|
||||||
|
"doctype": "Quotation",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user