2022-10-20 02:15:28 +02:00
|
|
|
<?php
|
|
|
|
|
2023-04-18 22:08:45 +02:00
|
|
|
namespace App\Invoice;
|
2022-10-20 02:15:28 +02:00
|
|
|
|
2023-06-01 12:04:31 +02:00
|
|
|
use App\Setting\Contracts\Storeable;
|
2022-10-20 02:15:28 +02:00
|
|
|
use App\Setting\LocalSettings;
|
2024-08-01 13:33:28 +02:00
|
|
|
use Lorisleiva\Actions\ActionRequest;
|
2022-10-20 02:15:28 +02:00
|
|
|
|
2024-08-01 11:32:14 +02:00
|
|
|
class InvoiceSettings extends LocalSettings implements Storeable
|
2022-10-20 02:15:28 +02:00
|
|
|
{
|
|
|
|
public string $from_long;
|
|
|
|
|
|
|
|
public string $from;
|
|
|
|
|
|
|
|
public string $mobile;
|
|
|
|
|
|
|
|
public string $email;
|
|
|
|
|
|
|
|
public string $website;
|
|
|
|
|
|
|
|
public string $address;
|
|
|
|
|
|
|
|
public string $place;
|
|
|
|
|
|
|
|
public string $zip;
|
|
|
|
|
2022-11-17 23:59:43 +01:00
|
|
|
public string $iban;
|
|
|
|
|
|
|
|
public string $bic;
|
|
|
|
|
2024-07-31 21:37:18 +02:00
|
|
|
public int $rememberWeeks;
|
|
|
|
|
2022-10-20 02:15:28 +02:00
|
|
|
public static function group(): string
|
|
|
|
{
|
|
|
|
return 'bill';
|
|
|
|
}
|
|
|
|
|
2024-08-01 11:17:49 +02:00
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
public function viewData(): array
|
2022-10-20 02:15:28 +02:00
|
|
|
{
|
2024-08-01 11:17:49 +02:00
|
|
|
return [
|
|
|
|
'data' => [
|
|
|
|
'from_long' => $this->from_long,
|
|
|
|
'from' => $this->from,
|
|
|
|
'mobile' => $this->mobile,
|
|
|
|
'email' => $this->email,
|
|
|
|
'website' => $this->website,
|
|
|
|
'address' => $this->address,
|
|
|
|
'place' => $this->place,
|
|
|
|
'zip' => $this->zip,
|
|
|
|
'iban' => $this->iban,
|
|
|
|
'bic' => $this->bic,
|
2024-08-01 13:33:28 +02:00
|
|
|
'rememberWeeks' => $this->rememberWeeks,
|
2024-08-01 11:17:49 +02:00
|
|
|
]
|
|
|
|
];
|
2022-10-20 02:15:28 +02:00
|
|
|
}
|
|
|
|
|
2024-08-01 13:33:28 +02:00
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
public function rules(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'from_long' => '',
|
|
|
|
'from' => '',
|
|
|
|
'mobile' => '',
|
|
|
|
'email' => '',
|
|
|
|
'website' => '',
|
|
|
|
'address' => '',
|
|
|
|
'place' => '',
|
|
|
|
'zip' => '',
|
|
|
|
'iban' => '',
|
|
|
|
'bic' => '',
|
|
|
|
'rememberWeeks' => '',
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function beforeSave(ActionRequest $request): void
|
2022-10-20 02:15:28 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function title(): string
|
|
|
|
{
|
|
|
|
return 'Rechnung';
|
|
|
|
}
|
|
|
|
}
|