-
Notifications
You must be signed in to change notification settings - Fork 0
/
BOOKS.PRG
1135 lines (1010 loc) · 45.5 KB
/
BOOKS.PRG
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Ž¡« áâì 18 - ª¨£ ¯à®¤ ¦
// Ž¡« áâì 19 - ª¨£ ¯®ªã¯®ª
function writesfkniga(dogpotr,lic,dat,sum,nds,typ,mesyac)
LOCAL sel:=select(),rec:=recno(),potrstring,innstring
LOCAL Writed:=.F.
POTRSTRING=delstring(MAIN->POTREBITEL,"ˆ")
INNSTRING=appendstring(MAIN->POTREBITEL,"ˆ")
INNSTRING=alltrim(substr(INNSTRING,4,11))
select 18
IF NetAppend(10)
replace number with DOGPOTR
replace lic_schet with LIC
replace data with DAT
replace wsegosnds with SUM
replace summands with NDS
replace type with TYP
replace potrebitel with POTRSTRING
replace inn with INNSTRING
replace okonx with MAIN->OKONX
replace okpo with MAIN->OKPO
replace month with mesyac
Writed=.T.
unlock
ELSE
al_box({"‡ ¯¨áì ¢ ª¨£ã ¯à®¤ ¦ ¥ ¯à®¨§¢¥¤¥ .",;
"‚ë ®âª § «¨áì ®¦¨¤ âì ®á¢®¡®¦¤¥¨ï ¡ §ë",;
"‡ ¯¨è¨â¥ ¤ ë¥ ¯« ⥦ª¨ ¢àãçãî."})
ENDIF
go recno()
select(sel)
go rec
Return Writed
// à®á¬®âà ª¨£¨ ¯à®¤ ¦ ¨ ª¨£¨ ¯®ªã¯®ª
// 18 ®¡« áâì - ¯à®¤ ¦¨
// 19 ®¡« áâì - ¯®ªã¯ª¨
FUNCTION ViewProdag(type)
local show,spisok,is_ch,stri,Buff,ColorBuf,sel:=select()
PRIVATE recbuf,ordbuf,nm1,nm2,nm3,nm4,t1,l1,b1,r1,inp,GloMes,Cho
Kniga:=""
type:=if(type==NIL,1,type)
recbuf=recno()
ordbuf=indexord()
buff=win_save()
colorbuf=setcolor()
if urov<1
if (.not. file(schet_share+'SFKNIGA.DBF')) .or.;
(.not. file(schet_share+'SFKNIGA.ntx')) .or.;
(.not. file(schet_share+'SFKNIGAp.DBF')).or.;
(.not. file(schet_share+'SFKNIGAp.ntx'))
sign(2)
select(sel); go recbuf; set order to ordbuf
setcolor(colorbuf)
win_rest(buff)
return NIL
else
if type=1
select 18
Kniga:="SFKNIGA"
else
select 19
Kniga:="SFKNIGAP"
endif
if empty(fieldname(1))
wosst=.T.
al_box({" § ¤ ëå ¥ ®¯à¥¤¥«¥ "})
return NIL
endif
endif
endif
spisok:={" «¥ªâà®í¥à£¨ï+¥ï+®¢ëè¥ ï+€¢ á ",;
" «¥ªâà®í¥à£¨ï ",;
" ¥ï ",;
" ®¢ëè¥ ï ",;
" €¢ á "}
is_ch:={.t.,.t.,.t.,.t.}
cho=vert_menu(spisok,"‚¨¤ ª¨£¨ ¯à®¤ ¦",is_ch,5,20,1,'n/w,n/g,,,r/w',.F.)
if cho==0
PREV_REC:=-1
RET_VAL:=2
select(sel)
set order to ordbuf
go recbuf
setcolor(colorbuf)
win_rest(buff)
endif
mesyac:=Month_Menu()
GloMes:=Mesyac
if mesyac=0
PREV_REC:=-1
RET_VAL:=2
select(sel)
set order to ordbuf
go recbuf
setcolor(colorbuf)
win_rest(buff)
return NIL
endif
colorwin(2,1,15,78,"n+/n")
@ 3,2 clear to 14,77
colorwin(3,2,14,77,"w/w")
colorwin(1,1,1,78,"n/w")
set color to n/w
@ 9,25 say "Š¨£a "+if(type=1,"த ¦","®ªã¯®ª")+" á®àâ¨àã¥âáï..."
do case
case cho=1
stri="«¥ªâà®í¥à£¨¨, ¥¨ ¨ ®¢ë襮©"
set filter to &KNIGA->MONTH==mesyac
case cho=2
stri="«¥ªâà®í¥à£¨¨"
set filter to &KNIGA->TYPE==0.and.&KNIGA->MONTH==mesyac
case cho=3
stri="¥¨"
set filter to &KNIGA->TYPE==1.and.&KNIGA->MONTH==mesyac
case cho=4
stri="®¢ë襮©"
set filter to &KNIGA->TYPE==2.and.&KNIGA->MONTH==mesyac
case cho=5
stri="€¢ á"
set filter to &KNIGA->TYPE==3.and.&KNIGA->MONTH==mesyac
endcase
IF Type==1
Set Order To 2
ENDIF
IF Type==1
seek main->lic_schet
ENDIF
Set Order To 1
If !found()
go top
Else
Go Recno()
Endif
if type=1
@ 1,0 say center('Š¨£ ¯à®¤ ¦ '+stri+" "+dbfilter(),78," ",.t.)
else
@ 1,0 say center('Š¨£ ¯®ªã¯®ª '+stri+" "+dbfilter(),78," ",.t.)
endif
declare zgl[11]
declare fil[11]
nm1=loarr('zgl','N ¤®ªã¬','‹¨æ¥¢®©','„ â ',' ® â à ¥ ¡ ¨ â ¥ « ì ','ˆ ',"ŽŠŽ•","ŽŠŽ",'‚ᥣ® á „‘',"‘㬬 „‘","’¨¯","Œ¥á")
nm2=loarr('fil','lic_schet',"number",'data','potrebitel','inn','okonx','okpo','wsegosnds','summands',"type","Month")
IF Type==1
inp='12000000000'
ELSE
inp='10000000000'
ENDIF
t1=2
l1=1
b1=14
r1=77
*********
fsbrowse(2,1,14,77,'fil','zgl',inp,urov,kl)
if cho>0
set filter to
endif
go top
PREV_REC:=-1
RET_VAL:=2
select(sel)
set order to ordbuf
go recbuf
setcolor(colorbuf)
win_rest(buff)
return NIL
FUNCTION bookpay(dogpotr,lic,dat,sum,nds,typ,mesyac)
LOCAL potrstring,innstring
NDS=IF(NDS==NIL,ROUND(SUM*SCHET_NDS/(SCHET_NDS+100),DECIMAL),NDS)
POTRSTRING=delstring(main->potrebitel,"ˆ")
INNSTRING=appendstring(main->potrebitel,"ˆ")
INNSTRING:=alltrim(substr(INNSTRING,4,11))
MESYAC:=IF(Mesyac==NIL,month(New_date+1),Mesyac)
replace number with DOGPOTR
replace lic_schet with LIC
replace data with DAT
replace wsegosnds with SUM
replace summands with NDS
replace type with TYP
replace potrebitel with POTRSTRING
replace inn with INNSTRING
replace okonx with MAIN->OKONX
replace okpo with MAIN->OKPO
replace month with mesyac
Return NIL
// ®¨áª ¤¢®©¨ª®¢ ¢ ª¨£¥ ¯à®¤ ¦.
FUNCTION FoundRec(sLic,sMon,sTyp)
Local IsFound:=0,Old_sel:=select(),rec:=recno(),rec18,aData[3]
AFill(aData,0)
select 18
rec18:=recno()
set order to 2
go top
seek slic
IF Found()
DO WHILE SfKniga->Number==sLic
IF Month==sMon.and.Type==sTyp
aData[1]:=Lic_Schet
aData[2]:=Data
aData[3]:=WsegoSNds
exit
ENDIF
skip
ENDDO
ENDIF
set order to 1
go rec18
select(Old_sel)
go rec
Return aData
Function BookPaySchet()
Local myScr:=Win_Save(),myClr:=SetColor(),MRec:=Recno(),tRec,mSel:=Select()
Private PlMonth,Plat_Dat,TownString,GruzPol,TypePay:=""
PlMonth:=Mesqc(GloMes)
plat_dat:=alltrim(str(day((data))))+" "+mesqc(month(data),1)+;
' '+alltrim(str(year(data)))
Select Main
tRec:=Recno()
Seek SfKniga->Number
select 77
seek main->lic_schet
if found()
TownString=Substr(appendstring(upper(licevoj->bank),upper("£.")),3)
TownString=Substr(townstring,1,1)+lower(substr(townstring,2))
If Atnum("€€€",Upper(Licevoj->Bank))>0
Gruzpol:=Alltrim(Alltrim(SfKniga->Potrebitel)+" "+Alltrim(Main->Adress))
Else
Gruzpol:=Alltrim(Alltrim(LICEVOJ->Object1)+" "+Alltrim(LICEVOJ->Object2)+Alltrim(Main->Adress))
Endif
else
townstring="."
gruzpol:=alltrim(main->adress)
endif
Select Main
Go tRec
Do Case
Case Cho=2
Report(DDir+"SFNew.Rpt",DDir+ReportFile,140)
Case Cho=3
Report(DDir+"SFNewP.Rpt",DDir+ReportFile,140)
Case Cho=4
Report(DDir+"SFNewH.Rpt",DDir+ReportFile,140)
Case Cho=5
Report(DDir+"SFNewA.Rpt",DDir+ReportFile,140)
EndCase
IF Al_Box({"Žâ¯¥ç â âì áç¥â-ä ªâãàã"},2)==1
Do Print_Fi
// Copy_(DDir+ReportFile,"prn")
EndIF
Select(mSel); Go MRec
SetColor(myClr); Win_Rest(myScr)
Return NIL
// Š¨£ ¯®ªã¯®ª
Function MakeKnigaP()
Local Month:=Month_Menu("ä®à¬¨à®¢ ¨ï ª¨£¨ ¯®ªã¯®ª"),Scr:=Win_Save(),Clr:=SetColor(),nPay:=0,nDolg:=0
Local Rec:=Recno(),Sel:=Select(),Opl,Kol_Kl:=0,oDlg,aSizeDeskTop,aPos,oProgress,RecCount:=0
Local aOpl:={},lFirst:=.T.,I,nLic,nMonth,cDat:=""
Private PlMonth:=Mesqc(Month),cNumPlat:=""
IF Month==0
Return NIL
ENDIF
oDlg := XbpDialog():new(AppDesktop(),SetAppWindow(),,,,.F.)
aSizeDesktop := AppDesktop():currentSize()
oDlg:create(oMainWindow ,, {100,50}, {aSizeDeskTop[1]-200,90} )
oDlg:title := "”®à¬¨à®¢ ¨¥ ª¨£¨ ¯®ªã¯®ª"
oDlg:SysMenu := .F.
oDlg:Configure()
oDlg:Show()
aSizeDesktop := oDlg:currentSize()
aPos := oDlg:CurrentPos()
oProgress := ProgressBar():new(oDlg ,, {5,10}, {aSizeDeskTop[1]-18,30},, .F. ) // Progress Bar Create
oProgress:create()
oProgress:minimum := 1
Do While Lic_Schet<99999.and..not.EOF()
RecCount:=RecCount+1
Skip
EndDo
oProgress:maximum := RecCount
Go Top
Do While Lic_Schet<99999.and..not.EOF()
oProgress:increment() // Progress Bar Increment
nPay:=CalckMinusPay(Month,Lic_Schet)
cDat:=GetPayDate(Month,Lic_Schet)
IF nPay>0
// PutBookSale(0,Month,Lic_Schet,nPay,cDat)
PutBookSale(0,Month,Lic_Schet,nPay,ctod(Alltrim(Str(LastDayOm(Month)))+"."+Alltrim(Str(Month))+"."+Alltrim(Str(Year(New_date)))),cDat)
ENDIF
Skip
EndDo
oProgress:destroy() // Progress Bar Destroy
oDlg:destroy()
DeleteFile(DDir+ReportFile)
Select(Sel); Go Rec
SetColor(Clr); Win_Rest(Scr)
Return NIL
Function GetPayDate(nMonth,nLic)
Local dDat,cDat:="",I,Sel:=Select(),Rec:=RecNo(),nCount:=0
FOR i=1 to nMonth
Month_:=Schet_Share+"o"+AllTrim(Str(i,2))+".dbf"
NameInd:=Schet_Share+"o"+AllTrim(Str(i,2))+".ntx"
Select 43
NetUse(Month_)
Set Index to &NameInd
Seek nLic
DO While Licevoj==nLIC
IF nCount==0
dDat:=Data
nCount:=nCount+1
ELSE
IF Data>dDat
dDat:=Data
ENDIF
ENDIF
Skip
ENDDO
Close
NEXT
cDat:=IF(nCount==0,"",DTOC(dDat))
Select(Sel)
Go Rec
Return cDat
Function CalckMinusPay(nMonth,nLic)
Local Sel:=Select(),Rec:=RecNo(),Sum:=0,Month_,NameInd
Month_:=Schet_Share+"o"+AllTrim(Str(nMonth,2))+".dbf"
NameInd:=Schet_Share+"o"+AllTrim(Str(nMonth,2))+".ntx"
select 44
NetUse(Month_)
Set Index to &NameInd
//go top
Seek nLic
DO While Licevoj==nLIC
Sum:=Sum+IF(Summa<0,-1*Summa,0)
Skip
ENDDO
Select(Sel)
Go Rec
Return Sum
Function PutBookSale(_TypeOplata,_Month,_Licevoj,_Summa,_Data,_cStr)
Local Rec:=Recno(),Sel:=Select(),Num,MyRec,TmpRec
_cStr:=IF(_cStr==NIL,"",_cStr)
Select Main
TmpRec:=RecNo()
Seek _Licevoj
Select 19
IF FileLock(0)
Append Blank
MyRec:=RecNo()
Go Bottom
Num:=Lic_Schet+1
Go Myrec
Replace Lic_Schet With Num
Replace Number With _Licevoj
Replace Data With _Data
Replace WsegoSNds With _Summa
Replace SummaNds With Round(_Summa*Schet_Nds/(100+Schet_Nds),2)
Replace Type With _TypeOplata
Replace Month With _Month
Replace NumPlat With _cStr
Replace Potrebitel With Delstring(Main->Potrebitel,"ˆ")
Replace Inn With Alltrim(Substr(appendstring(MAIN->POTREBITEL,"ˆ"),4,11))
Replace Okonx With Main->Okonx
Replace Okpo With Main->Okpo
Unlock
ENDIF
Select Main; GoBase(TmpRec)
Select(Sel); GoBase(Rec)
Return NIL
Function ReportBookSale()
Local Sel:=Select(),Rec:=RecNo(),Desc,cStr:="",CrLf:=Chr(13)+Chr(10)
Local oDlg,aSizeDeskTop,aPos,oProgress
oDlg := XbpDialog():new(AppDesktop(),SetAppWindow(),,,,.F.)
aSizeDesktop := oMainWindow:currentSize()
oDlg:create(oMainWindow ,, {100,50}, {aSizeDeskTop[1]-200,90} )
oDlg:title := "Ž¡à ¡®â ®"
oDlg:SysMenu := .F.
oDlg:Configure()
oDlg:Show()
aSizeDesktop := oDlg:currentSize()
aPos := oDlg:CurrentPos()
oProgress := ProgressBar():new(oDlg ,, {5,10}, {aSizeDeskTop[1]-18,30},, .F. )
oProgress:create()
oProgress:minimum := 1
oProgress:maximum := RecCount()
go top
nMonth:=Month
cStr:=cStr+center("Š ˆ ƒ € "+if(select()==18," Ž „ € †"," Ž Š “ Ž Š"),130," ")+crlf
cStr:=cStr+"®ªã¯ ⥫ì "+alltrim(SchetNameOrg)+crlf
cStr:=cStr+"ˆ¤¥â¨ä¨ª æ¨®ë© ®¬¥à ¯®ªã¯ ⥫ï "+alltrim(schetInn)+"/"+AllTrim(SchetKpp)+crlf
cStr:=cStr+"®ªã¯ª § "+mesqc(nmonth)+" "+AllTrim(Str(Year(New_date)))+"£. "+crlf
cStr:=cStr+"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿"+crlf
cStr:=cStr+"³ „ â ¨ ®¬¥à ³„ â ®¯« â별 â ¯à¨ïâ¨ï³ ¨¬¥®¢ ¨¥ ¯à®¤ ¢æ ³ˆ¤¥â¨ä¨ª 樳 ³‘âà ¯à®¨á- ³‚ᥣ® ¯®ªã¯®ª,³ ‚ ⮬ ç¨á«¥ ¯®ªã¯ª¨ ³ ‚ ⮬ ç¨á«¥ ¯®ªã¯ª¨ ³ ‚ ⮬ ç¨á«¥ ¯®ªã¯ª¨ ³ ‚ ⮬ ç¨á«¥ ¯®ªã¯ª¨ ³®ªã¯ª¨³"+crlf
cStr:=cStr+"³ áç¥â ³ áç¥â - ³ ãç¥â ⮢ - ³ ³®ë© ®¬¥à ³ ³å®¦¤¥¨ï ⮢ -³¢ª«îç ï „‘ ³ ®¡« £ ¥¬ë¥ «®£®¬ ³ ®¡« £ ¥¬ë¥ «®£®¬ ³ ®¡« £ ¥¬ë¥ «®£®¬ ³ ®¡« £ ¥¬ë¥ «®£®¬ ³®á¢®¡®¦³"+crlf
cStr:=cStr+"³ ä ªâãàë ³ ä ªâãàë ³à®¢ (à ¡®â, ³ ³ ¯à®¤ ¢æ ³ ³à . ®¬¥à ³ ³ ¯® áâ ¢ª¥ ³ ¯® áâ ¢ª¥ ³ ¯® áâ ¢ª¥ ³ ¯® áâ ¢ª¥ ³¤ ¥¬ë¥ ³"+crlf
cStr:=cStr+"³ ¯à®¤ ¢æ ³ ¯à®¤ ¢æ ³ãá«ã£) ¨¬ãé¥- ³ ³ ³ ³ â ¬®¦¥®© ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄij ®â ³"+crlf
cStr:=cStr+"³ ³ ³á⢥ëå ¯à ¢ ³ ³ ³ ³ ¤¥ª« à 樨 ³ ³ 18% ³ 10% ³ 0% ³ 20% ³ «®£ ³"+crlf
cStr:=cStr+"³ ³ ³ ³ ³ ³ ³ ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄij ³"+crlf
cStr:=cStr+"³ ³ ³ ³ ³ ³ ³ ³ ³ ‘⮨¬®áâì ³ ‘㬬 „‘ ³‘⮨¬®áâì ³ ‘㬬 „‘ ³‘⮨¬®áâì ³‘㬬 „‘³‘⮨¬®áâì ³‘㬬 „‘³ ³"+crlf
cStr:=cStr+"³ ³ ³ ³ ³ ³ ³ ³ ³ ¯®ªã¯®ª ¡¥§ ³ ³¯®ªã¯®ª ¡¥§ ³ ³¯®ªã¯®ª ¡¥§³ ³¯®ªã¯®ª ¡¥§³ ³ ³"+crlf
cStr:=cStr+"³ ³ ³ ³ ³ ³ ³ ³ ³ „‘ ³ ³ „‘ ³ ³ „‘ ³ ³ „‘ ³ ³ ³"+crlf
cStr:=cStr+"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ´"+crlf
cStr:=cStr+"³ 1 ³ 2 ³ 3 ³ 4 ³ 5a ³ 5¡ ³ 6 ³ 7 ³ 8 ³ 8¡ ³ 9 ³ 9¡ ³ 10 ³ 10¡ ³ 11 ³ 11¡ ³ 12 ³"+crlf
cStr:=cStr+"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ´"+crlf
Do While !EOF()
oProgress:increment() // Progress Bar Increment
cStr:=cStr+"³"+dtoc(data)+" "+str(lic_schet,6,0)+"³ "+Substr(NumPlat+Space(10),1,10)+" ³ "+dtoc(data)+" ³"+;
potrebitel+''+str(number,6,0)+"³"+substr(inn,1,12)+;
"³"+substr("§ "+Mesqc(nMonth)+space(11),1,14)+"³ ³"+;
str(wsegosnds,14,Decimal)+"³"+IF(sfkniga->type#3,str((wsegosnds-summands),15,2),Space(15))+;
"³"+str(summands,15,2)+;
"³ ³ ³ ³ ³ ³ ³ ³"+CrLf
SKIP
ENDDO
cStr:=cStr+"ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ"+crlf
Desc:=fcreate(Ddir+"otchet.gkv")
FWrite(Desc,cStr)
FClose(Desc)
oProgress:destroy() // Progress Bar Destroy
oDlg:Destroy()
Select(Sel)
Go Rec
Return NIL
Function PutBookPay(_TypeOplata,_Month,_Licevoj,_Summa,_Data,_cStr)
Local Rec:=Recno(),Sel:=Select(),Num,MyRec,TmpRec
_cStr:=IF(_cStr==NIL,"",_cStr)
Select Main
TmpRec:=RecNo()
Seek _Licevoj
Select 18
IF FileLock(0)
Append Blank
MyRec:=RecNo()
Go Bottom
Num:=Lic_Schet+1
Go Myrec
Replace Lic_Schet With Num
Replace Number With _Licevoj
Replace Data With _Data
Replace WsegoSNds With _Summa
Replace SummaNds With Round(_Summa*Schet_Nds/(100+Schet_Nds),2)
Replace Type With _TypeOplata
Replace Month With _Month
Replace NumPlat With _cStr
Replace Potrebitel With Delstring(Main->Potrebitel,"ˆ")
Replace Inn With Alltrim(Substr(appendstring(MAIN->POTREBITEL,"ˆ"),4,11))
Replace Okonx With Main->Okonx
Replace Okpo With Main->Okpo
Unlock
ENDIF
Select Main; GoBase(TmpRec)
Select(Sel); GoBase(Rec)
Return NIL
// Š¨£ ¯à®¤ ¦ ¯® ॠ«¨§ 樨
Function MakeSfKniga
Local Month:=Month_Menu("ä®à¬¨à®¢ ¨ï ª¨£¨ ¯à®¤ ¦"),Scr:=Win_Save(),Clr:=SetColor(),nPay:=0,nDolg:=0
Local Rec:=Recno(),Sel:=Select(),Opl,Kol_Kl:=0,oDlg,aSizeDeskTop,aPos,oProgress,RecCount:=0
Local aOpl:={},lFirst:=.T.,I,nLic,nMonth
Private PlMonth:=Mesqc(Month),cNumPlat:=""
IF Month==0
Return NIL
ENDIF
oDlg := XbpDialog():new(AppDesktop(),SetAppWindow(),,,,.F.)
aSizeDesktop := AppDesktop():currentSize()
oDlg:create(oMainWindow ,, {100,50}, {aSizeDeskTop[1]-200,90} )
oDlg:title := "”®à¬¨à®¢ ¨¥ ª¨£¨ ¯à®¤ ¦"
oDlg:SysMenu := .F.
oDlg:Configure()
oDlg:Show()
aSizeDesktop := oDlg:currentSize()
aPos := oDlg:CurrentPos()
oProgress := ProgressBar():new(oDlg ,, {5,10}, {aSizeDeskTop[1]-18,30},, .F. ) // Progress Bar Create
oProgress:create()
oProgress:minimum := 1
Do While Lic_Schet<99999.and..not.EOF()
RecCount:=RecCount+1
Skip
EndDo
oProgress:maximum := RecCount
Go Top
Do While Lic_Schet<99999.and..not.EOF()
oProgress:increment() // Progress Bar Increment
nPay:=CalckPay(Month,Lic_Schet,.f.)
Opl:=GetSum(Lic_schet,Month) //; Opl:=Opl+Round(Opl*Schet_Nds/100,Decimal)
nDolg:=GetDolg(Lic_Schet,IF(Month-1=0,13,Month-1))
IF Opl!=0
PutBookPay(0,Month,Lic_Schet,Opl,ctod(Alltrim(Str(LastDayOm(Month)))+"."+Alltrim(Str(Month))+"."+Alltrim(Str(Year(New_date)))))
ENDIF
//-------------------------------- § ¯¨áì ¢ ¨£ã ¯à®¤ ¦ ¢ ᮢ
lFirst:=.T.
nLic:=Lic_Schet
nMonth:=Month
// nPay:=CalckPay(nMonth,nLic,.f.)
// Opl:=SfKniga->Wsegosnds
// nDolg:=GetDolg(nLic,IF(nMonth-1=0,13,nMonth-1))
Opl:=Opl+nDolg
/*IF nLic==52
@ 1,0 Say nPay-Opl
ENDIF */
IF nPay-Opl>0
aOpl:=aGetOpl(nLic,nMonth)
For i=1 To Len(aOpl)
/*IF nLic==52
@ 2,0 Say i
@ 2, 10 Say Len(aOpl)
@ 3,0 Say aOpl[i]
ENDIF */
Opl:=Opl-aOpl[i][1]
IF Opl<0
IF lFirst
aOpl[i][1]:=-1*Opl
lFirst:=.F.
ENDIF
ELSE
aOpl[i][1]:=0
ENDIF
IF aOpl[i][1]>0
PutBookPay(3,nMonth,nLic,aOpl[i][1],ctod(Alltrim(Str(LastDayOm(nMonth)))+"."+Alltrim(Str(nMonth))+"."+Alltrim(Str(Year(New_date)))),aOpl[i][2])
ENDIF
/*IF nLic==52
Inkey(0)
ENDIF */
NEXT
ENDIF
//--------------------------------
Skip
EndDo
oProgress:destroy() // Progress Bar Destroy
oDlg:destroy()
DeleteFile(DDir+ReportFile)
Select(Sel); Go Rec
SetColor(Clr); Win_Rest(Scr)
Return NIL
FUNCTION Calc_Nds(SUM)
RETURN ROUND(SUM*SCHET_NDS/(SCHET_NDS+100),DECIMAL)
//----------------------------------------------- Š¨£ ¯à®¤ ¦ ¯® ®â£à㧪¥
FUNCTION MakeKnigaSF()
LOCAL scre:=win_save(),color:=setcolor(),sel:=select(),rec:=recno(),ls
LOCAL snum:=0,enum:=99999,sdat:=New_date-30,edat:=New_date+1,temp_,kol_kl
LOCAL CrLf:=chr(13)+chr(10),itog1:=0,itog2:=0,itog3:=0,nmonth,p1,p2,ps,ntx
LOCAL itog4:=0,itog5:=0,itog6:=0,itog7:=0,itog8:=0,itog9:=0,OldFilter:=DbFilter()
LOCAL page:=0,string:=0,pagelen:=42,first:=.t.,s1:=-1,innstring,potrstring
LOCAL lic_uniq:={},sum_opl:=0,mesyac,IsCentury,VsegoProdag:=0,nType,oDlg,aSizeDeskTop,oProgress
NMonth:=SfKniga->Month
nType :=SfKniga->Type
// ਠ¦ ⨨ ES‘ - ¢ë室¨¬ ¨§ ä®à¬¨à®¢ ¨ï
if nmonth==0
setcolor(color)
win_rest(scre)
select(sel)
go rec
prev_rec=-1
ret_val=2
RETURN NIL
else
do case
case sfkniga->type==0
p2:=schet_share+'o'+alltrim(str(int(nmonth)))+".dbf"
KnigaString:=" í«¥ªâà®í¥à£¨ï"
case sfkniga->type==1
p2:=schet_share+'p'+alltrim(str(int(nmonth)))+".dbf"
KnigaString:=" % ¡ ª "
case sfkniga->type==2
p2:=schet_share+'h'+alltrim(str(int(nmonth)))+".dbf"
KnigaString:=" ¯®¢ëè¥ ï"
case sfkniga->type==3
p2:=schet_share+'a'+alltrim(str(int(nmonth)))+".dbf"
KnigaString:=" ¢ á"
endcase
endif
//obrabot("”®à¬¨à®¢ ¨¥ ®âç¥â ¯® ª¨£¥")
oDlg := XbpDialog():new(AppDesktop(),SetAppWindow(),,,,.F.)
aSizeDesktop := AppDesktop():currentSize()
oDlg:create(oMainWindow ,, {100,50}, {aSizeDeskTop[1]-200,90} )
oDlg:title := " áç¥â ª¨£¨ ¯à®¤ ¦"
oDlg:SysMenu := .F.
oDlg:Configure()
oDlg:Show()
aSizeDesktop := oDlg:currentSize()
aPos := oDlg:CurrentPos()
oProgress := ProgressBar():new(oDlg ,, {5,10}, {aSizeDeskTop[1]-18,30},, .F. ) // Progress Bar Create
oProgress:create()
oProgress:minimum := 1
oProgress:maximum := RecCount()
go top
desc:=fcreate(Ddir+"otchet.gkv")
fwrite(desc,center("Š ˆ ƒ € "+if(select()==18," Ž „ € †"," Ž Š “ Ž Š"),130," ")+crlf)
fwrite(desc," «®£®¯« ⥫ì騪-¯à®¤ ¢¥æ "+alltrim(SchetNameOrg)+crlf)
fwrite(desc,"ˆ¤¥â¨ä¨ª æ¨®ë© ®¬¥à «®£®¯« ⥫ì騪 -¯à®¤ ¢æ "+alltrim(schetInn)+"/"+AllTrim(SchetKpp)+crlf)
fwrite(desc,"த ¦ § "+mesqc(nmonth)+" "+AllTrim(Str(Year(New_date)))+"£. "+KnigaString+crlf)
fwrite(desc,"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿"+crlf)
fwrite(desc,"³ „ â ¨ ®¬¥à ³ ¨¬¥®¢ ¨¥ ¯®ªã¯ â¥«ï ³ˆ¤¥â¨ä¨ª 樳 ³ „ â ®¯« âë ³‚ᥣ® ¯à®¤ ¦, ³ ‚ ⮬ ç¨á«¥ ¯à®¤ ¦¨ ³ ‚ ⮬ ç¨á«¥ ¯à®¤ ¦¨ ³‚ ⮬ ç¨á«¥ ¯à®¤ ¦¨³ ‚ ⮬ ç¨á«¥ ¯à®¤ ¦¨ ³à®¤ ¦¨,³"+crlf)
fwrite(desc,"³ áç¥â ³ ³®ë© ®¬¥à ³ ³ áç¥âë-ä ªâãàë ³¢ª«îç ï „‘ ³ ®¡« £ ¥¬ë¥ «®£®¬ ³ ®¡« £ ¥¬ë¥ «®£®¬ ³®¡« £ ¥¬ë¥ «®£®¬ ³ ®¡« £ ¥¬ë¥ «®£®¬ ³®á¢®¡®¦-³"+crlf)
fwrite(desc,"³ ä ªâãàë ³ ³ ¯®ªã¯ â¥«ï ³ ³ ¯à®¤ ¢æ ³ ³ ¯® áâ ¢ª¥ ³ ¯® áâ ¢ª¥ ³ ¯® áâ ¢ª¥ ³ ¯® áâ ¢ª¥ ³¤ ¥¬ë¥ ³"+crlf)
fwrite(desc,"³ ¯®á⠢騪 ³ ³ ³ ³ ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ®â ³"+crlf)
fwrite(desc,"³ ³ ³ ³ ³ ³ ³ 18% ³ 10% ³ 0% ³ 20% ³ «®£ ³"+crlf)
fwrite(desc,"³ ³ ³ ³ ³ ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄ´ ³"+crlf)
fwrite(desc,"³ ³ ³ ³ ³ ³ ³ ‘⮨¬®áâì ³ ‘㬬 „‘ ³‘⮨¬®áâì ³ ‘㬬 „‘³ ³ ‘⮨¬®áâì ³ ‘㬬 „‘ ³ ³"+crlf)
fwrite(desc,"³ ³ ³ ³ ³ ³ ³ ¯à®¤ ¦ ¡¥§ ³ ³¯à®¤ ¦ ¡¥§ ³ ³ ³ ¯à®¤ ¦ ¡¥§ ³ ³ ³"+crlf)
fwrite(desc,"³ ³ ³ ³ ³ ³ ³ „‘ ³ ³„‘ ³ ³ ³ „‘ ³ ³ ³"+crlf)
fwrite(desc,"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄ´"+crlf)
fwrite(desc,"³ 1 ³ 2 ³ 3 ³ 3a ³ 3¡ ³ 4 ³ 5a ³ 5¡ ³ 6a ³ 6¡ ³ 7 ³ 8a ³ 8¡ ³ 9 ³"+crlf)
fwrite(desc,"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄ´"+crlf)
//fwrite(desc,"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿"+crlf)
//fwrite(desc,"³ 1 ³ 2 ³ 3 ³ 3a ³ 4 ³ 5a ³ 5¡ ³ 6a ³ 6¡ ³ 7 ³ 8a ³ 8¡ ³ 9 ³"+crlf)
//fwrite(desc,"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄ´"+crlf)
string=17
first=.t.
go top
do while !eof()
if month=nmonth.and.nType==Type
VsegoProdag:=VsegoProdag+1
// if lic_schet>=snum.and.lic_schet<=enum.and.data>=sdat.and.data<=edat
if at(upper("Šà¥¤¨â"),upper(potrebitel))>0
s1:=lic_schet
exit
endif
endif
skip
enddo
go top
MySum:=0
IsCentury:=CSetCent()
Set Century Off
//temp_=39/VsegoProdag
//kol_kl=0
do while lic_schet<99999.and..not.eof()
if string>=pagelen
page++
string=4
fwrite(desc,"ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ"+crlf)
fwrite(desc,chr(12)+space(165)+"‘âà ¨æ "+alltrim(str(page))+crlf)
fwrite(desc,"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿"+crlf)
fwrite(desc,"³ 1 ³ 2 ³ 3 ³ 3a ³ 3¡ ³ 4 ³ 5a ³ 5¡ ³ 6a ³ 6¡ ³ 7 ³ 8a ³ 8¡ ³ 9 ³"+crlf)
fwrite(desc,"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄ´"+crlf)
endif
if month==nmonth.and.Type==nType
// if lic_schet>=snum.and.lic_schet<=enum.and.data>=sdat.and.data<=edat
oProgress:increment() // Progress Bar Increment
// kol_kl=kol_kl+temp_
// colorwin(12,21,12,21+kol_kl,'n/n')
fwrite(desc,"³"+dtoc(data)+" "+str(lic_schet,6,0)+"³"+;
potrebitel+''+str(number,6,0)+"³"+substr(inn,1,12)+;
"³"+substr("§ "+Mesqc(nMonth)+space(11),1,14)+"³"+;
IF(Type==3,Substr(NumPlat+Space(20),1,21),Space(21))+"³"+str(wsegosnds,14,Decimal)+;
"³"+IF(sfkniga->type#3,str((wsegosnds-summands),15,2),Space(15))+"³"+str(summands,15,2)+"³"+;
" ³ ³ ³ ³ ³ ³"+CrLf)
itog1=itog1+wsegosnds; itog2=itog2+(wsegosnds-summands)
itog3=itog3+summands
ls=number
MySum:=MySum+WsegoSNds
string++
// select(ps)
endif
skip
enddo
IF IsCentury
Set Century On
ELSE
Set Century Off
ENDIF
itog3=Round(Itog1*Schet_Nds/(100+Schet_Nds),2)
itog2=itog1-itog3
fwrite(desc,"ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÙ"+crlf)
//fwrite(desc,+space(20)+"‚ᥣ®:"+space(60)+str(itog1,15,2)+" "+;
// str(itog2,15,2)+" "+str(itog3,15,2)+" "+str(itog4,14,Decimal)+;
// " "+str(itog5,14,Decimal)+" "+str(itog6,14,Decimal)+crlf+chr(12))
fwrite(desc,+space(20)+"‚ᥣ®:"+space(60)+str(itog1,15,2)+" "+;
IF(nType#3,str(itog2,15,2),Space(15))+" "+str(itog3,15,2)+crlf+crlf)
FWrite(Desc," ƒ« ¢ë© ¡ãå£ «â¥à _________________ "+NameBuh+CrLf+CrLf+CrLf)
FWrite(Desc," ˆ¤¨¢¨¤ã «ìë© ¯à¥¤¯à¨¨¬ ⥫ì _________________ "+CrLf+CrLf)
FWrite(Desc,"¥ª¢¨§¨âë ᢨ¤¥â¥«ìá⢠® £®á㤠àá⢥®© ॣ¨áâà 樨 ¨¤¨¢¨¤ã «ì£® ¯à¥¤¯à¨¨¬ ⥫ï"+CrLf+CrLf)
FWrite(Desc,"___________________________________________________________________________________"+CrLf)
fclose(desc)
oProgress:destroy() // Progress Bar Increment
oDlg:destroy()
setcolor(color)
win_rest(scre)
select(sel)
Set Filter To &OldFilter
go rec
prev_rec=-1
ret_val=2
return NIL
/*
//----------------------------------------------- Š¨£ ¯à®¤ ¦ ¯® ®¯« â¥
FUNCTION MakeKnigaSF()
LOCAL scre:=win_save(),color:=setcolor(),sel:=select(),rec:=recno(),ls
LOCAL snum:=0,enum:=99999,sdat:=New_date-30,edat:=New_date+1,temp_,kol_kl
LOCAL CrLf:=chr(13)+chr(10),itog1:=0,itog2:=0,itog3:=0,nmonth,p1,p2,ps,ntx
LOCAL itog4:=0,itog5:=0,itog6:=0,itog7:=0,itog8:=0,itog9:=0,OldFilter:=DbFilter()
LOCAL page:=0,string:=0,pagelen:=42,first:=.t.,s1:=-1,innstring,potrstring
LOCAL lic_uniq:={},sum_opl:=0,mesyac,IsCentury,VsegoProdag:=0,nType
//if al_box({"‘ä®à¬¨à®¢ âì ®âç¥â ¯® ª¨£¥ "+if(select()=18,"¯à®¤ ¦","¯®ªã¯®ª")},2)==2
// Return NIL
//endif
//nmonth:=month_menu()
NMonth:=SfKniga->Month
nType :=SfKniga->Type
// ਠ¦ ⨨ ES‘ - ¢ë室¨¬ ¨§ ä®à¬¨à®¢ ¨ï
if nmonth==0
setcolor(color)
win_rest(scre)
select(sel)
go rec
prev_rec=-1
ret_val=2
RETURN NIL
else
ps:=select()
if .not.file(Ddir+'opl.dbf')
copy_(schet_share+"o"+alltrim(str(nmonth))+'.dbf',Ddir+"opl.dbf")
endif
obrabot("‘¡®à ¢á¥å ®¯« â § "+mesqc(nmonth))
p1=Ddir+'opl.dbf'
ntx:=Ddir+'opl.ntx'
select 120
use &p1 EXCLUSIVE alias opl1
index on licevoj to &ntx
zap
do case
case sfkniga->type==0
p2:=schet_share+'o'+alltrim(str(int(nmonth)))+".dbf"
KnigaString:=" í«¥ªâà®í¥à£¨ï"
case sfkniga->type==1
p2:=schet_share+'p'+alltrim(str(int(nmonth)))+".dbf"
KnigaString:=" % ¡ ª "
case sfkniga->type==2
p2:=schet_share+'h'+alltrim(str(int(nmonth)))+".dbf"
KnigaString:=" ¯®¢ëè¥ ï"
case sfkniga->type==3
p2:=schet_share+'a'+alltrim(str(int(nmonth)))+".dbf"
KnigaString:=" ¡®¨à®¢ ï"
endcase
select 121
netuse(p2,,,'opl2')
go top
temp_=39/reccount()
kol_kl=0
do while !eof()
kol_kl=kol_kl+temp_
colorwin(12,21,12,21+kol_kl,'n/n')
select opl1
@ 1,0 say RecCount()
IF Opl2->Licevoj<99999
IF NetAppend()
replace opl1->vid_dokum with opl2->vid_dokum
replace opl1->num_dokum with opl2->num_dokum
replace opl1->licevoj with opl2->licevoj
replace opl1->summa with if(atnum("‚Ž‡‚",upper(opl2->vid_dokum))#0,opl2->summa*-1,opl2->summa)
replace opl1->data with opl2->data
replace opl1->reestr with opl2->reestr
UNLOCK
ENDIF
ENDIF
select opl2
skip
enddo
Clear Typeahead
// @ 1,0 say "2"
// Inkey(1)
// select opl2
Select 121
use
select(ps)
Set Filter To
Go Top
endif
obrabot("”®à¬¨à®¢ ¨¥ ®âç¥â ¯® ª¨£¥")
//@ 1,0 say "1"
//inkey(1)
//al_box({"1"})
go top
desc:=fcreate(Ddir+"otchet.gkv")
fwrite(desc,center("Š ˆ ƒ € "+if(select()==18," Ž „ € †"," Ž Š “ Ž Š"),130," ")+crlf)
fwrite(desc," «®£®¯« ⥫ì騪-¯à®¤ ¢¥æ "+alltrim(schet_poluch)+crlf)
fwrite(desc,"ˆ¤¥â¨ä¨ª æ¨®ë© ®¬¥à «®£®¯« ⥫ì騪 -¯à®¤ ¢æ "+alltrim(schet_naz1)+crlf)
fwrite(desc,"த ¦ § "+mesqc(nmonth)+" "+AllTrim(Str(Year(New_date)))+"£. "+KnigaString+crlf)
fwrite(desc,"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"+crlf)
fwrite(desc,"³„ â ¨ ®¬¥à ³ ¨¬¥®¢ ¨¥ ¯®ªã¯ â¥«ï ³ˆ¤¥â¨ä¨ª 樳 ³‚ᥣ® ¯à®¤ ¦, ³ ‚ ⮬ ç¨á«¥ ¯à®¤ ¦¨ ³ — áâ¨ç ï ®¯« â ³"+crlf)
fwrite(desc,"³ áç¥â ³ ³®ë© ®¬¥à ³ ³¢ª«îç ï „‘ ³ ®¡« £ ¥¬ë¥ «®£®¬ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"+crlf)
fwrite(desc,"³ ä ªâãàë ³ ³ ¯®ªã¯ â¥«ï ³ ³ ³ ¯® áâ ¢ª¥ ³‘㬬 ¡¥§ „‘ ³ „‘ ³ ‘㬬 á „‘ ³"+crlf)
fwrite(desc,"³¯®á⠢騪 ³ ³ ³ ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ ³ ³"+crlf)
fwrite(desc,"³ ³ ³ ³ ³ ³ 18% ³ ³ ³ ³"+crlf)
fwrite(desc,"³ ³ ³ ³ ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ ³ ³"+crlf)
fwrite(desc,"³ ³ ³ ³ ³ ³ ‘⮨¬®áâì ³ ‘㬬 „‘ ³ ³ ³ ³"+crlf)
fwrite(desc,"³ ³ ³ ³ ³ ³ ¯à®¤ ¦ ¡¥§ ³ ³ ³ ³ ³"+crlf)
fwrite(desc,"³ ³ ³ ³ ³ ³ „‘ ³ ³ ³ ³ ³"+crlf)
fwrite(desc,"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"+crlf)
fwrite(desc,"³ 1 ³ 2 ³ 3 ³ 3a ³ 4 ³ 5a ³ 5¡ ³ 8 ³ 9 ³ 10 ³"+crlf)
fwrite(desc,"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"+crlf)
string=17
first=.t.
go top
do while !eof()
if month=nmonth.and.nType==Type
VsegoProdag:=VsegoProdag+1
// if lic_schet>=snum.and.lic_schet<=enum.and.data>=sdat.and.data<=edat
if at(upper("Šà¥¤¨â"),upper(potrebitel))>0
s1:=lic_schet
exit
endif
endif
skip
enddo
go top
if s1==-1
al_box({"‘㬬 ªà¥¤¨â®à᪮© § ¤®«¦¥®á⨠¥ ©¤¥ "})
endif
MySum:=0
IsCentury:=CSetCent()
Set Century Off
temp_=39/VsegoProdag
kol_kl=0
do while lic_schet<99999.and..not.eof()
if string>=pagelen
page++
string=4
fwrite(desc,"ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"+crlf)
fwrite(desc,chr(12)+space(165)+"‘âà ¨æ "+alltrim(str(page))+crlf)
fwrite(desc,"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"+crlf)
fwrite(desc,"³ 1 ³ 2 ³ 3 ³ 3a ³ 4 ³ 5a ³ 5¡ ³ 8 ³ 9 ³ 10 ³"+crlf)
fwrite(desc,"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"+crlf)
endif
if month==nmonth.and.Type==nType
// if lic_schet>=snum.and.lic_schet<=enum.and.data>=sdat.and.data<=edat
kol_kl=kol_kl+temp_
colorwin(12,21,12,21+kol_kl,'n/n')
fwrite(desc,"³"+dtoc(data)+" "+str(lic_schet,6,0)+"³"+;
potrebitel+''+str(number,6,0)+"³"+substr(inn,1,12)+;
"³"+substr("§ "+Mesqc(nMonth)+space(11),1,14)+"³"+str(wsegosnds,14,Decimal)+;
"³"+str((wsegosnds-summands),15,2)+"³"+str(summands,15,2)+"³")
itog1=itog1+wsegosnds; itog2=itog2+(wsegosnds-summands)
itog3=itog3+summands
ls=number
MySum:=MySum+WsegoSNds
select opl1
seek ls
if found()
itog7:=0
Do While LICEVOJ==LS
itog7:=itog7+summa
itog4:=itog4+(summa-calc_nds(summa))
itog5:=itog5+calc_nds(summa)
itog6:=itog6+summa
skip
Enddo
fwrite(desc,str(itog7-calc_nds(itog7),14,2)+"³"+;
str(calc_nds(itog7),14,2)+"³"+str(itog7,14,2)+"³"+crlf)
// “¤ «¥¨¥ ©¤¥®© ®¯« âë... ----------------------vvvvvvvvvvvvvvvvvv
do while .t.
seek ls
if found()
delete
else
exit
endif
enddo
//---------------------------------------------------------^^^^^^^^^^^^^^^^^^
else
fwrite(desc," ³ ³ ³"+crlf)
endif
string++
select(ps)
endif
skip
enddo
IF IsCentury
Set Century On
ELSE
Set Century Off
ENDIF
//----------------------------------------------- ‚뢮¤ ¯¥à¢®© áâப¨ ¥é¥ à §
IF S1>0
seek s1
fwrite(desc,"³"+dtoc(data)+" "+str(lic_schet,4,0)+"³"+;
potrebitel+''+str(number,6,0)+"³"+substr(inn,1,12)+;
"³"+space(14)+"³"+str(-1*wsegosnds,14,Decimal)+;
"³"+str(-1*(wsegosnds-summands),15,2)+"³"+str(-1*summands,15,2)+"³")
fwrite(desc," ³ ³ ³"+crlf)
itog1=itog1-wsegosnds; itog2=itog2-wsegosnds-summands
itog3=itog3-summands
ENDIF
//------------------------------------------------------- ®¤¡¨¢ª १ã«ìâ â
itog2=itog1-itog3