You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
640 B
23 lines
640 B
<?php
|
|
|
|
namespace App\Domains\Finance\Actions\PaymentProcessing;
|
|
|
|
use App\Domains\Finance\DTOs\PaymentProcessing\IssueInvoiceDTO;
|
|
use App\Domains\Finance\Models\Invoice;
|
|
|
|
class InitializeInvoice
|
|
{
|
|
public function execute(IssueInvoiceDTO $dto): void
|
|
{
|
|
Invoice::create([
|
|
'name' => $dto->name,
|
|
'detail' => $dto->detail->toArray(),
|
|
'client_ref_id' => $dto->clientRefId,
|
|
'type' => $dto->type,
|
|
'amount' => $dto->amount,
|
|
'status' => $dto->status,
|
|
'client_id' => $dto->clientId,
|
|
'chart_of_account_id' => $dto->coaId,
|
|
]);
|
|
}
|
|
}
|
|
|