定制 jeffersongoncalves/laravel-erp-subcontracting 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jeffersongoncalves/laravel-erp-subcontracting

Composer 安装命令:

composer require jeffersongoncalves/laravel-erp-subcontracting

包简介

ERP subcontracting — subcontracting BOMs, orders and receipts for the Laravel ERP ecosystem

README 文档

README

ERP subcontracting — subcontracting BOMs, orders and receipts for the Laravel ERP ecosystem.

This package is the subcontracting module of an ERPNext-native rebuild. It models the flow of having a subcontractor produce a finished good from raw materials the company supplies, and posts the resulting stock and accounting impact when the finished good is received. It depends on jeffersongoncalves/laravel-erp-core, jeffersongoncalves/laravel-erp-accounting, jeffersongoncalves/laravel-erp-stock, jeffersongoncalves/laravel-erp-buying and jeffersongoncalves/laravel-erp-manufacturing.

Features

  • Subcontracting BOM master — A finished good, the quantity it is produced in, an optional link to a manufacturing Bom, a service item and the raw materials that must be supplied for it
  • Subcontracting Order — A PO-like document to a supplier (via the dynamic-link party_type / party_id convention) for finished goods, carrying the supplied raw materials and the supplier warehouse they are sent to, built on the core IsSubmittable lifecycle (Draft → Submitted → Cancelled) with its own SubcontractingOrderStatus
  • Subcontracting Receipt — Receives the finished goods and posts to the perpetual inventory engine: the finished good comes inbound (valued at the service rate plus the consumed raw material value) while the consumed raw materials go outbound from the supplier warehouse, with the net stock value driving the general ledger
  • createReceipt serviceSubcontractingOrderService::createReceipt() drafts a receipt for the finished-good quantities still to be received and copies the supplied raw materials over as consumed
  • Customizable Models — Override any model via config (ModelResolver pattern)
  • Translations — English and Brazilian Portuguese

Compatibility

Package PHP Laravel
^1.0 ^8.2 ^11.0 | ^12.0 | ^13.0

Installation

composer require jeffersongoncalves/laravel-erp-subcontracting

Publish and run the migrations (the upstream package migrations must be published too):

php artisan vendor:publish --tag="erp-core-migrations"
php artisan vendor:publish --tag="erp-accounting-migrations"
php artisan vendor:publish --tag="erp-stock-migrations"
php artisan vendor:publish --tag="erp-manufacturing-migrations"
php artisan vendor:publish --tag="erp-subcontracting-migrations"
php artisan migrate

Publish the config (optional):

php artisan vendor:publish --tag="erp-subcontracting-config"

The Subcontracting Receipt

The receipt is built on the stock package's StockLedgerService and the core IsSubmittable lifecycle. On submit() it posts two kinds of movement through the inventory engine:

use JeffersonGoncalves\Erp\Subcontracting\Services\SubcontractingOrderService;

$receipt = app(SubcontractingOrderService::class)->createReceipt($subcontractingOrder);

$receipt->counterAccountId = $subcontractingExpenseAccountId;
$receipt->submit();   // posts the stock + GL impact
$receipt->cancel();   // reverses it
  • Finished good — inbound to its destination warehouse, valued at the service rate plus a proportional share of the consumed raw material value.
  • Supplied raw material — outbound from the supplier warehouse it was sent to, valued by the item's valuation method.

The net stock-value change (the service / conversion cost) drives the general ledger via the stock engine: debit the finished-good inventory account / credit the subcontracting counter account (Stock Received But Not Billed / subcontracting expense). Cancellation reverses both the stock ledger and the GL.

Database Tables

All tables use the configured prefix shared across the ERP ecosystem (default: erp_): subcontracting_boms, subcontracting_bom_items, subcontracting_orders, subcontracting_order_items, subcontracting_order_supplied_items, subcontracting_receipts, subcontracting_receipt_items, subcontracting_receipt_supplied_items.

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固