<?php calc_product($product_id); $product = get_product(array('id' => $product_id)); ?> <ol class="breadcrumb"> <li><a href="<?php echo site_url(''); ?> "><?php lang('Dashboard'); ?> </a></li> <li><a href="<?php echo site_url('product'); ?> "><?php lang('Product'); ?> </a></li> <li><a href="<?php echo site_url('product/list_product'); ?> "><?php lang('Product List'); ?> </a></li> <li class="active"><?php echo $product['code']; ?>
function change_status_invoice($invoice_id, $data) { $ci =& get_instance(); $continue = true; if ($data['status'] == 0) { } else { if ($data['status'] == 1) { } else { $continue = false; } } if ($continue == true) { $ci->db->where('id', $invoice_id); $ci->db->update('invoices', array('status' => $_GET['status'])); $ci->db->where('invoice_id', $invoice_id); $ci->db->update('invoice_items', array('status' => $_GET['status'])); } $ci->db->where('invoice_id', $invoice_id); $items = $ci->db->get('invoice_items')->result_array(); foreach ($items as $item) { calc_product($item['product_id']); $ci->db->where('id', $item['product_serial_id']); $ci->db->update('product_serials', array('invoice_id' => '')); } }
<th><?php lang('Tax'); ?> </th> <th><?php lang('Sub Total'); ?> </th> </tr> </thead> <tbody> <?php foreach ($items as $item) { ?> <?php calc_product($item['product_id']); if ($item['product_id'] > 0) { $product = get_product($item['product_id']); } else { $product['id'] = ''; $product['code'] = $item['product_code']; $product['name'] = $item['product_name']; } // is serial number $item_serial['serial'] = ''; if ($item['product_serial_id'] > 0) { $this->db->where('id', $item['product_serial_id']); $item_serial = $this->db->get('product_serials')->row_array(); } ?> <tr>