-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuFrmConta.dfm
1196 lines (1194 loc) · 34.1 KB
/
uFrmConta.dfm
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
object frmConta: TfrmConta
Left = 100
Top = 100
Caption = 'Conta'
ClientHeight = 514
ClientWidth = 968
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poOwnerFormCenter
WindowState = wsMaximized
PixelsPerInch = 96
TextHeight = 13
object jvpnl1: TJvPanel
Left = 0
Top = 0
Width = 321
Height = 459
Align = alLeft
BevelOuter = bvNone
Enabled = False
TabOrder = 0
object lbl5: TLabel
Left = 24
Top = 41
Width = 27
Height = 13
Caption = 'Nome'
end
object lbl6: TLabel
Left = 24
Top = 99
Width = 45
Height = 13
Caption = 'Endere'#231'o'
end
object lbl1: TLabel
Left = 24
Top = 157
Width = 42
Height = 13
Caption = 'Telefone'
end
object dbedt_nome: TDBEdit
Left = 24
Top = 66
Width = 265
Height = 21
CharCase = ecUpperCase
DataField = 'NOME'
DataSource = dtsCliente
ReadOnly = True
TabOrder = 0
end
object dbedt_endereco: TDBEdit
Left = 24
Top = 124
Width = 265
Height = 21
DataField = 'ENDERECO'
DataSource = dtsCliente
ReadOnly = True
TabOrder = 1
end
object dbedt_Telefone: TDBEdit
Left = 24
Top = 182
Width = 265
Height = 21
DataField = 'CONTATO'
DataSource = dtsCliente
ReadOnly = True
TabOrder = 2
end
end
object jvpnl2: TJvPanel
Left = 321
Top = 0
Width = 647
Height = 459
Align = alClient
BevelOuter = bvNone
TabOrder = 1
object dbgjvdbgrd1: TJvDBGrid
Left = 0
Top = 25
Width = 637
Height = 369
Align = alClient
DataSource = dtsCaderneta
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = 'Tahoma'
Font.Style = []
Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgTitleClick, dgTitleHotTrack]
ParentFont = False
ReadOnly = True
TabOrder = 1
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -16
TitleFont.Name = 'Tahoma'
TitleFont.Style = []
AutoAppend = False
AutoSort = False
BeepOnError = False
AutoSizeColumns = True
SelectColumnsDialogStrings.Caption = 'Select columns'
SelectColumnsDialogStrings.OK = '&OK'
SelectColumnsDialogStrings.NoSelectionWarning = 'At least one column must be visible!'
CanDelete = False
ColumnResize = gcrDataSet
EditControls = <>
RowsHeight = 27
TitleRowHeight = 23
BooleanEditor = False
Columns = <
item
Expanded = False
FieldName = 'DTHR_LANCAMENTO'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = [fsBold]
Title.Caption = 'Data/Hora'
Width = 128
Visible = True
end
item
Expanded = False
FieldName = 'NomeProduto'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Tahoma'
Font.Style = []
Title.Caption = 'Produto'
Width = 220
Visible = True
end
item
Expanded = False
FieldName = 'QUANTIDADE'
Title.Caption = 'Quant'
Width = 61
Visible = True
end
item
Expanded = False
FieldName = 'VALOR_TOTAL'
Title.Caption = 'Valor Total'
Width = 101
Visible = True
end
item
Color = clCream
Expanded = False
FieldName = 'SALDO'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Tahoma'
Font.Style = [fsBold]
Title.Caption = 'Acomulado'
Width = 118
Visible = True
end>
end
object jvpnl3: TJvPanel
Left = 0
Top = 0
Width = 647
Height = 25
Align = alTop
BevelOuter = bvNone
TabOrder = 0
DesignSize = (
647
25)
object btn_incluir: TJvXPButton
Left = 584
Top = 2
Width = 20
Height = 20
Hint = 'Incluir(F8)'
TabOrder = 0
TabStop = False
Glyph.Data = {
0954474946496D61676547494638396110001000E60000257C40EAF4EBA2E86C
73CE50AEBAC21FAC1D85B8904878695CBF43B4EE8823982CD9E8DD73D24BA3F5
5A92A2AB59A46948B73761D043C9E3CDB1DAB330914273B282FAFCFBBDFC6438
7C5595E85864B56B4B995C95C49F2FB12BC4F395C0F77B34665D81CE6BAAE87B
D0FF71449949E5F0E7BCD0C86FA48233A13D52966A6CCB5045B633388057D2FF
68EFF2F3D6ECD65B8E7463C24A46B643B2F26DC5F98079CF5ACCF9906DD44197
E36B7ED55EDFEFE13C93439DA9B5FFFFFF73C75ED0DBD9BED6C6DEE6DEB7F27B
99CB9DF9FAFA81BC8A46BD2E43895D52BA3EC9FC97E6F7E63BA04145B339EEF5
F0A4E67759C33E259F2D5CA1703BB32CAEEC78CAFE7941A44CC1CDCE6CC84ED1
FAA068DD4375CD5BDFE8E3000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000021F904000700FF002C
000000001000100086257C40EAF4EBA2E86C73CE50AEBAC21FAC1D85B8904878
695CBF43B4EE8823982CD9E8DD73D24BA3F55A92A2AB59A46948B73761D043C9
E3CDB1DAB330914273B282FAFCFBBDFC64387C5595E85864B56B4B995C95C49F
2FB12BC4F395C0F77B34665D81CE6BAAE87BD0FF71449949E5F0E7BCD0C86FA4
8233A13D52966A6CCB5045B633388057D2FF68EFF2F3D6ECD65B8E7463C24A46
B643B2F26DC5F98079CF5ACCF9906DD44197E36B7ED55EDFEFE13C93439DA9B5
FFFFFF73C75ED0DBD9BED6C6DEE6DEB7F27B99CB9DF9FAFA81BC8A46BD2E4389
5D52BA3EC9FC97E6F7E63BA04145B339EEF5F0A4E67759C33E259F2D5CA1703B
B32CAEEC78CAFE7941A44CC1CDCE6CC84ED1FAA068DD4375CD5BDFE8E3000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000078D803D8283848586873D2F320588844352591D8D3D01
1A460D52133A0187122837172B433D0A552584161C50192D1045824B111B4D82
0B0F4C33234815830635391B3D40142A3454085116830B3B493E001438361F31
292EA82721585A4E1E425747A785263B091E0953032C5B87443035220203183F
8D3C24190C1856932E074F18084C12E400048F8108070502003B}
Anchors = [akTop, akRight]
ParentShowHint = False
ShowHint = True
Style.Theme = OfficeXP
Style.UseStyleManager = False
OnClick = btn_incluirClick
end
object btn_excluir: TJvXPButton
Left = 556
Top = 2
Width = 20
Height = 20
Hint = 'Excluir item selecionado'
TabOrder = 1
TabStop = False
Glyph.Data = {
0954506E67496D61676589504E470D0A1A0A0000000D49484452000000100000
001008060000001FF3FF610000000467414D410000AFC837058AE90000001974
455874536F6674776172650041646F626520496D616765526561647971C9653C
000003024944415478DA85926B48935118C79FF3EEDD45E705152FC942DA74A0
2EEDD5E62A4D33742696961569EA0711334A53A3B01544885891891122495AC4
8274521678CB0B6A6A8697F48B9AF821DC724EC45A29BAE9DED3FB2E950CA53F
9C0FCFED77CE739E07618CA15F11CEE751B29743FA196DE6DBFA7CF88F5A6262
E34867E7CBE94D0D19E8D381081E9F92F507508114CDD0AA1A9B6A2ED4BF49DE
AEB0212CDCCDC5C7A739F8E8917D46B319A5979424A09EA4F39A5079F019F3CA
0A105C2E904221A83BBB5AD334B531987DDEBABAE24FAAC4F2E0C2DD522939AD
D5AE6457555F7D373E56815264B2789542F1CADFD3D3C6CCE1004208B80C4433
30D09F515717AA8E523A7AB9B975FA85EC0FE092244C6A753FF3349A9CC6C92F
2F5830622F71B5B515957AECAA4CB3B78B5DF3F7078B9717F06D6CA0796C7CD4
5328F4F09588DDB90401233ADDC28DE696CCD4A0A0D7A9B535B009D850995CFE
ECDCE0E059176F6FE16A6424089C9CC04CD38098E2CFFAD9B9C28F7DE9295450
239BBB2D80D513654C81A2A33DDBCBCE4E044A25705C5DC16832D117BBBA4F27
5354FD46DE8E802AA9AF224CAF6B152E2EDAAF0904C08B88009E48041513138F
6FF7F65EF977325B003D01D441EFE9AFAD66E30FE12A632F03588024099E5C8E
1CC562B8363090A79E9C7CB42DA04546ED95EA756DB030EFB66A8D20788E503B
13359EC238919048809448E8CC9191E84183A1630BA0C13FD0C367DED0C39933
484C8C93C79C6A82F8506CB184B349C709223707E3326427841957F7A9EC6FBA
9025B3F9BB15502FF5E38B8D0BDD02C36CC8F27A710B418CE6D1F830C6F42F76
2F58452174290BE372CCD8EF1D1C2A9F1A8D5956C0B0A7E89EED8CAE802D669B
D12362291570C4024D0FFDE9046DF67B0C215512C6C5263E1F1E1044D8D4F272
2FCA23B9F9596BABA5C6F564154237DB2D96BB9B3DFE05601587505122C6B786
0582B6729329DAFA07D749B23295A633D5803A4A30AD647C969D00AC4E303B17
CDE1E416631C6C05900891458742EFDFE9EB7DB882F1CC96316D03E00070F700
244C3393FF0DA9AE41BD54559B220000000049454E44AE426082}
Anchors = [akTop, akRight]
ParentShowHint = False
ShowHint = True
Style.Theme = OfficeXP
Style.UseStyleManager = False
OnClick = btn_excluirClick
end
end
object jvpnl4: TJvPanel
Left = 0
Top = 394
Width = 647
Height = 65
Align = alBottom
BevelOuter = bvNone
TabOrder = 3
DesignSize = (
647
65)
object lbl2: TLabel
Left = 244
Top = 16
Width = 61
Height = 16
Anchors = [akTop, akRight]
Caption = 'consumido'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object lbl3: TLabel
Left = 364
Top = 16
Width = 28
Height = 16
Anchors = [akTop, akRight]
Caption = 'pago'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object lbl4: TLabel
Left = 492
Top = 3
Width = 32
Height = 16
Anchors = [akTop, akRight]
Caption = 'Saldo'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object dbedt_consumido: TDBEdit
Left = 244
Top = 32
Width = 114
Height = 27
ParentCustomHint = False
Anchors = [akTop, akRight]
BiDiMode = bdLeftToRight
Color = 15527167
Ctl3D = True
DataField = 'VALOR_GASTO'
DataSource = dtsTotais
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Tahoma'
Font.Style = []
ParentBiDiMode = False
ParentCtl3D = False
ParentFont = False
ParentShowHint = False
ReadOnly = True
ShowHint = False
TabOrder = 0
end
object dbedt_pago: TDBEdit
Left = 364
Top = 32
Width = 117
Height = 21
Anchors = [akTop, akRight]
Color = 15794145
DataField = 'VALOR_PAGO'
DataSource = dtsTotais
ReadOnly = True
TabOrder = 1
end
object dbedt_total: TDBEdit
Left = 487
Top = 22
Width = 138
Height = 37
Anchors = [akTop, akRight]
Color = 14680063
DataField = 'SALDO'
DataSource = dtsTotais
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = 'Arial'
Font.Style = [fsBold]
ParentFont = False
ReadOnly = True
TabOrder = 2
end
end
object jvpnl6: TJvPanel
Left = 637
Top = 25
Width = 10
Height = 369
Align = alRight
BevelOuter = bvNone
TabOrder = 2
end
end
object jvpnl5: TJvPanel
Left = 0
Top = 459
Width = 968
Height = 55
Align = alBottom
TabOrder = 2
DesignSize = (
968
55)
object btn_ok: TButton
Left = 199
Top = 6
Width = 95
Height = 40
Cancel = True
Caption = '&OK'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ModalResult = 1
ParentFont = False
TabOrder = 0
end
object btn_relatorio: TButton
Left = 327
Top = 6
Width = 95
Height = 40
Caption = 'Relat'#243'rio'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
OnClick = btn_relatorioClick
end
object btn_pagar: TButton
Left = 669
Top = 6
Width = 95
Height = 40
Anchors = [akTop]
Caption = 'Pagar'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 2
OnClick = btn_pagarClick
end
end
object fdqCliente: TFDQuery
ConnectionName = 'Condominio'
SQL.Strings = (
'SELECT *'
'FROM CLIENTE'
'where'
' id_cliente = :id_cliente')
Left = 264
Top = 16
ParamData = <
item
Name = 'ID_CLIENTE'
DataType = ftLargeint
ParamType = ptInput
Value = 26
end>
object fdqClienteID_CLIENTE: TLargeintField
FieldName = 'ID_CLIENTE'
Origin = 'ID_CLIENTE'
ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
Required = True
end
object fdqClienteCODIGO: TLargeintField
FieldName = 'CODIGO'
Origin = 'CODIGO'
Required = True
end
object fdqClienteNOME: TStringField
FieldName = 'NOME'
Origin = 'NOME'
Required = True
Size = 150
end
object fdqClienteENDERECO: TStringField
FieldName = 'ENDERECO'
Origin = 'ENDERECO'
Size = 150
end
object fdqClienteCONTATO: TStringField
FieldName = 'CONTATO'
Origin = 'CONTATO'
Size = 150
end
object fdqClienteOBS: TMemoField
FieldName = 'OBS'
Origin = 'OBS'
BlobType = ftMemo
end
object fdqClientePERMITIR_SALDO_NEGATIVO: TBooleanField
FieldName = 'PERMITIR_SALDO_NEGATIVO'
Origin = 'PERMITIR_SALDO_NEGATIVO'
Required = True
end
object fdqClienteATIVO: TBooleanField
FieldName = 'ATIVO'
Origin = 'ATIVO'
Required = True
end
end
object dtsCliente: TDataSource
DataSet = fdqCliente
Left = 288
Top = 16
end
object fdqTotais: TFDQuery
BeforeOpen = fdqTotaisBeforeOpen
ConnectionName = 'Condominio'
SQL.Strings = (
'SELECT'
#9'cc.fk_temporada ,'
#9'cc.fk_cliente ,'#9
#9'sum(iif(NOT mv.PAGAMENTO,mv.VALOR_TOTAL,0)) valor_gasto,'#9
#9'sum(iif(mv.PAGAMENTO,mv.VALOR_TOTAL,0)*-1) valor_pago'#9','
#9'SUM(mv.valor_total) Saldo'
'FROM'
#9'caderneta_cliente cc'
#9'JOIN mov_produto mv ON'
#9#9'cc.id_caderneta = mv.fk_caderneta'
#9'LEFT JOIN produtos pr ON'
#9#9'pr.id_rodutos = mv.fk_produto'
#9'LEFT JOIN pedido ped ON'
#9#9'ped.id_pedido = mv.fk_pedido'
'WHERE'
#9'cc.FK_CLIENTE =:id_cliente'
#9'AND cc.FK_TEMPORADA = :id_temporada'
'and not mv.excluido '
'GROUP BY fk_temporada,FK_CLIENTE')
Left = 224
Top = 232
ParamData = <
item
Name = 'ID_CLIENTE'
DataType = ftLargeint
ParamType = ptInput
Value = 26
end
item
Name = 'ID_TEMPORADA'
DataType = ftLargeint
ParamType = ptInput
Value = 10
end>
object fdqTotaisFK_TEMPORADA: TLargeintField
FieldName = 'FK_TEMPORADA'
Origin = 'FK_TEMPORADA'
end
object fdqTotaisFK_CLIENTE: TLargeintField
FieldName = 'FK_CLIENTE'
Origin = 'FK_CLIENTE'
Required = True
end
object fdqTotaisVALOR_GASTO: TBCDField
FieldName = 'VALOR_GASTO'
Origin = 'VALOR_GASTO'
currency = True
Precision = 18
Size = 2
end
object fdqTotaisVALOR_PAGO: TBCDField
FieldName = 'VALOR_PAGO'
Origin = 'VALOR_PAGO'
currency = True
Precision = 18
Size = 2
end
object fdqTotaisSALDO: TBCDField
FieldName = 'SALDO'
Origin = 'SALDO'
currency = True
Precision = 18
Size = 2
end
end
object dtsTotais: TDataSource
DataSet = fdqTotais
Left = 248
Top = 232
end
object fdqCaderneta: TFDQuery
BeforeOpen = fdqCadernetaBeforeOpen
ConnectionName = 'Condominio'
SQL.Strings = (
'SELECT'
#9'cc.id_caderneta ,'
#9'cc.dthr_lancamento ,'
#9'cc.fk_temporada ,'
#9'cc.fk_cliente ,'
#9'cc.fk_dependente ,'
#9'mv.id_mov_produto ,'
#9'CAST(COALESCE(mv.fk_produto,'#39'T'#39' || mv.tipo_pagamento) AS VARCHA' +
'R(20)) fks ,'
#9'mv.quantidade ,'
#9'mv.pagamento ,'
#9'mv.valor_total ,'
' mv.excluido,'
#9'SUM(mv.valor_total) OVER (PARTITION BY cc.fk_temporada,cc.fk_cl' +
'iente ORDER BY'#9'dthr_lancamento,mv.id_mov_produto) Saldo'
'FROM'
#9'caderneta_cliente cc'
#9'JOIN mov_produto mv ON'
#9#9'cc.id_caderneta = mv.fk_caderneta'
#9'LEFT JOIN produtos pr ON'
#9#9'pr.id_rodutos = mv.fk_produto'#9
'WHERE'
#9'cc.FK_CLIENTE =:id_cliente'
#9'AND cc.FK_TEMPORADA = :id_temporada'
' and not mv.excluido '
'ORDER BY'#9
' dthr_lancamento,mv.id_mov_produto'#9)
Left = 408
Top = 152
ParamData = <
item
Position = 10
Name = 'ID_CLIENTE'
DataType = ftLargeint
ParamType = ptInput
Value = 26
end
item
Name = 'ID_TEMPORADA'
DataType = ftLargeint
ParamType = ptInput
Value = 10
end>
object fdqCadernetaID_CADERNETA: TLargeintField
FieldName = 'ID_CADERNETA'
Origin = 'ID_CADERNETA'
ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
Required = True
end
object fdqCadernetaDTHR_LANCAMENTO: TSQLTimeStampField
FieldName = 'DTHR_LANCAMENTO'
Origin = 'DTHR_LANCAMENTO'
Required = True
end
object fdqCadernetaFK_TEMPORADA: TLargeintField
AutoGenerateValue = arDefault
FieldName = 'FK_TEMPORADA'
Origin = 'FK_TEMPORADA'
ProviderFlags = []
ReadOnly = True
end
object fdqCadernetaFK_CLIENTE: TLargeintField
FieldName = 'FK_CLIENTE'
Origin = 'FK_CLIENTE'
Required = True
end
object fdqCadernetaFK_DEPENDENTE: TLargeintField
FieldName = 'FK_DEPENDENTE'
Origin = 'FK_DEPENDENTE'
Required = True
end
object fdqCadernetaID_MOV_PRODUTO: TLargeintField
AutoGenerateValue = arDefault
FieldName = 'ID_MOV_PRODUTO'
Origin = 'ID_MOV_PRODUTO'
ProviderFlags = []
ReadOnly = True
end
object fdqCadernetaFKS: TStringField
AutoGenerateValue = arDefault
FieldName = 'FKS'
Origin = 'FKS'
ProviderFlags = []
ReadOnly = True
end
object fdqCadernetaQUANTIDADE: TBCDField
AutoGenerateValue = arDefault
FieldName = 'QUANTIDADE'
Origin = 'QUANTIDADE'
ProviderFlags = []
ReadOnly = True
Precision = 18
end
object fdqCadernetaPAGAMENTO: TBooleanField
AutoGenerateValue = arDefault
FieldName = 'PAGAMENTO'
Origin = 'PAGAMENTO'
ProviderFlags = []
ReadOnly = True
end
object fdqCadernetaVALOR_TOTAL: TBCDField
AutoGenerateValue = arDefault
FieldName = 'VALOR_TOTAL'
Origin = 'VALOR_TOTAL'
ProviderFlags = []
ReadOnly = True
currency = True
Precision = 18
Size = 2
end
object fdqCadernetaSALDO: TBCDField
AutoGenerateValue = arDefault
FieldName = 'SALDO'
Origin = 'SALDO'
ProviderFlags = []
ReadOnly = True
currency = True
Precision = 18
Size = 2
end
object fdqCadernetaNomeProduto: TStringField
FieldKind = fkLookup
FieldName = 'NomeProduto'
LookupDataSet = fdqProdutoslookup
LookupKeyFields = 'ID'
LookupResultField = 'NOME'
KeyFields = 'FKS'
Size = 150
Lookup = True
end
object fdqCadernetaSignatario: TStringField
FieldKind = fkLookup
FieldName = 'Signatario'
LookupDataSet = fdqDependente
LookupKeyFields = 'ID_DEPENDENTES'
LookupResultField = 'NOME'
KeyFields = 'FK_DEPENDENTE'
Size = 150
Lookup = True
end
end
object dtsCaderneta: TDataSource
DataSet = fdqCaderneta
Left = 432
Top = 152
end
object fdqProdutoslookup: TFDQuery
CachedUpdates = True
Connection = dtmcon.conexao
SQL.Strings = (
'select'
' cast(ID_RODUTOS as varchar(20)) ID,'
' CODIGO,'
' FK_TEMPORADA,'
' NOME,'
' VALOR_UNI'
'from'
' produtos p'
'where p.fk_temporada = (select'
' t.id_temporadas'
' from'
' temporadas t'
' where t.ativo) '
'union all'
'select'
' cast('#39'T'#39'||tp.id as varchar(20)) id,'
' tp.id,'
' null,'
' cast(tp.descricao as varchar(150)),'
' null'
'from'
' tipo_pagamento tp')
Left = 272
Top = 136
object fdqProdutoslookupID: TStringField
AutoGenerateValue = arDefault
FieldName = 'ID'
Origin = 'ID'
ProviderFlags = []
ReadOnly = True
end
object fdqProdutoslookupCODIGO: TLargeintField
FieldName = 'CODIGO'
Origin = 'CODIGO'
Required = True
end
object fdqProdutoslookupFK_TEMPORADA: TLargeintField
FieldName = 'FK_TEMPORADA'
Origin = 'FK_TEMPORADA'
end
object fdqProdutoslookupNOME: TStringField
FieldName = 'NOME'
Origin = 'NOME'
Required = True
Size = 150
end
object fdqProdutoslookupVALOR_UNI: TBCDField
FieldName = 'VALOR_UNI'
Origin = 'VALOR_UNI'
Precision = 18
end
end
object dtsProdutoslookup: TDataSource
DataSet = fdqProdutoslookup
Left = 312
Top = 136
end
object fdspPagar: TFDStoredProc
ConnectionName = 'Condominio'
StoredProcName = 'PR_PAGAR_CADERNETA_DIRETO'
Left = 393
Top = 256
ParamData = <
item
Position = 1
Name = 'IN_DTHR_LANCAMENTO'
DataType = ftTimeStamp
ParamType = ptInput
end
item
Position = 2
Name = 'IN_CLIENTE'
DataType = ftInteger
ParamType = ptInput
end
item
Position = 3
Name = 'IN_TP_PAGAMENTO'
DataType = ftInteger
ParamType = ptInput
end
item
Position = 4
Name = 'IN_TEMPORADA'
DataType = ftInteger
ParamType = ptInput
end
item
Position = 5
Name = 'IN_VALOR_TOTAL'
DataType = ftFMTBcd
Precision = 15
NumericScale = 4
ParamType = ptInput
end>
end
object frepConta: TfrxReport
Version = '5.1.5'
DotMatrixReport = False
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Default'
PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 43451.876958622700000000
ReportOptions.LastChange = 43451.899567546300000000
ScriptLanguage = 'PascalScript'
ScriptText.Strings = (
'begin'
''
'end.')
Left = 593
Top = 152
Datasets = <
item
DataSet = fdsCaderneta
DataSetName = 'fdsCaderneta'
end
item
DataSet = fdsCliente
DataSetName = 'fdsCliente'
end>
Variables = <>
Style = <>
object Data: TfrxDataPage
Height = 1000.000000000000000000
Width = 1000.000000000000000000
end
object Page1: TfrxReportPage
PaperWidth = 210.000000000000000000
PaperHeight = 297.000000000000000000
PaperSize = 9
LeftMargin = 10.000000000000000000
RightMargin = 10.000000000000000000
TopMargin = 10.000000000000000000
BottomMargin = 10.000000000000000000
object ReportTitle1: TfrxReportTitle
FillType = ftBrush
Height = 52.913420000000000000
Top = 18.897650000000000000
Width = 718.110700000000000000
object Memo1: TfrxMemoView
Align = baWidth
Width = 718.110700000000000000
Height = 30.236240000000000000
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -27
Font.Name = 'Arial'
Font.Style = [fsBold]
HAlign = haCenter
Memo.UTF8W = (
'Extrato')
ParentFont = False
end
object Memo2: TfrxMemoView
Left = 7.559060000000000000
Top = 34.015770000000000000
Width = 56.692950000000000000
Height = 18.897650000000000000
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
Memo.UTF8W = (
'Cliente:')
ParentFont = False
end
object fdsClienteNOME: TfrxMemoView
Left = 68.031540000000000000
Top = 34.015770000000000000
Width = 260.787570000000000000
Height = 18.897650000000000000
DataField = 'NOME'
DataSet = fdsCliente
DataSetName = 'fdsCliente'
Memo.UTF8W = (
'[fdsCliente."NOME"]')
end
end
object MasterData1: TfrxMasterData
FillType = ftBrush
Height = 18.897650000000000000
Top = 173.858380000000000000
Width = 718.110700000000000000
DataSet = fdsCaderneta
DataSetName = 'fdsCaderneta'
RowCount = 0
object Memo9: TfrxMemoView
Align = baClient
Width = 718.110700000000000000
Height = 18.897650000000000000
Visibility = [vsPreview, vsExport]
Fill.BackColor = cl3DLight
Highlight.Font.Charset = DEFAULT_CHARSET
Highlight.Font.Color = clRed
Highlight.Font.Height = -13
Highlight.Font.Name = 'Arial'
Highlight.Font.Style = []
Highlight.Condition = '<Line> mod 2 = 1'
Highlight.FillType = ftBrush
end
object fdsCadernetaDTHR_LANCAMENTO: TfrxMemoView
Width = 113.385900000000000000
Height = 18.897650000000000000
DataSet = fdsCaderneta
DataSetName = 'fdsCaderneta'
DisplayFormat.FormatStr = 'dd/mm/yyyy hh:mm'
DisplayFormat.Kind = fkDateTime
Memo.UTF8W = (
'[fdsCaderneta."DTHR_LANCAMENTO"]')
end
object fdsCadernetaNomeProduto: TfrxMemoView
Left = 260.787570000000000000
Width = 230.551330000000000000
Height = 18.897650000000000000
DataField = 'NomeProduto'
DataSet = fdsCaderneta
DataSetName = 'fdsCaderneta'
Memo.UTF8W = (
'[fdsCaderneta."NomeProduto"]')
end
object fdsCadernetaSignatario: TfrxMemoView
Left = 120.944960000000000000
Width = 132.283550000000000000
Height = 18.897650000000000000
DataSet = fdsCaderneta
DataSetName = 'fdsCaderneta'
Memo.UTF8W = (
'[IIF(<fdsCaderneta."PAGAMENTO">,'#39#39',<fdsCaderneta."Signatario">)]')
end
object fdsCadernetaQUANTIDADE: TfrxMemoView
Left = 495.118430000000000000
Width = 68.031540000000000000
Height = 18.897650000000000000
DataSet = fdsCaderneta
DataSetName = 'fdsCaderneta'
HAlign = haRight
Memo.UTF8W = (
'[IIF(<fdsCaderneta."PAGAMENTO">,'#39#39',<fdsCaderneta."QUANTIDADE">)]')
end
object fdsCadernetaVALOR_TOTAL: TfrxMemoView
Left = 566.929500000000000000
Width = 151.181200000000000000
Height = 18.897650000000000000
DataField = 'VALOR_TOTAL'
DataSet = fdsCaderneta
DataSetName = 'fdsCaderneta'
DisplayFormat.FormatStr = '0.00'
DisplayFormat.Kind = fkNumeric
HAlign = haRight
Memo.UTF8W = (