commit compras5 2911
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-29 19:49:19 +02:00
parent a935499d64
commit 96b30368bc
96 changed files with 3397 additions and 111 deletions
@@ -12,6 +12,7 @@ use App\Models\StockItem;
use App\Models\StockMovement;
use App\Models\User;
use App\Models\Warehouse;
use App\Services\InventoryConversionRuntime;
use App\Services\InventoryLots;
use App\Services\InventoryReversals;
use App\Services\ReceiptDocuments;
@@ -72,7 +73,7 @@ class GoodsReceiptController extends Controller
'receipts' => GoodsReceipt::query()->where('purchase_order_id', $order->id)->latest('id')->get(),
'warehouses' => Warehouse::query()->orderBy('code')->get(['id', 'code', 'name']),
'stockItems' => StockItem::query()->orderBy('code')->get(['id', 'code', 'name', 'unit']),
'conversionQaEnabled' => app()->environment('testing') && config('inventory_conversion.qa_enabled') === true,
'conversionQaEnabled' => app(InventoryConversionRuntime::class)->available(),
'canConfirm' => $actor->can('create', [GoodsReceipt::class, $order]),
'lotScopes' => Schema::hasTable('inventory_lot_allocations')
? app(InventoryLots::class)->activeSetups()->get()->map(fn ($r) => ['stock_item_id' => $r->stock_item_id, 'warehouse_id' => $r->warehouse_id, 'quarantine_on_receipt' => $r->data['quarantine_on_receipt'] ?? true])->values()->all() : [],