Files
budget/views/partials/transaction-fields.php
Ty Clifford 51ee4ecb5a -
Finished the planner end to end.
Corrected rollover and yearly accounting, recurring targets, savings 
rules, and targeted dormant restorations.
Added editing/deletion for income, expenses, targets, and categories.
Rebuilt dashboard, analytics, calendar, settings, exports, 
authentication, and responsive mobile UI.
Added original artwork at 
[financial-flow.png](/Users/tyemeclifford/Documents/GH/budget/public/assets/images/financial-flow.png), 
generated with built-in Imagegen using an abstract financial-momentum 
landscape prompt.
Added 
[self-test.php](/Users/tyemeclifford/Documents/GH/budget/scripts/self-test.php).
Verification passed: automated accounting/export tests, full browser 
workflow, responsive 390px layout, light/dark themes, and no console 
errors. Tested with FrankenPHP v1.12.4. Live Mailgun delivery was not 
attempted without credentials.
2026-06-15 10:33:55 -04:00

10 lines
1.7 KiB
PHP

<?php $fieldTransaction = $editingTransaction ?? []; $defaultTransactionDate = $month === date('Y-m') ? date('Y-m-d') : $month . '-01'; ?>
<div class="form-grid">
<label class="span-2">Description<input type="text" name="merchant" required placeholder="Payment or merchant" value="<?= h($fieldTransaction['merchant'] ?? '') ?>"></label>
<label>Amount<div class="money-input"><span><?= h($symbol) ?></span><input type="number" name="amount" min="0.01" step="0.01" required value="<?= h((string) ($fieldTransaction['amount'] ?? '')) ?>"></div></label>
<label>Date<input type="date" name="transacted_on" value="<?= h((string) ($fieldTransaction['transacted_on'] ?? $defaultTransactionDate)) ?>" min="<?= h($month . '-01') ?>" max="<?= h($month . '-' . date('t', strtotime($month . '-01'))) ?>" required></label>
<label>Budget target<select name="budget_item_id"><option value="">General expense</option><?php foreach ($items as $item): ?><option value="<?= (int) $item['id'] ?>" <?= (int) ($fieldTransaction['budget_item_id'] ?? 0) === (int) $item['id'] ? 'selected' : '' ?>><?= h($item['name']) ?> · <?= h(Support::money($item['remaining_amount'], $symbol)) ?> left</option><?php endforeach; ?></select></label>
<label>Category<select name="category_id"><option value="">Use target / uncategorized</option><?php foreach ($categories as $category): ?><option value="<?= (int) $category['id'] ?>" <?= (int) ($fieldTransaction['category_id'] ?? 0) === (int) $category['id'] ? 'selected' : '' ?>><?= h($category['name']) ?></option><?php endforeach; ?></select></label>
<label class="span-2">Notes<textarea name="notes" rows="2" placeholder="Optional details"><?= h($fieldTransaction['notes'] ?? '') ?></textarea></label>
</div>