dodil/erp-method

modules/tax/signoff/tax/history/tax_party_tax.v2.bpmn

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dodil="https://git.dodil.io/dodil/erp-platform/bpmn/1" id="Definitions_tax_v5" name="Tax (VAT) processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_tax_v5">
  <bpmn:documentation>Tax (VAT): one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_tax_party_tax" name="Party tax" processRef="Process_tax_party_tax_v5" />
 </bpmn:collaboration>
 <bpmn:process id="Process_tax_party_tax_v5" name="Party tax" isExecutable="false">
  <bpmn:documentation>Lifecycle of the party tax, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: recorded. Note: v4: the party's tax rows were a table only; drawing them makes the VAT-number check and the end-user notice visible in the signed process</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_party_tax">
   <bpmn:lane id="Lane_party_tax_biller" name="Whoever raises orders and invoices">
    <bpmn:flowNodeRef>Start_party_tax</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_set_party_tax</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_change_party_tax</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_change_party_tax__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_change_party_tax__if_end</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_party_tax_system" name="The system">
    <bpmn:flowNodeRef>Task_check_party_vat_number</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_check_party_vat_number__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_check_party_vat_number__if_end</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_party_tax_tax_admin" name="Whoever is responsible for VAT (the owner, the bookkeeper, the accountant)">
    <bpmn:flowNodeRef>Task_confirm_party_vat_number</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_confirm_party_vat_number__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_confirm_party_vat_number__if_end</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_party_tax_recorded</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_party_tax" name="Party tax needed">
   <bpmn:outgoing>Flow_Start_party_tax__Task_set_party_tax</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_set_party_tax" name="Record a customer's or supplier's treatment and VAT number" dodil:step="set_party_tax">
   <bpmn:documentation>By: Whoever raises orders and invoices. From none to recorded. When: a treatment that needs a VAT number has one; the first row of a party holds from the start. Effect: the party's first tax row (TAX-05).</bpmn:documentation>
   <bpmn:incoming>Flow_Start_party_tax__Task_set_party_tax</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_set_party_tax__Gateway_change_party_tax__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_change_party_tax" name="Change a party's treatment, number or end-user notice (v4)" dodil:step="change_party_tax">
   <bpmn:documentation>By: Whoever raises orders and invoices. From recorded to recorded. When: valid_from after today; a construction end-user or intermediary notice carries its reference and date. Effect: a new dated row; documents not yet issued with a tax point from then use it (TAX-05, TAX-46).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_change_party_tax__if__Task_change_party_tax</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_change_party_tax__Gateway_change_party_tax__if_end</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_check_party_vat_number" name="Check the VAT number with HMRC (v4)" dodil:step="check_party_vat_number" implementation="##unspecified">
   <bpmn:documentation>By: The system. From recorded to recorded. When: a treatment that needs a VAT number was saved, or its last check is older than vat_number_check_days before a reverse-charge document issues. Effect: check_result valid | invalid | could_not_check, HMRC's name and address and consultation number stored on the row (TAX-13).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_check_party_vat_number__if__Task_check_party_vat_number</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_check_party_vat_number__Gateway_check_party_vat_number__if_end</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:userTask id="Task_confirm_party_vat_number" name="Confirm a number HMRC could not check (v4)" dodil:step="confirm_party_vat_number">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From recorded to recorded. When: the last check is could_not_check (a non-GB number, or HMRC unavailable). Requires: reason. Effect: recorded as confirmed by a person, with the reason.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_confirm_party_vat_number__if__Task_confirm_party_vat_number</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_confirm_party_vat_number__Gateway_confirm_party_vat_number__if_end</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_change_party_tax__if" name="valid_from after today; a construction end-user or intermediary notice carries its reference and date?">
   <bpmn:incoming>Flow_Task_set_party_tax__Gateway_change_party_tax__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_change_party_tax__if__Task_change_party_tax</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_change_party_tax__if__Gateway_change_party_tax__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_change_party_tax__if_end">
   <bpmn:incoming>Flow_Gateway_change_party_tax__if__Gateway_change_party_tax__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_change_party_tax__Gateway_change_party_tax__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_change_party_tax__if_end__Gateway_check_party_vat_number__if</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_check_party_vat_number__if" name="a treatment that needs a VAT number was saved, or its last check is older than vat_number_check_days before a reverse-charge document issues?">
   <bpmn:incoming>Flow_Gateway_change_party_tax__if_end__Gateway_check_party_vat_number__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_check_party_vat_number__if__Task_check_party_vat_number</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_check_party_vat_number__if__Gateway_check_party_vat_number__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_check_party_vat_number__if_end">
   <bpmn:incoming>Flow_Gateway_check_party_vat_number__if__Gateway_check_party_vat_number__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_check_party_vat_number__Gateway_check_party_vat_number__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_check_party_vat_number__if_end__Gateway_confirm_party_vat_number__if</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_confirm_party_vat_number__if" name="the last check is could_not_check (a non-GB number, or HMRC unavailable)?">
   <bpmn:incoming>Flow_Gateway_check_party_vat_number__if_end__Gateway_confirm_party_vat_number__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_confirm_party_vat_number__if__Task_confirm_party_vat_number</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_confirm_party_vat_number__if__Gateway_confirm_party_vat_number__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_confirm_party_vat_number__if_end">
   <bpmn:incoming>Flow_Gateway_confirm_party_vat_number__if__Gateway_confirm_party_vat_number__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_confirm_party_vat_number__Gateway_confirm_party_vat_number__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_confirm_party_vat_number__if_end__End_party_tax_recorded</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_party_tax_recorded" name="Party tax recorded">
   <bpmn:incoming>Flow_Gateway_confirm_party_vat_number__if_end__End_party_tax_recorded</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Start_party_tax__Task_set_party_tax" sourceRef="Start_party_tax" targetRef="Task_set_party_tax" />
  <bpmn:sequenceFlow id="Flow_Gateway_change_party_tax__if__Task_change_party_tax" name="valid_from after today; a construction end-user or intermediary notice carries its reference and date" sourceRef="Gateway_change_party_tax__if" targetRef="Task_change_party_tax" />
  <bpmn:sequenceFlow id="Flow_Gateway_change_party_tax__if__Gateway_change_party_tax__if_end" name="otherwise" sourceRef="Gateway_change_party_tax__if" targetRef="Gateway_change_party_tax__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_change_party_tax__Gateway_change_party_tax__if_end" sourceRef="Task_change_party_tax" targetRef="Gateway_change_party_tax__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_check_party_vat_number__if__Task_check_party_vat_number" name="a treatment that needs a VAT number was saved, or its last check is older than vat_number_check_days before a reverse-charge document issues" sourceRef="Gateway_check_party_vat_number__if" targetRef="Task_check_party_vat_number" />
  <bpmn:sequenceFlow id="Flow_Gateway_check_party_vat_number__if__Gateway_check_party_vat_number__if_end" name="otherwise" sourceRef="Gateway_check_party_vat_number__if" targetRef="Gateway_check_party_vat_number__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_check_party_vat_number__Gateway_check_party_vat_number__if_end" sourceRef="Task_check_party_vat_number" targetRef="Gateway_check_party_vat_number__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_confirm_party_vat_number__if__Task_confirm_party_vat_number" name="the last check is could_not_check (a non-GB number, or HMRC unavailable)" sourceRef="Gateway_confirm_party_vat_number__if" targetRef="Task_confirm_party_vat_number" />
  <bpmn:sequenceFlow id="Flow_Gateway_confirm_party_vat_number__if__Gateway_confirm_party_vat_number__if_end" name="otherwise" sourceRef="Gateway_confirm_party_vat_number__if" targetRef="Gateway_confirm_party_vat_number__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_confirm_party_vat_number__Gateway_confirm_party_vat_number__if_end" sourceRef="Task_confirm_party_vat_number" targetRef="Gateway_confirm_party_vat_number__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_change_party_tax__if_end__Gateway_check_party_vat_number__if" sourceRef="Gateway_change_party_tax__if_end" targetRef="Gateway_check_party_vat_number__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_check_party_vat_number__if_end__Gateway_confirm_party_vat_number__if" sourceRef="Gateway_check_party_vat_number__if_end" targetRef="Gateway_confirm_party_vat_number__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_confirm_party_vat_number__if_end__End_party_tax_recorded" sourceRef="Gateway_confirm_party_vat_number__if_end" targetRef="End_party_tax_recorded" />
  <bpmn:sequenceFlow id="Flow_Task_set_party_tax__Gateway_change_party_tax__if" sourceRef="Task_set_party_tax" targetRef="Gateway_change_party_tax__if" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_tax_v5">
  <bpmndi:BPMNPlane id="BPMNPlane_tax_v5" bpmnElement="Collaboration_tax_v5">
   <bpmndi:BPMNShape id="Participant_tax_party_tax_di" bpmnElement="Participant_tax_party_tax" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1640" height="780" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_party_tax_biller_di" bpmnElement="Lane_party_tax_biller" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1610" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_party_tax_system_di" bpmnElement="Lane_party_tax_system" isHorizontal="true">
    <dc:Bounds x="30" y="260" width="1610" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_party_tax_tax_admin_di" bpmnElement="Lane_party_tax_tax_admin" isHorizontal="true">
    <dc:Bounds x="30" y="520" width="1610" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_party_tax_di" bpmnElement="Start_party_tax">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_set_party_tax_di" bpmnElement="Task_set_party_tax">
    <dc:Bounds x="295" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_change_party_tax_di" bpmnElement="Task_change_party_tax">
    <dc:Bounds x="635" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_check_party_vat_number_di" bpmnElement="Task_check_party_vat_number">
    <dc:Bounds x="975" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_confirm_party_vat_number_di" bpmnElement="Task_confirm_party_vat_number">
    <dc:Bounds x="1315" y="540" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_change_party_tax__if_di" bpmnElement="Gateway_change_party_tax__if">
    <dc:Bounds x="490" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_change_party_tax__if_end_di" bpmnElement="Gateway_change_party_tax__if_end">
    <dc:Bounds x="660" y="155" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_check_party_vat_number__if_di" bpmnElement="Gateway_check_party_vat_number__if">
    <dc:Bounds x="830" y="295" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_check_party_vat_number__if_end_di" bpmnElement="Gateway_check_party_vat_number__if_end">
    <dc:Bounds x="1000" y="415" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_confirm_party_vat_number__if_di" bpmnElement="Gateway_confirm_party_vat_number__if">
    <dc:Bounds x="1170" y="555" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_confirm_party_vat_number__if_end_di" bpmnElement="Gateway_confirm_party_vat_number__if_end">
    <dc:Bounds x="1340" y="675" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_party_tax_recorded_di" bpmnElement="End_party_tax_recorded">
    <dc:Bounds x="1517" y="562" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Start_party_tax__Task_set_party_tax_di" bpmnElement="Flow_Start_party_tax__Task_set_party_tax">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="295" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_change_party_tax__if__Task_change_party_tax_di" bpmnElement="Flow_Gateway_change_party_tax__if__Task_change_party_tax">
    <di:waypoint x="540" y="60" />
    <di:waypoint x="635" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_change_party_tax__if__Gateway_change_party_tax__if_end_di" bpmnElement="Flow_Gateway_change_party_tax__if__Gateway_change_party_tax__if_end">
    <di:waypoint x="540" y="60" />
    <di:waypoint x="635" y="60" />
    <di:waypoint x="635" y="180" />
    <di:waypoint x="660" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_change_party_tax__Gateway_change_party_tax__if_end_di" bpmnElement="Flow_Task_change_party_tax__Gateway_change_party_tax__if_end">
    <di:waypoint x="685" y="100" />
    <di:waypoint x="685" y="220" />
    <di:waypoint x="685" y="220" />
    <di:waypoint x="685" y="205" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_check_party_vat_number__if__Task_check_party_vat_number_di" bpmnElement="Flow_Gateway_check_party_vat_number__if__Task_check_party_vat_number">
    <di:waypoint x="880" y="320" />
    <di:waypoint x="975" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_check_party_vat_number__if__Gateway_check_party_vat_number__if_end_di" bpmnElement="Flow_Gateway_check_party_vat_number__if__Gateway_check_party_vat_number__if_end">
    <di:waypoint x="880" y="320" />
    <di:waypoint x="975" y="320" />
    <di:waypoint x="975" y="440" />
    <di:waypoint x="1000" y="440" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_check_party_vat_number__Gateway_check_party_vat_number__if_end_di" bpmnElement="Flow_Task_check_party_vat_number__Gateway_check_party_vat_number__if_end">
    <di:waypoint x="1025" y="360" />
    <di:waypoint x="1025" y="486" />
    <di:waypoint x="1025" y="486" />
    <di:waypoint x="1025" y="465" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_confirm_party_vat_number__if__Task_confirm_party_vat_number_di" bpmnElement="Flow_Gateway_confirm_party_vat_number__if__Task_confirm_party_vat_number">
    <di:waypoint x="1220" y="580" />
    <di:waypoint x="1315" y="580" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_confirm_party_vat_number__if__Gateway_confirm_party_vat_number__if_end_di" bpmnElement="Flow_Gateway_confirm_party_vat_number__if__Gateway_confirm_party_vat_number__if_end">
    <di:waypoint x="1220" y="580" />
    <di:waypoint x="1315" y="580" />
    <di:waypoint x="1315" y="700" />
    <di:waypoint x="1340" y="700" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_confirm_party_vat_number__Gateway_confirm_party_vat_number__if_end_di" bpmnElement="Flow_Task_confirm_party_vat_number__Gateway_confirm_party_vat_number__if_end">
    <di:waypoint x="1365" y="620" />
    <di:waypoint x="1365" y="752" />
    <di:waypoint x="1365" y="752" />
    <di:waypoint x="1365" y="725" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_change_party_tax__if_end__Gateway_check_party_vat_number__if_di" bpmnElement="Flow_Gateway_change_party_tax__if_end__Gateway_check_party_vat_number__if">
    <di:waypoint x="710" y="180" />
    <di:waypoint x="805" y="180" />
    <di:waypoint x="805" y="320" />
    <di:waypoint x="830" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_check_party_vat_number__if_end__Gateway_confirm_party_vat_number__if_di" bpmnElement="Flow_Gateway_check_party_vat_number__if_end__Gateway_confirm_party_vat_number__if">
    <di:waypoint x="1050" y="440" />
    <di:waypoint x="1145" y="440" />
    <di:waypoint x="1145" y="580" />
    <di:waypoint x="1170" y="580" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_confirm_party_vat_number__if_end__End_party_tax_recorded_di" bpmnElement="Flow_Gateway_confirm_party_vat_number__if_end__End_party_tax_recorded">
    <di:waypoint x="1390" y="700" />
    <di:waypoint x="1492" y="700" />
    <di:waypoint x="1492" y="580" />
    <di:waypoint x="1517" y="580" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_set_party_tax__Gateway_change_party_tax__if_di" bpmnElement="Flow_Task_set_party_tax__Gateway_change_party_tax__if">
    <di:waypoint x="395" y="60" />
    <di:waypoint x="490" y="60" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>