stock-operations

Community

Safe, auditable stock movements.

Authordoorscomputers
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill eliminates the risk of inconsistent stock updates by enforcing atomic, auditable stock movements across sales, purchases, transfers, returns, and adjustments.

Core Features & Use Cases

  • Atomic updates: Each stock change is executed through a validated library to ensure consistency.
  • Dual-record auditing: Creates both StockTransaction and ProductHistory records for every operation.
  • Multi-location support: Handles variations and locations with proper balance tracking and permissions.
  • Use Case: Process a sale and automatically adjust stock across locations while maintaining a full audit trail.

Quick Start

Start by importing updateStock from '@/lib/stockOperations' and calling it within a Prisma transaction to adjust stock for a given product variation and location.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: stock-operations
Download link: https://github.com/doorscomputers/nextjspos/archive/main.zip#stock-operations

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.