tourze/purchase-manage-bundle
Composer 安装命令:
composer require tourze/purchase-manage-bundle
包简介
Symfony Bundle for purchase management with order management, approval workflow and delivery tracking
README 文档
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.
tourze/purchase-manage-bundle 适用场景与选型建议
tourze/purchase-manage-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 11 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 tourze/purchase-manage-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tourze/purchase-manage-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-15