fix: refactoring invoice calc cost service.

This commit is contained in:
a.bouhuolia
2021-01-05 17:06:42 +02:00
parent d25360d279
commit df85c9b295
41 changed files with 1684 additions and 1085 deletions

View File

@@ -248,12 +248,13 @@ export default class SaleInvoicesController extends BaseController {
*/
async getSaleInvoice(req: Request, res: Response, next: NextFunction) {
const { id: saleInvoiceId } = req.params;
const { tenantId } = req;
const { tenantId, user } = req;
try {
const saleInvoice = await this.saleInvoiceService.getSaleInvoice(
tenantId,
saleInvoiceId
saleInvoiceId,
user
);
return res.status(200).send({ sale_invoice: saleInvoice });
} catch (error) {