FUNCTION SegundaPantalla(nVlrTot)
LOCAL J := 1, nNroFil := 0, nVlrArt := 0, cNomArt := 0 , oVlrTot
LOCAL nNroReg := LEC->( RECCOUNT() )
LOCAL nNroPan := 0
LOCAL aPanWin := FW_GetAllMonitors()
LOCAL nAncPan := 1024
LOCAL nAltPan := 680
LOCAL nAjuAn1 := 0.55
LOCAL nAjuAn2 := 0.60
LOCAL nAjuAn3 := 0.80
LOCAL oMonAct, oGrpDet , oFont
LOCAL nLinPan := 0 , vConBrw := {}
LOCal nAncExe := 1300
localizaRegistro("CAJ","cCodigoCaj",M->cCajIni)
try
nNroPan := VAL(getCampoRS("CAJ","cPreSerCaj",NIL))
if nNroPan == 0
nNroPan := 2
endif
catch
nNroPan := 2
end
FOR J := 1 TO LEN(aPanWin)
IF !( aPanWin[J]:LPRIMARY )
nAltPan := aPanWin[J]:NHEIGHT
nAncPan := aPanWin[J]:NWIDTH
ENDIF
NEXT
IF nAncPan < 1300
DEFINE FONT oFont NAME "Arial Narrow" SIZE 12, 40 BOLD
ELSE
DEFINE FONT oFont NAME "Arial Narrow" SIZE 14, 55 BOLD
ENDIF
nAltPan := nAltPan - 20
IF M->oDlgSegPan <> NIL
LEC->( DBGOBOTTOM() )
oBrwConPan:refresh()
IF nAncPan < 1300
@ nAltPan-80,nAncPan-225 SAY oVlrTot VAR nVlrTot PICT "999,999,999,999.99" SIZE 200,45 PIXEL FONT oFont OF oDlgSegPan CENTER ;
COLOR RGB(247,144,39),cColorFondo
ELSE
@ nAltPan-85,nAncPan*nAjuAn3 SAY oVlrTot VAR nVlrTot PICT "999,999,999,999.99" SIZE 250,60 PIXEL FONT oFont OF oDlgSegPan CENTER ;
COLOR RGB(247,144,39),cColorFondo
ENDIF
RETURN
ENDIF
AADD( vConBrw,{ "LEC->CNOMBREART", "DESCRIPCION" , REPL("X",24) , .F., IF(nAncPan<nAncExe,50,80) ,NIL,NIL,NIL,"I" } )
AADD( vConBrw,{ "TRANS(LEC->nDesTotMov,'999.99')", "DESCUENTO" , REPL("X",12) , .F., IF(nAncPan<nAncExe,14,18) ,NIL,NIL,NIL,"I" } )
AADD( vConBrw,{ "TRANS( LEC->NCANTIDMOV,'999,999,999.999' )", "CANTIDAD" , REPL("X",10) , .F., IF(nAncPan<nAncExe,12,20) ,NIL,NIL,NIL,"D" } )
AADD( vConBrw,{ "IF(LEC->NCANTIDMOV==0,'0',TRANS( nVlrNet(.F.,LEC->nCantidMov,LEC->nPreUniMov,LEC->nDesTotMov,"+;
"LEC->nDesctoMov,LEC->nImpIvaMov,LEC->nImpConMov)/LEC->NCANTIDMOV,'999,999,999,999.99' ) )" ,;
"VALOR UNIDAD" , REPL("X",16) , .F., IF(nAncPan<nAncExe,18,22) ,NIL,NIL,NIL,"D" } )
AADD( vConBrw,{ "TRANS( nVlrNet(.F.,LEC->nCantidMov,LEC->nPreUniMov,LEC->nDesTotMov,"+;
"LEC->nDesctoMov,LEC->nImpIvaMov,LEC->nImpConMov) ,'999,999,999,999.99' )",;
"VALOR TOTAL" , REPL("X",16) , .F., IF(nAncPan<nAncExe,18,22) ,NIL,NIL,NIL,"D" } )
LEC->( DBGOTOP() )
DEFINE DIALOG oDlgSegPan SIZE nAncPan,nAltPan PIXEL TRUEPIXEL TITLE "Estimado cliente favor verificar su compra"
@ 10,0 GROUP oGrpDet TO nAltPan-100, nAncPan-10 NOBORDER PIXEL
//RGB(114,192,70),RGB(0,112,188) CLR_BLUE
IF nAncPan < nAncExe
@ nAltPan-40,20 SAY "Software RUSSOFT ERP by RusSoft Ltda. Tel. # 316 5229528" ;
SIZE 600,30 PIXEL OF oDlgSegPan FONT M->oFonAc6 COLOR RGB(0,112,188) // RGB(247,144,39)
@ nAltPan-80,nAncPan-400 SAY "Valor Total : $ " SIZE 250,45 PIXEL OF oDlgSegPan FONT oFont COLOR RGB(114,192,70)
@ nAltPan-80,nAncPan-225 SAY oVlrTot VAR nVlrTot PICT "999,999,999,999.99" SIZE 200,45 PIXEL FONT oFont OF oDlgSegPan CENTER ;
COLOR RGB(247,144,39),cColorFondo
ELSE
@ nAltPan-40,20 SAY "Software RUSSOFT ERP by RusSoft Ltda. Tel. # 316 5229528" ;
SIZE 600,30 PIXEL OF oDlgSegPan FONT M->oFonAc6 COLOR RGB(0,112,188) // RGB(247,144,39)
//RGB(114,192,70),RGB(0,112,188) CLR_BLUE
//M->oFonAc6
@ nAltPan-85,nAncPan*nAjuAn2 SAY "Valor Total : $ " SIZE 250,60 PIXEL OF oDlgSegPan FONT oFont COLOR RGB(114,192,70)
@ nAltPan-85,nAncPan*nAjuAn3 SAY oVlrTot VAR nVlrTot PICT "999,999,999,999.99" SIZE 250,60 PIXEL FONT oFont OF oDlgSegPan CENTER ;
COLOR RGB(247,144,39),cColorFondo
ENDIF
ACTIVATE DIALOG oDlgSegPan NOMODAL ON INIT ( FW_GetMonitor( nNroPan ):Center( oDlgSegPan ) , creaBrowseLec(vConBrw,oGrpDet,nAncPan) )
MSGWAIT("Activando segunda pantalla","Russoft ERP",0.1)
RETURN
//*****************************************************************************
FUNCTION creaBrowseLec(vConBrw,oGrpDet,nAncPan)
M->oBrwConPan := BrowseConsulta( vConBrw, oGrpDet, "LEC",;
"",; // EliminaLec(oGetArt,oBrwConFw2)
"",;
"",;
NIL,1,NIL,IF(PARAMETRO(164),NIL,"COLOR MARRON") ;
,IF(PARAMETRO(164),NIL,"FONDO"),6, nAncPan)
RETURN .T.
//**************************************************************************************