NEW TICKET#1 · Invoices
Invoice total ignores the quantity
Tomás Reyes · Support Lead
Opened today
“A designer emailed us this morning. She billed a client for 3 hours at $80 an hour, and the invoice said $80. The client paid exactly that, so she's $160 short and not happy with us. It looks like the total counts each line once, whatever its quantity. Can you fix invoiceTotal before tonight's invoices go out?”
YOUR PLAN
- 1Watch an example2 min
- 2Warm-up 11 min
- 3Warm-up 21 min
- 4Fix the ticket6 min
BY THE END YOU CAN
- Add up values in a loop
- Read a property from each object in an array
- Spot when a line of code adds the wrong thing