prompt > Find the related view files and model name for this controller and mention them here. Table: Table Name: (1) productions (2)stock_outs (3)stock_ins (4) product_price_lists (5)item_inventories (6)inventories (7) accounts (8)account_ledgers (9)inventories (10) barcode_details Controller Name: (1) ProductionController.php Views Path below resources/views/backend/production/ index.blade.php: The main listing page for production records. Model: Production(Path: app/Models/Production.php)
[1. Core Production Tables
productions: This is the master table that stores the main production record, including the date, branches (from/to), cost centers, reference number, notes, and total values.
stock_outs: Stores details of the items used in the production process (raw materials). It records the item ID, quantity, rate, value, and batch information.
stock_ins: Stores details of the items produced (finished goods). It records the produced item ID, quantity, rate, and value.
2. Inventory & Stock Management Tables
product_price_lists: Stores batch-wise pricing and stock information. When production occurs, this table is updated to reduce the stock of raw materials and create new records for the finished goods.
item_inventories: This table acts as a transaction log for all inventory movements. Every production entry creates "production" and "production in" records here to keep a history of stock changes.
inventories: The _balance and _pur_rate / _sale_rate columns in this table are updated to reflect the current stock level and last price of the items.
3. Accounting & Financial Tables
accounts: Stores the financial ledger entries related to the production (e.g., shifting value from raw material inventory to finished goods inventory).
account_ledgers: The current balance of relevant accounts is updated in this table.
4. Tracking & Configuration Tables
barcode_details: If the system is configured to track unique barcodes, this table stores the relationship between specific barcodes and the production transaction.
production_from_settings: Stores configuration settings for the production module, such as default inventory accounts and display preferences.
Summary
The primary table for the master record is productions, while the line items are split between stock_outs (materials used) and stock_ins (products made).
create.blade.php: The form for creating new production entries.
edit.blade.php: The form for editing existing production entries.
search.blade.php: Used for the advanced search/filtering functionality on the index page.
form_setting_modal.blade.php: The modal for updating production-specific settings (like default accounts).
print.blade.php: The main print template for the production voucher.
stock_in_print.blade.php: A specific print template showing only the "Stock In" (Finished Goods) details.
stock_out_print.blade.php: A specific print template showing only the "Stock Out" (Raw Materials) details.
stock_in_script.blade.php: Contains JavaScript logic specifically for managing the "Stock In" rows in the forms.
stock_out_script.blade.php: Contains JavaScript logic specifically for managing the "Stock Out" rows in the forms.
Other closely related models used for saving data include:
StockIn(app/Models/StockIn.php) - For finished goods.
StockOut(app/Models/StockOut.php) - For raw materials.
ItemInventory(app/Models/ItemInventory.php)
- For stock logs. ProductPriceList(app/Models/ProductPriceList.php)
- For batch/price tracking. ProductionFromSetting (app/Models/ProductionFromSetting.php)
- For module settings.