Example #1
0
 function displayLandList($landList)
 {
     if (count($landList)) {
         foreach ($landList as $lkey => $land) {
             // 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();
             }
             /* just in case subClass and actualUse needs to be drawn from land
             
             				// 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();
             					$landActualUsesReportCode = $landActualUses->getReportCode();
             				}
             				else{
             					$landActualUsesDescription = $land->getActualUse();
             					$landActualUsesCode = $land->getActualUse();
             					$landActualUsesReportCode = $landActualUses->getReportCode();
             				}
             				*/
             // edited this code from (3 to 8)
             if ($this->formArray["p"] <= 8) {
                 $p = $this->formArray["p"];
                 $this->formArray["kind" . $p] = $land->getKind();
                 $this->formArray["classification" . $p] = $landClassesDescription;
                 $this->formArray["marketValue" . $p] = $land->getMarketValue();
                 $this->formArray["assessmentLevel" . $p] = $land->getAssessmentLevel();
                 $this->formArray["assessedValue" . $p] = $land->getAssessedValue();
                 $this->formArray["totalMarketValue"] += un_number_format($this->formArray["marketValue" . $p]);
                 $this->formArray["totalAssessedValue"] += un_number_format($this->formArray["assessedValue" . $p]);
                 $this->formArray["p"]++;
             }
         }
     }
 }
Example #2
0
 function updateLandClasses($xmlStr)
 {
     if (!($domDoc = domxml_open_mem($xmlStr))) {
         return false;
     }
     $landClasses = new LandClasses();
     $landClasses->parseDomDocument($domDoc);
     $ret = $landClasses->updateRecord();
     return $ret;
 }
Example #3
0
 function getLandClassesDetails($landClassesID)
 {
     $landClasses = new LandClasses();
     $landClasses->selectRecord($landClassesID);
     if (!($domDoc = $landClasses->getDomDocument())) {
         return false;
     } else {
         $xmlStr = $domDoc->dump_mem(true);
         return $xmlStr;
     }
 }
