Example #1
0
 function Main()
 {
     //$tdID = $_GET['tdID'];
     $tdID = 66;
     $TDDetails = new TDDetails();
     $tdHistoryArray = $TDDetails->getTDHistory($tdID);
     if (is_array($tdHistoryArray)) {
         foreach ($tdHistoryArray as $item) {
             $tdID = $item->tdID;
             $yearDue = $item->ceasesWithTheYear ? $item->ceasesWithTheYear : date("Y");
             $dues = new Dues($tdID, $yearDue);
             $paymentPeriod = $dues->getPaymentMode();
             $totalDue = $dues->getTotalDue($paymentPeriod);
             $basic = $dues->getBasic($paymentPeriod);
             print_r($dues);
             echo "<br>";
         }
     }
     //$this->getDues();
 }
Example #2
0
                $this->displayAssessedValues($landList, $plantsTreesList, $improvementsBuildingsList, $machineriesList);
                $this->displayLGUInfo();
            }
        }
        $this->setForm();
        $this->tpl->parse("templatePage", "rptsTemplate");
        $this->tpl->finish("templatePage");
        $testpdf = new PDFWriter();
        $testpdf->setOutputXML($this->tpl->get("templatePage"), "test");
        if (isset($this->formArray["print"])) {
            $testpdf->writePDF("TDSummary.pdf");
            //,$this->formArray["print"]);
        } else {
            $testpdf->writePDF("TDSummary.pdf");
        }
        //		header("location: ".$testpdf->pdfPath);
        exit;
    }
}
#####################################
# Define Procedures and Functions
#####################################
##########################################################
# Begin Program Script
##########################################################
//*
page_open(array("sess" => "rpts_Session", "auth" => "rpts_Challenge_Auth"));
//*/
$tdDetails = new TDDetails($http_post_vars, $sess, $odID, $ownerID, $afsID, $print);
$tdDetails->Main();
page_close();
Example #3
0
                $previousTDID = $previousTD->getTdID();
                $this->tdHistory[] = $previousTD;
                $this->generateTDHistory($previousTDID);
            }
        } else {
            //echo("count==0<br>");
            return false;
        }
    }
    function getTDHistory($tdID)
    {
        $this->generateTDHistory($tdID);
        return $this->tdHistory;
    }
}
$TDDetails = new TDDetails();
#$TDDetails = new SoapObject(NCCBIZ."TDDetails.php", "urn:Object"); #Does not work
$tdHistoryArray = $TDDetails->getTDHistory($tdID);
#Skultz, Samantha M #has 2 preceeding TDs
#$tdHistoryArray = $TDDetails->getTDHistory(36);#Skultz, Samantha M #has no precedign TDs
//echo("tdHistoryArray=$tdHistoryArray<br>");
if (is_array($tdHistoryArray)) {
    foreach ($tdHistoryArray as $item) {
        foreach ($item as $k => $v) {
            echo "{$k}=>{$v}<br>";
        }
        //	echo("====<br>");
    }
} else {
    //	echo("Not an array");
}
Example #4
0
<?
include_once("tdHistory.php");

$td = new TDDetails;
$td->getTDHistory(54);

