| Item: |
The inventory account for all transactions of the item will be the same regardless of where the inventory transaction occurs. |
| Warehouse: |
The inventory account will vary depending on the warehouse where the inventory transaction is made. |
| Posting class: |
The inventory account assigned to the posting class itself (as specified on the General ledger accounts tab) will be used. This option is helpful when you need to replace the inventory account previously used for items of the posting class with a new account. |
> [!NOTE]
> for sales orders, the sales account is retrieved according to settings in the [Order types (SO201000)](/visma-net-erp/help/sales/sales-windows/order-types-so201000/) window.
## Rules for choosing subaccounts
Generally, subaccounts to be used for transaction posting can be selected from the same sources as accounts, but since subaccounts consist of multiple segments, you have the option to combine segment values from different sources to get subaccounts that would perfectly reflect all the details of the transaction.
A posting class provides the subaccount masks on the **Posting settings** tab, which allows
you to configure how the subaccounts should be composed using segment values copied
from various sources.
Consider a simple example of configuring a subaccount mask for a sales subaccount.
Suppose there are four segments in the subaccounts used in your company, which have
the format **XX-XXX-XX-XX**. For each segment, you have the choice of three
options designating the source of the segment value:
+ P: Posting class
+ I: Item
+ W: Warehouse
If you configure the sales subaccount mask as **II-III-II-II**, it means that for sales transactions, the subaccount specified as sales subaccount for the item will be used.
If you configure the sales subaccount mask as **WW-PPP-II-PP**, then for sales transactions, the sales subaccount will be a combination of three subaccounts:
+ The first segment will be copied from the sales subaccount associated with the warehouse, specified on the **General ledger accounts** tab of the [Warehouses (IN204000)](/visma-net-erp/help/inventory/inventory-windows/warehouses-in204000/) window.
+ The second and fourth segment will be copied from the sales subaccount associated with the posting class of the item, specified on the **General ledger accounts** tab of the [Posting classes (IN206000)](/visma-net-erp/help/inventory/inventory-windows/posting-classes-in206000/) window.
+ The third segment will be copied from the sales subaccount associated with the item, specified on the **General ledger accounts** tab of the [Stock items (IN202500)](/visma-net-erp/help/inventory/inventory-windows/stock-items-in202500/) or [Non-stock items (IN202000)](/visma-net-erp/help/inventory/inventory-windows/non-stock-items-in202000/) window.
## Using posting classes
Posting classes facilitate specifying general ledger accounts for multiple items
assigned to specific classes.
One of the posting classes can be chosen as the
default posting class in the [Inventory preferences (IN101000)](/visma-net-erp/help/inventory/inventory-windows/inventory-preferences-in101000/) window.
Then, when a user creates a new stock item using the [Stock items (IN202500)](/visma-net-erp/help/inventory/inventory-windows/stock-items-in202500/) window, the item is assigned to the default posting class.
If necessary, the user can choose another posting class for the item. Once the posting class is selected, the **General ledger accounts tab** will have the values (intended for general ledger accounts and subaccounts) filled in for the item, based on the posting class.
> [!NOTE]
> We recommend that you choose as the default class the posting class with settings that apply to the largest number of items. Other posting classes can be more specific and contain settings that apply to fewer items.
Later, on release on a specific inventory document, the system checks the posting class of each stock item and applies the rules of the item's posting class to determine accounts and subaccounts to be used for the transaction.
For example, for each line item in a sales invoice, the system checks the posting class of the stock item, and applies the rules of the item's posting class to determine a sales account and subaccount and a COGS-account and subaccount to be used for the transaction. Depending on whether the **Post summary when updating the general ledger** option is selected on the [Inventory preferences (IN101000)](/visma-net-erp/help/inventory/inventory-windows/inventory-preferences-in101000/) window, the system generates a batch with journal entries grouped by the account / subaccount pair or with full details.
After that, the system generates a batch using the accounts and subaccounts in accordance with the posting classes of the items listed in the document.
When the standard costs for the stock items are changed (at the end of financial year or when needed), the process of updating the standard costs generates inventory adjustments to be posted to the general ledger. The system will use the standard cost revaluation account and the corresponding subaccount determined by the rules defined by the posting class of the item whose cost is being updated.
If upon release of the purchase receipt, there are differences between the purchase receipt amount and the inventory receipt amount, the following accounts will be used:
+ For items with the standard cost valuation method, the standard cost variance account and subaccount.
+ For items with other valuation methods, the purchase price variance account and subaccount.
+ For all items, the landed cost variance account and subaccount to record any differences between the landed costs specified on the purchase receipts and inventory receipts.