Fix more buttons to be bootstrap ones, fixed sales register, removed old style assets (#116)

This commit is contained in:
FrancescoUK
2016-02-08 12:12:05 +00:00
parent d5e0230b19
commit f6356dd9e6
15 changed files with 208 additions and 360 deletions

View File

@@ -294,7 +294,7 @@ echo form_open('config/save/',array('id'=>'config_form','enctype'=>'multipart/fo
<div class="field_row clearfix">
<?php echo form_label($this->lang->line('config_backup_database').':', 'config_backup_database',array('class'=>'wide')); ?>
<div id="backup_db" class="form_field small_button" style="background-color:transparent;">
<div id="backup_db" class="btn btn-primary btn-sm">
<span style="top:22%;"><?php echo $this->lang->line('config_backup_button'); ?></span>
</div>
</div>

View File

@@ -13,177 +13,179 @@ if(isset($error))
<div id="register_wrapper">
<?php echo form_open("receivings/change_mode",array('id'=>'mode_form')); ?>
<span><?php echo $this->lang->line('recvs_mode') ?></span>
<?php echo form_dropdown('mode',$modes,$mode,'onchange="$(\'#mode_form\').submit();"'); ?>
<?php
if ($show_stock_locations)
{
?>
<span><?php echo $this->lang->line('recvs_stock_source') ?></span>
<?php echo form_dropdown('stock_source',$stock_locations,$stock_source,'onchange="$(\'#mode_form\').submit();"'); ?>
<?php
if($mode=='requisition')
{
?>
<span><?php echo $this->lang->line('recvs_stock_destination') ?></span>
<?php echo form_dropdown('stock_destination',$stock_locations,$stock_destination,'onchange="$(\'#mode_form\').submit();"');
}
}
?>
</form>
<?php echo form_open("receivings/add",array('id'=>'add_item_form')); ?>
<label id="item_label" for="item">
<?php
if($mode=='receive' or $mode=='requisition')
{
echo $this->lang->line('recvs_find_or_scan_item');
}
else
{
echo $this->lang->line('recvs_find_or_scan_item_or_receipt');
}
?>
</label>
<?php echo form_input(array('name'=>'item','id'=>'item','size'=>'40'));?>
<div id="new_item_button_register" >
<?php echo anchor("items/view/-1/width:450",
"<div class='btn btn-sm btn-info'><span>".$this->lang->line('sales_new_item')."</span></div>",
array('class'=>'thickbox none','title'=>$this->lang->line('sales_new_item')));
?>
</div>
</form>
<!-- Receiving Items List -->
<table id="register">
<thead>
<tr>
<th style="width:11%;"><?php echo $this->lang->line('common_delete'); ?></th>
<th style="width:30%;"><?php echo $this->lang->line('recvs_item_name'); ?></th>
<th style="width:11%;"><?php echo $this->lang->line('recvs_cost'); ?></th>
<th style="width:5%;"><?php echo $this->lang->line('recvs_quantity'); ?></th>
<th style="width:6%;"></th>
<th style="width:11%;"><?php echo $this->lang->line('recvs_discount'); ?></th>
<th style="width:15%;"><?php echo $this->lang->line('recvs_total'); ?></th>
<th style="width:11%;"><?php echo $this->lang->line('recvs_edit'); ?></th>
</tr>
</thead>
<tbody id="cart_contents">
<?php
if(count($cart)==0)
{
?>
<tr><td colspan='8'>
<div class='warning_message' style='padding:7px;'><?php echo $this->lang->line('sales_no_items_in_cart'); ?></div>
</td></tr>
<?php
}
else
{
foreach(array_reverse($cart, true) as $line=>$item)
{
echo form_open("receivings/edit_item/$line");
<label><?php echo $this->lang->line('recvs_mode') ?></label>
?>
<tr>
<td><?php echo anchor("receivings/delete_item/$line",'['.$this->lang->line('common_delete').']');?></td>
<td style="align:center;"><?php echo base64_decode($item['name']); ?><br /> [<?php echo $item['in_stock']; ?> in <?php echo $item['stock_name']; ?>]
<?php echo form_hidden('location', $item['item_location']); ?></td>
<?php if ($items_module_allowed && $mode !='requisition')
<?php echo form_dropdown('mode',$modes,$mode,'onchange="$(\'#mode_form\').submit();"'); ?>
<?php
if ($show_stock_locations)
{
?>
<td><?php echo form_input(array('name'=>'price','value'=>$item['price'],'size'=>'6'));?></td>
<span><?php echo $this->lang->line('recvs_stock_source') ?></span>
<?php echo form_dropdown('stock_source',$stock_locations,$stock_source,'onchange="$(\'#mode_form\').submit();"'); ?>
<?php
if($mode=='requisition')
{
?>
<span><?php echo $this->lang->line('recvs_stock_destination') ?></span>
<?php echo form_dropdown('stock_destination',$stock_locations,$stock_destination,'onchange="$(\'#mode_form\').submit();"');
}
}
?>
</form>
<?php echo form_open("receivings/add",array('id'=>'add_item_form')); ?>
<label id="item_label" for="item">
<?php
if($mode=='receive' or $mode=='requisition')
{
echo $this->lang->line('recvs_find_or_scan_item');
}
else
{
?>
<td><?php echo $item['price']; ?></td>
<?php echo form_hidden('price',$item['price']); ?>
<?php
echo $this->lang->line('recvs_find_or_scan_item_or_receipt');
}
?>
<td>
<?php
echo form_input(array('name'=>'quantity','value'=>$item['quantity'],'size'=>'2'));
if ($item['receiving_quantity'] > 1)
</label>
<?php echo form_input(array('name'=>'item','id'=>'item','size'=>'40'));?>
<div id="new_item_button_register" >
<?php echo anchor("items/view/-1/width:450",
"<div class='btn btn-sm btn-info'><span>".$this->lang->line('sales_new_item')."</span></div>",
array('class'=>'thickbox none','title'=>$this->lang->line('sales_new_item')));
?>
</div>
</form>
<!-- Receiving Items List -->
<table id="register">
<thead>
<tr>
<th style="width:11%;"><?php echo $this->lang->line('common_delete'); ?></th>
<th style="width:30%;"><?php echo $this->lang->line('recvs_item_name'); ?></th>
<th style="width:11%;"><?php echo $this->lang->line('recvs_cost'); ?></th>
<th style="width:5%;"><?php echo $this->lang->line('recvs_quantity'); ?></th>
<th style="width:6%;"></th>
<th style="width:11%;"><?php echo $this->lang->line('recvs_discount'); ?></th>
<th style="width:15%;"><?php echo $this->lang->line('recvs_total'); ?></th>
<th style="width:11%;"><?php echo $this->lang->line('recvs_edit'); ?></th>
</tr>
</thead>
<tbody id="cart_contents">
<?php
if(count($cart)==0)
{
?>
</td>
<td>x <?php echo $item['receiving_quantity']; ?></td>
<?php
?>
<tr><td colspan='8'>
<div class='warning_message' style='padding:7px;'><?php echo $this->lang->line('sales_no_items_in_cart'); ?></div>
</td></tr>
<?php
}
else
{
?>
<td></td>
<?php
}
?>
<?php
if ($items_module_allowed && $mode!='requisition')
{
?>
<td><?php echo form_input(array('name'=>'discount','value'=>$item['discount'],'size'=>'3'));?></td>
<?php
}
else
{
?>
<td><?php echo $item['discount']; ?></td>
<?php echo form_hidden('discount',$item['discount']); ?>
<?php
}
?>
<td><?php echo to_currency($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100); ?></td>
<td><?php echo form_submit("edit_item", $this->lang->line('sales_edit_item'));?></td>
</tr>
<tr>
<?php
if($item['allow_alt_description']==1)
{
foreach(array_reverse($cart, true) as $line=>$item)
{
echo form_open("receivings/edit_item/$line");
?>
<td style="color: #2F4F4F;"><?php echo $this->lang->line('sales_description_abbrv').':';?></td>
<?php
}
?>
<td colspan="2" style="text-align: left;">
<?php
if($item['allow_alt_description']==1)
{
echo form_input(array('name'=>'description','value'=>base64_decode($item['description']),'size'=>'20'));
}
else
{
if (base64_decode($item['description'])!='')
<tr>
<td><?php echo anchor("receivings/delete_item/$line",'['.$this->lang->line('common_delete').']');?></td>
<td style="align:center;"><?php echo base64_decode($item['name']); ?><br /> [<?php echo $item['in_stock']; ?> in <?php echo $item['stock_name']; ?>]
<?php echo form_hidden('location', $item['item_location']); ?></td>
<?php if ($items_module_allowed && $mode !='requisition')
{
echo base64_decode($item['description']);
echo form_hidden('description',base64_decode($item['description']));
}
else
{
echo $this->lang->line('sales_no_description');
echo form_hidden('description','');
}
}
?>
<td><?php echo form_input(array('name'=>'price','value'=>$item['price'],'size'=>'6'));?></td>
<?php
}
else
{
?>
<td><?php echo $item['price']; ?></td>
<?php echo form_hidden('price',$item['price']); ?>
<?php
}
?>
<td>
<?php
echo form_input(array('name'=>'quantity','value'=>$item['quantity'],'size'=>'2'));
if ($item['receiving_quantity'] > 1)
{
?>
</td>
<td>x <?php echo $item['receiving_quantity']; ?></td>
<?php
}
else
{
?>
<td></td>
<?php
}
?>
<?php
if ($items_module_allowed && $mode!='requisition')
{
?>
<td><?php echo form_input(array('name'=>'discount','value'=>$item['discount'],'size'=>'3'));?></td>
<?php
}
else
{
?>
<td><?php echo $item['discount']; ?></td>
<?php echo form_hidden('discount',$item['discount']); ?>
<?php
}
?>
<td><?php echo to_currency($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100); ?></td>
<td><?php echo form_submit("edit_item", $this->lang->line('sales_edit_item'));?></td>
</tr>
<tr>
<?php
if($item['allow_alt_description']==1)
{
?>
<td style="color: #2F4F4F;"><?php echo $this->lang->line('sales_description_abbrv').':';?></td>
<?php
}
?>
<td colspan="2" style="text-align: left;">
<?php
if($item['allow_alt_description']==1)
{
echo form_input(array('name'=>'description','value'=>base64_decode($item['description']),'size'=>'20'));
}
else
{
if (base64_decode($item['description'])!='')
{
echo base64_decode($item['description']);
echo form_hidden('description',base64_decode($item['description']));
}
else
{
echo $this->lang->line('sales_no_description');
echo form_hidden('description','');
}
}
?>
</td>
<td colspan="6"></td>
</tr>
</form>
<?php
}
}
?>
</td>
<td colspan="6"></td>
</tr>
</form>
<?php
}
}
?>
</tbody>
</table>
</tbody>
</table>
</div>
<!-- Overall Receiving -->

View File

@@ -79,7 +79,7 @@ echo form_button(array(
'name'=>'generate_report',
'id'=>'generate_report',
'content'=>$this->lang->line('common_submit'),
'class'=>'submit_button')
'class'=>'btn btn-primary btn-sm')
);
?>

