home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 May
/
CHIPCD5_98.iso
/
software
/
testsoft
/
Sezam
/
_SE31SEZ.ZIP
/
OPTIC
/
INWEN.DMC
< prev
next >
Wrap
Text File
|
1996-12-19
|
8KB
|
511 lines
:***********************************************
:**** INWENTARYZATOR ****
:**** OPTIMUS - iC ****
:**** GRUNWALDZKA 174 ****
:**** 33-300 NOWY SÅCZ ****
:**** ------------------------------------- ****
:**** ver 1.03 by Zbigniew Walczyk 1996 ****
:**** 31.XII.1996 ****
:***********************************************
D$4="111122223333"
S.InitDat
D#9=1 : nr trybu
P"\e[2J\e[0;0H\n\n\th\tb INWENTARYZATOR\tb\th"
P"\n\n Ver 1.03 1996"
B1
B2
B3
S.PresKey
.MainMnu
P"\e[2J\e[0;0H \tbMenu Glowne:\tb\n"
P"\n1.Inwentaryzacja\n"
P"2.Komunikacja\n"
P"3.Tryb: "
C$1=#9
P$1
P"\n4.Inne\n"
P"5.Koniec"
K*
C#A=$0
S#A=1.Inwen
S#A=2.Komun
S#A=3.Ustaw
S#A=4.Inne
G#A=5.End
G.MainMnu
.End
P"\n PODAJ HASLO:\n "
K4
S$0<>$4L4.MainMnu
ET
:****** Tu program si' koñczy
:**************************************************************
.NIY
P"\e[2J\e[0;0H Jeszcze\nnie\ngotowe\n"
S.PresKey
Q
:**** NIY
:************************************************************
:******* w #6 dlugosc zadana ciagu
.Trim
G#6=[$0].EndTrim
I$0" "
G.Trim
.EndTrim
Q
:************************************************************
.BrakDan
P"\e[2J\e[0;0H \n\th\tb B R A K\n\n D A N Y C H\tb\th\n"
S.PresKey
Q
:**** BrakDan
:************************************************************
.BrakAr
P"\e[2J\e[0;0H \n\th\tb B R A K\n\nA R T Y K U L U\tb\th\n"
S.PresKey
Q
:**** BrakDan
:****** Procedura PressAny Key *******************************
.PresKey
P"\e[7;0H"
P"\trNacisnij klawisz\tr"
K
Q
:**** PresKey
:************************************************************
:***** Inicjalizacja danych /kasowanie danych
.InitDat
OA(0,44) : nazwa(16)+,+kod(13)+,+ile(5)+,+powinno(5)+<CR><LF>
OB(0,13) : kody
Q
:**** InitDat
:************************************************************
:************************************************************
:******** Inwentaryzacja
.Inwen
: ustawienie flag
G#9>1.I1
D$5="NNTN"
G.Inwen1
.I1
G#9>2.I2
D$5="NTTN"
G.Inwen1
.I2
G#9>3.I3
D$5="TNNT"
G.Inwen1
.I3
G#9>4.I4
D$5="TNTN"
G.Inwen1
.I4
G#9>5.I5
D$5="TNTT"
G.Inwen1
.I5
G#9>6.I6
D$5="TTNT"
G.Inwen1
.I6
G#9>7.I7
D$5="TTTN"
G.Inwen1
.I7
G#9>8.I8
D$5="TTTT"
G.Inwen1
.I8
D$5="TNNT"
.Inwen1
P"\e[2J\e[0;0H\tb Inwentaryzacja\tb\n\n"
P"1.Inwentaryzacja\n"
P"2.Przeglad\n (kasowanie)"
K*
G#A=133.EndInw
C#A=$0
S#A=1.Inw
S#A=2.Przeg
G.Inwen1
.EndInw
Q
:**** Inwentaryzacja
:************************************************************
.Przeg
H#8=A
D#7=#8
G#8<0.BrakDan
.Przeg1
P"\e[2JArt."
D#6=#7+1
C$1=#6
I$1" z "
D#6=#8+1
C$0=#6
I$1$0
P$1
P"\n"
PA(#7)M16,1
GA(#7)L13="**SKASOWANY**".Przeg4
P"\nKod\th"
D$0=A(#7)M13,18
P$0
P"\nIlosc: \tb"
D$0=A(#7)M5,32
P$0
P"\tb\th"
G#9<>9.Przeg2
P"\nPowinno: "
D$0=A(#7)M5,38
P$0
.Przeg2
G$5M1,2="N".Przeg3
P"\e[7;0H \trF2\tr-Kas"
.Przeg3
G$5M1,4="N".Przeg4
P"\e[7;8H \trF3\tr-Pop"
.Przeg4
K*
G#A=133.EndPrz
G#A=139.PrzDn
G#A=140.PrzUp
S#A=135.Kasow
S#A=136.Popr
S#A=138.Search
G.Przeg1
.EndPrz
Q
.PrzUp
G#7=#8.Przeg1
D#7=#7+1
G.Przeg1
.PrzDn
G#7=0.Przeg1
D#7=#7-1
G.Przeg1
:***** przeglad artykulu
:***** Przeg
:************************************************************
:**** w rejestrze #7 numer rekordu biezacego
.Search
D#2=#A
D#3=#7
H#8=A
D#6=13
P"\e[2J\n\th WYSZUKIWANIE \th\n\n\n\thPodaj kod:\th\n"
V8,12,13
S.Trim
D$1=$0
J2
LB
J0
G#0=#8.Search1
D#7=#0
G.EndSrch
.Search1
G$1<>B(#8).Srch1
D#7=#8
G.EndSrch
.Srch1
S.BrakAr
.EndSrch
D#A=#2
Q
:************************************************************
:**** w rejestrze #7 numer rekordu do skasowania
.Kasow
D#2=#A
G$5M1,2="N".EndKas
GB(#7)L13="**SKASOWANY**".EndKas
P"\e[0;0H\tb Kasowanie ?? \tb"
P"\e[7;0H\tr1.\tr \tbTak\tb \tr2.\tr \tbNie\tb"
K*
C#A=$0
G#A=1.Kasow1
G#A=2.EndKas
G.Kasow
.Kasow1
D$0="**SKASOWANY**"
DB(#7)=$0
I$0" , , , \0x0D\0x0A"
DA(#7)=$0
.EndKas
D#A=#2
Q
:************************************************************
:**** w rejestrze #7 numer rekordu do poprawy
.Popr
D#2=#A
G$5M1,4="N".EndPopr
GB(#7)L13="**SKASOWANY**".EndPopr
P"\e[0;0H\tb Poprawa ?? \tb"
P"\e[6;0H\tr1.\tr \tbPop\tb \tr2.\tr \tbDodaj\tb
P"\e[7;0H "
P"\e[7;0H\tr3.\tr \tbRezygnuj\tb"
K*
C#A=$0
G#A=1.Popr1
G#A=2.Popr2
G#A=3.EndPopr
G.Popr
.Popr1
P"\e[7;0H "
P"\e[6;0H "
P"\e[6;0HJEST: \o"
K5
C#3=$0
D$1=A(#7)L31
C$2=#3
G.Popr1a
.Popr2
P"\e[7;0H "
P"\e[6;0H "
P"\e[6;0HDodaj: \o"
K5
C#3=$0
C#4=A(#7)M5,32
D#3=#3+#4
D$1=A(#7)L31
C$2=#3
.Popr1a
G[$2]>=5.Popr1b
I$2" "
G.Popr1a
.Popr1b
I$1$2
I$1A(#7)R8
DA(#7)=$1
.EndPopr
D#A=#2
P"\f"
Q
:************************************************************
:************************************************************
:******** Komunikacja
.Komun
P"\e[2J\e[0;0H\tb Komunikacja\tb\n\n"
P"1.Wyslanie\n danych\n"
P"2.Odczyt danych\n"
K*
G#A=133.EndKom
C#A=$0
S#A=1.Send
S#A=2.Recv
G.Komun
.EndKom
Q
:**** Komunikacja
:************************************************************
.Send
H#8=A
G#8<0.BrakDan
P"\e[2J\e[0;0H\n\tb\th Wysylam\th\tb\n\n"
XMN,A
P"\e[2J\e[0;0H\th\n\tb G O T O W E\tb\th\n\n"
S.PresKey
Q
:****
:************************************************************
.Recv
H#8=A
G#8<0.Recva
P"\e[2J\e[0;0H\n\tb Najpierw\n\n skasuj dane\tb\n\n"
S.PresKey
Q
.Recva
P"\e[2J\e[0;0H\n\tb\th Odbieram\th\tb\n\n"
YMN,A
H#8=A
G#8<0.EndRecv
P"\e[2J\n\tb INICJALIZACJA"
P"\n Prosze czekac\tb"
J2
OB(0,13)
D#7=0
.Recv1
D#6=#8-#7
P"\e[7;7H\th \th"
P"\e[7;7H\th"
C$0=#6
P$0
P"\th"
D$0=A(#7)M13,18
RB
D#7=#7+1
G#7<=#8.Recv1
J0
P"\e[2J\e[0;0H\th\n\tb G O T O W E\tb\th\n\n"
S.PresKey
.EndRecv
Q
:****
:************************************************************
:************************************************************
:******* Ustawienia
.Ustaw
P"\n PODAJ HASLO:\n "
K4
G$0<>$4M4,5.Alert4
D#2=#A
P"\e[2J\e[0;0H\n Podaj numer\n\n trybu pracy\n\n <1-9>"
K*
G#A=133.EndUst
C#A=$0
G#A>9.EndUst
G#A<1.EndUst
D#9=#A
D#A=#2
.EndUst
Q
:************************************************************
:************************************************************
:******** Inne
.Inne
P"\e[2J\e[0;0H\tb Inne\tb\n\n"
P"1.Wolna pamiec\n"
P"2.Kasowanie\n danych\n"
K*
G#A=133.EndInne
C#A=$0
S#A=1.FreeMem
S#A=2.KasujDt
G.Inne
.EndInne
Q
:**** Inwentaryzacja
:***** FreeMem **********************************************
.FreeMem
P"\e[2J\e[0;0H\tr Wolna pamiec \tr\n\n\n \th"
C$0=#F
P$0
P"\th"
S.PresKey
Q
:****FreeMem
:***** KasujDt **********************************************
.KasujDt
P"\n PODAJ HASLO:\n "
K4
G$0<>$4M4,9.Alert4
S.InitDat
P"\e[2J\e[0;0H\n\n D A N E\n\n skasowano"
S.PresKey
Q
.Alert4
P"\e[2J\e[0;0H\n\n \trZle Haslo\tr"
S.PresKey
Q
:**** KasujDt
:*************************************************************
:**** INW - glowna funkcja inwentaryzujaca
:*************************************************************
.Inw
G#F>2048.Inwa
P"\e[2J\n\th P A M I E C\th\n\n\n\th ZAPELNIONA\th"
S.PresKey
Q
.Inwa
P"\e[2J\n\th Podaj kod:\th\n\n"
D#6=13
V8,12,13
S.Trim
D$1=$0
P"\e[4;0H \e[4;0H"
P$0
G#A<>40.Inw1
G#V=133.EndIn
G$0=" ".Inwa
.Inw1
G$5L1="T".Inw2
.InwDod
P"\n\n\thIlosc: \o"
D#6=5
K5
P"\th\f"
C#5=$0
G#5=0.EndIn
C$0=#5
S.Trim
D$2=""
I$2"*TOWAR*DOPISANY*,"
I$2$1
I$2","
I$2$0
I$2", \0x0D\0x0A"
R$2A
R$1B
G.Inw
.Inw2
H#8=B
G#8<0.NotFoun
D$0=$1
J2
LB
J0
G#0=#8.InwS1
D#7=#0
G.Found
.InwS1
G$1<>B(#8).NotFoun
D#7=#8
.Found
G$5M1,4="T".InwPop
P"\e[2J\n\th Poprawa \n ZABLOKOWANA\th\n\n"
S.PresKey
G.Inw
.InwPop
P"\e[2JArt."
D#6=#7+1
C$1=#6
I$1" z "
D#6=#8+1
C$0=#6
I$1$0
P$1
P"\n"
PA(#7)M16,1
P"\nKod\th"
D$0=A(#7)M13,18
P$0
P"\nIlosc: \tb"
D$0=A(#7)M5,32
P$0
P"\tb\th"
S.Popr
G.Inw
.NotFoun
G$5M1,3="T".InwDod
P"\e[2J\n\th Dopisywanie\n ZABLOKOWANE\th\n\n"
S.PresKey
G.Inw
.EndIn
Q