コード例 #1
0
 def FactsLiteLoad(self, widget, data=None):
     self.CursorFactLiteSlected = True
     model, iter = self.TreeFactsLite.get_selection().get_selected()
     ID = model.get_value(iter, 0)
     Res1 = BD_Conect.LoadOnService(ID)
     for i in Res1:
         DatosFactura = (i[0], i[1], i[2])
     self.ServiceSelected = DatosFactura[0]
     if self.ServiceSelected > 0 and self.ServiceSelected <= 4:
         Com = " - 6 Comensales"
     elif self.ServiceSelected > 4 and self.ServiceSelected <= 5:
         Com = " - 8 Comensales"
     elif self.ServiceSelected > 5:
         Com = " - 10 Comensales"
     self.EB_S_Selected.set_text("Mesa: " + str(self.ServiceSelected) + Com)
     self.EB_S_Camarero.set_text(DatosFactura[1])
     self.EB_S_Cliente.set_text(DatosFactura[2])
     Total = 0
     self.ListSFM.clear()
     Res = BD_Conect.LoadLF(ID)
     for i in Res:
         file = (str(i[0]), str(i[1]), str(i[2]))
         Total = Total + i[1] * i[2]
         BD_Conect.AltaLista(self.TreeSFM, self.ListSFM, file)
     self.EB_S_CosteTotal.set_text(str(Total) + "€")
コード例 #2
0
    def DelService(self, widget, data=None):
        model, iter = self.TreeFactsLite.get_selection().get_selected()
        IDF = model.get_value(iter, 0)

        model, iter = self.TreeSFM.get_selection().get_selected()
        IDS = model.get_value(iter, 0)

        BD_Conect.DelLF(IDF, IDS)
        self.ListSFM.clear()
        Res = BD_Conect.LoadLF(IDF)
        Total = 0
        for i in Res:
            file = (str(i[0]), str(i[1]), str(i[2]))
            Total = Total + i[1] * i[2]
            BD_Conect.AltaLista(self.TreeSFM, self.ListSFM, file)
        self.EB_S_CosteTotal.set_text(str(Total) + "€")
コード例 #3
0
    def BuyService(self, widget, data=None):
        if self.CursorFactLiteSlected == True:
            if self.CursorServicesSelected == True:
                model, iter = self.TreeFactsLite.get_selection().get_selected()
                IDF = model.get_value(iter, 0)

                model, iter = self.TreeServicios.get_selection().get_selected()
                IDS = model.get_value(iter, 2)

                BD_Conect.InsertSF(IDF, IDS)
                self.ListSFM.clear()
                Res = BD_Conect.LoadLF(IDF)
                Total = 0
                for i in Res:
                    file = (str(i[0]), str(i[1]), str(i[2]))
                    Total = Total + i[1] * i[2]
                    BD_Conect.AltaLista(self.TreeSFM, self.ListSFM, file)
                self.EB_S_CosteTotal.set_text(str(Total) + "€")
            else:
                a = 1
        else:
            placeholder = 1