diff --git a/apps/myaccount/i18n/en-US.json b/apps/myaccount/i18n/en-US.json index dfa888bfc..baebeecf8 100644 --- a/apps/myaccount/i18n/en-US.json +++ b/apps/myaccount/i18n/en-US.json @@ -199,6 +199,37 @@ "admin_discretion": "Admin Discretion", "__comment": "UI-383: Fixing transactions for good", "__version": "v3.20_s0", - "unknown": "Charge" + "unknown": "Charge", + "__comment": "UI-1014: Redesign of MyAccount", + "__version": "v3.20_s1", + "startDate": "Start Date", + "endDate": "End Date", + "total": "Total", + + "__comment": "UI-1248: Work on transactions to fix the way they're displayed", + "__version": "3.19", + "codes": { + "1001": "Per Minute Call", + "1002": "Sub-Account Per Minute Call", + "2001": "Feature Activation", + "2002": "Sub-Account Feature Activation", + "2003": "Number Activation", + "2004": "Sub-Account Number Activation", + "3001": "Manual Addition", + "3002": "Sub-Account Manual Addition", + "3003": "Auto-Addition", + "3004": "Sub-Account Auto-Addition", + "3005": "Admin Discretion", + "3006": "Top Up", + "4000": "Balance Carry-over", + "5000": "Recurring", + "5001": "Monthly Recurring", + "5002": "Monthly Recurring (Pro-rated)", + "9999": "Unknown" + }, + "errorStatuses": { + "voided": "Voided", + "declined": "Declined" + } } } diff --git a/apps/myaccount/submodules/transactions/transactions.js b/apps/myaccount/submodules/transactions/transactions.js index 796d502ab..ab2c1642f 100644 --- a/apps/myaccount/submodules/transactions/transactions.js +++ b/apps/myaccount/submodules/transactions/transactions.js @@ -61,12 +61,6 @@ define(function(require){ return a.created < b.created; }); - if(data.listTransactions) { - $.each(data.listTransactions, function(k, v) { - v.reason = self.i18n.active().transactions[v.reason ? v.reason : 'oneTimeCharge']; - }); - } - return data; }, @@ -95,9 +89,9 @@ define(function(require){ parent.find('.expandable').hide(); - parent.find('.billing-date.start').html(data.billingStartDate); - parent.find('.billing-date.end').html(data.billingEndDate); - parent.find('.total-amount').html(data.amount); + parent.find('.start-date .value').html(data.billingStartDate); + parent.find('.end-date .value').html(data.billingEndDate); + parent.find('.total-amount .value').html(self.i18n.active().currencyUsed + data.amount); }); }); }, @@ -127,32 +121,20 @@ define(function(require){ }; monster.parallel({ - monthly: function(callback) { - self.transactionsGetMonthly(from, to, function(dataMonthly) { - var arrayTransactions = []; - - $.each(dataMonthly.data, function(k, v) { - v = monster.util.formatTransaction(v, false, self); - - if(v.approved) { - defaults.amount += parseFloat(v.amount); - } - }); - - callback(null, arrayTransactions); - }); - }, charges: function(callback) { self.transactionsGetCharges(from, to, function(dataCharges) { var arrayCharges = []; $.each(dataCharges.data, function(k, v) { - v = monster.util.formatTransaction(v, true, self); + // We don't want to display Balance Carry-Over anymore + if(v.code !== 4000) { + v = monster.util.formatTransaction(v, self); - arrayCharges.push(v); + arrayCharges.push(v); - if(v.approved) { - defaults.amount += parseFloat(v.amount); + if(v.approved) { + defaults.amount += parseFloat(v.amount); + } } }); @@ -163,7 +145,7 @@ define(function(require){ function(err, results) { var renderData = defaults; - renderData.listTransactions = (results.charges).concat(results.monthly); + renderData.listTransactions = results.charges; renderData = self.transactionsFormatData(renderData); diff --git a/apps/myaccount/views/transactions-list.html b/apps/myaccount/views/transactions-list.html index 14b5840bb..c7a6b3a2c 100644 --- a/apps/myaccount/views/transactions-list.html +++ b/apps/myaccount/views/transactions-list.html @@ -1,16 +1,17 @@ {{#each listTransactions}}