fix create contract bug

This commit is contained in:
omair saleh
2021-12-29 01:38:05 +08:00
parent aaf11971e8
commit 0f0567616c
+2 -1
View File
@@ -138,11 +138,12 @@ class ContractModule extends BaseController
->where('contract_template_obligation_id', $contract_template_obligation_dependency[0]->contract_template_obligation_id) ->where('contract_template_obligation_id', $contract_template_obligation_dependency[0]->contract_template_obligation_id)
->first(); ->first();
dd($contract);
$depend_contract_obligation = ContractObligation:: $depend_contract_obligation = ContractObligation::
where('contract_id', $contract->id) where('contract_id', $contract->id)
->where('contract_template_obligation_id', $contract_template_obligation_dependency[0]->depend_contract_template_obligation_id) ->where('contract_template_obligation_id', $contract_template_obligation_dependency[0]->depend_contract_template_obligation_id)
->first(); ->first();
dd($depend_contract_obligation);
$request->request->add([ $request->request->add([
'contract_obligation_id' => [$contract_obligation->hash_id], 'contract_obligation_id' => [$contract_obligation->hash_id],
'depend_contract_obligation_id' => [$depend_contract_obligation->hash_id] 'depend_contract_obligation_id' => [$depend_contract_obligation->hash_id]