Beispiel #1
0
Datei: fmy.py Projekt: tedlaz/m13
def fp(poso,bar=1):
    poso = d(poso)
    tb = d(14) * d(bar)
    eis = poso * tb
    f = f13(eis)
    pf = d(f - d(0.015,3) * f)
    return d(f / tb) , d( pf / tb)
Beispiel #2
0
def fmyEtoys(etos,rundate,db):
    from utils import dbutils as dbu
    from utils.tedutils import dec as d
    xrisiId = dbu.getDbSingleVal("SELECT id from m12_xrisi WHERE xrisi='%s'" % etos, db)
    cd = dbu.getDbOneRow("SELECT cop,ono,pat,cotyp,afm,dra,pol,odo,num,tk FROM m12_co INNER JOIN m12_cotyp ON m12_cotyp.id=m12_co.cotyp_id",db) #Company Data
    co = {
           'eponymia':u'%s %s' % (cd[0],cd[1]),
           'AFM':u'%s' % cd[4],
           'Antikeimeno':u'%s' % cd[5],
           'Adress':u'%s %s %s %s' % (cd[6],cd[7],cd[8],cd[9]),
           'Tel':u''
        }
    ed = dbu.getDbRows(sqlergData1 % xrisiId, db) # Ergazomenoi Data
    l0, l1, l2 , l3 = lfmy()
    doc = td.egrDoc([l0,l1,l2,l3])
    doc.addLine(0, ['','',etos+'1231',etos,''])
    doc.addLine(1, ['',etos,cd[0],cd[1],cd[2],cd[3],cd[4],cd[5],cd[6],cd[7],cd[8],cd[9],''])
    doc.addLine(2,[u'',u'',u'',u'',u'',u'',u'',u''])
    vls = []
    for l in ed:
        fpa = d(l[11]/0.985)
        doc.addLine(3,['',l[1],'',l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],fpa,l[11],l[13],''])
        vl = {
               'Apo':u'1/1/%s' % etos,
               'Eos':u'31/12/%s' % etos,
               'Onomatep':u'%s %s' % (l[3],l[2]),
               'Patronymo':u'%s' % l[4],
               'AdrErg':u'%s, %s %s, %s' % (l[5],l[6],l[7],l[8]),
               'TelErg':u'',
               'Eid':u'%s'% l[14],
               'AFMErg':u'%s' % l[1],
               'Doy':u'',
               'At':u'',
               'ApodType':u'Μισθοί',
               'AkApod':u'%s'% gr0(l[8]),
               'Kratiseis':u'%s'% gr0(l[9]),
               'SynoloKrat':u'%s'% gr0(l[9]),
               'Katharo':u'%s' % gr0(l[10]),
               'Analogei':u'%s' % gr0(fpa),
               'Parakrat':u'%s' % gr0(l[11]),
               'Hmnia':u'%s' % rundate,
               'eea' :u'%s' % gr0(l[13]) 
               }
        vls.append(vl)
    return doc.__str__(),co,vls
Beispiel #3
0
Datei: fmy.py Projekt: tedlaz/m13
def eeap(poso,bar=1): #bar : 1 εάν ολόκληρη περίοδος 2 εάν μισή (πχ.επίδομα αδείας)
    poso = d(poso)
    tb = d(14) * d(bar)
    eis = poso * tb
    ee = eea(eis)
    return d(ee / tb)
Beispiel #4
0
Datei: fmy.py Projekt: tedlaz/m13
def eea(poso):
    poso = d(poso)
    if poso <= d(12000):
        synt = d(0)
    elif poso <= d(20000):
        synt = d(1)
    elif poso <= d(50000):
        synt = d(2)
    elif poso <= d(100000):
        synt = d(3)
    else:
        synt = d(4)
    return d(poso * synt / d(100))
Beispiel #5
0
Datei: fmy.py Projekt: tedlaz/m13
def f13(poso):
    poso = d(poso)
    ekp = d(0)
      
    if poso < d(21500):
        ekp = d(2100)
    elif poso < d(22500):
        ekp = d(2000)
    elif poso < d(23500):
        ekp = d(1900)
    elif poso < d(24500):
        ekp = d(1800)
    elif poso < d(25500):
        ekp = d(1700)
    elif poso < d(26500):
        ekp = d(1600)
    elif poso < d(27500):
        ekp = d(1500)
    elif poso < d(28500):
        ekp = d(1400)
    elif poso < d(29500):
        ekp = d(1300)
    elif poso < d(30500):
        ekp = d(1200)
    elif poso < d(31500):
        ekp = d(1100)  
    elif poso < d(32500):
        ekp = d(1000)
    elif poso < d(33500):
        ekp = d(900)
    elif poso < d(34500):
        ekp = d(800)
    elif poso < d(35500):
        ekp = d(700)
    elif poso < d(36500):
        ekp = d(600)
    elif poso < d(37500):
        ekp = d(500)        
    elif poso < d(38500):
        ekp = d(400)
    elif poso < d(39500):
        ekp = d(300)
    elif poso < d(40500):
        ekp = d(200)
    elif poso < d(41500):
        ekp = d(100)
    else:
        ekp = d(0)
    #print 'ekptosi',poso,ekp
    foros = d(0)
    if poso <= d(25000):
        foros = d(poso * d(22) / d(100))
    else:
        foros = d(5500)
        poso = poso - d(25000)
        if poso <= d(17000):
            foros += d(poso * d(32) / d(100))
        else:
            foros += d(5440)
            poso = poso - d(17000)
            foros += d(poso * d(42) / d(100))
    foros = foros - ekp
    if foros < d(0) :
        foros = d(0)
    return foros
Beispiel #6
0
Datei: fmy.py Projekt: tedlaz/m13
def eeaXrisis(poso,bar=1,xrisi=2013):
    if xrisi == 2012 or xrisi == 2013:
        return eeap(poso,bar)
    else:
        return d(0) 
Beispiel #7
0
Datei: fmy.py Projekt: tedlaz/m13
def fpXrisis(poso,bar=1,xrisi=2013):
    if xrisi == 2013:
        return  fp(poso,bar)
    else:
        return d(0),d(0)