feat(statistics): implement top alert stocks, top last sales, top supplier debts, and top selling products endpoints with SQL queries
This commit is contained in:
@@ -23,8 +23,8 @@ export class SupplierInvoicesService {
|
||||
select: {
|
||||
id: true,
|
||||
count: true,
|
||||
fee: true,
|
||||
total: true,
|
||||
unitPrice: true,
|
||||
totalAmount: true,
|
||||
product: {
|
||||
select: {
|
||||
id: true,
|
||||
@@ -149,6 +149,8 @@ export class SupplierInvoicesService {
|
||||
|
||||
async createPayment(invoiceId: number, data: CreateReceiptPaymentDto) {
|
||||
const { bankAccountId, ...rest } = data
|
||||
console.log(data)
|
||||
|
||||
const payment = await this.prisma.purchaseReceiptPayments.create({
|
||||
data: {
|
||||
...rest,
|
||||
|
||||
Reference in New Issue
Block a user