Public Attributes |
const | PAYMENT_BY_CREDIT = 0 |
| Constant of credit payment for column payment_type.
|
const | PAYMENT_BY_CASH = 1 |
| Constant of cash payment for column payment_type.
|
Protected Attributes |
| $belongs_to |
| $has_many = array('jobs') |
Static Protected Attributes |
static | $PAYMENT_TYPES |
Member Function Documentation
Job_report_Model::count_all_work_reports |
( |
|
$filter_sql = '' | ) |
|
Counts all work reports with given state.
- Parameters
-
integer | $state | |
boolean | $lower | Should be operant to state < (= otherwise) |
string | $filter_sql | |
- Returns
- integer
Job_report_Model::delete_works |
( |
|
$preserved_keys = array() , |
|
|
|
$work_report_id = NULL |
|
) |
| |
Delete works of report.
- Parameters
-
array | $preserved_keys | Array of preserved works (ID of work as value) |
integer | $work_report_id | ID of report |
Job_report_Model::get_all_work_reports |
( |
|
$limit_from = 0 , |
|
|
|
$limit_results = 50 , |
|
|
|
$order_by = 'id' , |
|
|
|
$order_by_direction = 'ASC' , |
|
|
|
$filter_sql = '' , |
|
|
|
$user_id = NULL |
|
) |
| |
Gets all work reports with given state.
- Parameters
-
integer | $state | |
integer | $limit_from | |
integer | $limit_results | |
string | $order_by | |
string | $order_by_direction | |
string | $filter_sql | |
boolean | $lower | Should be operant to state < (= otherwise) |
integer | $user_id | |
- Returns
- Mysql_Result
Job_report_Model::get_approved_work_reports_of_user |
( |
|
$user_id | ) |
|
Gets all approved work reports of user.
- Parameters
-
- Returns
- Mysql_Result
Job_report_Model::get_concepts_work_reports_of_user |
( |
|
$user_id | ) |
|
Gets all concepted work reports of user.
- Parameters
-
- Returns
- Mysql_Result
static Job_report_Model::get_name_of_payment_type |
( |
|
$type | ) |
|
|
static |
Gets name of payment type.
- Parameters
-
- Returns
- string
static Job_report_Model::get_payment_types |
( |
| ) |
|
|
static |
Gets translated payments types.
- Returns
- array
Job_report_Model::get_pending_work_reports_of_user |
( |
|
$user_id | ) |
|
Gets all pending work reports of user.
- Parameters
-
- Returns
- Mysql_Result
Job_report_Model::get_rating |
( |
| ) |
|
Gets rating of work report from it's works.
- Author
- Ondřej Fibich array $cache Cache for amounts
- Returns
- double
Job_report_Model::get_rejected_work_reports_of_user |
( |
|
$user_id | ) |
|
Gets all rejected work reports of user.
- Parameters
-
- Returns
- Mysql_Result
Job_report_Model::get_state |
( |
| ) |
|
Gets state of work reports from it's works.
- Author
- Ondřej Fibich array $cache Cache for states
- Returns
- integer
Job_report_Model::get_suggest_amount |
( |
| ) |
|
Gets suggest amount of work report from it's works.
- Author
- Ondřej Fibich array $cache Cache for amounts
- Returns
- double
Job_report_Model::get_votes_of_voter_on_work_report |
( |
|
$work_report_id, |
|
|
|
$user_id |
|
) |
| |
Gets votes of a voter on a work report.
- Parameters
-
integer | $work_report_id | ID of report |
integer | $user_id | ID of voter |
- Returns
- Mysql_Result
Job_report_Model::get_work_report |
( |
|
$work_report_id = NULL | ) |
|
Job_report_Model::get_works_of_monthly_workreport |
( |
| ) |
|
Member Data Documentation
Job_report_Model::$belongs_to |
|
protected |
Initial value: array
(
'user', 'approval_template', 'transfer',
'added_by' => 'user'
)
Job_report_Model::$PAYMENT_TYPES |
|
staticprotected |
Initial value: array
(
self::PAYMENT_BY_CREDIT => 'Payment by FreenetIS credit',
self::PAYMENT_BY_CASH => 'Payment by cash'
)
The documentation for this class was generated from the following file: