dodil/erp-method

modules/payments/signoff/payments/history/payments_deposit_batch.v6.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_payments_v8" name="Payments &amp; collections processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_payments_v8">
  <bpmn:documentation>Payments &amp; collections: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_payments_deposit_batch" name="Deposit batch" processRef="Process_payments_deposit_batch_v8" />
 </bpmn:collaboration>
 <bpmn:process id="Process_payments_deposit_batch_v8" name="Deposit batch" isExecutable="false">
  <bpmn:documentation>Lifecycle of the deposit batch, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: open, deposited, matched.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_deposit_batch">
   <bpmn:lane id="Lane_deposit_batch_cashier" name="Whoever records money (bookkeeper, office manager)">
    <bpmn:flowNodeRef>Start_deposit_batch</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_start_deposit_batch</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_add_cheque_to_batch</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_close_deposit_batch</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_match_deposit_batch</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_deposit_batch_none__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_add_cheque_to_batch__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_add_cheque_to_batch__if_end</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_deposit_batch_deposited__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_deposit_batch_matched</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_deposit_batch_system" name="The system">
    <bpmn:flowNodeRef>Task_expect_deposit_batch</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_deposit_batch_approver" name="Owner / finance manager">
    <bpmn:flowNodeRef>Task_accept_deposit_difference</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_deposit_batch" name="Deposit batch needed">
   <bpmn:outgoing>Flow_Start_deposit_batch__Gateway_deposit_batch_none__if</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_start_deposit_batch" name="Start a paying-in (v3)" dodil:step="start_deposit_batch">
   <bpmn:documentation>By: Whoever records money (bookkeeper, office manager). From none to open. When: a bank account with purpose receive.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_deposit_batch_none__if__Task_start_deposit_batch</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_start_deposit_batch__Gateway_add_cheque_to_batch__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_add_cheque_to_batch" name="Add a cheque receipt to the paying-in" dodil:step="add_cheque_to_batch">
   <bpmn:documentation>By: Whoever records money (bookkeeper, office manager). From open to open. When: a receipt with method cheque not in another batch.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_add_cheque_to_batch__if__Task_add_cheque_to_batch</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_add_cheque_to_batch__Gateway_add_cheque_to_batch__if_end</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_close_deposit_batch" name="Close the paying-in with its slip" dodil:step="close_deposit_batch">
   <bpmn:documentation>By: Whoever records money (bookkeeper, office manager). From open to deposited. Requires: slip_no. Effect: keyed dep:&lt;bank_account_id&gt;:&lt;slip&gt;; the total fixed (PAY-28).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_add_cheque_to_batch__if_end__Task_close_deposit_batch</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_close_deposit_batch__Gateway_deposit_batch_deposited__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_match_deposit_batch" name="Match the batch to its statement credit" dodil:step="match_deposit_batch">
   <bpmn:documentation>By: Whoever records money (bookkeeper, office manager). From deposited to matched. When: the line's amount equals the batch total. Effect: v6: an expected batch (kind cash) posts bank / its clearing_purpose (cash_in_transit), event deposit_match; a cheque batch posts nothing (its receipts did).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_deposit_batch_deposited__if__Task_match_deposit_batch</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_match_deposit_batch__End_deposit_batch_matched</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_expect_deposit_batch" name="Take a bag another module sent to the bank (v6, PAY-49)" dodil:step="expect_deposit_batch" implementation="##unspecified">
   <bpmn:documentation>By: The system. From none to deposited. When: batch_ref unique (a repeat answers the same); a bank account of the company with purpose receive, in the currency; amount above zero. Effect: a deposited batch of kind cash with no cheques, total = amount, clearing_purpose and source_module kept; matched like any batch.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_deposit_batch_none__if__Task_expect_deposit_batch</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_expect_deposit_batch__Gateway_deposit_batch_deposited__if</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:userTask id="Task_accept_deposit_difference" name="Accept a counted difference on a bag" dodil:step="accept_deposit_difference" dodil:approval="true">
   <bpmn:documentation>By: Owner / finance manager. From deposited to matched. When: an expected cash batch; the line's amount differs from the total; the approver is not the cashier (email AND sub). Requires: reason. Effect: bank (the line) and cash_over_short (the difference) / the clearing purpose (the total), event deposit_difference. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_deposit_batch_deposited__if__Task_accept_deposit_difference</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_accept_deposit_difference__End_deposit_batch_matched</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_deposit_batch_none__if" name="New deposit batch?">
   <bpmn:incoming>Flow_Start_deposit_batch__Gateway_deposit_batch_none__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_deposit_batch_none__if__Task_start_deposit_batch</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_deposit_batch_none__if__Task_expect_deposit_batch</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_add_cheque_to_batch__if" name="a receipt with method cheque not in another batch?">
   <bpmn:incoming>Flow_Task_start_deposit_batch__Gateway_add_cheque_to_batch__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_add_cheque_to_batch__if__Task_add_cheque_to_batch</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_add_cheque_to_batch__if__Gateway_add_cheque_to_batch__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_add_cheque_to_batch__if_end">
   <bpmn:incoming>Flow_Gateway_add_cheque_to_batch__if__Gateway_add_cheque_to_batch__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_add_cheque_to_batch__Gateway_add_cheque_to_batch__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_add_cheque_to_batch__if_end__Task_close_deposit_batch</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_deposit_batch_deposited__if" name="Deposit batch deposited: what next?">
   <bpmn:incoming>Flow_Task_close_deposit_batch__Gateway_deposit_batch_deposited__if</bpmn:incoming>
   <bpmn:incoming>Flow_Task_expect_deposit_batch__Gateway_deposit_batch_deposited__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_deposit_batch_deposited__if__Task_match_deposit_batch</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_deposit_batch_deposited__if__Task_accept_deposit_difference</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_deposit_batch_matched" name="Deposit batch matched">
   <bpmn:incoming>Flow_Task_match_deposit_batch__End_deposit_batch_matched</bpmn:incoming>
   <bpmn:incoming>Flow_Task_accept_deposit_difference__End_deposit_batch_matched</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Gateway_deposit_batch_none__if__Task_start_deposit_batch" sourceRef="Gateway_deposit_batch_none__if" targetRef="Task_start_deposit_batch" />
  <bpmn:sequenceFlow id="Flow_Gateway_deposit_batch_none__if__Task_expect_deposit_batch" sourceRef="Gateway_deposit_batch_none__if" targetRef="Task_expect_deposit_batch" />
  <bpmn:sequenceFlow id="Flow_Start_deposit_batch__Gateway_deposit_batch_none__if" sourceRef="Start_deposit_batch" targetRef="Gateway_deposit_batch_none__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_add_cheque_to_batch__if__Task_add_cheque_to_batch" name="a receipt with method cheque not in another batch" sourceRef="Gateway_add_cheque_to_batch__if" targetRef="Task_add_cheque_to_batch" />
  <bpmn:sequenceFlow id="Flow_Gateway_add_cheque_to_batch__if__Gateway_add_cheque_to_batch__if_end" name="otherwise" sourceRef="Gateway_add_cheque_to_batch__if" targetRef="Gateway_add_cheque_to_batch__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_add_cheque_to_batch__Gateway_add_cheque_to_batch__if_end" sourceRef="Task_add_cheque_to_batch" targetRef="Gateway_add_cheque_to_batch__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_add_cheque_to_batch__if_end__Task_close_deposit_batch" sourceRef="Gateway_add_cheque_to_batch__if_end" targetRef="Task_close_deposit_batch" />
  <bpmn:sequenceFlow id="Flow_Task_start_deposit_batch__Gateway_add_cheque_to_batch__if" sourceRef="Task_start_deposit_batch" targetRef="Gateway_add_cheque_to_batch__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_deposit_batch_deposited__if__Task_match_deposit_batch" sourceRef="Gateway_deposit_batch_deposited__if" targetRef="Task_match_deposit_batch" />
  <bpmn:sequenceFlow id="Flow_Gateway_deposit_batch_deposited__if__Task_accept_deposit_difference" sourceRef="Gateway_deposit_batch_deposited__if" targetRef="Task_accept_deposit_difference" />
  <bpmn:sequenceFlow id="Flow_Task_close_deposit_batch__Gateway_deposit_batch_deposited__if" sourceRef="Task_close_deposit_batch" targetRef="Gateway_deposit_batch_deposited__if" />
  <bpmn:sequenceFlow id="Flow_Task_match_deposit_batch__End_deposit_batch_matched" sourceRef="Task_match_deposit_batch" targetRef="End_deposit_batch_matched" />
  <bpmn:sequenceFlow id="Flow_Task_expect_deposit_batch__Gateway_deposit_batch_deposited__if" sourceRef="Task_expect_deposit_batch" targetRef="Gateway_deposit_batch_deposited__if" />
  <bpmn:sequenceFlow id="Flow_Task_accept_deposit_difference__End_deposit_batch_matched" sourceRef="Task_accept_deposit_difference" targetRef="End_deposit_batch_matched" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_payments_v8">
  <bpmndi:BPMNPlane id="BPMNPlane_payments_v8" bpmnElement="Collaboration_payments_v8">
   <bpmndi:BPMNShape id="Participant_payments_deposit_batch_di" bpmnElement="Participant_payments_deposit_batch" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1130" height="660" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_deposit_batch_cashier_di" bpmnElement="Lane_deposit_batch_cashier" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1100" height="380" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_deposit_batch_system_di" bpmnElement="Lane_deposit_batch_system" isHorizontal="true">
    <dc:Bounds x="30" y="380" width="1100" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_deposit_batch_approver_di" bpmnElement="Lane_deposit_batch_approver" isHorizontal="true">
    <dc:Bounds x="30" y="520" width="1100" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_deposit_batch_di" bpmnElement="Start_deposit_batch">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_start_deposit_batch_di" bpmnElement="Task_start_deposit_batch">
    <dc:Bounds x="465" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_add_cheque_to_batch_di" bpmnElement="Task_add_cheque_to_batch">
    <dc:Bounds x="805" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_close_deposit_batch_di" bpmnElement="Task_close_deposit_batch">
    <dc:Bounds x="975" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_match_deposit_batch_di" bpmnElement="Task_match_deposit_batch">
    <dc:Bounds x="805" y="140" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_expect_deposit_batch_di" bpmnElement="Task_expect_deposit_batch">
    <dc:Bounds x="465" y="400" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_accept_deposit_difference_di" bpmnElement="Task_accept_deposit_difference">
    <dc:Bounds x="805" y="540" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_deposit_batch_none__if_di" bpmnElement="Gateway_deposit_batch_none__if">
    <dc:Bounds x="320" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_add_cheque_to_batch__if_di" bpmnElement="Gateway_add_cheque_to_batch__if">
    <dc:Bounds x="660" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_add_cheque_to_batch__if_end_di" bpmnElement="Gateway_add_cheque_to_batch__if_end">
    <dc:Bounds x="830" y="275" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_deposit_batch_deposited__if_di" bpmnElement="Gateway_deposit_batch_deposited__if">
    <dc:Bounds x="660" y="155" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_deposit_batch_matched_di" bpmnElement="End_deposit_batch_matched">
    <dc:Bounds x="1007" y="162" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Gateway_deposit_batch_none__if__Task_start_deposit_batch_di" bpmnElement="Flow_Gateway_deposit_batch_none__if__Task_start_deposit_batch">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="465" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_deposit_batch_none__if__Task_expect_deposit_batch_di" bpmnElement="Flow_Gateway_deposit_batch_none__if__Task_expect_deposit_batch">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="440" y="60" />
    <di:waypoint x="440" y="440" />
    <di:waypoint x="465" y="440" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Start_deposit_batch__Gateway_deposit_batch_none__if_di" bpmnElement="Flow_Start_deposit_batch__Gateway_deposit_batch_none__if">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="320" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_add_cheque_to_batch__if__Task_add_cheque_to_batch_di" bpmnElement="Flow_Gateway_add_cheque_to_batch__if__Task_add_cheque_to_batch">
    <di:waypoint x="710" y="60" />
    <di:waypoint x="805" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_add_cheque_to_batch__if__Gateway_add_cheque_to_batch__if_end_di" bpmnElement="Flow_Gateway_add_cheque_to_batch__if__Gateway_add_cheque_to_batch__if_end">
    <di:waypoint x="710" y="60" />
    <di:waypoint x="805" y="60" />
    <di:waypoint x="805" y="300" />
    <di:waypoint x="830" y="300" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_add_cheque_to_batch__Gateway_add_cheque_to_batch__if_end_di" bpmnElement="Flow_Task_add_cheque_to_batch__Gateway_add_cheque_to_batch__if_end">
    <di:waypoint x="855" y="100" />
    <di:waypoint x="855" y="340" />
    <di:waypoint x="855" y="340" />
    <di:waypoint x="855" y="325" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_add_cheque_to_batch__if_end__Task_close_deposit_batch_di" bpmnElement="Flow_Gateway_add_cheque_to_batch__if_end__Task_close_deposit_batch">
    <di:waypoint x="880" y="300" />
    <di:waypoint x="950" y="300" />
    <di:waypoint x="950" y="60" />
    <di:waypoint x="975" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_start_deposit_batch__Gateway_add_cheque_to_batch__if_di" bpmnElement="Flow_Task_start_deposit_batch__Gateway_add_cheque_to_batch__if">
    <di:waypoint x="565" y="60" />
    <di:waypoint x="660" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_deposit_batch_deposited__if__Task_match_deposit_batch_di" bpmnElement="Flow_Gateway_deposit_batch_deposited__if__Task_match_deposit_batch">
    <di:waypoint x="710" y="180" />
    <di:waypoint x="805" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_deposit_batch_deposited__if__Task_accept_deposit_difference_di" bpmnElement="Flow_Gateway_deposit_batch_deposited__if__Task_accept_deposit_difference">
    <di:waypoint x="710" y="180" />
    <di:waypoint x="780" y="180" />
    <di:waypoint x="780" y="580" />
    <di:waypoint x="805" y="580" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_close_deposit_batch__Gateway_deposit_batch_deposited__if_di" bpmnElement="Flow_Task_close_deposit_batch__Gateway_deposit_batch_deposited__if">
    <di:waypoint x="1025" y="100" />
    <di:waypoint x="1025" y="226" />
    <di:waypoint x="685" y="226" />
    <di:waypoint x="685" y="205" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_match_deposit_batch__End_deposit_batch_matched_di" bpmnElement="Flow_Task_match_deposit_batch__End_deposit_batch_matched">
    <di:waypoint x="905" y="180" />
    <di:waypoint x="1007" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_expect_deposit_batch__Gateway_deposit_batch_deposited__if_di" bpmnElement="Flow_Task_expect_deposit_batch__Gateway_deposit_batch_deposited__if">
    <di:waypoint x="565" y="440" />
    <di:waypoint x="635" y="440" />
    <di:waypoint x="635" y="180" />
    <di:waypoint x="660" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_accept_deposit_difference__End_deposit_batch_matched_di" bpmnElement="Flow_Task_accept_deposit_difference__End_deposit_batch_matched">
    <di:waypoint x="905" y="580" />
    <di:waypoint x="982" y="580" />
    <di:waypoint x="982" y="180" />
    <di:waypoint x="1007" y="180" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>