yearly_reconciliation_php.txt - removed 2 variables that were middlemen variables. $pb_blk_cost and $pb_col_cost were removed with $prepaidBlkCost and $prepaidColCost now being the bound variables. I also changed the subtotals and grandtotals values for these 2 costs to be incremented by $prepaidBlkCost/$prepaidColCost instead of being calculated using the cpc. There was an issue because some machines were prebilled at one cpc for the first half of the year, then at a different cpc for the 2nd half of the year. Since the values from the db are being summed, the cpc in the resultset was either the first or last of the 2. I do not remember which it would be, but that doesn't really matter. So when I was multiplying the total vols by the cpc for the subtotal and grand total footers, the total cost was based on only 1 of the cpc values instead of 2 separate ones. By incrementing the total with the value for the current machine, the correct cpc is now being used.