//Stock Location Combo
Ext.define("App.view.OrderCombo", {
    extend: "Ext.form.field.ComboBox",
    alias: "widget.orderCombo",
    minChars: 2,
    queryMode: 'remote',
    fieldLabel: App.localeRes("Order"),
    name: "order",
    displayField: "orderNo",
    valueField: "id",
    editable: true,
    forceSelection:true,
    autoSelect: true,
    autoSelectLast: false,
    tpl: '<tpl for="."><div class="x-boundlist-item">{orderNo} - {customerName}</div></tpl>',
    displayTpl: '<tpl for=".">{orderNo} - {customerName}</tpl>',

    initComponent: function() {
        var me = this;
        if (!me.store)
            me.store = Ext.create("App.store.OrderComboStore", {
                extraParams: me.params
            });

        me.callParent();
    }
});
