Skip to content

COL · Collection

When a driver's balance is overdue, collection calls them and may issue a debt letter (surat hutang) that bundles their open charges. A charge can appear again on a later letter. A damage charged at a checkpoint or a return puts a draft letter in Collection's hands at once, and after it someone decides whether the rental goes on. Code COL.

D61 names three flows that must not break on the first Monday after cutover: driver onboarding (the queue to an approved driver), vehicle onboarding (a new car to ready) and collection (an overdue driver to a call, a surat hutang and a payment). Their rules get the most tests, refusals included, and the hardest review. On this page:

  • Collection: R-COL-01 to R-COL-08. R-COL-09 to R-COL-21 are how v1's letters load.

These questions are open in #87. Each gets a rule with a new ID once it is answered.

  • COL open 1 · Writes
  • The driver deciding "continue renting?" is the target (NOTE-1); today Vehicle Management records it (R-COL-07).
  • The collection role (#157) comes after cutover (D63); until then finance, admin and admin_fleet do Collection's work.
  • Executing a letter (the flow's "Dieksekusi VM", V13's executed) and recording "continue renting?": debt_letter:write, which admin_fleet gains (D63, R-ACC-69). The word "executed" for the flow's "Dieksekusi VM" node came from DOC pack C (#161), which mapped that node to V13's executed; zuki has since said that in v1 "Dieksekusi VM" means the letter was sent to the driver, so v1's letters load as issued and executed is Vehicle Management's own act.
  • v1's claim_letters are v1's debt letters, not claims' letters (#295, #306). On the v1 copy of 2026-11-02 there are 1,071, all of 2026, with the keys no (the letter number), driver (text), plat, tanggal, jatuh_tempo, total, items, debtIds, status (one value, 'Dieksekusi VM', on all) and catatan. They are not linked to asuransi_claims: the run found only coincidences. zuki's answers are R-COL-09 to R-COL-21, and a letter's bills load as charges in the money step (R-MON-84).

R-COL-01 · A debt letter number is unique within the organization

Section titled “R-COL-01 · A debt letter number is unique within the organization”
  • Status: built
  • Example: given a debt letter with a number, when a second letter with the same number is saved in the organization, then it is refused.
  • Refusal: none: unique_violation (23505).
  • Who: every writer.
  • Source: [Ref] Data model V13: debt_letters.

R-COL-02 · A charge is listed at most once on the same debt letter

Section titled “R-COL-02 · A charge is listed at most once on the same debt letter”
  • Status: built
  • Example: given a letter listing a damage charge, when the same charge is added to that letter again, then it is refused; it may appear on a later letter.
  • Refusal: none: unique_violation (23505).
  • Who: every writer.
  • Source: [Ref] Data model V13: debt_letter_items.

R-COL-03 · A collection call with a promise records the promised date

Section titled “R-COL-03 · A collection call with a promise records the promised date”
  • Status: built
  • Example: given a call where the driver promises to pay, when it is saved with outcome promised and no promised_on, then it is refused.
  • Refusal: none: check_violation (23514).
  • Who: every writer.
  • Source: [Ref] Data model V13: collection_calls.

R-COL-04 · Reading debt letters and collection calls needs payment:read or debt_letter:read at the driver's pool

Section titled “R-COL-04 · Reading debt letters and collection calls needs payment:read or debt_letter:read at the driver's pool”
  • Status: built
  • Example: given a satpam at PML, when they read debt_letters, then nothing comes back; a checker at PML, who holds debt_letter:read, sees them.
  • Refusal: none: hidden.
  • Who: super_admin, admin, admin_fleet, finance, asuransi, checker and viewer hold one of these.
  • Source: [Ref] Roles, policy matrix.

R-COL-05 · An inspection's charged damages are listed on one draft debt letter, made in the same step as their charges

Section titled “R-COL-05 · An inspection's charged damages are listed on one draft debt letter, made in the same step as their charges”
  • Status: planned
  • Example: given a return inspection with two damages charged to the driver and one not charged, when it is saved, then one draft letter lists the two damage charges, and the third damage is on no letter.
  • Refusal: none.
  • Who: the inspection function (M5).
  • Source: D45; General Flow VEH-12 → COL-13.

R-COL-06 · A draft debt letter has no number until it is issued

Section titled “R-COL-06 · A draft debt letter has no number until it is issued”
  • Status: planned
  • Example: given a draft letter made by a checkpoint, when it is read, then it has no number; when Collection issues it on 2026-10-20, then it takes its number in R-NUM-10's format, dated that day.
  • Refusal: none.
  • Who: the debt letter functions (M6).
  • Source: D45; D40; General Flow COL-13 (Draft, then issued).

R-COL-07 · After a damage's debt letter is issued, whether the rental continues is recorded on the rental, with who decided and when

Section titled “R-COL-07 · After a damage's debt letter is issued, whether the rental continues is recorded on the rental, with who decided and when”
  • Status: planned
  • Example: given a listed driver whose damage letter was issued, when Collection records "continue renting: yes", then the rental keeps the answer, the decider and the time, and stays active.
  • Refusal: none.
  • Who: holders of debt_letter:write: admin_fleet (Vehicle Management, R-ACC-69), admin and super_admin (D63).
  • Source: D45; General Flow COL-14, NOTE-1.

R-COL-08 · Deciding not to continue the rental starts the car's return

Section titled “R-COL-08 · Deciding not to continue the rental starts the car's return”
  • Status: planned
  • Example: given a damage letter issued to a listed driver, when "continue renting: no" is recorded, then the car's return starts, with its reason given as for any return (R-DRV-20).
  • Refusal: none.
  • Who: the return function (M5).
  • Source: D45; General Flow COL-14 → VEH-13. What the return's start is in V13 depends on #155.

R-COL-09 · A v1 debt letter loads as issued, with its v1 number

Section titled “R-COL-09 · A v1 debt letter loads as issued, with its v1 number”
  • Status: built
  • Example: given a v1 letter with status 'Dieksekusi VM', when the money step has run, then its debt letter is issued, never executed, with v1's no as its number, tanggal as issued_on, jatuh_tempo as due_on, catatan as notes and issued_by empty. Its number keeps v1's form, not R-NUM-10's, and v2's counter is untouched. executed stays Vehicle Management's own act in v2.
  • Refusal: none.
  • Who: the data phase's money step.
  • Source: zuki on #295 (2026-11-02, #423: 'Dieksekusi VM' means the letter was sent to the driver); D34. BE-DP-39: every number differs in form from R-NUM-10's.

R-COL-10 · A v1 debt letter with no date, or due before it was issued, is an unmatched row

Section titled “R-COL-10 · A v1 debt letter with no date, or due before it was issued, is an unmatched row”
  • Status: built
  • Example: given a v1 letter with jatuh_tempo before tanggal, when the money step runs, then it is in migration.unmatched with its reason (R-MIG-04), since R-CONV-04 refuses it; neither date is moved to fit, as with a bill (R-MON-64).
  • Refusal: none.
  • Who: the data phase's money step.
  • Source: the CTO's default on #306, put to zuki on 2026-11-04 with no objection; R-CONV-04. BE-DP-39 found none.

R-COL-11 · A v1 letter number used more than once stays with the letter made first, the others take a suffix, and the reconcile lists each by v1 id

Section titled “R-COL-11 · A v1 letter number used more than once stays with the letter made first, the others take a suffix, and the reconcile lists each by v1 id”
  • Status: built
  • Example: given three letters with one number, when the money step has run, then by created_at, then v1 id, the first keeps the number and the others load as <number>-2 and <number>-3, so R-COL-01 holds, and the reconcile lists each renumbered letter by v1 id until zuki signs it. The order is the same every night. A duplicate (R-COL-12) takes no suffix.
  • Refusal: none.
  • Who: the data phase's money step, and its reconcile.
  • Source: zuki on #299 ("suffix accepted", 2026-10-27); the CTO's default on #306, put to zuki on 2026-11-04 with no objection (the general form: one number is on three letters on the copy of 2026-11-02); D18.

R-COL-12 · A v1 letter entered twice loads once, and the second row is unmatched

Section titled “R-COL-12 · A v1 letter entered twice loads once, and the second row is unmatched”
  • Status: built
  • Example: given two rows with one number, one driver, one date and one total, when the money step has run, then one debt letter stands for them, and the row later by created_at, then v1 id, is in migration.unmatched with the reason duplicate of letter <number> (R-MIG-04).
  • Refusal: none.
  • Who: the data phase's money step.
  • Source: zuki on #299 ("suffix accepted", 2026-10-27).

R-COL-13 · A v1 letter whose bills have one lead takes that lead's driver, and the reconcile lists it where its text or plate disagrees

Section titled “R-COL-13 · A v1 letter whose bills have one lead takes that lead's driver, and the reconcile lists it where its text or plate disagrees”
  • Status: built
  • Example: given a letter whose bills are all lead A's, and whose driver text names someone else, when the money step has run, then the letter is on lead A's driver, and the reconcile lists its v1 id until zuki signs it. With text and plate in agreement, nothing is listed.
  • Refusal: none.
  • Who: the data phase's money step, and its reconcile.
  • Source: zuki on #306 (2026-11-04).

R-COL-14 · A v1 letter whose bills have several leads takes the one driver its text and plate find, or the one of their candidates among the bills' leads, and the reconcile lists it

Section titled “R-COL-14 · A v1 letter whose bills have several leads takes the one driver its text and plate find, or the one of their candidates among the bills' leads, and the reconcile lists it”
  • Status: built
  • Example: given a letter with bills of leads A and B, whose text and plate find lead A's driver alone, when the money step has run, then the letter is on lead A's driver; the bills only confirm it, and the reconcile lists its v1 id until zuki signs it. Given text and plate that find two candidates, lead A's driver and a driver with no bill on the letter, then lead A's driver takes it, and it is listed the same way. A candidate is a lead whose name equals the letter's text, ignoring case and extra spaces; where a plate is given and leaves anyone, the candidates narrow to the leads with a rental row or a bill on that plate.
  • Refusal: none.
  • Who: the data phase's money step, and its reconcile.
  • Source: zuki on #306 (2026-11-02, "1a 2a"; 2026-11-04, "tie-break").

R-COL-15 · A v1 letter with no bill found, or with several leads and no one driver by R-COL-14, is unmatched, never guessed

Section titled “R-COL-15 · A v1 letter with no bill found, or with several leads and no one driver by R-COL-14, is unmatched, never guessed”
  • Status: built
  • Example: given a letter with bills of leads A and B whose text and plate find no candidate, or several with none or more than one among the bills' leads, or a letter none of whose debtIds names a bill, when the money step runs, then it is in migration.unmatched with its reason (R-MIG-04), and the reconcile prints its v1 id, never the driver's name (D15).
  • Refusal: none.
  • Who: the data phase's money step.
  • Source: zuki on #306 (2026-11-04, and "tie-break" the same day); D15.

R-COL-16 · A v1 letter's rental is the row its plate finds in its driver's rental chain on the letter's date

Section titled “R-COL-16 · A v1 letter's rental is the row its plate finds in its driver's rental chain on the letter's date”
  • Status: built
  • Example: given a driver with two cars and a letter of 2026-09-10 on car X, when the money step has run, then the letter is on the row of the driver's chain on X, found as R-INSP-17 finds an inspection's. A plate with no row in the driver's chain loads the letter with no rental, and the reconcile counts it.
  • Refusal: none.
  • Who: the data phase's money step, and its reconcile.
  • Source: the CTO's default on #306, put to zuki on 2026-11-04 with no objection; R-INSP-17.

R-COL-17 · A v1 letter with no plate loads with its driver and no rental, and the reconcile counts it

Section titled “R-COL-17 · A v1 letter with no plate loads with its driver and no rental, and the reconcile counts it”
  • Status: built
  • Example: given a letter with an empty plat, when the money step has run, then it is on its driver with rental_id empty, as debt_letters allows, and the reconcile counts these letters; the rental live on the letter's date is not guessed.
  • Refusal: none.
  • Who: the data phase's money step, and its reconcile.
  • Source: zuki on #306 (2026-11-02, "1a 2a"): 85 of 1,071 on the copy of 2026-11-02; R-INSP-17 does the same.

R-COL-18 · A v1 letter's items point at the charges of the bills its debtIds name, and a debtId that names no bill is an unmatched row

Section titled “R-COL-18 · A v1 letter's items point at the charges of the bills its debtIds name, and a debtId that names no bill is an unmatched row”
  • Status: built
  • Example: given a letter with three debtIds, two naming bills and one naming none, when the money step has run, then the letter has two items, each on the charge loaded from its bill (R-COL-02), and the third debtId is in migration.unmatched with its reason (R-MIG-04). A debtId whose bill loaded no charge gets the same unmatched row.
  • Refusal: none.
  • Who: the data phase's money step.
  • Source: zuki on #299 (the CTO's recommendation: BE's point 1); the CTO's default on #306, put to zuki on 2026-11-04 with no objection.

R-COL-19 · A v1 letter's item on another lead's charge loads, and the reconcile lists it

Section titled “R-COL-19 · A v1 letter's item on another lead's charge loads, and the reconcile lists it”
  • Status: built
  • Example: given a letter on lead A's driver with a bill of lead B, when the money step has run, then the letter has an item on lead B's charge, and the reconcile lists the letter's v1 id until zuki signs it. That charge stays lead B's.
  • Refusal: none.
  • Who: the data phase's money step, and its reconcile.
  • Source: zuki on #306 (2026-11-04).

R-COL-20 · Only the migration writes a debt letter item's legacy_amount, the amount v1's letter gave that item (R-COL-21)

Section titled “R-COL-20 · Only the migration writes a debt letter item's legacy_amount, the amount v1's letter gave that item (R-COL-21)”
  • Status: built
  • Example: given a v1 letter item of Rp 250.000 on a bill now Rp 300.000, when the money step has run, then its debt_letter_items row has legacy_amount 250000, and the charge keeps its own amount. An item made in v2 has none. v1's total is the sum of its items, so on a letter paired in full the printed sum survives without a total column. An item whose debtId names no bill has no row to hold its amount, so on such a letter the sum falls short of v1's total. An app user's write to the column is refused. Nothing in v2 reads it, and it can be dropped when zuki says so (D84).
  • Refusal: none: insufficient_privilege (42501), R-RNT-71.
  • Who: the data phase's money step, running as the database owner (D65).
  • Source: zuki on #306 (2026-11-04): v1's total differs from the sum of its bills on 94 of 1,071 letters on the copy of 2026-11-02, and always equals the sum of its items (BE-DP-39); D84.

R-COL-21 · A v1 letter's item amounts pair with its debtIds by charge type where each type appears once, else by position, only when both arrays have one length and every sumber is its bill's jenis

Section titled “R-COL-21 · A v1 letter's item amounts pair with its debtIds by charge type where each type appears once, else by position, only when both arrays have one length and every sumber is its bill's jenis”
  • Status: built
  • Example: given a letter with two debtIds and two items, one of each charge type, listed in any order, when the money step has run, then each item row has as legacy_amount (R-COL-20) the nominal of the item whose sumber is its bill's jenis. Given a letter on which a type repeats, then items pair with debtIds by position, and each sumber must be its bill's jenis. Two positions on one bill are a repeated type and make one item (R-COL-02), with their amounts added. A debtId that names no bill pairs with nothing (R-COL-18, R-COL-20), and the rest of the letter pairs as above. Given arrays of different lengths, or a sumber that doesn't pair with a bill of its jenis either way, then that letter's items load with legacy_amount empty, and the reconcile counts those letters. v1's items hold no key, so no other pairing is guessed.
  • Refusal: none.
  • Who: the data phase's money step, and its reconcile.
  • Source: BE's review on #306 (2026-11-04); zuki on #306 (2026-11-04) (legacy_amount). Pairing by type: #544, item 2b (2026-11-05): most letters that didn't pair hold the same charge types in a different order.