function users_photoscontent_BeforeShow(&$sender)
{
    $users_photoscontent_BeforeShow = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $users_photoscontent;
    //Compatibility
    //End users_photoscontent_BeforeShow
    //Custom Code @18-2A29BDB7
    // -------------------------
    // Write your own code here.
    global $Tpl;
    global $FileName;
    $users = new Users();
    $guid_get = trim(CCGetFromGet("guid", ""));
    $users_photoscontent->lbguid->SetValue($guid_get);
    $guid_post = trim(CCGetFromPost("hidguid", ""));
    $params_user = array();
    $params_user["guid"] = $guid_get;
    $userInfo = $users->getUserDetailsByGuid($params_user);
    $userDetails = $userInfo["user_details"];
    $users_photoscontent->lbuser_title->SetValue($userDetails["username"] . " - " . $userDetails["fullname"]);
    $Tpl->setvar("user_photo", $userDetails["photo"]);
    $Tpl->setvar("user_photo_title", $userDetails["username"]);
    $Tpl->Parse("user_images", true);
    if (!empty($_FILES) && strlen($guid_post) > 0) {
        $params = array();
        $params["guid"] = $guid_post;
        $users->uploadUserPhoto($_FILES, $params);
    }
    // -------------------------
    //End Custom Code
    //Close users_photoscontent_BeforeShow @1-1017A4D8
    return $users_photoscontent_BeforeShow;
}
function customers_assessment_maintcontent_BeforeShow(&$sender)
{
    $customers_assessment_maintcontent_BeforeShow = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $customers_assessment_maintcontent;
    //Compatibility
    //End customers_assessment_maintcontent_BeforeShow
    //Custom Code @9-2A29BDB7
    // -------------------------
    // Write your own code here.
    global $MainPage;
    $params = array();
    $customers = new Customers();
    $tab = CCGetFromGet("tab", "tab_9");
    $guid = CCGetFromGet("guid", "");
    $o_post = CCGetFromPost("o", "");
    switch ($o_post) {
        case "insert":
            $typeid_post = (int) CCGetFromPost("hidtype_id", "0");
            $option_title = trim(CCGetFromPost("title", ""));
            $tab = trim(CCGetFromPost("hidtab", ""));
            $params["type_id"] = $typeid_post;
            $params["title"] = $option_title;
            $newOption = $customers->addAssessmentType($params);
            $newOption = $newOption["options"];
            $guid = $newOption["guid"];
            //Will show saved pop and disable button
            CCSetSession("showalert", "show");
            //Redirect after submit
            header("Location: customers_assessment.php?tab={$tab}");
            break;
        case "update":
            $typeid_post = (int) CCGetFromPost("hidtype_id", "0");
            $option_title = trim(CCGetFromPost("title", ""));
            $tab = trim(CCGetFromPost("hidtab", ""));
            $guid = trim(CCGetFromPost("hidguid", ""));
            $params["type_id"] = $typeid_post;
            $params["title"] = $option_title;
            $params["guid"] = $guid;
            $customers->editAssessmentType($params);
            //Will show saved pop and disable button
            CCSetSession("showalert", "show");
            //Redirect after submit
            header("Location: customers_assessment.php?tab={$tab}");
            break;
    }
    $guid = trim($guid, "guid=");
    $type_id = trim($tab, "tab_");
    if (strlen($guid) > 0) {
        $params["guid"] = $guid;
        $option = $customers->getAssessmentOptionsByGuid($params);
        $option = $option["options"][0];
        $customers_assessment_maintcontent->hidguid->SetValue($option["guid"]);
        $customers_assessment_maintcontent->title->SetValue($option["title"]);
        $customers_assessment_maintcontent->o->SetValue("update");
    }
    $customers_assessment_maintcontent->hidtype_id->SetValue($type_id);
    $customers_assessment_maintcontent->hidtab->SetValue($tab);
    $params["type_id"] = $type_id;
    $type_detail = $customers->getAssessmentTypeByID($params);
    $type_detail = $type_detail["types"][0];
    $typeid_title = $type_detail["type"];
    $customers_assessment_maintcontent->lbtype->setvalue($typeid_title);
    //Settingup saved message popup
    $showalert = CCGetSession("showalert", "hide");
    $MainPage->Attributes->SetValue("showalert", $showalert);
    if ($showalert == "show") {
        CCSetSession("showalert", "hide");
    }
    // -------------------------
    //End Custom Code
    //Close customers_assessment_maintcontent_BeforeShow @1-BC8E08EE
    return $customers_assessment_maintcontent_BeforeShow;
}
function contacts_holidays_maintcontent_alm_contacts_holidays_AfterInsert(&$sender)
{
    $contacts_holidays_maintcontent_alm_contacts_holidays_AfterInsert = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $contacts_holidays_maintcontent;
    //Compatibility
    //End contacts_holidays_maintcontent_alm_contacts_holidays_AfterInsert
    //Custom Code @18-2A29BDB7
    // -------------------------
    // Write your own code here.
    global $lastguid;
    global $FileName;
    global $Redirect;
    CCSetSession("showalert", "show");
    $querystring = CCGetFromPost("querystring", "");
    $Redirect = $FileName . "?guid={$lastguid}&{$querystring}";
    // -------------------------
    //End Custom Code
    //Close contacts_holidays_maintcontent_alm_contacts_holidays_AfterInsert @3-37995511
    return $contacts_holidays_maintcontent_alm_contacts_holidays_AfterInsert;
}
Ejemplo n.º 4
0
 function GetFormParameters()
 {
     for ($RowNumber = 1; $RowNumber <= $this->TotalRows; $RowNumber++) {
         $this->FormParameters["statistical_conclusion"][$RowNumber] = CCGetFromPost("statistical_conclusion_" . $RowNumber, NULL);
         $this->FormParameters["CheckBox_Delete"][$RowNumber] = CCGetFromPost("CheckBox_Delete_" . $RowNumber, NULL);
     }
 }
Ejemplo n.º 5
0
 function GetFormParameters()
 {
     for ($RowNumber = 1; $RowNumber <= $this->TotalRows; $RowNumber++) {
         $this->FormParameters["code"][$RowNumber] = CCGetFromPost("code_" . $RowNumber, NULL);
         $this->FormParameters["company_name"][$RowNumber] = CCGetFromPost("company_name_" . $RowNumber, NULL);
         $this->FormParameters["description"][$RowNumber] = CCGetFromPost("description_" . $RowNumber, NULL);
         $this->FormParameters["creation_date"][$RowNumber] = CCGetFromPost("creation_date_" . $RowNumber, NULL);
         $this->FormParameters["created_by"][$RowNumber] = CCGetFromPost("created_by_" . $RowNumber, NULL);
         $this->FormParameters["updated_date"][$RowNumber] = CCGetFromPost("updated_date_" . $RowNumber, NULL);
         $this->FormParameters["updated_by"][$RowNumber] = CCGetFromPost("updated_by_" . $RowNumber, NULL);
         $this->FormParameters["CheckBox_Delete"][$RowNumber] = CCGetFromPost("CheckBox_Delete_" . $RowNumber, NULL);
     }
 }
