protected function completeTotals(array $totals)
    {
        if (!isset($totals[Meta::InvoiceAmount])) {
            $totals[Meta::InvoiceAmount] = $totals[Meta::InvoiceAmountInc] - $totals[Meta::InvoiceVatAmount];
            $totals[Meta::InvoiceCalculated ] = Meta::InvoiceAmount;
        }
        if (!isset($totals[Meta::InvoiceAmountInc])) {
            $totals[Meta::InvoiceAmountInc] = $totals[Meta::InvoiceAmount] + $totals[Meta::InvoiceVatAmount];
            $totals[Meta::InvoiceCalculated ] = Meta::InvoiceAmountInc;
        }
        if (!isset($totals[Meta::InvoiceVatAmount])) {
            $totals[Meta::InvoiceVatAmount] = $totals[Meta::InvoiceAmountInc] - $totals[Meta::InvoiceAmount];
            $totals[Meta::InvoiceCalculated ] = Meta::InvoiceVatAmount;
        }
        return $totals;
    }