function getCollectionTargetsForCurrentQuarter($year) { $conditionQuarterEndingDate = date("Y-m-d", strtotime($this->formArray["quarterEndingDate"] . " " . $year)); $conditionQuarterBeginningDate = date("Y-m-d", strtotime($this->formArray["quarterBeginningDate"] . " " . $year)); $sql = "SELECT * FROM " . DUE_TABLE . " WHERE dueDate >= '" . $conditionQuarterBeginningDate . "' AND dueDate <= '" . $conditionQuarterEndingDate . "';"; $db = new DB_RPTS(); $db->query($sql); $dueRecords = new DueRecords(); $dueRecords = new DueRecords(); while ($db->next_record()) { $due = new Due(); $due->selectRecord($db->f("dueID")); $dueRecords->arrayList[] = $due; } if (is_array($dueRecords->arrayList)) { foreach ($dueRecords->arrayList as $due) { if ($due->getDueType() != "Q1") { $this->formArray["basic"] += $due->getBasicTax(); $this->formArray["sef"] += $due->getSefTax(); $this->formArray["idle"] += $due->getIdleTax(); } } } }