From fdb8cf8bdac82e094de460b94e3b84b721eb4b86 Mon Sep 17 00:00:00 2001 From: Jeroen Peelaerts Date: Wed, 28 Oct 2020 21:00:16 +0100 Subject: [PATCH] Do not show takings if no grant for sales_reports (#2981) --- application/views/sales/receipt.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/views/sales/receipt.php b/application/views/sales/receipt.php index 870f735f8..961441f3c 100644 --- a/application/views/sales/receipt.php +++ b/application/views/sales/receipt.php @@ -39,7 +39,9 @@ if (isset($error_message))
 ' . $this->lang->line('sales_send_receipt'); ?>
 ' . $this->lang->line('sales_register'), array('class'=>'btn btn-info btn-sm', 'id'=>'show_sales_button')); ?> -  ' . $this->lang->line('sales_takings'), array('class'=>'btn btn-info btn-sm', 'id'=>'show_takings_button')); ?> + Employee->has_grant('reports_sales', $this->session->userdata('person_id'))): ?> +  ' . $this->lang->line('sales_takings'), array('class'=>'btn btn-info btn-sm', 'id'=>'show_takings_button')); ?> + load->view("sales/" . $this->config->item('receipt_template')); ?>