diff --git a/custom/modules/EcmProducts/metadata/detailviewdefs.php b/custom/modules/EcmProducts/metadata/detailviewdefs.php
index cda22413..5c5c7d69 100644
--- a/custom/modules/EcmProducts/metadata/detailviewdefs.php
+++ b/custom/modules/EcmProducts/metadata/detailviewdefs.php
@@ -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(
diff --git a/modules/EcmProducts/DetailView.php b/modules/EcmProducts/DetailView.php
index 12fe4917..6fe8f9fb 100755
--- a/modules/EcmProducts/DetailView.php
+++ b/modules/EcmProducts/DetailView.php
@@ -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 .= "".$value['code']."
";
+}
+
+$detail->ss->assign("USAGE_LIST", $usage_list);
+
$detail->ss->assign("CREATED_BY_NAME", $focus->created_by_name);
echo $detail->display();
diff --git a/modules/EcmProducts/language/pl_pl.lang.php b/modules/EcmProducts/language/pl_pl.lang.php
index 89cf5e56..e4f128f4 100755
--- a/modules/EcmProducts/language/pl_pl.lang.php
+++ b/modules/EcmProducts/language/pl_pl.lang.php
@@ -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',
diff --git a/modules/EcmProducts/metadata/detailviewdefs.php b/modules/EcmProducts/metadata/detailviewdefs.php
index cc8c4ab4..7ea3371c 100755
--- a/modules/EcmProducts/metadata/detailviewdefs.php
+++ b/modules/EcmProducts/metadata/detailviewdefs.php
@@ -1,4 +1,5 @@
array (
- 'form' => array (
- 'buttons' => array (
- 'EDIT',
- 'DUPLICATE',
- 'DELETE',
- 'FIND_DUPLICATES',
- array (
- 'customCode' => '{$CATALOGUE_NEW}'
- ),
- array (
- 'customCode' => ''
- )
- ),
- 'hidden' => array (
- ''
- )
+$viewdefs['EcmProducts']['DetailView'] = array(
+ 'templateMeta' => array(
+ 'form' => array(
+ 'buttons' => array(
+ 'EDIT',
+ 'DUPLICATE',
+ 'DELETE',
+ 'FIND_DUPLICATES',
+ array(
+ 'customCode' => '{$CATALOGUE_NEW}'
),
- 'maxColumns' => '2',
- 'widths' => array (
- array (
- 'label' => '10',
- 'field' => '30'
- ),
- array (
- 'label' => '10',
- 'field' => '30'
- )
- ),
- 'includes' => array (
- array (
- 'file' => 'include/JSON.js'
- ),
-
- // array('file'=>'include/javascript/quicksearch.js'),
- // array('file'=>'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js'),
- array (
- 'file' => 'modules/EcmProducts/AjaxSearch/AjaxSearch.js'
- ),
- array (
- 'file' => 'modules/EcmProducts/javascript/formloader.js'
- ),
- array (
- // 'file' => 'modules/EcmProducts/javascript/MyTable.js'
- ),
- array (
- // 'file' => 'modules/EcmProducts/javascript/EcmProductDetailView.js'
- ),
- array (
- 'file' => 'modules/EcmProducts/javascript/ProductionTables.js'
- ),
- array (
- 'file' => 'modules/EcmProducts/javascript/ProductionSummary.js'
- )
- )
+ array(
+ 'customCode' => ''
+ )
+ ),
+ 'hidden' => array(
+ ''
+ )
),
-
- // array('file'=>'modules/EcmQuotes/CreateItem.js'),
- // array('file'=>'modules/EcmProducts/mintajax.js'),
- // array('file'=>'modules/EcmProducts/helper.js'),
-
- 'panels' => array (
- 'LBL_PRODUCT_INFORMATION' => array (
- array (
- 'name',
- 'assigned_user_name'
- ),
- array (
- 'code',
- 'product_active'
- ),
- array (
- 'ean',
- 'ean2'
- ),
- array (
- 'vendor_name',
- 'part_no'
- ),
- array (
- 'vendor_part_no',
- 'serial_no'
- ),
- array (
- 'brand',
- 'brand_label'
- ),
- array (
- 'production',
- 'status'
- ),
-
- // array('product_category_name','product_subcategory_name'),
- // array('product_line_name'),
- // array('sales_start_date','sales_end_date'),
- // array('manufacturer_name','parent_name'),
- // array('contact_name','website'),
- // array('vendor_name','part_no'),
- // array('vendor_part_no','serial_no'),
- array (
- 'group_ks',
- 'mainproduct_name'
- ),
- array (
- 'active',
- 'is_mainproduct'
- ),
- array (
- 'group_name',
-
- ),
+ 'maxColumns' => '2',
+ 'widths' => array(
+ array(
+ 'label' => '10',
+ 'field' => '30'
+ ),
+ array(
+ 'label' => '10',
+ 'field' => '30'
+ )
+ ),
+ 'includes' => array(
+ array(
+ 'file' => 'include/JSON.js'
+ ),
+
+ // array('file'=>'include/javascript/quicksearch.js'),
+ // array('file'=>'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js'),
+ array(
+ 'file' => 'modules/EcmProducts/AjaxSearch/AjaxSearch.js'
+ ),
+ array(
+ 'file' => 'modules/EcmProducts/javascript/formloader.js'
+ ),
+ array(
+ // 'file' => 'modules/EcmProducts/javascript/MyTable.js'
+ ),
+ array(
+ // 'file' => 'modules/EcmProducts/javascript/EcmProductDetailView.js'
+ ),
+ array(
+ 'file' => 'modules/EcmProducts/javascript/ProductionTables.js'
+ ),
+ array(
+ 'file' => 'modules/EcmProducts/javascript/ProductionSummary.js'
+ )
+ )
+ ),
+
+ // array('file'=>'modules/EcmQuotes/CreateItem.js'),
+ // array('file'=>'modules/EcmProducts/mintajax.js'),
+ // array('file'=>'modules/EcmProducts/helper.js'),
+
+ 'panels' => array(
+ 'LBL_PRODUCT_INFORMATION' => array(
+ array(
+ 'name',
+ 'assigned_user_name'
+ ),
+ array(
+ 'code',
+ 'product_active'
+ ),
+ array(
+ 'ean',
+ 'ean2'
+ ),
+ array(
+ 'vendor_name',
+ 'part_no'
+ ),
+ array(
+ 'vendor_part_no',
+ 'serial_no'
+ ),
+ array(
+ 'brand',
+ 'brand_label'
+ ),
+ array(
+ 'production',
+ 'status'
+ ),
+
+ // array('product_category_name','product_subcategory_name'),
+ // array('product_line_name'),
+ // array('sales_start_date','sales_end_date'),
+ // array('manufacturer_name','parent_name'),
+ // array('contact_name','website'),
+ // array('vendor_name','part_no'),
+ // array('vendor_part_no','serial_no'),
+ array(
+ 'group_ks',
+ 'mainproduct_name'
+ ),
+ array(
+ 'active',
+ 'is_mainproduct'
+ ),
+ array(
+ 'group_name',
+
+ ),
+ ),
+ 'LBL_PRICING_INFORMATION' => array(
+ array(
+ array(
+ 'customCode' => '{$EXCHANGE_RATE_NAME}',
+ 'label' => 'LBL_EXCHANGE_RATE_NAME'
),
- 'LBL_PRICING_INFORMATION' => array (
- array (
- array (
- 'customCode' => '{$EXCHANGE_RATE_NAME}',
- 'label' => 'LBL_EXCHANGE_RATE_NAME'
- ),
- 'custom_duty_rate'
- ),
- array (
- 'vat_name',
- 'commission_rate'
- ),
- array (
- 'purchase_price',
- 'srp_price'
- ),
- array (
- 'selling_price',
- 'srp_price_eur'
- ),
- array (
- 'fob_price',
- 'srp_promo_price'
- ),
- array (
- 'ems_price'
- )
+ 'custom_duty_rate'
+ ),
+ array(
+ 'vat_name',
+ 'commission_rate'
+ ),
+ array(
+ 'purchase_price',
+ 'srp_price'
+ ),
+ array(
+ 'selling_price',
+ 'srp_price_eur'
+ ),
+ array(
+ 'fob_price',
+ 'srp_promo_price'
+ ),
+ array(
+ 'ems_price'
+ )
+ ),
+ 'LBL_STOCK_INFORMATION' => array(
+ array(
+ array(
+ 'customCode' => '{$ORDERED}',
+ 'label' => 'Zamówień'
),
- 'LBL_STOCK_INFORMATION' => array (
- array (
- array (
- 'customCode' => '{$ORDERED}',
- 'label' => 'Zamówień'
- ),
- 'qty_per_unit'
- ),
- array (
- 'qty_in_stock',
- 'reorder_level'
- ),
- array (
- 'ems_qty_in_stock',
- 'qty_in_demand'
- ),
- array (
- array (
- 'customCode' => '{$INVENTORY_INFORMATION}',
- 'label' => 'Inventory informations'
- ),
- 'lead_time'
- ),
- array (
- 'stock_addresses'
- )
+ 'qty_per_unit'
+ ),
+ array(
+ 'qty_in_stock',
+ 'reorder_level'
+ ),
+ array(
+ 'ems_qty_in_stock',
+ 'qty_in_demand'
+ ),
+ array(
+ array(
+ 'customCode' => '{$INVENTORY_INFORMATION}',
+ 'label' => 'Inventory informations'
),
- /*
+ 'lead_time'
+ ),
+ array(
+ 'stock_addresses'
+ )
+ ),
+ /*
'LBL_SELLING_THIS_MONTH_INFORMATION' => array (
array (
'this_month_val',
@@ -322,114 +323,114 @@ $viewdefs ['EcmProducts'] ['DetailView'] = array (
'last_year_margin'
)
), */
- 'LBL_WWW_PANEL' => array (
- array (
- 'www_available',
- 'www_popular'
- ),
- array (
- 'www_price_pln',
- 'www_price_eur'
- ),
- array (
- 'www_state',
- 'www_manual_update'
- ),
- array (
- 'www_state_desc_pl',
- 'www_state_desc_en'
- )
+ 'LBL_WWW_PANEL' => array(
+ array(
+ 'www_available',
+ 'www_popular'
+ ),
+ array(
+ 'www_price_pln',
+ 'www_price_eur'
+ ),
+ array(
+ 'www_state',
+ 'www_manual_update'
+ ),
+ array(
+ 'www_state_desc_pl',
+ 'www_state_desc_en'
+ )
+ ),
+ 'LBL_DRIVERS_IMAGES' => array(
+ array(
+ array(
+ 'label' => 'LBL_PRODUCT_PICTURE',
+ 'customCode' => '{$PRODUCT_PICTURE}'
),
- 'LBL_DRIVERS_IMAGES' => array (
- array (
- array (
- 'label' => 'LBL_PRODUCT_PICTURE',
- 'customCode' => '{$PRODUCT_PICTURE}'
- ),
- array (
- 'label' => 'LBL_PACKING_FRONT_PICTURE',
- 'customCode' => '{$PACKING_FRONT_PICTURE}'
- )
- ),
- array (
- array (
- 'label' => 'LBL_DRIVER_1',
- 'customCode' => '{$DRIVER_1_DOWNLOAD}'
- ),
- array (
- 'label' => 'LBL_DRIVER_2',
- 'customCode' => '{$DRIVER_2_DOWNLOAD}'
- )
- )
+ array(
+ 'label' => 'LBL_PACKING_FRONT_PICTURE',
+ 'customCode' => '{$PACKING_FRONT_PICTURE}'
+ )
+ ),
+ array(
+ array(
+ 'label' => 'LBL_DRIVER_1',
+ 'customCode' => '{$DRIVER_1_DOWNLOAD}'
),
- 'LBL_QRCODE' => array (
- array (
- array (
- 'label' => '',
- 'customCode' => '{$QRCODE}'
- )
- )
+ array(
+ 'label' => 'LBL_DRIVER_2',
+ 'customCode' => '{$DRIVER_2_DOWNLOAD}'
+ )
+ )
+ ),
+ 'LBL_QRCODE' => array(
+ array(
+ array(
+ 'label' => '',
+ 'customCode' => '{$QRCODE}'
+ )
+ )
+ ),
+ 'LBL_LOGISTIC_INFORMATION' => array(
+ array(
+ '',
+ array(
+ 'label' => 'LBL_CARTON_DIMENSIONS_1',
+ 'customCode' => '{$CARTON_DIMENSIONS_1} x {$CARTON_DIMENSIONS_2} x {$CARTON_DIMENSIONS_3}'
+ )
+ ),
+ array(
+ 'fob_basis_name',
+ 'carton_netto_weight'
+ ),
+ array(
+ '',
+ 'carton_brutto_weight'
+ ),
+ array(
+ 'pieces_per_carton',
+ 'carton_volume_meter'
+ ),
+ array(
+ 'product_netto_weight',
+ 'unit_id'
+ ),
+ array(
+ 'product_brutto_weight',
+ 'country_of_origin'
+ ),
+ array(
+ 'packing_type_name',
+ ''
+ ),
+ array(
+ array(
+ 'label' => 'LBL_PACKING_DIMENSIONS_1',
+ 'customCode' => '{$PACKING_DIMENSIONS_1} x {$PACKING_DIMENSIONS_2} x {$PACKING_DIMENSIONS_3}'
),
- 'LBL_LOGISTIC_INFORMATION' => array (
- array (
- '',
- array (
- 'label' => 'LBL_CARTON_DIMENSIONS_1',
- 'customCode' => '{$CARTON_DIMENSIONS_1} x {$CARTON_DIMENSIONS_2} x {$CARTON_DIMENSIONS_3}'
- )
- ),
- array (
- 'fob_basis_name',
- 'carton_netto_weight'
- ),
- array (
- '',
- 'carton_brutto_weight'
- ),
- array (
- 'pieces_per_carton',
- 'carton_volume_meter'
- ),
- array (
- 'product_netto_weight',
- 'unit_id'
- ),
- array (
- 'product_brutto_weight',
- 'country_of_origin'
- ),
- array (
- 'packing_type_name',
- ''
- ),
- array (
- array (
- 'label' => 'LBL_PACKING_DIMENSIONS_1',
- 'customCode' => '{$PACKING_DIMENSIONS_1} x {$PACKING_DIMENSIONS_2} x {$PACKING_DIMENSIONS_3}'
- ),
- ''
- ),
- array (
- 'rma'
- ),
- array (
- 'boxes_per_layer',
- 'number_of_layers'
- ),
- array (
- 'boxes_per_palette',
- 'pieces_per_palette'
- ),
- array (
- 'palette_weight_brutto',
- ''
- )
- ),
- 'LBL_LOCALIZED_INFORMATION' => array (
- array (
- array (
- 'hideLabel' => true,
- 'customCode' => '
+ ''
+ ),
+ array(
+ 'rma'
+ ),
+ array(
+ 'boxes_per_layer',
+ 'number_of_layers'
+ ),
+ array(
+ 'boxes_per_palette',
+ 'pieces_per_palette'
+ ),
+ array(
+ 'palette_weight_brutto',
+ ''
+ )
+ ),
+ 'LBL_LOCALIZED_INFORMATION' => array(
+ array(
+ array(
+ 'hideLabel' => true,
+ 'customCode' => '