Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Matrix rate
Message
 
À
28/06/1999 14:50:03
Dovi Gilberd
Dovtware Consulting Inc
Miami, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00234901
Message ID:
00234924
Vues:
26
Dovi.

I think it is time to sit down with a good VFP book.

>im using this function to detrmine a rate for a customer
>
>my rate table (named rates) looks like this
>
>code countyr rate1 rate2 rate n
>011575 Colombia .23 .24 .28
>
>what this function is doing so far is bringing me in the grid the correct name of the rate that im using for this customer..customer rates are preset in the customer table named long_distance.rate
>
>what is the next step to compare using the if statements that i have underneath to the number dialed to detrmine the correct price uner the corrcect name...?
>can anyone help me out here....
>
>FUNCTION getrate()
> PARAMETERS Result
>
> cRateField="long_distance.rate"
> dial="view1.dialednr"
> select rates
> set order to tag code
>
> IF LEFT(view1.dialednr,1)='0'
> SEEK LEFT(view1.dialednr,6)
> endif
>
> IF LEFT(view1.dialednr,1)="#"
> SEEK LEFT(view1.dialednr,3)
> endif
>
>
> if LEFT(view1.dialednr,1)='1'
> SEEK LEFT(view1.dialednr,4)
> ENDIF
>
>
> RETURN eval(cRateField)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform