function updateImprovementsBuildingsClasses($xmlStr)
 {
     if (!($domDoc = domxml_open_mem($xmlStr))) {
         return false;
     }
     $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
     $improvementsBuildingsClasses->parseDomDocument($domDoc);
     $ret = $improvementsBuildingsClasses->updateRecord();
     return $ret;
 }
 function getImprovementsBuildingsClassesDetails($improvementsBuildingsClassesID)
 {
     $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
     $improvementsBuildingsClasses->selectRecord($improvementsBuildingsClassesID);
     if (!($domDoc = $improvementsBuildingsClasses->getDomDocument())) {
         return false;
     } else {
         $xmlStr = $domDoc->dump_mem(true);
         return $xmlStr;
     }
 }
 function displayImprovementsBuildingsList($improvementsBuildingsList)
 {
     if (count($improvementsBuildingsList)) {
         $i = 0;
         foreach ($improvementsBuildingsList as $key => $improvementsBuildings) {
             if ($i == 0) {
                 //$this->formArray["arpNumber"] = $improvementsBuildings->getArpNumber();
                 //$this->formArray["propertyIndexNumber"] = $improvementsBuildings->getPropertyIndexNumber();
                 $this->formArray["landPIN"] = $improvementsBuildings->getLandPIN();
                 $this->displayLandPINDetails();
                 $this->formArray["foundation"] = $improvementsBuildings->getFoundation();
                 $this->formArray["windows"] = $improvementsBuildings->getWindows();
                 $this->formArray["columns"] = $improvementsBuildings->getColumnsBldg();
                 $this->formArray["stairs"] = $improvementsBuildings->getStairs();
                 $this->formArray["beams"] = $improvementsBuildings->getBeams();
                 $this->formArray["partition"] = $improvementsBuildings->getPartition();
                 $this->formArray["trussFraming"] = $improvementsBuildings->getTrussFraming();
                 $this->formArray["wallFinish"] = $improvementsBuildings->getWallFinish();
                 $this->formArray["roof"] = $improvementsBuildings->getRoof();
                 $this->formArray["electrical"] = $improvementsBuildings->getElectrical();
                 $this->formArray["exteriorWalls"] = $improvementsBuildings->getExteriorWalls();
                 $this->formArray["toiletAndBath"] = $improvementsBuildings->getToiletAndBath();
                 $this->formArray["flooring"] = $improvementsBuildings->getFlooring();
                 $this->formArray["plumbingSewer"] = $improvementsBuildings->getPlumbingSewer();
                 $this->formArray["doors"] = $improvementsBuildings->getDoors();
                 $this->formArray["fixtures"] = $improvementsBuildings->getFixtures();
                 $this->formArray["ceiling"] = $improvementsBuildings->getCeiling();
                 $this->formArray["dateConstructed"] = $improvementsBuildings->getDateConstructed();
                 $this->formArray["structuralTypes"] = $improvementsBuildings->getStructuralTypes();
                 $this->formArray["dateOccupied"] = $improvementsBuildings->getDateOccupied();
                 $this->formArray["memoranda"] = $improvementsBuildings->getMemoranda();
                 // buildingClassification
                 $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                 if (is_numeric($improvementsBuildings->getBuildingClassification())) {
                     $improvementsBuildingsClasses->selectRecord($improvementsBuildings->getBuildingClassification());
                     $this->formArray["classification"] = $improvementsBuildingsClasses->getDescription();
                 } else {
                     $this->formArray["classification"] = $improvementsBuildings->getBuildingClassification();
                 }
                 $this->formArray["dateCompleted"] = $improvementsBuildings->getDateCompleted();
                 $this->formArray["bldgPermit"] = $improvementsBuildings->getBuildingPermit();
                 $this->formArray["areaOfGroundFloor"] = $improvementsBuildings->getAreaOfGroundFloor();
                 $this->formArray["buildingAge"] = $improvementsBuildings->getBuildingAge();
                 $this->formArray["totalBuildingArea"] = $improvementsBuildings->getTotalBuildingArea();
                 $this->formArray["numberOfStoreys"] = $improvementsBuildings->getNumberOfStoreys();
                 $this->formArray["cctNumber"] = $improvementsBuildings->getCctNumber();
                 // NCC Modification checked and implemented by K2 : November 18, 2005
                 // details:
                 //		commented out line 448, changed lines 451 to 455
                 //$this->formArray["bldgCore1"] = $improvementsBuildings->getBuildingCoreAndAdditionalItems();
                 $this->formArray["bldgCore1"] = number_format($improvementsBuildings->getUnitValue(), 2);
                 $this->formArray["depMarketValue"] = $improvementsBuildings->getDepreciatedMarketValue();
                 $this->formArray["marketValue"] = number_format($improvementsBuildings->getMarketValue(), 2);
                 $this->formArray["addItems"] = number_format($improvementsBuildings->getAddItems(), 2);
                 $this->formArray["subTotal"] = "";
                 $this->formArray["adjustments"] = number_format($improvementsBuildings->getMarketValue() + $improvementsBuildings->getAddItems(), 2);
                 $this->formArray["depreciationRate"] = $improvementsBuildings->getDepreciationRate();
                 $this->formArray["subTotal2"] = "";
                 $this->formArray["depreciationRate"] = $improvementsBuildings->getDepreciationRate();
                 $this->formArray["accumulatedDepreciation"] = $improvementsBuildings->getAccumulatedDepreciation();
                 if (is_a($improvementsBuildings->propertyAdministrator, Person)) {
                     if ($improvementsBuildings->propertyAdministrator->getLastName() != "") {
                         $this->formArray["administrator"] = $improvementsBuildings->propertyAdministrator->getFullName();
                     }
                     if (is_a($improvementsBuildings->propertyAdministrator->addressArray[0], "address")) {
                         $address1 = $improvementsBuildings->propertyAdministrator->addressArray[0]->getNumber();
                         if ($address1 != "") {
                             $address1 .= " ";
                         }
                         $address1 .= $improvementsBuildings->propertyAdministrator->addressArray[0]->getStreet();
                         if ($address1 != "") {
                             $address1 .= ", ";
                         }
                         $address1 .= $improvementsBuildings->propertyAdministrator->addressArray[0]->getBarangay();
                         $address2 = $improvementsBuildings->propertyAdministrator->addressArray[0]->getDistrict();
                         if ($address2 != "") {
                             $address2 .= ", ";
                         }
                         $address2 .= $improvementsBuildings->propertyAdministrator->addressArray[0]->getMunicipalityCity();
                         if ($address2 != "") {
                             $address2 .= ", ";
                         }
                         $address2 .= $improvementsBuildings->propertyAdministrator->addressArray[0]->getProvince();
                         $this->formArray["adminAddress1"] = $address1;
                         $this->formArray["adminAddress2"] = $address2;
                     }
                     $this->formArray["adminTelno"] = $improvementsBuildings->propertyAdministrator->getTelephone();
                 }
                 // recommendingApproval
                 if (is_numeric($improvementsBuildings->recommendingApproval)) {
                     $recommendingApproval = new Person();
                     $recommendingApproval->selectRecord($improvementsBuildings->recommendingApproval);
                     $this->formArray["recommendingApproval"] = $recommendingApproval->getFullName();
                     $this->recommendingApproval = $recommendingApproval->getFullName();
                 } else {
                     $recommendingApproval = $improvementsBuildings->recommendingApproval;
                     $this->formArray["recommendingApproval"] = $recommendingApproval;
                     $this->recommendingApproval = $recommendingApproval;
                 }
                 $this->formArray["dateRecommendingApproval"] = $improvementsBuildings->getRecommendingApprovalDate();
                 // approvedBy
                 if (is_numeric($improvementsBuildings->approvedBy)) {
                     $approvedBy = new Person();
                     $approvedBy->selectRecord($improvementsBuildings->approvedBy);
                     $this->formArray["approvedBy"] = $approvedBy->getFullName();
                     $this->approvedBy = $approvedBy->getFullName();
                 } else {
                     $approvedBy = $improvementsBuildings->approvedBy;
                     $this->formArray["approvedBy"] = $approvedBy;
                     $this->approvedBy = $approvedBy;
                 }
                 $this->formArray["dateApprovedBy"] = $improvementsBuildings->getApprovedByDate();
                 // appraisedBy (assessedBy)
                 if (is_numeric($improvementsBuildings->appraisedBy)) {
                     $appraisedBy = new Person();
                     $appraisedBy->selectRecord($improvementsBuildings->appraisedBy);
                     $this->formArray["assessedBy"] = $appraisedBy->getFullName();
                     $this->appraisedBy = $appraisedBy->getFullName();
                 } else {
                     $appraisedBy = $improvementsBuildings->appraisedBy;
                     $this->formArray["assessedBy"] = $appraisedBy;
                     $this->appraisedBy = $appraisedBy;
                 }
                 $this->formArray["dateAssessedBy"] = $improvementsBuildings->getAppraisedByDate();
             }
             if ($i < 4) {
                 $this->formArray["kind" . ($i + 1)] = $improvementsBuildings->getKind();
                 // actualUse
                 $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
                 if (is_numeric($improvementsBuildings->getActualUse())) {
                     $improvementsBuildingsActualUses->selectRecord($improvementsBuildings->getActualUse());
                     $this->formArray["actualUse" . ($i + 1)] = $improvementsBuildingsActualUses->getDescription();
                 } else {
                     $this->formArray["actualUse" . ($i + 1)] = $improvementsBuildings->getActualUse();
                 }
                 // NCC Modification checked and implemented by K2 : November 18, 2005
                 // details:
                 //		commented out line 557, added line 558, changed "marketValue" to "depMarketValue"
                 //$this->formArray["marketValue".($i+1)] = $improvementsBuildings->getMarketValue();
                 $this->formArray["depMarketValue" . ($i + 1)] = $improvementsBuildings->getDepreciatedMarketValue();
                 $this->formArray["assessmentLevel" . ($i + 1)] = $improvementsBuildings->getAssessmentLevel();
                 $this->formArray["assessedValue" . ($i + 1)] = $improvementsBuildings->getAssessedValue();
                 $this->formArray["total"] += toFloat($this->formArray["assessedValue" . ($i + 1)]);
             }
             $i++;
         }
         // NCC Modification checked and implemented by K2 : November 18, 2005
         // details:
         //		added for() loop in lines 572 to 578 that resets values to:
         //			 "kind, actualUse, depMarketValue, assessmentLevel" and "assessedValue"
         for ($j = $i; $j < 4; $j++) {
             $this->formArray["kind" . ($j + 1)] = '';
             $this->formArray["actualUse" . ($j + 1)] = '';
             $this->formArray["depMarketValue" . ($j + 1)] = '';
             $this->formArray["assessmentLevel" . ($j + 1)] = '';
             $this->formArray["assessedValue" . ($j + 1)] = '';
         }
     }
     $this->formArray["valAdjFacTotal"] = $valAdjFacTotal;
     $this->formArray["propertyAdjMrktValTotal"] = $propertyAdjMrktValTotal;
     $this->formArray["propertyTotal"] = $propertyTotal;
 }