function licensing_bulkrenewalcontent_BeforeShow(&$sender)
{
    $licensing_bulkrenewalcontent_BeforeShow = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $licensing_bulkrenewalcontent;
    //Compatibility
    //End licensing_bulkrenewalcontent_BeforeShow
    //Custom Code @2-2A29BDB7
    // -------------------------
    // Write your own code here.
    //*******************************//
    //Licensing active //
    //*******************************//
    $guid = CCGetFromGet("guid", "");
    $grantNumber = CCGetFromGet("grant_number", "");
    $tab = CCGetFromGet("tab", "");
    $o = CCGetFromGet("o", "");
    $params = array();
    $params["grant_number"] = $grantNumber;
    //Settingup saved message popup
    global $MainPage;
    global $Tpl;
    global $FileName;
    $showalert = CCGetSession("showalert", "hide");
    $MainPage->Attributes->SetValue("showalert", $showalert);
    if ($showalert == "show") {
        CCSetSession("showalert", "hide");
    }
    $showerror = CCGetSession("showerror", "hide");
    $MainPage->Attributes->SetValue("showerror", $showerror);
    if ($showerror == "show") {
        CCSetSession("showerror", "hide");
    }
    $o_post = CCGetFromPost("hido", "");
    $grant_post = CCGetFromPost("hidgrant_number", "");
    $newgrant_post = CCGetFromPost("grantnumber", "");
    $tab_post = CCGetFromPost("hidtab", "licenselist");
    $guid_post = CCGetFromPost("hidguid", "");
    $exped_post = CCGetFromPost("expedition_date", "");
    $expir_post = CCGetFromPost("expiration_date", "");
    if ($o_post == "bulkrenewal") {
        if (strlen($grant_post) > 0 && strlen($newgrant_post) > 0 && strlen($exped_post) > 0 && strlen($expir_post) > 0) {
            //Reformating the dates
            $exped_array = CCParseDate($exped_post, array("mm", "/", "dd", "/", "yyyy"));
            $format = array("yyyy", "-", "mm", "-", "dd");
            $exped_post = CCFormatDate($exped_array, $format);
            //Reformating the dates
            $expir_array = CCParseDate($expir_post, array("mm", "/", "dd", "/", "yyyy"));
            $format = array("yyyy", "-", "mm", "-", "dd");
            $expir_post = CCFormatDate($expir_array, $format);
            $params["newgrant_number"] = $newgrant_post;
            $params["grant_number"] = $grant_post;
            $params["expedition_date"] = $exped_post;
            $params["expiration_date"] = $expir_post;
            $params["user_id"] = CCGetUserID();
            $products = new \Alm\Products();
            $result = $products->bulkRenew($params);
            if ($result["status"]) {
                CCSetSession("showalert", "show");
                header("Location: licensing_customers.php?guid={$guid_post}&tab={$tab_post}");
            } else {
                CCSetSession("showerror", "show");
                header("Location: {$FileName}?guid={$guid_post}&o={$o_post}&grant_number={$grant_post}&tab={$tab_post}");
            }
        } else {
            CCSetSession("showerror", "show");
            header("Location: {$FileName}?guid={$guid_post}&o={$o_post}&grant_number={$grant_post}&tab={$tab_post}");
        }
    }
    //endif o_post
    if (strlen($grantNumber) > 0 && $o == "bulkrenewal") {
        global $Tpl;
        global $FileName;
        //Filling up licenses grid
        $products = new \Alm\Products();
        $licenses = $products->getLicensesByGrantNumber($params);
        $allLicenses = $licenses["licenses"];
        foreach ($allLicenses as $license) {
            $Tpl->setvar("lbguid", $guid);
            $Tpl->setvar("lblicense_guid", $license["guid"]);
            $Tpl->setvar("lbsuite_code", $license["suite_code"]);
            $Tpl->setvar("lbsuite_description", $license["suite_description"]);
            $Tpl->setvar("lbdescription", $license["description"]);
            $Tpl->setvar("lbproduct_typeicon", $license["type_icon_name"]);
            $Tpl->setvar("lblicense_name", $license["license_name"]);
            $Tpl->setvar("lblicensedby_name", $license["licensedby_name"]);
            $Tpl->setvar("lblicense_status", $license["license_status_name"]);
            $Tpl->setvar("lblicense_status_css", $license["alm_license_status_css_color"]);
            if ($license["id_licensed_by"] == "1") {
                $Tpl->setvar("lbnodes_qty", $license["nodes"]);
            } else {
                $Tpl->setvar("lbnodes_qty", $license["licensed_amount"]);
            }
            //Total cost of license
            $price = $license["msrp_price"];
            $licenseBy = $license["id_licensed_by"];
            $nodes = $license["nodes"];
            $licenseAmount = $license["licensed_amount"];
            //Hides the granttype info if not value present
            if (strlen(trim($license["grant_number"])) <= 0) {
                $Tpl->setvar("lbgranttype_class", "hide");
            } else {
                $Tpl->setvar("lbgranttype_class", "");
                $Tpl->setvar("lbgranttype", $license["granttype_name"]);
                $Tpl->setvar("lbgrantnumber", $license["grant_number"]);
            }
            if (strlen(trim($license["serial_number"])) <= 0) {
                $Tpl->setvar("lbserial_class", "hide");
            } else {
                $Tpl->setvar("lbserial_class", "");
                $Tpl->setvar("lbserialnumber", $license["serial_number"]);
            }
            $Tpl->setvar("lblicense_for", $license["sector_name"]);
            if (strlen($license["expedition_date"]) <= 0) {
                $expDate = "";
            } else {
                $expDate = date("m/d/Y", strtotime($license["expedition_date"]));
            }
            $Tpl->setvar("lbexpedition", $expDate);
            if (strlen($license["expiration_date"]) <= 0) {
                $expirDate = "";
            } else {
                $expirDate = date("m/d/Y", strtotime($license["expiration_date"]));
            }
            $Tpl->setvar("lbexpiration", $expirDate);
            $Tpl->parse("license_list", true);
        }
    }
    // Licensing active
    // -------------------------
    //End Custom Code
    //Close licensing_bulkrenewalcontent_BeforeShow @1-AC2FBD05
    return $licensing_bulkrenewalcontent_BeforeShow;
}
Ejemplo n.º 7
0
 function GetFormParameters()
 {
     for ($RowNumber = 1; $RowNumber <= $this->TotalRows; $RowNumber++) {
         $this->FormParameters["title"][$RowNumber] = CCGetFromPost("title_" . $RowNumber, NULL);
         $this->FormParameters["CheckBox_Delete"][$RowNumber] = CCGetFromPost("CheckBox_Delete_" . $RowNumber, NULL);
     }
 }
function products_maintcontent_alm_products_AfterInsert(&$sender)
{
    $products_maintcontent_alm_products_AfterInsert = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $products_maintcontent;
    //Compatibility
    //End products_maintcontent_alm_products_AfterInsert
    //Custom Code @42-2A29BDB7
    // -------------------------
    // Write your own code here.
    //Show message alert after saving information
    CCSetSession("showalert", "show");
    global $lastguid;
    global $FileName;
    global $Redirect;
    //Checking if there was a duplicity error
    $errors = (array) $sender->DataSource->Errors;
    $errorcount = (int) $errors["ErrorsCount"];
    $error = $errors["Errors"][0];
    if ($errorcount >= 1) {
        $position = strpos($error, "Duplicate entry");
        if (!($position === false)) {
            global $CCSLocales;
            //Duplicate entry error
            $sender->DataSource->Errors->clear();
            $sender->DataSource->Errors->addError($CCSLocales->GetText("duplicate_record"));
            //Not showuing the saving popup
            CCSetSession("showalert", "hide");
        }
    }
    //Getting querystring parameter to include in redirect when a duplicate operation takes place
    $buttoninsert2 = trim(CCGetFromPost("buttoninsert2", ""));
    if ($buttoninsert2 == "saveadd") {
        $Redirect = $FileName;
    } else {
        $querystring = CCGetFromPost("querystring", "");
        $Redirect = $FileName . "?guid={$lastguid}&{$querystring}";
    }
    // -------------------------
    //End Custom Code
    //Close products_maintcontent_alm_products_AfterInsert @2-325F1657
    return $products_maintcontent_alm_products_AfterInsert;
}
Ejemplo n.º 9
0
function lovDynamic_ds_BeforeExecuteSelect(&$sender)
{
    $lovDynamic_ds_BeforeExecuteSelect = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $lovDynamic;
    //Compatibility
    //End lovDynamic_ds_BeforeExecuteSelect
    //Custom Code @44-2A29BDB7
    // -------------------------
    // Write your own code here.
    $whereClause = CCGetFromGet('whereClause');
    // p_attribut_id = 5
    $searchField = CCGetFromGet('searchParam');
    $search = CCGetFromPost('searchKey');
    if (!empty($whereClause)) {
        //$whereClause;
    } else {
        $whereClause = '';
    }
    if (!empty($searchField)) {
        foreach ($searchField as &$field) {
            $field = "upper(" . $field . ")" . " LIKE upper('%" . $search . "%')";
        }
        if (!empty($whereClause)) {
            $whereClause .= " AND (" . implode(" OR ", $searchField) . ")";
        } else {
            $whereClause .= " (" . implode(" OR ", $searchField) . ")";
        }
    }
    //print_r($whereClause);exit;
    $Component->DataSource->Where = $whereClause;
    // -------------------------
    //End Custom Code
    //Close lovDynamic_ds_BeforeExecuteSelect @2-50A66D54
    return $lovDynamic_ds_BeforeExecuteSelect;
}
function customers_maintcontent_alm_customers_AfterUpdate(&$sender)
{
    $customers_maintcontent_alm_customers_AfterUpdate = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $customers_maintcontent;
    //Compatibility
    //End customers_maintcontent_alm_customers_AfterUpdate
    //Custom Code @59-2A29BDB7
    // -------------------------
    // Write your own code here.
    //Show message alert after saving information
    CCSetSession("showalert", "show");
    //Checking if there was a company duplicity error
    $errors = (array) $sender->DataSource->Errors;
    $errorcount = (int) $errors["ErrorsCount"];
    if ($errorcount >= 1) {
        $error = $errors["Errors"][0];
        $position = strpos($error, "Duplicate entry");
        if (!($position === false)) {
            global $CCSLocales;
            //Duplicate entry error
            $sender->DataSource->Errors->clear();
            $sender->DataSource->Errors->addError($CCSLocales->GetText("duplicate_company"));
            //Not showuing the saving popup
            CCSetSession("showalert", "hide");
        }
    }
    $guid = trim(CCGetFromPost("hidguid", ""));
    if (strlen($guid) > 0) {
        $params = array();
        $params["customer_guid"] = $guid;
        $customers = new Customers();
        $params["contact"] = trim(CCGetFromPost("contact", ""));
        $params["contact_jobposition"] = trim(CCGetFromPost("contact_jobposition", ""));
        $params["contact_phone"] = trim(CCGetFromPost("contact_phone", ""));
        $params["contact_extension"] = trim(CCGetFromPost("contact_extension", ""));
        $params["contact_mobile"] = trim(CCGetFromPost("contact_mobile", ""));
        $params["contact_workemail"] = trim(CCGetFromPost("contact_workemail", ""));
        $params["contact_personalemail"] = trim(CCGetFromPost("contact_personalemail", ""));
        $params["hidcontact_guid"] = trim(CCGetFromPost("hidcontact_guid", ""));
        $params["contact_maincontact"] = trim(CCGetFromPost("contact_maincontact", ""));
        $params["contact_dob"] = trim(CCGetFromPost("contact_dob", ""));
        $params["contact_preferred_color"] = CCGetFromPost("contact_preferred_color", array());
        $params["contact_hobbies"] = CCGetFromPost("contact_hobbies", array());
        $params["contact_notify_holidays"] = CCGetFromPost("contact_notify_holidays", array());
        $customers->addContact($params);
    }
    global $Redirect;
    global $FileName;
    $tab_post = CCGetFromPost("hidtab", "");
    if (strlen($tab_post) > 0) {
        $tab_array = explode("#", $tab_post);
        $tab_active = $tab_array[1];
        switch ($tab_active) {
            case "customerdetails":
                $tab = "details";
                break;
            case "customerevaluation":
                $tab = "evaluation";
                break;
            default:
            case "customer_addcontact":
                $tab = "addcontact";
                break;
        }
        $querystring = CCGetQueryString("QueryString", array("tab", "ccsForm", "contact_guid"));
        $querystring .= "&tab={$tab}";
    } else {
        $querystring = CCGetQueryString("QueryString", array());
        $pos = strpos($querystring, "tab");
        if ($pos === false) {
            $tab = "details";
            $querystring = CCGetQueryString("QueryString", array("tab", "ccsForm", "contact_guid"));
            $querystring .= "&tab={$tab}";
        } else {
            $querystring = CCGetQueryString("QueryString", array("ccsForm", "contact_guid"));
        }
    }
    $Redirect = $FileName . "?" . $querystring;
    // -------------------------
    //End Custom Code
    //Close customers_maintcontent_alm_customers_AfterUpdate @8-93D9FCC5
    return $customers_maintcontent_alm_customers_AfterUpdate;
}
Ejemplo n.º 11
0
 function Show()
 {
     global $Tpl;
     global $CCSLocales;
     if (!$this->Visible) {
         return;
     }
     $this->RowNumber = 0;
     $this->DataSource->Parameters["postuser_name"] = CCGetFromPost("user_name", NULL);
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
     $this->DataSource->Prepare();
     $this->DataSource->Open();
     $this->HasRecord = $this->DataSource->has_next_record();
     $this->IsEmpty = !$this->HasRecord;
     $this->Attributes->Show();
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
     if (!$this->Visible) {
         return;
     }
     $GridBlock = "Grid " . $this->ComponentName;
     $ParentPath = $Tpl->block_path;
     $Tpl->block_path = $ParentPath . "/" . $GridBlock;
     if (!$this->IsEmpty) {
         $this->ControlsVisible["app_user_name"] = $this->app_user_name->Visible;
         while ($this->ForceIteration || $this->RowNumber < $this->PageSize && ($this->HasRecord = $this->DataSource->has_next_record())) {
             // Parse Separator
             if ($this->RowNumber) {
                 $this->Attributes->Show();
                 $Tpl->parseto("Separator", true, "Row");
             }
             $this->RowNumber++;
             if ($this->HasRecord) {
                 $this->DataSource->next_record();
                 $this->DataSource->SetValues();
             }
             $Tpl->block_path = $ParentPath . "/" . $GridBlock . "/Row";
             $this->app_user_name->SetValue($this->DataSource->app_user_name->GetValue());
             $this->Attributes->SetValue("rowNumber", $this->RowNumber);
             $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
             $this->Attributes->Show();
             $this->app_user_name->Show();
             $Tpl->block_path = $ParentPath . "/" . $GridBlock;
             $Tpl->parse("Row", true);
         }
     }
     $errors = $this->GetErrors();
     if (strlen($errors)) {
         $Tpl->replaceblock("", $errors);
         $Tpl->block_path = $ParentPath;
         return;
     }
     $Tpl->parse();
     $Tpl->block_path = $ParentPath;
     $this->DataSource->close();
 }
