Exemplo n.º 1
0
    def roundFieldValue(self, n, table, field):
        from pineboolib.fllegacy.FLSqlConnections import FLSqlConnections
        tmd = FLSqlConnections().database().manager().metadata(table)
        if not tmd:
            return 0
        fmd = tmd.field(field)
        if not fmd:
            if tmd and not tmd.inCache():
                del tmd
            return 0

        ret = self.buildNumber(n, 'f', fmd.partDecimal())
        if tmd and not tmd.inCache():
            del tmd
        return ret
Exemplo n.º 2
0
    def roundFieldValue(self, n, table, field):
        from pineboolib.fllegacy.FLSqlConnections import FLSqlConnections
        tmd = FLSqlConnections().database().manager().metadata(table)
        if not tmd:
            return 0
        fmd = tmd.field(field)
        if not fmd:
            if tmd and not tmd.inCache():
                del tmd
            return 0

        ret = self.buildNumber(n, 'f', fmd.partDecimal())
        if tmd and not tmd.inCache():
            del tmd
        return ret