Exemplo n.º 1
0
 function displayOwnerList($domDoc)
 {
     $owner = new Owner();
     $owner->parseDomDocument($domDoc);
     $ownerName = "";
     if (count($owner->personArray)) {
         foreach ($owner->personArray as $personKey => $personValue) {
             if ($ownerName == "") {
                 $address = $personValue->addressArray[0]->getFullAddress();
                 $ownerName = $personValue->getName();
             } else {
                 $ownerName = $ownerName . " , " . $personValue->getName();
             }
         }
     } else {
     }
     if (count($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if ($ownerName == "") {
                 $address = $companyValue->addressArray[0]->getFullAddress();
                 $ownerName = $companyValue->getCompanyName();
             } else {
                 $ownerName = $ownerName . " , " . $companyValue->getCompanyName();
             }
         }
     } else {
     }
     $this->tpl->set_var("Owner", htmlentities($ownerName));
     $this->tpl->set_var("Address", htmlentities($address));
     //}
 }
Exemplo n.º 2
0
 function displayOwnerList($domDoc)
 {
     $owner = new Owner();
     $owner->parseDomDocument($domDoc);
     $ownerPersonName = "";
     $address = "";
     if (count($owner->personArray)) {
         foreach ($owner->personArray as $personKey => $personValue) {
             if ($ownerPersonName == "") {
                 if (is_object($personValue->addressArray[0])) {
                     $address = $personValue->addressArray[0]->getFullAddress();
                     $address1 = $personValue->addressArray[0]->getNumber();
                     $address1 .= " " . $personValue->addressArray[0]->getStreet();
                     $address1 .= ", " . $personValue->addressArray[0]->getBarangay();
                     $address2 = $personValue->addressArray[0]->getDistrict();
                     $address2 .= ", " . $personValue->addressArray[0]->getMunicipalityCity();
                     $address2 .= ", " . $personValue->addressArray[0]->getProvince();
                 }
                 $ownerPersonName = $personValue->getName();
             } else {
                 $ownerPersonName = $ownerName . " , " . $personValue->getName();
             }
         }
     }
     $ownerCompanyName = "";
     if (count($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if ($ownerCompanyName == "") {
                 if ($address == "") {
                     if (is_object($companyValue->addressArray[0])) {
                         $address = $companyValue->addressArray[0]->getFullAddress();
                         $address1 = $companyValue->addressArray[0]->getNumber();
                         $address1 .= " " . $companyValue->addressArray[0]->getStreet();
                         $address1 .= ", " . $companyValue->addressArray[0]->getBarangay();
                         $address2 = $companyValue->addressArray[0]->getDistrict();
                         $address2 .= ", " . $companyValue->addressArray[0]->getMunicipalityCity();
                         $address2 .= ", " . $companyValue->addressArray[0]->getProvince();
                     }
                 }
                 $ownerCompanyName = $companyValue->getCompanyName();
             } else {
                 $ownerCompanyName = $ownerCompanyName . " , " . $companyValue->getCompanyName();
             }
         }
     }
     $ownerName = $ownerPersonName;
     if ($ownerCompanyName != "") {
         $ownerName = $ownerPersonName . " , " . $ownerCompanyName;
     }
     $this->formArray["owner"] = $ownerName;
     $this->formArray["ownerAddress1"] = $address1;
     $this->formArray["ownerAddress2"] = $address2;
 }
