mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 20:34:01 +00:00
contract obligation contract dependency generate
This commit is contained in:
@@ -124,11 +124,12 @@ class ContractModule extends BaseController
|
||||
$contract_obligation = ContractObligationModule::generate($request);
|
||||
}
|
||||
|
||||
// generate contract dependency
|
||||
|
||||
// generate contract obligation dependency
|
||||
foreach ($contract_template_obligation_list as $key => $row) {
|
||||
$contract_template_obligation_dependency = $row->contract_template_obligation_dependency()
|
||||
->where('status', config('constants.contract_template_obligation_dependency.status.active'))
|
||||
->get();
|
||||
->where('status', config('constants.contract_template_obligation_dependency.status.active'))
|
||||
->get();
|
||||
|
||||
if (!empty($contract_template_obligation_dependency[0])) {
|
||||
$contract_obligation = ContractObligation::
|
||||
@@ -149,10 +150,25 @@ class ContractModule extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
// generate contract obligation contract dependency
|
||||
foreach ($contract_template_obligation_list as $key => $row) {
|
||||
$contract_template_obligation_contract_dependency = $row->contract_template_obligation_contract_template_dependency()
|
||||
->where('status', config('constants.contract_template_obligation_dependency.status.active'))
|
||||
->get();
|
||||
|
||||
if (!empty($contract_template_obligation_contract_dependency[0])) {
|
||||
|
||||
$request->request->add([
|
||||
'contract_template_id' => [$contract_template_obligation_contract_dependency[0]->depend_contract_template_hash_id],
|
||||
]);
|
||||
$depend_contract = ContractModule::generate($request);
|
||||
}
|
||||
}
|
||||
|
||||
// log
|
||||
ContractModule::makeLog($contract->id, 'user (' . Auth::guard('user-api')->user()->id . ') created');
|
||||
|
||||
// DB::commit();
|
||||
DB::commit();
|
||||
|
||||
$query_string = General::getCachePerviousQuery('contract_query');
|
||||
$data = General::returnData($contract, $query_string);
|
||||
|
||||
Reference in New Issue
Block a user