Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -74,15 +74,15 @@ def generate_rule_id(user_data):
|
|
| 74 |
|
| 75 |
# Extract first 2 characters from each field
|
| 76 |
rule_id_parts = [
|
| 77 |
-
company_id[:5],
|
| 78 |
-
ordering_channels[:2],
|
| 79 |
-
fulfilling_location[:2],
|
| 80 |
-
application_id[:2],
|
| 81 |
-
selected_fee_type[:2],
|
| 82 |
-
selected_variable_type[:2],
|
| 83 |
-
selected_chargeable_on[:2],
|
| 84 |
-
selected_fee_nature[:2],
|
| 85 |
-
threshold[:2]
|
| 86 |
]
|
| 87 |
|
| 88 |
rule_id = '_'.join(rule_id_parts) # Join parts with underscore
|
|
@@ -660,7 +660,9 @@ if bundle_by == "Feature specific":
|
|
| 660 |
"Threshold_option": threshold,
|
| 661 |
"Expected_Billing": expected_billing,
|
| 662 |
"Payment_Method": selected_payment_method,
|
| 663 |
-
"Plan_Validity": selected_plan_validity
|
|
|
|
|
|
|
| 664 |
}
|
| 665 |
|
| 666 |
service_account_info = {
|
|
@@ -971,7 +973,9 @@ elif bundle_by == "Single value":
|
|
| 971 |
"Threshold_option": 0,
|
| 972 |
"Expected_Billing": user_input_3,
|
| 973 |
"Payment_Method": selected_payment_method,
|
| 974 |
-
"Plan_Validity": selected_plan_validity
|
|
|
|
|
|
|
| 975 |
}
|
| 976 |
|
| 977 |
service_account_info = {
|
|
|
|
| 74 |
|
| 75 |
# Extract first 2 characters from each field
|
| 76 |
rule_id_parts = [
|
| 77 |
+
company_id[:5] if company_id else "00",
|
| 78 |
+
ordering_channels[:2] if ordering_channels else "00",
|
| 79 |
+
fulfilling_location[:2] if fulfilling_location else "00",
|
| 80 |
+
application_id[:2] if application_id else "00",
|
| 81 |
+
selected_fee_type[:2] if selected_fee_type else "00",
|
| 82 |
+
selected_variable_type[:2] if selected_variable_type else "00",
|
| 83 |
+
selected_chargeable_on[:2] if selected_chargeable_on else "00",
|
| 84 |
+
selected_fee_nature[:2] if selected_fee_nature else "00",
|
| 85 |
+
threshold[:2] if threshold else "00",
|
| 86 |
]
|
| 87 |
|
| 88 |
rule_id = '_'.join(rule_id_parts) # Join parts with underscore
|
|
|
|
| 660 |
"Threshold_option": threshold,
|
| 661 |
"Expected_Billing": expected_billing,
|
| 662 |
"Payment_Method": selected_payment_method,
|
| 663 |
+
"Plan_Validity": selected_plan_validity,
|
| 664 |
+
"rule_id": rule_id,
|
| 665 |
+
"plan_id": plan_id
|
| 666 |
}
|
| 667 |
|
| 668 |
service_account_info = {
|
|
|
|
| 973 |
"Threshold_option": 0,
|
| 974 |
"Expected_Billing": user_input_3,
|
| 975 |
"Payment_Method": selected_payment_method,
|
| 976 |
+
"Plan_Validity": selected_plan_validity,
|
| 977 |
+
"rule_id": rule_id,
|
| 978 |
+
"plan_id": plan_id
|
| 979 |
}
|
| 980 |
|
| 981 |
service_account_info = {
|