dodil/erp-method

modules/ar/signoff/ar/history/ar_credit_note.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_ar_v6" name="Invoicing processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_ar_v6">
  <bpmn:documentation>Invoicing: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_ar_credit_note" name="Credit note" processRef="Process_ar_credit_note_v6" />
 </bpmn:collaboration>
 <bpmn:process id="Process_ar_credit_note_v6" name="Credit note" isExecutable="false">
  <bpmn:documentation>Lifecycle of the credit note, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: draft, approved, cancelled.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_credit_note">
   <bpmn:lane id="Lane_credit_note_biller" name="Whoever sends the invoices (office, bookkeeper)">
    <bpmn:flowNodeRef>Start_credit_note</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_draft_credit</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_allocate_credit</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_cancel_credit</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_credit_note_none__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_credit_note_approved</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_credit_note_cancelled</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_credit_note_approver" name="Owner / finance manager">
    <bpmn:flowNodeRef>Task_approve_credit</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_credit_note_draft__if</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_credit_note_system" name="The system">
    <bpmn:flowNodeRef>Task_raise_settlement_discount</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_credit_note" name="Credit note needed">
   <bpmn:outgoing>Flow_Start_credit_note__Gateway_credit_note_none__if</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_draft_credit" name="Draft a credit note" dodil:step="draft_credit">
   <bpmn:documentation>By: Whoever sends the invoices (office, bookkeeper). From none to draft. When: an issued invoice to correct, or a goodwill credit on the customer.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_credit_note_none__if__Task_draft_credit</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_draft_credit__Gateway_credit_note_draft__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_approve_credit" name="Approve the credit note" dodil:step="approve_credit" dodil:approval="true">
   <bpmn:documentation>By: Owner / finance manager. From draft to approved. When: lines and tax present; it does not exceed what remains creditable on the invoice it names; the approver is not its author where second_approver is on. Effect: numbered; credit date today; tax frozen; posted in post mode. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_credit_note_draft__if__Task_approve_credit</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_approve_credit__Task_allocate_credit</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_allocate_credit" name="Allocate the credit" dodil:step="allocate_credit">
   <bpmn:documentation>By: Whoever sends the invoices (office, bookkeeper). From approved to approved. Effect: in payments: against one or more invoices, or left on the customer.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_approve_credit__Task_allocate_credit</bpmn:incoming>
   <bpmn:incoming>Flow_Task_raise_settlement_discount__Task_allocate_credit</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_allocate_credit__End_credit_note_approved</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_cancel_credit" name="Cancel the draft credit" dodil:step="cancel_credit">
   <bpmn:documentation>By: Whoever sends the invoices (office, bookkeeper). From draft to cancelled.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_credit_note_draft__if__Task_cancel_credit</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_cancel_credit__End_credit_note_cancelled</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_raise_settlement_discount" name="Credit the early-settlement discount taken (v4)" dodil:step="raise_settlement_discount" implementation="##unspecified">
   <bpmn:documentation>By: The system. From none to approved. When: received within the discount window; the amount is the terms' percentage of the gross outstanding at the receipt; settlement_discount_vat is credit_note. Effect: numbered, at the invoice's frozen rates pro rata (tax TAX-47), approved by the terms, posted, allocated by payments (AR-38).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_credit_note_none__if__Task_raise_settlement_discount</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_raise_settlement_discount__Task_allocate_credit</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:exclusiveGateway id="Gateway_credit_note_none__if" name="New credit note?">
   <bpmn:incoming>Flow_Start_credit_note__Gateway_credit_note_none__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_credit_note_none__if__Task_draft_credit</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_credit_note_none__if__Task_raise_settlement_discount</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_credit_note_draft__if" name="Credit note draft: what next?">
   <bpmn:incoming>Flow_Task_draft_credit__Gateway_credit_note_draft__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_credit_note_draft__if__Task_approve_credit</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_credit_note_draft__if__Task_cancel_credit</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_credit_note_approved" name="Credit note approved">
   <bpmn:incoming>Flow_Task_allocate_credit__End_credit_note_approved</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:endEvent id="End_credit_note_cancelled" name="Credit note cancelled">
   <bpmn:incoming>Flow_Task_cancel_credit__End_credit_note_cancelled</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Gateway_credit_note_none__if__Task_draft_credit" sourceRef="Gateway_credit_note_none__if" targetRef="Task_draft_credit" />
  <bpmn:sequenceFlow id="Flow_Gateway_credit_note_none__if__Task_raise_settlement_discount" sourceRef="Gateway_credit_note_none__if" targetRef="Task_raise_settlement_discount" />
  <bpmn:sequenceFlow id="Flow_Start_credit_note__Gateway_credit_note_none__if" sourceRef="Start_credit_note" targetRef="Gateway_credit_note_none__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_credit_note_draft__if__Task_approve_credit" sourceRef="Gateway_credit_note_draft__if" targetRef="Task_approve_credit" />
  <bpmn:sequenceFlow id="Flow_Gateway_credit_note_draft__if__Task_cancel_credit" sourceRef="Gateway_credit_note_draft__if" targetRef="Task_cancel_credit" />
  <bpmn:sequenceFlow id="Flow_Task_draft_credit__Gateway_credit_note_draft__if" sourceRef="Task_draft_credit" targetRef="Gateway_credit_note_draft__if" />
  <bpmn:sequenceFlow id="Flow_Task_allocate_credit__End_credit_note_approved" sourceRef="Task_allocate_credit" targetRef="End_credit_note_approved" />
  <bpmn:sequenceFlow id="Flow_Task_approve_credit__Task_allocate_credit" sourceRef="Task_approve_credit" targetRef="Task_allocate_credit" />
  <bpmn:sequenceFlow id="Flow_Task_cancel_credit__End_credit_note_cancelled" sourceRef="Task_cancel_credit" targetRef="End_credit_note_cancelled" />
  <bpmn:sequenceFlow id="Flow_Task_raise_settlement_discount__Task_allocate_credit" sourceRef="Task_raise_settlement_discount" targetRef="Task_allocate_credit" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_ar_v6">
  <bpmndi:BPMNPlane id="BPMNPlane_ar_v6" bpmnElement="Collaboration_ar_v6">
   <bpmndi:BPMNShape id="Participant_ar_credit_note_di" bpmnElement="Participant_ar_credit_note" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1130" height="540" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_credit_note_biller_di" bpmnElement="Lane_credit_note_biller" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1100" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_credit_note_approver_di" bpmnElement="Lane_credit_note_approver" isHorizontal="true">
    <dc:Bounds x="30" y="260" width="1100" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_credit_note_system_di" bpmnElement="Lane_credit_note_system" isHorizontal="true">
    <dc:Bounds x="30" y="400" width="1100" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_credit_note_di" bpmnElement="Start_credit_note">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_draft_credit_di" bpmnElement="Task_draft_credit">
    <dc:Bounds x="465" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_approve_credit_di" bpmnElement="Task_approve_credit">
    <dc:Bounds x="805" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_allocate_credit_di" bpmnElement="Task_allocate_credit">
    <dc:Bounds x="635" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_cancel_credit_di" bpmnElement="Task_cancel_credit">
    <dc:Bounds x="805" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_raise_settlement_discount_di" bpmnElement="Task_raise_settlement_discount">
    <dc:Bounds x="465" y="420" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_credit_note_none__if_di" bpmnElement="Gateway_credit_note_none__if">
    <dc:Bounds x="320" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_credit_note_draft__if_di" bpmnElement="Gateway_credit_note_draft__if">
    <dc:Bounds x="660" y="295" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_credit_note_approved_di" bpmnElement="End_credit_note_approved">
    <dc:Bounds x="837" y="162" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_credit_note_cancelled_di" bpmnElement="End_credit_note_cancelled">
    <dc:Bounds x="1007" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Gateway_credit_note_none__if__Task_draft_credit_di" bpmnElement="Flow_Gateway_credit_note_none__if__Task_draft_credit">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="465" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_credit_note_none__if__Task_raise_settlement_discount_di" bpmnElement="Flow_Gateway_credit_note_none__if__Task_raise_settlement_discount">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="440" y="60" />
    <di:waypoint x="440" y="460" />
    <di:waypoint x="465" y="460" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Start_credit_note__Gateway_credit_note_none__if_di" bpmnElement="Flow_Start_credit_note__Gateway_credit_note_none__if">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="320" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_credit_note_draft__if__Task_approve_credit_di" bpmnElement="Flow_Gateway_credit_note_draft__if__Task_approve_credit">
    <di:waypoint x="710" y="320" />
    <di:waypoint x="805" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_credit_note_draft__if__Task_cancel_credit_di" bpmnElement="Flow_Gateway_credit_note_draft__if__Task_cancel_credit">
    <di:waypoint x="710" y="320" />
    <di:waypoint x="780" y="320" />
    <di:waypoint x="780" y="60" />
    <di:waypoint x="805" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_draft_credit__Gateway_credit_note_draft__if_di" bpmnElement="Flow_Task_draft_credit__Gateway_credit_note_draft__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_Task_allocate_credit__End_credit_note_approved_di" bpmnElement="Flow_Task_allocate_credit__End_credit_note_approved">
    <di:waypoint x="735" y="60" />
    <di:waypoint x="812" y="60" />
    <di:waypoint x="812" y="180" />
    <di:waypoint x="837" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_approve_credit__Task_allocate_credit_di" bpmnElement="Flow_Task_approve_credit__Task_allocate_credit">
    <di:waypoint x="855" y="360" />
    <di:waypoint x="855" y="375" />
    <di:waypoint x="685" y="375" />
    <di:waypoint x="685" y="100" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_cancel_credit__End_credit_note_cancelled_di" bpmnElement="Flow_Task_cancel_credit__End_credit_note_cancelled">
    <di:waypoint x="905" y="60" />
    <di:waypoint x="1007" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_raise_settlement_discount__Task_allocate_credit_di" bpmnElement="Flow_Task_raise_settlement_discount__Task_allocate_credit">
    <di:waypoint x="565" y="460" />
    <di:waypoint x="610" y="460" />
    <di:waypoint x="610" y="60" />
    <di:waypoint x="635" y="60" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>