dodil/erp-method

modules/tax/signoff/tax/history/tax_registration.v5.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_v6" 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_v6">
  <bpmn:documentation>Tax (VAT): one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_tax_registration" name="Registration" processRef="Process_tax_registration_v6" />
 </bpmn:collaboration>
 <bpmn:process id="Process_tax_registration_v6" name="Registration" isExecutable="false">
  <bpmn:documentation>Lifecycle of the registration, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: not_registered, registered, deregistered.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_registration">
   <bpmn:lane id="Lane_registration_tax_admin" name="Whoever is responsible for VAT (the owner, the bookkeeper, the accountant)">
    <bpmn:flowNodeRef>Start_registration</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_record_not_registered</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_register</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_record_registered</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_change_vat_scheme</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_deregister</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_registration_none__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_change_vat_scheme__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_change_vat_scheme__if_end</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_registration_deregistered</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_registration" name="Registration needed">
   <bpmn:outgoing>Flow_Start_registration__Gateway_registration_none__if</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_record_not_registered" name="Record that we are not registered" dodil:step="record_not_registered">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From none to not_registered. When: the first registration row (it may carry any date: nothing has used it). Effect: documents charge no VAT and are not titled VAT invoice.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_registration_none__if__Task_record_not_registered</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_record_not_registered__Task_register</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_register" name="Record our VAT registration" dodil:step="register">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From not_registered to registered. When: a VAT number in the GB format; effective_from after today; a second person's approval where tax_changes_need_second_person. Requires: vat_number. Effect: tax points from that date charge VAT.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_record_not_registered__Task_register</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_register__Gateway_change_vat_scheme__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_record_registered" name="Record an existing registration" dodil:step="record_registered">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From none to registered. When: the first registration row (a new installation or the migration): it carries the date HMRC registered us. Requires: vat_number.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_registration_none__if__Task_record_registered</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_record_registered__Gateway_change_vat_scheme__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_change_vat_scheme" name="Change the accounting basis or the flat rate scheme (v4)" dodil:step="change_vat_scheme">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From registered to registered. When: from the first day of a VAT period after today; eligibility from the dated tax_statutory limits (cash accounting: expected taxable turnover at most the joining limit; flat rate: at most its joining limit, a sector and its rate); a second person's approval where tax_changes_need_second_person. Requires: scheme. Effect: a new registration row: accounting_basis invoice | cash, flat_rate with sector, rate and first_year_until; returns of later periods compute under it (TAX-36, TAX-37).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_change_vat_scheme__if__Task_change_vat_scheme</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_change_vat_scheme__Gateway_change_vat_scheme__if_end</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_deregister" name="Record deregistration" dodil:step="deregister" dodil:approval="true">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From registered to deregistered. When: effective_date after today; the approver is not the author. Requires: effective_date. Effect: tax points from that date charge no VAT. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_change_vat_scheme__if_end__Task_deregister</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_deregister__End_registration_deregistered</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_registration_none__if" name="New registration?">
   <bpmn:incoming>Flow_Start_registration__Gateway_registration_none__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_registration_none__if__Task_record_not_registered</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_registration_none__if__Task_record_registered</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_change_vat_scheme__if" name="from the first day of a VAT period after today; eligibility from the dated tax_statutory limits (cash accounting: expected taxable turnover at most the joining limit; flat rate: at most its joining limit, a sector and its rate); a second person's approval where tax_changes_need_second_person?">
   <bpmn:incoming>Flow_Task_register__Gateway_change_vat_scheme__if</bpmn:incoming>
   <bpmn:incoming>Flow_Task_record_registered__Gateway_change_vat_scheme__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_change_vat_scheme__if__Task_change_vat_scheme</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_change_vat_scheme__if__Gateway_change_vat_scheme__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_change_vat_scheme__if_end">
   <bpmn:incoming>Flow_Gateway_change_vat_scheme__if__Gateway_change_vat_scheme__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_change_vat_scheme__Gateway_change_vat_scheme__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_change_vat_scheme__if_end__Task_deregister</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_registration_deregistered" name="Registration deregistered">
   <bpmn:incoming>Flow_Task_deregister__End_registration_deregistered</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Gateway_registration_none__if__Task_record_not_registered" sourceRef="Gateway_registration_none__if" targetRef="Task_record_not_registered" />
  <bpmn:sequenceFlow id="Flow_Gateway_registration_none__if__Task_record_registered" sourceRef="Gateway_registration_none__if" targetRef="Task_record_registered" />
  <bpmn:sequenceFlow id="Flow_Start_registration__Gateway_registration_none__if" sourceRef="Start_registration" targetRef="Gateway_registration_none__if" />
  <bpmn:sequenceFlow id="Flow_Task_record_not_registered__Task_register" sourceRef="Task_record_not_registered" targetRef="Task_register" />
  <bpmn:sequenceFlow id="Flow_Gateway_change_vat_scheme__if__Task_change_vat_scheme" name="from the first day of a VAT period after today; eligibility from the dated tax_statutory limits (cash accounting: expected taxable turnover at most the joining limit; flat rate: at most its joining limit, a sector and its rate); a second person's approval where tax_changes_need_second_person" sourceRef="Gateway_change_vat_scheme__if" targetRef="Task_change_vat_scheme" />
  <bpmn:sequenceFlow id="Flow_Gateway_change_vat_scheme__if__Gateway_change_vat_scheme__if_end" name="otherwise" sourceRef="Gateway_change_vat_scheme__if" targetRef="Gateway_change_vat_scheme__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_change_vat_scheme__Gateway_change_vat_scheme__if_end" sourceRef="Task_change_vat_scheme" targetRef="Gateway_change_vat_scheme__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_change_vat_scheme__if_end__Task_deregister" sourceRef="Gateway_change_vat_scheme__if_end" targetRef="Task_deregister" />
  <bpmn:sequenceFlow id="Flow_Task_register__Gateway_change_vat_scheme__if" sourceRef="Task_register" targetRef="Gateway_change_vat_scheme__if" />
  <bpmn:sequenceFlow id="Flow_Task_record_registered__Gateway_change_vat_scheme__if" sourceRef="Task_record_registered" targetRef="Gateway_change_vat_scheme__if" />
  <bpmn:sequenceFlow id="Flow_Task_deregister__End_registration_deregistered" sourceRef="Task_deregister" targetRef="End_registration_deregistered" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_tax_v6">
  <bpmndi:BPMNPlane id="BPMNPlane_tax_v6" bpmnElement="Collaboration_tax_v6">
   <bpmndi:BPMNShape id="Participant_tax_registration_di" bpmnElement="Participant_tax_registration" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1300" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_registration_tax_admin_di" bpmnElement="Lane_registration_tax_admin" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1270" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_registration_di" bpmnElement="Start_registration">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_record_not_registered_di" bpmnElement="Task_record_not_registered">
    <dc:Bounds x="465" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_register_di" bpmnElement="Task_register">
    <dc:Bounds x="635" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_record_registered_di" bpmnElement="Task_record_registered">
    <dc:Bounds x="465" y="140" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_change_vat_scheme_di" bpmnElement="Task_change_vat_scheme">
    <dc:Bounds x="805" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_deregister_di" bpmnElement="Task_deregister">
    <dc:Bounds x="975" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_registration_none__if_di" bpmnElement="Gateway_registration_none__if">
    <dc:Bounds x="320" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_change_vat_scheme__if_di" bpmnElement="Gateway_change_vat_scheme__if">
    <dc:Bounds x="660" y="155" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_change_vat_scheme__if_end_di" bpmnElement="Gateway_change_vat_scheme__if_end">
    <dc:Bounds x="830" y="155" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_registration_deregistered_di" bpmnElement="End_registration_deregistered">
    <dc:Bounds x="1177" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Gateway_registration_none__if__Task_record_not_registered_di" bpmnElement="Flow_Gateway_registration_none__if__Task_record_not_registered">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="465" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_registration_none__if__Task_record_registered_di" bpmnElement="Flow_Gateway_registration_none__if__Task_record_registered">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="440" y="60" />
    <di:waypoint x="440" y="180" />
    <di:waypoint x="465" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Start_registration__Gateway_registration_none__if_di" bpmnElement="Flow_Start_registration__Gateway_registration_none__if">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="320" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_record_not_registered__Task_register_di" bpmnElement="Flow_Task_record_not_registered__Task_register">
    <di:waypoint x="565" y="60" />
    <di:waypoint x="635" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_change_vat_scheme__if__Task_change_vat_scheme_di" bpmnElement="Flow_Gateway_change_vat_scheme__if__Task_change_vat_scheme">
    <di:waypoint x="710" y="180" />
    <di:waypoint x="780" y="180" />
    <di:waypoint x="780" y="60" />
    <di:waypoint x="805" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_change_vat_scheme__if__Gateway_change_vat_scheme__if_end_di" bpmnElement="Flow_Gateway_change_vat_scheme__if__Gateway_change_vat_scheme__if_end">
    <di:waypoint x="710" y="180" />
    <di:waypoint x="830" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_change_vat_scheme__Gateway_change_vat_scheme__if_end_di" bpmnElement="Flow_Task_change_vat_scheme__Gateway_change_vat_scheme__if_end">
    <di:waypoint x="855" y="100" />
    <di:waypoint x="855" y="220" />
    <di:waypoint x="855" y="220" />
    <di:waypoint x="855" y="205" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_change_vat_scheme__if_end__Task_deregister_di" bpmnElement="Flow_Gateway_change_vat_scheme__if_end__Task_deregister">
    <di:waypoint x="880" y="180" />
    <di:waypoint x="950" y="180" />
    <di:waypoint x="950" y="60" />
    <di:waypoint x="975" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_register__Gateway_change_vat_scheme__if_di" bpmnElement="Flow_Task_register__Gateway_change_vat_scheme__if">
    <di:waypoint x="685" y="100" />
    <di:waypoint x="685" y="226" />
    <di:waypoint x="685" y="226" />
    <di:waypoint x="685" y="205" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_record_registered__Gateway_change_vat_scheme__if_di" bpmnElement="Flow_Task_record_registered__Gateway_change_vat_scheme__if">
    <di:waypoint x="565" y="180" />
    <di:waypoint x="660" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_deregister__End_registration_deregistered_di" bpmnElement="Flow_Task_deregister__End_registration_deregistered">
    <di:waypoint x="1075" y="60" />
    <di:waypoint x="1177" y="60" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>