Example #4
0
 function displayLandList($landList)
 {
     $landTotal = 0;
     if (count($landList)) {
         $l = 0;
         $landitems = '';
         $adjitems = '';
         $totalarea = 0;
         $adjcount = $this->formArray["adjcount"];
         $adjfact = '';
         $percadj = 0;
         $markval = 0;
         $valuadj = 0;
         $adjmark = 0;
         $summcount = $this->formArray["summcount"];
         $summuse = '';
         $summadj = 0;
         $summlvl = 0;
         $summasv = 0;
         foreach ($landList as $key => $land) {
             if ($this->pl == 0) {
                 //$this->formArray["arpNumber"] = $land->getArpNumber();
                 //$this->formArray["propertyIndexNumber"] = $land->getPropertyIndexNumber();
                 $this->formArray["octTctNumber"] = $land->getOctTctNumber();
                 $this->formArray["surveyNumber"] = $land->getSurveyNumber();
                 $this->formArray["north"] = $land->getNorth();
                 $this->formArray["east"] = $land->getEast();
                 $this->formArray["south"] = $land->getSouth();
                 $this->formArray["west"] = $land->getWest();
                 //$this->formArray["taxability"] = $land->getTaxability();
                 //$this->formArray["effectivity"] = $land->getEffectivity();
                 $this->formArray["memoranda"] = $land->getMemoranda();
                 if (is_a($land->propertyAdministrator, Person)) {
                     if ($land->propertyAdministrator->getLastName() != "") {
                         $this->formArray["administrator"] = $land->propertyAdministrator->getFullName();
                     }
                     if (is_a($land->propertyAdministrator->addressArray[0], "address")) {
                         $address1 = $land->propertyAdministrator->addressArray[0]->getNumber();
                         if ($address1 != "") {
                             $address1 .= " ";
                         }
                         $address1 .= $land->propertyAdministrator->addressArray[0]->getStreet();
                         if ($address1 != "") {
                             $address1 .= ", ";
                         }
                         $address1 .= $land->propertyAdministrator->addressArray[0]->getBarangay();
                         $address2 = $land->propertyAdministrator->addressArray[0]->getDistrict();
                         if ($address2 != "") {
                             $address2 .= ", ";
                         }
                         $address2 .= $land->propertyAdministrator->addressArray[0]->getMunicipalityCity();
                         if ($address2 != "") {
                             $address2 .= ", ";
                         }
                         $address2 .= $land->propertyAdministrator->addressArray[0]->getProvince();
                         $this->formArray["adminAddress1"] = $address1;
                         $this->formArray["adminAddress2"] = $address2;
                     }
                     $this->formArray["adminTelno"] = $land->propertyAdministrator->getTelephone();
                 }
                 // recommendingApproval
                 if (is_numeric($land->recommendingApproval)) {
                     $recommendingApproval = new Person();
                     $recommendingApproval->selectRecord($land->recommendingApproval);
                     $this->formArray["recommendingApproval"] = $recommendingApproval->getFullName();
                     $this->recommendingApproval = $recommendingApproval->getFullName();
                 } else {
                     $recommendingApproval = $land->recommendingApproval;
                     $this->formArray["recommendingApproval"] = $recommendingApproval;
                     $this->recommendingApproval = $recommendingApproval;
                 }
                 $this->formArray["dateRecommendingApproval"] = $land->getRecommendingApprovalDate();
                 // approvedBy
                 if (is_numeric($land->approvedBy)) {
                     $approvedBy = new Person();
                     $approvedBy->selectRecord($land->approvedBy);
                     $this->formArray["approvedBy"] = $approvedBy->getFullName();
                     $this->approvedBy = $approvedBy->getFullName();
                 } else {
                     $approvedBy = $land->approvedBy;
                     $this->formArray["approvedBy"] = $approvedBy;
                     $this->approvedBy = $approvedBy;
                 }
                 $this->formArray["dateApprovedBy"] = $land->getApprovedByDate();
                 // appraisedBy (assessedBy)
                 if (is_numeric($land->appraisedBy)) {
                     $appraisedBy = new Person();
                     $appraisedBy->selectRecord($land->appraisedBy);
                     $this->formArray["assessedBy"] = $appraisedBy->getFullName();
                     $this->appraisedBy = $appraisedBy->getFullName();
                 } else {
                     $appraisedBy = $land->appraisedBy;
                     $this->formArray["assessedBy"] = $appraisedBy;
                     $this->appraisedBy = $appraisedBy;
                 }
                 $this->formArray["dateAssessedBy"] = $land->getAppraisedByDate();
             }
             $this->formArray["landstart"] -= 19;
             $offset = $this->formArray["landstart"];
             if ($l < 5) {
                 // classification
                 $landClasses = new LandClasses();
                 if (is_numeric($land->getClassification())) {
                     $landClasses->selectRecord($land->getClassification());
                     $this->formArray["classification" . ($l + 1)] = $landClasses->getDescription();
                 } else {
                     $this->formArray["classification" . ($l + 1)] = $land->getClassification();
                 }
                 $landitems .= '<textitem xpos="55" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . $this->formArray["classification" . ($l + 1)] . '</textitem>' . "\r\n";
                 // subClass
                 $landSubclasses = new LandSubclasses();
                 if (is_numeric($land->getSubClass())) {
                     $landSubclasses->selectRecord($land->getSubClass());
                     $this->formArray["subClass" . ($l + 1)] = $landSubclasses->getDescription();
                 } else {
                     $this->formArray["subClass" . ($l + 1)] = $land->getSubClass();
                 }
                 $landitems .= '<textitem xpos="125" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . $this->formArray["subClass" . ($l + 1)] . '</textitem>' . "\r\n";
                 $this->formArray["area" . ($l + 1)] = $land->getArea() . " " . $this->getUnit($land->getUnit);
                 $totalarea += (double) $land->getArea();
                 $landitems .= '<textitem xpos="297" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . $this->formArray["area" . ($l + 1)] . '</textitem>' . "\r\n";
                 // actualUse
                 $landActualUses = new LandActualUses();
                 if (is_numeric($land->getActualUse())) {
                     $landActualUses->selectRecord($land->getActualUse());
                     $this->formArray["landActualUse" . ($l + 1)] = $landActualUses->getDescription();
                 } else {
                     $this->formArray["landActualUse" . ($l + 1)] = $land->getActualUse();
                 }
                 $landitems .= '<textitem xpos="305" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . $this->formArray["landActualUse" . ($l + 1)] . '</textitem>' . "\r\n";
                 $this->formArray["unitValue" . ($l + 1)] = $land->getUnitValue();
                 $landitems .= '<textitem xpos="437" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . $this->formArray["unitValue" . ($l + 1)] . '</textitem>' . "\r\n";
                 $this->formArray["landMrktVal" . ($l + 1)] = number_format($land->getMarketValue(), 2);
                 $landitems .= '<textitem xpos="540" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . $this->formArray["landMrktVal" . ($l + 1)] . '</textitem>' . "\r\n";
                 $landTotal = $landTotal + toFloat($land->getMarketValue());
                 $landitems .= '<lineitem x1="50" y1="' . ($offset - 8) . '" x2="550" y2="' . ($offset - 8) . '">blurb</lineitem>';
             }
             if ($this->pl < 5) {
                 if ($percadj != (double) $land->getPercentAdjustment()) {
                     if ($markval > 0) {
                         $adjcount++;
                         $this->formArray["adjstart"] -= 14;
                         $offset = $this->formArray["adjstart"];
                         $adjitems .= '<textitem xpos="147" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($markval, 2) . '   (L)' . '</textitem>' . "\r\n";
                         $adjitems .= '<textitem xpos="155" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . $adjfact . '</textitem>' . "\r\n";
                         $adjitems .= '<textitem xpos="405" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($percadj, 2) . '</textitem>' . "\r\n";
                         $adjitems .= '<textitem xpos="475" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($valuadj, 2) . '</textitem>' . "\r\n";
                         $adjitems .= '<textitem xpos="545" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($adjmark, 2) . '</textitem>' . "\r\n";
                         $adjitems .= '<lineitem x1="50" y1="' . ($offset - 5) . '" x2="550" y2="' . ($offset - 5) . '">blurb</lineitem>';
                     }
                     $percadj = (double) $land->getPercentAdjustment();
                     $adjfact = $land->getAdjustmentFactor();
                     $markval = 0;
                     $valuadj = 0;
                     $adjmark = 0;
                 }
                 $markval += (double) $land->getMarketValue();
                 $valuadj += (double) $land->getValueAdjustment();
                 $adjmark += (double) $land->getAdjustedMarketValue();
                 $this->formArray["valAdjFacMrktVal" . ($this->pl + 1)] = $land->getMarketValue();
                 $this->formArray["adjFacTxt" . ($this->pl + 1)] = $land->getAdjustmentFactor();
                 $this->formArray["adjFacInt" . ($this->pl + 1)] = "L";
                 $this->formArray["adjustment" . ($this->pl + 1)] = $land->getPercentAdjustment();
                 $this->formArray["valueAdjustment" . ($this->pl + 1)] = $land->getValueAdjustment();
                 $this->formArray["valAdjFacAdjMrktVal" . ($this->pl + 1)] = $land->getAdjustedMarketValue();
                 $this->formArray["valAdjFacTotal"] = $this->formArray["valAdjFacTotal"] + toFloat($land->getAdjustedMarketValue());
             }
             if ($this->pl < 5) {
                 $this->formArray["kind" . ($this->pl + 1)] = "Land";
                 //if(is_numeric($land->getActualUse())){
                 $landActualUses->selectRecord($land->getActualUse());
                 $this->formArray["propertyActualUse" . ($this->pl + 1)] = $landActualUses->getDescription();
                 //}
                 //else{
                 //	$this->formArray["propertyActualUse".($this->pl+1)] = $land->getActualUse();
                 //}
                 $this->formArray["propertyAdjMrktVal" . ($this->pl + 1)] = $land->getAdjustedMarketValue();
                 $this->formArray["level" . ($this->pl + 1)] = $land->getAssessmentLevel();
                 $this->formArray["assessedValue" . ($this->pl + 1)] = $land->getAssessedValue();
                 $this->formArray["propertyAdjMrktValTotal"] = $this->formArray["propertyAdjMrktValTotal"] + toFloat($land->getAdjustedMarketValue());
                 $this->formArray["propertyTotal"] = $this->formArray["propertyTotal"] + toFloat($land->getAssessedValue());
                 /*
                 			$summkind = '';
                 			$summuse = '';
                 			$summadj = 0;
                 			$summlvl = 0;
                 			$summasv = 0;
                 */
                 if ($summuse != $landActualUses->getDescription()) {
                     if ($summasv > 0) {
                         $summcount++;
                         $this->formArray["summstart"] -= 14;
                         $offset = $this->formArray["summstart"];
                         $summitems .= '<textitem xpos="55" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . 'LAND' . '</textitem>' . "\r\n";
                         $summitems .= '<textitem xpos="155" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . htmlentities($summuse) . '</textitem>' . "\r\n";
                         $summitems .= '<textitem xpos="405" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summadj, 2) . '</textitem>' . "\r\n";
                         $summitems .= '<textitem xpos="475" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summlvl, 2) . '</textitem>' . "\r\n";
                         $summitems .= '<textitem xpos="545" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summasv, 2) . '</textitem>' . "\r\n";
                         $summitems .= '<lineitem x1="50" y1="' . ($offset - 5) . '" x2="550" y2="' . ($offset - 5) . '">blurb</lineitem>';
                     }
                     $summuse = $landActualUses->getDescription();
                     $summlvl = (double) $land->getAssessmentLevel();
                     $summadj = 0;
                     $summasv = 0;
                 }
                 $summadj += (double) $land->getAdjustedMarketValue();
                 $summasv += toFloat($land->getAssessedValue());
                 //(double)$land->getAssessedValue();
             }
             $l++;
             $this->pl++;
         }
         if ($markval > 0) {
             $adjcount++;
             $this->formArray["adjstart"] -= 14;
             $offset = $this->formArray["adjstart"];
             $adjitems .= '<textitem xpos="147" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($markval, 2) . '   (L)' . '</textitem>' . "\r\n";
             $adjitems .= '<textitem xpos="155" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . $adjfact . '</textitem>' . "\r\n";
             $adjitems .= '<textitem xpos="405" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($percadj, 2) . '</textitem>' . "\r\n";
             $adjitems .= '<textitem xpos="475" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($valuadj, 2) . '</textitem>' . "\r\n";
             $adjitems .= '<textitem xpos="545" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($adjmark, 2) . '</textitem>' . "\r\n";
             $adjitems .= '<lineitem x1="50" y1="' . ($offset - 5) . '" x2="550" y2="' . ($offset - 5) . '">blurb</lineitem>';
         }
         if ($summasv > 0) {
             $summcount++;
             $this->formArray["summstart"] -= 14;
             $offset = $this->formArray["summstart"];
             $summitems .= '<textitem xpos="55" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . 'LAND' . '</textitem>' . "\r\n";
             $summitems .= '<textitem xpos="155" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . htmlentities($summuse) . '</textitem>' . "\r\n";
             $summitems .= '<textitem xpos="405" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summadj, 2) . '</textitem>' . "\r\n";
             $summitems .= '<textitem xpos="475" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summlvl, 2) . '</textitem>' . "\r\n";
             $summitems .= '<textitem xpos="545" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summasv, 2) . '</textitem>' . "\r\n";
             $summitems .= '<lineitem x1="50" y1="' . ($offset - 5) . '" x2="550" y2="' . ($offset - 5) . '">blurb</lineitem>';
         }
         for ($ll = $l; $ll < 5; $ll++) {
             $this->formArray["landstart"] -= 19;
             $offset = $this->formArray["landstart"];
             $landitems .= '<lineitem x1="50" y1="' . ($offset - 8) . '" x2="550" y2="' . ($offset - 8) . '">blurb</lineitem>';
         }
         $this->formArray["adjcount"] += $adjcount;
         $this->formArray["adjitems"] .= $adjitems;
         $this->formArray["summcount"] += $summcount;
         $this->formArray["summitems"] .= $summitems;
         $this->formArray["landitems"] = $landitems;
         $this->formArray["totalarea"] = number_format($totalarea, 4);
     }
     $this->formArray["landTotal"] = $landTotal;
 }
