hotfix viewReceipt clientBalance
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
c04185aadd
commit
fccfabdcd1
|
@ -4,7 +4,6 @@ import Dialog from 'core/components/dialog';
|
||||||
class Controller extends Dialog {
|
class Controller extends Dialog {
|
||||||
constructor($element, $, $transclude, vnReport) {
|
constructor($element, $, $transclude, vnReport) {
|
||||||
super($element, $, $transclude);
|
super($element, $, $transclude);
|
||||||
this.viewReceipt = true;
|
|
||||||
this.vnReport = vnReport;
|
this.vnReport = vnReport;
|
||||||
this.receipt = {};
|
this.receipt = {};
|
||||||
}
|
}
|
||||||
|
@ -59,6 +58,7 @@ class Controller extends Dialog {
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
const accountingType = value.accountingType;
|
const accountingType = value.accountingType;
|
||||||
|
this.viewReceipt = accountingType.code == 'cash';
|
||||||
if (this.originalDescription) {
|
if (this.originalDescription) {
|
||||||
this.receipt.description =
|
this.receipt.description =
|
||||||
`${accountingType && accountingType.receiptDescription}, ${this.originalDescription}`;
|
`${accountingType && accountingType.receiptDescription}, ${this.originalDescription}`;
|
||||||
|
|
|
@ -75,7 +75,6 @@ describe('Client', () => {
|
||||||
jest.spyOn(controller.vnReport, 'show');
|
jest.spyOn(controller.vnReport, 'show');
|
||||||
|
|
||||||
controller.$params = {id: 1101};
|
controller.$params = {id: 1101};
|
||||||
controller.viewReceipt = false;
|
|
||||||
|
|
||||||
$httpBackend.expect('POST', `Clients/1101/createReceipt`).respond({id: 1});
|
$httpBackend.expect('POST', `Clients/1101/createReceipt`).respond({id: 1});
|
||||||
controller.responseHandler('accept');
|
controller.responseHandler('accept');
|
||||||
|
|
Loading…
Reference in New Issue