chore: add 10 percent tax to the invoice
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { Body, Controller, Get, Param, Patch, Post, Query } from "@nestjs/common";
|
||||
import { ApiOperation } from "@nestjs/swagger";
|
||||
|
||||
import { ApplyDiscountDto } from "./DTO/apply-discount-invoice.dto";
|
||||
import { CreateInvoiceDto } from "./DTO/create-invoice.dto";
|
||||
import { InvoicesSearchQueryDto, UserInvoicesSearchQueryDto } from "./DTO/invoices-search-query.dto";
|
||||
import { InvoicesService } from "./providers/invoices.service";
|
||||
@@ -58,21 +57,21 @@ export class InvoicesController {
|
||||
return this.invoiceService.approveInvoiceByUser(paramDto.id, userId, verifyOtpDto);
|
||||
}
|
||||
|
||||
@ApiOperation({ summary: "apply discount on invoice by user" })
|
||||
@Post(":id/apply-discount")
|
||||
async applyDiscount(@Param() paramDto: ParamDto, @Body() applyDiscountDto: ApplyDiscountDto, @UserDec("id") userId: string) {
|
||||
return this.invoiceService.applyDiscount(paramDto.id, applyDiscountDto, userId);
|
||||
}
|
||||
|
||||
@ApiOperation({ summary: "cancel discount by user" })
|
||||
@Post(":id/cancel-discount")
|
||||
cancelDiscount(@Param() paramDto: ParamDto, @UserDec("id") userId: string) {
|
||||
return this.invoiceService.cancelDiscount(paramDto.id, userId);
|
||||
}
|
||||
|
||||
@ApiOperation({ summary: "pay invoice by user" })
|
||||
@Post(":id/pay")
|
||||
async payInvoice(@Param() paramDto: ParamDto, @UserDec("id") userId: string) {
|
||||
return this.invoiceService.payInvoice(paramDto.id, userId);
|
||||
}
|
||||
|
||||
// @ApiOperation({ summary: "apply discount on invoice by user" })
|
||||
// @Post(":id/apply-discount")
|
||||
// async applyDiscount(@Param() paramDto: ParamDto, @Body() applyDiscountDto: ApplyDiscountDto, @UserDec("id") userId: string) {
|
||||
// return this.invoiceService.applyDiscount(paramDto.id, applyDiscountDto, userId);
|
||||
// }
|
||||
|
||||
// @ApiOperation({ summary: "cancel discount by user" })
|
||||
// @Post(":id/cancel-discount")
|
||||
// cancelDiscount(@Param() paramDto: ParamDto, @UserDec("id") userId: string) {
|
||||
// return this.invoiceService.cancelDiscount(paramDto.id, userId);
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user