| Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
Add STOCK_IMPORT_PATH = STORAGE_PKG_PATH.'stock/' to bit_setup_inc.
edit_assembly.php: move_uploaded_file BOM CSV to
storage/stock/<origname>_bom_<content_id>.csv before processing.
edit_movement.php: copy movement CSV to
storage/stock/<origname>_move_<content_id>.csv before calling importCsv().
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>
|
|
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>
|
|
p_stock_view: registered; p_stock_create/update: editors; p_stock_admin: admin.
Remove p_stock_list_assemblies (unused, covered by p_stock_view) and
p_stock_create_public_gal (unused, covered by p_stock_create).
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>
|
|
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>
|
|
When col0==col1 and no KLID xref exists yet (first run), fall back to
title lookup so the assembly is found and the KLID xref gets stored.
Subsequent runs use the KLID xref directly, surviving manual title changes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
New columns: Title, KLID, Data, KLSGL, KL3M, Group. Match existing
assemblies by KLID xref (not title) so tidier titles are applied on
re-run; wipe and replace old kitlocker xrefs each time.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
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>
|
|
Separated group definitions by content type so sort_orders are explicit
and unambiguous. stockcomponent: supplier=1, quantity=2, values=3.
stockassembly: kitlocker=1, supplier=2, quantity/BOM=3 (no values group).
Values xref items remain stockcomponent-only.
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>
|
|
Hardcoded assembly_id=21 breaks on any DB rebuild. Look up the 'kitlocker'
assembly by title so re-running the import on any server wires up the parent links correctly.
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>
|
|
In BOM mode, use a BOM-first query with correlated subquery for stock
so components with no movements appear with level 0. In general list
mode keep the existing movement-INNER JOIN with the show_zero filter.
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>
|
|
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>
|
|
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>
|
|
triggered in import context
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>
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
CSV data files are site-specific and should not be distributed.
import/data/ is now gitignored with a .gitkeep to preserve the
empty directory for deployments.
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>
|