Skip to content

Instantly share code, notes, and snippets.

@batok
Created December 5, 2008 19:54
Show Gist options
  • Save batok/32479 to your computer and use it in GitHub Desktop.
Save batok/32479 to your computer and use it in GitHub Desktop.
lDias = ["Ausencias", "Permisos sin Goce de Sueldo", "Incapacidades", "Incapacidades EG", "Incapacidades maternidad","Incapacidades RT", "Sueldo Pendiente"]
lCampos = ["+ausencias", "+permisos_sin_goce", "+incapacidades", "+incapacidades_eg", "+incapacidades_maternidad", "+incapacidades_rt","-sueldo_pendiente"]
dlg = wx.MultiChoiceDialog(self.parent, u"Indique lo que se va a reconocer para obtener días", u"Días", lDias)
if dlg.ShowModal() == wx.ID_OK:
sDias = dlg.GetSelections()
dlg.Destroy()
lqdias = [" %s coalesce(b.%s,0)" % (x[0],x[1:]) for i,x in enumerate(lCampos) if i in (sDias) ]
qdias = "0 as diasdescontados, "
if len(lqdias) > 0:
qdias = "%s as diasdescontados," % "".join(lqdias)[2:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment