Fixed problem of saving invoice, when invoice is set to delete. Added MIConnectionDetector for detecting that there is a Internet connection available, but not used currently