Exemplo n.º 3
0
 function displayOwnerList($domDoc)
 {
     $owner = new Owner();
     $owner->parseDomDocument($domDoc);
     //$list = $owner->getArrayList();
     //foreach ($list as $key => $value){
     if (count($owner->personArray)) {
         $this->tpl->set_block("rptsTemplate", "PersonDBEmpty", "PersonDBEmptyBlock");
         $this->tpl->set_var("PersonDBEmptyBlock", "");
         $this->tpl->set_block("rptsTemplate", "PersonList", "PersonListBlock");
         foreach ($owner->personArray as $personKey => $personValue) {
             $this->tpl->set_var("personID", $personValue->getPersonID());
             if (!($pname = $personValue->getFullName())) {
                 $pname = "none";
             }
             $this->tpl->set_var("fullName", $pname);
             $this->tpl->set_var("tin", $personValue->getTin());
             $this->tpl->set_var("telephone", $personValue->getTelephone());
             $this->tpl->set_var("mobileNumber", $personValue->getMobileNumber());
             $this->tpl->parse("PersonListBlock", "PersonList", true);
         }
     } else {
         $this->tpl->set_block("rptsTemplate", "PersonList", "PersonListBlock");
         $this->tpl->set_var("PersonListBlock", "");
     }
     if (count($owner->companyArray)) {
         $this->tpl->set_block("rptsTemplate", "CompanyDBEmpty", "CompanyDBEmptyBlock");
         $this->tpl->set_var("CompanyDBEmptyBlock", "");
         $this->tpl->set_block("rptsTemplate", "CompanyList", "CompanyListBlock");
         //print_r($value->companyArray);
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             $this->tpl->set_var("companyID", $companyValue->getCompanyID());
             if (!($cname = $companyValue->getCompanyName())) {
                 $cname = "none";
             }
             $this->tpl->set_var("companyName", $cname);
             $this->tpl->set_var("tin", $companyValue->getTin());
             $this->tpl->set_var("telephone", $companyValue->getTelephone());
             $this->tpl->set_var("fax", $companyValue->getFax());
             $this->tpl->parse("CompanyListBlock", "CompanyList", true);
         }
     } else {
         $this->tpl->set_block("rptsTemplate", "CompanyList", "CompanyListBlock");
         $this->tpl->set_var("CompanyListBlock", "");
     }
     //}
 }
Exemplo n.º 4
0
 function parseDomDocument($domDoc)
 {
     $baseNode = $domDoc->document_element();
     if ($baseNode->has_child_nodes()) {
         $child = $baseNode->first_child();
         while ($child) {
             //if ($child->tagname=="Owner") {
             if ($child->tagname) {
                 $tempXmlStr = $domDoc->dump_node($child);
                 $tempDomDoc = domxml_open_mem($tempXmlStr);
                 $owner = new Owner();
                 $owner->parseDomDocument($tempDomDoc);
                 $this->setArrayList($owner);
             }
             $child = $child->next_sibling();
         }
     }
     $this->setDomDocument();
     return true;
 }
 function displayOwnerList($domDoc)
 {
     $owner = new Owner();
     $owner->parseDomDocument($domDoc);
     //$list = $owner->getArrayList();
     //foreach ($list as $key => $value){
     if (count($owner->personArray)) {
         $pname = "";
         foreach ($owner->personArray as $personKey => $personValue) {
             if (!$personValue->getName() || $personValue->getName == "") {
                 $pname = "";
             }
             if ($pname != "") {
                 $pname .= ", ";
             }
             $ownerNames[] = $personValue->getName();
             $pname .= $personValue->getName();
         }
     } else {
         $pname = "";
     }
     if (count($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if (!$companyValue->getCompanyName() || $companyValue->getCompanyName() == "") {
                 $cname = "";
             }
             if ($cname != "") {
                 $cname .= ", ";
             }
             $ownerNames[] = $companyValue->getCompanyName();
             $cname .= $companyValue->getCompanyName();
         }
     } else {
         $cname = "";
     }
     //}
     if (is_array($ownerNames)) {
         sort($ownerNames);
         reset($ownerNames);
         $this->formArray["ownerName"] = implode(" ,", $ownerNames);
     } else {
         $this->formArray["ownerName"] = "";
     }
 }
