"I'm component in" list in Product DetailView

This commit is contained in:
2025-05-09 17:38:55 +00:00
parent f1a0b7be5e
commit 21ab2d0962
4 changed files with 383 additions and 355 deletions

View File

@@ -639,6 +639,16 @@ $viewdefs['EcmProducts']['DetailView'] = array(
)
)
),
'LBL_USAGE_PANEL' => array(
array(
array(
'name' => 'usage_list',
'hideLabel' => true,
'allCols' => true,
'customCode' => '{$USAGE_LIST}'
)
)
),
'LBL_PRODUCTION_PANEL' => array(
array(
array(

View File

@@ -313,6 +313,14 @@ $detail->ss->assign("DIV_DESC_CARD",$desc);
//Added for Components
global $current_user;
$ul= $focus->getProductUsingComponent();
$usage_list = '';
foreach($ul as $key => $value) {
$usage_list .= "<a target='_blank' href='index.php?module=EcmProducts&action=DetailView&record=".$value['id']."'>".$value['code']."</a><br>";
}
$detail->ss->assign("USAGE_LIST", $usage_list);
$detail->ss->assign("CREATED_BY_NAME", $focus->created_by_name);
echo $detail->display();

View File

@@ -52,6 +52,7 @@ $mod_strings = array (
'LBL_BRAND' => 'Marka',
'LBL_BRAND_LABEL' => 'Indeks etykiety',
'LBL_PRODUCTION_PANEL' => 'Elementy produkcji',
'LBL_USAGE_PANEL' => 'Użycie jako komponent',
'LBL_ACTIONS' => 'Czynności',
'LBL_QRODE' => 'QR',
'LBL_SELLING_Q1_INFORMATION' => 'Sprzedaż Q1',

View File

@@ -1,4 +1,5 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
@@ -552,6 +553,15 @@ $viewdefs ['EcmProducts'] ['DetailView'] = array (
)
)
),
'LBL_PRODUCTION_PANEL' => array(
array(
array (
'name' => 'usage_list',
'hideLabel' => true,
'customCode' => '${USAGE_LIST}'
)
)
),
'LBL_PRODUCTION_PANEL' => array(
array(
array(
@@ -584,4 +594,3 @@ $viewdefs ['EcmProducts'] ['DetailView'] = array (
)
)
);
?>