Skip to content

Purchase GRN Stock In Applet (Internal)

Put a delivery into stock, and update its cost, the moment it arrives, then match the supplier’s bill later on the invoice type that does not stock in. This is the posting sibling of the plain GRN, and each company should use one pair or the other: mixing the two double-counts stock.

Overview

The Purchase GRN Stock In Applet (Internal) records the physical receipt of goods from a supplier and books them into stock on FINAL. It is the receiving document for tenants that want inventory and cost updated the moment the goods arrive, with the supplier’s invoice matched later. Warehouse or receiving staff create it against a Purchase Order (or by searching items directly); finance follows it with a Purchase Invoice No Stock In.

This applet is one of two receiving documents on the purchase side and the two behave very differently in the backend:

DocumentServer document typeQuantityAmountWhat FINAL does
Purchase GRN Stock In (this applet)INTERNAL_PURCHASE_GRN_STOCK_IN (short code PURGRNSI)+1−1Creates inventory transactions, updates the item’s moving-average cost, posts a journal to Inventory Not Invoiced / Creditor Not Invoiced, opens the lines for the PI No Stock In.
Purchase GRN (Internal)INTERNAL_PURCHASE_GOODS_RECEIVED_NOTE00Records receipt only; the Purchase Invoice moves stock and books the creditor.

Pick one pair per company and configure the Knock Off Configuration accordingly; mixing them double-counts stock (see Troubleshooting).

Where it fits

Modules: Purchasing and inventory.

DirectionDocument / appletRelationship
UpstreamPurchase Order (Internal), Purchase Requisition (Internal), Purchase Invoice (Internal)Knock-off sources. The KO For tab offers Purchase Order; the line editor’s KO sub-tabs (PO, PR, PI) appear only when the company’s Knock Off Configuration has an enabled LINE row for that source type.
DownstreamPurchase Invoice No Stock In (Internal)The invoice that settles a GRN Stock In. The backend converter PurchaseGRNStockInToPurchaseInvoiceNoInStockConverter can create it automatically from the open queue.
ReversalPurchase Return (Internal)Sends goods back to the supplier (quantity −1, amount +1). Purchase GIN (Internal) is a dispatch record only (0/0) and does not reverse this document’s stock.
SiblingPurchase GRN (Internal)The non-posting receipt, paired with the ordinary Purchase Invoice.
Supplier-side viewPurchase GRN Supplier Access (Internal), Supplier Delivery OrderExternal views of receipts and deliveries.
Stock enquiriesStock Availability, Stock BalanceStock Availability’s Details listing counts DRAFT GRN Stock In lines as GRN Stock In draft balance (HIDE_GRN_STOCK_IN_DRAFT_BALANCE option) and open PO→GRN Stock In queue rows as po_qty. Neither is in the main listing’s Available figure, which counts only open sales orders and plain GRNs not yet invoiced. A FINAL GRN Stock In is in it through the balance itself.

Screens and menus

The applet has two menu items: Internal Purchase GRN Stock In (the document listing) and Line Items (every GRN Stock In line across documents; the File Export menu is present in the code but commented out).

Listing. Columns: Doc Short Code (PURGRNSI), Doc No (Tenant / Company / Branch), Invoice No and the other external references, Supplier Name, Branch, Transaction Date, posting status, AR/AP balance columns and ordered / received / outstanding quantity and amount columns; every column is governed by a HIDE_* setting with a matching SHOW_* permission (see Configuration). Toolbar buttons: FINAL (multi-select, DRAFT rows only), DISCARD (DRAFT rows), VOID (FINAL rows), SINGLE/MULTIPLE PRINT, and an opt-in DRAFT button that sends FINAL documents back to draft. A DEFAULT_TRANSACTION_DATE preset and the DEFAULT_STATUS filter shape the initial query.

Purchase GRN Stock In listing with FINAL, DISCARD, VOID and print buttons, and the create form open on the KO For tab
Listing (left) and the create form's KO For → Purchase Order tab (right), staging tenant with test data.

Create form tabs: Search (intercompany, permission-gated), Main Details, Account, Lines, Delivery Details, Payment, KO For (Purchase Order), Department Hdr. CREATE is enabled once Main Details is valid, a supplier is selected and at least one line exists.

Edit form tabs (order configurable in Default Selection): Search Document (TEMP documents only: Search Purchase Order and Search Purchase GRN, which clones a FINAL GRN Stock In), Main Details, Account, Lines, Delivery Details, KO For (TEMP only), Payment, Department Hdr, TraceDocument, Contra, Doc Link, Export, Attachments, Status. Buttons: RESET, SAVE, FINAL, VOID, DISCARD and (when the applet extension SHOW_DOCUMENT_DELETE_BUTTON is set on the applet record) a two-click DELETE for non-FINAL documents. All tabs can be rendered as vertical expansion panels (VERTICAL_ORIENTATION).

Line editor (Add / Edit Line Item): Item Details (Main Details, Delivery Instruction, Child Items for grouped / bundle items, Department, Doc Link in edit mode, Multi Discount, Delivery Details), Serial Number / Batch Number / Bin Number (shown according to the item’s sub_item_type), Costing Details, Pricing Details, Issue Link. The Lines tab itself offers Search Item plus KO For Purchase Order / Requisition / Invoice sub-tabs.

Line Items listing with the Edit Line Item panel open on Item Details
Line Items menu: every GRN Stock In line in the tenant, with the line editor on the right (staging tenant, test data).