Beispiel #4
0
 function displayImprovementsBuildingsList($improvementsBuildingsList)
 {
     if (count($improvementsBuildingsList)) {
         foreach ($improvementsBuildingsList as $bkey => $improvementsBuildings) {
             // buildingClassification
             $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
             if (is_numeric($improvementsBuildings->getBuildingClassification())) {
                 $improvementsBuildingsClasses->selectRecord($improvementsBuildings->getBuildingClassification());
                 $improvementsBuildingsClassesDescription = $improvementsBuildingsClasses->getDescription();
                 $improvementsBuildingsClassesCode = $improvementsBuildingsClasses->getCode();
             } else {
                 $improvementsBuildingsClassesDescription = $improvementsBuildings->getBuildingClassification();
                 $improvementsBuildingsClassesCode = $improvementsBuildings->getBuildingClassification();
             }
             /* just in case actualUse needs to be drawn from improvementsBuildings
             
             				// actualUse
             				$improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses;
             				if(is_numeric($improvementsBuildings->getActualUse())){
             					$improvementsBuildingsActualUses->selectRecord($improvementsBuildings->getActualUse());
             					$improvementsBuildingsActualUsesDescription = $improvementsBuildingsActualUses->getDescription();
             					$improvementsBuildingsActualUsesCode = $improvementsBuildingsActualUses->getCode();
             				}
             				else{
             					$improvementsBuildingsActualUsesDescription = $improvementsBuildings->getActualUse();
             					$improvementsBuildingsActualUsesCode = $improvementsBuildings->getActualUse();
             				}
             
             				*/
             if ($this->formArray["p"] <= 10) {
                 $p = $this->formArray["p"];
                 $this->formArray["ypos"] -= 13;
                 $offset = $this->formArray["ypos"];
                 $items .= "<textitem xpos=\"25\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"left\">" . $improvementsBuildings->getKind() . "</textitem>";
                 $items .= "<textitem xpos=\"115\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"9\" align=\"left\">" . $improvementsBuildingsClassesDescription . "</textitem>";
                 $items .= "<textitem xpos=\"337\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($improvementsBuildings->getMarketValue(), 2) . "</textitem>";
                 $items .= "<textitem xpos=\"430\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($improvementsBuildings->getAssessmentLevel(), 2) . "</textitem>";
                 $items .= "<textitem xpos=\"558\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . $improvementsBuildings->getAssessedValue() . "</textitem>";
                 $offsetx = $offset - 3;
                 $items .= "<lineitem x1=\"25\" y1=\"" . $offsetx . "\" x2=\"105\" y2=\"" . $offsetx . "\">blurb</lineitem>";
                 $items .= "<lineitem x1=\"115\" y1=\"" . $offsetx . "\" x2=\"228\" y2=\"" . $offsetx . "\">blurb</lineitem>";
                 $items .= "<lineitem x1=\"244\" y1=\"" . $offsetx . "\" x2=\"337\" y2=\"" . $offsetx . "\">blurb</lineitem>";
                 $items .= "<lineitem x1=\"358\" y1=\"" . $offsetx . "\" x2=\"445\" y2=\"" . $offsetx . "\">blurb</lineitem>";
                 $items .= "<lineitem x1=\"457\" y1=\"" . $offsetx . "\" x2=\"558\" y2=\"" . $offsetx . "\">blurb</lineitem>";
                 $this->formArray["totalMarketValue"] += $improvementsBuildings->getMarketValue();
                 $this->formArray["totalAssessedValue"] += un_number_format($improvementsBuildings->getAssessedValue());
                 /*
                 					$this->formArray["kind".$p] = $improvementsBuildings->getKind();
                 					$this->formArray["classification".$p] = $improvementsBuildingsClassesDescription;
                 
                 					$this->formArray["marketValue".$p] = un_number_format($improvementsBuildings->getMarketValue());
                 					$this->formArray["assessmentLevel".$p] = un_number_format($improvementsBuildings->getAssessmentLevel());
                 					$this->formArray["assessedValue".$p] = un_number_format($improvementsBuildings->getAssessedValue());
                 
                 					$this->formArray["totalMarketValue"] += un_number_format($this->formArray["marketValue".$p]);
                 					$this->formArray["totalAssessedValue"] += un_number_format($this->formArray["assessedValue".$p]);
                 */
                 $this->formArray["p"]++;
             }
         }
         $this->formArray["landitems"] = $items;
     }
 }
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "view":
             $ODList = new SoapObject(NCCBIZ . "ODList.php", "urn:Object");
             $condition = "";
             if ($this->formArray["filterByLocation"] == "true") {
                 if ($condition == "") {
                     $condition = " WHERE ";
                 }
                 $condition .= $this->filterLocationAddress();
             } else {
                 $this->tpl->set_block("rptsTemplate", "FilterLocationDetails", "FilterLocationDetailsBlock");
                 $this->tpl->set_var("FilterLocationDetailsBlock", "");
             }
             if ($this->formArray["filterByDate"] == "true") {
                 if ($condition == "") {
                     $condition = " WHERE ";
                 } else {
                     $condition .= " AND ";
                 }
                 $condition .= $this->filterDate();
             } else {
                 $this->tpl->set_block("rptsTemplate", "FilterDateDetails", "FilterDateDetailsBlock");
                 $this->tpl->set_var("FilterDateDetailsBlock", "");
             }
             $condition .= $this->filterArchives();
             $odRecords = new ODRecords();
             // paging
             if (!($count = $odRecords->countRecords($condition))) {
                 $this->tpl->set_block("rptsTemplate", "PageNavigationOne", "PageNavigationOneBlock");
                 $this->tpl->set_var("PageNavigationOneBlock", "");
             } else {
                 $numOfPages = ceil($count / PAGE_BY);
                 $this->tpl->set_var("currentPage", $this->formArray["page"]);
                 $this->tpl->set_var("numOfPages", $numOfPages);
                 $this->tpl->set_block("rptsTemplate", "PageListOne", "PageListOneBlock");
                 for ($p = 1; $p <= $numOfPages; $p++) {
                     $this->tpl->set_var("page", $p);
                     $this->initSelected("page", $p);
                     $this->tpl->parse("PageListOneBlock", "PageListOne", true);
                 }
             }
             if ($this->formArray["page"] > 0) {
                 $initialLimit = ($this->formArray["page"] - 1) * PAGE_BY;
                 $condition .= " LIMIT " . $initialLimit . "," . PAGE_BY;
             }
             // listing
             if (!$odRecords->selectRecords($condition)) {
                 $this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
                 $this->tpl->set_var("message", "properties not found");
                 $this->tpl->parse("NotFoundBlock", "NotFound", true);
                 $this->tpl->set_block("rptsTemplate", "Report", "ReportBlock");
                 $this->tpl->set_var("ReportBlock", "");
             } else {
                 $list = $odRecords->getArrayList();
                 if (count($list)) {
                     $this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
                     $this->tpl->set_var("NotFoundBlock", "");
                     $this->tpl->set_block("rptsTemplate", "ReportList", "ReportListBlock");
                     foreach ($list as $key => $value) {
                         $this->formArray["odID"] = $value->getOdID();
                         $this->tpl->set_var("odID", $value->getOdID());
                         $afs = $this->getAFSDetails($value->getOdID());
                         if (is_object($afs)) {
                             $this->tpl->set_var("propertyIndexNumber", $afs->getPropertyIndexNumber());
                             $this->tpl->set_var("arpNumber", $afs->getArpNumber());
                             $this->tpl->set_var("assessedValue", number_format($afs->getTotalAssessedValue(), 2, '.', ','));
                             $landList = $afs->getLandArray();
                             $plantsTreesList = $afs->getPlantsTreesArray();
                             $improvementsBuildingsList = $afs->getImprovementsBuildingsArray();
                             $machineriesList = $afs->getMachineriesArray();
                             $this->tpl->set_var("taxability", $afs->getTaxability());
                             $this->tpl->set_var("effectivity", $afs->getEffectivity());
                             $kind = "";
                             $class = "";
                             if (count($landList)) {
                                 $kind = "Land";
                                 $land = $landList[0];
                                 $class = $land->getClassification();
                                 $landClasses = new LandClasses();
                                 $landClasses->selectRecord($class);
                                 $class = $landClasses->getDescription();
                             } else {
                                 if (count($plantsTreesList)) {
                                     $kind = "Land";
                                     $plantsTrees = $plantsTreesList[0];
                                     $class = $plantsTrees->getProductClass();
                                     $plantsTreesClasses = new PlantsTreesClasses();
                                     $plantsTreesClasses->selectRecord($class);
                                     $class = $plantsTreesClasses->getDescription();
                                 } else {
                                     if (count($improvementsBuildingsList)) {
                                         $kind = "Improvements/Buildings";
                                         $improvementsBuildings = $improvementsBuildingsList[0];
                                         $class = $improvementsBuildings->getBuildingClassification();
                                         $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                                         $improvementsBuildingsClasses->selectRecord($class);
                                         $class = $improvementsBuildingsClasses->getDescription();
                                     } else {
                                         if (count($machineriesList)) {
                                             $kind = "Machineries";
                                             $machineries = $machineriesList[0];
                                             $class = $machineries->getKind();
                                         }
                                     }
                                 }
                             }
                             $this->tpl->set_var("kind", $kind);
                             $this->tpl->set_var("class", $class);
                             $oValue = $value->owner;
                             if (is_array($oValue->personArray)) {
                                 foreach ($oValue->personArray as $person) {
                                     $ownerNamesArray[] = $person->getName();
                                 }
                             }
                             if (is_array($oValue->companyArray)) {
                                 foreach ($oValue->companyArray as $company) {
                                     $ownerNamesArray[] = $company->getCompanyName();
                                 }
                             }
                             if (is_array($ownerNamesArray)) {
                                 $this->tpl->set_var("ownerNames", implode(",<br>", $ownerNamesArray));
                             } else {
                                 $this->tpl->set_var("ownerNames", "");
                             }
                             unset($ownerNamesArray);
                             if (count($oValue->personArray)) {
                                 $firstOwner = $oValue->personArray[0]->getLastName();
                                 $firstOwner .= ", ";
                                 $firstOwner .= $oValue->personArray[0]->getFirstName();
                                 $firstOwner .= " ";
                                 $firstOwner .= substr($oValue->personArray[0]->getMiddleName(), 0, 1) . ".";
                                 $pAddress = $oValue->personArray[0]->addressArray ? $oValue->personArray[0]->addressArray[0]->getFullAddress() : "no address";
                                 $firstOwnerAddress = $pAddress;
                                 $firstOwnerTelephone = $oValue->personArray[0]->getTelephone();
                                 $this->tpl->set_var("firstOwner", $firstOwner);
                                 $this->tpl->set_var("firstOwnerAddress", $firstOwnerAddress);
                                 $this->tpl->set_var("firstOwnerTelephone", $firstOwnerTelephone);
                             }
                             if (count($oValue->companyArray)) {
                                 if ($firstOwner == "") {
                                     $firstOwner = $oValue->companyArray[0]->getCompanyName();
                                     $cAddress = $oValue->companyArray[0]->addressArray ? $oValue->companyArray[0]->addressArray[0]->getFullAddress() : "no address";
                                     $firstOwnerAddress = $cAddress;
                                     $firstOwnerTelephone = $oValue->companyArray[0]->getTelephone();
                                     $this->tpl->set_var("firstOwner", $firstOwner);
                                     $this->tpl->set_var("firstOwnerAddress", $firstOwnerAddress);
                                     $this->tpl->set_var("firstOwnerTelephone", $firstOwnerTelephone);
                                 }
                             }
                             if ($firstOwner != "") {
                                 $this->tpl->set_var("none", "");
                                 if (count($oValue->personArray) + count($oValue->companyArray) > 1) {
                                     $this->tpl->set_var("andOthers", "(and others)");
                                 } else {
                                     $this->tpl->set_var("andOthers", "");
                                 }
                             } else {
                                 $this->tpl->set_var("none", "none");
                                 $this->tpl->set_var("firstOwner", "");
                                 $this->tpl->set_var("andOthers", "");
                                 $this->tpl->set_var("firstOwnerAddress", "");
                                 $this->tpl->set_var("firstOwnerTelephone", "");
                             }
                             $locationAddress = $value->locationAddress->getFullAddress();
                             $this->tpl->set_var("locationAddress", $locationAddress);
                             $this->displayPrecedingOD();
                             $this->displaySucceedingOD();
                             $this->tpl->parse("ReportListBlock", "ReportList", true);
                         }
                     }
                 }
             }
             break;
         default:
             $this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
             $this->tpl->set_var("message", "select a location to view report");
             $this->tpl->parse("NotFoundBlock", "NotFound", true);
             $this->tpl->set_block("rptsTemplate", "Report", "ReportBlock");
             $this->tpl->set_var("ReportBlock", "");
             break;
     }
     $this->setForm();
     $this->tpl->set_var("Session", $this->sess->url(""));
     $this->tpl->set_var("rpts_Session", $this->sess->id);
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
 function displayImprovementsBuildingsList($improvementsBuildingsList)
 {
     if (count($improvementsBuildingsList)) {
         $improvementsBuildings = $improvementsBuildingsList[0];
         $this->tpl->set_var("improvementsBuildings[propertyID]", $this->htmlProperty("propertyID", $improvementsBuildings->getPropertyID()));
         $this->tpl->set_var("improvementsBuildings[foundation]", $this->htmlProperty("foundation", $improvementsBuildings->getFoundation()));
         $this->tpl->set_var("improvementsBuildings[columnsBldg]", $this->htmlProperty("columnsBldg", $improvementsBuildings->getColumnsBldg()));
         $this->tpl->set_var("improvementsBuildings[beams]", $this->htmlProperty("beams", $improvementsBuildings->getBeams()));
         $this->tpl->set_var("improvementsBuildings[trussFraming]", $this->htmlProperty("trussFraming", $improvementsBuildings->getTrussFraming()));
         $this->tpl->set_var("improvementsBuildings[roof]", $this->htmlProperty("roof", $improvementsBuildings->getRoof()));
         $this->tpl->set_var("{improvementsBuildings[kind]", $this->htmlProperty("kind", $improvementsBuildings->getKind()));
         foreach ($improvementsBuildings as $ikey => $ivalue) {
             if (is_numeric($ivalue)) {
                 switch ($ikey) {
                     case "buildingClassification":
                         $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                         $improvementsBuildingsClasses->selectRecord($ivalue);
                         $this->tpl->set_var("improvementsBuildings[buildingClassification]", $this->htmlProperty("buildingClassification", $improvementsBuildingsClasses->getDescription()));
                         break;
                     case "actualUse":
                         $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
                         $improvementsBuildingsActualUses->selectRecord($ivalue);
                         $this->tpl->set_var("improvementsBuildings[actualUse]", $this->htmlProperty("actualUse", $improvementsBuildingsActualUses->getDescription()));
                         break;
                 }
             }
         }
     }
 }
