feat: implement inquiry, send, retry, and revoke actions for sales invoices; enhance query constants and service structure
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { PosInfo } from '@/common/decorators/posInfo.decorator'
|
||||
import { TokenAccount } from '@/common/decorators/tokenInfo.decorator'
|
||||
import type { IPosPayload } from '@/common/models'
|
||||
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import type {
|
||||
@@ -28,11 +30,6 @@ export class StatisticsController {
|
||||
return this.service.findOne(consumerId, id)
|
||||
}
|
||||
|
||||
@Post(':id/send_tax')
|
||||
async send(@TokenAccount('userId') consumerId: string, @Param('id') id: string) {
|
||||
return this.service.send(consumerId, id)
|
||||
}
|
||||
|
||||
@Post('send_tax_bulk')
|
||||
async sendBulk(
|
||||
@TokenAccount('userId') consumerId: string,
|
||||
@@ -40,4 +37,24 @@ export class StatisticsController {
|
||||
) {
|
||||
return this.service.sendBulk(consumerId, data.invoice_ids)
|
||||
}
|
||||
|
||||
@Get(':id/inquiry')
|
||||
inquiry(@PosInfo() posInfo: IPosPayload, @Param('id') id: string) {
|
||||
return this.service.inquiry(posInfo.consumer_account_id, posInfo.pos_id, id)
|
||||
}
|
||||
|
||||
@Post(':id/send')
|
||||
send(@Param('id') id: string, @PosInfo() posInfo: IPosPayload) {
|
||||
return this.service.send(id, posInfo)
|
||||
}
|
||||
|
||||
@Post(':id/retry')
|
||||
retry(@Param('id') id: string, @PosInfo() posInfo: IPosPayload) {
|
||||
return this.service.retry(id, posInfo)
|
||||
}
|
||||
|
||||
@Post(':id/revoke')
|
||||
revoke(@Param('id') id: string, @PosInfo() posInfo: IPosPayload) {
|
||||
return this.service.revoke(id, posInfo)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user