problem with GET

problem with GET

Postby kajot » Thu Jan 12, 2017 6:20 pm

when I enter net_7=100.00 , I getting vat_7=8.00
I can't changed vat_7=8.01 because always it's changin on 8.00

my source

pSTOPA_7:='8'

@100, 50 SAY "Netto:" OF oDlg PIXEL
@100, 100 GET oNet_7 VAR pNET_7 picture '999,999.99' OFoDlg PIXEL ;

@100, 150 SAY "VAT:" OF oDlg PIXEL
@100, 180 GET oVAT_7 VAR pVAT_7 picture '999,999.99' OFoDlg PIXEL ;
when(eval({|| pVAT_7 :=round(val(pSTOPA_7)/100*pNET_7,2), oVAT_7:refersh(),.t. }))
best regards
kajot
User avatar
kajot
 
Posts: 332
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: problem with GET

Postby Antonio Linares » Fri Jan 13, 2017 9:20 am

Try with

SET EXACT ON
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: problem with GET

Postby kajot » Sat Jan 14, 2017 9:55 pm

I can not manually enter pVAT_22 because it is always
calculated from the formula in the block {|| pVAT_22=round(0.23*pNET_22,2)}
best regards
kajot
User avatar
kajot
 
Posts: 332
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: problem with GET

Postby Armando » Sun Jan 15, 2017 2:41 am

Kajot:

Just an idea

Code: Select all  Expand view

when(eval({|| pVAT_7 :=round(ROUND(val(pSTOPA_7),2) / 100 * pNET_7,2), oVAT_7:refersh(),.t. }))
 


Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3061
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: problem with GET

Postby Enrico Maria Giordano » Sun Jan 15, 2017 10:41 am

Try using VALID of oNet_7 instead of WHEN of oVAT_7. WHEN is executed only on dialog init. It's not like Clipper where WHEN was executed on focus change. You can try oVAT_7:bGotFocus too.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: problem with GET

Postby kajot » Sun Jan 15, 2017 11:24 am

sometimes I need to manually correct amount pVAT_7
and I do not want to was calculated by {|| pVAT_7= .... }
best regards
kajot
User avatar
kajot
 
Posts: 332
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: problem with GET

Postby Enrico Maria Giordano » Sun Jan 15, 2017 11:41 am

Now I'm clear. You can calculate pVAT_7 only if it's empty. Or you can add a checkbox to disable the automatic calculation.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 93 guests