Admin

Point of Sale

Terminal: Shift: Branch: Today: $0.00 · 0 sales 0 waiting Time
Order
No customer attached — required to checkout
Subtotal$0.00
Discount $0.00
Tax (FL 7%)$0.00
TOTAL$0.00
'; var w=window.open('','_blank','width=820,height=900'); if(!w){ MGR.toast({title:'Pop-up blocked', body:'Allow pop-ups to print.', type:'warn', icon:'circle-exclamation'}); return; } w.document.write(html); w.document.close(); setTimeout(function(){ try{ w.focus(); w.print(); }catch(_){}}, 350); } /* Beautified branded receipt — wraps MGRDocPrint.receipt() so the POS popup matches every other MGR document. Falls back to legacy print on miss. */ if(typeof window.posPrintBeautified !== 'function'){ window.posPrintBeautified = function(saleId){ var sale = (MGR.jget('mgr.pos.sales',[])||[]).find(function(s){ return s.id===saleId; }); if(!sale){ MGR.toast({title:'Sale not found', body:saleId, type:'error', icon:'circle-exclamation'}); return; } if(!window.MGRDocPrint){ window.print(); return; } var c = sale.customer || {}; MGRDocPrint.receipt({ number: sale.id, date: sale.at || sale.createdAt || Date.now(), billTo: sale.billing || (c.name ? { name:c.name, address:c.address||'', city:c.city||'', email:c.email||'', phone:c.phone||'' } : { name:'Walk-in customer' }), shipTo: sale.shipping || (c.shippingAddress ? { name:c.name||c.email, address:c.shippingAddress, city:c.shippingCity, country:c.shippingCountry, contact:c.shippingContact } : null), lines: (sale.lines||[]).map(function(l){ return { desc:l.name||l.sku, sku:l.sku, qty:l.qty||1, unit:l.price||0, amount:(l.price||0)*(l.qty||1) }; }), subtotal: sale.subtotal, discount: sale.discount, tax: sale.tax, taxLabel: sale.taxLabel || 'Tax (FL 7%)', total: sale.total, payment: sale.payment, currency: sale.currency || 'USD', terms: 'Paid in full at counter.' }); }; } if(typeof window.posPackingList !== 'function'){ window.posPackingList = function(saleId){ var sale=(MGR.jget('mgr.pos.sales',[])||[]).find(function(s){return s.id===saleId;}); if(!sale){ MGR.toast({title:'Sale not found', body:saleId, type:'error', icon:'circle-exclamation'}); return; } var items=sale.items||sale.lines||[]; var rows=items.map(function(it){return ''+ (it.name||it.title||it.desc||'—')+''+(it.sku||'—')+''+ (it.qty||1)+'';}).join(''); _printDoc('Packing List '+saleId, '

Packing List

Sale: '+saleId+' · '+ new Date(sale.at||sale.createdAt||Date.now()).toLocaleString()+'
'+ '
Customer: '+(sale.customer||sale.customerName||'—')+'
'+ '

Items to pack

'+ '
ItemSKUQ