Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtupleSalesOrderNew.js
index efe93c2..583bf51 100644 (file)
@@ -269,12 +269,11 @@ Pman.Dialog.XtupleSalesOrderNew = {
                                     '_id' : c.cust_cntct_id
                                 },
                                 success : function (res){
-                                    if(res.data[0]){
-                                        for(var i in res.data[0]) {
-                                            data['cohead_billto_cntct_id_' + i] = res.data[0][i];
+                                    if(res.data){
+                                        for(var i in res.data) {
+                                            data['cohead_billto_cntct_id_' + i] = res.data[i];
                                         }
                                      }
-                                     Roo.log(data);
                                      Pman.Dialog.XtupleSalesOrder.show(data, function() {
                                         _this.dialog.hide();
                                         _this.callback()