Use new possibility to provide distinct queries
authorJoey Schulze <joey@infodrom.org>
Fri, 5 Apr 2013 12:06:58 +0000 (14:06 +0200)
committerJoey Schulze <joey@infodrom.org>
Fri, 5 Apr 2013 12:06:58 +0000 (14:06 +0200)
artikel.php
ordersatz_pos.php

index e4eb956..2bb5744 100644 (file)
@@ -175,6 +175,7 @@ $mask = array(
                                            'width' => 200,
                                            'specs' => "filterUI: 's'",
                                            'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('metro_abteilung','id','name').", 0, '')",
+                                           'distinct' => "SELECT DISTINCT abteilung,metro_abteilung.name FROM metro_artikel JOIN metro_abteilung ON abteilung = metro_abteilung.id ORDER BY name",
                                            'visible' => false,
                                            ),
                              'gang' => array(
@@ -188,6 +189,7 @@ $mask = array(
                                            'width' => 70,
                                            'specs' => "ClassName: 'aligncenter', filterUI: 's'",
                                            'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('metro_vpe','id','name').", 0, '')",
+                                           'distinct' => "SELECT DISTINCT vpe,metro_vpe.name FROM metro_artikel JOIN metro_vpe ON vpe = metro_vpe.id ORDER BY name",
                                            ),
                              ),
              'edit' => array(
index e8a9135..67d300b 100644 (file)
@@ -180,12 +180,14 @@ $mask = array(
                                            'width' => 70,
                                            'specs' => "ClassName: 'aligncenter', filterUI: 's'",
                                            'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('metro_vpe','id','name').", 0, '')",
+                                           'distinct' => "SELECT DISTINCT vpe,metro_vpe.name FROM metro_artikel JOIN metro_vpe ON vpe = metro_vpe.id ORDER BY name",
                                            ),
                              'abteilung' => array(
                                            'name' => 'Abteilung',
                                            'width' => 80,
                                            'specs' => "ClassName: 'aligncenter', filterUI: 's'",
                                            'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('metro_abteilung','id','name').", 0, '')",
+                                           'distinct' => "SELECT DISTINCT abteilung,metro_abteilung.name FROM metro_artikel JOIN metro_abteilung ON abteilung = metro_abteilung.id ORDER BY name",
                                            'visible' => false,
                                            ),
                              'gang' => array(
@@ -194,6 +196,7 @@ $mask = array(
                                            'sql' => 'abteilung',
                                            'specs' => "ClassName: 'aligncenter', filterUI: 's'",
                                            'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('metro_abteilung','id','gang').", 0, '')",
+                                           'distinct' => "SELECT DISTINCT abteilung,metro_abteilung.gang FROM metro_artikel JOIN metro_abteilung ON abteilung = metro_abteilung.id ORDER BY gang",
                                            'visible' => false,
                                            ),
                              ),