function globalmaint_maintcontent_BeforeShow(&$sender)
{
    $globalmaint_maintcontent_BeforeShow = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $globalmaint_maintcontent;
    //Compatibility
    //End globalmaint_maintcontent_BeforeShow
    //Custom Code @2-2A29BDB7
    // -------------------------
    // Write your own code here.
    global $Tpl;
    global $MainPage;
    global $FileName;
    global $CCSLocales;
    $m = trim(CCGetFromGet("m", "city"));
    $o = trim(CCGetFromPost("o", ""));
    $guid = trim(CCGetFromGet("guid", ""));
    $userid = CCGetUserID();
    $customers = new Customers();
    $params = array();
    $params["m"] = $m;
    $params["guid"] = $guid;
    $params["userid"] = $userid;
    switch ($o) {
        case "insert":
            $title = trim(CCGetFromPost("s_title", ""));
            $m = trim(CCGetFromPost("hidm"));
            $params["title"] = $title;
            $params["m"] = $m;
            $customers->insertMaintByModule($params);
            header("Location: globalmaint.php?m={$m}");
            break;
        case "update":
            $title = trim(CCGetFromPost("s_title", ""));
            $m = trim(CCGetFromPost("hidm", ""));
            $guid = trim(CCGetFromPost("hidguid", ""));
            $params["title"] = $title;
            $params["m"] = $m;
            $params["guid"] = $guid;
            $updateCustomer = $customers->updateMaintByModule($params);
            //Checking if there was a duplicity error
            $errors = (array) $updateCustomer["errors"];
            $errorcount = (int) $errors["ErrorsCount"];
            $error = $errors["Errors"][0];
            if ($errorcount >= 1) {
                $position = strpos($error, "Duplicate entry");
                if (!($position === false)) {
                    CCSetSession("showerror", "show");
                    CCSetSession("showalert", "hide");
                    header("Location: globalmaint_maint.php?m={$m}&guid={$guid}");
                    exit;
                    //There is a bug without it, the session values dont get set when thereis a forced header redirect
                }
            } else {
                header("Location: globalmaint.php?m={$m}");
            }
            break;
    }
    if (strlen($guid) > 0) {
        //Getting module details
        switch ($m) {
            case "city":
            case "business_partners":
            case "customers_type":
            case "jobposition":
            case "manufacturer":
            case "offerings":
            case "pricingtier":
            case "group":
            case "producttypes":
            case "licensetypes":
            case "producttags":
            case "resellers":
            case "license_granttypes":
            case "competitor_products":
            case "contacts_colors":
            case "contacts_hobbies":
            case "contacts_holidays":
                $moduleContent = $customers->getAllModuleByGuid($params);
                $moduleContent = $moduleContent["details"];
                $globalmaint_maintcontent->o->setvalue("update");
                foreach ($moduleContent as $content) {
                    $globalmaint_maintcontent->s_title->setvalue($content["title"]);
                    $globalmaint_maintcontent->hidguid->setvalue($content["guid"]);
                }
                break;
        }
    }
    $globalmaint_maintcontent->hidm->setvalue($m);
    //Settingup saved message popup
    $showalert = CCGetSession("showalert", "hide");
    $MainPage->Attributes->SetValue("showalert", $showalert);
    if ($showalert == "show") {
        CCSetSession("showalert", "hide");
    }
    $showerror = CCGetSession("showerror", "hide");
    $MainPage->Attributes->SetValue("showerror", $showerror);
    if ($showerror == "show") {
        CCSetSession("showerror", "hide");
        //Duplicate entry error
        $globalmaint_maintcontent->lberror->SetValue($CCSLocales->GetText("duplicate_record"));
    }
    // -------------------------
    //End Custom Code
    //Close globalmaint_maintcontent_BeforeShow @1-02A95A19
    return $globalmaint_maintcontent_BeforeShow;
}
function Page_BeforeShow(&$sender)
{
    $Page_BeforeShow = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $t_bphtb_registration_kb;
    //Compatibility
    //End Page_BeforeShow
    //Custom Code @1003-2A29BDB7
    // -------------------------
    // Write your own code here.
    global $t_bphtb_registrationForm;
    $del_button = CCGetFromGet('allow_delete');
    if ($del_button == 'F') {
        $t_bphtb_registrationForm->DeleteAllowed = false;
        $t_bphtb_registrationForm->Button3->Visible = true;
    } else {
        $t_bphtb_registrationForm->Button3->Visible = false;
    }
    $filltheform = CCGetFromGet('filltheform');
    $submitInsert = CCGetFromPost('Button_Insert');
    if ($filltheform == 'Y' and empty($submitInsert)) {
        $registration_no_ref = CCGetFromGet('registration_no_ref');
        $t_bphtb_registration_id_old = CCGetFromGet('t_bphtb_registration_id_old');
        $t_bphtb_registrationForm->registration_no_ref->SetValue($registration_no_ref);
        $t_bphtb_registrationForm->t_bphtb_registration_id_old->SetValue($t_bphtb_registration_id_old);
        $dbConn = new clsDBConnSIKP();
        $query = "select a.*,\r\n\t\t\t\tb.region_name as wp_kota,\r\n\t\t\t\tc.region_name as wp_kecamatan,\r\n\t\t\t\td.region_name as wp_kelurahan,\r\n\t\t\t\te.region_name as object_region,\r\n\t\t\t\tf.region_name as object_kecamatan,\r\n\t\t\t\tg.region_name as object_kelurahan,\r\n\t\t\t\th.description as doc_name,\r\n\t\t\t\ti.payment_vat_amount\r\n\r\n\t\t\t\tfrom t_bphtb_registration as a \r\n\t\t\t\tleft join p_region as b\r\n\t\t\t\t\ton a.wp_p_region_id = b.p_region_id\r\n\t\t\t\tleft join p_region as c\r\n\t\t\t\t\ton a.wp_p_region_id_kec = c.p_region_id\r\n\t\t\t\tleft join p_region as d\r\n\t\t\t\t\ton a.wp_p_region_id_kel = d.p_region_id\r\n\t\t\t\tleft join p_region as e\r\n\t\t\t\t\ton a.object_p_region_id = e.p_region_id\r\n\t\t\t\tleft join p_region as f\r\n\t\t\t\t\ton a.object_p_region_id_kec = f.p_region_id\r\n\t\t\t\tleft join p_region as g\r\n\t\t\t\t\ton a.object_p_region_id_kel = g.p_region_id\r\n\t\t\t\tleft join p_bphtb_legal_doc_type as h\r\n\t\t\t\t\ton a.p_bphtb_legal_doc_type_id = h.p_bphtb_legal_doc_type_id\r\n\t\t\t\tleft join t_payment_receipt_bphtb as i\r\n\t\t\t\t\ton a.t_bphtb_registration_id = i.t_bphtb_registration_id\r\n\t\t\t\twhere a.t_bphtb_registration_id =" . $t_bphtb_registration_id_old;
        $dbConn->query($query);
        while ($dbConn->next_record()) {
            /* Subjek Pajak */
            $t_bphtb_registrationForm->wp_name->SetValue($dbConn->f("wp_name"));
            $t_bphtb_registrationForm->npwp->SetValue($dbConn->f("npwp"));
            $t_bphtb_registrationForm->wp_address_name->SetValue($dbConn->f("wp_address_name"));
            $t_bphtb_registrationForm->phone_no->SetValue($dbConn->f("phone_no"));
            $t_bphtb_registrationForm->mobile_phone_no->SetValue($dbConn->f("mobile_phone_no"));
            $t_bphtb_registrationForm->wp_rt->SetValue($dbConn->f("wp_rt"));
            $t_bphtb_registrationForm->wp_rw->SetValue($dbConn->f("wp_rw"));
            $t_bphtb_registrationForm->wp_kota->SetValue($dbConn->f("wp_kota"));
            $t_bphtb_registrationForm->wp_p_region_id->SetValue($dbConn->f("wp_p_region_id"));
            $t_bphtb_registrationForm->wp_kecamatan->SetValue($dbConn->f("wp_kecamatan"));
            $t_bphtb_registrationForm->wp_p_region_id_kec->SetValue($dbConn->f("wp_p_region_id_kec"));
            $t_bphtb_registrationForm->wp_kelurahan->SetValue($dbConn->f("wp_kelurahan"));
            $t_bphtb_registrationForm->wp_p_region_id_kel->SetValue($dbConn->f("wp_p_region_id_kel"));
            /* Objek Pajak */
            $t_bphtb_registrationForm->njop_pbb->SetValue($dbConn->f("njop_pbb"));
            $t_bphtb_registrationForm->object_address_name->SetValue($dbConn->f("object_address_name"));
            $t_bphtb_registrationForm->object_rt->SetValue($dbConn->f("object_rt"));
            $t_bphtb_registrationForm->object_rw->SetValue($dbConn->f("object_rw"));
            $t_bphtb_registrationForm->object_kota->SetValue($dbConn->f("object_region"));
            $t_bphtb_registrationForm->object_p_region_id->SetValue(trim($dbConn->f("object_p_region_id")));
            $t_bphtb_registrationForm->object_kecamatan->SetValue($dbConn->f("object_kecamatan"));
            $t_bphtb_registrationForm->object_p_region_id_kec->SetValue(trim($dbConn->f("object_p_region_id_kec")));
            $t_bphtb_registrationForm->object_kelurahan->SetValue($dbConn->f("object_kelurahan"));
            $t_bphtb_registrationForm->object_p_region_id_kel->SetValue(trim($dbConn->f("object_p_region_id_kel")));
            $t_bphtb_registrationForm->p_bphtb_legal_doc_type_id->SetValue($dbConn->f("p_bphtb_legal_doc_type_id"));
            $t_bphtb_registrationForm->bphtb_legal_doc_description->SetValue($dbConn->f("bphtb_legal_doc_description"));
            $t_bphtb_registrationForm->add_disc_percent->SetValue($dbConn->f("add_disc_percent"));
            $t_bphtb_registrationForm->add_disc_percent->SetValue($dbConn->f("add_disc_percent"));
            $t_bphtb_registrationForm->land_area->SetValue($dbConn->f("land_area"));
            $t_bphtb_registrationForm->land_price_per_m->SetValue($dbConn->f("land_price_per_m"));
            $t_bphtb_registrationForm->land_total_price->SetValue($dbConn->f("land_total_price"));
            $t_bphtb_registrationForm->building_area->SetValue($dbConn->f("building_area"));
            $t_bphtb_registrationForm->building_price_per_m->SetValue($dbConn->f("building_price_per_m"));
            $t_bphtb_registrationForm->building_total_price->SetValue($dbConn->f("building_total_price"));
            $t_bphtb_registrationForm->total_price->SetValue($dbConn->f("land_total_price") + $dbConn->f("building_total_price"));
            $t_bphtb_registrationForm->market_price->SetValue($dbConn->f("market_price"));
            $t_bphtb_registrationForm->total_price->SetValue($dbConn->f("land_total_price") + $dbConn->f("building_total_price"));
            /*NPOP*/
            $t_bphtb_registrationForm->npop->SetValue($dbConn->f("npop"));
            $t_bphtb_registrationForm->add_discount->SetValue($dbConn->f("add_discount"));
            $t_bphtb_registrationForm->npop_tkp->SetValue($dbConn->f("npop_tkp"));
            $t_bphtb_registrationForm->npop_kp->SetValue($dbConn->f("npop_kp"));
            $t_bphtb_registrationForm->bphtb_amt->SetValue($dbConn->f("bphtb_amt"));
            $t_bphtb_registrationForm->bphtb_discount->SetValue($dbConn->f("bphtb_discount"));
            $t_bphtb_registrationForm->description->SetValue($dbConn->f("description"));
            $t_bphtb_registrationForm->bphtb_amt_final_old->SetValue($dbConn->f("bphtb_amt_final"));
            $t_bphtb_registrationForm->prev_payment_amount->SetValue($dbConn->f("payment_vat_amount"));
            /* sisa pembayaran */
            //$t_bphtb_registrationForm->bphtb_amt_final->SetValue( $dbConn->f("bphtb_amt_final") -  $dbConn->f("payment_vat_amount"));
        }
        $dbConn->close();
    }
    // -------------------------
    //End Custom Code
    //Close Page_BeforeShow @1-4BC230CD
    return $Page_BeforeShow;
}
Ejemplo n.º 14
0
 function Initialize()
 {
     if (!$this->Visible) {
         return;
     }
     $this->DataSource->Parameters["postuser_id"] = CCGetFromPost("user_id", NULL);
 }
