demo-po-receipt

Creates a complete purchase order to receipt test data chain via backend APIs.

Updated Jun 16, 2026
One-click install
npx skills add https://github.com/SSS08099/mom-system --skill demo-po-receipt-sss08099
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: demo-po-receipt
Source: https://github.com/SSS08099/mom-system/tree/main/.agents/skills/demo-po-receipt
Command: npx skills add https://github.com/SSS08099/mom-system --skill demo-po-receipt-sss08099

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually building a full procurement test data chain (purchase order, approval, receipt, stock confirmation) through a UI is slow and error-prone. This Skill automates the entire flow through backend API calls so testers and developers get a ready-to-verify purchase-to-stock dataset in one run. ## Core Features & Use Cases - End-to-End API Automation: Executes the full chain of create PO, submit, approve, push to receipt, approve receipt, and confirm stock-in via curl calls. - Dynamic Instance Binding: All material, supplier, warehouse, and location IDs are queried from the current instance at runtime, preventing cross-instance data contamination. - Safety Gating: Requires .env.local loading, readiness identity checks, and MOM_ALLOW_DATA_RESET=true before any write operation. - Use Case: A QA engineer needs to verify the stock list page shows a new inbound batch. They run this Skill with default quantity 10 and price 100, then check /inventory/stock-list to confirm the receipt appears. ## Quick Start Ask the assistant to create a test purchase order and run it through the full receipt flow on the current instance, optionally specifying quantity and unit price.

Frequently Asked Questions about demo-po-receipt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create purchase order test data via API?

Authenticate with the login endpoint to get a token, then POST to /api/inventory/po with supplier, material, quantity, and price. Follow with submit and approve PUT calls, then push to a receipt and confirm stock-in to complete the chain.

How to generate a full procurement workflow for testing?

Run the six-step sequence: create PO, submit PO, approve PO, push down to receipt, approve receipt, and confirm stock-in. Each step is a single curl call, and the resulting PO and receipt IDs are printed for verification in the frontend lists.

Can I specify quantity and price for the test purchase order?

Yes, quantity and unit price are configurable parameters before execution. The defaults are quantity 10 and unit price 100 with a 13% tax rate, and material, supplier, warehouse, and location are selected dynamically from the current instance.

Why does the script fail with JSON parse errors on Windows?

Git Bash on Windows mishandles single quotes inside curl JSON bodies. Write the JSON body to a temporary file and pass it with -d @/tmp/body.json instead of inline quoting to avoid the parsing failure.

What safety checks prevent running against the wrong instance?

Execution requires .env.local to be loaded, readiness identity to match MOM_INSTANCE_ID and MOM_EXPECTED_DATABASE, and MOM_ALLOW_DATA_RESET=true. Passwords are provided per session and held only in process variables, never persisted.