Environment - Vendor portal, Mailbox, etc. CorrelationProperty_Submit_Invoice Submit_the_invoice Gateway_validation_successful_question_mark Event_1usbnt0 SubProcess_Data_validation_rules Activity_show_errors Event_invoice_validation_failed Activity_1u89kok Event_1r3yh2k Gateway_05ov5p5 Activity_0p88elm Activity_104xpp8 Activity_109lq0m Activity_10p5t0r Gateway_1717c0p Activity_0gkpa9s Gateway_1lbghql Event_0x83ruk Event_0m3ri6v Gateway_1l4tz4i Activity_0gkejaj Activity_1ucvkk4 Activity_0faln91 Activity_0fq1nb4 Activity_1b6tead Event_15y55nw Waku_Message_Pending_Payment Activity_0rae8g6 Activity_1kgaqpf Activity_175j3o7 Gateway_0wk5se9 Activity_1colhao Event_1b58a3z Activity_0cdgqi0 Gateway_1ytq6m7 Activity_11stdua Activity_06b32ar Activity_1t8wi0r Event_09q0ym0 Gateway_06i3we9 not(svc_is_invoice_submit_pass) not(isMatch) not(isInvoiceApproved) Flow_17vkjgc Flow_02moyg7 Flow_1ck27i7 Flow_1x4rtop Flow_05ffq52 Flow_02moyg7 Flow_1ck27i7 DataObjectReference_0bymrvr Flow_1avkxpe Flow_18i6dlo Flow_1d7sgm2 invoice_date_obj = datetime.strptime(invoice.dueDate, '%Y-%m-%d') local_date_time_obj = datetime.strptime(local_date_str, '%Y-%m-%d') if invoice_date_obj > local_date_time_obj: svc_is_due_date_after = True else: svc_is_due_date_after = False # Add date of invoice invoice["invoiceDate"] = local_date_str ld = str(local_date_time_obj) ido = str(invoice_date_obj) del local_date_time_obj del invoice_date_obj del datetime Flow_0tzjowk {"invoice.contributorName": "Harmeet"} { "isNameNum": false, "invoice.contributorName": "Harmeet" } Flow_1avkxpe Flow_0mvmd06 svc_is_num_in_name = False for c in invoice.contributorName: if c.isdigit(): svc_is_num_in_name = True break del c Flow_0mvmd06 Flow_0wp2mcf # Check if there are more than two decimal places invoiceAmount_str = str(invoice.invoiceAmount) d = decimal.Decimal(invoiceAmount_str) d_cnt = d.as_tuple().exponent # Get number of decimal places svc_decimal_cnt = abs(d_cnt) #Delete unneeded variables del d del d_cnt del decimal Submit_Involce_Validation Flow_1d7sgm2 Flow_0tzjowk Flow_0wp2mcf Flow_18i6dlo {{ submitInvoiceValidationMessage }} **Please fix when resubmitting.** Flow_13ng1f4 Flow_18cic3h Process milestone should update the process metadata field “milestone reached” Flow_05ffq52 Flow_13ng1f4 not(isInvoiceApproved) find_user = current_user["username"] isCurrentUser = True Flow_1vxagrf Flow_0bipj9q DataObjectReference_05liqvr Flow_1vxagrf Flow_0u5z1vc Flow_12cqm3u Flow_0hev3yn Flow_0p6vvu0 Flow_0o94g4u Flow_12cqm3u Flow_0p6vvu0 invoice_file_name = invoice.contributorName + "_" + str(invoice.invoiceId) + ".pdf" Flow_1x4rtop Flow_0u5z1vc # Set Invoice Status invoice["invoiceStatus"] = "Awaiting approval" curCode = invoice.invoiceCurrency curAmount = invoice.invoiceAmount isCurTest = False del(filesAccept) invoice.invoiceAmount_str = curAmount_str Flow_0a9w301 Flow_0h1x7y6 Flow_02o270g Flow_0o94g4u Flow_0a9w301 Flow_0h1x7y6 Flow_04fl87d DataObjectReference_1ykzuco Flow_1yktpsd Flow_17xbb2s Flow_0j4xxzp Flow_17xbb2s # Set Task List task_id = "waku_invoice_submitted" # Set Message should be generated isSetMessage = True # Set Time Zone time_zone = current_user_extras["time_zone"] # Set Time Format time_format = current_user_extras["time_format"] # Set Date Format time_format = current_user_extras["date_format"] Flow_1yktpsd Flow_0j4xxzp Flow_1c5u447 Flow_1gohkts Flow_16bw9hx Flow_16bw9hx Flow_0kngdw4 Flow_1gohkts Flow_04ccp12 Flow_00kky3k Flow_15pzvrr Flow_18xvx8w Flow_0bfs2xe # Set Timer Check isApprovalTimer = False Flow_0lfqk0y Flow_0yvmfqu Flow_1ds4s8o Flow_09wwily Flow_1ex5hfx Flow_1c5u447 Flow_1sc1v4y Invoice_Approval_Check Flow_1m8uxeg Flow_04do8x7 Flow_02g4qn2 Flow_0nxzc38 annual_salary_str = resp_BambooPayRate["amount"] annual_salary = float(annual_salary_str) Flow_0xtzqkg Flow_1m8uxeg invoice_amount = invoice.invoiceAmount Flow_04do8x7 Flow_0nxzc38 Flow_0xtzqkg Flow_1sc1v4y Flow_02g4qn2 Flow_0kngdw4 Flow_0lfqk0y Flow_0dvboik Flow_0y37dgj # Set who for find find_user = userKeycloak isCurrentUser = False Flow_0bv17h4 Flow_06joj2d Flow_0re50gq Flow_0y37dgj # Set Waku message variables task_id = "waku_notify_project_lead" isSetMessage = True Flow_05kzuqx Flow_0re50gq Flow_06joj2d Flow_05kzuqx # Set Project Lead Info project_lead_info = {} project_lead_info["full_name"] = userFullName project_lead_info["first_name"] = userFirstName project_lead_info["email"] = userEmail project_lead_info["time_zone"] = userTimeZone project_lead_info["time_format"] = userTimeFormat project_lead_info["date_format"] = userDateFormat project_lead_info["status_key"] = userStatusKey # Move to pre-script of Waku Message # Set Time Zone time_zone = project_lead_info["time_zone"] # Set Time Format time_format = project_lead_info["time_format"] # Set Date Format time_format = project_lead_info["date_format"] del(userFullName) del(userFirstName) del(userEmail) del(userStatusKey) Flow_0dvboik Flow_01ki4jt userBambooId_str = current_user_extras["bamboo_supervisor_api_id"] # Set who for find find_user = userKeycloak isCurrentUser = False Flow_01ki4jt Flow_0bv17h4 Flow_1qf14hx Flow_15pzvrr # Store Team Lead comments elsewhere and clear form comments if isApprovalTimer: invoice["commentsProjectLead"] = "No action taken within allotted time" approvalComment = "" invoice.isProjectLeadApprove = False isInvoiceApproved = False # Set Invoice Status invoice["invoiceStatus"] = "Rejected" else: invoice["commentsProjectLead"] = approvalComment approvalComment = "" invoice.isProjectLeadApprove = isInvoiceApproved # Set Invoice Status invoice["invoiceStatus"] = "Approved" Flow_0h96w9j Flow_053ca95 DataObjectReference_1g4gzsx Flow_053ca95 Flow_00tndkb # Set Invoice Status to Approved and Pending Payment invoice.invoiceStatus = "Approved and Pending Payment" Flow_02v6lr2 Flow_00kky3k Flow_0h96w9j Flow_09wwily Flow_02v6lr2 invoice.commentsFinance = approvalComment approvalComment = "" # Set Invoice Status if isInvoiceApproved: invoice["invoiceStatus"] = "Approved by Finance Team" else: invoice["invoiceStatus"] = "Rejected by Finance Team" Process milestone should update the process metadata field “milestone reached” Flow_04fl87d Flow_1ex5hfx Flow_00tndkb Flow_1jfb24q DataObjectReference_0br9o6c Flow_1j5eznh if isMatch: task_id = "waku_payment_pending_ismatch" else: task_id = "waku_payment_pending_not_ismatch" isSetMessage = True # Set Time Zone timezone = current_user_extras["time_zone"] Flow_1j5eznh Flow_1w7kqay Flow_1buk0a2 Flow_1w7kqay Flow_1buk0a2 if isMatch: task_id = "waku_payment_pending_ismatch" else: task_id = "waku_payment_pending_not_ismatch" isSetMessage = True Flow_1jfb24q Flow_0bfs2xe Flow_0c0c9mw DataObjectReference_1wclgyx Flow_14x1v12 Flow_0umhf4u Flow_1wq6gzs Flow_01i59kw Flow_1d0phao Flow_01i59kw Flow_14x1v12 Flow_0umhf4u # Set who rejected if not(invoice.isProjectLeadApprove): task_id = "waku_invoice_rejected-Project_Lead" else: task_id = "waku_invoice_rejected-Finance" # Set Message should not be set isSetMessage = False # Set Time Zone time_zone = current_user_extras["time_zone"] # Set Time Format time_format = current_user_extras["time_format"] # Set Date Format time_format = current_user_extras["date_format"] Flow_1wq6gzs Flow_1d0phao # Set who rejected if not(invoice.isProjectLeadApprove): waku_message = waku_message_body + waku_message_timestamp + waku_message_variables + waku_message_footer else: waku_message = waku_message_body + waku_message_timestamp + waku_message_variables + "\nProject Lead Comments: " + invoice.commentsProjectLead + waku_message_footer Flow_18xvx8w Flow_04ccp12 Flow_1ds4s8o DataObjectReference_0x2dn5o Flow_11zkgke # Set Task Id task_id = "waku_notify_finance" # Set Message should not be set isSetMessage = True isInvoiceApproved = "" try: is_format except NameError: is_format = False time_zone = "Asia/Dubai" date_format = "YMD" time_format = "24" Flow_11zkgke Flow_0n3djvs Flow_0lr2fpj Flow_0n3djvs Flow_0lr2fpj # Set Task Id task_id = "waku_notify_finance" # Set Message should not be set isSetMessage = True isInvoiceApproved = "" try: is_format except NameError: is_format = False time_zone = "Asia/Dubai" date_format = "YMD" time_format = "24" Flow_1v8dszb Flow_1w4cqkv # Set Timer Check isApprovalTimer = True Flow_1v8dszb timedelta(minutes=3) Flow_0yvmfqu Flow_1w4cqkv Flow_1qf14hx Flow_0hev3yn Flow_02o270g Flow_00p30u2 Flow_18cic3h Flow_17vkjgc whichSubject = "Currency" addNew = False Flow_0bipj9q Flow_00p30u2 Flow_0c0c9mw topica_one topica_one { "topica_one": "Invoice successfully submitted" }