Skip to content

Commit

Permalink
docs: Added fixme annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
GichanaMayaka committed Oct 24, 2024
1 parent 06c57e3 commit 73a4b34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kenya_compliance/kenya_compliance/overrides/server/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def before_insert(doc: Document, method: str) -> None:


def validate(doc: Document, method: str) -> None:
# FIXME Ensure all item code numbers follow a global serial
# FIXME Currently, the item code number for each item is incremented if there's an item with same etims item code value
if not doc.custom_item_registered or "None" in doc.custom_item_code_etims:
# Check if Item code contains None or if it's not present
item_code = f"{doc.custom_etims_country_of_origin_code}{doc.custom_product_type}{doc.custom_packaging_unit_code}{doc.custom_unit_of_quantity_code}"
Expand Down
3 changes: 3 additions & 0 deletions kenya_compliance/kenya_compliance/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ def build_invoice_payload(
items_list = get_invoice_items_list(invoice)

payload = {
# FIXME: Use document's naming series to get invcNo and not etims_serial_number field
# FIXME: The document's number series should be based off of the branch. Switching branches should reset the number series
"invcNo": frappe.db.get_value(
"Sales Invoice", {"name": invoice.name}, ["etims_serial_number"]
),
Expand Down Expand Up @@ -341,6 +343,7 @@ def get_invoice_items_list(invoice: Document) -> list[dict[str, str | int | None
Returns:
list[dict[str, str | int | None]]: The parsed data as a list of dictionaries
"""
# FIXME: Handle cases where same item can appear on different lines with different rates etc.
item_taxes = get_itemised_tax_breakup_data(invoice)
items_list = []

Expand Down

0 comments on commit 73a4b34

Please sign in to comment.