<feed xmlns='http://www.w3.org/2005/Atom'>
<title>stock/templates/edit_movement.tpl, branch master</title>
<subtitle>Bitweaver stock package repository
</subtitle>
<id>https://git.rdm1.uk/stock/.git/atom?h=master</id>
<link rel='self' href='https://git.rdm1.uk/stock/.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/'/>
<updated>2026-06-14T10:36:26Z</updated>
<entry>
<title>Add liberty owner selector to edit_assembly and edit_movement</title>
<updated>2026-06-14T10:36:26Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-14T10:36:26Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/commit/?id=bc2419de1ce73549e05bb5b8b7ab133d60e13e11'/>
<id>urn:sha1:bc2419de1ce73549e05bb5b8b7ab133d60e13e11</id>
<content type='text'>
Includes edit_content_owner_inc.tpl in both forms so admin users with
p_liberty_edit_content_owner can reassign user_id (kitelf ownership)
when liberty_allow_change_owner is active.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add multi-user (kitelf) stock filtering and PBLD prebuild movement type</title>
<updated>2026-06-14T09:49:24Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-14T09:49:24Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/commit/?id=e8aa652c4f0d2f780171d7bbd2c351c05a1025e9'/>
<id>urn:sha1:e8aa652c4f0d2f780171d7bbd2c351c05a1025e9</id>
<content type='text'>
- 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 &lt;header&gt;/&lt;section&gt; pattern with kitelf
  breadcrumb; getDirection() explicit for PBLD

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>stock: requisition system, movement BOM editor, autocomplete dropdowns</title>
<updated>2026-06-08T19:56:56Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-08T19:56:56Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/commit/?id=a838a2d3963738b2e9bc496b31e078ead79d4a43'/>
<id>urn:sha1:a838a2d3963738b2e9bc496b31e078ead79d4a43</id>
<content type='text'>
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 &lt;select&gt; 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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>edit_movement: switch xref tabs to LibertyXrefGroup path</title>
<updated>2026-06-06T09:21:55Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-06T09:21:55Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/commit/?id=4fb6f490920d93be6bbac46ce0d8f21c1095504e'/>
<id>urn:sha1:4fb6f490920d93be6bbac46ce0d8f21c1095504e</id>
<content type='text'>
Replace movement_xref_groups/getXrefGroupList() with loadXrefInfo() +
gXrefInfo; reference group filtered in template as before.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add p_stock_expunge permission; gate movement delete button</title>
<updated>2026-06-05T16:49:37Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-05T16:49:37Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/commit/?id=ccb6c9dfdcee8d10fe845b08cea9f76fd3530a70'/>
<id>urn:sha1:ccb6c9dfdcee8d10fe845b08cea9f76fd3530a70</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>stock: movement contact linkage, note field, view/edit tidy</title>
<updated>2026-06-03T21:07:34Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-03T21:07:34Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/commit/?id=8fd8add7673c2440ea8f7653f1c3b44e9518cf38'/>
<id>urn:sha1:8fd8add7673c2440ea8f7653f1c3b44e9518cf38</id>
<content type='text'>
- 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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>edit_movement: support CSV upload at create time</title>
<updated>2026-06-02T16:53:10Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-02T16:53:10Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/commit/?id=3bb1b60e08fa4382e4f715d7b94fde875d11cfd1'/>
<id>urn:sha1:3bb1b60e08fa4382e4f715d7b94fde875d11cfd1</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Rewrite StockMovement as pure LibertyContent; CSV import; bom grid</title>
<updated>2026-06-01T08:21:30Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-01T08:21:30Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/commit/?id=54efaa8253c48fb5597b5e477b20a4127365d7c7'/>
<id>urn:sha1:54efaa8253c48fb5597b5e477b20a4127365d7c7</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add item_position column, DB-level sort, allow zero qty in movements</title>
<updated>2026-05-27T18:25:12Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-05-27T18:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/commit/?id=2313251556f28ddd642005332460cd7ba37799cc'/>
<id>urn:sha1:2313251556f28ddd642005332460cd7ba37799cc</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add CSV upload to edit_movement, fix foreach syntax, add PRG redirects</title>
<updated>2026-05-27T17:46:18Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-05-27T17:46:18Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/stock/.git/commit/?id=368b306acf511a0ecd9a8575bf189ffcbdf217ad'/>
<id>urn:sha1:368b306acf511a0ecd9a8575bf189ffcbdf217ad</id>
<content type='text'>
- 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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
