tourze / purchase-manage-bundle
Symfony Bundle for purchase management with order management, approval workflow and delivery tracking
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
pkg:composer/tourze/purchase-manage-bundle
Requires
- doctrine/collections: ^2.3
- doctrine/dbal: ^4.0
- doctrine/doctrine-bundle: ^2.13
- doctrine/orm: ^3.0
- doctrine/persistence: ^4.1
- easycorp/easyadmin-bundle: ^4
- knplabs/knp-menu: ^3.7
- psr/log: ^3|^2|^1
- symfony/config: ^7.3
- symfony/dependency-injection: ^7.3
- symfony/doctrine-bridge: ^7.3
- symfony/event-dispatcher: ^7.3
- symfony/event-dispatcher-contracts: ^3
- symfony/form: ^7.3
- symfony/framework-bundle: ^7.3
- symfony/http-foundation: ^7.3
- symfony/http-kernel: ^7.3
- symfony/property-access: ^7.3
- symfony/security-bundle: ^7.3
- symfony/serializer: ^7.3
- symfony/validator: ^7.3
- symfony/workflow: ^7.3
- symfony/yaml: ^7.3
- tourze/bundle-dependency: 1.*
- tourze/doctrine-ip-bundle: 1.1.*
- tourze/doctrine-snowflake-bundle: 1.1.*
- tourze/doctrine-timestamp-bundle: 1.1.*
- tourze/doctrine-track-bundle: 1.1.*
- tourze/doctrine-user-bundle: 1.0.*
- tourze/easy-admin-menu-bundle: 1.0.*
- tourze/enum-extra: 1.0.*
- tourze/product-core-bundle: 1.0.*
- tourze/supplier-manage-bundle: 0.0.*
- tourze/symfony-dependency-service-loader: 1.0.*
Requires (Dev)
- doctrine/data-fixtures: ^2.0
- doctrine/doctrine-fixtures-bundle: ^4.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
- tourze/doctrine-resolve-target-entity-bundle: 1.*
- tourze/phpunit-doctrine-entity: 1.*
- tourze/phpunit-enum: 1.*
- tourze/phpunit-symfony-kernel-test: 1.0.*
- tourze/phpunit-symfony-unit-test: 1.*
- tourze/phpunit-symfony-web-test: 1.*
This package is auto-updated.
Last update: 2025-11-18 08:36:20 UTC
README
A comprehensive Symfony bundle for purchase management that provides order management, approval workflow, and delivery tracking capabilities.
Features
- Purchase Order Management: Create, update, and track purchase orders with unique order numbers
- Supplier Integration: Seamless integration with supplier management
- Approval Workflow: Built-in approval process for purchase orders
- Delivery Tracking: Track purchase deliveries and receipt confirmations
- EasyAdmin Integration: Ready-to-use admin interface with EasyAdmin
- Audit Trail: Complete audit trail with user tracking and IP logging
- Workflow Support: Symfony Workflow integration for complex approval processes
Installation
composer require tourze/purchase-manage-bundle
Configuration
Register the bundle in your config/bundles.php:
return [ // ... Tourze\PurchaseManageBundle\PurchaseManageBundle::class => ['all' => true], ];
Dependencies
This bundle requires the following bundles:
DoctrineBundleProductCoreBundleSupplierManageBundleEasyAdminMenuBundle
Usage
Basic Purchase Order Creation
<?php use Tourze\PurchaseManageBundle\Entity\PurchaseOrder; use Tourze\PurchaseManageBundle\Enum\PurchaseOrderStatus; // Create a new purchase order $purchaseOrder = new PurchaseOrder(); $purchaseOrder->setTitle('Office Supplies Purchase'); $purchaseOrder->setSupplier($supplier); $purchaseOrder->setStatus(PurchaseOrderStatus::DRAFT); // Add items to the order $purchaseOrderItem = new PurchaseOrderItem(); $purchaseOrderItem->setProduct($product); $purchaseOrderItem->setQuantity(10); $purchaseOrderItem->setUnitPrice(25.50); $purchaseOrder->addItem($purchaseOrderItem); // Save the order $entityManager->persist($purchaseOrder); $entityManager->flush();
Approval Workflow
<?php use Tourze\PurchaseManageBundle\Entity\PurchaseApproval; // Create approval record $approval = new PurchaseApproval(); $approval->setPurchaseOrder($purchaseOrder); $approval->setApprover($user); $approval->setStatus('approved'); $approval->setComment('Approved for office supplies'); $entityManager->persist($approval); $entityManager->flush(); // Update purchase order status $purchaseOrder->setStatus(PurchaseOrderStatus::APPROVED); $entityManager->flush();
Delivery Tracking
<?php use Tourze\PurchaseManageBundle\Entity\PurchaseDelivery; // Record delivery $delivery = new PurchaseDelivery(); $delivery->setPurchaseOrder($purchaseOrder); $delivery->setDeliveryDate(new \DateTime()); $delivery->setTrackingNumber('TRACK123456'); $delivery->setStatus('delivered'); $entityManager->persist($delivery); $entityManager->flush();
Configuration Options
You can configure the bundle using YAML or XML configuration:
# config/packages/purchase_manage.yaml purchase_manage: # Default approval workflow approval_required: true auto_approve_threshold: 1000.00 # Notification settings notifications: email_enabled: true sms_enabled: false # Order number generation order_number: prefix: 'PO' length: 10
Available Services
The bundle provides the following services:
tourze_purchase_manage.order_manager- Purchase order managementtourze_purchase_manage.approval_manager- Approval workflow managementtourze_purchase_manage.delivery_manager- Delivery tracking managementtourze_purchase_manage.notification_service- Notification service
Database Schema
The bundle creates the following database tables:
purchase_order- Main purchase orderspurchase_order_item- Individual order itemspurchase_delivery- Delivery recordspurchase_approval- Approval records
Events
The bundle dispatches the following events:
purchase_order.created- When a purchase order is createdpurchase_order.updated- When a purchase order is updatedpurchase_approval.created- When an approval is createdpurchase_delivery.created- When a delivery is recorded
Testing
# Run the test suite composer run test # Run PHPStan analysis composer run analyse # Run all quality checks composer run quality
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
License
This bundle is licensed under the MIT License. See the LICENSE file for details.
Support
For support and questions:
- Create an issue in the GitHub repository
- Check the documentation
- Review existing issues for solutions
Changelog
See CHANGELOG.md for a list of changes and version history.