function renderComponent(comp) {
const el = document.createElement('div');
el.className = 'dropped-component';
el.id = comp.id;
el.innerHTML = `
${s.name || ''}
${s.branch || ''}
${s.address || ''}
โทร: ${s.phone || ''} | Tax: ${s.taxId || ''}
`;
case 'receipt-info':
const r = Pro.data.receipt;
return `
ยอดรวม: ฿${sum.subtotal.toFixed(2)}
ภาษี ${Number(Pro.data.vatRate) || 0}%: ฿${sum.vat.toFixed(2)}
รวมสุทธิ: ฿${sum.total.toFixed(2)}
`;
case 'payment-info':
const sm = Pro.calcSummary();
const cash = parseFloat(d.cashReceived);
const showCash = !isNaN(cash);
const change = showCash ? cash - sm.total : 0;
return `