29 lines
869 B
PHP
Executable File
29 lines
869 B
PHP
Executable File
<?php
|
|
|
|
Class InterestInvoices{
|
|
public $document_list;
|
|
public $db;
|
|
public $ask;
|
|
public $res;
|
|
public $result;
|
|
public $reply;
|
|
|
|
public function searchInterestInvoices(){
|
|
$this->db=$GLOBALS['db'];
|
|
$this->ask="SELECT * FROM ecmtransactions
|
|
WHERE deleted='0' AND
|
|
record_type='EcmInvoiceOuts'
|
|
AND type='0'
|
|
AND register_date > '2011-12-31'
|
|
AND (settled='0' OR settled IS NULL) and payment_date < '".date("Y-m-d")."'
|
|
ORDER BY payment_date desc";
|
|
$this->reply=$this->db->query($this->ask);
|
|
while($this->result=$this->db->fetchByAssoc($this->reply)){
|
|
$this->document_list[]=$this->result;
|
|
}
|
|
var_dump($this->document_list);
|
|
}
|
|
}
|
|
|
|
$c=new InterestInvoices();
|
|
$c->searchInterestInvoices(); |