本文整理汇总了PHP中TD::selectRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP TD::selectRecord方法的具体用法?PHP TD::selectRecord怎么用?PHP TD::selectRecord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TD
的用法示例。
在下文中一共展示了TD::selectRecord方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cancelRPU
function cancelRPU($odID, $userID, $transactionCode = "CA")
{
$od = new OD();
$od->selectRecord($odID);
$od->archive = "true";
$od->modifiedBy = $userID;
$od->transactionCode = $transactionCode;
$afs = new AFS();
$afs->selectRecord("", "", $odID);
$afsID = $afs->afsID;
$afs->archive = "true";
$afs->modifiedBy = $userID;
// NCC Modification checked and implemented by K2 : November 16, 2005
// details:
// added lines 70-76, 79 ($td related)
$td = new TD();
$td->selectRecord("", $afsID);
$tdID = $td->tdID;
$td->archive = "true";
$td->modifiedBy = $userID;
$od->cancelRecord($odID, "true", $userID, $transactionCode);
$afs->archiveRecord($afsID, "true", $userID);
$td->archiveRecord($tdID, "true", $userID);
return true;
}
示例2: generateTDHistory
function generateTDHistory($tdID)
{
$td = new TD();
$td->selectRecord($tdID);
$afsID = $td->getAfsID();
// echo("afsID=$afsID<br>");
$afs = new AFS();
$afs->selectRecord($afsID);
$odID = $afs->getOdID();
// echo("odID=$odID<br>");
$condition = sprintf(" WHERE presentODID='%s' ", fixQuotes($odID));
$odHistoryRecords = new ODHistoryRecords();
$odHistoryRecords->selectRecords($condition);
if (count($odHistoryRecords->arrayList) > 0) {
// echo("count>0<br>");
foreach ($odHistoryRecords->arrayList as $key => $odHistory) {
$previousODID = $odHistory->getPreviousODID();
$presentODID = $odHistory->getPresentODID();
$previousAFS = new AFS();
$previousAFS->selectRecord($afsID = "", $limit = "", $previousODID);
$previousAFSID = $previousAFS->getAfsID();
$previousTD = new TD();
$previousTD->selectRecord($tdID = "", $previousAFSID);
$previousTDID = $previousTD->getTdID();
$this->tdHistory[] = $previousTD;
$this->generateTDHistory($previousTDID);
}
} else {
//echo("count==0<br>");
return false;
}
}
示例3: Main
function Main()
{
$fp = fopen("batchCalculate.log", "w") or die("Couldn't create new file");
$rptopID = isset($_POST['rptopID']) ? $_POST['rptopID'] : $_GET['rptopID'];
if (is_array($rptopID)) {
foreach ($rptopID as $key => $id) {
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($id))) {
exit("xml failed");
} else {
fwrite($fp, "\r\nrptopid: " . $id . "\r\n");
if (!($domDoc = domxml_open_mem($xmlStr))) {
echo "error xmlDoc";
} else {
$rptop = new RPTOP();
$td = new TD();
$rptop->parseDomDocument($domDoc);
foreach ($rptop as $key => $rvalue) {
if ($key == "tdArray") {
$tdCtr = 0;
if (count($rvalue)) {
foreach ($rvalue as $tkey => $tvalue) {
$td->selectRecord($tvalue->getTdID());
$assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
$taxDue = new Dues($tvalue->getTdID(), $rptop->getTaxableYear());
$taxDue->setBasic($assessedValue);
$taxDue->setSEF($assessedValue);
$taxDue->setIdleStatus($idleStatus);
if ($taxDue->getIdleStatus()) {
$taxDue->setIdle($assessedValue);
} else {
$taxDue->setIdle(0);
}
$taxDue->store();
echo $id;
echo "=>";
echo $tvalue->getTdID();
echo "<br>";
fwrite($fp, "TD: " . $tvalue->getTdID() . "...PROCESSED COMPLETE\r\n");
$tdCtr++;
}
}
}
}
}
}
}
header("Location: batchCalculateDone.php" . $this->sess->url(""));
exit;
}
}
示例4: getOdIDFromTdID
function getOdIDFromTdID($tdID)
{
$ret = false;
$td = new TD();
if ($td->selectRecord($tdID)) {
$afsID = $td->getAfsID();
if ($afs = new AFS()) {
$afs->selectRecord($afsID);
$odID = $afs->getOdID();
$ret = $odID;
}
}
return $ret;
}
示例5: getTDNumber
function getTDNumber($tdID, $backtaxTDID)
{
if ($tdID != "") {
$td = new TD();
$td->selectRecord($tdID);
$tdNumber = $td->getTaxDeclarationNumber();
} else {
if ($backtaxTDID != "") {
$backtaxTD = new BacktaxTD();
$backtaxTD->selectRecord("", $backtaxTDID);
$tdNumber = $backtaxTD->getTDNumber();
}
}
return $tdNumber;
}
示例6: getAfsID
function getAfsID($tdID)
{
$td = new TD();
$td->selectRecord($tdID);
$propertyID = $td->propertyID;
$propertyType = $td->propertyType;
switch ($propertyType) {
case "Land":
$property = new Land();
break;
case "PlantsTrees":
$property = new PlantsTrees();
break;
case "ImprovementsBuildings":
$property = new ImprovementsBuildings();
break;
case "Machineries":
$property = new Machineries();
break;
}
$property->selectRecord($propertyID);
$afsID = $property->afsID;
return $afsID;
}
示例7: displayRecords
function displayRecords()
{
$this->selectRecords();
$this->tpl->set_block("rptsTemplate", "OwnerPersonList", "OwnerPersonListBlock");
$this->tpl->set_block("OwnerPersonList", "ODList", "ODListBlock");
foreach ($this->arrayList as $person) {
$this->tpl->set_var("personID", $person->getPersonID());
$this->tpl->set_var("lastName", $person->getLastName());
$this->tpl->set_var("firstName", $person->getFirstName());
$this->tpl->set_var("middleName", $person->getMiddleName());
$this->tpl->set_var("gender", $person->getGender());
$this->tpl->set_var("birthday", $person->getBirthday());
$this->tpl->set_var("maritalStatus", $person->getMaritalStatus());
$this->tpl->set_var("tin", $person->getTin());
$this->tpl->set_var("telephone", $person->getTelephone());
$this->tpl->set_var("mobileNumber", $person->getMobileNumber());
$this->tpl->set_var("email", $person->getEmail());
if (is_array($person->addressArray)) {
$address = $person->addressArray[0];
$this->tpl->set_var("address", $address->getFullAddress());
}
// capture OD, AFS, and TD info
$this->setDB();
$sql = sprintf("SELECT DISTINCT(Owner.odID) as odID" . " FROM Owner,OwnerPerson " . " WHERE " . " Owner.ownerID = OwnerPerson.ownerID AND " . " OwnerPerson.personID = '%s' ", $person->getPersonID());
$this->db->query($sql);
while ($this->db->next_record()) {
$od = new OD();
if ($od->selectRecord($this->db->f("odID"))) {
$this->ODArray[] = $od;
$this->tpl->set_var("odID", $od->getOdID());
if (is_object($od->locationAddress)) {
$this->tpl->set_var("locationAddress", $od->locationAddress->getFullAddress());
} else {
$this->tpl->set_var("locationAddress", "");
}
$afs = new AFS();
if ($afs->selectRecord("", "", $od->getOdID(), "")) {
$this->tpl->set_var("afsID", $afs->getAfsID());
$this->tpl->set_var("propertyIndexNumber", $afs->getPropertyIndexNumber());
$this->tpl->set_var("arpNumber", $afs->getArpNumber());
if (is_array($afs->landArray)) {
$this->displayLandList($afs->landArray);
}
if (is_array($afs->plantsTreesArray)) {
$this->displayPlantsTreesList($afs->plantsTreesArray);
}
if (is_array($afs->improvementsBuildingsArray)) {
$this->displayImprovementsBuildingsList($afs->improvementsBuildingsArray);
}
if (is_array($afs->machineriesArray)) {
$this->displayMachineriesList($afs->machineriesArray);
}
$td = new TD();
if ($td->selectRecord("", $afs->getAfsID(), "", "", "")) {
$this->tpl->set_var("tdID", $td->getTdID());
$this->tpl->set_var("taxDeclarationNumber", $td->getTaxDeclarationNumber());
$this->tpl->set_var("propertyType", $td->getPropertyType());
}
}
unset($td);
unset($afs);
unset($od);
$this->tpl->parse("ODListBlock", "ODList", true);
}
}
$this->tpl->parse("OwnerPersonListBlock", "OwnerPersonList", true);
$this->tpl->set_var("ODListBlock", "");
$this->clearPropertyElements();
unset($this->ODArray);
unset($this->AFSArray);
unset($this->TDArray);
unset($this->db);
}
}
示例8: setDetails
function setDetails()
{
global $sess;
# set the RPTOP to get the owner's object and information
# get it from POST if possible, otherwise from GET
$rptopID = isset($_POST['rptopID']) ? $_POST['rptopID'] : $_GET['rptopID'];
//$rptopID = 14;
$rptop = new RPTOP();
$rptop->selectRecord($rptopID);
$amountPaid = str_replace(",", "", $_POST['amountPaid']);
$dateDue = $rptop->getTaxableYear();
# must be a usable format
$formValues['datePaid'] = date("F j, Y");
$pORDate = $_POST['prevORDate'];
if ($pORDate) {
list($pmonth, $pday, $pyear) = explode("-", $pORDate);
$formValues['porMonth'] = date("F", mktime(0, 0, 0, $pmonth + 1, 0, 0));
$formValues['porYear'] = $pyear;
$formValues['porDay'] = $pday;
} else {
$formValues['porMonth'] = "";
$formValues['porYear'] = "";
$formValues['porDay'] = "";
}
$formValues['orYear'] = substr($rptop->getTaxableYear(), 2);
$formValues['orMonth'] = date("F");
$formValues['orDay'] = date("j");
$formValues['taxableYear'] = $rptop->getTaxableYear();
$formValues['rptopNum'] = $rptop->getRptopNumber();
$formValues['prevORNum'] = $_POST['prevORNum'];
$formValues['orNum'] = $_POST['receiptNo'];
$formValues['kindOfPayment'] = $_POST['kindOfPayment'];
$formValues['checkNumber'] = $_POST['checkNum'];
$formValues['checkDate'] = $_POST['checkDate'];
# set the specific TD (although this is in the RPTOP), hard to search for it.
# get the tdID from POST or GET to initialize the TD
$tdID = isset($_POST['tdID']) ? $_POST['tdID'] : $_GET['tdID'];
//$tdID = array(2,1);
//$ownerID=5;
$td = new TD();
$ctr = 0;
# $this->tpl->set_block('step3','PrintTDID','PrintTDIDs');
//$this->tpl->set_block('step3','TDID','TDIDs');
$this->tpl->set_block('receipt', 'Property', 'Properties');
$this->tpl->set_block('Property', 'Owner', 'Owners');
$n = 165;
if (is_array($tdID)) {
foreach ($tdID as $key => $id) {
# set/pass tdIDs to form
$this->tpl->set_var(tdID, $id);
$this->tpl->parse('TDIDs', 'TDID', 'true');
$td->selectRecord($id);
$tdNum = $td->getTaxDeclarationNumber();
$afs = new AFS();
$formValues['tdNum'] = $tdNum;
$afs->selectRecord($td->getAfsID());
$od = new OD();
$od->selectRecord($afs->getOdID());
$addr = $od->getLocationAddress();
# get municipality/province and city(same for all tds)
//$lotAddress = new LocationAddress;
//$lotAddress->selectRecordFromTdID($id);
//$formValues['province'] = $lotAddress->getProvince();
//$formValues['city'] = $lotAddress->getMunicipalityCity();
$formValues['city'] = $addr->getMunicipalityCity();
$formValues['province'] = $addr->getProvince();
$formValues['municipalityCityID'] = $addr->getMunicipalityCityID();
# get location/ block and lot number OR Barangay
#$formValues['lotAddress'] = $lotAddress->getFullAddress();
$formValues['lotAddress'] = $addr->getNumber . " " . $addr->getStreet();
if ($formValues['lotAddress'] == "") {
$formValues['lotAddress'] = $addr->getBarangay();
}
$propertyType = $td->getPropertyType();
$propertyID = $td->getPropertyID();
$assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
$formAssessedValue = number_format($td->getAssessedValue(), 2);
# separate assessed value of land and others(plantsTrees, improvementsBuildings, machineries)
if ($propertyType == "Land") {
$formValues['assessedValueLand'] = $formAssessedValue;
$formValues['assessedValueOthers'] = "";
} else {
$formValues['assessedValueLand'] = "";
$formValues['assessedValueOthers'] = $formAssessedValue;
}
$formValues['assessedValue'] = $formAssessedValue;
$formValues['propertyType'] = $propertyType;
# set the owner's List
# we define the owner from the RPTOP
$ownerSwitch = true;
if ($ctr > 0) {
$ownerValues['ownerName'] = "";
$ownerValues['ownerAddress'] = "";
$this->tpl->set_var($ownerValues);
$this->tpl->parse(Owners, Owner, false);
} else {
$owner = $rptop->getOwner();
$personArray = $owner->getPersonArray();
if (is_array($personArray)) {
foreach ($personArray as $person) {
//.........这里部分代码省略.........
示例9: getTDListOf
function getTDListOf($id, $type, $year)
{
echo "<br><br>" . $year . "-" . $id;
$owner = new Owner();
//echo("\$ownerIDArray = \$owner->selectOwner".$type."(".$id.");");
eval("\$ownerIDArray = \$owner->selectOwner" . $type . "(" . $id . ");");
echo "<br>ownerIDArray - ";
print_r($ownerIDArray);
if ($ownerIDArray) {
$odArray = "";
foreach ($ownerIDArray as $key => $value) {
eval("\$odID = \$owner->selectOD" . $type . "({$value});");
if ($odID) {
$odArray[] = $odID;
}
}
echo "<br>odArray - ";
print_r($odArray);
unset($owner);
if ($odArray) {
$afsArray = "";
foreach ($odArray as $key => $value) {
$afs = new AFS();
$odHistoryRecords = new OdHistoryRecords();
$afsID = $afs->checkAFSYear($value, $year);
$afs->selectRecord("", "", $value);
//print_r($value);
$odHistoryArr = $odHistoryRecords->selectSuccOD($value, $year);
if ($odHistoryArr) {
$latestAfs = true;
foreach ($odHistoryArr as $k => $v) {
if ($afs->checkAFSYear($v, $year)) {
$latestAfs = false;
}
echo "<br>latestAfs = " . $latestAfs . "<br>odID = " . $v . "<br>year" . $year . " - " . $afs->getEffectivity();
}
if ($latestAfs) {
$afsIDArray[] = $afsID;
}
} else {
if ($afsID != "") {
$afsIDArray[] = $afsID;
}
}
//if ($latesAfs) $afsIDArray[] = $afsID;
}
echo "<br>afsIDArray - ";
print_r($afsIDArray);
unset($afs);
if ($afsIDArray) {
$tdRecords = new TDRecords();
$tdIDArray = "";
foreach ($afsIDArray as $tkey => $tvalue) {
$td = new TD();
//echo $tvalue;
if ($td->selectRecord("", $tvalue)) {
//echo $td->getTdID();
$tdIDArray[] = $td->getTdID();
}
unset($td);
/*
$afs = new AFS;
$afs->selectRecord($tvalue);
//print_r($afs);
//echo "<br>";
$landArray = $afs->getLandArray();
$plantsTreesArray = $afs->getPlantsTreesArray();
$improvementsBuildingsArray = $afs->getImprovementsBuildingsArray();
$machineriesArray = $afs->getMachineriesArray();
unset($afs);
if ($landArray){
foreach($landArray as $lkey => $lvalue){
//echo($lvalue->getPropertyID()."<br>");
$td = new TD;
if ($td->selectRecord("",$lvalue->getPropertyID(),"Land",$year)){
$tdRecords->setArrayList($td);
$tdIDArray[] = $td->getTdID();
}
unset($td);
}
}
if ($plantsTreesArray){
foreach($plantsTreesArray as $lkey => $lvalue){
//echo($lvalue->getPropertyID()."<br>");
$td = new TD;
if ($td->selectRecord("",$lvalue->getPropertyID(),"PlantsTrees",$year)){
$tdRecords->setArrayList($td);
$tdIDArray[] = $td->getTdID();
}
unset($td);
}
}
if ($improvementsBuildingsArray){
foreach($improvementsBuildingsArray as $lkey => $lvalue){
//echo($lvalue->getPropertyID()."<br>");
$td = new TD;
if ($td->selectRecord("",$lvalue->getPropertyID(),"ImprovementsBuildings",$year)){
$tdRecords->setArrayList($td);
$tdIDArray[] = $td->getTdID();
}
//.........这里部分代码省略.........
示例10: getTDListOf
function getTDListOf($id, $type, $year)
{
$owner = new Owner();
//echo("\$ownerIDArray = \$owner->selectOwner".$type."(".$id.");");
eval("\$ownerIDArray = \$owner->selectOwner" . $type . "(" . $id . ");");
if ($ownerIDArray) {
$odArray = "";
foreach ($ownerIDArray as $key => $value) {
eval("\$odID = \$owner->selectOD" . $type . "({$value});");
if ($odID) {
$odArray[] = $odID;
}
}
unset($owner);
if ($odArray) {
$afsArray = "";
foreach ($odArray as $key => $value) {
$afs = new AFS();
$afsIDArray[] = $afs->checkAfsID($value);
}
unset($afs);
if ($afsIDArray) {
$tdRecords = new TDRecords();
$tdIDArray = "";
foreach ($afsIDArray as $tkey => $tvalue) {
$td = new TD();
if ($td->selectRecord("", $tvalue, "", "", $year)) {
$tdIDArray[] = $td->getTdID();
}
unset($td);
/*
$afs = new AFS;
$afs->selectRecord($tvalue);
//print_r($afs);
//echo "<br>";
$landArray = $afs->getLandArray();
$plantsTreesArray = $afs->getPlantsTreesArray();
$improvementsBuildingsArray = $afs->getImprovementsBuildingsArray();
$machineriesArray = $afs->getMachineriesArray();
unset($afs);
if ($landArray){
foreach($landArray as $lkey => $lvalue){
//echo($lvalue->getPropertyID()."<br>");
$td = new TD;
if ($td->selectRecord("",$lvalue->getPropertyID(),"Land",$year)){
$tdRecords->setArrayList($td);
$tdIDArray[] = $td->getTdID();
}
unset($td);
}
}
if ($plantsTreesArray){
foreach($plantsTreesArray as $lkey => $lvalue){
//echo($lvalue->getPropertyID()."<br>");
$td = new TD;
if ($td->selectRecord("",$lvalue->getPropertyID(),"PlantsTrees",$year)){
$tdRecords->setArrayList($td);
$tdIDArray[] = $td->getTdID();
}
unset($td);
}
}
if ($improvementsBuildingsArray){
foreach($improvementsBuildingsArray as $lkey => $lvalue){
//echo($lvalue->getPropertyID()."<br>");
$td = new TD;
if ($td->selectRecord("",$lvalue->getPropertyID(),"ImprovementsBuildings",$year)){
$tdRecords->setArrayList($td);
$tdIDArray[] = $td->getTdID();
}
unset($td);
}
}
if ($machineriesArray){
foreach($machineriesArray as $lkey => $lvalue){
//echo($lvalue->getPropertyID()."<br>");
$td = new TD;
if ($td->selectRecord("",$lvalue->getPropertyID(),"Machineries",$year)){
$tdRecords->setArrayList($td);
$tdIDArray[] = $td->getTdID();
}
unset($td);
}
}*/
}
$ret = $tdIDArray;
//print_r($tdRecords->getArrayList());
/*if ($tdRecords->getArrayList()){
$tdRecords->setDomDocument();
if(!$domDoc = $tdRecords->getDomDocument()){
return $ret = false;
}
else {
$xmlStr = $domDoc->dump_mem(true);
return $ret = $xmlStr;
}
}
else $ret = false;*/
} else {
$ret = false;
//.........这里部分代码省略.........
示例11: getTDArrayFromCompany
function getTDArrayFromCompany($companyID)
{
$this->setDB();
$sql = sprintf("SELECT DISTINCT(Owner.odID) as odID" . " FROM Owner,OwnerCompany " . " WHERE " . " Owner.ownerID = OwnerCompany.ownerID AND " . " OwnerCompany.companyID = '%s' ", $companyID);
$this->db->query($sql);
while ($this->db->next_record()) {
$od = new OD();
if ($od->selectRecord($this->db->f("odID"))) {
$this->ODArray[] = $od;
$afs = new AFS();
if ($afs->selectRecord("", "", $od->getOdID(), "")) {
$td = new TD();
if ($td->selectRecord("", $afs->getAfsID(), "", "", "")) {
$tdArray[] = $td;
}
}
}
}
if (!is_array($tdArray)) {
$tdArray = false;
}
return $tdArray;
}
示例12: selectRecords
function selectRecords($rptopID = false, $condition = "")
{
$where = $rptopID ? "where rptopID = {$rptopID}" : $condition;
$sql = sprintf("select * from %s %s limit 0,10;", TD_TABLE, $where);
$this->setDB();
$this->db->query($sql);
//echo $sql;
while ($this->db->next_record()) {
//echo $this->db->f("tdID")."<br>";
$td = new TD();
$td->selectRecord($this->db->f("tdID"));
//print_r($td);
//echo "<br>";
$this->arrayList[] = $td;
unset($td);
}
unset($this->db);
if (count($this->arrayList) > 0) {
$this->setDomDocument();
return true;
} else {
return false;
}
}
示例13: Main
function Main()
{
$this->formArray['currentDate'] = date("F d, Y");
$MunicipalityCityDetails = new SoapObject(NCCBIZ . "MunicipalityCityDetails.php", "urn:Object");
#test values
//$this->formArray['municipalityCityID']=1;
if (!($xmlStr = $MunicipalityCityDetails->getMunicipalityCityDetails($this->formArray['municipalityCityID']))) {
#echo($xmlStr);
//exit("xml failed for municipality");
header("Location: " . $this->sess->url("ViewSOA.php") . "&status=2");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
echo "error xmlDoc";
} else {
$MunicipalityCity = new MunicipalityCity();
$MunicipalityCity->parseDomDocument($domDoc);
$this->formArray['municipality'] = $MunicipalityCity->getDescription();
}
}
#test values
//$this->formArray['ownerID']=5;
#echo("ownerID=".$this->formArray['ownerID']."<br>");
// $this->displayOwnerList($this->formArray['ownerID']);
#test values
//$this->formArray["rptopID"]=15;
if ($this->formArray['personID'] != "") {
$person = new Person();
$person->selectRecord($this->formArray['personID']);
$this->tpl->set_var(ownerName, $person->getFullName());
$this->tpl->set_var(ownerNo, $person->getTin());
$address = $person->addressArray[0];
$this->tpl->set_var(ownerAddress, $address->getNumber() . " " . $address->getStreet() . " " . $address->getBarangay() . " " . $address->getDistrict() . " " . $address->getMunicipalitycity() . " " . $address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=" . $this->formArray['personID'];
$db->query($sql);
} else {
$company = new Company();
$company->selectRecord($this->formArray['companyID']);
$this->tpl->set_var(ownerName, $company->getCompanyName());
$this->tpl->set_var(ownerNo, $company->getCompanyID());
$address = $company->addressArray[0];
$this->tpl->set_var(ownerAddress, $address->getNumber() . " " . $address->getStreet() . " " . $address->getBarangay() . " " . $address->getDistrict() . " " . $address->getMunicipalitycity() . " " . $address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=" . $this->formArray['companyID'];
$db->query($sql);
}
/*$person = new Person();
$person->selectRecord($this->formArray['personID']);
$this->tpl->set_var(ownerName,$person->getFullName());
$this->tpl->set_var(ownerNo,$person->getTin());
$address = $person->addressArray[0];
$this->tpl->set_var(ownerAddress,$address->getNumber() ." ".$address->getStreet()." ".$address->getBarangay()." ".$address->getDistrict()." ".$address->getMunicipalitycity()." ".$address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=".$this->formArray['personID'];
$db->query($sql);*/
$this->tpl->set_block("rptsTemplate", "ROW", "RowBlk");
for ($i = 0; $db->next_record(); $i++) {
$rptopID = $db->f("rptopID");
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($rptopID))) {
// exit("xml failed for RPTOP");
header("Location: " . $this->sess->url("ViewSOA.php") . "&status=1");
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$rptop = new RPTOP();
$td = new TD();
$rptop->parseDomDocument($domDoc);
foreach ($rptop as $key => $value) {
$this->formArray['payableYear'] = $rptop->getTaxableYear();
$rptopID = $rptop->getRptopID();
if ($key == "tdArray") {
$tdCtr = 0;
if (count($value)) {
foreach ($value as $tkey => $tvalue) {
$td->selectRecord($tvalue->getTdID());
$assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
$propertyType = $td->getPropertyType();
$TaxDeclarationNumber = $td->getTaxDeclarationNumber();
// $this->tpl->set_var(kind,$propertyType);
// $this->tpl->set_var(currentTDNo,$TaxDeclarationNumber);
/* $dues = new Dues();
$dues->create($td->getTdID(), "","","","2003");
$this->tpl->set_var(basic,$dues->getBasic());
$totBasic += $dues->getBasic();
$this->tpl->set_var(sef,$dues->getSEF());
$totSEF += $dues->getSEF();
$this->tpl->set_var(total,$dues->getSEF()+$dues->getBasic());
$totTaxDue += $dues->getSEF()+$dues->getBasic();*/
$afsID = $td->getAfsID();
$afs = new AFS();
$afs->selectRecord($afsID);
$od = new OD();
$od->selectRecord($afs->getOdID());
$addr = $od->getLocationAddress();
if (count($addr)) {
//.........这里部分代码省略.........
示例14: Main
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];
//.........这里部分代码省略.........
示例15: foreach
echo "{$key} = {$value}<br>\n";
}
}
}
$tdarray = $rptop->tdArray;
echo "RPTOP TD Array values<br>\n";
foreach ($tdarray as $td) {
echo "RPTOP TD Array values<br>\n";
foreach ($td as $key => $value) {
echo "{$key} = {$value}<br>\n";
}
}
$td1 = new TD();
$td1->selectRecord("601");
$td2 = new TD();
$td2->selectRecord("600");
echo "TD1 values<br>\n";
foreach ($td1 as $key => $value) {
echo "{$key} = {$value}<br>\n";
}
echo "TD2 values<br>\n";
foreach ($td2 as $key => $value) {
echo "{$key} = {$value}<br>\n";
}
$propertyType = $td1->propertyType;
$property1 = new Land();
$property1->selectRecord($td1->propertyID);
echo "property1 values<br>\n";
foreach ($property1 as $key => $value) {
echo "{$key} = {$value}<br>\n";
}