Пример #1
0
    def LeeMaqSpre(self, iS):
        if iS.peek()!= 26:
            while(True):
                cod= ''
                getline(iS,cod,'|')
                ud= ''
                getline(iS,ud,'|')
                if ud.find('%')<len(ud):
                    cod= "%" + cod
                    ud= ""

                tit= ''
                getline(iS,tit,'|')
                precios= ''
                getline(iS,precios,'\n')
                pre= ''
                pos= precios.find('|')
                if pos<1000:
                    pre= precios.substr(0,pos)
                else:
                    pre= precios.substr(0,len(precios)-1)
                elem= elementary_price.ElementaryPrice(cod,tit,ud,atof(pre.c_str()),maq)
                elem.texto_largo= tit
                Append(elem)
                if(iS.peek() == 26): break

        resto= ''
        getline(iS,resto,'\n')
Пример #2
0
 def __init__(self, cod="ObraSinCod", tit="ObraSinTit"):
     super(Obra, self).__init__(cod, tit, 1, 1)
     elem = elementary_price.ElementaryPrice("SINDESCO",
                                             basic_types.sin_desc_string,
                                             "", 1.0, basic_types.mat)
     self.precios.Elementales().Append(elem)
     self.percentages = pc.Percentages()
Пример #3
0
    def LeeBC3(self, els):
        if not els.empty():
            if verborrea>2:
                logging.info("Cargando precios elementales." + '\n')
            sz_inicial= len(self)
            el= elementary_price.ElementaryPrice()
            for i in self:
                el.LeeBC3(els.GetDatosElementaryPrice(i))
                Append(el)

            num_agregados= len(self)-sz_inicial
            if num_agregados != els.size():
                lmsg.error("¡Errornot , pasaron: " + els.size()
                          + " precios elementales y se cargaron "
                          + num_agregados+ '\n')
            if verborrea>2:
                logging.info("Cargados " + els.size() + " precios elementales. " + '\n')