create print opname and mutations

This commit is contained in:
2025-06-19 18:02:20 +07:00
parent e478dc81bb
commit 82f9d7f466
6 changed files with 1029 additions and 1 deletions

View File

@@ -527,4 +527,25 @@ class MutationsController extends Controller
], 500);
}
}
public function print($id)
{
try {
$mutation = Mutation::with([
'fromDealer',
'toDealer',
'requestedBy.role',
'approvedBy.role',
'receivedBy.role',
'rejectedBy.role',
'cancelledBy.role',
'mutationDetails.product.category'
])->findOrFail($id);
return view('warehouse_management.mutations.print', compact('mutation'));
} catch (\Exception $e) {
Log::error('Error printing mutation: ' . $e->getMessage());
return back()->with('error', 'Gagal membuka halaman print mutasi.');
}
}
}