mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-18 14:27:54 -05:00
135 lines
3.9 KiB
PHP
135 lines
3.9 KiB
PHP
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
|
|
|
|
<ul id="error_message_box" class="error_message_box"></ul>
|
|
|
|
<?php echo form_open('items/save_inventory/'.$item_info->item_id, array('id'=>'item_form', 'class' => 'form-horizontal')); ?>
|
|
<fieldset id="item_basic_info">
|
|
<div class="form-group form-group-sm">
|
|
<?php echo form_label($this->lang->line('items_item_number').':', 'name', array('class'=>'control-label col-xs-3')); ?>
|
|
<div class="col-xs-6">
|
|
<?php echo form_input(array(
|
|
'name'=>'item_number',
|
|
'id'=>'item_number',
|
|
'value'=>$item_info->item_number,
|
|
'class'=>'form-control input-sm',
|
|
'disabled'=>'')
|
|
); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group form-group-sm">
|
|
<?php echo form_label($this->lang->line('items_name').':', 'name', array('class'=>'control-label col-xs-3')); ?>
|
|
<div class='col-xs-6'>
|
|
<?php echo form_input(array(
|
|
'name'=>'name',
|
|
'id'=>'name',
|
|
'value'=>$item_info->name,
|
|
'class'=>'form-control input-sm',
|
|
'disabled'=>'')
|
|
); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group form-group-sm">
|
|
<?php echo form_label($this->lang->line('items_category').':', 'category', array('class'=>'control-label col-xs-3')); ?>
|
|
<div class='col-xs-6'>
|
|
<?php echo form_input(array(
|
|
'name'=>'category',
|
|
'id'=>'category',
|
|
'value'=>$item_info->category,
|
|
'class'=>'form-control input-sm',
|
|
'disabled'=>'')
|
|
); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group form-group-sm">
|
|
<?php echo form_label($this->lang->line('items_stock_location').':', 'stock_location', array('class'=>'control-label col-xs-3')); ?>
|
|
<div class='col-xs-6'>
|
|
<?php echo form_dropdown('stock_location', $stock_locations, current($stock_locations), array('onchange'=>'fill_quantity(this.value)', 'class'=>'form-control')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group form-group-sm">
|
|
<?php echo form_label($this->lang->line('items_current_quantity').':', 'quantity', array('class'=>'control-label col-xs-3')); ?>
|
|
<div class='col-xs-2'>
|
|
<?php echo form_input(array(
|
|
'name'=>'quantity',
|
|
'id'=>'quantity',
|
|
'value'=>current($item_quantities),
|
|
'class'=>'form-control input-sm',
|
|
'disabled'=>'')
|
|
); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group form-group-sm">
|
|
<?php echo form_label($this->lang->line('items_add_minus').':', 'quantity', array('class'=>'required control-label col-xs-3')); ?>
|
|
<div class='col-xs-2'>
|
|
<?php echo form_input(array(
|
|
'name'=>'newquantity',
|
|
'id'=>'newquantity',
|
|
'class'=>'form-control input-sm')
|
|
); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group form-group-sm">
|
|
<?php echo form_label($this->lang->line('items_inventory_comments').':', 'description', array('class'=>'control-label col-xs-3')); ?>
|
|
<div class='col-xs-6'>
|
|
<?php echo form_textarea(array(
|
|
'name'=>'trans_comment',
|
|
'id'=>'trans_comment',
|
|
'class'=>'form-control input-sm')
|
|
);?>
|
|
</div>
|
|
</div>
|
|
</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)
|
|
{
|
|
dialog_support.hide();
|
|
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_quantities= <?php echo json_encode($item_quantities ); ?>;
|
|
document.getElementById("quantity").value = item_quantities[val];
|
|
}
|
|
</script>
|