{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"be.reports.trial_balance","type":"object","additionalProperties":false,"required":["letter","entity","period","account_rows","totals"],"properties":{"letter":{"type":"object","additionalProperties":false,"required":["date","reference"],"properties":{"date":{"type":"string","format":"date"},"reference":{"type":"string","minLength":1}}},"entity":{"type":"object","additionalProperties":false,"required":["name","bce","vat"],"properties":{"name":{"type":"string","minLength":1},"bce":{"type":"string","pattern":"^0[0-9]{3}\\.[0-9]{3}\\.[0-9]{3}$"},"vat":{"type":"string","pattern":"^BE0[0-9]{9}$"},"address":{"type":"string"},"city":{"type":"string"}}},"period":{"type":"object","additionalProperties":false,"required":["start","end"],"properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"}}},"balance_type":{"type":"string","enum":["unadjusted","adjusted"],"default":"unadjusted"},"account_rows":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["pcmn_code","account_label","total_debit","total_credit","net_balance"],"properties":{"pcmn_code":{"type":"string","pattern":"^[0-9]{3,7}$"},"account_label":{"type":"string","minLength":1},"pcmn_class":{"type":"string","enum":["1","2","3","4","5","6","7"]},"total_debit":{"type":"number","minimum":0},"total_credit":{"type":"number","minimum":0},"net_balance":{"type":"number"}}}},"totals":{"type":"object","additionalProperties":false,"required":["total_debit","total_credit","total_net"],"properties":{"total_debit":{"type":"number","minimum":0},"total_credit":{"type":"number","minimum":0},"total_net":{"type":"number"},"balanced":{"type":"boolean"}}},"notes":{"type":"string"}}}