static function _getInvoiceId($controller, $dbOrdersName, $format) { if (isset($controller->{$dbOrdersName}) && method_exists($controller->{$dbOrdersName}, 'getLastInvoiceId')) { $lastId = $controller->dbCall($dbOrdersName, 'getLastInvoiceId', array(), TRUE); $id = Helper_Cart::_composeSequenceId($format, $controller, $lastId); return $id; } return NULL; }