From 375e5eeb84a9827f9eacabac7a4eb2837edcd752 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 6 Nov 2013 11:54:10 +0000 Subject: [PATCH] Tarea #1278 -> Trasladar el IVA a los detalles de las facturas de proveedor git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@1082 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Build/Build.fbpInf | 2 +- Database/scripts/factuges.sql | 3 + .../Controladores/uControllerDetallesBase.pas | 15 +- Source/Cliente/FactuGES.rc | 2 +- Source/GUIBase/uViewDetallesBase.dfm | 53 +- Source/GUIBase/uViewTotales.dfm | 38 +- .../Views/FacturasCliente_view.dproj | 36 +- .../Views/uViewDetallesFacturaCliente.dfm | 142 +-- .../uDetallesFacturaProveedorController.pas | 108 ++- .../uFacturasProveedorController.pas | 9 +- .../Data/uDataModuleFacturasProveedor.dfm | 22 + .../Model/schFacturasProveedorClient_Intf.pas | 153 +++- .../Model/schFacturasProveedorServer_Intf.pas | 145 ++- .../Model/uBizDetallesFacturaProveedor.pas | 20 +- .../Model/uBizFacturasProveedor.pas | 16 +- .../Servidor/srvFacturasProveedor_Impl.dfm | 155 +++- .../Views/FacturasProveedor_view.dpk | Bin 2309 -> 2463 bytes .../Views/FacturasProveedor_view.dproj | 69 +- .../Views/uEditorFacturaProveedor.dfm | 466 ++++------ .../Views/uEditorFacturaProveedor.pas | 97 +- .../Views/uViewDetallesFacturaProveedor.dfm | 144 ++- .../Views/uViewDetallesFacturaProveedor.pas | 90 +- .../Views/uViewFacturasProveedor.dfm | 1 + .../Views/uViewTotalesVariosIVA.dfm | 863 ++++++++++++++++++ .../Views/uViewTotalesVariosIVA.pas | 85 ++ Source/Servidor/FactuGES_Server.RES | Bin 23212 -> 23216 bytes Source/Servidor/FactuGES_Server.dpr | 6 +- Source/Servidor/FactuGES_Server.rc | 4 +- Source/Servidor/uDataModuleServer.dfm | 4 +- 29 files changed, 2163 insertions(+), 585 deletions(-) create mode 100644 Source/Modulos/Facturas de proveedor/Views/uViewTotalesVariosIVA.dfm create mode 100644 Source/Modulos/Facturas de proveedor/Views/uViewTotalesVariosIVA.pas diff --git a/Build/Build.fbpInf b/Build/Build.fbpInf index 5b7ef20b..1a0b5bc5 100644 --- a/Build/Build.fbpInf +++ b/Build/Build.fbpInf @@ -6,7 +6,7 @@ - + diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index dae25d0c..6fede1c5 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -759,6 +759,9 @@ CREATE TABLE FACTURAS_PROVEEDOR_DETALLES ( DESCUENTO TIPO_PORCENTAJE, IMPORTE_PORTE TIPO_IMPORTE, IMPORTE_TOTAL TIPO_IMPORTE, + ID_TIPO_IVA TIPO_ID, + IVA TIPO_PORCENTAJE, + IMPORTE_IVA TIPO_IMPORTE VISIBLE TIPO_BOOLEANO, FECHA_ALTA TIMESTAMP, FECHA_MODIFICACION TIMESTAMP diff --git a/Source/Base/Controladores/uControllerDetallesBase.pas b/Source/Base/Controladores/uControllerDetallesBase.pas index dbda2ed5..fa211565 100644 --- a/Source/Base/Controladores/uControllerDetallesBase.pas +++ b/Source/Base/Controladores/uControllerDetallesBase.pas @@ -638,12 +638,15 @@ procedure TControllerDetallesBase.TratamientoDetalleConcepto(DataTable: TDADataT begin with DataTable do begin - if not Editing then Edit; - //Si alguno de los campos de calculo de total es nulo el total tambien será nulo - if (VarIsNull(FieldByName(CAMPO_CANTIDAD).AsVariant) - or VarIsNull(FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant)) - then FieldByName(CAMPO_IMPORTE_TOTAL).AsVariant := Null - else FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat := CalcularImporteTotalConcepto(DataTable); + if not Editing then + Edit; + + // Si alguno de los campos de calculo de total es nulo el total tambien será nulo + if (VarIsNull(FieldByName(CAMPO_CANTIDAD).AsVariant) or VarIsNull(FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant)) then + FieldByName(CAMPO_IMPORTE_TOTAL).AsVariant := Null + else + FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat := CalcularImporteTotalConcepto(DataTable); + Post; end; end; diff --git a/Source/Cliente/FactuGES.rc b/Source/Cliente/FactuGES.rc index 75ebc557..0a9025b4 100644 --- a/Source/Cliente/FactuGES.rc +++ b/Source/Cliente/FactuGES.rc @@ -1,4 +1,4 @@ -MAINICON ICON "C:\Codigo tecsitel\Resources\Iconos\Factuges.ico" +MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Factuges.ico" 1 VERSIONINFO FILEVERSION 2,0,2,0 PRODUCTVERSION 2,0,2,0 diff --git a/Source/GUIBase/uViewDetallesBase.dfm b/Source/GUIBase/uViewDetallesBase.dfm index 59cf4c93..03b8add7 100644 --- a/Source/GUIBase/uViewDetallesBase.dfm +++ b/Source/GUIBase/uViewDetallesBase.dfm @@ -10,7 +10,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase Left = 0 Top = 0 Width = 451 - Height = 73 + Height = 68 AutoSize = True ButtonWidth = 141 Caption = 'ToolBar1' @@ -42,29 +42,30 @@ inherited frViewDetallesBase: TfrViewDetallesBase Top = 0 Action = actSubir AutoSize = True + Wrap = True end object ToolButton4: TToolButton - Left = 184 - Top = 0 + Left = 0 + Top = 22 Action = actBajar AutoSize = True end object ToolButton14: TToolButton - Left = 240 - Top = 0 + Left = 56 + Top = 22 Action = FontEdit1 AutoSize = True Wrap = True end object FontName: TJvFontComboBox Left = 0 - Top = 22 + Top = 44 Width = 145 Height = 22 DroppedDownWidth = 145 MaxMRUCount = 0 FontName = 'Tahoma' - ItemIndex = 42 + ItemIndex = 39 Options = [foTrueTypeOnly, foNoOEMFonts, foScalableOnly, foWysiWyg] Sorted = True TabOrder = 2 @@ -74,7 +75,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object FontSize: TEdit Left = 145 - Top = 22 + Top = 44 Width = 26 Height = 22 Hint = 'Font Size|Select font size' @@ -85,7 +86,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object UpDown1: TUpDown Left = 171 - Top = 22 + Top = 44 Width = 16 Height = 22 Associate = FontSize @@ -94,7 +95,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object ToolButton13: TToolButton Left = 187 - Top = 22 + Top = 44 Width = 8 Caption = 'ToolButton13' ImageIndex = 10 @@ -102,55 +103,54 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object ToolButton6: TToolButton Left = 195 - Top = 22 + Top = 44 Action = RichEditBold1 AutoSize = True end object ToolButton7: TToolButton Left = 261 - Top = 22 + Top = 44 Action = RichEditItalic1 AutoSize = True end object ToolButton8: TToolButton Left = 328 - Top = 22 + Top = 44 Action = RichEditUnderline1 AutoSize = True end object ToolButton12: TToolButton - Left = 0 - Top = 22 + Left = 411 + Top = 44 Width = 8 Caption = 'ToolButton12' ImageIndex = 10 - Wrap = True Style = tbsSeparator end object ToolButton9: TToolButton - Left = 0 - Top = 49 + Left = 419 + Top = 44 Action = RichEditAlignLeft1 AutoSize = True end object ToolButton10: TToolButton - Left = 145 - Top = 49 + Left = 564 + Top = 44 Action = RichEditAlignCenter1 AutoSize = True end object ToolButton11: TToolButton - Left = 270 - Top = 49 + Left = 689 + Top = 44 Action = RichEditAlignRight1 AutoSize = True end end object cxGrid: TcxGrid Left = 0 - Top = 99 + Top = 94 Width = 451 - Height = 205 + Height = 210 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -161,6 +161,8 @@ inherited frViewDetallesBase: TfrViewDetallesBase TabOrder = 1 LookAndFeel.Kind = lfStandard LookAndFeel.NativeStyle = True + ExplicitTop = 99 + ExplicitHeight = 205 object cxGridView: TcxGridDBTableView OnKeyDown = cxGridViewKeyDown NavigatorButtons.ConfirmDelete = False @@ -349,11 +351,12 @@ inherited frViewDetallesBase: TfrViewDetallesBase end object TBXDock1: TTBXDock Left = 0 - Top = 73 + Top = 68 Width = 451 Height = 26 BackgroundOnToolbars = False UseParentBackground = True + ExplicitTop = 73 object TBXToolbar1: TTBXToolbar Left = 0 Top = 0 diff --git a/Source/GUIBase/uViewTotales.dfm b/Source/GUIBase/uViewTotales.dfm index 0ef60739..8a62fd4f 100644 --- a/Source/GUIBase/uViewTotales.dfm +++ b/Source/GUIBase/uViewTotales.dfm @@ -1,9 +1,9 @@ inherited frViewTotales: TfrViewTotales - Width = 451 - Height = 252 + Width = 899 + Height = 267 Align = alBottom - ExplicitWidth = 451 - ExplicitHeight = 252 + ExplicitWidth = 899 + ExplicitHeight = 267 object Bevel5: TBevel Left = 666 Top = 109 @@ -15,8 +15,8 @@ inherited frViewTotales: TfrViewTotales AlignWithMargins = True Left = 0 Top = 0 - Width = 451 - Height = 252 + Width = 899 + Height = 267 Margins.Left = 0 Margins.Top = 0 Margins.Right = 0 @@ -26,22 +26,24 @@ inherited frViewTotales: TfrViewTotales TabOrder = 0 TabStop = False AutoContentSizes = [acsWidth, acsHeight] + ExplicitWidth = 451 + ExplicitHeight = 252 object Bevel3: TBevel - Left = 305 + Left = 457 Top = 28 Width = 3 Height = 100 Shape = bsRightLine end object Bevel4: TBevel - Left = 417 + Left = 569 Top = 70 Width = 342 Height = 9 Shape = bsBottomLine end object Bevel1: TBevel - Left = 417 + Left = 569 Top = 186 Width = 368 Height = 9 @@ -90,7 +92,7 @@ inherited frViewTotales: TfrViewTotales Width = 87 end object ImporteIVA: TcxDBCurrencyEdit - Left = 488 + Left = 640 Top = 105 AutoSize = False DataBinding.DataField = 'IMPORTE_IVA' @@ -125,7 +127,7 @@ inherited frViewTotales: TfrViewTotales Width = 20 end object ImporteTotal: TcxDBCurrencyEdit - Left = 418 + Left = 570 Top = 159 AutoSize = False DataBinding.DataField = 'IMPORTE_TOTAL' @@ -195,7 +197,7 @@ inherited frViewTotales: TfrViewTotales Width = 65 end object edtIVA: TcxDBSpinEdit - Left = 417 + Left = 569 Top = 105 AutoSize = False DataBinding.DataField = 'IVA' @@ -236,7 +238,7 @@ inherited frViewTotales: TfrViewTotales Width = 65 end object ImporteBase: TcxDBCurrencyEdit - Left = 417 + Left = 569 Top = 28 AutoSize = False DataBinding.DataField = 'BASE_IMPONIBLE' @@ -271,7 +273,7 @@ inherited frViewTotales: TfrViewTotales Width = 91 end object edtRE: TcxDBSpinEdit - Left = 417 + Left = 569 Top = 132 AutoSize = False DataBinding.DataField = 'RE' @@ -312,7 +314,7 @@ inherited frViewTotales: TfrViewTotales Width = 65 end object ImporteRE: TcxDBCurrencyEdit - Left = 488 + Left = 640 Top = 132 AutoSize = False DataBinding.DataField = 'IMPORTE_RE' @@ -450,7 +452,7 @@ inherited frViewTotales: TfrViewTotales Width = 20 end object bTiposIVA: TButton - Left = 157 + Left = 309 Top = 109 Width = 132 Height = 21 @@ -488,7 +490,7 @@ inherited frViewTotales: TfrViewTotales Width = 221 end object edtRetencion: TcxDBSpinEdit - Left = 417 + Left = 569 Top = 206 AutoSize = False DataBinding.DataSource = DADataSource @@ -527,7 +529,7 @@ inherited frViewTotales: TfrViewTotales Width = 65 end object edtImporteRetencion: TcxDBCurrencyEdit - Left = 488 + Left = 640 Top = 206 AutoSize = False DataBinding.DataSource = DADataSource diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj index 5f9dcd39..7025296a 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj @@ -49,23 +49,25 @@ MainSource - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + -
DialogListaFacturasClienteEnvioEMail
+
fDialogListaFacturasClienteEnvioEMail
T
@@ -112,8 +114,6 @@
frViewFacturasCliente
TFrame
- -