本文整理汇总了PHP中TD::checkAfsID方法的典型用法代码示例。如果您正苦于以下问题:PHP TD::checkAfsID方法的具体用法?PHP TD::checkAfsID怎么用?PHP TD::checkAfsID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TD
的用法示例。
在下文中一共展示了TD::checkAfsID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setOwnerRPTOP
function setOwnerRPTOP($formArray, $ownerName, $rptopNumber)
{
if (!is_array($formArray)) {
return false;
}
if (!is_array($ownerName)) {
return false;
}
if ($rptopNumber == "") {
return false;
}
// create new rptop record as $rptop (array)
$rptop["rptopNumber"] = $rptopNumber;
$rptop["taxableYear"] = $formArray["taxableYear"];
$rptop["cityTreasurer"] = $formArray["cityTreasurer"];
$rptop["cityAssessor"] = $formArray["cityAssessor"];
$rptop["createdBy"] = $formArray["userID"];
$rptop["modifiedBy"] = $formArray["userID"];
$rptop["landTotalMarketValue"] = 0;
$rptop["landTotalAssessedValue"] = 0;
$rptop["plantTotalMarketValue"] = 0;
$rptop["plantTotalAssessedValue"] = 0;
$rptop["bldgTotalMarketValue"] = 0;
$rptop["bldgTotalAssessedValue"] = 0;
$rptop["machTotalMarketValue"] = 0;
$rptop["machTotalAssessedValue"] = 0;
$rptop["totalMarketValue"] = 0;
$rptop["totalAssessedValue"] = 0;
// get TDIDArray
$ownerTDIDArray = $this->getTDListOf($ownerName["id"], $ownerName["type"], $formArray["taxableYear"]);
foreach ($ownerTDIDArray as $ownerTDID) {
$td = new TD();
$afsID = $td->checkAfsID($ownerTDID);
$afs = new AFS();
$afs->selectRecord($afsID);
$rptop["landTotalMarketValue"] += $afs->getLandTotalMarketValue();
$rptop["landTotalAssessedValue"] += $afs->getLandTotalAssessedValue();
$rptop["plantTotalMarketValue"] += $afs->getPlantTotalMarketValue();
$rptop["plantTotalAssessedValue"] += $afs->getPlantTotalAssessedValue();
$rptop["bldgTotalMarketValue"] += $afs->getBldgTotalMarketValue();
$rptop["bldgTotalAssessedValue"] += $afs->getBldgTotalAssessedValue();
$rptop["machTotalMarketValue"] += $afs->getMachTotalMarketValue();
$rptop["machTotalAssessedValue"] += $afs->getMachTotalAssessedValue();
}
$rptop["totalMarketValue"] = $rptop["landTotalMarketValue"] + $rptop["plantTotalMarketValue"] + $rptop["bldgTotalMarketValue"] + $rptop["machTotalMarketValue"];
$rptop["totalAssessedValue"] = $rptop["landTotalAssessedValue"] + $rptop["plantTotalAssessedValue"] + $rptop["bldgTotalAssessedValue"] + $rptop["machTotalAssessedValue"];
// insert into RPTOP TABLE
if ($rptop["rptopID"] = $this->insertRPTOPRecord($rptop)) {
// insert into RPTOPTD TABLE
foreach ($ownerTDIDArray as $ownerTDID) {
if (!($rptoptdID = $this->insertRPTOPTDRecord($rptop["rptopID"], $ownerTDID))) {
// error inserting to RPTOPTD (shouldnt reach here)
}
}
// insert into OWNER TABLE
if ($ownerID = $this->insertOwnerRecord($rptop["rptopID"])) {
// insert either into OWNER_PERSON or OWNER_COMPANY TABLE
switch ($ownerName["type"]) {
case "Person":
if (!($ownerPersonID = $this->insertOwnerPerson($ownerID, $ownerName["id"]))) {
// error inserting to OwnerPerson table (shouldnt reach here)
}
break;
case "Company":
if (!($ownerCompanyID = $this->insertOwnerCompany($ownerID, $ownerName["id"]))) {
// error inserting to OwnerCompany table (shouldnt reach here)
}
break;
}
}
return $rptop["rptopID"];
} else {
return false;
}
return true;
}