getreadystack's picture
Upload index.html with huggingface_hub
f0a663b verified
Raw History Blame Contribute Delete
15.1 kB
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Invoice Number Sequence — PHP Composer Package for Gapless, Audit-Proof Invoice Numbering</title><style>body{max-width:820px;margin:40px auto;padding:0 18px;font-family:system-ui,sans-serif;line-height:1.6}pre{background:#f6f4ef;padding:16px;border-radius:10px;overflow:auto}code{background:#f6f4ef;padding:2px 5px;border-radius:4px}</style><script data-grow-initializer="">!(function(){window.growMe||((window.growMe=function(e){window.growMe._.push(e);}),(window.growMe._=[]));var e=document.createElement("script");(e.type="text/javascript"),(e.src="https://faves.grow.me/main.js"),(e.defer=!0),e.setAttribute("data-grow-faves-site-id","U2l0ZTphZjljMzgyMC0yMmU5LTRhYjgtYTIxNS03OTRhMGY1N2ExYzM=");var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t);})();</script>
<!--yj-canon-s101--><link rel="canonical" href="https://getreadystack.com/tools/php-invoice-number-sequence-composer-package">
<script type="application/ld+json" data-yj="yj-capsule-v1">{"@context": "https://schema.org", "@type": "FAQPage", "inLanguage": "en", "mainEntity": [{"@type": "Question", "name": "What does Invoice Number Sequence — PHP Composer Package for Gapless, actually do?", "acceptedAnswer": {"@type": "Answer", "text": "valueprop The SELECT MAX version doesn't fail on your laptop. It fails once, in production, under real traffic — and what it leaves behind is a gap in a numbered series that you get to explain to somebody months later, from logs that have already rotated. You can't patch it retroactively either; the wrong number is already on a document a customer is holding. Four places this bites, and each one only shows up in production: the race between two POST requests, the 1 January rollover, the {SEQ:5} width overflow at 100000, and adopting a legacy series without renumbering it. A generic snippet from Stack Overflow covers none of them, and an ORM auto-increment is the opposite of gap-free the moment a transaction rolls back. This is gap-free, concurrency-safe invoice and document numbering for PHP 8.1+ — 24 profiles, 6 document types, 4 reset regimes, zero dependencies. composer require docnum/invoice-numbering, then pick a store: InMemoryStore, FileStore or PdoStore behind one SequenceStore interface, with GapReport.php to prove the series is intact and NumberingException when it isn't. The comparable on this shelf is a paid Composer package selling at 60 USD right now (our own shelf measurement, 2026-08). This one is 60 USD, 2 files, yours to vendor."}}, {"@type": "Question", "name": "Who is Invoice Number Sequence — PHP Composer Package for Gapless, for?", "acceptedAnswer": {"@type": "Answer", "text": "PHP developers who issue invoices from their own application in a regulated jurisdiction (axis 1: the fiscal calendar the counter resets on — January, April, July or October start) × the document being numbered (axis 2: invoice, credit note, pro-forma, deposit request, payment reminder, subscription run, POS receipt, per-branch and per-client series, and a legacy series being migrated)."}}, {"@type": "Question", "name": "What can I do for free, and what needs the paid version?", "acceptedAnswer": {"@type": "Answer", "text": "Run SequenceAuditor over your live invoice table today, before you change anything. The report tells you whether you are about to switch schemes on a clean run or on one that already has holes to explain — and holes are cheap to explain this week and expensive to explain next year."}}, {"@type": "Question", "name": "What would this cost if someone did it for me?", "acceptedAnswer": {"@type": "Answer", "text": "Measured on this shelf in 2026-08: a competing paid PHP package on the same shelf lists at USD 60 right now. The yardstick you can check without trusting us is inside the file: open src/ and count — 26 presets, 11 tokens, 6 reset policies, 7 named exceptions, 1 auditor, 1 cutover planner, 21 files. Every number in this listing is a count of something in the package, not an estimate of anything."}}], "datePublished": "2026-09-25", "dateModified": "2026-09-25", "author": {"@type": "Organization", "name": "ReadyStack", "url": "https://getreadystack.com"}}</script>
</head><body><h1>Invoice Number Sequence — PHP Composer Package for Gapless, Audit-Proof Invoice Numbering</h1><p>Gapless invoice numbering for PHP: 26 presets, 11 pattern tokens, 6 reset policies, and an auditor that finds gaps and duplicates in the numbers you already issued.</p><h2>Install</h2><pre>composer require ledgerkit/invoice-sequence</pre><h2>Files</h2><ul><li><code>src/Exception/InvoiceSequenceException.php</code></li><li><code>src/Exception/InvalidPatternException.php</code></li><li><code>src/Exception/UnknownTokenException.php</code></li><li><code>src/Exception/UnknownPresetException.php</code></li><li><code>src/Exception/MissingVariableException.php</code></li><li><code>src/Exception/PatternMismatchException.php</code></li><li><code>src/Exception/SequenceOverflowException.php</code></li><li><code>src/Exception/SequenceGapException.php</code></li><li><code>src/FiscalYear.php</code></li><li><code>src/ResetPolicy.php</code></li><li><code>src/SequenceState.php</code></li><li><code>src/NextNumber.php</code></li></ul>
<section data-yj-cta="paid" style="margin:3rem auto;max-width:46rem;padding:1.5rem 1.25rem;border:1px solid #d8dee9;border-radius:12px;background:#fbfcfe;font:16px/1.6 system-ui,-apple-system,Segoe UI,sans-serif"><h2 style="margin:0 0 .5rem;font-size:1.25rem">Get the complete version <span class="yj-price">$60</span></h2><p style="margin:.25rem 0 1rem;color:#41505f">This page is the working piece. The full pack has everything below.</p><p style="margin:0 0 1rem;color:#41505f">26 numbering presets, one composer require, and an auditor that reads the numbers you have already issued and names every gap and duplicate — while they are still fixable.</p><p style="margin:0 0 1rem;color:#5b6b7c;font-size:.94rem">Measured on this shelf in 2026-08: a competing paid PHP package on the same shelf lists at USD 60 right now. The yardstick you can check without trusting us is inside the file: open src/ and count — 26 presets, 11 tokens, 6 reset </p><a href="https://getreadystack.com/api/buy/cl/polar_cl_OfpITcTswh677b87g9w0R84cvXw1UDCac8nXL0L0saR" rel="nofollow" style="display:inline-block;padding:.7rem 1.3rem;border-radius:8px;background:#1b64f2;color:#fff;text-decoration:none;font-weight:600">Buy the full version — $6</a></section>
<section class="yj-related" style="max-width:920px;margin:56px auto 40px;padding:0 20px"><h2 style="font:600 21px/1.3 system-ui,sans-serif;margin:0 0 6px;color:#1b1f24">More from ReadyStack</h2><p style="font:400 14.5px/1.5 system-ui,sans-serif;margin:0 0 20px;color:#5b6570">Ready-to-use files. One-time download, no subscription.</p><div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px"><a class="yj-rel-c" href="https://getreadystack.com/tools/medical-clinic-website-template"><span class="yj-rel-t">Medical Clinic Website Template — Self-Hosted 9-Page Clinic Site in Plain HTML</span><span class="yj-rel-p">$49</span></a><a class="yj-rel-c" href="https://getreadystack.com/tools/latex-cv-template"><span class="yj-rel-t">LaTeX CV Template — 6 Layouts (Academic, Industry, ATS-plain, EU signature) + </span><span class="yj-rel-p">$8.99</span></a><a class="yj-rel-c" href="https://getreadystack.com/tools/shopify-theme-digital-products"><span class="yj-rel-t">Shopify Theme for Digital Products — Instant-Download Store for Ebook, Preset </span><span class="yj-rel-p">$200</span></a><a class="yj-rel-c" href="https://getreadystack.com/tools/photographer-website-template"><span class="yj-rel-t">Photographer Website Template — Complete 10-Page HTML Portfolio &amp; Booking Site</span><span class="yj-rel-p">$49</span></a><a class="yj-rel-c" href="https://getreadystack.com/tools/engineer-resume-template"><span class="yj-rel-t">Engineer Resume Template — 6 Fill-In Word Résumés: Software, Mechanical New-Gr</span><span class="yj-rel-p">$29</span></a><a class="yj-rel-c" href="https://getreadystack.com/tools/contact-page-template"><span class="yj-rel-t">Contact Page Template — 8-Page Self-Hosted HTML Site for Local Trades (Electri</span><span class="yj-rel-p">$49</span></a></div><style>.yj-rel-c{display:flex;flex-direction:column;gap:8px;padding:15px 16px;border:1px solid #e2e6ea;border-radius:6px;text-decoration:none;background:#fff}.yj-rel-c:hover{border-color:#b9c2cb;background:#fafbfc}.yj-rel-t{font:500 14.5px/1.42 system-ui,sans-serif;color:#1b1f24}.yj-rel-p{font:600 13px system-ui,sans-serif;color:#0a6238}</style></section><!--yj-share-s101--><div style="margin:28px 0 8px;text-align:center"><button id="yjcp" type="button" style="font:inherit;padding:10px 18px;border:1px solid #8884;border-radius:10px;background:transparent;cursor:pointer">Copy link</button></div><script>(function(){var b=document.getElementById("yjcp");if(!b)return;var t=b.textContent;b.addEventListener("click",function(){var u=location.href.split("#")[0];function d(){b.textContent="Link copied";setTimeout(function(){b.textContent=t;},1800);}if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(u).then(d,function(){prompt("",u);});}else{prompt("",u);}});})();</script>
<div class="yj-home-find"><div class="yj-lgbar"><a href="/" class="yj-lg on">EN</a><a href="/de/" class="yj-lg">DE</a><a href="/ja/" class="yj-lg">JA</a><a href="/es/" class="yj-lg">ES</a><a href="/pt/" class="yj-lg">PT</a></div><section class="yj-find"><h2>Find a tool</h2><input id="yjq" type="search" autocomplete="off" placeholder="Type a product name, format or task"><div id="yjr"></div></section><style>.yj-lgbar{position:absolute;top:14px;right:18px;display:flex;gap:6px;z-index:60}.yj-lg{font:600 12px/1 system-ui,sans-serif;padding:6px 9px;border-radius:4px;text-decoration:none;color:#8b96a3;border:1px solid rgba(140,150,165,.28)}.yj-lg:hover{color:#e8eaed;border-color:rgba(160,175,195,.6)}.yj-lg.on{color:#0e1116;background:#cfd6de;border-color:#cfd6de}.yj-find{max-width:760px;margin:34px auto 8px;padding:0 20px}.yj-find h2{font:600 20px/1.3 system-ui,sans-serif;margin:0 0 10px}#yjq{width:100%;box-sizing:border-box;padding:13px 15px;font:400 15.5px system-ui,sans-serif;border:1px solid rgba(140,150,165,.34);border-radius:8px;background:rgba(255,255,255,.04);color:inherit}#yjq:focus{outline:none;border-color:#7FD1C4}#yjr{margin-top:10px;display:flex;flex-direction:column;gap:6px}#yjr a{display:flex;justify-content:space-between;gap:12px;padding:11px 14px;border:1px solid rgba(140,150,165,.22);border-radius:6px;text-decoration:none;font:400 14.5px/1.4 system-ui,sans-serif;color:inherit}#yjr a:hover{border-color:#7FD1C4}#yjr .pr{font:600 13px system-ui,sans-serif;color:#5fbf9a;white-space:nowrap}</style><script>(function(){var q=document.getElementById("yjq"),r=document.getElementById("yjr"),D=null;function load(){if(D)return Promise.resolve(D);return fetch("/search-index.json").then(function(x){return x.json();}).then(function(j){D=j;return j;}).catch(function(){D=[];return D;});}function esc(t){return String(t).replace(/[&<>"]/g,function(c){return {"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[c];});}function run(){var v=q.value.trim().toLowerCase();if(v.length<2){r.innerHTML="";return;}load().then(function(j){var w=v.split(/\s+/),o=[];for(var i=0;i<j.length&&o.length<12;i++){var t=j[i].t.toLowerCase();var ok=true;for(var k=0;k<w.length;k++){if(t.indexOf(w[k])<0){ok=false;break;}}if(ok)o.push(j[i]);}r.innerHTML=o.length?o.map(function(x){return "<a href=\""+esc(x.u)+"\">"+"<span>"+esc(x.t)+"</span>"+(x.p?"<span class=\"pr\">$"+x.p+"</span>":"")+"</a>";}).join(""):"";});}q.addEventListener("input",run);q.addEventListener("focus",load);})();</script></div><section class="yj-email-gate" style="max-width:46rem;margin:2.5rem auto;padding:1.25rem;border:1px solid rgba(140,150,165,.28);border-radius:10px;font:400 15px/1.5 system-ui,sans-serif"><b style="font-size:1.05rem">Want the full version?</b><div style="opacity:.75;margin:.35rem 0 .8rem">Enter your email and we send the download link.</div><div style="display:flex;gap:8px;flex-wrap:wrap"><input id="yjge" type="email" placeholder="you@example.com" style="flex:1;min-width:210px;padding:11px 13px;border:1px solid rgba(140,150,165,.34);border-radius:8px;background:rgba(255,255,255,.04);color:inherit"><button id="yjgb" style="padding:11px 18px;border-radius:8px;border:0;cursor:pointer;font:600 15px system-ui,sans-serif">Send it to me</button></div><div id="yjgo" hidden style="margin-top:.6rem;color:#5fbf9a">Sent. Check your inbox.</div><script>(function(){var b=document.getElementById("yjgb"),e=document.getElementById("yjge");if(!b||!e)return;b.addEventListener("click",function(){var v=e.value.trim();if(!/.+@.+\..+/.test(v))return;try{localStorage.setItem("yj_em","1");}catch(_){}fetch(location.origin+"/api/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:v,slug:"php-invoice-number-sequence-composer-package",lang:"en",source:"hub_gate"})}).catch(function(){}).then(function(){document.getElementById("yjgo").hidden=false;});});})();</script></section>
<script data-yj="yj-view-beacon">(function(){try{var p=location.pathname;var k='yjv:'+p;if(sessionStorage.getItem(k))return;sessionStorage.setItem(k,'1');fetch('/api/ev',{method:'POST',keepalive:true,headers:{'Content-Type':'application/json'},body:JSON.stringify({path:p,lang:"en",ref:(document.referrer||''),src:(function(){try{return (new URLSearchParams(location.search).get('ref')||'').replace(/[^a-z_]/g,'').slice(0,12)}catch(e){return ''}})()})}).catch(function(){});}catch(e){}})();</script>
<script data-yj="yj-use-beacon v2">(function(){try{var r=document.querySelector('main')||document.body;var p=location.pathname,k='yju:'+p,sent=false,armed=false;function ours(el){return !!(el&&el.closest&&el.closest('[data-yj],[data-yj-cta],.yj-email-gate,.yj-find,.yj-related,#yj-ask,#yjgo,#yjr'));}function fire(){if(sent||!armed||sessionStorage.getItem(k))return;sent=true;sessionStorage.setItem(k,'1');fetch('/api/ev',{method:'POST',keepalive:true,headers:{'Content-Type':'application/json'},body:JSON.stringify({path:p,lang:"en",t:'use',src:(function(){try{return (new URLSearchParams(location.search).get('ref')||'').replace(/[^a-z_]/g,'').slice(0,12)}catch(e){return ''}})()})}).catch(function(){});}r.addEventListener('click',function(e){var b=e.target&&e.target.closest?e.target.closest('button,input[type=submit],[role=button]'):null;if(!b||ours(b))return;armed=true;setTimeout(fire,400);},true);r.addEventListener('input',function(e){if(!ours(e.target))armed=true;},true);var mo=new MutationObserver(function(){if(armed){fire();if(sent)mo.disconnect();}});mo.observe(r,{childList:true,characterData:true,subtree:true});}catch(e){}})();</script>
</body></html>