diff --git a/app/Http/Controllers/AccountBookingController.php b/app/Http/Controllers/AccountBookingController.php
new file mode 100644
index 0000000..0c7efb1
--- /dev/null
+++ b/app/Http/Controllers/AccountBookingController.php
@@ -0,0 +1,53 @@
+where('account_id', $account->id)
+ ->orderByDesc('booked_at')
+ ->get(['id', 'payment_id', 'amount_cents', 'type', 'description', 'booked_at', 'created_at']);
+
+ return Inertia::render('Accounts/Bookings/Index', [
+ 'account' => $account->only(['id', 'reference', 'description']),
+ 'bookings' => $bookings,
+ ]);
+ }
+
+ public function store(StoreBookingRequest $request, Account $account): RedirectResponse
+ {
+ $validated = $request->validated();
+
+ Booking::query()->create([
+ 'account_id' => $account->id,
+ 'payment_id' => $validated['payment_id'] ?? null,
+ 'amount_cents' => (int) round(((float) $validated['amount']) * 100),
+ 'type' => $validated['type'],
+ 'description' => $validated['description'] ?? null,
+ 'booked_at' => $validated['booked_at'] ?? now(),
+ ]);
+
+ return back()->with('success', 'Booking created.');
+ }
+
+ public function destroy(Account $account, Booking $booking): RedirectResponse
+ {
+ if ($booking->account_id !== $account->id) {
+ abort(404);
+ }
+
+ $booking->delete();
+
+ return back()->with('success', 'Booking deleted.');
+ }
+}
diff --git a/app/Http/Controllers/AccountPaymentController.php b/app/Http/Controllers/AccountPaymentController.php
new file mode 100644
index 0000000..6332aa6
--- /dev/null
+++ b/app/Http/Controllers/AccountPaymentController.php
@@ -0,0 +1,150 @@
+where('account_id', $account->id)
+ ->orderByDesc('paid_at')
+ ->get(['id', 'amount_cents', 'currency', 'reference', 'paid_at', 'created_at'])
+ ->map(function (Payment $p) {
+ return [
+ 'id' => $p->id,
+ 'amount' => $p->amount, // accessor divides cents
+ 'currency' => $p->currency,
+ 'reference' => $p->reference,
+ 'paid_at' => $p->paid_at,
+ 'created_at' => $p->created_at,
+ ];
+ });
+
+ return Inertia::render('Accounts/Payments/Index', [
+ 'account' => $account->only(['id', 'reference', 'description']),
+ 'payments' => $payments,
+ ]);
+ }
+
+ public function list(Account $account): JsonResponse
+ {
+ $payments = Payment::query()
+ ->where('account_id', $account->id)
+ ->orderByDesc('paid_at')
+ ->get(['id', 'amount_cents', 'currency', 'reference', 'paid_at', 'created_at'])
+ ->map(function (Payment $p) {
+ return [
+ 'id' => $p->id,
+ 'amount' => $p->amount,
+ 'currency' => $p->currency,
+ 'reference' => $p->reference,
+ 'paid_at' => optional($p->paid_at)?->toDateString(),
+ 'created_at' => optional($p->created_at)?->toDateTimeString(),
+ ];
+ });
+
+ return response()->json([
+ 'account' => [
+ 'id' => $account->id,
+ 'balance_amount' => $account->balance_amount,
+ ],
+ 'payments' => $payments,
+ ]);
+ }
+
+ public function store(StorePaymentRequest $request, Account $account): RedirectResponse
+ {
+ $validated = $request->validated();
+
+ $amountCents = (int) round(((float) $validated['amount']) * 100);
+
+ // Load defaults from settings
+ $settings = PaymentSetting::query()->first();
+ $defaultCurrency = strtoupper($settings->default_currency ?? 'EUR');
+
+ $payment = Payment::query()->create([
+ 'account_id' => $account->id,
+ 'amount_cents' => $amountCents,
+ 'currency' => strtoupper($validated['currency'] ?? $defaultCurrency),
+ 'reference' => $validated['reference'] ?? null,
+ 'paid_at' => $validated['paid_at'] ?? now(),
+ 'meta' => $validated['meta'] ?? null,
+ 'created_by' => $request->user()?->id,
+ ]);
+
+ // Auto-create a credit booking for this payment to reduce account balance
+ Booking::query()->create([
+ 'account_id' => $account->id,
+ 'payment_id' => $payment->id,
+ 'amount_cents' => $amountCents,
+ 'type' => 'credit',
+ 'description' => $payment->reference ? ('Plačilo '.$payment->reference) : 'Plačilo',
+ 'booked_at' => $payment->paid_at ?? now(),
+ ]);
+
+ // Optionally create an activity entry with default decision/action
+ if ($settings && ($settings->create_activity_on_payment ?? false)) {
+ $note = $settings->activity_note_template ?? 'Prejeto plačilo';
+ $note = str_replace(['{amount}', '{currency}'], [number_format($amountCents / 100, 2, ',', '.'), $payment->currency], $note);
+ $account->loadMissing('contract');
+ $clientCaseId = $account->contract?->client_case_id;
+ if ($clientCaseId) {
+ $activity = Activity::query()->create([
+ 'due_date' => null,
+ 'amount' => $amountCents / 100,
+ 'note' => $note,
+ 'action_id' => $settings->default_action_id,
+ 'decision_id' => $settings->default_decision_id,
+ 'client_case_id' => $clientCaseId,
+ 'contract_id' => $account->contract_id,
+ ]);
+ // Link the payment to the activity
+ $payment->update(['activity_id' => $activity->id]);
+ }
+ }
+
+ return back()->with('success', 'Payment created.');
+ }
+
+ public function destroy(Account $account, Payment $payment): RedirectResponse|JsonResponse
+ {
+ if ($payment->account_id !== $account->id) {
+ abort(404);
+ }
+
+ // Delete related booking(s) to revert balance via model events
+ Booking::query()->where('payment_id', $payment->id)->get()->each->delete();
+
+ // Optionally delete related activity
+ if ($payment->activity_id ?? null) {
+ $activity = Activity::query()->find($payment->activity_id);
+ if ($activity) {
+ $activity->delete();
+ }
+ }
+
+ $payment->delete();
+
+ if (request()->wantsJson()) {
+ $account->refresh();
+ return response()->json([
+ 'ok' => true,
+ 'balance_amount' => $account->balance_amount,
+ ]);
+ }
+
+ return back()->with('success', 'Payment deleted.');
+ }
+}
diff --git a/app/Http/Controllers/PaymentSettingController.php b/app/Http/Controllers/PaymentSettingController.php
new file mode 100644
index 0000000..314096e
--- /dev/null
+++ b/app/Http/Controllers/PaymentSettingController.php
@@ -0,0 +1,67 @@
+first();
+ if (! $setting) {
+ $setting = PaymentSetting::query()->create([
+ 'default_currency' => 'EUR',
+ 'create_activity_on_payment' => false,
+ 'default_decision_id' => null,
+ 'default_action_id' => null,
+ 'activity_note_template' => 'Prejeto plačilo: {amount} {currency}',
+ ]);
+ }
+
+ $decisions = Decision::query()->orderBy('name')->get(['id', 'name']);
+ $actions = Action::query()
+ ->with(['decisions:id'])
+ ->orderBy('name')
+ ->get()
+ ->map(function (Action $a) {
+ return [
+ 'id' => $a->id,
+ 'name' => $a->name,
+ 'decision_ids' => $a->decisions->pluck('id')->values(),
+ ];
+ });
+
+ return Inertia::render('Settings/Payments/Index', [
+ 'setting' => [
+ 'id' => $setting->id,
+ 'default_currency' => $setting->default_currency,
+ 'create_activity_on_payment' => (bool) $setting->create_activity_on_payment,
+ 'default_decision_id' => $setting->default_decision_id,
+ 'default_action_id' => $setting->default_action_id,
+ 'activity_note_template' => $setting->activity_note_template,
+ ],
+ 'decisions' => $decisions,
+ 'actions' => $actions,
+ ]);
+ }
+
+ public function update(UpdatePaymentSettingRequest $request): RedirectResponse
+ {
+ $data = $request->validated();
+ $setting = PaymentSetting::query()->firstOrFail();
+
+ // Ensure boolean cast for checkbox
+ $data['create_activity_on_payment'] = (bool) ($data['create_activity_on_payment'] ?? false);
+
+ $setting->fill($data)->save();
+
+ return back()->with('success', 'Payment settings updated.');
+ }
+}
diff --git a/app/Http/Requests/StoreBookingRequest.php b/app/Http/Requests/StoreBookingRequest.php
new file mode 100644
index 0000000..184346a
--- /dev/null
+++ b/app/Http/Requests/StoreBookingRequest.php
@@ -0,0 +1,24 @@
+ ['required', 'numeric', 'min:0.01'],
+ 'type' => ['required', 'in:debit,credit'],
+ 'description' => ['nullable', 'string', 'max:255'],
+ 'booked_at' => ['nullable', 'date'],
+ 'payment_id' => ['nullable', 'integer', 'exists:payments,id'],
+ ];
+ }
+}
diff --git a/app/Http/Requests/StorePaymentRequest.php b/app/Http/Requests/StorePaymentRequest.php
new file mode 100644
index 0000000..fc4382c
--- /dev/null
+++ b/app/Http/Requests/StorePaymentRequest.php
@@ -0,0 +1,24 @@
+ ['required', 'numeric', 'min:0.01'],
+ 'currency' => ['nullable', 'string', 'size:3'],
+ 'reference' => ['nullable', 'string', 'max:100'],
+ 'paid_at' => ['nullable', 'date'],
+ 'meta' => ['nullable', 'array'],
+ ];
+ }
+}
diff --git a/app/Http/Requests/UpdatePaymentSettingRequest.php b/app/Http/Requests/UpdatePaymentSettingRequest.php
new file mode 100644
index 0000000..1156c07
--- /dev/null
+++ b/app/Http/Requests/UpdatePaymentSettingRequest.php
@@ -0,0 +1,24 @@
+ ['required', 'string', 'size:3'],
+ 'create_activity_on_payment' => ['sometimes', 'boolean'],
+ 'default_decision_id' => ['nullable', 'integer', 'exists:decisions,id'],
+ 'default_action_id' => ['nullable', 'integer', 'exists:actions,id'],
+ 'activity_note_template' => ['nullable', 'string', 'max:255'],
+ ];
+ }
+}
diff --git a/app/Models/Account.php b/app/Models/Account.php
index 8f5bb2e..8ebfc9b 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -42,4 +42,18 @@ public function debts(): HasMany
return $this->hasMany(\App\Models\Debt::class);
}
+ public function payments(): HasMany
+ {
+ return $this->hasMany(\App\Models\Payment::class);
+ }
+
+ public function bookings(): HasMany
+ {
+ return $this->hasMany(\App\Models\Booking::class);
+ }
+
+ public function contract(): BelongsTo
+ {
+ return $this->belongsTo(\App\Models\Contract::class);
+ }
}
diff --git a/app/Models/AccountType.php b/app/Models/AccountType.php
index 2f9518e..28de31d 100644
--- a/app/Models/AccountType.php
+++ b/app/Models/AccountType.php
@@ -8,4 +8,9 @@
class AccountType extends Model
{
use HasFactory;
+
+ protected $fillable = [
+ 'name',
+ 'description',
+ ];
}
diff --git a/app/Models/Booking.php b/app/Models/Booking.php
new file mode 100644
index 0000000..f7ce0d5
--- /dev/null
+++ b/app/Models/Booking.php
@@ -0,0 +1,81 @@
+ 'datetime',
+ 'amount_cents' => 'integer',
+ ];
+ }
+
+ public function account(): BelongsTo
+ {
+ return $this->belongsTo(Account::class);
+ }
+
+ public function payment(): BelongsTo
+ {
+ return $this->belongsTo(Payment::class);
+ }
+
+ protected static function booted(): void
+ {
+ static::created(function (Booking $booking): void {
+ $booking->applyToAccountBalance(+1);
+ });
+
+ static::deleted(function (Booking $booking): void {
+ // Soft delete should revert the effect on balance
+ $booking->applyToAccountBalance(-1);
+ });
+
+ static::restored(function (Booking $booking): void {
+ // Re-apply when restored
+ $booking->applyToAccountBalance(+1);
+ });
+ }
+
+ /**
+ * Apply or revert the booking effect on account balance.
+ *
+ * @param int $multiplier +1 to apply, -1 to revert
+ */
+ protected function applyToAccountBalance(int $multiplier = 1): void
+ {
+ $account = $this->account;
+ if (! $account) {
+ return;
+ }
+
+ $delta = ($this->amount_cents / 100.0);
+ if ($this->type === 'credit') {
+ // Credit decreases the receivable (balance goes down)
+ $delta = -$delta;
+ }
+ // Debit increases receivable (balance up), credit decreases
+ $account->forceFill([
+ 'balance_amount' => (float) ($account->balance_amount ?? 0) + ($multiplier * $delta),
+ ])->save();
+ }
+}
diff --git a/app/Models/Payment.php b/app/Models/Payment.php
index e8a95df..b3fe440 100644
--- a/app/Models/Payment.php
+++ b/app/Models/Payment.php
@@ -2,16 +2,76 @@
namespace App\Models;
+use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\Relations\HasMany;
+use Illuminate\Database\Eloquent\SoftDeletes;
+use App\Models\Activity;
class Payment extends Model
{
use HasFactory;
+ use SoftDeletes;
+
+ protected $fillable = [
+ 'account_id',
+ 'amount_cents',
+ 'currency',
+ 'reference',
+ 'paid_at',
+ 'meta',
+ 'created_by',
+ 'activity_id',
+ ];
+
+ protected function casts(): array
+ {
+ return [
+ 'paid_at' => 'datetime',
+ 'meta' => 'array',
+ 'amount_cents' => 'integer',
+ ];
+ }
+
+ public function account(): BelongsTo
+ {
+ return $this->belongsTo(Account::class);
+ }
+
+ public function bookings(): HasMany
+ {
+ return $this->hasMany(Booking::class);
+ }
+
+ public function activity(): BelongsTo
+ {
+ return $this->belongsTo(Activity::class);
+ }
public function type(): BelongsTo
{
return $this->belongsTo(\App\Models\PaymentType::class);
}
+
+ /**
+ * Accessor to expose decimal amount for JSON serialization and UI convenience.
+ */
+ protected function amount(): Attribute
+ {
+ return Attribute::get(function () {
+ $cents = (int) ($this->attributes['amount_cents'] ?? 0);
+
+ return $cents / 100;
+ });
+ }
+
+ /**
+ * Mutator to set amount via decimal; stores in cents.
+ */
+ public function setAmountAttribute($value): void
+ {
+ $this->attributes['amount_cents'] = (int) round(((float) $value) * 100);
+ }
}
diff --git a/app/Models/PaymentSetting.php b/app/Models/PaymentSetting.php
new file mode 100644
index 0000000..5f46606
--- /dev/null
+++ b/app/Models/PaymentSetting.php
@@ -0,0 +1,19 @@
+id();
+ $table->foreignId('account_id')->constrained()->cascadeOnDelete();
+ $table->bigInteger('amount_cents');
+ $table->string('currency', 3)->default('EUR');
+ $table->string('reference')->nullable();
+ $table->timestamp('paid_at')->nullable();
+ $table->jsonb('meta')->nullable();
+ $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
+ $table->timestamps();
+ $table->softDeletes();
+
+ $table->index(['account_id', 'paid_at']);
+ $table->index('reference');
+ });
+ }
+ }
+
+ public function down(): void
+ {
+ Schema::dropIfExists('payments');
+ }
+};
diff --git a/database/migrations/2025_10_02_120100_create_bookings_table.php b/database/migrations/2025_10_02_120100_create_bookings_table.php
new file mode 100644
index 0000000..b1fbd89
--- /dev/null
+++ b/database/migrations/2025_10_02_120100_create_bookings_table.php
@@ -0,0 +1,32 @@
+id();
+ $table->foreignId('account_id')->constrained()->cascadeOnDelete();
+ $table->foreignId('payment_id')->nullable()->constrained('payments')->nullOnDelete();
+ $table->bigInteger('amount_cents');
+ $table->enum('type', ['debit', 'credit']);
+ $table->string('description')->nullable();
+ $table->timestamp('booked_at')->nullable();
+ $table->timestamps();
+ $table->softDeletes();
+
+ $table->index(['account_id', 'booked_at']);
+ });
+ }
+ }
+
+ public function down(): void
+ {
+ Schema::dropIfExists('bookings');
+ }
+};
diff --git a/database/migrations/2025_10_02_130000_recreate_payments_and_bookings_tables.php b/database/migrations/2025_10_02_130000_recreate_payments_and_bookings_tables.php
new file mode 100644
index 0000000..3c6484e
--- /dev/null
+++ b/database/migrations/2025_10_02_130000_recreate_payments_and_bookings_tables.php
@@ -0,0 +1,61 @@
+id();
+ $table->foreignId('account_id')->constrained()->cascadeOnDelete();
+ $table->bigInteger('amount_cents');
+ $table->string('currency', 3)->default('EUR');
+ $table->string('reference')->nullable();
+ $table->timestamp('paid_at')->nullable();
+ $table->jsonb('meta')->nullable();
+ $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
+ $table->timestamps();
+ $table->softDeletes();
+
+ $table->index(['account_id', 'paid_at']);
+ $table->index('reference');
+ });
+
+ // Recreate bookings
+ Schema::create('bookings', function (Blueprint $table): void {
+ $table->id();
+ $table->foreignId('account_id')->constrained()->cascadeOnDelete();
+ $table->foreignId('payment_id')->nullable()->constrained('payments')->nullOnDelete();
+ $table->bigInteger('amount_cents');
+ $table->enum('type', ['debit', 'credit']);
+ $table->string('description')->nullable();
+ $table->timestamp('booked_at')->nullable();
+ $table->timestamps();
+ $table->softDeletes();
+
+ $table->index(['account_id', 'booked_at']);
+ });
+ }
+
+ public function down(): void
+ {
+ if (Schema::hasTable('bookings')) {
+ Schema::drop('bookings');
+ }
+ if (Schema::hasTable('payments')) {
+ Schema::drop('payments');
+ }
+ }
+};
diff --git a/database/migrations/2025_10_02_140000_create_payment_settings_table.php b/database/migrations/2025_10_02_140000_create_payment_settings_table.php
new file mode 100644
index 0000000..aa55a81
--- /dev/null
+++ b/database/migrations/2025_10_02_140000_create_payment_settings_table.php
@@ -0,0 +1,26 @@
+id();
+ $table->string('default_currency', 3)->default('EUR');
+ $table->boolean('create_activity_on_payment')->default(false);
+ $table->foreignId('default_decision_id')->nullable()->constrained('decisions')->nullOnDelete();
+ $table->foreignId('default_action_id')->nullable()->constrained('actions')->nullOnDelete();
+ $table->string('activity_note_template', 255)->nullable();
+ $table->timestamps();
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::dropIfExists('payment_settings');
+ }
+};
diff --git a/database/migrations/2025_10_02_150000_add_activity_id_to_payments_table.php b/database/migrations/2025_10_02_150000_add_activity_id_to_payments_table.php
new file mode 100644
index 0000000..c9ae7e2
--- /dev/null
+++ b/database/migrations/2025_10_02_150000_add_activity_id_to_payments_table.php
@@ -0,0 +1,27 @@
+foreignId('activity_id')->nullable()->constrained('activities')->nullOnDelete()->after('created_by');
+ $table->index('activity_id');
+ });
+ }
+ }
+
+ public function down(): void
+ {
+ if (Schema::hasTable('payments') && Schema::hasColumn('payments', 'activity_id')) {
+ Schema::table('payments', function (Blueprint $table): void {
+ $table->dropConstrainedForeignId('activity_id');
+ });
+ }
+ }
+};
diff --git a/database/seeders/AccountTypeSeeder.php b/database/seeders/AccountTypeSeeder.php
index c44d1b3..f47762d 100644
--- a/database/seeders/AccountTypeSeeder.php
+++ b/database/seeders/AccountTypeSeeder.php
@@ -4,7 +4,6 @@
use App\Models\AccountType;
use Illuminate\Database\Seeder;
-use Illuminate\Support\Facades\DB;
class AccountTypeSeeder extends Seeder
{
@@ -12,40 +11,16 @@ public function run(): void
{
$now = now();
- // If table is empty, insert with explicit IDs so id=1 exists (matches default logic elsewhere)
- if (AccountType::count() === 0) {
- $rows = [
- ['id' => 1, 'name' => 'Default', 'description' => 'Default account type', 'created_at' => $now, 'updated_at' => $now],
- ['id' => 2, 'name' => 'Primary', 'description' => 'Primary account', 'created_at' => $now, 'updated_at' => $now],
- ['id' => 3, 'name' => 'Secondary', 'description' => 'Secondary account', 'created_at' => $now, 'updated_at' => $now],
- ['id' => 4, 'name' => 'Savings', 'description' => 'Savings account', 'created_at' => $now, 'updated_at' => $now],
- ['id' => 5, 'name' => 'Checking', 'description' => 'Checking account', 'created_at' => $now, 'updated_at' => $now],
- ['id' => 6, 'name' => 'Credit', 'description' => 'Credit account', 'created_at' => $now, 'updated_at' => $now],
- ['id' => 7, 'name' => 'Loan', 'description' => 'Loan account', 'created_at' => $now, 'updated_at' => $now],
- ['id' => 8, 'name' => 'Other', 'description' => 'Other account type', 'created_at' => $now, 'updated_at' => $now],
- ];
- DB::table('account_types')->insert($rows);
-
- return;
- }
-
- // If table already has data, ensure the basics exist (idempotent, no explicit IDs)
- $names = [
- 'Default' => 'Default account type',
- 'Primary' => 'Primary account',
- 'Secondary' => 'Secondary account',
- 'Savings' => 'Savings account',
- 'Checking' => 'Checking account',
- 'Credit' => 'Credit account',
- 'Loan' => 'Loan account',
- 'Other' => 'Other account type',
+ $rows = [
+ ['name' => 'Receivables', 'description' => 'Standard receivable account'],
+ ['name' => 'Payables', 'description' => 'Standard payable account'],
+ ['name' => 'Loan', 'description' => 'Loan and credit account'],
+ ['name' => 'Savings', 'description' => 'Savings account type'],
+ ['name' => 'Current', 'description' => 'Current/operational account'],
];
- foreach ($names as $name => $desc) {
- AccountType::updateOrCreate(
- ['name' => $name],
- ['description' => $desc]
- );
+ foreach ($rows as $row) {
+ AccountType::updateOrCreate(['name' => $row['name']], ['description' => $row['description']]);
}
}
}
diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php
index 309627d..52b4848 100644
--- a/database/seeders/DatabaseSeeder.php
+++ b/database/seeders/DatabaseSeeder.php
@@ -29,6 +29,8 @@ public function run(): void
);
$this->call([
+ AccountTypeSeeder::class,
+ PaymentSettingSeeder::class,
PersonSeeder::class,
SegmentSeeder::class,
ActionSeeder::class,
diff --git a/database/seeders/PaymentSettingSeeder.php b/database/seeders/PaymentSettingSeeder.php
new file mode 100644
index 0000000..1edbd81
--- /dev/null
+++ b/database/seeders/PaymentSettingSeeder.php
@@ -0,0 +1,21 @@
+firstOrCreate([], [
+ 'default_currency' => 'EUR',
+ 'create_activity_on_payment' => false,
+ 'default_decision_id' => null,
+ 'default_action_id' => null,
+ 'activity_note_template' => 'Prejeto plačilo: {amount} {currency}',
+ ]);
+ }
+}
diff --git a/resources/js/Pages/Accounts/Bookings/Index.vue b/resources/js/Pages/Accounts/Bookings/Index.vue
new file mode 100644
index 0000000..e4bd38b
--- /dev/null
+++ b/resources/js/Pages/Accounts/Bookings/Index.vue
@@ -0,0 +1,122 @@
+
+
+
+ Bookings · {{ account.reference || account.id }}
+
+
+
+
+
+
+
+ Booked at
+ Type
+ Amount
+ Description
+ Actions
+
+
+ {{ b.booked_at ? new Date(b.booked_at).toLocaleString() : '-' }}
+
+
+ {{ b.type }}
+
+
+ {{ (b.amount_cents / 100).toFixed(2) }}
+ {{ b.description || '-' }}
+
+
+
+
+
+
+ No bookings.
+ Payments · {{ account.reference || account.id }}
+
+
+
+
+
+
+
+ Paid at
+ Reference
+ Amount
+ Actions
+
+
+ {{ p.paid_at ? new Date(p.paid_at).toLocaleString() : '-' }}
+ {{ p.reference || '-' }}
+ {{ Number(p.amount).toFixed(2) }} {{ p.currency }}
+
+
+
+
+
+
+ No payments.
+
Manage segments used across the app.
Open Segments +Defaults for payments and auto-activity.
+ Open Payment Settings +Configure actions and decisions relationships.
diff --git a/resources/js/Pages/Settings/Payments/Index.vue b/resources/js/Pages/Settings/Payments/Index.vue new file mode 100644 index 0000000..d10e3d2 --- /dev/null +++ b/resources/js/Pages/Settings/Payments/Index.vue @@ -0,0 +1,103 @@ + + + +Podprti žetoni: {amount}, {currency}
+