';}const id=(location.hash||'').replace('#','')||new URLSearchParams(location.search).get('coc');const rec=records.find(x=>x.coc_id===id);const app=document.getElementById('app');if(!rec){app.innerHTML='
CoC not found
Please check the QR code or CoC number.
';}else{app.innerHTML='
TRACEABILITY RECORDCertificate '+esc(rec.coc_id)+'
'+field('Works Order',rec.works_order)+field('Customer Order',rec.customer_order)+field('Kit',rec.kit_model+' — '+rec.kit_name)+field('Date Built',rec.date_built)+field('Batch Number(s)',rec.batch_numbers.join(', '))+field('Supplier(s)',rec.suppliers.join(', '))+field('Item Type / Timber Size(s)',rec.item_types.join(', '))+field('Delivery Note(s)',rec.delivery_notes.join(', '))+field('Quantity Used (m)',rec.quantity_used_m)+'
This record is linked to the production Works Order and associated goods-in batch traceability information.
';}