$(function () {
    console.log('Fire', userName)
    fn_GetRetailers()
})


async function fn_GetRetailers() {
    var res = await fn_GetAsyncCall(`/api/settings/retailers/${userName}/`);
    let html = '<option value="">Select</option>'
    if (res.ok > 0) {
        $.each(res.data, function () {
            html += `<option value="${this.id}">${this.name}</option>`
        })
    }
    else {
        html = `<option value="">${fn_StringfyError(res.error)}</option>`
    }

    $(`#id_retailer`).empty().append(html)

}