Beispiel #7
0
 function CreateNewRPU_AFS_TD($odID, $userID = "", $transactionCode = "", $copyOwner = true, $copyAFS = true, $copyTD = false)
 {
     $od = new OD();
     $od->selectRecord($odID);
     unset($od->oldODArray);
     $od->setTransactionCode($transactionCode);
     $od->setOldODArray($odID);
     // create new OD
     $ownerID = $od->owner->getOwnerID();
     $newOdID = $od->insertRecord();
     $newOwnerID = $od->newOwnerID;
     $od->setDomDocument();
     // associate existing Owner to new OD
     $owner = new Owner();
     $owner->selectRecord($ownerID);
     if (count($owner->personArray)) {
         foreach ($owner->personArray as $personKey => $personValue) {
             if ($copyOwner) {
                 $owner->insertOwnerPerson($newOwnerID, $personValue->getPersonID());
             }
         }
     }
     if (count($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if ($copyOwner) {
                 $owner->insertOwnerCompany($newOwnerID, $companyValue->getCompanyID());
             }
         }
     }
     // create new AFS and associate existing properties to new AFS
     $afs = new AFS();
     $afsID = $afs->checkAfsID($odID);
     $afs->selectRecord($afsID);
     $afs->setOdID($newOdID);
     $afs->effectivity = date("Y") + 1;
     // new arpNumber is blank
     $afs->arpNumber = "";
     // retain PIN except for Consolidation and Subdivision
     if ($transactionCode == "SD" || $transactionCode == "CS") {
         $afs->propertyIndexNumber = "";
     }
     $afs->setDomDocument();
     if ($copyAFS) {
         $newAfsID = $afs->insertRecord();
         if (count($afs->landArray)) {
             foreach ($afs->landArray as $landKey => $landValue) {
                 $landValue->setPropertyID("");
                 $landValue->setAfsID($newAfsID);
                 if (is_object($landValue->propertyAdministrator)) {
                     $landValue->propertyAdministrator->setPersonID("");
                 } else {
                     $landValue->propertyAdministrator = new Person();
                     $landValue->propertyAdministrator->setPersonID("");
                 }
                 // set unitValue from SubClass
                 $landSubclasses = new LandSubclasses();
                 $landSubclasses->selectRecord(intVal($landValue->subClass));
                 $landValue->setUnitValue($landSubclasses->getValue());
                 // set assessmentLevel from ActualUse
                 $landActualUses = new LandActualUses();
                 $landActualUses->selectRecord(intVal($landValue->actualUse));
                 $landValue->setAssessmentLevel($landActualUses->getValue());
                 $landValue->calculateMarketValue();
                 $landValue->calculateValueAdjustment();
                 $landValue->calculateAdjustedMarketValue();
                 $landValue->calculateAssessedValue();
                 $newP = $landValue->insertRecord();
             }
         }
         if (count($afs->plantsTreesArray)) {
             foreach ($afs->plantsTreesArray as $plantsTreesKey => $plantsTreesValue) {
                 $plantsTreesValue->setPropertyID("");
                 $plantsTreesValue->setAfsID($newAfsID);
                 if (is_object($plantsTreesValue->propertyAdministrator)) {
                     $plantsTreesValue->propertyAdministrator->setPersonID("");
                 } else {
                     $plantsTreesValue->propertyAdministrator = new Person();
                     $plantsTreesValue->propertyAdministrator->setPersonID("");
                 }
                 // set unitPrice from ProductClass
                 $plantsTreesClasses = new PlantsTreesClasses();
                 $plantsTreesClasses->selectRecord(intVal($plantsTreesValue->productClass));
                 $plantsTreesValue->setUnitPrice($plantsTreesClasses->getValue());
                 // set assessmentLevel from ActualUse
                 $plantsTreesActualUses = new PlantsTreesActualUses();
                 $plantsTreesActualUses->selectRecord(intVal($plantsTreesValue->actualUse));
                 $plantsTreesValue->setAssessmentLevel($plantsTreesActualUses->getValue());
                 $plantsTreesValue->calculateMarketValue();
                 $plantsTreesValue->calculateValueAdjustment();
                 $plantsTreesValue->calculateAdjustedMarketValue();
                 $plantsTreesValue->calculateAssessedValue();
                 $newP = $plantsTreesValue->insertRecord();
             }
         }
         if (count($afs->improvementsBuildingsArray)) {
             foreach ($afs->improvementsBuildingsArray as $improvementsBuildingsKey => $improvementsBuildingsValue) {
                 $improvementsBuildingsValue->setPropertyID("");
                 $improvementsBuildingsValue->setAfsID($newAfsID);
                 if (is_object($improvementsBuildingsValue->propertyAdministrator)) {
                     $improvementsBuildingsValue->propertyAdministrator->setPersonID("");
                 } else {
                     $improvementsBuildingsValue->propertyAdministrator = new Person();
                     $improvementsBuildingsValue->propertyAdministrator->setPersonID("");
                 }
                 // set unitValue from BuildingClassification
                 $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                 $improvementsBuildingsClasses->selectRecord(intVal($improvementsBuildingsValue->buildingClassification));
                 $improvementsBuildingsValue->setUnitValue($improvementsBuildingsClasses->getValue());
                 // this if() line added : November 05 2004:
                 // if master table unit value is not 0, update this unit value with the master table unit value
                 // otherwise, retain this unit value as it is the old one.
                 if ($improvementsBuildingsClasses->getValue() != 0) {
                     $improvementsBuildingsValue->setUnitValue($improvementsBuildingsClasses->getValue());
                 }
                 // set assessmentLevel from ActualUse
                 $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
                 $improvementsBuildingsActualUses->selectRecord(intVal($improvementsBuildingsValue->actualUse));
                 $improvementsBuildingsValue->setAssessmentLevel($improvementsBuildingsActualUses->getValue());
                 $improvementsBuildingsValue->calculateMarketValue();
                 $improvementsBuildingsValue->calculateAccumulatedDepreciation();
                 $improvementsBuildingsValue->calculatedDepreciatedMarketValue();
                 $improvementsBuildingsValue->calculateAdjustedMarketValue();
                 $improvementsBuildingsValue->calculateAssessedValue();
                 $newP = $improvementsBuildingsValue->insertRecord();
             }
         }
         if (count($afs->machineriesArray)) {
             foreach ($afs->machineriesArray as $machineriesKey => $machineriesValue) {
                 $machineriesValue->setPropertyID("");
                 $machineriesValue->setAfsID($newAfsID);
                 if (is_object($machineriesValue->propertyAdministrator)) {
                     $machineriesValue->propertyAdministrator->setPersonID("");
                 } else {
                     $machineriesValue->propertyAdministrator = new Person();
                     $machineriesValue->propertyAdministrator->setPersonID("");
                 }
                 // set assessmentLevel from ActualUse
                 $machineriesActualUses = new MachineriesActualUses();
                 $machineriesActualUses->selectRecord(intVal($machineriesValue->actualUse));
                 $machineriesValue->setAssessmentLevel($machineriesActualUses->getValue());
                 $machineriesValue->calculateMarketValue();
                 $machineriesValue->calculateDepreciatedMarketValue();
                 $machineriesValue->calculateAdjustedMarketValue();
                 $machineriesValue->calculateAssessedValue();
                 $newP = $machineriesValue->insertRecord();
             }
         }
     }
     return $newOdID;
 }
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "view":
             $ODList = new SoapObject(NCCBIZ . "ODList.php", "urn:Object");
             $condition = $this->filterLocationAddress();
             $condition .= $this->filterArchives();
             if (!($xmlStr = $ODList->getODList(0, $condition))) {
                 $this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
                 $this->tpl->set_var("message", "properties not found");
                 $this->tpl->parse("NotFoundBlock", "NotFound", true);
                 $this->tpl->set_block("rptsTemplate", "Report", "ReportBlock");
                 $this->tpl->set_var("ReportBlock", "");
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
                     $this->tpl->set_var("message", "properties not found");
                     $this->tpl->parse("NotFoundBlock", "NotFound", true);
                     $this->tpl->set_block("rptsTemplate", "Report", "ReportBlock");
                     $this->tpl->set_var("ReportBlock", "");
                 } else {
                     $odRecords = new ODRecords();
                     $odRecords->parseDomDocument($domDoc);
                     $list = $odRecords->getArrayList();
                     if (count($list)) {
                         $this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
                         $this->tpl->set_var("NotFoundBlock", "");
                         $this->tpl->set_block("rptsTemplate", "ReportList", "ReportListBlock");
                         foreach ($list as $key => $value) {
                             $this->tpl->set_var("odID", $value->getOdID());
                             $afs = $this->getAFSDetails($value->getOdID());
                             $this->tpl->set_var("propertyIndexNumber", $afs->getPropertyIndexNumber());
                             $this->tpl->set_var("arpNumber", $afs->getArpNumber());
                             $this->tpl->set_var("assessedValue", number_format($afs->getTotalAssessedValue(), 2, '.', ','));
                             $landList = $afs->getLandArray();
                             $plantsTreesList = $afs->getPlantsTreesArray();
                             $improvementsBuildingsList = $afs->getImprovementsBuildingsArray();
                             $machineriesList = $afs->getMachineriesArray();
                             $this->tpl->set_var("taxability", $afs->getTaxability());
                             $this->tpl->set_var("effectivity", $afs->getEffectivity());
                             $kind = "";
                             $class = "";
                             if (count($landList)) {
                                 $kind = "Land";
                                 $land = $landList[0];
                                 $class = $land->getClassification();
                                 $landClasses = new LandClasses();
                                 $landClasses->selectRecord($class);
                                 $class = $landClasses->getDescription();
                             } else {
                                 if (count($plantsTreesList)) {
                                     $kind = "Land";
                                     $plantsTrees = $plantsTreesList[0];
                                     $class = $plantsTrees->getProductClass();
                                     $plantsTreesClasses = new PlantsTreesClasses();
                                     $plantsTreesClasses->selectRecord($class);
                                     $class = $plantsTreesClasses->getDescription();
                                 } else {
                                     if (count($improvementsBuildingsList)) {
                                         $kind = "Improvements/Buildings";
                                         $improvementsBuildings = $improvementsBuildingsList[0];
                                         $class = $improvementsBuildings->getBuildingClassification();
                                         $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                                         $improvementsBuildingsClasses->selectRecord($class);
                                         $class = $improvementsBuildingsClasses->getDescription();
                                     } else {
                                         if (count($machineriesList)) {
                                             $kind = "Machineries";
                                             $machineries = $machineriesList[0];
                                             $class = $machineries->getKind();
                                         }
                                     }
                                 }
                             }
                             $this->tpl->set_var("kind", $kind);
                             $this->tpl->set_var("class", $class);
                             $oValue = $value->owner;
                             if (count($oValue->personArray)) {
                                 $firstOwner = $oValue->personArray[0]->getLastName();
                                 $firstOwner .= ", ";
                                 $firstOwner .= $oValue->personArray[0]->getFirstName();
                                 $firstOwner .= " ";
                                 $firstOwner .= substr($oValue->personArray[0]->getMiddleName(), 0, 1) . ".";
                                 $pAddress = $oValue->personArray[0]->addressArray ? $oValue->personArray[0]->addressArray[0]->getFullAddress() : "no address";
                                 $firstOwnerAddress = $pAddress;
                                 $firstOwnerTelephone = $oValue->personArray[0]->getTelephone();
                                 $this->tpl->set_var("firstOwner", $firstOwner);
                                 $this->tpl->set_var("firstOwnerAddress", $firstOwnerAddress);
                                 $this->tpl->set_var("firstOwnerTelephone", $firstOwnerTelephone);
                             }
                             if (count($oValue->companyArray)) {
                                 if ($firstOwner == "") {
                                     $firstOwner = $oValue->companyArray[0]->getCompanyName();
                                     $cAddress = $oValue->companyArray[0]->addressArray ? $oValue->companyArray[0]->addressArray[0]->getFullAddress() : "no address";
                                     $firstOwnerAddress = $cAddress;
                                     $firstOwnerTelephone = $oValue->companyArray[0]->getTelephone();
                                     $this->tpl->set_var("firstOwner", $firstOwner);
                                     $this->tpl->set_var("firstOwnerAddress", $firstOwnerAddress);
                                     $this->tpl->set_var("firstOwnerTelephone", $firstOwnerTelephone);
                                 }
                             }
                             if ($firstOwner != "") {
                                 $this->tpl->set_var("none", "");
                                 if (count($oValue->personArray) + count($oValue->companyArray) > 1) {
                                     $this->tpl->set_var("andOthers", "(and others)");
                                 } else {
                                     $this->tpl->set_var("andOthers", "");
                                 }
                             } else {
                                 $this->tpl->set_var("none", "none");
                                 $this->tpl->set_var("firstOwner", "");
                                 $this->tpl->set_var("andOthers", "");
                                 $this->tpl->set_var("firstOwnerAddress", "");
                                 $this->tpl->set_var("firstOwnerTelephone", "");
                             }
                             $locationAddress = $value->locationAddress->getNumber();
                             $locationAddress .= " ";
                             $locationAddress .= $value->locationAddress->getStreet();
                             $this->tpl->set_var("locationAddress", $locationAddress);
                             $this->tpl->parse("ReportListBlock", "ReportList", true);
                         }
                     }
                 }
             }
             break;
         default:
             $this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
             $this->tpl->set_var("message", "select a location to view report");
             $this->tpl->parse("NotFoundBlock", "NotFound", true);
             $this->tpl->set_block("rptsTemplate", "Report", "ReportBlock");
             $this->tpl->set_var("ReportBlock", "");
             break;
     }
     $this->setForm();
     $this->tpl->set_var("Session", $this->sess->url(""));
     $this->tpl->set_var("rpts_Session", $this->sess->id);
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Beispiel #9
0
 function displayImprovementsBuildingsList($improvementsBuildingsList)
 {
     $this->tpl->set_block("rptsTemplate", "ImprovementsBuildingsDBEmpty", "ImprovementsBuildingsDBEmptyBlock");
     $this->tpl->set_var("ImprovementsBuildingsDBEmptyBlock", "");
     $this->tpl->set_block("rptsTemplate", "defaultImprovementsBuildingsList", "defaultImprovementsBuildingsListBlock");
     $this->tpl->set_block("rptsTemplate", "toggleImprovementsBuildingsList", "toggleImprovementsBuildingsListBlock");
     if (count($improvementsBuildingsList)) {
         //$this->tpl->set_block("rptsTemplate", "hideImprovementsBuildingsList", "hideImprovementsBuildingsListBlock");
         $this->tpl->set_block("rptsTemplate", "ImprovementsBuildingsList", "ImprovementsBuildingsListBlock");
         $i = 0;
         $totalMarketValue = 0;
         $totalAssessedValue = 0;
         foreach ($improvementsBuildingsList as $key => $value) {
             $totalMarketValue += tofloat($value->getAdjustedMarketValue());
             $totalAssessedValue += tofloat($value->getAssessedValue());
             $this->displayDetails($value);
             foreach ($value as $lkey => $lvalue) {
                 if (is_numeric($lvalue)) {
                     switch ($lkey) {
                         case "buildingClassification":
                             $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                             $improvementsBuildingsClasses->selectRecord($lvalue);
                             $this->tpl->set_var("buildingClassification", $improvementsBuildingsClasses->getDescription());
                             break;
                         case "actualUse":
                             $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
                             $improvementsBuildingsActualUses->selectRecord($lvalue);
                             $this->tpl->set_var("actualUse", $improvementsBuildingsActualUses->getDescription());
                             break;
                     }
                 }
             }
             $this->tpl->set_var("ctr", $i);
             $this->tpl->parse("defaultImprovementsBuildingsListBlock", "defaultImprovementsBuildingsList", true);
             $this->tpl->parse("toggleImprovementsBuildingsListBlock", "toggleImprovementsBuildingsList", true);
             //$this->tpl->parse("hideImprovementsBuildingsListBlock", "hideImprovementsBuildingsList", true);
             $this->setImprovementsBuildingsListBlockPerms();
             $this->tpl->parse("ImprovementsBuildingsListBlock", "ImprovementsBuildingsList", true);
             $i++;
         }
         $this->formArray["totalMarketValue"] += $totalMarketValue;
         $this->formArray["totalAssessedValue"] += $totalAssessedValue;
         $this->formArray["bldgTotalMarketValue"] = $totalMarketValue;
         $this->formArray["bldgTotalAssessedValue"] = $totalAssessedValue;
         $this->tpl->set_var("improvementsBuildingsCtr", $i);
     } else {
         $this->tpl->set_var("defaultImprovementsBuildingsListBlock", "");
         $this->tpl->set_var("toggleImprovementsBuildingsListBlock", "");
     }
 }
