chore: Add POS Invoices

This commit is contained in:
Deepesh Garg 2022-12-05 15:43:03 +05:30
parent b741ae143c
commit 5f821b93a5
2 changed files with 2 additions and 2 deletions

View File

@ -1123,7 +1123,7 @@ def make_pricing_rule(**args):
"apply_on": args.apply_on or "Item Code",
"applicable_for": args.applicable_for,
"selling": args.selling or 0,
"currency": "USD",
"currency": "INR",
"apply_discount_on_rate": args.apply_discount_on_rate or 0,
"buying": args.buying or 0,
"min_qty": args.min_qty or 0.0,

View File

@ -250,7 +250,7 @@ def get_other_conditions(conditions, values, args):
and ifnull(`tabPricing Rule`.valid_upto, '2500-12-31')"""
values["transaction_date"] = args.get("transaction_date")
if args.get("doctype") in ["Sales Order", "Delivery Note", "Sales Invoice"]:
if args.get("doctype") in ["Sales Order", "Delivery Note", "Sales Invoice", "POS Invoice"]:
conditions += """ and ifnull(`tabPricing Rule`.selling, 0) = 1"""
else:
conditions += """ and ifnull(`tabPricing Rule`.buying, 0) = 1"""