fix create contract bug

This commit is contained in:
omair saleh
2021-12-29 02:02:49 +08:00
parent e6fbab6372
commit 441c0d8485
+2 -2
View File
@@ -131,14 +131,13 @@ class ContractModule extends BaseController
$contract_template_obligation_dependency = $row->contract_template_obligation_dependency()
->where('status', config('constants.contract_template_obligation_dependency.status.active'))
->get();
dd($contract->id);
if (!empty($contract_template_obligation_dependency[0])) {
$contract_obligation = ContractObligation::
where('contract_id', $contract->id)
->where('contract_template_obligation_id', $contract_template_obligation_dependency[0]->contract_template_obligation_id)
->first();
dd($contract_template_obligation_dependency[0]);
$depend_contract_obligation = ContractObligation::
where('contract_id', $contract->id)
->where('contract_template_obligation_id', $contract_template_obligation_dependency[0]->depend_contract_template_obligation_id)
@@ -148,6 +147,7 @@ class ContractModule extends BaseController
'contract_obligation_id' => [$contract_obligation->hash_id],
'depend_contract_obligation_id' => [$depend_contract_obligation->hash_id]
]);
$contract_obligation_dependency = ContractObligationDependencyModule::generate($request);
}
}