Exemplo n.º 6
0
 function parseDomDocument($domDoc)
 {
     //echo "<br>parsing<br>";
     $ret = true;
     if (is_object($domDoc)) {
         $baseNode = $domDoc->document_element();
         if ($baseNode->has_child_nodes()) {
             $child = $baseNode->first_child();
             while ($child) {
                 switch ($child->tagname) {
                     case "owner":
                         //echo "owner<br>";
                         $ownerNode = $child->first_child();
                         while ($ownerNode) {
                             //if ($ownerNode->tagname=="Owner") {
                             if ($ownerNode->tagname) {
                                 $tempXmlStr = $domDoc->dump_node($ownerNode);
                                 $tempDomDoc = domxml_open_mem($tempXmlStr);
                                 $owner = new Owner();
                                 $ret = $owner->parseDomDocument($tempDomDoc);
                                 $this->owner = $owner;
                             }
                             $ownerNode = $ownerNode->next_sibling();
                         }
                         break;
                     case "tdArray":
                         $tdNode = $child->first_child();
                         while ($tdNode) {
                             //if ($tdNode->tagname=="TD") {
                             if ($tdNode->tagname) {
                                 $tempXmlStr = $domDoc->dump_node($tdNode);
                                 $tempDomDoc = domxml_open_mem($tempXmlStr);
                                 $td = new TD();
                                 $ret = $td->parseDomDocument($tempDomDoc);
                                 $this->setTdArray($td);
                             }
                             $tdNode = $tdNode->next_sibling();
                         }
                         break;
                     default:
                         //eval("\$this->".$child->tagname."= \"".$child->get_content()."\";");
                         // test varvars
                         $varvar = $child->tagname;
                         $trans = array_flip(get_html_translation_table(HTML_ENTITIES));
                         $childContent = strtr(html_entity_decode($child->get_content()), $trans);
                         $this->{$varvar} = html_entity_decode($childContent);
                         //$this->$varvar = html_entity_decode($child->get_content());
                 }
                 $child = $child->next_sibling();
             }
         }
         $this->setDomDocument();
         $ret = true;
     } else {
         $ret = false;
     }
     return $ret;
 }
Exemplo n.º 7
0
 function displayOwnerList($domDoc)
 {
     $owner = new Owner();
     $owner->parseDomDocument($domDoc);
     $ownerName = "";
     if (count($owner->personArray)) {
         foreach ($owner->personArray as $personKey => $personValue) {
             if ($ownerName == "") {
                 if (is_object($personValue->addressArray[0])) {
                     $address = $personValue->addressArray[0]->getFullAddress();
                     $ownerName = $personValue->getName();
                     $telephone = $personValue->getTelephone();
                     $tin = $personValue->getTin();
                 }
             } else {
                 $ownerName = $ownerName . " , " . $personValue->getName();
                 $telephone = $telephone . " ," . $personValue->getTelephone();
                 $tin = $tin . ", " . $personValue->getTin();
                 $mobileNumber = $mobileNumber . " , " . $personValue->getMobileNumber();
             }
         }
     } else {
     }
     if (count($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if ($ownerName == "") {
                 $address = $companyValue->addressArray[0]->getFullAddress();
                 $ownerName = $companyValue->getCompanyName();
                 $telephone = $companyValue->getTelephone();
                 $tin = $companyValue->getTin();
                 //$mobileNumber = $companyValue->getMobileNumber();
             } else {
                 $ownerName = $ownerName . " , " . $companyValue->getCompanyName();
                 $telephone = $companyValue->getTelephone();
                 $tin = $companyValue->getTin();
                 //$mobileNumber = $companyValue->getMobileNumber();
             }
         }
     } else {
     }
     $this->formArray["Owner"] = $ownerName;
     $this->formArray["Address"] = $address;
     //inserted this code for contact no - renonj
     $this->formArray["telephone"] = $telephone;
     $this->formArray["tin"] = $tin;
     //$this->formArray["mobileNumber"] = $mobileNumber;
 }