Settings menu (System Configuration): Application Settings, Default Selection, Printable Format Settings, Branch Settings, Custom Status; the routes also expose Webhook, Feature Visibility, Release Notes, Applet Log and the shared permission listings (client-side permission, role pricing scheme link, permission wizard, permission set, user / team / role permission). Personalization: Default Selection and Sidebar.

Configuration

Before you can use it

  • Company, branch and locations in Organisation. Branch, Company and Location are required on the header; Delivery Branch / Delivery Location default to them. Stock is booked to the line’s delivery location, else the line’s store, else the header location, else the branch’s default location (InventoryTransactionLineFactory), so every receiving branch needs a default location.
  • Default GL codes for the company: INVENTORY_NOT_INVOICED, CREDITOR_NOT_INVOICED and, when tax lines exist, INPUT_TAX (company GL-code links, set up through Chart of Account / the company’s default GL mapping). Without CREDITOR_NOT_INVOICED the journal job throws MISSING_DEFAULT_GL_CODE: CREDITOR_NOT_INVOICED; without INVENTORY_NOT_INVOICED the purchase lines are silently omitted: with no tax on the GRN nothing is left and the job fails with NO_JOURNAL_CREATED, but if some lines (or tax lines) still resolved, the accrual line is built from them and the journal posts short with no error. The job fails with TOTAL_DEBITS_AND_TOTAL_CREDITS_NOT_BALANCES only when the supplier has no AR/AP type.
  • Knock Off Configuration for the company (Organisation → Company → Knock Off Configuration): an enabled INTERNAL_PURCHASE_ORDER → INTERNAL_PURCHASE_GRN_STOCK_IN row so POs appear in KO For, and an INTERNAL_PURCHASE_GRN_STOCK_IN → INTERNAL_PURCHASE_INVOICE_NO_STOCK_IN row so FINAL GRNs are queued for the invoice. The same row’s second posting status decides whether the auto-created PI No Stock In is DRAFT or FINAL.
  • Suppliers in Supplier; the entity’s AR/AP type is read but overridden to CREDITOR_NOT_INVOICED for this document type.
  • Items in Doc Item Maintenance / Inv Item Maintenance: only basic / alias items with an inventory item link (or serialised coupons) create inventory transactions; grouped and bundle items post through their component links.
  • Tax codes in Tax Configuration if input tax is captured on lines.
  • Running numbers for INTERNAL_PURCHASE_GRN_STOCK_IN are assigned by the backend on FINAL.
  • Backend permissions: TNT_API_DOC_INTERNAL_PURCHASE_GRN_STOCK_IN_CREATE / READ / UPDATE / DELETE_TGT_GUID. The KO For and Search Purchase Order screens additionally read the …_DELIVERY_BRANCH_READ target so a user can receive into a delivery branch they are not a member of.

Applet settings

Where settings live:

ScreenComponentWhat it holds
Settings → Application Settings (field-settings)The shared settings screenThe HIDE_* / ENABLE_* toggles below. The shared screen covers this applet’s Search, Department Hdr, KO, Contra, Doc Link, Attachments, Export, Status, Delivery Details and Payment tabs and its purchase-family keys — 117 of the 212 keys this applet has.
Inline gearOn 8 screens: listing (41 keys), edit form (32), create form (9), Main Details (33), Line Items listing (5), line editor (8), Item Details (4), line Main Details (22)Master and personal overrides for the listed keys. Five keys are gear-only for this applet (HIDE_AMOUNT_MAIN_LISTING, HIDE_CREDIT_TERMS, HIDE_REFERENCE, HIDE_REMARKS, HIDE_TRACE_DOCUMENT_TAB).
Settings → Default SelectionThis applet’s own screenDefault Branch, Default Location (auto-filled with the branch’s main location), Unit Price Decimal Precision, and drag-and-drop Details Tab Ordering (INTERNAL_PURCHASE_GRN_DETAILS_TAB_ORDER).
Settings → Printable Format SettingsThis applet’s own listing with “set default”PRINTABLE (default print template for Export and bulk print).
Settings → Branch SettingsThis applet’s own screen, per branchBranch Details, Default Settlement Method, Item Category Filter, Menu List, Pricing Scheme, Printable Format (per-branch default template for this document type, used by Export ahead of PRINTABLE).
Settings → Custom StatusThis applet’s own screenFive header statuses (ENABLE_ / NAME_ / LIST_CUSTOM_STATUS_HDR_1…5). Line statuses can be set up but are never used.
Personalization → Default SelectionThis applet’s own screenPersonal Default Branch / Location; your personal values win over the applet-wide ones.

Master settings are changed by OWNER / ADMIN users through the Settings menu or the gear’s master mode; personal mode on the gear and Personalization are open to every user. Defaults: every toggle below is off / empty unless the row says otherwise — the shared screen patches the stored value or false, and the document code treats an absent key as “not hidden”.

The table lists the keys that are shown on a settings screen or gear, saved, and actually used by this applet.

