From 43a1e52664bcb98a47c8df71776cd593bf6e45a7 Mon Sep 17 00:00:00 2001 From: roberto Date: Fri, 16 Jan 2009 15:00:06 +0000 Subject: [PATCH] Se adapatan los informes de listado de facturas para que el listado de IVA y de facturas sea agrupado por fecha de factura y luego el informe de listado de facturas pendiententes agrupado por fecha de vencimiento git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@842 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/Base/Base.dproj | 102 ++-- Source/Cliente/FactuGES.dproj | 6 +- Source/Cliente/FactuGES.rc | 8 +- Source/Cliente/FactuGES.res | Bin 171984 -> 171984 bytes Source/GUIBase/GUIBase.res | Bin 4748 -> 384 bytes .../Reports/uRptFacturasCliente_Server.dfm | 435 ++++++++++++------ .../Reports/uRptFacturasCliente_Server.pas | 36 +- Source/Servidor/FactuGES_Server.RES | Bin 23200 -> 23204 bytes Source/Servidor/FactuGES_Server.dproj | 2 +- Source/Servidor/FactuGES_Server.rc | 10 +- 10 files changed, 379 insertions(+), 220 deletions(-) diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index d03ddc0b..9237feb0 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -54,58 +54,58 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
TForm diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index 01cf1c83..9fdada02 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -54,11 +54,7 @@ Delphi.Personality VCLApplication -FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse1620FalseFalseFalseFalseFalse30821252Rodax Software S.L.1.6.2.0FactuGESFactuGES1.6.2.0 - - - - +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse1630FalseFalseFalseFalseFalse30821252Rodax Software S.L.1.6.3.0FactuGESFactuGES1.6.3.0 diff --git a/Source/Cliente/FactuGES.rc b/Source/Cliente/FactuGES.rc index 4ba61680..713abe9f 100644 --- a/Source/Cliente/FactuGES.rc +++ b/Source/Cliente/FactuGES.rc @@ -1,7 +1,7 @@ MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Factuges.ico" 1 VERSIONINFO -FILEVERSION 1,6,2,0 -PRODUCTVERSION 1,6,2,0 +FILEVERSION 1,6,3,0 +PRODUCTVERSION 1,6,3,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,10 +13,10 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "1.6.2.0\0" + VALUE "FileVersion", "1.6.3.0\0" VALUE "InternalName", "FactuGES\0" VALUE "ProductName", "FactuGES\0" - VALUE "ProductVersion", "1.6.2.0\0" + VALUE "ProductVersion", "1.6.3.0\0" END END BLOCK "VarFileInfo" diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index de03ef673a4752385b0384633e49c849a15a2b66..9d84751a327247d0f9398e929591d405e07bbdcd 100644 GIT binary patch delta 42 xcmcbxpXj4E_KB diff --git a/Source/GUIBase/GUIBase.res b/Source/GUIBase/GUIBase.res index 1641339fcc482e7e3492d1b45813a86619622c33..8b251f312bcccec5485024f6fe8d80e1cdf25746 100644 GIT binary patch delta 11 ScmeBCZD5|Duvteife`=|>;pCc literal 4748 zcmbW5&ub)A5XUPdpe&2#;C*uNAUVhgd+&(4um@dnom`vXF9g}ZuHJ;se=<3UNdFJg zbCw+UD9j$byGIXV`~6hC>h4S?F|k9X-j90q{Z_qtZ<;nUJCO8!h?p${kR>3GhM`oH*q zk=UsjOCIgA_4!`B+Gb&`I84R)bT4dy-BQV<-SyFz?R8ILEQ(+JB$u{sEXE@j@B*7W zT;iZH#|OJ<&DO$RCkM6VbK3(B(k{nbdv1lpc;E$xz9as|v3uE1V{hw2w~g3eD0an7 z{BT%G%irdMe*|oDJmgvJaA2`9B<6Xi*?M~Q;)@Sbfwf3uf zVaWkbUjU=;sL{BlYemIZXv%qZ{SZw{-TCU+;!nH6KDDIJumU+9{E0zXW4>7T)y|>$DQlv zRJe?TjSp{c!DqeayAnSMTtZZT;>LN7J0Rls+5m@q)MbyB*eL%Eu@(+$Cw}Pd@q7N| z%Q0*AHpCP^b9v`@jx-l_FD>khpW2W8(OU2&V5TrnoAY-m_hlcV?zq3;7{2gF{J#Hc z6R+o~mVenX?>@W0@_DVzyOFs(5464CY{!q9ChoF#_*eXi@4gFuV8?vhl=_w5$iKL0 zEV0nMBcN08xtRmsgJrqjh@s#|{?*ssnsG)mH*wa6{efF0JFWHok@kA5%b661{B38= zCcgJ|*ZFTpV$8<-&+AWpa)Q8*`wL&hMeNQ^v6I7$HSdLZhZ^&+6<@Uw_Zsml9^v3W zVvPDBKHh;i=RU4J_ta3E;)Mn>Y+L zKLZ0UQ+*km9FO-b?U4gmn-62iwzH6&*duKGo~aUV)bYDla8wWZ9+^7p-F<8lP@i!m z@vhbD_${F}h>^T;C(?(b*OJDk?{dEXB?nuehoON3HAb!7Mr7-ls!84-5V-jJugbu<_$}mU=Yd9!?TOX;|B-#B)+0x#9q*yqJiqS!`49d=7ztk$O+9=1i;?K_|J<8T z?0b7=-`Z3A#vV$4XJ5(lQ~TOZHUFdA%oWvK5zg&_IKXIbughQBA8XAsd#=@|TFLXC zy(^m((;DnQmDQKatmw!@c`| G?EMQ&4NnpP diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm index 76a12a6f..44f55957 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm @@ -491,32 +491,30 @@ object RptFacturasCliente: TRptFacturasCliente Connection = 'IBX' TargetTable = 'V_FACTURAS_CLIENTE' SQL = - 'select ID_EMPRESA,'#10'extract (year from fecha_vencimiento) as ANO,' + - #10'extract (month from fecha_vencimiento) as MES,'#10'case'#10'when extrac' + - 't (month from fecha_vencimiento) = 1 then '#39'ENERO - '#39' || extract ' + - '(year from fecha_vencimiento)'#10'when extract (month from fecha_ven' + - 'cimiento) = 2 then '#39'FEBRERO - '#39' || extract (year from fecha_venc' + - 'imiento)'#10'when extract (month from fecha_vencimiento) = 3 then '#39'M' + - 'ARZO - '#39' || extract (year from fecha_vencimiento)'#10'when extract (' + - 'month from fecha_vencimiento) = 4 then '#39'ABRIL - '#39' || extract (ye' + - 'ar from fecha_vencimiento)'#10'when extract (month from fecha_vencim' + - 'iento) = 5 then '#39'MAYO - '#39' || extract (year from fecha_vencimient' + - 'o)'#10'when extract (month from fecha_vencimiento) = 6 then '#39'JUNIO -' + - ' '#39' || extract (year from fecha_vencimiento)'#10'when extract (month ' + - 'from fecha_vencimiento) = 7 then '#39'JULIO - '#39' || extract (year fro' + - 'm fecha_vencimiento)'#10'when extract (month from fecha_vencimiento)' + - ' = 8 then '#39'AGOSTO - '#39' || extract (year from fecha_vencimiento)'#10'w' + - 'hen extract (month from fecha_vencimiento) = 9 then '#39'SEPTIEMBRE ' + - '- '#39' || extract (year from fecha_vencimiento)'#10'when extract (month' + - ' from fecha_vencimiento) = 10 then '#39'OCTUBRE - '#39' || extract (year' + - ' from fecha_vencimiento)'#10'when extract (month from fecha_vencimie' + - 'nto) = 11 then '#39'NOVIEMBRE - '#39' || extract (year from fecha_vencim' + - 'iento)'#10'when extract (month from fecha_vencimiento) = 12 then '#39'DI' + - 'CIEMBRE - '#39' || extract (year from fecha_vencimiento)'#10'end as TITU' + - 'LO,'#10'REFERENCIA, ID_CLIENTE, NOMBRE, SITUACION, NIF_CIF, FECHA_F' + - 'ACTURA, FECHA_VENCIMIENTO, BASE_IMPONIBLE, IMPORTE_IVA, IMPORTE_' + - 'TOTAL'#10#10'from V_facturas_cliente'#10'where {where}'#10'order by ANO, MES, ' + - 'NOMBRE'#10#10 + 'select ID_EMPRESA,'#10'extract (year from fecha_factura) as ANO,'#10'ext' + + 'ract (month from fecha_factura) as MES,'#10'case'#10'when extract (month' + + ' from fecha_factura) = 1 then '#39'ENERO - '#39' || extract (year from f' + + 'echa_factura)'#10'when extract (month from fecha_factura) = 2 then '#39 + + 'FEBRERO - '#39' || extract (year from fecha_factura)'#10'when extract (m' + + 'onth from fecha_factura) = 3 then '#39'MARZO - '#39' || extract (year fr' + + 'om fecha_factura)'#10'when extract (month from fecha_factura) = 4 th' + + 'en '#39'ABRIL - '#39' || extract (year from fecha_factura)'#10'when extract ' + + '(month from fecha_factura) = 5 then '#39'MAYO - '#39' || extract (year f' + + 'rom fecha_factura)'#10'when extract (month from fecha_factura) = 6 t' + + 'hen '#39'JUNIO - '#39' || extract (year from fecha_factura)'#10'when extract' + + ' (month from fecha_factura) = 7 then '#39'JULIO - '#39' || extract (year' + + ' from fecha_factura)'#10'when extract (month from fecha_factura) = 8' + + ' then '#39'AGOSTO - '#39' || extract (year from fecha_factura)'#10'when extr' + + 'act (month from fecha_factura) = 9 then '#39'SEPTIEMBRE - '#39' || extra' + + 'ct (year from fecha_factura)'#10'when extract (month from fecha_fact' + + 'ura) = 10 then '#39'OCTUBRE - '#39' || extract (year from fecha_factura)' + + #10'when extract (month from fecha_factura) = 11 then '#39'NOVIEMBRE - ' + + #39' || extract (year from fecha_factura)'#10'when extract (month from ' + + 'fecha_factura) = 12 then '#39'DICIEMBRE - '#39' || extract (year from fe' + + 'cha_factura)'#10'end as TITULO,'#10'REFERENCIA, ID_CLIENTE, NOMBRE, SIT' + + 'UACION, NIF_CIF, FECHA_FACTURA, fecha_vencimiento, BASE_IMPONIBL' + + 'E, IMPORTE_IVA, IMPORTE_TOTAL'#10#10'from V_facturas_cliente'#10'where {wh' + + 'ere}'#10'order by ANO, MES, FECHA_FACTURA, NOMBRE'#10#10 StatementType = stSQL ColumnMappings = < item @@ -642,6 +640,165 @@ object RptFacturasCliente: TRptFacturasCliente Name = 'IMPORTE_TOTAL' DataType = datCurrency end> + end + item + Params = <> + Statements = < + item + Connection = 'IBX' + TargetTable = 'V_FACTURAS_CLIENTE' + SQL = + 'select ID_EMPRESA,'#10'extract (year from fecha_vencimiento) as ANO,' + + #10'extract (month from fecha_vencimiento) as MES,'#10'case'#10'when extrac' + + 't (month from fecha_vencimiento) = 1 then '#39'ENERO - '#39' || extract ' + + '(year from fecha_vencimiento)'#10'when extract (month from fecha_ven' + + 'cimiento) = 2 then '#39'FEBRERO - '#39' || extract (year from fecha_venc' + + 'imiento)'#10'when extract (month from fecha_vencimiento) = 3 then '#39'M' + + 'ARZO - '#39' || extract (year from fecha_vencimiento)'#10'when extract (' + + 'month from fecha_vencimiento) = 4 then '#39'ABRIL - '#39' || extract (ye' + + 'ar from fecha_vencimiento)'#10'when extract (month from fecha_vencim' + + 'iento) = 5 then '#39'MAYO - '#39' || extract (year from fecha_vencimient' + + 'o)'#10'when extract (month from fecha_vencimiento) = 6 then '#39'JUNIO -' + + ' '#39' || extract (year from fecha_vencimiento)'#10'when extract (month ' + + 'from fecha_vencimiento) = 7 then '#39'JULIO - '#39' || extract (year fro' + + 'm fecha_vencimiento)'#10'when extract (month from fecha_vencimiento)' + + ' = 8 then '#39'AGOSTO - '#39' || extract (year from fecha_vencimiento)'#10'w' + + 'hen extract (month from fecha_vencimiento) = 9 then '#39'SEPTIEMBRE ' + + '- '#39' || extract (year from fecha_vencimiento)'#10'when extract (month' + + ' from fecha_vencimiento) = 10 then '#39'OCTUBRE - '#39' || extract (year' + + ' from fecha_vencimiento)'#10'when extract (month from fecha_vencimie' + + 'nto) = 11 then '#39'NOVIEMBRE - '#39' || extract (year from fecha_vencim' + + 'iento)'#10'when extract (month from fecha_vencimiento) = 12 then '#39'DI' + + 'CIEMBRE - '#39' || extract (year from fecha_vencimiento)'#10'end as TITU' + + 'LO,'#10'REFERENCIA, ID_CLIENTE, NOMBRE, SITUACION, NIF_CIF, fecha_f' + + 'actura, fecha_vencimiento, BASE_IMPONIBLE, IMPORTE_IVA, IMPORTE_' + + 'TOTAL'#10#10'from V_facturas_cliente'#10'where {where}'#10'order by ANO, MES, ' + + 'fecha_vencimiento, NOMBRE'#10#10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'ID_EMPRESA' + TableField = 'ID_EMPRESA' + end + item + DatasetField = 'ANO' + TableField = '' + SQLOrigin = 'ANO' + end + item + DatasetField = 'MES' + TableField = '' + SQLOrigin = 'MES' + end + item + DatasetField = 'TITULO' + TableField = '' + SQLOrigin = 'TITULO' + end + item + DatasetField = 'REFERENCIA' + TableField = 'REFERENCIA' + end + item + DatasetField = 'ID_CLIENTE' + TableField = 'ID_CLIENTE' + end + item + DatasetField = 'NOMBRE' + TableField = 'NOMBRE' + end + item + DatasetField = 'SITUACION' + TableField = 'SITUACION' + end + item + DatasetField = 'NIF_CIF' + TableField = 'NIF_CIF' + end + item + DatasetField = 'FECHA_FACTURA' + TableField = 'FECHA_FACTURA' + end + item + DatasetField = 'FECHA_VENCIMIENTO' + TableField = 'FECHA_VENCIMIENTO' + end + item + DatasetField = 'BASE_IMPONIBLE' + TableField = 'BASE_IMPONIBLE' + end + item + DatasetField = 'IMPORTE_IVA' + TableField = 'IMPORTE_IVA' + end + item + DatasetField = 'IMPORTE_TOTAL' + TableField = 'IMPORTE_TOTAL' + end> + end> + Name = 'InformeListadoFacturasPendientes' + Fields = < + item + Name = 'ID_EMPRESA' + DataType = datInteger + end + item + Name = 'ANO' + DataType = datSmallInt + end + item + Name = 'MES' + DataType = datSmallInt + end + item + Name = 'TITULO' + DataType = datString + Size = 19 + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + end + item + Name = 'ID_CLIENTE' + DataType = datInteger + end + item + Name = 'NOMBRE' + DataType = datString + Size = 255 + end + item + Name = 'SITUACION' + DataType = datString + Size = 19 + end + item + Name = 'NIF_CIF' + DataType = datString + Size = 15 + end + item + Name = 'FECHA_FACTURA' + DataType = datDateTime + end + item + Name = 'FECHA_VENCIMIENTO' + DataType = datDateTime + end + item + Name = 'BASE_IMPONIBLE' + DataType = datCurrency + end + item + Name = 'IMPORTE_IVA' + DataType = datCurrency + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + end> end> JoinDataTables = <> UnionDataTables = <> @@ -1441,67 +1598,17 @@ object RptFacturasCliente: TRptFacturasCliente PreviewOptions.Zoom = 1.000000000000000000 PrintOptions.Printer = 'Por defecto' PrintOptions.PrintOnSheet = 0 - ReportOptions.CreateDate = 39065.872423495400000000 - ReportOptions.LastChange = 39828.562168217590000000 + ReportOptions.CreateDate = 37800.807714351900000000 + ReportOptions.LastChange = 39829.645200729170000000 ScriptLanguage = 'PascalScript' ScriptText.Strings = ( - '' - 'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);' - 'var' - ' Cadena: String;' + 'procedure frxReportOnStartReport(Sender: TfrxComponent);' 'begin' - '{ DatosEmpresa.Lines.Clear;' - ' if ( <> '#39#39') then' - ' Cadena := '#39'TLF: '#39' + ;' - ' if ( <> '#39#39') then' - - ' Cadena := Cadena + '#39' FAX: '#39' + ;' - ' DatosEmpresa.Lines.Add(Cadena);' - '}' + ' Set('#39'Pagina'#39', 0);' + ' Set('#39'TotalPaginas'#39', 0); ' 'end;' '' - 'procedure NombreEmpresaOnBeforePrint(Sender: TfrxComponent);' - 'begin' - '{ NombreEmpresa.Lines.Clear;' - ' NombreEmpresa.Lines.Add();' - '}' - 'end;' - '' - 'procedure DireccionEnvioOnBeforePrint(Sender: TfrxComponent);' - 'var' - ' ACadena : String;' - 'begin' - '{ ACadena := '#39#39';' - ' DireccionEnvio.Lines.Clear;' - ' if ( <> '#39#39') then' - ' ACadena := ;' - '' - ' if ( <> '#39#39') then' - - ' ACadena := ACadena + '#39' '#39' + ;' - '' - ' DireccionEnvio.Lines.Add(ACadena);' - ' ACadena := '#39#39';' - ' DireccionEnvio.Lines.Add();' - ' if ( <> '#39#39') then' - ' ACadena := + '#39' '#39';' - ' if ( <> '#39#39') then' - ' ACadena := ACadena + ;' - '' - ' if (ACadena <> '#39#39') then' - ' DireccionEnvio.Lines.Add(ACadena);' - '' - ' if ( <> '#39#39') then' - ' DireccionEnvio.Lines.Add();' - '' - ' if ( <> '#39#39') then' - ' DireccionEnvio.Lines.Add();' - '}' - 'end;' - '' - 'procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);' + 'procedure Band1OnBeforePrint(Sender: TfrxComponent);' 'begin' ' if not Engine.FinalPass then' ' Set('#39'TotalPaginas'#39', ( + 1));' @@ -1510,64 +1617,26 @@ object RptFacturasCliente: TRptFacturasCliente ' Set('#39'Pagina'#39', ( + 1)); ' 'end;' '' - 'procedure frxReportOnStartReport(Sender: TfrxComponent);' + 'procedure mContinuaOnBeforePrint(Sender: TfrxComponent);' 'begin' - ' Set('#39'Pagina'#39', 0);' - ' Set('#39'TotalPaginas'#39', 0);' - ' Set('#39'Capitulo'#39', 0);' - ' Set('#39'NumCapitulos'#39', 0); ' - 'end;' - '' - 'procedure Memo4OnBeforePrint(Sender: TfrxComponent);' - 'begin' - ' if (Length() = 0) then' - ' Memo4.Visible := False; ' - 'end;' - '' - 'procedure Memo22OnBeforePrint(Sender: TfrxComponent);' - 'begin' - ' if ( = 0) then' - ' begin ' - ' Memo22.Text := '#39'Base imponible:'#39';' - '' - ' Memo10.Text := '#39'Importe total:'#39';' - ' Memo10.Font.Style := fsBold; ' - '' + ' if Engine.FinalPass then' + ' begin' - ' Memo9.Text := FormatFloat('#39'#,##0.00 '#8364#39', );' - ' Memo9.Font.Style := fsBold; ' - ' ' - ' Memo23.Text := '#39'[]% IVA:'#39';' - ' Memo25.Text := '#39'[frxDBCabecera."IMPORTE_IVA"]'#39';' - ' Memo12.Visible := False;' - ' Memo14.Visible := False;' - ' Memo16.Visible := False; ' - '' - ' Memo13.Visible := False;' - ' Memo15.Visible := False;' - ' Memo17.Visible := False;' - ' Memo11.Color := $00CCFFCC;' - ' end; ' - 'end;' - '' - 'procedure Memo39OnBeforePrint(Sender: TfrxComponent);' - 'begin' - ' Memo39.Clear; ' - ' if ( = '#39'F'#39') then' - - ' Memo39.Text := '#39'FACTURA'#39' ' + - ' ' - ' else' - ' Memo39.Text := '#39'ABONO'#39'; ' - 'end;' - '' - 'procedure Picture4OnBeforePrint(Sender: TfrxComponent);' - 'begin' - ' if ( = 1) then' - ' Picture4.Visible := True' - ' else' - ' Picture4.Visible := False; ' + ' //A la vez que salta este salta la asignacion de pagina por ' + + 'lo que no coincide nunca si no suponemos +1 ' + + ' ' + + ' ' + + ' ' + + ' ' + ' if (( + 1) = ) then' + ' begin ' + ' mContinua.Visible := True;' + ' end ' + ' else' + ' begin ' + ' mContinua.Visible := False;' + ' end ' + ' end; ' 'end;' '' 'begin' @@ -1763,4 +1832,94 @@ object RptFacturasCliente: TRptFacturasCliente Left = 576 Top = 16 end + object frxDBInformeListadoFacturasPendientes: TfrxDBDataset + UserName = 'frxDBInformeListadoFacturasPendientes' + CloseDataSource = True + DataSource = DADSInformeListadoFacturasPendientes + Left = 792 + Top = 16 + end + object DADSInformeListadoFacturasPendientes: TDADataSource + DataSet = tbl_InformeListadoFacturasPendientes.Dataset + DataTable = tbl_InformeListadoFacturasPendientes + Left = 792 + Top = 72 + end + object tbl_InformeListadoFacturasPendientes: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID_EMPRESA' + DataType = datInteger + end + item + Name = 'ANO' + DataType = datSmallInt + end + item + Name = 'MES' + DataType = datSmallInt + end + item + Name = 'TITULO' + DataType = datString + Size = 19 + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + end + item + Name = 'ID_CLIENTE' + DataType = datInteger + end + item + Name = 'NOMBRE' + DataType = datString + Size = 255 + end + item + Name = 'SITUACION' + DataType = datString + Size = 19 + end + item + Name = 'NIF_CIF' + DataType = datString + Size = 15 + end + item + Name = 'FECHA_FACTURA' + DataType = datDateTime + end + item + Name = 'FECHA_VENCIMIENTO' + DataType = datDateTime + end + item + Name = 'BASE_IMPONIBLE' + DataType = datCurrency + end + item + Name = 'IMPORTE_IVA' + DataType = datCurrency + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + end> + Params = <> + LogChanges = False + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + LocalSchema = schReport + LocalDataStreamer = DABINAdapter + DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] + LogicalName = 'InformeListadoFacturasPendientes' + IndexDefs = <> + Left = 792 + Top = 128 + end end diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas index edf88c6c..06788d87 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas @@ -83,13 +83,16 @@ type tbl_InformeListadoFacturas: TDAMemDataTable; DADSInformeListadoFacturas: TDADataSource; frxDBInformeListadoFacturas: TfrxDBDataset; + frxDBInformeListadoFacturasPendientes: TfrxDBDataset; + DADSInformeListadoFacturasPendientes: TDADataSource; + tbl_InformeListadoFacturasPendientes: TDAMemDataTable; schReport: TDASchema; procedure DataModuleCreate(Sender: TObject); private FConnection: IDAConnection; //Genera cada una de las facturas a imprimir procedure _GenerarFactura(const ID: Integer; const VerSello: Boolean = True); - function _GenerarInforme(const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const FechaVenInicio: Variant; const FechaVenFin: Variant; const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary; + function _GenerarInforme(ATabla: TDAMemDataTable; const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const FechaVenInicio: Variant; const FechaVenFin: Variant; const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary; public function GenerarFactura(const ListaID : TIntegerArray; const VerSello: Boolean = True): Binary; function GenerarFacturaEnPDF(const ListaID : TIntegerArray; const VerSello: Boolean = True): Binary; @@ -176,7 +179,7 @@ begin else ATipoInforme := rptInformeIVA; - Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, Null, Null, ListaIDClientes, ImporteMinimo); + Result := _GenerarInforme(tbl_InformeListadoFacturas, ATipoInforme, IdEmpresa, FechaInicio, FechaFin, Null, Null, ListaIDClientes, ImporteMinimo); end; function TRptFacturasCliente.GenerarInformeListadoFacturas(const IdEmpresa: Integer; @@ -193,7 +196,7 @@ begin else ATipoInforme := rptInformeListadoFacturasCliente; - Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, FechaVenInicio, FechaVenFin, ListaIDClientes, ImporteMinimo); + Result := _GenerarInforme(tbl_InformeListadoFacturas, ATipoInforme, IdEmpresa, FechaInicio, FechaFin, FechaVenInicio, FechaVenFin, ListaIDClientes, ImporteMinimo); end; function TRptFacturasCliente.GenerarInformeListadoFacturasPendientes( @@ -206,11 +209,11 @@ var ATipoInforme: String; begin - if tbl_InformeListadoFacturas.Active then - tbl_InformeListadoFacturas.Active := False; + if tbl_InformeListadoFacturasPendientes.Active then + tbl_InformeListadoFacturasPendientes.Active := False; // Filtrar el informe por situacion - with tbl_InformeListadoFacturas.DynamicWhere do + with tbl_InformeListadoFacturasPendientes.DynamicWhere do begin // (ID_EMPRESA >= ID) Condicion := NewBinaryExpression(NewField('', fld_FacturasClienteSITUACION), NewConstant('PAGADA', datString), dboNotEqual); @@ -228,7 +231,7 @@ begin ATipoInforme := rptInformeListadoFactuasClientePendiente; - Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, FechaVenInicio, FechaVenFin, ListaIDClientes, ImporteMinimo); + Result := _GenerarInforme(tbl_InformeListadoFacturasPendientes, ATipoInforme, IdEmpresa, FechaInicio, FechaFin, FechaVenInicio, FechaVenFin, ListaIDClientes, ImporteMinimo); end; procedure TRptFacturasCliente._GenerarFactura(const ID: Integer; const VerSello: Boolean = True); @@ -265,7 +268,7 @@ begin end; end; -function TRptFacturasCliente._GenerarInforme(const TipoInforme: String; +function TRptFacturasCliente._GenerarInforme(ATabla: TDAMemDataTable; const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio, FechaFin: Variant; const FechaVenInicio: Variant; const FechaVenFin: Variant; const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary; @@ -280,11 +283,11 @@ begin try - if tbl_InformeListadoFacturas.Active then - tbl_InformeListadoFacturas.Active := False; + if ATabla.Active then + ATabla.Active := False; // Filtrar el informe por empresa - with tbl_InformeListadoFacturas.DynamicWhere do + with ATabla.DynamicWhere do begin // (ID_EMPRESA >= ID) Condicion := NewBinaryExpression(NewField('', fld_FacturasClienteID_EMPRESA), NewConstant(IdEmpresa, datInteger), dboEqual); @@ -298,7 +301,7 @@ begin if not VarIsNull(FechaInicio) and not VarIsNull(FechaFin) then begin - with tbl_InformeListadoFacturas.DynamicWhere do + with ATabla.DynamicWhere do begin // (FECHA_INICIO between FECHA_FIN) Condicion := NewBinaryExpression(NewField('', fld_FacturasClienteFECHA_FACTURA), NewConstant(FechaInicio, datDateTime), dboGreaterOrEqual); @@ -314,7 +317,7 @@ begin if not VarIsNull(FechaVenInicio) and not VarIsNull(FechaVenFin) then begin - with tbl_InformeListadoFacturas.DynamicWhere do + with ATabla.DynamicWhere do begin // (FECHA_VENCIMIENTO_INICIO between FECHA_VENCIMIENTO_FIN) Condicion := NewBinaryExpression(NewField('', fld_FacturasClienteFECHA_VENCIMIENTO), NewConstant(FechaVenInicio, datDateTime), dboGreaterOrEqual); @@ -329,7 +332,7 @@ begin // Filtrar el informe por cliente if Assigned(ListaIDClientes) then begin - with tbl_InformeListadoFacturas.DynamicWhere do + with ATabla.DynamicWhere do begin for i := 0 to ListaIDClientes.Count - 1 do begin @@ -347,7 +350,7 @@ begin // Filtrar el informe por importe minimo if (ImporteMinimo > 0) then begin - with tbl_InformeListadoFacturas.DynamicWhere do + with ATabla.DynamicWhere do begin // (IMPORTE_TOTAL > ImporteMinimo) Condicion := NewBinaryExpression(NewField('', fld_FacturasClienteIMPORTE_TOTAL), NewConstant(ImporteMinimo, datCurrency), dboGreaterOrEqual); @@ -359,7 +362,8 @@ begin end; - tbl_InformeListadoFacturas.Active := True; + ATabla.Active := True; + showmessage(inttostr(ATabla.RecordCount)); AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, IntToStr(IdEmpresa)); if VarIsNull(AInforme) then diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index fe0af8c1ce9e486b2a6c2f99dfab493237007738..9d66017f4a33272b600643148c62139f34020ff3 100644 GIT binary patch delta 109 zcmZ3mm2t^d#tnBO7*|Zb8zB!Q|3;W{GBdC-FfuSOFi*CQlx1X_92u$1_-Jx%q&=hY zDelphi.Personality -FalseTrueFalse/standaloneTrueFalse1620FalseFalseFalseFalseFalse308212521.6.2.01.6.2.0viernes, 09 de enero de 2009 18:39FactuGES_Server.dpr +FalseTrueFalse/standaloneTrueFalse1630FalseFalseFalseFalseFalse308212521.6.3.01.6.3.0jueves, 15 de enero de 2009 14:12FactuGES_Server.dpr diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index c2800aad..1e02e22a 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -1,7 +1,7 @@ MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Servidor.ico" 1 VERSIONINFO -FILEVERSION 1,6,2,0 -PRODUCTVERSION 1,6,2,0 +FILEVERSION 1,6,3,0 +PRODUCTVERSION 1,6,3,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -12,9 +12,9 @@ BEGIN BEGIN BLOCK "0C0A04E4" BEGIN - VALUE "FileVersion", "1.6.2.0\0" - VALUE "ProductVersion", "1.6.2.0\0" - VALUE "CompileDate", "jueves, 15 de enero de 2009 14:12\0" + VALUE "FileVersion", "1.6.3.0\0" + VALUE "ProductVersion", "1.6.3.0\0" + VALUE "CompileDate", "viernes, 16 de enero de 2009 15:08\0" END END BLOCK "VarFileInfo"