ca4fb959aa
Invoice-basis report showing taxable vs non-taxable sales, tax billed by GL account, monthly trend table/chart, and full invoice detail grid. Non-taxable invoice rows shaded grey for easy scanning. Quick-preset date buttons (This Month, Last Month, YTD, Last Year) for common filing periods. CSV export formatted for accountants and tax-filing software. Gated behind AllowAccounting() like other financial reports. - SalesTaxReportDto + 3 supporting DTOs in FinancialReportDtos.cs - GetSalesTaxReportAsync on IFinancialReportService + implementation - GenerateSalesTaxReportPdfAsync on IPdfService + QuestPDF implementation - SalesTax / SalesTaxPdf / SalesTaxCsv actions in ReportsController - Views/Reports/SalesTax.cshtml with Chart.js monthly trend chart - Landing page card added to Finance section - HelpKnowledgeBase and Help/Reports.cshtml updated with full docs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
329 lines
15 KiB
Plaintext
329 lines
15 KiB
Plaintext
@{
|
|
ViewData["Title"] = "Reports";
|
|
ViewData["PageIcon"] = "bi-bar-chart-line";
|
|
var allowAccounting = Context.Items["AllowAccounting"] as bool? ?? false;
|
|
}
|
|
|
|
@section Styles {
|
|
<style>
|
|
.report-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
|
|
.report-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--bs-body-bg);
|
|
border: 1px solid var(--bs-border-color);
|
|
border-radius: 0.875rem;
|
|
padding: 1.25rem;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
|
|
}
|
|
|
|
.report-card:hover {
|
|
border-color: var(--bs-primary);
|
|
box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
|
|
transform: translateY(-2px);
|
|
color: inherit;
|
|
}
|
|
|
|
.report-card-icon {
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: 0.75rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.25rem;
|
|
margin-bottom: 0.75rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.report-card h5 {
|
|
font-weight: 700;
|
|
font-size: 0.95rem;
|
|
margin-bottom: 0.3rem;
|
|
}
|
|
|
|
.report-card p {
|
|
font-size: 0.82rem;
|
|
color: var(--bs-secondary-color);
|
|
margin: 0;
|
|
line-height: 1.45;
|
|
flex: 1;
|
|
}
|
|
|
|
.report-card .report-arrow {
|
|
margin-top: 1rem;
|
|
font-size: 0.78rem;
|
|
font-weight: 600;
|
|
color: var(--bs-primary);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.3rem;
|
|
}
|
|
|
|
.section-heading {
|
|
font-size: 0.7rem;
|
|
font-weight: 700;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
color: var(--bs-secondary-color);
|
|
margin-bottom: 0.75rem;
|
|
padding-bottom: 0.4rem;
|
|
border-bottom: 1px solid var(--bs-border-color);
|
|
}
|
|
</style>
|
|
}
|
|
|
|
|
|
<!-- ══ SECTION 1: CHARTS & DASHBOARDS ═══════════════════════════════════ -->
|
|
<div class="mb-2">
|
|
<h5 class="fw-bold mb-1"><i class="bi bi-bar-chart-line me-2 text-primary"></i>Charts & Dashboards</h5>
|
|
<p class="text-muted small mb-3">Interactive visuals, trend charts, and at-a-glance summaries.</p>
|
|
</div>
|
|
|
|
<!-- Overview -->
|
|
<div class="mb-4">
|
|
<div class="section-heading">Overview</div>
|
|
<div class="report-grid">
|
|
<a asp-controller="Reports" asp-action="KpiDashboard" class="report-card">
|
|
<div class="report-card-icon" style="background:#ede9fe;color:#6d28d9;">
|
|
<i class="bi bi-speedometer2"></i>
|
|
</div>
|
|
<h5>KPI Dashboard</h5>
|
|
<p>High-level KPIs — revenue, active jobs, customers, and job counts with monthly trends and equipment status.</p>
|
|
<div class="report-arrow">View dashboard <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="Analytics" class="report-card">
|
|
<div class="report-card-icon" style="background:#eff6ff;color:#2563eb;">
|
|
<i class="bi bi-graph-up"></i>
|
|
</div>
|
|
<h5>Charts & Analytics</h5>
|
|
<p>Tabbed visual dashboard covering revenue trends, operations, customers, financials, and powder usage with interactive charts.</p>
|
|
<div class="report-arrow">View charts <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="CashFlowForecast" class="report-card">
|
|
<div class="report-card-icon" style="background:#f0fdf4;color:#16a34a;">
|
|
<i class="bi bi-cash-stack"></i>
|
|
</div>
|
|
<h5>Cash Flow Forecast</h5>
|
|
<p>AI-projected 30/60/90-day cash position based on open invoices, outstanding bills, and active job pipeline.</p>
|
|
<div class="report-arrow">View forecast <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="AnomalyDetection" class="report-card">
|
|
<div class="report-card-icon" style="background:#fffbeb;color:#b45309;">
|
|
<i class="bi bi-shield-exclamation"></i>
|
|
</div>
|
|
<h5>Anomaly Detection</h5>
|
|
<p>AI scans recent bills and expense trends for duplicate entries, unusual amounts, and accounts running over their historical average.</p>
|
|
<div class="report-arrow">Run analysis <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="my-4" />
|
|
|
|
<!-- ══ SECTION 2: DETAILED REPORTS ══════════════════════════════════════ -->
|
|
<div class="mb-2">
|
|
<h5 class="fw-bold mb-1"><i class="bi bi-file-earmark-text me-2 text-secondary"></i>Detailed Reports</h5>
|
|
<p class="text-muted small mb-3">Printable data reports for accounting, operations, and inventory.</p>
|
|
</div>
|
|
|
|
@if (allowAccounting)
|
|
{
|
|
<!-- Finance -->
|
|
<div class="mb-4">
|
|
<div class="section-heading">Finance</div>
|
|
<div class="report-grid">
|
|
<a asp-controller="Reports" asp-action="FinancialSummary" class="report-card">
|
|
<div class="report-card-icon" style="background:#ecfdf5;color:#059669;">
|
|
<i class="bi bi-wallet2"></i>
|
|
</div>
|
|
<h5>Financial Summary</h5>
|
|
<p>Invoiced vs collected, outstanding balances, AR aging buckets, and recent payment activity.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="ProfitAndLoss" class="report-card">
|
|
<div class="report-card-icon" style="background:#f0fdf4;color:#16a34a;">
|
|
<i class="bi bi-file-earmark-bar-graph"></i>
|
|
</div>
|
|
<h5>Profit & Loss</h5>
|
|
<p>Revenue, COGS, gross profit, and operating expenses for any date range. Exportable to PDF.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="ExpensesAp" class="report-card">
|
|
<div class="report-card-icon" style="background:#fff7ed;color:#c2410c;">
|
|
<i class="bi bi-receipt"></i>
|
|
</div>
|
|
<h5>Expenses & AP</h5>
|
|
<p>Vendor spend, accounts payable aging, expense breakdown by account, and monthly P&L comparison.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="ArAging" class="report-card">
|
|
<div class="report-card-icon" style="background:#fef9c3;color:#a16207;">
|
|
<i class="bi bi-clock-history"></i>
|
|
</div>
|
|
<h5>AR Aging</h5>
|
|
<p>Outstanding customer balances by age — current, 30, 60, and 90+ days. Exportable to PDF.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="InvoiceAgingDetail" class="report-card">
|
|
<div class="report-card-icon" style="background:#fef2f2;color:#dc2626;">
|
|
<i class="bi bi-exclamation-circle"></i>
|
|
</div>
|
|
<h5>Invoice Aging Detail</h5>
|
|
<p>Every open invoice with aging bucket, days overdue, contact info, and balance due.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="BalanceSheet" class="report-card">
|
|
<div class="report-card-icon" style="background:#f0f9ff;color:#0369a1;">
|
|
<i class="bi bi-bank"></i>
|
|
</div>
|
|
<h5>Balance Sheet</h5>
|
|
<p>Snapshot of assets, liabilities, and equity as of any date.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<!-- Sales & Customers -->
|
|
<div class="mb-4">
|
|
<div class="section-heading">Sales & Customers</div>
|
|
<div class="report-grid">
|
|
<a asp-controller="Reports" asp-action="SalesByCustomer" class="report-card">
|
|
<div class="report-card-icon" style="background:#f0fdf4;color:#15803d;">
|
|
<i class="bi bi-currency-dollar"></i>
|
|
</div>
|
|
<h5>Sales by Customer</h5>
|
|
<p>Revenue, collections, outstanding balance, and invoice count ranked per customer.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="SalesAndIncome" class="report-card">
|
|
<div class="report-card-icon" style="background:#ecfdf5;color:#059669;">
|
|
<i class="bi bi-bar-chart-steps"></i>
|
|
</div>
|
|
<h5>Sales & Income</h5>
|
|
<p>Detailed breakdown of sales by customer, job type, and period.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="SalesTax" class="report-card">
|
|
<div class="report-card-icon" style="background:#faf5ff;color:#7c3aed;">
|
|
<i class="bi bi-percent"></i>
|
|
</div>
|
|
<h5>Sales Tax Report</h5>
|
|
<p>Invoice-basis tax liability: taxable vs non-taxable sales, tax billed by account and month, full invoice detail.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="CustomerOverview" class="report-card">
|
|
<div class="report-card-icon" style="background:#eff6ff;color:#2563eb;">
|
|
<i class="bi bi-people"></i>
|
|
</div>
|
|
<h5>Customer Overview</h5>
|
|
<p>New customer acquisition trends, lifetime value rankings, and quote conversion funnel.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="CustomerRetention" class="report-card">
|
|
<div class="report-card-icon" style="background:#fef9c3;color:#b45309;">
|
|
<i class="bi bi-person-check"></i>
|
|
</div>
|
|
<h5>Customer Retention</h5>
|
|
<p>Customers segmented by recency — active, at risk, lapsing, churned, or never ordered.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Operations -->
|
|
<div class="mb-4">
|
|
<div class="section-heading">Operations</div>
|
|
<div class="report-grid">
|
|
<a asp-controller="Reports" asp-action="OperationsReport" class="report-card">
|
|
<div class="report-card-icon" style="background:#f5f3ff;color:#7c3aed;">
|
|
<i class="bi bi-gear-wide-connected"></i>
|
|
</div>
|
|
<h5>Operations Report</h5>
|
|
<p>Job status breakdown, appointment metrics, worker performance, and equipment health.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="JobStatusAging" class="report-card">
|
|
<div class="report-card-icon" style="background:#fff7ed;color:#ea580c;">
|
|
<i class="bi bi-hourglass-split"></i>
|
|
</div>
|
|
<h5>Job Status Aging</h5>
|
|
<p>Active jobs ranked by days spent in their current status. Quickly spot bottlenecks and overdue work.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="JobCycleTime" class="report-card">
|
|
<div class="report-card-icon" style="background:#f0f9ff;color:#0284c7;">
|
|
<i class="bi bi-stopwatch"></i>
|
|
</div>
|
|
<h5>Job Cycle Time</h5>
|
|
<p>Average, min, and max days spent in each workflow stage for completed jobs.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="RevenueTrends" class="report-card">
|
|
<div class="report-card-icon" style="background:#ede9fe;color:#7c3aed;">
|
|
<i class="bi bi-trending-up"></i>
|
|
</div>
|
|
<h5>Revenue Trends</h5>
|
|
<p>Monthly revenue, job count, and average order value trends with breakdowns by customer type and priority.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Inventory & Powder -->
|
|
<div class="mb-4">
|
|
<div class="section-heading">Inventory & Powder</div>
|
|
<div class="report-grid">
|
|
<a asp-controller="Reports" asp-action="PowderUsage" class="report-card">
|
|
<div class="report-card-icon" style="background:#fdf4ff;color:#a21caf;">
|
|
<i class="bi bi-droplet-half"></i>
|
|
</div>
|
|
<h5>Powder Usage</h5>
|
|
<p>Powder consumption by color with monthly lbs and cost trends. See which colors drive the most usage.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="PowderConsumption" class="report-card">
|
|
<div class="report-card-icon" style="background:#f5f3ff;color:#6d28d9;">
|
|
<i class="bi bi-arrow-left-right"></i>
|
|
</div>
|
|
<h5>Powder Consumption vs Purchase</h5>
|
|
<p>Compare purchased vs consumed powder per SKU. Track waste, variance, and restocking needs.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
<a asp-controller="Reports" asp-action="InventoryTurnover" class="report-card">
|
|
<div class="report-card-icon" style="background:#ecfdf5;color:#047857;">
|
|
<i class="bi bi-arrow-repeat"></i>
|
|
</div>
|
|
<h5>Inventory Turnover</h5>
|
|
<p>Daily consumption rates and days-to-stockout per item. Critical and low-stock items highlighted.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
@if ((bool)(ViewBag.SmsEnabled ?? false))
|
|
{
|
|
<!-- Compliance -->
|
|
<div class="mb-4">
|
|
<div class="section-heading">Compliance</div>
|
|
<div class="report-grid">
|
|
<a asp-controller="SmsConsentAudit" asp-action="Index" class="report-card">
|
|
<div class="report-card-icon" style="background:#f0f9ff;color:#0369a1;">
|
|
<i class="bi bi-phone-vibrate"></i>
|
|
</div>
|
|
<h5>SMS Consent Audit</h5>
|
|
<p>Per-customer TCPA consent status — who opted in, who opted out, and when. Export to CSV for compliance records.</p>
|
|
<div class="report-arrow">Open report <i class="bi bi-arrow-right"></i></div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
}
|