diff --git a/fusion_plating/fusion_plating_jobs/models/fp_job_sticker.py b/fusion_plating/fusion_plating_jobs/models/fp_job_sticker.py index 6c5dacfd..7ad2c5ff 100644 --- a/fusion_plating/fusion_plating_jobs/models/fp_job_sticker.py +++ b/fusion_plating/fusion_plating_jobs/models/fp_job_sticker.py @@ -18,7 +18,13 @@ def _clean(text): t = str(text) for a, b in ((u'—', '-'), (u'–', '-'), (u'‘', "'"), (u'’', "'"), (u'“', '"'), (u'”', '"'), - (u'…', '...')): + (u'…', '...'), + # Degree symbols: the masculine-ordinal 'º' (U+00BA) operators + # type for "375ºF", the real degree '°' (U+00B0), and the ring + # '˚' ALL mojibake to "°"/"º" through this sticker's lightweight + # html_container path (no .article UTF-8 wrapper — and adding one + # blows up the dpi=96 mm layout). Strip to clean ASCII: "375F". + (u'º', ''), (u'°', ''), (u'˚', '')): t = t.replace(a, b) return t.strip() @@ -88,6 +94,9 @@ class FpJob(models.Model): 'qty': qty, 'due': due_s, 'thk': thk, + # Real thickness present (has a digit) — drives the prominent + # THICKNESS banner; skips empty / 'N/A' / '-' placeholders. + 'has_thk': bool(thk and any(c.isdigit() for c in thk)), 'mask': bool(line and 'x_fc_masking_enabled' in line._fields and line.x_fc_masking_enabled), 'bake': _clean(line.x_fc_bake_instructions) if (line and 'x_fc_bake_instructions' in line._fields) else '', 'internal_notes': _clean(line.x_fc_internal_description) if (line and 'x_fc_internal_description' in line._fields) else '', diff --git a/fusion_plating/fusion_plating_jobs/report/report_fp_job_sticker.xml b/fusion_plating/fusion_plating_jobs/report/report_fp_job_sticker.xml index 24735c2f..8fc03e49 100644 --- a/fusion_plating/fusion_plating_jobs/report/report_fp_job_sticker.xml +++ b/fusion_plating/fusion_plating_jobs/report/report_fp_job_sticker.xml @@ -115,6 +115,7 @@ .r-fld { padding: 0.7mm 2.2mm; } .gtbl { border-collapse: collapse; width: 100%; height: 100%; } .gtbl td { padding: 1mm 2.2mm; vertical-align: middle; } + .m-thk { padding: 1.8mm 2.6mm 2.4mm; } .m-bake { padding: 1.3mm 2.6mm 1.8mm; } .m-notes { padding: 1.3mm 2.6mm 3.5mm; } @@ -233,11 +234,18 @@
| Due |
- Thk (mils) |
+ Due |