اخوتي في الله..... لقد عملت نظام بسيط لحساب اندثار مواد مختلفة رغم اني لست ملمة بكل اللغة اواجة مشكلة انة البرنامج يعمل لكنة لايصفر المبلغ بحيث اريد السعر في النهاية يساوي الرصيد ويصفر الحقول الباقي كلما حسبت له سنة جديدة حسب رقم دليل معين
PUBLIC oo1,mt1
yy1=thisform.text1.Value
SELECT mast_fil
SET FILTER TO ALLTRIM(DAL)=ALLTRIM(t2)
SET FILTER TO mast_fil.year<=yy1
BROWSE
SET ORDER to 1 && ALLTRIM(DAL)
SET ORDER TO 2 && YEAR
IF mast_fil.year=yy1
BROWSE
MESSAGE("áÓäÉ ÊÓÇæí ÇáÓäÉ ÇáÍÇáíÉ ")
SKIP
ENDIF
IF mast_fil.year<yy1
BROWSE
SELECT mast_fil
IF mst_pr=mst_mtr then
mst_end=0
MESSAGE("áãÊÑÇßã íÓÇæí ÇáßáÝÉ")
SKIP
else
endif
IF mst_pr!= mst_mtr then
MESSAGEBOX("ÇáßáÝÉ áÇÊÓÇæí ÇáãÊÑÇßã")
SELECT mast_fil
GO TOP
DO WHILE !EOF()
STORE 0 TO mt3
IF mst_bal <> 0
REPLACE mt2 WITH mast_fil.mst_pr*xx +mst_end
replace marwa WITH mt2
?mt2,"áÓäæí ÇáÍÇáí ÇáÇäÏËÇÑ"
REPLACE mst_mtrs WITH mst_mtr+mt2
?mst_mtrs,"ÇáãÊÑÇßã ÇáÌÏíÏ"
replace mst_bal WITH mst_pr-mst_mtrs
? mst_bal,"hgvwd]"
REPLACE mr WITH mst_pr-mst_mtrs
?mr,"áÑÕíÏ"
REPLACE year WITH yy+1
SELECT aht
APPEND BLANK
replace n1 WITH mast_fil.mt2
replace n2 WITH mast_fil.mst_mtrs
replace n3 WITH mast_fil.mr
REPLACE da WITH mast_fil.dal
SKIP
*ENDIF
endif
ENDDO
ENDIF
endif
MESSAGEBOX("ooooooooovvvvvvveeeeeeeeeeeeerrrrrrrrrrrÇÊãÊÊ ÇáÍÓÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÈ")
thisform.grid1.Refresh
