Пример #1
0
 function Main()
 {
     $RPUEncode = new SoapObject(NCCBIZ . "RPUEncode.php", "urn:Object");
     if (!($newOdID = $RPUEncode->CreateNewRPU_AFS_TD($this->formArray["odID"], $this->formArray["uid"], $this->formArray["transactionCode"]))) {
         echo $this->formArray["odID"] . "<br>";
         exit("create failed");
     } else {
         $ODList = new SoapObject(NCCBIZ . "ODList.php", "urn:Object");
         $archiveValue = "true";
         $userID = $this->formArray["uid"];
         $odIDArray[] = $this->formArray["odID"];
         if (!($archiveRows = $ODList->archiveOD($odIDArray, $archiveValue, $userID))) {
             exit("archive failed");
         } else {
             $this->formArray["odID"] = $newOdID;
             $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
             if ($newAfsID = $AFSEncode->getAfsID($newOdID)) {
                 $this->formArray["afsID"] = $newAfsID;
                 header("location: AFSDetails.php" . $this->sess->url("") . "&odID=" . $newOdID . "&afsID=" . $newAfsID . "&transactionCode=" . $this->formArray["transactionCode"]);
             } else {
                 header("location: ODDetails.php" . $this->sess->url("") . "&odID=" . $newOdID);
             }
         }
     }
     $this->tpl->set_var("Session", $this->sess->url("") . $this->sess->add_query(array("odID" => $this->formArray["odID"], "ownerID" => $this->formArray["ownerID"])));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Пример #2
0
 function getPropertyTypeFromOD($od)
 {
     $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if ($afsID = $AFSEncode->getAfsID($od->getOdID())) {
         if ($xmlStr = $TDDetails->getTDFromAfsID($afsID)) {
             $td = new TD();
             if ($domDoc = domxml_open_mem($xmlStr)) {
                 $td->parseDomDocument($domDoc);
                 $propertyType = $td->getPropertyType();
             }
         }
     }
     switch ($propertyType) {
         case "Land":
             $propertyType = "L/P";
             break;
         case "ImprovementsBuildings":
             $propertyType = "I/B";
             break;
         case "Machineries":
             $propertyType = "M";
             break;
         default:
             $propertyType = "-";
             break;
     }
     return $propertyType;
 }
Пример #3
0
 function getPropertyTypeFromOD($od)
 {
     $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
     $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
     if ($afsID = $AFSEncode->getAfsID($od->getOdID())) {
         if ($xmlStr = $TDDetails->getTDFromAfsID($afsID)) {
             $td = new TD();
             if ($domDoc = domxml_open_mem($xmlStr)) {
                 $td->parseDomDocument($domDoc);
                 return $td->getPropertyType();
             }
         }
     }
     return false;
 }
 function getPrecedingTDArray($td)
 {
     $ODDetails = new SoapObject(NCCBIZ . "ODDetails.php", "urn:Object");
     if ($this->formArray["odID"] = $ODDetails->getOdIDFromTdID($td->getTdID())) {
         $ODHistoryList = new SoapObject(NCCBIZ . "ODHistoryList.php", "urn:Object");
         $ODHistoryRecords = new ODHistoryRecords();
         if (!($xmlStr = $ODHistoryList->getPrecedingODList($this->formArray["odID"]))) {
             // do nothing. no preceding OD
             return false;
         } else {
             if (!($domDoc = domxml_open_mem($xmlStr))) {
                 // no nothing. no preceding OD
                 return false;
             } else {
                 $ODHistoryRecords->parseDomDocument($domDoc);
                 $precedingODList = $ODHistoryRecords->arrayList;
                 $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
                 $AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
                 $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
                 foreach ($precedingODList as $key => $odHistory) {
                     $previousODID = $odHistory->getPreviousODID();
                     $previousAFSID = $AFSEncode->getAfsID($previousODID);
                     $previousAFSxml = $AFSDetails->getAfs($previousAFSID);
                     $previousAFSdomDoc = domxml_open_mem($previousAFSxml);
                     $previousAFS = new AFS();
                     $previousAFS->parseDomDocument($previousAFSdomDoc);
                     $precedingTDxml = $TDDetails->getTDFromAfsID($previousAFSID);
                     $precedingTDdomDoc = domxml_open_mem($precedingTDxml);
                     $precedingTD = new TD();
                     $precedingTD->parseDomDocument($precedingTDdomDoc);
                     $this->precedingTDArray[] = $precedingTD;
                 }
             }
             return $this->precedingTDArray;
         }
     }
 }
Пример #5
0
 function updateTDCanceledByTDNumber($td)
 {
     $ODHistoryList = new SoapObject(NCCBIZ . "ODHistoryList.php", "urn:Object");
     $ODHistoryRecords = new ODHistoryRecords();
     // capture canceledByTDNumber from odHistory
     if (!($xmlStr = $ODHistoryList->getSucceedingODList($this->formArray["odID"]))) {
         // error xml
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             // error domDoc
         } else {
             $ODHistoryRecords->parseDomDocument($domDoc);
             $succeedingODList = $ODHistoryRecords->arrayList;
             $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
             $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
             foreach ($succeedingODList as $key => $odHistory) {
                 $succeedingODID = $odHistory->getPreviousODID();
                 $succeedingAFSID = $AFSEncode->getAfsID($succeedingODID);
                 $succeedingTDxml = $TDDetails->getTDFromAfsID($succeedingAFSID);
                 $succeedingTDdomDoc = domxml_open_mem($succeedingTDxml);
                 $succeedingTD = new TD();
                 $succeedingTD->parseDomDocument($succeedingTDdomDoc);
                 $canceledByTDNumber[] = $succeedingTD->taxDeclarationNumber;
             }
             if (count($canceledByTDNumber) > 0) {
                 $i = 0;
                 $td->canceledByTDNumber = "";
                 foreach ($canceledByTDNumber as $key => $tdNumber) {
                     if ($i > 0) {
                         $td->canceledByTDNumber .= ", ";
                     }
                     $td->canceledByTDNumber .= $tdNumber;
                     $i++;
                 }
             }
             $td->setDomDocument();
             $domDoc = $td->getDomDocument();
             $xmlStr = $domDoc->dump_mem(true);
             $TDEncode = new SoapObject(NCCBIZ . "TDEncode.php", "urn:Object");
             $TDEncode->updateTD($xmlStr);
         }
     }
     return $td;
 }
