#include "FiveWin.ch"
#include "ord.ch"
Function euros(nnumres, onumres, nptasti, optasti,;
ncapitapts, ocapitapts, neuti, oeuti, ncapitaeu, ocapitaeu)
local oDlg
local oGet1, oGet2, oGet3, oGet4, oGet5
local cVar1, cVar2, cVar3, cVar4, cVar5
local lActive := .f.
cVar1:= nNumres //sat->num_resgua
cVar2:= nPtasti //sat->valor_resg
cVar3:= nCapitapts //sat->cap_soc_ap
cVar4:= nEuti //sat->eures
cVar5:= nCapitaeu //sat->eucap
define dialog oDlg title "From Code" pixel size 400,300
@10, 20 SAY "Nº de títulos" OF odlg PIXEL
[color=#FF4000] @10, 90 GET oGet1 VAR cVar1 OF odlg picture "999,999,999" RIGHT ;
SIZE 60,12 PIXEL UPDATE ;
VALID Eval ( { || IF (cVar1 = 0, (cVar2:=cVar2), .F. ), ;
(cVar3,( cVar3:=cVar1*cVar2), oGet3:Refresh(), .T. ) } )[/color]
@ 30,20 SAY "Valor pts " OF odlg PIXEL
[color=#FF0000] @ 30,90 get oGet2 var cVar2 of oDlg pixel size 60,12 picture "999,999,999" RIGHT UPDATE;
VALID Eval ( { || IF (cVar1 = 0, (cVar2:=cVar2), .F. ), ;
(cVar3,( cVar3:=cVar1*cVar2), oGet3:Refresh(), .T. ) } )
[/color]
@ 50,20 SAY "Capital social pts " OF odlg PIXEL
[color=#FF0000]@ 50,90 get oGet3 var cVar3 of oDlg pixel size 60,12 picture "9,999,999,999" RIGHT UPDATE;
VALID Eval ( { || IF (cVar1 = 0, (cVar3:=cVar3), .F. ), ;
(cVar3,( cVar3:=cVar1*cVar2), oGet3:Refresh(), .T. ) } )[/color]
@ 70,20 SAY "Valor euros" OF odlg PIXEL
[color=#FF0000] @ 70,90 get oGet4 var cVar4 of oDlg pixel size 60,12 picture "9,999,999.99" RIGHT UPDATE;
VALID Eval ( { || IF (cVar1 = 0, (cVar4:=cVar4), .F. ), ;
(cVar5,( cVar5:=cVar1*cVar4), oGet5:Refresh(), .T. ) } )[/color]
@90,20 SAY "Capital social euros" OF odlg PIXEL
@90,90 get oGet5 var cVar5 of oDlg pixel size 60,12 picture "9,999,999.99" RIGHT
@110,20 BUTTON "Aceptar" OF oDlg SIZE 40,20 PIXEL ACTION (oDlg:end())
activate dialog oDlg centered
return nil