Ledger Map · checked 23/10/2026 against the live server · your own PDFs · follow-up: the three open problems →
Contra entries: where the ₹55,000 EMIs went, and how matching works
Party: ASMARK ENGINEERS – DO NOT USE (CMP0122). Four Central Bank of India PDFs: the current account, and three machinery term loans (EMIs ₹43,100, ₹55,000 and ₹77,000).
The short answer
- At 23:34 on 22/10/2026, an import connected all four PDFs to the wrong bank ledgers. That import was left unfinished, but its PDFs stayed saved.
- When the app looks for the other side of a transfer, it reads every PDF ever uploaded for the party, including that unfinished import. Each ₹55,000 row then seemed to have two possible partners, from two different banks.
- When a row has two possible partners, the app shows nothing and gives no reason. So all 6 EMIs of ₹55,000 (and 2 entries of the ₹77,000 loan) were missing from the Contra entries step.
- The export at 02:36 on 23/10/2026 then sent both sides of each ₹55,000 EMI to Suspense.
- We ran the real matching code on a copy of the live data, leaving out that one unfinished import. All 8 missing entries came back. The real party (ASMARK ENGINEERS – CMP0003) is not affected.
1. What happened, step by step
Before: the import at 23:34 on 22/10/2026
Step 1: the import at 02:21 on 23/10/2026
Step 2: the app looks for the partner of the ₹55,000 withdrawal on 25/05/2026
same day
The grey row is the same line of the same ₹55,000 loan PDF. But the old import connected that PDF to the ₹43,100 loan. So the app sees a second bank with a matching credit.
Step 3: two possible partners from two banks, so the app shows nothing
✕
Step 4: the export at 02:36 on 23/10/2026
contra voucher
The file has two Suspense vouchers for each EMI instead of one contra voucher. Suspense nets to zero, but the transfer is not booked current account → loan. This applies to all 6 ₹55,000 EMIs if you imported the files into Miracle (CMP0122).
After: the same data without the unfinished 22/10 import
✓
The 8 entries that did not show
| Date | Current account | Loan side | Now | Without old import |
|---|---|---|---|---|
| 25/04/2026 | −55,000.00 | +17,104.12 “O.S DEPOSIT” +37,895.88 “O.S. DEPOSIT TRANSFER” | ✕ | ✓ |
| 25/05/2026 | −55,000.00 | +55,000.00 | ✕ | ✓ |
| 25/06/2026 | −55,000.00 | +55,000.00 | ✕ | ✓ |
| 25/07/2026 | −55,000.00 | +855.50 “O.S DEPOSIT” +54,144.50 “O.S. DEPOSIT TRANSFER” | ✕ | ✓ |
| 25/08/2026 | −55,000.00 | +55,000.00 | ✕ | ✓ |
| 25/09/2026 | −55,000.00 | +55,000.00 | ✕ | ✓ |
| 05/10/2026 | −2,832.00 “TRF” | +2,832.00 “TRANSFER REPAYMENT CHA” (₹77,000 loan) | ✕ | ✓ |
| 09/10/2026 | −77,000.00 | +27,396.06 “O.S DEPOSIT” +49,603.94 “O.S. DEPOSIT TRANSFER” | ✕ | ✓ |
Why the ₹43,100 EMIs still paired: by chance, both wrong copies of those rows were connected to the same bank as the row itself. The app never pairs a bank with itself, so those copies did not count as a second partner. You accepted all six ₹43,100 pairs at 02:29.
2. Where we went wrong
1 The partner search reads old, unfinished imports
To suggest a contra entry, the app reads every PDF of the party that has a bank ledger. That includes imports that you left half-way and never exported. On 21/10 we limited automatic pairing to the current import. We did not do the same for suggestions.
2 Rows with two partners are hidden without a word
A suggestion needs exactly one possible partner. This rule is correct: equal round amounts are common. But when a row has two possible partners, the app shows nothing. You see an empty step, not “2 possible partners”.
3 One PDF can be connected to two different banks
Nothing warns you when a PDF that is already connected to the ₹55,000 loan is connected to the ₹43,100 loan in another import. The app then treats the two copies as two different banks.
4 The bank step ignores the account number in the file name
“AccountStatement_5701294918_…” has the full account number, and the ledger “CBI MACHINERY TERM LOAN 5701294918 – 55000” has it too. The app still suggests nothing, because it also needs a matching word. If the app had filled in the right ledger, a quick Confirm would have been safe.
What the server log shows: there were no errors. The tracking events show the four wrong links at 23:34–23:35 on 22/10 (mouse clicks, no ledger suggested from the file name), the correct links at 02:21, six contra entries accepted and three rejected at 02:29–02:32, and the export at 02:36. Only this one party has a PDF connected to two banks.
3. How contra matching works
A contra entry is money moved between two of the party's own bank accounts. In Miracle, it is one contra voucher. The app tries four ways, in this order. The first way that fits wins.
Way 1 · Same bank reference saved by itself
Rule: a debit on one bank and a credit on another bank that print the same transfer number are one transfer.
Example from the sample folder: Sonik Paghadar, Bank of Baroda → SBI. None of your live imports has a pair like this yet, because Central Bank prints no transfer number on these loan rows.
109569823343
- The number is a UTR (NEFT, RTGS) or a 12-digit RRN (IMPS, UPI). The app reads it from the narration and from the reference column.
- The amounts must be exactly equal. The dates can be at most 3 days apart.
- Each row must be the other row's only candidate.
- Both rows get the other bank's ledger at once. You do not have to accept them.
- Only PDFs of the current import are used.
Way 2 · Same amount, no number suggested, you accept
Rule: a debit and a credit of exactly the same amount, on two of the party's banks, at most 1 day apart, are suggested as one transfer, if neither has any other possible partner.
- The amounts must be exactly equal and above zero. The dates can be at most 1 day apart.
- Cash, ATM and card rows never count.
- If both rows print a transfer number, the numbers must be the same.
- There must be only one possible partner on each side. The ₹55,000 EMIs failed this rule.
- Nothing is saved until you press Accept.
Way 3 · One transfer, two rows (a group) suggested, you accept
Rule: one row on one bank and two rows on one other bank are suggested as one transfer when the two rows add up exactly to the one row.
= 55,000.00
The loan books one EMI as the overdue part and the rest. This happened in April, July (₹855.50 + ₹54,144.50) and on the ₹77,000 loan in October.
- Both parts are on one other bank. Each part is at most 1 day from the single row.
- The total must be exact. There is no allowance for a fee.
- Only one combination may fit, and none of the three rows may have a one-to-one partner.
- The app suggests groups of two parts. With Alt+C you can pair up to 20 parts by hand.
Way 4 · From Miracle's books read on your PC
Rule: if the other bank's PDF is not in the import, the app looks for the transfer in that bank's postings in Miracle.
Miracle
SUSPENSE
- The amount must be the same. A debit may be up to ₹50 higher, for a transfer fee in the same row. Then only the fee is exported.
- The dates can be at most 3 days apart. Groups (2 rows = 1 posting, or 1 row = 2 postings) can be at most 1 day apart.
- Postings booked against cash or another bank are real transfers elsewhere, so the app ignores them.
- Your Miracle files stay on your PC. The server gets only the ledger you accept.
4. The rules at a glance
| Way | Amount | Dates | Transfer number | Who decides |
|---|---|---|---|---|
| 1 · Same number | Exactly equal | ≤ 3 days | Same on both | Saved by itself |
| 2 · Same amount | Exactly equal | ≤ 1 day | None shared, and not two different ones | You accept |
| 3 · Group | Two parts add up exactly | ≤ 1 day | Must agree | You accept |
| 4 · Miracle books | Equal, or debit up to ₹50 more | ≤ 3 days (groups ≤ 1) | Not used (books have none) | In Miracle with one exact match: by itself. Otherwise: you |
5. The exceptions
!More than one possible partner: nothing is shown
Equal round amounts are common, so the app does not guess. This is where the ₹55,000 EMIs got stuck. Today it is silent about it.
!Automatic pairs use only this import, but suggestions use all imports
Since 21/10, automatic pairing (way 1) looks only inside the current import, by your choice. Suggestions (ways 2 and 3) still read every saved PDF of the party. This difference let the old import get in.
✕Cash, ATM and card rows are never contra
Words such as CASH, CSH, ATM, NWD-, ATW- or POS in the narration exclude the row from ways 2 and 3, and from “booked to another ledger” in way 4.
✕Two different transfer numbers: not one transfer
If both rows print a number and the numbers differ, they are two separate payments, even with the same amount and date.
✕Out and back in one PDF with the same number is a reversal
A debit and a credit with one number in the same statement are a payment and its return. They never become a contra pair.
✕A charge next to the full transfer is not a group
If ₹55,000 goes out and ₹55,000 comes in, the two pair one to one. A GST row of ₹130.50 on the loan stays a bank charge. That is why a row with a one-to-one partner never joins a group.
✕“Not contra” is remembered for good
After you reject a pair, or unpair it, the app never suggests or pairs those two rows again. This also applies to their copies in other PDFs.
✕Your own choices are never changed
A row that you gave a ledger (also Suspense or Don't map) is never paired. A row that already has the other bank's ledger can still pair.
✓Copies of a row count as one
Overlapping PDFs of one account repeat rows. A row with the same bank, side, amount, date, narration and balance in several PDFs is one entry. Exception: if one PDF has two identical rows, the app cannot tell which one a copy is.
✓Different limits for statements and books
Statement to statement: no fee allowance. Miracle books: a debit may be up to ₹50 higher. Dates: 3 days for way 1 and the books, 1 day for suggestions and groups.
6. How to fix it
Each option uses the same data: the six ₹55,000 EMIs and the two ₹77,000 loan entries of CMP0122.
Option A · Look for partners only in this import and in PDFs already exported recommended
Imports that were never finished do not count when the app looks for the other side of a transfer.
- Removes the cause, and follows the same rule as automatic pairing.
- A wrong link in an import you left does not affect later imports.
- If the other bank's PDF is only in an import that you left half-way, that PDF is not used. Upload it again, or the Miracle books will find the transfer.
Option B · Show rows that have two or more partners, and let you pick
Instead of hiding the row, the Contra entries step lists each possible partner, and you pick one or none.
- The app never hides a possible transfer again, whatever the cause.
- The old wrong copies still show up as choices.
- More decisions for you on each such row.
Option C · Prevent wrong links in the bank step
The app fills in the bank ledger from the account number in the file name. It also warns you when a PDF is already connected to a different bank.
- Stops the mistake at the start, for every bank whose file name has the account number.
- Does not fix the wrong links that are already saved.
- Some banks do not put the account number in the file name.
Recommendation
Do A and C together. A brings back the 8 missing entries and stops unfinished imports from getting in the way. C stops wrong links from happening at all. Keep the “only one partner” rule, but count the rows that it hides. Then we can see if B is ever needed.
For the CMP0122 test company: the export at 02:36 on 23/10 put the six ₹55,000 EMIs through Suspense on both sides. If you imported those files into Miracle, correct those vouchers there, or delete them and export again after the fix.