diff --git a/Source/ApplicationBase/Usuarios/Views/uEditorUsuarios.dfm b/Source/ApplicationBase/Usuarios/Views/uEditorUsuarios.dfm index f622a8fc..ca8397dd 100644 --- a/Source/ApplicationBase/Usuarios/Views/uEditorUsuarios.dfm +++ b/Source/ApplicationBase/Usuarios/Views/uEditorUsuarios.dfm @@ -18,7 +18,7 @@ inherited fEditorUsuarios: TfEditorUsuarios Width = 840 ExplicitWidth = 840 inherited tbxMain: TTBXToolbar - ExplicitWidth = 521 + ExplicitWidth = 664 object TBXItem39: TTBXItem [8] Action = actCambiarPassword end diff --git a/Source/Base/Controladores/uControllerDetallesBase.pas b/Source/Base/Controladores/uControllerDetallesBase.pas index 61eea829..2584893b 100644 --- a/Source/Base/Controladores/uControllerDetallesBase.pas +++ b/Source/Base/Controladores/uControllerDetallesBase.pas @@ -103,7 +103,7 @@ implementation { TControllerDetallesBase } uses - cxControls, SysUtils, DB, uDAInterfaces, Dialogs; + cxControls, SysUtils, DB, uDAInterfaces, Dialogs, uNumUtils; procedure TControllerDetallesBase.ActualizarTotales(ADataTable: IDAStronglyTypedDataTable); begin @@ -256,9 +256,12 @@ procedure TControllerDetallesBase.CalculoDetalleConcepto(DataTable: TDADataTable begin with DataTable do begin - ImporteAcumulado := ImporteAcumulado + FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat; + + ImporteAcumulado := ImporteAcumulado + RoundCurrency(FieldByName(CAMPO_IMPORTE_TOTAL).AsCurrency); +// ImporteAcumulado := ImporteAcumulado + FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat; if not Opcional then - ImporteTotal := ImporteTotal + FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat; + ImporteTotal := ImporteTotal + RoundCurrency(FieldByName(CAMPO_IMPORTE_TOTAL).AsCurrency); +// ImporteTotal := ImporteTotal + FieldByName(CAMPO_IMPORTE_TOTAL).AsFloat; end; end; diff --git a/Source/Base/Utiles/uNumUtils.pas b/Source/Base/Utiles/uNumUtils.pas index 05d6f76e..11d0f874 100644 --- a/Source/Base/Utiles/uNumUtils.pas +++ b/Source/Base/Utiles/uNumUtils.pas @@ -28,12 +28,28 @@ interface Function IntToLetras(Numero:LongInt):String; Function xxIntToLetras(Valor:LongInt):String; Function CifraToLetras(Cifra: Double): String; +function RoundCurrency(const Value: Currency): Currency; implementation uses SysUtils, Dialogs; // SysUtils, Windows, Dialogs, Messages, Classes, Graphics, Controls, Forms, StdCtrls; +function RoundCurrency(const Value: Currency): Currency; +var + V64: Int64 absolute Result; + Decimals: Integer; +begin + Result := Value; + Decimals := V64 mod 100; + Dec(V64, Decimals); + case Decimals of + -99 .. -50 : Dec(V64, 100); + 50 .. 99 : Inc(V64, 100); + end; +end; + + Function xxIntToLetras(Valor:LongInt):String; const aUnitat : array[1..15] of String = ('UNO','DOS','TRES','CUATRO','CINCO','SEIS', diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index 42db54e7..dfe51783 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -52,8 +52,7 @@ Delphi.Personality VCLApplication -FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2830FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.8.3.0FactuGESFactuGES2.8.3.0 - +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2860FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.8.6.0FactuGESFactuGES2.8.6.0 File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES.dprFalse diff --git a/Source/Cliente/FactuGES.rc b/Source/Cliente/FactuGES.rc index 0e827199..37498c8f 100644 --- a/Source/Cliente/FactuGES.rc +++ b/Source/Cliente/FactuGES.rc @@ -1,7 +1,7 @@ MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Factuges.ico" 1 VERSIONINFO -FILEVERSION 2,8,3,0 -PRODUCTVERSION 2,8,3,0 +FILEVERSION 2,8,6,0 +PRODUCTVERSION 2,8,6,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,10 +13,10 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "2.8.3.0\0" + VALUE "FileVersion", "2.8.6.0\0" VALUE "InternalName", "FactuGES\0" VALUE "ProductName", "FactuGES\0" - VALUE "ProductVersion", "2.8.3.0\0" + VALUE "ProductVersion", "2.8.6.0\0" END END BLOCK "VarFileInfo" diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index cbc977a4..337bbce8 100644 Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ diff --git a/Source/Modulos/Contratos de cliente/ContratosCliente_Group.groupproj b/Source/Modulos/Contratos de cliente/ContratosCliente_Group.groupproj index be9969a8..29e2d4aa 100644 --- a/Source/Modulos/Contratos de cliente/ContratosCliente_Group.groupproj +++ b/Source/Modulos/Contratos de cliente/ContratosCliente_Group.groupproj @@ -171,6 +171,24 @@ + + + + + + + + + + + + + + + + + + @@ -207,15 +225,6 @@ - - - - - - - - - @@ -225,15 +234,6 @@ - - - - - - - - - @@ -262,13 +262,13 @@ - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm index 51bf4073..9e918031 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm @@ -1,23 +1,25 @@ inherited frViewContratoCliente: TfrViewContratoCliente - Width = 810 - Height = 449 + Width = 817 + Height = 491 OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy - ExplicitWidth = 810 - ExplicitHeight = 449 + ExplicitWidth = 817 + ExplicitHeight = 491 object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 - Width = 810 - Height = 449 + Width = 817 + Height = 491 Align = alClient ParentBackground = True TabOrder = 0 TabStop = False AutoContentSizes = [acsWidth, acsHeight] + ExplicitWidth = 810 + ExplicitHeight = 449 DesignSize = ( - 810 - 449) + 817 + 491) object edtFechaContrato: TcxDBDateEdit Left = 104 Top = 82 @@ -42,9 +44,9 @@ inherited frViewContratoCliente: TfrViewContratoCliente Width = 129 end object memObservaciones: TcxDBMemo - Left = 426 - Top = 382 - Anchors = [akLeft, akTop, akRight, akBottom] + Left = 429 + Top = 334 + Align = alClient DataBinding.DataField = 'OBSERVACIONES' DataBinding.DataSource = DADataSource Properties.ScrollBars = ssVertical @@ -119,7 +121,7 @@ inherited frViewContratoCliente: TfrViewContratoCliente Width = 122 end object bFormasPago: TButton - Left = 264 + Left = 267 Top = 136 Width = 132 Height = 21 @@ -181,7 +183,7 @@ inherited frViewContratoCliente: TfrViewContratoCliente end object memPlazoEntrega: TcxDBMemo Left = 22 - Top = 342 + Top = 363 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'PLAZO_ENTREGA' DataBinding.DataSource = DADataSource @@ -232,7 +234,7 @@ inherited frViewContratoCliente: TfrViewContratoCliente Width = 27 end object cbTipoContrato: TcxDBComboBox - Left = 297 + Left = 298 Top = 82 DataBinding.DataField = 'TIPO_CONTRATO' DataBinding.DataSource = DADataSource @@ -280,15 +282,19 @@ inherited frViewContratoCliente: TfrViewContratoCliente Width = 335 end inline frViewClienteContrato1: TfrViewClienteContrato - Left = 426 + Left = 429 Top = 28 - Width = 357 - Height = 318 + Width = 366 + Height = 270 TabOrder = 10 ReadOnly = False - ExplicitLeft = 426 + ExplicitLeft = 429 ExplicitTop = 28 + ExplicitWidth = 366 + ExplicitHeight = 270 inherited dxLayoutControl1: TdxLayoutControl + Width = 366 + Height = 270 inherited edtlNombre: TcxDBTextEdit ExplicitWidth = 707 Width = 707 @@ -310,12 +316,12 @@ inherited frViewContratoCliente: TfrViewContratoCliente Width = 707 end inherited edtCodigoPostal: TcxDBTextEdit - Left = 270 - ExplicitLeft = 270 + Left = 274 + ExplicitLeft = 274 end inherited Button3: TBitBtn - Left = 160 - ExplicitLeft = 160 + Left = 164 + ExplicitLeft = 164 end inherited cxDBTextEdit1: TcxDBTextEdit ExplicitWidth = 283 diff --git a/Source/Modulos/Familias/Controller/View/uIEditorFamilias.pas b/Source/Modulos/Familias/Controller/View/uIEditorFamilias.pas index f3d9cb2d..662ff45a 100644 --- a/Source/Modulos/Familias/Controller/View/uIEditorFamilias.pas +++ b/Source/Modulos/Familias/Controller/View/uIEditorFamilias.pas @@ -6,7 +6,7 @@ uses uEditorDBBase, uBizFamilias, uFamiliasController; type - IEditorFamilias = interface(IEditorDBBase) + IEditorFamilias = interface ['{28CD8E74-C3D5-4862-A8F9-CF0EE3E79FED}'] function GetFamilias: IBizFamilia; procedure SetFamilias(const Value: IBizFamilia); @@ -15,6 +15,9 @@ type function GetController : IFamiliasController; procedure SetController (const Value : IFamiliasController); property Controller : IFamiliasController read GetController write SetController; + + function ShowModal : Integer; + procedure Release; end; diff --git a/Source/Modulos/Familias/Familias_Group.groupproj b/Source/Modulos/Familias/Familias_Group.groupproj index e92562d1..7ae5e786 100644 --- a/Source/Modulos/Familias/Familias_Group.groupproj +++ b/Source/Modulos/Familias/Familias_Group.groupproj @@ -8,6 +8,8 @@ + + @@ -101,14 +103,32 @@ + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Familias/Views/uEditorFamilias.dfm b/Source/Modulos/Familias/Views/uEditorFamilias.dfm index c086a627..bc229a60 100644 --- a/Source/Modulos/Familias/Views/uEditorFamilias.dfm +++ b/Source/Modulos/Familias/Views/uEditorFamilias.dfm @@ -17,8 +17,6 @@ object fEditorFamilias: TfEditorFamilias Position = poScreenCenter OnClose = CustomEditorClose OnShow = FormShow - InstanceID = 0 - ReadOnly = False PixelsPerInch = 96 TextHeight = 13 object bAceptar: TButton diff --git a/Source/Modulos/Familias/Views/uEditorFamilias.pas b/Source/Modulos/Familias/Views/uEditorFamilias.pas index 2d8c1bab..7e40fe18 100644 --- a/Source/Modulos/Familias/Views/uEditorFamilias.pas +++ b/Source/Modulos/Familias/Views/uEditorFamilias.pas @@ -28,11 +28,11 @@ interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, StdCtrls, DBCtrls, uDADataTable, ActnList, - uIEditorFamilias, uEditorBase, uGUIBase, ExtCtrls, + uIEditorFamilias, uEditorBase, uGUIBase, ExtCtrls, uCustomEditor, ComCtrls, uBizFamilias, uFamiliasController, uDAInterfaces; type - TfEditorFamilias = class(TfEditorBase, IEditorFamilias) + TfEditorFamilias = class(TCustomEditor, IEditorFamilias) ActionList1: TActionList; DADataSource: TDADataSource; ListaFamilias: TDBLookupListBox; diff --git a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas index c37aee18..1a1907b9 100644 --- a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas +++ b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas @@ -41,7 +41,7 @@ type function Guardar(APedido : IBizPedidoProveedor): Boolean; procedure DescartarCambios(APedido : IBizPedidoProveedor); function Existe(const ID: Integer) : Boolean; - function Duplicar(APedido: IBizPedidoProveedor): IBizPedidoProveedor; + function Duplicar(APedido: IBizPedidoProveedor; ConMismoContrato:Boolean = false): IBizPedidoProveedor; procedure Preview(APedido : IBizPedidoProveedor; AllItems: Boolean = false); procedure Print(APedido : IBizPedidoProveedor; AllItems: Boolean = false); @@ -115,7 +115,7 @@ type const AVerModal : Boolean = False; const AWindowCaption: String = ''; const AHeaderText: String = ''); procedure VerDireccionEntrega(APedido : IBizPedidoProveedor); - function Duplicar(APedido: IBizPedidoProveedor): IBizPedidoProveedor; + function Duplicar(APedido: IBizPedidoProveedor; ConMismoContrato:Boolean = false): IBizPedidoProveedor; procedure Preview(APedido : IBizPedidoProveedor; AllItems: Boolean = false); procedure Print(APedido : IBizPedidoProveedor; AllItems: Boolean = false); @@ -317,8 +317,7 @@ begin inherited; end; -function TPedidosProveedorController.Duplicar( - APedido: IBizPedidoProveedor): IBizPedidoProveedor; +function TPedidosProveedorController.Duplicar(APedido: IBizPedidoProveedor; ConMismoContrato:Boolean = false): IBizPedidoProveedor; begin Result := Self._Vacio; ShowHourglassCursor; @@ -340,9 +339,13 @@ begin FECHA_ENTREGA := 0; INCIDENCIAS_ACTIVAS := 0; // INCIDENCIAS := Nil; - REF_CON_CLIENTE := ''; - ID_CONTRATO_CLIENTE := 0; - ID_DIRECCION_CLIENTE := 0; + + if not ConMismoContrato then + begin + REF_CON_CLIENTE := ''; + ID_CONTRATO_CLIENTE := 0; + ID_DIRECCION_CLIENTE := 0; + end; end; Result.AsignarVendedor; diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm index 3d8f781e..0f0740b7 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm +++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm @@ -56,9 +56,11 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor ExplicitWidth = 700 end inherited TBXTMain2: TTBXToolbar + Left = 343 DockPos = 343 Visible = True - ExplicitWidth = 156 + ExplicitLeft = 343 + ExplicitWidth = 119 object TBXItem39: TTBXItem Action = actRecibirPedido DisplayMode = nbdmImageAndText @@ -73,9 +75,9 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor end inline frViewPedidosProveedor1: TfrViewPedidosProveedor [3] Left = 0 - Top = 116 + Top = 102 Width = 700 - Height = 464 + Height = 478 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -85,14 +87,14 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor ParentFont = False TabOrder = 3 ReadOnly = False - ExplicitTop = 116 + ExplicitTop = 102 ExplicitWidth = 700 - ExplicitHeight = 464 + ExplicitHeight = 478 inherited cxGrid: TcxGrid Width = 700 - Height = 336 + Height = 350 ExplicitWidth = 700 - ExplicitHeight = 336 + ExplicitHeight = 350 inherited cxGridView: TcxGridDBTableView DataController.Summary.DefaultGroupSummaryItems = < item @@ -126,18 +128,28 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor Width = 700 ExplicitWidth = 700 inherited txtFiltroTodo: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 457 Width = 457 end inherited edtFechaIniFiltro: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 240 Width = 240 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 371 - ExplicitLeft = 371 - ExplicitWidth = 294 - Width = 294 + Left = 349 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 349 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -154,8 +166,8 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor end end inherited pnlAgrupaciones: TTBXDockablePanel - Top = 438 - ExplicitTop = 438 + Top = 452 + ExplicitTop = 452 ExplicitWidth = 700 inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 700 diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas index d8eb1f43..8d7676f1 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas +++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas @@ -156,10 +156,14 @@ end; procedure TfEditorPedidosProveedor.DuplicarInterno; var APedido : IBizPedidoProveedor; -begin + ConMismoContrato : Boolean; +begin inherited; - APedido := FController.Duplicar(Pedidos); + + ConMismoContrato := (ShowConfirmMessage('Atención', Format('¿Desea asignar el mismo contrato de cliente %s al nuevo pedidos a proveedor?', [Pedidos.REF_CON_CLIENTE])) = IDYES); + + APedido := FController.Duplicar(Pedidos, ConMismoContrato); try FController.Ver(APedido); finally diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 172cca03..f6fd59a1 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -28,7 +28,7 @@ Delphi.Personality - FalseTrueFalseTrueFalse2830FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.8.3.0FactuGES (Servidor)2.8.3.0lunes, 06 de febrero de 2017 19:05 + FalseTrueFalseTrueFalse2860FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.8.6.0FactuGES (Servidor)2.8.6.0martes, 03 de octubre de 2017 12:45 File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES_Server.dpr diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index 4bba4722..70ec2208 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -1,7 +1,7 @@ MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Servidor.ico" 1 VERSIONINFO -FILEVERSION 2,8,3,0 -PRODUCTVERSION 2,8,3,0 +FILEVERSION 2,8,6,0 +PRODUCTVERSION 2,8,6,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,10 +13,10 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "2.8.3.0\0" + VALUE "FileVersion", "2.8.6.0\0" VALUE "ProductName", "FactuGES (Servidor)\0" - VALUE "ProductVersion", "2.8.3.0\0" - VALUE "CompileDate", "viernes, 21 de abril de 2017 18:20\0" + VALUE "ProductVersion", "2.8.6.0\0" + VALUE "CompileDate", "miércoles, 25 de octubre de 2017 16:15\0" END END BLOCK "VarFileInfo" diff --git a/Source/Servidor/FactuGES_Server.res b/Source/Servidor/FactuGES_Server.res index 03d05df5..b0cae6be 100644 Binary files a/Source/Servidor/FactuGES_Server.res and b/Source/Servidor/FactuGES_Server.res differ