<?php

function get_asset_depreciation_inquiry($asset_run_id, $asset_id) {
    $sql = "SELECT *                  
            FROM ".TB_PREF."processed_asset_depreciation_details 
            WHERE 1 = 1";

    if ($asset_run_id > 0) {
        $sql .= " AND asset_run_id = ".db_escape($asset_run_id);
    }
    
    if ($asset_id > 0) {
        $sql .= " AND asset_id = ".db_escape($asset_id);
    }
    
    $sql .= " ORDER BY processed_on";

    return db_query($sql, 'get_asset_depreciation_inquiry');
}

?>