Exemplo n.º 8
0
 function displayOwnerList($domDoc)
 {
     $owner = new Owner();
     $owner->parseDomDocument($domDoc);
     $oValue = $owner;
     if (count($oValue->personArray)) {
         $firstOwner = $oValue->personArray[0]->getTitle();
         $firstOwner .= " ";
         $firstOwner .= $oValue->personArray[0]->getName();
         if (is_object($oValue->personArray[0]->addressArray[0])) {
             $number = $oValue->personArray[0]->addressArray[0]->getNumber();
             $street = $oValue->personArray[0]->addressArray[0]->getStreet();
             $barangay = $oValue->personArray[0]->addressArray[0]->getBarangay();
             $district = $oValue->personArray[0]->addressArray[0]->getDistrict();
             $municipalityCity = $oValue->personArray[0]->addressArray[0]->getMunicipalityCity();
             $province = $oValue->personArray[0]->addressArray[0]->getProvince();
         }
     }
     if (count($oValue->companyArray)) {
         if ($firstOwner == "") {
             $firstOwner = $oValue->companyArray[0]->getCompanyName();
             if (is_object($oValue->companyArray[0]->addressArray[0])) {
                 $number = $oValue->companyArray[0]->addressArray[0]->getNumber();
                 $street = $oValue->companyArray[0]->addressArray[0]->getStreet();
                 $barangay = $oValue->companyArray[0]->addressArray[0]->getBarangay();
                 $district = $oValue->companyArray[0]->addressArray[0]->getDistrict();
                 $municipalityCity = $oValue->companyArray[0]->addressArray[0]->getMunicipalityCity();
                 $province = $oValue->companyArray[0]->addressArray[0]->getProvince();
             }
         }
     }
     if ($number != "") {
         $address1 = $number;
     }
     if ($address1 != "") {
         $address1 .= " " . $street;
     }
     if ($address1 != "") {
         $address1 .= ", " . $barangay;
     }
     if ($municipalityCity != "") {
         $address2 = $municipalityCity;
     }
     if ($address2 != "") {
         $address2 .= ", " . $province;
     }
     if ($district != "" && $district != "no district") {
         $address2 = $district . " , " . $address2;
     }
     $this->formArray["owner"] = $firstOwner;
     $this->formArray["address1"] = $address1;
     $this->formArray["address2"] = $address2;
 }
Exemplo n.º 9
0
Arquivo: OD.php Projeto: armic/erpts
 function parseDomDocument($domDoc)
 {
     //echo "<br>parsing<br>";
     $ret = true;
     if (is_object($domDoc)) {
         $baseNode = $domDoc->document_element();
         if ($baseNode->has_child_nodes()) {
             $child = $baseNode->first_child();
             while ($child) {
                 //echo "parse->".$child->tagname."<br>";
                 switch ($child->tagname) {
                     case "ownerArray":
                         //echo "owner<br>";
                         $ownerNode = $child->first_child();
                         while ($ownerNode) {
                             //if ($ownerNode->tagname=="Owner") {
                             if ($ownerNode->tagname) {
                                 $tempXmlStr = $domDoc->dump_node($ownerNode);
                                 $tempDomDoc = domxml_open_mem($tempXmlStr);
                                 $owner = new Owner();
                                 $ret = $owner->parseDomDocument($tempDomDoc);
                                 $this->owner = $owner;
                             }
                             $ownerNode = $ownerNode->next_sibling();
                         }
                         break;
                     case "locationAddressArray":
                         //echo "locationAddress<br>";
                         $locationAddressNode = $child->first_child();
                         while ($locationAddressNode) {
                             //if ($locationAddressNode->tagname=="locationAddress") {
                             if ($locationAddressNode->tagname) {
                                 $tempXmlStr = $domDoc->dump_node($locationAddressNode);
                                 $tempDomDoc = domxml_open_mem($tempXmlStr);
                                 $locationAddress = new LocationAddress();
                                 $ret = $locationAddress->parseDomDocument($tempDomDoc);
                                 $this->locationAddress = $locationAddress;
                             }
                             $locationAddressNode = $locationAddressNode->next_sibling();
                         }
                         break;
                     case "oldODArray":
                         $oldODNode = $child->first_child();
                         while ($oldODNode) {
                             if ($oldODNode->tagname) {
                                 $this->oldODArray[] = html_entity_decode($oldODNode->get_content());
                             }
                             $oldODNode = $oldODNode->next_sibling();
                         }
                         break;
                     default:
                         //eval("\$this->".$child->tagname."= \"".$child->get_content()."\";");
                         // test varvars
                         $varvar = $child->tagname;
                         $this->{$varvar} = html_entity_decode($child->get_content());
                 }
                 $child = $child->next_sibling();
             }
         }
         $this->setDomDocument();
         $ret = true;
     } else {
         $ret = false;
     }
     return $ret;
 }
