whoami7 - Manager
:
/
home
/
simspala
/
yoursimzone.com
/
Upload File:
files >> /home/simspala/yoursimzone.com/pdf.html
<?php declare(strict_types=1); date_default_timezone_set('Africa/Lagos'); // —— Invoice Data —— $companyName = 'AE Developers'; $companyAddress = '123 Developer Street, Tech City, Lagos, Nigeria'; $companyEmail = 'accounts@aedevs.com'; $companyPhone = '+234 800 123 4567'; $companyWebsite = 'www.aedevs.com'; $companyTaxId = 'TAX-ID-123456789'; $clientName = 'ZAPNET — Zannah Political Network'; $clientAddress = '456 Client Avenue, Business District, Abuja, Nigeria'; $clientEmail = 'accounts@zapnet.ng'; $clientPhone = '+234 800 987 6543'; $invoiceNo = 'AE-INV-'.date('Ymd').'-007'; $issueDate = date('d M Y'); $dueDate = date('d M Y', strtotime('+7 days')); $projectTitle = 'App Development + Website Hosting + Store Publishing'; $currency = 'NGN'; // Items in NGN (≈ ₦1.2M total, VAT not included) $items = [ ['Third-party base license (one-time; ≈ $69)', 1, 105_507], ['Mobile App Development (Android & iOS)', 1, 600_000], ['Backend/API & Admin Setup', 1, 120_000], ['Website Hosting (1 year, basic plan)', 1, 50_000], ['Domain Registration (1 year)', 1, 15_000], ['Google Play Store Listing & Upload', 1, 30_000], ['Apple App Store Listing & Upload', 1, 60_000], ['In-App Payments/Billing (Play Billing + Apple IAP)', 1, 80_000], ['QA & UAT + Bug Fixes', 1, 70_000], ['Deployment & Handover', 1, 20_000], ['30-Day Post-Launch Support (basic)', 1, 50_000], ]; function formatCurrency(int $n, string $currency = 'NGN'): string { return ($currency === 'NGN' ? '₦' : '$') . number_format($n, 2); } $subtotal = 0; foreach ($items as $r) { $subtotal += $r[1] * $r[2]; } $vatRate = 0.075; // 7.5% $vatAmount = (int) round($subtotal * $vatRate); $total = $subtotal + $vatAmount; ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Invoice <?= htmlspecialchars($invoiceNo) ?> | <?= htmlspecialchars($companyName) ?></title> <style> :root { --primary: #4f46e5; --primary-light: #eef2ff; --primary-dark: #3730a3; --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-700: #374151; --gray-900: #111827; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; color: var(--gray-900); margin: 0; padding: 24px; background: var(--gray-50); line-height: 1.5; } .wrapper { max-width: 900px; margin: 0 auto; } .logo { font-size: 24px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; } .h1 { font-size: 28px; font-weight: 700; color: var(--primary-dark); letter-spacing: -0.5px; } .h2 { font-size: 18px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; } .small { font-size: 13px; color: var(--gray-700); } .header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; } .card { border: 1px solid var(--gray-200); border-radius: 12px; padding: 20px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.05); } .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 16px; } .table { width: 100%; border-collapse: collapse; margin: 16px 0; } .table thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; background: var(--gray-100); border-bottom: 1px solid var(--gray-200); padding: 12px 16px; text-align: right; font-weight: 600; color: var(--gray-700); } .table thead th:first-child { text-align: left; width: 40px; } .table thead th:nth-child(2) { text-align: left; } .table tbody td { border-bottom: 1px solid var(--gray-200); padding: 12px 16px; font-size: 14px; background: #fff; } .table tbody td:first-child { text-align: left; color: var(--gray-700); } .table tbody td:nth-child(2) { text-align: left; } .totals { width: 100%; margin: 20px 0; } .totals td { padding: 8px 0; font-size: 14px; } .totals td:first-child { text-align: right; padding-right: 16px; color: var(--gray-700); width: 60%; } .totals td:last-child { text-align: right; font-weight: 600; width: 40%; } .totals tr:last-child td { font-size: 16px; padding-top: 12px; border-top: 1px solid var(--gray-200); color: var(--primary-dark); } .hr { height: 1px; background: var(--gray-200); margin: 16px 0; } .badge { display: inline-block; background: var(--primary-light); color: var(--primary-dark); border: 1px solid var(--gray-200); padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; margin-bottom: 12px; } .note { font-size: 13px; color: var(--gray-700); line-height: 1.6; } .footer { margin-top: 24px; font-size: 12px; color: var(--gray-700); text-align: center; } .brand { font-weight: 700; color: var(--primary-dark); } .print { background: var(--primary); color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.2s; } .print:hover { background: var(--primary-dark); } .actions { display: flex; justify-content: flex-end; margin-bottom: 20px; } .signature { margin-top: 40px; text-align: right; } .signature-line { border-top: 1px solid var(--gray-300); width: 200px; display: inline-block; margin-top: 40px; } .no-print { } @media print { body { background: #fff; padding: 0; font-size: 13px; } .card { box-shadow: none; } .no-print { display: none !important; } } </style> </head> <body> <div class="wrapper"> <div class="actions no-print"> <button class="print" onclick="window.print()">Print / Save as PDF</button> </div> <div class="header"> <div> <div class="logo"><?= htmlspecialchars($companyName) ?></div> <div class="small"><?= htmlspecialchars($companyAddress) ?></div> <div class="small">Email: <?= htmlspecialchars($companyEmail) ?> | Phone: <?= htmlspecialchars($companyPhone) ?></div> <div class="small">Website: <?= htmlspecialchars($companyWebsite) ?> | Tax ID: <?= htmlspecialchars($companyTaxId) ?></div> </div> <div> <div class="h1">INVOICE</div> <div class="small">Project: <span class="brand"><?= htmlspecialchars($projectTitle) ?></span></div> </div> </div> <div class="grid"> <div class="card"> <div class="h2">Bill To</div> <div style="font-weight:600; margin-bottom: 4px;"><?= htmlspecialchars($clientName) ?></div> <div class="small"><?= htmlspecialchars($clientAddress) ?></div> <div class="small">Email: <?= htmlspecialchars($clientEmail) ?></div> <div class="small">Phone: <?= htmlspecialchars($clientPhone) ?></div> </div> <div class="card"> <div class="h2">Invoice Details</div> <table style="width:100%;"> <tr> <td class="small" style="width:40%;">Invoice Number:</td> <td style="font-weight:500;"><?= htmlspecialchars($invoiceNo) ?></td> </tr> <tr> <td class="small">Issue Date:</td> <td><?= htmlspecialchars($issueDate) ?></td> </tr> <tr> <td class="small">Due Date:</td> <td><?= htmlspecialchars($dueDate) ?></td> </tr> <tr> <td class="small">Currency:</td> <td><?= htmlspecialchars($currency) ?></td> </tr> </table> </div> </div> <div style="margin-top:20px;" class="card"> <table class="table"> <thead> <tr> <th>#</th> <th>Description</th> <th>Qty</th> <th>Unit Price</th> <th>Amount</th> </tr> </thead> <tbody> <?php foreach ($items as $i => $row): [$desc,$qty,$price] = $row; ?> <tr> <td><?= $i+1 ?></td> <td><?= htmlspecialchars($desc) ?></td> <td><?= (int)$qty ?></td> <td><?= formatCurrency($price, $currency) ?></td> <td><?= formatCurrency($qty*$price, $currency) ?></td> </tr> <?php endforeach; ?> </tbody> </table> <table class="totals"> <tr> <td>Subtotal:</td> <td><?= formatCurrency($subtotal, $currency) ?></td> </tr> <tr> <td>VAT (<?= ($vatRate*100) ?>%):</td> <td><?= formatCurrency($vatAmount, $currency) ?></td> </tr> <tr> <td>Total Amount Due:</td> <td><?= formatCurrency($total, $currency) ?></td> </tr> </table> <div class="note"> <strong>Payment Terms:</strong> 70% upfront payment required to commence work, remaining 30% upon project completion. Payment due within 7 days of invoice date. </div> <div class="note" style="margin-top: 12px;"> <strong>Bank Details:</strong><br> Account Name: <?= htmlspecialchars($companyName) ?><br> Bank Name: Zenith Bank PLC<br> Account Number: 1234567890<br> Sort Code: 057000000<br> <strong>Payment Reference:</strong> <?= htmlspecialchars($invoiceNo) ?> </div> <div class="signature"> <div class="signature-line"></div> <div class="small" style="margin-top: 4px;">Authorized Signature</div> </div> </div> <div style="margin-top:20px;" class="card"> <div class="badge">Project Scope & Deliverables</div> <div class="note"> <ul style="padding-left: 20px;"> <li>Mobile app design & development (Android & iOS)</li> <li>Backend/API setup and lightweight admin configuration</li> <li><strong>Website hosting (1 year)</strong> and basic server configuration</li> <li><strong>Store submissions:</strong> Google Play & Apple App Store (assets, listings, signing, testing)</li> <li><strong>In-app payments/billing:</strong> Google Play Billing & Apple In-App Purchases integration</li> <li>QA/UAT cycles and bug fixes for launch</li> <li>Production deployment & handover (credentials & documentation)</li> <li><strong>30-day</strong> post-launch support for minor fixes (Mon–Fri, 9am–5pm)</li> </ul> </div> <div class="hr"></div> <div class="note"> <strong>Exclusions:</strong> Paid developer accounts (Google/Apple), premium services/add-ons, complex features beyond agreed scope, content/data entry, SMS/OTP costs, and any third-party fees not explicitly included above. </div> <div class="hr"></div> <div class="note"> <strong>FX Note:</strong> ₦105,507 ≈ NGN value of $69 at mid-market rate of ₦1,529.09/$ (as of <?= date('d M Y') ?>). Actual settlement rates may vary based on payment method and timing. </div> </div> <div class="footer"> Thank you for your business! For any questions regarding this invoice, please contact <?= htmlspecialchars($companyEmail) ?> <div style="margin-top: 8px;"><?= htmlspecialchars($companyName) ?> | <?= htmlspecialchars($companyAddress) ?></div> </div> </div> </body> </html>
Copyright ©2021 || Defacer Indonesia