Example #1
0
 function addinventoryrow($type)
 {
     $i = time() + rand(0, time()) + rand(0, time()) + rand(0, time());
     $inventory_item_quantity = array('name' => $type . '_inventory_item_quantity[' . $i . ']', 'id' => $type . '_inventory_item_quantity[' . $i . ']', 'maxlength' => '15', 'size' => '9', 'value' => '', 'class' => $type . '-quantity-inventory-item');
     $inventory_item_rate_per_unit = array('name' => $type . '_inventory_item_rate_per_unit[' . $i . ']', 'id' => $type . '_inventory_item_rate_per_unit[' . $i . ']', 'maxlength' => '15', 'size' => '9', 'value' => '', 'class' => $type . '-rate-inventory-item');
     $inventory_item_amount = array('name' => 'inventory_item_amount[' . $i . ']', 'id' => 'inventory_item_amount[' . $i . ']', 'maxlength' => '15', 'size' => '15', 'value' => '', 'class' => $type . '-amount-inventory-item');
     echo '<tr class="new-row">';
     echo "<td>" . form_input_inventory_item('inventory_item_id[' . $i . ']', 0) . "</td>";
     echo "<td>" . form_input($inventory_item_quantity) . "</td>";
     echo "<td>" . form_input($inventory_item_rate_per_unit) . "</td>";
     echo "<td>" . form_input($inventory_item_amount) . "</td>";
     echo '<td>';
     echo img(array('src' => asset_url() . "images/icons/add.png", 'border' => '0', 'alt' => 'Add Inventory Item', 'class' => 'addinventoryrow'));
     echo '</td>';
     echo '<td>';
     echo img(array('src' => asset_url() . "images/icons/delete.png", 'border' => '0', 'alt' => 'Remove Inventory Item', 'class' => 'deleteinventoryrow'));
     echo '</td>';
     echo '<td class="inventory-item-balance"><div></div>';
     echo '</td>';
     echo '</tr>';
     return;
 }
Example #2
0
    echo form_input_ledger('main_entity', $main_entity_active, '', $type = 'debtor');
    echo "</td>";
    echo "</tr>";
    echo "</table>";
    echo "</p>";
}
echo "<p></p>";
echo "<table class=\"entry-table\">";
echo "<thead><tr><th>Inventory Item</th><th>Quantity</th><th>Rate Per Unit</th><th>Discount %</th><th>Amount</th><th colspan=2></th><th colspan=2>Cur Balance</th></tr></thead>";
foreach ($inventory_item_id as $i => $row) {
    $inventory_item_quantity_item = array('name' => 'inventory_item_quantity[' . $i . ']', 'id' => 'inventory_item_quantity[' . $i . ']', 'maxlength' => '15', 'size' => '9', 'value' => isset($inventory_item_quantity[$i]) ? $inventory_item_quantity[$i] : '', 'class' => 'quantity-inventory-item');
    $inventory_item_rate_per_unit_item = array('name' => 'inventory_item_rate_per_unit[' . $i . ']', 'id' => 'inventory_item_rate_per_unit[' . $i . ']', 'maxlength' => '15', 'size' => '9', 'value' => isset($inventory_item_rate_per_unit[$i]) ? $inventory_item_rate_per_unit[$i] : '', 'class' => 'rate-inventory-item');
    $inventory_item_discount_item = array('name' => 'inventory_item_discount[' . $i . ']', 'id' => 'inventory_item_discount[' . $i . ']', 'maxlength' => '15', 'size' => '9', 'value' => isset($inventory_item_discount[$i]) ? $inventory_item_discount[$i] : '', 'class' => 'discount-inventory-item');
    $inventory_item_amount_item = array('name' => 'inventory_item_amount[' . $i . ']', 'id' => 'inventory_item_amount[' . $i . ']', 'maxlength' => '15', 'size' => '15', 'value' => isset($inventory_item_amount[$i]) ? $inventory_item_amount[$i] : '', 'class' => 'amount-inventory-item');
    echo "<tr>";
    echo "<td>" . form_input_inventory_item('inventory_item_id[' . $i . ']', isset($inventory_item_id[$i]) ? $inventory_item_id[$i] : 0) . "</td>";
    echo "<td>" . form_input($inventory_item_quantity_item) . "</td>";
    echo "<td>" . form_input($inventory_item_rate_per_unit_item) . "</td>";
    echo "<td>" . form_input($inventory_item_discount_item) . "</td>";
    echo "<td>" . form_input($inventory_item_amount_item) . "</td>";
    echo "<td>" . img(array('src' => asset_url() . "images/icons/add.png", 'border' => '0', 'alt' => 'Add Ledger', 'class' => 'addinventoryrow')) . "</td>";
    echo "<td>" . img(array('src' => asset_url() . "images/icons/delete.png", 'border' => '0', 'alt' => 'Remove Ledger', 'class' => 'deleteinventoryrow')) . "</td>";
    echo "<td class=\"inventory-item-balance\"><div></div></td>";
    echo "</tr>";
}
echo "</table>";
echo "<br />";
echo "<br />";
echo "<table class=\"entry-table\">";
echo "<thead><tr><th>Type</th><th>Ledger Account</th><th>Rate %</th><th>Amount</th><th colspan=2></th><th colspan=2>Cur Balance</th></tr></thead>";
foreach ($ledger_dc as $i => $ledger) {
Example #3
0
<?php

if (!$print_preview) {
    echo form_open('report/inventory_statement/' . $inventory_item_id);
    echo "<p>";
    echo form_input_inventory_item('inventory_item_id', $inventory_item_id);
    echo " ";
    echo form_submit('submit', 'Show');
    echo "</p>";
    echo form_close();
}
/* Pagination configuration */
if (!$print_preview) {
    $pagination_counter = $this->config->item('row_count');
    $page_count = (int) $this->uri->segment(4);
    $page_count = $this->input->xss_clean($page_count);
    if (!$page_count) {
        $page_count = "0";
    }
    $config['base_url'] = site_url('report/inventory_statement/' . $inventory_item_id);
    $config['num_links'] = 10;
    $config['per_page'] = $pagination_counter;
    $config['uri_segment'] = 4;
    $config['total_rows'] = (int) $this->db->from('inventory_entry_items')->where('inventory_item_id', $inventory_item_id)->count_all_results();
    $config['full_tag_open'] = '<ul id="pagination-flickr">';
    $config['full_close_open'] = '</ul>';
    $config['num_tag_open'] = '<li>';
    $config['num_tag_close'] = '</li>';
    $config['cur_tag_open'] = '<li class="active">';
    $config['cur_tag_close'] = '</li>';
    $config['next_link'] = 'Next &#187;';