dodil/erp-method

modules/tax/signoff/tax/history/tax_bad_debt_claim.v3.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_bad_debt_claim" name="Bad debt claim" processRef="Process_tax_bad_debt_claim_v6" />
 </bpmn:collaboration>
 <bpmn:process id="Process_tax_bad_debt_claim_v6" name="Bad debt claim" isExecutable="false">
  <bpmn:documentation>Lifecycle of the bad debt claim, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: eligible, claimed, dismissed.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_bad_debt_claim">
   <bpmn:lane id="Lane_bad_debt_claim_system" name="The system">
    <bpmn:flowNodeRef>Start_bad_debt_claim</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_suggest_bad_debt_relief</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Timer_suggest_bad_debt_relief</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_repay_bad_debt_relief</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_repay_bad_debt_relief__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_repay_bad_debt_relief__if_end</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_bad_debt_claim_claimed</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_bad_debt_claim_tax_admin" name="Whoever is responsible for VAT (the owner, the bookkeeper, the accountant)">
    <bpmn:flowNodeRef>Task_claim_bad_debt_relief</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_dismiss_bad_debt_relief</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_bad_debt_claim_eligible__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_bad_debt_claim_dismissed</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_bad_debt_claim" name="Bad debt claim needed">
   <bpmn:outgoing>Flow_Start_bad_debt_claim__Timer_suggest_bad_debt_relief</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:serviceTask id="Task_suggest_bad_debt_relief" name="List invoices eligible for relief" dodil:step="suggest_bad_debt_relief" implementation="##unspecified">
   <bpmn:documentation>By: The system. From none to eligible. When: an invoice six months past the later of its due and supply dates, written off, its VAT in a submitted return. Effect: one eligible row per invoice. Waits: when a return is prepared.</bpmn:documentation>
   <bpmn:incoming>Flow_Timer_suggest_bad_debt_relief__Task_suggest_bad_debt_relief</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_suggest_bad_debt_relief__Gateway_bad_debt_claim_eligible__if</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:intermediateCatchEvent id="Timer_suggest_bad_debt_relief" name="when a return is prepared">
   <bpmn:incoming>Flow_Start_bad_debt_claim__Timer_suggest_bad_debt_relief</bpmn:incoming>
   <bpmn:outgoing>Flow_Timer_suggest_bad_debt_relief__Task_suggest_bad_debt_relief</bpmn:outgoing>
   <bpmn:timerEventDefinition id="Timer_suggest_bad_debt_relief__definition">
    <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">when a return is prepared</bpmn:timeDuration>
   </bpmn:timerEventDefinition>
  </bpmn:intermediateCatchEvent>
  <bpmn:userTask id="Task_claim_bad_debt_relief" name="Claim the relief on this return" dodil:step="claim_bad_debt_relief">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From eligible to claimed. When: every eligibility gate met; within four years and six months. Effect: the VAT fraction of the unpaid amount in box 4 (TAX-34).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_bad_debt_claim_eligible__if__Task_claim_bad_debt_relief</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_claim_bad_debt_relief__Gateway_repay_bad_debt_relief__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_dismiss_bad_debt_relief" name="Do not claim" dodil:step="dismiss_bad_debt_relief">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From eligible to dismissed. Requires: reason.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_bad_debt_claim_eligible__if__Task_dismiss_bad_debt_relief</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_dismiss_bad_debt_relief__End_bad_debt_claim_dismissed</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_repay_bad_debt_relief" name="Repay relief on a later receipt" dodil:step="repay_bad_debt_relief" implementation="##unspecified">
   <bpmn:documentation>By: The system. From claimed to claimed. When: a receipt allocated to the invoice after the claim. Effect: its VAT fraction in box 1 of the next return, once per allocation (TAX-35).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_repay_bad_debt_relief__if__Task_repay_bad_debt_relief</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_repay_bad_debt_relief__Gateway_repay_bad_debt_relief__if_end</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:exclusiveGateway id="Gateway_bad_debt_claim_eligible__if" name="Bad debt claim eligible: what next?">
   <bpmn:incoming>Flow_Task_suggest_bad_debt_relief__Gateway_bad_debt_claim_eligible__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_bad_debt_claim_eligible__if__Task_claim_bad_debt_relief</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_bad_debt_claim_eligible__if__Task_dismiss_bad_debt_relief</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_repay_bad_debt_relief__if" name="a receipt allocated to the invoice after the claim?">
   <bpmn:incoming>Flow_Task_claim_bad_debt_relief__Gateway_repay_bad_debt_relief__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_repay_bad_debt_relief__if__Task_repay_bad_debt_relief</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_repay_bad_debt_relief__if__Gateway_repay_bad_debt_relief__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_repay_bad_debt_relief__if_end">
   <bpmn:incoming>Flow_Gateway_repay_bad_debt_relief__if__Gateway_repay_bad_debt_relief__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_repay_bad_debt_relief__Gateway_repay_bad_debt_relief__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_repay_bad_debt_relief__if_end__End_bad_debt_claim_claimed</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_bad_debt_claim_claimed" name="Bad debt claim claimed">
   <bpmn:incoming>Flow_Gateway_repay_bad_debt_relief__if_end__End_bad_debt_claim_claimed</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:endEvent id="End_bad_debt_claim_dismissed" name="Bad debt claim dismissed">
   <bpmn:incoming>Flow_Task_dismiss_bad_debt_relief__End_bad_debt_claim_dismissed</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Timer_suggest_bad_debt_relief__Task_suggest_bad_debt_relief" sourceRef="Timer_suggest_bad_debt_relief" targetRef="Task_suggest_bad_debt_relief" />
  <bpmn:sequenceFlow id="Flow_Start_bad_debt_claim__Timer_suggest_bad_debt_relief" sourceRef="Start_bad_debt_claim" targetRef="Timer_suggest_bad_debt_relief" />
  <bpmn:sequenceFlow id="Flow_Gateway_bad_debt_claim_eligible__if__Task_claim_bad_debt_relief" sourceRef="Gateway_bad_debt_claim_eligible__if" targetRef="Task_claim_bad_debt_relief" />
  <bpmn:sequenceFlow id="Flow_Gateway_bad_debt_claim_eligible__if__Task_dismiss_bad_debt_relief" sourceRef="Gateway_bad_debt_claim_eligible__if" targetRef="Task_dismiss_bad_debt_relief" />
  <bpmn:sequenceFlow id="Flow_Task_suggest_bad_debt_relief__Gateway_bad_debt_claim_eligible__if" sourceRef="Task_suggest_bad_debt_relief" targetRef="Gateway_bad_debt_claim_eligible__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_repay_bad_debt_relief__if__Task_repay_bad_debt_relief" name="a receipt allocated to the invoice after the claim" sourceRef="Gateway_repay_bad_debt_relief__if" targetRef="Task_repay_bad_debt_relief" />
  <bpmn:sequenceFlow id="Flow_Gateway_repay_bad_debt_relief__if__Gateway_repay_bad_debt_relief__if_end" name="otherwise" sourceRef="Gateway_repay_bad_debt_relief__if" targetRef="Gateway_repay_bad_debt_relief__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_repay_bad_debt_relief__Gateway_repay_bad_debt_relief__if_end" sourceRef="Task_repay_bad_debt_relief" targetRef="Gateway_repay_bad_debt_relief__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_repay_bad_debt_relief__if_end__End_bad_debt_claim_claimed" sourceRef="Gateway_repay_bad_debt_relief__if_end" targetRef="End_bad_debt_claim_claimed" />
  <bpmn:sequenceFlow id="Flow_Task_claim_bad_debt_relief__Gateway_repay_bad_debt_relief__if" sourceRef="Task_claim_bad_debt_relief" targetRef="Gateway_repay_bad_debt_relief__if" />
  <bpmn:sequenceFlow id="Flow_Task_dismiss_bad_debt_relief__End_bad_debt_claim_dismissed" sourceRef="Task_dismiss_bad_debt_relief" targetRef="End_bad_debt_claim_dismissed" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_tax_v6">
  <bpmndi:BPMNPlane id="BPMNPlane_tax_v6" bpmnElement="Collaboration_tax_v6">
   <bpmndi:BPMNShape id="Participant_tax_bad_debt_claim_di" bpmnElement="Participant_tax_bad_debt_claim" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1470" height="520" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_bad_debt_claim_system_di" bpmnElement="Lane_bad_debt_claim_system" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1440" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_bad_debt_claim_tax_admin_di" bpmnElement="Lane_bad_debt_claim_tax_admin" isHorizontal="true">
    <dc:Bounds x="30" y="260" width="1440" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_bad_debt_claim_di" bpmnElement="Start_bad_debt_claim">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_suggest_bad_debt_relief_di" bpmnElement="Task_suggest_bad_debt_relief">
    <dc:Bounds x="465" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Timer_suggest_bad_debt_relief_di" bpmnElement="Timer_suggest_bad_debt_relief">
    <dc:Bounds x="327" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_claim_bad_debt_relief_di" bpmnElement="Task_claim_bad_debt_relief">
    <dc:Bounds x="805" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_dismiss_bad_debt_relief_di" bpmnElement="Task_dismiss_bad_debt_relief">
    <dc:Bounds x="805" y="400" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_repay_bad_debt_relief_di" bpmnElement="Task_repay_bad_debt_relief">
    <dc:Bounds x="1145" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_bad_debt_claim_eligible__if_di" bpmnElement="Gateway_bad_debt_claim_eligible__if">
    <dc:Bounds x="660" y="295" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_repay_bad_debt_relief__if_di" bpmnElement="Gateway_repay_bad_debt_relief__if">
    <dc:Bounds x="1000" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_repay_bad_debt_relief__if_end_di" bpmnElement="Gateway_repay_bad_debt_relief__if_end">
    <dc:Bounds x="1170" y="155" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_bad_debt_claim_claimed_di" bpmnElement="End_bad_debt_claim_claimed">
    <dc:Bounds x="1347" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_bad_debt_claim_dismissed_di" bpmnElement="End_bad_debt_claim_dismissed">
    <dc:Bounds x="1007" y="302" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Timer_suggest_bad_debt_relief__Task_suggest_bad_debt_relief_di" bpmnElement="Flow_Timer_suggest_bad_debt_relief__Task_suggest_bad_debt_relief">
    <di:waypoint x="363" y="60" />
    <di:waypoint x="465" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Start_bad_debt_claim__Timer_suggest_bad_debt_relief_di" bpmnElement="Flow_Start_bad_debt_claim__Timer_suggest_bad_debt_relief">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="327" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_bad_debt_claim_eligible__if__Task_claim_bad_debt_relief_di" bpmnElement="Flow_Gateway_bad_debt_claim_eligible__if__Task_claim_bad_debt_relief">
    <di:waypoint x="710" y="320" />
    <di:waypoint x="805" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_bad_debt_claim_eligible__if__Task_dismiss_bad_debt_relief_di" bpmnElement="Flow_Gateway_bad_debt_claim_eligible__if__Task_dismiss_bad_debt_relief">
    <di:waypoint x="710" y="320" />
    <di:waypoint x="780" y="320" />
    <di:waypoint x="780" y="440" />
    <di:waypoint x="805" y="440" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_suggest_bad_debt_relief__Gateway_bad_debt_claim_eligible__if_di" bpmnElement="Flow_Task_suggest_bad_debt_relief__Gateway_bad_debt_claim_eligible__if">
    <di:waypoint x="565" y="60" />
    <di:waypoint x="635" y="60" />
    <di:waypoint x="635" y="320" />
    <di:waypoint x="660" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_repay_bad_debt_relief__if__Task_repay_bad_debt_relief_di" bpmnElement="Flow_Gateway_repay_bad_debt_relief__if__Task_repay_bad_debt_relief">
    <di:waypoint x="1050" y="60" />
    <di:waypoint x="1145" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_repay_bad_debt_relief__if__Gateway_repay_bad_debt_relief__if_end_di" bpmnElement="Flow_Gateway_repay_bad_debt_relief__if__Gateway_repay_bad_debt_relief__if_end">
    <di:waypoint x="1050" y="60" />
    <di:waypoint x="1145" y="60" />
    <di:waypoint x="1145" y="180" />
    <di:waypoint x="1170" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_repay_bad_debt_relief__Gateway_repay_bad_debt_relief__if_end_di" bpmnElement="Flow_Task_repay_bad_debt_relief__Gateway_repay_bad_debt_relief__if_end">
    <di:waypoint x="1195" y="100" />
    <di:waypoint x="1195" y="220" />
    <di:waypoint x="1195" y="220" />
    <di:waypoint x="1195" y="205" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_repay_bad_debt_relief__if_end__End_bad_debt_claim_claimed_di" bpmnElement="Flow_Gateway_repay_bad_debt_relief__if_end__End_bad_debt_claim_claimed">
    <di:waypoint x="1220" y="180" />
    <di:waypoint x="1322" y="180" />
    <di:waypoint x="1322" y="60" />
    <di:waypoint x="1347" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_claim_bad_debt_relief__Gateway_repay_bad_debt_relief__if_di" bpmnElement="Flow_Task_claim_bad_debt_relief__Gateway_repay_bad_debt_relief__if">
    <di:waypoint x="905" y="320" />
    <di:waypoint x="975" y="320" />
    <di:waypoint x="975" y="60" />
    <di:waypoint x="1000" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_dismiss_bad_debt_relief__End_bad_debt_claim_dismissed_di" bpmnElement="Flow_Task_dismiss_bad_debt_relief__End_bad_debt_claim_dismissed">
    <di:waypoint x="905" y="440" />
    <di:waypoint x="982" y="440" />
    <di:waypoint x="982" y="320" />
    <di:waypoint x="1007" y="320" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>