Línea de producto: | Microsiga Protheus® |
|---|---|
Segmento: | Servicios |
Módulo: | Financiero |
El punto de entrada F090POSTIT marca el título deseado en el momento de la selección de títulos en la Baja automática por pagar.
La devolución de este punto de entrada será el registro marcado en la tabla de selección de títulos para la baja.
Orden | Nombre | Tipo |
|---|---|---|
1 | ParamIxb[1] = cAliasSE2 | Array |
User Function F090POSTIT()
Local cPrefixo := "" // SE2->E2_PREFIXO
Local cNum := "" //SE2->E2_NUM
Local cParcela := "" //SE2->E2_PARCELA
Local cTipo := "" //SE2->E2_TIPO
Local cFornece := "" //SE2->E2_FORNECE
Local cLoja := "" //SE2->E2_LOJA
Private lRetorno:= .T.
Private aRetorno:= {}
If MsgYesNo("¿Desea marcar el título ?")
MonTela ()
cPrefixo := aRetorno[1]
cNum := aRetorno[2]
cParcela := aRetorno[3]
cTipo := aRetorno[4]
cFornece := aRetorno[5]
cLoja := aRetorno[6]
IF(lRetorno)
DbSelectArea("SE2")
DbSetOrder(1) // E2_FILIAL+E2_PREFIXO+E2_NUM+E2_PARCELA+E2_TIPO+E1_FORNECE+E1_LOJA
DbSeek(xFilial("SE2")+cPrefixo+cNum+cParcela+cTipo+cFornece+cLoja,.T.)
EndIF
Endif
Return
//--- Elabora una pantalla para selección del título que se marcará.
Static Function MonTela ()
Private cFornecedo := Space(TamSx3("E2_FORNECE")[1])
Private cLoja := Space(TamSx3("E2_LOJA")[1])
Private cParcela := Space(TamSx3("E2_PARCELA")[1])
Private cPref := Space(TamSx3("E2_PREFIXO")[1])
Private cTipo := Space(TamSx3("E2_TIPO")[1])
Private cTitulo := Space(TamSx3("E2_NUM")[1])
SetPrvt("oSelTitulos","oSay1","oSay2","oSay3","oSay4","oSay5","oSay6","oPref","oTitulo","oParcela","oTipo")
SetPrvt("oFornecedor","oLoja","oBtnConfirmar","oBtnSair")
oSelTitulo := MSDialog():New( 174,685,354,877,"Selección de títulos",,,.F.,,,,,,.T.,,,.T. )
oSay1 := TSay():New( 004,003,{||"Prefijo"},oSelTitulos,,,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,024,008)
oSay2 := TSay():New( 015,003,{||"Título"},oSelTitulos,,,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,024,008)
oSay3 := TSay():New( 027,003,{||"Cuota"},oSelTitulos,,,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,024,008)
oSay4 := TSay():New( 038,003,{||"Tipo"},oSelTitulos,,,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,024,008)
oSay5 := TSay():New( 061,003,{||"Tienda"},oSelTitulos,,,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,024,008)
oSay6 := TSay():New( 050,003,{||"Proveedor"},oSelTitulos,,,.F.,.F.,.F.,.T.,CLR_BLACK,CLR_WHITE,030,008)
oPref := TGet():New( 004,035,{|u| If(PCount()>0,cPref:=u,cPref)},oSelTitulos,057,008,'',,CLR_HBLUE,CLR_WHITE,,,,.T.,"",,,.F.,.F.,,.F.,.F.,"","cPref",,)
oTitulo := TGet():New( 015,035,{|u| If(PCount()>0,cTitulo:=u,cTitulo)},oSelTitulos,057,008,'',,CLR_HBLUE,CLR_WHITE,,,,.T.,"",,,.F.,.F.,,.F.,.F.,"","cTitulo",,)
oParcela := TGet():New( 027,035,{|u| If(PCount()>0,cParcela:=u,cParcela)},oSelTitulos,057,008,'',,CLR_HBLUE,CLR_WHITE,,,,.T.,"",,,.F.,.F.,,.F.,.F.,"","cParcela",,)
oTipo := TGet():New( 038,035,{|u| If(PCount()>0,cTipo:=u,cTipo)},oSelTitulos,057,008,'',,CLR_HBLUE,CLR_WHITE,,,,.T.,"",,,.F.,.F.,,.F.,.F.,"","cTipo",,)
oLoja := TGet():New( 061,035,{|u| If(PCount()>0,cLoja:=u,cLoja)},oSelTitulos,057,008,'',,CLR_HBLUE,CLR_WHITE,,,,.T.,"",,,.F.,.F.,,.F.,.F.,"","cLoja",,)
oFornecedo := TGet():New( 050,035,{|u| If(PCount()>0,cFornecedo:=u,cFornecedo)},oSelTitulos,057,008,'',,CLR_HBLUE,CLR_WHITE,,,,.T.,"",,,.F.,.F.,,.F.,.F.,"","cFornecedor",,)
oBtnConfir := TButton():New( 075,001,"&Confirmar",oSelTitulos,{|| ConfTT(cPref, cTitulo, cParcela, cTipo, cFornecedo, cLoja)},043,012,,,,.T.,,"",,,,.F. )
oBtnSair := TButton():New( 075,049,"&Salir",oSelTitulos,{|| CancTT()},043,012,,,,.T.,,"",,,,.F. )
oSelTitulo:lEscClose := .F. //No permite salir al pulsarse la tecla ESC.
oSelTitulo:lCentered := .T.
oSelTitulo:Activate(,,,.T.)
Return Nil
Static Function ConfTT(cTpPref, cTpTit, cTpParc, cTpTp, cTpFor, cTpLj)
Local cTmpFor := ""
Local cTmpLoj := ""
Local cTmpPar := ""
Local cTmpPre := ""
Local cTmpTip := ""
Local cTmpTit := ""
Local cTmpV := ""
cTmpFor := PADl(cTpFor ,TamSx3("E2_FORNECE")[1] ," ")
cTmpLoj := PADl(cTpLj ,TamSx3("E2_LOJA")[1] ," ")
cTmpPar := PADl(cTpParc ,TamSx3("E2_PARCELA")[1] ," ")
cTmpPre := PADl(cTpPref ,TamSx3("E2_PREFIXO")[1] ," ")
cTmpTip := PADl(cTpTp ,TamSx3("E2_TIPO")[1] ," ")
cTmpTit := PADl(cTpTit ,TamSx3("E2_NUM")[1] ," ")
cTmpV := cTmpPre+cTmpTit+cTmpPar+cTmpTip+cTmpFor+cTmpLoj
IF Empty(AllTrim(cTmpV))
lRetorno:= .F.
EndIF
aRetorno:= {}
aadd(aRetorno,cTmpPre)
aadd(aRetorno,cTmpTit)
aadd(aRetorno,cTmpPar)
aadd(aRetorno,cTmpTip)
aadd(aRetorno,cTmpFor)
aadd(aRetorno,cTmpLoj)
oSelTitulo:End()
Return Nil
Static Function CancTT()
Local cTmpFor := PADl(cTpFor ,TamSx3("E2_FORNECE")[1] ," ")
Local cTmpLoj := PADl(cTpLj ,TamSx3("E2_LOJA")[1] ," ")
Local cTmpPar := PADl(cTpParc ,TamSx3("E2_PARCELA")[1] ," ")
Local cTmpPre := PADl(cTpPref ,TamSx3("E2_PREFIXO")[1] ," ")
Local cTmpTip := PADl(cTpTp ,TamSx3("E2_TIPO")[1] ," ")
Local cTmpTit := PADl(cTpTit ,TamSx3("E2_NUM")[1] ," ")
aRetorno:= {}
aadd(aRetorno,cTmpPre)
aadd(aRetorno,cTmpTit)
aadd(aRetorno,cTmpPar)
aadd(aRetorno,cTmpTip)
aadd(aRetorno,cTmpFor)
aadd(aRetorno,cTmpLoj)
oSelTitulo:End()
Return Nil |
No hay.
No hay.