{"$schema":"http://json-schema.org/draft-07/schema#","title":"Hebrew tax invoice","type":"object","additionalProperties":false,"required":["documentType","number","issueDate","seller","customer","items"],"properties":{"documentType":{"type":"string","enum":["tax_invoice","tax_invoice_receipt","receipt","proforma"],"description":"tax_invoice = חשבונית מס, tax_invoice_receipt = חשבונית מס / קבלה, receipt = קבלה, proforma = חשבון עסקה"},"copy":{"type":"string","enum":["original","copy"],"default":"original","description":"Prints מקור or העתק נאמן למקור"},"number":{"type":"string","maxLength":40},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"allocationNumber":{"type":"string","pattern":"^[0-9]{9}$","description":"Israel Tax Authority allocation number (מספר הקצאה), when one was obtained"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","default":"ILS"},"seller":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","maxLength":200},"businessId":{"type":"string","maxLength":20,"description":"Dealer or company number (ע.מ / ח.פ)"},"address":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":4},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":200}}},"customer":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","maxLength":200},"businessId":{"type":"string","maxLength":20,"description":"Dealer or company number (ע.מ / ח.פ)"},"address":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":4},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":200}}},"items":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"object","required":["description","quantity","unitPrice"],"additionalProperties":false,"properties":{"description":{"type":"string","maxLength":300},"details":{"type":"string","maxLength":500},"quantity":{"type":"number","minimum":0},"unitPrice":{"type":"number","description":"Before VAT"}}}},"vatRate":{"type":"number","minimum":0,"maximum":100,"default":18,"description":"Percent. 0 prints \"VAT exempt\"."},"discount":{"type":"number","minimum":0,"default":0,"description":"Absolute amount off the total before VAT"},"payments":{"type":"array","maxItems":20,"items":{"type":"object","required":["method","amount"],"additionalProperties":false,"properties":{"method":{"type":"string","maxLength":60},"details":{"type":"string","maxLength":120},"date":{"type":"string","format":"date"},"amount":{"type":"number"}}},"description":"For invoice-receipts and receipts"},"bankDetails":{"type":"array","maxItems":6,"items":{"type":"object","required":["label","value"],"additionalProperties":false,"properties":{"label":{"type":"string","maxLength":40},"value":{"type":"string","maxLength":80}}}},"notes":{"type":"string","maxLength":2000}}}