{
  "version": 1,
  "fictional": true,
  "software": "Sage Intacct",
  "title": "One balanced batch, two documents and a zero-ending account",
  "canonicalPage": "https://levelcfo.com/guides/software-integration/sage-intacct/",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "fields": [
    "This is fictional teaching data in USD, not a Sage export or a customer posting.",
    "signed_amount uses debits positive and credits negative. document_ref and line_id are independent of batch_id.",
    "Entity A opens at zero on the illustrative clearing account 1090. Two lines on that account move 450 in and out; zero ending balance does not mean no movement."
  ],
  "calculation": "All four signed lines sum to zero. Clearing account 1090 also sums to 450 - 450 = 0, but contains two movements. Filtering on only nonzero ending accounts would hide this account's movement. DOC-01 and DOC-02 each have two lines even though they share T-01.",
  "files": [
    {
      "filename": "journal-lines.csv",
      "sha256": "1831b908aa9d85643b52f560b25bfa5f6f1d4125a68d6f6d26f2c6af3a568b2d"
    }
  ],
  "checks": [
    {
      "id": "batch_net",
      "operation": "sum",
      "expected": 0,
      "file": "journal-lines.csv",
      "field": "signed_amount"
    },
    {
      "id": "clearing_net",
      "operation": "sum",
      "expected": 0,
      "file": "journal-lines.csv",
      "field": "signed_amount",
      "filter": {
        "field": "account",
        "equals": "1090"
      }
    },
    {
      "id": "clearing_rows",
      "operation": "count",
      "expected": 2,
      "file": "journal-lines.csv",
      "field": "line_id",
      "filter": {
        "field": "account",
        "equals": "1090"
      }
    },
    {
      "id": "document_one_rows",
      "operation": "count",
      "expected": 2,
      "file": "journal-lines.csv",
      "field": "line_id",
      "filter": {
        "field": "document_ref",
        "equals": "DOC-01"
      }
    },
    {
      "id": "document_two_rows",
      "operation": "count",
      "expected": 2,
      "file": "journal-lines.csv",
      "field": "line_id",
      "filter": {
        "field": "document_ref",
        "equals": "DOC-02"
      }
    }
  ],
  "expectedResults": [
    {
      "label": "Batch net",
      "value": 0,
      "unit": "USD",
      "meaning": "Arithmetic balance only.",
      "checkId": "batch_net"
    },
    {
      "label": "Clearing account net",
      "value": 0,
      "unit": "USD",
      "meaning": "No ending balance change.",
      "checkId": "clearing_net"
    },
    {
      "label": "Clearing account movements",
      "value": 2,
      "unit": "rows",
      "meaning": "Two nonzero movements remain relevant.",
      "checkId": "clearing_rows"
    },
    {
      "label": "DOC-01 lines",
      "value": 2,
      "unit": "rows",
      "meaning": "Retain both signed lines.",
      "checkId": "document_one_rows"
    },
    {
      "label": "DOC-02 lines",
      "value": 2,
      "unit": "rows",
      "meaning": "A separate economic document in the same batch.",
      "checkId": "document_two_rows"
    }
  ],
  "nextDecision": "Use the two document references and four line identities for review. Balanced arithmetic does not establish business purpose, correct classification, posting success or a complete close."
}
