viernes, 7 de julio de 2017

 

Planilla de empleados en power builder 12.0

En este post les comparto un aticulo con codigo fuente de planilla de empleados


  1. Diseña el siguiente formulario





  2. Código

integer pagohora,a,b,c,d
b=integer(sle_horas.text)
if rb_adm.checked=true then
            pagohora=17
                        elseif rb_gerente.checked=true then
                        pagohora=15
                        elseif rb_supervisor.checked=true then
                                   pagohora=12
                        elseif rb_empleado.checked=true then
                                   pagohora=7.8
                        end if
                        //,"#,## 0,00"
                        st_pogahora.text=string(pagohora, "#,##0.00")
                        if b>=160 then
                                   st_horasnormales.text=string(160)
                        else
                                   st_horasnormales.text=string(b)
                        end if
st_horasextras.text=string(integer(sle_horas.text) - integer(st_horasnormales.text), "#,##0.00")
st_phn.text=string(integer(st_horasnormales.text)*integer(st_pogahora.text), "#,##0.00")
c=integer(st_pogahora.text)*integer(st_horasextras.text)
d=integer(c)*0.065
st_phe.text=string(c+d, "#,##0.00")
st_tingre.text=string(integer(st_phn.text)+integer(st_phe.text), "#,##0.00")
st_essalud.text=string(integer(st_tingre.text)*(0.0435))
st_afp.text=string((integer(st_tingre.text)*(0.0783)), "#,##0.00")
st_totalegresos.text=string(integer(st_essalud.text)+integer(st_afp.text), "#,##0.00")
st_netopagar.text=string(integer(st_tingre.text)-integer(st_totalegresos.text), "#,##0.00")
Para la fecha


//st_fecha.text=string((today()),"dddd")+".."+string((today()),"mm")+"de"+string((today()),"YYYY")
st_fecha.text=string(today(),"dddd mm yyyy")
boton Nuevo

st_horasnormales.text=""
sle_horas.text=""
sle_1.text=""
sle_2.text=""
st_pogahora.text=""
st_horasextras.text=""
st_phn.text=""
st_phe.text=""
st_tingre.text=""
st_essalud.text=""
st_afp.text=""
st_totalegresos.text=""
st_netopagar.text=""
sle_3.text=""
sle_1.setfocus()

Share:

0 comentarios:

Publicar un comentario

Dudas y sugerencias aqui