Ejemplo n.º 15
0
 function Show()
 {
     global $CCSUseAmp;
     $Tpl = CCGetTemplate($this);
     global $FileName;
     global $CCSLocales;
     $Error = "";
     if (!$this->Visible) {
         return;
     }
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
     $RecordBlock = "Record " . $this->ComponentName;
     $ParentPath = $Tpl->block_path;
     $Tpl->block_path = $ParentPath . "/" . $RecordBlock;
     $this->EditMode = $this->EditMode && $this->ReadAllowed;
     if ($this->EditMode) {
         if ($this->DataSource->Errors->Count()) {
             $this->Errors->AddErrors($this->DataSource->Errors);
             $this->DataSource->Errors->clear();
         }
         $this->DataSource->Open();
         if ($this->DataSource->Errors->Count() == 0 && $this->DataSource->next_record()) {
             $this->DataSource->SetValues();
         } else {
             $this->EditMode = false;
         }
     }
     if (!$this->FormSubmitted) {
         $this->searchKey->SetText(CCGetFromPost('searchKey'));
     }
     if ($this->FormSubmitted || $this->CheckErrors()) {
         $Error = "";
         $Error = ComposeStrings($Error, $this->searchKey->Errors->ToString());
         $Error = ComposeStrings($Error, $this->Errors->ToString());
         $Error = ComposeStrings($Error, $this->DataSource->Errors->ToString());
         $Tpl->SetVar("Error", $Error);
         $Tpl->Parse("Error", false);
     }
     $CCSForm = $this->EditMode ? $this->ComponentName . ":" . "Edit" : $this->ComponentName;
     $this->HTMLFormAction = $FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", $CCSForm);
     $Tpl->SetVar("Action", !$CCSUseAmp ? $this->HTMLFormAction : str_replace("&", "&amp;", $this->HTMLFormAction));
     $Tpl->SetVar("HTMLFormName", $this->ComponentName);
     $Tpl->SetVar("HTMLFormEnctype", $this->FormEnctype);
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
     $this->Attributes->Show();
     if (!$this->Visible) {
         $Tpl->block_path = $ParentPath;
         return;
     }
     $this->Button_DoSearch->Show();
     $this->searchKey->Show();
     $Tpl->parse();
     $Tpl->block_path = $ParentPath;
     $this->DataSource->close();
 }
