delete supply chain contract

This commit is contained in:
2020-08-07 12:32:52 -05:00
parent 075ec5f6bf
commit 8a7e84ebb8

View File

@@ -134,14 +134,14 @@ class SupplyChainController extends Controller
*/
$count = SupplyChainContract::where([
'issuer_id' => auth()->user()->getId(),
'id' => $request->contractId,
'contract_id' => $request->contractId,
])->count();
if($count > 0) {
//Remove the supply chain contract
SupplyChainContract::where([
'issuer_id' => auth()->user()->getId(),
'id' => $request->contractId,
'contract_id' => $request->contractId,
])->delete();
}