?>
Example #5
0
 function displayPriorTDs($tdID)
 {
     if (is_array($this->unpaidTDArray)) {
         $disabledStr = "";
         foreach ($this->unpaidTDArray as $key => $tvalue) {
             $propertyType = $tvalue->getPropertyType();
             $propertyID = $tvalue->getPropertyID();
             $afsID = $tvalue->getAfsID();
             $afs = new AFS();
             $afs->selectRecord($afsID);
             $listValues['propertyIndexNumber'] = $afs->getPropertyIndexNumber();
             $assessedValue = $tvalue->getAssessedValue();
             $listValues['taxBeginsWithTheYear'] = $tvalue->getTaxBeginsWithTheYear();
             $listValues['tdNum'] = $tvalue->getTaxDeclarationNumber();
             $tdID = $tvalue->getTdID();
             $listValues['tdID'] = $tdID;
             // get Direct->Succeeding TD;
             $TDDetails = new TDDetails();
             $succeedingTDArray = $TDDetails->getSucceedingTD($tdID);
             $parentTdID = $succeedingTDArray[0]->getTdID();
             if ($this->unpaidTDCount == count($this->unpaidTDArray) - 2) {
                 $disabledStr = "disabled";
             } else {
                 if ($this->backtaxTDExists) {
                     $disabledStr = "disabled";
                 } else {
                     $disabledStr = "";
                 }
             }
             $dueDate = $listValues['taxBeginsWithTheYear'];
             $dues = new Dues($tdID, $dueDate);
             if (!$dues->create($tdID, $dueDate, $assessedValue)) {
                 $dues->setBasic($assessedValue);
                 $dues->setSEF($assessedValue);
                 # check if land is idle, if yes, set assessed value
                 # getIdleStatus -- temporary function
                 if ($dues->getIdleStatus() == 1) {
                     #echo("idle<br>");
                     $dues->setIdle($assessedValue);
                 }
             }
             // Refresh for amnesty and paymentPeriod
             if ($this->formArray["formAction"] == "refresh") {
                 $amnesty = $this->formArray[amnesty];
                 $dues->setAmnesty($amnesty);
                 $paymentPeriod = $this->formArray[paymentPeriod];
                 $dues->setPaymentMode($paymentPeriod);
             }
             if ($dues->getAmnesty() == "Yes") {
                 $dues->resetPenalty();
                 $dues->computePenalty($paymentPeriod, "now");
             }
             $paymentPeriod = $dues->getPaymentMode();
             $amnesty = $dues->getAmnesty();
             $dues->store();
             switch ($paymentPeriod) {
                 case 'Quarter':
                     $this->tpl->set_var("selectedQuarter", "selected");
                     $this->tpl->set_var("paymentPeriod", $paymentPeriod);
                     break;
                 default:
                     #Annual
                     $this->tpl->set_var("selectedAnnual", "selected");
                     $this->tpl->set_var("paymentPeriod", $paymentPeriod);
                     break;
             }
             $totalDue = $dues->getTotalDue($paymentPeriod);
             $basic = $dues->getBasic($paymentPeriod);
             $sef = $dues->getSEF($paymentPeriod);
             $penalty = $dues->getPenalty($paymentPeriod);
             $discount = $dues->getDiscount();
             $totalPaid = $dues->getPaidBasic($paymentPeriod) + $dues->getPaidPenalty($paymentPeriod) + $dues->getPaidSEF($paymentPeriod);
             $listValues['taxDue'] = $totalDue;
             $listValues['basic'] = number_format($basic, 2);
             $listValues['sef'] = number_format($sef, 2);
             $listValues['penalty'] = number_format($penalty, 2);
             $listValues['discount'] = number_format($discount, 2);
             $listValues['totalPaid'] = number_format($totalPaid, 2);
             $listValues['strTaxDue'] = number_format($totalDue, 2);
             $sef = $dues->getSEF($paymentPeriod);
             $paidStatus = $totalDue <= 0 ? $basic <= 0 ? "N.A." : "PAID" : "<input type=\"checkbox\" name=\"tdID[{$tdID}]\" value=\"" . $tdID . "\" onclick=\"javascript: toggle(this, '" . $parentTdID . "'); updateTotalTaxDue(this," . $tdID . ");\" " . $disabledStr . ">";
             $listValues['paidStatus'] = $paidStatus;
             $listValues['tdBgcolor'] = '#efefea';
             $this->tpl->set_var($listValues);
             $this->tpl->parse("TDListBlock", "TDList", true);
             $this->tpl->set_var("i", $this->unpaidTDCount);
             $this->tpl->set_var("parentTDID", $parentTdID);
             $this->tpl->parse("JSTDListBlock", "JSTDList", true);
             $this->unpaidTDCount++;
         }
     }
 }