Report generation and formatting helper for sales and inventory reports.
// Source: https://github.com/Pmbamungu/ospos-mpesa | License: MIT | Copyright 2012-2014 pappastech
// Provided via justclaw.it.com; keep this notice with the code.
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Report helper
*/
function show_report_if_allowed($report_prefix, $report_name, $person_id, $permission_id = '')
{
$CI =& get_instance();
$permission_id = empty($permission_id) ? 'reports_' . $report_name : $permission_id;
if($CI->Employee->has_grant($permission_id, $person_id))
{
show_report($report_prefix, $report_name, $permission_id);
}
}
function show_report($report_prefix, $report_name, $lang_key='')
{
$CI =& get_instance();
$lang_key = empty($lang_key) ? $report_name : $lang_key;
$report_label = $CI->lang->line($lang_key);
$re
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key