diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-06 15:03:51 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-06 15:03:51 +0100 |
| commit | 4269a36ce2ba9d5ce10ccc50bb698f5d78c32c48 (patch) | |
| tree | e96b3d98415838f8d8242988515441fcff4be65a /templates | |
| parent | cd200fda67728ed962ca7bfd60b2b02ecfa0b904 (diff) | |
| download | stock-4269a36ce2ba9d5ce10ccc50bb698f5d78c32c48.tar.gz stock-4269a36ce2ba9d5ce10ccc50bb698f5d78c32c48.tar.bz2 stock-4269a36ce2ba9d5ce10ccc50bb698f5d78c32c48.zip | |
xref: complete migration from loadXrefList to loadXrefInfo
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>
Diffstat (limited to 'templates')
| -rwxr-xr-x | templates/component_order.tpl | 4 | ||||
| -rw-r--r-- | templates/view_movement.tpl | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/templates/component_order.tpl b/templates/component_order.tpl index 70136ef..a1ac4c5 100755 --- a/templates/component_order.tpl +++ b/templates/component_order.tpl @@ -22,8 +22,8 @@ </thead> <tbody> {assign var=lastGroup value=-1} - {if $gContent->mInfo.quantity} - {foreach from=$gContent->mInfo.quantity item=row} + {if $gXrefInfo->mGroups.quantity && $gXrefInfo->mGroups.quantity->mXrefs} + {foreach from=$gXrefInfo->mGroups.quantity->mXrefs item=row} {math equation="floor(x/1000)" x=$row.xorder|default:0 assign=thisGroup} {if $thisGroup != $lastGroup} <tr class="active"> diff --git a/templates/view_movement.tpl b/templates/view_movement.tpl index 72932b2..f46ca6c 100644 --- a/templates/view_movement.tpl +++ b/templates/view_movement.tpl @@ -20,9 +20,9 @@ <dd> <a href="{$smarty.const.CONTACT_PKG_URL}display.php?content_id={$gContent->mInfo.ref_contact_id}">{$gContent->mInfo.ref_contact_name|escape}</a> </dd> - {elseif $gContent->mInfo.reference.0.data} + {elseif $gContent->mInfo.ref_from_data} <dt>{tr}From{/tr}</dt> - <dd>{$gContent->mInfo.reference.0.data|escape}</dd> + <dd>{$gContent->mInfo.ref_from_data|escape}</dd> {/if} <dt>{tr}Created{/tr}</dt> <dd>{$gContent->mInfo.created|bit_short_datetime} {tr}by{/tr} {$gContent->mInfo.creator|escape}</dd> |