Example #5
0
 function displayLandList($landList)
 {
     $this->tpl->set_block("rptsTemplate", "LandDBEmpty", "LandDBEmptyBlock");
     $this->tpl->set_var("LandDBEmptyBlock", "");
     $this->tpl->set_block("rptsTemplate", "defaultLandList", "defaultLandListBlock");
     $this->tpl->set_block("rptsTemplate", "toggleLandList", "toggleLandListBlock");
     //echo $this->formArray["totalMarketValue"];
     if (count($landList)) {
         //$this->tpl->set_block("rptsTemplate", "hideLandList", "hideLandListBlock");
         $this->tpl->set_block("rptsTemplate", "LandList", "LandListBlock");
         $i = 0;
         $totalMarketValue = 0;
         $totalAssessedValue = 0;
         foreach ($landList 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 "classification":
                             $landClasses = new LandClasses();
                             $landClasses->selectRecord($lvalue);
                             $this->tpl->set_var("classification", $landClasses->getDescription());
                             break;
                         case "subClass":
                             $landSubclasses = new LandSubclasses();
                             $landSubclasses->selectRecord($lvalue);
                             $this->tpl->set_var("subClass", $landSubclasses->getDescription());
                             break;
                         case "actualUse":
                             $landActualUses = new LandActualUses();
                             $landActualUses->selectRecord($lvalue);
                             $this->tpl->set_var("actualUse", $landActualUses->getDescription());
                             break;
                     }
                 }
             }
             $this->tpl->set_var("ctr", $i);
             $this->tpl->parse("defaultLandListBlock", "defaultLandList", true);
             $this->tpl->parse("toggleLandListBlock", "toggleLandList", true);
             //$this->tpl->parse("hideLandListBlock", "hideLandList", true);
             $this->setLandListBlockPerms();
             $this->tpl->parse("LandListBlock", "LandList", true);
             $i++;
         }
         $this->formArray["totalMarketValue"] += $totalMarketValue;
         $this->formArray["totalAssessedValue"] += $totalAssessedValue;
         $this->formArray["landTotalMarketValue"] = $totalMarketValue;
         $this->formArray["landTotalAssessedValue"] = $totalAssessedValue;
         $this->tpl->set_var("landCtr", $i);
     } else {
         $this->tpl->set_var("defaultLandListBlock", "");
         $this->tpl->set_var("toggleLandListBlock", "");
     }
 }
Example #6
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);
 }
Example #7
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);
 }
