joycecast commited on
Commit
a6ab8d9
·
verified ·
1 Parent(s): 9291813

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -172,11 +172,10 @@ def build_ups_batch_no_header(file):
172
  out["Reference 2"] = to_num_str_series(df, "Invoice Number")
173
  out["Reference 3"] = to_num_str_series(df, "Customer Reference")
174
 
175
- # QV Notification flags/addresses
176
- out["QV Notif 1-Addr"] = to_str_series(df, "Email").apply(validate_email) # recipient email
177
- out["QV Notif 1-Ship"] = "1"
178
- out["QV Notif 1-Excp"] = "1"
179
- out["QV Notif 1-Delv"] = "1"
180
 
181
  out["QV Notif 2-Addr"] = "shaqdong@apexglobe.com"
182
  out["QV Notif 2-Ship"] = "1"
 
172
  out["Reference 2"] = to_num_str_series(df, "Invoice Number")
173
  out["Reference 3"] = to_num_str_series(df, "Customer Reference")
174
 
175
+ # Set QV Notif 1 flags conditionally
176
+ out["QV Notif 1-Ship"] = out["QV Notif 1-Addr"].apply(lambda x: "1" if x else "")
177
+ out["QV Notif 1-Excp"] = out["QV Notif 1-Addr"].apply(lambda x: "1" if x else "")
178
+ out["QV Notif 1-Delv"] = out["QV Notif 1-Addr"].apply(lambda x: "1" if x else "")
 
179
 
180
  out["QV Notif 2-Addr"] = "shaqdong@apexglobe.com"
181
  out["QV Notif 2-Ship"] = "1"