This technical user manual provides a comprehensive breakdown of the item registration process, analyzing the
view file resources/views/backend/item-information/create.blade.php, its related controller
logic in InventoryController.php, databases, and dependencies.
The Item Information Form manages the central product/item dictionary for the entire ERP system. By adding items here, you declare base materials, finished goods, barcodes, tax classes, default purchase/sales rates, and initial opening stock balances simultaneously.
Submitting this form bridges numerous entities depending on whether the item being created incorporates opening stock numbers:
| Model | Database Table | Description |
|---|---|---|
Inventory |
inventories |
Stores the core product mapping: Name, Code, Barcode, Base Unit, Rate definitions, and Image paths. |
ItemCategory |
item_categories |
Categorization hierarchy dictating how products are sorted system-wide. |
Units, UnitConversion |
units, unit_conversions |
Holds base transaction unit labels and initializes default 1:1 ratio conversions explicitly upon item creation. |
Purchase, PurchaseDetail |
purchases, purchase_details |
If the user attaches an Opening Balance, an administrative/hidden purchase invoice
is generated simulating a formal acquisition of these new goods. |
ItemInventory |
item_inventories |
A system ledger maintaining physical total Qty counters of goods. Stock injected upon creation logs here. |
ProductPriceList |
product_price_lists |
Separately tracks lots or specific batched price lists. Initialized concurrently alongside opening inventory. |
resources/views/backend/item-information/create.blade.php (Organized via a Bootstrap
tab-pane).backend.layouts.app (Supplies standard application chrome
such as headers and CSS/JS linkages).backend.message.message (Used for error/success flash
notifications).The form is separated cleanly into four major tab components, posting to
route('item-information.store') via a multi-part form to handle image byte streams.
_category_id): A forced dropdown specifying broad parent-child
category classifications._item): The unique internal name used over transactions._unit_id): The base metric metric (e.g. Kg, Pcs, Box)._unique_barcode): Checkbox dictating if an item utilizes
serialized, piece-by-piece tracking (e.g., IMEI tracking) or bulk uniform tracking._kitchen_item): Flags an item to route its
lifecycle dynamically via kitchen/prep logics rather than standard wholesale behaviors.Stores default values used to auto-fill financial matrices down the line:
_pur_rate (Purchase Cost) and _sale_rate
(Selling Price)._vat), Discount (_discount),
SD (_sd), CD (_cd), AIT (_ait) mapping advanced border or sales
taxes intrinsically to the article._warranty)._reorder) notifying admins of
scarcity, and default restock blocks (_order_qty)._image) providing a visual catalog
reference.Allows setting starting stock levels. Relies extensively on user-generated JavaScript mapping rows detailing
which Branch/Cost Center/Store receives the Opening Quantity (_opening_qty) and opening
financial valuation matrices.
InventoryController.php) Logiccreate()Scaffolds the UI. Bootstraps base queries retrieving ItemCategory relations, system
Units, permitted organizations, and branches directly into the blade variables compact stream
ensuring strict organizational compliance.
store()Houses critical database manipulation mapping. Relies on DB::beginTransaction() to prevent
fragmented ghost records if partial saving fails.
unique:inventories,_item)
and ensures minimal metrics (Unit, Category, Name) are submitted.item_code_generate() based on existing sequences.Inventory model. Captures and ports uploaded images using UserImageUpload.
unitConversation_save()
providing a 1-to-1 conversion multiplier out of the box.If the user passed an opening qty parameter (_opening_qty > 0), a heavy automation
subsystem runs:
Purchase and
PurchaseDetail structures. Defines these entries with an internal "Opening
Inventory" tag.ProductPriceList.ItemInventory.account_data_save() multiple times over mapping debiting and crediting
rules corresponding explicitly between predefined Default Supplier/Purchase Ledgers mirroring
standard accounting entries.DB::commit() finalizing the registration loop.