-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsole_trader_settings.php
More file actions
589 lines (555 loc) · 38.7 KB
/
Copy pathsole_trader_settings.php
File metadata and controls
589 lines (555 loc) · 38.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
<?php
require_once 'includes/config.php';
require_once 'includes/functions.php';
require_login();
// Get existing settings
try {
$pdo = new PDO(
"mysql:host=" . DB_HOST . ";dbname=" . DB_NAME,
DB_USER,
DB_PASS
);
$stmt = $pdo->prepare("SELECT * FROM business_settings WHERE user_id = ?");
$stmt->execute([$_SESSION['user_id']]);
$settings = $stmt->fetch(PDO::FETCH_ASSOC) ?: [];
} catch (PDOException $e) {
$_SESSION['error'] = "Database error: " . $e->getMessage();
$settings = [];
}
$vat_stmt = $pdo->prepare("SELECT * FROM vat_settings WHERE user_id = ?");
$vat_stmt->execute([$_SESSION['user_id']]);
$vat_settings = $vat_stmt->fetch(PDO::FETCH_ASSOC) ?: [];
$st_stmt = $pdo->prepare("SELECT * FROM sole_trader_settings WHERE user_id = ?");
$st_stmt->execute([$_SESSION['user_id']]);
$st_settings = $st_stmt->fetch(PDO::FETCH_ASSOC) ?: [];
// Load HMRC connection status
require_once 'includes/HmrcClient.php';
$hmrcClient = new HmrcClient($pdo, $_SESSION['user_id']);
$hmrcTokens = $hmrcClient->getStoredTokens();
$hmrcConnected = $hmrcClient->isConnected();
$page_title = 'Sole Trader Settings';
require_once 'includes/header.php';
require_once 'includes/topbar.php';
require_once 'includes/sidebar.php';
?>
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="page-title-box d-md-flex justify-content-md-between align-items-center">
<h4 class="page-title fw-bold">Sole Trader Settings</h4>
<div class="">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="dashboard.php">Dashboard</a></li>
<li class="breadcrumb-item active">Sole Trader Settings</li>
</ol>
</div>
</div>
<?php if (isset($_SESSION['message'])): ?>
<div class="alert alert-success"><?php echo $_SESSION['message'];
unset($_SESSION['message']); ?></div>
<?php endif; ?>
<?php if (isset($_SESSION['error'])): ?>
<div class="alert alert-danger"><?php echo $_SESSION['error'];
unset($_SESSION['error']); ?></div>
<?php endif; ?>
<!-- ===================== -->
<!-- FORM 1: ST Settings -->
<!-- ===================== -->
<form id="stForm" action="save_sole_trader_settings.php" method="post">
<button type="submit" class="btn btn-primary mb-3">
Save Self Assessment Settings
</button>
<!-- Self Assessment / ITSA -->
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title mb-0">Self Assessment & MTD ITSA</h5>
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">UTR Number</label>
<input type="text" class="form-control" name="utr_number"
placeholder="1234567890"
value="<?php echo htmlspecialchars($st_settings['utr_number'] ?? ''); ?>">
<small class="text-muted">10 digit Unique Taxpayer Reference</small>
</div>
<div class="col-md-6">
<label class="form-label">National Insurance Number</label>
<input type="text" class="form-control" name="nino"
placeholder="AB123456C"
value="<?php echo htmlspecialchars($st_settings['nino'] ?? ''); ?>">
<small class="text-muted">Required for MTD ITSA submissions</small>
</div>
<div class="col-md-6">
<label class="form-label">Accounting Method</label>
<select class="form-select" name="accounting_method">
<option value="cash"
<?php echo ($st_settings['accounting_method'] ?? 'cash') === 'cash' ? 'selected' : ''; ?>>
Cash Basis
</option>
<option value="accruals"
<?php echo ($st_settings['accounting_method'] ?? '') === 'accruals' ? 'selected' : ''; ?>>
Traditional / Accruals
</option>
</select>
<small class="text-muted">Most sole traders use Cash Basis</small>
</div>
<div class="col-md-6">
<label class="form-label">Business Start Date</label>
<input type="date" class="form-control" name="business_start_date"
value="<?php echo htmlspecialchars($st_settings['business_start_date'] ?? ''); ?>">
<small class="text-muted">When did you start trading?</small>
</div>
<div class="col-12">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
name="mtd_itsa_enrolled" id="mtdItsaEnrolled" value="1"
<?php echo !empty($st_settings['mtd_itsa_enrolled']) ? 'checked' : ''; ?>>
<label class="form-check-label" for="mtdItsaEnrolled">
<strong>Enrolled in MTD for Income Tax</strong>
</label>
</div>
<small class="text-muted">
MTD ITSA is mandatory from April 2026 if your income exceeds £50,000
</small>
</div>
</div>
<div class="alert alert-info mt-3 mb-0">
<i class="fas fa-calendar me-2"></i>
Your tax year runs <strong>6 April to 5 April</strong>.
Your first tax year is calculated from your business start date above.
</div>
</div>
</div>
</form>
<!-- END FORM 1 -->
<!-- ========================= -->
<!-- FORM 2: Business Settings -->
<!-- ========================= -->
<form id="settingsForm" action="save_business_settings.php" method="post" enctype="multipart/form-data">
<button type="submit" class="btn btn-primary mb-3">
Save Business Settings
</button>
<!-- Business Details -->
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title mb-0">Business Details
<small class="text-muted fw-normal ms-2">— used on invoices and documents</small>
</h5>
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">Your Name *</label>
<input type="text" class="form-control" name="company_name"
value="<?php echo htmlspecialchars($settings['company_name'] ?? ''); ?>" required>
<small class="text-muted">Your full legal name — appears on invoices</small>
</div>
<div class="col-md-6">
<label class="form-label">Trading Name</label>
<input type="text" class="form-control" name="trading_name"
value="<?php echo htmlspecialchars($settings['trading_name'] ?? ''); ?>">
<small class="text-muted">Leave blank if trading under your own name</small>
</div>
<div class="col-md-6">
<label class="form-label">VAT Number</label>
<input type="text" class="form-control" name="vat_number"
value="<?php echo htmlspecialchars($settings['vat_number'] ?? ''); ?>">
<small class="text-muted">Displayed on invoices — only required if VAT registered</small>
</div>
<div class="col-md-6">
<label class="form-label">Address Line 1 *</label>
<input type="text" class="form-control" name="address_line1"
value="<?php echo htmlspecialchars($settings['address_line1'] ?? ''); ?>" required>
</div>
<div class="col-md-6">
<label class="form-label">Address Line 2</label>
<input type="text" class="form-control" name="address_line2"
value="<?php echo htmlspecialchars($settings['address_line2'] ?? ''); ?>">
</div>
<div class="col-md-4">
<label class="form-label">City *</label>
<input type="text" class="form-control" name="city"
value="<?php echo htmlspecialchars($settings['city'] ?? ''); ?>" required>
</div>
<div class="col-md-4">
<label class="form-label">County</label>
<input type="text" class="form-control" name="county"
value="<?php echo htmlspecialchars($settings['county'] ?? ''); ?>">
</div>
<div class="col-md-4">
<label class="form-label">Postcode *</label>
<input type="text" class="form-control" name="postcode"
value="<?php echo htmlspecialchars($settings['postcode'] ?? ''); ?>" required>
</div>
<div class="col-md-4">
<label class="form-label">Phone</label>
<input type="tel" class="form-control" name="phone"
value="<?php echo htmlspecialchars($settings['phone'] ?? ''); ?>">
</div>
<div class="col-md-8">
<label class="form-label">Website</label>
<input type="url" class="form-control" name="website"
value="<?php echo htmlspecialchars($settings['website'] ?? ''); ?>">
</div>
</div>
</div>
</div>
<!-- Brand Assets -->
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title mb-0">Brand Assets</h5>
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">Logo</label>
<?php if (!empty($settings['logo_path'])): ?>
<div class="mb-2">
<img src="<?php echo htmlspecialchars($settings['logo_path']); ?>"
alt="Logo" class="img-thumbnail"
style="max-height: 100px;">
</div>
<?php endif; ?>
<input type="file" class="form-control" name="logo" accept="image/*">
<small class="text-muted">Recommended size: 300x100px. Max file size: 2MB</small>
</div>
<div class="col-md-3">
<label class="form-label">Logo Height (px)</label>
<input type="number" class="form-control" name="logo_height"
value="<?php echo htmlspecialchars($settings['logo_height'] ?? '100'); ?>">
</div>
<div class="col-md-3">
<label class="form-label">Brand Color</label>
<input type="color" class="form-control form-control-color w-100" name="primary_color"
value="<?php echo htmlspecialchars($settings['primary_color'] ?? '#0d6efd'); ?>">
</div>
</div>
</div>
</div>
<!-- Bank Details -->
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title mb-0">Bank Details</h5>
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">Bank Name</label>
<input type="text" class="form-control" name="bank_name"
value="<?php echo htmlspecialchars($settings['bank_name'] ?? ''); ?>">
</div>
<div class="col-md-6">
<label class="form-label">Account Name</label>
<input type="text" class="form-control" name="account_name"
value="<?php echo htmlspecialchars($settings['account_name'] ?? ''); ?>">
</div>
<div class="col-md-6">
<label class="form-label">Sort Code</label>
<input type="text" class="form-control" name="sort_code"
value="<?php echo htmlspecialchars($settings['sort_code'] ?? ''); ?>">
</div>
<div class="col-md-6">
<label class="form-label">Account Number</label>
<input type="text" class="form-control" name="account_number"
value="<?php echo htmlspecialchars($settings['account_number'] ?? ''); ?>">
</div>
</div>
</div>
</div>
<!-- Banking Integration -->
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title mb-0">Banking Integration</h5>
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">Your Bank Provider</label>
<select class="form-select" name="bank_provider">
<option value="">— Select your bank —</option>
<option value="revolut_business" <?php echo ($settings['bank_provider'] ?? '') === 'revolut_business' ? 'selected' : ''; ?>>
Revolut Business
</option>
<option value="tide" <?php echo ($settings['bank_provider'] ?? '') === 'tide' ? 'selected' : ''; ?>>
Tide
</option>
<option value="monzo_business" <?php echo ($settings['bank_provider'] ?? '') === 'monzo_business' ? 'selected' : ''; ?>>
Monzo Business
</option>
<option value="barclays" <?php echo ($settings['bank_provider'] ?? '') === 'barclays' ? 'selected' : ''; ?>>
Barclays
</option>
<option value="hsbc" <?php echo ($settings['bank_provider'] ?? '') === 'hsbc' ? 'selected' : ''; ?>>
HSBC
</option>
<option value="natwest" <?php echo ($settings['bank_provider'] ?? '') === 'natwest' ? 'selected' : ''; ?>>
NatWest
</option>
<option value="lloyds" <?php echo ($settings['bank_provider'] ?? '') === 'lloyds' ? 'selected' : ''; ?>>
Lloyds
</option>
<option value="starling" <?php echo ($settings['bank_provider'] ?? '') === 'starling' ? 'selected' : ''; ?>>
Starling Bank
</option>
</select>
<small class="text-muted">
This tells Lighthouse how to read your bank CSV exports
</small>
</div>
<div class="col-md-6 d-flex align-items-center">
<?php
$provider = $settings['bank_provider'] ?? '';
if ($provider): ?>
<div class="alert alert-info mb-0 w-100">
<?php if ($provider === 'revolut_business'): ?>
Export from: <strong>Revolut Business → Accounts → Export</strong>
<?php elseif ($provider === 'tide'): ?>
Export from: <strong>Tide → Transactions → Export CSV</strong>
<?php elseif ($provider === 'monzo_business'): ?>
Export from: <strong>Monzo → Statements → Download CSV</strong>
<?php elseif ($provider === 'starling'): ?>
Export from: <strong>Starling → Spaces → Download CSV</strong>
<?php else: ?>
Export your transactions as CSV from your online banking
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<!-- HMRC Connection -->
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title mb-0">HMRC Connection</h5>
</div>
<div class="card-body">
<?php if ($hmrcConnected): ?>
<div class="d-flex align-items-center gap-3 mb-3">
<span class="badge bg-success fs-6">✓ Connected</span>
<?php if (!empty($hmrcTokens['vrn'])): ?>
<span class="text-muted">VRN: <strong><?php echo htmlspecialchars($hmrcTokens['vrn']); ?></strong></span>
<?php endif; ?>
<span class="text-muted">
Token expires: <strong><?php echo date('d M Y H:i', strtotime($hmrcTokens['token_expires'])); ?></strong>
</span>
</div>
<a href="hmrc/disconnect.php"
class="btn btn-danger"
onclick="return confirm('Are you sure you want to disconnect from HMRC?')">
Disconnect from HMRC
</a>
<?php else: ?>
<p class="text-muted mb-3">
Connect to HMRC to submit VAT returns and MTD ITSA updates directly from Lighthouse.
</p>
<div class="alert alert-warning">
<i class="fas fa-exclamation-triangle me-2"></i>
Make sure your UTR and VAT number are saved before connecting.
</div>
<a href="hmrc/connect.php" class="btn btn-primary">
<i class="fas fa-link me-2"></i>Connect to HMRC
</a>
<?php endif; ?>
</div>
</div>
<!-- VAT Settings -->
<div class="card mb-4" id="vat_registered">
<div class="card-header">
<h5 class="card-title mb-0">VAT Settings</h5>
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-12">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
name="is_vat_registered" id="isVatRegistered" value="1"
<?php echo !empty($vat_settings['is_vat_registered']) ? 'checked' : ''; ?>>
<label class="form-check-label" for="isVatRegistered">
<strong>I am VAT Registered</strong>
</label>
</div>
</div>
<div id="vatFields" style="<?php echo empty($vat_settings['is_vat_registered']) ? 'display:none' : ''; ?>">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">VAT Number</label>
<input type="text" class="form-control" name="vat_number_hmrc"
placeholder="GB123456789"
value="<?php echo htmlspecialchars($vat_settings['vat_number'] ?? ''); ?>">
<small class="text-muted">Used for HMRC VAT submissions</small>
</div>
<div class="col-md-6">
<label class="form-label">VAT Registration Date</label>
<input type="date" class="form-control" name="vat_period_start"
value="<?php echo htmlspecialchars($vat_settings['vat_period_start'] ?? ''); ?>">
<small class="text-muted">The date you became VAT registered</small>
</div>
<div class="col-md-6">
<label class="form-label">VAT Rate</label>
<select class="form-select" name="vat_rate">
<option value="20" <?php echo ($vat_settings['vat_rate'] ?? '20') == '20' ? 'selected' : ''; ?>>
Standard Rate — 20%
</option>
<option value="5" <?php echo ($vat_settings['vat_rate'] ?? '') == '5' ? 'selected' : ''; ?>>
Reduced Rate — 5%
</option>
<option value="0" <?php echo ($vat_settings['vat_rate'] ?? '') == '0' ? 'selected' : ''; ?>>
Zero Rate — 0%
</option>
</select>
</div>
<div class="col-md-6">
<label class="form-label">VAT Scheme</label>
<select class="form-select" name="vat_scheme">
<option value="standard" <?php echo ($vat_settings['vat_scheme'] ?? 'standard') === 'standard' ? 'selected' : ''; ?>>
Standard Accounting
</option>
<option value="flat_rate" <?php echo ($vat_settings['vat_scheme'] ?? '') === 'flat_rate' ? 'selected' : ''; ?>>
Flat Rate Scheme
</option>
<option value="cash" <?php echo ($vat_settings['vat_scheme'] ?? '') === 'cash' ? 'selected' : ''; ?>>
Cash Accounting
</option>
</select>
<small class="text-muted">Not sure? Most small businesses use Standard Accounting</small>
</div>
<div class="col-md-6">
<label class="form-label">VAT Quarter End Month</label>
<select class="form-select" name="vat_quarter_end">
<option value="Jan" <?php echo ($vat_settings['vat_quarter_end'] ?? '') === 'Jan' ? 'selected' : ''; ?>>
Stagger 1 — Jan / Apr / Jul / Oct
</option>
<option value="Feb" <?php echo ($vat_settings['vat_quarter_end'] ?? '') === 'Feb' ? 'selected' : ''; ?>>
Stagger 2 — Feb / May / Aug / Nov
</option>
<option value="Mar" <?php echo ($vat_settings['vat_quarter_end'] ?? 'Mar') === 'Mar' ? 'selected' : ''; ?>>
Stagger 3 — Mar / Jun / Sep / Dec
</option>
</select>
<small class="text-muted">Check your VAT registration certificate if unsure</small>
</div>
<div class="col-md-6 d-flex align-items-center">
<div class="alert alert-info mb-0 w-100">
<i class="fas fa-info-circle me-2"></i>
VAT returns are submitted <strong>quarterly</strong> to HMRC.
You have <strong>1 month and 7 days</strong> after each quarter end to file and pay.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Invoice Settings -->
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title mb-0">Invoice Settings</h5>
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-md-3">
<label class="form-label">Invoice Prefix</label>
<input type="text" class="form-control" name="invoice_prefix"
value="<?php echo htmlspecialchars($settings['invoice_prefix'] ?? 'INV-'); ?>">
</div>
<div class="col-md-3">
<label class="form-label">Next Invoice Number</label>
<input type="number" class="form-control" name="invoice_next_number"
value="<?php echo htmlspecialchars($settings['invoice_next_number'] ?? '1'); ?>">
</div>
<div class="col-md-3">
<label class="form-label">Default Payment Terms (Days)</label>
<input type="number" class="form-control" name="default_payment_terms"
value="<?php echo htmlspecialchars($settings['default_payment_terms'] ?? '30'); ?>">
</div>
<div class="col-md-3">
<label class="form-label">Default Tax Rate (%)</label>
<input type="number" step="0.01" class="form-control" name="default_tax_rate"
value="<?php echo htmlspecialchars($settings['default_tax_rate'] ?? '20.00'); ?>">
</div>
<div class="col-12">
<label class="form-label">Default Invoice Notes</label>
<textarea class="form-control" name="invoice_notes" rows="3"><?php
echo htmlspecialchars($settings['invoice_notes'] ?? '');
?></textarea>
</div>
<div class="col-12">
<label class="form-label">Payment Instructions</label>
<textarea class="form-control" name="payment_instructions" rows="3"><?php
echo htmlspecialchars($settings['payment_instructions'] ?? '');
?></textarea>
</div>
</div>
</div>
</div>
<!-- Email Settings -->
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title mb-0">Email Settings</h5>
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">SMTP Host</label>
<input type="text" class="form-control" name="smtp_host"
value="<?php echo htmlspecialchars($settings['smtp_host'] ?? ''); ?>">
</div>
<div class="col-md-6">
<label class="form-label">SMTP Port</label>
<input type="number" class="form-control" name="smtp_port"
value="<?php echo htmlspecialchars($settings['smtp_port'] ?? '587'); ?>">
</div>
<div class="col-md-6">
<label class="form-label">SMTP Username</label>
<input type="text" class="form-control" name="smtp_username"
value="<?php echo htmlspecialchars($settings['smtp_username'] ?? ''); ?>">
</div>
<div class="col-md-6">
<label class="form-label">SMTP Password</label>
<input type="password" class="form-control" name="smtp_password"
value="<?php echo htmlspecialchars($settings['smtp_password'] ?? ''); ?>">
</div>
<div class="col-md-6">
<label class="form-label">From Email</label>
<input type="email" class="form-control" name="from_email"
value="<?php echo htmlspecialchars($settings['from_email'] ?? ''); ?>">
</div>
<div class="col-md-6">
<label class="form-label">From Name</label>
<input type="text" class="form-control" name="from_name"
value="<?php echo htmlspecialchars($settings['from_name'] ?? ''); ?>">
</div>
</div>
</div>
</div>
<!-- Accounting Period -->
<div class="card mb-4">
<div class="card-header">
<h5 class="card-title mb-0">Accounting Period</h5>
</div>
<div class="card-body">
<div class="alert alert-info mb-0">
<i class="fas fa-calendar me-2"></i>
Your tax year runs <strong>6 April to 5 April</strong>.
Your first tax year is calculated from your business start date in Self Assessment settings above.
</div>
</div>
</div>
</form>
<!-- END FORM 2 -->
</div>
</div>
</div>
</div>
</div>
<script>
document.getElementById('isVatRegistered').addEventListener('change', function () {
document.getElementById('vatFields').style.display = this.checked ? 'block' : 'none';
});
</script>
<?php require_once 'includes/footer.php'; ?>