@model PowderCoating.Application.DTOs.Job.JobDto @using PowderCoating.Web.Controllers @{ ViewData["Title"] = $"Work Order - {Model.JobNumber}"; Layout = null; // No layout for print var company = ViewBag.Company as PowderCoating.Core.Entities.Company; } @ViewData["Title"]
Back to Job Details
@if (company != null) { @* Company Logo *@ @if (!string.IsNullOrWhiteSpace(company.LogoFilePath) || company.LogoData != null) { }
@company.CompanyName
@if (!string.IsNullOrWhiteSpace(company.Address)) {
@company.Address
} @if (!string.IsNullOrWhiteSpace(company.Phone)) { Phone: @company.Phone } @if (!string.IsNullOrWhiteSpace(company.PrimaryContactEmail)) { Email: @company.PrimaryContactEmail }
} else {
Powder Coating Shop
}
WORK ORDER
Job #: @Model.JobNumber
Priority: @Model.PriorityDisplayName
Status: @Model.StatusDisplayName
Created: @Model.CreatedAt.ToString("MM/dd/yyyy")
@if (ViewBag.ViewQrCodeBase64 != null) {
View Job
View Job
}
Customer Information
Company/Name
@if (!string.IsNullOrWhiteSpace(Model.CustomerCompanyName)) { @Model.CustomerCompanyName } else { @Model.CustomerName }
@if (!string.IsNullOrWhiteSpace(Model.CustomerContactName)) {
Contact Person
@Model.CustomerContactName
} @if (!string.IsNullOrWhiteSpace(Model.CustomerPO)) {
Customer PO
@Model.CustomerPO
}
Job Information
@if (!string.IsNullOrWhiteSpace(Model.AssignedWorkerName)) {
Assigned Worker
@Model.AssignedWorkerName
} @if (Model.DueDate.HasValue) {
Due Date
@Model.DueDate.Value.ToString("MM/dd/yyyy")
} @if (Model.ScheduledDate.HasValue) {
Scheduled Date
@Model.ScheduledDate.Value.ToString("MM/dd/yyyy")
}
@if (!string.IsNullOrWhiteSpace(Model.Description)) {
Job Description
@Model.Description
} @if (Model.PrepServices != null && Model.PrepServices.Any()) {
Preparation Services Required
@foreach (var service in Model.PrepServices) { @service.ServiceName }
} @if (Model.Items != null && Model.Items.Any()) {
Items to be Coated
@for (int i = 0; i < Model.Items.Count; i++) { var item = Model.Items[i];
#@(i + 1) @item.Description Qty: @item.Quantity @if (item.SurfaceAreaSqFt > 0) { Area: @item.SurfaceAreaSqFt.ToString("N2") sq ft } else if (item.SurfaceArea.HasValue) { Area: @item.SurfaceArea.Value.ToString("N2") sq ft }
@if (item.Coats != null && item.Coats.Any()) {
Coating Layers
@foreach (var coat in item.Coats.OrderBy(c => c.Sequence)) { var isCustom = !coat.InventoryItemId.HasValue && (coat.PowderCostPerLb.HasValue || coat.PowderToOrder.HasValue); @if (!string.IsNullOrWhiteSpace(coat.Notes)) { } }
Layer Coat Name Color Code Finish Vendor Powder
@coat.Sequence @coat.CoatName @(coat.ColorName ?? "—") @(coat.ColorCode ?? "—") @(coat.Finish ?? "—") @(coat.VendorName ?? "—") @if (coat.PowderToOrder.HasValue && coat.PowderToOrder.Value > 0) { if (isCustom) { ORDER @coat.PowderToOrder.Value.ToString("N2") lbs } else { @coat.PowderToOrder.Value.ToString("N2") lbs } } else { }
@coat.Notes
} else { No coat details specified. }
@if (item.PrepServices != null && item.PrepServices.Any()) {
Prep Services
@foreach (var svc in item.PrepServices) {
@svc.PrepServiceName @if (svc.EstimatedMinutes > 0) { @svc.EstimatedMinutes min }
}
}
@if (!string.IsNullOrWhiteSpace(item.Notes)) {
Notes: @item.Notes
}
} } @if (!string.IsNullOrWhiteSpace(Model.SpecialInstructions)) {
Special Instructions
@Model.SpecialInstructions
}
Worker Signature:
Print Name: ___________________ Date: _______
Quality Control:
Inspector: ___________________ Date: _______
Customer Approval:
Signature: ___________________ Date: _______
@{ var powderQrCodes = ViewBag.PowderQrCodes as List; bool hasPowderQrs = powderQrCodes != null && powderQrCodes.Count > 0; } @if (ViewBag.QrCodeBase64 != null || hasPowderQrs) {
Scan Codes
@* Status bump QR *@ @if (ViewBag.QrCodeBase64 != null) {
Status Update QR
Update Status
Advance job to
next status.
} @* Powder usage QRs — one per unique inventory item *@ @if (hasPowderQrs) { @foreach (var pqr in powderQrCodes!) {
Powder Usage QR - @pqr.Name
Log Usage
@pqr.Name
@if (!string.IsNullOrWhiteSpace(pqr.ColorCode)) {
Code: @pqr.ColorCode
} @if (!string.IsNullOrWhiteSpace(pqr.Manufacturer)) {
@pqr.Manufacturer
} @if (pqr.TotalLbs > 0) {
Est. @pqr.TotalLbs.ToString("N2") lbs
}
} }
}