<?php
// ----------------------------------------------------------------
// Creator: Nagaraj
// email:   nagamsc20@gmail.com
// Title:   Tutorial Hook For QRCODE INVOICE
// ----------------------------------------------------------------
define ('SS_QRCODEINVOICE', 252<<8);
include_once($path_to_root . "/modules/QrcodeInvoice/Menu.php");

class hooks_QrcodeInvoice extends hooks {
	var $module_name = 'QrcodeInvoice';

	/*
		Install additonal menu options provided by module
	*/
    function install_tabs($app) {
        $app->add_application(new Menu_app);
    }
  
    function install_access()
	{
        $security_sections[SS_QRCODEINVOICE] =  _("QRCODE INVOICE");
        
        $security_areas['SA_QRCODEINVOICESETUP'] = array(SS_QRCODEINVOICE|1, _("Qrcode Setup"));
        
		return array($security_areas, $security_sections);
	}

    /* This method is called on extension activation for company.   */
    function activate_extension($company, $check_only=true) {
        global $db_connections;
        
        $updates = array( 'update.sql' => array('fronthrm'));
 
        return $this->update_databases($company, $updates, $check_only);
    }
    
    function deactivate_extension($company, $check_only=true) {
        global $db_connections;

        $updates = array('remove.sql' => array('fronthrm'));

        return $this->update_databases($company, $updates, $check_only);
    }
}

?>