summaryrefslogtreecommitdiff
path: root/view_component.php
AgeCommit message (Collapse)AuthorFilesLines
2026-06-11stock: merge stgrp xrefs into kitlocker group at data level; revert stgrp ↵Lester Caine1-0/+9
template tag; drop sgGroup stash from component templates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10stock: rename PCK→PRT (fractional parts), add PCK as ordering pack-size ↵Lester Caine1-3/+3
tag; rename pack_size→part_size; bompck templates→bomprt; strip verbose labels (fraction), (H x W) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09stock: kitlocker tab visibility; view icon cleanupLester Caine1-0/+6
- edit/view_component: hide kitlocker and stgrp xref tabs for non-kitlocker components (no KLID value); tabs appear at end when shown - view_component: floaticon moved inside header; protector services removed - view_component: edit/delete icons; remove redundant services_inc includes - view_movement: floaticon moved inside header div - assembly_icons_inc: remove stale Add Component link (edit BOM tab handles it) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09stock: PCK/SHT fractional display, movement qty summing, import qty typeLester Caine1-0/+6
Display fixes: - list_stock, list_movements, view_component: PCK stock divides by pack_size for fractional strip display; SHT shows 2 decimal places - list_movements: pack_size fetched per component for PCK display - All fractional formats use %.2f consistently StockMovement::getList component filter: - Replace INNER JOIN on xcmp with EXISTS subquery to avoid duplicate rows when a component appears multiple times in a movement BOM - cmp_qty now SUMs all matching xref rows so multi-assembly RQs show total quantity rather than silently dropping duplicate rows Movement BOM edit templates: - stockmovement/edit_xref_bom_item.tpl: proper edit form for SGL/SHT/VOL lines linking back to view_component - stockmovement/edit_xref_bompck_item.tpl: same for PCK with pack size hint Import: - ImportSimpleComponent: columns 6/7 (qty_type, qty_value) wired up; PCK/SHT/VOL writes qty xref so movement CSV imports pick up default type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06Refactor xref display to LibertyXrefGroup path throughoutLester Caine1-1/+2
- StockBase/StockAssembly/StockMovement: add loadXrefInfo() overrides to enrich supplier group with contact titles and BOM group with component titles, descriptions and pack sizes - display_stock_assembly_inc, view/edit_component, view/edit_assembly, view_movement: replace getXrefGroupList() with loadXrefInfo() + assign gXrefInfo; edit pages pass allow_edit=true - All view/edit templates: switch {section} over stockXxx_types arrays to {foreach $gXrefInfo->mGroups as $xrefGroup} object path - BOM and supplier group templates rewritten: $xrefGroup object, column widths, class="table", conditional colspan - All BOM/supplier item templates: $gContent->mInfo.$source[xref].x -> $xrefInfo.x; $source ne 'history' -> $isHistory - Dead code removed: list_xref_stock.tpl, view_xref_pck_item.tpl Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02view_component: add Stock Levels tab showing movement totals per qty typeLester Caine1-0/+25
Query mirrors list_stock.php for a single component. Tab shows level per qty type with danger/warning colouring, plus a link to filtered stock history. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31Remove stock_component table — use liberty_content directlyLester Caine1-1/+1
stock_component was a pure alias (component_id ↔ content_id with no other data). All queries now target liberty_content WHERE content_type_guid = STOCKCOMPONENT_CONTENT_TYPE_GUID directly. - StockComponent: drop mComponentId, constructor takes content_id only - All component_id URL params changed to content_id - Import files, edit_movement, sitemap updated to match - BOM xref templates updated (xref column migrated from component_id to content_id in live DB — 130 rows) - StockAssembly loadXrefList/enrichXrefDisplay join liberty_content directly; loadComponents drops stock_component LEFT JOIN - StockBase: previous/next keys renamed to _content_id stock_component table left in schema_inc.php pending DB reset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Add xref support, assembly/component views, and import toolingLester Caine1-0/+39
- add_xref.php, edit_xref.php: xref record add/edit for stock content types - admin xref group/source pages for stock_assembly and stock_component - assembly_views/: auto_flow, fixed_grid, position_number, simple_list layouts - Full assembly and component listing, tree, ordering, and detail pages - Import tooling (ImportAssembly, ImportComponent, load scripts) - liberty_plugins for assembly and component data types - schema_inc.php updated; StockAssembly, StockBase, StockComponent, StockMovement classes updated with xref group/item/multiple renames - Templates updated throughout for xref rename (source→item, group→x_group) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>