View File

@@ -40,7 +40,7 @@ echo form_button(array(
'name'=>'generate_report',
'id'=>'generate_report',
'content'=>$this->lang->line('common_submit'),
'class'=>'submit_button')
'class'=>'btn btn-primary btn-sm')
);
?>

View File

@@ -16,7 +16,7 @@ echo form_button(array(
'name'=>'generate_report',
'id'=>'generate_report',
'content'=>$this->lang->line('common_submit'),
'class'=>'submit_button')
'class'=>'btn btn-primary btn-sm')
);
?>

View File

@@ -26,7 +26,7 @@ echo form_button(array(
'name'=>'generate_report',
'id'=>'generate_report',
'content'=>$this->lang->line('common_submit'),
'class'=>'submit_button')
'class'=>'btn btn-primary btn-sm')
);
?>

View File

@@ -21,52 +21,49 @@ if (isset($success))
?>
<div id="register_wrapper">
<?php echo form_open("sales/change_mode",array('id'=>'mode_form')); ?>
<span><?php echo $this->lang->line('sales_mode') ?></span>
<?php echo form_dropdown('mode',$modes,$mode,'onchange="$(\'#mode_form\').submit();"'); ?>
<?php
if (count($stock_locations) > 1)
{
?>
<span><?php echo $this->lang->line('sales_stock_location') ?></span>
<?php echo form_dropdown('stock_location',$stock_locations,$stock_location,'onchange="$(\'#mode_form\').submit();"'); ?>
<?php
}
?>
<?php echo form_open("sales/change_mode", array('id'=>'mode_form')); ?>
<label><?php echo $this->lang->line('sales_mode') ?></label>
<?php echo form_dropdown('mode', $modes, $mode, 'onchange="$(\'#mode_form\').submit();"'); ?>
<?php
if ($this->Employee->has_grant('reports_sales', $this->session->userdata('person_id')))
{
?>
<div id="sales_overview" class="btn btn-sm btn-primary">
<a href="<?=site_url($controller_name . '/manage')?>"><span><?php echo $this->lang->line('sales_takings'); ?><span></a>
</div>
<?php
}
?>
<?php
if (count($stock_locations) > 1)
{
?>
<span><?php echo $this->lang->line('sales_stock_location') ?></span>
<?php echo form_dropdown('stock_location',$stock_locations,$stock_location,'onchange="$(\'#mode_form\').submit();"'); ?>
<?php
}
?>
<?php
if ($this->Employee->has_grant('reports_sales', $this->session->userdata('person_id')))
{
?>
<a href="<?=site_url($controller_name . '/manage')?>"><div class="btn btn-primary btn-sm" id="sales_overview"><span><?php echo $this->lang->line('sales_takings'); ?><span></div></a>
<?php
}
?>
<div id="show_suspended_sales_button">
<?php echo anchor("sales/suspended/width:425",
"<div class='btn btn-sm btn-warning'><span style='font-size:73%;'>".$this->lang->line('sales_suspended_sales')."</span></div>",
"<div class='btn btn-warning btn-sm' id='show_suspended_sales_button'><span>".$this->lang->line('sales_suspended_sales')."</span></div>",
array('class'=>'thickbox none','title'=>$this->lang->line('sales_suspended_sales')));
?>
</div>
</form>
<?php echo form_open("sales/add",array('id'=>'add_item_form')); ?>
<label id="item_label" for="item">
<?php echo $this->lang->line('sales_find_or_scan_item_or_receipt'); ?>
</label>
<?php echo form_input(array('name'=>'item','id'=>'item','size'=>'40','tabindex'=>'1')); ?>
<div id="new_item_button_register" >
<?php echo anchor("items/view/-1/width:450",
"<div class='btn btn-sm btn-info'><span>".$this->lang->line('sales_new_item')."</span></div>",
array('class'=>'thickbox none','title'=>$this->lang->line('sales_new_item')));
?>
</div>
<?php echo form_open("sales/add", array('id'=>'add_item_form')); ?>
<label id="item_label" for="item">
<?php echo $this->lang->line('sales_find_or_scan_item_or_receipt'); ?>
</label>
<?php echo form_input(array('name'=>'item','id'=>'item','size'=>'40','tabindex'=>'1')); ?>
<div id="new_item_button_register" >
<?php echo anchor("items/view/-1/width:450",
"<div class='btn btn-info btn-sm'><span>".$this->lang->line('sales_new_item')."</span></div>",
array('class'=>'thickbox none','title'=>$this->lang->line('sales_new_item')));
?>
</div>
</form>
<table id="register">

