Line items first, totals second
Every number on the invoice comes from the lines. A line is a description, a quantity and a unit price, and its amount is the two multiplied together; the subtotal is the sum of the lines, and the discount, tax, total, deposit and balance are derived from it in that order.
A row with a price but no description is labeled Item, so a blank cell cannot hide money, and rows that are empty in every column are dropped rather than printed as zero. With no lines at all the page returns a short prompt for a description, a quantity and a unit price instead of a page of zeros.
A discount comes off before tax, because tax is charged on what the customer actually pays for the work. A deposit already received reduces the balance rather than the invoice total, which keeps the price and the amount still owed separate.