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;
 }
示例#2
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;
         }
     }
 }
 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 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;
         }
     }
 }