示例#1
0
	  </tr>
	  
	<?php 
foreach ($cart as $line => $item) {
    ?>
			<tr class="item-row">
				<td><?php 
    echo $item['item_number'];
    ?>
</td>
				<td class="item-name"><?php 
    echo $item['name'];
    ?>
</td>
				<td><?php 
    echo to_quantity_decimals($item['quantity']);
    ?>
</td>
				<td><?php 
    echo to_currency($item['price']);
    ?>
</td>
				<td><?php 
    echo $item['discount'] . '%';
    ?>
</td>
				<td class="total-line"><?php 
    echo to_currency($item['discounted_total']);
    ?>
</td>
			</tr>
echo form_label($this->lang->line('items_stock_location'), 'stock_location', array('class' => 'control-label col-xs-3'));
?>
			<div class='col-xs-8'>
				<?php 
echo form_dropdown('stock_location', $stock_locations, current($stock_locations), array('onchange' => 'display_stock(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-4'>
				<?php 
echo form_input(array('name' => 'quantity', 'id' => 'quantity', 'class' => 'form-control input-sm', 'disabled' => '', 'value' => to_quantity_decimals(current($item_quantities))));
?>
			</div>
		</div>
	</fieldset>
<?php 
echo form_close();
?>

<table id="items_count_details" class="table table-striped table-hover">
	<thead>
		<tr style="background-color: #999 !important;">
			<th colspan="4">Inventory Data Tracking</th>
		</tr>
		<tr>
			<th width="30%">Date</th>
示例#3
0
            ?>
									<?php 
            echo form_hidden('price', to_currency_no_money($item['price']));
            ?>
								</td>
							<?php 
        }
        ?>

							<td>
								<?php 
        if ($item['is_serialized'] == 1) {
            echo to_quantity_decimals($item['quantity']);
            echo form_hidden('quantity', $item['quantity']);
        } else {
            echo form_input(array('name' => 'quantity', 'class' => 'form-control input-sm', 'value' => to_quantity_decimals($item['quantity']), 'tabindex' => ++$tabindex));
        }
        ?>
							</td>

							<td><?php 
        echo form_input(array('name' => 'discount', 'class' => 'form-control input-sm', 'value' => to_decimals($item['discount'], 0), 'tabindex' => ++$tabindex));
        ?>
</td>
							<td><?php 
        echo to_currency($item['price'] * $item['quantity'] - $item['price'] * $item['quantity'] * $item['discount'] / 100);
        ?>
</td>
							<td><a href="javascript:document.getElementById('<?php 
        echo 'cart_' . $line;
        ?>
示例#4
0
            echo form_hidden('price', $item['price']);
            ?>
								</td>
							<?php 
        }
        ?>
							
							<td><?php 
        echo form_input(array('name' => 'quantity', 'class' => 'form-control input-sm', 'value' => to_quantity_decimals($item['quantity'])));
        ?>
</td>
							<?php 
        if ($item['receiving_quantity'] > 1) {
            ?>
								<td><?php 
            echo 'x' . to_quantity_decimals($item['receiving_quantity']);
            ?>
</td>	
							<?php 
        } else {
            ?>
								<td></td>
							<?php 
        }
        ?>
						
							<?php 
        if ($items_module_allowed && $mode != 'requisition') {
            ?>
								<td><?php 
            echo form_input(array('name' => 'discount', 'class' => 'form-control input-sm', 'value' => $item['discount']));
示例#5
0
function get_item_data_row($item, $controller)
{
    $CI =& get_instance();
    $item_tax_info = $CI->Item_taxes->get_info($item->item_id);
    $tax_percents = '';
    foreach ($item_tax_info as $tax_info) {
        $tax_percents .= to_tax_decimals($tax_info['percent']) . '%, ';
    }
    // remove ', ' from last item
    $tax_percents = substr($tax_percents, 0, -2);
    $controller_name = strtolower(get_class($CI));
    $image = '';
    if (!empty($item->pic_id)) {
        $images = glob("uploads/item_pics/" . $item->pic_id . ".*");
        if (sizeof($images) > 0) {
            $image .= '<a class="rollover" href="' . base_url($images[0]) . '"><img src="' . site_url('items/pic_thumb/' . $item->pic_id) . '"></a>';
        }
    }
    return array('items.item_id' => $item->item_id, 'item_number' => $item->item_number, 'name' => $item->name, 'category' => $item->category, 'company_name' => $item->company_name, 'cost_price' => to_currency($item->cost_price), 'unit_price' => to_currency($item->unit_price), 'quantity' => to_quantity_decimals($item->quantity), 'tax_percents' => !$tax_percents ? '-' : $tax_percents, 'item_pic' => $image, 'inventory' => anchor($controller_name . "/inventory/{$item->item_id}", '<span class="glyphicon glyphicon-pushpin"></span>', array('class' => 'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title' => $CI->lang->line($controller_name . '_count'))), 'stock' => anchor($controller_name . "/count_details/{$item->item_id}", '<span class="glyphicon glyphicon-list-alt"></span>', array('class' => 'modal-dlg', 'title' => $CI->lang->line($controller_name . '_details_count'))), 'edit' => anchor($controller_name . "/view/{$item->item_id}", '<span class="glyphicon glyphicon-edit"></span>', array('class' => 'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title' => $CI->lang->line($controller_name . '_update'))));
}
示例#6
0
 public function inventory_summary($location_id = 'all', $item_count = 'all')
 {
     $this->load->model('reports/Inventory_summary');
     $model = $this->Inventory_summary;
     $report_data = $model->getData(array('location_id' => $location_id, 'item_count' => $item_count));
     $tabular_data = array();
     foreach ($report_data as $row) {
         $tabular_data[] = $this->xss_clean(array($row['name'], $row['item_number'], to_quantity_decimals($row['quantity']), to_quantity_decimals($row['reorder_level']), $row['location_name'], to_currency($row['cost_price']), to_currency($row['unit_price']), to_currency($row['sub_total_value'])));
     }
     $data = array('title' => $this->lang->line('reports_inventory_summary_report'), 'subtitle' => '', 'headers' => $this->xss_clean($model->getDataColumns()), 'data' => $tabular_data, 'summary_data' => $this->xss_clean($model->getSummaryData($report_data)));
     $this->load->view('reports/tabular', $data);
 }
示例#7
0
echo form_label($this->lang->line('items_receiving_quantity'), 'receiving_quantity', array('class' => 'required control-label col-xs-3'));
?>
			<div class='col-xs-4'>
				<?php 
echo form_input(array('name' => 'receiving_quantity', 'id' => 'receiving_quantity', 'class' => 'required form-control input-sm', 'value' => isset($item_info->item_id) ? to_quantity_decimals($item_info->receiving_quantity) : to_quantity_decimals(0)));
?>
			</div>
		</div>

		<div class="form-group form-group-sm">
			<?php 
echo form_label($this->lang->line('items_reorder_level'), 'reorder_level', array('class' => 'required control-label col-xs-3'));
?>
			<div class='col-xs-4'>
				<?php 
echo form_input(array('name' => 'reorder_level', 'id' => 'reorder_level', 'class' => 'form-control input-sm', 'value' => isset($item_info->item_id) ? to_quantity_decimals($item_info->reorder_level) : to_quantity_decimals(0)));
?>
			</div>
		</div>

		<div class="form-group form-group-sm">
			<?php 
echo form_label($this->lang->line('items_description'), 'description', array('class' => 'control-label col-xs-3'));
?>
			<div class='col-xs-8'>
				<?php 
echo form_textarea(array('name' => 'description', 'id' => 'description', 'class' => 'form-control input-sm', 'value' => $item_info->description));
?>
			</div>
		</div>
		
示例#8
0
foreach (array_reverse($cart, true) as $line => $item) {
    ?>
			<tr>
				<td><?php 
    echo $item['name'];
    ?>
</td>
				<td><?php 
    echo to_currency($item['price']);
    ?>
</td>
				<td><?php 
    echo to_quantity_decimals($item['quantity']) . " " . ($show_stock_locations ? " [" . $item['stock_name'] . "]" : "");
    ?>
&nbsp;&nbsp;&nbsp;x <?php 
    echo $item['receiving_quantity'] != 0 ? to_quantity_decimals($item['receiving_quantity']) : 1;
    ?>
</td>
				<td><div class="total-value"><?php 
    echo to_currency($item['total']);
    ?>
</div></td>
			</tr>
			<tr>
				<td ><?php 
    echo $item['serialnumber'];
    ?>
</td>
			</tr>
			<?php 
    if ($item['discount'] > 0) {