*etiqu0 edition des etiquettes d'expédition
*bse clients
titre = "EDITION DES ETIQUETTES"
NIVEAU = 3
sele 1
use &cldb index &clndx1,&clndx2 alias cl automem
go bott
vcode =codecli
DO WHILE .t.
DO titre
vnom=space(30)
@ 10,2 SAY"nom client" GET vnom picture "@!"
READ
IF vnom=SPACE(30)
EXIT
endi
********************
SET ESCAP OFF
@ 6,0 CLEAR
CLEAR key
set exac off
find &vnom
set exac on
if eof()
rep ="N"
@ 10, 12 say "Ce client est inexistant "
@12,10 say" voulez vous le créer O/N " get rep PICTURE "!"
read
if rep="O"
clear automem
set format to pgfscli
append blank
replace automem
close format
vcode=vcode+1
replace cl->codecli with vcode
replace cl->nomcli with vnom,datefic with date()
wait
@ 6,0 clear
else
loop
prg="pgprcli.prg"
do pgficar
rep="O"
@ 22,10 say "Est ce le bon ? O/N "get rep picture"!"
if rep="N"
vnom=nomcli
nbe=0
fr="0"
nbbt=1
@ 15,0 clear
@ 16,2 say"client : "
@ 22,2 say "fournisseur 1 AFG 2 SAAF 3 PG 4 PA" get fr picture "9"
@ 23,2 say "nombre détiquettes" get nbbt
@ 22,0 clear
@ 22,2 say " CALLEZ LE PAPIER "
do uncar
do while nbe < nbbt
do case
case fr="1"
*label form pgetq1 for numcom=vnumcom to print
set print on
lv=0
?
? chr(27)+chr(119)+chr(49)+"             DOMAINE A. F. GROS"
? chr(27)+chr(119)+chr(48)+"  LA GARELLE Route d'Ivry"
? "             "+chr(27)+chr(69)+"21630 POMMARD "+chr(27)+chr(70)+"/ FRANCE"
? "  "+chr(15)+"Tél: 80 22 61 85"+chr(18)+"                       "+chr(15)+"FAX: 80 24 03 16"+chr(1
case fr="2"
? chr(27)+chr(119)+chr(49)+"             SA DOMAINE A. F. GROS"
case fr="3"
? chr(27)+chr(119)+chr(49)+"             SA DOMAINE PARENT"
? chr(27)+chr(119)+chr(48)+"             Place de l'Eglise"
? "  "+chr(15)+"Tél: 80 22 15 08 ou 80 22 61 85"+chr(18)+"        "+chr(15)+"FAX: 80 24 19 33"+chr(1
case fr="4"
? chr(27)+chr(119)+chr(49)+"             SA JACQUES PARENT "
? chr(27)+chr(119)+chr(48)+"             Pace de l'Eglise"
endcase
if cl->entete <>""
? chr(27)+chr(119)+chr(49)+"              "+trim(cl->entete)+" "+substr(trim(nomcli)+" "+prenomcli,1
? chr(27)+chr(119)+chr(49)+"              "+substr(trim(nomcli)+" "+prenomcli,1,32)
? chr(27)+chr(119)+chr(48)+"              "+ad1
if ad2 <>""
? "              "+ad2
lv =lv+1
if ad3 <>""
? "              "+ad3
?chr(27)+chr(69)+"              "+cp+" "+ville+chr(27)+chr(70)
? "              "+cli1
for l=1to lv+2
next l
nbe=nbe+1
enddo
set print off
ENDDO
CLOSE DATA
RETU