Merge remote-tracking branch 'refs/remotes/origin/staging' into staging

This commit is contained in:
Server D3 Linksehat
2024-08-21 14:26:12 +07:00
2 changed files with 36 additions and 1 deletions

View File

@@ -154,6 +154,7 @@ class DrugController extends Controller
$importedRows = 0;
$failedRows = [];
foreach ($processedData as $row) {
try {
Drug::updateOrCreate([
@@ -171,11 +172,13 @@ class DrugController extends Controller
'type' => $row['type'],
'dosage' => $row['dosage'],
'remark' => $row['remark'],
'price' => $row['price'],
// 'price' => $row['price'],
'unit' => $row['unit'],
]
);
$importedRows++;
} catch (\Exception $e) {
dd($e);
$failedRows[] = $row;
}
}