Номера | "
if( not (cursorRecord2[1] is None )) :
print "Данъчен: "+check(cursorRecord2[1])
if( not (cursorRecord2[2]=="" )) :
print "Митнически: "+check(cursorRecord2[2])
if( not (cursorRecord2[3]=="" )) :
print "Осигурителен: "+check(cursorRecord2[3])
if( not (cursorRecord2[4]=="" )) :
print "ЕКПОУ: "+check(cursorRecord2[4])
cursor.execute("select u7, u4, u3, u5, u2 from bulstatu where u4!='1111111110' and u1 = '"+company_eik+"'")
resultSet = cursor.fetchall()
if( len(resultSet)!=0 ) :
print ""
for cursorRecord in resultSet:
if( cursorRecord[2]=='ЕИК' ) :
print ""+check(cursorRecord [1])+"" + check(cursorRecord [0])+" "+check(cursorRecord [3])+""
elif ( cursorRecord[2]=='ЕГН' ):
# print ""+cursorRecord[1]+"" + cursorRecord [0]+" - "+getbulnom( cursorRecord[4], 15)+" "+cursorRecord [3]+" "
print ""+check(cursorRecord[1])+"" + check(cursorRecord [0])+""
# get_bulstat_for_EGN( cursorRecord[1] )
else:
print ""+check(cursorRecord[1])+"" + check(cursorRecord [0])+""
print ""
cursor.execute("select s8, s4, s3, s5, s7 from bulstats where s4!='999999995' and s1 = '"+company_eik+"'")
resultSet = cursor.fetchall()
if( len(resultSet)!=0 ) :
for cursorRecord in resultSet:
print ""
percent = cursorRecord[4]*1000;
percent = int(percent)
perc_10 = `int(percent/1000)`
perc_01 = `percent%1000`
if( (percent%1000) < 100 ):
perc_01 = "0"+perc_01
if( (percent%1000) < 10 ):
perc_01 = "0"+perc_01
if( (percent%1000) == 0 ):
perc_01 = "0"
if( cursorRecord[2]=='ЕИК' ) :
print ""+check(cursorRecord [1])+" " + check(cursorRecord[0])+" "+perc_10+"."+perc_01+"% "+check(cursorRecord [3])+""
else:
if( cursorRecord [1]=="" ) :
print ""+check(cursorRecord[0])+" "+perc_10+"."+perc_01+"% "+check(cursorRecord[3])+""
else:
print ""+check(cursorRecord [1])+" " + check(cursorRecord[0])+" "+perc_10+"."+perc_01+"% "+check(cursorRecord [3])+""
print ""
cursor.execute("select s1, s7 from bulstats where s4 = '"+company_eik+"'")
resultSet = cursor.fetchall()
"""if( len(resultSet)!=0 ) :
for cursorRecord in resultSet:
cursor2.execute("select n1, n5 from bulstatn where n1 = '"+cursorRecord[0]+"'")
resultSet2 = cursor2.fetchone()
if(resultSet2 is not None) :
percent = cursorRecord[1]*1000;
percent = int(percent)
perc_10 = `int(percent/1000)`
perc_01 = `percent%1000`
if( (percent%1000) < 100 ):
perc_01 = "0"+perc_01
if( (percent%1000) < 10 ):
perc_01 = "0"+perc_01
if( (percent%1000) == 0 ):
perc_01 = "0"
print ""+check(cursorRecord[0])+" "+check(resultSet2[1])+ " "+perc_10+"."+perc_01+"%"
"""
cursor.execute("select u1, u11 from bulstatu where u4 = '"+company_eik+"'")
resultSet = cursor.fetchall()
if( len(resultSet)!=0 ) :
company = []
for cursorRecord in resultSet:
try:
company.index( cursorRecord[0] )
continue
except ValueError:
company.append(cursorRecord[0])
print ""+check(cursorRecord[0])+""
cursor2.execute("select n5 from bulstatn where n1 = '"+cursorRecord[0]+"'")
resultSet2 = cursor2.fetchone()
print check(resultSet2[0])
print ""
|