Example #8
0
 function displayLandList($landList)
 {
     $landTotal = 0;
     if (count($landList)) {
         $l = 0;
         foreach ($landList as $key => $land) {
             if ($this->pl == 0) {
                 //$this->formArray["arpNumber"] = $land->getArpNumber();
                 //$this->formArray["propertyIndexNumber"] = $land->getPropertyIndexNumber();
                 $this->formArray["octTctNumber"] = $land->getOctTctNumber();
                 $this->formArray["surveyNumber"] = $land->getSurveyNumber();
                 $this->formArray["north"] = $land->getNorth();
                 $this->formArray["east"] = $land->getEast();
                 $this->formArray["south"] = $land->getSouth();
                 $this->formArray["west"] = $land->getWest();
                 $this->formArray["taxability"] = $land->getTaxability();
                 $this->formArray["effectivity"] = $land->getEffectivity();
                 $this->formArray["memoranda"] = $land->getMemoranda();
                 if (is_a($land->propertyAdministrator, Person)) {
                     $this->formArray["administrator"] = $land->propertyAdministrator->getFullName();
                     if (is_a($land->propertyAdministrator->addressArray[0], "address")) {
                         $address1 = $land->propertyAdministrator->addressArray[0]->getNumber();
                         $address1 .= " " . $land->propertyAdministrator->addressArray[0]->getStreet();
                         $address1 .= ", " . $land->propertyAdministrator->addressArray[0]->getBarangay();
                         $address2 = $land->propertyAdministrator->addressArray[0]->getDistrict();
                         $address2 .= ", " . $land->propertyAdministrator->addressArray[0]->getMunicipalityCity();
                         $address2 .= ", " . $land->propertyAdministrator->addressArray[0]->getProvince();
                         $this->formArray["adminAddress1"] = $address1;
                         $this->formArray["adminAddress2"] = $address2;
                     }
                     $this->formArray["adminTelno"] = $land->propertyAdministrator->getTelephone();
                 }
                 // recommendingApproval
                 if (is_numeric($land->recommendingApproval)) {
                     $recommendingApproval = new Person();
                     $recommendingApproval->selectRecord($land->recommendingApproval);
                     $this->formArray["recommendingApproval"] = $recommendingApproval->getFullName();
                     $this->recommendingApproval = $recommendingApproval->getFullName();
                 } else {
                     $recommendingApproval = $land->recommendingApproval;
                     $this->formArray["recommendingApproval"] = $recommendingApproval;
                     $this->recommendingApproval = $recommendingApproval;
                 }
                 $this->formArray["dateRecommendingApproval"] = $land->getRecommendingApprovalDate();
                 // approvedBy
                 if (is_numeric($land->approvedBy)) {
                     $approvedBy = new Person();
                     $approvedBy->selectRecord($land->approvedBy);
                     $this->formArray["approvedBy"] = $approvedBy->getFullName();
                     $this->approvedBy = $approvedBy->getFullName();
                 } else {
                     $approvedBy = $land->approvedBy;
                     $this->formArray["approvedBy"] = $approvedBy;
                     $this->approvedBy = $approvedBy;
                 }
                 $this->formArray["dateApprovedBy"] = $land->getApprovedByDate();
                 // appraisedBy (assessedBy)
                 if (is_numeric($land->appraisedBy)) {
                     $appraisedBy = new Person();
                     $appraisedBy->selectRecord($land->appraisedBy);
                     $this->formArray["assessedBy"] = $appraisedBy->getFullName();
                     $this->appraisedBy = $appraisedBy->getFullName();
                 } else {
                     $appraisedBy = $land->appraisedBy;
                     $this->formArray["assessedBy"] = $appraisedBy;
                     $this->appraisedBy = $appraisedBy;
                 }
                 $this->formArray["dateAssessedBy"] = $land->getAppraisedByDate();
             }
             if ($l < 9) {
                 // classification
                 $landClasses = new LandClasses();
                 if (is_numeric($land->getClassification())) {
                     $landClasses->selectRecord($land->getClassification());
                     $this->formArray["classification" . ($l + 1)] = $landClasses->getDescription();
                 } else {
                     $this->formArray["classification" . ($l + 1)] = $land->getClassification();
                 }
                 // subClass
                 $landSubclasses = new LandSubclasses();
                 if (is_numeric($land->getSubClass())) {
                     $landSubclasses->selectRecord($land->getSubClass());
                     $this->formArray["subClass" . ($l + 1)] = $landSubclasses->getDescription();
                 } else {
                     $this->formArray["subClass" . ($l + 1)] = $land->getSubClass();
                 }
                 $this->formArray["area" . ($l + 1)] = $land->getArea() . " " . $this->getUnit($land->getUnit);
                 // actualUse
                 $landActualUses = new LandActualUses();
                 if (is_numeric($land->getActualUse())) {
                     $landActualUses->selectRecord($land->getActualUse());
                     $this->formArray["landActualUse" . ($l + 1)] = $landActualUses->getDescription();
                 } else {
                     $this->formArray["landActualUse" . ($l + 1)] = $land->getActualUse();
                 }
                 $this->formArray["unitValue" . ($l + 1)] = $land->getUnitValue();
                 $this->formArray["landMrktVal" . ($l + 1)] = $land->getMarketValue();
                 $landTotal = $landTotal + toFloat($land->getMarketValue());
             }
             if ($this->pl < 6) {
                 $this->formArray["valAdjFacMrktVal" . ($this->pl + 1)] = $land->getMarketValue();
                 $this->formArray["adjFacTxt" . ($this->pl + 1)] = $land->getAdjustmentFactor();
                 $this->formArray["adjFacInt" . ($this->pl + 1)] = "L";
                 $this->formArray["adjustment" . ($this->pl + 1)] = $land->getPercentAdjustment();
                 $this->formArray["valueAdjustment" . ($this->pl + 1)] = $land->getValueAdjustment();
                 $this->formArray["valAdjFacAdjMrktVal" . ($this->pl + 1)] = $land->getAdjustedMarketValue();
                 $this->formArray["valAdjFacTotal"] = $this->formArray["valAdjFacTotal"] + toFloat($land->getAdjustedMarketValue());
             }
             if ($this->pl < 5) {
                 $this->formArray["kind" . ($this->pl + 1)] = "Land";
                 $this->formArray["propertyActualUse" . ($this->pl + 1)] = $land->getActualUse();
                 $this->formArray["propertyAdjMrktVal" . ($this->pl + 1)] = $land->getAdjustedMarketValue();
                 $this->formArray["level" . ($this->pl + 1)] = $land->getAssessmentLevel();
                 $this->formArray["assessedValue" . ($this->pl + 1)] = $land->getAssessedValue();
                 $this->formArray["propertyAdjMrktValTotal"] = $this->formArray["propertyAdjMrktValTotal"] + toFloat($land->getAdjustedMarketValue());
                 $this->formArray["propertyTotal"] = $this->formArray["propertyTotal"] + toFloat($land->getAssessedValue());
             }
             $l++;
             $this->pl++;
         }
     }
     $this->formArray["landTotal"] = $landTotal;
 }
Example #9
0
 function displayLandList($landList)
 {
     if (count($landList)) {
         $items = '';
         //			$offset = 470;
         $fp = fopen("/home/site/log/td.log", "w+");
         $mv = 0;
         $al = 0;
         $av = 0;
         foreach ($landList as $lkey => $land) {
             // 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();
             }
             /* just in case subClass and actualUse needs to be drawn from land
             
             				// 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();
             					$landActualUsesReportCode = $landActualUses->getReportCode();
             				}
             				else{
             					$landActualUsesDescription = $land->getActualUse();
             					$landActualUsesCode = $land->getActualUse();
             					$landActualUsesReportCode = $landActualUses->getReportCode();
             				}
             				*/
             //				if($this->formArray["p"] <= 10){
             $lvl = number_format($land->getAssessmentLevel(), 2);
             if ($al != $lvl) {
                 if ($av > 0) {
                     $this->formArray["ypos"] -= 13;
                     $offset = $this->formArray["ypos"];
                     $items .= "<textitem xpos=\"25\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"left\">" . "Land" . "</textitem>";
                     $items .= "<textitem xpos=\"115\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"9\" align=\"left\">" . $ld . "</textitem>";
                     $items .= "<textitem xpos=\"337\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($mv, 2) . "</textitem>";
                     $items .= "<textitem xpos=\"430\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($al, 2) . "</textitem>";
                     $items .= "<textitem xpos=\"558\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($av, 2) . "</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>";
                 }
                 $av = 0;
                 $mv = 0;
                 $al = $lvl;
             }
             $ld = $landClassesDescription;
             $mv += $land->getAdjustedMarketValue();
             $av += un_number_format($land->getAssessedValue());
             $p = $this->formArray["p"];
             $this->formArray["totalMarketValue"] += $land->getMarketValue();
             $this->formArray["totalAssessedValue"] += un_number_format($land->getAssessedValue());
             $this->formArray["p"]++;
             //				}
         }
         if ($av > 0) {
             $this->formArray["ypos"] -= 13;
             $offset = $this->formArray["ypos"];
             $items .= "<textitem xpos=\"25\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"left\">" . "Land" . "</textitem>";
             $items .= "<textitem xpos=\"115\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"9\" align=\"left\">" . $ld . "</textitem>";
             $items .= "<textitem xpos=\"337\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($mv, 2) . "</textitem>";
             $items .= "<textitem xpos=\"430\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($al, 2) . "</textitem>";
             $items .= "<textitem xpos=\"558\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($av, 2) . "</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>";
         }
         fwrite($fp, $items . "\r\n");
         fclose($fp);
         $this->formArray["landitems"] = $items;
     }
 }
