Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -96,25 +96,15 @@ def parse_po_items_with_filters(text):
|
|
| 96 |
)
|
| 97 |
data.append(current_item)
|
| 98 |
|
| 99 |
-
#
|
| 100 |
-
for
|
| 101 |
-
if
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 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:
|