Sales GIN Stock Out (Internal)
The sales-side goods issue that actually takes stock out: after FINAL the stock items’ quantities leave the branch and location on its lines and the lines are journalled like a sale, which is what sets it apart from the similarly named Sales GIN, which moves and posts nothing. It is not installable from the applet store and is reached through the API. Do not also bill the same goods on a Sales Invoice: both take the stock out and both journal the sale, and no link between them stops it.
INTERNAL_SALES_GIN_STOCK_OUT, which is registered in the backend and reachable through the generic-document API. If you are looking for the goods issue note you can open from a menu, that is Sales GIN (Internal) — a different document with different effects, described below.Your job, and the screen for it
| The job | Screen or tab | Read |
|---|---|---|
| Take goods out of stock on a sales issue — through the API only: the applet is not in the applet store | The generic-document API; for a goods issue note on a menu, the Sales GIN (Internal) applet — a different document that moves nothing | Overview |
| Fill in the issue | (not in the applet store) Main Details, Account, Lines — Sales Agent, Member Card and Customer are required, so SAVE stays grey until a card is picked | Fields |
| Finalise it — no VOID on these screens; on Main Details only Remarks stays editable | FINAL on the listing or the edit screen — never also finalise a Sales Invoice for the same goods, or the stock comes out twice and the sale is booked twice | Lifecycle and effects; Where it fits |
| Check the due date after picking a credit term | Main Details › Due Date — an ordinary “30 days” term may leave no usable date; pick it by hand | Fields |
| Prepare the GL mapping, branch, location and stock | Chart of Accounts and Organisation applets — the sales posting group needs a default GL mapping | Before you can use it |
Overview
Sales GIN Stock Out (Internal) is the sales-side goods issue that actually takes stock out. Its server document type is INTERNAL_SALES_GIN_STOCK_OUT, whose quantity signum is −1 and amount signum is +1 — the same pair the Sales Invoice carries. Setting it to FINAL removes the issued quantities from the branch and location on the document, and produces journal lines under the SALES posting group.
That is the whole reason it is documented separately. The applet with the similar name, Sales GIN (Internal), writes INTERNAL_SALES_GOODS_ISSUED_NOTE, whose quantity and amount signums are both 0 — it records that goods were issued and changes nothing in the stock or general ledger.
| Sales GIN (Internal) | Sales GIN Stock Out (Internal) | |
|---|---|---|
| Server document type | INTERNAL_SALES_GOODS_ISSUED_NOTE | INTERNAL_SALES_GIN_STOCK_OUT |
| Quantity signum | 0 | −1 |
| Amount signum | 0 | +1 |
| Moves stock on FINAL | No | Yes |
| Posts a journal on FINAL | No | Yes, under the SALES group |
| In the applet registry | Yes (internalSalesGINApplet) | No |
Where it fits
| Upstream | This document | Downstream |
|---|---|---|
| A Sales Order (Internal) or other sales demand | The goods are picked, the GIN Stock Out is created and set to FINAL, and stock leaves the branch and location named on Main Details | No Sales Invoice for the same goods: this document already journals the sale (debtor, sales, output tax). Stock Balance reflects the reduction |
| Customer, branch, location and sales-agent master data | Read on the Main Details and Account tabs | — |
| — | Contra and Settlement tabs | Settlement lines are saved inside this document, typed as receipt or payment voucher lines (a cheque cannot be added: its required Cheque No box is read-only) |
Do not bill the same goods on a Sales Invoice as well. Both carry quantity signum −1 and both are journalled under the sales posting group, so the stock comes out twice and the sale is booked twice. A knock-off link would not prevent it: the Sales Invoice offers no GIN Stock Out to knock off, and an invoice line’s signs are fixed by its own document type.
Issue and bill on one of the two — and only the Sales Invoice is an e-invoice document type: a GIN Stock Out is never queued for an e-invoice automatically. If you want a goods-issue record before the invoice, use Sales GIN (Internal), which moves and posts nothing, and let the invoice take the stock out. Whoever reconciles stock at month-end can list the stock movements of GIN Stock Outs in the Stock Movement Report by filtering Server Doc Type to INTERNAL_SALES_GIN_STOCK_OUT (see Stock at the close) and compare them with the same customers’ Sales Invoices for the period.
Screens and menus
Two menu entries, plus settings and personalization.
| Menu | Route | What it shows |
|---|---|---|
| Internal Sales GIN Stock Out | internal-sales-gin-stock-out | The document listing, and the create / edit screens behind it. The landing screen |
| Line Items | line-items | A flat listing of the line items across documents, with its own edit screen |
| Settings | settings/… | Application Settings, Default Selection, Printable Format Settings — see Configuration |
| Personalization | personalization/… | Default Selection (a Sidebar screen has a route but no link) |
Listing columns: Sales GIN Stock Out No, Posting Status, Branch, Customer Name, Sales Agent, Updated Date, Created Date, Transaction Date, Created by. Sales GIN Stock Out No, Branch, Customer Name, Sales Agent and Created by carry floating filters. The listing has one action, FINAL, which finalises the selected rows.
Create screen tabs: Main Details · Account · Lines · Settlement · Department Hdr.
Edit screen tabs: Main Details · Account · Lines · Settlement · Department Hdr · Contra · Doc Link · Attachments · Export. The tab order is configurable (see below), and Settlement and Department Hdr can be hidden. The edit screen’s buttons are RESET, FINAL and SAVE, with a two-click DELETE at the foot of the screen.
Settings (in the sidebar for owners and administrators only) opens on the shared Feature Visibility screen. Its menu lists this applet’s three settings screens, then Permission Set, User Permission and Role Permission; it also lists Permission Wizard, Release Notes and Audit Trail, which have no route in this applet and open its not-found page. Three routes have no link and are reachable only by URL: webhook, client-side-permission-listing and team-permission-listing. The personalization menu lists only Default Selection; its Field Settings entry is commented out.
Configuration
Before you can use it
| Prerequisite | Where | Why |
|---|---|---|
| The company must have a default GL mapping for the sales posting group | Chart of Accounts and the company’s default GL codes | The document posts under the SALES group. With no mapping the journal cannot be built |
| Branch and location records, and stock on hand at that location | Organisation Applet (Company, Branch, Location), Stock Balance | Main Details requires a company, branch and location, and FINAL takes stock out of exactly that pair |
| Customer records, a sales agent and at least one membership card | Customer Maintenance | Main Details marks Sales Agent, Member Card and Customer as required form controls; the edit screen’s SAVE is disabled while the Main Details form is invalid |
| A way to reach the applet | — | See the warning at the top of this page. There is no registry row, so the applet is not installable from the store |
Applet settings
Application Settings is the shared settings screen; Default Selection and Printable Format Settings are this applet’s own. Settings are tenant-wide.
These are the settings this page covers; the line-item screens also read the price, quantity and costing display switches, and Export reads the default printable format:
| Setting | Where set | What it controls | Default | Effect when changed |
|---|---|---|---|---|
HIDE_SETTLEMENT_TAB | Read here, but no toggle for it is shown: Application Settings shows it only for the applet codes on its own list, and this applet has no code | Removes the Settlement tab from the edit screen | unset (tab shown) | The tab disappears; settlement lines already on the document are untouched |
HIDE_DEPARTMENT_HDR_TAB | As above | Removes the Department Hdr tab from the edit screen | unset (tab shown) | As above |
SALES_GIN_STOCK_OUT_DETAILS_TAB_ORDER | Default Selection — drag the tab list into the order you want, then SAVE | The left-to-right order of the edit screen’s tabs | The order listed under Screens | Tabs added to the applet after the order was saved are appended at the end rather than lost |
ENABLE_BRANCH_FILTER | Application Settings | Refuses, on the Account tab’s customer picker, a customer not linked to the document’s branch | unset (no check) | The picker still lists every customer; clicking one not linked to the branch shows Customer not linked to branch and picks nothing. Picking one of the customer’s contacts in its expanded row is not checked |
salesManLabels | Application Settings | The label set offered by the sales-agent picker on Main Details | unset | — |
SHOW_DOCUMENT_DELETE_BUTTON | Applet-wide settings only | Shows the DELETE button on the edit screen | unset (button hidden) | The button is shown only on a document that is not FINAL; a FINAL document can never be deleted from this screen |
DEFAULT_BRANCH, DEFAULT_LOCATION and DEFAULT_COMPANY are saved from Default Selection, which shows Branch and Location (Company is taken from the branch, and choosing a branch fills the location when that branch has a main location), but no screen in this applet uses them (Default Selection only shows them again) — Main Details takes its company, branch and location from the document being edited. Setting them here changes nothing in this applet.
Printable Format Settings is an applet-local screen for binding printable formats to the document.
Document behaviour settings
FINAL is one-way from this screen: once a document is FINAL the Main Details form is disabled with the single exception of Remarks, which stays editable. The Lines and Settlement tabs stop adding rows; the Department Hdr pickers and Attachments are not locked. There is no VOID action on either screen.
Feature visibility / permissions
Server-side, the four generic-document permissions for this type are TNT_API_DOC_INTERNAL_SALES_GIN_STOCK_OUT_CREATE_TGT_GUID, …_UPDATE_…, …_READ_… and …_DELETE_…, each carrying its own target GUID. They are what the generic-document API checks for this type.
The applet ships the shared Feature Visibility screen and five permission listings. Feature Visibility is where Settings opens, and Permission Set, User Permission and Role Permission are on the settings menu; the client-side and team permission listings have no link and are reachable only by URL (see Screens and menus).
Fields
Main Details — the form controls, with their validators as declared:
| Field | Meaning | Required | Notes |
|---|---|---|---|
| Company | The company the issue belongs to | Yes | No box of its own: set from the branch you pick, and on save from that branch’s company |
| Branch | The branch stock leaves | Yes | Copied onto every line when the screen saves |
| Location | The location stock leaves | Yes | Copied onto every line when the screen saves |
| Sales Agent | The agent credited with the issue | Yes | Offers only employees carrying an Employee Category label, narrowed to the salesManLabels set when one is configured — an employee with no category cannot be picked. The listing’s Sales Agent column looks the name up afresh each time. |
| Member Card | Membership card number | Yes | CREATE and SAVE stay grey until a card is picked, even for a customer who is not a member. The picker lists every membership card in the tenant and does not check that the card belongs to the customer on the Account tab. |
| Customer | The customer receiving the goods | Yes | Read-only here: the name (and contact) copied when the customer was picked on the Account tab. The listing’s Customer Name is looked up fresh, so a customer renamed since shows the new name in the listing and the old one on the document. |
| Transaction Date | Document date | No | Defaults to today when the document has none |
| Credit Terms | The customer’s terms | No | Offers the credit terms of the customer picked on the Account tab, and has nothing to offer until that customer carries some; picking one fills Due Date. |
| Due Date | When the customer should pay | No | Filled when you pick a Credit Term, from the term’s own set year, month and day plus its add-on. The Sales Invoice falls back to the Transaction Date when a term has no set date; this form does not, so an ordinary “30 days” term leaves Due Date without a usable date (read, not run). Check it after picking a term, and pick the date by hand: a date the term fills in is shown but not kept in the document until you change another field or pick the date yourself. |
| Currency | Document currency | No | A new document starts in MYR, and picking a branch switches it to the branch’s currency; you can change it after. Nothing on this form asks for an exchange rate, and changing the currency does not reprice the lines. |
| Document type; Doc No (Tenant), Doc No (Company), Doc No (Branch) | The server document type and the three document numbers | No | Shown only on a saved document. The boxes accept typing, but nothing typed there is saved — the numbers are the server’s. |
Reference, Remarks, Permit No and Tracking ID are free text; Remarks is the one Main Details field that stays editable after FINAL.
Account tab carries the entity, bill-to and ship-to details and addresses. Lines is the item workspace. Settlement, Department Hdr, Contra, Doc Link, Attachments and Export are the standard generic-document tabs.
Lifecycle and effects
What it posts. After FINAL, every line whose item resolves to an inventory item takes stock out of the line’s branch and location — the screen copies the document’s branch and location onto every line when it saves; for a line sent through the API the server copies the header’s location (not its branch) unless the header allows lines to differ from it. Every item line is also journalled — the document carries the same signs as a sales invoice. There is no VOID action on either screen; through the generic-document API the void call is the way back, and it is refused while a later document is linked to this one or the document is tied to an e-invoice.
Status flow: a new document is created in the applet’s draft state, saved, and finalised with FINAL from either the listing or the edit screen. FINAL acts on the saved document, so SAVE any change first. FINAL is not reversible from these screens, and a FINAL document cannot be deleted from them. Through the generic-document API the delete call checks the delete permission but not the status, and reverses nothing FINAL posted: reverse a FINAL document with the void call instead. Before FINAL, and only when SHOW_DOCUMENT_DELETE_BUTTON is set, the edit screen offers a two-click DELETE.
Related applets
- Sales GIN (Internal) — the registered goods issue note. Same word, different document: it moves nothing and posts nothing. Read that page first if you are choosing between them.
- Purchase GIN (Internal) — the purchase-side counterpart family.
- Sales Order (Internal) — the usual upstream demand.
- Sales Invoice (Internal) — carries the same signs; see the warning under Where it fits.
- Goods Delivery Note (Internal) — the delivery document, which also moves no stock.
- Stock Balance — where the reduction shows up.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| You cannot find this applet in the applet store, or add it to a menu | There is no active registry entry for it | Correct. Use Sales GIN (Internal) for a menu-installable goods issue note, or raise the document through the generic-document API |
| Stock came out twice for one shipment, and the sale is in the ledger twice | A GIN Stock Out and a Sales Invoice were both finalised for the same items | Both types take stock out and journal the sale, and a link does not stop it. Void the one you did not mean (a refused void names the tie: a later document or an e-invoice), or reverse the invoice with a sales return (a credit note corrects the money but puts no stock back) |
| SAVE is greyed out on the edit screen | The Main Details form is invalid, there are no lines, or the Account entity form is invalid. Sales Agent, Member Card and Customer are all declared required | Pick a Branch, a Location, a Sales Agent and a Member Card on Main Details, then a customer on the Account tab (the Customer box on Main Details is read-only), and add at least one line |
| Every Main Details field except Remarks is read-only | The document is FINAL. The form is disabled on FINAL and only Remarks is re-enabled | Remarks is the only Main Details field you can still change. There is no VOID on these screens; the generic-document API’s void call is the way back (see Lifecycle and effects) |
| The DELETE button is not there | SHOW_DOCUMENT_DELETE_BUTTON is not set applet-wide, or the document is FINAL | A FINAL document can never be deleted from this screen, whatever the setting |
| A standard JSON import of this document type fails | The import endpoints find the type and then look it up in a second, older list of document types that does not include it | Use the ordinary generic-document create endpoints, which take the document itself rather than the import payload |
Related documentation
- Sales Workflow applets — the rest of the sales document family
- Inventory Workflow applets — stock documents and stock balance