Salut
Le titre explique déjà presque tout, c'est un programme de gestion de caisse.
un programme codé en IRC mais rien a y voir avec le chat.
Bien sur, il y aura une autre version encore meilleur mais bon voilà un début.
Comme vous voyez dans la capture il y a à l'ouverture du programme le solde actuel
de la caisse avec cinq boutons, recette, dépense, recherche (recherche de données),
supprimer une donnée, et quitter.
J'ai prévu les erreurs, comme valider sans remplir toutes les données, mettre une phrase
au lieu d'un montant, mettre des dates invalide (exp : 30/02/2008 ou 31/04/2008),
essayer d'effectuer une dépense avec un montant supérieur au solde, etc.
Après avoir saisi les données (recettes et dépenses), dans recherche vous mettez
un intervalle de dates pour filtrer les données, ensuite vous pourrez exporter
en Excel pour avoir la possibilité d'imprimer.
Source / Exemple :
;______________Run______________________
on *:start:{
if ($exists(remote.ini)) {
.remove remote.ini
unset %exel
}
wg1
}
;______________Alias______________________
alias donnee {
if ($did(2).state) {
var %i 0,%l $calc($numpe - 1)
while (%i != %l) {
inc %i
tokenize 149 $readini($scriptdirwge.data,recette,%i)
if ($1 != supprimé) did -a $dname 6 N° %i du $2 $4 $3 N°BR $1
}
}
else {
var %i 0,%l $calc($numps - 1)
while (%i != %l) {
inc %i
tokenize 149 $readini($scriptdirwge.data,depense,%i)
if ($1 != supprimé) did -a $dname 6 N° %i du $2 $4 $3 N°PC $1
}
}
}
alias suppsel {
if ($did(6).seltext) {
var %select $iif($did(2).state,recette,depense),%m
tokenize 32 $did(6).seltext
%m = $iif(%select == recette,$chr(45) $5,$chr(43) $5)
writeini $scriptdirwge.data %select $2 supprimé
writeini $scriptdirwge.data solde solde $calc($solde %m)
}
}
alias date did -ra $dname 16 * Veuillez mettre une date valide
alias wDLL return dll $qt($scriptdirdll's/mdx.dll)
alias numpe return $readini($scriptdirwge.data,nump,numpe)
alias numps return $readini($scriptdirwge.data,nump,numps)
alias solde return $readini($scriptdirwge.data,solde,solde)
alias wg1 dialog -md WGmain WGmain
alias wg2 dialog -md Depense Depense
alias wg3 dialog -md Recette Recette
alias wg4 dialog -md Recherche Recherche
alias wg5 dialog -md Suppression Suppression
;__________________Main_________________
dialog WGmain {
title WorldDMT - Gestion de Caisse
size -1 -1 350 200
option pixels notheme
button Nouvelle recette, 1, 5 135 170 25, flat
button Nouvelle depense, 2, 5 164 170 25, flat
button Recherche, 3, 179 135 170 25, flat
button Supprimer une donnée, 4, 179 164 170 25, flat
button Quitter, 5, 5 192 344 25, flat
text $solde, 6, 85 112 74 17, disable
text SOLDE CAISSE, 7, 6 112 74 17, center disable
icon 8, 5 1 345 108, wgpic/wgcpic.jpg, 0 noborder
}
on *:dialog:wgmain:*:*:{
if ($devent == init) {
$wDLL SetMircVersion $version
$wDLL MarkDialog $dname
$wDLL SetDialog $dname icon 0 $scriptdirwgpic/wgico.ico
$wDLL SetDialog $dname bgcolor $rgb(255,255,255)
$wDLL SetDialog $dname style border
$wDLL SetColor $dname 6,7 background $rgb(255,255,255)
$wDLL SetColor $dname 6,7 textbg $rgb(255,255,255)
}
elseif ($devent == sclick) {
if ($did == 1) wg3
elseif ($did == 2) wg2
elseif ($did == 3) wg4
elseif ($did == 4) wg5
elseif ($did == 5) {
dialog -x wgmain
exit
}
}
}
;______________recette____________________
dialog Recette {
title WorldDMT - Recette
size -1 -1 273 225
option pixels notheme
combo 1, 87 88 45 70, drop
combo 2, 137 88 45 70, drop
combo 3, 187 88 67 70, drop
edit $numpe, 4, 86 116 170 15, read
edit , 5, 86 136 170 15, autohs
edit , 6, 86 155 170 15, autohs
edit , 7, 86 175 170 15, autohs
text Date, 8, 18 92 60 17
text N° de piece, 9, 17 118 60 17
text N° du recu, 10, 17 139 60 17
text Provenance, 11, 17 157 60 17
text Montant, 12, 17 177 60 17
button Enregistrer et sortir, 13, 137 194 120 20, flat
button Annuler, 14, 16 194 120 20, flat
icon 15, 2 1 270 81, wgpic/wgrpic.jpg, 0 noborder
text , 16, 17 220 239 17
}
on *:dialog:recette:*:*:{
if ($devent == init) {
dialog -x wgmain
$wDLL SetMircVersion $version
$wDLL MarkDialog $dname
$wDLL SetBorderStyle $dname 4,5,6,7 border
$wDLL SetDialog $dname icon 0 $scriptdirwgpic/wgico.ico
$wDLL SetDialog $dname bgcolor $rgb(255,255,255)
$wDLL SetDialog $dname style border
$wDLL SetColor $dname 8,9,10,11,12,16 background $rgb(255,255,255)
$wDLL SetColor $dname 8,9,10,11,12,16 textbg $rgb(255,255,255)
$wDLL SetColor $dname 16 text $rgb(255,0,0)
loadbuf -o $dname 1 $scriptdirwgjj.data
loadbuf -o $dname 2 $scriptdirwgmm.data
loadbuf -o $dname 3 $scriptdirwgaa.data
tokenize 47 $date
did -c $dname 1 $1
did -c $dname 2 $2
did -c $dname 3 $calc($right($3,2) - 7)
}
elseif ($devent == sclick) {
if ($did == 13) {
if (($did(4) && $did(5) && $did(6) && $did(7)) != $null) {
if (($did(2) isin 04 06 09 11) && ($did(1) == 31)) { date | return }
elseif ($did(2) == 02) {
if (($did(3) isin 2008 2012 2016 2020 2024 2028) && ($did(1) isin 30 31)) { date | return }
elseif (($did(3) !isin 2008 2012 2016 2020 2024 2028) && ($did(1) isin 29 30 31)) { date | return }
}
elseif ($did(7) !isnum) {
did -ra $dname 16 * Veuillez mettre un montant valide
return
}
writeini $scriptdirwge.data nump numpe $calc($did(4) + 1)
writeini $scriptdirwge.data Recette $did(4) $did(5) $+ $chr(149) $+ $did(1) $+ $chr(47) $+ $did(2) $+ $chr(47) $+ $did(3) $+ $chr(149) $+ $did(6) $+ $chr(149) $+ $did(7)
writeini $scriptdirwge.data solde solde $calc($solde + $did(7))
wg1
dialog -x Recette
}
else {
did -ra $dname 16 * Veuillez remplir toutes les données
}
}
elseif ($did == 14) {
wg1
dialog -x Recette
}
}
elseif ($devent == edit) {
did -r $dname 16
}
}
;_______________Depense_______________________
dialog Depense {
title WorldDMT - Depense
size -1 -1 273 225
option pixels notheme
combo 1, 87 88 45 70, drop
combo 2, 137 88 45 70, drop
combo 3, 187 88 67 70, drop
edit $numps, 4, 86 116 170 15, read
edit , 5, 86 136 170 15, autohs
edit , 6, 86 155 170 15, autohs
edit , 7, 86 175 170 15, autohs
text Date, 8, 18 92 60 17
text N° de piece, 9, 17 118 60 17
text N° de PC, 10, 17 139 60 17
text Destination, 11, 17 157 60 17
text Montant, 12, 17 177 60 17
button Enregistrer et sortir, 13, 137 194 120 20, flat
button Annuler, 14, 16 194 120 20, flat
icon 15, 2 1 270 81, wgpic/wgdpic.jpg, 0 noborder
text , 16, 17 220 239 17
}
on *:dialog:depense:*:*:{
if ($devent == init) {
dialog -x wgmain
$wDLL SetMircVersion $version
$wDLL MarkDialog $dname
$wDLL SetBorderStyle $dname 4,5,6,7 border
$wDLL SetDialog $dname icon 0 $scriptdirwgpic/wgico.ico
$wDLL SetDialog $dname bgcolor $rgb(255,255,255)
$wDLL SetDialog $dname style border
$wDLL SetColor $dname 8,9,10,11,12,16 background $rgb(255,255,255)
$wDLL SetColor $dname 8,9,10,11,12,16 textbg $rgb(255,255,255)
$wDLL SetColor $dname 16 text $rgb(255,0,0)
loadbuf -o $dname 1 $scriptdirwgjj.data
loadbuf -o $dname 2 $scriptdirwgmm.data
loadbuf -o $dname 3 $scriptdirwgaa.data
tokenize 47 $date
did -c $dname 1 $1
did -c $dname 2 $2
did -c $dname 3 $calc($right($3,2) - 7)
}
if ($devent == sclick) {
if ($did == 13) {
if (($did(4) && $did(5) && $did(6) && $did(7)) != $null) {
if (($did(2) isin 04 06 09 11) && ($did(1) == 31)) { date | return }
elseif ($did(2) == 02) {
if (($did(3) isin 2008 2012 2016 2020 2024 2028) && ($did(1) isin 30 31)) { date | return }
elseif (($did(3) !isin 2008 2012 2016 2020 2024 2028) && ($did(1) isin 29 30 31)) { date | return }
}
elseif ($did(7) !isnum) {
did -ra $dname 16 * Veuillez mettre un montant valide
return
}
elseif ($did(7) > $solde) {
did -ra $dname 16 * Vous n'avez pas cette somme dans votre caisse
return
}
writeini $scriptdirwge.data nump numps $calc($did(4) + 1)
writeini $scriptdirwge.data Depense $did(4) $did(5) $+ $chr(149) $+ $did(1) $+ $chr(47) $+ $did(2) $+ $chr(47) $+ $did(3) $+ $chr(149) $+ $did(6) $+ $chr(149) $+ $did(7)
writeini $scriptdirwge.data solde solde $calc($solde - $did(7))
wg1
dialog -x Depense
}
else {
did -ra $dname 16 * Veuillez remplir toutes les données
}
}
elseif ($did == 14) {
wg1
dialog -x Depense
}
}
elseif ($devent == edit) {
did -r $dname 16
}
}
;__________________Recherche_____________
dialog Recherche {
title WorldDMT - Recherche de données
size -1 -1 610 456
option pixels notheme
text De, 1, 10 105 15 15
combo 2, 25 100 45 70, drop
combo 3, 72 100 45 70, drop
combo 4, 119 100 67 70, drop
text A, 5, 11 132 9 15
combo 6, 25 126 45 70, drop
combo 7, 72 126 45 70, drop
combo 8, 119 126 67 70, drop
button Rechercher, 9, 188 126 65 20, flat
button Exporter vers Excel, 10, 377 126 120 20, flat
button Supprimer une donnée, 11, 255 126 120 20, flat
button Quitter, 12, 499 126 65 20, flat
text , 16, 188 104 375 17
list 14, 5 151 600 320, size
icon 15, 1 1 605 95, wgpic/Wgspic.jpg, 0 noborder
}
on *:dialog:recherche:*:*:{
if ($devent == init) {
if ($dialog(wgmain)) dialog -x wgmain
$wDLL SetMircVersion $version
$wDLL MarkDialog $dname
$wDLL SetBorderStyle $dname 14 border
$wDLL SetDialog $dname icon 0 $scriptdirwgpic/wgico.ico
$wDLL SetDialog $dname bgcolor $rgb(255,255,255)
$wDLL SetDialog $dname style border
$wDLL SetColor $dname 1,5,16 background $rgb(255,255,255)
$wDLL SetColor $dname 1,5,16 textbg $rgb(255,255,255)
$wDLL SetColor $dname 16 text $rgb(255,0,0)
loadbuf -o $dname 2 $scriptdirwgjj.data
loadbuf -o $dname 3 $scriptdirwgmm.data
loadbuf -o $dname 4 $scriptdirwgaa.data
loadbuf -o $dname 6 $scriptdirwgjj.data
loadbuf -o $dname 7 $scriptdirwgmm.data
loadbuf -o $dname 8 $scriptdirwgaa.data
tokenize 47 $date
did -c $dname 2,6 $1
did -c $dname 3,7 $2
did -c $dname 4,8 $calc($right($3,2) - 7)
}
if ($devent == sclick) {
if ($did == 9) {
unset %exel
did -r $dname 16
if (($did(3) isin 04 06 09 11) && ($did(2) == 31)) { date | return }
elseif ($did(3) == 02) {
if (($did(4) isin 2008 2012 2016 2020 2024 2028) && ($did(2) isin 30 31)) { date | return }
elseif (($did(4) !isin 2008 2012 2016 2020 2024 2028) && ($did(2) isin 29 30 31)) { date | return }
}
elseif (($did(7) isin 04 06 09 11) && ($did(6) == 31)) { date | return }
elseif ($did(7) == 02) {
if (($did(8) isin 2008 2012 2016 2020 2024 2028) && ($did(6) isin 30 31)) { date | return }
elseif (($did(8) !isin 2008 2012 2016 2020 2024 2028) && ($did(6) isin 29 30 31)) { date | return }
}
elseif (($did(8) < $did(4))) {
did -ra $dname 16 * Attention la date de fin doit etre plus grande que la date du debut
return
}
elseif (($did(8) = $did(4)) && ($did(3) > $did(7))) {
did -ra $dname 16 * Attention la date de fin doit etre plus grande que la date du debut
return
}
elseif (($did(8) == $did(4)) && ($did(3) == $did(7)) && ($did(2) > $did(6))) {
did -ra $dname 16 * Attention la date de fin doit etre plus grande que la date du debut
return
}
did -r $dname 14
did -a $dname 14 - Recette(s):
did -a $dname 14
did -a $dname 14 $str($chr(160),4) $+ Date $+ $str($chr(160),12) Montant $str($chr(160),5) Provenance
var %i 0,%l $numpe,%d1,%d2,%d,%t
while (%i != %l) {
inc %i
%d = $gettok($readini($scriptdirwge.data,recette,%i),2,149)
%d1 = $did(2) $+ $chr(47) $+ $did(3) $+ $chr(47) $+ $did(4)
%d2 = $did(6) $+ $chr(47) $+ $did(7) $+ $chr(47) $+ $did(8)
tokenize 47 %d $+ / $+ %d1 $+ / $+ %d2
if (($3 == $6) && ($3 < $9)) {
if ($2 == $5) {
if ($1 >= $4) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif ($2 > $5) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif (($3 > $6) && ($3 == $9)) {
if ($2 == $8) {
if ($1 <= $7) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif ($2 < $8) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif (($3 == $6) && ($3 == $9)) {
if ($2 == $5) {
if ($1 >= $4) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif ($2 == $8) {
if ($1 <= $7) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif (($2 > $5) && ($2 < $8)) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif (($3 > $6) && ($3 < $9)) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
if (%t) {
did -a $dname 14
did -a $dname 14 Total recette: %t
set -u5 %recette %t
set %exel 1
}
else {
did -a $dname 14
did -a $dname 14 - Aucune recette trouvée dans cet intervalle
}
did -a $dname 14
did -a $dname 14 - Depense(s):
did -a $dname 14
did -a $dname 14 $str($chr(160),4) $+ Date $+ $str($chr(160),12) Montant $str($chr(160),5) Destination
var %i 0,%l $numps,%d1,%d2,%d,%t
while (%i != %l) {
inc %i
%d = $gettok($readini($scriptdirwge.data,depense,%i),2,149)
%d1 = $did(2) $+ $chr(47) $+ $did(3) $+ $chr(47) $+ $did(4)
%d2 = $did(6) $+ $chr(47) $+ $did(7) $+ $chr(47) $+ $did(8)
tokenize 47 %d $+ / $+ %d1 $+ / $+ %d2
if (($3 == $6) && ($3 < $9)) {
if ($2 == $5) {
if ($1 >= $4) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif ($2 > $5) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif (($3 > $6) && ($3 == $9)) {
if ($2 == $8) {
if ($1 <= $7) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif ($2 < $8) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif (($3 == $6) && ($3 == $9)) {
if ($2 == $5) {
if ($1 >= $4) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif ($2 == $8) {
if ($1 <= $7) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif (($2 > $5) && ($2 < $8)) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif (($3 > $6) && ($3 < $9)) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
if (%t) {
did -a $dname 14
did -a $dname 14 Total depense: %t
set -u5 %depense %t
set %exel 1
}
else {
did -a $dname 14
did -a $dname 14 - Aucune depense trouvée dans cet intervalle
}
did -i $dname 14 1
did -i $dname 14 1 Report somme: $calc($solde - %recette + %depense)
did -a $dname 14
did -a $dname 14
did -a $dname 14 Solde Caisse: $solde
}
elseif ($did == 10) {
if (!%exel) { did -ra $dname 16 * Pas de données a exporter | return }
elseif (($did(3) isin 04 06 09 11) && ($did(2) == 31)) { date | return }
elseif ($did(3) == 02) {
if (($did(4) isin 2008 2012 2016 2020 2024 2028) && ($did(2) isin 30 31)) { date | return }
elseif (($did(4) !isin 2008 2012 2016 2020 2024 2028) && ($did(2) isin 29 30 31)) { date | return }
}
elseif (($did(7) isin 04 06 09 11) && ($did(6) == 31)) { date | return }
elseif ($did(7) == 02) {
if (($did(8) isin 2008 2012 2016 2020 2024 2028) && ($did(6) isin 30 31)) { date | return }
elseif (($did(8) !isin 2008 2012 2016 2020 2024 2028) && ($did(6) isin 29 30 31)) { date | return }
}
elseif (($did(8) < $did(4))) {
did -ra $dname 16 * Attention la date de fin doit etre plus grande que la date du debut
return
}
elseif (($did(8) = $did(4)) && ($did(3) > $did(7))) {
did -ra $dname 16 * Attention la date de fin doit etre plus grande que la date du debut
return
}
elseif (($did(8) == $did(4)) && ($did(3) == $did(7)) && ($did(2) > $did(6))) {
did -ra $dname 16 * Attention la date de fin doit etre plus grande que la date du debut
return
}
write -c rapport_Caisse.xls
var %d1 = $did(2) $+ $chr(47) $+ $did(3) $+ $chr(47) $+ $did(4)
var %d2 = $did(6) $+ $chr(47) $+ $did(7) $+ $chr(47) $+ $did(8)
write rapport_Caisse.xls Rapport Caisse du %d1 au %d2
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls - Recette(s):
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls Date $+ $chr(9) $+ Montant $+ $chr(9) $+ Provenance $+ $chr(9) $+ N°Bon de reception
var %i 0,%l $numpe,%d1,%d2,%d,%t
while (%i != %l) {
inc %i
%d = $gettok($readini($scriptdirwge.data,recette,%i),2,149)
%d1 = $did(2) $+ $chr(47) $+ $did(3) $+ $chr(47) $+ $did(4)
%d2 = $did(6) $+ $chr(47) $+ $did(7) $+ $chr(47) $+ $did(8)
tokenize 47 %d $+ / $+ %d1 $+ / $+ %d2
if (($3 == $6) && ($3 < $9)) {
if ($2 == $5) {
if ($1 >= $4) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif ($2 > $5) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif (($3 > $6) && ($3 == $9)) {
if ($2 == $8) {
if ($1 <= $7) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif ($2 < $8) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif (($3 == $6) && ($3 == $9)) {
if ($2 == $5) {
if ($1 >= $4) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif ($2 == $8) {
if ($1 <= $7) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
did -a $dname 14 $2 $str($chr(160),5) $4 $str($chr(160),8) $3 $str($chr(160),3) N°BR $1
%t = $calc(%t + $4)
}
}
elseif (($2 > $5) && ($2 < $8)) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif (($3 > $6) && ($3 < $9)) {
tokenize 149 $readini($scriptdirwge.data,recette,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
if (%t) {
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls Total recette: $+ $chr(9) $+ %t
set -u5 %recette %t
}
else {
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls Aucune recette trouvée dans cet intervalle
}
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls - Depense(s):
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls Date $+ $chr(9) $+ Montant $+ $chr(9) $+ Destination $+ $chr(9) $+ N°Piece de caisse
var %i 0,%l $numps,%d1,%d2,%d,%t
while (%i != %l) {
inc %i
%d = $gettok($readini($scriptdirwge.data,depense,%i),2,149)
%d1 = $did(2) $+ $chr(47) $+ $did(3) $+ $chr(47) $+ $did(4)
%d2 = $did(6) $+ $chr(47) $+ $did(7) $+ $chr(47) $+ $did(8)
tokenize 47 %d $+ / $+ %d1 $+ / $+ %d2
if (($3 == $6) && ($3 < $9)) {
if ($2 == $5) {
if ($1 >= $4) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif ($2 > $5) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif (($3 > $6) && ($3 == $9)) {
if ($2 == $8) {
if ($1 <= $7) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif ($2 < $8) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif (($3 == $6) && ($3 == $9)) {
if ($2 == $5) {
if ($1 >= $4) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif ($2 == $8) {
if ($1 <= $7) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif (($2 > $5) && ($2 < $8)) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
elseif (($3 > $6) && ($3 < $9)) {
tokenize 149 $readini($scriptdirwge.data,depense,%i)
write rapport_Caisse.xls $2 $chr(9) $4 $chr(9) $3 $chr(9) $1
%t = $calc(%t + $4)
}
}
if (%t) {
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls Total depense: $+ $chr(9) $+ %t
set -u5 %depense %t
}
else {
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls Aucune depense trouvée dans cet intervalle
}
write -l1 rapport_Caisse.xls Report somme: $+ $chr(9) $+ $calc($solde - %recette + %depense)
write -l2 rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls $chr(9)
write rapport_Caisse.xls Solde Caisse: $+ $chr(9) $+ $solde
run $qt($mircdirrapport_Caisse.xls)
}
elseif ($did == 11) { wg5 | unset %exel }
elseif ($did == 12) {
unset %exel
wg1
dialog -x recherche
}
elseif ($did isin 234678) {
unset %exel
did -r $dname 16,14
}
}
}
;___________________suppression_________________________
dialog Suppression {
title WorldDMT - Suppression de données
size -1 -1 600 280
option pixels notheme
text Données a supprimer, 1, 6 109 105 17
radio Recette, 2, 112 109 60 15
radio Depense, 3, 176 109 60 15
button Supprimer selection, 4, 397 108 116 15, flat
button Quitter, 5, 515 108 80 15, flat
list 6, 5 127 590 168, size
icon 7, 1 1 600 105, wgpic/Wgxpic.jpg, 0 noborder
}
on *:dialog:Suppression:*:*:{
if ($devent == init) {
if ($dialog(Recherche)) {
dialog -x Recherche
set %recherche 1
}
elseif ($dialog(wgmain)) dialog -x wgmain
$wDLL SetMircVersion $version
$wDLL MarkDialog $dname
$wDLL SetDialog $dname icon 0 $scriptdirwgpic/wgico.ico
$wDLL SetDialog $dname bgcolor $rgb(255,255,255)
$wDLL SetDialog $dname style border
$wDLL SetBorderStyle $dname 6 border
$wDLL SetColor $dname 1,2,3 background $rgb(255,255,255)
$wDLL SetColor $dname 1,2,3 textbg $rgb(255,255,255)
did -c $dname 2
donnee
}
elseif ($devent == sclick) {
if ($did == 2) { did -r $dname 6 | donnee }
if ($did == 3) { did -r $dname 6 | donnee }
if ($did == 4) { suppsel | did -r $dname 6 | donnee }
if ($did == 5) {
if (%recherche) {
dialog -md Recherche Recherche
unset %recherche
dialog -x suppression
}
else {
wg1
dialog -x suppression
}
}
}
}
Conclusion :
comment ça marche?
c'est simple, il vous suffit de télécharger le zip ensuite copier juste l'application mIRC (rien que l'icône mIRC) et coller dans le dossier "WGC" ensuite vous pourrez utiliser le raccourci présent dans le dossier
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.