Skip to content

Commit

Permalink
refactor: minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
GichanaMayaka committed Jun 12, 2024
1 parent a339646 commit 7509433
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 @@ -73,11 +73,11 @@ def bulk_pos_sales_invoices(docs_list: str) -> None:
@frappe.whitelist()
def bulk_register_item(docs_list: str) -> None:
data = json.loads(docs_list)
all_items = frappe.db.get_all("Item", ["*"])
all_items = frappe.db.get_all("Item", {"custom_item_registered": 0}, ["*"])

for record in data:
for item in all_items:
if record == item.item_code and item.custom_item_registered == 0:
if record == item.item_code:
request_data = {
"name": item.name,
"company_name": frappe.defaults.get_user_default("Company"),
Expand Down

0 comments on commit 7509433

Please sign in to comment.