SettingWhat it controlsDefaultEffect when changed
DEFAULT_TRANSACTION_DATEListing date preset (1_day, 1_week, 1_month)emptyEmpty is not “no filter” — it behaves as one month, so the listing always opens on the last month’s GRNs and an older one is found only by searching. The preset applies to the first load; the Line Items listing follows the same setting.
DEFAULT_POSTING_STATUS, SORT_ORDERListing default filter and orderingemptyShared listing behaviour.
DISABLE_GEN_DOC_LISTINGSuppresses the listing’s first loadoffThe grid opens empty instead of running the default search. It does not lock anything — Create still works, rows still open, and a search you run yourself still fills the grid. Use it where the default month’s worth of GRNs is large enough to make the screen slow to open. The Purchase GIN applet’s key of the same name behaves differently and does lock the listing.
ENABLE_AUTO_POPUPPrint after FINALoffAfter a FINAL from the listing, the documents are printed with the default template. It needs a default in Printable Format Settings: without one the FINAL still goes through and the print fails with No Default Printable Selected.
ENABLE_SELECT_MODESelect Supplier listingoffAdds a Select / Create-Edit switch to the supplier picker, and only for users who may also create and edit suppliers. The picker starts in Select mode, where a click picks the supplier; in Create/Edit mode a click opens that supplier’s record for editing instead of putting it on the GRN.
HIDE_GENDOC_FINAL_BUTTON, HIDE_GENDOC_VOID_BUTTON, HIDE_GENDOC_DISCARD_BUTTON, HIDE_GENDOC_SAVE_BUTTONListing and edit-form action buttonsoffHide the button for everyone; the matching SHOW_GENDOC_* client-side permission re-shows it per role (not seeded, see below). HIDE_GENDOC_SAVE_BUTTON is read by the edit template only.
HIDE_SERVER_DOC_1, HIDE_SERVER_DOC_2, HIDE_SERVER_DOC_3, HIDE_CLIENT_DOC_TYPE, HIDE_CLIENT_DOC_1…5Document-number and client-document columns / fieldsoffHidden on the listing and Main Details; SHOW_DOC_NO_TENANT / COMPANY / BRANCH and SHOW_CLIENT_DOC_* permissions re-show them.
HIDE_EXTERNAL_QUOTATION, HIDE_EXTERNAL_ORDER, HIDE_EXTERNAL_DELIVERY_ORDER, HIDE_EXTERNAL_INVOICE, HIDE_EXTERNAL_OTHERS (fallback keys HIDE_QUOTATION, HIDE_ORDER, HIDE_DELIVERY_ORDER, HIDE_INVOICE, HIDE_OTHERS)External Quotation / Order / Delivery Order / Invoice / Others number and date fields and listing columnsoffThe HIDE_EXTERNAL_* key wins when set; otherwise the bare key is read.
HIDE_ARAP_PNS, HIDE_ARAP_SETTLEMENT, HIDE_ARAP_DOC_OPEN, HIDE_ARAP_CONTRA, HIDE_ARAP_BALAR/AP amount columns on the listingoffHIDE_MAIN_ARAP_TAB (gear, no model key) hides all five at once.
HIDE_AMOUNT_TXN_MAIN_LISTING, HIDE_AMOUNT_MAIN_LISTING, HIDE_QTY_MAIN_LISTINGAmount ordered / received / outstanding and quantity columns on the listingoffEither amount key hides the amount columns.
HIDE_ACCOUNT_TAB_DETAILS, HIDE_ACCOUNT_BILLING_CONTACT, HIDE_ACCOUNT_SHIPPING_CONTACTAccount tab and its Bill To / Ship To panels; Supplier Name listing columnoffSHOW_ACCOUNT_TAB_DETAILS permission re-shows the tab.
HIDE_LOCATION, HIDE_DELIVERY_BRANCH, HIDE_DELIVERY_LOCATIONMain Details location fields and the KO grids’ delivery columnsoffWith HIDE_DELIVERY_LOCATION on, selecting a location copies branch and location into the delivery fields silently.
HIDE_CREDIT_TERMS, HIDE_REFERENCE, HIDE_REMARKS, HIDE_PERMIT_NO, HIDE_TRACKING_ID, HIDE_CREATED_BY_DETAILS, HIDE_BASE_CURRENCY, HIDE_CURRENCY, HIDE_DESCRIPTIONMain Details fieldsoffHide the field. The first three are gear-only for this applet code.
CANNOT_EDIT_CURRENCY_RATE, SHOW_FOREX_DATA_SOURCECurrency rate fieldoffThe first locks the rate as filled in. The second replaces the currency and rate fields with a forex data-source picker rather than adding one. Either way, Save on an existing foreign-currency GRN refuses a rate of zero with The currency rate cannot be ZERO.
ENABLE_EMPLOYEE_LOGIN_AUTO_DETECTIONPurchaseroffOn create, the purchaser is looked up from the logged-in user’s employee record.
ENABLE_DUPLICATE_REFERENCE_CHECKReference / external numbersoffWarns when the same reference already exists on another GRN Stock In.
HIDE_SEARCH_BY_DOCUMENT_BUTTON, HIDE_DELIVERY_DETAILS_TAB, HIDE_TRACE_DOCUMENT_TAB, HIDE_DOC_LINK_TAB, HIDE_EXPORT_TAB, HIDE_ATTACHMENT_TAB, HIDE_STATUS_TABEdit-form tabsoffHide the tab; SHOW_EXPORT_TAB permission re-shows Export.
EXPAND_MAIN_DETAILS, EXPAND_ACCOUNT, EXPAND_LINE_ITEMS, EXPAND_DELIVERY_DETAILS, EXPAND_KO_FOR, EXPAND_SETTLEMENT, EXPAND_DEPARTMENT_HDR, EXPAND_TRACE_DOCUMENT, EXPAND_MAIN_CONTRA, EXPAND_DOC_LINK, EXPAND_EXPORT, EXPAND_ATTACHMENT, VERTICAL_ORIENTATIONVertical layoutoffStacked expansion panels; the EXPAND_* flags choose the panel opened by default.
MAKE_ATTACHMENT_TAB_COMPULSORYAttachmentsoffEnforced on an existing GRN’s edit form only: opened with no attachment, its SAVE and FINAL stay greyed out and the Attachments tab is marked. The check is made when the GRN is opened. A new GRN can be created without one, and FINAL from the listing does not check at all — so a reviewer who finalises in bulk bypasses it.
HIDE_SERIAL_NUMBER, HIDE_BATCH_NUMBER, HIDE_BIN_NUMBER, HIDE_BATCH_ISSUE_DATE, HIDE_BATCH_EXPIRY_DATELine editor tracking tabs and batch date fieldsoffHide the tab / field; the backend still validates whatever is stored (see Lifecycle).
HIDE_COSTING_DETAILS, HIDE_PRICING_DETAILS, HIDE_ISSUE_LINK, HIDE_DOC_LINK, HIDE_DELIVERY_DETAILS, HIDE_DELIVERY_INSTRUCTION, HIDE_DEPARTMENTLine editor tabsoffHide the tab; SHOW_COSTING_DETAILS permission re-shows Costing Details.
HIDE_SEGMENT, HIDE_DIMENSION, HIDE_PROFIT_CENTER, HIDE_PROJECTDepartment tab pickers (header and line)offHide the dimension.
HIDE_QTY_BASE, HIDE_QTY_UOM, HIDE_UOM_TO_BASE_RATIO, HIDE_UNIT_PRICE_STD_PRICING_SCHEME, HIDE_UNIT_PRICE_STD_INCL_TAX, HIDE_UNIT_PRICE_STD_EXCL_TAX, HIDE_UNIT_PRICE_STD_UOM_INCL_TAX, HIDE_UNIT_PRICE_STD_UOM_EXCL_TAX, HIDE_UNIT_PRICE_NET_EXCL_TAX, HIDE_UNIT_PRICE_NET_UOM_EXCL_TAX, HIDE_UNIT_PRICE_TXN, HIDE_UNIT_PRICE_TXN_UOM_INCL_TAX, HIDE_UNIT_DISCOUNT, HIDE_UNIT_DISCOUNT_UOM_EXCL_TAX, HIDE_AMOUNT_STD_EXCL_TAX, HIDE_DISCOUNT_AMOUNT_EXCL_TAX, HIDE_AMOUNT_NET_EXCL_TAX, HIDE_AMOUNT_TXN, HIDE_TAX_CONFIG_SELECTION, HIDE_WHT_CONFIG_SELECTION, HIDE_LAST_PURCHASE_PRICE, HIDE_GROUP_DISCOUNT_PERCENTAGE, HIDE_LINE_ITEMS_GL_CODELine Main Details quantity / price / tax fieldsoffHide the field for everyone; the matching seeded SHOW_* permission re-shows it for a role.
HIDE_TOTAL_TXN_AMOUNT, HIDE_TOTAL_SST_VAT_GST_AMOUNTTotals on the Lines taboffRe-shown by SHOW_TOTAL_TXN_AMOUNT / SHOW_TOTAL_SST_VAT_GST_AMOUNT.
ENABLE_EDITING_UNIT_PRICE_STDUnit Price STDoffMakes the standard price editable (the shared screen shows this control for every applet).
DISABLE_EDITING_AMOUNT_TXNTransaction amount on linesoffNormally, typing a line amount keeps the standard price and books the difference as a discount per unit — so an amount typed to match the supplier’s invoice turns into a discount on the line. This switch locks the amount so it can only follow the price.
ENABLE_ITEM_NAME_MAX_LIMIT, ITEM_NAME_MAX_LIMIT, DISABLE_LINE_ITEM_NAME_EDITItem Name on linesoff / emptyCharacter counter and limit; lock the name.
ENABLE_MULTIPLE_KOKO For and line KO gridsoffAllows selecting lines from several source documents in one knock-off; otherwise the grid is single-document.
EDIT_CONTRA_TXN_DATEContra taboffOff, a contra is dated with the date of the document it is set against, not today — so a contra against last quarter’s invoice lands in last quarter. On, the date starts at today and can be changed.
DEFAULT_BRANCH, DEFAULT_LOCATION, DEFAULT_COMPANY (Default Selection, also personal)New-document headeremptyApplied as Branch / Location / Company when a document is created (branch from the picker wins if one was chosen first).
DEFAULT_DECIMAL_PRECISION (Default Selection)Unit price decimals on lines2 (DEFAULTS.DECIMAL_PRECISION)Sets the decimal places and step of every price field. This is the “3 decimal places for unit price” request.
INTERNAL_PURCHASE_GRN_DETAILS_TAB_ORDER (Default Selection)Edit-form tab orderSearch Document, Main Details, KO For, Account, Lines, Delivery Details, Payment, Department Hdr, TraceDocument, Contra, Doc Link, Export, Attachments, StatusSaved order applied to the edit form; new tabs are appended.
PRINTABLE (Printable Format Settings)Default templateemptyPre-selects the template on Export and bulk print; a Branch Settings → Printable Format default for the branch overrides it.

