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:
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `totalPrice` on the `Order_Items` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `totalPrice` on the `Purchase_Receipt_Items` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `totalPrice` on the `Sales_Invoice_Items` table. All the data in the column will be lost.
|
||||
- Added the required column `totalAmount` to the `Order_Items` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `totalAmount` to the `Purchase_Receipt_Items` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE `Order_Items` DROP COLUMN `totalPrice`,
|
||||
ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `Purchase_Receipt_Items` DROP COLUMN `totalPrice`,
|
||||
ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `Sales_Invoice_Items` DROP COLUMN `totalPrice`,
|
||||
ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00;
|
||||
Reference in New Issue
Block a user