fix: payment receive and made.

This commit is contained in:
a.bouhuolia
2021-03-09 17:47:01 +02:00
parent 2494a33d21
commit 59f8010122
31 changed files with 395 additions and 349 deletions

View File

@@ -4,11 +4,11 @@ import { check, param, query, ValidationChain } from 'express-validator';
import asyncMiddleware from 'api/middleware/asyncMiddleware';
import { ServiceError } from 'exceptions';
import BaseController from 'api/controllers/BaseController';
import BillPaymentsService from 'services/Purchases/BillPayments';
import BillPaymentsService from 'services/Purchases/BillPayments/BillPayments';
import BillPaymentsPages from 'services/Purchases/BillPayments/BillPaymentsPages';
import DynamicListingService from 'services/DynamicListing/DynamicListService';
import AccountsService from 'services/Accounts/AccountsService';
import ResourceController from '../Resources';
import { Request } from 'express-validator/src/base';
/**
* Bills payments controller.
@@ -25,6 +25,9 @@ export default class BillsPayments extends BaseController {
@Inject()
dynamicListService: DynamicListingService;
@Inject()
billPaymentsPages: BillPaymentsPages;
/**
* Router constructor.
*/
@@ -144,7 +147,7 @@ export default class BillsPayments extends BaseController {
const { vendorId } = this.matchedQueryData(req);
try {
const entries = await this.billPaymentService.getNewPageEntries(
const entries = await this.billPaymentsPages.getNewPageEntries(
tenantId,
vendorId
);
@@ -171,7 +174,7 @@ export default class BillsPayments extends BaseController {
const {
billPayment,
entries,
} = await this.billPaymentService.getBillPaymentEditPage(
} = await this.billPaymentsPages.getBillPaymentEditPage(
tenantId,
paymentReceiveId
);