<?php



function view_dashboard_inventory_movement_type_details($trans_type, $move_type_id, $from_date, $to_date) {
    
    switch ($trans_type) {
        case ST_DAILY_ITEM_ISSUE:
        case ST_DAILY_ITEM_RETURN:
            $sql = dashboard_get_sql_for_inventory_daily_item_issues_movement_types($from_date, $to_date, $move_type_id);
            break;
        case ST_PR_ISSUE:
            $sql = dashboard_get_sql_for_inventory_pr_issue_movement_types($from_date, $to_date, $move_type_id);
            break;
        case ST_PR_RETURN:
            $sql = dashboard_get_sql_for_inventory_pr_return_movement_types($from_date, $to_date, $move_type_id);
            break;
        case ST_MATERIAL_ISSUE:
            $sql = dashboard_get_sql_for_inventory_mr_issue_movement_types($from_date, $to_date, $move_type_id);
            break;
        case ST_MATERIAL_RETURN:
            $sql = dashboard_get_sql_for_inventory_mr_return_movement_types($from_date, $to_date, $move_type_id);
            break;

        default:
            $sql = "";
            break;
    }

    return db_query($sql, "view_dashboard_inventory_movement_type_details");  
                
}