View File

@@ -34,42 +34,6 @@ label.required
padding: 4px;
}
.submit_button
{
padding: 5px;
color: #fff;
background-color: #0a6184;
border: 2px solid #ddd;
}
.delete_button
{
padding: 5px;
color: #fff;
background-color: #ea4729;
border: 2px solid #ddd;
}
.small_button
{
position:relative;
width:95px;
height:30px;
background-image: url(../images/small_action_button.jpg);
background-repeat:no-repeat;
cursor:pointer;
}
.small_button span
{
position:absolute;
width:100%;
top:30%;
left:0%;
color:#FFF;
font-size:0.9em;
font-weight:bold;
text-align:center;
}
.float_left
{
float:left;
@@ -80,28 +44,6 @@ label.required
float:right;
}
.big_button
{
position:relative;
width:119px;
height:45px;
background-image: url(../images/big_action_button.jpg);
background-repeat:no-repeat;
cursor:pointer;
}
.big_button span
{
position:absolute;
width:100%;
top:35%;
color:#FFF;
font-size:0.9em;
font-weight:bold;
text-align:center;
}
.warning_message
{
text-align:center;
@@ -149,6 +91,7 @@ input
line-height: 0;
height: 0;
}
.clearfix { display: inline-block; }
html[xmlns] .clearfix { display: block; }
* html .clearfix { height: 1%; }

