NEXCOOLnexcool

NEXCOOL Business Management System

Professional Books · Operations · Stock · Reports

Refrigeration · Gas · Grocery · Poultry Project

Staff portals: CEO, COO, Accountant, Sales and Stock. Customers use their exact customer name and phone number.
';dl('NEXCOOL_BOOKS_FULL_BACKUP_'+date()+'.xls','application/vnd.ms-excel',html); }; window.downloadControlPDF=function(){window.print()}; window.saveCashControl=function(){ state.opening[biz]=state.opening[biz]||{}; state.opening[biz].Cash=Number(v('ccOpenCash')||0);state.opening[biz].Bank=Number(v('ccOpenBank')||0);state.opening[biz].EcoCash=Number(v('ccOpenEco')||0); let target=Number(v('ccTargetCash'));save(); if(Number.isFinite(target)){let current=Number(totals().cash||0),diff=target-current;if(Math.abs(diff)>.004){state.adjustments.unshift({id:id(),business:biz,date:date(),type:diff>=0?'Money In':'Money Out',description:'COO Cash Balance Correction',amount:Math.abs(diff),account:'Cash',ref:'COO-CASH',enteredBy:displayName(user),createdAt:new Date().toISOString()});}} if(typeof nxAudit==='function')nxAudit('Changed','Cash Control','Opening accounts / cash balance updated');save();render();alert('Cash control saved and books recalculated.'); }; window.saveControlDesign=function(){ state.uiText.appName=v('ccAppName')||'Nexcool Books';state.uiText.dashboardTitle=v('ccDashText')||'Management Dashboard';state.uiText.dashboardStyle=v('ccDashStyle')||'Standard'; state.appearance=state.appearance||{};state.appearance.font=v('ccFont');state.appearance.fontSize=v('ccFontSize');state.appearance.primary=v('ccPrimary');state.appearance.navigation=v('ccNav');state.appearance.background=v('ccBg'); save();if(typeof applyAppearance==='function')applyAppearance();document.title=state.uiText.appName;if(typeof nxAudit==='function')nxAudit('Changed','Application Design','Logo/text/dashboard style settings updated');shell();render(); }; window.controlLogo=function(input){if(!input.files?.[0])return;state.businessSettings[biz]=state.businessSettings[biz]||{};state.businessSettings[biz].logo='nexcool-logo-transparent.png';save();shell();render();alert('NEXCOOL original logo retained. Logo files are kept as app assets so settings cannot fill browser storage.');}; window.controlAddStaff=function(){let name=v('ccStaffName').trim(),u=v('ccStaffUser').trim().toLowerCase(),p=v('ccStaffPass'),role=v('ccStaffRole');if(!name||!u||p.length<4)return alert('Enter staff name, username and password of at least 4 characters.');let x=state.users.find(z=>z.u===u);if(x){x.name=name;x.p=p;x.role=role}else state.users.push({name,u,p,role});if(typeof nxAudit==='function')nxAudit('Changed','Staff','Staff account added/updated: '+u);save();render()}; window.controlStaffAction=function(u,act){let x=state.users.find(z=>z.u===u);if(!x)return;if(act==='password'){let p=prompt('New password for '+displayName(x));if(p&&p.length>=4)x.p=p}else if(act==='role'){let r=prompt('Role: COO, Accountant, Sales or Stock',roleName(x));if(r)x.role=r}else if(act==='delete'){if(['ceo','operations'].includes(u))return alert('CEO/COO core account cannot be deleted here.');if(confirm('Delete '+displayName(x)+'?'))state.users=state.users.filter(z=>z.u!==u)}save();render()}; const oldShell=window.shell;window.shell=function(){oldShell.apply(this,arguments);let brand=document.querySelector('.side-brand span,.compact-brand span');if(brand)brand.textContent=state.uiText.appName||'Nexcool Books';document.title=state.uiText.appName||'Nexcool Books'}; window.page_admincontrol=function(){ if(!['CEO','COO','Operations'].includes(user?.role))return '

Management access required

'; let t=totals(),o=state.opening[biz]||{},a=state.appearance||{},ut=state.uiText||{},staff=(state.users||[]).map(x=>`${esc(displayName(x))}${esc(x.u)}${esc(roleName(x))} `).join(''); return `
COO FULL CONTROL · CONNECTED · ${esc(B[biz].name)}
Every control below saves into the live Nexcool Books data.
${k('Income',money(t.sales),'green')}${k('Expenses',money(t.expenses),'red')}${k('Cash in Hand',money(t.cash),t.cash<0?'red':'green')}${k('Net Profit / Loss',money(t.profit),t.profit<0?'red':'green')}${k('Receivables',money(t.ar))}${k('Payables',money(t.ap))}${k('Savings',money(t.savings))}

💵 Cash & Balancing Control

Edit opening accounts or set the actual Cash in Hand. A controlled daybook correction is created so the books remain traceable.

🎨 Logo, Text & Dashboard Style

👥 Staff Control

${staff}
NameUserRoleControls

💾 Backup & Downloads

JSON is the complete restore backup. Excel is a readable full-book export. PDF prints the current control/report view.

∑ Formula & Books

Recalculate without deleting entered transactions.

🕘 Change Log & Activity

Management audit and staff actions remain traceable.

`; }; if(user){shell();render()} })();