Custom Status (ENABLE_ / NAME_ / LIST_CUSTOM_STATUS_HDR_1…5) adds up to five header status pickers to the Status tab; they label a GRN and gate nothing (see Workflow / approval below).

Read at runtime without a model declaration (set them through a gear or by API): HIDE_KO_FOR_TAB, HIDE_MAIN_PAYMENT_TAB, HIDE_DEPARTMENT_HDR_TAB, HIDE_MAIN_CONTRA_TAB, HIDE_MAIN_ARAP_TAB, EXPAND_PAYMENT, EXPAND_STATUS, HIDE_LISTING_BRANCH, HIDE_TRANSACTION_DATE (listing columns), SHOW_DRAFT_BUTTON (opt-in listing button that returns FINAL documents to DRAFT; also a permission code), HIDE_LINE_ITEM_PRICING (Lines-tab price columns, paired with the INTERNAL_PURCHASE_GRN_DISPLAY_PRICING permission), DISABLE_ADD_WHEN_KO (blocks Search Item once a knock-off exists), SHOW_ITEM_STOCK_BALANCE, DISABLE_ITEM_LISTING, HIDE_MULTI_DISCOUNT, ENABLE_DRAFT_LOCK_SERIAL_NUMBER_CHECKING, DISABLE_DEFAULT_SETTING_ADVANCE_SEARCH, FUZZY_SEARCH_COLUMNS, DEFAULT_STATUS.

