Skip to content

Commit

Permalink
Fix: Fixed incorrect mapping of items accounts on received purchases.
Browse files Browse the repository at this point in the history
  • Loading branch information
GichanaMayaka committed May 21, 2024
1 parent b213ca3 commit 01a6bde
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions kenya_compliance/kenya_compliance/apis/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
search_branch_request_on_success,
stock_mvt_search_on_success,
user_details_submission_on_success,
submit_inventory_on_success
submit_inventory_on_success,
)

endpoints_builder = EndpointsBuilder()
Expand Down Expand Up @@ -721,7 +721,12 @@ def create_purchase_invoice_from_registered_purchase(request_data: str) -> None:
"item_name": item["name"],
"qty": item["quantity"],
"rate": item["unit_price"],
"expense_account": "Cost of Goods Sold - PLM",
"expense_account": frappe.db.get_value(
"Account",
{"name": ["like", "%Cost of Goods Sold%"]},
["name"],
as_dict=True,
).name,
"custom_item_classification": item["item_classification_code"],
"custom_packaging_unit": item["packaging_unit_code"],
"custom_unit_of_quantity": item["quantity_unit_code"],
Expand Down

0 comments on commit 01a6bde

Please sign in to comment.