M A Fazal & Co.

Chartered Accountants · Secure Portal

Attempts: 0 / 5
🔒

Too many failed attempts.

05:00
www.mafazal.com
Authorised personnel only. All sessions logged.
Copyright M A Fazal & Co.
Dashboard
Home / Dashboard
FA
Partner
Active Clients
Registered engagements
Open Tasks
Pending / In Progress
Overdue
Past deadline
Unbilled (BDT)
Outstanding fees
VAT This Month
Collected VAT
Upcoming Deadlines
ClientTask TypeDeadlinePriorityStatus
Connect to Google Sheet to load data
Recent Invoices
Invoice #ClientTotalStatus
No data
🔗 Google Integration
Deploy Code.gs as Web App → copy URL here
Deploy InvoiceGen.gs as Web App → copy URL here
🏢 Firm Profile
Client Registry
#Client NameTypeContactBINTINRefereeSinceStatus
Loading...
Referee Registry
#NameDesignationOrganizationPhoneEmailClients Referred
Loading...
Tasks & Engagements
#ClientTypeDescriptionFYAssigned ToDeadlinePriorityStatus
Loading...
Fee Management
#ClientServiceFee (BDT)VAT (BDT)Total (BDT)StatusDue
Loading...
Invoice Ledger — VAT Form 6.3
Invoice #DateClientTaxable (BDT)VAT (BDT)Total (BDT)StatusDoc
Loading...
Client Summary
Full registry with engagement details
Task Status
All tasks with deadlines and status
Fee Collection
Billed, paid and outstanding fees
VAT Summary
Monthly VAT collected on invoices
Referee Performance
Revenue attributed by referral source
Overdue Deadlines
Tasks past due date requiring action
📋
Invoice Ledger
Complete invoice register with totals
`); w.document.close(); w.print(); } // -- MODAL HELPERS -------------------------------------------------- function openModal(id) { const el = document.getElementById(id); if (el) el.classList.add('open'); fillClientDropdowns(); fillRefDropdowns(); fillTaskDropdowns(); // Set defaults $v('f-vatrate', CFG.vatRate || 15); if (id === 'm-invoice') { const yr = new Date().getFullYear(); const next = String(INVOICES.length + 1).padStart(3,'0'); $v('i-no', `INV-${yr}-${next}`); $v('i-date', new Date().toISOString().split('T')[0]); $v('i-hs', '9982.00.00'); $v('i-uom', 'LS'); $v('i-qty', '1'); $v('i-sd', '0'); $v('i-terms','Payment due within 30 days of invoice date. Make cheque payable to the firm.'); } if (id === 'm-task') { $v('t-start', new Date().toISOString().split('T')[0]); } } function closeModal(id) { document.getElementById(id)?.classList.remove('open'); } // -- DROPDOWN FILLERS ----------------------------------------------- function fillClientDropdowns() { const ids = ['t-client','f-client','i-client']; ids.forEach(id => { const el = document.getElementById(id); if (!el) return; const cur = el.value; el.innerHTML = '' + CLIENTS.map(c=>``).join(''); }); } function fillRefDropdowns() { const el = document.getElementById('c-referee'); if (!el) return; el.innerHTML = '' + REFEREES.map(r=>``).join(''); } function fillTaskDropdowns() { const ids = ['f-task','i-task']; ids.forEach(id => { const el = document.getElementById(id); if (!el) return; el.innerHTML = '' + TASKS.map(t=>``).join(''); }); } // -- UTILITIES ------------------------------------------------------ const $g = id => { const e = document.getElementById(id); return e ? e.value.trim() : ''; }; const $v = (id,v) => { const e = document.getElementById(id); if (e && v!==undefined) e.value = v; }; const $t = (id,v) => { const e = document.getElementById(id); if (e) e.textContent = v; }; const uid = () => Date.now().toString(36) + Math.random().toString(36).slice(2,7); const now = () => new Date().toISOString(); const esc = s => String(s||'').replace(/"/g,'"'); function clearIds(ids) { ids.forEach(id => { const e=document.getElementById(id); if(e){ e.tagName==='SELECT'?e.selectedIndex=0:e.value=''; }}); } function fmtDate(d) { if (!d) return ''; try { return new Date(d).toLocaleDateString('en-GB',{day:'2-digit',month:'short',year:'numeric'}); } catch(e){return d;} } function fmtBDT(n) { if (n===undefined||n===null||n==='') return '--'; return parseFloat(n).toLocaleString('en-BD',{minimumFractionDigits:2,maximumFractionDigits:2}); } function fmtK(n) { const v = parseFloat(n) || 0; if (v >= 1e7) return (v/1e7).toFixed(1)+'Cr'; if (v >= 1e5) return (v/1e5).toFixed(1)+'L'; if (v >= 1000) return (v/1000).toFixed(1)+'K'; return v.toFixed(0); } function camelCase(s) { return s.replace(/([A-Z])/g,' $1').replace(/^./,c=>c.toUpperCase()); } function statusBadge(s) { const m = {'Completed':'b-green','In Progress':'b-blue','Pending':'b-gold','On Hold':'b-gray'}; return `${s||'--'}`; } function prioBadge(p) { const m = {'High':'b-red','Medium':'b-amber','Low':'b-green'}; return `${p||'--'}`; } function feeBadge(s) { const m = {'Paid':'b-green','Invoiced':'b-blue','Unbilled':'b-gold','Partially Paid':'b-purple','Written Off':'b-gray'}; return `${s||'--'}`; } function invBadge(s) { const m = {'Issued':'b-blue','Paid':'b-green','Draft':'b-gray','Cancelled':'b-red'}; return `${s||'--'}`; } function setConn(on) { document.getElementById('connDot').className = 'dot' + (on?' on':''); document.getElementById('connText').textContent = on ? 'Connected' : 'Not Connected'; } function showMsg(id, msg, type) { const e = document.getElementById(id); if (!e) return; e.textContent = msg; e.className = 'msg-box ' + type; e.style.display = 'block'; setTimeout(() => e.style.display='none', 6000); } function spin(on) { document.getElementById('spinner').className = 'spin-wrap' + (on?' on':''); } function toast(msg, type='info') { const wrap = document.getElementById('toastWrap'); const el = document.createElement('div'); el.className = 'toast-item ' + type; el.textContent = msg; wrap.appendChild(el); setTimeout(() => { el.style.opacity='0'; el.style.transform='translateX(20px)'; setTimeout(()=>el.remove(),300); }, 3500); } // AUTH SYSTEM - M A Fazal & Co. - ASCII only var LC_USERS = [ { role:'partner', email:'shakhawathossainacc@gmail.com', password:'Maf@654321', display:'Shakhawat Hossain FCA', initials:'SH', pages:['dashboard','settings','clients','referees','tasks','fees','invoices','reports'] }, { role:'manager', email:'sad.mafazal@gmail.com', password:'Sad@654321', display:'Manager', initials:'MG', pages:['dashboard','clients','referees','tasks','fees','invoices','reports'] } ]; var LC_KEY='mafazal_v3_auth', LC_TTL=36000000, LC_LOCKT=300000; window.LC_CURRENT_USER=null; var LC_FAILS=0, LC_LOCKED=0, LC_LTIMER=null, LC_ROLE='partner'; document.addEventListener('DOMContentLoaded', function() { document.getElementById('lcYear').textContent = new Date().getFullYear(); document.getElementById('lcEmail').addEventListener('keydown',function(e){if(e.key==='Enter')lcLogin();}); document.getElementById('lcPass').addEventListener('keydown',function(e){if(e.key==='Enter')lcLogin();}); try { var raw=sessionStorage.getItem(LC_KEY)||localStorage.getItem(LC_KEY); var sess=raw?JSON.parse(raw):null; if(sess&&sess.email&&sess.expiry&&Date.now()=5){lcLock();} else{ var left=5-LC_FAILS; lcShowErr('Incorrect Gmail or password. '+left+' attempt'+(left!==1?'s':'')+' remaining.'); document.getElementById('lcWarn').style.display='block'; document.getElementById('lcWarnN').textContent=LC_FAILS; document.getElementById('lcPass').focus(); } } },400); } function lcBoot(){ var u=window.LC_CURRENT_USER; if(!u)return; document.getElementById('tbAvatar').textContent=u.initials; document.getElementById('tbPartner').textContent=u.display; var badge=document.getElementById('lcRoleBadge'); if(badge){badge.style.display='inline-block';badge.textContent=u.role==='partner'?'Partner':'Manager';badge.className='lc-rolebadge '+(u.role==='partner'?'role-p':'role-m');} var lb=document.getElementById('lcLogoutBtn'); if(lb)lb.style.display='flex'; if(u.role==='manager'){document.body.classList.add('manager-role');} else{document.body.classList.remove('manager-role');} var allPages=['dashboard','settings','clients','referees','tasks','fees','invoices','reports']; for(var p=0;p