home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 46
/
Mobiclic46.iso
/
pc
/
DATA
/
SHARED
/
COMMUNS.CST
/
00014_Script_anciensNums
< prev
next >
Wrap
Text File
|
2002-07-12
|
3KB
|
111 lines
----------------------------------------------------------------
-- MARKETING APPLICATION
-- "ANCIENS NUMEROS" MODULE SCRIPTS
-- Gyorgy Gutierrez, Mai 2002
----------------------------------------------------------------
----------------------------------------------------------------
-------------- declaration des variables globales --------------
----------------------------------------------------------------
global Prix, Port
global ListeCom, ListeQte, ListeTotal, SommeTotal, gCodeEuro
global gMyParent
----------------------------------------------------------------
-------- masquer les champs editables non necessaires ----------
----------------------------------------------------------------
on affichQte
repeat with i = 1 to (12 - ListeCom.count)
masquerPistes (32 - i)
end repeat
end
----------------------------------------------------------------
----------- creation de la liste des numeros choisis -----------
----------------------------------------------------------------
on creerListe
-- liste des numeros
sort ListeCom
temp = ""
repeat with i = 1 to ListeCom.count
put ListeCom[i] into temp.line[i]
end repeat
member("ListeCom").text = temp
-- liste des references
temp = ""
case gMyParent of
1 : refmag = "60 00"
2 : refmag = "62 00"
end case
repeat with i = 1 to ListeCom.count
if ListeCom[i] < 10 then
put refmag && "0" & ListeCom[i] into temp.line[i]
else
put refmag && ListeCom[i] into temp.line[i]
end if
end repeat
member("ListeRef").text = temp
-- liste des quantites
repeat with i = 1 to ListeQte.count
put string(ListeQte[i]) into member("Qte" & string(i))
end repeat
calculs
-- liste des totaux
temp = ""
repeat with i = 1 to ListeTotal.count
put ListeTotal[i] && gCodeEuro into line i of temp
end repeat
member("ListeTotal").text = temp
-- total
if SommeTotal = 0 then
member("SommeTotal").text = ""
else
member("SommeTotal").text = string(SommeTotal) && gCodeEuro
end if
updateStage
end
----------------------------------------------------------------
------------ calculs des montants de la commande ---------------
----------------------------------------------------------------
on calculs
-- calcul des sommes intermediares
ListeTotal = []
repeat with i = 1 to ListeQte.count
total = ListeQte[i] * Prix
ListeTotal[i] = total
end repeat
-- calcul du montant total de la commande
SommeTotal = 0
if ListeTotal.count <> 0 then
repeat with i = 1 to ListeTotal.count
SommeTotal = SommeTotal + ListeTotal[i]
end repeat
SommeTotal = SommeTotal + Port
else
SommeTotal = 0
end if
end
----------------------------------------------------------------
------------------- impression de l'Θcran ----------------------
----------------------------------------------------------------
on imprimer
set doc = new(xtra "PrintOMatic")
if not objectP(doc) then exit
setLandscapeMode doc, 1
newPage doc
drawStagePicture doc, Point(1,1), Rect(2,2,638,478)
if doJobSetup (doc) = TRUE then print doc
end