{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowtly-fr/json-schema/flowtly-fr-invoice-jsonld-invoice-read-invoice-row-read-invoice-transaction-read-transaction-read-storage-read-invoice-contract-clauses-invoice-manual-send-invoice-status-history-invoice-work-time-reports-invoice-amount-due-schema.json",
  "title": "Invoice.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flowtly-fr-openapi.yml#/components/schemas/Invoice.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due",
  "type": "object",
  "deprecated": false,
  "properties": {
    "@context": {
      "readOnly": true,
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "properties": {
            "@vocab": {
              "type": "string"
            },
            "hydra": {
              "type": "string",
              "enum": [
                "http://www.w3.org/ns/hydra/core#"
              ]
            }
          },
          "required": [
            "@vocab",
            "hydra"
          ],
          "additionalProperties": true
        }
      ]
    },
    "@id": {
      "readOnly": true,
      "type": "string"
    },
    "@type": {
      "readOnly": true,
      "type": "string"
    },
    "id": {
      "readOnly": true,
      "type": "integer"
    },
    "name": {
      "maxLength": 32,
      "type": "string"
    },
    "type": {
      "maxLength": 32,
      "enum": [
        "invoice",
        "correction",
        "advance"
      ],
      "default": "invoice",
      "type": "string"
    },
    "parent": {
      "anyOf": [
        {
          "$ref": "#/$defs/Invoice.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
        },
        {
          "type": "null"
        }
      ]
    },
    "childrenInvoices": {
      "readOnly": true,
      "type": "array",
      "items": {
        "$ref": "#/$defs/Invoice.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
      }
    },
    "client": {
      "type": "string",
      "format": "iri-reference"
    },
    "contract": {
      "description": "The revenue-side contract (Contract.direction='in') this issued\ninvoice settles against. Nullable — pre-existing invoices have no\nlink, and ad-hoc invoices outside any contract stay unlinked. SET\nNULL on contract delete so we don't cascade-delete invoice history\nwith the contract.",
      "type": [
        "string",
        "null"
      ],
      "format": "iri-reference"
    },
    "paymentScheduleLine": {
      "description": "The contract payment-schedule line this invoice was created from. One\nInvoice per PaymentScheduleLine — enforced by a unique index at the DB\nlayer to make the \"Create invoice\" button idempotent. ON DELETE SET NULL\nso an invoice survives schedule-line deletion (the user may delete a\nplanned line after issuing the invoice; we should NOT cascade-delete\nissued invoices).",
      "type": [
        "string",
        "null"
      ],
      "format": "iri-reference"
    },
    "tinType": {
      "enum": [
        "missing",
        "nip",
        "pesel",
        "private"
      ],
      "default": "missing",
      "type": "string"
    },
    "tinCountry": {
      "maxLength": 2,
      "type": [
        "string",
        "null"
      ]
    },
    "tin": {
      "maxLength": 32,
      "type": [
        "string",
        "null"
      ]
    },
    "bankAccount": {
      "type": "string",
      "format": "iri-reference"
    },
    "amountNet": {
      "type": "number"
    },
    "amount": {
      "type": "number"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ],
      "format": "iri-reference"
    },
    "conversionRate": {
      "type": [
        "number",
        "null"
      ]
    },
    "generatedPdfExternalId": {
      "type": [
        "string",
        "null"
      ]
    },
    "issueDate": {
      "type": "string",
      "format": "date-time"
    },
    "saleDate": {
      "type": "string",
      "format": "date-time"
    },
    "dueDate": {
      "type": "string",
      "format": "date-time"
    },
    "targetAmount": {
      "type": [
        "number",
        "null"
      ]
    },
    "paymentMethod": {
      "default": "Bank wire",
      "type": "string"
    },
    "paidInAdvance": {
      "type": "boolean"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "correctionReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "typKorekty": {
      "enum": [
        "1",
        "2",
        "3"
      ],
      "description": "KSeF TypKorekty chosen when the correction is built (#9704); see EInvoicingInvoicePayloadBuilder::resolveTypKorekty().",
      "type": [
        "string",
        "null"
      ]
    },
    "invoiceRows": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InvoiceRow.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
      }
    },
    "eInvoicing": {
      "anyOf": [
        {
          "$ref": "#/$defs/InvoiceEInvoicing.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
        },
        {
          "type": "null"
        }
      ]
    },
    "invoiceTransactions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InvoiceTransaction.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
      }
    },
    "internalComment": {
      "type": "string"
    },
    "collectionsExcludedAt": {
      "readOnly": true,
      "description": "When this invoice was taken out of the collections population, or null.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "collectionsExcludedReason": {
      "readOnly": true,
      "description": "Why, verbatim, with no default. Required whenever the timestamp is set —\nenforced by {@see self::excludeFromCollections()} being the only way to\nset either, rather than by a NOT NULL on a live table.",
      "type": [
        "string",
        "null"
      ]
    },
    "conversionRateTable": {
      "readOnly": true,
      "type": [
        "string",
        "null"
      ]
    },
    "conversionRateDate": {
      "readOnly": true,
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "eInvoicingPlannedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "accountantDocumentNumber": {
      "description": "Accountant's reconciliation: the journal or register reference the accountant booked this document under, e.g. 00023/FS/26.",
      "type": [
        "string",
        "null"
      ]
    },
    "bookedAt": {
      "description": "Accountant's reconciliation: the posting date in the accountant's books.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "vatPeriod": {
      "description": "Accountant's reconciliation: the month whose JPK_V7M carries this document, YYYY-MM. Null when the document is outside VAT or not booked yet. Cannot be after the current month. The closed VAT periods run from the earliest to the latest month any document carries.",
      "type": [
        "string",
        "null"
      ]
    },
    "citPeriod": {
      "description": "Accountant's reconciliation: the month (YYYY-MM) or quarter (YYYY-Qn) the revenue or cost was recognised in for CIT.",
      "type": [
        "string",
        "null"
      ]
    },
    "bookedNetPln": {
      "description": "Accountant's reconciliation: the net amount as booked, in PLN, as a decimal string such as \"1234.56\" (not a JSON number).",
      "type": [
        "string",
        "null"
      ]
    },
    "bookedVatPln": {
      "description": "Accountant's reconciliation: the VAT amount as booked, in PLN, as a decimal string such as \"283.95\" (not a JSON number).",
      "type": [
        "string",
        "null"
      ]
    },
    "bookedGrossPln": {
      "description": "Accountant's reconciliation: the gross amount as booked, in PLN, as a decimal string such as \"1518.51\" (not a JSON number).",
      "type": [
        "string",
        "null"
      ]
    },
    "reconciliationStatus": {
      "description": "Accountant's reconciliation: unbooked, booked, mismatch or excluded. A document nobody reconciled reads unbooked. An unbooked document dated in a closed VAT period is reported as the problem_unreconciled entry of detectedProblems.",
      "type": [
        "string",
        "null"
      ]
    },
    "reconciledAt": {
      "description": "Accountant's reconciliation: when the document was last reconciled against the accountant's books.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "reconciliationNote": {
      "description": "Accountant's reconciliation: a free-text note, e.g. what a mismatch is.",
      "type": [
        "string",
        "null"
      ]
    },
    "contractInvoicingClauses": {
      "readOnly": true,
      "description": "The linked contract's invoicing clauses, read from master's\n`ContractClause` model (`Contract::getClauses()`) at read time - never\ncopied onto the invoice, so a later edit to a clause is reflected on\nthe next read (spec D2). `[]` with no contract.",
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    "targetAmountNet": {
      "readOnly": true,
      "description": "Null when no stored rate prices it; see IncomeFxParityClassifier::netInOrgCurrency() (#4279).",
      "type": [
        "number",
        "null"
      ]
    },
    "correctedAmount": {
      "readOnly": true,
      "description": "The gross amount still claimed by this invoice AFTER any correcting\ninvoices (faktury korygujące) — what a collections view may state the\nclient owes, rather than what the document said before it was corrected.",
      "type": [
        "number",
        "null"
      ]
    },
    "amountDue": {
      "readOnly": true,
      "description": "What the client still owes on this invoice: the corrected gross MINUS any\nset-off (kompensata) declared against it (#5496) MINUS what has been paid\nagainst it (#5497).",
      "type": [
        "number",
        "null"
      ]
    },
    "amountSetOff": {
      "readOnly": true,
      "description": "The receivable side of every EFFECTIVE declaration naming this invoice.",
      "type": "number"
    },
    "status": {
      "readOnly": true,
      "type": "string"
    }
  },
  "required": [
    "name",
    "type",
    "client",
    "tinType",
    "bankAccount",
    "amount",
    "issueDate",
    "saleDate",
    "dueDate"
  ],
  "$defs": {
    "Counterparty.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "@context": {
          "readOnly": true,
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "@vocab": {
                  "type": "string"
                },
                "hydra": {
                  "type": "string",
                  "enum": [
                    "http://www.w3.org/ns/hydra/core#"
                  ]
                }
              },
              "required": [
                "@vocab",
                "hydra"
              ],
              "additionalProperties": true
            }
          ]
        },
        "@id": {
          "readOnly": true,
          "type": "string"
        },
        "@type": {
          "readOnly": true,
          "type": "string"
        },
        "id": {
          "readOnly": true,
          "type": "integer"
        },
        "type": {
          "enum": [
            "supplier",
            "client",
            "both",
            "other"
          ],
          "default": "other",
          "type": "string"
        },
        "requireAttachment": {
          "default": true,
          "type": "boolean"
        },
        "cyclic": {
          "type": "boolean"
        },
        "budgetNeutral": {
          "description": "Marks a counterparty whose transactions are not expected to be filed to a budget: the missing-budget problem is not raised on them and the counterparty's defaultBudget is not suggested. In a global budget its inflows are not counted as income (an internal transfer is not revenue), unless they pay an invoice the budget holds. Its outflows still count as costs - an outgoing transaction linked to a budget (directly, or via a project or contractor the budget includes) still counts there. To keep a cost out of a project/budget, remove its project link (ProjectTransaction) instead.",
          "type": "boolean"
        },
        "logoUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "corporateWebsiteUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "costGroupIcon": {
          "readOnly": true,
          "type": [
            "string",
            "null"
          ]
        },
        "displayName": {
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "type"
      ]
    },
    "EmployeeTransaction.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "required": [
        "employee"
      ],
      "properties": {
        "@context": {
          "readOnly": true,
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "@vocab": {
                  "type": "string"
                },
                "hydra": {
                  "type": "string",
                  "enum": [
                    "http://www.w3.org/ns/hydra/core#"
                  ]
                }
              },
              "required": [
                "@vocab",
                "hydra"
              ],
              "additionalProperties": true
            }
          ]
        },
        "@id": {
          "readOnly": true,
          "type": "string"
        },
        "@type": {
          "readOnly": true,
          "type": "string"
        },
        "employee": {
          "type": "string",
          "format": "iri-reference"
        },
        "amount": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "Invoice.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "@context": {
          "readOnly": true,
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "@vocab": {
                  "type": "string"
                },
                "hydra": {
                  "type": "string",
                  "enum": [
                    "http://www.w3.org/ns/hydra/core#"
                  ]
                }
              },
              "required": [
                "@vocab",
                "hydra"
              ],
              "additionalProperties": true
            }
          ]
        },
        "@id": {
          "readOnly": true,
          "type": "string"
        },
        "@type": {
          "readOnly": true,
          "type": "string"
        },
        "id": {
          "readOnly": true,
          "type": "integer"
        },
        "name": {
          "maxLength": 32,
          "type": "string"
        },
        "type": {
          "maxLength": 32,
          "enum": [
            "invoice",
            "correction",
            "advance"
          ],
          "default": "invoice",
          "type": "string"
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/Invoice.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
            },
            {
              "type": "null"
            }
          ]
        },
        "childrenInvoices": {
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "#/$defs/Invoice.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
          }
        },
        "client": {
          "type": "string",
          "format": "iri-reference"
        },
        "contract": {
          "description": "The revenue-side contract (Contract.direction='in') this issued\ninvoice settles against. Nullable — pre-existing invoices have no\nlink, and ad-hoc invoices outside any contract stay unlinked. SET\nNULL on contract delete so we don't cascade-delete invoice history\nwith the contract.",
          "type": [
            "string",
            "null"
          ],
          "format": "iri-reference"
        },
        "paymentScheduleLine": {
          "description": "The contract payment-schedule line this invoice was created from. One\nInvoice per PaymentScheduleLine — enforced by a unique index at the DB\nlayer to make the \"Create invoice\" button idempotent. ON DELETE SET NULL\nso an invoice survives schedule-line deletion (the user may delete a\nplanned line after issuing the invoice; we should NOT cascade-delete\nissued invoices).",
          "type": [
            "string",
            "null"
          ],
          "format": "iri-reference"
        },
        "tinType": {
          "enum": [
            "missing",
            "nip",
            "pesel",
            "private"
          ],
          "default": "missing",
          "type": "string"
        },
        "tinCountry": {
          "maxLength": 2,
          "type": [
            "string",
            "null"
          ]
        },
        "tin": {
          "maxLength": 32,
          "type": [
            "string",
            "null"
          ]
        },
        "bankAccount": {
          "type": "string",
          "format": "iri-reference"
        },
        "amountNet": {
          "type": "number"
        },
        "amount": {
          "type": "number"
        },
        "currency": {
          "type": [
            "string",
            "null"
          ],
          "format": "iri-reference"
        },
        "conversionRate": {
          "type": [
            "number",
            "null"
          ]
        },
        "generatedPdfExternalId": {
          "type": [
            "string",
            "null"
          ]
        },
        "issueDate": {
          "type": "string",
          "format": "date-time"
        },
        "saleDate": {
          "type": "string",
          "format": "date-time"
        },
        "dueDate": {
          "type": "string",
          "format": "date-time"
        },
        "targetAmount": {
          "type": [
            "number",
            "null"
          ]
        },
        "paymentMethod": {
          "default": "Bank wire",
          "type": "string"
        },
        "paidInAdvance": {
          "type": "boolean"
        },
        "notes": {
          "type": [
            "string",
            "null"
          ]
        },
        "correctionReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "typKorekty": {
          "enum": [
            "1",
            "2",
            "3"
          ],
          "description": "KSeF TypKorekty chosen when the correction is built (#9704); see EInvoicingInvoicePayloadBuilder::resolveTypKorekty().",
          "type": [
            "string",
            "null"
          ]
        },
        "invoiceRows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceRow.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
          }
        },
        "eInvoicing": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceEInvoicing.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
            },
            {
              "type": "null"
            }
          ]
        },
        "invoiceTransactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceTransaction.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
          }
        },
        "internalComment": {
          "type": "string"
        },
        "collectionsExcludedAt": {
          "readOnly": true,
          "description": "When this invoice was taken out of the collections population, or null.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "collectionsExcludedReason": {
          "readOnly": true,
          "description": "Why, verbatim, with no default. Required whenever the timestamp is set —\nenforced by {@see self::excludeFromCollections()} being the only way to\nset either, rather than by a NOT NULL on a live table.",
          "type": [
            "string",
            "null"
          ]
        },
        "conversionRateTable": {
          "readOnly": true,
          "type": [
            "string",
            "null"
          ]
        },
        "conversionRateDate": {
          "readOnly": true,
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "eInvoicingPlannedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "accountantDocumentNumber": {
          "description": "Accountant's reconciliation: the journal or register reference the accountant booked this document under, e.g. 00023/FS/26.",
          "type": [
            "string",
            "null"
          ]
        },
        "bookedAt": {
          "description": "Accountant's reconciliation: the posting date in the accountant's books.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "vatPeriod": {
          "description": "Accountant's reconciliation: the month whose JPK_V7M carries this document, YYYY-MM. Null when the document is outside VAT or not booked yet. Cannot be after the current month. The closed VAT periods run from the earliest to the latest month any document carries.",
          "type": [
            "string",
            "null"
          ]
        },
        "citPeriod": {
          "description": "Accountant's reconciliation: the month (YYYY-MM) or quarter (YYYY-Qn) the revenue or cost was recognised in for CIT.",
          "type": [
            "string",
            "null"
          ]
        },
        "bookedNetPln": {
          "description": "Accountant's reconciliation: the net amount as booked, in PLN, as a decimal string such as \"1234.56\" (not a JSON number).",
          "type": [
            "string",
            "null"
          ]
        },
        "bookedVatPln": {
          "description": "Accountant's reconciliation: the VAT amount as booked, in PLN, as a decimal string such as \"283.95\" (not a JSON number).",
          "type": [
            "string",
            "null"
          ]
        },
        "bookedGrossPln": {
          "description": "Accountant's reconciliation: the gross amount as booked, in PLN, as a decimal string such as \"1518.51\" (not a JSON number).",
          "type": [
            "string",
            "null"
          ]
        },
        "reconciliationStatus": {
          "description": "Accountant's reconciliation: unbooked, booked, mismatch or excluded. A document nobody reconciled reads unbooked. An unbooked document dated in a closed VAT period is reported as the problem_unreconciled entry of detectedProblems.",
          "type": [
            "string",
            "null"
          ]
        },
        "reconciledAt": {
          "description": "Accountant's reconciliation: when the document was last reconciled against the accountant's books.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "reconciliationNote": {
          "description": "Accountant's reconciliation: a free-text note, e.g. what a mismatch is.",
          "type": [
            "string",
            "null"
          ]
        },
        "contractInvoicingClauses": {
          "readOnly": true,
          "description": "The linked contract's invoicing clauses, read from master's\n`ContractClause` model (`Contract::getClauses()`) at read time - never\ncopied onto the invoice, so a later edit to a clause is reflected on\nthe next read (spec D2). `[]` with no contract.",
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "targetAmountNet": {
          "readOnly": true,
          "description": "Null when no stored rate prices it; see IncomeFxParityClassifier::netInOrgCurrency() (#4279).",
          "type": [
            "number",
            "null"
          ]
        },
        "correctedAmount": {
          "readOnly": true,
          "description": "The gross amount still claimed by this invoice AFTER any correcting\ninvoices (faktury korygujące) — what a collections view may state the\nclient owes, rather than what the document said before it was corrected.",
          "type": [
            "number",
            "null"
          ]
        },
        "amountDue": {
          "readOnly": true,
          "description": "What the client still owes on this invoice: the corrected gross MINUS any\nset-off (kompensata) declared against it (#5496) MINUS what has been paid\nagainst it (#5497).",
          "type": [
            "number",
            "null"
          ]
        },
        "amountSetOff": {
          "readOnly": true,
          "description": "The receivable side of every EFFECTIVE declaration naming this invoice.",
          "type": "number"
        },
        "status": {
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "name",
        "type",
        "client",
        "tinType",
        "bankAccount",
        "amount",
        "issueDate",
        "saleDate",
        "dueDate"
      ]
    },
    "InvoiceEInvoicing.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "@context": {
          "readOnly": true,
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "@vocab": {
                  "type": "string"
                },
                "hydra": {
                  "type": "string",
                  "enum": [
                    "http://www.w3.org/ns/hydra/core#"
                  ]
                }
              },
              "required": [
                "@vocab",
                "hydra"
              ],
              "additionalProperties": true
            }
          ]
        },
        "@id": {
          "readOnly": true,
          "type": "string"
        },
        "@type": {
          "readOnly": true,
          "type": "string"
        },
        "id": {
          "readOnly": true,
          "type": "integer"
        },
        "provider": {
          "default": "ksef",
          "type": "string"
        },
        "status": {
          "default": "QUEUED",
          "type": "string"
        },
        "referenceNumber": {
          "type": [
            "string",
            "null"
          ]
        },
        "documentId": {
          "type": [
            "string",
            "null"
          ]
        },
        "acquisitionTimestamp": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "upoUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "verificationLink": {
          "type": [
            "string",
            "null"
          ]
        },
        "rejectionReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "providerPayload": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "einvoicingNumber": {
          "readOnly": true,
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "InvoiceRow.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "@context": {
          "readOnly": true,
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "@vocab": {
                  "type": "string"
                },
                "hydra": {
                  "type": "string",
                  "enum": [
                    "http://www.w3.org/ns/hydra/core#"
                  ]
                }
              },
              "required": [
                "@vocab",
                "hydra"
              ],
              "additionalProperties": true
            }
          ]
        },
        "@id": {
          "readOnly": true,
          "type": "string"
        },
        "@type": {
          "readOnly": true,
          "type": "string"
        },
        "id": {
          "description": "The row to update. Send it to patch this row IN PLACE; omit it and the invoice replaces its whole row set, which orphans anything keyed to a row id (tags, per-row project allocations). Required by the e-invoicing hatch, which admits only {id, project} per row on an accepted invoice.",
          "type": "integer"
        },
        "classificationNumber": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ]
        },
        "unit": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ]
        },
        "quantity": {
          "type": "number"
        },
        "vatRate": {
          "maxLength": 5,
          "type": "string"
        },
        "netPrice": {
          "default": "0.0",
          "type": "string"
        },
        "netDiscountAmount": {
          "default": "0.0",
          "type": [
            "string",
            "null"
          ]
        },
        "productName": {
          "maxLength": 512,
          "type": "string"
        },
        "project": {
          "type": [
            "string",
            "null"
          ],
          "format": "iri-reference"
        },
        "projectAllocations": {
          "description": "How this row's money is split across projects for BUDGETING, when one\nproject is not the whole answer (#6610).",
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceRowProjectAllocation.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
          }
        },
        "parentInvoiceRow": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceRow.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
            },
            {
              "type": "null"
            }
          ]
        },
        "invoiceChildrenRows": {
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceRow.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
          }
        },
        "product": {
          "description": "The catalog product this row sold, when it sold one. NULL on every row that exists today\nand on every row written by a non-POS screen — and a NULL product means this row moves no\nstock at all, which is exactly today's behaviour.",
          "type": [
            "string",
            "null"
          ],
          "format": "iri-reference"
        },
        "periodFrom": {
          "description": "The days this row bills for, both inclusive (#7537). The draft builder computes them per\nrow and, until this, threw them away, so nothing could answer \"has this booking's coverage\nalready been invoiced?\". NULL on every row written before this and on any row a client\nposts without them: absence means \"not recorded\", never \"covers nothing\".",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "periodTo": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "propertyBooking": {
          "description": "The booking this row was derived from, when it was derived from exactly one (#7537). A row\npooled from several assets has none: naming one of them would be a guess.",
          "type": [
            "string",
            "null"
          ],
          "format": "iri-reference"
        },
        "priceBasis": {
          "enum": [
            "net",
            "gross"
          ],
          "default": "net",
          "type": "string"
        },
        "grossPrice": {
          "description": "The tax-INCLUSIVE unit price — the number on the price tag. Set only on a 'gross' row,\nwhere it is the authority; NULL on every 'net' row.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "unit",
        "quantity",
        "vatRate",
        "netPrice",
        "productName"
      ]
    },
    "InvoiceRowProjectAllocation.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "@context": {
          "readOnly": true,
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "@vocab": {
                  "type": "string"
                },
                "hydra": {
                  "type": "string",
                  "enum": [
                    "http://www.w3.org/ns/hydra/core#"
                  ]
                }
              },
              "required": [
                "@vocab",
                "hydra"
              ],
              "additionalProperties": true
            }
          ]
        },
        "@id": {
          "readOnly": true,
          "type": "string"
        },
        "@type": {
          "readOnly": true,
          "type": "string"
        },
        "id": {
          "readOnly": true,
          "type": "integer"
        },
        "project": {
          "description": "`ON DELETE RESTRICT`, matching {@see \\App\\Entity\\Project\\ProjectTransactionAttachment}:\nan allocation is a financial attribution, so a project holding one is not\nsilently deletable. `DeleteGuard` derives its relation set from Doctrine\nmetadata (#3285), so this mapping is what makes the API refuse with the\nrelation named instead of letting the driver raise a constraint error.",
          "type": "string",
          "format": "iri-reference"
        },
        "share": {
          "pattern": "^(.*\\A\\d+(?:\\.\\d{1,8})?\\z.*)$",
          "description": "The fraction of the row this project carries, `(0, 1]`.",
          "type": "string"
        }
      },
      "required": [
        "project",
        "share"
      ]
    },
    "InvoiceTransaction.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "@context": {
          "readOnly": true,
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "@vocab": {
                  "type": "string"
                },
                "hydra": {
                  "type": "string",
                  "enum": [
                    "http://www.w3.org/ns/hydra/core#"
                  ]
                }
              },
              "required": [
                "@vocab",
                "hydra"
              ],
              "additionalProperties": true
            }
          ]
        },
        "@id": {
          "readOnly": true,
          "type": "string"
        },
        "@type": {
          "readOnly": true,
          "type": "string"
        },
        "id": {
          "readOnly": true,
          "type": "integer"
        },
        "invoice": {
          "$ref": "#/$defs/Invoice.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
        },
        "transaction": {
          "anyOf": [
            {
              "$ref": "#/$defs/Transaction.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
            },
            {
              "type": "null"
            }
          ]
        },
        "amount": {
          "description": "MINOR units (grosze/cents) — 2 606,74 is 260674, NOT 2606.74. This differs from every neighbouring money field on this API: Invoice.amount, Invoice.amountNet and Transaction.amount are all MAJOR units, so a caller copying a transaction amount straight into this field stores 100x too little and the invoice renders as 1% paid.",
          "type": "number"
        },
        "date": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "invoice",
        "date"
      ]
    },
    "Transaction.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "@context": {
          "readOnly": true,
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "@vocab": {
                  "type": "string"
                },
                "hydra": {
                  "type": "string",
                  "enum": [
                    "http://www.w3.org/ns/hydra/core#"
                  ]
                }
              },
              "required": [
                "@vocab",
                "hydra"
              ],
              "additionalProperties": true
            }
          ]
        },
        "@id": {
          "readOnly": true,
          "type": "string"
        },
        "@type": {
          "readOnly": true,
          "type": "string"
        },
        "id": {
          "readOnly": true,
          "type": "string"
        },
        "bankAccount": {
          "type": "string",
          "format": "iri-reference"
        },
        "employeeOwner": {
          "type": [
            "string",
            "null"
          ],
          "format": "iri-reference"
        },
        "cost": {
          "type": [
            "string",
            "null"
          ],
          "format": "iri-reference"
        },
        "counterparty": {
          "anyOf": [
            {
              "$ref": "#/$defs/Counterparty.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
            },
            {
              "type": "null"
            }
          ]
        },
        "counterpartyRole": {
          "type": [
            "string",
            "null"
          ]
        },
        "statementNumber": {
          "type": "integer"
        },
        "operationNumber": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "endingBalance": {
          "type": "number"
        },
        "orderDate": {
          "type": "string",
          "format": "date-time"
        },
        "execDate": {
          "type": "string",
          "format": "date-time"
        },
        "relatedDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "ignored": {
          "minimum": 0,
          "maximum": 1,
          "type": "integer"
        },
        "noInvoiceExpected": {
          "description": "\"Closed, keep the cost\" (#10804): a real cost whose invoice will never arrive,\nsuch as a train ticket. Unlike `ignored` (not a cost at all), the payment stays\nin the cost charts, the company summary and exports. It counts as documented:\nTransactionProblemDetector drops its missing-justification problem (its budget\nproblem stays), and TransactionCategorizationGate lets it go on a project. Same\nwrite path and permission as `ignored`.",
          "type": "boolean"
        },
        "prepayment": {
          "description": "\"Prepayment, the invoice will come\" (#11126): the third answer on a payment with\nno document, beside `ignored` and `noInvoiceExpected`. While it is set and the\npayment is at most PREPAYMENT_WINDOW_DAYS days old, TransactionProblemDetector\ndrops the missing-justification problem (the budget problem stays); after that\nit reports `problem_prepayment_without_invoice`. Linking any cost document clears\nit (see clearPrepaymentOnDocumentMatch()). Same write path and permission as\n`ignored`. TransactionCategorizationGate does not read it.",
          "type": "boolean"
        },
        "note": {
          "maxLength": 255,
          "type": [
            "string",
            "null"
          ]
        },
        "linkAllocations": {
          "readOnly": true,
          "description": "The explicit amount this transaction pays toward each linked document (#9407, owner\ndecision 2026-11-19, option 1): minor units of THIS transaction's currency, keyed by\nthe document's id, whichever link table holds the link. A document absent from the\nmap has no amount and shares what is left pro rata (#6129); 0 is an amount, the\ntransfer held as credit with the supplier. NULL when no link carries an amount.",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "integer"
          }
        },
        "transactionAttachments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TransactionAttachment.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
          }
        },
        "additionalAttachments": {
          "readOnly": true,
          "description": "Inverse of TransactionAttachment.additionalTransactions: invoice documents\nthis transaction is linked to as an ADDITIONAL payment (one invoice paid\nacross several payments). Lets the transaction recognize the link for\ncompleteness, same as a primary attachment.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/TransactionAttachment.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
          }
        },
        "budgetTransactions": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "iri-reference"
          }
        },
        "projectTransactions": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "iri-reference"
          }
        },
        "employeeTransactions": {
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmployeeTransaction.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due"
          }
        },
        "matchingDescription": {
          "readOnly": true,
          "description": "The description without the bank's noise, for linking and matching (#7838).",
          "type": "string"
        },
        "supplierCreditMinor": {
          "readOnly": true,
          "description": "What is still free on this transfer as supplier credit, in minor units; null when it cannot hold credit.",
          "type": [
            "integer",
            "null"
          ]
        },
        "refundOfId": {
          "readOnly": true,
          "description": "On a refund line: the id of the charge it gives back (#9523).",
          "type": [
            "string",
            "null"
          ]
        },
        "refundedById": {
          "readOnly": true,
          "description": "On a charge line: the id of the refund that gave it back (#9523).",
          "type": [
            "string",
            "null"
          ]
        },
        "connectedMonth": {
          "readOnly": true,
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "ignored"
      ]
    },
    "TransactionAttachment.jsonld-invoice.read_invoice_row.read_invoice_transaction.read_transaction.read_storage.read_invoice.contract_clauses_invoice.manual_send_invoice.status_history_invoice.work_time_reports_invoice.amount_due": {
      "type": "object",
      "description": "",
      "deprecated": false,
      "properties": {
        "@context": {
          "readOnly": true,
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "@vocab": {
                  "type": "string"
                },
                "hydra": {
                  "type": "string",
                  "enum": [
                    "http://www.w3.org/ns/hydra/core#"
                  ]
                }
              },
              "required": [
                "@vocab",
                "hydra"
              ],
              "additionalProperties": true
            }
          ]
        },
        "@id": {
          "readOnly": true,
          "type": "string"
        },
        "@type": {
          "readOnly": true,
          "type": "string"
        },
        "accountantDocumentNumber": {
          "description": "Accountant's reconciliation: the journal or register reference the accountant booked this document under, e.g. 00023/FS/26.",
          "type": [
            "string",
            "null"
          ]
        },
        "bookedAt": {
          "description": "Accountant's reconciliation: the posting date in the accountant's books.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "vatPeriod": {
          "description": "Accountant's reconciliation: the month whose JPK_V7M carries this document, YYYY-MM. Null when the document is outside VAT or not booked yet. Cannot be after the current month. The closed VAT periods run from the earliest to the latest month any document carries.",
          "type": [
            "string",
            "null"
          ]
        },
        "citPeriod": {
          "description": "Accountant's reconciliation: the month (YYYY-MM) or quarter (YYYY-Qn) the revenue or cost was recognised in for CIT.",
          "type": [
            "string",
            "null"
          ]
        },
        "bookedNetPln": {
          "description": "Accountant's reconciliation: the net amount as booked, in PLN, as a decimal string such as \"1234.56\" (not a JSON number).",
          "type": [
            "string",
            "null"
          ]
        },
        "bookedVatPln": {
          "description": "Accountant's reconciliation: the VAT amount as booked, in PLN, as a decimal string such as \"283.95\" (not a JSON number).",
          "type": [
            "string",
            "null"
          ]
        },
        "bookedGrossPln": {
          "description": "Accountant's reconciliation: the gross amount as booked, in PLN, as a decimal string such as \"1518.51\" (not a JSON number).",
          "type": [
            "string",
            "null"
          ]
        },
        "reconciliationStatus": {
          "description": "Accountant's reconciliation: unbooked, booked, mismatch or excluded. A document nobody reconciled reads unbooked. An unbooked document dated in a closed VAT period is reported as the problem_unreconciled entry of detectedProblems.",
          "type": [
            "string",
            "null"
          ]
        },
        "reconciledAt": {
          "description": "Accountant's reconciliation: when the document was last reconciled against the accountant's books.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "reconciliationNote": {
          "description": "Accountant's reconciliation: a free-text note, e.g. what a mismatch is.",
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}