This commit is contained in:
parent
41c20d977c
commit
417dc511f5
|
@ -87,11 +87,11 @@ describe('Client balance path', () => {
|
|||
expect(result).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should check balance is now 100', async() => {
|
||||
it('should check balance is now -100', async() => {
|
||||
let result = await nightmare
|
||||
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
||||
|
||||
expect(result).toContain('100.00');
|
||||
expect(result).toContain('-€100.00');
|
||||
});
|
||||
|
||||
it('should again click the new payment button', async() => {
|
||||
|
@ -107,18 +107,17 @@ describe('Client balance path', () => {
|
|||
let result = await nightmare
|
||||
.clearInput(selectors.clientBalance.newPaymentAmountInput)
|
||||
.write(selectors.clientBalance.newPaymentAmountInput, '-150')
|
||||
.wait(1999)
|
||||
.waitToClick(selectors.clientBalance.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should check balance is now -50', async() => {
|
||||
it('should check balance is now 50', async() => {
|
||||
let result = await nightmare
|
||||
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
||||
|
||||
expect(result).toContain('€50.00');
|
||||
expect(result).toContain('50');
|
||||
});
|
||||
|
||||
it('should now click on the Clients button of the top bar menu', async() => {
|
||||
|
|
|
@ -46,7 +46,7 @@ export default class InputNumber extends Input {
|
|||
set value(value) {
|
||||
this.hasValue = !(value === null || value === undefined || value === '');
|
||||
|
||||
if (!this.hasOwnProperty('_value') && this.hasValue)
|
||||
if (!this.hasOwnProperty('_value') && this.hasValue || value === '')
|
||||
this.input.value = value;
|
||||
|
||||
this._value = value;
|
||||
|
|
|
@ -55,6 +55,7 @@ module.exports = Self => {
|
|||
i.id,
|
||||
TRUE,
|
||||
i.issued,
|
||||
NULL,
|
||||
c.code,
|
||||
i.created,
|
||||
i.ref,
|
||||
|
@ -62,7 +63,6 @@ module.exports = Self => {
|
|||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
i.clientFk,
|
||||
i.pdf,
|
||||
TRUE isInvoice
|
||||
|
|
|
@ -32,6 +32,7 @@ class Controller {
|
|||
setOrder(value) {
|
||||
this.params.params.companyFk = value;
|
||||
this.filter.where.companyFk = value;
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
refresh() {
|
||||
|
|
Loading…
Reference in New Issue