Example #10
0
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "edit":
             $this->tpl->set_var("MessageBlock", "");
             $LandClassesDetails = new SoapObject(NCCBIZ . "LandClassesDetails.php", "urn:Object");
             if (!($xmlStr = $LandClassesDetails->getLandClassesDetails($this->formArray["landClassesID"]))) {
                 $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 {
                     $landClasses = new LandClasses();
                     $landClasses->parseDomDocument($domDoc);
                     $this->formArray["landClassesID"] = $landClasses->getLandClassesID();
                     $this->formArray["code"] = $landClasses->getCode();
                     $this->formArray["description"] = $landClasses->getDescription();
                     $this->formArray["value"] = $landClasses->getValue();
                     $this->formArray["status"] = $landClasses->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", "");
             }
             $LandClassesEncode = new SoapObject(NCCBIZ . "LandClassesEncode.php", "urn:Object");
             if ($this->formArray["landClassesID"] != "") {
                 $LandClassesDetails = new SoapObject(NCCBIZ . "LandClassesDetails.php", "urn:Object");
                 if (!($xmlStr = $LandClassesDetails->getLandClassesDetails($this->formArray["landClassesID"]))) {
                     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 {
                         $landClasses = new LandClasses();
                         $landClasses->parseDomDocument($domDoc);
                         $landClasses->setLandClassesID($this->formArray["landClassesID"]);
                         $landClasses->setCode($this->formArray["code"]);
                         $landClasses->setDescription($this->formArray["description"]);
                         $landClasses->setValue($this->formArray["value"]);
                         $landClasses->setStatus($this->formArray["status"]);
                         $landClasses->setDomDocument();
                         $doc = $landClasses->getDomDocument();
                         $xmlStr = $doc->dump_mem(true);
                         if (!($ret = $LandClassesEncode->updateLandClasses($xmlStr))) {
                             exit("error update");
                         }
                     }
                 }
             } else {
                 $landClasses = new LandClasses();
                 $landClasses->setLandClassesID($this->formArray["landClassesID"]);
                 $landClasses->setCode($this->formArray["code"]);
                 $landClasses->setDescription($this->formArray["description"]);
                 $landClasses->setValue($this->formArray["value"]);
                 $landClasses->setStatus($this->formArray["status"]);
                 $landClasses->setDomDocument();
                 $doc = $landClasses->getDomDocument();
                 $xmlStr = $doc->dump_mem(true);
                 if (!($ret = $LandClassesEncode->saveLandClasses($xmlStr))) {
                     exit("error save");
                 }
             }
             $this->formArray["landClassesID"] = $ret;
             header("location: LandClassesClose.php" . $this->sess->url("") . $this->sess->add_query(array("landClassesID" => $ret)));
             // header("location: LandClassesEncode.php");
             exit;
             break;
         case "cancel":
             header("location: LandClassesClose.php" . $this->sess->url("") . $this->sess->add_query(array("landClassesID" => $ret)));
             //header("location: LandClassesList.php");
             exit;
             break;
         default:
             $this->tpl->set_block("rptsTemplate", "LandClassesID", "LandClassesIDBlock");
             $this->tpl->set_var("LandClassesIDBlock", "");
             $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");
 }
Example #11
0
 function displayLandList($landList)
 {
     if (count($landList)) {
         $land = $landList[0];
         $this->tpl->set_var("land[propertyID]", $this->htmlProperty("propertyID", $land->getPropertyID()));
         $this->tpl->set_var("land[octTctNumber]", $this->htmlProperty("octTctNumber", $land->getOctTctNumber()));
         $this->tpl->set_var("land[surveyNumber]", $this->htmlProperty("surveyNumber", $land->getSurveyNumber()));
         $this->tpl->set_var("land[north]", $this->htmlProperty("north", $land->getNorth()));
         $this->tpl->set_var("land[south]", $this->htmlProperty("south", $land->getSouth()));
         $this->tpl->set_var("land[east]", $this->htmlProperty("east", $land->getEast()));
         $this->tpl->set_var("land[west]", $this->htmlProperty("west", $land->getWest()));
         $this->tpl->set_var("land[description]", $this->htmlProperty("description", $land->getKind()));
         foreach ($land as $lkey => $lvalue) {
             if (is_numeric($lvalue)) {
                 switch ($lkey) {
                     case "classification":
                         $landClasses = new LandClasses();
                         $landClasses->selectRecord($lvalue);
                         $this->tpl->set_var("land[classification]", $this->htmlProperty("classification", $landClasses->getDescription()));
                         break;
                     case "subClass":
                         $landSubclasses = new LandSubclasses();
                         $landSubclasses->selectRecord($lvalue);
                         $this->tpl->set_var("land[subClass]", $this->htmlProperty("subClass", $landSubclasses->getDescription()));
                         break;
                     case "actualUse":
                         $landActualUses = new LandActualUses();
                         $landActualUses->selectRecord($lvalue);
                         $this->tpl->set_var("land[actualUse]", $this->htmlProperty("actualUse", $landActualUses->getDescription()));
                         break;
                 }
             }
         }
         $this->tpl->set_var("land[area]", $this->htmlProperty("area", $land->getArea() . " " . $land->getUnit()));
     }
 }
Example #12
0
 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");
 }
Example #13
0
 function displayLand($land)
 {
     if ($land) {
         $this->displayDetails($land);
         foreach ($land as $lkey => $lvalue) {
             if (is_numeric($lvalue)) {
                 switch ($lkey) {
                     case "classification":
                         $landClasses = new LandClasses();
                         $landClasses->selectRecord($lvalue);
                         $this->tpl->set_var("classification", $landClasses->getDescription());
                         break;
                     case "subClass":
                         $landSubclasses = new LandSubclasses();
                         $landSubclasses->selectRecord($lvalue);
                         $this->tpl->set_var("subClass", $landSubclasses->getDescription());
                         break;
                     case "actualUse":
                         $landActualUses = new LandActualUses();
                         $landActualUses->selectRecord($lvalue);
                         $this->tpl->set_var("actualUse", $landActualUses->getDescription());
                         break;
                 }
             }
         }
         $this->tpl->parse("LandBlock", "Land", true);
     } else {
         $this->tpl->set_var("LandBlock", "");
     }
 }
Example #14
0
 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");
 }