Beispiel #10
0
 function displayImprovementsBuildingsList($improvementsBuildingsList)
 {
     if (count($improvementsBuildingsList)) {
         foreach ($improvementsBuildingsList as $bkey => $improvementsBuildings) {
             // buildingClassification
             $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
             if (is_numeric($improvementsBuildings->getBuildingClassification())) {
                 $improvementsBuildingsClasses->selectRecord($improvementsBuildings->getBuildingClassification());
                 $improvementsBuildingsClassesDescription = $improvementsBuildingsClasses->getDescription();
                 $improvementsBuildingsClassesCode = $improvementsBuildingsClasses->getCode();
             } else {
                 $improvementsBuildingsClassesDescription = $improvementsBuildings->getBuildingClassification();
                 $improvementsBuildingsClassesCode = $improvementsBuildings->getBuildingClassification();
             }
             /* just in case actualUse needs to be drawn from improvementsBuildings
             
             				// actualUse
             				$improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses;
             				if(is_numeric($improvementsBuildings->getActualUse())){
             					$improvementsBuildingsActualUses->selectRecord($improvementsBuildings->getActualUse());
             					$improvementsBuildingsActualUsesDescription = $improvementsBuildingsActualUses->getDescription();
             					$improvementsBuildingsActualUsesCode = $improvementsBuildingsActualUses->getCode();
             				}
             				else{
             					$improvementsBuildingsActualUsesDescription = $improvementsBuildings->getActualUse();
             					$improvementsBuildingsActualUsesCode = $improvementsBuildings->getActualUse();
             				}
             
             				*/
             // NCC Modification checked and implemented by K2 : November 21, 2005
             // details:
             //		- changed `if($this->formArray["p"] <= 3)` to `if(...<=10)` in line xx
             //		- added lines 459 to 473
             //		- added line 505
             if ($this->formArray["p"] <= 10) {
                 $p = $this->formArray["p"];
                 $this->formArray["ypos"] -= 13;
                 $offset = $this->formArray["ypos"];
                 $items .= "<textitem xpos=\"25\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"left\">" . $improvementsBuildings->getKind() . "</textitem>";
                 $items .= "<textitem xpos=\"115\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"9\" align=\"left\">" . $improvementsBuildingsClassesDescription . "</textitem>";
                 $items .= "<textitem xpos=\"337\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($improvementsBuildings->getMarketValue(), 2) . "</textitem>";
                 $items .= "<textitem xpos=\"430\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($improvementsBuildings->getAssessmentLevel(), 2) . "</textitem>";
                 $items .= "<textitem xpos=\"558\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . $improvementsBuildings->getAssessedValue() . "</textitem>";
                 $offsetx = $offset - 3;
                 $items .= "<lineitem x1=\"25\" y1=\"" . $offsetx . "\" x2=\"105\" y2=\"" . $offsetx . "\">blurb</lineitem>";
                 $items .= "<lineitem x1=\"115\" y1=\"" . $offsetx . "\" x2=\"228\" y2=\"" . $offsetx . "\">blurb</lineitem>";
                 $items .= "<lineitem x1=\"244\" y1=\"" . $offsetx . "\" x2=\"337\" y2=\"" . $offsetx . "\">blurb</lineitem>";
                 $items .= "<lineitem x1=\"358\" y1=\"" . $offsetx . "\" x2=\"445\" y2=\"" . $offsetx . "\">blurb</lineitem>";
                 $items .= "<lineitem x1=\"457\" y1=\"" . $offsetx . "\" x2=\"558\" y2=\"" . $offsetx . "\">blurb</lineitem>";
                 $this->formArray["kind" . $p] = $improvementsBuildings->getKind();
                 $this->formArray["classification" . $p] = $improvementsBuildingsClassesDescription;
                 $this->formArray["marketValue" . $p] = un_number_format($improvementsBuildings->getMarketValue());
                 $this->formArray["assessmentLevel" . $p] = un_number_format($improvementsBuildings->getAssessmentLevel());
                 $this->formArray["assessedValue" . $p] = un_number_format($improvementsBuildings->getAssessedValue());
             } else {
                 if ($this->formArray["p"] > 3) {
                     if ($this->formArray["kindOthers"] != "") {
                         $this->formArray["kindOthers"] .= "; ";
                     }
                     if ($this->formArray["kindOthers"] == "") {
                         $this->formArray["kindOthers"] = "Others: ";
                     }
                     $this->formArray["kindOthers"] .= $improvementsBuildings->getKind();
                     $this->formArray["kindOthers"] .= " MV=P" . formatCurrency($improvementsBuildings->getMarketValue());
                     $this->formArray["kindOthers"] .= " AV=P" . formatCurrency($improvementsBuildings->getAssessedValue());
                 }
             }
             $this->formArray["totalMarketValue"] += toFloat($improvementsBuildings->getMarketValue());
             $this->formArray["totalAssessedValue"] += toFloat($improvementsBuildings->getAssessedValue());
             $this->formArray["p"]++;
             // added October182005 to fill up 'area' field for BuildingFAAS TD printouts:
             // comma separates areaofgroundfloor
             if ($this->formArray["area"] != "") {
                 $this->formArray["area"] .= ", ";
             }
             $this->formArray["area"] .= $improvementsBuildings->getAreaOfGroundFloor();
         }
         $this->formArray["landitems"] = $items;
     }
 }
 function displayImprovementsBuildingsList($improvementsBuildingsList)
 {
     if (count($improvementsBuildingsList)) {
         $i = 0;
         foreach ($improvementsBuildingsList as $key => $improvementsBuildings) {
             if ($i == 0) {
                 //$this->formArray["arpNumber"] = $improvementsBuildings->getArpNumber();
                 //$this->formArray["propertyIndexNumber"] = $improvementsBuildings->getPropertyIndexNumber();
                 $this->formArray["foundation"] = $improvementsBuildings->getFoundation();
                 $this->formArray["windows"] = $improvementsBuildings->getWindows();
                 $this->formArray["columns"] = $improvementsBuildings->getColumnsBldg();
                 $this->formArray["stairs"] = $improvementsBuildings->getStairs();
                 $this->formArray["beams"] = $improvementsBuildings->getBeams();
                 $this->formArray["partition"] = $improvementsBuildings->getPartition();
                 $this->formArray["trussFraming"] = $improvementsBuildings->getTrussFraming();
                 $this->formArray["wallFinish"] = $improvementsBuildings->getWallFinish();
                 $this->formArray["roof"] = $improvementsBuildings->getRoof();
                 $this->formArray["electrical"] = $improvementsBuildings->getElectrical();
                 $this->formArray["exteriorWalls"] = $improvementsBuildings->getExteriorWalls();
                 $this->formArray["toiletAndBath"] = $improvementsBuildings->getToiletAndBath();
                 $this->formArray["flooring"] = $improvementsBuildings->getFlooring();
                 $this->formArray["plumbingSewer"] = $improvementsBuildings->getPlumbingSewer();
                 $this->formArray["doors"] = $improvementsBuildings->getDoors();
                 $this->formArray["fixtures"] = $improvementsBuildings->getFixtures();
                 $this->formArray["ceiling"] = $improvementsBuildings->getCeiling();
                 $this->formArray["dateConstructed"] = $improvementsBuildings->getDateConstructed();
                 $this->formArray["structuralTypes"] = $improvementsBuildings->getStructuralTypes();
                 $this->formArray["dateOccupied"] = $improvementsBuildings->getDateOccupied();
                 // buildingClassification
                 $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                 if (is_numeric($improvementsBuildings->getBuildingClassification())) {
                     $improvementsBuildingsClasses->selectRecord($improvementsBuildings->getBuildingClassification());
                     $this->formArray["classification"] = $improvementsBuildingsClasses->getDescription();
                 } else {
                     $this->formArray["classification"] = $improvementsBuildings->getBuildingClassification();
                 }
                 $this->formArray["dateCompleted"] = $improvementsBuildings->getDateCompleted();
                 $this->formArray["bldgPermit"] = $improvementsBuildings->getBuildingPermit();
                 $this->formArray["areaOfGroundFloor"] = $improvementsBuildings->getAreaOfGroundFloor();
                 $this->formArray["buildingAge"] = $improvementsBuildings->getBuildingAge();
                 $this->formArray["totalBuildingArea"] = $improvementsBuildings->getTotalBuildingArea();
                 $this->formArray["numberOfStoreys"] = $improvementsBuildings->getNumberOfStoreys();
                 $this->formArray["cctNumber"] = $improvementsBuildings->getCctNumber();
                 $this->formArray["bldgCore1"] = $improvementsBuildings->getBuildingCoreAndAdditionalItems();
                 $this->formArray["addItems"] = "";
                 $this->formArray["subTotal"] = "";
                 $this->formArray["adjustments"] = "";
                 $this->formArray["depreciationRate"] = $improvementsBuildings->getDepreciationRate();
                 $this->formArray["subTotal2"] = "";
                 $this->formArray["depreciationRate"] = $improvementsBuildings->getDepreciationRate();
                 $this->formArray["accumulatedDepreciation"] = $improvementsBuildings->getAccumulatedDepreciation();
                 if (is_a($improvementsBuildings->propertyAdministrator, Person)) {
                     $this->formArray["administrator"] = $improvementsBuildings->propertyAdministrator->getFullName();
                     if (is_a($improvementsBuildings->propertyAdministrator->addressArray[0], "address")) {
                         $address1 = $improvementsBuildings->propertyAdministrator->addressArray[0]->getNumber();
                         $address1 .= " " . $improvementsBuildings->propertyAdministrator->addressArray[0]->getStreet();
                         $address1 .= ", " . $improvementsBuildings->propertyAdministrator->addressArray[0]->getBarangay();
                         $address2 = $improvementsBuildings->propertyAdministrator->addressArray[0]->getDistrict();
                         $address2 .= ", " . $improvementsBuildings->propertyAdministrator->addressArray[0]->getMunicipalityCity();
                         $address2 .= ", " . $improvementsBuildings->propertyAdministrator->addressArray[0]->getProvince();
                         $this->formArray["adminAddress1"] = $address1;
                         $this->formArray["adminAddress2"] = $address2;
                     }
                     $this->formArray["adminTelno"] = $improvementsBuildings->propertyAdministrator->getTelephone();
                 }
                 // recommendingApproval
                 if (is_numeric($improvementsBuildings->recommendingApproval)) {
                     $recommendingApproval = new Person();
                     $recommendingApproval->selectRecord($improvementsBuildings->recommendingApproval);
                     $this->formArray["recommendingApproval"] = $recommendingApproval->getFullName();
                     $this->recommendingApproval = $recommendingApproval->getFullName();
                 } else {
                     $recommendingApproval = $improvementsBuildings->recommendingApproval;
                     $this->formArray["recommendingApproval"] = $recommendingApproval;
                     $this->recommendingApproval = $recommendingApproval;
                 }
                 $this->formArray["dateRecommendingApproval"] = $improvementsBuildings->getRecommendingApprovalDate();
                 // approvedBy
                 if (is_numeric($improvementsBuildings->approvedBy)) {
                     $approvedBy = new Person();
                     $approvedBy->selectRecord($improvementsBuildings->approvedBy);
                     $this->formArray["approvedBy"] = $approvedBy->getFullName();
                     $this->approvedBy = $approvedBy->getFullName();
                 } else {
                     $approvedBy = $improvementsBuildings->approvedBy;
                     $this->formArray["approvedBy"] = $approvedBy;
                     $this->approvedBy = $approvedBy;
                 }
                 $this->formArray["dateApprovedBy"] = $improvementsBuildings->getApprovedByDate();
                 // appraisedBy (assessedBy)
                 if (is_numeric($improvementsBuildings->appraisedBy)) {
                     $appraisedBy = new Person();
                     $appraisedBy->selectRecord($improvementsBuildings->appraisedBy);
                     $this->formArray["assessedBy"] = $appraisedBy->getFullName();
                     $this->appraisedBy = $appraisedBy->getFullName();
                 } else {
                     $appraisedBy = $improvementsBuildings->appraisedBy;
                     $this->formArray["assessedBy"] = $appraisedBy;
                     $this->appraisedBy = $appraisedBy;
                 }
                 $this->formArray["dateAssessedBy"] = $improvementsBuildings->getAppraisedByDate();
             }
             if ($i < 4) {
                 $this->formArray["kind" . ($i + 1)] = $improvementsBuildings->getKind();
                 // actualUse
                 $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                 if (is_numeric($improvementsBuildings->getActualUse())) {
                     $improvementsBuildingsClasses->selectRecord($improvementsBuildings->getActualUse());
                     $this->formArray["actualUse" . ($i + 1)] = $improvementsBuildingsClasses->getDescription();
                 } else {
                     $this->formArray["actualUse" . ($i + 1)] = $improvementsBuildings->getActualUse();
                 }
                 $this->formArray["marketValue" . ($i + 1)] = $improvementsBuildings->getMarketValue();
                 $this->formArray["assessmentLevel" . ($i + 1)] = $improvementsBuildings->getAssessmentLevel();
                 $this->formArray["assessedValue" . ($i + 1)] = $improvementsBuildings->getAssessedValue();
             }
             $i++;
         }
     }
     $this->formArray["landTotal"] = $landTotal;
     $this->formArray["valAdjFacTotal"] = $valAdjFacTotal;
     $this->formArray["propertyAdjMrktValTotal"] = $propertyAdjMrktValTotal;
     $this->formArray["propertyTotal"] = $propertyTotal;
 }
Beispiel #12
0
 function CreateNewRPU_AFS_TDGenRevBrgy($odID, $userID = "", $transactionCode = "", $copyOwner = true, $copyAFS = true, $copyTD = true)
 {
     $link = mysql_connect(MYSQLDBHOST, MYSQLDBUSER, MYSQLDBPWD);
     mysql_select_db(MYSQLDBNAME, $link);
     $sql = "select Person.firstName, Person.lastName from Person, Owner, OwnerPerson " . "where Person.personID = OwnerPerson.personID and OwnerPerson.ownerID = Owner.ownerID and Owner.odID = " . $odID;
     $rs = mysql_query($sql, $link);
     $prevowners = '';
     while ($row = mysql_fetch_assoc($rs)) {
         $prevowners .= $row['firstName'] . ' ' . $row['lastName'] . ', ';
     }
     $prevowners = substr($prevowners, 0, strlen($prevowners) - 2);
     $sql = "select AFS.totalAssessedValue from AFS where AFS.odID = " . $odID;
     $rs = mysql_query($sql, $link);
     $prevassdval = 0;
     if ($row = mysql_fetch_assoc($rs)) {
         $prevassdval = $row['totalAssessedValue'];
     }
     $od = new OD();
     $od->selectRecord($odID);
     unset($od->oldODArray);
     $od->setTransactionCode($transactionCode);
     $od->setOldODArray($odID);
     // create new OD
     $ownerID = $od->owner->getOwnerID();
     $newOdID = $od->insertRecord();
     $newOwnerID = $od->newOwnerID;
     $od->setDomDocument();
     // associate existing Owner to new OD
     $owner = new Owner();
     $owner->selectRecord($ownerID);
     if (count($owner->personArray)) {
         foreach ($owner->personArray as $personKey => $personValue) {
             if ($copyOwner) {
                 $owner->insertOwnerPerson($newOwnerID, $personValue->getPersonID());
             }
         }
     }
     if (count($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if ($copyOwner) {
                 $owner->insertOwnerCompany($newOwnerID, $companyValue->getCompanyID());
             }
         }
     }
     // create new AFS and associate existing properties to new AFS
     $afs = new AFS();
     $afsID = $afs->checkAfsID($odID);
     $afs->selectRecord($afsID);
     $afs->setOdID($newOdID);
     $afs->effectivity = date("Y") + 1;
     // new arpNumber is blank
     //$afs->arpNumber = "";
     // retain PIN except for Consolidation and Subdivision
     //if($transactionCode=="SD" || $transactionCode=="CS"){
     $afs->propertyIndexNumber = "";
     //}
     $afs->setDomDocument();
     $newAFSID = $afs->insertRecord();
     $afs->arpNumber = '(' . $newAFSID . ')';
     $afs->updateRecord();
     if ($copyAFS) {
         if ($copyTD) {
             $td = new TD();
             $td->taxDeclarationNumber = $afs->arpNumber;
             $td->afsID = $newAFSID;
             $td->previousOwner = $prevowners;
             $td->previousAssessedValue = $prevassdval;
             $td->setDomDocument();
             $newTDID = $td->insertRecord();
         }
         if (count($afs->landArray)) {
             foreach ($afs->landArray as $landKey => $landValue) {
                 $landValue->setPropertyID("");
                 $landValue->setAfsID($newAFSID);
                 $landValue->propertyAdministrator->setPersonID("");
                 // set unitValue from SubClass
                 $landSubclasses = new LandSubclasses();
                 $landSubclasses->selectRecord(intVal($landValue->subClass));
                 $landValue->setUnitValue($landSubclasses->getValue());
                 // set assessmentLevel from ActualUse
                 $landActualUses = new LandActualUses();
                 $landActualUses->selectRecord(intVal($landValue->actualUse));
                 $landValue->setAssessmentLevel($landActualUses->getValue());
                 $landValue->calculateMarketValue();
                 $landValue->calculateValueAdjustment();
                 $landValue->calculateAdjustedMarketValue();
                 $landValue->calculateAssessedValue();
                 $landValue->memoranda = GENERALREVISION_DEFAULT_MEMORANDA;
                 $landValue->appraisedByDate = "";
                 $landValue->recommendingApprovalDate = "";
                 $landValue->approvedByDate = "";
                 $newP = $landValue->insertRecord();
             }
         }
         if (count($afs->plantsTreesArray)) {
             foreach ($afs->plantsTreesArray as $plantsTreesKey => $plantsTreesValue) {
                 $plantsTreesValue->setPropertyID("");
                 $plantsTreesValue->setAfsID($newAFSID);
                 $plantsTreesValue->propertyAdministrator->setPersonID("");
                 // set unitPrice from ProductClass
                 $plantsTreesClasses = new PlantsTreesClasses();
                 $plantsTreesClasses->selectRecord(intVal($plantsTreesValue->productClass));
                 $plantsTreesValue->setUnitPrice($plantsTreesClasses->getValue());
                 // set assessmentLevel from ActualUse
                 $plantsTreesActualUses = new PlantsTreesActualUses();
                 $plantsTreesActualUses->selectRecord(intVal($plantsTreesValue->actualUse));
                 $plantsTreesValue->setAssessmentLevel($plantsTreesActualUses->getValue());
                 $plantsTreesValue->calculateMarketValue();
                 $plantsTreesValue->calculateValueAdjustment();
                 $plantsTreesValue->calculateAdjustedMarketValue();
                 $plantsTreesValue->calculateAssessedValue();
                 $plantsTreesValue->memoranda = GENERALREVISION_DEFAULT_MEMORANDA;
                 $plantsTreesValue->appraisedByDate = "";
                 $plantsTreesValue->recommendingApprovalDate = "";
                 $plantsTreesValue->approvedByDate = "";
                 $newP = $plantsTreesValue->insertRecord();
             }
         }
         if (count($afs->improvementsBuildingsArray)) {
             foreach ($afs->improvementsBuildingsArray as $improvementsBuildingsKey => $improvementsBuildingsValue) {
                 $improvementsBuildingsValue->setPropertyID("");
                 $improvementsBuildingsValue->setAfsID($newAFSID);
                 $improvementsBuildingsValue->propertyAdministrator->setPersonID("");
                 // set unitValue from BuildingClassification
                 $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                 $improvementsBuildingsClasses->selectRecord(intVal($improvementsBuildingsValue->buildingClassification));
                 $improvementsBuildingsValue->setUnitValue($improvementsBuildingsClasses->getValue());
                 // set assessmentLevel from ActualUse
                 $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
                 $improvementsBuildingsActualUses->selectRecord(intVal($improvementsBuildingsValue->actualUse));
                 $improvementsBuildingsValue->setAssessmentLevel($improvementsBuildingsActualUses->getValue());
                 $improvementsBuildingsValue->calculateMarketValue();
                 $improvementsBuildingsValue->calculateAccumulatedDepreciation();
                 $improvementsBuildingsValue->calculatedDepreciatedMarketValue();
                 $improvementsBuildingsValue->calculateAdjustedMarketValue();
                 $improvementsBuildingsValue->calculateAssessedValue();
                 $improvementsBuildingsValue->memoranda = GENERALREVISION_DEFAULT_MEMORANDA;
                 $improvementsBuildingsValue->appraisedByDate = "";
                 $improvementsBuildingsValue->recommendingApprovalDate = "";
                 $improvementsBuildingsValue->approvedByDate = "";
                 $newP = $improvementsBuildingsValue->insertRecord();
             }
         }
         if (count($afs->machineriesArray)) {
             foreach ($afs->machineriesArray as $machineriesKey => $machineriesValue) {
                 $machineriesValue->setPropertyID("");
                 $machineriesValue->setAfsID($newAFSID);
                 $machineriesValue->propertyAdministrator->setPersonID("");
                 // set assessmentLevel from ActualUse
                 $machineriesActualUses = new MachineriesActualUses();
                 $machineriesActualUses->selectRecord(intVal($machineriesValue->actualUse));
                 $machineriesValue->setAssessmentLevel($machineriesActualUses->getValue());
                 $machineriesValue->calculateMarketValue();
                 $machineriesValue->calculateDepreciatedMarketValue();
                 $machineriesValue->calculateAdjustedMarketValue();
                 $machineriesValue->calculateAssessedValue();
                 $machineriesValue->memoranda = GENERALREVISION_DEFAULT_MEMORANDA;
                 $machineriesValue->appraisedByDate = "";
                 $machineriesValue->recommendingApprovalDate = "";
                 $machineriesValue->approvedByDate = "";
                 $newP = $machineriesValue->insertRecord();
             }
         }
     }
     $sql = "update AFS set archive = 'true' where AFS.odID = " . $odID;
     mysql_query($sql, $link);
     $sql = "update OD set archive = 'true' where OD.odID = " . $odID;
     mysql_query($sql, $link);
     $sql = "update TD set archive = 'true' where TD.afsID = " . $afsID;
     mysql_query($sql, $link);
     mysql_close($link);
     return $newOdID;
     echo "OD - " . $odID . "->" . $newOdID . "<br>";
     echo "Owner - " . $ownerID . "->" . $newOwnerID . "<br>";
     echo "AFS - " . $afsID . "->" . $newAFSID . "<br>" . $newP;
 }
 function updateStatus($statusIDArray = "")
 {
     $rows = 0;
     $this->selectRecords();
     foreach ($this->arrayList as $key => $value) {
         $value->status = "inactive";
         $value->updateRecord();
     }
     foreach ($statusIDArray as $key => $value) {
         $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
         $improvementsBuildingsClasses->selectRecord($value);
         $improvementsBuildingsClasses->status = "active";
         $improvementsBuildingsClasses->updateRecord();
         $rows++;
     }
     return $rows;
 }
