39 lines
1.1 KiB
PHP
Executable File
39 lines
1.1 KiB
PHP
Executable File
<?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 );
|
||
}
|
||
|
||
|
||
}
|
||
|
||
?>
|