Skip to content
Founding beta: 7 of 50 free spots leftClaim yours

The revenue dashboard shows more money than the bank does

Bug huntEasyPython · FastAPIDatabaseAPI25 min

BILL-502: Revenue dashboard shows far more money than we actually received

Ticket #53918 · email · High

Component: Revenue dashboard (support's guess)

From: Marta Silva, finance manager, Northwind Print · Received: Mon 26 Oct, 9:40 am

Hi, I close our books at the end of every month and I always check the revenue dashboard against our bank. This month it is way off. The dashboard says we made 7,700.00 net, our bank says 4,300.00. It was fine until a few weeks ago, when you added refunds and we started giving partial refunds to customers. Looking at the customer table, Hooli is shown at 4,600 net but they paid us 2,500 once and got 400 back, so that cannot be right. Umbrella Health looks too LOW though: they paid 900 in two installments and got one refund of 150, and the dashboard says 600. I attached a copy of the dashboard and our bank movements for the month. Please fix this before I send the numbers to our accountant on Friday.

Marta

Support note (Dana K.): I checked a few of Marta's invoices in the admin view; the payments and refunds on each invoice are all there and add up to what the bank says, so the data looks right and only the dashboard figures are off. It looks worse on invoices that have more than one payment or more than one refund. Customers with a single payment and a single refund (we have a few) look right.

Attachments: attachments/dashboard-october.txt (the dashboard, copied as text), attachments/bank-statement-october.csv (Marta's bank movements for October, one row per payment and per refund).

Triage (support), written up for engineering:

Symptom

The revenue dashboard's headline numbers and its per-customer table are wrong for invoices that have several payments and/or several refunds. Some customers look too high, some too low.

Steps to reproduce

  1. As an organization member, create an invoice for 1,200.00 and record two payments: 700.00 and 500.00.
  2. Record two refunds on the same invoice: 100.00 and 50.00.
  3. Open the revenue dashboard figures for the organization.

Expected

Gross is the sum of all payments (1,200.00), refunded is the sum of all refunds (150.00), net is the difference (1,050.00), for the headline totals and for the customer's row alike.

Actual

Gross shows 2,400.00 and refunded 300.00, so net shows 2,100.00.

Ask: make the dashboard figures match the money that actually moved, for any number of payments and refunds on an invoice, in the headline totals and in the customer table. Nothing else about the dashboard or invoices should change.

© AICodingRound. Ticket text for practice on this site; see Terms.

How it works

  1. 1Fix the problemin a real codebase.
  2. 2Use your ownAI, or none.
  3. 3Submit, then answera few short questions.
  4. 4Get your gradeand feedback.

More on Ledgerly billing

View all

Related problems

View all