const URL = "/one-api/mockup/supplierpaymentfailed/";

export async function search(prm) {
    try {
        var resp = await axios.post(URL + 'bill/search', prm);
        if (resp.status != 200) {
            return {
                status: "ERR",
                message: resp.statusText
            };
        }
        let data = resp.data;
        return data;
    } catch (e) {
        return {
            status: "ERR",
            message: e.message
        };
    }
}
export async function searchsupplier(prm) {
    try {
        var resp = await axios.post(URL + 'bill/searchsupplier', prm);
        if (resp.status != 200) {
            return {
                status: "ERR",
                message: resp.statusText
            };
        }
        let data = resp.data;
        return data;
    } catch (e) {
        return {
            status: "ERR",
            message: e.message
        };
    }
}

export async function searchinvpayment(prm) {
    try {
        var resp = await axios.post(URL + 'bill/searchinvpayment', prm);
        if (resp.status != 200) {
            return {
                status: "ERR",
                message: resp.statusText
            };
        }
        let data = resp.data;
        return data;
    } catch (e) {
        return {
            status: "ERR",
            message: e.message
        };
    }
}