Changeset 866
- Timestamp:
- 03/09/10 16:55:32 (5 months ago)
- Location:
- trunk/core/promogest/modules/Inventario
- Files:
-
- 2 modified
-
gui/_inventario_select.glade (modified) (1 diff)
-
ui/GestioneInventario.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/promogest/modules/Inventario/gui/_inventario_select.glade
r865 r866 396 396 </child> 397 397 <child> 398 <object class="GtkButton" id="esporta_ buoni_button">398 <object class="GtkButton" id="esporta_conquantita_button"> 399 399 <property name="label" translatable="yes">Esporta >1</property> 400 400 <property name="visible">True</property> -
trunk/core/promogest/modules/Inventario/ui/GestioneInventario.py
r865 r866 81 81 self._modifica.aggiorna_da_ana_articoli.connect('clicked', self.on_aggiorna_da_ana_articoli_clicked) 82 82 self._modifica.esporta_button.connect('clicked', self.on_esporta_button_clicked) 83 84 self._modifica.esporta_conquantita_button.connect('clicked', self.on_esporta_conquantita_button_clicked) 83 85 self._modifica.valorizza_button.connect('clicked', self.on_valorizza_button_clicked) 84 86 self._modifica.movimento_button.connect('clicked', self.on_movimento_button_clicked) … … 702 704 self.refresh() 703 705 704 def on_esporta_button_clicked(self, button): 706 def on_esporta_conquantita_button_clicked(self, button): 707 self.on_esporta_button_clicked(button=button, siquantita = True) 708 709 def on_esporta_button_clicked(self, button= None, siquantita = False): 705 710 """ Esportazione inventario in formato csv 706 711 """ … … 755 760 if invs: 756 761 for i in invs: 757 quantita = '%14.4f' % float(i.quantita or 0)758 quantita = quantita .replace('.', ',')762 quantita_ = '%14.4f' % float(i.quantita or 0) 763 quantita = quantita_.replace('.', ',') 759 764 valore = '%14.4f' % float(i.valore_unitario or 0) 760 765 valore = valore.replace('.', ',') 761 riga = ('"' + str(i.codice_articolo or '') + '",' + 762 '"' + str(i.articolo or '') + '",' + 763 '"' + quantita + '",' + 764 '"' + valore + '",' + 765 '"' + str(i.denominazione_breve_unita_base or '') + '",' + 766 '"' + str(i.codice_a_barre or '') + '",' + 767 '"' + str(i.denominazione_famiglia or '') + '",' + 768 '"' + str(i.denominazione_categoria or '') + '",'+ 769 '"' + str(i.anno or '') + '",'+ 770 '"' + str(i.id_magazzino or '') + '",'+ 771 '"' + str(i.id_articolo or '') + '",'+ 772 '"' + str(i.data_aggiornamento or '') + '"\n') 773 f.write(riga) 766 if siquantita: 767 if float(quantita_)>0: 768 riga = ('"' + str(i.codice_articolo or '') + '",' + 769 '"' + str(i.articolo or '') + '",' + 770 '"' + quantita + '",' + 771 '"' + valore + '",' + 772 '"' + str(i.denominazione_breve_unita_base or '') + '",' + 773 '"' + str(i.codice_a_barre or '') + '",' + 774 '"' + str(i.denominazione_famiglia or '') + '",' + 775 '"' + str(i.denominazione_categoria or '') + '",'+ 776 '"' + str(i.anno or '') + '",'+ 777 '"' + str(i.id_magazzino or '') + '",'+ 778 '"' + str(i.id_articolo or '') + '",'+ 779 '"' + str(i.data_aggiornamento or '') + '"\n') 780 f.write(riga) 781 else: 782 riga = ('"' + str(i.codice_articolo or '') + '",' + 783 '"' + str(i.articolo or '') + '",' + 784 '"' + quantita + '",' + 785 '"' + valore + '",' + 786 '"' + str(i.denominazione_breve_unita_base or '') + '",' + 787 '"' + str(i.codice_a_barre or '') + '",' + 788 '"' + str(i.denominazione_famiglia or '') + '",' + 789 '"' + str(i.denominazione_categoria or '') + '",'+ 790 '"' + str(i.anno or '') + '",'+ 791 '"' + str(i.id_magazzino or '') + '",'+ 792 '"' + str(i.id_articolo or '') + '",'+ 793 '"' + str(i.data_aggiornamento or '') + '"\n') 794 f.write(riga) 774 795 f.close() 796 self.fineElaborazione() 775 797 else: 776 798 fileDialog.destroy()