View File

@@ -1,93 +0,0 @@
#menubar
{
position:relative;
margin:0px;
padding:0px;
background-image: url("../images/menubar/menubar_bg.gif");
background-repeat: repeat-x;
width:100%;
height:100px;
color:#FFFFFF;
text-align:left;
text-align:center;
}
#menubar_container
{
position:relative;
margin:0 auto;
width:960px;
text-align:left;
}
.menu_item
{
float:left;
width:65px;
height:100%;
text-align:center;
}
#menubar a:link, #menubar a:visited, #menubar a
{
color:#FFFFFF;
text-decoration:underline;
}
#menubar a:hover
{
color:#CCCCCC;
text-decoration:underline;
}
.menu_item
{
font-size:11px;
}
#menubar_company_info
{
position:absolute;
left:0px;
top:18px;
width:250px;
height:55%;
}
#company_title
{
font-size:14px;
font-weight:bold;
}
#menubar_navigation
{
position:relative;
width:75%;
left:315px;
top:8px;
height:45%;
}
#menubar_footer
{
position:absolute;
top:80px;
left:0px;
height:17%;
padding-top:3px;
font-size:10px;
font-weight:bold;
}
#menubar_date
{
position:absolute;
top:80px;
right:0px;
height:17%;
padding-top:3px;
font-size:10px;
font-weight:bold;
}

View File

@@ -1,5 +1,4 @@
@import url(autocomplete.css);
@import url(menubar.css);
@import url(general.css);
@import url(popupbox.css);
@import url(register.css);

View File

@@ -4,13 +4,22 @@
width:70%;
font-size:13px;
}
#mode_form
{
position:relative;
background-color:#DDD;
width:100%;
padding: 8px 5px 8px 5px;
}
#sales_overview
{
position:absolute;
top:3px;
right:130px;
}
#show_suspended_sales_button
{
position:absolute;
@@ -29,7 +38,6 @@
background-color:#BBBBBB;
width:100%;
padding: 8px 0px 8px 0px;
}
#new_item_button_register
@@ -43,7 +51,6 @@
{
border: 1px solid #ccc;
padding: 2px;
}
#item_label,#customer_label
@@ -87,7 +94,6 @@
width:28%;
padding:5px;
font-size:13px;
}
#sale_details
@@ -121,6 +127,7 @@
margin-top:5px;
clear:both;
}
#suspended_sales_table
{
width:100%;
@@ -154,11 +161,4 @@
{
border: 1px solid #bfbab4;
margin: 0 4px 8px 0;
}
#sales_overview
{
position:absolute;
top:3px;
right:99px;
}

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB