GetForm2Report ("ร1. แบบฟอร์มเสนอขอปรับเปลี่ยนชื่อตำแหน่ง") called
.Value on nullable DateTime fields unconditionally, crashing with
InvalidOperationException whenever a record's date or start_working
was null — exactly what happened for form_1_2_uid
377a46dc-7131-4b58-ac7e-c9b54900ac34 (date is null in production).
Mirrors the null-check pattern the sibling GetForm3Report already
uses for the same kind of field.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
Requested a rounder icon-badge look closer to a reference screenshot;
color glyph emoji render that way natively in Excel without needing
manual font-color styling (which colored ✓/✗ can't fully replicate).
Add is_reference_section flag to header_data/detail_kpi_data so the
kpi_performance_result and detail_kpi Excel exports render the 4
reference-indicator sections (วิสัยทัศน์/ค่านิยม/เอกลักษณ์/อัตลักษณ์)
with their bare category name instead of a "ประเด็นยุทธ์ศาสตร์ที่ N"
prefix, and skip them in the real strategic-issue numbering.
Mirrors the existing indicator table layout for the 4 new reference
sections coming from rmutr-api (unit, target value, 3 responsible-role
columns), reusing the same 8-column styling as the strategic indicators.
Switch the xls/xlsx export in GetExpensesReport from FastReport's
Excel2007Export (which always writes static numbers) to a ClosedXML-
built workbook, so subtotal/header rows get real =SUM-style FormulaA1
formulas instead of pre-computed values. Row hierarchy is inferred
generically from the "no" field's dot-depth and the expenditure_budget
indentation prefix, so it works for any request, not just one record.
pdf/doc export still uses the FastReport .frx template, unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LvxSgUzvZcd4mXfDWGssxm
Replace static computed values for F/H/J/L/N/P/R with FormulaA1 cell
formulas (=B-D, =(F*10)/100, etc.) so the exported report is auditable
and recalculates in Excel, matching a reference ร15.xlsx. P/R now use
the per-row contribution/framework percent passed from rmutr-api
instead of a fixed 40%.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhYYmBPw4LhYXoDnTNz2xV
FRX template references [durable_articles_three.subject] but the
model was missing the property, causing FastReport binding to fail
and the report endpoint to return 500.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bind to durable_articles_three.subject and shift the following
elements (รายการครุภัณฑ์ header, data band, footer, summary band)
down by 28.35 to make room.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>