Read without any control for this applet code (declared and consumed, but gated out of the shared screen and on no gear): ENABLE_SERIAL_NUMBER_VALIDATION_FINAL (the flag it sends on FINAL is irrelevant here because the lines are signum +1 and always validated, but it also makes FINAL first ask the serial-number check about every serialised line and stop with Unable to post the document to FINAL: Serial numbers are invalid. if any serial comes back invalid; that pre-check is the key’s one real effect in this applet, and nothing on its settings screens can switch it), SERIAL_NUMBER_QTY_FOLLOW_BASIC_QTY, HIDE_CREDIT_LIMIT, HIDE_EXTERNAL_REMARKS, HIDE_FILE_EXPORT_MENU, ENABLE_FILTER_BY_TODAYS_TXN, DEFAULT_ORIENTATION, DEFAULT_DECIMAL_STEP (derived from the precision), and the fifteen MANDATORY_* keys (MANDATORY_QUOTATION / ORDER / DELIVERY_ORDER / INVOICE / OTHERS and their _DATE twins, MANDATORY_BIN_NUMBER, MANDATORY_SEGMENT / DIMENSION / PROFIT_CENTER / PROJECT) that add Validators.required to the external-document and department fields.

Declared and rendered but never read (saved and ignored): EXPAND_DELIVERY_TRIPS, EXPAND_MAIN_ARAP, EXPAND_POSTING, and the 41 model-only keys (DISALLOW_DUPLICATE_INVOICE, SHOW_VOID_BUTTON, DEFAULT_TOGGLE_COLUMN, HIDE_MAIN_DETAILS_*, ENABLE_ / INCLUDE_ dimension, SST and WHT flags, and the line-level custom status keys). The gears also carry HIDE_REASON, SHOW_GL_DIMENSION, SHOW_SEGMENT, SHOW_PROFIT_CENTER, SHOW_PROJECT as settings; the listing reads the last four as opt-in column settings or permissions.

Document behaviour settings

  • Posting is not configurable in the applet: FINAL is fixed at quantity +1 / amount −1 (see Lifecycle). The FINAL request carries at most two flags, and neither changes what the server does here: validate_serial_signum_zero (from ENABLE_SERIAL_NUMBER_VALIDATION_FINAL), because a +1 document’s serials are always checked, and validate_stock_balance: true (when SHOW_ITEM_STOCK_BALANCE is on), which is already the backend default and only checks negative-signum lines.
  • Serial numbers before FINAL: on every line save the applet calls validateMultiSerialNumbers with txn_type: PURCHASE and server_doc_types: [INTERNAL_PURCHASE_GRN_STOCK_IN, INTERNAL_PURCHASE_INVOICE]; serials already live in the company are flagged and the FINAL button is disabled while a line carries an invalid serial. Batch lines must have batch quantities that add up to the line quantity.
  • Status flow options: SHOW_DRAFT_BUTTON (setting or permission) exposes the FINAL → DRAFT action; HIDE_GENDOC_* hide FINAL / VOID / DISCARD; SHOW_DOCUMENT_DELETE_BUTTON on the applet’s APPLET_SETTINGS extension exposes DELETE.
  • Printables: Jasper templates from Printable Format Settings; default from Branch Settings → Printable Format, else PRINTABLE. The PRINTABLE_FORMAT_WITH_NO_PRICE permission restricts the Export picker to templates in the no_price category. Export offers EXPORT AS PDF only (CSV / DOCX / ZIP are commented out) and is disabled for VOID documents.
  • Workflow / approval: none wired. Custom Status is a label, not a gate.
  • e-Invoice: not applicable to this document type.

Feature visibility / permissions

