Inventory service
The inventory service is used for most of the inventory functionality both in the Site Manager and in the POS. What that means that any functionality that retrieves, saved, changes inventory information goes through the inventory service. In most cases the inventory service redirects the request to the Site service but in some cases there is some processing done within the functions.
Main functionality
The service is broken into various partial classes that each have functions for one specific function within the inventory functionality. The service is divided into these functions:
- Goods receiving
- Inventory adjustments
- Purchase orders
- Reason codes
- Replenishment
- Stock counting
- Template (Inventory templates)
- Transfer orders
- Transfer requests
- Vendors
- Worksheets
When customizing the inventory the recommendation is to override the Site service rather than the Inventory service but if the Site service should be bypassed altogether in a customization for the inventory then the Inventory service would be where that type of customization should be done.
Goods receiving
All inventory service functions related to goods receiving.
Name | Description |
---|---|
CountGoodsReceivingDocumentsSearchResults | Returns the total number of goods receiving documents that are found using the search criteria |
CreateGoodsReceivingDocumentLinesFromPurchaseOrder | Creates goods receiving document lines based on a purchase order with the given ID |
CreatePostedGoodsReceivingDocumentLinesFromPurchaseOrder | Creates posted goods receiving document lines for all the lines in the purchase order with the given ID |
DeleteGoodsReceivingDocument | Deletes a specific goods receiving document if it doesn't have any posted lines |
DeleteGoodsReceivingDocumentLine | Deletes the supplied goods receiving document line |
DeleteGoodsReceivingLinesForAPurchaseOrderLine | Deletes goods receiving document lines for a specific purchase order line |
GetGoodsReceivingDocumentLine | Gets the goods receiving document line with the given ID |
GetGoodsReceivingDocumentLinesForAPurchaseOrderLine | Returns all goods receiving document lines for a specific purchase order line |
GetGoodsReceivingDocument | Gets the goods receiving document with the given ID |
GetGoodsReceivingDocumentLines | Gets existing lines for a specific goods receiving document |
GetGoodsReceivingDocuments | Searches for all goods receiving documents that match the search criteria as it has been set |
GetPurchaseOrdersWithNoGoodsReceivingDocumentForStore | Returns the purchase orders with no goods receiving document for the given store ID |
GetReceivedTotals | Retrieves the sum of all received items per goods receiving document |
GetTotalNumberOfGRDocuments | Returns the total number of goods receiving documents that are in the database |
GoodReceivingDocumentLineIsPosted | Returns true if the goods receiving document line with the given ID is posted; otherwise returns false |
GoodsReceivingDocumentAllLinesPosted | Returns true if all the goods receiving document lines are posted; otherwise returns false |
GoodsReceivingDocumentFullyReceived | Determines if the supplied document is fully received |
GoodsReceivingDocumentExists | Checks if a goods receiving document exists for the purchase order with the given ID |
GoodsReceivingDocumentHasLines | Returns true if the goods receiving document with the given ID has lines; otherwise returns false |
PostGoodsReceivingLine | Posts the goods receiving document line |
SaveGoodsReceivingDocument | Saves a goods receiving document header |
SaveGoodsReceivingDocumentLine | Saves a goods receiving document line |
SearchGoodsReceivingDocumentLines | Gets a list of document lines matching the search criteria |
UpdateGoodsReceivingDocumentStatus | Updates the status of a given goods receiving document if necessary. Returns whether the document was updated or not |
Inventory adjustments
All inventory service functions related to inventory adjustments.
Name | Description |
---|---|
AdvancedSearch | Returns a list of paginated inventory journals based on the given search criteria |
CloseInventoryAdjustment | Closes the inventory adjustment with the given ID |
DeleteInventoryAdjustmentReason | Deletes the inventory adjustment reason |
DeleteInventoryJournal | Deletes an inventory journal only if it's empty (has no lines) |
GenerateInventoryAdjustmentID | Generates a new inventory adjustment ID |
GetInventoryAdjustment | Gets the inventory adjustment by the given ID |
GetInventoryAdjustmentJournalList | Gets the inventory adjustments for the given search criteria |
GetJournalTransactionList | Gets all journal transaction lines for the given journal ID |
GetJournalTransactionReasonById | Gets the journal transaction reason for the given ID |
GetMovedToInventoryLines | Returns the already moved-to-inventory items for a given parked journal line |
GetReasonCodes | Retrieves system reason codes used for customer orders, transfers and service items. If no system reason codes exist then they are created and saved to the database. This function creates the reason codes with a description in English. Once the Site Manager or POS start using these reason codes the descriptions will be updated to be in the language of the system using UpdateReasonCodes function. |
InventoryAdjustmentReasonIsInUse | Returns true if the inventory adjustment reason is is use; otherwise returns false |
MoveInventoryAdjustment | Updates the inventory adjustment to be for a different store. Used in Customer order functionality when a customer order is being fulfilled at another store than originally it was configured to be fulfilled at. |
ReserveStockItem | Reserves stock for the item with the given ID |
ReserveStockTransaction | Creates an inventory adjustment with the type Reservation. Used in Customer order functionality when a customer order is created and the stock for the order should be reserved |
SaveInventoryAdjustment | Saves the inventory adjustment |
SaveInventoryAdjustmentReason | Saves the inventory adjustment reason |
SaveInventoryAdjustmentReasonReturnID | Saves the inventory adjustment reason and returns its ID |
UpdateReasonCodes | Updates the system reason codes if they have a different description than the default system one (which is in English). The POS usually uses these reason codes and will update the descriptions to be in the language of the store so that the user can see the description in their language. |
UpdateStatus | Updates the journal line status (Open, Posted or Partially Posted) and, if needed, the line's master id |
Purchase orders
All inventory service functions related to purchase orders.
Name | Description |
---|---|
ChangeDiscountsForPurchaseOrderLines | Goes through all the purchase order lines and updates either the discount amount and discount percentage on each line |
CopyLinesAndBetweenMiscChargesPurchaseOrders | Copies all item lines and miscellaneous charges from a purchase order to another |
DeletePurchaseOrder | Deletes the purchase order with its associated goods receiving document, based on the purchase order line ID; the deletion is performed only if the goods receiving document is not posted |
DeletePurchaseOrderLine | Deletes the purchase order line with the given ID |
DeletePurchaseOrderMiscCharges | Deletes a specific miscellaneous charge on a purchase order |
GeneratePurchaseOrderID | Generates a new purchase order ID |
GeneratePurchaseOrderLineID | Generates a new purchase order line ID |
GetInventoryTemplateForPOWorksheet | Gets the inventory template for the given purchase order worksheet ID |
GetInventoryUnitForPurchaseOrderWorksheet | Gets the inventory unit name for the given item ID |
GetMischChargesForPurchaseOrder | Gets purchase order miscellaneous charges for the given purchase order ID |
GetMischChargesForPurchaseOrderWithSorting | Gets the miscellaneous charges for the purchase order with the given ID. |
GetOrderedTotals | Retrieves the sum of all ordered items per purchase order that is attached to a goods receiving document |
GetPurchaseOrder | Gets the purchase order with the given ID |
GetPurchaseOrderID | Gets the purchase order ID for the giving goods receiving document ID |
GetPurchaseOrderLine | Gets the purchase order line for the giving purchase order line ID |
GetPurchaseOrderLineNumberFromItemInfo | Gets the line number of a retail item within a given purchase order |
GetPurchaseOrderLines | Gets the purchase order lines based on the search criteria |
GetPurchaseOrderLinesWithReportFormatting | Gets the purchase order line with report formatting for the given purchase order ID |
GetPurchaseOrderMiscCharge | Gets information about a specific miscellaneous charge |
GetPurchaseOrdersForStoreAndVendor | Gets the purchase orders for the given search criteria |
GetPurchaseOrderWithReportFormatting | Gets the purchase order with report formatting for the given ID |
GetPurchaseWorksheetLineData | Gets the lines for the given purchase order worksheet ID |
GetPurchaseWorksheetLineDataPaged | Gets a paginated list of lines for the given purchase order worksheet ID |
GetTotalNumberOfProductOrders | Return the total number of purchase orders that are in the database |
GetUnitsForPurchaserOrderItemVariant | Gets the relevant units for the purchase order and item |
PostAndReceiveAPurchaseOrder | Creates and posts a goods receiving document for all lines within the purchase order |
PurchaseOrderAdvancedSearch | Returns a paginated list of purchase orders based on the search criteria |
PurchaseOrderHasGoodsReceivingDocument | Returns true if the purchase order with the given ID has a goods receiving document; otherwise returns false |
PurchaseOrderHasPurchaseOrderLines | Returns true if the purchase order has any items lines |
PurchaseOrderLineHasPostedGoodsReceivingDocumentLine | Returns true if the purchase order line with the given ID has posted goods receiving document line; otherwise returns false |
SaveAndReturnPurchaseOrder | Saves a given purchase order into the database and returns it |
SavePurchaseOrder | Saves a given purchase order into the database |
SavePurchaseOrderLine | Saves a specific purchase order line |
SavePurchaseOrderMiscCharge | Saves a purchase order miscellaneous charge; if no line number is on the object a new ID will be created |
SearchItemsInPurchaseOrder | Returns a paginated list of items within a given purchase order |
Reason codes
All inventory service functions related to reason codes.
Name | Description |
---|---|
DeleteReasonCode | Deletes the reason code with the given ID |
GetOpenReasonCodesList | Returns a list with all reason codes that can be used. This is based on the begin and end date of the reason code configurations |
GetReasonById | Gets the reason code with the given ID |
GetReasonCodesForReturn | Gets the list of reason codes used for returns |
GetReasonCodesList | Returns a list with all available reason codes; one overload support basic filtering |
ReasonCodeIsInUse | Returns true if a reason code is in use; otherwise returns false |
SaveReasonCode | Saves a reason code |
SearchReasonList | Returns a list of paginated reason codes based on a search criteria |
Replenishment
All inventory service functions related to replenishment.
Name | Description |
---|---|
DeleteItemReplenishmentSetting | Deletes the item replenishment setting with the given ID |
DeleteItemReplenishmentSettingByItemIDAndStoreID | Deletes the item replenishment setting by the given pair of item ID and store ID |
GetItemReplenishmentSetting | Gets the item replenishment setting with the given ID |
GetItemReplenishmentSettingForItem | Gets the item replenishment setting with the given item ID |
GetItemReplenishmentSettingID | Gets the item replenishment setting ID by the given pair of item ID and store ID |
GetItemReplenishmentSettingItemSettingForStore | Gets the item replenishment setting for the given pair of item ID and store ID |
GetItemReplenishmentSettingListForStores | Gets a list of item replenishment settings for all stores by the given item ID |
ItemWithSameParametersExistsInTransferOrder | Check whether an item with the same parameters (eg: same unit) exists in the transfer order containing the given transfer order line |
SaveItemReplenishmentSetting | Saves the given item replenishment setting |
Stock counting
All inventory service functions related to stock counting.
Name | Description |
---|---|
BeginAsyncPostAllStockCountingLines | Posts all lines from a stock counting journal asynchronously |
CompressAllStockCountingLines | Compresses all lines on a stock counting journal, that have the same item and unit |
CreateStockCountingFromExistingAdjustment | Creates a new stock counting journal and copy all lines from an existing journal |
CreateStockCountingFromFilter | Creates a new stock counting journal based on a filter |
CreateStockCountingFromTemplate | Creates a new stock counting journal based on a given template |
CreateStockCountingJournalFromOmniJournal | Creates a new stock counting journal based on a LS Commerce journal |
DeleteMultipleJournalTransactions | Deletes multiple inventory journal transaction lines |
DeleteStockCounting | Deletes the stock counting with the given ID |
EndAsyncPostAllStockCountingLines | Unwraps the result returned by BeginAsyncPostAllStockCountingLines(), which is called asynchronously |
GetAdjustmentStatus | Gets the adjustment status for the journal with the given ID |
GetInventoryJournalTransaction | Gets the inventory journal line with the given ID |
GetInventoryOnHand | Gets inventory on hand for the specified item ID and store ID |
GetJournalListAdvancedSearch | Returns a paginated list of journals based on a given filter |
GetOmniInventoryAdjustmentByTemplate | Gets LS Commerce inventory adjustment by template ID |
GetStockCounting | Gets the stock counting with the given ID |
ImportStockCountingFromExcel | Imports stock counting from an Excel file |
InventoryAdjustmentExists | Returns true if the inventory adjustment with the provided ID exists; otherwise returns false |
PostAllStockCountingLines | Posts all lines of a stock counting journal |
PostInventoryAdjustmentLine | Posts inventory adjustment line |
PostMultipleStockCountingLines | Posts multiple stock counting lines |
SaveJournalTransaction | Saves the given inventory journal transaction |
SearchJournalTransactions | Returns a paginated list of journal lines based on a given filter |
SetAdjustmentStatus | Sets the adjustment status for the journal with the given ID |
Template
All inventory service functions related to inventory template.
Name | Description |
---|---|
AreaInUse | Returns true if an inventory area is in use; otherwise returns false |
DeleteInventoryArea | Deletes the inventory area with the given ID |
DeleteInventoryAreaLine | Deletes the inventory area line with the given ID |
DeleteInventoryTemplate | Deletes the inventory template with the given ID |
DeleteInventoryTemplateSection | Deletes all inventory template sections for a given template ID |
DeleteInventoryTemplateSectionSelection | Deletes all filters for the given template ID and a section ID |
DeleteInventoryTemplateStoreConnection | Inventory templates can be valid at all stores or specific stores referred to as a stored connection. This function deletes a connection between a specific given inventory template and a specific store |
DeleteInventoryTemplateTemplateConnection | Deletes all store connections for the given inventory template |
GetInventoryArea | Gets the inventory area with the given ID |
GetInventoryAreaLine | Gets the inventory area line with the given master ID |
GetInventoryAreaLinesByArea | Get a list with the lines of the given inventory area |
GetInventoryAreaLinesListItems | Gets a list with all area lines |
GetInventoryAreasList | Gets a list with all available inventory areas |
GetInventoryTemplate | Gets the inventory template with the given ID |
GetInventoryTemplateFirstStoreName | Gets the first store name for the given template ID |
GetInventoryTemplateItems | Gets a filtered list of inventory template items |
GetInventoryTemplateList | Gets a list with all inventory templates |
GetInventoryTemplateListForStore | Gets a list with all inventory templates for a given store, matching a given filter |
GetInventoryTemplateListItem | Retrieves information about the inventory template with the given template ID for display in a list view |
GetInventoryTemplateSectionList | Gets the inventory template section list for a given template ID |
GetInventoryTemplateSectionSelectionList | Retrieves information about the filter that is saved with the given template ID and section ID. |
GetInventoryTemplateSectionSelectionListForFilter | Gets a list of inventory template section selection identifiers filtered by a given template ID and a section ID |
GetInventoryTemplateStoreConnectionList | Gets a list of the stores the inventory template is valid for |
GetStockCountingTemplates | Gets a list with all stock counting templates |
InsertInventoryTemplateSection | Adds a filter section to a filter saved with the inventory template |
InsertInventoryTemplateSectionSelection | Adds the value selected in a filter section that is saved with the inventory template |
SaveInventoryArea | Saves the given inventory area |
SaveInventoryAreaLine | Saves the given inventory area line |
SaveInventoryTemplate | Saves the given inventory template |
SaveInventoryTemplateStoreConnection | Inventory templates can be valid at all stores or specific stores referred to as a stored connection. This function saves a connection between a specific store to a specific inventory template |
Transfer orders
All inventory service functions related to transfer orders.
Name | Description |
---|---|
AutoSetQuantityOnTransferOrder | Automatically set the quantity on the transfer order lines |
CopyTransferOrder | Copies or clones an existing transfer order |
CreateTransferOrderFromFilter | Creates a new transfer order based on a filter |
CreateTransferOrderFromRequest | Creates a transfer order based on a given transfer request |
CreateTransferOrdersFromRequests | Creates transfer orders based on given transfer requests |
DeleteInventoryTransferOrder | Deletes the transfer order with the given ID |
DeleteInventoryTransferOrderLine | Deletes the transfer order line with the given ID |
DeleteInventoryTransferOrderLines | Deletes the given transfer order lines |
DeleteInventoryTransferOrders | Deletes a given list of transfer orders |
GetInventoryInTransit | Gets the list of transfer orders that are in transit |
GetInventoryTransferOrder | Returns information about a specific inventory transfer order |
GetInventoryTransferOrdersAndLines | Gets a list of transfer orders together with their lines, based on a given list of identifiers of documents to fetch |
GetOrderLinesForInventoryTransfer | Returns order lines for a specific inventory transfer order |
GetOrderLinesForInventoryTransferAdvanced | Get a list of lines for a given transfer order ID, matching a given filter |
GetTotalUnreceivedItemForTransferOrders | Gets a list with quantity for each item that is not [fully] received in the given list of transfer orders |
ReceiveTransferOrder | Receives the transfer order with the given ID |
ReceiveTransferOrderQuantityIsCorrect | Checks whether the quantities are correct in a given list of transfer orders by comparing the sent and the received quantities |
ReceiveTransferOrders | Receives the given transfer orders |
SaveInventoryTransferOrder | Saves the given transfer order |
SaveInventoryTransferOrderLine | Saves the given transfer order line |
SaveInventoryTransferOrderLineIfChanged | Detects whether a transfer order line has changed and if it did, updates it in the database |
SearchInventoryTransferOrders | Returns a list of transfer orders matching the given filter |
SearchInventoryTransferOrdersAdvanced | Returns a list of transfer orders matching the given filter |
SearchInventoryTransferOrdersExtended | Returns a list of transfer orders matching the given filter |
SendTransferOrder | Sends the transfer order with the given ID |
SendTransferOrders | Sends the transfer orders with the given identifiers |
TransferOrderCreatedFromTransferRequest | Updates a transfer request as being created from a given transfer order |
Transfer requests
All inventory service functions related to transfer requests.
Name | Description |
---|---|
CopyTransferRequest | Copies or clones an existing transfer request |
CreateTransferRequestFromFilter | Creates a new transfer request based on a filter |
CreateTransferRequestFromOrder | Creates a transfer request based on a transfer order |
DeleteInventoryTransferRequest | Deletes a transfer request with the given ID |
DeleteInventoryTransferRequestLine | Deletes a transfer request line with a given ID |
DeleteInventoryTransferRequestLines | Deletes a given list of transfer request lines |
DeleteInventoryTransferRequests | Deletes a given list of transfer requests |
GetInventoryTransferRequest | Gets the transfer request with the given ID |
GetInventoryTransferRequestsAndLines | Gets a list of transfer requests together with their lines, based on a given list of identifiers of documents to fetch |
GetRequestLinesForInventoryTransferAdvanced | Gets a list of lines for a given transfer request ID, matching a given filter |
ItemWithSameParametersExistsInTransferRequest | Checks whether an item with the same parameters (eg: same unit) exists in the transfer request containing the given transfer request line |
SaveInventoryTransferRequest | Saves the given inventory request |
SaveInventoryTransferRequestLine | Saves the given transfer request line |
SaveInventoryTransferRequestLineIfChanged | Detects whether a transfer request line has changed and if it did, updates it in the database |
SearchInventoryTransferRequests | Returns a list of transfer request matching a given filter |
SearchInventoryTransferRequestsAdvanced | Returns a list of transfer request matching a given filter |
SearchInventoryTransferRequestsExtended | Returns a list of transfer request matching a given filter |
SendInventoryTransferRequest | Sends a transfer request with the given ID |
SendInventoryTransferRequests | Sends a list of given transfer requests |
Vendors
All inventory service functions related to vendors.
Name | Description |
---|---|
AdvancedSearch | Searches the vendor item for the given criteria |
DeleteByRetailItemID | Deletes a vendor item that matches the given filter |
DeleteVendorContact | Deletes a list of vendor contacts |
DeleteVendorItem | Deletes the vendor item with the given ID |
DeleteVendorItemByRetailItemID | Deletes all vendor items for the given vendor ID |
DeleteVendorItemLinks | Deletes all vendors - item links and removes vendor as default vendor from items |
DeleteVendorItems | Deletes a list of vendor items |
DeleteVendors | Deletes a list of vendors; when deleting, a deleted flag is set to true on the vendor |
DeleteVendorsCanExecute | Deletes a list of vendors; when deleting, a deleted flag is set to true on the vendor |
GetDefaultPurchasePrice | Retrieves the default purchase price for a vendor item |
GetDistinctUnitsForVendorItem | Returns a list of all units that are available for the given item |
GetDistinctRetailItemsForVendor | Gets a list of DataEntities that contains distinct list of retail item ID's and Item Description for a given vendor ID |
GetFirstVendorItem | Each item can be added multiple times to a vendor with different unit ID's; this method returns the first one found and it should only be used when the unit ID is not available |
GetItemsForVendor | Returns a list of items that has been assigned to a specific vendor |
GetLatestPurchasePrice | Retrieves the latest purchase price for a vendor item |
GetPagedItemsForVendor | Returns a paginated list of items that has been assigned to a specific vendor |
GetVendor | Gets information about a specific vendor |
GetVendorContact | Returns the vendor contact with the given ID |
GetVendorContactList | Returns the list of vendor contacts for the given vendor ID |
GetVendorItem | Gets the vendor item with the given internal ID or based on the vendor ID, unit ID and item ID depending on which overload is called |
GetVendorList | Gets a list of all vendors |
GetVendors | Returns a list of vendors that fulfill the conditions in the search criteria parameter |
GetVendorsForItem | Gets a list of vendors for the given retail item |
GetVendorsList | Returns a list of vendors that have not been deleted |
GetVendorsSalesTaxGroupID | Returns the sales tax group for the given vendor |
RestoreVendors | Undeletes a list of vendors; the deleted flag is set to false on the vendors |
SaveAndReturnVendor | Saves and returns the vendor information |
SaveVendor | Saves the vendor information |
SaveVendorContact | Saves or updates a vendor contact; if the this is the only contact on the vendor it is set as the default contact |
SaveVendorItem | Saves a vendor item |
SearchRetailItemsForVendor | Returns a list of retail items for the given vendor ID |
SetDefaultContactOnVendor | Sets the default contact on the vendor |
VendorExists | Checks if a specific ID already exists for a vendor |
VendorHasItem | Returns true if the given item has an associated vendor |
VendorHasLinkedItems | Verifies if a vendor is linked to at least one item or is the default vendor for an item |
VendorItemExists | Returns true if a vendor item exist for the given filter; otherwise returns false |
VendorItemExistsExcludingCurrentRecord | Checks if a vendor item by a given Vendor ID and vendor item ID exists, excluding current record from the check |
VendorItemExistsExcludingCurrentRecord ByVendorIDRetailIDAndUnitID |
Checks if a vendor item by a given Vendor ID, retailID and unitID, excluding current record from the check |
VendorItemExistsExcludingCurrentRecord ByVendorIDRetailIDAndUnitIDAndVendorItemID |
Checks if a vendor item by a given Vendor ID, retailID, unitID and vendorid, excluding current record from the check |
Worksheets
All inventory service functions related to worksheets.
Name | Description |
---|---|
DeleteInventoryWorksheet | Deletes the given worksheet |
DeleteInventoryWorksheetLineForPurchaseWorksheet | Deletes the lines of the given inventory worksheet |
GetEffectiveInventoryForItem | Gets the effective inventory for the given item |
GetInventoryWorksheetLineList | Gets a list with worksheet lines matching the given criteria |
GetInventoryWorksheetLineListSimple | Gets a list with worksheet lines matching the given criteria |
GetInventoryWorksheetList | Gets the list with the inventory worksheets |
GetInventoryWorksheetListByInventoryTemplate | Gets the list with the inventory worksheets for the given inventory template ID |
GetPurchaseWorksheet | Gets the purchase worksheet with the given ID |
GetPurchaseWorksheetLine | Gets the inventory worksheet line with the given ID |
GetWorksheetFromTemplateIDAndStoreID | Gets the inventory worksheet for the given inventory template ID and store ID |
InventoryWorksheetExistsForStore | Returns true if an inventory worksheet exists for the given store; otherwise returns false |
SaveInventoryWorksheet | Saves the given worksheet |
SaveInventoryWorksheetLine | Saves the given inventory worksheet line |
POS Operations
Some operations in the POS directly call the Inventory service. Here below is a list of all the operations and which functions they call.
Name | Description |
---|---|
Inventory lookup | Calls function ShowInventoryLookup |
Item sale | Calls functions GetReasonById, GetReasonCodesList if the item is being returned (see parameters on Return item and Return transaction operations) |
Set reason code | Calls function SetReasonCode in the Transaction service (which calls the Inventory service) |
Development pack
To find this service in the development pack go to DevPack\Source\Core\Common_services