Changeset 874

Show
Ignore:
Timestamp:
03/12/10 12:12:38 (5 months ago)
Author:
francesco
Message:

agiunti i filtri per pos e per magazzino nella gestione scontrini

Location:
trunk/core/promogest/modules/VenditaDettaglio
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/core/promogest/modules/VenditaDettaglio/gui/_scontrini_emessi_elements.glade

    r658 r874  
    66  <object class="GtkTable" id="scontrini_filter_table"> 
    77    <property name="visible">True</property> 
    8     <property name="n_rows">3</property> 
     8    <property name="n_rows">5</property> 
    99    <property name="n_columns">2</property> 
    1010    <property name="row_spacing">3</property> 
     
    113113      </packing> 
    114114    </child> 
     115    <child> 
     116      <object class="GtkLabel" id="mag_label"> 
     117        <property name="visible">True</property> 
     118        <property name="label" translatable="yes">Mag/P.V.</property> 
     119      </object> 
     120      <packing> 
     121        <property name="top_attach">3</property> 
     122        <property name="bottom_attach">4</property> 
     123        <property name="x_options">GTK_FILL</property> 
     124      </packing> 
     125    </child> 
     126    <child> 
     127      <object class="GtkLabel" id="pos_label"> 
     128        <property name="visible">True</property> 
     129        <property name="xpad">3</property> 
     130        <property name="label" translatable="yes">Punto cassa</property> 
     131      </object> 
     132      <packing> 
     133        <property name="top_attach">4</property> 
     134        <property name="bottom_attach">5</property> 
     135        <property name="x_options">GTK_FILL</property> 
     136      </packing> 
     137    </child> 
     138    <child> 
     139      <object class="GtkComboBox" id="id_magazzino_filter_combobox"> 
     140        <property name="width_request">200</property> 
     141        <property name="visible">True</property> 
     142      </object> 
     143      <packing> 
     144        <property name="left_attach">1</property> 
     145        <property name="right_attach">2</property> 
     146        <property name="top_attach">3</property> 
     147        <property name="bottom_attach">4</property> 
     148        <property name="x_options">GTK_SHRINK | GTK_FILL</property> 
     149        <property name="y_options"></property> 
     150      </packing> 
     151    </child> 
     152    <child> 
     153      <object class="GtkComboBox" id="id_pos_filter_combobox"> 
     154        <property name="width_request">200</property> 
     155        <property name="visible">True</property> 
     156      </object> 
     157      <packing> 
     158        <property name="left_attach">1</property> 
     159        <property name="right_attach">2</property> 
     160        <property name="top_attach">4</property> 
     161        <property name="bottom_attach">5</property> 
     162        <property name="x_options">GTK_SHRINK | GTK_FILL</property> 
     163        <property name="y_options"></property> 
     164      </packing> 
     165    </child> 
    115166  </object> 
    116167</interface> 
  • trunk/core/promogest/modules/VenditaDettaglio/ui/GestioneScontrini.py

    r865 r874  
    2323from promogest.ui.utils import * 
    2424from promogest.ui import utils 
     25from promogest.modules.VenditaDettaglio.ui.VenditaDettaglioUtils import fillComboboxPos 
    2526 
    2627from promogest.lib.HtmlHandler import createHtmlObj, renderTemplate, renderHTML 
     
    146147        else: 
    147148            self.filters.a_data_filter_entry.set_text(self_aData) 
     149        fillComboboxMagazzini(self.filters.id_magazzino_filter_combobox) 
     150        if hasattr(Environment.conf.VenditaDettaglio, "magazzino"): 
     151            findComboboxRowFromStr(self.filters.id_magazzino_filter_combobox, Environment.conf.VenditaDettaglio.magazzino,2) 
     152        fillComboboxPos(self.filters.id_pos_filter_combobox) 
     153        if hasattr(Environment.conf.VenditaDettaglio, "puntocassa"): 
     154            findComboboxRowFromStr(self.filters.id_pos_filter_combobox, Environment.conf.VenditaDettaglio.puntocassa,2) 
     155 
    148156 
    149157        self.refreshHtml() 
     
    153161        # Annullamento filtro 
    154162        self.filters.id_articolo_filter_customcombobox.set_active(0) 
     163        if hasattr(Environment.conf.VenditaDettaglio, "magazzino"): 
     164            findComboboxRowFromStr(self.filters.id_magazzino_filter_combobox, Environment.conf.VenditaDettaglio.magazzino,2) 
     165        if hasattr(Environment.conf.VenditaDettaglio, "puntocassa"): 
     166            findComboboxRowFromStr(self.filters.id_pos_filter_combobox, Environment.conf.VenditaDettaglio.puntocassa,2) 
     167 
    155168        self.filters.da_data_filter_entry.setNow() 
    156169        self.filters.a_data_filter_entry.setNow() 
     
    163176        daData = stringToDate(self.filters.da_data_filter_entry.get_text()) 
    164177        aData = stringToDateBumped(self.filters.a_data_filter_entry.get_text()) 
     178        idPuntoCassa = findIdFromCombobox(self.filters.id_pos_filter_combobox) 
     179        idMagazzino = findIdFromCombobox(self.filters.id_magazzino_filter_combobox) 
     180 
    165181        self.filterss.numRecords = TestataScontrino().count(idArticolo=idArticolo, 
    166182                                                                      daData=daData, 
    167                                                                       aData=aData) 
     183                                                                      aData=aData, 
     184                                                                      idMagazzino = idMagazzino, 
     185                                                                      idPuntoCassa = idPuntoCassa) 
    168186        self.filterss._refreshPageCount() 
    169187 
     
    172190                                                     daData=daData, 
    173191                                                     aData=aData, 
     192                                                     idMagazzino = idMagazzino, 
     193                                                     idPuntoCassa = idPuntoCassa, 
    174194                                                     offset=self.filterss.offset, 
    175195                                                     batchSize=self.filterss.batchSize)