mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-26 03:47:28 -05:00
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
174 lines
3.7 KiB
PHP
174 lines
3.7 KiB
PHP
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
|
|
<ul id="error_message_box"></ul>
|
|
<?php
|
|
echo form_close();
|
|
echo form_open('items/save_inventory/'.$item_info->item_id,array('id'=>'item_form'));
|
|
?>
|
|
<fieldset id="item_basic_info">
|
|
<legend><?php echo $this->lang->line("items_basic_information"); ?></legend>
|
|
|
|
<table align="center" border="0" bgcolor="#CCCCCC">
|
|
<div class="field_row clearfix">
|
|
<tr>
|
|
<td>
|
|
<?php echo form_label($this->lang->line('items_item_number').':', 'name',array('class'=>'wide')); ?>
|
|
</td>
|
|
<td>
|
|
<?php $inumber = array (
|
|
'name'=>'item_number',
|
|
'id'=>'item_number',
|
|
'value'=>$item_info->item_number,
|
|
'style' => 'border:none',
|
|
'readonly' => 'readonly'
|
|
);
|
|
|
|
echo form_input($inumber)
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<?php echo form_label($this->lang->line('items_name').':', 'name',array('class'=>'wide')); ?>
|
|
</td>
|
|
<td>
|
|
<?php $iname = array (
|
|
'name'=>'name',
|
|
'id'=>'name',
|
|
'value'=>$item_info->name,
|
|
'style' => 'border:none',
|
|
'readonly' => 'readonly'
|
|
);
|
|
echo form_input($iname);
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<?php echo form_label($this->lang->line('items_category').':', 'category',array('class'=>'wide')); ?>
|
|
</td>
|
|
<td>
|
|
<?php $cat = array (
|
|
|
|
'name'=>'category',
|
|
'id'=>'category',
|
|
'value'=>$item_info->category,
|
|
'style' => 'border:none',
|
|
'readonly' => 'readonly'
|
|
);
|
|
|
|
echo form_input($cat);
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<?php echo form_label($this->lang->line('items_stock_location').':', 'stock_location',array('class'=>'wide')); ?>
|
|
</td>
|
|
<td>
|
|
<?php
|
|
echo form_dropdown('stock_location',$stock_locations,current($stock_locations),'onchange="fill_quantity(this.value)"');
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<?php echo form_label($this->lang->line('items_current_quantity').':', 'quantity',array('class'=>'wide')); ?>
|
|
</td>
|
|
<td>
|
|
<?php $qty = array (
|
|
|
|
'name'=>'quantity',
|
|
'id'=>'quantity',
|
|
'value'=>current($item_quantitys),
|
|
'style' => 'border:none',
|
|
'readonly' => 'readonly'
|
|
);
|
|
|
|
echo form_input($qty);
|
|
?>
|
|
</td>
|
|
</tr>
|
|
</div>
|
|
</table>
|
|
|
|
<div class="field_row clearfix">
|
|
<?php echo form_label($this->lang->line('items_add_minus').':', 'quantity',array('class'=>'required wide')); ?>
|
|
<div class='form_field'>
|
|
<?php echo form_input(array(
|
|
'name'=>'newquantity',
|
|
'id'=>'newquantity'
|
|
)
|
|
);?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field_row clearfix">
|
|
<?php echo form_label($this->lang->line('items_inventory_comments').':', 'description',array('class'=>'wide')); ?>
|
|
<div class='form_field'>
|
|
<?php echo form_textarea(array(
|
|
'name'=>'trans_comment',
|
|
'id'=>'trans_comment',
|
|
'rows'=>'3',
|
|
'cols'=>'17')
|
|
);?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
echo form_submit(array(
|
|
'name'=>'submit',
|
|
'id'=>'submit',
|
|
'value'=>$this->lang->line('common_submit'),
|
|
'class'=>'submit_button float_right')
|
|
);
|
|
?>
|
|
</fieldset>
|
|
<?php
|
|
echo form_close();
|
|
?>
|
|
<script type='text/javascript'>
|
|
|
|
//validation and submit handling
|
|
$(document).ready(function()
|
|
{
|
|
$('#item_form').validate({
|
|
submitHandler:function(form)
|
|
{
|
|
$(form).ajaxSubmit({
|
|
success:function(response)
|
|
{
|
|
tb_remove();
|
|
post_item_form_submit(response);
|
|
},
|
|
dataType:'json'
|
|
});
|
|
|
|
},
|
|
errorLabelContainer: "#error_message_box",
|
|
wrapper: "li",
|
|
rules:
|
|
{
|
|
newquantity:
|
|
{
|
|
required:true,
|
|
number:true
|
|
}
|
|
},
|
|
messages:
|
|
{
|
|
|
|
newquantity:
|
|
{
|
|
required:"<?php echo $this->lang->line('items_quantity_required'); ?>",
|
|
number:"<?php echo $this->lang->line('items_quantity_number'); ?>"
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
function fill_quantity(val)
|
|
{
|
|
var item_quantitys= <?php echo json_encode($item_quantitys ); ?>;
|
|
document.getElementById("quantity").value = item_quantitys[val];
|
|
}
|
|
</script>
|