Phase 5: the Immigration Bureau's forms, filled in from the records
CI / secret scan (push) Successful in 5s
CI / fmt, clippy, tests (push) Successful in 39s

A Forms tab on each person fills in TM.7, STM.2, STM.9, STM.11 and STM.1
for an extension of stay, TM.47 for a 90-day report and TM.8 for a re-entry
permit. The Bureau's blank pages (forms/, with their sources and checksums)
go unchanged into a new PDF, and the values are written on the dotted lines
in Sarabun; boxes are ticked and the title circled where a form asks.
scripts/gen_layout.py measures the blanks into src/papers/layout.rs.

The tab says what would stay blank and links to where it is added. What only
the application says (the date, the office, the reason, the days, a trip) is
carried in the links and never stored. The extension's five forms also come
in one PDF. Opening or downloading a form is audited as entity "form" with
the forms' codes, never their values.

Migration 0005 adds what STM.1 and STM.11 ask of the company (capital,
revenue, equity, staff, a coordinator), a work permit's salary and contract
dates, and where an arrival came from. The Nix package now takes forms/.
This commit is contained in:
grabowski committed 2026-11-18 12:30:03 +07:00
1 parent 2a6e972b68
commit a2cedcdd7e
40 files changed
+3404 -35

No files matched your search

+17 -3
View File
@@ -173,6 +173,16 @@ fn companies() -> Vec<Values> {
"email" => "office@demo-engineering.example",
"signatory" => "Malee Jaidee",
"signatory_position" => "Managing director",
"capital_thb" => "5000000",
"paid_up_thb" => "5000000",
"figures_year" => "2025",
"revenue_thb" => "48500000",
"equity_thb" => "9800000",
"foreign_costs_thb" => "2400000",
"thai_staff" => "24",
"foreign_staff" => "2",
"coordinator" => "Wanida Meechai",
"coordinator_phone" => "+66 53 000 002",
"notes" => MARKER,
},
vals! {
@@ -236,7 +246,8 @@ fn demos(today: NaiveDate) -> Vec<Demo> {
vals! {
"arrived_on" => plus(-394), "port" => CNX, "admission" => "visa",
"visa_id" => "@visa", "permitted_until" => plus(-305), "passport_id" => "@passport",
"flight" => "TG110", "tdac_no" => "DEMO0001", "tdac_submitted_on" => plus(-396),
"flight" => "TG110", "came_from" => "Frankfurt", "tdac_no" => "DEMO0001",
"tdac_submitted_on" => plus(-396),
"departed_on" => plus(-90), "departure_port" => CNX,
},
),
@@ -274,6 +285,7 @@ fn demos(today: NaiveDate) -> Vec<Demo> {
vals! {
"arrived_on" => plus(-79), "port" => CNX, "admission" => "reentry",
"permitted_until" => plus(60), "passport_id" => "@passport", "flight" => "TG111",
"came_from" => "Singapore",
"tdac_no" => "DEMO0002", "tdac_submitted_on" => plus(-81),
},
),
@@ -282,7 +294,8 @@ fn demos(today: NaiveDate) -> Vec<Demo> {
vals! {
"company_id" => "@employer", "number" => "WP-DEMO-0001",
"position" => "Electrical engineer", "issued_on" => plus(-300),
"valid_until" => plus(60),
"valid_until" => plus(60), "monthly_salary_thb" => "95000",
"contract_from" => plus(-400), "contract_until" => plus(330),
},
),
];
@@ -322,6 +335,7 @@ fn demos(today: NaiveDate) -> Vec<Demo> {
vals! {
"arrived_on" => plus(-40), "port" => CNX, "admission" => "exempt",
"permitted_until" => plus(20), "passport_id" => "@passport", "flight" => "TG102",
"came_from" => "Bangkok",
"tdac_no" => "DEMO0003", "tdac_submitted_on" => plus(-42),
},
)];
@@ -382,7 +396,7 @@ fn demos(today: NaiveDate) -> Vec<Demo> {
&records::WORK_PERMITS,
vals! {
"company_id" => "@employer", "number" => "WP-DEMO-0003", "position" => "Accountant",
"issued_on" => plus(-320), "valid_until" => plus(45),
"issued_on" => plus(-320), "valid_until" => plus(45), "monthly_salary_thb" => "62000",
},
),
];