51 client-side permissions are defined for this applet and 48 of them are used: the SHOW_* counterparts of the listing columns (SHOW_DOC_NO_TENANT / COMPANY / BRANCH, SHOW_CLIENT_DOC_TYPE, SHOW_CLIENT_DOC_1…5, SHOW_TRANSACTION_DATE, SHOW_ARAP_PNS / SETTLEMENT / DOC_OPEN / CONTRA / BAL, SHOW_AMOUNT_TXN_MAIN_LISTING, SHOW_DESCRIPTION), the line price / quantity / tax columns (SHOW_UNIT_PRICE_*, SHOW_UNIT_DISCOUNT*, SHOW_AMOUNT_*, SHOW_DISCOUNT_AMOUNT_EXCL_TAX, SHOW_QTY_BASE / UOM, SHOW_UOM_TO_BASE_RATIO, SHOW_TAX_CONFIG_SELECTION, SHOW_WHT_CONFIG_SELECTION, SHOW_LAST_PURCHASE_PRICE, SHOW_COSTING_DETAILS, SHOW_TOTAL_TXN_AMOUNT, SHOW_TOTAL_SST_VAT_GST_AMOUNT), SHOW_ACCOUNT_TAB_DETAILS, SHOW_EXPORT_TAB, SHOW_DRAFT_BUTTON, SHOW_INTERCOMPANY_PGRN_SCREEN (the create form’s intercompany Search tab), ALLOW_TO_CREATE_EDIT_ACCOUNT (create / edit suppliers from the picker), PRINTABLE_FORMAT_WITH_NO_PRICE, and INTERNAL_PURCHASE_GRN_DISPLAY_PRICING (unit price, tax, discount and amount columns on the Lines tab and the Line Items listing; OWNER / ADMIN rank passes automatically).

Seeded but never checked: SHOW_FINAL_BUTTON, SHOW_DISABLE_EDITING_AMOUNT_TXN_SETTING, IPGRN_HIDE_TRACKING_ID_AND_PERMIT_NO. Checked but not seeded: SHOW_GENDOC_FINAL_BUTTON, SHOW_GENDOC_VOID_BUTTON, SHOW_GENDOC_DISCARD_BUTTON (the re-show pairs of the HIDE_GENDOC_* settings), SHOW_LISTING_BRANCH, SHOW_QTY_MAIN_LISTING, SHOW_QUOTATION / ORDER / DELIVERY_ORDER / INVOICE / OTHERS, SHOW_GL_DIMENSION / SEGMENT / PROFIT_CENTER / PROJECT — until they are seeded a tenant-wide hide of those items cannot be reopened per role.

Feature Visibility and Webhook are the shared screens; the applet adds nothing to them.

Fields

Main Details

FieldMeaningRequiredNotes / validation
Company, Branch, LocationOwning company, branch and the store the goods are booked to (guid_store)Yes (all three, Validators.required)Branch fills Company and Currency; Location list is filtered by branch; defaults from Default Selection.
Delivery Branch, Delivery LocationWhere the goods physically arriveNoDefault to Branch / Location; written to the header and copied to each knocked-off line.
Transaction DateDocument dateDefaults to todayChecked against locked fiscal periods on FINAL.
PurchaserResponsible buyer (employee)NoAuto-filled with ENABLE_EMPLOYEE_LOGIN_AUTO_DETECTION.
Credit Terms, Credit LimitSupplier termsNoEach list is the supplier’s own terms and limits from its record. With exactly one, it is filled in for you; changing supplier clears a choice the new supplier does not have; a supplier with no credit terms leaves the field locked and empty. The choice is kept on the GRN’s copy of the supplier details and locks at FINAL.
Reference, Remarks, External Remarks, Description, Permit No, Tracking IDFree textNo unless a MANDATORY_* key is setRemarks has a character counter; ENABLE_DUPLICATE_REFERENCE_CHECK warns on duplicates.
External Quotation / Order / Delivery Order / Invoice / Others, each with a DateSupplier’s document numbers (xtn_doc_ref_1…5, _date)No unless MANDATORY_*Added in 2026; shown on the listing as columns.
Client Document Type, Client Doc 1…5 NoTenant-defined numberingNoHidden by HIDE_CLIENT_DOC_*.
Currency, Base Currency, Currency RateDocument currencyNoFrom the branch; rate locked by CANNOT_EDIT_CURRENCY_RATE.
Created By / Date, Modified By / DateAudit fieldsread-onlyHidden by HIDE_CREATED_BY_DETAILS.

Account

FieldMeaningRequiredNotes / validation
Entity (Supplier)Supplier entityYes (CREATE stays disabled without it)Picked from Select Supplier; new suppliers can be created inline with ALLOW_TO_CREATE_EDIT_ACCOUNT.
Bill To / Ship ToAddressesNoPicked from the supplier’s billing and shipping addresses, then copied onto the GRN — correcting the supplier’s address later changes the next GRN, not this one. The rest of the supplier block is also a copy, filled by the server only when it arrives empty.

Lines

FieldMeaningRequiredNotes / validation
ItemItem code / nameYesFrom Search Item, or copied by KO For Purchase Order / Requisition / Invoice (open lines only). A knocked-off line is linked to its source document.
QtyQuantity received (quantity_base)YesValidators.required, min(1); default 1.
Unit price, discount, tax, WHT fieldsPurchase costNoAll min(0); the line’s amount_txn is what the inventory transaction and moving-average cost use, so a zero-price stock-in leaves the item’s cost unestablished.
Serial numbersPer-unit serialsWhen the item is serialised and optional_sn is not setValidated against the company on save and on FINAL (a serial number that already exists in the company is refused); count must equal Qty.
Batch: batch no, issue date, expiry date, qtyBatch trackingYes on the Batch tabBatch quantities must sum to Qty; date fields hidden by HIDE_BATCH_ISSUE_DATE / HIDE_BATCH_EXPIRY_DATE.
Bin: bin code, container measure, container qty, qtyBin trackingYes on the Bin tabBackend rejects zero / missing container values.
Delivery Details (per line)Delivery branch and location for this lineNoCopied from the header; the backend books the inventory transaction to the line’s delivery_location_guid first.
Department (segment, dimension, profit centre, project)Analysis codesNo unless MANDATORY_*Copied to the journal lines.
Costing Details, Issue LinkPlaceholder tabs—Neither shows real data. Costing Details is an empty grid on every line; Issue Link shows one built-in sample row that is not linked to any issue. Nothing on either tab is saved. For a line’s cost, look at the item in Stock Availability after FINAL.

