Set column type to numeric so that EQ filtering is possible
[misc/hallinta-metro] / artikel.php
index e4eb956..ccaefb0 100644 (file)
@@ -130,6 +130,8 @@ $mask = array(
                              'artnr' => array(
                                            'name' => 'ArtNr',
                                            'width' => 60,
+                                           'type' => 'number',
+                                           'specs' => "decPlaces: 0, thouSep: '', filterUI: 't='",
                                            ),
                              'menge' => array(
                                            'name' => 'Menge',
@@ -175,6 +177,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 +191,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(