diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-12 16:13:36 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-12 16:13:36 +0100 |
| commit | 77483b34115f0f6f71cfdea3069c4aca1bb30a7e (patch) | |
| tree | 3db4e34133c7a6888a03b373b326c3cd2d095ece /templates | |
| parent | 76308cf0c9fcf20f12f14c0231601eb6fd6c120f (diff) | |
| download | stock-77483b34115f0f6f71cfdea3069c4aca1bb30a7e.tar.gz stock-77483b34115f0f6f71cfdea3069c4aca1bb30a7e.tar.bz2 stock-77483b34115f0f6f71cfdea3069c4aca1bb30a7e.zip | |
stock: BOM view uses linked_title/linked_data; loadXrefInfo only enriches part_size
Component title and description in BOM view templates (view_xref_bom_item,
view_xref_bomprt_item, print_bom) now use linked_title/linked_data from the
lc_linked JOIN in loadContent() — same pattern as the supplier name fix.
StockAssembly::loadXrefInfo() drops the title/data enrichment loop (now redundant)
and only queries for part_size/part_size_ext from the PRT xref. array_column
replaced with array_map to reliably call ArrayAccess offsetGet on LibertyXref objects.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/print_bom.tpl | 4 | ||||
| -rw-r--r-- | templates/stockassembly/view_xref_bom_item.tpl | 4 | ||||
| -rw-r--r-- | templates/stockassembly/view_xref_bomprt_item.tpl | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/templates/print_bom.tpl b/templates/print_bom.tpl index ece3cac..a98f4c1 100644 --- a/templates/print_bom.tpl +++ b/templates/print_bom.tpl @@ -34,12 +34,12 @@ <td>{$posInGroup}</td> <td> {if $row.xref > 0} - <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$row.xref|escape}">{$row.xref_title|default:$row.xref|escape}</a> + <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$row.xref|escape}">{$row.linked_title|default:$row.xref|escape}</a> {else} {/if} </td> - <td>{$row.xref_data|escape}</td> + <td>{$row.linked_data|escape}</td> <td> {$row.xkey|escape} {if $row.item eq 'PRT' && $row.part_size} of {$row.part_size|escape}{if $row.part_size_ext} {$row.part_size_ext|escape}{/if}{/if} diff --git a/templates/stockassembly/view_xref_bom_item.tpl b/templates/stockassembly/view_xref_bom_item.tpl index 1ed0a95..6dfd627 100644 --- a/templates/stockassembly/view_xref_bom_item.tpl +++ b/templates/stockassembly/view_xref_bom_item.tpl @@ -2,12 +2,12 @@ <tr class="{cycle values="even,odd"}"> <td> {if $xrefInfo.xref > 0} - <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$xrefInfo.xref|escape}">{$xrefInfo.xref_title|default:$xrefInfo.xref|escape}</a> + <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$xrefInfo.xref|escape}">{$xrefInfo.linked_title|default:$xrefInfo.xref|escape}</a> {else} {/if} </td> - <td>{$xrefInfo.xref_data|escape}</td> + <td>{$xrefInfo.linked_data|escape}</td> <td>{$xrefInfo.xkey|escape}</td> <td>{$xrefInfo.xkey_ext|escape}</td> {if $xrefAllowEdit} diff --git a/templates/stockassembly/view_xref_bomprt_item.tpl b/templates/stockassembly/view_xref_bomprt_item.tpl index 002ae89..c066678 100644 --- a/templates/stockassembly/view_xref_bomprt_item.tpl +++ b/templates/stockassembly/view_xref_bomprt_item.tpl @@ -2,12 +2,12 @@ <tr class="{cycle values="even,odd"}"> <td> {if $xrefInfo.xref > 0} - <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$xrefInfo.xref|escape}">{$xrefInfo.xref_title|default:$xrefInfo.xref|escape}</a> + <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$xrefInfo.xref|escape}">{$xrefInfo.linked_title|default:$xrefInfo.xref|escape}</a> {else} {/if} </td> - <td>{$xrefInfo.xref_data|escape}</td> + <td>{$xrefInfo.linked_data|escape}</td> <td>{$xrefInfo.xkey|escape}{if $xrefInfo.part_size} of {$xrefInfo.part_size|escape}{if $xrefInfo.part_size_ext} {$xrefInfo.part_size_ext|escape}{/if}{/if}</td> <td>{$xrefInfo.xkey_ext|escape}</td> {if $xrefAllowEdit} |