Of the line editor’s other tabs, Pricing Details lists the purchase unit price the item carries in each pricing scheme, for reference while you price the line; Doc Link and Multi Discount are optional.

Delivery Details, Payment, Contra

FieldMeaningRequiredNotes / validation
Delivery Details tabPer-line delivery type, shipping branch, shipping location, tracking ID gridNoLocation list is the branch’s linked locations.
Payment linesSettlement-method lines (txn_type STL_MTHD, written as INTERNAL_RECEIPT_VOUCHER / INTERNAL_PAYMENT_VOUCHER lines)NoSales-side component reused on a purchase document; the amount guard compares with amount_open_balance. Settle the supplier on the PI No Stock In / Payment Voucher instead.
ContraContra entries against other FINAL documentsNoTransaction date editable with EDIT_CONTRA_TXN_DATE.

Lifecycle and effects

Statuses: DRAFT (new documents; SAVE keeps them here) → FINAL → VOID. DRAFT documents can be DISCARDED (listing or edit form, confirmation dialog) and FINAL documents can be returned to DRAFT with the opt-in DRAFT button. FINAL is a separate step from Save (with a one-second delay and a serial pre-check); a second FINAL is refused with HTTP 403 “Generic Document has already been posted to FINAL”. VOID and DRAFT are refused (“cannot be changed to VOID because it has already been linked with the following documents: PURINVNSI-…”, or “to draft” for DRAFT) when a downstream document has knocked this one off. DELETE (edit form, non-FINAL only, two clicks) deletes the document; only the screen stops you deleting a FINAL one. Search Purchase GRN clones a FINAL GRN Stock In into a new document.

What posting does:

FactValue
Document typeINTERNAL_PURCHASE_GRN_STOCK_IN, short code PURGRNSI
DirectionStock in, and a liability not yet invoiced
The journalFor each goods line: Dr Inventory Not Invoiced (net amount); Dr Input Tax for the tax; then one header line Cr Creditor Not Invoiced for the total. Purchase discount / return lines exist for negative lines.
Which GL codeheader GL → the item’s company GL link for INVENTORY_NOT_INVOICED → company default INVENTORY_NOT_INVOICED. The line’s own GL code is skipped for this document. The creditor line always uses the company default CREDITOR_NOT_INVOICED, and posting fails with MISSING_DEFAULT_GL_CODE: CREDITOR_NOT_INVOICED if it is missing.
StockOne inventory transaction per goods line; location = the line’s delivery location → the line’s store → the header’s store → the branch’s default location. The receipt’s amount is added to the company moving-average cost and the unit moving-average cost is recomputed.
Onward to the invoiceWhen the company’s Knock Off Configuration has the GRN Stock In → PI No Stock In row, the lines are opened for that invoice; with automatic conversion switched on, the invoice is created for you — DRAFT or FINAL according to that row (FINAL by default).
What VOID reversesThe void jobs your tenant has switched on reverse the stock (negated inventory lines, serial numbers unlocked, stock balance refreshed), post the reverse journal, close the lines opened for the invoice, and reverse tax and contra entries. Stock and cost are therefore reversed, but the moving-average cost is recomputed on the reversal, not restored to the pre-receipt value.
Back to DRAFTOffered here, and it is not a rewind. The listing carries a DRAFT button (hidden unless SHOW_DRAFT_BUTTON is enabled or the matching permission is held) that acts in bulk on the selected FINAL rows. It releases the knock-offs and document links and reverses no posting (the only follow-on job the platform registers for this step is the one that releases knock-offs): the stock, journal and cashbook postings stay as FINAL left them, and a second FINAL therefore posts nothing new — the stock step silently writes nothing because the document is already marked posted. Edit between the two and the document and the stock ledger disagree with no message anywhere. So DRAFT is the right tool when the receipt matched the wrong purchase order, and the wrong one when the receipt itself is wrong. If it has posted, VOID it and key a new one — see What a Void Undoes.

What FINAL actually does:

  1. Validation: forex rate; serial numbers — no duplicates within the document, count equal to the line quantity, and because this is stock coming in, every serial must not already exist in the company; bins; a refusal when the transaction date is inside a LOCK_ALL / LOCK_TXN period. Stock-balance checks apply only to negative lines.
  2. Update the header, assign running numbers, set the finalised date.
  3. Start the main posting job, which applies the company’s include / exclude list and sets off the inventory, journal, knock-off, tax and webhook jobs. The inventory job marks the stock as posted and refreshes the current stock balance; the journal job posts the entries above; the knock-off job opens the GRN Stock In lines for the PI No Stock In and, if automatic conversion is switched on for your tenant, creates that invoice.

Related applets

Troubleshooting

