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;
         }
     }
 }
コード例 #2
0
ファイル: RptCollectionByOwner.php プロジェクト: armic/erpts
 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;
     }
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
         }
     }
 }
コード例 #5
0
 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;
     }
 }
コード例 #6
0
ファイル: updatePayment.php プロジェクト: armic/erpts
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;
		}
コード例 #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;
         }
     }
 }
コード例 #8
0
ファイル: PaymentList.php プロジェクト: armic/erpts
 function getPaymentCount($condition = "")
 {
     $paymentRecords = new PaymentRecords();
     return $paymentRecords->countRecords($condition);
 }
コード例 #9
0
 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;
     }
 }