mirror of
https://github.com/itflow-org/itflow
synced 2026-11-14 08:27:24 +00:00
Products makeover stage 2: inventory ledger and alerts - every stock change recorded through productStockMove as received, sold, returned, counted or written off with unit cost, invoice or expense, note and agent, one Stock window to Receive, Count or Write off replacing Add Stock, a Stock tab on the product page with a running balance, Reorder at and Order per product with a To reorder tab, list and side nav badges, a dashboard Needs attention item and Low Stock notifications, a Count Stock page with live differences and a printable count sheet, an Inventory report with CSV exports, reorder columns and stock value in import and export, cancelling or deleting an invoice returns its stock from the net of its moves, copying an invoice or invoicing a quote carries the product link and is refused when tracked stock is short, recurring generated invoices link their products without moving stock, decimal stock quantities, database 2.9.5 with stock type, unit cost, invoice and user columns backfilled from existing notes, CHANGELOG updated
This commit is contained in:
11
db.sql
11
db.sql
@@ -1760,14 +1760,19 @@ DROP TABLE IF EXISTS `product_stock`;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `product_stock` (
|
||||
`stock_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`stock_qty` int(11) NOT NULL,
|
||||
`stock_qty` decimal(15,2) NOT NULL,
|
||||
`stock_type` varchar(20) NOT NULL DEFAULT 'adjusted',
|
||||
`stock_unit_cost` decimal(15,2) DEFAULT NULL,
|
||||
`stock_note` text DEFAULT NULL,
|
||||
`stock_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`stock_expense_id` int(11) DEFAULT NULL,
|
||||
`stock_invoice_id` int(11) NOT NULL DEFAULT 0,
|
||||
`stock_item_id` int(11) DEFAULT NULL,
|
||||
`stock_user_id` int(11) NOT NULL DEFAULT 0,
|
||||
`stock_product_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`stock_id`),
|
||||
KEY `stock_product_id` (`stock_product_id`)
|
||||
KEY `stock_product_id` (`stock_product_id`),
|
||||
KEY `stock_invoice_id` (`stock_invoice_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
@@ -1793,6 +1798,8 @@ CREATE TABLE `products` (
|
||||
`product_frequency` varchar(10) DEFAULT NULL,
|
||||
`product_seat_source` varchar(20) DEFAULT NULL,
|
||||
`product_track_stock` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`product_reorder_level` decimal(15,2) NOT NULL DEFAULT 0.00,
|
||||
`product_reorder_qty` decimal(15,2) NOT NULL DEFAULT 0.00,
|
||||
`product_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`product_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`product_archived_at` datetime DEFAULT NULL,
|
||||
|
||||
Reference in New Issue
Block a user