﻿{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://api-erp.kamsoft.pl/ns/StructureDefinition/InvoiceCostLink",
  "title": "InvoiceCostLink",
  "type": "object",
  "properties": {
    "sourceDocument": {
      "description": "Dokument zrodlowy PZ",
      "$ref": "https://api-erp.kamsoft.pl/ns/StructureDefinition/Reference"
    },
    "location": {
      "description": "Magazyn / lokalizacja",
      "$ref": "https://api-erp.kamsoft.pl/ns/StructureDefinition/Reference"
    },
    "costAmount": {
      "description": "Wartosc kosztowa",
      "$ref": "https://api-erp.kamsoft.pl/ns/StructureDefinition/Money"
    },
    "comment": {
      "description": "Komentarz",
      "type": "string"
    },
    "category": {
      "description": "Kategoria kosztu",
      "$ref": "https://api-erp.kamsoft.pl/ns/StructureDefinition/CodeableConcept"
    },
    "relatedDocument": {
      "description": "Powiazane dokumenty",
      "type": "array",
      "items": {
        "$ref": "https://api-erp.kamsoft.pl/ns/StructureDefinition/Reference"
      }
    }
  },
  "required": [
    "sourceDocument",
    "location",
    "costAmount"
  ]
}