chinh sua theo tieu chuan phan mem BDS_1

This commit is contained in:
2026-04-28 08:49:28 +00:00
parent e229da5e8c
commit 0712046f4b
18 changed files with 623 additions and 59 deletions

View File

@@ -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);
}
}
}