Beispiel #14
0
 function displayAssessedValues($landList, $plantsTreesList, $improvementsBuildingsList, $machineriesList)
 {
     $totalMarketValue = 0;
     $totalAssessedValue = 0;
     $i = 0;
     if (count($landList)) {
         foreach ($landList as $key => $land) {
             if ($i < 4) {
                 // classification
                 $landClasses = new LandClasses();
                 if (is_numeric($land->getClassification())) {
                     $landClasses->selectRecord($land->getClassification());
                     $landClassesDescription = $landClasses->getDescription();
                     $landClassesCode = $landClasses->getCode();
                 } else {
                     $landClassesDescription = $land->getClassification();
                     $landClassesCode = $land->getClassification();
                 }
                 // subClass
                 $landSubclasses = new LandSubclasses();
                 if (is_numeric($land->getSubClass())) {
                     $landSubclasses->selectRecord($land->getSubClass());
                     $landSubclassesDescription = $landSubclasses->getDescription();
                     $landSubclassesCode = $landSubclasses->getCode();
                 } else {
                     $landSubclassesDescription = $land->getSubClass();
                     $landSubclassesCode = $land->getSubClass();
                 }
                 // actualUse
                 $landActualUses = new LandActualUses();
                 if (is_numeric($land->getActualUse())) {
                     $landActualUses->selectRecord($land->getActualUse());
                     $landActualUsesDescription = $landActualUses->getDescription();
                     $landActualUsesCode = $landActualUses->getCode();
                 } else {
                     $landActualUsesDescription = $land->getActualUse();
                     $landActualUsesCode = $land->getActualUse();
                 }
                 $this->formArray["propertyKind" . ($i + 1)] = "Land";
                 $this->formArray["propertyActualUse" . ($i + 1)] = $landActualUsesDescription;
                 $this->formArray["propertyMarketValue" . ($i + 1)] = $land->getMarketValue();
                 $this->formArray["propertyAssessmentLevel" . ($i + 1)] = $land->getAssessmentLevel();
                 $this->formArray["propertyAssessedValue" . ($i + 1)] = $land->getAssessedValue();
                 $totalMarketValue += toFloat($land->getMarketValue());
                 $totalAssessedValue += toFloat($land->getAssessedValue());
                 $i++;
             }
         }
     }
     if (count($plantsTreesList)) {
         foreach ($plantsTreesList as $key => $plantsTrees) {
             if ($i < 4) {
                 // productClass
                 $plantsTreesClasses = new PlantsTreesClasses();
                 if (is_numeric($plantsTrees->getProductClass())) {
                     $plantsTreesClasses->selectRecord($plantsTrees->getProductClass());
                     $plantsTreesClassesDescription = $plantsTreesClasses->getDescription();
                     $plantsTreesClassesCode = $plantsTreesClasses->getCode();
                 } else {
                     $plantsTreesClassesDescription = $plantsTrees->getProductClass();
                     $plantsTreesClassesCode = $plantsTrees->getProductClass();
                 }
                 // actualUse
                 $plantsTreesActualUses = new PlantsTreesActualUses();
                 if (is_numeric($plantsTrees->getActualUse())) {
                     $plantsTreesActualUses->selectRecord($plantsTrees->getActualUse());
                     $plantsTreesActualUsesDescription = $plantsTreesActualUses->getDescription();
                     $plantsTreesActualUsesCode = $plantsTreesActualUses->getCode();
                 } else {
                     $plantsTreesActualUsesDescription = $plantsTrees->getActualUse();
                     $plantsTreesActualUsesCode = $plantsTrees->getActualUse();
                 }
                 $this->formArray["propertyKind" . ($i + 1)] = "PlantsTrees";
                 $this->formArray["propertyActualUse" . ($i + 1)] = $plantsTreesActualUsesDescription;
                 $this->formArray["propertyMarketValue" . ($i + 1)] = $plantsTrees->getMarketValue();
                 $this->formArray["propertyAssessmentLevel" . ($i + 1)] = $plantsTrees->getAssessmentLevel();
                 $this->formArray["propertyAssessedValue" . ($i + 1)] = $plantsTrees->getAssessedValue();
                 $totalMarketValue += toFloat($plantsTrees->getMarketValue());
                 $totalAssessedValue += toFloat($plantsTrees->getAssessedValue());
                 $i++;
             }
         }
     }
     if (count($improvementsBuildingsList)) {
         foreach ($improvementsBuildingsList as $key => $improvementsBuildings) {
             if ($i < 4) {
                 // buildingClassification
                 $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                 if (is_numeric($improvementsBuildings->getBuildingClassification())) {
                     $improvementsBuildingsClasses->selectRecord($improvementsBuildings->getBuildingClassification());
                     $improvementsBuildingsClassesDescription = $improvementsBuildingsClasses->getDescription();
                     $improvementsBuildingsClassesCode = $improvementsBuildingsClasses->getCode();
                 } else {
                     $improvementsBuildingsClassesDescription = $improvementsBuildings->getBuildingClassification();
                     $improvementsBuildingsClassesCode = $improvementsBuildings->getBuildingClassification();
                 }
                 // actualUse
                 $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
                 if (is_numeric($improvementsBuildings->getActualUse())) {
                     $improvementsBuildingsActualUses->selectRecord($improvementsBuildings->getActualUse());
                     $improvementsBuildingsActualUsesDescription = $improvementsBuildingsActualUses->getDescription();
                     $improvementsBuildingsActualUsesCode = $improvementsBuildingsActualUses->getCode();
                 } else {
                     $improvementsBuildingsActualUsesDescription = $improvementsBuildings->getActualUse();
                     $improvementsBuildingsActualUsesCode = $improvementsBuildings->getActualUse();
                 }
                 $this->formArray["propertyKind" . ($i + 1)] = "ImprovementsBuildings";
                 $this->formArray["propertyActualUse" . ($i + 1)] = $improvementsBuildingsActualUsesDescription;
                 $this->formArray["propertyMarketValue" . ($i + 1)] = $improvementsBuildings->getMarketValue();
                 $this->formArray["propertyAssessmentLevel" . ($i + 1)] = $improvementsBuildings->getAssessmentLevel();
                 $this->formArray["propertyAssessedValue" . ($i + 1)] = $improvementsBuildings->getAssessedValue();
                 $totalMarketValue += toFloat($improvementsBuildings->getMarketValue());
                 $totalAssessedValue += toFloat($improvementsBuildings->getAssessedValue());
                 $i++;
             }
         }
     }
     if (count($machineriesList)) {
         foreach ($machineriesList as $key => $machineries) {
             if ($i < 4) {
                 // kind
                 $machineriesClasses = new MachineriesClasses();
                 if (is_numeric($machineries->getKind())) {
                     $machineriesClasses->selectRecord($machineries->getKind());
                     $machineriesClassesDescription = $machineriesClasses->getDescription();
                     $machineriesClassesCode = $machineriesClasses->getCode();
                 } else {
                     $machineriesClassesDescription = $machineries->getKind();
                     $machineriesClassesCode = $machineries->getActualUse();
                 }
                 // actualUse
                 $machineriesActualUses = new MachineriesActualUses();
                 if (is_numeric($machineries->getActualUse())) {
                     $machineriesActualUses->selectRecord($machineries->getActualUse());
                     $machineriesActualUsesDescription = $machineriesActualUses->getDescription();
                     $machineriesActualUsesCode = $machineriesActualUses->getCode();
                 } else {
                     $machineriesActualUsesDescription = $machineries->getActualUse();
                     $machineriesActualUsesCode = $machineries->getActualUse();
                 }
                 $this->formArray["propertyKind" . ($i + 1)] = "Machineries";
                 $this->formArray["propertyActualUse" . ($i + 1)] = $machineriesActualUsesDescription;
                 $this->formArray["propertyMarketValue" . ($i + 1)] = $machineries->getMarketValue();
                 $this->formArray["propertyAssessmentLevel" . ($i + 1)] = $machineries->getAssessmentLevel();
                 $this->formArray["propertyAssessedValue" . ($i + 1)] = $machineries->getAssessedValue();
                 $totalMarketValue += toFloat($machineries->getMarketValue());
                 $totalAssessedValue += toFloat($machineries->getAssessedValue());
                 $i++;
             }
         }
     }
     $this->formArray["totalMarketValue"] = $totalMarketValue;
     $this->formArray["totalAssessedValue"] = $totalAssessedValue;
     $this->formArray["totalAssessedValueInWords"] = makewords($totalAssessedValue);
 }
