<mxfile host="Electron" version="29.6.6" type="device">
  <diagram id="cash-allocation" name="Received cash and invoice allocation">
    <mxGraphModel grid="1" gridSize="10" page="0" pageWidth="1160" pageHeight="1000" background="#FFFFFF">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <object id="title" label="Received cash and invoice allocation">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=28;fontStyle=1;" vertex="1" parent="1">
            <mxGeometry x="25" y="15" width="1110" height="70" as="geometry" />
          </mxCell>
        </object>
        <object id="subtitle" label="Why can received cash and an open invoice coexist?">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=18;fontStyle=0;" vertex="1" parent="1">
            <mxGeometry x="25" y="87" width="1110" height="55" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceipt" label="CashReceipt" tableName="CashReceipt" primaryHome="true">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;swimlane;horizontal=1;startSize=42;collapsible=0;align=center;verticalAlign=top;fontSize=20;fontStyle=1;fillColor=#e9f1ed;swimlaneFillColor=#FFFFFF;" vertex="1" parent="1">
            <mxGeometry x="25" y="170" width="330" height="214.0" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceipt__grain" label="One incoming customer cash event" rowMeaning="true">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceipt">
            <mxGeometry x="0" y="42.0" width="330" height="52" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceipt__CashReceiptID" label="CashReceiptID (PK)" fieldName="CashReceiptID">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceipt">
            <mxGeometry x="0" y="94.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceipt__CustomerID" label="CustomerID (FK)" fieldName="CustomerID">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceipt">
            <mxGeometry x="0" y="124.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceipt__ReceiptDate" label="ReceiptDate" fieldName="ReceiptDate">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceipt">
            <mxGeometry x="0" y="154.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceipt__Amount" label="Amount" fieldName="Amount">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceipt">
            <mxGeometry x="0" y="184.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceiptApplication" label="CashReceiptApplication" tableName="CashReceiptApplication" primaryHome="true">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;swimlane;horizontal=1;startSize=42;collapsible=0;align=center;verticalAlign=top;fontSize=20;fontStyle=1;fillColor=#e9f1ed;swimlaneFillColor=#FFFFFF;" vertex="1" parent="1">
            <mxGeometry x="410" y="170" width="330" height="244.0" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceiptApplication__grain" label="One dated receipt allocation to an&#10;invoice" rowMeaning="true">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceiptApplication">
            <mxGeometry x="0" y="42.0" width="330" height="52" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceiptApplication__CashReceiptApplicationID" label="CashReceiptApplicationID (PK)" fieldName="CashReceiptApplicationID">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceiptApplication">
            <mxGeometry x="0" y="94.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceiptApplication__CashReceiptID" label="CashReceiptID (FK)" fieldName="CashReceiptID">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceiptApplication">
            <mxGeometry x="0" y="124.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceiptApplication__SalesInvoiceID" label="SalesInvoiceID (FK)" fieldName="SalesInvoiceID">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceiptApplication">
            <mxGeometry x="0" y="154.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceiptApplication__ApplicationDate" label="ApplicationDate" fieldName="ApplicationDate">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceiptApplication">
            <mxGeometry x="0" y="184.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="CashReceiptApplication__AppliedAmount" label="AppliedAmount" fieldName="AppliedAmount">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="CashReceiptApplication">
            <mxGeometry x="0" y="214.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="SalesInvoice" label="SalesInvoice&#10;Shared reference" tableName="SalesInvoice" primaryHome="false">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;swimlane;horizontal=1;startSize=65;collapsible=0;align=center;verticalAlign=top;fontSize=20;fontStyle=1;fillColor=#f0f1f3;swimlaneFillColor=#FFFFFF;" vertex="1" parent="1">
            <mxGeometry x="795" y="170" width="330" height="207.0" as="geometry" />
          </mxCell>
        </object>
        <object id="SalesInvoice__grain" label="One customer invoice header" rowMeaning="true">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="SalesInvoice">
            <mxGeometry x="0" y="65.0" width="330" height="52" as="geometry" />
          </mxCell>
        </object>
        <object id="SalesInvoice__SalesInvoiceID" label="SalesInvoiceID (PK)" fieldName="SalesInvoiceID">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="SalesInvoice">
            <mxGeometry x="0" y="117.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="SalesInvoice__CustomerID" label="CustomerID (FK)" fieldName="CustomerID">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="SalesInvoice">
            <mxGeometry x="0" y="147.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="SalesInvoice__InvoiceDate" label="InvoiceDate" fieldName="InvoiceDate">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=12;spacingRight=8;overflow=hidden;rotatable=0;fontSize=18;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="SalesInvoice">
            <mxGeometry x="0" y="177.0" width="330" height="30" as="geometry" />
          </mxCell>
        </object>
        <object id="r1" label="r1" relationKind="reference" childTable="CashReceiptApplication" childFields="CashReceiptID" parentTable="CashReceipt" parentFields="CashReceiptID" condition="">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;edgeStyle=orthogonalEdgeStyle;rounded=0;fillColor=none;fontSize=17;labelBackgroundColor=#FFFFFF;startArrow=ERmandOne;endArrow=ERzeroToMany;endFill=1;dashed=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" parent="1" source="CashReceipt__CashReceiptID" target="CashReceiptApplication__CashReceiptID">
            <mxGeometry relative="1" as="geometry">
              <Array as="points">
                <mxPoint x="379.0" y="279.0" />
                <mxPoint x="379.0" y="309.0" />
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="r2" label="r2" relationKind="reference" childTable="CashReceiptApplication" childFields="SalesInvoiceID" parentTable="SalesInvoice" parentFields="SalesInvoiceID" condition="">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;edgeStyle=orthogonalEdgeStyle;rounded=0;fillColor=none;fontSize=17;labelBackgroundColor=#FFFFFF;startArrow=ERmandOne;endArrow=ERzeroToMany;endFill=1;dashed=0;exitX=0;exitY=0.5;entryX=1;entryY=0.5;" edge="1" parent="1" source="SalesInvoice__SalesInvoiceID" target="CashReceiptApplication__SalesInvoiceID">
            <mxGeometry relative="1" as="geometry">
              <Array as="points">
                <mxPoint x="771.0" y="302.0" />
                <mxPoint x="771.0" y="339.0" />
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="footer" label="(PK) = primary key. (FK) = foreign key.&#10;Solid crow’s-foot lines show foreign-key relationships; dashed labeled lines show conditional traces or analytical matches. See r1, r2… in the relationship table.">
          <mxCell style="html=0;fontFamily=Arial;fontSize=20;fontColor=#17333e;strokeColor=#196252;strokeWidth=1.5;whiteSpace=wrap;text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=17;fontStyle=0;" vertex="1" parent="1">
            <mxGeometry x="25" y="446.0" width="1110" height="60" as="geometry" />
          </mxCell>
        </object>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
