però c'è un però (sicuro sarà un'altra mi svista):
codice:
                <tbody>
                    <?php
                    $totQta = 0;
                    $totImp = 0;
                    $totQtaUscita = 0;
                    $totImpUscita = 0;
                    foreach ($queryPacc as $var):
                        $upNow = $var['uscita_pacc'];
                        $totQta += $var['sum_qta'];
                        $totImp += $var['imp_lordo'];

                        $totQtaUscita += $var['sum_qta'];
                        $totImpUscita += $var['imp_lordo'];

                        if (isset($upOld) && $upNow != $upOld):
                            ?>
                            <tr class="table-warning">
                                <th>TOT <?php echo $upOld; ?></th>
                                <th></th>
                                <th></th>
                                <th><?php echo $totQtaUscita; ?></th>
                                <th><?php echo $totImpUscita; ?></th>
                            </tr>
                            <?php
                            $totQtaUscita = 0;
                            $totImpUscita = 0;
                        endif;
                        ?>

                        <tr>                         
                            <?php for ($i = 0; $i < count($arrColonne); $i++): ?>
                                <td>
                                    <?php echo $var[array_values($arrColonne)[$i]]; ?>
                                </td>
                            <?php endfor; ?>
                        </tr>
                        <?php
                        $upOld = $var['uscita_pacc'];
                    endforeach;
                    ?>
                    <tr class="table-warning">
                        <th>TOT <?php echo $upOld; ?></th>
                        <th></th>
                        <th></th>
                        <th><?php echo $totQtaUscita; ?></th>
                        <th><?php echo $totImpUscita; ?></th>
                    </tr>
                    <tr class="table-danger">
                        <th>TOTALE</th>
                        <th></th>
                        <th></th>
                        <th><?php echo $totQta; ?></th>
                        <th><?php echo $totImp; ?></th>
                    </tr>
                </tbody>

ho aggiunto i subtotali, solo che sono sbagliati.
nel senso che al cambio di uscita, la somma si prende anche la prima riga dell'uscita successiva.