FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour problem with GET
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
problem with GET
Posted: Thu Jan 12, 2017 06: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: problem with GET
Posted: Fri Jan 13, 2017 09:20 AM

Try with

SET EXACT ON

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
Re: problem with GET
Posted: Sat Jan 14, 2017 09: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
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: problem with GET
Posted: Sun Jan 15, 2017 02:41 AM
Kajot:

Just an idea

Code (fw): Select all Collapse
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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: problem with GET
Posted: 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

Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
Re: problem with GET
Posted: 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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: problem with GET
Posted: 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

Continue the discussion