Пример #6
0
 function Main()
 {
     //echo $this->formArray["formAction"];
     switch ($this->formArray["formAction"]) {
         case "delete":
             if (count($this->formArray["personID"]) > 0) {
                 $PersonList = new SoapObject(NCCBIZ . "PersonList.php", "urn:Object");
                 if (!($deletedRows = $PersonList->deleteRecord($this->formArray["personID"]))) {
                     $this->tpl->set_var("msg", "SOAP failed");
                 } else {
                     $this->tpl->set_var("msg", $deletedRows . " records deleted");
                 }
             } else {
                 $this->tpl->set_var("msg", "0 records deleted");
             }
             if (count($this->formArray["companyID"]) > 0) {
                 $CompanyList = new SoapObject(NCCBIZ . "CompanyList.php", "urn:Object");
                 if (!($deletedRows = $CompanyList->deleteRecord($this->formArray["companyID"]))) {
                     $this->tpl->set_var("msg", "SOAP failed");
                 } else {
                     $this->tpl->set_var("msg", $deletedRows . " records deleted");
                 }
             } else {
                 $this->tpl->set_var("msg", "0 records deleted");
             }
             header("location: ChangeOfOwnershipODDetails.php" . $this->sess->url("") . $this->sess->add_query(array("odID" => $this->formArray["odID"])));
             exit;
             break;
         case "remove":
             if (count($this->formArray["personID"])) {
                 $OwnerList = new SoapObject(NCCBIZ . "OwnerList.php", "urn:Object");
                 if (!($deletedRows = $OwnerList->removeOwnerPerson($this->formArray["ownerID"], $this->formArray["personID"]))) {
                     $this->tpl->set_var("msg", "SOAP failed");
                 } else {
                     $this->tpl->set_var("msg", $deletedRows . " records deleted");
                 }
             } else {
                 $this->tpl->set_var("msg", "0 records deleted");
             }
             if (count($this->formArray["companyID"]) > 0) {
                 $OwnerList = new SoapObject(NCCBIZ . "OwnerList.php", "urn:Object");
                 if (!($deletedRows = $OwnerList->removeOwnerCompany($this->formArray["ownerID"], $this->formArray["companyID"]))) {
                     $this->tpl->set_var("msg", "SOAP failed");
                 } else {
                     $this->tpl->set_var("msg", $deletedRows . " records deleted");
                 }
             } else {
                 $this->tpl->set_var("msg", "0 records deleted");
             }
             header("location: ChangeOfOwnershipODDetails.php" . $this->sess->url("") . $this->sess->add_query(array("odID" => $this->formArray["odID"])));
             exit;
             break;
         default:
             $this->tpl->set_var("msg", "");
     }
     $ODDetails = new SoapObject(NCCBIZ . "ODDetails.php", "urn:Object");
     if (!($xmlStr = $ODDetails->getOD($this->formArray["odID"]))) {
         exit("xml failed");
     } else {
         //exit($xmlStr);
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
             $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
         } else {
             $od = new OD();
             $od->parseDomDocument($domDoc);
             foreach ($od as $key => $value) {
                 if ($key == "locationAddress" && is_object($value)) {
                     foreach ($value as $lkey => $lvalue) {
                         $this->formArray[$lkey] = $lvalue;
                     }
                 } else {
                     $this->formArray[$key] = $value;
                 }
             }
             $this->formArray["landArea"] = number_format($od->getLandArea(), 4, '.', ',');
             $ODEncode = new SoapObject(NCCBIZ . "ODEncode.php", "urn:Object");
             $this->formArray["ownerID"] = $ODEncode->getOwnerID($this->formArray["odID"]);
             //$OwnerList = new SoapObject(NCCBIZ."OwnerList.php", "urn:Object");
             $xmlStr = $od->owner->domDocument->dump_mem(true);
             if (!$xmlStr) {
                 //exit(print_r($OwnerList));
                 $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                 $this->tpl->set_var("OwnerListTableBlock", "");
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $this->displayOwnerList($domDoc);
                 }
             }
         }
     }
     $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
     if (!($afsID = $AFSEncode->getAfsID($this->formArray["odID"]))) {
         //$this->tpl->set_block("rptsTemplate", "AFSDetails", "AFSDetailsBlock");
         //$this->tpl->set_var("AFSDetailsBlock", "");
         //echo "1afsID=".$afsID."=>".$this->formArray["odID"];
         $afs = new AFS();
         $afs->setOdID($this->formArray["odID"]);
         $afs->setDomDocument();
         $doc = $afs->getDomDocument();
         $xmlStr = $doc->dump_mem(true);
         //echo $xmlStr;
         if (!($afsID = $AFSEncode->saveAFS($xmlStr))) {
             echo "ret=" . $afsID;
         }
         //echo "<br>afsID=".$afsID;
     } else {
         //echo "2afsID=".$afsID."=>".$this->formArray["odID"];
         //$this->tpl->set_block("rptsTemplate", "AFSEncode", "AFSEncodeBlock");
         //$this->tpl->set_var("AFSEncodeBlock", "");
     }
     $this->formArray["afsID"] = $afsID;
     $this->setForm();
     $this->tpl->set_var("Session", $this->sess->url("") . $this->sess->add_query(array("odID" => $this->formArray["odID"], "ownerID" => $this->formArray["ownerID"])));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Пример #7
