[REFACTOR] 統一訂單同步 API 錯誤回應與修正 Linter 警告

This commit is contained in:
2026-03-19 14:07:32 +08:00
parent e3ceedc579
commit 0b4aeacb55
15 changed files with 1173 additions and 108 deletions

View File

@@ -21,9 +21,12 @@ interface InventoryServiceInterface
* @param string|null $reason
* @param bool $force
* @param string|null $slot
* @param string|null $referenceType
* @param int|string|null $referenceId
* @param string|null $batchNumber
* @return void
*/
public function decreaseStock(int $productId, int $warehouseId, float $quantity, ?string $reason = null, bool $force = false, ?string $slot = null, ?string $referenceType = null, $referenceId = null): void;
public function decreaseStock(int $productId, int $warehouseId, float $quantity, ?string $reason = null, bool $force = false, ?string $slot = null, ?string $referenceType = null, $referenceId = null, ?string $batchNumber = null): void;
/**
* Get all active warehouses.
@@ -162,9 +165,10 @@ interface InventoryServiceInterface
* Get inventory summary (group by product) for a specific warehouse code
*
* @param string $code
* @param array $filters
* @return \Illuminate\Support\Collection|null
*/
public function getPosInventoryByWarehouseCode(string $code);
public function getPosInventoryByWarehouseCode(string $code, array $filters = []);
/**
* 處理批量入庫邏輯 (含批號產生與現有批號累加)