Added tax support

This commit is contained in:
2026-08-10 13:45:55 +02:00
parent 6b33c1b4dd
commit b3bbeb5b0b
18 changed files with 749 additions and 11 deletions
+8 -3
View File
@@ -8,14 +8,11 @@ use App\Enumerations\EatingHabit;
use App\Enumerations\ParticipationFeeType;
use App\RelationModels\EventParticipationFee;
use App\RelationModels\EventPaymentMethods;
use App\Resources\EventResource;
use App\Scopes\CommonModel;
use App\Scopes\InstancedModel;
use DateTime;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* @property string $tenant
@@ -85,6 +82,11 @@ class Event extends InstancedModel
'support_flat',
'alcoholics_age',
'archived',
'tax_liable',
'vat_rate',
'vat_pricing_mode',
'tax_exemption_reason',
'tax_exemption_note',
];
@@ -109,6 +111,9 @@ class Event extends InstancedModel
'total_max_amount' => AmountCast::class,
'sibling_reduction' => 'boolean',
'tax_liable' => 'boolean',
'vat_rate' => 'integer',
];
public function tenant(): BelongsTo
+16 -1
View File
@@ -21,6 +21,11 @@ use App\Scopes\CommonModel;
* @property string $url_participation_rules
* @property boolean $events_allowed
* @property boolean $has_active_instance
* @property boolean $tax_liable
* @property int $vat_rate
* @property string|null $tax_exemption_reason
* @property string|null $tax_exemption_note
* @property string $vat_pricing_mode
*/
class Tenant extends CommonModel
{
@@ -46,6 +51,16 @@ class Tenant extends CommonModel
'impress_text',
'url_participation_rules',
'is_active_local_group',
'has_active_instance'
'has_active_instance',
'tax_liable',
'vat_rate',
'tax_exemption_reason',
'tax_exemption_note',
'vat_pricing_mode',
];
protected $casts = [
'tax_liable' => 'boolean',
'vat_rate' => 'integer',
];
}