0
 function Main()
 {
     //echo $this->formArray["formAction"];
     switch ($this->formArray["formAction"]) {
         case "delete":
             if (count($this->formArray["personID"]) > 0) {
                 $PersonList = new SoapObject(NCCBIZ . "PersonList.php", "urn:Object");
                 if (!($deletedRows = $PersonList->deleteRecord($this->formArray["personID"]))) {
                     $this->tpl->set_var("msg", "SOAP failed");
                 } else {
                     $this->tpl->set_var("msg", $deletedRows . " records deleted");
                 }
             } else {
                 $this->tpl->set_var("msg", "0 records deleted");
             }
             if (count($this->formArray["companyID"]) > 0) {
                 $CompanyList = new SoapObject(NCCBIZ . "CompanyList.php", "urn:Object");
                 if (!($deletedRows = $CompanyList->deleteRecord($this->formArray["companyID"]))) {
                     $this->tpl->set_var("msg", "SOAP failed");
                 } else {
                     $this->tpl->set_var("msg", $deletedRows . " records deleted");
                 }
             } else {
                 $this->tpl->set_var("msg", "0 records deleted");
             }
             header("location: ODDetails.php" . $this->sess->url("") . $this->sess->add_query(array("odID" => $this->formArray["odID"])));
             exit;
             break;
         case "remove":
             if (count($this->formArray["personID"])) {
                 $OwnerList = new SoapObject(NCCBIZ . "OwnerList.php", "urn:Object");
                 if (!($deletedRows = $OwnerList->removeOwnerPerson($this->formArray["ownerID"], $this->formArray["personID"]))) {
                     $this->tpl->set_var("msg", "SOAP failed");
                 } else {
                     $this->tpl->set_var("msg", $deletedRows . " records deleted");
                 }
             } else {
                 $this->tpl->set_var("msg", "0 records deleted");
             }
             if (count($this->formArray["companyID"]) > 0) {
                 $OwnerList = new SoapObject(NCCBIZ . "OwnerList.php", "urn:Object");
                 if (!($deletedRows = $OwnerList->removeOwnerCompany($this->formArray["ownerID"], $this->formArray["companyID"]))) {
                     $this->tpl->set_var("msg", "SOAP failed");
                 } else {
                     $this->tpl->set_var("msg", $deletedRows . " records deleted");
                 }
             } else {
                 $this->tpl->set_var("msg", "0 records deleted");
             }
             header("location: ODDetails.php" . $this->sess->url("") . $this->sess->add_query(array("odID" => $this->formArray["odID"])));
             exit;
             break;
         default:
             $this->tpl->set_var("msg", "");
     }
     $ODDetails = new SoapObject(NCCBIZ . "ODDetails.php", "urn:Object");
     if (!($xmlStr = $ODDetails->getOD($this->formArray["odID"]))) {
         exit("xml failed");
     } else {
         //exit($xmlStr);
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
             $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
         } else {
             $od = new OD();
             $od->parseDomDocument($domDoc);
             foreach ($od as $key => $value) {
                 if ($key == "locationAddress" && is_object($value)) {
                     foreach ($value as $lkey => $lvalue) {
                         $this->formArray[$lkey] = $lvalue;
                     }
                 } else {
                     $this->formArray[$key] = $value;
                 }
             }
             $this->formArray["landArea"] = number_format($od->getLandArea(), 4, '.', ',');
             // confirmation for double transaction
             $this->formArray["TRANSACTION_MAX_DAYDIFFERENCE"] = TRANSACTION_MAX_DAYDIFFERENCE;
             $this->formArray["dayDifference"] = getDateDifference($od->getDateCreated(), strtotime("now"), "d");
             $this->formArray["dayDifferenceText"] = getOnlyDays($this->formArray["dayDifference"]);
             $this->formArray["transactionCode"] = $od->getTransactionCode();
             $this->formArray["blockDoubleTransaction"] = $od->getArchive();
             $ODEncode = new SoapObject(NCCBIZ . "ODEncode.php", "urn:Object");
             $this->formArray["ownerID"] = $ODEncode->getOwnerID($this->formArray["odID"]);
             //$OwnerList = new SoapObject(NCCBIZ."OwnerList.php", "urn:Object");
             $xmlStr = $od->owner->domDocument->dump_mem(true);
             if (!$xmlStr) {
                 //exit(print_r($OwnerList));
                 $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                 $this->tpl->set_var("OwnerListTableBlock", "");
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $this->displayOwnerList($domDoc);
                 }
             }
         }
     }
     $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
     if (!($afsID = $AFSEncode->getAfsID($this->formArray["odID"]))) {
         //$this->tpl->set_block("rptsTemplate", "AFSDetails", "AFSDetailsBlock");
         //$this->tpl->set_var("AFSDetailsBlock", "");
         //echo "1afsID=".$afsID."=>".$this->formArray["odID"];
         $afs = new AFS();
         $afs->setOdID($this->formArray["odID"]);
         $afs->setDomDocument();
         $doc = $afs->getDomDocument();
         $xmlStr = $doc->dump_mem(true);
         //echo $xmlStr;
         if (!($afsID = $AFSEncode->saveAFS($xmlStr))) {
             echo "ret=" . $afsID;
         }
         //echo "<br>afsID=".$afsID;
     } else {
         //echo "2afsID=".$afsID."=>".$this->formArray["odID"];
         //$this->tpl->set_block("rptsTemplate", "AFSEncode", "AFSEncodeBlock");
         //$this->tpl->set_var("AFSEncodeBlock", "");
     }
     $this->displayODHistory();
     $this->formArray["afsID"] = $afsID;
     $this->setForm();
     $this->setPageDetailPerms();
     $this->tpl->set_var("uname", $this->user["uname"]);
     $this->tpl->set_var("today", date("F j, Y"));
     $this->tpl->set_var("Session", $this->sess->url("") . $this->sess->add_query(array("odID" => $this->formArray["odID"], "ownerID" => $this->formArray["ownerID"])));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Пример #8
