Skip to content

Commit

Permalink
Merge pull request #18 from navariltd/fix26
Browse files Browse the repository at this point in the history
fix - While creating purchase, initialise branch to bhifd
  • Loading branch information
maniamartial authored Dec 16, 2024
2 parents f1e16aa + ba3a92f commit 13e2a62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kenya_compliance/kenya_compliance/apis/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ def create_item(item: dict | frappe._dict) -> Document:
@frappe.whitelist()
def create_purchase_invoice_from_request(request_data: str) -> None:
data = json.loads(request_data)
bhifd=get_first_branch_id()
bhfId=get_first_branch_id()
# Check if supplier exists
supplier = None
if not frappe.db.exists("Supplier", data["supplier_name"], cache=False):
Expand All @@ -827,7 +827,7 @@ def create_purchase_invoice_from_request(request_data: str) -> None:
purchase_invoice.custom_supplier_branch_id = data["supplier_branch_id"]
purchase_invoice.bill_no = data["supplier_invoice_no"]
purchase_invoice.bill_date = data["supplier_invoice_date"]
purchase_invoice.bhifd = bhifd
purchase_invoice.branch = bhfId
if "currency" in data:
# The "currency" key is only available when creating from Imported Item
purchase_invoice.currency = data["currency"]
Expand Down

0 comments on commit 13e2a62

Please sign in to comment.