{"id":150909,"date":"2026-10-14T15:08:34","date_gmt":"2026-10-14T15:08:34","guid":{"rendered":"https:\/\/docs.daftra.com\/?post_type=tutorial&#038;p=150909"},"modified":"2026-10-18T07:48:53","modified_gmt":"2026-10-18T07:48:53","slug":"auto-numbering-for-documents-set-the-prefix-and-starting-number","status":"publish","type":"tutorial","link":"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/","title":{"rendered":"Auto Numbering for Documents: Set the Prefix and Starting Number"},"content":{"rendered":"<div dir=\"ltr\" lang=\"en\">\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The system gives every invoice, client, product and document an automatic number based on rules you set, such as the prefix INV, the number of digits and the starting number. This guide explains the auto numbering settings for each document type, prefix variables such as the year and month, manual number editing, when a number is used up, and why numbers can appear out of sequence.<\/p>\n<div style=\"display: flex; gap: 10px; background: #f6f8fb; border-left: 4px solid #1a56db; border-radius: 6px; padding: 14px 16px; margin: 0 0 18px;\">\n<p><span style=\"flex: 0 0 auto; font-size: 18px; line-height: 1.6;\">\ud83d\udec8<\/span><\/p>\n<p style=\"margin: 0; line-height: 1.9; font-size: 16px; color: #1f2430;\"><strong style=\"color: #111827;\">Note:<\/strong> You need the <strong style=\"color: #111827;\">Edit General Settings<\/strong> permission to change numbering settings.<\/p>\n<\/div>\n<div style=\"border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 16px; margin: 0 0 20px;\">\n<p style=\"margin: 0 0 6px; font-weight: bold; color: #111827;\">Contents<\/p>\n<ol style=\"margin: 0; padding-left: 22px;\">\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#open\"><strong style=\"color: #1a56db;\">Open the numbering settings<\/strong><\/a><\/li>\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#types\"><strong style=\"color: #1a56db;\">Documents that have numbering<\/strong><\/a><\/li>\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#options\"><strong style=\"color: #1a56db;\">Numbering options<\/strong><\/a><\/li>\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#prefix\"><strong style=\"color: #1a56db;\">The prefix and its variables<\/strong><\/a><\/li>\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#reset\"><strong style=\"color: #1a56db;\">Yearly and monthly numbering<\/strong><\/a><\/li>\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#manual\"><strong style=\"color: #1a56db;\">Editing the number manually<\/strong><\/a><\/li>\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#when\"><strong style=\"color: #1a56db;\">When does a document get its number?<\/strong><\/a><\/li>\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#gaps\"><strong style=\"color: #1a56db;\">Why are numbers out of sequence?<\/strong><\/a><\/li>\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#branches\"><strong style=\"color: #1a56db;\">Numbering with branches<\/strong><\/a><\/li>\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#errors\"><strong style=\"color: #1a56db;\">Error messages and solutions<\/strong><\/a><\/li>\n<li style=\"margin-bottom: 4px;\"><a style=\"color: #1a56db;\" href=\"#faq\"><strong style=\"color: #1a56db;\">FAQ<\/strong><\/a><\/li>\n<\/ol>\n<\/div>\n<h2 id=\"open\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Open the numbering settings<\/h2>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Directly from <a style=\"color: #1a56db;\" href=\"https:\/\/go.daftra.com\/owner\/settings\/numbering\/0\" target=\"_blank\" rel=\"noopener\"><strong style=\"color: #1a56db;\">Auto Numbering Settings<\/strong><\/a>.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Or from Settings \u203a <strong style=\"color: #111827;\">Auto Number Settings<\/strong>.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Or from the numbering button in the invoice, estimate, sales order or inventory settings.<\/li>\n<\/ul>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The page&#8217;s side menu groups documents by module, such as <strong style=\"color: #111827;\">Sales<\/strong>, <strong style=\"color: #111827;\">Inventory &amp; Purchases<\/strong> and <strong style=\"color: #111827;\">Accounting<\/strong>. Choose a document to edit its numbering. A document appears only if its app is active.<\/p>\n<h2 id=\"types\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Documents that have numbering<\/h2>\n<table style=\"width: 100%; border-collapse: collapse; margin: 0 0 18px;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Module<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Documents (default prefix)<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Sales<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Invoice (INV), Invoice Payment (PAY), Refund Receipt (RR), Estimate (EST), Credit Note (CN), Sales Debit Notes (DN), Sales Order, Advance Payment Invoice, Offers (OFR). Each additional invoice type has its own numbering.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">CRM<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Client (CUS)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Accounting<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Income (INC), Expense (EXP), Auto Journal (JNL), Manual Journal (JNL-M), Asset (AST)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Inventory &amp; Purchases<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Products (ITEM), Inbound Requisition (INR), Outbound Requisition (OBR), Transfer Requisition (TR), Stocktakings (STK), Stock Requests, Purchase Invoice (PI), Purchase Refund, Purchase Order (PO), Purchase Request (PR), Purchase Quotation (PQ), Supplier (SUP), and purchase notes and payments<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">HRM<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Employees (EMP), Contracts (CTR), Employee Assets, Employee Custody, Task<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Operations<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Work Order (WO), Booking, Lease Contracts, Manufacturing Orders, Bill of Materials, Production Plan<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Construction<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Bids, Construction Projects, Construction Contracts, Construction Payment Certificate, Cost Sheets, Quotations<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"options\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Numbering options<\/h2>\n<table style=\"width: 100%; border-collapse: collapse; margin: 0 0 18px;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Option<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Description<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Required<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Shown when<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Next Number<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The number the next document will get. A preview of the full number appears next to it.<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Yes<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Always<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Sequence Format<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Numeric digits (0, 1, 2, \u2026)<\/strong> (the default), letters, letters followed by numeric digits, or hexadecimal numbers.<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Yes<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Always<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Number of digits<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The length of the number, padded with leading zeros. Example: with 5 digits, the number 3 appears as 00003. If a number exceeds this length, it simply gets longer.<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">No<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Always<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Unique<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Prevents duplicate numbers and skips numbers already in use.<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">No<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Always<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Prefix<\/strong> and <strong style=\"color: #111827;\">Prefix Format<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Fixed or variable text before the number, such as INV- or INV-%Y-.<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">No<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">When the prefix is enabled<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Separate Manual Entry Numbering<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Gives manual journal entries their own sequence, separate from automatic entries.<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">No<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">In journal numbering<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Click <strong style=\"color: #111827;\">Save<\/strong>. The message <strong style=\"color: #111827;\">Numbering format has been saved<\/strong> appears. The new numbering applies to new documents only; existing documents keep their numbers.<\/p>\n<h2 id=\"prefix\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">The prefix and its variables<\/h2>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Click <strong style=\"color: #111827;\">Variables Guide<\/strong> to see all variables. The most common are:<\/p>\n<table style=\"width: 100%; border-collapse: collapse; margin: 0 0 18px;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Variable<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Replaced with<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Example<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">%Y<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Four-digit year<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">2026<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">%y<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Two-digit year<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">26<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">%m<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Two-digit month<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">03<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">%d<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Two-digit day<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">15<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"font-size: 18px; font-weight: bold; color: #111827; margin: 24px 0 10px;\">Example<\/h3>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The prefix INV-%Y-%m- with 4 digits gives: INV-2026-03-0001<\/p>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Variables use the date the document is created, not the document&#8217;s own date.<\/p>\n<h2 id=\"reset\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Yearly and monthly numbering<\/h2>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">When the prefix contains a variable, such as the year or month, choose what happens when it changes in <strong style=\"color: #111827;\">Prefix change options (only if the prefix is in a variable format)<\/strong>:<\/p>\n<table style=\"width: 100%; border-collapse: collapse; margin: 0 0 18px;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Option<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">What happens at the start of a new year or month<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Continue from The Last Number<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Numbering continues from the last number. Example: INV-2025-0150, then INV-2026-0151.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Create a Separate Serial for Each Prefix<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Each prefix has its own sequence. Example: INV-2026-0001.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Start from Beginning<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Numbering restarts from 1 whenever the prefix changes.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">For numbering that restarts every year, use the %Y prefix with <strong style=\"color: #111827;\">Start from Beginning<\/strong>.<\/p>\n<h2 id=\"manual\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Editing the number manually<\/h2>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">For sales invoices, refunds, notes and advance payments: enable <strong style=\"color: #111827;\">Manual Editing of Invoice Numbers<\/strong> in <a style=\"color: #1a56db;\" href=\"https:\/\/go.daftra.com\/owner\/invoices\/settings\" target=\"_blank\" rel=\"noopener\"><strong style=\"color: #1a56db;\">Invoice Settings<\/strong><\/a>. The number field then becomes editable when you create the document.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Estimate and sales order numbers are always editable.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">When Saudi e-invoicing is enabled, the invoice number can&#8217;t be edited.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">If you enter a number higher than the <strong style=\"color: #111827;\">Next Number<\/strong> with the same prefix, numbering continues after it. A lower number, or one in a different format, doesn&#8217;t change the sequence.<\/li>\n<\/ul>\n<h2 id=\"when\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">When does a document get its number?<\/h2>\n<ul style=\"margin: 0 0 16px; padding-left: 26px;\">\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The number shown when you open the create form is for display only. It isn&#8217;t reserved.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">The number is assigned when you save and issue the document. If another user saves a document at the same time, yours may get the next number.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">A draft doesn&#8217;t take a number from the sequence. It gets its number when it&#8217;s issued.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">If saving fails because of an error, the number isn&#8217;t used up.<\/li>\n<li style=\"margin-bottom: 10px; line-height: 1.9; font-size: 16px; color: #1f2430;\">A deleted document&#8217;s number isn&#8217;t reused.<\/li>\n<\/ul>\n<h2 id=\"gaps\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Why are numbers out of sequence?<\/h2>\n<table style=\"width: 100%; border-collapse: collapse; margin: 0 0 18px;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Cause<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Explanation<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">A higher number entered manually<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The sequence jumps to the entered number and skips the numbers in between.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Changing the <strong style=\"color: #111827;\">Next Number<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Numbering starts from the new number.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Deleted documents<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Deleted numbers aren&#8217;t used again.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Drafts issued later<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">A draft gets its number when issued, so number order can differ from date order.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Unique<\/strong> enabled<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The system skips numbers that were already used.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Branches<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Each branch has its own sequence, so numbers interleave when you view all branches together.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Prefix changes<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Depending on the prefix change option, numbering may continue or restart.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Invoice and journal types<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Each invoice type has its own sequence. Manual and automatic journal entries share one sequence unless you separate them.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Insurance invoices<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">They are created automatically and take numbers from the invoice sequence.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"branches\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Numbering with branches<\/h2>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">When branches are enabled, each branch has its own numbering settings and sequence. You can add the branch name or code to the prefix to tell documents apart. Branches, employees, employee contracts and some manufacturing settings use one numbering for all branches.<\/p>\n<h2 id=\"errors\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">Error messages and solutions<\/h2>\n<table style=\"width: 100%; border-collapse: collapse; margin: 0 0 18px;\">\n<tbody>\n<tr>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Cause<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Message<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; background: #f6f8fb; font-weight: bold;\">Solution<\/th>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The number is already used by another document and <strong style=\"color: #111827;\">Unique<\/strong> is enabled.<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Serial number already exists<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Change the number, or leave it to automatic numbering.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The <strong style=\"color: #111827;\">Next Number<\/strong> doesn&#8217;t match the sequence format.<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">Number must match the format chosen<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Enter a number in the same format, for example digits only for the numeric format.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The number field is empty or contains spaces.<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">The invoice number cannot accept spaces.<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Enter a valid number.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">The invoice is a Saudi e-invoice.<\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\"><strong style=\"color: #111827;\">According to the instructions of the Zakat and Income Authority, it is forbidden to delete or update the invoice after it has been issued\u2026<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top;\">Issue a refund receipt or a credit note.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"faq\" style=\"font-size: 22px; font-weight: bold; color: #111827; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef0f3;\">FAQ<\/h2>\n<h3 style=\"font-size: 18px; font-weight: bold; color: #111827; margin: 24px 0 10px;\">How do I change the next invoice number?<\/h3>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">In <a style=\"color: #1a56db;\" href=\"https:\/\/go.daftra.com\/owner\/settings\/numbering\/0\" target=\"_blank\" rel=\"noopener\"><strong style=\"color: #1a56db;\">Auto Numbering Settings<\/strong><\/a>, choose <strong style=\"color: #111827;\">Invoice<\/strong> and change the <strong style=\"color: #111827;\">Next Number<\/strong>.<\/p>\n<h3 style=\"font-size: 18px; font-weight: bold; color: #111827; margin: 24px 0 10px;\">I deleted an invoice. Why wasn&#8217;t its number used again?<\/h3>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Numbers aren&#8217;t reused after deletion, to keep the sequence intact.<\/p>\n<h3 style=\"font-size: 18px; font-weight: bold; color: #111827; margin: 24px 0 10px;\">How do I make numbering restart from 1 every year?<\/h3>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Add %Y to the prefix and choose <strong style=\"color: #111827;\">Start from Beginning<\/strong>.<\/p>\n<h3 style=\"font-size: 18px; font-weight: bold; color: #111827; margin: 24px 0 10px;\">Why can&#8217;t I edit the invoice number?<\/h3>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Either <strong style=\"color: #111827;\">Manual Editing of Invoice Numbers<\/strong> is off in the invoice settings, or Saudi e-invoicing is enabled.<\/p>\n<h3 style=\"font-size: 18px; font-weight: bold; color: #111827; margin: 24px 0 10px;\">The saved number differs from the one I saw when creating the invoice. Why?<\/h3>\n<p style=\"margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: #1f2430;\">Another user saved an invoice before you, so your invoice got the next number.<\/p>\n<\/div>\n","protected":false},"author":39,"featured_media":0,"template":"","categories":[2053,2043],"tags":[17842,3867,22724,22730,22732,22725,22723,22729,22728,22727,22726,22731],"class_list":["post-150909","tutorial","type-tutorial","status-publish","hentry","category-auto-number-settings","category-settings","tag-auto-number-settings","tag-auto-numbering-settings","tag-document-numbering","tag-how-to-change-the-next-invoice-number","tag-how-to-restart-invoice-numbering-every-year","tag-invoice-number-prefix","tag-invoice-numbering","tag-numbering-gaps","tag-reset-numbering-yearly","tag-sequential-numbering","tag-serial-number-format","tag-why-are-my-invoice-numbers-out-of-sequence"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Auto Numbering for Documents: Set the Prefix and Starting Number - Daftra Knowledge Base<\/title>\n<meta name=\"description\" content=\"Learn how to set up auto numbering for documents, add a prefix like the year, set the starting number, reset numbering yearly, and fix numbering gaps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Auto Numbering for Documents: Set the Prefix and Starting Number - Daftra Knowledge Base\" \/>\n<meta property=\"og:description\" content=\"Learn how to set up auto numbering for documents, add a prefix like the year, set the starting number, reset numbering yearly, and fix numbering gaps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/\" \/>\n<meta property=\"og:site_name\" content=\"Daftra Knowledge Base\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-18T07:48:53+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/docs.daftra.com\/#organization\",\"name\":\"Daftra\",\"url\":\"https:\/\/docs.daftra.com\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/docs.daftra.com\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/docs.daftra.com\/wp-content\/uploads\/2023\/10\/daftra-ar.svg\",\"contentUrl\":\"https:\/\/docs.daftra.com\/wp-content\/uploads\/2023\/10\/daftra-ar.svg\",\"caption\":\"Daftra\"},\"image\":{\"@id\":\"https:\/\/docs.daftra.com\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/docs.daftra.com\/#website\",\"url\":\"https:\/\/docs.daftra.com\/\",\"name\":\"Daftra Knowledge Base\",\"description\":\"Daftra\",\"publisher\":{\"@id\":\"https:\/\/docs.daftra.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/docs.daftra.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/#webpage\",\"url\":\"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/\",\"name\":\"Auto Numbering for Documents: Set the Prefix and Starting Number - Daftra Knowledge Base\",\"isPartOf\":{\"@id\":\"https:\/\/docs.daftra.com\/#website\"},\"datePublished\":\"2026-10-14T15:08:34+00:00\",\"dateModified\":\"2026-10-18T07:48:53+00:00\",\"description\":\"Learn how to set up auto numbering for documents, add a prefix like the year, set the starting number, reset numbering yearly, and fix numbering gaps.\",\"breadcrumb\":{\"@id\":\"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/docs.daftra.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Auto Numbering for Documents: Set the Prefix and Starting Number\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Auto Numbering for Documents: Set the Prefix and Starting Number - Daftra Knowledge Base","description":"Learn how to set up auto numbering for documents, add a prefix like the year, set the starting number, reset numbering yearly, and fix numbering gaps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/","og_locale":"en_US","og_type":"article","og_title":"Auto Numbering for Documents: Set the Prefix and Starting Number - Daftra Knowledge Base","og_description":"Learn how to set up auto numbering for documents, add a prefix like the year, set the starting number, reset numbering yearly, and fix numbering gaps.","og_url":"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/","og_site_name":"Daftra Knowledge Base","article_modified_time":"2026-10-18T07:48:53+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/docs.daftra.com\/#organization","name":"Daftra","url":"https:\/\/docs.daftra.com\/","sameAs":[],"logo":{"@type":"ImageObject","@id":"https:\/\/docs.daftra.com\/#logo","inLanguage":"en-US","url":"https:\/\/docs.daftra.com\/wp-content\/uploads\/2023\/10\/daftra-ar.svg","contentUrl":"https:\/\/docs.daftra.com\/wp-content\/uploads\/2023\/10\/daftra-ar.svg","caption":"Daftra"},"image":{"@id":"https:\/\/docs.daftra.com\/#logo"}},{"@type":"WebSite","@id":"https:\/\/docs.daftra.com\/#website","url":"https:\/\/docs.daftra.com\/","name":"Daftra Knowledge Base","description":"Daftra","publisher":{"@id":"https:\/\/docs.daftra.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/docs.daftra.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/#webpage","url":"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/","name":"Auto Numbering for Documents: Set the Prefix and Starting Number - Daftra Knowledge Base","isPartOf":{"@id":"https:\/\/docs.daftra.com\/#website"},"datePublished":"2026-10-14T15:08:34+00:00","dateModified":"2026-10-18T07:48:53+00:00","description":"Learn how to set up auto numbering for documents, add a prefix like the year, set the starting number, reset numbering yearly, and fix numbering gaps.","breadcrumb":{"@id":"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/docs.daftra.com\/en\/tutorial\/auto-numbering-for-documents-set-the-prefix-and-starting-number\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/docs.daftra.com\/en\/"},{"@type":"ListItem","position":2,"name":"Auto Numbering for Documents: Set the Prefix and Starting Number"}]}]}},"_links":{"self":[{"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/tutorial\/150909","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/types\/tutorial"}],"author":[{"embeddable":true,"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/users\/39"}],"version-history":[{"count":2,"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/tutorial\/150909\/revisions"}],"predecessor-version":[{"id":150911,"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/tutorial\/150909\/revisions\/150911"}],"wp:attachment":[{"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/media?parent=150909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/categories?post=150909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.daftra.com\/en\/wp-json\/wp\/v2\/tags?post=150909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}