Athena.Inventory.StockEntry (athena_logistics v1.0.0)

StockEntry Model

Link to this section Summary

Link to this section Types

@type status() :: :important | :warning | :normal
@type t() :: %Athena.Inventory.StockEntry{
  __meta__: term(),
  consumption: non_neg_integer(),
  event: Ecto.Schema.belongs_to(Athena.Inventory.Event.t()),
  event_id: term(),
  item: Ecto.Schema.belongs_to(Athena.Inventory.Item.t()),
  item_group: Ecto.Schema.belongs_to(Athena.Inventory.ItemGroup.t()),
  item_group_id: term(),
  item_id: term(),
  location: Ecto.Schema.belongs_to(Athena.Inventory.Location.t()),
  location_id: term(),
  movement_in: non_neg_integer(),
  movement_out: non_neg_integer(),
  stock: integer(),
  supply: non_neg_integer()
}

Link to this section Functions

Link to this function

percentage(stock_entry)

@spec percentage(entry :: t()) :: float() | nil
@spec status(entry :: t()) :: status()