Add php files
This commit is contained in:
39
modules/EcmReportsBackUp20151106/class/class.InvoicesHelper.php
Executable file
39
modules/EcmReportsBackUp20151106/class/class.InvoicesHelper.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
include("class.Invoice.php");
|
||||
include("class.Receipt.php");
|
||||
include ("class.Account.php");
|
||||
/**
|
||||
* Klasa statyczna odpowiedzialna za wyciąganie z bazy
|
||||
* informacji związanych z fakturami
|
||||
* @author Krzysztof Raciniewski
|
||||
*
|
||||
*/
|
||||
class InvoicesHelper {
|
||||
|
||||
/**
|
||||
* Metoda pobiera fakturę o odpowiednim ID w formie tabeli
|
||||
* zwraca wszystkie możliwe pola z bazy danych
|
||||
* @param $id - Identyfikator faktury
|
||||
*/
|
||||
public static function getInvoiceById( $id ) {
|
||||
return Invoice::getById( $id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Zwraca list<73> faktur, które były dodane w podanym zakresie dat
|
||||
* @param $date_from - data startowa
|
||||
* @param $date_to - data końcowa
|
||||
* @param $type - typ faktury(normal/correct)
|
||||
*/
|
||||
public static function getInvoicesBetweenDates( $date_from, $date_to, $pdf_type, $category, $type = "%", $contractorId ) {
|
||||
return Invoice::getBetweenDate( $date_from, $date_to, $pdf_type, $category, $type, $contractorId );
|
||||
}
|
||||
|
||||
public static function getReceiptsBetweenDates( $date_from, $date_to, $type = "%", $contractorId ) {
|
||||
return Receipt::getBetweenDate( $date_from, $date_to, $type, $contractorId );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user