function Main() { switch ($this->formArray["formAction"]) { case "edit": $this->tpl->set_var("MessageBlock", ""); $PlantsTreesClassesDetails = new SoapObject(NCCBIZ . "PlantsTreesClassesDetails.php", "urn:Object"); if (!($xmlStr = $PlantsTreesClassesDetails->getPlantsTreesClassesDetails($this->formArray["plantsTreesClassesID"]))) { $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 { $plantsTreesClasses = new PlantsTreesClasses(); $plantsTreesClasses->parseDomDocument($domDoc); $this->formArray["plantsTreesClassesID"] = $plantsTreesClasses->getPlantsTreesClassesID(); $this->formArray["code"] = $plantsTreesClasses->getCode(); $this->formArray["description"] = $plantsTreesClasses->getDescription(); $this->formArray["value"] = $plantsTreesClasses->getValue(); $this->formArray["status"] = $plantsTreesClasses->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", ""); } $PlantsTreesClassesEncode = new SoapObject(NCCBIZ . "PlantsTreesClassesEncode.php", "urn:Object"); if ($this->formArray["plantsTreesClassesID"] != "") { $PlantsTreesClassesDetails = new SoapObject(NCCBIZ . "PlantsTreesClassesDetails.php", "urn:Object"); if (!($xmlStr = $PlantsTreesClassesDetails->getPlantsTreesClassesDetails($this->formArray["plantsTreesClassesID"]))) { 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 { $plantsTreesClasses = new PlantsTreesClasses(); $plantsTreesClasses->parseDomDocument($domDoc); $plantsTreesClasses->setPlantsTreesClassesID($this->formArray["plantsTreesClassesID"]); $plantsTreesClasses->setCode($this->formArray["code"]); $plantsTreesClasses->setDescription($this->formArray["description"]); $plantsTreesClasses->setValue($this->formArray["value"]); $plantsTreesClasses->setStatus($this->formArray["status"]); $plantsTreesClasses->setDomDocument(); $doc = $plantsTreesClasses->getDomDocument(); $xmlStr = $doc->dump_mem(true); if (!($ret = $PlantsTreesClassesEncode->updatePlantsTreesClasses($xmlStr))) { exit("error update"); } } } } else { $plantsTreesClasses = new PlantsTreesClasses(); $plantsTreesClasses->setPlantsTreesClassesID($this->formArray["plantsTreesClassesID"]); $plantsTreesClasses->setCode($this->formArray["code"]); $plantsTreesClasses->setDescription($this->formArray["description"]); $plantsTreesClasses->setValue($this->formArray["value"]); $plantsTreesClasses->setStatus($this->formArray["status"]); $plantsTreesClasses->setDomDocument(); $doc = $plantsTreesClasses->getDomDocument(); $xmlStr = $doc->dump_mem(true); if (!($ret = $PlantsTreesClassesEncode->savePlantsTreesClasses($xmlStr))) { exit("error save"); } } $this->formArray["plantsTreesClassesID"] = $ret; header("location: PlantsTreesClassesClose.php" . $this->sess->url("") . $this->sess->add_query(array("plantsTreesClassesID" => $ret))); //header("location: PlantsTreesClassesEncode.php"); exit; break; case "cancel": header("location: PlantsTreesClassesClose.php" . $this->sess->url("") . $this->sess->add_query(array("plantsTreesClassesID" => $ret))); //header("location: PlantsTreesClassesList.php"); exit; break; default: $this->tpl->set_block("rptsTemplate", "PlantsTreesClassesID", "PlantsTreesClassesIDBlock"); $this->tpl->set_var("PlantsTreesClassesIDBlock", ""); $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"); }
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); }
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 displayPlantsTreesList($plantsTreesList) { if (count($plantsTreesList)) { $items = ''; $offset = 410; $fp = fopen("/home/site/log/tdplants.log", "w+"); $mv = 0; $al = 0; $av = 0; foreach ($plantsTreesList as $pkey => $plantsTrees) { // 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(); } $plantAU = new PlantsTreesActualUses(); if (is_numeric($plantsTrees->getActualUse())) { $plantAU->selectRecord($plantsTrees->getActualUse()); $plantActualUse = htmlentities($plantAU->getDescription()); } else { $plantActualUse = $plantsTrees->getActualUse(); } /* //just in case actualUse needs to be drawn from plantsTrees // actualUse $plantsTreesClasses = new PlantsTreesActualUses; if(is_numeric($plantsTrees->getActualUse())){ $plantsTreesClassess->selectRecord($plantsTrees->getActualUse()); $plantsTreesClassesDescription = $plantsTreesActualUses->getDescription(); $plantsTreesClassesCode = $plantsTreesActualUses->getCode(); } else{ $plantsTreesClassesDescription = $plantsTrees->getActualUse(); $plantsTreesClassesCode = $plantsTrees->getActualUse(); } */ // if($this->formArray["p"] <= 10){ $lvl = number_format($plantsTrees->getAssessmentLevel(), 2); if ($al != $lvl) { if ($av > 0) { $this->formArray["ypos"] -= 13; $offset = $this->formArray["ypos"]; $plantitems .= "<textitem xpos=\"25\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"left\">" . "Plants/Trees" . "</textitem>"; $plantitems .= "<textitem xpos=\"115\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"9\" align=\"left\">" . $ld . "</textitem>"; $plantitems .= "<textitem xpos=\"337\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($mv, 2) . "</textitem>"; $plantitems .= "<textitem xpos=\"430\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($al, 2) . "</textitem>"; $plantitems .= "<textitem xpos=\"558\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($av, 2) . "</textitem>"; $offsetx = $offset - 3; $plantitems .= "<lineitem x1=\"25\" y1=\"" . $offsetx . "\" x2=\"105\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"115\" y1=\"" . $offsetx . "\" x2=\"228\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"244\" y1=\"" . $offsetx . "\" x2=\"337\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"358\" y1=\"" . $offsetx . "\" x2=\"445\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"457\" y1=\"" . $offsetx . "\" x2=\"558\" y2=\"" . $offsetx . "\">blurb</lineitem>"; } $av = 0; $mv = 0; $al = $lvl; } $ld = $plantActualUse; $mv += $plantsTrees->getAdjustedMarketValue(); $av += un_number_format($plantsTrees->getAssessedValue()); $p = $this->formArray["p"]; $this->formArray["totalMarketValue"] += $plantsTrees->getMarketValue(); $this->formArray["totalAssessedValue"] += un_number_format($plantsTrees->getAssessedValue()); $this->formArray["p"]++; // } } if ($av > 0) { $this->formArray["ypos"] -= 13; $offset = $this->formArray["ypos"]; $plantitems .= "<textitem xpos=\"25\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"left\">" . "Plants/Trees" . "</textitem>"; $plantitems .= "<textitem xpos=\"115\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"9\" align=\"left\">" . $ld . "</textitem>"; $plantitems .= "<textitem xpos=\"337\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($mv, 2) . "</textitem>"; $plantitems .= "<textitem xpos=\"430\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($al, 2) . "</textitem>"; $plantitems .= "<textitem xpos=\"558\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($av, 2) . "</textitem>"; $offsetx = $offset - 3; $plantitems .= "<lineitem x1=\"25\" y1=\"" . $offsetx . "\" x2=\"105\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"115\" y1=\"" . $offsetx . "\" x2=\"228\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"244\" y1=\"" . $offsetx . "\" x2=\"337\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"358\" y1=\"" . $offsetx . "\" x2=\"445\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"457\" y1=\"" . $offsetx . "\" x2=\"558\" y2=\"" . $offsetx . "\">blurb</lineitem>"; } $this->formArray["plantitems"] = $plantitems; } }
function displayPlantsTreesList($plantsTreesList) { if (count($plantsTreesList)) { // NCC Modification checked and implemented by K2 : November 21, 2005 // details: // added lines 286 to 292 with line 288 commented out $items = ''; $offset = 410; //$fp = fopen("/home/site/log/tdplants.log","w+"); $mv = 0; $al = 0; $av = 0; foreach ($plantsTreesList as $pkey => $plantsTrees) { // 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(); } // NCC Modification checked and implemented by K2 : November 21, 2005 // details: // added lines 310 to 317 $plantAU = new PlantsTreesActualUses(); if (is_numeric($plantsTrees->getActualUse())) { $plantAU->selectRecord($plantsTrees->getActualUse()); $plantActualUse = htmlentities($plantAU->getDescription()); } else { $plantActualUse = $plantsTrees->getActualUse(); } /* just in case actualUse needs to be drawn from plantsTrees // 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(); } */ // 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 341 to 368 // - added lines 394 to 412 if ($this->formArray["p"] <= 10) { $lvl = number_format($plantsTrees->getAssessmentLevel(), 2); if ($al != $lvl) { if ($av > 0) { $this->formArray["ypos"] -= 13; $offset = $this->formArray["ypos"]; $plantitems .= "<textitem xpos=\"25\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"left\">" . "Plants/Trees" . "</textitem>"; $plantitems .= "<textitem xpos=\"115\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"9\" align=\"left\">" . $ld . "</textitem>"; $plantitems .= "<textitem xpos=\"337\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($mv, 2) . "</textitem>"; // danny : changed $al to $lvl and added '%' suffix in xml $plantitems .= "<textitem xpos=\"430\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . $lvl . "%</textitem>"; $plantitems .= "<textitem xpos=\"558\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($av, 2) . "</textitem>"; $offsetx = $offset - 3; $plantitems .= "<lineitem x1=\"25\" y1=\"" . $offsetx . "\" x2=\"105\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"115\" y1=\"" . $offsetx . "\" x2=\"228\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"244\" y1=\"" . $offsetx . "\" x2=\"337\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"358\" y1=\"" . $offsetx . "\" x2=\"445\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"457\" y1=\"" . $offsetx . "\" x2=\"558\" y2=\"" . $offsetx . "\">blurb</lineitem>"; } $av = 0; $mv = 0; // danny = changed `$al = $lvl` back to 0 .. don't understand why $al's need to be compared. $al = 0; } $ld = $plantActualUse; $mv += $plantsTrees->getAdjustedMarketValue(); $av += un_number_format($plantsTrees->getAssessedValue()); $p = $this->formArray["p"]; $this->formArray["kind" . $p] = $plantsTrees->getKind(); $this->formArray["classification" . $p] = $plantsTreesClassesDescription; $this->formArray["marketValue" . $p] = un_number_format($plantsTrees->getMarketValue()); $this->formArray["assessmentLevel" . $p] = un_number_format($plantsTrees->getAssessmentLevel()); $this->formArray["assessedValue" . $p] = un_number_format($plantsTrees->getAssessedValue()); } else { if ($this->formArray["p"] > 10) { $this->formArray["othersCount"]++; $this->formArray["othersMV"] += toFloat($plantsTrees->getMarketValue()); $this->formArray["othersAV"] += toFloat($plantsTrees->getAssessedValue()); $this->formArray["kindOthers"] = "Plus " . $this->formArray["othersCount"] . " other(s): P" . formatCurrency($this->formArray["othersMV"]) . " (MV), P" . formatCurrency($this->formArray["othersAV"]) . " (AV)"; /* if($this->formArray["kindOthers"]!="") $this->formArray["kindOthers"] .= "; "; if($this->formArray["kindOthers"]==""){ $this->formArray["kindOthers"] = "Others: "; } $this->formArray["kindOthers"] .= $plantsTrees->getKind(); $this->formArray["kindOthers"] .= " MV=P".formatCurrency($plantsTrees->getMarketValue()); $this->formArray["kindOthers"] .= " AV=P".formatCurrency($plantsTrees->getAssessedValue()); */ } } $this->formArray["totalMarketValue"] += toFloat($plantsTrees->getMarketValue()); $this->formArray["totalAssessedValue"] += toFloat($plantsTrees->getAssessedValue()); $this->formArray["p"]++; } if ($av > 0) { $this->formArray["ypos"] -= 13; $offset = $this->formArray["ypos"]; $plantitems .= "<textitem xpos=\"25\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"left\">" . "Plants/Trees" . "</textitem>"; $plantitems .= "<textitem xpos=\"115\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"9\" align=\"left\">" . $ld . "</textitem>"; $plantitems .= "<textitem xpos=\"337\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($mv, 2) . "</textitem>"; // danny : changed $al to $lvl and added '%' suffix in xml $plantitems .= "<textitem xpos=\"430\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . $lvl . "%</textitem>"; $plantitems .= "<textitem xpos=\"558\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($av, 2) . "</textitem>"; $offsetx = $offset - 3; $plantitems .= "<lineitem x1=\"25\" y1=\"" . $offsetx . "\" x2=\"105\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"115\" y1=\"" . $offsetx . "\" x2=\"228\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"244\" y1=\"" . $offsetx . "\" x2=\"337\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"358\" y1=\"" . $offsetx . "\" x2=\"445\" y2=\"" . $offsetx . "\">blurb</lineitem>"; $plantitems .= "<lineitem x1=\"457\" y1=\"" . $offsetx . "\" x2=\"558\" y2=\"" . $offsetx . "\">blurb</lineitem>"; } $this->formArray["plantitems"] = $plantitems; } }
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); }
function displayPlantsTreesList($plantsTreesList) { if (count($plantsTreesList)) { foreach ($plantsTreesList as $pkey => $plantsTrees) { // 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(); } // just in case actualUse needs to be drawn from plantsTrees // 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(); } if ($this->formArray["p"] <= 24) { $p = $this->formArray["p"]; $this->formArray["kind" . $p] = $plantsTrees->getKind(); $this->formArray["classification" . $p] = $plantsTreesClassesDescription; $this->formArray["landActualUses" . $p] = $plantsTreesActualUsesDescription; $this->formArray["propertyMarketValue" . $p] = un_number_format($plantsTrees->getAdjustedMarketValue()); $this->formArray["assessmentLevel" . $p] = un_number_format($plantsTrees->getAssessmentLevel()); $this->formArray["assessedValue" . $p] = un_number_format($plantsTrees->getAssessedValue()); $this->formArray["totalMarketValue"] += un_number_format($this->formArray["propertyMarketValue" . $p]); $this->formArray["totalAssessedValue"] += un_number_format($this->formArray["assessedValue" . $p]); $this->formArray["p"]++; } } } }