Ejemplo n.º 16
0
 function GetFormParameters()
 {
     for ($RowNumber = 1; $RowNumber <= $this->TotalRows; $RowNumber++) {
         $this->FormParameters["sub_dept"][$RowNumber] = CCGetFromPost("sub_dept_" . $RowNumber, NULL);
         $this->FormParameters["department_id"][$RowNumber] = CCGetFromPost("department_id_" . $RowNumber, NULL);
         $this->FormParameters["CheckBox_Delete"][$RowNumber] = CCGetFromPost("CheckBox_Delete_" . $RowNumber, NULL);
     }
 }
function users_reassignuser_content_BeforeShow(&$sender)
{
    $users_reassignuser_content_BeforeShow = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $users_reassignuser_content;
    //Compatibility
    //End users_reassignuser_content_BeforeShow
    //Custom Code @53-2A29BDB7
    // -------------------------
    // Write your own code here.
    //Settingup saved message popup
    $sourceuser = (int) CCGetFromPost("lbsourceuser", 0);
    $targetuser = (int) CCGetFromPost("lbtargetuser", 0);
    $companies = CCGetFromPost("companies", array());
    $o = trim(CCGetFromPost("o", ""));
    if ($o == "reassignuser") {
        if ($sourceuser != $targetuser) {
            if (count($companies) > 0) {
                global $FileName;
                $params = array();
                $params["sourceuser"] = $sourceuser;
                $params["targetuser"] = $targetuser;
                $params["companies"] = $companies;
                $customers = new Customers();
                $reassigned = $customers->reassignUser($params);
                $total_updated = $reassigned["result"]["total_updated"];
                if ($total_updated > 0) {
                    CCSetSession("showalert", "show");
                    //$users_reassignuser_content->lbsourceuser->setvalue($targetuser);
                }
            }
        }
    } else {
        //Default param value
        $sourceuserid = (int) CCGetFromGet("sourceuserid", "0");
        if ($sourceuserid <= 0) {
            $users_reassignuser_content->lbsourceuser->setvalue("1");
        } else {
            $users_reassignuser_content->lbsourceuser->setvalue($sourceuserid);
        }
    }
    global $MainPage;
    $showalert = CCGetSession("showalert", "hide");
    $MainPage->Attributes->SetValue("showalert", $showalert);
    if ($showalert == "show") {
        CCSetSession("showalert", "hide");
    }
    // -------------------------
    //End Custom Code
    //Close users_reassignuser_content_BeforeShow @1-90D76575
    return $users_reassignuser_content_BeforeShow;
}
Ejemplo n.º 18
0
 function Initialize()
 {
     if (!$this->Visible) {
         return;
     }
     $this->DataSource->Parameters["postV_SUBMITTERSUBMITTER_ID"] = CCGetFromPost("V_SUBMITTERSUBMITTER_ID", NULL);
 }
