fixes #5074 ticket balance pone null #1308
|
@ -59,11 +59,14 @@ class Controller extends Dialog {
|
|||
|
||||
if (value) {
|
||||
const accountingType = value.accountingType;
|
||||
if (accountingType.receiptDescription != null) {
|
||||
this.receipt.description = accountingType.receiptDescription;
|
||||
if (this.originalDescription) this.receipt.description += `, ${this.originalDescription}`;
|
||||
} else if (this.originalDescription)
|
||||
this.receipt.description = this.originalDescription;
|
||||
|
||||
this.receipt.description = [];
|
||||
if (accountingType.receiptDescription != null && accountingType.receiptDescription != '')
|
||||
this.receipt.description.push(accountingType.receiptDescription);
|
||||
if (this.originalDescription)
|
||||
this.receipt.description.push(this.originalDescription);
|
||||
this.receipt.description.join(', ');
|
||||
|
||||
this.maxAmount = accountingType && accountingType.maxAmount;
|
||||
|
||||
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