Beispiel #15
0
 function displayAssessedValues($landList, $plantsTreesList, $improvementsBuildingsList, $machineriesList)
 {
     $totalMarketValue = 0;
     $totalAssessedValue = 0;
     $nLandTotalAssessedValue = 0;
     $nLandTotalAdjustedMarketValue = 0;
     $nPlantsTotalAssessedValue = 0;
     $nPlantsTotalAdjustedMarketValue = 0;
     $nBuildingsTotalAssessedValue = 0;
     $nBuildingsTotalAdjustedMarketValue = 0;
     $nMachineriesTotalAssessedValue = 0;
     $nMachineriesTotalAdjustedMarketValue = 0;
     $swornLandTotal = 0;
     $swornImprovementTotal = 0;
     $swornOverallTotal = 0;
     $i = 1;
     $flag = 0;
     $counter = 0;
     if (count($landList)) {
         foreach ($landList as $key => $land) {
             if ($i < 5) {
                 // classification
                 $landClasses = new LandClasses();
                 if (is_numeric($land->getClassification())) {
                     $landClasses->selectRecord($land->getClassification());
                     $landClassesDescription = $landClasses->getDescription();
                     $landClassesCode = $landClasses->getCode();
                 } else {
                     $landClassesDescription = $land->getClassification();
                     $landClassesCode = $land->getClassification();
                 }
                 // subClass
                 $landSubclasses = new LandSubclasses();
                 if (is_numeric($land->getSubClass())) {
                     $landSubclasses->selectRecord($land->getSubClass());
                     $landSubclassesDescription = $landSubclasses->getDescription();
                     $landSubclassesCode = $landSubclasses->getCode();
                 } else {
                     $landSubclassesDescription = $land->getSubClass();
                     $landSubclassesCode = $land->getSubClass();
                 }
                 // actualUse
                 $landActualUses = new LandActualUses();
                 if (is_numeric($land->getActualUse())) {
                     $landActualUses->selectRecord($land->getActualUse());
                     $landActualUsesDescription = $landActualUses->getDescription();
                     $landActualUsesCode = $landActualUses->getCode();
                 } else {
                     $landActualUsesDescription = $land->getActualUse();
                     $landActualUsesCode = $land->getActualUse();
                 }
                 // add pre new hehe
                 if ($landActualUsesCode == "RES" || $landActualUsesCode == "COM" || $landActualUsesCode == "IND" || $landActualUsesCode == "MI" || $landActualUsesCode == "TI" || $landActualUsesCode == "SP") {
                     $tempname = $landActualUsesDescription;
                     $counter += 1;
                 }
                 // end of add hehe
                 $totalMarketValue += toFloat($land->getAdjustedMarketValue());
                 $totalAssessedValue += toFloat($land->getAssessedValue());
                 $nLandTotalAssessedValue += toFloat($land->getAssessedValue());
                 $nLandTotalAdjustedMarketValue += toFloat($land->getAdjustedMarketValue());
                 $swornLandTotal += toFloat($land->getAdjustedMarketValue());
                 $swornOverallTotal += toFloat($land->getAdjustedMarketValue());
                 //			$this->formArray["propertyKind".($i)] = "Land";
                 //			$this->formArray["propertyActualUse".($i)] = $landActualUsesDescription;
                 //			$this->formArray["propertyMarketValue".($i)] = $land->getAdjustedMarketValue();
                 //			$this->formArray["propertyAssessmentLevel".($i)] = $land->getAssessmentLevel();
                 //			$this->formArray["propertyAssessedValue".($i)] = $land->getAssessedValue();
                 //				 $totalMarketValue+=toFloat($land->getAdjustedMarketValue());
                 //				 $totalAssessedValue+=toFloat($land->getAssessedValue());
                 //$i++;
             }
         }
         //}
         // display the summary of lands value
         if ($counter > 0) {
             $this->formArray["propertyActualUse" . $i] = $tempname;
         } else {
             $this->formArray["propertyActualUse" . $i] = "Agricultural";
         }
         $this->formArray["propertyKind" . $i] = "Land";
         //		$this->formArray["propertyActualUse".($i)] = "Agricultural";
         $this->formArray["propertyMarketValue" . $i] = $nLandTotalAdjustedMarketValue;
         $this->formArray["propertyAssessmentLevel" . $i] = $land->getAssessmentLevel();
         $this->formArray["propertyAssessedValue" . $i] = $nLandTotalAssessedValue;
         $i++;
         // end of summary of lands
     }
     if (count($plantsTreesList)) {
         foreach ($plantsTreesList as $key => $plantsTrees) {
             if ($i < 5) {
                 // productClass
                 $plantsTreesClasses = new PlantsTreesClasses();
                 if (is_numeric($plantsTrees->getProductClass())) {
                     $plantsTreesClasses->selectRecord($plantsTrees->getProductClass());
                     $plantsTreesClassesDescription = $plantsTreesClasses->getDescription();
                     $plantsTreesClassesCode = $plantsTreesClasses->getCode();
                 } else {
                     $plantsTreesClassesDescription = $plantsTrees->getProductClass();
                     $plantsTreesClassesCode = $plantsTrees->getProductClass();
                 }
                 // actualUse
                 $plantsTreesActualUses = new PlantsTreesActualUses();
                 if (is_numeric($plantsTrees->getActualUse())) {
                     $plantsTreesActualUses->selectRecord($plantsTrees->getActualUse());
                     $plantsTreesActualUsesDescription = $plantsTreesActualUses->getDescription();
                     $plantsTreesActualUsesCode = $plantsTreesActualUses->getCode();
                 } else {
                     $plantsTreesActualUsesDescription = $plantsTrees->getActualUse();
                     $plantsTreesActualUsesCode = $plantsTrees->getActualUse();
                 }
                 //$this->formArray["propertyKind".($i+1)] = "PlantsTrees";
                 //$this->formArray["propertyActualUse".($i+1)] =$plantsTreesActualUsesDescription;
                 //$this->formArray["propertyMarketValue".($i+1)] =$plantsTrees->getAdjustedMarketValue();
                 //$this->formArray["propertyAssessmentLevel".($i+1)] = $plantsTrees->getAssessmentLevel();
                 //$this->formArray["propertyAssessedValue".($i+1)] = $plantsTrees->getAssessedValue();
                 $totalMarketValue += toFloat($plantsTrees->getAdjustedMarketValue());
                 $totalAssessedValue += toFloat($plantsTrees->getAssessedValue());
                 $nPlantsTotalAssessedValue += toFloat($plantsTrees->getAssessedValue());
                 $nPlantsTotalAdjustedMarketValue += toFloat($plantsTrees->getAdjustedMarketValue());
                 $swornLandTotal += toFloat($plantsTrees->getAdjustedMarketValue());
                 $swornOverallTotal += toFloat($plantsTrees->getAdjustedMarketValue());
                 //$i++;
             }
         }
         $this->formArray["propertyKind" . $i] = "PlantTrees";
         $this->formArray["propertyActualUse" . $i] = $plantsTreesActualUsesDescription;
         $this->formArray["propertyMarketValue" . $i] = $nPlantsTotalAdjustedMarketValue;
         $this->formArray["propertyAssessmentLevel" . $i] = $plantsTrees->getAssessmentLevel();
         $this->formArray["propertyAssessedValue" . $i] = $nPlantsTotalAssessedValue;
         $i++;
         // additional new line for total of LAND AND PLANT TREES
         //		$nSwornLandTotal =$nPlantsTotalAdjustedMarketValue + $nLandTotalAdjustedMarketValue;
         //		$this->formArray["swornLandTotal"] =$nSwornLandTotal; //number_format($nSwornLandTotal,2);
         // END
     }
     if (count($improvementsBuildingsList)) {
         foreach ($improvementsBuildingsList as $key => $improvementsBuildings) {
             if ($i < 5) {
                 // buildingClassification
                 $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                 if (is_numeric($improvementsBuildings->getBuildingClassification())) {
                     $improvementsBuildingsClasses->selectRecord($improvementsBuildings->getBuildingClassification());
                     $improvementsBuildingsClassesDescription = $improvementsBuildingsClasses->getDescription();
                     $improvementsBuildingsClassesCode = $improvementsBuildingsClasses->getCode();
                 } else {
                     $improvementsBuildingsClassesDescription = $improvementsBuildings->getBuildingClassification();
                     $improvementsBuildingsClassesCode = $improvementsBuildings->getBuildingClassification();
                 }
                 // actualUse
                 $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
                 if (is_numeric($improvementsBuildings->getActualUse())) {
                     $improvementsBuildingsActualUses->selectRecord($improvementsBuildings->getActualUse());
                     $improvementsBuildingsActualUsesDescription = $improvementsBuildingsActualUses->getDescription();
                     $improvementsBuildingsActualUsesCode = $improvementsBuildingsActualUses->getCode();
                 } else {
                     $improvementsBuildingsActualUsesDescription = $improvementsBuildings->getActualUse();
                     $improvementsBuildingsActualUsesCode = $improvementsBuildings->getActualUse();
                 }
                 //$this->formArray["propertyKind".($i+1)] = "ImprovementsBuildings";
                 //$this->formArray["propertyActualUse".($i+1)] = $improvementsBuildingsActualUsesDescription;
                 //$this->formArray["propertyMarketValue".($i+1)] = $improvementsBuildings->getAdjustedMarketValue();
                 //$this->formArray["propertyAssessmentLevel".($i+1)] = $improvementsBuildings->getAssessmentLevel();
                 //$this->formArray["propertyAssessedValue".($i+1)] = $improvementsBuildings->getAssessedValue();
                 $totalMarketValue += toFloat($improvementsBuildings->getAdjustedMarketValue());
                 $totalAssessedValue += toFloat($improvementsBuildings->getAssessedValue());
                 $nBuildingsTotalAssessedValue += toFloat($improvementsBuildings->getAssessedValue());
                 $nBuildingsTotalAdjustedMarketValue += toFloat($improvementsBuildings->getAdjustedMarketValue());
                 $swornImprovementTotal += toFloat($improvementsBuildings->getAdjustedMarketValue());
                 $swornOverallTotal += toFloat($improvementsBuildings->getAdjustedMarketValue());
                 // $i++;
             }
         }
         $this->formArray["propertyKind" . $i] = "ImprovementsBuildings";
         $this->formArray["propertyActualUse" . $i] = $improvementsBuildingsActualUsesDescription;
         $this->formArray["propertyMarketValue" . $i] = $nBuildingsTotalAdjustedMarketValue;
         $this->formArray["propertyAssessmentLevel" . $i] = $improvementsBuildings->getAssessmentLevel();
         $this->formArray["propertyAssessedValue" . $i] = $nBuildingsTotalAssessedValue;
         $i++;
     }
     if (count($machineriesList)) {
         foreach ($machineriesList as $key => $machineries) {
             if ($i < 5) {
                 // kind
                 $machineriesClasses = new MachineriesClasses();
                 if (is_numeric($machineries->getKind())) {
                     $machineriesClasses->selectRecord($machineries->getKind());
                     $machineriesClassesDescription = $machineriesClasses->getDescription();
                     $machineriesClassesCode = $machineriesClasses->getCode();
                 } else {
                     $machineriesClassesDescription = $machineries->getKind();
                     $machineriesClassesCode = $machineries->getActualUse();
                 }
                 // actualUse
                 $machineriesActualUses = new MachineriesActualUses();
                 if (is_numeric($machineries->getActualUse())) {
                     $machineriesActualUses->selectRecord($machineries->getActualUse());
                     $machineriesActualUsesDescription = $machineriesActualUses->getDescription();
                     $machineriesActualUsesCode = $machineriesActualUses->getCode();
                 } else {
                     $machineriesActualUsesDescription = $machineries->getActualUse();
                     $machineriesActualUsesCode = $machineries->getActualUse();
                 }
                 //$this->formArray["propertyKind".($i+1)] = "Machineries";
                 //$this->formArray["propertyActualUse".($i+1)] = $machineriesActualUsesDescription;
                 //$this->formArray["propertyMarketValue".($i+1)] = $machineries->getAdjustedMarketValue();
                 //$this->formArray["propertyAssessmentLevel".($i+1)] = $machineries->getAssessmentLevel();
                 //$this->formArray["propertyAssessedValue".($i+1)] = $machineries->getAssessedValue();
                 $totalMarketValue += toFloat($machineries->getAdjustedMarketValue());
                 $totalAssessedValue += toFloat($machineries->getAssessedValue());
                 $nMachineriesTotalAssessedValue += toFloat($machineries->getAssessedValue());
                 $nMachineriesTotalAdjustedMarketValue += toFloat($machineries->getAdjustedMarketValue());
                 $swornImprovementTotal += toFloat($machineries->getAdjustedMarketValue());
                 $swornOverallTotal += toFloat($machineries->getAdjustedMarketValue());
                 //			$i++;
             }
         }
         $this->formArray["propertyKind" . $i] = "Machineries";
         $this->formArray["propertyActualUse" . $i] = $machineriesActualUsesDescription;
         $this->formArray["propertyMarketValue" . $i] = $nMachineriesTotalAdjustedMarketValue;
         $this->formArray["propertyAssessmentLevel" . $i] = $machineries->getAssessmentLevel();
         $this->formArray["propertyAssessedValue" . $i] = $nMachineriesTotalAssessedValue;
         $i++;
     }
     // add pre hehe for sworn statement total and machineries
     $this->formArray["swornLandTotal"] = $swornLandTotal;
     $this->formArray["swornImprovementTotal"] = $swornImprovementTotal;
     $this->formArray["swornOverallTotal"] = $swornOverallTotal;
     //	$nSwornImprovementTotal =$nMachineriesTotalAdjustedMarketValue + $nBuildingsTotalAdjustedMarketValue;
     //	$this->formArray["swornImprovementTotal"] =$nSwornImprovementTotal;
     $grandTotalArea = $findingsTotalArea + $bfindingsFloorArea;
     //	$this->formArray["swornOverallTotal"] =$nSwornOverallTotal;
     // end
     $this->formArray["totalMarketValue"] = $totalMarketValue;
     $this->formArray["totalAssessedValue"] = $totalAssessedValue;
     $this->formArray["totalAssessedValueInWords"] = makewords($totalAssessedValue);
 }
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "view":
             $ODList = new SoapObject(NCCBIZ . "ODList.php", "urn:Object");
             // paging
             $condition = " WHERE ";
             $condition .= " " . OD_TABLE . ".odID=" . AFS_TABLE . ".odID ";
             $condition .= " AND " . AFS_TABLE . ".taxability='Taxable' ";
             $condition .= $this->filterArchives();
             $sqlCount = "SELECT COUNT(" . OD_TABLE . ".odID) as count FROM ";
             $sqlCount .= OD_TABLE . ", ";
             $sqlCount .= AFS_TABLE . " ";
             $sqlCount .= $condition;
             $dbCount = new DB_RPTS();
             $dbCount->query($sqlCount);
             if ($dbCount->next_record()) {
                 $count = $dbCount->f("count");
                 $numOfPages = ceil($count / PAGE_BY);
                 $this->tpl->set_var("currentPage", $this->formArray["page"]);
                 $this->tpl->set_var("numOfPages", $numOfPages);
                 $this->tpl->set_block("rptsTemplate", "PageListOne", "PageListOneBlock");
                 for ($p = 1; $p <= $numOfPages; $p++) {
                     $this->tpl->set_var("page", $p);
                     $this->initSelected("page", $p);
                     $this->tpl->parse("PageListOneBlock", "PageListOne", true);
                 }
             } else {
                 $this->tpl->set_block("rptsTemplate", "PageNavigationOne", "PageNavigationOneBlock");
                 $this->tpl->set_var("PageNavigationOneBlock", "");
                 $count = 0;
             }
             // listing
             $sql = "SELECT " . OD_TABLE . ".odID as odID, ";
             $sql .= AFS_TABLE . ".afsID as afsID FROM ";
             $sql .= OD_TABLE . ", ";
             $sql .= AFS_TABLE . " ";
             if ($this->formArray["page"] > 0) {
                 $initialLimit = ($this->formArray["page"] - 1) * PAGE_BY;
                 $condition .= " LIMIT " . $initialLimit . "," . PAGE_BY;
             }
             $sql = $sql . $condition;
             $db = new DB_RPTS();
             $db->query($sql);
             $odRecords = new ODRecords();
             while ($db->next_record()) {
                 $od = new OD();
                 $od->selectRecord($db->f("odID"));
                 $odRecords->arrayList[] = $od;
             }
             if (!is_array($odRecords->getArrayList())) {
                 $this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
                 $this->tpl->set_var("message", "properties not found");
                 $this->tpl->parse("NotFoundBlock", "NotFound", true);
                 $this->tpl->set_block("rptsTemplate", "Report", "ReportBlock");
                 $this->tpl->set_var("ReportBlock", "");
             } else {
                 $list = $odRecords->getArrayList();
                 if (count($list)) {
                     $this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
                     $this->tpl->set_var("NotFoundBlock", "");
                     $this->tpl->set_block("rptsTemplate", "ReportList", "ReportListBlock");
                     foreach ($list as $key => $value) {
                         $afs = $this->getAFSDetails($value->getOdID());
                         if (is_object($afs)) {
                             $this->tpl->set_var("taxability", $afs->getTaxability());
                             if ($afs->getTaxability() == "Taxable") {
                                 //$this->formArray["odID"] = $value->getOdID();
                                 //$this->formArray["afsID"] = $afs->getAfsID();
                                 $td = new TD();
                                 if ($td->selectRecord("", $this->formArray["afsID"])) {
                                     $this->tpl->set_var("taxDeclarationNumber", $td->getTaxDeclarationNumber());
                                 } else {
                                     $this->tpl->set_var("taxDeclarationNumber", "");
                                 }
                                 $locationAddress = $value->locationAddress->getFullAddress();
                                 $this->tpl->set_var("locationAddress", $locationAddress);
                                 $this->tpl->set_var("area", $value->getLandArea());
                                 $this->tpl->set_var("propertyIndexNumber", $afs->getPropertyIndexNumber());
                                 $this->tpl->set_var("marketValue", number_format($afs->getTotalMarketValue()));
                                 $this->tpl->set_var("assessedValue", number_format($afs->getTotalAssessedValue(), 2, '.', ','));
                                 $landList = $afs->getLandArray();
                                 $plantsTreesList = $afs->getPlantsTreesArray();
                                 $improvementsBuildingsList = $afs->getImprovementsBuildingsArray();
                                 $machineriesList = $afs->getMachineriesArray();
                                 $kind = "";
                                 $class = "";
                                 $remarks = "";
                                 if (count($landList)) {
                                     $kind = "Land";
                                     $land = $landList[0];
                                     $class = $land->getClassification();
                                     $landClasses = new LandClasses();
                                     $landClasses->selectRecord($class);
                                     $class = $landClasses->getDescription();
                                     $remarks = $land->getMemoranda();
                                 } else {
                                     if (count($plantsTreesList)) {
                                         $kind = "Land";
                                         $plantsTrees = $plantsTreesList[0];
                                         $class = $plantsTrees->getProductClass();
                                         $plantsTreesClasses = new PlantsTreesClasses();
                                         $plantsTreesClasses->selectRecord($class);
                                         $class = $plantsTreesClasses->getDescription();
                                         $remarks = $plantsTrees->getMemoranda();
                                     } else {
                                         if (count($improvementsBuildingsList)) {
                                             $kind = "Improvements/Buildings";
                                             $improvementsBuildings = $improvementsBuildingsList[0];
                                             $class = $improvementsBuildings->getBuildingClassification();
                                             $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                                             $improvementsBuildingsClasses->selectRecord($class);
                                             $class = $improvementsBuildingsClasses->getDescription();
                                             $remarks = $improvementsBuildings->getMemoranda();
                                         } else {
                                             if (count($machineriesList)) {
                                                 $kind = "Machineries";
                                                 $machineries = $machineriesList[0];
                                                 $class = $machineries->getKind();
                                                 $remarks = $machineries->getMemoranda();
                                             }
                                         }
                                     }
                                 }
                                 $this->tpl->set_var("kind", $kind);
                                 $this->tpl->set_var("classification", $class);
                                 $this->tpl->set_var("remarks", $remarks);
                                 $oValue = $value->owner;
                                 if (count($oValue->personArray)) {
                                     $firstOwner = $oValue->personArray[0]->getLastName();
                                     $firstOwner .= ", ";
                                     $firstOwner .= $oValue->personArray[0]->getFirstName();
                                     $firstOwner .= " ";
                                     $firstOwner .= substr($oValue->personArray[0]->getMiddleName(), 0, 1) . ".";
                                     $pAddress = $oValue->personArray[0]->addressArray ? $oValue->personArray[0]->addressArray[0]->getFullAddress() : "no address";
                                     $firstOwnerAddress = $pAddress;
                                     $firstOwnerTelephone = $oValue->personArray[0]->getTelephone();
                                     $this->tpl->set_var("firstOwner", $firstOwner);
                                     $this->tpl->set_var("firstOwnerAddress", $firstOwnerAddress);
                                     //$this->tpl->set_var("firstOwnerTelephone", $firstOwnerTelephone);
                                 }
                                 if (count($oValue->companyArray)) {
                                     if ($firstOwner == "") {
                                         $firstOwner = $oValue->companyArray[0]->getCompanyName();
                                         $cAddress = $oValue->companyArray[0]->addressArray ? $oValue->companyArray[0]->addressArray[0]->getFullAddress() : "no \taddress";
                                         $firstOwnerAddress = $cAddress;
                                         $firstOwnerTelephone = $oValue->companyArray[0]->getTelephone();
                                         $this->tpl->set_var("firstOwner", $firstOwner);
                                         $this->tpl->set_var("firstOwnerAddress", $firstOwnerAddress);
                                         //$this->tpl->set_var("firstOwnerTelephone", $firstOwnerTelephone);
                                     }
                                 }
                                 if ($firstOwner != "") {
                                     $this->tpl->set_var("none", "");
                                     if (count($oValue->personArray) + count($oValue->companyArray) > 1) {
                                         $this->tpl->set_var("andOthers", "(and others)");
                                     } else {
                                         $this->tpl->set_var("andOthers", "");
                                     }
                                 } else {
                                     $this->tpl->set_var("none", "none");
                                     $this->tpl->set_var("firstOwner", "");
                                     $this->tpl->set_var("andOthers", "");
                                     $this->tpl->set_var("firstOwnerAddress", "");
                                     $this->tpl->set_var("firstOwnerTelephone", "");
                                 }
                                 $this->tpl->parse("ReportListBlock", "ReportList", true);
                             }
                         }
                     }
                 }
             }
             break;
         default:
             $this->tpl->set_block("rptsTemplate", "NotFound", "NotFoundBlock");
             $this->tpl->set_var("message", "select a location to view report");
             $this->tpl->parse("NotFoundBlock", "NotFound", true);
             $this->tpl->set_block("rptsTemplate", "Report", "ReportBlock");
             $this->tpl->set_var("ReportBlock", "");
             break;
     }
     $this->setForm();
     $this->tpl->set_var("Session", $this->sess->url(""));
     $this->tpl->set_var("rpts_Session", $this->sess->id);
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "edit":
             $this->tpl->set_var("MessageBlock", "");
             $ImprovementsBuildingsClassesDetails = new SoapObject(NCCBIZ . "ImprovementsBuildingsClassesDetails.php", "urn:Object");
             if (!($xmlStr = $ImprovementsBuildingsClassesDetails->getImprovementsBuildingsClassesDetails($this->formArray["improvementsBuildingsClassesID"]))) {
                 $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                 $this->tpl->set_var("TableBlock", "record not found");
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                     $this->tpl->set_var("TableBlock", "error xmlDoc");
                 } else {
                     $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                     $improvementsBuildingsClasses->parseDomDocument($domDoc);
                     $this->formArray["improvementsBuildingsClassesID"] = $improvementsBuildingsClasses->getImprovementsBuildingsClassesID();
                     $this->formArray["code"] = $improvementsBuildingsClasses->getCode();
                     $this->formArray["description"] = $improvementsBuildingsClasses->getDescription();
                     $this->formArray["rangeLowerBound"] = $improvementsBuildingsClasses->getRangeLowerBound();
                     $this->formArray["rangeUpperBound"] = $improvementsBuildingsClasses->getRangeUpperBound();
                     $this->formArray["value"] = $improvementsBuildingsClasses->getValue();
                     $this->formArray["type"] = $improvementsBuildingsClasses->getType();
                     $this->formArray["status"] = $improvementsBuildingsClasses->getStatus();
                 }
             }
             break;
         case "save":
             if ($this->codeAlreadyExists() == true) {
                 $this->message = "Error. Cannot Save. Code already exists.";
                 $this->tpl->set_var("message", $this->message);
                 $this->tpl->parse("MessageBlock", "Message", true);
                 break;
             } else {
                 $this->tpl->set_var("MessageBlock", "");
             }
             $ImprovementsBuildingsClassesEncode = new SoapObject(NCCBIZ . "ImprovementsBuildingsClassesEncode.php", "urn:Object");
             if ($this->formArray["improvementsBuildingsClassesID"] != "") {
                 $ImprovementsBuildingsClassesDetails = new SoapObject(NCCBIZ . "ImprovementsBuildingsClassesDetails.php", "urn:Object");
                 if (!($xmlStr = $ImprovementsBuildingsClassesDetails->getImprovementsBuildingsClassesDetails($this->formArray["improvementsBuildingsClassesID"]))) {
                     exit("record not found");
                 } else {
                     if (!($domDoc = domxml_open_mem($xmlStr))) {
                         $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                         $this->tpl->set_var("TableBlock", "error xmlDoc");
                     } else {
                         $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                         $improvementsBuildingsClasses->parseDomDocument($domDoc);
                         $improvementsBuildingsClasses->setImprovementsBuildingsClassesID($this->formArray["improvementsBuildingsClassesID"]);
                         $improvementsBuildingsClasses->setCode($this->formArray["code"]);
                         $improvementsBuildingsClasses->setDescription($this->formArray["description"]);
                         $improvementsBuildingsClasses->setRangeLowerBound($this->formArray["rangeLowerBound"]);
                         $improvementsBuildingsClasses->setRangeUpperBound($this->formArray["rangeUpperBound"]);
                         $improvementsBuildingsClasses->setValue($this->formArray["value"]);
                         $improvementsBuildingsClasses->setType($this->formArray["type"]);
                         $improvementsBuildingsClasses->setStatus($this->formArray["status"]);
                         $improvementsBuildingsClasses->setDomDocument();
                         $doc = $improvementsBuildingsClasses->getDomDocument();
                         $xmlStr = $doc->dump_mem(true);
                         if (!($ret = $ImprovementsBuildingsClassesEncode->updateImprovementsBuildingsClasses($xmlStr))) {
                             exit("error update");
                         }
                     }
                 }
             } else {
                 $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                 $improvementsBuildingsClasses->setImprovementsBuildingsClassesID($this->formArray["improvementsBuildingsClassesID"]);
                 $improvementsBuildingsClasses->setCode($this->formArray["code"]);
                 $improvementsBuildingsClasses->setDescription($this->formArray["description"]);
                 $improvementsBuildingsClasses->setRangeLowerBound($this->formArray["rangeLowerBound"]);
                 $improvementsBuildingsClasses->setRangeUpperBound($this->formArray["rangeUpperBound"]);
                 $improvementsBuildingsClasses->setValue($this->formArray["value"]);
                 $improvementsBuildingsClasses->setType($this->formArray["type"]);
                 $improvementsBuildingsClasses->setStatus($this->formArray["status"]);
                 $improvementsBuildingsClasses->setDomDocument();
                 $doc = $improvementsBuildingsClasses->getDomDocument();
                 $xmlStr = $doc->dump_mem(true);
                 if (!($ret = $ImprovementsBuildingsClassesEncode->saveImprovementsBuildingsClasses($xmlStr))) {
                     exit("error save");
                 }
             }
             $this->formArray["improvementsBuildingsClassesID"] = $ret;
             header("location: ImprovementsBuildingsClassesClose.php" . $this->sess->url("") . $this->sess->add_query(array("improvementsBuildingsClassesID" => $ret)));
             //header("location: ImprovementsBuildingsClassesEncode.php");
             exit;
             break;
         case "cancel":
             header("location: ImprovementsBuildingsClassesClose.php" . $this->sess->url("") . $this->sess->add_query(array("improvementsBuildingsClassesID" => $ret)));
             //header("location: ImprovementsBuildingsClassesList.php");
             exit;
             break;
         default:
             $this->tpl->set_block("rptsTemplate", "ImprovementsBuildingsClassesID", "ImprovementsBuildingsClassesIDBlock");
             $this->tpl->set_var("ImprovementsBuildingsClassesIDBlock", "");
             $this->tpl->set_block("rptsTemplate", "ACK", "ACKBlock");
             $this->tpl->set_var("ACKBlock", "");
             $this->tpl->set_var("MessageBlock", "");
     }
     $this->setForm();
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Beispiel #18
0
 function displayImprovementsBuildings($improvementsBuildings)
 {
     if ($improvementsBuildings) {
         $this->displayDetails($improvementsBuildings);
         foreach ($improvementsBuildings as $ikey => $ivalue) {
             if (is_numeric($pvalue)) {
                 switch ($ikey) {
                     case "buildingClassification":
                         $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                         $improvementsBuildingsClasses->selectRecord($ivalue);
                         $this->tpl->set_var("buildingClassification", $improvementsBuildingsClasses->getDescription());
                         break;
                     case "actualUse":
                         $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
                         $improvementsBuildingsActualUses->selectRecord($ivalue);
                         $this->tpl->set_var("actualUse", $improvementsBuildingsActualUses->getDescription());
                         break;
                 }
             }
         }
         $this->tpl->parse("ImprovementsBuildingsBlock", "ImprovementsBuildings", true);
     } else {
         $this->tpl->set_block("TDList", "ImprovementsBuildings", "ImprovementsBuildingsBlock");
         $this->tpl->set_var("ImprovementsBuildingsBlock", "");
     }
 }
