feat: 實作銷售單匯入管理、貨道扣庫優化及 UI 細節調整
This commit is contained in:
24
app/Modules/Sales/Imports/SalesImport.php
Normal file
24
app/Modules/Sales/Imports/SalesImport.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Sales\Imports;
|
||||
|
||||
use App\Modules\Sales\Models\SalesImportBatch;
|
||||
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
||||
|
||||
class SalesImport implements WithMultipleSheets
|
||||
{
|
||||
protected $batch;
|
||||
|
||||
public function __construct(SalesImportBatch $batch)
|
||||
{
|
||||
$this->batch = $batch;
|
||||
}
|
||||
|
||||
public function sheets(): array
|
||||
{
|
||||
// Only import the first sheet (index 0)
|
||||
return [
|
||||
0 => new SalesImportSheet($this->batch),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user