function isPriorTDPaid($tdID = "") { if ($tdID == "") { $tdID = 41; } //Test tdID value $TDDetails = new TDDetails(); $tdHistoryArray = $TDDetails->getTDHistory($tdID); #Skultz, Samantha M $ret = true; if (is_array($tdHistoryArray)) { foreach ($tdHistoryArray as $item) { $tdID = $item->tdID; #echo("tdID=$tdID<br>"); $yearDue = $item->taxBeginsWithTheYear; $dues = new Dues($tdID, $yearDue); $paymentPeriod = $dues->getPaymentMode(); $totalDue = $dues->getTotalDue($paymentPeriod); $basic = $dues->getBasic($paymentPeriod); if (!($totalDue <= 0 && $basic > 0)) { $this->unpaidTDArray[] = $item; $ret = false; } } } return $ret; }
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(); }
$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"); }
<? include_once("tdHistory.php"); $td = new TDDetails; $td->getTDHistory(54); ?>