function companies_viewcontent_alm_customers_AfterUpdate(&$sender)
{
    $companies_viewcontent_alm_customers_AfterUpdate = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $companies_viewcontent;
    //Compatibility
    //End companies_viewcontent_alm_customers_AfterUpdate
    //Custom Code @29-2A29BDB7
    // -------------------------
    // Write your own code here.
    //Show message alert after saving information
    CCSetSession("showalert", "show");
    //Checking if there was a company duplicity error
    $errors = (array) $sender->DataSource->Errors;
    $errorcount = (int) $errors["ErrorsCount"];
    if ($errorcount >= 1) {
        $error = $errors["Errors"][0];
        $position = strpos($error, "Duplicate entry");
        if (!($position === false)) {
            global $CCSLocales;
            //Duplicate entry error
            $sender->DataSource->Errors->clear();
            $sender->DataSource->Errors->addError($CCSLocales->GetText("duplicate_company"));
            //Not showuing the saving popup
            CCSetSession("showalert", "hide");
        }
    }
    global $Redirect;
    global $FileName;
    $tab_post = CCGetFromPost("hidtab", "");
    if (strlen($tab_post) > 0) {
        $tab_array = explode("#", $tab_post);
        $tab_active = $tab_array[1];
        switch ($tab_active) {
            case "customerdetails":
                $tab = "details";
                break;
            case "customerevaluation":
                $tab = "evaluation";
                break;
            default:
            case "customer_addcontact":
                $tab = "addcontact";
                break;
        }
        $querystring = CCGetQueryString("QueryString", array("tab", "ccsForm", "contact_guid"));
        $querystring .= "&tab={$tab}";
    } else {
        $querystring = CCGetQueryString("QueryString", array());
        $pos = strpos($querystring, "tab");
        if ($pos === false) {
            $tab = "details";
            $querystring = CCGetQueryString("QueryString", array("tab", "ccsForm", "contact_guid"));
            $querystring .= "&tab={$tab}";
        } else {
            $querystring = CCGetQueryString("QueryString", array("ccsForm", "contact_guid"));
        }
    }
    $Redirect = $FileName . "?" . $querystring;
    // -------------------------
    //End Custom Code
    //Close companies_viewcontent_alm_customers_AfterUpdate @2-86B7DE8B
    return $companies_viewcontent_alm_customers_AfterUpdate;
}
function contacts_maintcontent_alm_customers_contacts_AfterUpdate(&$sender)
{
    $contacts_maintcontent_alm_customers_contacts_AfterUpdate = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $contacts_maintcontent;
    //Compatibility
    //End contacts_maintcontent_alm_customers_contacts_AfterUpdate
    //Custom Code @31-2A29BDB7
    // -------------------------
    // Write your own code here.
    //Show message alert after saving information
    //Saving the subhobbies for the contact
    $hobbies = CCGetFromPost("hobbies", array());
    foreach ($hobbies as $hobbie_id) {
        $parent_id = $hobbie_id;
        $subhobbie = CCGetFromPost("subhobbies_{$parent_id}", array());
        $params = array();
        $params["subhobbie"] = $subhobbie;
        $params["parent_id"] = $parent_id;
        $params["contact_guid"] = $contact_guid = $contacts_maintcontent->alm_customers_contacts->hidguid->GetValue();
        $customers = new Customers();
        $customers->saveContactSubHobbies($params);
    }
    CCSetSession("showalert", "show");
    // -------------------------
    //End Custom Code
    //Close contacts_maintcontent_alm_customers_contacts_AfterUpdate @2-2B8C46BF
    return $contacts_maintcontent_alm_customers_contacts_AfterUpdate;
}
function licensing_customerscontent_BeforeShow(&$sender)
{
    $licensing_customerscontent_BeforeShow = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $licensing_customerscontent;
    //Compatibility
    //End licensing_customerscontent_BeforeShow
    //Custom Code @152-2A29BDB7
    // -------------------------
    // Write your own code here.
    global $Tpl;
    $tab = CCGetFromGet("tab", "tab1_active");
    switch ($tab) {
        default:
        case "details":
            $Tpl->setvar("tab1_active", "active");
            break;
        case "licensing":
            $Tpl->setvar("tab2_active", "active");
            break;
        case "licenselist":
            $Tpl->setvar("tab3_active", "active");
            break;
        case "licensearchive":
            $Tpl->setvar("tab4_active", "active");
            break;
        case "competitor_renewals":
            $Tpl->setvar("tab5_active", "active");
            break;
        case "product_displacement":
            $Tpl->setvar("tab6_active", "active");
            break;
    }
    //Setting the active tab for licensing when the cssForm is present and has licensing as the form submitted
    $cssForm = trim(CCGetFromGet("ccsForm", ""));
    if ($cssForm == "licensing") {
        //Whichever tab set will be reset to avoid more than 1 tab active
        $Tpl->setvar("tab1_active", "");
        $Tpl->setvar("tab2_active", "active");
        $Tpl->setvar("tab3_active", "");
        $Tpl->setvar("tab4_active", "");
        $Tpl->setvar("tab5_active", "");
        $Tpl->setvar("tab6_active", "");
    }
    //Settingup saved message popup
    global $MainPage;
    $showalert = CCGetSession("showalert", "hide");
    $MainPage->Attributes->SetValue("showalert", $showalert);
    if ($showalert == "show") {
        CCSetSession("showalert", "hide");
    }
    //Setting up alerts to let user know the customer has not contacts yet
    $customers = new Customers();
    $customer_guid = CCGetFromGet("guid", "");
    $params = array();
    $params["customer_guid"] = $customer_guid;
    $hasContacts = $customers->customerHasContacts($params);
    if ($hasContacts["hasContacts"] == "1") {
        $MainPage->Attributes->SetValue("showalert_contacterror", "hide");
    } else {
        $MainPage->Attributes->SetValue("showalert_contacterror", "show");
    }
    //Setting up alerts to let user know the license may need support
    $license_guid = trim(CCGetFromGet("license_guid", ""));
    if (strlen($license_guid) > 0) {
        $products = new Alm\Products();
        $params = array();
        $params["license_guid"] = $license_guid;
        $hasSupport = $products->licenseHasSupport($params);
        if ($hasSupport["hasSupport"] == "1") {
            $MainPage->Attributes->SetValue("showalert_addsupport", "hide");
        } else {
            $MainPage->Attributes->SetValue("showalert_addsupport", "show");
        }
    } else {
        $MainPage->Attributes->SetValue("showalert_addsupport", "hide");
    }
    //Check if session variable showalert_addsupport has a show value
    $showalert_addsupport = CCGetSession("showalert_addsupport", "");
    if ($showalert_addsupport == "show") {
        CCSetSession("showalert_addsupport", "hide");
        $MainPage->Attributes->SetValue("showalert_addsupport", $showalert);
    }
    //Procesing file uploading
    $hidlicense_guid = trim(CCGetFromPost("hidlicense_guid", ""));
    if (!empty($_FILES) && strlen($hidlicense_guid) > 0) {
        $params = array();
        $params["license_guid"] = $hidlicense_guid;
        $products = new \Alm\Products();
        $products->uploadLicenseFile($_FILES, $params);
        //Finishing script execution for file uploads because its asyncronous
        exit;
    }
    $license_guid = trim(CCGetFromGet("license_guid", ""));
    $licensefile_guid = trim(CCGetFromGet("licensefile_guid", ""));
    $o = trim(CCGetFromGet("o", ""));
    //Delete licensing operation
    if (strlen($licensefile_guid) > 0 && $o == "dellicense") {
        $params = array();
        $params["licensefile_guid"] = $licensefile_guid;
        $products = new \Alm\Products();
        $products->deleteLicenseFileByGuid($params);
        $querystring = CCGetQueryString("QueryString", array("licensefile_guid", "o"));
        global $FileName;
        $urlRedirect = $FileName . "?{$querystring}";
        header("Location: {$urlRedirect}");
    }
    //Delete full licensing operation
    if (strlen($license_guid) > 0 && $o == "delfulllicense") {
        $params = array();
        $params["license_guid"] = $license_guid;
        $products = new \Alm\Products();
        $products->deleteFullLicenseByGuid($params);
        $querystring = CCGetQueryString("QueryString", array("license_guid", "o"));
        global $FileName;
        $urlRedirect = $FileName . "?{$querystring}";
        header("Location: {$urlRedirect}");
    }
    if (strlen($license_guid) > 0) {
        //License files grid
        $params = array();
        $params["license_guid"] = $license_guid;
        $products = new \Alm\Products();
        $licenseFiles = $products->getLicenseFiles($params);
        $licenseFiles = $licenseFiles["licensefiles"];
        $querystring = CCGetQueryString("QueryString", array("o", "licensefile_guid", "tab"));
        foreach ($licenseFiles as $licenseFile) {
            $licensefile_guid = $licenseFile["guid"];
            $linkdelete = "";
            if (CCGetGroupID() == "4") {
                //Moved linkdelete to code because issues displaying panels inside custom template blocks
                $linkdelete = "<a href='licensing_customers.php?o=dellicense&licensefile_guid={$licensefile_guid}&tab=licenselist&{$querystring}' class='dellicense' ><li class='icon-trash bigger-150 red'></li></a>";
            }
            $Tpl->setvar("linkdelete", $linkdelete);
            $Tpl->setvar("licensefile_guid", $licensefile_guid);
            $Tpl->setvar("getparams", "&" . $querystring);
            $Tpl->Parse("licensefile_list", true);
        }
    }
    // -------------------------
    //End Custom Code
    //Close licensing_customerscontent_BeforeShow @1-0B488567
    return $licensing_customerscontent_BeforeShow;
}
Ejemplo n.º 22
0
 function Insert()
 {
     global $CCSLocales;
     global $DefaultDateFormat;
     $this->CmdExecution = true;
     $this->cp["created_by"] = new clsSQLParameter("expr695", ccsText, "", "", CCGetUserLogin(), "", false, $this->ErrorBlock);
     $this->cp["updated_by"] = new clsSQLParameter("expr696", ccsText, "", "", CCGetUserLogin(), "", false, $this->ErrorBlock);
     $this->cp["registration_date"] = new clsSQLParameter("ctrlregistration_date", ccsText, "", "", $this->registration_date->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["t_customer_order_id"] = new clsSQLParameter("ctrlt_customer_order_id", ccsFloat, "", "", $this->t_customer_order_id->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["p_region_id_kelurahan"] = new clsSQLParameter("ctrlp_region_id_kelurahan", ccsFloat, "", "", $this->p_region_id_kelurahan->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["p_region_id_kecamatan"] = new clsSQLParameter("ctrlp_region_id_kecamatan", ccsFloat, "", "", $this->p_region_id_kecamatan->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["p_region_id"] = new clsSQLParameter("ctrlp_region_id", ccsFloat, "", "", $this->p_region_id->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["p_region_id_kel_owner"] = new clsSQLParameter("ctrlp_region_id_kel_owner", ccsFloat, "", "", $this->p_region_id_kel_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["p_region_id_kec_owner"] = new clsSQLParameter("ctrlp_region_id_kec_owner", ccsFloat, "", "", $this->p_region_id_kec_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["p_region_id_owner"] = new clsSQLParameter("ctrlp_region_id_owner", ccsFloat, "", "", $this->p_region_id_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["company_name"] = new clsSQLParameter("ctrlcompany_name", ccsText, "", "", $this->company_name->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["address_name"] = new clsSQLParameter("ctrladdress_name", ccsText, "", "", $this->address_name->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["p_job_position_id"] = new clsSQLParameter("ctrlp_job_position_id", ccsFloat, "", "", $this->p_job_position_id->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["company_brand"] = new clsSQLParameter("ctrlcompany_brand", ccsText, "", "", $this->company_brand->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["address_no"] = new clsSQLParameter("ctrladdress_no", ccsText, "", "", $this->address_no->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["address_rt"] = new clsSQLParameter("ctrladdress_rt", ccsText, "", "", $this->address_rt->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["address_rw"] = new clsSQLParameter("ctrladdress_rw", ccsText, "", "", $this->address_rw->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["address_no_owner"] = new clsSQLParameter("ctrladdress_no_owner", ccsText, "", "", $this->address_no_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["address_rt_owner"] = new clsSQLParameter("ctrladdress_rt_owner", ccsText, "", "", $this->address_rt_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["address_rw_owner"] = new clsSQLParameter("ctrladdress_rw_owner", ccsText, "", "", $this->address_rw_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["phone_no"] = new clsSQLParameter("ctrlphone_no", ccsText, "", "", $this->phone_no->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["fax_no"] = new clsSQLParameter("ctrlfax_no", ccsText, "", "", $this->fax_no->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["zip_code"] = new clsSQLParameter("ctrlzip_code", ccsText, "", "", $this->zip_code->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["phone_no_owner"] = new clsSQLParameter("ctrlphone_no_owner", ccsText, "", "", $this->phone_no_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["company_owner"] = new clsSQLParameter("ctrlcompany_owner", ccsText, "", "", $this->company_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["mobile_no_owner"] = new clsSQLParameter("ctrlmobile_no_owner", ccsText, "", "", $this->mobile_no_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["fax_no_owner"] = new clsSQLParameter("ctrlfax_no_owner", ccsText, "", "", $this->fax_no_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["zip_code_owner"] = new clsSQLParameter("ctrlzip_code_owner", ccsText, "", "", $this->zip_code_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["mobile_no"] = new clsSQLParameter("ctrlmobile_no", ccsText, "", "", $this->mobile_no->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["address_name_owner"] = new clsSQLParameter("ctrladdress_name_owner", ccsText, "", "", $this->address_name_owner->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["t_vat_registration_id"] = new clsSQLParameter("ctrlt_vat_registration_id", ccsFloat, "", "", $this->t_vat_registration_id->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["email"] = new clsSQLParameter("ctrlemail", ccsText, "", "", $this->email->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["company_additional_addr"] = new clsSQLParameter("ctrlcompany_additional_addr", ccsText, "", "", $this->company_additional_addr->GetValue(true), "", false, $this->ErrorBlock);
     $this->cp["p_hotel_grade_id"] = new clsSQLParameter("ctrlp_hotel_grade_id", ccsFloat, "", "", $this->p_hotel_grade_id->GetValue(true), 0, false, $this->ErrorBlock);
     $this->cp["p_rest_service_type_id"] = new clsSQLParameter("ctrlp_rest_service_type_id", ccsFloat, "", "", $this->p_rest_service_type_id->GetValue(true), 0, false, $this->ErrorBlock);
     $this->cp["p_entertaintment_type_id"] = new clsSQLParameter("ctrlp_entertaintment_type_id", ccsFloat, "", "", $this->p_entertaintment_type_id->GetValue(true), 0, false, $this->ErrorBlock);
     $this->cp["p_parking_classification_id"] = new clsSQLParameter("ctrlp_parking_classification_id", ccsFloat, "", "", $this->p_parking_classification_id->GetValue(true), 0, false, $this->ErrorBlock);
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildInsert", $this->Parent);
     if (!is_null($this->cp["created_by"]->GetValue()) and !strlen($this->cp["created_by"]->GetText()) and !is_bool($this->cp["created_by"]->GetValue())) {
         $this->cp["created_by"]->SetValue(CCGetUserLogin());
     }
     if (!is_null($this->cp["updated_by"]->GetValue()) and !strlen($this->cp["updated_by"]->GetText()) and !is_bool($this->cp["updated_by"]->GetValue())) {
         $this->cp["updated_by"]->SetValue(CCGetUserLogin());
     }
     if (!is_null($this->cp["registration_date"]->GetValue()) and !strlen($this->cp["registration_date"]->GetText()) and !is_bool($this->cp["registration_date"]->GetValue())) {
         $this->cp["registration_date"]->SetValue($this->registration_date->GetValue(true));
     }
     if (!is_null($this->cp["t_customer_order_id"]->GetValue()) and !strlen($this->cp["t_customer_order_id"]->GetText()) and !is_bool($this->cp["t_customer_order_id"]->GetValue())) {
         $this->cp["t_customer_order_id"]->SetValue($this->t_customer_order_id->GetValue(true));
     }
     if (!is_null($this->cp["p_region_id_kelurahan"]->GetValue()) and !strlen($this->cp["p_region_id_kelurahan"]->GetText()) and !is_bool($this->cp["p_region_id_kelurahan"]->GetValue())) {
         $this->cp["p_region_id_kelurahan"]->SetValue($this->p_region_id_kelurahan->GetValue(true));
     }
     if (!is_null($this->cp["p_region_id_kecamatan"]->GetValue()) and !strlen($this->cp["p_region_id_kecamatan"]->GetText()) and !is_bool($this->cp["p_region_id_kecamatan"]->GetValue())) {
         $this->cp["p_region_id_kecamatan"]->SetValue($this->p_region_id_kecamatan->GetValue(true));
     }
     if (!is_null($this->cp["p_region_id"]->GetValue()) and !strlen($this->cp["p_region_id"]->GetText()) and !is_bool($this->cp["p_region_id"]->GetValue())) {
         $this->cp["p_region_id"]->SetValue($this->p_region_id->GetValue(true));
     }
     if (!is_null($this->cp["p_region_id_kel_owner"]->GetValue()) and !strlen($this->cp["p_region_id_kel_owner"]->GetText()) and !is_bool($this->cp["p_region_id_kel_owner"]->GetValue())) {
         $this->cp["p_region_id_kel_owner"]->SetValue($this->p_region_id_kel_owner->GetValue(true));
     }
     if (!is_null($this->cp["p_region_id_kec_owner"]->GetValue()) and !strlen($this->cp["p_region_id_kec_owner"]->GetText()) and !is_bool($this->cp["p_region_id_kec_owner"]->GetValue())) {
         $this->cp["p_region_id_kec_owner"]->SetValue($this->p_region_id_kec_owner->GetValue(true));
     }
     if (!is_null($this->cp["p_region_id_owner"]->GetValue()) and !strlen($this->cp["p_region_id_owner"]->GetText()) and !is_bool($this->cp["p_region_id_owner"]->GetValue())) {
         $this->cp["p_region_id_owner"]->SetValue($this->p_region_id_owner->GetValue(true));
     }
     if (!is_null($this->cp["company_name"]->GetValue()) and !strlen($this->cp["company_name"]->GetText()) and !is_bool($this->cp["company_name"]->GetValue())) {
         $this->cp["company_name"]->SetValue($this->company_name->GetValue(true));
     }
     if (!is_null($this->cp["address_name"]->GetValue()) and !strlen($this->cp["address_name"]->GetText()) and !is_bool($this->cp["address_name"]->GetValue())) {
         $this->cp["address_name"]->SetValue($this->address_name->GetValue(true));
     }
     if (!is_null($this->cp["p_job_position_id"]->GetValue()) and !strlen($this->cp["p_job_position_id"]->GetText()) and !is_bool($this->cp["p_job_position_id"]->GetValue())) {
         $this->cp["p_job_position_id"]->SetValue($this->p_job_position_id->GetValue(true));
     }
     if (!is_null($this->cp["company_brand"]->GetValue()) and !strlen($this->cp["company_brand"]->GetText()) and !is_bool($this->cp["company_brand"]->GetValue())) {
         $this->cp["company_brand"]->SetValue($this->company_brand->GetValue(true));
     }
     if (!is_null($this->cp["address_no"]->GetValue()) and !strlen($this->cp["address_no"]->GetText()) and !is_bool($this->cp["address_no"]->GetValue())) {
         $this->cp["address_no"]->SetValue($this->address_no->GetValue(true));
     }
     if (!is_null($this->cp["address_rt"]->GetValue()) and !strlen($this->cp["address_rt"]->GetText()) and !is_bool($this->cp["address_rt"]->GetValue())) {
         $this->cp["address_rt"]->SetValue($this->address_rt->GetValue(true));
     }
     if (!is_null($this->cp["address_rw"]->GetValue()) and !strlen($this->cp["address_rw"]->GetText()) and !is_bool($this->cp["address_rw"]->GetValue())) {
         $this->cp["address_rw"]->SetValue($this->address_rw->GetValue(true));
     }
     if (!is_null($this->cp["address_no_owner"]->GetValue()) and !strlen($this->cp["address_no_owner"]->GetText()) and !is_bool($this->cp["address_no_owner"]->GetValue())) {
         $this->cp["address_no_owner"]->SetValue($this->address_no_owner->GetValue(true));
     }
     if (!is_null($this->cp["address_rt_owner"]->GetValue()) and !strlen($this->cp["address_rt_owner"]->GetText()) and !is_bool($this->cp["address_rt_owner"]->GetValue())) {
         $this->cp["address_rt_owner"]->SetValue($this->address_rt_owner->GetValue(true));
     }
     if (!is_null($this->cp["address_rw_owner"]->GetValue()) and !strlen($this->cp["address_rw_owner"]->GetText()) and !is_bool($this->cp["address_rw_owner"]->GetValue())) {
         $this->cp["address_rw_owner"]->SetValue($this->address_rw_owner->GetValue(true));
     }
     if (!is_null($this->cp["phone_no"]->GetValue()) and !strlen($this->cp["phone_no"]->GetText()) and !is_bool($this->cp["phone_no"]->GetValue())) {
         $this->cp["phone_no"]->SetValue($this->phone_no->GetValue(true));
     }
     if (!is_null($this->cp["fax_no"]->GetValue()) and !strlen($this->cp["fax_no"]->GetText()) and !is_bool($this->cp["fax_no"]->GetValue())) {
         $this->cp["fax_no"]->SetValue($this->fax_no->GetValue(true));
     }
     if (!is_null($this->cp["zip_code"]->GetValue()) and !strlen($this->cp["zip_code"]->GetText()) and !is_bool($this->cp["zip_code"]->GetValue())) {
         $this->cp["zip_code"]->SetValue($this->zip_code->GetValue(true));
     }
     if (!is_null($this->cp["phone_no_owner"]->GetValue()) and !strlen($this->cp["phone_no_owner"]->GetText()) and !is_bool($this->cp["phone_no_owner"]->GetValue())) {
         $this->cp["phone_no_owner"]->SetValue($this->phone_no_owner->GetValue(true));
     }
     if (!is_null($this->cp["company_owner"]->GetValue()) and !strlen($this->cp["company_owner"]->GetText()) and !is_bool($this->cp["company_owner"]->GetValue())) {
         $this->cp["company_owner"]->SetValue($this->company_owner->GetValue(true));
     }
     if (!is_null($this->cp["mobile_no_owner"]->GetValue()) and !strlen($this->cp["mobile_no_owner"]->GetText()) and !is_bool($this->cp["mobile_no_owner"]->GetValue())) {
         $this->cp["mobile_no_owner"]->SetValue($this->mobile_no_owner->GetValue(true));
     }
     if (!is_null($this->cp["fax_no_owner"]->GetValue()) and !strlen($this->cp["fax_no_owner"]->GetText()) and !is_bool($this->cp["fax_no_owner"]->GetValue())) {
         $this->cp["fax_no_owner"]->SetValue($this->fax_no_owner->GetValue(true));
     }
     if (!is_null($this->cp["zip_code_owner"]->GetValue()) and !strlen($this->cp["zip_code_owner"]->GetText()) and !is_bool($this->cp["zip_code_owner"]->GetValue())) {
         $this->cp["zip_code_owner"]->SetValue($this->zip_code_owner->GetValue(true));
     }
     if (!is_null($this->cp["mobile_no"]->GetValue()) and !strlen($this->cp["mobile_no"]->GetText()) and !is_bool($this->cp["mobile_no"]->GetValue())) {
         $this->cp["mobile_no"]->SetValue($this->mobile_no->GetValue(true));
     }
     if (!is_null($this->cp["address_name_owner"]->GetValue()) and !strlen($this->cp["address_name_owner"]->GetText()) and !is_bool($this->cp["address_name_owner"]->GetValue())) {
         $this->cp["address_name_owner"]->SetValue($this->address_name_owner->GetValue(true));
     }
     if (!is_null($this->cp["t_vat_registration_id"]->GetValue()) and !strlen($this->cp["t_vat_registration_id"]->GetText()) and !is_bool($this->cp["t_vat_registration_id"]->GetValue())) {
         $this->cp["t_vat_registration_id"]->SetValue($this->t_vat_registration_id->GetValue(true));
     }
     if (!is_null($this->cp["email"]->GetValue()) and !strlen($this->cp["email"]->GetText()) and !is_bool($this->cp["email"]->GetValue())) {
         $this->cp["email"]->SetValue($this->email->GetValue(true));
     }
     if (!is_null($this->cp["company_additional_addr"]->GetValue()) and !strlen($this->cp["company_additional_addr"]->GetText()) and !is_bool($this->cp["company_additional_addr"]->GetValue())) {
         $this->cp["company_additional_addr"]->SetValue($this->company_additional_addr->GetValue(true));
     }
     if (!is_null($this->cp["p_hotel_grade_id"]->GetValue()) and !strlen($this->cp["p_hotel_grade_id"]->GetText()) and !is_bool($this->cp["p_hotel_grade_id"]->GetValue())) {
         $this->cp["p_hotel_grade_id"]->SetValue($this->p_hotel_grade_id->GetValue(true));
     }
     if (!strlen($this->cp["p_hotel_grade_id"]->GetText()) and !is_bool($this->cp["p_hotel_grade_id"]->GetValue(true))) {
         $this->cp["p_hotel_grade_id"]->SetText(0);
     }
     if (!is_null($this->cp["p_rest_service_type_id"]->GetValue()) and !strlen($this->cp["p_rest_service_type_id"]->GetText()) and !is_bool($this->cp["p_rest_service_type_id"]->GetValue())) {
         $this->cp["p_rest_service_type_id"]->SetValue($this->p_rest_service_type_id->GetValue(true));
     }
     if (!strlen($this->cp["p_rest_service_type_id"]->GetText()) and !is_bool($this->cp["p_rest_service_type_id"]->GetValue(true))) {
         $this->cp["p_rest_service_type_id"]->SetText(0);
     }
     if (!is_null($this->cp["p_entertaintment_type_id"]->GetValue()) and !strlen($this->cp["p_entertaintment_type_id"]->GetText()) and !is_bool($this->cp["p_entertaintment_type_id"]->GetValue())) {
         $this->cp["p_entertaintment_type_id"]->SetValue($this->p_entertaintment_type_id->GetValue(true));
     }
     if (!strlen($this->cp["p_entertaintment_type_id"]->GetText()) and !is_bool($this->cp["p_entertaintment_type_id"]->GetValue(true))) {
         $this->cp["p_entertaintment_type_id"]->SetText(0);
     }
     if (!is_null($this->cp["p_parking_classification_id"]->GetValue()) and !strlen($this->cp["p_parking_classification_id"]->GetText()) and !is_bool($this->cp["p_parking_classification_id"]->GetValue())) {
         $this->cp["p_parking_classification_id"]->SetValue($this->p_parking_classification_id->GetValue(true));
     }
     if (!strlen($this->cp["p_parking_classification_id"]->GetText()) and !is_bool($this->cp["p_parking_classification_id"]->GetValue(true))) {
         $this->cp["p_parking_classification_id"]->SetText(0);
     }
     $this->SQL = "INSERT INTO t_vat_registration(t_vat_registration_id, created_by, updated_by, creation_date, updated_date, registration_date, \n" . "t_customer_order_id, p_region_id_kelurahan, p_region_id_kecamatan, p_region_id, \n" . "p_region_id_kel_owner, p_region_id_kec_owner, p_region_id_owner, company_name, address_name, \n" . "p_job_position_id, company_brand, address_no, address_rt, address_rw, address_no_owner, address_rt_owner, \n" . "address_rw_owner, phone_no, fax_no, zip_code, phone_no_owner, company_owner, mobile_no_owner, \n" . "fax_no_owner, zip_code_owner, mobile_no, address_name_owner, email, company_additional_addr, p_hotel_grade_id, p_rest_service_type_id, p_entertaintment_type_id, p_parking_classification_id) \n" . "VALUES(generate_id('sikp','t_vat_registration','t_vat_registration_id'), '" . $this->SQLValue($this->cp["created_by"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["updated_by"]->GetDBValue(), ccsText) . "', sysdate, sysdate, to_date('" . $this->SQLValue($this->cp["registration_date"]->GetDBValue(), ccsText) . "','DD-MON-YYYY HH24:MI:SS'), \n" . "" . $this->SQLValue($this->cp["t_customer_order_id"]->GetDBValue(), ccsFloat) . ", " . $this->SQLValue($this->cp["p_region_id_kelurahan"]->GetDBValue(), ccsFloat) . ", " . $this->SQLValue($this->cp["p_region_id_kecamatan"]->GetDBValue(), ccsFloat) . ", " . $this->SQLValue($this->cp["p_region_id"]->GetDBValue(), ccsFloat) . ", \n" . "" . $this->SQLValue($this->cp["p_region_id_kel_owner"]->GetDBValue(), ccsFloat) . ", " . $this->SQLValue($this->cp["p_region_id_kec_owner"]->GetDBValue(), ccsFloat) . ", " . $this->SQLValue($this->cp["p_region_id_owner"]->GetDBValue(), ccsFloat) . ", '" . $this->SQLValue($this->cp["company_name"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["address_name"]->GetDBValue(), ccsText) . "', \n" . "" . $this->SQLValue($this->cp["p_job_position_id"]->GetDBValue(), ccsFloat) . ", '" . $this->SQLValue($this->cp["company_brand"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["address_no"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["address_rt"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["address_rw"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["address_no_owner"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["address_rt_owner"]->GetDBValue(), ccsText) . "', \n" . "'" . $this->SQLValue($this->cp["address_rw_owner"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["phone_no"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["fax_no"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["zip_code"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["phone_no_owner"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["company_owner"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["mobile_no_owner"]->GetDBValue(), ccsText) . "', \n" . "'" . $this->SQLValue($this->cp["fax_no_owner"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["zip_code_owner"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["mobile_no"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["address_name_owner"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["email"]->GetDBValue(), ccsText) . "', '" . $this->SQLValue($this->cp["company_additional_addr"]->GetDBValue(), ccsText) . "', \n" . "decode(" . $this->SQLValue($this->cp["p_hotel_grade_id"]->GetDBValue(), ccsFloat) . ",0,null," . $this->SQLValue($this->cp["p_hotel_grade_id"]->GetDBValue(), ccsFloat) . "), decode(" . $this->SQLValue($this->cp["p_rest_service_type_id"]->GetDBValue(), ccsFloat) . ",0,null," . $this->SQLValue($this->cp["p_rest_service_type_id"]->GetDBValue(), ccsFloat) . "), decode(" . $this->SQLValue($this->cp["p_entertaintment_type_id"]->GetDBValue(), ccsFloat) . ",0,null," . $this->SQLValue($this->cp["p_entertaintment_type_id"]->GetDBValue(), ccsFloat) . "), decode(" . $this->SQLValue($this->cp["p_parking_classification_id"]->GetDBValue(), ccsFloat) . ",0,null," . $this->SQLValue($this->cp["p_parking_classification_id"]->GetDBValue(), ccsFloat) . "))";
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteInsert", $this->Parent);
     $idds = "select LPAD(generate_id('sikp','t_vat_registration','t_vat_registration_id'),10,'0')as idd from dual";
     $this->query($idds);
     while ($this->next_record()) {
         $codeDB = $this->f("idd");
     }
     $code = CCGetFromPost("validation_code", "");
     if ($code == $codeDB) {
         if ($this->Errors->Count() == 0 && $this->CmdExecution) {
             $this->query($this->SQL);
             $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteInsert", $this->Parent);
         }
     } else {
         if (empty($code)) {
             $this->Errors->addError("Kode Verifikasi Belum Diisi");
         } else {
             $this->Errors->addError("Kode Verifikasi Salah");
         }
     }
 }