Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CodexaCP/DG_APK/llms.txt

Use this file to discover all available pages before exploring further.

The Inventory Movements module provides a read-only view of every stock transaction recorded in Dragon Guard. Operators and supervisors can filter movements by type, date range, item number, bin, and reference document to trace the origin of any stock discrepancy. From the movement list, users can navigate to Product Journal entries to inspect the full set of lines that made up a particular posting event.
Inventory Movements is a read-only module for operators on the handheld. There is no post, edit, or delete action exposed in the InventoryMovementsViewModel. All data is retrieved from the backend and presented for audit and reconciliation purposes only. The underlying InventoryMovementService includes a SaveProductJournalAsync method that is available for integration purposes, but this action is not surfaced in the handheld UI.

Movement List Fields (MovementsPageDto)

id
string
Internal movement record identifier.
movementNo
string
Sequential movement document number assigned by the system.
itemId
string
Internal item GUID associated with the movement.
itemNo
string
ERP item code. Searchable via the itemNo filter parameter.
itemDescription
string
Item display name (also mapped from the description JSON property for API compatibility).
binId
string
Internal bin identifier where the movement occurred.
binCode
string
Bin code for the source of the movement. Filterable via binCode.
locationCode
string
Source warehouse location. Filterable via locationCode.
targetLocationCode
string
Destination warehouse location for transfer movements.
quantity
decimal
Quantity moved. Positive for inbound (receipt, return), negative for outbound (shipment, consumption).
movementType
string
Classification of the movement. See movement type options below.
referenceNo
string
Source document reference (e.g., receipt number, shipment number). Filterable via referenceNo.
externalDocumentNo
string
External ERP document reference linked to the movement.
userId
string
Identifier of the operator who created the movement.
createdAt
DateTime
Timestamp when the movement was recorded. Used for dateFrom / dateTo filtering.

Product Journal Header Fields (ProductJournalHeaderDto)

id
string
Internal journal record identifier.
journalNo
string
Journal document number, used to fetch the full detail from GET /api/movements/journals/{journalNo}.
description
string
Human-readable description of the journal batch.
movementType
string
Type of stock movement represented by the journal.
postingDate
DateTime?
Date the journal was posted to the inventory ledger.
externalDocumentNo
string
Linked external ERP document reference.
transitLocationCode
string
Intermediate transit location code, if the journal covers an in-transit movement.
status
string
Journal status (e.g., open, posted).
lineCount
int
Number of lines in the journal, shown on the journal list card.

Product Journal Line Fields (ProductJournalLineDto)

id
string
Internal line identifier.
itemNo
string
ERP item code for this journal line.
description
string
Item description at time of posting.
quantity
decimal
Quantity recorded on this line.
unitOfMeasure
string
Unit of measure for the line quantity.
packageQuantity
decimal
Package-level quantity for items tracked in packaging units.
purchaseUnitOfMeasure
string
Purchasing unit of measure when different from the base UOM.
sourceLocationCode
string
Origin warehouse location for this line.
targetLocationCode
string
Destination warehouse location for this line.
sourceBinCode
string
Origin bin for this line.
targetBinCode
string
Destination bin for this line.
lotNo
string
Lot number when the item is lot-tracked.
variantCode
string
Product variant identifier.
qualityCode
string
Quality classification code applied to this movement line.
movementType
string
Movement type at the individual line level (may differ from the header type in mixed journals).

API Endpoints

MethodEndpointPurpose
GET/api/movementsPaginated movement list with optional filters
GET/api/movements/journalsPaginated product journal header list
GET/api/movements/journals/{journalNo}Full journal detail with all lines

Movement List Query Parameters

GET /api/movements
  ?pageNumber=1
  &pageSize=50
  &search=ITEM-001
  &binCode=BIN-A1
  &locationCode=MAIN
  &movementType=RECEPCION
  &referenceNo=REC-0042
  &itemNo=ITEM-001
  &dateFrom=2024-01-01
  &dateTo=2024-01-31
All filter parameters are optional. The service builds the query string dynamically:
// MovementsService.cs — InventoryMovementService.SearchMovementsAsync
if (!string.IsNullOrWhiteSpace(movementType))
    queryParams.Add($"movementType={Uri.EscapeDataString(movementType.Trim())}");

if (dateFrom.HasValue)
    queryParams.Add($"dateFrom={dateFrom.Value:yyyy-MM-dd}");

if (dateTo.HasValue)
    queryParams.Add($"dateTo={dateTo.Value:yyyy-MM-dd}");

var endpoint = $"api/movements?{string.Join("&", queryParams)}";

Movement Type Filter Options

The handheld exposes a picker with the following movement type values, mapped to display labels:
Code valueDisplay label
(blank — all)Todos
RECEPCIONRecepción (entrada)
ENVIOEnvío (salida)
DEVRECEPCIONDevolución de recepción
DEVENVIODevolución de envío
RESERVA PRODUCCIONReserva producción
AFActivo fijo
PRESUPUESTOPresupuesto
Selecting a type immediately triggers a new search. The “Todos” option sends no movementType parameter, returning all types.

Date Filter Behaviour

The date filter is opt-in. When UseDateFilter is false (the default), no dateFrom or dateTo parameters are sent and the backend returns movements regardless of date. Enabling the toggle activates both date pickers and defaults to the last 7 days (DateFromValue = DateTime.Today.AddDays(-7), DateToValue = DateTime.Today). Changing either date value while the filter is active immediately re-executes the search.

Browsing Movements and Journals

1

Open the Movements module

From the home screen, tap Movements. InventoryMovementsViewModel.InitializeAsync() fires once and calls GET /api/movements with default parameters (page 1, size 50, no filters).
2

Filter by type or date

Use the movement type picker to narrow by operation class. Toggle the date filter switch to restrict results to a specific date window. Either change triggers SearchAsync(), which resets to page 1 and reloads from the server.
3

Search by text

Type in the search bar to filter by item number, reference number, or any other text field supported by the search parameter. The query fires on demand when the operator taps the search button or submits the keyboard.
4

Load more results

The list uses incremental loading. After the initial page loads, scrolling to the bottom triggers LoadMoreCommand, which increments the page number and appends the next 50 records to the existing list. Loading stops when the backend returns fewer than 50 records or the current page reaches TotalPages.
5

Navigate to a Product Journal

Tap a journal entry in the journals list to navigate to ProductJournalDetailPage. The app calls GET /api/movements/journals/{journalNo} to load the full ProductJournalDetailDto, which includes the Lines array with per-item movement detail.
6

Clear all filters

Tap the clear filters action to reset SearchText, SelectedMovementType (back to “Todos”), and UseDateFilter (back to false) in a single operation, then reload from the server.

Pagination State

The view model exposes the following pagination properties for display in the UI:
PropertyDescription
CurrentPageNumberThe page number of the most recently loaded batch
TotalPagesTotal number of pages available on the server
TotalRecordsTotal number of movement records matching current filters
ShowingRangeTextHuman-readable range string, e.g., “Mostrando 1 - 50 de 243 registros”
PageStatusTextCompact page indicator, e.g., “Página 1 de 5”
// InventoryMovementsViewModel.cs
public string ShowingRangeText
{
    get
    {
        if (TotalRecords == 0 || Movements.Count == 0)
            return "Mostrando 0 - 0 de 0 registros";

        var start = ((CurrentPageNumber - 1) * PageSize) + 1;
        var end   = start + Movements.Count - 1;
        return $"Mostrando {start} - {end} de {TotalRecords} registros";
    }
}

Build docs developers (and LLMs) love