DSatishchandra commited on
Commit
ffeb08a
·
verified ·
1 Parent(s): 5af9b0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -19
app.py CHANGED
@@ -96,25 +96,15 @@ def parse_po_items_with_filters(text):
96
  )
97
  data.append(current_item)
98
 
99
- # Correct item 3's separation
100
- for i, row in enumerate(data):
101
- if row["Item"] == "2" and "As per Drg. to." in row["Description"]:
102
- # Split the merged part into item 3
103
- item_3_description = re.search(r"As per Drg. to. G000810.*Mfd:-2022", row["Description"])
104
- if item_3_description:
105
- data.insert(
106
- i + 1,
107
- {
108
- "Item": "3",
109
- "Description": item_3_description.group(),
110
- "Qty": "12",
111
- "Unit": "Nos.",
112
- "Unit Price": "3.80",
113
- "Total Price": "45.60",
114
- },
115
- )
116
- # Remove the merged part from item 2
117
- row["Description"] = row["Description"].replace(item_3_description.group(), "").strip()
118
 
119
  # Return data as a DataFrame
120
  if not data:
 
96
  )
97
  data.append(current_item)
98
 
99
+ # Specific logic for item 3
100
+ for item in data:
101
+ if item["Item"] == "3":
102
+ item["Description"] += " Stainless Steel RATING AND DIAGRAM PLATE"
103
+
104
+ # Specific logic for item 6
105
+ for item in data:
106
+ if item["Item"] == "6":
107
+ item["Description"] += " &20; 9 Nos.-1Set; USD 0.35/Each (0.35 X 9=3.15) (NT00192)"
 
 
 
 
 
 
 
 
 
 
108
 
109
  # Return data as a DataFrame
110
  if not data: