Updated var names
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-03-04 11:17:35 +01:00
parent 2f511d1718
commit 46f04fa802
2 changed files with 4 additions and 3 deletions

View File

@ -7,8 +7,8 @@ export default class Controller extends Component {
delete this.client.despiteOfClient;
const hasContactData = this.client.email || this.client.phone || this.client.mobile;
const isDataChecked = !orgData.isTaxDataChecked && this.client.isTaxDataChecked;
if (isDataChecked && hasContactData)
const hasChangedTaxData = !orgData.isTaxDataChecked && this.client.isTaxDataChecked;
if (hasChangedTaxData && hasContactData)
this.checkExistingClient();
else this.save();
}

View File

@ -3,6 +3,7 @@ const app = require('vn-loopback/server/server');
describe('ticket makeInvoice()', () => {
let invoice;
let ticketId = 11;
const okState = 3;
afterAll(async done => {
let ticket = await app.models.Ticket.findById(11);
@ -11,7 +12,7 @@ describe('ticket makeInvoice()', () => {
let ticketTrackings = await app.models.TicketTracking.find({
where: {
ticketFk: ticketId,
stateFk: {neq: 3}
stateFk: {neq: okState}
},
order: 'id DESC'
});