| Age | Commit message (Collapse) | Author | Files | Lines |
|
Apply the same linked_title suffix to the assembly xref group rows so
kitlocker components show their KLID there too. INNER JOIN on KLID means
assemblies (which have none) are untouched.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Extend the enrichBomDisplay JOIN to also fetch the KLID xref and append
it to linked_title for any component that has a kitlocker listing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Add klid correlated subquery to both load() and getList(), then append
it in getTitleFromHash(). Enrich title in the getList() foreach so list
pages see the updated value without calling getTitleFromHash() themselves.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Add ref_key (xkey) subquery to StockMovement::load() — it was present in
getList() but missing from load(), so the field always appeared blank on edit.
Filter edit_movement.php refTypes query to ORDER and TRANS only; REQN and
PBLD are created via their own dedicated entry points.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Add prebuild_content_id to StockAssembly::getList() (most recent PBLD
movement for the assembly owner) and link both the Prebuilt label and
count in user_galleries.tpl to view_movement.php?content_id=.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- getList() now provides per-row: parsed_data (via parseDataHash),
part_number (#SUP first), klid, component_count (BOM lines),
prebuild_count (PBLD kit total for assembly owner) as correlated
subqueries — removes need for supplementary queries in callers
- list_assemblies.php: remove batch query block now redundant
- user_galleries.tpl: show parsed_data in .content div; dl counts
moved to panel-footer with margin-bottom:0; klid in panel-title
second line; panel-heading tidied to title only
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- list_movements/list_stock: filter by user_id (kitelf) with breadcrumb
navigation; creator names in list_movements are clickable filter links
- list_movements: unified part_content_id replaces separate
assembly_content_id/component_content_id URL params; type-aware
breadcrumb and qty column (assembly kit count vs component qty)
- StockMovement::getList(): $partId/$partIsAsm collapse cmp/asm into one
variable; unified part_qty/part_qty_type SELECT; PBLD added to all
ref_type IN() lists and sort subqueries; lc.user_id added to SELECT
- New PBLD (Prebuild) movement type: add_prebuild.php/tpl creates PBLD
movements (assemblies only, BOM exploded, optional note); add_requisition
retired from UI; PBLD handled in edit/view with isBuild/isPbld flags;
view/edit show Build Date/Completed labels for PBLD
- schema_inc.php: PBLD registered in stockmovement reference xref items
- view_movement.tpl: updated to <header>/<section> pattern with kitelf
breadcrumb; getDirection() explicit for PBLD
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
floaticon form fixes
StockMovement::loadXrefInfo() — drop xref_title/xref_data enrichment (now from
lc_linked JOIN); restore part_size/part_size_ext query; use array_map not array_column.
stockmovement view_xref_bom_item/bomprt_item — switch to linked_title/linked_data.
Movement bomprt qty: round(xkey/part_size, 3) of part_size (pieces-needed fraction).
Both bomprt templates: drop notes row; drop part_size_ext (PRT = integer parts, not VOL).
list_components: plain <form> (GET needs no CSRF), form-inline + form-group structure,
hidden-print on floaticon; hide-kitlocker checkbox properly spaced.
list_movements: hidden-print on floaticon div.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
part_size
Component title and description in BOM view templates (view_xref_bom_item,
view_xref_bomprt_item, print_bom) now use linked_title/linked_data from the
lc_linked JOIN in loadContent() — same pattern as the supplier name fix.
StockAssembly::loadXrefInfo() drops the title/data enrichment loop (now redundant)
and only queries for part_size/part_size_ext from the PRT xref. array_column
replaced with array_map to reliably call ArrayAccess offsetGet on LibertyXref objects.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
view_xref_sup_item
list_components defaults to hiding kitlocker components (KLID xref present) but keeps
those where the kitlocker contact is also the supplier (#SUP → SCREF='kitlocker') —
parts kitlocker supplies to elves. Filter checkbox in the search form, defaults on.
view_xref_sup_item: switch from xref_title (cross_ref_title = "Supplier") to linked_title
(liberty_content.title of the linked contact) so the contact name appears as the link text.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Follows the new LibertyXrefType::loadContent() pattern — drops the direct
LibertyXrefInfo construction now that loadContent() handles the dual-guid
package/content-type query internally.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
template tag; drop sgGroup stash from component templates
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
stock_fixed_grid_inc.tpl, view_xref_kitlocker_group.tpl; stgrp getList filter; stgrp template field set to kitlocker
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
getLayout/getAllLayouts, per-page config, admin UI; simplify mod_components and display inc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
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>
|
|
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>
|
|
Requisitions:
- add_requisition.php: create REQN movements linked to assemblies or
kitlocker components; Ordered date stored on REQN xref start_date
- ASSEMBLY xref group registered in schema (sort_order=1, template=assembly);
ASSEMBLY item registered with multiple=1 for future multi-item reqns
- StockMovement::loadXrefInfo() enriches assembly group rows with
linked_title/linked_desc from liberty_content
- view_xref_assembly_group/item templates: Assembly tab with qty, title
link, type; Add item form on edit_movement for REQNs; hidden on I-direction
- view_movement/edit_movement: isReqn flag hides assembly tab and type
selector on ORDER/TRANS; add another assembly from edit_movement
BOM editor:
- stockmovement/view_xref_bom_group: Add component links to new
add_movement_component.php instead of generic liberty/add_xref.php
- add_movement_component.php/.tpl: movement-aware add component page;
uses movement_lookup_inc, STOCKMOVEMENT_CONTENT_TYPE_GUID, sequential
xorder, redirects back to edit_movement
Autocomplete dropdowns (replace <select> everywhere):
- add_requisition: hidden+text+dropdown widget; KLID in JSON for matching
- add_supplier: AJAX contact lookup replaces static supplier list
- list_stock: assembly selector replaced with autocomplete dropdown
- edit_movement: From field proper dropdown replacing datalist;
Movement Type radio fixed (was reading non-existent mInfo[reference])
- view_xref_assembly_group: Add item inline form with same widget
Import:
- ImportKitlockerAssemblies: upsert xrefs on reload; KLID/KLSGL/KL3M
now stored on both assemblies and components (not assembly-only)
- StockComponent::getList: kitlocker_only filter via EXISTS(KLID xref)
list_movements: Add Requisition icon alongside Add Movement in header
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- LibertyXrefInfo/LibertyXrefGroup: package-level guid support ('stock')
so stgrp, supplier, kitlocker groups are shared across SA and SC
- schema_inc.php: stgrp group with KLG01-28, supplier consolidated to 'stock'
level, kitlocker moved to 'stock', duplicate #PN/#PR removed
- StockAssembly::getList(): non_root_only and show_empty fixes for standalone
assemblies (no gallery hierarchy)
- StockBase::loadXrefInfo(): instantiates with 'stock' package guid
- list_assemblies.php: gallery_id param, show_empty default for flat list
- edit_assembly.php: STOCKCOMPONENT_CONTENT_TYPE_GUID → string literal
- ImportSimpleComponent: SCREF lookup fixed (xkey not xkey_ext), #SUP row
now carries PN/price/URL directly; #PN #PR #URL separate rows removed
- ImportKitlockerAssemblies, load_kitlocker_assemblies, load_component_list:
new importers for KitlockerAssemblies.csv (A/C split) and Component List.csv
- print_bom.php + print_bom.tpl: read-only printable BOM (p_stock_view only)
with auto window.print() on load
- component_order.tpl: print icon (floaticon), position number for print,
hidden-print on form controls
- list_stock.tpl: print icon
- view_assembly.tpl: print icon → print_bom.php; permission gates tightened
- ipackage duplicate attributes removed from templates
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Add/update docblocks for StockBase, StockComponent, StockAssembly,
and StockMovement. File-level comments describe the content model;
method comments document params, return types, and non-obvious behaviour
(BOM enrichment, circular-assembly guard, movement direction inference,
CSV import format, recursive CTE tree, xorder appending).
Remove stale/empty @package duplicates on class declarations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Remove old ImportAssembly/Component classes, load_stock, load_components,
load_assemblies, load_kitlocker_assemblies/groups (one-off imports).
Add STOCK_IMPORT_PATH = STORAGE_PKG_PATH.'stock/' to bit_setup_inc.
Update load_simple_assemblies/components/components_2 to use
STOCK_IMPORT_PATH instead of __DIR__.'/data/'.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Remove loadXrefList() overrides from StockBase, StockAssembly,
StockMovement; remove loadXrefList() calls from all load() methods.
StockMovement::load() gains ref_type and ref_from_data correlated
subqueries so templates no longer need mInfo.reference[0].
getDirection() reads mInfo.ref_type directly.
component_order.php/tpl: switch to loadXrefInfo + gXrefInfo path.
edit_assembly.php: remove stale bucket-clearing block.
view_movement.tpl: use mInfo.ref_from_data instead of mInfo.reference.0.data.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- 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>
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- importCsv: look up contact by SCREF xref.data, store content_id in xref.xref
- load(): add ref_contact_id, ref_contact_name, ref_type_title subqueries
- edit_movement.php: contact lookup URL; save xref.xref from manual picker;
fix refRow.edit → refRow.data fallback
- edit_movement.tpl: From field with contact autocomplete + hidden id; Note field
- view_movement.tpl: supplier above dates, reference tab removed, note shown,
Type shows cross_ref_title, contact links to contact record
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
importCsv() was hardcoding item='TRANS' on the reference row, overwriting
an ORDER or REQN type already stored by edit_movement.php before the upload.
Now fetches the existing item and preserves it; TRANS only used for new rows.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- Remove redundant ref_key column (shown in Reference already)
- Add ref_start_date sort to getList() match block (subquery-based, avoids
Firebird alias restriction)
- Fix isort values: smartlink appends _asc/_desc itself — passing _desc in
isort was generating ref_start_date_desc_desc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- markReceived() was passing mDb->NOW() string into BIGINT event_time; use time()
- load() now includes ref_start_date correlated subquery (same as getList)
- view_movement.tpl: Created → Ordered → Received order; Ordered only shown
when ref_start_date is set
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Header line now: from, ref, order_date(dd/mm/yy), received_date(dd/mm/yy)
- col 3 (order date) stored in liberty_xref.start_date on reference row
- col 4 (received date, optional) stored in lc.event_time
Existing 3-column CSVs still work unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- StockMovement::getList() adds ref_start_date correlated subquery from
liberty_xref.start_date on the reference row
- event_time sort handled explicitly (lc. prefix needed for Firebird)
- list_movements.tpl: Ordered column, sortable Received column, colspan fix
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
StockMovement::getList() was missing a COUNT query so postGetList()
defaulted cant to max_records, giving total_pages=1 always. Also pass
filter params (ref_type, find, component_content_id, assembly_content_id)
through pagination links so filters survive page navigation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- add_component.php: find component by title and store BOM xref; redirect
to component_order.php on success, or edit_component.php (title pre-filled)
if component not found
- add_component.tpl: form with datalist autocomplete via lookup_component.php
- includes/lookup_component.php: JSON endpoint for component title search
- edit_component.php: pre-fill title from request for new components
- view_xref_bom_group.tpl: add button now goes to add_component.php
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
LibertyContent::getEditUrl() always builds edit.php; StockAssembly and
StockMovement now return their correct entry points (edit_assembly.php,
edit_movement.php). StockComponent already had this override.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
StockMovement::getList() joins xcmp when component_content_id is set,
adding cmp_qty/cmp_qty_type columns per row.
list_movements.php looks up component title; template shows it in the
header, adds a Qty column, and provides a back link.
view_component Stock tab now links to filtered movement list.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Standalone function removed from edit_movement.php; logic lives in
the method using \$this->mDb. Named variable used for item storeXref
call — literal arrays cause fatal error (passed by reference).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
StockMovement extends LibertyContent not StockBase, so
STOCKMOVEMENT_CONTENT_TYPE_GUID belongs in StockMovement.php.
StockBase correctly holds assembly and component defines only.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
StockBase is always loaded first; defining all three constants there
avoids files depending on each other's load order.
Removed duplicate defines from StockComponent and StockMovement.
Reverted spurious use StockComponent from edit_assembly.php.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Removes gallery views, image editing, carousel/gallery liberty plugins,
gallery/image templates, and supporting includes that predate the
stock package rewrite. None of these exist in the current bitweaver5
working tree.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
All three classes only accepted one parameter; getNewObject passes (null, $contentId)
so the content_id was silently dropped and the object never loaded. Coalesce
$pContentId ?? $pPrimaryId preserves all existing single-arg call sites.
Also guard explodeFromAssembly against non-numeric xkey via SIMILAR TO filter.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Consistent with view_component, view_movement naming convention.
All URL references updated across templates, modules, and
StockAssembly::getDisplayUrlFromHash(). nginx pretty-URL rewrite updated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
stock_movement/stock_movement_item tables retired. StockMovement now a
pure LibertyContent subclass — direction from reference xref (REQN=out,
TRANS/ORDER=in), received state from lc.event_time, items as quantity
xrefs with explicit xorder. loadXrefList() enriches component names.
schema_inc.php: full stockmovement xref seed — reference group
(REQN/TRANS/ORDER) and quantity group (SGL/PCK/SHT/VOL, bom/bompck
templates). MOV item removed from stockcomponent/stockassembly seed.
edit_movement.php: type selector on create from DB; CSV upload parses
header (from/ref/date) and component lines using component xref for
default qty type.
list_movements.php/tpl: rebuilt; ref_type filter; ref_type/ref_key/
received columns via xref subquery.
view_movement.php/tpl: cleaned up; xref group tabs, allow_edit=false.
stockmovement/ bom templates added. movement_lookup_inc simplified.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
stock_movement and stock_movement_item replaced by liberty_content +
liberty_xref (quantity group for items, reference group REQN/TRANS/ORDER
for direction). stock_assembly and stock_component were already dead
(content_id used throughout). stock_assembly_component_map retained.
MOV xref item removed from quantity seed data. StockMovement registered
as content object.
StockMovement rewritten as pure LibertyContent subclass — no movement_id,
no table joins. Direction inferred from reference xref (REQN=out,
TRANS/ORDER=in). Received state via lc.event_time / markReceived().
explodeFromAssembly() writes xref records. processMovement() removed
pending import flow implementation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
add_supplier.php + add_supplier.tpl: form to add a #SUP xref record
with supplier contact (filtered by $04 type), part number, price and
note in one step. view_xref_sup_group.tpl: smartlink updated to
"Add supplier" pointing to the new page. StockBase: define
STOCKASSEMBLY_CONTENT_TYPE_GUID with guard so it is available when
StockAssembly is not loaded (e.g. component view path).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
All stock classes, templates, imports, and controllers now reference
content_id directly. StockRemote deleted (unused). StockBase: dead
methods (isMachineName, updatePosition, isEditable) removed; hash_key
aliases dropped. getList() keyed by content_id, fixing missing
content_id in row data.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
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>
|
|
- StockBase: getAssoc() 2-col query returns scalar not array; access directly
- view_xref_sup_item.tpl: move start_date and last_update_date inside
xrefAllowEdit guard; remove |default:true to prevent false being overridden;
column count now matches group template headers in both view and edit modes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
stockcomponent
- StockBase: loadXrefList() batch-fetches contact names for supplier rows
so xref_title is available in view templates (not just edit)
- StockBase: enrichXrefDisplay() handles supplier contact lookup for edit forms
- StockAssembly: enrichXrefDisplay() calls parent first for supplier handling
- schema_inc.php: #SUP template='sup'; supplier group template='sup' for
stockcomponent so view_xref_sup_group.tpl is selected
- New templates in stockcomponent/: view_xref_sup_group.tpl (Supplier/Part
No./Price/Note headings), view_xref_sup_item.tpl (contact link to
display_contact.php, dates/edit hidden in view mode), edit_xref_sup_item.tpl
- view_component.tpl: pass allow_edit=false to hide dates and action buttons
- edit_component.tpl: use getXrefListTemplate() for group dispatch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- StockAssembly: enrichXrefDisplay() fetches component title, description,
pack_size and pack_size_ext in one JOIN query for BOM edit forms
- StockAssembly: loadXrefList() batch query also fetches pack_size_ext
- edit_xref_bom_item.tpl: component shown as read-only link, only qty and
ref designators editable; remove raw component ID field
- edit_xref_bompck_item.tpl: new — PCK variant shows "N of pack_size ext"
inline, Pieces required label
- view_xref_bompck_item.tpl: show pack_size_ext after pack_size in qty cell
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- StockAssembly: loadXrefList() override sorts quantity rows by xorder and
batch-fetches component title, description and pack size in one JOIN query
- StockComponent: getEditUrl() returns edit_component.php; new components
redirect to edit after save so xrefs can be added immediately
- edit.php: BOM CSV upload handler (ITEM/XORDER/XREF/XKEY/XKEY_EXT format)
writing to liberty_xref via LibertyXref::store(); removed old component
upload and single-add handlers
- edit_component.php: removed spurious assembly/component guard on save
- schema_inc.php: quantity group template='bom' for stockassembly; KLSGL
kitlocker stock item; bom template on stockassembly quantity xref items
- Templates: edit_assembly.tpl and view_assembly.tpl use getXrefListTemplate();
new list_xref_bom.tpl, list_xref_bompck.tpl, view_xref_bom_record.tpl,
edit_xref_bom.tpl for BOM display and editing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
StockAssembly::getList(): replace GetAssoc() with query() so limit/offset
are actually applied — GetAssoc() silently ignored them (3rd/4th args are
force_array/first2cols, not limit/offset), causing all rows to be returned.
list_assemblies_simple.tpl: pass assembly_id through minifind so searching
within a sub-level preserves the parent filter.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|