SymptomCauseFix
Journal job fails with MISSING_DEFAULT_GL_CODE: CREDITOR_NOT_INVOICED after FINALThe company has no default GL code for CREDITOR_NOT_INVOICED; the document is already FINAL and stock is posted, only the journal is missing.Add the company default GL code, then re-post the journal (createJournalGenDocRePosting / journal re-post tool).
Journal job fails with TOTAL_DEBITS_AND_TOTAL_CREDITS_NOT_BALANCES, or NO_JOURNAL_CREATEDNo INVENTORY_NOT_INVOICED (or INPUT_TAX) GL could be resolved for one or more lines, so those lines were silently omitted — and either the supplier has no AR/AP type, so there is no accrual line to absorb them (TOTAL_DEBITS_AND_TOTAL_CREDITS_NOT_BALANCES), or no line resolved at all (NO_JOURNAL_CREATED). Line-level GL codes are ignored for this document type.Set the header GL, the item-company link with txn code INVENTORY_NOT_INVOICED, or the company default; re-post.
No error, but the goods-received-not-invoiced accrual and stock-not-invoiced accounts are short of what the GRNs receivedSome lines resolved no INVENTORY_NOT_INVOICED (or INPUT_TAX) GL and were left out; the CREDITOR_NOT_INVOICED line was built from the lines that remained, so the journal balanced and posted short. Trace Document finds nothing because a journal exists. Before go-live, check both codes have a company default, or every item its own linkSet the header GL, the item-company link or the company default; repost the affected GRNs.
Stock went to the wrong location, or lines of one document landed in different locationsEach line is booked to its own delivery_location_guid, then guid_store, then the header location, then the branch default. Lines knocked off from a PO carry the PO line’s delivery location; lines from Search Item carry the header location at the time they were added.Check the per-line Delivery Details before FINAL; correct with a stock transfer or Stock Adjustment after.
Stock counted twice (once on GRN Stock In, once on Purchase Invoice) — “double entry”Both documents are +1 stock documents. The Knock Off Configuration routed the GRN Stock In into an ordinary Purchase Invoice, or the invoice was raised separately.Use only the GRN Stock In → PI No Stock In pair (quantity 0) for companies that receive with this applet; void the duplicate.
Sales report shows 100 % gross profit / zero cost for items received hereThe stock-in lines carried amount_txn = 0, so nothing was added to the company moving-average cost.Enter the purchase price on the GRN Stock In lines before FINAL. A landed cost does not help: this screen takes none, and a landed cost entered elsewhere is kept in its own figures beside the moving average and never added to it. Correct existing items with Reset MA / stock adjustment after review.
PO still shows as open in Stock Availability after it was knocked off to a GRN Stock InThe queue row INTERNAL_PURCHASE_ORDER → INTERNAL_PURCHASE_GRN_STOCK_IN was not updated.Run the queue repair / data-fix-missing-queue; check the Knock Off Configuration row is enabled.
KO For lists no purchase ordersThe PO is not FINAL, is fully received, or the company has no enabled INTERNAL_PURCHASE_ORDER → INTERNAL_PURCHASE_GRN_STOCK_IN Knock Off Configuration row; the search also needs at least three characters and read permission on the PO’s branch or delivery branch.Fix the configuration; the KO grid reads the open queue, not the PO listing.
The line editor’s KO For Purchase Requisition / Invoice sub-tabs are missingThose sub-tabs render only when the company’s Knock Off Configuration has an enabled LINE flow row for INTERNAL_PURCHASE_REQUISITION / INTERNAL_PURCHASE_INVOICE.Add the row.
FINAL fails with a serial number “already exists for company” errorA serial on the document is already in stock (or was received on another draft); +1 documents always run this check.Remove or correct the serial; check for duplicate migration imports.
FINAL button greyed on the edit formA serialised line has an invalid serial, or a batch line’s batch quantities do not add up to the line quantity; on the listing, FINAL needs every selected row to be DRAFT with amount_net > 0.Fix the line; a zero-amount document can be finalised from the edit form only.
FINAL fails with “The selected date falls within a locked fiscal period”The transaction date is in a locked period.Change the transaction date or reopen the period.
VOID (or DRAFT) refused: “cannot be changed to VOID because it has already been linked with the following documents: PURINVNSI-…”A PI No Stock In (or other document) has knocked this GRN off.Void the downstream document first.
Line Items menu shows “No Data”Known listing issue; the query is by line server document type.Reload; report with the tenant if it persists.
Ordinary users see no prices on the Lines tab or Line Items listingINTERNAL_PURCHASE_GRN_DISPLAY_PRICING is not granted (OWNER / ADMIN rank passes automatically); HIDE_LINE_ITEM_PRICING hides the same columns tenant-wide.Grant the permission to the buyer role.
Unit price cannot take three decimalsDEFAULT_DECIMAL_PRECISION in Default Selection is 2.Change it there; it applies to every price field.
Document created from the intercompany Search tab does not move stockThe intercompany Search tab creates a Goods Received Note (no stock, no money) from the sales invoice, not a GRN Stock In; it appears in the Purchase GRN (Internal) applet.Receive intercompany deliveries with an ordinary PO knock-off, or use the GRN + Purchase Invoice pair for that company.
A HIDE_GENDOC_* button cannot be re-enabled for one roleThe SHOW_GENDOC_FINAL / VOID / DISCARD_BUTTON permission codes are checked but not seeded for this applet.Ask BigLedger to add the codes to this applet’s permission list, then grant them; the client-side permission listing grants only codes already on it.
Cannot find the “Attachment tab compulsory” switchIt is not on the edit-form gear.It is on Settings → Application Settings, in the Attachment panel beside Hide Attachment Tab; its label is the key itself, MAKE_ATTACHMENT_TAB_COMPULSORY, unless your language file names it.
Labels are English onlyInternationalisation is not implemented.None yet.

Related documentation

Last updated on