mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-03-09 10:38:56 -04:00
- Convert indents to tabs - Remove unnecessary else statement - Correct PHPDoc formatting
103 lines
2.8 KiB
PHP
103 lines
2.8 KiB
PHP
<?php
|
|
/**
|
|
* @var array $grants
|
|
*/
|
|
|
|
use App\Models\Employee;
|
|
|
|
?>
|
|
<?php echo view('partial/header') ?>
|
|
|
|
<script type="text/javascript">
|
|
dialog_support.init("a.modal-dlg");
|
|
</script>
|
|
|
|
<?php
|
|
if(isset($error))
|
|
{
|
|
echo '<div class=\'alert alert-dismissible alert-danger\'>' . esc($error) . '</div>';
|
|
}
|
|
?>
|
|
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<div class="panel panel-primary">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title"><span class="glyphicon glyphicon-stats"> </span><?php echo lang('Reports.graphical_reports') ?></h3>
|
|
</div>
|
|
<div class="list-group">
|
|
<?php
|
|
foreach($grants as $grant)
|
|
{
|
|
if (preg_match('/reports_/', $grant['permission_id']) && !preg_match('/(inventory|receivings)/', $grant['permission_id']))
|
|
{
|
|
show_report('graphical_summary', $grant['permission_id']);
|
|
}
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<div class="panel panel-primary">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title"><span class="glyphicon glyphicon-list"> </span><?php echo lang('Reports.summary_reports') ?></h3>
|
|
</div>
|
|
<div class="list-group">
|
|
<?php
|
|
foreach($grants as $grant)
|
|
{
|
|
if (preg_match('/reports_/', $grant['permission_id']) && !preg_match('/(inventory|receivings)/', $grant['permission_id']))
|
|
{
|
|
show_report('summary', $grant['permission_id']);
|
|
}
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<div class="panel panel-primary">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title"><span class="glyphicon glyphicon-list-alt"> </span><?php echo lang('Reports.detailed_reports') ?></h3>
|
|
</div>
|
|
<div class="list-group">
|
|
<?php
|
|
$person_id = session('person_id');
|
|
|
|
show_report_if_allowed('detailed', 'sales', $person_id);
|
|
show_report_if_allowed('detailed', 'receivings', $person_id);
|
|
show_report_if_allowed('specific', 'customer', $person_id, 'Reports.customers');
|
|
show_report_if_allowed('specific', 'discount', $person_id, 'Reports.discounts');
|
|
show_report_if_allowed('specific', 'employee', $person_id, 'Reports.employees');
|
|
show_report_if_allowed('specific', 'supplier', $person_id, 'Reports.suppliers');
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
$employee = model(Employee::class);
|
|
if ($employee->has_grant('Reports.inventory', session('person_id')))
|
|
{
|
|
?>
|
|
<div class="panel panel-primary">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title"><span class="glyphicon glyphicon-book"> </span><?php echo lang('Reports.inventory_reports') ?></h3>
|
|
</div>
|
|
<div class="list-group">
|
|
<?php
|
|
show_report('', 'reports_inventory_low', 'Reports.inventory_low');
|
|
show_report('', 'reports_inventory_summary', 'Reports.inventory_summary');
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php echo view('partial/footer') ?>
|