Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: naveed ahmad
  Where is naveed ahmad?
 peshawar
 Pakistan
 naveed ahmad
 To: Kulwant Singh
  Where is Kulwant Singh?
 Shimla
 India
 Kulwant Singh
 Tags
Subject: RE: need help for discount protection
Thread ID: 393840 Message ID: 393882 # Views: 35 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Wednesday, December 25, 2013 8:41:24 AM         
   


> > hi Experts.
> > i want to protect discount in invoice i mean when customer give a greater discount to given range then message appear to inform him. and run after his permission on yes/no.
> > but have not idea to solve it.
> > please give me some idea to solve it.
> > thanks with kindness.
> > regards.
>
> If the operator is entering the Discount figure in a Text Box For example, in the valid of the text box you can enter
>
>
MaxDisc = YOUR_MAX_DISCOUNT_LIMIT &&& you can set it in the Menu / Rate list etc
> If this.value > MaxDisc
> mAns = MESSAGEBOX( "Sure You want to allow this?", 4 + 32 + 256, "Ah! Discount is greater than " + str(MaxDisc)) 
> IF mAns = 6
> ** Code for Yes...Go Ahead
> ELSE
> *** Code for No...Permission Not Granted
> ENDIF
> endif
> 

>
>
>
> kulwant
> (Help Save the TIGER. Save Wildlife. Live & let Live)

Dear i am facing one problem on yes code it works proper but when gives less then given range then discount values not shows. what wrong with this?

Local lndisrng, lntot, lndisval, lndis

lndisrng = Thisform.txt_disrnge.Value
lndis = This.Value
If This.Value > lndisrng
mAns = Messagebox("Do you want to allow this ?",4 +32 + 256, " Discount is greater then" + Str(lndisrng))
If mAns = 6
lntot = Thisform.txt_total.Value
lndisval = lntot*lndis/100
Thisform.txt_disval.Value = lndisval
Thisform.txt_net.Value = lntot - lndisval
Else
Messagebox("Permission not Granted")


Return 0

Endif
Endi

please guide me.
thanks
regards.

ENTIRE THREAD

need help for discount protection Posted by naveed ahmad @ 12/24/2013 1:40:12 PM
RE: need help for discount protection Posted by Kulwant Singh @ 12/24/2013 4:37:24 PM
RE: need help for discount protection Posted by naveed ahmad @ 12/25/2013 8:15:02 AM
RE: need help for discount protection Posted by naveed ahmad @ 12/25/2013 8:41:24 AM
RE: need help for discount protection Posted by Kulwant Singh @ 12/25/2013 10:38:15 AM
RE: need help for discount protection Posted by naveed ahmad @ 12/25/2013 11:11:07 AM
RE: need help for discount protection Posted by naveed ahmad @ 12/25/2013 12:12:21 PM
RE: need help for discount protection Posted by Kulwant Singh @ 12/25/2013 3:47:40 PM
RE: need help for discount protection Posted by Ayaz Ahmad @ 12/25/2013 3:54:32 PM