Example #15
0
 function displayLandList($landList)
 {
     $landTotal = 0;
     $finalUnit = '';
     if (count($landList)) {
         $l = 0;
         $landitems = '';
         $adjitems = '';
         $totalarea = 0;
         $adjcount = $this->formArray["adjcount"];
         $adjfact = '';
         $percadj = 0;
         $markval = 0;
         $valuadj = 0;
         $adjmark = 0;
         $summcount = $this->formArray["summcount"];
         $summuse = '';
         $summadj = 0;
         $summlvl = 0;
         $summasv = 0;
         $mixedUnits = 0;
         foreach ($landList as $key => $land) {
             if ($this->pl == 0) {
                 //$this->formArray["taxDeclarationNumber"] = $land->getTaxDeclarationNumber();
                 //$this->formArray["propertyIndexNumber"] = $land->getPropertyIndexNumber();
                 $this->formArray["Numberlot"] = $land->propertyAdministrator->getemail();
                 $this->formArray["octTctNumber"] = $land->getOctTctNumber();
                 $this->formArray["Numbersurvey"] = $land->getSurveyNumber();
                 $this->formArray["north"] = $land->getNorth();
                 $this->formArray["east"] = $land->getEast();
                 $this->formArray["south"] = $land->getSouth();
                 $this->formArray["west"] = $land->getWest();
                 //$this->formArray["taxability"] = $land->getTaxability();
                 //$this->formArray["effectivity"] = $land->getEffectivity();
                 //$this->formArray["memoranda"] = $td->getMemoranda();
                 if (is_a($land->propertyAdministrator, Person)) {
                     if ($land->propertyAdministrator->getLastName() != "") {
                         $this->formArray["administrator"] = $land->propertyAdministrator->getFullName();
                     }
                     if (is_a($land->propertyAdministrator->addressArray[0], "address")) {
                         $address1 = $land->propertyAdministrator->addressArray[0]->getNumber();
                         if ($address1 != "") {
                             $address1 .= " ";
                         }
                         $address1 .= $land->propertyAdministrator->addressArray[0]->getStreet();
                         if ($address1 != "") {
                             $address1 .= ", ";
                         }
                         $address1 .= $land->propertyAdministrator->addressArray[0]->getBarangay();
                         $address2 = $land->propertyAdministrator->addressArray[0]->getDistrict();
                         if ($address2 != "") {
                             $address2 .= ", ";
                         }
                         $address2 .= $land->propertyAdministrator->addressArray[0]->getMunicipalityCity();
                         if ($address2 != "") {
                             $address2 .= ", ";
                         }
                         $address2 .= $land->propertyAdministrator->addressArray[0]->getProvince();
                         $this->formArray["adminAddress1"] = $address1;
                         $this->formArray["adminAddress2"] = $address2;
                     }
                     $this->formArray["adminTelno"] = $land->propertyAdministrator->getTelephone();
                 }
                 // recommendingApproval
                 if (is_numeric($land->recommendingApproval)) {
                     $recommendingApproval = new Person();
                     $recommendingApproval->selectRecord($land->recommendingApproval);
                     $this->formArray["recommendingApproval"] = strtoupper($recommendingApproval->getFullName());
                     $this->recommendingApproval = $recommendingApproval->getFullName();
                 } else {
                     $recommendingApproval = $land->recommendingApproval;
                     $this->formArray["recommendingApproval"] = strtoupper($recommendingApproval);
                     $this->recommendingApproval = $recommendingApproval;
                 }
                 $this->formArray["dateRecommendingApproval"] = $land->getRecommendingApprovalDate();
                 // approvedBy
                 if (is_numeric($land->approvedBy)) {
                     $approvedBy = new Person();
                     $approvedBy->selectRecord($land->approvedBy);
                     $this->formArray["approvedBy"] = strtoupper($approvedBy->getFullName());
                     $this->approvedBy = $approvedBy->getFullName();
                 } else {
                     $approvedBy = $land->approvedBy;
                     $this->formArray["approvedBy"] = strtoupper($approvedBy);
                     $this->approvedBy = $approvedBy;
                 }
                 $this->formArray["dateApprovedBy"] = $land->getApprovedByDate();
                 // appraisedBy (assessedBy)
                 if (is_numeric($land->appraisedBy)) {
                     $appraisedBy = new Person();
                     $appraisedBy->selectRecord($land->appraisedBy);
                     $this->formArray["assessedBy"] = $appraisedBy->getFullName();
                     $this->appraisedBy = $appraisedBy->getFullName();
                 } else {
                     $appraisedBy = $land->appraisedBy;
                     $this->formArray["assessedBy"] = $appraisedBy;
                     $this->appraisedBy = $appraisedBy;
                 }
                 $this->formArray["dateAssessedBy"] = $land->getAppraisedByDate();
             }
             // Land Appraisal
             $this->formArray["landstart"] -= 19;
             $offset = $this->formArray["landstart"];
             // 5 Change to 11
             if ($l < 11) {
                 // classification
                 $landClasses = new LandClasses();
                 if (is_numeric($land->getClassification())) {
                     $landClasses->selectRecord($land->getClassification());
                     $this->formArray["classification" . ($l + 1)] = $landClasses->getDescription();
                 } else {
                     $this->formArray["classification" . ($l + 1)] = $land->getClassification();
                 }
                 $landitems .= '<textitem xpos="55" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . $this->formArray["classification" . ($l + 1)] . '</textitem>' . "\r\n";
                 // subClass
                 $landSubclasses = new LandSubclasses();
                 if (is_numeric($land->getSubClass())) {
                     $landSubclasses->selectRecord($land->getSubClass());
                     $this->formArray["subClass" . ($l + 1)] = $landSubclasses->getDescription();
                 } else {
                     $this->formArray["subClass" . ($l + 1)] = $land->getSubClass();
                 }
                 $landitems .= '<textitem xpos="125" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . $this->formArray["subClass" . ($l + 1)] . '</textitem>' . "\r\n";
                 if (strlen($finalUnit) == 0) {
                     if ($land->getUnit() != "square meters") {
                         $finalUnit = "has.";
                     } else {
                         $finalUnit = "sqm.";
                     }
                 } else {
                     if ($finalUnit != $land->getUnit()) {
                         $mixedUnits = 1;
                         $finalUnit = "has.";
                     } else {
                         $finalUnit = "sqm.";
                     }
                 }
                 if ($land->getUnit() != "square meters") {
                     $runArea = number_format((double) $land->getArea(), 4) . " has.";
                     $totalarea += (double) $land->getArea() * 10000;
                 } else {
                     $runArea = number_format((double) $land->getArea(), 2) . " sqm.";
                     $totalarea += (double) $land->getArea();
                 }
                 //					$this->formArray["area".($l+1)] = number_format($land->getArea(),4)." ".($land->getUnit()=="square meters")?"sqm.":"has.";
                 $landitems .= '<textitem xpos="297" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . $runArea . '</textitem>' . "\r\n";
                 // actualUse==========with round off=========
                 $landActualUses = new LandActualUses();
                 if (is_numeric($land->getActualUse())) {
                     $landActualUses->selectRecord($land->getActualUse());
                     $this->formArray["landActualUse" . ($l + 1)] = $landActualUses->getDescription();
                 } else {
                     $this->formArray["landActualUse" . ($l + 1)] = $land->getActualUse();
                 }
                 $landitems .= '<textitem xpos="305" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . $this->formArray["landActualUse" . ($l + 1)] . '</textitem>' . "\r\n";
                 $this->formArray["unitValue" . ($l + 1)] = $land->getUnitValue();
                 $uvx = str_replace(',', '', $this->formArray["unitValue" . ($l + 1)]);
                 $landitems .= '<textitem xpos="437" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($uvx, 2) . '</textitem>' . "\r\n";
                 $this->formArray["landMrktVal" . ($l + 1)] = number_format($land->getMarketValue(), 2);
                 $landitems .= '<textitem xpos="540" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . $this->formArray["landMrktVal" . ($l + 1)] . '</textitem>' . "\r\n";
                 $landTotal = $landTotal + toFloat($land->getMarketValue());
                 $landitems .= '<lineitem x1="50" y1="' . ($offset - 8) . '" x2="550" y2="' . ($offset - 8) . '">blurb</lineitem>';
             }
             if ($this->pl < 11) {
                 if ($percadj != (double) $land->getPercentAdjustment()) {
                     if ($markval > 0) {
                         $adjcount++;
                         $this->formArray["adjstart"] -= 14;
                         $offset = $this->formArray["adjstart"];
                         $adjitems .= '<textitem xpos="147" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($markval, 2) . '   (L)' . '</textitem>' . "\r\n";
                         $adjitems .= '<textitem xpos="155" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . $adjfact . '</textitem>' . "\r\n";
                         $adjitems .= '<textitem xpos="405" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($percadj) . '%</textitem>' . "\r\n";
                         $adjitems .= '<textitem xpos="475" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($valuadj, 2) . '</textitem>' . "\r\n";
                         $adjitems .= '<textitem xpos="545" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($adjmark, 2) . '</textitem>' . "\r\n";
                         $adjitems .= '<lineitem x1="50" y1="' . ($offset - 5) . '" x2="550" y2="' . ($offset - 5) . '">blurb</lineitem>';
                     }
                     $percadj = (double) $land->getPercentAdjustment();
                     $adjfact = $land->getAdjustmentFactor();
                     $markval = 0;
                     $valuadj = 0;
                     $adjmark = 0;
                 }
                 $markval += (double) $land->getMarketValue();
                 $valuadj += (double) $land->getValueAdjustment();
                 $adjmark += (double) $land->getAdjustedMarketValue();
                 $this->formArray["valAdjFacMrktVal" . ($this->pl + 1)] = $land->getMarketValue();
                 $this->formArray["adjFacTxt" . ($this->pl + 1)] = $land->getAdjustmentFactor();
                 $this->formArray["adjFacInt" . ($this->pl + 1)] = "L";
                 $this->formArray["adjustment" . ($this->pl + 1)] = $land->getPercentAdjustment();
                 $this->formArray["valueAdjustment" . ($this->pl + 1)] = $land->getValueAdjustment();
                 $this->formArray["valAdjFacAdjMrktVal" . ($this->pl + 1)] = $land->getAdjustedMarketValue();
                 $this->formArray["valAdjFacTotal"] = $this->formArray["valAdjFacTotal"] + toFloat($land->getAdjustedMarketValue());
             }
             // 8 to 11
             if ($this->pl < 11) {
                 $this->formArray["kind" . ($this->pl + 1)] = "Land";
                 //if(is_numeric($land->getActualUse())){
                 $landActualUses->selectRecord($land->getActualUse());
                 $this->formArray["propertyActualUse" . ($this->pl + 1)] = $landActualUses->getDescription();
                 //}
                 //else{
                 //	$this->formArray["propertyActualUse".($this->pl+1)] = $land->getActualUse();
                 //}
                 $this->formArray["propertyAdjMrktVal" . ($this->pl + 1)] = $land->getAdjustedMarketValue();
                 $this->formArray["level" . ($this->pl + 1)] = $land->getAssessmentLevel();
                 $this->formArray["assessedValue" . ($this->pl + 1)] = $land->getAssessedValue();
                 $this->formArray["propertyAdjMrktValTotal"] = $this->formArray["propertyAdjMrktValTotal"] + toFloat($land->getAdjustedMarketValue());
                 $this->formArray["propertyTotal"] = $this->formArray["propertyTotal"] + toFloat($land->getAssessedValue());
                 /*			$summkind = '';
                 			$summuse = '';
                 			$summadj = 0;
                 			$summlvl = 0;
                 			$summasv = 0;
                 
                 */
                 //if ($summuse <> $landActualUses->getDescription()) {
                 //Printing of Property Assessment Summ
                 $thislvl = (double) $land->getAssessmentLevel();
                 $thisuse = $landActualUses->getDescription();
                 if ($summlvl != $thislvl || $summuse != $thisuse) {
                     if ($summasv > 0) {
                         $summcount++;
                         $this->formArray["summstart"] -= 14;
                         $offset = $this->formArray["summstart"];
                         $summitems .= '<textitem xpos="55" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . 'LAND' . '</textitem>' . "\r\n";
                         $summitems .= '<textitem xpos="155" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . htmlentities($summuse) . '</textitem>' . "\r\n";
                         $summitems .= '<textitem xpos="405" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summadj, 2) . '</textitem>' . "\r\n";
                         $summitems .= '<textitem xpos="475" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summlvl, 2) . '</textitem>' . "\r\n";
                         $summitems .= '<textitem xpos="545" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summasv, 2) . '</textitem>' . "\r\n";
                         $summitems .= '<lineitem x1="50" y1="' . ($offset - 5) . '" x2="550" y2="' . ($offset - 5) . '">blurb</lineitem>';
                     }
                     $summuse = $thisuse;
                     $summlvl = $thislvl;
                     $summadj = 0;
                     $summasv = 0;
                 }
                 $summadj += (double) $land->getAdjustedMarketValue();
                 $summasv += toFloat($land->getAssessedValue());
                 //(double)$land->getAssessedValue();
             }
             $l++;
             $this->pl++;
         }
         //This is for the Value Adjustment Factor
         if ($markval > 0) {
             $adjcount++;
             $this->formArray["adjstart"] -= 14;
             $offset = $this->formArray["adjstart"];
             $adjitems .= '<textitem xpos="147" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($markval, 2) . '   (L)' . '</textitem>' . "\r\n";
             $adjitems .= '<textitem xpos="155" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . $adjfact . '</textitem>' . "\r\n";
             $adjitems .= '<textitem xpos="405" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($percadj) . '%</textitem>' . "\r\n";
             $adjitems .= '<textitem xpos="475" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($valuadj, 2) . '</textitem>' . "\r\n";
             $adjitems .= '<textitem xpos="545" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($adjmark, 2) . '</textitem>' . "\r\n";
             $adjitems .= '<lineitem x1="50" y1="' . ($offset - 5) . '" x2="550" y2="' . ($offset - 5) . '">blurb</lineitem>';
         }
         //EN - This is for the Property Assesment Summary
         if ($summasv > 0) {
             //EN 20090930 change summasv to markval (reversed 20091001)
             $summcount++;
             $this->formArray["summstart"] -= 14;
             $offset = $this->formArray["summstart"];
             $summitems .= '<textitem xpos="55" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . 'LAND' . '</textitem>' . "\r\n";
             $summitems .= '<textitem xpos="155" ypos="' . $offset . '" font="Helvetica" size="8" align="left">' . htmlentities($summuse) . '</textitem>' . "\r\n";
             $summitems .= '<textitem xpos="405" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summadj, 2) . '</textitem>' . "\r\n";
             $summitems .= '<textitem xpos="475" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summlvl, 2) . '</textitem>' . "\r\n";
             // Inserted 08222008
             $summasv = round($summadj * ($summlvl / 100), -1);
             //EN - round to nearest ten peso 2009-09-30
             //EN - change $adjmark to $summadj 2009-09-30
             $summitems .= '<textitem xpos="545" ypos="' . $offset . '" font="Helvetica" size="8" align="right">' . number_format($summasv, 2) . '</textitem>' . "\r\n";
             $summitems .= '<lineitem x1="50" y1="' . ($offset - 5) . '" x2="550" y2="' . ($offset - 5) . '">blurb</lineitem>';
         }
         // 5 change to 11
         for ($ll = $l; $ll < 11; $ll++) {
             $this->formArray["landstart"] -= 19;
             $offset = $this->formArray["landstart"];
             $landitems .= '<lineitem x1="50" y1="' . ($offset - 8) . '" x2="550" y2="' . ($offset - 8) . '">blurb</lineitem>';
         }
         $this->formArray["adjcount"] += $adjcount;
         $this->formArray["adjitems"] .= $adjitems;
         $this->formArray["summcount"] += $summcount;
         $this->formArray["summitems"] .= $summitems;
         $this->formArray["landitems"] = $landitems;
         //if ($mixedUnits) {
         if ($finalUnit == 'has.') {
             $this->formArray["totalarea"] = number_format($totalarea / 10000, 4) . ' has.';
         } else {
             $this->formArray["totalarea"] = number_format($totalarea, 2) . ' sqm.';
         }
         //			$this->formArray["totalarea"] = number_format($totalarea,4);
     }
     $this->formArray["landTotal"] = $landTotal;
 }
 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");
 }
