shaungbhone / shopper-po
Purchase orders and auditable receiving for Laravel Shopper 2.12.
Requires
- php: ^8.3
- filament/filament: ^4.12
- illuminate/support: ^12.0
- livewire/livewire: ^3.8
- shopper/framework: ~2.12.1
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^10.0
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-05 18:50:34 UTC
README
A community add-on for Laravel Shopper that tracks supplier purchase orders and records incoming inventory.
Install
The add-on requires an existing Laravel Shopper installation with Shopper >=2.12.1 <2.13.0, Laravel 12, and PHP 8.3 or later.
Run these commands from your Shopper application:
composer require shaungbhone/shopper-po:^1.0 php artisan migrate php artisan optimize:clear
Laravel package discovery registers the add-on with Shopper. Purchase orders share the built-in Orders permissions.
- Enable the supplier feature in
config/shopper/features.phpby settingsupplierto\Shopper\Enum\FeatureState::Enabled. Set up an enabled supplier and an inventory location in Shopper. - Manage Orders permissions for each role in Shopper's team settings. Browsing uses
browse_orders, viewing usesread_orders, and creating drafts usesadd_orders. Editing, placing, cancelling, and closing purchase orders, as well as receiving stock and correcting receipts, require bothread_ordersandedit_orders. - Open Purchasing → Purchase orders in the Shopper admin.
If you change the supplier feature after clearing the configuration cache, run php artisan optimize:clear again.
For version 1.0.0, follow the installation instructions for that release. When upgrading from 1.0.0, review roles that used dedicated purchase order permissions and grant the appropriate Orders permissions in Shopper.
Use
Create a draft, choose the products and unit costs, and mark the order as ordered when the supplier confirms it. Record partial or final deliveries against the outstanding quantities. Accepted units increase stock at the order's inventory location and appear in Shopper's stock history.
Rejected units can await replacement or be waived. Correct a receipt to fix a receiving mistake and keep an audit trail, or close the order to waive the remaining balance.
New orders use enabled currencies from Shopper's Settings → Currencies, with the store currency selected by default. Existing drafts retain their saved currency if it is later disabled. Amounts follow Shopper's currency precision.
Disable the add-on
Set 'purchase-orders' => false in config/shopper/addons.php and run php artisan optimize:clear. If the file does not exist, create it with a PHP configuration array containing that entry. Disabling the add-on removes its screens from the admin and preserves existing purchase orders and receipts.
Development
From the package checkout:
composer install
npm ci
composer test
npm run format:check
The default suite uses SQLite. See the test workflow for the MySQL and concurrency test settings.
Shopper documents the integration points in its add-on guide.
License
Released under the MIT license.