Exemplo n.º 10
0
 function displayOwnerList($domDoc)
 {
     $owner = new Owner();
     $owner->parseDomDocument($domDoc);
     $ownerName = "";
     if (count($owner->personArray)) {
         foreach ($owner->personArray as $personKey => $personValue) {
             if ($ownerName == "") {
                 if (is_object($personValue->addressArray[0])) {
                     $address = $personValue->addressArray[0]->getFullAddress();
                     $ownerName = $personValue->getName();
                 }
             } else {
                 $ownerName = $ownerName . " , " . $personValue->getName();
             }
         }
     } else {
     }
     if (count($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if ($ownerName == "") {
                 $address = $companyValue->addressArray[0]->getFullAddress();
                 $ownerName = $companyValue->getCompanyName();
             } else {
                 $ownerName = $ownerName . " , " . $companyValue->getCompanyName();
             }
         }
     } else {
     }
     $this->formArray["Owner"] = $ownerName;
     $this->formArray["Address"] = $address;
 }
Exemplo n.º 11
0
 function displayOwnerList($domDoc)
 {
     $owner = new Owner();
     $owner->parseDomDocument($domDoc);
     $ownerName = "";
     if (count($owner->personArray)) {
         foreach ($owner->personArray as $personKey => $personValue) {
             if ($ownerName == "") {
                 $address = $personValue->addressArray[0]->getFullAddress();
                 $address1 = $personValue->addressArray[0]->getNumber();
                 if ($address1 != "") {
                     $address1 .= " ";
                 }
                 $address1 .= $personValue->addressArray[0]->getStreet();
                 if ($address1 != "") {
                     $address1 .= ", ";
                 }
                 $address1 .= $personValue->addressArray[0]->getBarangay();
                 if ($personValue->addressArray[0]->getDistrict() != "none" && $personValue->addressArray[0]->getDistrict() != "0" && $personValue->addressArray[0]->getDistrict() != "") {
                     $address2 = $personValue->addressArray[0]->getDistrict();
                 } else {
                     $address2 = "";
                 }
                 if ($address2 != "") {
                     $address2 .= ", ";
                 }
                 $address2 .= $personValue->addressArray[0]->getMunicipalityCity();
                 if ($address2 != "") {
                     $address2 .= ", ";
                 }
                 $address2 .= $personValue->addressArray[0]->getProvince();
                 $telno = $personValue->getTelephone();
                 $ownerName = $personValue->getProperName();
             } else {
                 $ownerName = $ownerName . " , " . $personValue->getProperName();
             }
         }
     } else {
     }
     if (count($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if ($ownerName == "") {
                 $address = $companyValue->addressArray[0]->getFullAddress();
                 $address1 = $companyValue->addressArray[0]->getNumber();
                 if ($address1 != "") {
                     $address1 .= " ";
                 }
                 $address1 .= $companyValue->addressArray[0]->getStreet();
                 if ($address1 != "") {
                     $address1 .= ", ";
                 }
                 $address1 .= $companyValue->addressArray[0]->getBarangay();
                 if ($companyValue->addressArray[0]->getDistrict() != "none" && $companyValue->addressArray[0]->getDistrict() != "0" && $companyValue->addressArray[0]->getDistrict() != "") {
                     $address2 = $companyValue->addressArray[0]->getDistrict();
                 } else {
                     $address2 = "";
                 }
                 if ($address2 != "") {
                     $address2 .= ", ";
                 }
                 $address2 .= $companyValue->addressArray[0]->getMunicipalityCity();
                 if ($address2 != "") {
                     $address2 .= ", ";
                 }
                 $address2 .= $companyValue->addressArray[0]->getProvince();
                 $telno = $companyValue->getTelephone();
                 $ownerName = $companyValue->getCompanyName();
             } else {
                 $ownerName = $ownerName . " , " . $companyValue->getCompanyName();
             }
         }
     } else {
     }
     $this->formArray["owner"] = $ownerName;
     $this->formArray["address1"] = $address1;
     $this->formArray["address2"] = $address2;
     $this->formArray["telno"] = $telno;
 }
