fixes #5074 ticket balance pone null #1308
|
@ -59,11 +59,14 @@ class Controller extends Dialog {
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
const accountingType = value.accountingType;
|
const accountingType = value.accountingType;
|
||||||
if (accountingType.receiptDescription != null) {
|
|
||||||
this.receipt.description = accountingType.receiptDescription;
|
this.receipt.description = [];
|
||||||
if (this.originalDescription) this.receipt.description += `, ${this.originalDescription}`;
|
if (accountingType.receiptDescription != null && accountingType.receiptDescription != '')
|
||||||
} else if (this.originalDescription)
|
this.receipt.description.push(accountingType.receiptDescription);
|
||||||
this.receipt.description = this.originalDescription;
|
if (this.originalDescription)
|
||||||
|
this.receipt.description.push(this.originalDescription);
|
||||||
|
this.receipt.description.join(', ');
|
||||||
|
|
||||||
this.maxAmount = accountingType && accountingType.maxAmount;
|
this.maxAmount = accountingType && accountingType.maxAmount;
|
||||||
|
|
||||||
this.receipt.payed = Date.vnNew();
|
this.receipt.payed = Date.vnNew();
|
||||||
|
|
|
@ -38,7 +38,7 @@ describe('Client', () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(controller.receipt.description).toEqual('Cash, Albaran: 1, 2');
|
expect(controller.receipt.description.join(',')).toEqual('Cash,Albaran: 1, 2');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue