Professional Documents
Culture Documents
php
namespace App\Http\Livewire\CashingPermession;
use App\Models\equalizQuantite;
use App\Models\ExportItem;
use App\Models\FactorySetting;
use App\Models\Item;
use App\Models\ItemMovement;
use App\Models\ItemPreviosBalance;
use App\Models\ItemStore;
use App\Models\Store;
use App\Models\TotalEqualizQuantite;
use App\Models\TotalExportItem;
use Illuminate\Http\Request;
use Illuminate\Support\MessageBag;
use Livewire\Component;
$stores = Store::get();
protected $messages = [
'required' => ''هذا الحقل مطلوب,
];
$this->validate($this->rules());
$errors = new MessageBag(['inputs.*.amount' => ' '" يجب ادخال رقم اقل من.
$this->itemss]);
$this->withErrors($errors);
$total = TotalExportItem::create([
'store_id' => $this->store_id,
'date' => $this->date,
'notes' => $this->notes,
]);
foreach ($this->inputs as $key => $input) {
], [
ItemStore::where('item_id', $input['item_id'])->update([
'balance' => $input['amount']
]);
}
}
$this->rest();
$this->inputs = [['item_id' => '', 'amount' => '']];
session()->flash('success', ';)'تم الحفظ بنجاح
unset($this->newInputs[$index]);
$this->newInputs = array_values($this->newInputs);
}
$Id = ExportItem::find($id);
$this->export_id = $id;
return view('livewire.admin.exportItem');
}
$this->showModal=true;
$totalExport = TotalExportItem::find($id);
$this->export_id = $id;
$this->new_store_id = $totalExport->store_id;
$this->new_notes = $totalExport->notes;
// dd($this->all());
$this->arr[$key]['item_idd'] = $it->item_id;
$this->arr[$key]['new_current_amount'] = $it->quantity;
// dd($this->newInputs[$key]['new_current_amount']);
}
// }
}
}