Exemplo n.º 12
0
 function displayOwnerList($domDoc)
 {
     $owner = new Owner();
     $owner->parseDomDocument($domDoc);
     $ownerName = "";
     if (is_array($owner->personArray)) {
         foreach ($owner->personArray as $personKey => $personValue) {
             if ($ownerName == "") {
                 if (is_object($personValue->addressArray[0])) {
                     $address = $personValue->addressArray[0]->getFullAddress();
                 }
                 $ownerName = $personValue->getName();
             } else {
                 $ownerName = $ownerName . " , " . $personValue->getName();
             }
         }
     } else {
     }
     if (is_array($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if ($ownerName == "") {
                 if (is_object($companyValue->addressArray[0])) {
                     $address = $companyValue->addressArray[0]->getFullAddress();
                 }
                 $ownerName = $companyValue->getCompanyName();
             } else {
                 $ownerName = $ownerName . " , " . $companyValue->getCompanyName();
             }
         }
     } else {
     }
     $this->formArray["ownerName"] = $ownerName;
     $this->formArray["ownerAddress"] = $address;
     // wordwrapping for ownerName
     if (strlen($this->formArray["ownerName"]) > 84) {
         $this->formArray["ownerName"] = wordwrap($this->formArray["ownerName"], 94, "\n", 1);
         $this->tpl->set_var("ownerName_fontSize", 7);
     } else {
         if (strlen($this->formArray["ownerName"]) > 40) {
             $this->formArray["ownerName"] = wordwrap($this->formArray["ownerName"], 42, "\n", 1);
             $this->tpl->set_var("ownerName_fontSize", 9);
         } else {
             $this->formArray["ownerName"] = "\n" . $this->formArray["ownerName"];
             $this->tpl->set_var("ownerName_fontSize", 10);
         }
     }
     // wordwrapping for ownerAddress
     if (strlen($this->formArray["ownerAddress"]) > 84) {
         $this->formArray["ownerAddress"] = wordwrap($this->formArray["ownerAddress"], 62, "\n", 1);
         $this->tpl->set_var("ownerAddress_fontSize", 7);
     } else {
         if (strlen($this->formArray["ownerAddress"]) > 36) {
             $this->formArray["ownerAddress"] = wordwrap($this->formArray["ownerAddress"], 42, "\n", 1);
             $this->tpl->set_var("ownerAddress_fontSize", 9);
         } else {
             $this->formArray["ownerAddress"] = "\n" . $this->formArray["ownerAddress"];
             $this->tpl->set_var("ownerAddress_fontSize", 10);
         }
     }
 }
