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

Money out (debit) Money in (credit) Old copy from the unfinished import ⟷Contra pair ✓Right result ✕Wrong result

1. What happened, step by step

Before: the import at 23:34 on 22/10/2026

What you didUploaded the 4 PDFs and pressed Confirm on each PDF, about 1.5 seconds apart.
What the app didSaved each PDF with the bank ledger shown. It did not suggest a ledger from the file name, although each file name has the full account number.
Loan ₹77,000 PDF
AccountStatement_4153859322_…
✕ connected to Current account
Current account PDF
AccountStatement_5149380565_…
✕ connected to Loan ₹43,100
Loan ₹43,100 PDF
AccountStatement_5164197786_…
✕ connected to Current account
Loan ₹55,000 PDF
AccountStatement_5701294918_…
✕ connected to Loan ₹43,100
All four links are wrong. Two minutes later you started a new import. The app kept these four PDFs and their wrong links.

Step 1: the import at 02:21 on 23/10/2026

What you didUploaded the same 4 PDFs again and connected each one to its correct bank ledger.
What the app didOpened the Contra entries step and looked for the other side of each transfer.
All four links are right this time. ✓

Step 2: the app looks for the partner of the ₹55,000 withdrawal on 25/05/2026

Current account
25/05/2026WITHDRAWAL TRANSFER−55,000.00
⟶same amount,
same day
Loan ₹55,000 · this import
25/05/2026O.S. DEPOSIT TRANSFER+55,000.00
“Loan ₹43,100” · old copy from 22/10, 23:34
25/05/2026O.S. DEPOSIT TRANSFER+55,000.00

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

Current account
25/05/2026WITHDRAWAL TRANSFER−55,000.00
?2 candidates
✕
Nothing shown in Contra entries
✕ The app hides a row that has more than one possible partner, and it does not say so. The other side has the same problem: the old copy of the current account PDF (connected to “Loan ₹43,100”) gives each loan credit a second possible partner too.

Step 4: the export at 02:36 on 23/10/2026

What you didFinished the steps and saved the voucher files.
What the app didWrote each open row to Suspense, as it does for every row without a ledger.
Current account
25/05/2026WITHDRAWAL TRANSFER−55,000.00
→ Suspense ✕
≠should be one
contra voucher
Loan ₹55,000
25/05/2026O.S. DEPOSIT TRANSFER+55,000.00
→ Suspense ✕

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

Current account
25/05/2026WITHDRAWAL TRANSFER−55,000.00
⟷only partner
✓
Loan ₹55,000
25/05/2026O.S. DEPOSIT TRANSFER+55,000.00
✓ Suggested in Contra entries. We ran the real matching code on a copy of the live data: all 8 missing entries came back (table below).

The 8 entries that did not show

DateCurrent accountLoan sideKindNowWithout old import
25/04/2026−55,000.00+17,104.12 “O.S DEPOSIT”
+37,895.88 “O.S. DEPOSIT TRANSFER”
Split in two✕✓
25/05/2026−55,000.00+55,000.00One to one✕✓
25/06/2026−55,000.00+55,000.00One to one✕✓
25/07/2026−55,000.00+855.50 “O.S DEPOSIT”
+54,144.50 “O.S. DEPOSIT TRANSFER”
Split in two✕✓
25/08/2026−55,000.00+55,000.00One to one✕✓
25/09/2026−55,000.00+55,000.00One to one✕✓
05/10/2026−2,832.00 “TRF”+2,832.00 “TRANSFER REPAYMENT CHA” (₹77,000 loan)One to one✕✓
09/10/2026−77,000.00+27,396.06 “O.S DEPOSIT”
+49,603.94 “O.S. DEPOSIT TRANSFER”
Split in two✕✓

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.

Bank of Baroda savings
05/04/2021UPI/109569823343/21:04:55/UPI/…/Payment−4,000.00
⟷same number
109569823343
SBI savings
05/04/2021BY TRANSFER- UPI/CR/109569823343/SONIK DI/BARB/…+4,000.00
  • 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.
no shared number ↓

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.

Current account
25/05/2026WITHDRAWAL TRANSFER−55,000.00
⟷Accept?
Loan ₹55,000
25/05/2026O.S. DEPOSIT TRANSFER+55,000.00
  • 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.
no one-to-one partner ↓

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.

Current account
25/04/2026WITHDRAWAL TRANSFER−55,000.00
⟷17,104.12 + 37,895.88
= 55,000.00
Loan ₹55,000
25/04/2026O.S DEPOSIT+17,104.12
25/04/2026O.S. DEPOSIT TRANSFER+37,895.88

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.
other bank's PDF not in this import ↓

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.

Loan ₹55,000 PDF · CMP0003
25/03/2026O.S. DEPOSIT TRANSFER+55,000.00
⟷already in
Miracle
Miracle CMP0003 · current account posting
25/03/2026Contra voucher → Loan ₹55,000−55,000.00
Booked against this loan already: the row is marked “In Miracle” and left out of the export, so it is not booked twice. (Your current account PDF starts on 08/04/2026, so March can only come from the books.)
Krishna Suppliers · HDFC
29/12/2022UPI-JAY THUMAR-…-G SCB0RJT00…−45,000.00
⟷booked to
SUSPENSE
Miracle · RDC bank posting
29/12/2022RDC ← SUSPENSE+45,000.00
Booked against another ledger (here Suspense): the app suggests the RDC bank ledger, exports the row, and tells you which Miracle voucher to correct.
  • 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

WayAmountDatesTransfer numberWho decides
1 · Same numberExactly equal≤ 3 daysSame on bothSaved by itself
2 · Same amountExactly equal≤ 1 dayNone shared, and not two different onesYou accept
3 · GroupTwo parts add up exactly≤ 1 dayMust agreeYou accept
4 · Miracle booksEqual, 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.

25/05/2026Current account−55,000.00
25/05/2026Loan ₹55,000+55,000.00
25/05/2026“Loan ₹43,100” (old copy)+55,000.00

!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.

25/05/2026Current account−55,000.00
⟷1 partner ✓
25/05/2026Loan ₹55,000+55,000.00
25/05/2026old copy: not read+55,000.00
8 of 8missing entries come back (tested on live data)
0extra clicks for you
Good
  • Removes the cause, and follows the same rule as automatic pairing.
  • A wrong link in an import you left does not affect later imports.
Bad
  • 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.

25/05/2026Current account−55,000.00
⟶pick one
25/05/2026Loan ₹55,000+55,000.00
25/05/2026“Loan ₹43,100”, old copy+55,000.00
8rows that need you to pick a partner
8wrong choices on screen (the old copies)
Good
  • The app never hides a possible transfer again, whatever the cause.
Bad
  • 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.

AccountStatement_5701294918_…
⟶filled in
✓ CBI MACHINERY TERM LOAN 5701294918 – 55000
4 of 4PDFs would get the right ledger filled in
0missing entries fixed today
Good
  • Stops the mistake at the start, for every bank whose file name has the account number.
Bad
  • 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.