Hoan thien core finance v2
This commit is contained in:
@@ -13,10 +13,9 @@ class CreateContract extends CreateRecord
|
||||
protected function afterCreate(): void
|
||||
{
|
||||
$contract = $this->record;
|
||||
$templateId = $this->data['payment_template_id'] ?? null;
|
||||
|
||||
if ($templateId) {
|
||||
$template = \App\Models\PaymentTemplate::find($templateId);
|
||||
if ($contract->payment_template_id) {
|
||||
$template = $contract->paymentTemplate;
|
||||
if ($template) {
|
||||
ContractScheduleService::generateFromTemplate($contract, $template);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user