0
 function refreshTDHistory($td)
 {
     $ODDetails = new SoapObject(NCCBIZ . "ODDetails.php", "urn:Object");
     if ($this->formArray["odID"] = $ODDetails->getOdIDFromTdID($td->getTdID())) {
         $ODHistoryList = new SoapObject(NCCBIZ . "ODHistoryList.php", "urn:Object");
         $ODHistoryRecords = new ODHistoryRecords();
         if (!($xmlStr = $ODHistoryList->getPrecedingODList($this->formArray["odID"]))) {
             // do nothing. no preceding OD
             return false;
         } else {
             if (!($domDoc = domxml_open_mem($xmlStr))) {
                 // no nothing. no preceding OD
             } else {
                 $ODHistoryRecords->parseDomDocument($domDoc);
                 $precedingODList = $ODHistoryRecords->arrayList;
                 $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
                 $AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
                 $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
                 foreach ($precedingODList as $key => $odHistory) {
                     $previousODID = $odHistory->getPreviousODID();
                     $previousAFSID = $AFSEncode->getAfsID($previousODID);
                     $previousAFSxml = $AFSDetails->getAfs($previousAFSID);
                     $previousAFSdomDoc = domxml_open_mem($previousAFSxml);
                     $previousAFS = new AFS();
                     $previousAFS->parseDomDocument($previousAFSdomDoc);
                     $precedingTDxml = $TDDetails->getTDFromAfsID($previousAFSID);
                     $precedingTDdomDoc = domxml_open_mem($precedingTDxml);
                     $precedingTD = new TD();
                     $precedingTD->parseDomDocument($precedingTDdomDoc);
                     // capture DUES of precedingTD
                     $DueList = new SoapObject(NCCBIZ . "DueList.php", "urn:Object");
                     if (!($xmlStr = $DueList->getDueList($precedingTD->getTdID(), $this->formArray["taxableYear"] - 1))) {
                         // no Dues for precedingTD
                         //echo "no dues";
                     } else {
                         if (!($domDoc = domxml_open_mem($xmlStr))) {
                             // no Dues for precedingTD
                             //echo "no dues";
                         } else {
                             $dueRecords = new DueRecords();
                             $dueRecords->parseDomDocument($domDoc);
                             foreach ($dueRecords->getArrayList() as $due) {
                                 foreach ($due as $dueKey => $dueValue) {
                                     switch ($dueKey) {
                                         case "dueType":
                                             $dueArray[$dueValue] = $due;
                                             break;
                                     }
                                 }
                             }
                             $BacktaxTDDetails = new SoapObject(NCCBIZ . "BacktaxTDDetails.php", "urn:Object");
                             $BacktaxTDEncode = new SoapObject(NCCBIZ . "BacktaxTDEncode.php", "urn:Object");
                             if (!($xmlStr = $BacktaxTDDetails->getBacktaxTD($td->getTdID(), $this->formArray["taxableYear"] - 1))) {
                                 // backtax for Due does not exist, create backtax record
                                 $backtaxTD = $this->setBacktaxTDFromDueArray($td->getTdID(), "", $dueArray, $precedingTD, $previousAFS);
                                 $backtaxTD->setDomDocument();
                                 $backtaxTDDoc = $backtaxTD->getDomDocument();
                                 $backtaxTDXmlStr = $backtaxTDDoc->dump_mem(true);
                                 if (!($backtaxTDID = $BacktaxTDEncode->saveBacktaxTD($backtaxTDXmlStr))) {
                                     echo "Error saving BacktaxTD";
                                 }
                             } else {
                                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                                     // backtax for Due does not exist, create backtax
                                     $backtaxTD = $this->setBacktaxTDFromDueArray($td->getTdID(), "", $dueArray, $precedingTD, $previousAFS);
                                     $backtaxTD->setDomDocument();
                                     $backtaxTDDoc = $backtaxTD->getDomDocument();
                                     $backtaxTDXmlStr = $backtaxTDDoc->dump_mem(true);
                                     if (!($backtaxTDID = $BacktaxTDEncode->saveBacktaxTD($backtaxTDXmlStr))) {
                                         echo "Error saving BacktaxTD";
                                     }
                                 } else {
                                     // update backtax record from Due
                                     $backtaxTD = new BacktaxTD();
                                     $backtaxTD->parseDomDocument($domDoc);
                                     $backtaxTD = $this->setBacktaxTDFromDueArray($td->getTdID(), $backtaxTD->getBacktaxTDID(), $dueArray, $precedingTD, $previousAFS);
                                     $backtaxTD->setDomDocument();
                                     $backtaxTDDoc = $backtaxTD->getDomDocument();
                                     $backtaxTDXmlStr = $backtaxTDDoc->dump_mem(true);
                                     if (!($backtaxTDID = $BacktaxTDEncode->updateBacktaxTD($backtaxTDXmlStr))) {
                                         echo "Error updating BacktaxTD";
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Пример #9
0
 function Main()
 {
     $this->tpl->set_block("rptsTemplate", "TDList", "TDListBlock");
     $this->tpl->set_block("rptsTemplate", "TDDBEmpty", "TDDBEmptyBlock");
     $this->tpl->set_var("TDDBEmptyBlock", "");
     $this->tpl->set_block("TDList", "Land", "LandBlock");
     $this->tpl->set_block("TDList", "PlantsTrees", "PlantsTreesBlock");
     $this->tpl->set_block("TDList", "ImprovementsBuildings", "ImprovementsBuildingsBlock");
     $this->tpl->set_block("TDList", "Machineries", "MachineriesBlock");
     $propertyType = $this->formArray["propertyType"];
     $propertyID = $this->formArray["propertyID"];
     switch ($propertyType) {
         case "Land":
             $LandDetails = new SoapObject(NCCBIZ . "LandDetails.php", "urn:Object");
             if (!($xmlStr = $LandDetails->getLand($propertyID))) {
                 echo "xml failed";
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $land = new Land();
                     $land->parseDomDocument($domDoc);
                     //$land->selectRecord($propertyID);
                     $this->formArray["landTotalMarketValue"] += tofloat($land->getMarketValue());
                     $this->formArray["landTotalAssessedValue"] += tofloat($land->getAssessedValue());
                     $this->displayLand($land);
                     //echo $this->formArray["landTotalAssessedValue"];
                 }
             }
             $this->tpl->set_var("PlantsTreesBlock", "");
             $this->tpl->set_var("ImprovementsBuildingsBlock", "");
             $this->tpl->set_var("MachineriesBlock", "");
             break;
         case "PlantsTrees":
             $PlantsTreesDetails = new SoapObject(NCCBIZ . "PlantsTreesDetails.php", "urn:Object");
             if (!($xmlStr = $PlantsTreesDetails->getPlantsTrees($propertyID))) {
                 echo "xml failed";
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $plantsTrees = new PlantsTrees();
                     $plantsTrees->parseDomDocument($domDoc);
                     //$plantsTrees->selectRecord($propertyID);
                     $this->formArray["plantTotalMarketValue"] += tofloat($plantsTrees->getMarketValue());
                     $this->formArray["plantTotalAssessedValue"] += tofloat($plantsTrees->getAssessedValue());
                     $this->displayPlantsTrees($plantsTrees);
                 }
             }
             $this->tpl->set_var("LandBlock", "");
             $this->tpl->set_var("ImprovementsBuildingsBlock", "");
             $this->tpl->set_var("MachineriesBlock", "");
             break;
         case "ImprovementsBuildings":
             $ImprovementsBuildingsDetails = new SoapObject(NCCBIZ . "ImprovementsBuildingsDetails.php", "urn:Object");
             if (!($xmlStr = $ImprovementsBuildingsDetails->getImprovementsBuildings($propertyID))) {
                 echo "xml failed";
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $improvementsBuildings = new ImprovementsBuildings();
                     $improvementsBuildings->parseDomDocument($domDoc);
                     //$improvementsBuildings->selectRecord($propertyID);
                     $this->formArray["bldgTotalMarketValue"] += tofloat($improvementsBuildings->getMarketValue());
                     $this->formArray["bldgTotalAssessedValue"] += tofloat($improvementsBuildings->getAssessedValue());
                     $this->displayImprovementsBuildings($improvementsBuildings);
                 }
             }
             $this->tpl->set_var("LandBlock", "");
             $this->tpl->set_var("PlantsTreesBlock", "");
             $this->tpl->set_var("MachineriesBlock", "");
             break;
         case "Machineries":
             $MachineriesDetails = new SoapObject(NCCBIZ . "MachineriesDetails.php", "urn:Object");
             if (!($xmlStr = $MachineriesDetails->getMachineries($propertyID))) {
                 echo "xml failed";
             } else {
                 //echo $xmlStr;
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
                     $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
                 } else {
                     $machineries = new Machineries();
                     $machineries->parseDomDocument($domDoc);
                     //$machineries->selectRecord($propertyID);
                     $this->formArray["machTotalMarketValue"] += tofloat($machineries->getMarketValue());
                     $this->formArray["machTotalAssessedValue"] += tofloat($machineries->getAssessedValue());
                     $this->displayMachineries($machineries);
                 }
             }
             $this->tpl->set_var("LandBlock", "");
             $this->tpl->set_var("PlantsTreesBlock", "");
             $this->tpl->set_var("ImprovementsBuildingsBlock", "");
             break;
         default:
             $this->tpl->set_block("TDList", "Land", "LandBlock");
             $this->tpl->set_var("LandBlock", "");
             $this->tpl->set_block("TDList", "PlantsTrees", "PlantsTreesBlock");
             $this->tpl->set_var("PlantsTreesBlock", "");
             $this->tpl->set_block("TDList", "ImprovementsBuildings", "ImprovementsBuildingsBlock");
             $this->tpl->set_var("ImprovementsBuildingsBlock", "");
             $this->tpl->set_block("TDList", "Machineries", "MachineriesBlock");
             $this->tpl->set_var("MachineriesBlock", "");
             $this->tpl->set_block("TDList", "TD", "TDBlock");
             $this->tpl->set_var("TDBlock", "");
     }
     $TDEncode = new SoapObject(NCCBIZ . "TDEncode.php", "urn:Object");
     $this->formArray["afsID"] = $TDEncode->getAfsID($this->formArray["tdID"]);
     $afs = new AFS();
     $this->formArray["odID"] = $afs->checkOdID($this->formArray["afsID"]);
     $ODEncode = new SoapObject(NCCBIZ . "ODEncode.php", "urn:Object");
     $this->formArray["ownerID"] = $ODEncode->getOwnerID($this->formArray["odID"]);
     $OwnerList = new SoapObject(NCCBIZ . "OwnerList.php", "urn:Object");
     if (!($xmlStr = $OwnerList->getOwnerList($this->formArray["ownerID"]))) {
         //exit(print_r($OwnerList));
         $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
         $this->tpl->set_var("OwnerListTableBlock", "");
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             $this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
             $this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
         } else {
             $this->displayOwnerList($domDoc);
         }
     }
     $this->setForm();
     $this->tpl->parse("TDListBlock", "TDList", true);
     $this->tpl->set_var("Session", $this->sess->url("") . $this->sess->add_query(array("tdID" => $this->formArray["rtdID"])));
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Пример #10
0
 function getCanceledByTDNumberArray()
 {
     $ODHistoryList = new SoapObject(NCCBIZ . "ODHistoryList.php", "urn:Object");
     $ODHistoryRecords = new ODHistoryRecords();
     // capture canceledByTDNumber from odHistory
     if (!($xmlStr = $ODHistoryList->getSucceedingODList($this->formArray["odID"]))) {
         // error xml
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             // error domDoc
         } else {
             $ODHistoryRecords->parseDomDocument($domDoc);
             $succeedingODList = $ODHistoryRecords->arrayList;
             $AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
             $TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
             foreach ($succeedingODList as $key => $odHistory) {
                 $succeedingODID = $odHistory->getPresentODID();
                 $succeedingAFSID = $AFSEncode->getAfsID($succeedingODID);
                 $succeedingTDxml = $TDDetails->getTDFromAfsID($succeedingAFSID);
                 $succeedingTDdomDoc = domxml_open_mem($succeedingTDxml);
                 $succeedingTD = new TD();
                 $succeedingTD->parseDomDocument($succeedingTDdomDoc);
                 $canceledByTDNumber[] = $succeedingTD->taxDeclarationNumber;
             }
             return $canceledByTDNumber;
         }
     }
     return false;
 }