Skip to content

The money study: what v1's money holds

The report of the money study, timeline row 2 (D17, #185). It was read on the v1 copy only. Counts, and sums over many drivers, never one driver's data (D15). The balance of record is the instalments inside bills (D34).

Owner: @zuki · Written by the Backend Engineer · From BE-DP-11 (2026-10-22), BE-DP-18 and BE-DP-19 (2026-10-23) · BE-DP-24 logged 2026-10-23 · Complete on 2026-10-26: every finding has its decision or its issue, listed under what the money step still needs

Count Rupiah
Bills (bills.data), on 3,408 drivers 23,505 21,501,574,259 billed
Instalments inside them (pembayaran[]), not voided 31,656, in 4,914 bills 14,140,713,130
Voided instalments 6
v1's own dibayar on the bills 19,439,683,130
Rebates 89 bills 124,020,887
Refunds 106 bills, all admin fees 25,860,000
Owed by D34's sum: totals less instalments less rebates 7,236,840,242
v1's payments table 31,499 rows
Debts (debts) 645
Claim letters (claim_letters), with 1,342 items 766

By kind, rent is most of the money and the admin fee is most of the bills:

Kind Bills Billed In instalments Owed by D34's sum
Adm. Pendaftaran 19,163 5,969,059,997 538,789,999 5,423,680,001
Rental Harian 2,634 14,638,095,000 13,347,890,010 1,283,344,130
Klaim Panel 643 525,300,000 158,471,774 262,128,226
Denda Repo 363 108,900,000 7,750,000 100,850,000
ETLE 361 157,440,000 57,475,000 99,265,000
Sanksi 339 102,354,262 30,311,347 67,172,885
Lain-lain 2 425,000 25,000 400,000

Each finding that changes a rule or needs a decision has its issue.

1 · 17,129 bills are paid in v1 with no instalment

Section titled “1 · 17,129 bills are paid in v1 with no instalment”

18,591 bills have no instalment, and 17,169 of those are Lunas. 17,129 of them are Lunas with dibayar covering the total, nearly all admin fees. D34 read literally makes all of them owed. That is about Rp 5.4B that v1 shows as paid, and it is much of why 1,896 drivers owe over Rp 1M by that sum. Decided by D74 on #293: they load as paid, by one migrated payment each. BE-DP-24 found that v1 keeps no other record of their money: none has bukti_bayar, and only 1 has a payments row. Of the 17,169 Lunas bills, 17,147 are admin fees, and 7 of those were entered by hand. Of the 18,591 bills with no instalment, 1,634 were made in 2026-08, 6,623 in 2026-09 and 10,334 in 2026-10.

The rest of the bills with no instalment, by what D74 does with them:

  • 40 bills marked Lunas whose dibayar doesn't cover their total, all with dibayar zero: 18 admin fees, 14 Sanksi, 3 Klaim Panel, 2 Rental Harian, 2 ETLE and 1 Denda Repo. D74 loads them as owed, and the reconcile lists each by v1 id with #293 as the reason until zuki signs it.
  • 1,421 bills in Belum Bayar, Rp 605.6M not counting the Lain-lain bill, whose sum the query hides: 336 Denda Repo, 335 Klaim Panel, 246 Sanksi, 221 admin fees, 177 ETLE, 105 Rental Harian and 1 Lain-lain. They are owed in v1 too, and load as owed. 87 of the ETLE bills and 10 others were entered by hand.
  • 1 admin fee in Cicil whose dibayar is above zero with no instalment to show it. Neither D34 nor D74 reads dibayar here, so it loads as owed in full, and the money step lists it in the reconcile for zuki.

2 · Most migrated payments have no proof and no bank account

Section titled “2 · Most migrated payments have no proof and no bank account”

Of 31,656 instalments, 27,880 have no proof (R-MON-22) and 25,953 have no rekTujuan (R-MON-23). Only 1 says cash, and v1 records no method. The 6 voided ones all have a reason, who and when, so R-MON-21 needs no exception. This settles the migrated_from exceptions zuki accepted on #185 (option a): R-MON-22 and R-MON-23 only. DOC: #295. Also: 142 instalments have a date with no time, and load at the start of that day in the pool's time zone. 8 have an amount that isn't above zero. BE-DP-24 counted 14 instalments of zero in all: those 8, and 6 that are voided. None becomes a payment.

19,002 bills, all admin fees, have no tanggal and no jatuhTempo, but a v2 charge needs both. Their created_at runs from 2026-08-24 to 2026-10-21. Where v1 has a due date, it is the charge date (median 0 days, at most 1) for every kind except 2 Sanksi bills. D57's 3 days doesn't describe v1. One Sanksi bill is due a day before its charge. DOC: #295.

D46 wants one payment per transfer, with an allocation per charge. v1 recorded an instalment per bill, and few transfers span bills. Grouped by the same proof file and driver, 83 groups cover two or three bills (170 instalments). Grouped by the same tgl and sender account, 26 groups do. recordedAt is no key for a transfer: 447 of its values are shared by 27,690 drivers, so it marks a batch, not a payment.

The money step's plan, for review on its pull request: one migrated payment per instalment. The exception is instalments of one driver with the same proof file, which load as one payment with an allocation per bill. 67 proof files are shared by two drivers each; those stay one payment per instalment.

5 · v1's payments table has money the bills don't

Section titled “5 · v1's payments table has money the bills don't”

30,913 of the 31,499 payments rows match an instalment by bill, amount and day. 586 match none, Rp 125.8M in all, and every one is Pending. 19 rows name a bill that doesn't exist. The other way, 263 instalments (Rp 72.1M) have no payments row. D34 made the table no source. Decided by D74 on #294: the table is a source, but the 586 are Pending, which finance hasn't confirmed, so they don't load unless finance confirms them in v1. BE-DP-27 counts what loading the confirmed ones needs.

89 rebates, 8 without a reason. 106 refunds with an amount, all on admin fees: 9 without a reason, one flagged with no amount, two with an amount but no flag. None is larger than its bill or than what was paid. They load as charge adjustments, which need a reason. DOC: #295.

Section titled “7 · Debts and claim letters don't link up yet”

v1's 645 debts are claims (OR/Klaim, 643, all tambahan) and 2 ETLE. Their ref (a-a:9) names no bill. Only 23 of the letters' 1,347 debtIds name a debt, so 626 debts sit on no letter, and 144 debtIds appear on more than one letter. 26 letter numbers are used more than once, and a v2 debt letter's number is unique. Every letter's total is the sum of its items. BE-DP-24 (2026-10-23) found what they point at:

  • a debt's ref (cp-panel:9, 624 debts) names the checkpoint where the damage was found, matching 620 of its 621 numbers;
  • the letters' debtIds name bills, matching 1,168 of 1,178;
  • the 26 numbers used twice are each on two letters of the same date; 25 pairs are different drivers, and 1 pair is identical, the same letter entered twice.

Question for zuki: #299. BE's proposal there for the identical pair: load it once, with no suffix, since it is one letter.

Under D34's sum, 10 drivers are in credit (52 bills were paid more than their total), 219 owe nothing, 149 up to Rp 100k, 684 Rp 100k to 500k, 450 Rp 500k to 1M, 1,510 Rp 1M to 5M and 386 over 5M. Finding 1 changes these bands, so they are a baseline, not the balance v2 will show.

5,678 bills (968 drivers) name a lead_id that no onboarding row has. That is expected for leads who never reached onboarding. The drivers step loads every lead, and BE-DP-21 shows how bills join to leads.

The study's questions are answered or have their issue. Before the money step's pull request:

  • BE-DP-27, run by zuki: the payments no instalment records, by verif_status, driver, bill and proof, and any that match an instalment on another day (D74's read-only check).
  • DOC's rules on #295: the migrated_from exceptions, the dates of the 19,002 undated bills, the reasons missing on rebates and refunds, and R-MON-54 with D74's two kinds of payment.
  • zuki's answer on #299: what a debt and a letter's items point at, and the 25 letter numbers on two different drivers.
  • The reconcile's lists, for zuki to sign or have fixed in v1: the 586 Pending payments (#294), the 40 Lunas bills dibayar doesn't cover (#293), the 1 Cicil bill with no instalment, and the 8 instalments of zero that aren't voided.