dodil/erp-method

modules/payments/signoff/payments/history/payments_card_settlement.v1.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_v6" 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_v6">
  <bpmn:documentation>Payments &amp; collections: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_payments_card_settlement" name="Card settlement" processRef="Process_payments_card_settlement_v6" />
 </bpmn:collaboration>
 <bpmn:process id="Process_payments_card_settlement_v6" name="Card settlement" isExecutable="false">
  <bpmn:documentation>Lifecycle of the card settlement, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: expected, matched, differs.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_card_settlement">
   <bpmn:lane id="Lane_card_settlement_system" name="The system">
    <bpmn:flowNodeRef>Start_card_settlement</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_expect_card_settlement</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_match_card_settlement</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_flag_card_difference</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_card_settlement_expected__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_card_settlement_matched</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_card_settlement_approver" name="Owner / finance manager">
    <bpmn:flowNodeRef>Task_accept_card_difference</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_card_settlement" name="Card settlement needed">
   <bpmn:outgoing>Flow_Start_card_settlement__Task_expect_card_settlement</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:serviceTask id="Task_expect_card_settlement" name="Take an expected card settlement (v6, PAY-50)" dodil:step="expect_card_settlement" implementation="##unspecified">
   <bpmn:documentation>By: The system. From none to expected. When: settlement_ref unique (a repeat answers the same); the provider is a configured card provider of the company; gross above zero. Effect: an expected settlement: provider, company, currency, gross, business_date, transaction_count; card_clearing carries the gross (posted by the module that sold).</bpmn:documentation>
   <bpmn:incoming>Flow_Start_card_settlement__Task_expect_card_settlement</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_expect_card_settlement__Gateway_card_settlement_expected__if</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:task id="Task_match_card_settlement" name="Match the provider's credit" dodil:step="match_card_settlement">
   <bpmn:documentation>By: The system or Whoever records money (bookkeeper, office manager). From expected to matched. When: a statement credit from the provider settles one or more expected settlements of that provider whole; fees = gross - credit, at or under card_fee_max_pct of the gross. Effect: journal bank (credit) + card_fees (tax code E) / card_clearing (gross), event card_settlement, derived from the statement line id; the fees split pro rata by gross, rounded once.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_card_settlement_expected__if__Task_match_card_settlement</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_match_card_settlement__End_card_settlement_matched</bpmn:outgoing>
  </bpmn:task>
  <bpmn:serviceTask id="Task_flag_card_difference" name="Hold a settlement whose fees are too high" dodil:step="flag_card_difference" implementation="##unspecified">
   <bpmn:documentation>By: The system. From expected to differs. When: the matched credit implies fees above card_fee_max_pct. Effect: listed on the bank reconciliation screen with the fee and the limit.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_card_settlement_expected__if__Task_flag_card_difference</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_flag_card_difference__Task_accept_card_difference</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:userTask id="Task_accept_card_difference" name="Accept the difference with a reason" dodil:step="accept_card_difference" dodil:approval="true">
   <bpmn:documentation>By: Owner / finance manager. From differs to matched. When: the approver is not the cashier who matched it (email AND sub). Requires: reason. Effect: posted as match_card_settlement, the whole difference to card_fees, or to a claim against the provider (purpose card_claim) when the reason is a claim. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_flag_card_difference__Task_accept_card_difference</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_accept_card_difference__End_card_settlement_matched</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_card_settlement_expected__if" name="Card settlement expected: what next?">
   <bpmn:incoming>Flow_Task_expect_card_settlement__Gateway_card_settlement_expected__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_card_settlement_expected__if__Task_match_card_settlement</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_card_settlement_expected__if__Task_flag_card_difference</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_card_settlement_matched" name="Card settlement matched">
   <bpmn:incoming>Flow_Task_match_card_settlement__End_card_settlement_matched</bpmn:incoming>
   <bpmn:incoming>Flow_Task_accept_card_difference__End_card_settlement_matched</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Start_card_settlement__Task_expect_card_settlement" sourceRef="Start_card_settlement" targetRef="Task_expect_card_settlement" />
  <bpmn:sequenceFlow id="Flow_Gateway_card_settlement_expected__if__Task_match_card_settlement" sourceRef="Gateway_card_settlement_expected__if" targetRef="Task_match_card_settlement" />
  <bpmn:sequenceFlow id="Flow_Gateway_card_settlement_expected__if__Task_flag_card_difference" sourceRef="Gateway_card_settlement_expected__if" targetRef="Task_flag_card_difference" />
  <bpmn:sequenceFlow id="Flow_Task_expect_card_settlement__Gateway_card_settlement_expected__if" sourceRef="Task_expect_card_settlement" targetRef="Gateway_card_settlement_expected__if" />
  <bpmn:sequenceFlow id="Flow_Task_match_card_settlement__End_card_settlement_matched" sourceRef="Task_match_card_settlement" targetRef="End_card_settlement_matched" />
  <bpmn:sequenceFlow id="Flow_Task_flag_card_difference__Task_accept_card_difference" sourceRef="Task_flag_card_difference" targetRef="Task_accept_card_difference" />
  <bpmn:sequenceFlow id="Flow_Task_accept_card_difference__End_card_settlement_matched" sourceRef="Task_accept_card_difference" targetRef="End_card_settlement_matched" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_payments_v6">
  <bpmndi:BPMNPlane id="BPMNPlane_payments_v6" bpmnElement="Collaboration_payments_v6">
   <bpmndi:BPMNShape id="Participant_payments_card_settlement_di" bpmnElement="Participant_payments_card_settlement" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="960" height="400" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_card_settlement_system_di" bpmnElement="Lane_card_settlement_system" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="930" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_card_settlement_approver_di" bpmnElement="Lane_card_settlement_approver" isHorizontal="true">
    <dc:Bounds x="30" y="260" width="930" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_card_settlement_di" bpmnElement="Start_card_settlement">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_expect_card_settlement_di" bpmnElement="Task_expect_card_settlement">
    <dc:Bounds x="295" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_match_card_settlement_di" bpmnElement="Task_match_card_settlement">
    <dc:Bounds x="635" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_flag_card_difference_di" bpmnElement="Task_flag_card_difference">
    <dc:Bounds x="635" y="140" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_accept_card_difference_di" bpmnElement="Task_accept_card_difference">
    <dc:Bounds x="805" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_card_settlement_expected__if_di" bpmnElement="Gateway_card_settlement_expected__if">
    <dc:Bounds x="490" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_card_settlement_matched_di" bpmnElement="End_card_settlement_matched">
    <dc:Bounds x="837" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Start_card_settlement__Task_expect_card_settlement_di" bpmnElement="Flow_Start_card_settlement__Task_expect_card_settlement">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="295" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_card_settlement_expected__if__Task_match_card_settlement_di" bpmnElement="Flow_Gateway_card_settlement_expected__if__Task_match_card_settlement">
    <di:waypoint x="540" y="60" />
    <di:waypoint x="635" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_card_settlement_expected__if__Task_flag_card_difference_di" bpmnElement="Flow_Gateway_card_settlement_expected__if__Task_flag_card_difference">
    <di:waypoint x="540" y="60" />
    <di:waypoint x="610" y="60" />
    <di:waypoint x="610" y="180" />
    <di:waypoint x="635" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_expect_card_settlement__Gateway_card_settlement_expected__if_di" bpmnElement="Flow_Task_expect_card_settlement__Gateway_card_settlement_expected__if">
    <di:waypoint x="395" y="60" />
    <di:waypoint x="490" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_match_card_settlement__End_card_settlement_matched_di" bpmnElement="Flow_Task_match_card_settlement__End_card_settlement_matched">
    <di:waypoint x="735" y="60" />
    <di:waypoint x="837" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_flag_card_difference__Task_accept_card_difference_di" bpmnElement="Flow_Task_flag_card_difference__Task_accept_card_difference">
    <di:waypoint x="735" y="180" />
    <di:waypoint x="780" y="180" />
    <di:waypoint x="780" y="320" />
    <di:waypoint x="805" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_accept_card_difference__End_card_settlement_matched_di" bpmnElement="Flow_Task_accept_card_difference__End_card_settlement_matched">
    <di:waypoint x="855" y="360" />
    <di:waypoint x="855" y="375" />
    <di:waypoint x="855" y="375" />
    <di:waypoint x="855" y="78" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>