mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-18 06:17:55 -05:00
bootstrapify inventory form (#116)
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
'id'=>'cost_price',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=>$item_info->cost_price)
|
||||
);?>
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -75,11 +75,11 @@
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon input-sm"><b><?php echo $this->config->item('currency_symbol'); ?></b></span>
|
||||
<?php echo form_input(array(
|
||||
'name'=>'unit_price',
|
||||
'id'=>'unit_price',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=>$item_info->unit_price)
|
||||
);?>
|
||||
'name'=>'unit_price',
|
||||
'id'=>'unit_price',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=>$item_info->unit_price)
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -88,11 +88,11 @@
|
||||
<?php echo form_label($this->lang->line('items_tax_1'), 'tax_percent_1', array('class'=>'control-label col-xs-3')); ?>
|
||||
<div class='col-sm-3'>
|
||||
<?php echo form_input(array(
|
||||
'name'=>'tax_names[]',
|
||||
'id'=>'tax_name_1',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=> isset($item_tax_info[0]['name']) ? $item_tax_info[0]['name'] : $this->config->item('default_tax_1_name'))
|
||||
);?>
|
||||
'name'=>'tax_names[]',
|
||||
'id'=>'tax_name_1',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=> isset($item_tax_info[0]['name']) ? $item_tax_info[0]['name'] : $this->config->item('default_tax_1_name'))
|
||||
);?>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group input-group-sm">
|
||||
@@ -101,7 +101,7 @@
|
||||
'id'=>'tax_percent_name_1',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=> isset($item_tax_info[0]['percent']) ? $item_tax_info[0]['percent'] : $default_tax_1_rate)
|
||||
);?>
|
||||
);?>
|
||||
<span class="input-group-addon input-sm"><b>%</b></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,11 +111,11 @@
|
||||
<?php echo form_label($this->lang->line('items_tax_2'), 'tax_percent_2', array('class'=>'control-label col-xs-3')); ?>
|
||||
<div class='col-sm-3'>
|
||||
<?php echo form_input(array(
|
||||
'name'=>'tax_names[]',
|
||||
'id'=>'tax_name_2',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=> isset($item_tax_info[1]['name']) ? $item_tax_info[1]['name'] : $this->config->item('default_tax_2_name'))
|
||||
);?>
|
||||
'name'=>'tax_names[]',
|
||||
'id'=>'tax_name_2',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=> isset($item_tax_info[1]['name']) ? $item_tax_info[1]['name'] : $this->config->item('default_tax_2_name'))
|
||||
);?>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group input-group-sm">
|
||||
@@ -124,7 +124,7 @@
|
||||
'class'=>'form-control input-sm',
|
||||
'id'=>'tax_percent_name_2',
|
||||
'value'=> isset($item_tax_info[1]['percent']) ? $item_tax_info[1]['percent'] : $default_tax_2_rate)
|
||||
);?>
|
||||
);?>
|
||||
<span class="input-group-addon input-sm"><b>%</b></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,7 +144,7 @@
|
||||
'id'=>$key.'_quantity',
|
||||
'class'=>'quantity form-control',
|
||||
'value'=>isset($item_info->item_id)?$location_detail['quantity']:0)
|
||||
);?>
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@@ -159,7 +159,7 @@
|
||||
'id'=>'receiving_quantity',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=>$item_info->receiving_quantity)
|
||||
);?>
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
'id'=>'reorder_level',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=>!isset($item_info->item_id)?0:$item_info->reorder_level)
|
||||
);?>
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
'id'=>'description',
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=>$item_info->description)
|
||||
);?>
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
'id'=>'allow_alt_description',
|
||||
'value'=>1,
|
||||
'checked'=>($item_info->allow_alt_description)? 1 : 0)
|
||||
);?>
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
'id'=>'is_serialized',
|
||||
'value'=>1,
|
||||
'checked'=>($item_info->is_serialized)? 1 : 0)
|
||||
);?>
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
'id'=>'is_deleted',
|
||||
'value'=>1,
|
||||
'checked'=>($item_info->deleted)? 1 : 0)
|
||||
);?>
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
'id'=>'custom'.$i,
|
||||
'class'=>'form-control input-sm',
|
||||
'value'=>$item_arr['custom'.$i])
|
||||
);?>
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
@@ -1,107 +1,93 @@
|
||||
<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')); ?>
|
||||
<?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="field_row clearfix">
|
||||
<?php echo form_label($this->lang->line('items_item_number').':', 'name', array('class'=>'wide')); ?>
|
||||
<div class="form_field">
|
||||
<?php $inumber = array (
|
||||
'name'=>'item_number',
|
||||
'id'=>'item_number',
|
||||
'value'=>$item_info->item_number,
|
||||
'style' => 'border:none',
|
||||
'readonly' => 'readonly'
|
||||
);
|
||||
echo form_input($inumber);
|
||||
?>
|
||||
<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="field_row clearfix">
|
||||
<?php echo form_label($this->lang->line('items_name').':', 'name', array('class'=>'wide')); ?>
|
||||
<div class='form_field'>
|
||||
<?php $iname = array (
|
||||
'name'=>'name',
|
||||
'id'=>'name',
|
||||
'value'=>$item_info->name,
|
||||
'style' => 'border:none',
|
||||
'readonly' => 'readonly'
|
||||
);
|
||||
echo form_input($iname);
|
||||
?>
|
||||
<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="field_row clearfix">
|
||||
<?php echo form_label($this->lang->line('items_category').':', 'category', array('class'=>'wide')); ?>
|
||||
<div class='form_field'>
|
||||
<?php $cat = array (
|
||||
'name'=>'category',
|
||||
'id'=>'category',
|
||||
'value'=>$item_info->category,
|
||||
'style' => 'border:none',
|
||||
'readonly' => 'readonly'
|
||||
);
|
||||
echo form_input($cat);
|
||||
?>
|
||||
<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="field_row clearfix">
|
||||
<?php echo form_label($this->lang->line('items_stock_location').':', 'stock_location', array('class'=>'wide')); ?>
|
||||
<div class='form_field'>
|
||||
<?php
|
||||
echo form_dropdown('stock_location',$stock_locations,current($stock_locations),'onchange="fill_quantity(this.value)"');
|
||||
?>
|
||||
<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="field_row clearfix">
|
||||
<?php echo form_label($this->lang->line('items_current_quantity').':', 'quantity', array('class'=>'wide')); ?>
|
||||
<div class='form_field'>
|
||||
<?php $qty = array (
|
||||
|
||||
'name'=>'quantity',
|
||||
'id'=>'quantity',
|
||||
'value'=>current($item_quantities),
|
||||
'style' => 'border:none',
|
||||
'readonly' => 'readonly'
|
||||
);
|
||||
|
||||
echo form_input($qty);
|
||||
?>
|
||||
<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="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 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="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 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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user