function filterPaymentsByCurrentQuarter($year)
 {
     $paymentEndingDate = date("Y-m-d", strtotime($this->formArray["quarterEndingDate"] . " " . $year));
     $paymentBeginningDate = date("Y-m-d", strtotime($this->formArray["quarterBeginningDate"] . " " . $year));
     $PaymentList = new SoapObject(NCCBIZ . "PaymentList.php", "urn:Object");
     $condition = "WHERE " . PAYMENT_TABLE . ".status!='cancelled' AND (" . PAYMENT_TABLE . ".paymentDate >= '" . $paymentBeginningDate . "' AND " . PAYMENT_TABLE . ".paymentDate <= '" . $paymentEndingDate . "')";
     if (!($xmlStr = $PaymentList->getPaymentList($condition))) {
         return false;
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             return false;
         } else {
             $paymentRecords = new PaymentRecords();
             $paymentRecords->parseDomDocument($domDoc);
             return $paymentRecords;
         }
     }
 }
Example #2
0
 function getSortedOwnerArrayListFromPayment()
 {
     $paymentRecords = new PaymentRecords();
     $condition = " WHERE status!='cancelled' ";
     $paymentRecords->selectRecords($condition);
     if (is_array($paymentRecords->arrayList)) {
         foreach ($paymentRecords->arrayList as $payment) {
             $ownerIDArray[] = $payment->getOwnerID();
         }
         $ownerIDArrayUnique = array_unique($ownerIDArray);
         $sortedOwnerIDArray = $this->getSortedOwnerIDArray($ownerIDArrayUnique);
         return $sortedOwnerIDArray;
     } else {
         return false;
     }
 }
 function getLatestPaymentDueType($dueArrayList)
 {
     $condition = " WHERE status = '' AND (";
     $dueCount = 0;
     foreach ($dueArrayList as $due) {
         if ($dueCount > 0) {
             $condition .= " OR";
         }
         $condition .= " dueID='" . $due->getDueID() . "'";
         $dueCount++;
     }
     $condition .= ")";
     $condition .= " ORDER BY paymentDate DESC, paymentID DESC";
     $PaymentList = new SoapObject(NCCBIZ . "PaymentList.php", "urn:Object");
     $amountPaidForDue = 0;
     if (!($xmlStr = $PaymentList->getPaymentList($condition))) {
         return 0;
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             return 0;
         } else {
             $paymentRecords = new PaymentRecords();
             $paymentRecords->parseDomDocument($domDoc);
             $paymentArrayList = $paymentRecords->getArrayList();
             $paymentCtr = 0;
             foreach ($paymentArrayList as $payment) {
                 return $payment->getDueType();
             }
         }
     }
     return false;
 }
 function getFilteredPaymentRecords()
 {
     $paymentEndingDate = date("Y-m-d", strtotime($this->formArray["quarterEndingDate"] . " " . $this->formArray["year"]));
     $paymentBeginningDate = date("Y-m-d", strtotime($this->formArray["quarterBeginningDate"] . " " . $this->formArray["year"]));
     $condition = "WHERE " . PAYMENT_TABLE . ".status!='cancelled' AND (" . PAYMENT_TABLE . ".paymentDate >= '" . $paymentBeginningDate . "' AND " . PAYMENT_TABLE . ".paymentDate <= '" . $paymentEndingDate . "')";
     $condition .= " AND (" . PAYMENT_TABLE . ".municipalityCity LIKE '" . $this->formArray["municipalityCity"] . "' OR " . PAYMENT_TABLE . ".municipalityCity LIKE '" . $this->formArray["municipalityCityID"] . "') ";
     $condition .= " AND " . PAYMENT_TABLE . ".propertyType IS NOT NULL";
     $PaymentList = new SoapObject(NCCBIZ . "PaymentList.php", "urn:Object");
     if (!($xmlStr = $PaymentList->getPaymentList($condition))) {
         return false;
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             return false;
         } else {
             $paymentRecords = new PaymentRecords();
             $paymentRecords->parseDomDocument($domDoc);
             return $paymentRecords;
         }
     }
 }
 function getPaymentRecordsOwnerID($ownerID)
 {
     $condition = " WHERE ownerID=" . $ownerID . " AND status!='cancelled' ORDER BY paymentDate ASC";
     $paymentRecords = new PaymentRecords();
     $paymentRecords->selectRecords($condition);
     if (is_array($paymentRecords->arrayList)) {
         return $paymentRecords;
     } else {
         return false;
     }
 }
Example #6
0
Batch Limit: <input type="text" name="limit" value="<? echo $_GET["limit"]; ?>" size=3>
<input type="hidden" name="formAction" value="go">
<input type="submit" name="goBtn" value="Process Next Batch">
</form>
<?

if($_GET["formAction"]!="go") exit;

ini_set("max_execution_time",300);

include_once("collection/Payment.php");
include_once("collection/PaymentRecords.php");

//$condition = "WHERE Payment.propertyType IS NULL ";

$paymentRecords = new PaymentRecords;
$paymentRecords->selectRecords($condition);

echo "<hr>";

echo "count:";
echo count($paymentRecords->arrayList);
echo "<hr>";

$count = 0;

foreach($paymentRecords->arrayList as $payment){
	if(is_numeric($_GET["limit"])){
		if($count==$_GET["limit"]){
			exit;
		}
Example #7
0
 function filterPaymentsByDate($year, $month, $day)
 {
     $PaymentList = new SoapObject(NCCBIZ . "PaymentList.php", "urn:Object");
     $condition = "WHERE " . PAYMENT_TABLE . ".status!='cancelled' ";
     $condition .= "AND (" . PAYMENT_TABLE . ".paymentDate LIKE '" . $year . "-" . $month . "-" . $day . "') ";
     $condition .= "ORDER BY " . PAYMENT_TABLE . ".paymentDate";
     if (!($xmlStr = $PaymentList->getPaymentList($condition))) {
         return false;
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             return false;
         } else {
             $paymentRecords = new PaymentRecords();
             $paymentRecords->parseDomDocument($domDoc);
             return $paymentRecords;
         }
     }
 }
Example #8
0
 function getPaymentCount($condition = "")
 {
     $paymentRecords = new PaymentRecords();
     return $paymentRecords->countRecords($condition);
 }
 function getFilteredPaymentRecords()
 {
     $paymentEndingDate = date("Y-m-d", strtotime($this->formArray["quarterEndingDate"] . " " . $this->formArray["year"]));
     $paymentBeginningDate = date("Y-m-d", strtotime($this->formArray["quarterBeginningDate"] . " " . $this->formArray["year"]));
     $condition = "WHERE " . PAYMENT_TABLE . ".status!='cancelled' AND (" . PAYMENT_TABLE . ".paymentDate >= '" . $paymentBeginningDate . "' AND " . PAYMENT_TABLE . ".paymentDate <= '" . $paymentEndingDate . "')";
     $condition .= " AND " . PAYMENT_TABLE . ".propertyType IS NOT NULL";
     $paymentRecords = new PaymentRecords($this->dbName);
     if ($paymentRecords->selectRecords($condition)) {
         return $paymentRecords;
     } else {
         return false;
     }
 }