Exemplo n.º 13
0
 function displayOwnerList($domDoc)
 {
     $owner = new Owner();
     $owner->parseDomDocument($domDoc);
     //$list = $owner->getArrayList();
     //foreach ($list as $key => $value){
     if (count($owner->personArray)) {
         $pname = "";
         foreach ($owner->personArray as $personKey => $personValue) {
             if (!$personValue->getName() || $personValue->getName == "") {
                 $pname = "";
             }
             if ($pname != "") {
                 $pname .= ", ";
             }
             $ownerNames[] = $personValue->getName();
             $pname .= $personValue->getName();
         }
         $address = $owner->personArray[0]->addressArray[0];
         if (is_a($address, Address)) {
             if ($address->getNumber() != "" && $address->getNumber() != " " && $address->getNumber() != "-" && $address->getNumber() != "--") {
                 $this->formArray["address1"] = $address->getNumber();
             }
             if ($address->getStreet() != "" && $address->getStreet() != " " && $address->getStreet() != "-" && $address->getStreet() != "--") {
                 if ($this->formArray["address1"] != "") {
                     $this->formArray["address1"] .= " " . $address->getStreet();
                 } else {
                     $this->formArray["address1"] = $address->getStreet();
                 }
             }
             if ($address->getBarangay() != "" && $address->getBarangay() != " " && $address->getBarangay() != "-" && $address->getBarangay() != "--") {
                 if ($this->formArray["address1"] != "") {
                     $this->formArray["address1"] .= ", " . $address->getBarangay();
                 } else {
                     $this->formArray["address1"] = $address->getBarangay();
                 }
             }
             if ($address->getDistrict() != "" && $address->getDistrict() != " " && $address->getDistrict() != "-" && $address->getDistrict() != "--") {
                 if ($this->formArray["address1"] != "") {
                     $this->formArray["address1"] .= ", " . $address->getDistrict();
                 } else {
                     $this->formArray["address1"] = $address->getDistrict();
                 }
             }
             if ($address->getMunicipalityCity() != "" && $address->getMunicipalityCity() != " " && $address->getMunicipalityCity() != "-" && $address->getMunicipalityCity() != "--") {
                 $this->formArray["address2"] = $address->getMunicipalityCity();
             }
             if ($address->getProvince() != "" && $address->getProvince() != " " && $address->getProvince() != "-" && $address->getProvince() != "--") {
                 if ($this->formArray["address2"] != "") {
                     $this->formArray["address2"] .= ", " . $address->getProvince();
                 } else {
                     $this->formArray["address2"] = $address->getProvince();
                 }
             }
         }
     } else {
         $pname = "";
     }
     if (count($owner->companyArray)) {
         foreach ($owner->companyArray as $companyKey => $companyValue) {
             if (!$companyValue->getCompanyName() || $companyValue->getCompanyName() == "") {
                 $cname = "";
             }
             if ($cname != "") {
                 $cname .= ", ";
             }
             $ownerNames[] = $companyValue->getCompanyName();
             $cname .= $companyValue->getCompanyName();
         }
         if (!is_object($address)) {
             $address = $owner->personArray[0]->addressArray[0];
             if (is_a($address, Address)) {
                 if ($address->getNumber() != "" && $address->getNumber() != " " && $address->getNumber() != "-" && $address->getNumber() != "--") {
                     $this->formArray["address1"] = $address->getNumber();
                 }
                 if ($address->getStreet() != "" && $address->getStreet() != " " && $address->getStreet() != "-" && $address->getStreet() != "--") {
                     if ($this->formArray["address1"] != "") {
                         $this->formArray["address1"] .= " " . $address->getStreet();
                     } else {
                         $this->formArray["address1"] = $address->getStreet();
                     }
                 }
                 if ($address->getBarangay() != "" && $address->getBarangay() != " " && $address->getBarangay() != "-" && $address->getBarangay() != "--") {
                     if ($this->formArray["address1"] != "") {
                         $this->formArray["address1"] .= ", " . $address->getBarangay();
                     } else {
                         $this->formArray["address1"] = $address->getBarangay();
                     }
                 }
                 if ($address->getDistrict() != "" && $address->getDistrict() != " " && $address->getDistrict() != "-" && $address->getDistrict() != "--") {
                     if ($this->formArray["address1"] != "") {
                         $this->formArray["address1"] .= ", " . $address->getDistrict();
                     } else {
                         $this->formArray["address1"] = $address->getDistrict();
                     }
                 }
                 if ($address->getMunicipalityCity() != "" && $address->getMunicipalityCity() != " " && $address->getMunicipalityCity() != "-" && $address->getMunicipalityCity() != "--") {
                     $this->formArray["address2"] = $address->getMunicipalityCity();
                 }
                 if ($address->getProvince() != "" && $address->getProvince() != " " && $address->getProvince() != "-" && $address->getProvince() != "--") {
                     if ($this->formArray["address2"] != "") {
                         $this->formArray["address2"] .= ", " . $address->getProvince();
                     } else {
                         $this->formArray["address2"] = $address->getProvince();
                     }
                 }
             }
         }
     } else {
         $cname = "";
     }
     //}
     if (is_array($ownerNames)) {
         sort($ownerNames);
         reset($ownerNames);
         $this->formArray["ownerName"] = implode(" ,", $ownerNames);
     } else {
         $this->formArray["ownerName"] = "";
     }
 }