<?php
/**********************************************************************
***********************************************************************/

 

function display_stock_item_file_data()
{    
    start_table(TABLESTYLE, "width=60%");    
    $th = array("ID", "Stock Count No", "Stock Count Sheet No", "Item Code",
                    "Units of Measure", "Quantity", "Damaged", "Message" );                  

    table_header($th);
    
    $result = get_stock_count_data();
     
    $k = 0;
    
    while($row = db_fetch($result)){

        alt_table_row_color($k);
        
        label_cell($row['id']);
        label_cell($row['stock_count_no']);
        label_cell($row['sheet_no']);
        label_cell($row['stock_id']);
        label_cell($row['unit_name'], "align=center");
        label_cell($row['good_qty']);
        label_cell($row['damaged_qty']);
        label_cell($row['message']);
     
        end_row();
    }
  
    end_table();
}


function read_stock_count_details_import_file_data(&$file_data, $line)
{
    $stock_count_no = str_replace('"', '', $line[0]);
    $stock_count_sheet_no = str_replace('"', '', $line[1]);
    $item_code = str_replace('"', '', $line[2]);                    
    $units_of_measure = str_replace('"', '', $line[3]);
    $quantity = str_replace('"', '', $line[4]);
    $damaged = str_replace('"', '', $line[5]);
    $message = str_replace('"', '', $line[6]);        
   
    
    save_stock_count_details($stock_count_no, $stock_count_sheet_no, $item_code,
                            $units_of_measure, $quantity, $damaged, $message);

}



?>
