diff --git a/app/Http/Modules/User/ContractModule.php b/app/Http/Modules/User/ContractModule.php index 11aa09f..b512adc 100644 --- a/app/Http/Modules/User/ContractModule.php +++ b/app/Http/Modules/User/ContractModule.php @@ -135,10 +135,18 @@ class ContractModule extends BaseController ->get(); 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(); + $depend_contract_obligation = ContractObligation:: + where('contract_template_id', $contarct_template->id) + ->where('id', $contract_template_obligation_dependency[0]->depend_contract_template_obligation_id) + ->first(); $request->request->add([ - 'contract_obligation_id' => [$contract_template_obligation_dependency[0]->contract_template_obligation_id], + 'contract_obligation_id' => [$contract_obligation->hash_id], 'depend_contract_obligation_id' => [$contract_template_obligation_dependency[0]->depend_contract_template_obligation_id] ]);