Example #17
0
 function updateStatus($statusIDArray = "")
 {
     $rows = 0;
     $this->selectRecords();
     foreach ($this->arrayList as $key => $value) {
         $value->status = "inactive";
         $value->updateRecord();
     }
     foreach ($statusIDArray as $key => $value) {
         $landClasses = new LandClasses();
         $landClasses->selectRecord($value);
         $landClasses->status = "active";
         $landClasses->updateRecord();
         $rows++;
     }
     return $rows;
 }
Example #18
0
 function displayLandList($landList)
 {
     if (count($landList)) {
         // NCC Modification checked and implemented by K2 : November 21, 2005
         // details:
         //	added lines 145 to 151 with lines 146 and 147 commented out
         $items = '';
         //$offset = 470;
         //$fp = fopen("/home/site/log/td.log","w+");
         $mv = 0;
         $al = 0;
         $av = 0;
         foreach ($landList as $lkey => $land) {
             // 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();
             }
             /* just in case subClass and actualUse needs to be drawn from land
             
             				// 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();
             					$landActualUsesReportCode = $landActualUses->getReportCode();
             				}
             				else{
             					$landActualUsesDescription = $land->getActualUse();
             					$landActualUsesCode = $land->getActualUse();
             					$landActualUsesReportCode = $landActualUses->getReportCode();
             				}
             				*/
             // NCC Modification checked and implemented by K2 : November 21, 2005
             // details:
             //		- changed `if($this->formArray["p"] <= 3)` to `if(...<=10)` in line 200
             //		- opted not to comment out if() line as done in NCC version
             //		- added lines 201 to 228
             //		- added lines 255 to 275 commenting out lines 273 and 274
             if ($this->formArray["p"] <= 10) {
                 $lvl = number_format($land->getAssessmentLevel(), 2);
                 if ($al != $lvl) {
                     if ($av > 0) {
                         $this->formArray["ypos"] -= 13;
                         $offset = $this->formArray["ypos"];
                         $items .= "<textitem xpos=\"25\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"left\">" . "Land" . "</textitem>";
                         $items .= "<textitem xpos=\"115\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"9\" align=\"left\">" . $ld . "</textitem>";
                         $items .= "<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
                         $items .= "<textitem xpos=\"430\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . $lvl . "%</textitem>";
                         $items .= "<textitem xpos=\"558\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($av, 2) . "</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>";
                     }
                     $av = 0;
                     $mv = 0;
                     // danny = changed `$al = $lvl` back to 0 .. don't understand why $al's need to be compared.
                     $al = 0;
                 }
                 $ld = $landClassesDescription;
                 $mv += $land->getAdjustedMarketValue();
                 $av += un_number_format($land->getAssessedValue());
                 $p = $this->formArray["p"];
                 $this->formArray["kind" . $p] = $land->getKind();
                 $this->formArray["classification" . $p] = $landClassesDescription;
                 $this->formArray["marketValue" . $p] = formatCurrency($land->getMarketValue());
                 $this->formArray["assessmentLevel" . $p] = $land->getAssessmentLevel();
                 $this->formArray["assessedValue" . $p] = formatCurrency($land->getAssessedValue());
             } else {
                 if ($this->formArray["p"] > 10) {
                     $this->formArray["othersCount"]++;
                     $this->formArray["othersMV"] += toFloat($land->getMarketValue());
                     $this->formArray["othersAV"] += toFloat($land->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"] .= $land->getKind();
                     $this->formArray["kindOthers"] .= " MV=P".formatCurrency($land->getMarketValue());
                     $this->formArray["kindOthers"] .= " AV=P".formatCurrency($land->getAssessedValue());
                     */
                 }
             }
             $this->formArray["totalMarketValue"] += toFloat($land->getMarketValue());
             $this->formArray["totalAssessedValue"] += toFloat($land->getAssessedValue());
             $this->formArray["p"]++;
         }
         if ($av > 0) {
             $this->formArray["ypos"] -= 13;
             $offset = $this->formArray["ypos"];
             $items .= "<textitem xpos=\"25\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"left\">" . "Land" . "</textitem>";
             $items .= "<textitem xpos=\"115\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"9\" align=\"left\">" . $ld . "</textitem>";
             $items .= "<textitem xpos=\"337\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($mv, 2) . "</textitem>";
             $items .= "<textitem xpos=\"430\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . $lvl . "%</textitem>";
             $items .= "<textitem xpos=\"558\" ypos=\"" . $offset . "\" font=\"Helvetica\" size=\"10\" align=\"right\">" . number_format($av, 2) . "</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>";
         }
         //fwrite($fp,$items."\r\n");
         //fclose($fp);
         $this->formArray["landitems"] = $items;
     }
 }
Example #19
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);
 }