Beispiel #19
0
 function displayAssessedValues($landList, $plantsTreesList, $improvementsBuildingsList, $machineriesList)
 {
     $totalMarketValue = 0;
     $totalAssessedValue = 0;
     $totalArea = 0;
     // RC 20091008
     $nLandTotalAssessedValue = 0;
     $nLandTotalAdjustedMarketValue = 0;
     $nLandTotalArea = 0;
     $nPlantsTotalAssessedValue = 0;
     $nPlantsTotalAdjustedMarketValue = 0;
     $nBuildingsTotalAssessedValue = 0;
     $nBuildingsTotalAdjustedMarketValue = 0;
     $nBuildingsTotalArea = 0;
     // RC 20091008
     $nMachineriesTotalAssessedValue = 0;
     $nMachineriesTotalAdjustedMarketValue = 0;
     $swornLandTotal = 0;
     $swornImprovementTotal = 0;
     $swornOverallTotal = 0;
     $i = 1;
     $flag = 0;
     $counter = 0;
     $summlvl = 0;
     $summuse = "";
     $summcla = "";
     //RC 20091001  for summary total by Use & level
     if (count($landList)) {
         $this->formArray["kindIsLand"] = "X";
         // RC 20091006
         foreach ($landList as $key => $land) {
             if ($i < 5) {
                 // classification
                 $landClasses = new LandClasses();
                 if (is_numeric($land->getClassification())) {
                     $landClasses->selectRecord($land->getClassification());
                     $landClassesDescription = $landClasses->getDescription();
                     $landClassesCode = $landClasses->getCode();
                 } else {
                     $landClassesDescription = $land->getClassification();
                     $landClassesCode = $land->getClassification();
                 }
                 // subClass
                 $landSubclasses = new LandSubclasses();
                 if (is_numeric($land->getSubClass())) {
                     $landSubclasses->selectRecord($land->getSubClass());
                     $landSubclassesDescription = $landSubclasses->getDescription();
                     $landSubclassesCode = $landSubclasses->getCode();
                 } else {
                     $landSubclassesDescription = $land->getSubClass();
                     $landSubclassesCode = $land->getSubClass();
                 }
                 // actualUse
                 $landActualUses = new LandActualUses();
                 if (is_numeric($land->getActualUse())) {
                     $landActualUses->selectRecord($land->getActualUse());
                     $landActualUsesDescription = $landActualUses->getDescription();
                     $landActualUsesCode = $landActualUses->getCode();
                 } else {
                     $landActualUsesDescription = $land->getActualUse();
                     $landActualUsesCode = $land->getActualUse();
                 }
                 // add pre new
                 if ($landActualUsesCode == "RE" || $landActualUsesCode == "COM" || $landActualUsesCode == "IND" || $landActualUsesCode == "MI" || $landActualUsesCode == "TI" || $landActualUsesCode == "SP") {
                     $tempname = $landActualUsesDescription;
                     $counter += 1;
                 }
                 // end of2 add
                 $totalMarketValue += toFloat($land->getAdjustedMarketValue());
                 $totalAssessedValue += toFloat($land->getAssessedValue());
                 $swornLandTotal += toFloat($land->getAdjustedMarketValue());
                 $swornOverallTotal += toFloat($land->getAdjustedMarketValue());
                 // display the summary of lands value
                 if ($counter > 0) {
                     $this->formArray["propertyActualUse" . $i] = $tempname;
                 } else {
                     $this->formArray["propertyActualUse" . $i] = "Agricultural";
                 }
                 //RC 20091001 To properly report summary by Actual Use and Level
                 $thislvl = $land->getAssessmentLevel();
                 $thisuse = $landActualUsesDescription;
                 if ($summuse == '') {
                     //RC first record
                     $summlvl = $thislvl;
                     $summuse = $thisuse;
                     $summcla = $landClassesDescription;
                     $nLandTotalArea = 0;
                     $nLandTotalAssessedValue = 0;
                     $nLandTotalAdjustedMarketValue = 0;
                 }
                 if ($summlvl != $thislvl || $summuse != $thisuse) {
                     //RC print if new assessment level or new actual use
                     $this->formArray["propertyKind" . $i] = "Land";
                     $this->formArray["classification" . $i] = $summcla;
                     $this->formArray["propertyActualUse" . $i] = $summuse;
                     $this->formArray["findingsTotalArea" . $i] = $nLandTotalArea;
                     $this->formArray["propertyMarketValue" . $i] = $nLandTotalAdjustedMarketValue;
                     $this->formArray["propertyAssessmentLevel" . $i] = $summlvl . "%";
                     $this->formArray["propertyAssessedValue" . $i] = $nLandTotalAssessedValue;
                     $i++;
                     $nLandTotalAssessedValue = 0;
                     $nLandTotalAdjustedMarketValue = 0;
                     $nLandTotalArea = 0;
                     $summlvl = $thislvl;
                     $summuse = $thisuse;
                     $summcla = $landClassesDescription;
                 }
                 $nLandTotalAssessedValue += toFloat($land->getAssessedValue());
                 $nLandTotalAdjustedMarketValue += toFloat($land->getAdjustedMarketValue());
                 $nLandTotalArea += toFloat($land->getArea());
             }
         }
         $this->formArray["propertyKind" . $i] = "Land";
         $this->formArray["classification" . $i] = $summcla;
         $this->formArray["propertyActualUse" . $i] = $summuse;
         $this->formArray["findingsTotalArea" . $i] = $nLandTotalArea;
         $this->formArray["propertyMarketValue" . $i] = $nLandTotalAdjustedMarketValue;
         $this->formArray["propertyAssessmentLevel" . $i] = $summlvl . "%";
         $this->formArray["propertyAssessedValue" . $i] = $nLandTotalAssessedValue;
         $i++;
         // end of summary of lands
     }
     if (count($plantsTreesList)) {
         $this->formArray["kindIsOthers"] = "X";
         // RC 20091006
         foreach ($plantsTreesList as $key => $plantsTrees) {
             if ($i < 5) {
                 // productClass
                 $plantsTreesClasses = new PlantsTreesClasses();
                 if (is_numeric($plantsTrees->getProductClass())) {
                     $plantsTreesClasses->selectRecord($plantsTrees->getProductClass());
                     $plantsTreesClassesDescription = $plantsTreesClasses->getDescription();
                     $plantsTreesClassesCode = $plantsTreesClasses->getCode();
                 } else {
                     $plantsTreesClassesDescription = $plantsTrees->getProductClass();
                     $plantsTreesClassesCode = $plantsTrees->getProductClass();
                 }
                 // actualUse
                 $plantsTreesActualUses = new PlantsTreesActualUses();
                 if (is_numeric($plantsTrees->getActualUse())) {
                     $plantsTreesActualUses->selectRecord($plantsTrees->getActualUse());
                     $plantsTreesActualUsesDescription = $plantsTreesActualUses->getDescription();
                     $plantsTreesActualUsesCode = $plantsTreesActualUses->getCode();
                 } else {
                     $plantsTreesActualUsesDescription = $plantsTrees->getActualUse();
                     $plantsTreesActualUsesCode = $plantsTrees->getActualUse();
                 }
                 //$this->formArray["propertyKind".($i+1)] = "PlantsTrees";
                 //$this->formArray["propertyActualUse".($i+1)] =$plantsTreesActualUsesDescription;
                 //$this->formArray["propertyMarketValue".($i+1)] =$plantsTrees->getAdjustedMarketValue();
                 //$this->formArray["propertyAssessmentLevel".($i+1)] = $plantsTrees->getAssessmentLevel();
                 //$this->formArray["propertyAssessedValue".($i+1)] = $plantsTrees->getAssessedValue();
                 $totalMarketValue += toFloat($plantsTrees->getAdjustedMarketValue());
                 $totalAssessedValue += toFloat($plantsTrees->getAssessedValue());
                 $nPlantsTotalAssessedValue += toFloat($plantsTrees->getAssessedValue());
                 $nPlantsTotalAdjustedMarketValue += toFloat($plantsTrees->getAdjustedMarketValue());
                 $swornLandTotal += toFloat($plantsTrees->getAdjustedMarketValue());
                 $swornOverallTotal += toFloat($plantsTrees->getAdjustedMarketValue());
                 //$i++;
             }
         }
         $this->formArray["propertyKind" . $i] = "PlantTrees";
         //inserted May 31, 2008
         $this->formArray["classification" . $i] = $plantsTreesClassesDescription;
         $this->formArray["propertyActualUse" . $i] = $plantsTreesActualUsesDescription;
         $this->formArray["propertyMarketValue" . $i] = $nPlantsTotalAdjustedMarketValue;
         $this->formArray["propertyAssessmentLevel" . $i] = $plantsTrees->getAssessmentLevel();
         $this->formArray["propertyAssessedValue" . $i] = $nPlantsTotalAssessedValue;
         $i++;
         // additional new line for total of LAND AND PLANT TREES
         //		$nSwornLandTotal =$nPlantsTotalAdjustedMarketValue + $nLandTotalAdjustedMarketValue;
         //		$this->formArray["swornLandTotal"] =$nSwornLandTotal; //number_format($nSwornLandTotal,2);
         // END
     }
     if (count($improvementsBuildingsList)) {
         $this->formArray["kindIsBuilding"] = "X";
         // RC 20091006
         //			$this->formArray["numberOfStoreys"] = $improvementsBuildings->getNumberOfStoreys();
         $nBuildingTotalArea = 0;
         $nBuildingTotalAssessedValue = 0;
         $nBuildingTotalAdjustedMarketValue = 0;
         foreach ($improvementsBuildingsList as $key => $improvementsBuildings) {
             if ($i < 5) {
                 // buildingClassification
                 $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
                 if (is_numeric($improvementsBuildings->getBuildingClassification())) {
                     $improvementsBuildingsClasses->selectRecord($improvementsBuildings->getBuildingClassification());
                     $improvementsBuildingsClassesDescription = $improvementsBuildingsClasses->getDescription();
                     $improvementsBuildingsClassesCode = $improvementsBuildingsClasses->getCode();
                 } else {
                     $improvementsBuildingsClassesDescription = $improvementsBuildings->getBuildingClassification();
                     $improvementsBuildingsClassesCode = $improvementsBuildings->getBuildingClassification();
                 }
                 // actualUse
                 $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
                 if (is_numeric($improvementsBuildings->getActualUse())) {
                     $improvementsBuildingsActualUses->selectRecord($improvementsBuildings->getActualUse());
                     $improvementsBuildingsActualUsesDescription = $improvementsBuildingsActualUses->getDescription();
                     $improvementsBuildingsActualUsesCode = $improvementsBuildingsActualUses->getCode();
                 } else {
                     $improvementsBuildingsActualUsesDescription = $improvementsBuildings->getActualUse();
                     $improvementsBuildingsActualUsesCode = $improvementsBuildings->getActualUse();
                 }
                 $totalMarketValue += toFloat($improvementsBuildings->getAdjustedMarketValue());
                 $totalAssessedValue += toFloat($improvementsBuildings->getAssessedValue());
                 $totalArea += $improvementsBuildings->getTotalBuildingArea();
                 // RC 20091008
                 $thislvl = $improvementsBuildings->getAssessmentLevel();
                 $thisuse = $improvementsBuildingsActualUsesDescription;
                 if ($summuse == '') {
                     //RC first record
                     $summlvl = $thislvl;
                     $summuse = $thisuse;
                     $summcla = $improvementsBuildingsClassesDescription;
                 }
                 if ($summlvl != $thislvl || $summuse != $thisuse) {
                     //RC print if new assessment level or new actual use
                     $this->formArray["propertyKind" . $i] = "Land";
                     $this->formArray["classification" . $i] = $summcla;
                     $this->formArray["propertyActualUse" . $i] = $summuse;
                     $this->formArray["findingsTotalArea" . $i] = $nBuildingTotalArea;
                     $this->formArray["propertyMarketValue" . $i] = $nBuildingTotalAdjustedMarketValue;
                     $this->formArray["propertyAssessmentLevel" . $i] = $summlvl . "%";
                     $this->formArray["propertyAssessedValue" . $i] = $nBuildingTotalAssessedValue;
                     $i++;
                     $nBuildingTotalAssessedValue = 0;
                     $nBuildingTotalAdjustedMarketValue = 0;
                     $nBuildingTotalArea = 0;
                     $summlvl = $thislvl;
                     $summuse = $thisuse;
                     $summcla = $improvementsBuildingsClassesDescription;
                 }
                 $nBuildingTotalAssessedValue += toFloat($improvementsBuildings->getAssessedValue());
                 $nBuildingTotalAdjustedMarketValue += toFloat($improvementsBuildings->getAdjustedMarketValue());
                 $nBuildingTotalArea += toFloat($improvementsBuildings->getTotalBuildingArea());
                 $swornImprovementTotal += toFloat($improvementsBuildings->getAdjustedMarketValue());
                 $swornOverallTotal += toFloat($improvementsBuildings->getAdjustedMarketValue());
             }
         }
         $this->formArray["propertyKind" . $i] = "ImprovementsBuildings";
         $this->formArray["classification" . $i] = $improvementsBuildingsClassesDescription;
         $this->formArray["propertyActualUse" . $i] = $improvementsBuildingsActualUsesDescription;
         $this->formArray["findingsTotalArea" . $i] = $nBuildingTotalArea;
         $this->formArray["propertyMarketValue" . $i] = $nBuildingTotalAdjustedMarketValue;
         $this->formArray["propertyAssessmentLevel" . $i] = $improvementsBuildings->getAssessmentLevel() . "%";
         $this->formArray["propertyAssessedValue" . $i] = $nBuildingTotalAssessedValue;
         $i++;
         $this->formArray["findingsTotalArea"] = $totalArea;
         //RC 20091008
     }
     if (count($machineriesList)) {
         $this->formArray["kindIsMachinery"] = "X";
         // RC 20091006
         foreach ($machineriesList as $key => $machineries) {
             if ($i < 5) {
                 // kind
                 $machineriesClasses = new MachineriesClasses();
                 if (is_numeric($machineries->getKind())) {
                     $machineriesClasses->selectRecord($machineries->getKind());
                     $machineriesClassesDescription = $machineriesClasses->getDescription();
                     $machineriesClassesCode = $machineriesClasses->getCode();
                 } else {
                     $machineriesClassesDescription = $machineries->getKind();
                     $machineriesClassesCode = $machineries->getActualUse();
                 }
                 // actualUse
                 $machineriesActualUses = new MachineriesActualUses();
                 if (is_numeric($machineries->getActualUse())) {
                     $machineriesActualUses->selectRecord($machineries->getActualUse());
                     $machineriesActualUsesDescription = $machineriesActualUses->getDescription();
                     $machineriesActualUsesCode = $machineriesActualUses->getCode();
                 } else {
                     $machineriesActualUsesDescription = $machineries->getActualUse();
                     $machineriesActualUsesCode = $machineries->getActualUse();
                 }
                 $totalMarketValue += toFloat($machineries->getAdjustedMarketValue());
                 $totalAssessedValue += toFloat($machineries->getAssessedValue());
                 $nMachineriesTotalAssessedValue += toFloat($machineries->getAssessedValue());
                 $nMachineriesTotalAdjustedMarketValue += toFloat($machineries->getAdjustedMarketValue());
                 $swornImprovementTotal += toFloat($machineries->getAdjustedMarketValue());
                 $swornOverallTotal += toFloat($machineries->getAdjustedMarketValue());
                 //			$i++;
             }
         }
         $this->formArray["propertyKind" . $i] = "Machineries";
         $this->formArray["classification" . $i] = $machineriesClassesDescription;
         $this->formArray["propertyActualUse" . $i] = $machineriesActualUsesDescription;
         $this->formArray["propertyMarketValue" . $i] = $nMachineriesTotalAdjustedMarketValue;
         $this->formArray["propertyAssessmentLevel" . $i] = $machineries->getAssessmentLevel();
         $this->formArray["propertyAssessedValue" . $i] = $nMachineriesTotalAssessedValue;
         $i++;
     }
     // add pre hehe for sworn statement total and machineries
     $this->formArray["swornLandTotal"] = $swornLandTotal;
     $this->formArray["swornImprovementTotal"] = $swornImprovementTotal;
     $this->formArray["swornOverallTotal"] = $swornOverallTotal;
     //	$nSwornImprovementTotal =$nMachineriesTotalAdjustedMarketValue + $nBuildingsTotalAdjustedMarketValue;
     //	$this->formArray["swornImprovementTotal"] =$nSwornImprovementTotal;
     //	$nSwornOverallTotal =$nSwornImprovementTotal + $nSwornLandTotal;
     //	$this->formArray["swornOverallTotal"] =$nSwornOverallTotal;
     // end
     $this->formArray["totalMarketValue"] = $totalMarketValue;
     $this->formArray["totalAssessedValue"] = $totalAssessedValue;
     $this->formArray["totalAssessedValueInWords"] = makewords($totalAssessedValue);
 }
