本文整理汇总了PHP中AFS::selectRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP AFS::selectRecord方法的具体用法?PHP AFS::selectRecord怎么用?PHP AFS::selectRecord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AFS
的用法示例。
在下文中一共展示了AFS::selectRecord方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateTDHistory
function generateTDHistory($tdID)
{
$td = new TD();
$td->selectRecord($tdID);
$afsID = $td->getAfsID();
// echo("afsID=$afsID<br>");
$afs = new AFS();
$afs->selectRecord($afsID);
$odID = $afs->getOdID();
// echo("odID=$odID<br>");
$condition = sprintf(" WHERE presentODID='%s' ", fixQuotes($odID));
$odHistoryRecords = new ODHistoryRecords();
$odHistoryRecords->selectRecords($condition);
if (count($odHistoryRecords->arrayList) > 0) {
// echo("count>0<br>");
foreach ($odHistoryRecords->arrayList as $key => $odHistory) {
$previousODID = $odHistory->getPreviousODID();
$presentODID = $odHistory->getPresentODID();
$previousAFS = new AFS();
$previousAFS->selectRecord($afsID = "", $limit = "", $previousODID);
$previousAFSID = $previousAFS->getAfsID();
$previousTD = new TD();
$previousTD->selectRecord($tdID = "", $previousAFSID);
$previousTDID = $previousTD->getTdID();
$this->tdHistory[] = $previousTD;
$this->generateTDHistory($previousTDID);
}
} else {
//echo("count==0<br>");
return false;
}
}
示例2: Main
function Main()
{
$this->tpl->set_var("Session", $this->sess->url(""));
$this->formArray["mergeBasketArray"] = explode(",", $this->formArray["mergeBasketCSV"]);
if (is_array($this->formArray["mergeBasketArray"])) {
$this->tpl->set_block("rptsTemplate", "NoODList", "NoODListBlock");
$this->tpl->set_var("NoODListBlock", "");
$this->tpl->set_block("rptsTemplate", "ODList", "ODListBlock");
$this->tpl->set_var("totalInMergeBasket", count($this->formArray["mergeBasketArray"]));
foreach ($this->formArray["mergeBasketArray"] as $odID) {
$od = new OD();
$od->selectRecord($odID);
$owner = $od->owner;
$ownerStr = "";
if (is_array($owner->personArray)) {
foreach ($owner->personArray as $pKey => $pValue) {
$ownerArray[] = $pValue->getFullName();
}
}
if (is_array($owner->companyArray)) {
foreach ($owner->companyArray as $cKey => $cValue) {
$ownerArray[] = $cValue->getCompanyName();
}
}
if (is_object($od->locationAddress)) {
$this->tpl->set_var("locationAddress", $od->locationAddress->getFullAddress());
} else {
$this->tpl->set_var("locationAddress", "");
}
$this->tpl->set_var("landArea", number_format($od->getLandArea(), 2, '.', ','));
$this->tpl->set_var("odID", $od->getOdID());
if (is_array($ownerArray)) {
$this->tpl->set_var("ownerName", implode(",", $ownerArray));
} else {
$this->tpl->set_var("ownerName", "");
}
$afs = new AFS();
$afs->selectRecord("", "", $odID, "");
if (is_object($afs)) {
if ($afs->getPropertyIndexNumber() != "") {
$propertyIndexNumber = $afs->getPropertyIndexNumber();
} else {
$propertyIndexNumber = "";
}
}
$this->tpl->set_var("propertyIndexNumber", $propertyIndexNumber);
$this->tpl->parse("ODListBlock", "ODList", true);
unset($ownerArray);
}
} else {
$this->tpl->set_block("rptsTemplate", "ShowODList", "ShowODListBlock");
$this->tpl->set_var("ShowODListBlock", "");
$this->tpl->set_var("totalInMergeBasket", 0);
}
$this->setForm();
$this->tpl->parse("templatePage", "rptsTemplate");
$this->tpl->finish("templatePage");
$this->tpl->p("templatePage");
}
示例3: getAFS
function getAFS($afsID)
{
$afs = new AFS();
$afs->selectRecord($afsID);
if (!($domDoc = $afs->getDomDocument())) {
return false;
} else {
$xmlStr = $domDoc->dump_mem(true);
return $xmlStr;
}
}
示例4: getOdIDFromTdID
function getOdIDFromTdID($tdID)
{
$ret = false;
$td = new TD();
if ($td->selectRecord($tdID)) {
$afsID = $td->getAfsID();
if ($afs = new AFS()) {
$afs->selectRecord($afsID);
$odID = $afs->getOdID();
$ret = $odID;
}
}
return $ret;
}
示例5: getAFSDetails
function getAFSDetails($odID)
{
$AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
$this->formArray["afsID"] = $AFSEncode->getAFSID($odID);
if ($this->formArray["afsID"]) {
$afs = new AFS();
if ($afs->selectRecord($this->formArray["afsID"])) {
return $afs;
} else {
return false;
}
} else {
return false;
}
}
示例6: Main
function Main()
{
global $sess;
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($this->formArray["rptopID"]))) {
exit("xml failed");
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$rptop = new RPTOP();
$rptop->parseDomDocument($domDoc);
foreach ($rptop as $key => $value) {
switch ($key) {
case "owner":
//$RPTOPEncode = new SoapObject(NCCBIZ."RPTOPEncode.php", "urn:Object");
if (is_a($value, "Owner")) {
$this->formArray["ownerID"] = $rptop->owner->getOwnerID();
$xmlStr = $rptop->owner->domDocument->dump_mem(true);
if (!$xmlStr) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$this->displayOwnerList($domDoc);
}
}
} else {
$this->tpl->set_block("rptsTemplate", "PersonList", "PersonListBlock");
$this->tpl->set_var("PersonListBlock", "");
$this->tpl->set_block("rptsTemplate", "CompanyList", "CompanyListBlock");
$this->tpl->set_var("CompanyListBlock", "");
}
break;
case "taxableYear":
$this->tpl->set_var("taxableYear", $value);
$dueDate = $value;
break;
case "tdArray":
$this->tpl->set_block("rptsTemplate", "TDList", "TDListBlock");
$this->tpl->set_block("rptsTemplate", "JSTDList", "JSTDListBlock");
$this->tpl->set_block("rptsTemplate", "BacktaxTDTable", "BacktaxTDTableBlock");
$this->unpaidTDCount = 0;
if (count($value)) {
$this->tpl->set_block("rptsTemplate", "TDDBEmpty", "TDDBEmptyBlock");
$this->tpl->set_var("TDDBEmptyBlock", "");
foreach ($value as $tkey => $tvalue) {
$propertyType = $tvalue->getPropertyType();
$propertyID = $tvalue->getPropertyID();
$afsID = $tvalue->getAfsID();
$afs = new AFS();
$afs->selectRecord($afsID);
$listValues['propertyIndexNumber'] = $afs->getPropertyIndexNumber();
$assessedValue = $tvalue->getAssessedValue();
#echo("assessedValue=$assessedValue<br7>");
$listValues['taxBeginsWithTheYear'] = $tvalue->getTaxBeginsWithTheYear();
$listValues['tdNum'] = $tvalue->getTaxDeclarationNumber();
$tdID = $tvalue->getTdID();
$listValues['tdID'] = $tdID;
#echo("tdID=$tdID, dueDate=$dueDate<br>");
$dues = new Dues($tdID, $dueDate);
if (!$dues->create($tdID, $dueDate, $assessedValue)) {
$dues->setBasic($assessedValue);
$dues->setSEF($assessedValue);
# check if land is idle, if yes, set assessed value
# getIdleStatus -- temporary function
if ($dues->getIdleStatus() == 1) {
#echo("idle<br>");
$dues->setIdle($assessedValue);
}
}
// Refresh for amnesty and paymentPeriod
if ($this->formArray["formAction"] == "refresh") {
$amnesty = $this->formArray[amnesty];
$dues->setAmnesty($amnesty);
$paymentPeriod = $this->formArray[paymentPeriod];
$dues->setPaymentMode($paymentPeriod);
}
if ($dues->getAmnesty() == "Yes") {
$dues->resetPenalty();
$dues->computePenalty($paymentPeriod, "now");
}
$paymentPeriod = $dues->getPaymentMode();
$amnesty = $dues->getAmnesty();
$dues->store();
switch ($paymentPeriod) {
case 'Quarter':
$this->tpl->set_var("selectedQuarter", "selected");
$this->tpl->set_var("paymentPeriod", $paymentPeriod);
$this->tpl->set_var("installmentNumber", ceil(date("n") / 3));
$this->tpl->set_var("netDueFullAmount", number_format($dues->getTotalDue("Annual"), 2));
break;
default:
#Annual
$this->tpl->set_block("rptsTemplate", "QuarterNetDue", "QuarterNetDueBlock");
//.........这里部分代码省略.........
示例7: RunGeneralRevision
function RunGeneralRevision($odID, $userID = "", $transactionCode = "GR")
{
$newOdID = $this->CreateNewRPU_AFS_TD($odID, $userID, $transactionCode);
// archive old OD
$oldOD = new OD();
$oldOD->selectRecord($odID);
$oldOD->archive = "true";
$oldOD->modifiedBy = $userID;
$oldOD->updateRecord();
// using archiveRecord 'might' be faster
//$oldOD->archiveRecord($odID,"true",$userID);
// update new OD/AFS
$newAFS = new AFS();
$newAFS->selectRecord($afsID = "", $limit = "", $newOdID);
$newAFS->modifiedBy = $userID;
$newAFS->effectivity = date("Y") + 1;
$newAFS->updateRecord();
return $newOdID;
}
示例8: Land
echo "{$key} = {$value}<br>\n";
}
echo "TD2 values<br>\n";
foreach ($td2 as $key => $value) {
echo "{$key} = {$value}<br>\n";
}
$propertyType = $td1->propertyType;
$property1 = new Land();
$property1->selectRecord($td1->propertyID);
echo "property1 values<br>\n";
foreach ($property1 as $key => $value) {
echo "{$key} = {$value}<br>\n";
}
$afsID = $property1->getAfsID();
$afs = new AFS();
$afs->selectRecord($afsID);
echo "AFS values<br>\n";
foreach ($afs as $key => $value) {
echo "{$key} = {$value}<br>\n";
}
$tdNum = $td1->getTaxDeclarationNumber();
$taxDue = new Dues();
$taxDue->create($tdNum, "2002-01-01");
echo "taxDue values<br>\n";
foreach ($taxDue as $key => $value) {
echo "{$key} = {$value}<br>\n";
}
$dueDate = $taxDue->getDueDate();
$dueTime = strtotime($dueDate);
echo "TaxDue date {$dueDate} and time {$dueTime} <br>\n";
echo "End test <br>\n";
示例9: getTDArrayFromCompany
function getTDArrayFromCompany($companyID)
{
$this->setDB();
$sql = sprintf("SELECT DISTINCT(Owner.odID) as odID" . " FROM Owner,OwnerCompany " . " WHERE " . " Owner.ownerID = OwnerCompany.ownerID AND " . " OwnerCompany.companyID = '%s' ", $companyID);
$this->db->query($sql);
while ($this->db->next_record()) {
$od = new OD();
if ($od->selectRecord($this->db->f("odID"))) {
$this->ODArray[] = $od;
$afs = new AFS();
if ($afs->selectRecord("", "", $od->getOdID(), "")) {
$td = new TD();
if ($td->selectRecord("", $afs->getAfsID(), "", "", "")) {
$tdArray[] = $td;
}
}
}
}
if (!is_array($tdArray)) {
$tdArray = false;
}
return $tdArray;
}
示例10: getTDIDArrayFromParentTDID
function getTDIDArrayFromParentTDID($presentTDID)
{
$presentTD = new TD();
$presentTD->selectRecord($presentTDID);
$presentAfsID = $presentTD->getAfsID();
$presentAFS = new AFS();
$presentAFS->selectRecord($presentAFSID);
$presentODID = $presentAFS->getOdID();
$odHistoryRecords = new ODHistoryRecords();
$odHistoryRecords->selectPrecOD($presentODID);
if (is_array($odHistoryRecords->arrayList)) {
foreach ($odHistoryRecords as $odID) {
$afs = new AFS();
$afs->selectRecord("", "", $odID);
$afsID = $afs->getAfsID();
$td = new TD();
$td->selectRecord("", $afsID);
$tdID = $td->getTdID();
$tdIDArray[] = $tdID;
}
if (is_array($tdIDArray)) {
return $tdIDArray;
}
}
return false;
}
示例11: searchRecords
function searchRecords($searchKey, $fields, $limit = "")
{
$condition = "where (";
foreach ($fields as $key => $value) {
if ($key == 0) {
$condition = $condition . $value . " like '%" . $searchKey . "%'";
} else {
$condition = $condition . " or " . $value . " like '%" . $searchKey . "%' ";
}
}
// figure out $sql FOR AFS;
// $sql for OD
$sql = "SELECT " . LOCATION_TABLE . ".odID as odID\r\n FROM " . LOCATION_TABLE . "\r\n LEFT JOIN " . LOCATIONADDRESS_TABLE . "\r\n ON " . LOCATION_TABLE . ".locationAddressID=" . LOCATIONADDRESS_TABLE . ".locationAddressID\r\n LEFT JOIN " . BARANGAY_TABLE . "\r\n ON " . BARANGAY_TABLE . ".barangayID=" . LOCATIONADDRESS_TABLE . ".barangayID ";
$sql = $sql . $condition . ") " . $limit;
$this->setDB();
$this->db->query($sql);
while ($this->db->next_record()) {
$afs = new AFS();
$afs->selectRecord($this->db->f("afsID"));
$this->arrayList[] = $od;
}
if (count($this->arrayList) > 0) {
$this->setDomDocument();
return true;
} else {
return false;
}
}
示例12: displayPostingSummary
function displayPostingSummary($afs)
{
// previous
$presentODID = $afs->odID;
$condition = sprintf("WHERE presentODID='%s'", fixQuotes($presentODID));
$odHistoryRecords = new ODHistoryRecords();
if ($odHistoryRecords->selectRecords($condition)) {
$odHistory = $odHistoryRecords->arrayList[0];
$previousODID = $odHistory->previousODID;
$previousAFS = new AFS();
if ($previousAFS->selectRecord("", "", $previousODID, "")) {
$this->formArray["previous1"] = $previousAFS->propertyIndexNumber;
$this->formArray["previous2"] = $previousAFS->arpNumber;
$this->formArray["prevPIN"] = $previousAFS->propertyIndexNumber;
$this->formArray["prevTD"] = $previousAFS->arpNumber;
}
}
// present
$this->formArray["present1"] = $afs->propertyIndexNumber;
$this->formArray["present2"] = $afs->arpNumber;
$this->formArray["presPIN"] = $afs->propertyIndexNumber;
$this->formArray["presTD"] = $afs->arpNumber;
}
示例13: Main
//.........这里部分代码省略.........
$this->formArray["propertyType"] = "Machineries";
$this->displayMachineries($machineriesList);
$this->hideProperty('Land', 'land');
$this->hideProperty('PlantsTrees', 'plantsTrees');
$this->hideProperty('ImprovementsBuildings', 'improvementsBuildings');
} else {
$hideTD = true;
$this->displayLandPlantsTrees($landList, $plantsTreesList);
$this->displayImprovementsBuildingsMachineries($improvementsBuildingsList, $machineriesList);
$this->formArray["landTotalMarketValue"] = 0;
$this->formArray["landTotalAssessedValue"] = 0;
$this->formArray["plantTotalMarketValue"] = 0;
$this->formArray["plantTotalAssessedValue"] = 0;
$this->formArray["bldgTotalMarketValue"] = 0;
$this->formArray["bldgTotalAssessedValue"] = 0;
$this->formArray["machTotalMarketValue"] = 0;
$this->formArray["machTotalAssessedValue"] = 0;
}
}
}
}
if ($hideTD == false) {
// Display TD
$this->displayTD($afs->afsID);
} else {
// Hide TD
$this->tpl->set_block("rptsTemplate", "DeclarationOfProperty", "DeclarationOfPropertyBlock");
$this->tpl->set_var("DeclarationOfPropertyBlock", "");
}
$ODDetails = new SoapObject(NCCBIZ . "ODDetails.php", "urn:Object");
if (!($xmlStr = $ODDetails->getOD($this->formArray["odID"]))) {
exit("xml failed");
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$od = new OD();
$od->parseDomDocument($domDoc);
foreach ($od as $key => $value) {
if ($key == "locationAddress" && is_object($value)) {
foreach ($value as $lkey => $lvalue) {
$this->formArray[$lkey] = $lvalue;
}
} else {
$this->formArray[$key] = $value;
}
}
$ODEncode = new SoapObject(NCCBIZ . "ODEncode.php", "urn:Object");
$this->formArray["ownerID"] = $ODEncode->getOwnerID($this->formArray["odID"]);
$OwnerList = new SoapObject(NCCBIZ . "OwnerList.php", "urn:Object");
if (!($xmlStr = $OwnerList->getOwnerList($this->formArray["ownerID"]))) {
//exit(print_r($OwnerList));
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$this->displayOwnerList($domDoc);
}
}
}
}
}
}
$AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
$afs = new AFS();
$afs->selectRecord($this->formArray["afsID"]);
$afs->setAfsID($this->formArray["afsID"]);
$afs->setLandTotalMarketValue($this->formArray["landTotalMarketValue"]);
$afs->setLandTotalAssessedValue($this->formArray["landTotalAssessedValue"]);
$afs->setPlantTotalMarketValue($this->formArray["plantTotalMarketValue"]);
$afs->setPlantTotalPlantAssessedValue($this->formArray["plantTotalAssessedValue"]);
$afs->setBldgTotalMarketValue($this->formArray["bldgTotalMarketValue"]);
$afs->setBldgTotalAssessedValue($this->formArray["bldgTotalAssessedValue"]);
$afs->setMachTotalMarketValue($this->formArray["machTotalMarketValue"]);
$afs->setMachTotalAssessedValue($this->formArray["machTotalAssessedValue"]);
$afs->setTotalMarketValue($this->formArray["totalMarketValue"]);
$afs->setTotalAssessedValue($this->formArray["totalAssessedValue"]);
$afs->setDomDocument();
$doc = $afs->getDomDocument();
$xmlStr = $doc->dump_mem(true);
//print_r($AFSEncode);
//echo $xmlStr;
if (!($ret = $AFSEncode->updateAFS($xmlStr))) {
echo "ret=" . $ret;
}
//echo $ret;
$this->setForm();
$this->setPageDetailPerms();
$this->tpl->set_var("uname", $this->user["uname"]);
$this->tpl->set_var("today", date("F j, Y"));
$this->tpl->set_var("Session", $this->sess->url("") . $this->sess->add_query(array("afsID" => $this->formArray["afsID"])));
$this->tpl->parse("templatePage", "rptsTemplate");
$this->tpl->finish("templatePage");
$this->tpl->p("templatePage");
}
示例14: Main
function Main()
{
$this->formArray['currentDate'] = date("F d, Y");
$MunicipalityCityDetails = new SoapObject(NCCBIZ . "MunicipalityCityDetails.php", "urn:Object");
#test values
//$this->formArray['municipalityCityID']=1;
if (!($xmlStr = $MunicipalityCityDetails->getMunicipalityCityDetails($this->formArray['municipalityCityID']))) {
#echo($xmlStr);
exit("xml failed for municipality");
//header("Location: ".$this->sess->url("ViewSOA.php")."&status=2");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
echo "error xmlDoc";
} else {
$MunicipalityCity = new MunicipalityCity();
$MunicipalityCity->parseDomDocument($domDoc);
$this->formArray['municipality'] = $MunicipalityCity->getDescription();
}
}
if ($this->formArray['personID'] != "") {
$person = new Person();
$person->selectRecord($this->formArray['personID']);
$this->tpl->set_var(ownerName, $person->getFullName());
$this->tpl->set_var(ownerNo, $person->getTin());
$address = $person->addressArray[0];
if (is_object($address)) {
$this->tpl->set_var(ownerAddress, $address->getNumber() . " " . $address->getStreet() . " " . $address->getBarangay() . " " . $address->getDistrict() . " " . $address->getMunicipalitycity() . " " . $address->getProvince());
} else {
$this->tpl->set_var(ownerAddress, "");
}
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=" . $this->formArray['personID'];
$db->query($sql);
} else {
$company = new Company();
$company->selectRecord($this->formArray['companyID']);
$this->tpl->set_var(ownerName, $company->getCompanyName());
$this->tpl->set_var(ownerNo, $company->getCompanyID());
$address = $company->addressArray[0];
$this->tpl->set_var(ownerAddress, $address->getNumber() . " " . $address->getStreet() . " " . $address->getBarangay() . " " . $address->getDistrict() . " " . $address->getMunicipalitycity() . " " . $address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=" . $this->formArray['companyID'];
$db->query($sql);
}
$ypos = 325;
$this->tpl->set_block("rptsTemplate", "ROW", "RowBlk");
for ($i = 0; $db->next_record(); $i++) {
$rptopID = $db->f("rptopID");
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($rptopID))) {
// exit("xml failed for RPTOP");
header("Location: " . $this->sess->url("ViewSOA.php") . "&status=1");
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$rptop = new RPTOP();
$td = new TD();
$rptop->parseDomDocument($domDoc);
foreach ($rptop as $key => $value) {
$this->formArray['payableYear'] = $rptop->getTaxableYear();
$rptopID = $rptop->getRptopID();
if ($key == "tdArray") {
$tdCtr = 0;
if (count($value)) {
foreach ($value as $tkey => $tvalue) {
$td->selectRecord($tvalue->getTdID());
$assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
$propertyType = $td->getPropertyType();
$TaxDeclarationNumber = $td->getTaxDeclarationNumber();
$afsID = $td->getAfsID();
$afs = new AFS();
$afs->selectRecord($afsID);
$od = new OD();
$od->selectRecord($afs->getOdID());
$addr = $od->getLocationAddress();
if (count($addr)) {
$location = strtoupper($addr->getNumber() . " " . substr($addr->getBarangay(), 0, 4) . " " . substr($addr->getMunicipalityCity(), 0, 3) . " " . substr($addr->getProvince(), 0, 3));
$munCityID = $addr->getMunicipalityCityID();
}
if (count($afs->landArray)) {
foreach ($afs->landArray as $afsKey => $afsValue) {
$actualUse = $afsValue->getActualUse();
$landActualUses = new LandActualUses();
$landActualUses->selectRecord($actualUse);
$Code = $landActualUses->getCode();
}
}
if (count($afs->improvementsBuildingsArray)) {
foreach ($afs->improvementsBuildingsArray as $afsKey => $afsValue) {
$actualUse = $afsValue->getActualUse();
$improvementsBuildingsActualUses = new improvementsBuildingsActualUses();
$improvementsBuildingsActualUses->selectRecord($actualUse);
$Code = $improvementsBuildingsActualUses->getCode();
}
}
if ($munCityID == $this->formArray['municipalityCityID']) {
$this->tpl->set_var(location, $location);
//.........这里部分代码省略.........
示例15: Main
function Main()
{
$this->formArray['currentDate'] = date("F d, Y");
$MunicipalityCityDetails = new SoapObject(NCCBIZ . "MunicipalityCityDetails.php", "urn:Object");
#test values
//$this->formArray['municipalityCityID']=1;
if (!($xmlStr = $MunicipalityCityDetails->getMunicipalityCityDetails($this->formArray['municipalityCityID']))) {
#echo($xmlStr);
//exit("xml failed for municipality");
header("Location: " . $this->sess->url("ViewSOA.php") . "&status=2");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
echo "error xmlDoc";
} else {
$MunicipalityCity = new MunicipalityCity();
$MunicipalityCity->parseDomDocument($domDoc);
$this->formArray['municipality'] = $MunicipalityCity->getDescription();
}
}
#test values
//$this->formArray['ownerID']=5;
#echo("ownerID=".$this->formArray['ownerID']."<br>");
// $this->displayOwnerList($this->formArray['ownerID']);
#test values
//$this->formArray["rptopID"]=15;
if ($this->formArray['personID'] != "") {
$person = new Person();
$person->selectRecord($this->formArray['personID']);
$this->tpl->set_var(ownerName, $person->getFullName());
$this->tpl->set_var(ownerNo, $person->getTin());
$address = $person->addressArray[0];
$this->tpl->set_var(ownerAddress, $address->getNumber() . " " . $address->getStreet() . " " . $address->getBarangay() . " " . $address->getDistrict() . " " . $address->getMunicipalitycity() . " " . $address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=" . $this->formArray['personID'];
$db->query($sql);
} else {
$company = new Company();
$company->selectRecord($this->formArray['companyID']);
$this->tpl->set_var(ownerName, $company->getCompanyName());
$this->tpl->set_var(ownerNo, $company->getCompanyID());
$address = $company->addressArray[0];
$this->tpl->set_var(ownerAddress, $address->getNumber() . " " . $address->getStreet() . " " . $address->getBarangay() . " " . $address->getDistrict() . " " . $address->getMunicipalitycity() . " " . $address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=" . $this->formArray['companyID'];
$db->query($sql);
}
/*$person = new Person();
$person->selectRecord($this->formArray['personID']);
$this->tpl->set_var(ownerName,$person->getFullName());
$this->tpl->set_var(ownerNo,$person->getTin());
$address = $person->addressArray[0];
$this->tpl->set_var(ownerAddress,$address->getNumber() ." ".$address->getStreet()." ".$address->getBarangay()." ".$address->getDistrict()." ".$address->getMunicipalitycity()." ".$address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=".$this->formArray['personID'];
$db->query($sql);*/
$this->tpl->set_block("rptsTemplate", "ROW", "RowBlk");
for ($i = 0; $db->next_record(); $i++) {
$rptopID = $db->f("rptopID");
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($rptopID))) {
// exit("xml failed for RPTOP");
header("Location: " . $this->sess->url("ViewSOA.php") . "&status=1");
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$rptop = new RPTOP();
$td = new TD();
$rptop->parseDomDocument($domDoc);
foreach ($rptop as $key => $value) {
$this->formArray['payableYear'] = $rptop->getTaxableYear();
$rptopID = $rptop->getRptopID();
if ($key == "tdArray") {
$tdCtr = 0;
if (count($value)) {
foreach ($value as $tkey => $tvalue) {
$td->selectRecord($tvalue->getTdID());
$assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
$propertyType = $td->getPropertyType();
$TaxDeclarationNumber = $td->getTaxDeclarationNumber();
// $this->tpl->set_var(kind,$propertyType);
// $this->tpl->set_var(currentTDNo,$TaxDeclarationNumber);
/* $dues = new Dues();
$dues->create($td->getTdID(), "","","","2003");
$this->tpl->set_var(basic,$dues->getBasic());
$totBasic += $dues->getBasic();
$this->tpl->set_var(sef,$dues->getSEF());
$totSEF += $dues->getSEF();
$this->tpl->set_var(total,$dues->getSEF()+$dues->getBasic());
$totTaxDue += $dues->getSEF()+$dues->getBasic();*/
$afsID = $td->getAfsID();
$afs = new AFS();
$afs->selectRecord($afsID);
$od = new OD();
$od->selectRecord($afs->getOdID());
$addr = $od->getLocationAddress();
if (count($addr)) {
//.........这里部分代码省略.........