Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid character value for cast specification
Message
De
04/10/2008 04:25:22
 
 
À
03/10/2008 15:19:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01352659
Message ID:
01352742
Vues:
25
Agnes,

It seems to me that Tmplignes.tva is treated both as a numeric and as a logical field

That may be the source of your problem

logical:
> REPLACE Tmplignes.tva WITH Tarticles.tva=Tarticles.asdi

numeric

IF thiS.LISTINDEX=1
> Vtva=0
> Vasdi=0
> REPLACE Tmplignes.tva WITH Vtva
> REPLACE Tmplignes.asdi WITH Vasdi
> ENDIF


>HERE MY CODE :
>
>
>
>sele Tmplignes
> GO TOP
>
>SCAN  
>  
>  SELECT Tarticles  
>
>
> LOCATE FOR ALLTRIM(Tmplignes.CODEARTICLE)=ALLTRIM(Tarticles.codearticle)
>   
>   IF FOUND()
>          	REPLACE  Tmplignes.asdi WITH Tarticles.asdi
>       		REPLACE  Tmplignes.tva WITH Tarticles.tva=Tarticles.asdi
>         
>         Vtva=Tmplignes.tva
>         Vasdi=Tmplignes.asdi 
>         
>         IF thiS.LISTINDEX=1
>           Vtva=0
>           Vasdi=0
>           REPLACE Tmplignes.tva WITH Vtva
>           REPLACE Tmplignes.asdi WITH Vasdi
>         ENDIF
>         
>         IF thiS.LISTINDEX=2
>           Vtva=Tmplignes.tva
>           Vasdi=0
>            REPLACE Tmplignes.tva WITH Vtva
>            REPLACE Tmplignes.asdi WITH Vasdi
>         ENDIF
>         
>         IF thiS.LISTINDEX=3
>           Vtva=Tmplignes.TVA
>           Vasdi=Tmplignes.asdi 
>            REPLACE Tmplignes.tva WITH Vtva
>            REPLACE Tmplignes.asdi WITH Vasdi
>         ENDIF
>         
>     *------------------------------------
>       
>
>       Vmtbase=(Tmplignes.prix_unitaire-(Tmplignes.prix_unitaire*(Tmplignes.remise/100)))*Tmplignes.quantite
>       VMontantaxe=(Tmplignes.prix_unitaire*(1-(Tmplignes.remise/100))*Tmplignes.quantite*(Tmplignes.tva/100))
>       VmtASDI=(Tmplignes.prix_unitaire*(1-(Tmplignes.remise/100))*Tmplignes.quantite)*(1+(Tmplignes.tva/100))*(Tmplignes.asdi/100)
>
>
>      
>     *------------------------------------
>     ENDIF
>
>ENDSCAN 
>
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform