1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
Subprog S_XPROMO(VALEUR)
Variable Char VALEUR()
Local Char XSELECTION(255)(10)
Local Integer XCPT
If clalev([F:XSJ])=0 : Local File XPROMLT [XSJ] : Endif
If clalev([F:XRU])=0 : Local File XPROOPE [XRU] : Endif
Link [F:XSJ] With [F:XRU]XRU0 = [F:XSJ]XCOPE As[XLNK]
Gosub XSEL_PROMO
# Affichage de la boite de sélection des promotions en fonction de la chaine construite
Repeat
Choose [XLNK]
& Where evalue([L]XSELECTION)
& Order By [F:XSJ]SALFCY Asc ; [F:XSJ]XCOPE Asc
& Using
& [F:XSJ]SALFCY Titled mess(00003,00045,1),
& [F:XSJ]XCOPE Titled mess(00070,00190,1),
& [F:XSJ]XLOPE Titled mess(00036,00105,1),
& [F:XSJ]XBPCNUM Titled mess(00078,00117,1),
& [F:XSJ]XDEBAPP Titled mess(00104,00148,1) - mess(00460,00198,1),
& [F:XSJ]XFINAPP Titled mess(00018,00002,1) - mess(00460,00198,1),
& [F:XSJ]XDEBOPE Titled mess(00104,00148,1) - mess(00070,00190,1),
& [F:XSJ]XFINOPE Titled mess(00018,00002,1) - mess(00070,00190,1)
& Sized(80,120)
& Titled mess(00553,05001,1)
If [S]status = 28 # Si on sélectionne une valeur
VALEUR = [F:XSJ]XCOPE
Elsif status = 45 # Si saisie de critères de sélection
Raz [L]XSELECTION(9)
If [F:XSJ]SALFCY <> ''
[L]XSELECTION(9) -= "and pat([F:XSJ]SALFCY,'" + [F:XSJ]SALFCY + "')"
Endif
If [F:XSJ]XCOPE <> ''
[L]XSELECTION(9) -= "and pat([F:XSJ]XCOPE,'" + [F:XSJ]XCOPE + "')"
Endif
If [F:XSJ]XLOPE <> ''
[L]XSELECTION(9) -= "and pat([F:XSJ]XLOPE,'" + [F:XSJ]XLOPE + "')"
Endif
If [F:XSJ]XBPCNUM <> ''
[L]XSELECTION(9) -= "and pat([F:XSJ]XBPCNUM,'" + [F:XSJ]XBPCNUM + "')"
Endif
Endif
Until [S]status = 28 or [S]status = 7 or [S]fstat # Sortie si sélection, click sur croix ou pas d'enregistrement
End |
Partager