Beispiel #20
0
 function displayImprovementsBuildingsList($improvementsBuildingsList)
 {
     if (count($improvementsBuildingsList)) {
         foreach ($improvementsBuildingsList as $bkey => $improvementsBuildings) {
             // buildingClassification
             $improvementsBuildingsClasses = new ImprovementsBuildingsClasses();
             if (is_numeric($improvementsBuildings->getBuildingClassification())) {
                 $improvementsBuildingsClasses->selectRecord($improvementsBuildings->getBuildingClassification());
                 $improvementsBuildingsClassesDescription = $improvementsBuildingsClasses->getDescription();
                 $improvementsBuildingsClassesCode = $improvementsBuildingsClasses->getCode();
             } else {
                 $improvementsBuildingsClassesDescription = $improvementsBuildings->getBuildingClassification();
                 $improvementsBuildingsClassesCode = $improvementsBuildings->getBuildingClassification();
             }
             // just in case actualUse needs to be drawn from improvementsBuildings
             // actualUse
             $improvementsBuildingsActualUses = new ImprovementsBuildingsActualUses();
             if (is_numeric($improvementsBuildings->getActualUse())) {
                 $improvementsBuildingsActualUses->selectRecord($improvementsBuildings->getActualUse());
                 $improvementsBuildingsActualUsesDescription = $improvementsBuildingsActualUses->getDescription();
                 $improvementsBuildingsActualUsesCode = $improvementsBuildingsActualUses->getCode();
             } else {
                 $improvementsBuildingsActualUsesDescription = $improvementsBuildings->getActualUse();
                 $improvementsBuildingsActualUsesCode = $improvementsBuildings->getActualUse();
             }
             if ($this->formArray["p"] <= 24) {
                 $p = $this->formArray["p"];
                 $this->formArray["kind" . $p] = $improvementsBuildings->getKind();
                 $this->formArray["classification" . $p] = $improvementsBuildingsClassesDescription;
                 $this->formArray["landActualUses" . $p] = $improvementsBuildingsActualUsesDescription;
                 $this->formArray["propertyMarketValue" . $p] = un_number_format($improvementsBuildings->getAdjustedMarketValue());
                 $this->formArray["assessmentLevel" . $p] = un_number_format($improvementsBuildings->getAssessmentLevel());
                 $this->formArray["assessedValue" . $p] = un_number_format($improvementsBuildings->getAssessedValue());
                 $this->formArray["totalMarketValue"] += un_number_format($this->formArray["propertyMarketValue" . $p]);
                 $this->formArray["totalAssessedValue"] += un_number_format($this->formArray["assessedValue" . $p]);
                 $this->formArray["p"]++;
             }
         }
     }
 }