Esempio n. 1
0
 function printBusinessPermit(&$transObj, $additional_info = NULL)
 {
     $permit_type = $transObj->getPermitType();
     $permit = $transObj->getPermit();
     $owner = $transObj->getOwnerInfo();
     $clsBus = new EBPLSEnterprise($this->m_dbLink, false);
     $clsBus->view($transObj->getData(TRANS_BUSINESS_ID));
     // header
     $header_template = $this->m_strTemplatesPath . "bus/header.html";
     // footer
     $footer_template = $this->m_strTemplatesPath . "bus/footer.html";
     // body
     // item 1 -> onwer info
     $infoPath = $this->m_strTemplatesPath . "bus/business_info.html";
     $strContent = constructTemplate($infoPath, $owner->getData());
     // item 2 -> business info
     $strContent = constructTemplate($strContent, $clsBus->getData(), false);
     // item 3 -> line of business
     $strLOBTemplatePath = $this->m_strTemplatesPath . "bus/line_of_business_record.html";
     $arrLOB = $transObj->getLineOfBusiness();
     for ($i = 0; $i < count($arrLOB); $i++) {
         $arrLOB[$i]->data_elems[TRANS_BUSNATURE_CAPITAL_INVESTMENT] = number_format($arrLOB[$i]->getData(TRANS_BUSNATURE_CAPITAL_INVESTMENT), 2);
         $arrLOB[$i]->data_elems[TRANS_BUSNATURE_LAST_GROSS] = number_format($arrLOB[$i]->getData(TRANS_BUSNATURE_LAST_GROSS), 2);
         $tmpRec = constructTemplate($strLOBTemplatePath, $arrLOB[$i]->getData()) . "\n";
         $arrLOBRec[] = $tmpRec;
     }
     // ctc info
     // payables taxes/fees
     $strFeesTemplatePath = $this->m_strTemplatesPath . "bus/fees_record.html";
     $arrFees = $transObj->getFeesList();
     $total_fees = 0;
     for ($i = 0; $i < count($arrFees); $i++) {
         $total_fees += $arrFees[$i]->getData(TF_TAX_TOTAL_AMOUNT_DUE);
         $arrFees[$i]->data_elems[TF_TAX_TOTAL_AMOUNT_DUE] = number_format($arrFees[$i]->getData(TF_TAX_TOTAL_AMOUNT_DUE), 2);
         $tmpRec = constructTemplate($strFeesTemplatePath, $arrFees[$i]->getData()) . "\n";
         $arrFeesData[] = $tmpRec;
     }
     // create template header
     $strHeader = constructTemplate($header_template, $additional_info);
     // create template footer
     $strFooter = constructTemplate($footer_template, $additional_info);
     $strContent = str_replace("[REPORTS_HEADER]", $strHeader, $strContent);
     $strContent = str_replace("[REPORTS_FOOTER]", $strFooter, $strContent);
     $strContent = str_replace("[RECORDS_LOB]", join("\n", $arrLOBRec), $strContent);
     $strContent = str_replace("[RECORDS_FEES]", join("\n", $arrFeesData), $strContent);
     $strContent = str_replace("[TOTAL_FEES]", number_format($total_fees, 2), $strContent);
     echo $strContent;
 }
Esempio n. 2
0
        $HTTP_POST_VARS["ctc_last_name"] = $clsOwner->getData(OWNER_LAST_NAME);
        $HTTP_POST_VARS["ctc_tin_no"] = $clsOwner->getData(OWNER_TIN_NO);
        $HTTP_POST_VARS["ctc_birth_date"] = $clsOwner->getData(OWNER_BIRTH_DATE);
        $HTTP_POST_VARS["ctc_civil_status"] = strtoupper($clsOwner->getData(OWNER_CIVIL_STATUS));
        $HTTP_POST_VARS["ctc_citizenship"] = $clsOwner->getData(OWNER_CITIZENSHIP);
        $HTTP_POST_VARS["ctc_gender"] = $clsOwner->getData(OWNER_GENDER);
        $HTTP_POST_VARS["ctc_address"] = $clsOwner->getData(OWNER_HOUSE_NO) . " " . $clsOwner->getData(OWNER_STREET);
        //$HTTP_POST_VARS["ctc_icr_no"] = $clsOwner->getData(OWNER_ICR_NO);
        $HTTP_POST_VARS["ctc_owner_id"] = $clsOwner->getData(OWNER_ID);
        $ctc_type = "INDIVIDUAL";
        if (intval($ctc_business_id)) {
            $ctc_type = "BUSINESS";
            // load business enterprise info
            $clsBus = new EBPLSEnterprise($dbLink);
            $clsBus->view($ctc_business_id);
            $HTTP_POST_VARS["ctc_company"] = $clsBus->getData(BUSINESS_NAME);
            $HTTP_POST_VARS["ctc_tin_no"] = $clsBus->getData(BUSINESS_TIN_REG_NO);
            $HTTP_POST_VARS["ctc_place_of_incorporation"] = $clsBus->getData(BUSINESS_TIN_REG_NO);
            $HTTP_POST_VARS["ctc_company_address "] = $clsBus->getData(BUSINESS_LOT_NO) . " " . $clsBus->getData(BUSINESS_STREET);
            $HTTP_POST_VARS["ctc_place_issued"] = $clsBus->getData(BUSINESS_TIN_REG_NO);
            $HTTP_POST_VARS["ctc_date_issued"] = $clsBus->getData(BUSINESS_DATE_ESTABLISHED);
            $HTTP_POST_VARS["ctc_business_id"] = $clsBus->getData(BUSINESS_ID);
        }
    }
}
?>
<div align="CENTER">
<!---// start of the table //-->
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr><td align="center" valign="center" class='header'>Community Tax Certificate </td></tr>
<tr><td align="center" valign="center" class='normal' height=10>&nbsp;</td></tr>
Esempio n. 3
0
$owner_id = trim($owner_id);
$method_of_application = trim($method_of_application);
$is_new = true;
//--- check first the method method_of_application NEW
$submit_button_name = 'S U B M I T';
if (!strcasecmp($child_reload, 'reload')) {
    //log_err("refresh");
    //--- get the owner
    $clsOwner = new EBPLSOwner($dbLink, $debug);
    $clsOwner->view(trim($child_reload_owner_id));
    $owner_datarow = $clsOwner->getData();
    //--- get the business name
    if (strlen(trim($child_reload_permit_no)) > 0) {
        $clsEnterprise = new EBPLSEnterprise($dbLink, $debug);
        $permit_id = $clsEnterprise->view(trim($child_reload_permit_no));
        $datarow = $clsEnterprise->getData();
        //--- get the business_nature_list
        $business_nature_list = $clsEnterprise->getBusinessNatureList($datarow[BUSINESS_ID]);
    }
}
//--- chk the sublevels
/*if(   ! is_valid_sublevels(27) or ! is_valid_sublevels(28) )
 {
 	setUrlRedirect('index.php?part=999');
	
 } 
*/
?>
<link rel="stylesheet" href="stylesheets/default.css" type="text/css"/>
<script language='Javascript' src='javascripts/default.js'></script>
<script language='Javascript'>