{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"Goods received note - Bon de réception fournisseur / Ontvangstbon goederen (BE)","description":"The record an SME keeps when it receives goods from a supplier: company and site, supplier, references, receipt, lines with ordered and received quantity, condition and a typed discrepancy (received minus ordered, negative = short delivery), the status chosen by the user, the reservations as written at delivery and the signatory. Nothing is computed or defaulted: a missing value prints a dash.","type":"object","additionalProperties":false,"required":["company","supplier","references","receipt","items","overall_status","signatory"],"properties":{"company":{"type":"object","description":"The enterprise that receives the goods (an internal record).","additionalProperties":false,"properties":{"name":{"type":"string"},"enterprise_number":{"type":"string","pattern":"^[01][0-9]{3}\\.[0-9]{3}\\.[0-9]{3}$","description":"Belgian enterprise number (KBO/BCE), written 0123.456.789."},"seat_region":{"type":"string","enum":["nl_region","fr_region","brussels","de_region"],"description":"Linguistic region of the operating seat (optional). Nothing is compared with it."}},"required":["name"]},"site":{"type":"string","description":"Site where the goods were received (shop, workshop, depot)."},"supplier":{"type":"object","description":"The supplier of the goods.","additionalProperties":false,"properties":{"name":{"type":"string"},"enterprise_number":{"type":"string","pattern":"^[01][0-9]{3}\\.[0-9]{3}\\.[0-9]{3}$","description":"Belgian enterprise number of the supplier, written 0123.456.789."},"vat_number":{"type":"string","pattern":"^BE[01][0-9]{9}$","description":"Belgian VAT number of the supplier, written BE0123456789."},"address":{"type":"string"}},"required":["name"]},"references":{"type":"object","additionalProperties":false,"properties":{"grn_number":{"type":"string","description":"Number of this note in the enterprise's own numbering."},"po":{"type":"string","description":"Purchase order reference."},"delivery_note":{"type":"string"},"carrier":{"type":"string"}},"required":["po"]},"receipt":{"type":"object","additionalProperties":false,"properties":{"date":{"type":"string","format":"date"},"time":{"type":"string","maxLength":8},"received_by_name":{"type":"string"},"received_by_role":{"type":"string"}},"required":["date","received_by_name","received_by_role"]},"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"sku":{"type":"string"},"description":{"type":"string"},"unit":{"type":"string"},"ordered_quantity":{"type":"number","minimum":0},"received_quantity":{"type":"number","minimum":0},"discrepancy":{"type":"number","description":"Received minus ordered, typed by the user (negative = short delivery). Never computed."},"lot":{"type":"string"},"condition":{"type":"string","enum":["ok","damaged","wrong_item","not_delivered"]},"damaged_quantity":{"type":"number","minimum":0},"note":{"type":"string"}},"required":["description","ordered_quantity","received_quantity"]},"minItems":1},"overall_status":{"type":"string","enum":["accepted","accepted_with_discrepancy","rejected","partial"],"description":"Status chosen by the user. Printed as its label."},"reservations":{"type":"string"},"reservations_notified_on":{"type":"string","format":"date"},"photos_kept":{"type":"boolean"},"notes":{"type":"string"},"signatory":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"role":{"type":"string"},"date":{"type":"string","format":"date"}},"required":["name","role"]}}}