Script picks S, locks to P, sets R on success.
On failure: back to S for retry; after max retry (3) sets E and logs to one_lab_log.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevents UI re-trigger while email is in flight. Status flow:
S (scheduled) → P (processing) → D (delivered) / S (failed, retryable)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Done.php send_email_v2: query qr_printout to build structured reports
array [{"id","url","result"}] using QR_PrintOutGroup_ResultName instead
of relying on client-supplied reports param.
send_email.php: parse both old (URL string) and new (object) formats;
use result field as PDF attachment filename.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Skip attachment if downloaded content is not a valid PDF (HTML error response)
- Add Nat_SubSubGroupSequence to nat_subsubgroup table (missing column
referenced by sp_rpt_hasil_lab in SELECT and ORDER BY)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>