mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
refactor(nestjs): bank transactions matching
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { Controller, Get, Query } from '@nestjs/common';
|
||||
import { GetItemsInventoryValuationListService } from './queries/GetItemsInventoryValuationList.service';
|
||||
import { GetInventoyItemsCostQueryDto } from './dtos/GetInventoryItemsCostQuery.dto';
|
||||
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
|
||||
@Controller('inventory-cost')
|
||||
@ApiTags('inventory-cost')
|
||||
export class InventoryCostController {
|
||||
constructor(
|
||||
private readonly inventoryItemCost: GetItemsInventoryValuationListService,
|
||||
) {}
|
||||
|
||||
@Get('items')
|
||||
@ApiOperation({ summary: 'Get items inventory valuation list' })
|
||||
async getItemsCost(
|
||||
@Query() itemsCostsQueryDto: GetInventoyItemsCostQueryDto,
|
||||
) {
|
||||
const costs = await this.inventoryItemCost.getItemsInventoryValuationList(
|
||||
itemsCostsQueryDto.itemsIds,
|
||||
itemsCostsQueryDto.date,
|
||||
);
|
||||
return { costs };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user