patched null vars in invoice model for totals