(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[322],{5285:(e,t,r)=>{Promise.resolve().then(r.bind(r,6362))},5405:(e,t,r)=>{"use strict";r.d(t,{bg:()=>n,TI:()=>a,si:()=>x,KX:()=>c,tN:()=>d,cR:()=>f,X4:()=>i});let a=.155,n=25,o=[{quarter:1,cumulativePct:.1,portionPct:.1,dueMonth:3,dueDay:25},{quarter:2,cumulativePct:.35,portionPct:.25,dueMonth:6,dueDay:25},{quarter:3,cumulativePct:.65,portionPct:.3,dueMonth:9,dueDay:25},{quarter:4,cumulativePct:1,portionPct:.35,dueMonth:12,dueDay:20}],s=[{from:0,to:100,rate:0},{from:100,to:300,rate:.2},{from:300,to:1e3,rate:.25},{from:1e3,to:2e3,rate:.3},{from:2e3,to:3e3,rate:.35},{from:3e3,to:null,rate:.4}],u=[{from:0,to:2600,rate:0},{from:2600,to:7800,rate:.2},{from:7800,to:26e3,rate:.25},{from:26e3,to:52e3,rate:.3},{from:52e3,to:78e3,rate:.35},{from:78e3,to:null,rate:.4}];function i(e){return Math.round((e+Number.EPSILON)*100)/100}function l(e,t){if(!Number.isFinite(e)||e<0)throw RangeError("".concat(t," must be a non-negative finite number, got ").concat(e))}let m={standard:.155,zero:0,exempt:0};function c(e,t){l(e,"netAmount");let r=m[t],a=i(e),n=i(a*r);return{net:a,vat:n,gross:i(a+n),rate:r,code:t}}function d(e,t){l(e,"grossAmount");let r=m[t],a=i(e),n=i(a/(1+r));return{net:n,vat:i(a-n),gross:a,rate:r,code:t}}function x(e,t){l(e,"grossMonthly");let r=i(e),a=i(function(e,t){let r=0;for(let a of t){if(e<=a.from)break;r+=((null===a.to?e:Math.min(e,a.to))-a.from)*a.rate}return r}(r,"USD"===t?s:u)),n=i(.03*a),o=i(a+n);return{gross:r,currency:t,tax:a,aidsLevy:n,totalPaye:o,effectiveRate:0===r?0:i(o/r)}}function f(e){return[1,2,3,4].map(t=>(function(e,t){l(e,"annualEstimate");let r=o.find(e=>e.quarter===t);if(!r)throw RangeError("quarter must be 1, 2, 3 or 4, got ".concat(t));let a=i(e*r.cumulativePct),n=i(e*r.portionPct);return{quarter:t,annualEstimate:i(e),cumulativeDue:a,paymentDue:n,dueMonth:r.dueMonth,dueDay:r.dueDay}})(e,t))}},6362:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var a=r(9621),n=r(8929),o=r(5405);let s=["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u(){let[e,t]=(0,n.useState)(1e4),r=(0,n.useMemo)(()=>(0,o.cR)(Math.max(0,Number(e)||0)),[e]);return(0,a.jsxs)("section",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold",children:"Zimbabwe QPD planner"}),(0,a.jsx)("p",{className:"text-sm text-gray-500",children:"Quarterly Payment Dates for provisional corporate income tax. Enter your estimated tax for the full year; payments are cumulative (10% / 35% / 65% / 100%)."})]}),(0,a.jsxs)("div",{className:"rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-100",children:[(0,a.jsxs)("label",{className:"flex flex-col gap-1 text-sm font-medium",children:["Estimated annual income tax",(0,a.jsx)("input",{type:"number",min:0,step:"0.01",value:e,onChange:e=>t(Number(e.target.value)),className:"rounded-lg border border-gray-300 px-3 py-2 outline-none focus:border-kura focus:ring-2 focus:ring-kura/30"})]}),(0,a.jsx)("p",{className:"mt-2 text-xs text-gray-400",children:"QPDs are estimates; re-estimate each quarter as the year firms up."})]}),(0,a.jsx)("div",{className:"overflow-hidden rounded-xl bg-white shadow-sm ring-1 ring-gray-100",children:(0,a.jsxs)("table",{className:"w-full text-left text-sm",children:[(0,a.jsx)("thead",{className:"border-b border-gray-200 text-gray-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-5 py-3 font-medium",children:"Quarter"}),(0,a.jsx)("th",{className:"px-5 py-3 font-medium",children:"Due date"}),(0,a.jsx)("th",{className:"px-5 py-3 text-right font-medium",children:"Payment due"}),(0,a.jsx)("th",{className:"px-5 py-3 text-right font-medium",children:"Cumulative paid"})]})}),(0,a.jsx)("tbody",{children:r.map(e=>(0,a.jsxs)("tr",{className:"border-b border-gray-100 last:border-0",children:[(0,a.jsxs)("td",{className:"px-5 py-3 font-medium",children:["QPD ",e.quarter]}),(0,a.jsxs)("td",{className:"px-5 py-3",children:[e.dueDay," ",s[e.dueMonth]]}),(0,a.jsx)("td",{className:"px-5 py-3 text-right font-mono font-semibold text-kura-dark",children:e.paymentDue.toFixed(2)}),(0,a.jsx)("td",{className:"px-5 py-3 text-right font-mono text-gray-500",children:e.cumulativeDue.toFixed(2)})]},e.quarter))})]})})]})}}},e=>{e.O(0,[976,785,358],()=>e(e.s=5285)),_N_E=e.O()}]);