hotfix viewReceipt clientBalance
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-01-27 08:31:14 +01:00
parent c04185aadd
commit fccfabdcd1
2 changed files with 1 additions and 2 deletions

View File

@ -4,7 +4,6 @@ import Dialog from 'core/components/dialog';
class Controller extends Dialog {
constructor($element, $, $transclude, vnReport) {
super($element, $, $transclude);
this.viewReceipt = true;
this.vnReport = vnReport;
this.receipt = {};
}
@ -59,6 +58,7 @@ class Controller extends Dialog {
if (value) {
const accountingType = value.accountingType;
this.viewReceipt = accountingType.code == 'cash';
if (this.originalDescription) {
this.receipt.description =
`${accountingType && accountingType.receiptDescription}, ${this.originalDescription}`;

View File

@ -75,7 +75,6 @@ describe('Client', () => {
jest.spyOn(controller.vnReport, 'show');
controller.$params = {id: 1101};
controller.viewReceipt = false;
$httpBackend.expect('POST', `Clients/1101/createReceipt`).respond({id: 1});
controller.responseHandler('accept');