Skip to content

Commit

Permalink
fixed bug with payments, these are working as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Walsh committed Feb 17, 2017
1 parent 12a6070 commit 72546b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions lib/entities/payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var Payment = Entity.extend(PaymentSchema, {
return this.application.js2xml(payment, 'Payment');
},
save: function(options) {
var self = this;
var xml = '<Payments>' + this.toXml() + '</Payments>';
var path, method;
if (this.PaymentID) {
Expand Down
1 change: 1 addition & 0 deletions lib/entities/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var User = Entity.extend(UserSchema, {
return this.application.js2xml(user, 'User');
},
save: function(options) {
var self = this;
var xml = '<Users>' + this.toXml() + '</Users>';
var path, method;
if (this.UserID) {
Expand Down
9 changes: 4 additions & 5 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ describe('private application', function() {
})
})

describe.skip('accounts', function() {
describe('accounts', function() {

//Accounts supporting data
var accountClasses = ["ASSET", "EQUITY", "EXPENSE", "LIABILITY", "REVENUE"];
var accountTypes = ["BANK", "CURRENT", "CURRLIAB", "DEPRECIATN", "DIRECTCOSTS", "EQUITY", "EXPENSE", "FIXED", "INVENTORY", "LIABILITY", "NONCURRENT", "OTHERINCOME", "OVERHEADS", "PREPAYMENT", "REVENUE", "SALES", "TERMLIAB", "PAYGLIABILITY", "SUPERANNUATIONEXPENSE", "SUPERANNUATIONLIABILITY", "WAGESEXPENSE", "WAGESPAYABLELIABILITY"];
var accountStatusCodes = ["ACTIVE", "ARCHIVED"];
var bankAccountTypes = ["BANK", "CREDITCARD", "PAYPAL"];

it.skip('GET ALL', function(done) {
it('GET ALL', function(done) {
this.timeout(10000);
currentApp.core.accounts.getAccounts()
.then(function(accounts) {
Expand Down Expand Up @@ -346,7 +346,7 @@ describe('private application', function() {
*/

describe('payments', function() {
this.timeout(20000);
this.timeout(1020000);
it('Create Payment', function(done) {

var payment = currentApp.core.payments.createPayment({
Expand All @@ -357,8 +357,7 @@ describe('private application', function() {
Code: '090'
},
Date: new Date().toISOString().split("T")[0],
Amount: '660',
IsReconciled: true
Amount: '660'
});

payment.save()
Expand Down

0 comments on commit 72546b9

Please sign in to comment.