| Age | Commit message (Collapse) | Author | Files | Lines |
|
- list_stock: CSV export and Create Order from shortages report;
floaticon icons for print/CSV/order; filter form moved into header
- add_order: new page — pre-populate draft ORDER movement from
shortages list, editable qty/delete per line, supplier autocomplete
- list_movements: print icon; filter form moved into floaticon header
- list_assemblies_simple: print icon added to floaticon
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Zero stock is always relevant when movements are tracked. Shortages
filter now applies to the main list (level < 0) as well as BOM view.
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>
|
|
Removed the stock_assembly_map components table (always empty since
gallery hierarchy was dropped), the Components heading, and the
'No components yet' message. BOM tab already shows component count.
Upload BOM form now sits directly below Save with results above it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
All edit_xref templates were missing a hidden xorder field, causing
LibertyXref::verify() to default it to 0 on every save. Added the
hidden field to all four stock edit_xref templates (bom, bompck,
pck, sup).
component_order.tpl: Order column widened to 7em so 4-digit xorder
values are not clipped.
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>
|
|
|
|
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>
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Replace movement_xref_groups/getXrefGroupList() with loadXrefInfo() +
gXrefInfo; reference group filtered in template as before.
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>
|
|
p_stock_expunge at admin level. edit_movement.tpl delete button now
requires p_stock_expunge. Xref item delete gating (currently xrefAllowEdit
only) is a pending audit — same history-vs-hard-delete question as contact.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
list_assemblies/list_components: add create header icon (p_stock_create),
edit icon in row/caption (p_stock_update).
list_movements: fix edit gate from p_stock_create → p_stock_update.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Add Movement → view-task-add biticon; row edit → edit biticon
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
view-group/view-list-tree/view-list-details/view-form-table for lists;
kt-add-filters/view-list-icons/view-task-add/view-task-child-add for creates
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
edit used for all edit actions; view-list-text for list links and assembly
content-type placeholder (to be fine-tuned separately for add vs list contexts).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
user-trash updated to a proper dustbin SVG. All templates across
all packages updated to use user-trash instead of edit-delete.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Replace all {booticon iname="icon-*"} and {booticon iname="fa-*"} calls with
{biticon ipackage="icons" iname="<freedesktop-name>"} using the tango iconset.
Mapping covers ~70 distinct old names to tango equivalents (edit-delete,
document-properties, go-next, lock, internet-mail, etc.).
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>
|
|
- 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>
|
|
- 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>
|
|
fa-boxes-stacked and fa-truck don't exist in colourstrap-full.css;
replace with icon-box and icon-move which do.
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>
|
|
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>
|
|
Extract CSV processing into stockProcessMovementCsv() used by both
fSave (new movement) and upload_csv (existing movement).
Template: CSV file input shown on create form; enctype set to multipart.
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>
|
|
add_requisition.tpl: form for RQ number, assembly select, kit count.
menu_stock.tpl: add Create Requisition link alongside existing actions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- Fetch MIN(bom.xorder) per row; order by it when assembly filter active
- Compute bom_group = floor(xorder/1000) in PHP, pass to template
- Template shows group header rows (matching component_order.tpl convention)
- Remove table-striped — clashes with danger row highlighting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Pre-compute remaining before the <tr> so the row class can check both
stock level < 0 and (showBom && remaining < 0).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- add_requisition: store ASSEMBLY xref on new movements so they can be filtered by assembly
- StockMovement::getList: add assembly_content_id filter via ASSEMBLY xref join
- list_movements: pass assemblyContentId to Smarty
- view_assembly.tpl: add View Stock and View Movements icons filtered by assembly
- list_stock: guard CAST with SIMILAR TO on xkey join; fix %.3g scientific notation to %.0f
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Filter by assembly — components joined via liberty_xref BOM entries.
Kit count input scales BOM qty. Remaining = stock − (BOM qty × kits),
shown in red when negative. BOM qty and Remaining columns hidden when
no assembly is selected.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Aggregates signed quantities from stockmovement liberty_xref records:
TRANS/ORDER = inbound (+), REQN = outbound (-). Groups by component
and qty type. Shows component name, description, part number (#SUP xkey),
qty type, and stock level. Highlights negative (red) and zero (amber).
Filter by name; option to show/hide zero-stock items.
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>
|
|
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>
|
|
component_order.php now saves xorder values from liberty_xref rather than
managing item_position in the assembly map — matching the BOM display flow
that reads xorder for grouping and sort.
assembly_nav.tpl: remove fisheye-era gallery references; use assembly URLs,
mAssemblyId, and list_assemblies.php.
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>
|
|
- Move BOM templates into templates/stockassembly/ subdir
- Move PCK component templates into templates/stockcomponent/ subdir
- schema_inc.php: PCK on stockcomponent uses 'value' template;
PCK on stockassembly uses 'bompck'; SGL/SHT/VOL on assembly use 'bom'
- Remove old flat templates superseded by subdir structure
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>
|
|
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>
|
|
StockAssembly::getList(): add parent_content_id filter (EXISTS subquery)
to show only direct children of a given assembly; add child_count subquery
so the template can distinguish containers from leaf assemblies.
list_assemblies.php: when assembly_id param present, filter to children
of that assembly; assign parentAssembly for breadcrumb.
list_assemblies_simple.tpl: breadcrumb trail when drilling down; title
links to list_assemblies.php?assembly_id=X for containers, view.php for
leaf assemblies (child_count == 0).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|