Files
opensourcepos/application/views/reports/date_input.php
jekkos 1c6e44af0f Add multi-stock feature
Finished task
1. User can add stock location in config page. Adding format is StockA,StockB,StockC for example
2. Item page, there is no more quantity column show in cert table. The quantity tracking is integrated in inventory detail
3. Receiving page, There is a stock location for user to select before receiving or returning stuff
4. Sale page, There is a stock location which is for user to select a stock location they sell from

Remain task
1. Requisition work flow
2. Language editing
3. Remove unuse code

PS

git-svn-id: svn+ssh://svn.code.sf.net/p/opensourcepos/code/@115 c3eb156b-1dc0-44e1-88ae-e38439141b53
2014-08-19 19:55:24 +00:00

119 lines
3.9 KiB
PHP

<?php $this->load->view("partial/header"); ?>
<div id="page_title" style="margin-bottom:8px;"><?php echo $this->lang->line('reports_report_input'); ?></div>
<?php
if(isset($error))
{
echo "<div class='error_message'>".$error."</div>";
}
?>
<?php echo form_label($this->lang->line('reports_date_range'), 'report_date_range_label', array('class'=>'required')); ?>
<div id='report_date_range_simple'>
<input type="radio" name="report_type" id="simple_radio" value='simple' checked='checked'/>
<?php echo form_dropdown('report_date_range_simple',$report_date_range_simple, '', 'id="report_date_range_simple"'); ?>
</div>
<div id='report_date_range_complex'>
<input type="radio" name="report_type" id="complex_radio" value='complex' />
<span>
<?php echo form_dropdown('start_month',$months, $selected_month, 'id="start_month"'); ?>
<?php echo form_dropdown('start_day',$days, $selected_day, 'id="start_day"'); ?>
<?php echo form_dropdown('start_year',$years, $selected_year, 'id="start_year"'); ?>
-
<?php echo form_dropdown('end_month',$months, $selected_month, 'id="end_month"'); ?>
<?php echo form_dropdown('end_day',$days, $selected_day, 'id="end_day"'); ?>
<?php echo form_dropdown('end_year',$years, $selected_year, 'id="end_year"'); ?>
</span>
<?php
if (isset($discount_input)) {
?>
<div>
<span>
<?php echo $this->lang->line('reports_discount_prefix') .'&nbsp;' .form_input(array(
'name'=>'selected_discount',
'id'=>'selected_discount',
'value'=>'0')). '&nbsp;'. $this->lang->line('reports_discount_suffix')
?>
</span>
</div>
<?php
}
?>
</div>
<?php
if($mode == 'sale')
{
?>
<?php echo form_label($this->lang->line('reports_sale_type'), 'reports_sale_type_label', array('class'=>'required')); ?>
<div id='report_sale_type'>
<?php echo form_dropdown('sale_type',array('all' => $this->lang->line('reports_all'),
'sales' => $this->lang->line('reports_sales'),
'returns' => $this->lang->line('reports_returns')), 'all', 'id="input_type"'); ?>
</div>
<?php
}
elseif($mode == 'receiving')
{
?>
<?php echo form_label($this->lang->line('reports_receiving_type'), 'reports_receiving_type_label', array('class'=>'required')); ?>
<div id='report_receiving_type'>
<?php echo form_dropdown('receiving_type',array('all' => $this->lang->line('reports_all'),
'receiving' => $this->lang->line('reports_receivings'),
'returns' => $this->lang->line('reports_returns')), 'all', 'id="input_type"'); ?>
</div>
<?php
}
elseif($mode == 'requisition')
{
//Do nothing
}
?>
<?php
echo form_button(array(
'name'=>'generate_report',
'id'=>'generate_report',
'content'=>$this->lang->line('common_submit'),
'class'=>'submit_button')
);
?>
<?php $this->load->view("partial/footer"); ?>
<script type="text/javascript" language="javascript">
$(document).ready(function()
{
$("#generate_report").click(function()
{
var input_type = $("#input_type").val();
if ($("#simple_radio").attr('checked'))
{
window.location = window.location+'/'+$("#report_date_range_simple option:selected").val() + '/' + input_type;
}
else
{
var start_date = $("#start_year").val()+'-'+$("#start_month").val()+'-'+$('#start_day').val();
var end_date = $("#end_year").val()+'-'+$("#end_month").val()+'-'+$('#end_day').val();
if(input_type == null)
{
window.location = window.location+'/'+start_date + '/'+ end_date;
}
else
{
window.location = window.location+'/'+start_date + '/'+ end_date+ '/' + input_type;
}
}
});
$("#start_month, #start_day, #start_year, #end_month, #end_day, #end_year").click(function()
{
$("#complex_radio").attr('checked', 'checked');
});
$("#report_date_range_simple").click(function()
{
$("#simple_radio").attr('checked', 'checked');
});
});
</script>