Attached Files | createCashManagmentUtility.diff [^] (18,425 bytes) 2016-01-07 22:46 [Show Content] [Hide Content]diff -r 206aa790731b src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/sourcedata/AD_MESSAGE.xml Tue Jan 05 11:55:01 2016 +0530
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml Thu Jan 07 21:34:16 2016 +0100
@@ -72,6 +72,19 @@
<!--01B4879EFBE643A198B841F9B0AD3385--> <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
<!--01B4879EFBE643A198B841F9B0AD3385--></AD_MESSAGE>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--><AD_MESSAGE>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--> <AD_MESSAGE_ID><![CDATA[01BFC6DE3AD34A62B13FD1F3F2CA5580]]></AD_MESSAGE_ID>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--> <VALUE><![CDATA[OBPOS_CashManagmentNoSync]]></VALUE>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--> <MSGTEXT><![CDATA[Cash management event has not been synchronized. It will be synchronized during the next synchronization process
+]]></MSGTEXT>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--> <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--> <AD_MODULE_ID><![CDATA[FF808181326CC34901326D53DBCF0018]]></AD_MODULE_ID>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--> <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--01BFC6DE3AD34A62B13FD1F3F2CA5580--></AD_MESSAGE>
+
<!--0203613AEC064948948A14C2F6A07983--><AD_MESSAGE>
<!--0203613AEC064948948A14C2F6A07983--> <AD_MESSAGE_ID><![CDATA[0203613AEC064948948A14C2F6A07983]]></AD_MESSAGE_ID>
<!--0203613AEC064948948A14C2F6A07983--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -5355,6 +5368,18 @@
<!--D06BACE651704E4BA8A5E210DF833EB9--> <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
<!--D06BACE651704E4BA8A5E210DF833EB9--></AD_MESSAGE>
+<!--D113D75007144A299A398C27E140E00D--><AD_MESSAGE>
+<!--D113D75007144A299A398C27E140E00D--> <AD_MESSAGE_ID><![CDATA[D113D75007144A299A398C27E140E00D]]></AD_MESSAGE_ID>
+<!--D113D75007144A299A398C27E140E00D--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D113D75007144A299A398C27E140E00D--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D113D75007144A299A398C27E140E00D--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D113D75007144A299A398C27E140E00D--> <VALUE><![CDATA[OBPOS_NoPermissionToPrintCashManagment]]></VALUE>
+<!--D113D75007144A299A398C27E140E00D--> <MSGTEXT><![CDATA[Cash management transaction ticket has not been printed. Permission needed (OBPOS_print.cashmanagement)]]></MSGTEXT>
+<!--D113D75007144A299A398C27E140E00D--> <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--D113D75007144A299A398C27E140E00D--> <AD_MODULE_ID><![CDATA[FF808181326CC34901326D53DBCF0018]]></AD_MODULE_ID>
+<!--D113D75007144A299A398C27E140E00D--> <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--D113D75007144A299A398C27E140E00D--></AD_MESSAGE>
+
<!--D135F503B3664D25A72A21D770422FA6--><AD_MESSAGE>
<!--D135F503B3664D25A72A21D770422FA6--> <AD_MESSAGE_ID><![CDATA[D135F503B3664D25A72A21D770422FA6]]></AD_MESSAGE_ID>
<!--D135F503B3664D25A72A21D770422FA6--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff -r 206aa790731b src/org/openbravo/retail/posterminal/OBPOSComponentProvider.java
--- a/src/org/openbravo/retail/posterminal/OBPOSComponentProvider.java Tue Jan 05 11:55:01 2016 +0530
+++ b/src/org/openbravo/retail/posterminal/OBPOSComponentProvider.java Thu Jan 07 21:34:16 2016 +0100
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2013-2015 Openbravo SLU
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -127,6 +127,7 @@
// Web POS window
"utils/eventbus",
"utils/cashUpReportUtils",
+ "utils/cashManagementUtils",
"components/keypadcoins",
"data/dataordersave",
"data/dataordertaxes",
diff -r 206aa790731b src/org/openbravo/retail/posterminal/term/CashMgmtDepositEvents.java
--- a/src/org/openbravo/retail/posterminal/term/CashMgmtDepositEvents.java Tue Jan 05 11:55:01 2016 +0530
+++ b/src/org/openbravo/retail/posterminal/term/CashMgmtDepositEvents.java Thu Jan 07 21:34:16 2016 +0100
@@ -1,6 +1,6 @@
/*
************************************************************************************
- * Copyright (C) 2012-2015 Openbravo S.L.U.
+ * Copyright (C) 2012-2016 Openbravo S.L.U.
* Licensed under the Openbravo Commercial License version 1.0
* You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
* or in the legal folder of this module distribution.
@@ -19,7 +19,7 @@
@Override
protected List<String> getQuery(JSONObject jsonsent) throws JSONException {
return Arrays
- .asList(new String[] { "select c.id as id, c.name as name, c.paymentMethod.id as paymentmethod from OBRETCO_CashManagementEvents c "
+ .asList(new String[] { "select c.id as id, c.name as name, c.paymentMethod.id as paymentmethod, 'deposit' as type from OBRETCO_CashManagementEvents c "
+ "where c.$naturalOrgCriteria and c.eventtype like '%IN%' order by c.name " });
}
diff -r 206aa790731b src/org/openbravo/retail/posterminal/term/CashMgmtDropEvents.java
--- a/src/org/openbravo/retail/posterminal/term/CashMgmtDropEvents.java Tue Jan 05 11:55:01 2016 +0530
+++ b/src/org/openbravo/retail/posterminal/term/CashMgmtDropEvents.java Thu Jan 07 21:34:16 2016 +0100
@@ -1,6 +1,6 @@
/*
************************************************************************************
- * Copyright (C) 2012-2015 Openbravo S.L.U.
+ * Copyright (C) 2012-2016 Openbravo S.L.U.
* Licensed under the Openbravo Commercial License version 1.0
* You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
* or in the legal folder of this module distribution.
@@ -19,7 +19,7 @@
@Override
protected List<String> getQuery(JSONObject jsonsent) throws JSONException {
return Arrays
- .asList(new String[] { "select c.id as id, c.name as name, c.paymentMethod.id as paymentmethod from OBRETCO_CashManagementEvents c "
+ .asList(new String[] { "select c.id as id, c.name as name, c.paymentMethod.id as paymentmethod, 'drop' as type from OBRETCO_CashManagementEvents c "
+ "where c.$naturalOrgCriteria and c.eventtype like '%OUT%' order by c.name " });
}
diff -r 206aa790731b web/org.openbravo.retail.posterminal/js/utils/cashManagementUtils.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/org.openbravo.retail.posterminal/js/utils/cashManagementUtils.js Thu Jan 07 21:34:16 2016 +0100
@@ -0,0 +1,225 @@
+/*
+ ************************************************************************************
+ * Copyright (C) 2016 Openbravo S.L.U.
+ * Licensed under the Openbravo Commercial License version 1.0
+ * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
+ * or in the legal folder of this module distribution.
+ ************************************************************************************
+ */
+
+/*global Backbone,_*/
+
+(function () {
+
+ OB = window.OB || {};
+ OB.UTILS = window.OB.UTILS || {};
+ OB.UTILS.CashManagementUtils = window.OB.UTILS.CashManagementUtils || {};
+
+ OB.UTILS.CashManagementUtils.addCashManagementTransaction = function (newCashManagementTransaction, successCallback, errorCallback, options) {
+ //Doc:
+ //newCashMangmentTransaction is a backbone model which includes the following fields
+ //amount -> the amount to be drop or deposited.
+ //cashManagementEvent -> An item from OB.MobileApp.model.get('cashMgmtDropEvents') or OB.MobileApp.model.get('cashMgmtDepEvents')
+ // including type = drop or deposit
+ //paymentMethod -> An item from OB.MobileApp.model.get('payments') which will be used to drop or deposit the amount.
+ var cashUp = null;
+ var paymentMethodCashUp = null;
+ var warns = [];
+ var errors = [];
+ var cashManagementTransactionToAdd = null;
+ var optionsObj = {};
+ var printCashManagementModel = null;
+
+ var availableAmountToDrop, startingAmt, salesAmt, returnsAmt, totalDrops, totalDeposits;
+ //Manage default values
+ if (options && !OB.UTIL.isNullOrUndefined(options.printTicket)) {
+ optionsObj.printTicket = options.printTicket;
+ } else {
+ optionsObj.printTicket = true;
+ }
+ if (options && !OB.UTIL.isNullOrUndefined(options.ticketTemplate)) {
+ optionsObj.ticketTemplate = options.ticketTemplate;
+ } else {
+ optionsObj.ticketTemplate = new OB.OBPOSCashMgmt.Print.CashMgmt();
+ }
+ if (options && !OB.UTIL.isNullOrUndefined(options.executeSync)) {
+ optionsObj.executeSync = options.executeSync;
+ } else {
+ optionsObj.executeSync = true;
+ }
+
+ if (options && !OB.UTIL.isNullOrUndefined(options.customGLItem)) {
+ optionsObj.glItem = options.customGLItem;
+ } else {
+ if (newCashManagementTransaction.get('cashManagementEvent').type === 'drop') {
+ optionsObj.glItem = newCashManagementTransaction.get('paymentMethod').paymentMethod.gLItemForDrops;
+ } else if (newCashManagementTransaction.get('cashManagementEvent').type === 'deposit') {
+ optionsObj.glItem = newCashManagementTransaction.get('paymentMethod').paymentMethod.gLItemForDeposits;
+ } else {
+ errorCallback('Error getting the G/L item to create a cash managment');
+ return;
+ }
+ }
+
+ //execute cash management event
+ //1st load current cash up
+ OB.Dal.find(OB.Model.CashUp, {
+ 'isprocessed': 'N'
+ }, function (cashUpResults) {
+ if (cashUpResults.length !== 1) {
+ errorCallback("Zero or more than one cash ups found.");
+ return;
+ } else {
+ cashUp = cashUpResults.at(0);
+
+ //validate
+ if (newCashManagementTransaction.get('cashManagementEvent').type === 'drop' && !newCashManagementTransaction.get('paymentMethod').paymentMethod.allowdrops) {
+ errorCallback('Current payment method doesn\'t allow drops');
+ } else if (newCashManagementTransaction.get('cashManagementEvent').type === 'deposit' && !newCashManagementTransaction.get('paymentMethod').paymentMethod.allowdeposits) {
+ errorCallback('Current payment method doesn\'t allow deposits');
+ return;
+ } else if (newCashManagementTransaction.get('cashManagementEvent').type !== 'deposit' && newCashManagementTransaction.get('cashManagementEvent').type !== 'drop') {
+ errorCallback('Cash Managment event type is not valid.');
+ return;
+ }
+ //calculate available cash taking into account starting cash, sales, return, cashMgm Drops and CashMgm Deposits
+ OB.UTIL.calculateCurrentCash(function () {
+ if (newCashManagementTransaction.get('cashManagementEvent').type === 'drop') {
+ if (OB.DEC.sub(newCashManagementTransaction.get('paymentMethod').currentCash, newCashManagementTransaction.get('amount')) < 0) {
+ errorCallback('Amount to drop is greater than available amount (' + OB.I18N.formatCurrency(newCashManagementTransaction.get('paymentMethod').currentCash) + ')');
+ return;
+ }
+ }
+
+ var criteria = {
+ 'cashup_id': cashUp.id,
+ 'paymentmethod_id': newCashManagementTransaction.get('paymentMethod').payment.id
+ };
+
+ OB.Dal.find(OB.Model.PaymentMethodCashUp, criteria, function (paymentMethods) {
+ var paymentMethod = paymentMethods.at(0),
+ totalDrops = paymentMethod.get('totalDrops'),
+ totalDeposits = paymentMethod.get('totalDeposits');
+ if (newCashManagementTransaction.get('cashManagementEvent').type === 'deposit') {
+ totalDeposits = OB.DEC.add(totalDeposits, newCashManagementTransaction.get('amount'));
+ paymentMethod.set('totalDeposits', totalDeposits);
+ } else {
+ totalDrops = OB.DEC.add(totalDrops, newCashManagementTransaction.get('amount'));
+ paymentMethod.set('totalDrops', totalDrops);
+ }
+ OB.Dal.transaction(function (tx) {
+ OB.Dal.saveInTransaction(tx, paymentMethod, function () {
+ cashManagementTransactionToAdd = new OB.Model.CashManagement({
+ id: OB.Dal.get_uuid(),
+ description: newCashManagementTransaction.get('paymentMethod').payment._identifier + ' - ' + newCashManagementTransaction.get('cashManagementEvent').name,
+ amount: newCashManagementTransaction.get('amount'),
+ origAmount: OB.DEC.mul(newCashManagementTransaction.get('amount'), newCashManagementTransaction.get('paymentMethod').rate),
+ type: newCashManagementTransaction.get('cashManagementEvent').type,
+ reasonId: newCashManagementTransaction.get('cashManagementEvent').id,
+ paymentMethodId: newCashManagementTransaction.get('paymentMethod').payment.id,
+ user: OB.MobileApp.model.get('context').user._identifier,
+ userId: OB.MobileApp.model.get('context').user.id,
+ time: new Date().toString().substring(16, 21),
+ isocode: newCashManagementTransaction.get('paymentMethod').isocode,
+ glItem: optionsObj.glItem,
+ cashup_id: cashUp.get('id'),
+ isbeingprocessed: 'N'
+ });
+
+ OB.UTIL.HookManager.executeHooks('OBPOS_cashManagementTransactionHook', {
+ newCashManagementTransaction: newCashManagementTransaction,
+ cashManagementTransactionToAdd: cashManagementTransactionToAdd
+ }, function (args) {
+ if (args && args.cancelOperation) {
+ errorCallback(args.errorMessage);
+ }
+ OB.Dal.saveInTransaction(tx, cashManagementTransactionToAdd, function () {
+ if (optionsObj.executeSync) {
+ OB.MobileApp.model.runSyncProcess(function () {
+ if (optionsObj.printTicket) {
+ if (OB.MobileApp.model.hasPermission('OBPOS_print.cashmanagement')) {
+ var toPrint = new Backbone.Collection();
+ toPrint.add(cashManagementTransactionToAdd);
+ printCashManagementModel = optionsObj.ticketTemplate;
+ printCashManagementModel.print(toPrint.toJSON());
+ successCallback();
+ } else {
+ warns.push({
+ msg: OB.I18N.getLabel('OBPOS_NoPermissionToPrintCashManagment'),
+ errObj: {}
+ });
+ successCallback({
+ warnings: warns
+ });
+ }
+ } else {
+ successCallback();
+ }
+ }, function (error) {
+ warns.push({
+ msg: OB.I18N.getLabel('OBPOS_CashManagmentNoSync'),
+ errObj: error
+ });
+ if (optionsObj.printTicket) {
+ if (OB.MobileApp.model.hasPermission('OBPOS_print.cashmanagement')) {
+ var toPrint = new Backbone.Collection();
+ toPrint.add(cashManagementTransactionToAdd);
+ printCashManagementModel = optionsObj.ticketTemplate;
+ printCashManagementModel.print(toPrint.toJSON());
+ successCallback();
+ } else {
+ warns.push({
+ msg: OB.I18N.getLabel('OBPOS_NoPermissionToPrintCashManagment'),
+ errObj: {}
+ });
+ successCallback({
+ warnings: warns
+ });
+ }
+ } else {
+ successCallback();
+ }
+ });
+ } else {
+ if (optionsObj.printTicket) {
+ if (OB.MobileApp.model.hasPermission('OBPOS_print.cashmanagement')) {
+ var toPrint = new Backbone.Collection();
+ toPrint.add(cashManagementTransactionToAdd);
+ printCashManagementModel = optionsObj.ticketTemplate;
+ printCashManagementModel.print(toPrint.toJSON());
+ successCallback();
+ } else {
+ warns.push({
+ msg: OB.I18N.getLabel('OBPOS_NoPermissionToPrintCashManagment'),
+ errObj: {}
+ });
+ successCallback({
+ warnings: warns
+ });
+ }
+ } else {
+ successCallback();
+ }
+ }
+ }, function (error) {
+ errorCallback('Error while saving cash management transaction');
+ }, true);
+ });
+ }, function () {
+ errorCallback('Error while saving payment method cashup information');
+ });
+ }, function () {
+ errorCallback('Transaction has failed');
+ });
+ }, function () {
+ errorCallback("Error while retrieving paymentMethodCashup info");
+ });
+ }, null);
+ }
+ }, function () {
+ errorCallback("Error while retrieving current cash up info");
+ return;
+ }, null);
+ };
+
+}());
\ No newline at end of file
createCashManagmentUtility_sessions.diff [^] (6,102 bytes) 2016-01-07 22:47 [Show Content] [Hide Content]diff -r 8ccd4a8fd4af web/org.openbravo.retail.sessions/js/countcash/countcash-model.js
--- a/web/org.openbravo.retail.sessions/js/countcash/countcash-model.js Thu Dec 10 16:03:36 2015 +0100
+++ b/web/org.openbravo.retail.sessions/js/countcash/countcash-model.js Thu Jan 07 21:34:10 2016 +0100
@@ -1,6 +1,6 @@
/*
************************************************************************************
- * Copyright (C) 2012-2015 Openbravo S.L.U.
+ * Copyright (C) 2012-2016 Openbravo S.L.U.
* Licensed under the Openbravo Commercial License version 1.0
* You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
* or in the legal folder of this module distribution.
@@ -265,11 +265,7 @@
return countCashSummary;
},
processAndFinishCashCount: function () {
-
- if (this.get('finished') || this.get('finishedWrongly')) {
- return; // Do not execute the process again if finished.
- }
-
+ var cashManagmentTransactionModel = new Backbone.Model();
var objToSend = {
terminalId: OB.POS.modelterminal.get('terminal').id,
bdSessions: [{
@@ -279,51 +275,86 @@
},
server = new OB.DS.Process('org.openbravo.retail.sessions.OpenSessionPOS'),
me = this;
+ var paymentMethod = OB.POS.terminal.terminal.paymentnames[OB.MobileApp.model.get('paymentcash')];
- var paymentMethod = OB.POS.terminal.terminal.paymentnames[OB.MobileApp.model.get('paymentcash')];
- if (this.get('totalDifference') !== 0) {
- var cashMgmt = new OB.Model.CashManagement({
- id: OB.Dal.get_uuid(),
- description: paymentMethod.payment._identifier + ' - Till differences',
- amount: OB.DEC.abs(this.get('totalDifference')),
- origAmount: OB.DEC.mul(OB.DEC.abs(this.get('totalDifference')), paymentMethod.rate),
- type: this.get('totalDifference') > 0 ? 'deposit' : 'drop',
- reasonId: null,
- paymentMethodId: paymentMethod.payment.id,
- user: OB.POS.modelterminal.get('context').user._identifier,
- userId: OB.POS.modelterminal.get('context').user.id,
- time: new Date().toString().substring(16, 21),
- isocode: paymentMethod.isocode,
- cashup_id: OB.MobileApp.model.get('terminal').cashUpId,
- glItem: paymentMethod.paymentMethod.possGlitemTilldiff,
- isbeingprocessed: 'N'
- });
- OB.Dal.save(cashMgmt, null, null, true);
+ if (this.get('finished') || this.get('finishedWrongly')) {
+ return; // Do not execute the process again if finished.
}
- this.set('cashcountSent', true);
- OB.UTIL.showLoading(true);
+ if (this.get('totalDifference') !== 0) {
+ cashManagmentTransactionModel.set('amount', OB.DEC.abs(this.get('totalDifference')));
+ cashManagmentTransactionModel.set('paymentMethod', paymentMethod);
+ cashManagmentTransactionModel.set('cashManagementEvent', {
+ id: null,
+ type: this.get('totalDifference') > 0 ? 'deposit' : 'drop',
+ name: 'Till differences'
+ });
+ OB.UTIL.showLoading(true);
+ OB.UTILS.CashManagementUtils.addCashManagementTransaction(cashManagmentTransactionModel, function (result) {
+ //Success
+ if (result && result.warnings && result.warnings.length > 0) {
+ _.each(result.warnings, function (warn, index) {
+ if (warn && warn.msg) {
+ OB.warn(warn.msg);
+ }
+ });
+ }
- // Set Session as Open.
- OB.MobileApp.model.get('terminal').poss_session = true;
- window.localStorage.setItem('poss_sessionactive', JSON.stringify({
- isActive: true,
- code: objToSend.bdSessions[0].code
- }));
+ me.set('cashcountSent', true);
+ // Set Session as Open.
+ OB.MobileApp.model.get('terminal').poss_session = true;
+ window.localStorage.setItem('poss_sessionactive', JSON.stringify({
+ isActive: true,
+ code: objToSend.bdSessions[0].code
+ }));
+ //ready to send to the server
+ server.exec(objToSend, function (data) {
+ me.set('cashcountSent', false);
+ if (data.error || data.exception) {
+ me.addToPendingSessions(objToSend.bdSessions[0]);
+ }
+ OB.UTIL.showLoading(false);
+ me.set("finished", true);
+ }, function () {
+ me.addToPendingSessions(objToSend.bdSessions[0]);
+ OB.UTIL.showLoading(false);
+ me.set("finished", true);
+ });
+ }, function (errorMsg) {
+ //error
+ OB.UTIL.showLoading(false);
+ OB.UTIL.showConfirmation.display('Error', e);
+ me.set("finished", true);
+ }, {
+ //options
+ customGLItem: paymentMethod.paymentMethod.possGlitemTilldiff,
+ printTicket: false
+ });
+ } else {
+ this.set('cashcountSent', true);
+ OB.UTIL.showLoading(true);
- //ready to send to the server
- server.exec(objToSend, function (data) {
- me.set('cashcountSent', false);
- if (data.error || data.exception) {
+ // Set Session as Open.
+ OB.MobileApp.model.get('terminal').poss_session = true;
+ window.localStorage.setItem('poss_sessionactive', JSON.stringify({
+ isActive: true,
+ code: objToSend.bdSessions[0].code
+ }));
+
+ //ready to send to the server
+ server.exec(objToSend, function (data) {
+ me.set('cashcountSent', false);
+ if (data.error || data.exception) {
+ me.addToPendingSessions(objToSend.bdSessions[0]);
+ }
+ OB.UTIL.showLoading(false);
+ me.set("finished", true);
+ }, function () {
me.addToPendingSessions(objToSend.bdSessions[0]);
- }
- OB.UTIL.showLoading(false);
- me.set("finished", true);
- }, function () {
- me.addToPendingSessions(objToSend.bdSessions[0]);
- OB.UTIL.showLoading(false);
- me.set("finished", true);
- });
+ OB.UTIL.showLoading(false);
+ me.set("finished", true);
+ });
+ }
},
addToPendingSessions: function (session) {
var pendingSessions;
|