| Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
- 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>
|
|
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>
|
|
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_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>
|
|
loadItems() now accepts a sort mode matching smartlink conventions
(item_position_asc/desc, title_asc/desc) and orders at the DB level
so future paging works correctly. edit_movement passes sort_mode from
the request through to loadItems(). Template uses {smartlink} on Pos
and Component headers for toggling sort direction. Zero quantity is
now valid (needed for BOM-based movements where a part isn't required).
item_position is auto-assigned as a sequence number on both CSV upload
and manual add.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Saving a new movement now redirects to edit_movement.php?movement_id=X
so the items/upload section is immediately visible. Saving an existing
movement still returns to the list.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- CSV upload button on edit_movement reads the 3-column stock CSV and
loads items directly into the open movement; shows loaded/skipped counts
- Status select was using Smarty inline array literal (broken); replaced
with PHP-assigned $statusOptions and {foreach from=} syntax
- add_item and remove_item now redirect after success (PRG pattern) to
prevent double-submit on refresh
- load_stock.php remains but upload-on-edit is the preferred path
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
list_movements.php shows all movements with direction/status filter
dropdowns and an Edit button per row. Menu gains a List Movements
link. edit_movement.php now redirects to list_movements.php after
a successful save rather than reloading the edit page.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
edit_movement.php handles create/save, item add/remove, process, and
delete. Template shows header fields, items table with remove buttons,
inline add-item form, and a Process button when status=pending.
Menu gains an Add Movement link gated on p_stock_create.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|