Add php files
This commit is contained in:
29
modules/EcmPaymentStates/interestInvoices.php
Executable file
29
modules/EcmPaymentStates/interestInvoices.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?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();
|
||||
Reference in New Issue
Block a user