Overview

A console inventory system built as a college assignment. It records items, stock additions, and stock issues in SQLite, with separate menu access for administrators, staff, and viewers.

Stock movements and costing

  • Create and manage item records, including current quantities and stock values.
  • Record incoming stock with a quantity and unit cost.
  • Issue stock using first-in, first-out costing: consume the oldest available batches before moving to newer ones.
  • Keep a record of which stock additions contributed to each issue.

The database code uses prepared statements and bound parameters. Stock operations group related database updates in transactions.

Program structure

The modular version separates menus, database operations, login handling, and display helpers into C source files and headers. CMake builds the application with the bundled SQLite source. An additional amalgamated version combines the code for simpler compilation.

Login records use a local binary file. This is an educational application; the repository also documents limitations around deleting stock movements that affect existing FIFO calculations.