diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/Invoice Information.json b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/Invoice Information.json new file mode 100644 index 00000000..313ad124 --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/Invoice Information.json @@ -0,0 +1,5 @@ +{ + "title": "Invoice Information", + "description": "Submitted by: {{ invoice.contributorName }}
Contributor Id: {{ invoice.contributorId }}
Invoice Id: {{ invoice.invoiceId }} Invoice Amount: {{ invoice.invoiceAmount }} Select Currency: {{ invoice.invoiceCurrency }} Due Date: {{ invoice.dueDate }} Project Lead Comments: {{ invoice.commentsProjectLead }}", + "type": "object" +} \ No newline at end of file diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/Submit-the-invoice_JSONSchema.json b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/Submit-the-invoice_JSONSchema.json new file mode 100644 index 00000000..9b0be420 --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/Submit-the-invoice_JSONSchema.json @@ -0,0 +1,64 @@ +{ + "definitions": { + "currencyEnum": { + "title": "Currency", + "type": "string", + "anyOf": [ + "options_from_task_data_var:enumerations_list" + ] + } + }, + "type": "object", + "required": [ + "filesAccept" + ], + "properties": { + "invoice": { + "type": "object", + "required": [ + "contributorName", + "contributorId", + "invoiceId", + "invoiceAmount", + "invoiceCurrency", + "dueDate" + ], + "title": "", + "properties": { + "contributorName": { + "type": "string", + + "title": "Contributor Name" + }, + + "contributorId": { + "type": "integer", + "title": "Contributor Id", + "minLength": 2 + }, + "invoiceId": { + "type": "integer", + "title": "Invoice Id", + "minLength": 4 + }, + "invoiceAmount": { + "type": "number", + "title": "Invoice Amount" + }, + "invoiceCurrency": { + "$ref": "#/definitions/currencyEnum", + "title": "Select Currency" + }, + "dueDate": { + "type": "string", + "title": "Due Date" + } + } + }, + "filesAccept": { + "type": "string", + "format": "data-url", + "title": "Upload Invoice PDF" + } + } +} \ No newline at end of file diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/Submit-the-invoice_UISchema.json b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/Submit-the-invoice_UISchema.json new file mode 100644 index 00000000..41435cbc --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/Submit-the-invoice_UISchema.json @@ -0,0 +1,43 @@ +{ + "invoice": { + "contributorName": { + "ui:autofocus": true, + "ui:emptyValue": "", + "ui:placeholder": "First and Last Name" + }, + "contributorId": { + "ui:placeholder": "Employee or Vendor ID" + }, + "invoiceId": { + "ui:placeholder": "Enter the Status Invoice ID found in the upper left of the PDF to be uploaded" + }, + "invoiceAmount": { + "ui:placeholder": "Based on available currencies" + }, + "invoiceCurrency": { + "ui:placeholder": "Select payment currency" + }, + "dueDate": { + "ui:widget": "date", + "ui:placeholder": "Invoices submitted before the 15th of the month will be paided on the 25th" + }, + "ui:order": [ + "contributorName", + "contributorId", + "invoiceId", + "invoiceAmount", + "invoiceCurrency", + "dueDate" + ] + }, + "filesAccept": { + "ui:help": "Click here to select file to upload", + "ui:options": { + "accept": ".pdf" + } + }, + "ui:order": [ + "invoice", + "filesAccept" + ] +} \ No newline at end of file diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/approval-check.dmn b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/approval-check.dmn new file mode 100644 index 00000000..65e91029 --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/approval-check.dmn @@ -0,0 +1,36 @@ + + + + + + + (annual_salary/12)/invoice_amount + + + + + + 1 + + + True + + + + + + + + False + + + + + + + + + + + + diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/cc-invoice-approval-process-v2.bpmn b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/cc-invoice-approval-process-v2.bpmn new file mode 100644 index 00000000..4c3ca900 --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/cc-invoice-approval-process-v2.bpmn @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + Environment - Vendor portal, Mailbox, etc. + + + + CorrelationProperty_Submit_Invoice + + + + + + + Submit_the_invoice + Gateway_validation_successful_question_mark + Event_1usbnt0 + Event_0lhkxwc + Activity_0fq1nb4 + SubProcess_Data_validation_rules + Event_invoice_validation_failed + Gateway_0wk5se9 + Activity_show_errors + Activity_1colhao + Activity_1u89kok + Event_1r3yh2kx + Event_15y55nw + Gateway_1lbghql + Event_0x83ruk + Event_0m3ri6v + Gateway_1l4tz4i + Event_1b58a3z + Activity_0faln91 + Event_0rwxlca + Activity_07oyzdx + Gateway_05ov5p5 + Activity_0p88elm + Gateway_1717c0p + Activity_104xpp8 + Activity_175j3o7 + Event_176ch98 + Delete_File + Gateway_0dqj39f + Event_1vi3um1 + Activity_0rae8g6 + Activity_1ucvkk4 + Activity_1kgaqpf + Activity_0gkpa9s + Activity_0gkejaj + Activity_10p5t0r + Activity_0twki30 + Activity_1864qj2 + Waku_Message_Pending_Payment + Event_169on0z + + + Activity_1t8wi0r + Gateway_06i3we9 + Activity_06b32ar + Event_09q0ym0 + + + Gateway_1ytq6m7 + Event_1lh7308 + Activity_0cdgqi0 + + + + + not(svc_is_invoice_submit_pass) + + + + + + + not(isMatch) + + + not(isInvoiceApproved) + + + + + + + + + + + + + + + + + + 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_04odmtl + + + + + + + {"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 + + + + + + + Flow_0tzjowk + Flow_04odmtl + # Set Invoice Status +if svc_is_invoice_submit_pass: + invoice["invoiceStatus"] = "Awaiting approval" +else: + invoice["invoiceStatus"] = "Invoice validation failed" + + + + + Process milestone should update the process metadata field “milestone reached” + Flow_05ffq52 + Flow_13ng1f4 + + + + + Flow_1pefcgv + Flow_061sv6t + Flow_17vkjgc + + + + {{ submitInvoiceValidationMessage }} + +**Please fix when resubmitting.** + + Flow_13ng1f4 + Flow_18cic3h + + + + whichSubject = "Currency" +addNew = False + + Flow_0bipj9q + Flow_061sv6t + + + + find_user = current_user["username"] +isCurrentUser = True + + Flow_1vxagrf + Flow_0bipj9q + + DataObjectReference_05liqvr + + + + Flow_1vxagrf + + + + + + + + + + + Process milestone should update the process metadata field “milestone reached” + Flow_04fl87d + Flow_1ex5hfx + + + Flow_1c5u447 + Flow_1gohkts + Flow_16bw9hx + + + Flow_16bw9hx + Flow_0kngdw4 + + + Flow_1gohkts + Flow_04ccp12 + + + + + Flow_00kky3k + Flow_15pzvrr + Flow_18xvx8w + Flow_0bfs2xe + + + + + + + + invoice.commentsFinance = approvalComment +approvalComment = "" +# Set Invoice Status +if isInvoiceApproved: + invoice["invoiceStatus"] = "Approved by Finance Team" + invoice["isFinanceApprove"] = True +else: + invoice["invoiceStatus"] = "Rejected by Finance Team" + invoice["isFinanceApprove"] = False + **Invoice Id:** {{ invoice.invoiceId }} +___ +| **Field** | **Input** | **Field** | **Input** | **Source** | **Amount** | +| ---: | :--- | ---: | :--- | ---: | :--- | +|_Submitted by:_ | {{ invoice.contributorName }} | _Submitted on:_ | {{ invoice.invoiceDate }} | _Requested:_ | {{ invoice.invoiceAmount_str }} | +|_Submitter Id:_ | {{ invoice.contributorId }} | _Due Date:_ | {{ invoice.dueDate}} | _Bamboo Monthly Salary:_ | {{ monthly_salary_str }} | +___ + approvalComment = "" + + Flow_1ds4s8o + Flow_070r5mq + + + Flow_1v8dszb + Flow_1w4cqkv + # Set Timer Check +isApprovalTimer = True + + + Flow_1w4cqkv + Flow_09r1s5r + Flow_1qf14hx + + + + + + + Flow_0c0c9mw + + + Flow_1x00zm0 + 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_1qf14hx + Flow_1x00zm0 + + timedelta(seconds=1) + + + + + ___ +| **Field** | **Input** | +| ---: | :--- | +|_Submitted by:_ | {{ invoice.contributorName }} | +|_Submitter Id:_ | {{ invoice.contributorId }} | +|_Invoice Id:_ | {{ invoice.invoiceId }} | +|_Amount:_ | {{ invoice.invoiceAmount_str }} | +|_Submitted on:_ | {{ invoice.invoiceDate }} | +|_Due Date:_ | {{ invoice.dueDate}} | +___ + +Thank you for your invoice submission. +Updates on the progress of your submission will be sent to you on the Status app. + +Please click Submit below to return to the Home page. + +__________________________________________________________________________ + + + Flow_06amgv2 + Flow_0z51hpb + + + Flow_14glsqd + Flow_0hev3yn + Flow_1s2as7o + + + + + + + + + + + + + + Flow_0hyvwku + Flow_0o94g4u + + + Flow_02o270g + Flow_0o94g4u + Flow_0a9w301 + + + Flow_1s2as7o + Flow_0hyvwku + invoice_file_name = invoice.contributorName + "_" + str(invoice.invoiceId) + ".pdf" + + + + + + + + + + + Flow_0hev3yn + Flow_02o270g + + + Flow_0dhpy0v + Flow_14glsqd + + + Flow_0a9w301 + Flow_0cj1m0h + del(filesAccept) + + + Flow_0z51hpb + Flow_06mfxze + Flow_1xvt99y + + + Flow_1xvt99y + Flow_0dhpy0v + + timedelta(seconds=1) + + + + + + + Flow_0bfs2xe + Flow_0c0c9mw + + DataObjectReference_1wclgyx + + + Flow_14x1v12 + + + + + + Flow_0k8m0l1 + Flow_1bnxkd6 + + + Flow_01i59kw + + + + + + + + + + + + Flow_1bnxkd6 + Flow_01i59kw + + + + + + + Flow_14x1v12 + Flow_0k8m0l1 + # Set which message and check if there are Project Lead and/or Finance comments +if isApprovalTimer: + task_id = "waku_no_team_lead_response" +else: + if isMatch: + len_finance_comments = len(invoice["commentsFinance"].strip()) + len_project_lead_comments = 0 + task_id = "waku_invoice_rejected_ismatch" + else: + len_project_lead_comments = len(invoice["commentsProjectLead"].strip()) + if invoice["isProjectLeadApprove"]: + len_finance_comments = len(invoice["commentsFinance"].strip()) + task_id = "waku_invoice_rejected_not_ismatch_pl_approve" + else: + task_id = "waku_invoice_rejected_not_ismatch_not_pl_approve" + len_finance_comments = 0 + +# Set Message should not be set +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 +date_format = current_user_extras["date_format"] + + + + Flow_0kngdw4 + Flow_0lfqk0y + + + Flow_0dvboik + + + Flow_0y37dgj + + + + # Set who for find +find_user = userKeycloak +isCurrentUser = False + # 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(userTimeZone) +# del(userTimeFormat) +# del(userDateFormat) +# del(userStatusKey) + + Flow_0bv17h4 + Flow_0gplgyz + + + + + + + + + + + + Flow_0re50gq + Flow_0y37dgj + + + + # Set Waku message variables +task_id = "waku_notify_project_lead" +isSetMessage = True + + Flow_0gplgyz + Flow_0re50gq + + + + + Flow_0dvboik + Flow_01ki4jt + userBambooId_str = current_user_extras["bamboo_supervisor_api_id"] + + + + Flow_01ki4jt + Flow_0bv17h4 + + + + + + + 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 = "" + + Flow_0u8sn4c + Flow_0n3djvs + + + Flow_0lr2fpj + + + + + + + + + + + + Flow_0n3djvs + Flow_0lr2fpj + + + Flow_11zkgke + Flow_1ale8a2 + # Get Finance Group Members +finance_members_start = get_group_members("Finance Team") +finance_members = finance_members_start + +# Removed all but Sasha for demo +for member in finance_members: + if member != "alex": + finance_members.remove(member) + +# Set who for find +find_user = 'alex' +isCurrentUser = False + +# Set Project Lead Timer Check to False to determine which message to send later +isApprovalTimer = False + + + + + + + + + + + Flow_1ale8a2 + Flow_1gfeknb + + + + + Flow_1gfeknb + Flow_0u8sn4c + # Set Project Lead Info +finance_info = {} +finance_info["full_name"] = userFullName +finance_info["first_name"] = userFirstName +finance_info["email"] = userEmail +finance_info["time_zone"] = userTimeZone +finance_info["time_format"] = userTimeFormat +finance_info["date_format"] = userDateFormat +finance_info["status_key"] = userStatusKey + +# Move to pre-script of Waku Message +# Set Time Zone +time_zone = finance_info["time_zone"] + +# Set Time Format +time_format = finance_info["time_format"] + +# Set Date Format +time_format = finance_info["date_format"] + +del(userFullName) +del(userFirstName) +del(userEmail) +del(userTimeZone) +del(userTimeFormat) +del(userDateFormat) +del(userStatusKey) + + + + + + + Flow_0cj1m0h + 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_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) +monthly_salary = annual_salary/12 + + + Flow_0xtzqkg + Flow_1m8uxeg + invoice_amount = invoice.invoiceAmount + + + + + Flow_04do8x7 + + + + + + + + + + + + + Flow_18i75ep + Flow_0xtzqkg + + + + + + + + + + + + + Flow_1sc1v4y + Flow_02g4qn2 + + + + + Flow_0nxzc38 + Flow_10c1gm6 + curCode = invoice.invoiceCurrency +curAmount = monthly_salary +isCurTest = False + + + + monthly_salary_str = curAmount_str + + + Flow_10c1gm6 + Flow_18i75ep + + + + Flow_06mfxze + + timedelta(seconds=1000) + + + + + + curCode = invoice.invoiceCurrency +curAmount = invoice.invoiceAmount +isCurTest = False + invoice.invoiceAmount_str = curAmount_str + + Flow_1x4rtop + Flow_06amgv2 + + + Flow_18cic3h + Flow_1pefcgv + # CLear Contributor Name if contains number +if svc_is_num_in_name: + invoice["contributorName"] = None + +# Clear Invoice Anount if more than 2 decimals +if svc_decimal_cnt > 2: + invoice["invoiceAmount"] = None + +# Clear Invocie Due Date if before Today's Date +if not(svc_is_due_date_after): + invoice["dueDate"] = None + + + + + + Flow_0pwvb62 + + + + + + + + + + Flow_0pwvb62 + Flow_0z8ory2 + + + + Flow_0z8ory2 + Flow_1hebd4s + invoice = {} + +# no numbers in contributor name validation +if " Number in contributor name" in ValidationChoices: + invoice["contributorName"] = "Harmee5 Singh" +else: + invoice["contributorName"] = "Harmeet Singh" + +# Invoice amount number of decimals validation +if " Too many decimals in invoice amount" in ValidationChoices: + if scenarioChoices == "Correct invoice amount": + invoice["invoiceAmount"] = 10000.001 + else: + invoice["invoiceAmount"] = 10001.001 +else: + if scenarioChoices == "Correct invoice amount": + invoice["invoiceAmount"] = 10000.00 + else: + invoice["invoiceAmount"] = 10001.00 + +# Due date validation +if " Due date before today's date" in ValidationChoices: + invoice["dueDate"] = "2021-12-12" +else: + invoice["dueDate"] = "2022-12-12" + +# Set remainder of form fields +invoice["contributorId"] = 12 +invoice["invoiceId"] = 1234 +invoice["invoiceCurrency"] = "AUD" + + + Flow_1hebd4s + + + + + + + Flow_1l74eab + Flow_00kky3k + Flow_0h96w9j + + + Flow_1jfb24q + + + + + Flow_0h96w9j + Flow_1fvtcqt + + + Flow_070r5mq + Flow_1l74eab + + timedelta(seconds=1) + + + + + # Set Invoice Status to Approved and Pending Payment +invoice["invoiceStatus"] = "Approved and Pending Payment" + + Flow_1fvtcqt + Flow_1jfb24q + + DataObjectReference_0br9o6c + + + Flow_1j5eznh + + + + # Check for Finance comments +len_finance_comments = len(invoice["commentsFinance"].strip()) + +# Set Task Id and Project Lead comments length +if isMatch: + task_id = "waku_payment_pending_ismatch" + len_project_lead_comments = 0 +else: + task_id = "waku_payment_pending_not_ismatch" + len_project_lead_comments = len(invoice["commentsProjectLead"].strip()) + +# Set Message in Call Activity +isSetMessage = True + +# Set Time Zone +timezone = current_user_extras["time_zone"] + + Flow_1j5eznh + Flow_1w7kqay + + + + Flow_1buk0a2 + + + + + + + + + + + + + Flow_1w7kqay + Flow_1buk0a2 + + + + + + + + + + + + + + + + + + + DataObjectReference_1g4gzsx + + + + + + + + + + + + # Set Timer Check +isApprovalTimer = False + +# Set Comment Default +approvalComment = "" + **Invoice Id:** {{ invoice.invoiceId }} +___ +| **Field** | **Input** | **Field** | **Input** | **Source** | **Amount** | +| ---: | :--- | ---: | :--- | ---: | :--- | +|_Submitted by:_ | {{ invoice.contributorName }} | _Submitted on:_ | {{ invoice.invoiceDate }} | _Requested:_ | {{ invoice.invoiceAmount_str }} | +|_Submitter Id:_ | {{ invoice.contributorId }} | _Due Date:_ | {{ invoice.dueDate}} | _Bamboo Monthly Salary:_ | {{ monthly_salary_str }} | +___ + + + Flow_0lfqk0y + Flow_09r1s5r + + + Flow_1v8dszb + + timedelta(minutes=3) + + + + + + + + + topica_one + + + + + topica_one + { +"topica_one": "Invoice successfully submitted" +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/demo-preload_JSONSchema.json b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/demo-preload_JSONSchema.json new file mode 100644 index 00000000..4504857c --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/demo-preload_JSONSchema.json @@ -0,0 +1,28 @@ +{ + "title": "Submit Invoice", + "description": "Configuration options for submitting an invoice.", + "type": "object", + "properties": { + "ValidationChoices": { + "type": "array", + "title": "Select validation options", + "items": { + "type": "string", + "enum": [ + " Number in contributor name", + " Too many decimals in invoice amount", + " Due date before today's date" + ] + }, + "uniqueItems": true + }, + "scenarioChoices": { + "type": "string", + "title": "Select Currency", + "enum": [ + " Correct invoice amount", + " incorrect invoice amount" + ] + } + } +} \ No newline at end of file diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/demo-preload_UISchema.json b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/demo-preload_UISchema.json new file mode 100644 index 00000000..2bf58543 --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/demo-preload_UISchema.json @@ -0,0 +1,13 @@ +{ + "scenarioChoices": { + "ui:widget": "radio", + "ui:help": " ", + "ui:options": { + "inline": false + } + }, + "ValidationChoices": { + "ui:widget": "checkboxes", + "ui:help": " " + } +} \ No newline at end of file diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/invoice-approval_JSONSchema.json b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/invoice-approval_JSONSchema.json new file mode 100644 index 00000000..825b7a99 --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/invoice-approval_JSONSchema.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "properties": { + "isInvoiceApproved": { + "type": "boolean", + "title": "Approve?" + }, + "approvalComment": { + "type": "string", + "title": "Approval Comment" + } + } +} \ No newline at end of file diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/invoice-approval_UISchema.json b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/invoice-approval_UISchema.json new file mode 100644 index 00000000..331ce955 --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/invoice-approval_UISchema.json @@ -0,0 +1,15 @@ +{ + "isInvoiceApproved": { + "ui:autofocus": true, + "ui:widget": "radio", + "ui:help": "Select Yes to approve, No to reject" + }, + "approvalComment": { + "ui:widget": "textarea", + "ui:help": "Enter comments related to approval or rejection here" + }, +"ui:order": [ + "isInvoiceApproved", + "approvalComment" + ] +} \ No newline at end of file diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/process_model.json b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/process_model.json new file mode 100644 index 00000000..29b34e2c --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/process_model.json @@ -0,0 +1,11 @@ +{ + "description": "Invoice Approval", + "display_name": "Invoice Approval", + "display_order": 0, + "exception_notification_addresses": [], + "fault_or_suspend_on_exception": "fault", + "files": [], + "is_review": false, + "primary_file_name": "cc-invoice-approval-process-v2.bpmn", + "primary_process_id": "Process_cc_invoice_approval_process_v2_a" +} \ No newline at end of file diff --git a/manage-procurement/procurement/vendor-invoice-management/invoice-approval/submit_invoice_validation.dmn b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/submit_invoice_validation.dmn new file mode 100644 index 00000000..084c8f6c --- /dev/null +++ b/manage-procurement/procurement/vendor-invoice-management/invoice-approval/submit_invoice_validation.dmn @@ -0,0 +1,177 @@ + + + + + + + svc_is_num_in_name + + + + + svc_decimal_cnt + + + + + svc_is_due_date_after + + + + + + + False + + + <=2 + + + True + + + True + + + "No numbers in name, involce amount decimal places not greated than two, invoice due date after today's date" + + + + + True + + + <=2 + + + True + + + False + + + """**Validation Error:** + - Numbers are not allowed in the Contributor's Name """ + + + + + False + + + >2 + + + True + + + False + + + """**Validation error:** + - The involce amount must not have more than two decimal places """ + + + + + True + + + >2 + + + True + + + False + + + """**Validation errors:** + - Numbers are not allowed in the Contributor's Name + - The involce amount must not have more than two decimal places """ + + + + + False + + + <=2 + + + False + + + False + + + """**Validation error:** + - The invoice due date must be after today's date. """ + + + + + True + + + >2 + + + False + + + False + + + """**Validation errors:** + - Numbers are not allowed in the Contributor's Name + - The involce amount must not have more than two decimal places + - The invoice due date must be after today's date. """ + + + + + False + + + >2 + + + False + + + False + + + """**Validation errors:** + - The involce amount must not have more than two decimal places + - The invoice due date must be after today's date. """ + + + + + + + + + + + + + + False + + + "Something is wrong with the Invoice validation process. Please notify support" + + + + + + + + + + + +