chinh sua theo tieu chuan phan mem BDS_1
This commit is contained in:
@@ -14,11 +14,16 @@ class CreateContract extends CreateRecord
|
||||
{
|
||||
$contract = $this->record;
|
||||
|
||||
$template = null;
|
||||
|
||||
if ($contract->payment_template_id) {
|
||||
$template = $contract->paymentTemplate;
|
||||
if ($template) {
|
||||
ContractScheduleService::generateFromTemplate($contract, $template);
|
||||
}
|
||||
} elseif ($contract->sales_phase_id && $contract->salesPhase?->payment_template_id) {
|
||||
$template = $contract->salesPhase->paymentTemplate;
|
||||
}
|
||||
|
||||
if ($template) {
|
||||
ContractScheduleService::generateFromTemplate($contract, $template);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user