diff --git a/Build/Build.fbl6 b/Build/Build.fbl6 index a267d2c..47c259f 100644 Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index e7a23a9..3a2569e 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -58,54 +58,54 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
diff --git a/Source/Base/Utiles/uDataTableUtils.pas b/Source/Base/Utiles/uDataTableUtils.pas index 1fc2399..adc3614 100644 --- a/Source/Base/Utiles/uDataTableUtils.pas +++ b/Source/Base/Utiles/uDataTableUtils.pas @@ -392,11 +392,11 @@ begin else ADetailFields := Nil; - if Insertar then + if Insertar then ATarget.Insert else ATarget.Edit; - + { Hay que desactivar los eventos para que dejan de funcionar las reglas de negocio y no nos interfieran en la copia de valores de los campos. } @@ -495,7 +495,6 @@ begin end; end; - procedure EnlazarMaestroDetalle(AMasterDataSource : TDADataSource; ADetail : IDAStronglyTypedDataTable); begin diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index 2084d6f..f809a9d 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -52,7 +52,7 @@ Delphi.Personality VCLApplication -FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse4160FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.1.6.0FactuGESFactuGES4.1.6.0 +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse4190FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.1.9.0FactuGESFactuGES4.1.9.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.res b/Source/Cliente/FactuGES.res index b8c7fb0..cfe4c95 100644 Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ diff --git a/Source/Informes/1/InfContratoCliente.fr3 b/Source/Informes/1/InfContratoCliente.fr3 index a2aecd3..3b02e9d 100644 --- a/Source/Informes/1/InfContratoCliente.fr3 +++ b/Source/Informes/1/InfContratoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -9,11 +9,11 @@ - - + + - + diff --git a/Source/Informes/2/2/InfPresupuestoCliente.fr3 b/Source/Informes/2/2/InfPresupuestoCliente.fr3 index 15bd9e6..5585265 100644 --- a/Source/Informes/2/2/InfPresupuestoCliente.fr3 +++ b/Source/Informes/2/2/InfPresupuestoCliente.fr3 @@ -1,13 +1,13 @@ - + - + - + diff --git a/Source/Informes/2/4/InfPresupuestoCliente.fr3 b/Source/Informes/2/4/InfPresupuestoCliente.fr3 index ea29540..8befba0 100644 --- a/Source/Informes/2/4/InfPresupuestoCliente.fr3 +++ b/Source/Informes/2/4/InfPresupuestoCliente.fr3 @@ -1,13 +1,13 @@ - + - + - + @@ -76,7 +76,7 @@ - + diff --git a/Source/Informes/2/5/InfPresupuestoCliente.fr3 b/Source/Informes/2/5/InfPresupuestoCliente.fr3 index ca9463f..2ed76b1 100644 --- a/Source/Informes/2/5/InfPresupuestoCliente.fr3 +++ b/Source/Informes/2/5/InfPresupuestoCliente.fr3 @@ -1,13 +1,13 @@ - + - + - + diff --git a/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas b/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas index 2d99aef..f1743ec 100644 --- a/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas +++ b/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.pas @@ -34,13 +34,15 @@ type FTipoSubCuenta: TEnumTipoSubCuenta; FIdSubCuenta : Integer; FListaSubCuentas : TStringList; - function getIDCajaBanco: Integer; function GetTipoSubCuenta: TEnumTipoSubCuenta; procedure SetTipoSubCuenta(const Value: TEnumTipoSubCuenta); + function getIdSubCuenta: Integer; + procedure setIdSubCuenta(const Value: Integer); public property TipoSubCuenta: TEnumTipoSubCuenta read GetTipoSubCuenta write SetTipoSubCuenta; - property IdSubCuenta: Integer read getIDCajaBanco; + property IdSubCuenta: Integer read getIdSubCuenta write setIdSubCuenta; + procedure ElegirSubCuenta(const AIdSubCuenta : Integer); procedure refrescar; end; @@ -115,7 +117,7 @@ begin end; end; -function TfrViewListaSubcuentas.getIDCajaBanco: Integer; +function TfrViewListaSubcuentas.getIdSubCuenta: Integer; begin Result := FIdSubCuenta; end; @@ -140,6 +142,23 @@ begin end; end; +procedure TfrViewListaSubcuentas.setIdSubCuenta(const Value: Integer); +var + i: Integer; + +begin + FIdSubCuenta := Value; + + for i := 0 to FListaSubCuentas.Count-1 do + begin + if FListaSubCuentas.ValueFromIndex[i] = IntToStr(FIdSubCuenta) then + begin + cbSubCuentas.Text := FListaSubCuentas.Names[i]; + Break; + end; + end; +end; + procedure TfrViewListaSubcuentas.SetTipoSubCuenta(Const Value: TEnumTipoSubCuenta); var i: Integer; diff --git a/Source/Modulos/Contactos/Views/uViewClienteDatosComerciales.dfm b/Source/Modulos/Contactos/Views/uViewClienteDatosComerciales.dfm index 3157a01..02b5478 100644 --- a/Source/Modulos/Contactos/Views/uViewClienteDatosComerciales.dfm +++ b/Source/Modulos/Contactos/Views/uViewClienteDatosComerciales.dfm @@ -16,7 +16,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales TabStop = False AutoContentSizes = [acsWidth] object Label1: TLabel - Left = 326 + Left = 350 Top = 28 Width = 277 Height = 26 @@ -38,7 +38,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales WordWrap = True end object eDiasVencimiento: TcxDBSpinEdit - Left = 403 + Left = 427 Top = 60 DataBinding.DataField = 'VENCIMIENTO_FACTURAS_1' DataBinding.DataSource = dsDatosComerciales @@ -64,7 +64,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales Width = 79 end object cbRegimenIVA: TcxDBComboBox - Left = 123 + Left = 162 Top = 28 DataBinding.DataField = 'REGIMEN_IVA' DataBinding.DataSource = dsDatosComerciales @@ -93,7 +93,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales Width = 180 end object cbRecargoEquivalencia: TcxDBCheckBox - Left = 123 + Left = 162 Top = 109 Caption = 'Aplicar recargo de equivalencia' DataBinding.DataField = 'RECARGO_EQUIVALENCIA' @@ -121,7 +121,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales Width = 180 end object cbFormaPago: TcxDBLookupComboBox - Left = 123 + Left = 162 Top = 55 DataBinding.DataField = 'ID_FORMA_PAGO' DataBinding.DataSource = dsDatosComerciales @@ -157,7 +157,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales Width = 42 end object bFormasPago: TButton - Left = 164 + Left = 188 Top = 55 Width = 132 Height = 21 @@ -166,7 +166,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales OnClick = bFormasPagoClick end object eIVA: TcxDBLookupComboBox - Left = 123 + Left = 162 Top = 82 DataBinding.DataField = 'ID_TIPO_IVA' DataBinding.DataSource = dsDatosComerciales @@ -202,7 +202,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales Width = 42 end object bTiposIVA: TButton - Left = 164 + Left = 188 Top = 82 Width = 132 Height = 21 @@ -211,7 +211,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales OnClick = bTiposIVAClick end object cxDBSpinEdit1: TcxDBSpinEdit - Left = 403 + Left = 427 Top = 87 DataBinding.DataField = 'VENCIMIENTO_FACTURAS_2' DataBinding.DataSource = dsDatosComerciales @@ -237,7 +237,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales Width = 79 end object cxDBSpinEdit2: TcxDBSpinEdit - Left = 403 + Left = 427 Top = 114 DataBinding.DataField = 'VENCIMIENTO_FACTURAS_3' DataBinding.DataSource = dsDatosComerciales @@ -263,7 +263,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales Width = 79 end object eDescuentoLinea: TcxDBSpinEdit - Left = 123 + Left = 162 Top = 190 DataBinding.DataField = 'DESCUENTO_LINEA' DataBinding.DataSource = dsDatosComerciales @@ -289,7 +289,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales Width = 200 end object eDescuento: TcxDBSpinEdit - Left = 123 + Left = 162 Top = 217 DataBinding.DataField = 'DESCUENTO' DataBinding.DataSource = dsDatosComerciales @@ -315,7 +315,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales Width = 508 end object ePrecioPunto: TcxDBCurrencyEdit - Left = 123 + Left = 162 Top = 244 DataBinding.DataField = 'PRECIO_PUNTO' DataBinding.DataSource = dsDatosComerciales @@ -435,12 +435,12 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales ControlOptions.ShowBorder = False end object dxLayoutControl1Item11: TdxLayoutItem - Caption = 'Dto Comercial:' + Caption = 'Dto Comercial linea:' Control = eDescuentoLinea ControlOptions.ShowBorder = False end object dxLayoutControl1Item13: TdxLayoutItem - Caption = 'Descuento especial:' + Caption = 'Descuento especial general:' Control = eDescuento ControlOptions.ShowBorder = False end diff --git a/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj b/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj index 0d47611..885f6b2 100644 --- a/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj +++ b/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj @@ -49,14 +49,14 @@ MainSource - - - - - - - - + + + + + + + + diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas index 4fe05fb..d6be587 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas @@ -30,6 +30,8 @@ type procedure RecuperarCliente(AContrato : IBizContratoCliente); procedure ActualizarFormaDePago(AContrato : IBizContratoCliente; ID_FORMA_PAGO: Integer); + procedure ActualizarDescuentos(AContrato : IBizContratoCliente); + procedure ActualizarPrecioPunto(AContrato : IBizContratoCliente); function Buscar(const ID: Integer): IBizContratoCliente; overload; function Buscar(const ListaID: TIntegerList): IBizContratoCliente; overload; function BuscarTodos: IBizContratoCliente; overload; @@ -117,6 +119,8 @@ type procedure RecuperarCliente(AContrato : IBizContratoCliente); procedure ActualizarFormaDePago(AContrato : IBizContratoCliente; ID_FORMA_PAGO: Integer); + procedure ActualizarDescuentos(AContrato : IBizContratoCliente); + procedure ActualizarPrecioPunto(AContrato : IBizContratoCliente); function Eliminar(const ID : Integer): Boolean; overload; function Eliminar(AContrato : IBizContratoCliente; AllItems: Boolean = false): Boolean; overload; function Guardar(AContrato : IBizContratoCliente): Boolean; @@ -271,6 +275,26 @@ begin end; end; +procedure TContratosClienteController.ActualizarDescuentos(AContrato: IBizContratoCliente); +var + bEnEdicion : Boolean; + +begin + /////////////////////////////////////// + //Función que asigna el descuento general y el descuento comercial por linea del cliente de presupuesto + /////////////////////////////////////// + + bEnEdicion := (AContrato.DataTable.State in dsEditModes); + if not bEnEdicion then + AContrato.Edit; + + AContrato.DESCUENTO := AContrato.Cliente.DESCUENTO; + FDetallesController.ActualizarDetalles(AContrato.Detalles, AContrato.Cliente); + + if not bEnEdicion then + AContrato.Post; +end; + procedure TContratosClienteController.ActualizarFormaDePago( AContrato: IBizContratoCliente; ID_FORMA_PAGO: Integer); var @@ -310,6 +334,32 @@ begin ATiposIVAController := NIL; end; +procedure TContratosClienteController.ActualizarPrecioPunto(AContrato: IBizContratoCliente); +var + bEnEdicion : Boolean; + APrecioPuntoNuevoContrato: Currency; + +begin +/////////////////// +/// Actualiza el precio punto del contrato con el que tenga asignado el cliente del mismo +/////////////////// + APrecioPuntoNuevoContrato := AppFactuGES.EmpresaActiva.PRECIO_PUNTO; + if (not AContrato.Cliente.DataTable.FieldByName('PRECIO_PUNTO').IsNull) then + APrecioPuntoNuevoContrato := AContrato.Cliente.PRECIO_PUNTO; + + bEnEdicion := (AContrato.DataTable.State in dsEditModes); + if not bEnEdicion then + AContrato.Edit; + + ///////////////////7 + /// El contrato no tiene precio punto en el documento porque se genera a partir de varios presupuestos y pueden tener precio punto diferente +// AContrato.PRECIO_PUNTO := APrecioPuntoNuevoPresupuesto; + DetallesController.RecalcularPrecioPuntoDetalles(APrecioPuntoNuevoContrato, AContrato.Detalles); + + if not bEnEdicion then + AContrato.Post; +end; + function TContratosClienteController.Anadir(AContrato : IBizContratoCliente; const ATipo: TEnumTiposContrato = teVarios) : Boolean; begin diff --git a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm index ecf5799..6a1058b 100644 --- a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm @@ -388,6 +388,7 @@ inherited DataModuleContratosCliente: TDataModuleContratosCliente item Name = 'ENVIADA_REVISADA' DataType = datSmallInt + ServerAutoRefresh = True end item Name = 'ID_CONTRATO_ASOCIADO' diff --git a/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas b/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas index 17132ee..3f751f9 100644 --- a/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas +++ b/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas @@ -9,13 +9,13 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_Valores = '{8ACAF219-8101-4DAD-BF41-5ED9197B7AEA}'; - RID_Propiedades = '{D7E9DBD6-13C0-4C9D-A088-C2289FF4E94C}'; - RID_ListaAnosContratos = '{AA2B5D48-D253-469C-AF7A-F69F3A4855BE}'; - RID_ContratosClienteBeneficios = '{BF9F1FA6-4537-49DD-BAD6-ED5089323CF1}'; - RID_ContratosCliente = '{1B1ED532-8A4F-42AF-8DDB-0B357CDEC752}'; - RID_TiposCapitulos = '{1B246FE2-B5BC-482A-BA80-09BEE78E6B47}'; - RID_ContratosCliente_Detalles = '{6C4DA840-1DEC-4A3A-B313-22662176E271}'; + RID_Valores = '{4A854311-0D9F-4793-94C9-A207AD44D276}'; + RID_Propiedades = '{EF52C78D-98C0-4F3E-8B30-92405C279D93}'; + RID_ListaAnosContratos = '{34D311E0-D0CB-472C-A6B1-AF7C9AD69E10}'; + RID_ContratosClienteBeneficios = '{C7192089-22AD-478D-9BB4-4C0E22244BF1}'; + RID_ContratosCliente = '{511AB084-9FFC-4986-B517-B5748783AB12}'; + RID_TiposCapitulos = '{1ADC8E0F-824C-45E5-B964-90E3B74C370C}'; + RID_ContratosCliente_Detalles = '{405816B6-4A2B-4CBD-AC8D-660CAF3F4910}'; { Data table names } nme_Valores = 'Valores'; @@ -271,7 +271,7 @@ const type { IValores } IValores = interface(IDAStronglyTypedDataTable) - ['{705F78EB-86CF-4A91-B549-3E33D21ED403}'] + ['{0ED4F454-0461-4155-BCF7-C13151DD977A}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -330,7 +330,7 @@ type { IPropiedades } IPropiedades = interface(IDAStronglyTypedDataTable) - ['{BC20A9B4-71D3-4A1E-98F7-D02E4C048CE7}'] + ['{0DB8C965-0875-43C2-9168-7EC7190C3B6F}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -389,7 +389,7 @@ type { IListaAnosContratos } IListaAnosContratos = interface(IDAStronglyTypedDataTable) - ['{668486B3-25A1-4453-A0C1-638ECF020E58}'] + ['{615C6C28-311F-43AB-AE86-4F270D0B66BD}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -424,7 +424,7 @@ type { IContratosClienteBeneficios } IContratosClienteBeneficios = interface(IDAStronglyTypedDataTable) - ['{4D7889FC-42CB-4859-86A4-CE9211D0D593}'] + ['{478CDF53-67D5-431D-97F1-67A9AD134904}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -627,7 +627,7 @@ type { IContratosCliente } IContratosCliente = interface(IDAStronglyTypedDataTable) - ['{F63FB999-3889-45F4-9BC7-6E06A9D18E71}'] + ['{1FC5AB50-30B5-4A01-99C4-8C7D963EF071}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1373,7 +1373,7 @@ type } { ITiposCapitulos } ITiposCapitulos = interface(IDAStronglyTypedDataTable) - ['{D55205DF-DD63-42BD-B89C-7B46709D972E}'] + ['{CE57F93C-0AFA-4A43-BFAB-F87B6AF24C99}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1468,7 +1468,7 @@ type { IContratosCliente_Detalles } IContratosCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{C9DC930F-F554-469D-9644-0FFB9551249F}'] + ['{D8CA02E2-207F-4681-BFC7-7D67586D76DA}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); diff --git a/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas b/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas index a399c20..c352904 100644 --- a/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas +++ b/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas @@ -9,18 +9,18 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ValoresDelta = '{B1DDE678-7C06-4F0F-A1A0-7C88498BFBCF}'; - RID_PropiedadesDelta = '{98B8D0C8-5C71-437A-9D8E-F1C5529264D0}'; - RID_ListaAnosContratosDelta = '{251E5873-5A2B-4DD9-A437-A4AA686545E7}'; - RID_ContratosClienteBeneficiosDelta = '{14FFEEE8-E584-4327-9AE0-CBA2F8F7B787}'; - RID_ContratosClienteDelta = '{4D93A3D6-EC00-4933-A6CA-F7B9FE480CA2}'; - RID_TiposCapitulosDelta = '{31536ABE-8759-41FD-8890-F292958DCBA0}'; - RID_ContratosCliente_DetallesDelta = '{8DC57EB7-7682-4AA2-B800-37BA98492A26}'; + RID_ValoresDelta = '{74E0789F-6D7B-4AEE-898D-564F2F11EA73}'; + RID_PropiedadesDelta = '{2BFEE5AC-1922-447C-9B70-28086783D3E8}'; + RID_ListaAnosContratosDelta = '{5BB5F8CB-575C-47D3-B8CD-2E9222A55D1D}'; + RID_ContratosClienteBeneficiosDelta = '{2DFD608C-073C-4189-906F-C27B11203063}'; + RID_ContratosClienteDelta = '{E63A0667-B99A-4F5D-84BC-8AAD49936917}'; + RID_TiposCapitulosDelta = '{551A2121-A753-4659-A091-FCAB0CDC7FBF}'; + RID_ContratosCliente_DetallesDelta = '{35A00064-7F34-4296-8DCA-FBD514F42366}'; type { IValoresDelta } IValoresDelta = interface(IValores) - ['{B1DDE678-7C06-4F0F-A1A0-7C88498BFBCF}'] + ['{74E0789F-6D7B-4AEE-898D-564F2F11EA73}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_PROPIEDADValue : Integer; @@ -78,7 +78,7 @@ type { IPropiedadesDelta } IPropiedadesDelta = interface(IPropiedades) - ['{98B8D0C8-5C71-437A-9D8E-F1C5529264D0}'] + ['{2BFEE5AC-1922-447C-9B70-28086783D3E8}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -136,7 +136,7 @@ type { IListaAnosContratosDelta } IListaAnosContratosDelta = interface(IListaAnosContratos) - ['{251E5873-5A2B-4DD9-A437-A4AA686545E7}'] + ['{5BB5F8CB-575C-47D3-B8CD-2E9222A55D1D}'] { Property getters and setters } function GetOldANOValue : String; @@ -170,7 +170,7 @@ type { IContratosClienteBeneficiosDelta } IContratosClienteBeneficiosDelta = interface(IContratosClienteBeneficios) - ['{14FFEEE8-E584-4327-9AE0-CBA2F8F7B787}'] + ['{2DFD608C-073C-4189-906F-C27B11203063}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldREFERENCIAValue : String; @@ -372,7 +372,7 @@ type { IContratosClienteDelta } IContratosClienteDelta = interface(IContratosCliente) - ['{4D93A3D6-EC00-4933-A6CA-F7B9FE480CA2}'] + ['{E63A0667-B99A-4F5D-84BC-8AAD49936917}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -1118,7 +1118,7 @@ type { ITiposCapitulosDelta } ITiposCapitulosDelta = interface(ITiposCapitulos) - ['{31536ABE-8759-41FD-8890-F292958DCBA0}'] + ['{551A2121-A753-4659-A091-FCAB0CDC7FBF}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldPOSICIONValue : Integer; @@ -1212,7 +1212,7 @@ type { IContratosCliente_DetallesDelta } IContratosCliente_DetallesDelta = interface(IContratosCliente_Detalles) - ['{8DC57EB7-7682-4AA2-B800-37BA98492A26}'] + ['{35A00064-7F34-4296-8DCA-FBD514F42366}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CONTRATOValue : Integer; diff --git a/Source/Modulos/Contratos de cliente/Model/uBizContratosCliente.pas b/Source/Modulos/Contratos de cliente/Model/uBizContratosCliente.pas index 19034cb..6524152 100644 --- a/Source/Modulos/Contratos de cliente/Model/uBizContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Model/uBizContratosCliente.pas @@ -379,13 +379,16 @@ begin ID_TIPO_IVA := FCliente.ID_TIPO_IVA; RECARGO_EQUIVALENCIA := FCliente.RECARGO_EQUIVALENCIA; -// Se establece un descuento especial general a petición de angelica - DESCUENTO := FCliente.DESCUENTO; + if EsNuevo then + // Solo se asigna en el caso de ser nuevo ya que en el caso de cambiar de cliente el usuario decide si recargar dichos datos + begin + // Se establece un descuento especial general a petición de angelica + DESCUENTO := FCliente.DESCUENTO; // Se establece precio de punto por cliente a petición de Ruben // Un contrato puede estar formado por n presupuestos y cada uno por un precio punto por lo que en el contrato no tiene sentido poner precio punto, // a no ser que quieran establecer una politica de gestion. -// PRECIO_PUNTO := FCliente.PRECIO_PUNTO; - +// PRECIO_PUNTO := FCliente.PRECIO_PUNTO; + end; DataTable.Post; //Muy importante ya que es necesario hacer un post de la cabecera antes de añadir detalles //si se quita el id de la cabecera y los detalles se desincroniza diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm index f8f6283..d92c8b5 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm @@ -443,93 +443,129 @@ inherited fEditorContratoCliente: TfEditorContratoCliente Width = 1104 ExplicitWidth = 1104 inherited Bevel3: TBevel - Left = 624 - ExplicitLeft = 624 + Left = 515 + Height = 122 + ExplicitLeft = 515 + ExplicitHeight = 122 end inherited Bevel4: TBevel - Left = 736 - ExplicitLeft = 736 + Left = 627 + Width = 210 + ExplicitLeft = 627 + ExplicitWidth = 210 + end + inherited Bevel2: TBevel + Width = 333 + ExplicitWidth = 333 end inherited Bevel1: TBevel - Left = 643 - ExplicitLeft = 643 + Left = 534 + Width = 332 + ExplicitLeft = 534 + ExplicitWidth = 332 end inherited ImporteDto: TcxDBCurrencyEdit Style.IsFontAssigned = True + ExplicitWidth = 93 + Width = 93 end inherited ImporteIVA: TcxDBCurrencyEdit - Left = 807 + Left = 698 Style.IsFontAssigned = True - ExplicitLeft = 807 + ExplicitLeft = 698 + ExplicitWidth = 137 + Width = 137 end inherited ImporteTotal: TcxDBCurrencyEdit - Left = 737 + Left = 628 Style.IsFontAssigned = True - ExplicitLeft = 737 + ExplicitLeft = 628 + ExplicitWidth = 137 + Width = 137 end inherited edtDescuento: TcxDBSpinEdit Style.IsFontAssigned = True end inherited edtIVA: TcxDBSpinEdit - Left = 736 + Left = 627 Style.IsFontAssigned = True - ExplicitLeft = 736 + ExplicitLeft = 627 end inherited ImporteBase: TcxDBCurrencyEdit - Left = 736 + Left = 627 Style.IsFontAssigned = True - ExplicitLeft = 736 + ExplicitLeft = 627 + ExplicitWidth = 92 + Width = 92 end inherited edtRE: TcxDBSpinEdit - Left = 736 + Left = 627 Style.IsFontAssigned = True - ExplicitLeft = 736 + ExplicitLeft = 627 end inherited edtIRPF: TcxDBSpinEdit - Left = 736 + Left = 627 Style.IsFontAssigned = True - ExplicitLeft = 736 + ExplicitLeft = 627 end inherited ImporteRE: TcxDBCurrencyEdit - Left = 807 + Left = 698 Style.IsFontAssigned = True - ExplicitLeft = 807 + ExplicitLeft = 698 + ExplicitWidth = 56 + Width = 56 end inherited ImporteIRPF: TcxDBCurrencyEdit - Left = 807 + Left = 698 Style.IsFontAssigned = True - ExplicitLeft = 807 + ExplicitLeft = 698 + ExplicitWidth = 56 + Width = 56 end inherited eImporteNeto: TcxDBCurrencyEdit Style.IsFontAssigned = True + ExplicitWidth = 147 + Width = 147 end inherited ePorte: TcxDBCurrencyEdit Style.IsFontAssigned = True + ExplicitWidth = 147 + Width = 147 end inherited eIVA: TcxDBLookupComboBox Properties.OnValidate = frViewTotales1eIVAPropertiesValidate Style.Color = clInfoBk + ExplicitWidth = 81 + Width = 81 end inherited bTiposIVA: TButton - Left = 476 + Left = 367 OnClick = frViewTotales1bTiposIVAClick - ExplicitLeft = 476 + ExplicitLeft = 367 + end + inherited cbRecargoEquivalencia: TcxDBCheckBox + ExplicitWidth = 219 + Width = 219 end inherited edtRetencion: TcxDBSpinEdit - Left = 736 + Left = 627 Style.IsFontAssigned = True - ExplicitLeft = 736 + ExplicitLeft = 627 end inherited edtImporteRetencion: TcxDBCurrencyEdit - Left = 807 + Left = 698 Style.IsFontAssigned = True - ExplicitLeft = 807 + ExplicitLeft = 698 + ExplicitWidth = 342 + Width = 342 end inherited edtFechaRetencion: TcxDBDateEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 333 + Width = 333 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group1: TdxLayoutGroup diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas index 16d7da9..d76aecf 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas @@ -343,12 +343,13 @@ begin FController.ActualizarFormaDePago(FContrato, FContrato.Cliente.ID_FORMA_PAGO); if (not APrimerCliente) and (FContrato.Detalles.RecordCount > 0) then begin - if (ShowConfirmMessage('Actualizar los descuentos de las líneas', - '¿Desea actualizar las líneas de detalle con el descuento del cliente?' + #10#13 + + if (ShowConfirmMessage('Actualizar precio punto del presupuesto y descuentos', + '¿Desea actualizar el precio punto y los descuentos con los de la ficha del nuevo cliente seleccionado?' + #10#13 + 'Sólo se cambiarán las líneas que tengan cantidades.') = IDYES) then begin - FController.DetallesController.ActualizarDetalles(FContrato.Detalles, FContrato.Cliente); - ShowInfoMessage('Se han actualizado las líneas con el descuento del cliente seleccionado'); + FController.ActualizarDescuentos(FContrato); + FController.ActualizarPrecioPunto(FContrato); + ShowInfoMessage('Se ha actualizado el contrato con el precio punto y descuentos del cliente seleccionado'); end; end; diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas index a324dbc..f7d0fc6 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas @@ -123,7 +123,7 @@ type implementation uses - uDataModuleContratosCliente, uDataModuleUsuarios, uFactuGES_App, + cxControls, uDataModuleUsuarios, uFactuGES_App, uEditorBase, uEditorDBBase, uDialogUtils, Dialogs, uDBSelectionListUtils, uGridUtils, uGenerarFacturasCliUtils, uGenerarAlbaranesCliUtils, uGenerarContratosCliUtils, @@ -586,18 +586,27 @@ end; procedure TfEditorContratosCliente.DuplicarInterno; var - APresupuesto : IBizContratoCliente; + AContrato : IBizContratoCliente; begin - inherited; + ShowHourglassCursor; try - APresupuesto := FController.Duplicar(Contratos); - //Recalculamos el contrato copiado con el precio punto actual - if (ShowConfirmMessage('Desea cambiar el precio punto por el actual, esto ocasionará el recalculo de todos los artículos del contrato que estén en el catálogo, los conceptos libres no se verán afectados', '¿Desea actualizar los importes de todos los articulos del contrato, que estén en el catálogo?') = IDYES) then - FController.DetallesController.RecalcularPrecioPuntoDetalles(APresupuesto.PRECIO_PUNTO, APresupuesto.Detalles); + inherited; + AContrato := FController.Duplicar(Contratos); - FController.Ver(APresupuesto); + //Recalculamos el presupuesto copiado con el precio punto de la ficha del cliente actual o de la empresa asignada en caso de no tener asignada la ficha + if (ShowConfirmMessage('¿Desea cambiar el precio punto del nuevo contrato, por el precio punto asignado en la ficha actual del cliente asociado?', 'Esto ocasionará el recalculo de todos los artículos del contrato que estén en el catálogo, los conceptos libres no se verán afectados.') = IDYES) then + begin + + Controller.RecuperarCliente(AContrato); + AContrato.Cliente.DataTable.Active := True; + FController.ActualizarDescuentos(AContrato); + FController.ActualizarPrecioPunto(AContrato); + end; + + FController.Ver(AContrato); finally actRefrescar.Execute; + HideHourglassCursor; end; end; diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm index 2962e28..61477d8 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm @@ -20,6 +20,18 @@ inherited frViewContratosCliente: TfrViewContratosCliente Kind = skSum Position = spFooter Column = cxGridViewIMPORTE_TOTAL + end + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Kind = skSum + Position = spFooter + Column = cxGridViewBASE_IMPONIBLE + end + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Kind = skSum + Position = spFooter + Column = cxGridViewIMPORTE_IVA end> DataController.Summary.FooterSummaryItems = < item @@ -31,7 +43,18 @@ inherited frViewContratosCliente: TfrViewContratosCliente Format = ',0.00 '#8364';-,0.00 '#8364 Kind = skSum Column = cxGridViewIMPORTE_TOTAL + end + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Kind = skSum + Column = cxGridViewBASE_IMPONIBLE + end + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Kind = skSum + Column = cxGridViewIMPORTE_IVA end> + OptionsView.GroupFooters = gfAlwaysVisible object cxGridViewINCIDENCIASACTIVAS: TcxGridDBColumn Caption = 'Incidencias' DataBinding.FieldName = 'INCIDENCIAS_ACTIVAS' @@ -62,37 +85,6 @@ inherited frViewContratosCliente: TfrViewContratosCliente VisibleForCustomization = False Width = 20 end - object cxGridViewENVIADA_REVISADA: TcxGridDBColumn - DataBinding.FieldName = 'ENVIADA_REVISADA' - PropertiesClassName = 'TcxImageComboBoxProperties' - Properties.Images = GridPNGImageList - Properties.Items = < - item - Value = 0 - end - item - Description = 'Enviado' - ImageIndex = 4 - Value = 1 - end - item - Description = 'Recibido' - ImageIndex = 2 - Value = 2 - end - item - Description = 'Aprobado' - ImageIndex = 4 - Value = 3 - end> - IsCaptionAssigned = True - end - object cxGridViewTIENDA: TcxGridDBColumn - Caption = 'Tienda' - DataBinding.FieldName = 'TIENDA' - Visible = False - VisibleForCustomization = False - end object cxGridViewREFERENCIA: TcxGridDBColumn DataBinding.FieldName = 'REFERENCIA' BestFitMaxWidth = 25 @@ -183,6 +175,41 @@ inherited frViewContratosCliente: TfrViewContratosCliente FooterAlignmentHorz = taRightJustify HeaderAlignmentHorz = taRightJustify end + object cxGridViewPROVINCIA: TcxGridDBColumn + Caption = 'Provincia' + DataBinding.FieldName = 'PROVINCIA' + end + object cxGridViewENVIADA_REVISADA: TcxGridDBColumn + DataBinding.FieldName = 'ENVIADA_REVISADA' + PropertiesClassName = 'TcxImageComboBoxProperties' + Properties.Images = GridPNGImageList + Properties.Items = < + item + Value = 0 + end + item + Description = 'Enviado' + ImageIndex = 4 + Value = 1 + end + item + Description = 'Recibido' + ImageIndex = 2 + Value = 2 + end + item + Description = 'Aprobado' + ImageIndex = 4 + Value = 3 + end> + IsCaptionAssigned = True + end + object cxGridViewTIENDA: TcxGridDBColumn + Caption = 'Tienda' + DataBinding.FieldName = 'TIENDA' + Visible = False + VisibleForCustomization = False + end end inherited cxGridLevel: TcxGridLevel Caption = 'Todos' @@ -280,6 +307,11 @@ inherited frViewContratosCliente: TfrViewContratosCliente end object TBXSeparatorItem1: TTBXSeparatorItem end + object TBXItem4: TTBXItem + Action = actProvincia + end + object TBXSeparatorItem3: TTBXSeparatorItem + end object TBXItem2: TTBXItem Action = actProcedencia end @@ -313,6 +345,11 @@ inherited frViewContratosCliente: TfrViewContratosCliente OnExecute = actProcedenciaExecute OnUpdate = actProcedenciaUpdate end + object actProvincia: TAction + Caption = 'Provincia' + OnExecute = actProvinciaExecute + OnUpdate = actProvinciaUpdate + end end inherited GridPNGImageList: TPngImageList PngImages = < diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas index a7af184..f5c67e2 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas @@ -58,6 +58,10 @@ type cxStylePENDIENTESREVISION: TcxStyle; cxGridViewENVIADA_REVISADA: TcxGridDBColumn; cxGridLevelCancelados: TcxGridLevel; + cxGridViewPROVINCIA: TcxGridDBColumn; + actProvincia: TAction; + TBXSeparatorItem3: TTBXSeparatorItem; + TBXItem4: TTBXItem; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; @@ -79,6 +83,8 @@ type procedure actProcedenciaExecute(Sender: TObject); procedure actProcedenciaUpdate(Sender: TObject); procedure CustomViewShow(Sender: TObject); + procedure actProvinciaExecute(Sender: TObject); + procedure actProvinciaUpdate(Sender: TObject); private //Filtros relativos a la vista @@ -142,7 +148,27 @@ end; procedure TfrViewContratosCliente.actProcedenciaUpdate(Sender: TObject); begin inherited; - (Sender as TAction).Checked := not (cxGridViewREFERENCIA_CLIENTE.GroupIndex < 0); + (Sender as TAction).Checked := not (cxGridViewPROCEDENCIA_CLIENTE.GroupIndex < 0); +end; + +procedure TfrViewContratosCliente.actProvinciaExecute(Sender: TObject); +begin + if (cxGridViewPROVINCIA.GroupIndex < 0) then + begin + cxGridViewPROVINCIA.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewPROVINCIA.Visible := False; + end + else + begin + cxGridViewPROVINCIA.GroupIndex := -1; + cxGridViewPROVINCIA.Visible := True; + end; +end; + +procedure TfrViewContratosCliente.actProvinciaUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewPROVINCIA.GroupIndex < 0); end; procedure TfrViewContratosCliente.AnadirFiltroFechas; @@ -197,17 +223,19 @@ end; procedure TfrViewContratosCliente.ConfigView; begin inherited; - +{ if ((AppFactuGES.EmpresaActiva.ID = 2) or (AppFactuGES.EmpresaActiva.ID = 3)) then cxGridViewTIENDA.Visible := True else cxGridViewTIENDA.Visible := False; +} end; procedure TfrViewContratosCliente.CustomViewShow(Sender: TObject); begin inherited; //En el caso de fabrica se verá una nueva pestaña y en el caso de graden se verá un botón de envio a fabrica. +{ if (AppFactuGES.EmpresaActiva.ID = 1) then begin cxGridLevelPendientesRevisar.Visible := True; @@ -215,7 +243,7 @@ begin else begin cxGridLevelPendientesRevisar.Visible := False; end; - +} end; procedure TfrViewContratosCliente.cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); @@ -283,6 +311,7 @@ var AFacturas: string; begin inherited; + if Assigned(ARecord) then begin IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_ContratosClienteSITUACION).Index; @@ -292,21 +321,27 @@ begin ASituacion := VarToStr(ARecord.DisplayTexts[IndiceCol]); AFacturas := VarToStr(ARecord.DisplayTexts[IndiceCol2]); - AStyle.TextColor := cxStylePENDIENTESREVISION.TextColor; - if ASituacion = SITUACION_CONTRATO_PENDIENTE then + //Por aqui pasa muchas veces con distintos componentes del gird, de hecho algunos no tienen el elemento AStyle y si le asignamos algo por defecto como estaba + //peta estrepitosamente, hay que asegurarse que el componente que se dibuja tiene AStyle, en el resto no falla, porque no asignamos estile si no cumple ninguna + //situación, así asignamos un estile por defecto y lo cambiamos según condiciones. + if Assigned(AStyle) then begin - if (AFacturas = '') then - AStyle.TextColor := cxStylePENDIENTES.TextColor - else if (ARecord.Values[IndiceCol3] < ARecord.Values[IndiceCol4]) then - AStyle.TextColor := cxStylePENDIENTESYFACTURADASPLUS.TextColor - else if (ARecord.Values[IndiceCol3] >= ARecord.Values[IndiceCol4]) then - AStyle.TextColor := cxStylePENDIENTESYFACTURADASOK.TextColor - else - AStyle.TextColor := cxStylePENDIENTES.TextColor; - end - else if (ASituacion = SITUACION_CONTRATO_TERMINADO) - or (ASituacion = SITUACION_CONTRATO_CANCELADO) then - AStyle.TextColor := cxStyleTERMINADO.TextColor + AStyle.TextColor := cxStylePENDIENTESREVISION.TextColor; + if ASituacion = SITUACION_CONTRATO_PENDIENTE then + begin + if (AFacturas = '') then + AStyle.TextColor := cxStylePENDIENTES.TextColor + else if (ARecord.Values[IndiceCol3] < ARecord.Values[IndiceCol4]) then + AStyle.TextColor := cxStylePENDIENTESYFACTURADASPLUS.TextColor + else if (ARecord.Values[IndiceCol3] >= ARecord.Values[IndiceCol4]) then + AStyle.TextColor := cxStylePENDIENTESYFACTURADASOK.TextColor + else + AStyle.TextColor := cxStylePENDIENTES.TextColor; + end + else if (ASituacion = SITUACION_CONTRATO_TERMINADO) + or (ASituacion = SITUACION_CONTRATO_CANCELADO) then + AStyle.TextColor := cxStyleTERMINADO.TextColor; + end; end; end; diff --git a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas index 93c1b2c..5a1da7c 100644 --- a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas +++ b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas @@ -30,6 +30,8 @@ type procedure RecuperarCliente(APresupuesto : IBizPresupuestoCliente); procedure ActualizarFormaDePago(APresupuesto : IBizPresupuestoCliente; ID_FORMA_PAGO: Integer); + procedure ActualizarDescuentos(APresupuesto : IBizPresupuestoCliente); + procedure ActualizarPrecioPunto(APresupuesto : IBizPresupuestoCliente); function Buscar(const ID: Integer): IBizPresupuestoCliente; overload; function Buscar(const ListaID: TIntegerList): IBizPresupuestoCliente; overload; function BuscarTodos: IBizPresupuestoCliente; overload; @@ -113,6 +115,8 @@ type procedure RecuperarCliente(APresupuesto : IBizPresupuestoCliente); procedure ActualizarFormaDePago(APresupuesto : IBizPresupuestoCliente; ID_FORMA_PAGO: Integer); + procedure ActualizarDescuentos(APresupuesto : IBizPresupuestoCliente); + procedure ActualizarPrecioPunto(APresupuesto : IBizPresupuestoCliente); function Eliminar(const ID : Integer): Boolean; overload; function Eliminar(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false): Boolean; overload; function Guardar(APresupuesto : IBizPresupuestoCliente): Boolean; @@ -168,6 +172,26 @@ uses { TPresupuestosClienteController } +procedure TPresupuestosClienteController.ActualizarDescuentos(APresupuesto: IBizPresupuestoCliente); +var + bEnEdicion : Boolean; + +begin + /////////////////////////////////////// + //Función que asigna el descuento general y el descuento comercial por linea del cliente de presupuesto + /////////////////////////////////////// + + bEnEdicion := (APresupuesto.DataTable.State in dsEditModes); + if not bEnEdicion then + APresupuesto.Edit; + + APresupuesto.DESCUENTO := APresupuesto.Cliente.DESCUENTO; + FDetallesController.ActualizarDetalles(APresupuesto.Detalles, APresupuesto.Cliente); + + if not bEnEdicion then + APresupuesto.Post; +end; + procedure TPresupuestosClienteController.ActualizarFormaDePago(APresupuesto: IBizPresupuestoCliente; ID_FORMA_PAGO: Integer); var AFormasPago : IBizFormaPago; @@ -206,6 +230,30 @@ begin ATiposIVAController := NIL; end; +procedure TPresupuestosClienteController.ActualizarPrecioPunto(APresupuesto: IBizPresupuestoCliente); +var + bEnEdicion : Boolean; + APrecioPuntoNuevoPresupuesto: Currency; + +begin +/////////////////// +/// Actualiza el precio punto del presupuesto con el que tenga asignado el cliente del mismo +/////////////////// + APrecioPuntoNuevoPresupuesto := AppFactuGES.EmpresaActiva.PRECIO_PUNTO; + if (not APresupuesto.Cliente.DataTable.FieldByName('PRECIO_PUNTO').IsNull) then + APrecioPuntoNuevoPresupuesto := APresupuesto.Cliente.PRECIO_PUNTO; + + bEnEdicion := (APresupuesto.DataTable.State in dsEditModes); + if not bEnEdicion then + APresupuesto.Edit; + + APresupuesto.PRECIO_PUNTO := APrecioPuntoNuevoPresupuesto; + DetallesController.RecalcularPrecioPuntoDetalles(APresupuesto.PRECIO_PUNTO, APresupuesto.Detalles); + + if not bEnEdicion then + APresupuesto.Post; +end; + function TPresupuestosClienteController.Anadir(APresupuesto: IBizPresupuestoCliente; const ATipo: TEnumTiposPresupuesto): Boolean; begin if not Assigned(APresupuesto) then @@ -481,7 +529,6 @@ begin FECHA_DECISIONIsNull := True; REFERENCIA := ''; SITUACION := SITUACION_PRESUPUESTO_PENDIENTE; - PRECIO_PUNTO := AppFactuGES.EmpresaActiva.PRECIO_PUNTO; end; Result.Post; diff --git a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas index 8c8e7f3..5950a78 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas @@ -340,10 +340,14 @@ begin // if FCliente.ID_FORMA_PAGO > 0 then // ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO; -// Se establece un descuento especial general a petición de angelica - DESCUENTO := FCliente.DESCUENTO; -// Se establece precio de punto por cliente a petición de Ruben - PRECIO_PUNTO := FCliente.PRECIO_PUNTO; + if EsNuevo then + // Solo se asigna en el caso de ser nuevo ya que en el caso de cambiar de cliente el usuario decide si recargar dichos datos + begin + // Se establece un descuento especial general a petición de angelica + DESCUENTO := FCliente.DESCUENTO; + // Se establece precio de punto por cliente a petición de Ruben + PRECIO_PUNTO := FCliente.PRECIO_PUNTO; + end; DataTable.Post; //Muy importante ya que es necesario hacer un post de la cabecera antes de añadir detalles //si se quita el id de la cabecera y los detalles se desincroniza diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm index 330165f..e2831f1 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm @@ -178,6 +178,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente inherited pgPaginas: TPageControl Width = 997 Height = 314 + ActivePage = pagContenido TabOrder = 1 OnChanging = pgPaginasChanging ExplicitTop = 112 diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas index 375c4d0..d9833e2 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas @@ -363,6 +363,7 @@ end; procedure TfEditorPresupuestoCliente.OnClienteChanged(Sender: TObject); var APrimerCliente : Boolean; + begin if Assigned(FPresupuesto) then begin @@ -374,12 +375,13 @@ begin FController.ActualizarFormaDePago(FPresupuesto, FPresupuesto.Cliente.ID_FORMA_PAGO); if (not APrimerCliente) and (FPresupuesto.Detalles.RecordCount > 0) then begin - if (ShowConfirmMessage('Actualizar los descuentos de las líneas', - '¿Desea actualizar las líneas de detalle con el descuento del cliente?' + #10#13 + + if (ShowConfirmMessage('Actualizar precio punto del presupuesto y descuentos', + '¿Desea actualizar el precio punto y los descuentos con los de la ficha del nuevo cliente seleccionado?' + #10#13 + 'Sólo se cambiarán las líneas que tengan cantidades.') = IDYES) then begin - FController.DetallesController.ActualizarDetalles(FPresupuesto.Detalles, FPresupuesto.Cliente); - ShowInfoMessage('Se han actualizado las líneas con el descuento del cliente seleccionado'); + FController.ActualizarDescuentos(FPresupuesto); + FController.ActualizarPrecioPunto(FPresupuesto); + ShowInfoMessage('Se ha actualizado el presupuesto con el precio punto y descuentos del cliente seleccionado'); end; end; end; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm index d9e8096..6582201 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm @@ -164,7 +164,7 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente end end inherited tbxFiltro: TTBXToolbar - ExplicitWidth = 454 + ExplicitWidth = 379 inherited lblAno: TTBXLabelItem Visible = True end @@ -197,10 +197,10 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente end end inherited TBXTMain2: TTBXToolbar - Left = 454 + Left = 379 DockPos = 343 Visible = True - ExplicitLeft = 454 + ExplicitLeft = 379 ExplicitWidth = 278 object TBXItem43: TTBXItem Action = actAceptar diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas index 46bf8b6..0b72e6f 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas @@ -396,18 +396,27 @@ end; procedure TfEditorPresupuestosCliente.DuplicarInterno; var APresupuesto : IBizPresupuestoCliente; + begin ShowHourglassCursor; try inherited; APresupuesto := FController.Duplicar(Presupuestos); - //Recalculamos el presupuesto copiado con el precio punto actual - if (ShowConfirmMessage('Desea cambiar el precio punto por el actual, esto ocasionará el recalculo de todos los artículos del presupuesto que estén en el catálogo, los conceptos libres no se verán afectados', '¿Desea actualizar los importes de todos los articulos del presupuesto, que estén en el catálogo?') = IDYES) then - FController.DetallesController.RecalcularPrecioPuntoDetalles(APresupuesto.PRECIO_PUNTO, APresupuesto.Detalles); + + //Recalculamos el presupuesto copiado con el precio punto de la ficha del cliente actual o de la empresa asignada en caso de no tener asignada la ficha + if (ShowConfirmMessage('¿Desea cambiar el precio punto del nuevo presupuesto, por el precio punto asignado en la ficha actual del cliente asociado?', 'Esto ocasionará el recalculo de todos los artículos del presupuesto que estén en el catálogo, los conceptos libres no se verán afectados.') = IDYES) then + begin + + Controller.RecuperarCliente(APresupuesto); + APresupuesto.Cliente.DataTable.Active := True; + FController.ActualizarDescuentos(APresupuesto); + FController.ActualizarPrecioPunto(APresupuesto); + end; + FController.Ver(APresupuesto); finally - HideHourglassCursor; actRefrescar.Execute; + HideHourglassCursor; end; end; diff --git a/Source/Modulos/Recibos de cliente/Controller/uPagosClienteController.pas b/Source/Modulos/Recibos de cliente/Controller/uPagosClienteController.pas index 7845dd6..29d5e70 100644 --- a/Source/Modulos/Recibos de cliente/Controller/uPagosClienteController.pas +++ b/Source/Modulos/Recibos de cliente/Controller/uPagosClienteController.pas @@ -32,8 +32,8 @@ uses type IPagosClienteController = interface(ISujeto) ['{1864471E-74FA-4E96-BA8D-21357DA38B0F}'] - function Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String): Boolean; - procedure Modificar(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String); + function Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String; Const AReferenciaRemesa: String = ''): Boolean; + procedure Modificar(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String; Const AReferenciaRemesa: String = ''); function Eliminar(APagoCliente : IBizPagosCliente): Boolean; function EliminarTodo(APagossCliente : IBizPagosCliente): Boolean; end; @@ -47,8 +47,8 @@ type public constructor Create; virtual; destructor Destroy; override; - function Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String): Boolean; - procedure Modificar(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String); + function Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String; Const AReferenciaRemesa: String = ''): Boolean; + procedure Modificar(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String; Const AReferenciaRemesa: String = ''); function Eliminar(APagoCliente : IBizPagosCliente): Boolean; function EliminarTodo(APagosCliente : IBizPagosCliente): Boolean; end; @@ -63,7 +63,7 @@ uses { TPagosClienteController } -function TPagosClienteController.Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String): Boolean; +function TPagosClienteController.Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String; Const AReferenciaRemesa: String = ''): Boolean; { Si el pago introducido es un pago y no una devolución devolvemos true en caso de ser una devolución devolvemos false} begin @@ -74,6 +74,9 @@ begin else APagosCliente.FECHA_PAGO := StrToDate(Fecha); + if Length(AReferenciaRemesa) <> 0 then + APagosCliente.TITULAR := AReferenciaRemesa; + if (APagosCliente.DataTable.RecordCount = 0) or ((APagosCliente.DataTable.RecordCount mod 2) = 0) then APagosCliente.TIPO := CTE_PAGO @@ -153,10 +156,14 @@ begin end; end; -procedure TPagosClienteController.Modificar(APagosCliente: IBizPagosCliente; const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String); +procedure TPagosClienteController.Modificar(APagosCliente: IBizPagosCliente; const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String; Const AReferenciaRemesa: String = ''); begin APagosCliente.DataTable.Edit; APagosCliente.FECHA_PAGO := StrToDate(Fecha); + + if Length(AReferenciaRemesa) <> 0 then + APagosCliente.TITULAR := AReferenciaRemesa; + APagosCliente.IGNORAR_CONTABILIDAD := IgnorarContabilidad; APagosCliente.CUENTA := IntToStr(IdSubCuenta); APagosCliente.SUBCUENTA := SubCuenta; diff --git a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas index 6ffc77a..ce7eac5 100644 --- a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas +++ b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas @@ -44,8 +44,8 @@ type procedure Anadir(ARecibosCliente : IBizRecibosCliente); function Eliminar(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false): Boolean; - function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''): Boolean; - procedure ModificarPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''); + function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''): Boolean; + procedure ModificarPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''); function EliminarPago(ARecibosCliente : IBizRecibosCliente): Boolean; function EliminarTodo(ARecibosCliente : IBizRecibosCliente): Boolean; @@ -72,7 +72,7 @@ type procedure CopiarDireccion (const ADireccionEnvio: IBizDireccionesContacto; ARecibo: IBizRecibosCliente); - procedure AsignarRemesa(ARecibos : IBizRecibosCliente; ID_REMESA: Integer; FechaCargo: TDateTime; Referencia: String; AIgnorarContabilidad : Integer; ASubCuenta: Integer); + procedure AsignarRemesa(ARecibos : IBizRecibosCliente; ID_REMESA: Integer; AReferenciaRemesa: String; AFechaCargo: TDateTime; AIgnorarContabilidad : Integer; AIdSubCuenta: Integer; ASubCuenta: String = ''); procedure QuitarRemesa(ARecibos : IBizRecibosCliente); procedure SetSituacionCobrados(ARecibos : IBizRecibosCliente; WithDeltas: Boolean=False); @@ -121,8 +121,8 @@ type procedure RecuperarCliente(AReciboCliente : IBizRecibosCliente); procedure Anadir(ARecibosCliente : IBizRecibosCliente); - function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''): Boolean; - procedure ModificarPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''); + function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''): Boolean; + procedure ModificarPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''); function Eliminar(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false): Boolean; function EliminarPago(ARecibosCliente : IBizRecibosCliente): Boolean; function EliminarTodo(ARecibosCliente : IBizRecibosCliente): Boolean; @@ -148,7 +148,7 @@ type procedure CopiarDireccion (const ADireccionEnvio: IBizDireccionesContacto; ARecibo: IBizRecibosCliente); - procedure AsignarRemesa(ARecibos : IBizRecibosCliente; ID_REMESA: Integer; FechaCargo: TDateTime; Referencia: String; AIgnorarContabilidad : Integer; ASubCuenta: Integer); + procedure AsignarRemesa(ARecibos : IBizRecibosCliente; ID_REMESA: Integer; AReferenciaRemesa: String; AFechaCargo: TDateTime; AIgnorarContabilidad : Integer; AIdSubCuenta: Integer; ASubCuenta: String = ''); procedure QuitarRemesa(ARecibos : IBizRecibosCliente); procedure QuitarReciboCompensado(ARecibo : IBizRecibosCliente); @@ -180,7 +180,7 @@ begin ARecibosCliente.Insert; end; -function TRecibosClienteController.AnadirPago(ARecibosCliente: IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad: Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''): Boolean; +function TRecibosClienteController.AnadirPago(ARecibosCliente: IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad: Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''): Boolean; begin Result := False; @@ -198,7 +198,7 @@ begin //Finalmente añadimos el pago (cobro o devolucion) - if PagosController.Anadir(ARecibosCliente.Pagos, FechaPago, AIgnorarContabilidad, AIdSubcuenta, ASubCuenta) then + if PagosController.Anadir(ARecibosCliente.Pagos, FechaPago, AIgnorarContabilidad, AIdSubcuenta, ASubCuenta, AReferenciaRemesa) then begin ARecibosCliente.Edit; ARecibosCliente.SITUACION := CTE_COBRADO; @@ -218,7 +218,7 @@ begin FDataModule := TDataModuleRecibosCliente.Create(Nil); end; -procedure TRecibosClienteController.AsignarRemesa(ARecibos: IBizRecibosCliente; ID_REMESA: Integer; FechaCargo: TDateTime; Referencia: String; AIgnorarContabilidad : Integer; ASubCuenta: Integer); +procedure TRecibosClienteController.AsignarRemesa(ARecibos: IBizRecibosCliente; ID_REMESA: Integer; AReferenciaRemesa: String; AFechaCargo: TDateTime; AIgnorarContabilidad : Integer; AIdSubCuenta: Integer; ASubCuenta: String = ''); begin if Assigned(ARecibos) then begin @@ -232,8 +232,7 @@ begin ARecibos.Edit; //Añadimos el cobro automatico por la remesa y volvemos a asignar ID //para que asigne un ID nuevo para el pago, porque aqui si hay maestro-detalle - AnadirPago(ARecibos, DateToStr(FechaCargo), AIgnorarContabilidad, ASubCuenta); //->Ojo el orden es importante -// AnadirPago(ARecibos, DateToStr(Date), Referencia, AIgnorarContabilidad, ASubCuenta); //->Ojo el orden es importante + AnadirPago(ARecibos, DateToStr(AFechaCargo), AIgnorarContabilidad, AIdSubCuenta, ASubCuenta, AReferenciaRemesa); //->Ojo el orden es importante ARecibos.ID_REMESA := ID_REMESA; end; Next; @@ -868,10 +867,10 @@ begin end; end; -procedure TRecibosClienteController.ModificarPago(ARecibosCliente: IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''); +procedure TRecibosClienteController.ModificarPago(ARecibosCliente: IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''); begin if Length(FechaPago) > 0 then - PagosController.Modificar(ARecibosCliente.Pagos, FechaPago, AIgnorarContabilidad, AIdSubCuenta, ASubCuenta); + PagosController.Modificar(ARecibosCliente.Pagos, FechaPago, AIgnorarContabilidad, AIdSubCuenta, ASubCuenta, AReferenciaRemesa); end; function TRecibosClienteController.Nuevo: IBizRecibosCliente; diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm index f196653..901e344 100644 --- a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm @@ -4,7 +4,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente ClientWidth = 885 OnClose = CustomEditorClose ExplicitWidth = 893 - ExplicitHeight = 596 + ExplicitHeight = 600 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader @@ -42,7 +42,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Width = 885 ExplicitWidth = 885 inherited tbxMain: TTBXToolbar - ExplicitWidth = 425 + ExplicitWidth = 478 end inherited tbxMenu: TTBXToolbar ExplicitWidth = 885 @@ -60,21 +60,20 @@ inherited fEditorReciboCliente: TfEditorReciboCliente end inherited pgPaginas: TPageControl Width = 879 - Height = 331 + Height = 328 ActivePage = pagPagos OnChanging = pgPaginasChanging ExplicitWidth = 879 - ExplicitHeight = 331 inherited pagGeneral: TTabSheet ExplicitLeft = 4 ExplicitTop = 24 ExplicitWidth = 871 - ExplicitHeight = 303 + ExplicitHeight = 300 inline frViewReciboCliente1: TfrViewReciboCliente Left = 0 Top = 0 Width = 871 - Height = 303 + Height = 300 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -85,15 +84,15 @@ inherited fEditorReciboCliente: TfEditorReciboCliente TabOrder = 0 ReadOnly = False ExplicitWidth = 871 - ExplicitHeight = 303 + ExplicitHeight = 300 inherited dxLayoutControl1: TdxLayoutControl Width = 871 - Height = 303 + Height = 300 ExplicitWidth = 871 - ExplicitHeight = 303 + ExplicitHeight = 300 DesignSize = ( 871 - 303) + 300) inherited eReferencia: TcxDBTextEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' @@ -121,43 +120,43 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Width = 67 end inherited eFechaEmision: TcxDBTextEdit - Left = 588 + Left = 587 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 588 + ExplicitLeft = 587 ExplicitWidth = 286 Width = 286 end inherited eImporteTotal: TcxDBCurrencyEdit - Left = 588 + Left = 587 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 588 + ExplicitLeft = 587 ExplicitWidth = 286 Width = 286 end inherited eNombreCliente: TcxDBTextEdit - Left = 588 + Left = 587 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 588 + ExplicitLeft = 587 ExplicitWidth = 286 Width = 286 end inherited eNifCif: TcxDBTextEdit - Left = 588 + Left = 587 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 588 + ExplicitLeft = 587 ExplicitWidth = 286 Width = 286 end @@ -211,9 +210,9 @@ inherited fEditorReciboCliente: TfEditorReciboCliente end end inherited frViewClienteRecibo1: TfrViewClienteRecibo - Left = 512 + Left = 511 Width = 362 - ExplicitLeft = 512 + ExplicitLeft = 511 ExplicitWidth = 362 inherited dxLayoutControl1: TdxLayoutControl Width = 362 @@ -268,17 +267,17 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Width = 271 end inherited edtCodigoPostal: TcxDBTextEdit - Left = 228 + Left = 227 DataBinding.DataSource = frViewReciboCliente1.DADataSource Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 228 + ExplicitLeft = 227 end inherited Button3: TBitBtn - Left = 118 - ExplicitLeft = 118 + Left = 117 + ExplicitLeft = 117 end inherited cxDBTextEdit1: TcxDBTextEdit Style.LookAndFeel.SkinName = '' @@ -297,7 +296,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente ExplicitHeight = 150 inherited memObservaciones: TcxDBMemo DataBinding.DataSource = frViewReciboCliente1.DADataSource - ExplicitWidth = 462 + ExplicitWidth = 461 ExplicitHeight = 126 Height = 150 Width = 521 @@ -313,7 +312,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Left = 0 Top = 0 Width = 871 - Height = 303 + Height = 300 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -324,18 +323,18 @@ inherited fEditorReciboCliente: TfEditorReciboCliente TabOrder = 0 ReadOnly = False ExplicitWidth = 871 - ExplicitHeight = 303 + ExplicitHeight = 300 inherited dxLayoutControl1: TdxLayoutControl Width = 871 - Height = 303 + Height = 300 ExplicitWidth = 871 - ExplicitHeight = 303 + ExplicitHeight = 300 end inherited dxLayoutControl2: TdxLayoutControl Width = 871 - Height = 303 + Height = 300 ExplicitWidth = 871 - ExplicitHeight = 303 + ExplicitHeight = 300 inherited ToolBar1: TToolBar Width = 684 ExplicitWidth = 684 @@ -376,7 +375,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Left = 0 Top = 0 Width = 871 - Height = 303 + Height = 300 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -387,10 +386,10 @@ inherited fEditorReciboCliente: TfEditorReciboCliente TabOrder = 0 ReadOnly = False ExplicitWidth = 871 - ExplicitHeight = 303 + ExplicitHeight = 300 inherited cxGrid: TcxGrid Width = 871 - Height = 278 + Height = 275 ExplicitTop = 26 ExplicitWidth = 871 ExplicitHeight = 278 @@ -407,6 +406,18 @@ inherited fEditorReciboCliente: TfEditorReciboCliente inherited ToolBar1: TToolBar Width = 871 ExplicitWidth = 871 + inherited ToolButton1: TToolButton + ExplicitWidth = 113 + end + inherited ToolButton4: TToolButton + ExplicitWidth = 113 + end + inherited ToolButton2: TToolButton + ExplicitWidth = 113 + end + inherited ToolButton7: TToolButton + ExplicitWidth = 113 + end inherited ToolButton3: TToolButton ExplicitWidth = 98 end diff --git a/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.dfm index 8d54df0..9c40b94 100644 --- a/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.dfm @@ -162,6 +162,10 @@ inherited frViewPagosCliente: TfrViewPagosCliente Visible = False VisibleForCustomization = False end + object ListaPagosClienteDBTableView1TITULAR: TcxGridDBColumn + Caption = 'Remesa' + DataBinding.FieldName = 'TITULAR' + end end object ListaPagosClienteLevel1: TcxGridLevel GridView = ListaPagosClienteDBTableView1 diff --git a/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.pas b/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.pas index c1b306a..a2ee212 100644 --- a/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.pas +++ b/Source/Modulos/Recibos de cliente/Views/uViewPagosCliente.pas @@ -53,6 +53,7 @@ type dxLayoutControl2Group1: TdxLayoutGroup; dxLayoutControl2Item1: TdxLayoutItem; dxLayoutControl2Item2: TdxLayoutItem; + ListaPagosClienteDBTableView1TITULAR: TcxGridDBColumn; procedure ListaPagosClienteDBTableView1CellDblClick( Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; diff --git a/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas b/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas index e36fc5b..a824e6b 100644 --- a/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas +++ b/Source/Modulos/Recibos de proveedor/Controller/uPagosProveedorController.pas @@ -32,8 +32,8 @@ uses type IPagosProveedorController = interface(ISujeto) ['{4F907D80-B184-4557-BAB7-9FDA23260E64}'] - function Anadir(APagosProveedor: IBizPagosProveedor; Const Fecha: String = ''; Const IgnorarContabilidad: Integer = 0; Const IdSubCuenta: Integer = 0; Const SubCuenta: String = ''): Boolean; - procedure Modificar(APagosProveedor: IBizPagosProveedor; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String = ''); + function Anadir(APagosProveedor: IBizPagosProveedor; Const Fecha: String = ''; Const IgnorarContabilidad: Integer = 0; Const IdSubCuenta: Integer = 0; Const SubCuenta: String = ''; Const AReferenciaRemesa: String = ''): Boolean; + procedure Modificar(APagosProveedor: IBizPagosProveedor; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String = ''; Const AReferenciaRemesa: String = ''); function Eliminar(APagoCliente : IBizPagosProveedor): Boolean; function EliminarTodo(APagossCliente : IBizPagosProveedor): Boolean; end; @@ -46,8 +46,8 @@ type public constructor Create; virtual; destructor Destroy; override; - function Anadir(APagosProveedor: IBizPagosProveedor; Const Fecha: String = ''; Const IgnorarContabilidad: Integer = 0; Const IdSubCuenta: Integer = 0; Const SubCuenta: String = ''): Boolean; - procedure Modificar(APagosProveedor: IBizPagosProveedor; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String = ''); + function Anadir(APagosProveedor: IBizPagosProveedor; Const Fecha: String = ''; Const IgnorarContabilidad: Integer = 0; Const IdSubCuenta: Integer = 0; Const SubCuenta: String = ''; Const AReferenciaRemesa: String = ''): Boolean; + procedure Modificar(APagosProveedor: IBizPagosProveedor; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String = ''; Const AReferenciaRemesa: String = ''); function Eliminar(APagoCliente : IBizPagosProveedor): Boolean; function EliminarTodo(APagosProveedor : IBizPagosProveedor): Boolean; end; @@ -62,7 +62,7 @@ uses { TPagosProveedorController } -function TPagosProveedorController.Anadir(APagosProveedor: IBizPagosProveedor; Const Fecha: String = ''; Const IgnorarContabilidad: Integer = 0; Const IdSubCuenta: Integer = 0; Const SubCuenta: String = ''): Boolean; +function TPagosProveedorController.Anadir(APagosProveedor: IBizPagosProveedor; Const Fecha: String = ''; Const IgnorarContabilidad: Integer = 0; Const IdSubCuenta: Integer = 0; Const SubCuenta: String = ''; Const AReferenciaRemesa: String = ''): Boolean; { Si el pago introducido es un pago y no una devolución devolvemos true en caso de ser una devolución devolvemos false} begin @@ -72,6 +72,9 @@ begin else APagosProveedor.FECHA_PAGO := StrToDate(Fecha); + if Length(AReferenciaRemesa) <> 0 then + APagosProveedor.TITULAR := AReferenciaRemesa; + if (APagosProveedor.DataTable.RecordCount = 0) or ((APagosProveedor.DataTable.RecordCount mod 2) = 0) then APagosProveedor.TIPO := CTE_PAGO @@ -145,10 +148,14 @@ begin end; end; -procedure TPagosProveedorController.Modificar(APagosProveedor: IBizPagosProveedor; const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String = ''); +procedure TPagosProveedorController.Modificar(APagosProveedor: IBizPagosProveedor; const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String = ''; Const AReferenciaRemesa: String = ''); begin APagosProveedor.DataTable.Edit; APagosProveedor.FECHA_PAGO := StrToDate(Fecha); + + if Length(AReferenciaRemesa) <> 0 then + APagosProveedor.TITULAR := AReferenciaRemesa; + APagosProveedor.IGNORAR_CONTABILIDAD := IgnorarContabilidad; APagosProveedor.CUENTA := IntToStr(IdSubCuenta); APagosProveedor.SUBCUENTA := SubCuenta; diff --git a/Source/Modulos/Recibos de proveedor/Controller/uRecibosProveedorController.pas b/Source/Modulos/Recibos de proveedor/Controller/uRecibosProveedorController.pas index 8060dd1..bb07824 100644 --- a/Source/Modulos/Recibos de proveedor/Controller/uRecibosProveedorController.pas +++ b/Source/Modulos/Recibos de proveedor/Controller/uRecibosProveedorController.pas @@ -42,8 +42,8 @@ type property PagosController: IPagosProveedorController read GetPagosController write SetPagosController; procedure Anadir(ARecibosProveedor : IBizRecibosProveedor); - function AnadirPago(ARecibosProveedor : IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad: Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''): Boolean; - procedure ModificarPago(ARecibosProveedor : IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''); + function AnadirPago(ARecibosProveedor : IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad: Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''): Boolean; + procedure ModificarPago(ARecibosProveedor : IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''); function Eliminar(ARecibosProveedor : IBizRecibosProveedor; AllItems: Boolean = false): Boolean; function EliminarPago(ARecibosProveedor : IBizRecibosProveedor): Boolean; function EliminarTodo(ARecibosProveedor : IBizRecibosProveedor): Boolean; @@ -64,7 +64,7 @@ type procedure Ver(ARecibosProveedor: IBizRecibosProveedor); function ExtraerSeleccionados(ARecibosProveedor: IBizRecibosProveedor) : IBizRecibosProveedor; - procedure AsignarRemesa(ARecibos : IBizRecibosProveedor; ID_REMESA: Integer; FechaCargo: TDateTime; AIgnorarContabilidad : Integer; ASubCuenta: Integer); + procedure AsignarRemesa(ARecibos : IBizRecibosProveedor; ID_REMESA: Integer; AReferenciaRemesa: String; AFechaCargo: TDateTime; AIgnorarContabilidad : Integer; AIdSubCuenta: Integer; ASubCuenta: String = ''); procedure QuitarRemesa(ARecibos : IBizRecibosProveedor); procedure SetSituacionCobrados(ARecibos : IBizRecibosProveedor; WithDeltas: Boolean=False); function ElegirRecibos(ARecibos : IBizRecibosProveedor; AMensaje: String; AMultiSelect: Boolean): IBizRecibosProveedor; @@ -114,8 +114,8 @@ type procedure RecuperarProveedor(AReciboProveedor : IBizRecibosProveedor); procedure Anadir(ARecibosProveedor : IBizRecibosProveedor); - function AnadirPago(ARecibosProveedor : IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad: Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''): Boolean; - procedure ModificarPago(ARecibosProveedor : IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''); + function AnadirPago(ARecibosProveedor : IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad: Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''): Boolean; + procedure ModificarPago(ARecibosProveedor : IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''); function Eliminar(ARecibosProveedor : IBizRecibosProveedor; AllItems: Boolean = false): Boolean; function EliminarPago(ARecibosProveedor : IBizRecibosProveedor): Boolean; function EliminarTodo(ARecibosProveedor : IBizRecibosProveedor): Boolean; @@ -141,7 +141,7 @@ type procedure CopiarDireccion (const ADireccionEnvio: IBizDireccionesContacto; ARecibo: IBizRecibosProveedor); - procedure AsignarRemesa(ARecibos : IBizRecibosProveedor; ID_REMESA: Integer; FechaCargo: TDateTime; AIgnorarContabilidad : Integer; ASubCuenta: Integer); + procedure AsignarRemesa(ARecibos : IBizRecibosProveedor; ID_REMESA: Integer; AReferenciaRemesa: String; AFechaCargo: TDateTime; AIgnorarContabilidad : Integer; AIdSubCuenta: Integer; ASubCuenta: String = ''); procedure QuitarRemesa(ARecibos : IBizRecibosProveedor); procedure QuitarReciboCompensado(ARecibo : IBizRecibosProveedor); @@ -172,7 +172,7 @@ begin ARecibosProveedor.Insert; end; -function TRecibosProveedorController.AnadirPago(ARecibosProveedor: IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad: Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''): Boolean; +function TRecibosProveedorController.AnadirPago(ARecibosProveedor: IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad: Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''): Boolean; begin Result := False; @@ -190,7 +190,7 @@ begin //Finalmente añadimos el pago (pago o devolucion) - if PagosController.Anadir(ARecibosProveedor.Pagos, FechaPago, AIgnorarContabilidad, AIdSubCuenta, ASubCuenta) then + if PagosController.Anadir(ARecibosProveedor.Pagos, FechaPago, AIgnorarContabilidad, AIdSubCuenta, ASubCuenta, AReferenciaRemesa) then begin ARecibosProveedor.Edit; ARecibosProveedor.SITUACION := CTE_PAGADO; @@ -210,7 +210,7 @@ begin FDataModule := TDataModuleRecibosProveedor.Create(Nil); end; -procedure TRecibosProveedorController.AsignarRemesa(ARecibos: IBizRecibosProveedor; ID_REMESA: Integer; FechaCargo: TDateTime; AIgnorarContabilidad : Integer; ASubCuenta: Integer); +procedure TRecibosProveedorController.AsignarRemesa(ARecibos: IBizRecibosProveedor; ID_REMESA: Integer; AReferenciaRemesa: String; AFechaCargo: TDateTime; AIgnorarContabilidad : Integer; AIdSubCuenta: Integer; ASubCuenta: String = ''); begin if Assigned(ARecibos) then begin @@ -224,7 +224,7 @@ begin ARecibos.Edit; //Añadimos el cobro automatico por la remesa y volvemos a asignar ID //para que asigne un ID nuevo para el pago, porque aqui si hay maestro-detalle - AnadirPago(ARecibos, DateToStr(FechaCargo), AIgnorarContabilidad, ASubCuenta); //->Ojo el orden es importante + AnadirPago(ARecibos, DateToStr(AFechaCargo), AIgnorarContabilidad, AIdSubCuenta, ASubCuenta, AReferenciaRemesa); //->Ojo el orden es importante ARecibos.ID_REMESA := ID_REMESA; end; Next; @@ -841,10 +841,10 @@ begin end; end; -procedure TRecibosProveedorController.ModificarPago(ARecibosProveedor: IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''); +procedure TRecibosProveedorController.ModificarPago(ARecibosProveedor: IBizRecibosProveedor; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''; AReferenciaRemesa: String =''); begin if Length(FechaPago) > 0 then - PagosController.Modificar(ARecibosProveedor.Pagos, FechaPago, AIgnorarContabilidad, AIdSubCuenta, ASubCuenta); + PagosController.Modificar(ARecibosProveedor.Pagos, FechaPago, AIgnorarContabilidad, AIdSubCuenta, ASubCuenta, AReferenciaRemesa); end; function TRecibosProveedorController.Nuevo: IBizRecibosProveedor; diff --git a/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.dfm b/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.dfm index c3dc24a..050ccb2 100644 --- a/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.dfm +++ b/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.dfm @@ -76,7 +76,7 @@ inherited frViewPagosProveedor: TfrViewPagosProveedor Value = 'Devoluci'#243'n' end> Options.Focusing = False - Width = 100 + Width = 93 IsCaptionAssigned = True end object ListaPagosProveedorDBTableView1FECHA_PAGO: TcxGridDBColumn @@ -84,17 +84,22 @@ inherited frViewPagosProveedor: TfrViewPagosProveedor DataBinding.FieldName = 'FECHA_PAGO' PropertiesClassName = 'TcxDateEditProperties' Options.Focusing = False - Width = 200 + Width = 186 end object ListaPagosProveedorDBTableView1SUBCUENTA: TcxGridDBColumn Caption = 'Caja/Banco' DataBinding.FieldName = 'SUBCUENTA' - Width = 300 + Width = 224 end object ListaPagosProveedorDBTableView1CUENTA: TcxGridDBColumn DataBinding.FieldName = 'CUENTA' Visible = False end + object ListaPagosProveedorDBTableView1TITULAR: TcxGridDBColumn + Caption = 'Remesa' + DataBinding.FieldName = 'TITULAR' + Width = 115 + end end object ListaPagosProveedorLevel1: TcxGridLevel GridView = ListaPagosProveedorDBTableView1 diff --git a/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.pas b/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.pas index d1c4f85..c8285b8 100644 --- a/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.pas +++ b/Source/Modulos/Recibos de proveedor/Views/uViewPagosProveedor.pas @@ -51,6 +51,7 @@ type ToolButton5: TToolButton; ToolButton2: TToolButton; ContenidoImageList: TPngImageList; + ListaPagosProveedorDBTableView1TITULAR: TcxGridDBColumn; procedure ListaPagosProveedorDBTableView1CellDblClick( Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; diff --git a/Source/Modulos/Remesas de cliente/Controller/uRemesasClienteController.pas b/Source/Modulos/Remesas de cliente/Controller/uRemesasClienteController.pas index 5ad7854..15dc27c 100644 --- a/Source/Modulos/Remesas de cliente/Controller/uRemesasClienteController.pas +++ b/Source/Modulos/Remesas de cliente/Controller/uRemesasClienteController.pas @@ -19,7 +19,7 @@ type procedure Anadir(ARemesaCliente : IBizRemesaCliente); function Eliminar(const ID : Integer): Boolean; overload; function Eliminar(ARemesaCliente : IBizRemesaCliente; AllItems: Boolean = false): Boolean; overload; - function Guardar(ARemesaCliente : IBizRemesaCliente; AIgnorarContabilidad : Integer = 1; ASubCuenta: Integer = 0): Boolean; + function Guardar(ARemesaCliente : IBizRemesaCliente; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0): Boolean; procedure DescartarCambios(ARemesaCliente : IBizRemesaCliente); function Existe(const ID: Integer) : Boolean; @@ -66,7 +66,7 @@ type function Eliminar(const ID : Integer): Boolean; overload; function Eliminar(ARemesaCliente : IBizRemesaCliente; AllItems: Boolean = false): Boolean; overload; - function Guardar(ARemesaCliente : IBizRemesaCliente; AIgnorarContabilidad : Integer = 1; ASubCuenta: Integer = 0): Boolean; + function Guardar(ARemesaCliente : IBizRemesaCliente; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0): Boolean; procedure DescartarCambios(ARemesaCliente : IBizRemesaCliente); virtual; function Existe(const ID: Integer) : Boolean; virtual; procedure Anadir(ARemesaCliente : IBizRemesaCliente); virtual; @@ -537,9 +537,11 @@ begin Result := FRecibosClienteController; end; -function TRemesasClienteController.Guardar(ARemesaCliente: IBizRemesaCliente; AIgnorarContabilidad : Integer = 1; ASubCuenta: Integer = 0): Boolean; +function TRemesasClienteController.Guardar(ARemesaCliente: IBizRemesaCliente; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0): Boolean; var bEsNuevo: Boolean; + bEnEdicion : Boolean; + begin Result := False; @@ -555,7 +557,7 @@ begin //Si todo ha ido bien, asignamos la remesa a los recibos asociados //Como no están declarados como maestro-detalles debemos hacer el applyupdates nosotros - RecibosClienteController.AsignarRemesa(ARemesaCliente.Recibos, ARemesaCliente.ID, ARemesaCliente.FECHA_REMESA, ARemesaCliente.REFERENCIA, AIgnorarContabilidad, ASubCuenta); + RecibosClienteController.AsignarRemesa(ARemesaCliente.Recibos, ARemesaCliente.ID, ARemesaCliente.REFERENCIA, ARemesaCliente.FECHA_REMESA, AIgnorarContabilidad, AIdSubCuenta); ARemesaCliente.Recibos.DataTable.ApplyUpdates; //En este applyupdates tambien se realizarán todos los cambios acumulados sobre los recibos asociados (EliminarReciboCliente/ ElegirRecibosCliente) //Es necesario ya que no se refrescan bien los deltas y despues del applyupdates siguen @@ -563,6 +565,16 @@ begin if ARemesaCliente.Recibos.DataTable.HasDelta then ARemesaCliente.Recibos.DataTable.Refresh; + + bEnEdicion := (ARemesaCliente.DataTable.State in dsEditModes); + if not bEnEdicion then + ARemesaCliente.Edit; + + ARemesaCliente.ID_DATOS_BANCO := AIdSubCuenta; + + if not bEnEdicion then + ARemesaCliente.Post; + ARemesaCliente.DataTable.ApplyUpdates; Result := True; diff --git a/Source/Modulos/Remesas de cliente/RemesasCliente_Group.groupproj b/Source/Modulos/Remesas de cliente/RemesasCliente_Group.groupproj index 339f105..4c99d5e 100644 --- a/Source/Modulos/Remesas de cliente/RemesasCliente_Group.groupproj +++ b/Source/Modulos/Remesas de cliente/RemesasCliente_Group.groupproj @@ -17,6 +17,7 @@ + @@ -201,14 +202,23 @@ + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.dfm b/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.dfm index f407c70..77bb20e 100644 --- a/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.dfm +++ b/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.dfm @@ -50,7 +50,7 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente Width = 889 ExplicitWidth = 889 inherited tbxMain: TTBXToolbar - ExplicitWidth = 664 + ExplicitWidth = 370 inherited TBXItem2: TTBXItem Visible = False end @@ -62,7 +62,9 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente object TBXSubmenuItem3: TTBXSubmenuItem [12] Caption = 'Volcar a disco' DisplayMode = nbdmImageAndText + Enabled = False ImageIndex = 22 + Visible = False object TBXItem34: TTBXItem Action = actNorma19 end @@ -87,12 +89,6 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente inherited TBXItem21: TTBXItem Visible = False end - inherited TBXItem22: TTBXItem - Visible = False - end - inherited TBXItem9: TTBXItem - Visible = False - end end inherited TBXSubmenuItem1: TTBXSubmenuItem inherited TBXItem32: TTBXItem @@ -312,23 +308,39 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente ExplicitWidth = 889 ExplicitHeight = 50 inherited Bevel3: TBevel - Left = 429 + Left = 408 Top = 10 Height = 30 - ExplicitLeft = 429 + ExplicitLeft = 408 ExplicitTop = 10 ExplicitHeight = 30 end inherited Bevel4: TBevel - Left = 541 + Left = 520 Top = 52 Width = 192 - ExplicitLeft = 541 + ExplicitLeft = 520 ExplicitTop = 52 ExplicitWidth = 192 end + inherited Bevel2: TBevel + Left = 10 + Top = 195 + Width = 333 + ExplicitLeft = 10 + ExplicitTop = 195 + ExplicitWidth = 333 + end + inherited Bevel1: TBevel + Left = 427 + Top = 195 + Width = 332 + ExplicitLeft = 427 + ExplicitTop = 195 + ExplicitWidth = 332 + end inherited ImporteDto: TcxDBCurrencyEdit - Left = 163 + Left = 190 Top = 37 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -336,13 +348,13 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 163 + ExplicitLeft = 190 ExplicitTop = 37 ExplicitWidth = 157 Width = 157 end inherited ImporteIVA: TcxDBCurrencyEdit - Left = 612 + Left = 591 Top = 87 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -350,26 +362,26 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 612 + ExplicitLeft = 591 ExplicitTop = 87 ExplicitWidth = 147 Width = 147 end inherited ImporteTotal: TcxDBCurrencyEdit - Left = 542 + Left = 521 Top = 168 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 542 + ExplicitLeft = 521 ExplicitTop = 168 ExplicitWidth = 217 Width = 217 end inherited edtDescuento: TcxDBSpinEdit - Left = 92 + Left = 119 Top = 37 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -377,11 +389,11 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 92 + ExplicitLeft = 119 ExplicitTop = 37 end inherited edtIVA: TcxDBSpinEdit - Left = 541 + Left = 520 Top = 87 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -389,11 +401,11 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 541 + ExplicitLeft = 520 ExplicitTop = 87 end inherited ImporteBase: TcxDBCurrencyEdit - Left = 541 + Left = 520 Top = 10 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -401,13 +413,13 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 541 + ExplicitLeft = 520 ExplicitTop = 10 ExplicitWidth = 218 Width = 218 end inherited edtRE: TcxDBSpinEdit - Left = 541 + Left = 520 Top = 141 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -415,18 +427,18 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 541 + ExplicitLeft = 520 ExplicitTop = 141 end inherited edtIRPF: TcxDBSpinEdit - Left = 541 + Left = 520 Top = 114 Style.IsFontAssigned = True - ExplicitLeft = 541 + ExplicitLeft = 520 ExplicitTop = 114 end inherited ImporteRE: TcxDBCurrencyEdit - Left = 612 + Left = 591 Top = 141 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -434,22 +446,22 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 612 + ExplicitLeft = 591 ExplicitTop = 141 ExplicitWidth = 147 Width = 147 end inherited ImporteIRPF: TcxDBCurrencyEdit - Left = 612 + Left = 591 Top = 114 Style.IsFontAssigned = True - ExplicitLeft = 612 + ExplicitLeft = 591 ExplicitTop = 114 ExplicitWidth = 56 Width = 56 end inherited eImporteNeto: TcxDBCurrencyEdit - Left = 92 + Left = 119 Top = 10 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -457,13 +469,13 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 92 + ExplicitLeft = 119 ExplicitTop = 10 ExplicitWidth = 228 Width = 228 end inherited ePorte: TcxDBCurrencyEdit - Left = 92 + Left = 119 Top = 64 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' @@ -471,43 +483,71 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 92 + ExplicitLeft = 119 ExplicitTop = 64 ExplicitWidth = 228 Width = 228 end inherited eIVA: TcxDBLookupComboBox - Left = 92 + Left = 119 Top = 91 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 92 + ExplicitLeft = 119 ExplicitTop = 91 ExplicitWidth = 90 Width = 90 end inherited bTiposIVA: TButton - Left = 281 + Left = 260 Top = 91 - ExplicitLeft = 281 + ExplicitLeft = 260 ExplicitTop = 91 end inherited cbRecargoEquivalencia: TcxDBCheckBox - Left = 92 + Left = 119 Top = 118 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 92 + ExplicitLeft = 119 ExplicitTop = 118 ExplicitWidth = 228 Width = 228 end + inherited edtRetencion: TcxDBSpinEdit + Left = 520 + Top = 210 + Style.IsFontAssigned = True + ExplicitLeft = 520 + ExplicitTop = 210 + end + inherited edtImporteRetencion: TcxDBCurrencyEdit + Left = 591 + Top = 210 + Style.IsFontAssigned = True + ExplicitLeft = 591 + ExplicitTop = 210 + ExplicitWidth = 342 + Width = 342 + end + inherited edtFechaRetencion: TcxDBDateEdit + Left = 119 + Top = 210 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 119 + ExplicitTop = 210 + ExplicitWidth = 333 + Width = 333 + end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group1: TdxLayoutGroup ShowCaption = False @@ -1899,22 +1939,34 @@ inherited fEditorRemesaCliente: TfEditorRemesaCliente inherited EditorActionList: TActionList [11] Left = 96 Top = 168 + inherited actPrevisualizar: TAction + Enabled = False + Visible = False + end + inherited actImprimir: TAction + Enabled = False + Visible = False + end object actVolcarDisco: TAction Category = 'Acciones' Caption = 'Volcar a disco...' + Enabled = False ImageIndex = 22 + Visible = False OnUpdate = actVolcarDiscoUpdate end object actNorma19: TAction Category = 'Acciones' Caption = 'Norma 19' Enabled = False + Visible = False OnExecute = actNorma19Execute end object actNorma32: TAction Category = 'Acciones' Caption = 'Norma 32' Enabled = False + Visible = False OnExecute = actNorma32Execute end end diff --git a/Source/Modulos/Remesas de cliente/Views/uEditorRemesasCliente.dfm b/Source/Modulos/Remesas de cliente/Views/uEditorRemesasCliente.dfm index bce969f..41ee3f7 100644 --- a/Source/Modulos/Remesas de cliente/Views/uEditorRemesasCliente.dfm +++ b/Source/Modulos/Remesas de cliente/Views/uEditorRemesasCliente.dfm @@ -5,7 +5,7 @@ inherited fEditorRemesasCliente: TfEditorRemesasCliente ClientHeight = 409 ClientWidth = 785 ExplicitWidth = 793 - ExplicitHeight = 443 + ExplicitHeight = 447 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader @@ -45,12 +45,12 @@ inherited fEditorRemesasCliente: TfEditorRemesasCliente Width = 785 ExplicitWidth = 785 inherited tbxMain: TTBXToolbar - ExplicitWidth = 785 + ExplicitWidth = 451 object TBXSeparatorItem17: TTBXSeparatorItem [12] end end inherited tbxFiltro: TTBXToolbar - ExplicitWidth = 374 + ExplicitWidth = 299 inherited lblAno: TTBXLabelItem Visible = True end @@ -76,10 +76,6 @@ inherited fEditorRemesasCliente: TfEditorRemesasCliente end end end - inherited TBXTMain2: TTBXToolbar - Left = 374 - ExplicitLeft = 374 - end end inherited StatusBar: TJvStatusBar Top = 390 @@ -92,22 +88,20 @@ inherited fEditorRemesasCliente: TfEditorRemesasCliente ImageIndex = 24 end inherited actPrevisualizar: TAction - Visible = True + Enabled = False end inherited actImprimir: TAction - Visible = True + Enabled = False end inherited actDuplicar: TAction Visible = False end - inherited actExportarExcel: TAction - Enabled = True - Visible = True - end object actVolcarDisco: TAction Category = 'Acciones' Caption = 'Volcar a disco...' + Enabled = False ImageIndex = 25 + Visible = False OnExecute = actVolcarDiscoExecute OnUpdate = actVolcarDiscoUpdate end diff --git a/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.pas b/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.pas index b56d9d5..5bd4243 100644 --- a/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.pas +++ b/Source/Modulos/Remesas de cliente/Views/uViewRemesaCliente.pas @@ -145,6 +145,8 @@ begin dsDataTable.DataTable := FRemesaCliente.DataTable; dsDatosBanco.DataTable := AppFactuGES.EmpresaActiva.DatosBancarios.DataTable; dsDatosBanco.DataTable.Active := True; + + frViewListaSubcuentas1.IdSubCuenta := FRemesaCliente.ID_DATOS_BANCO; end else begin dsDataTable.DataTable := NIL; diff --git a/Source/Modulos/Remesas de proveedor/Controller/uRemesasProveedorController.pas b/Source/Modulos/Remesas de proveedor/Controller/uRemesasProveedorController.pas index c4cd722..fdb19cf 100644 --- a/Source/Modulos/Remesas de proveedor/Controller/uRemesasProveedorController.pas +++ b/Source/Modulos/Remesas de proveedor/Controller/uRemesasProveedorController.pas @@ -19,7 +19,7 @@ type procedure Anadir(ARemesaProveedor : IBizRemesaProveedor); function Eliminar(const ID : Integer): Boolean; overload; function Eliminar(ARemesaProveedor : IBizRemesaProveedor; AllItems: Boolean = false): Boolean; overload; - function Guardar(ARemesaProveedor : IBizRemesaProveedor; AIgnorarContabilidad : Integer = 1; ASubCuenta: Integer = 0): Boolean; + function Guardar(ARemesaProveedor : IBizRemesaProveedor; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0): Boolean; procedure DescartarCambios(ARemesaProveedor : IBizRemesaProveedor); function Existe(const ID: Integer) : Boolean; @@ -63,7 +63,7 @@ type function Eliminar(const ID : Integer): Boolean; overload; function Eliminar(ARemesaProveedor : IBizRemesaProveedor; AllItems: Boolean = false): Boolean; overload; - function Guardar(ARemesaProveedor : IBizRemesaProveedor; AIgnorarContabilidad : Integer = 1; ASubCuenta: Integer = 0): Boolean; + function Guardar(ARemesaProveedor : IBizRemesaProveedor; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0): Boolean; procedure DescartarCambios(ARemesaProveedor : IBizRemesaProveedor); virtual; function Existe(const ID: Integer) : Boolean; virtual; procedure Anadir(ARemesaProveedor : IBizRemesaProveedor); virtual; @@ -325,7 +325,7 @@ begin ARecibosRemesa := ARemesaProveedor.Recibos; //Copia los recibos seleccionados a los recibos de la remesa sin que el servidor se entere de //las inserciones - DuplicarRegistros(ARecibosSeleccionados.DataTable,ARecibosRemesa.DataTable, mdrTodos, False, False, True); + DuplicarRegistros(ARecibosSeleccionados.DataTable,ARecibosRemesa.DataTable, mdrTodos, true, False, True); FRecibosProveedorController.SetSituacionCobrados(ARecibosRemesa); Result := True; finally @@ -502,9 +502,10 @@ begin Result := FRecibosProveedorController; end; -function TRemesasProveedorController.Guardar(ARemesaProveedor: IBizRemesaProveedor; AIgnorarContabilidad : Integer = 1; ASubCuenta: Integer = 0): Boolean; +function TRemesasProveedorController.Guardar(ARemesaProveedor: IBizRemesaProveedor; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0): Boolean; var bEsNuevo: Boolean; + bEnEdicion : Boolean; begin Result := False; @@ -519,7 +520,7 @@ begin //Si todo ha ido bien, asignamos la remesa a los recibos asociados //Como no están declarados como maestro-detalles debemos hacer el applyupdates nosotros - RecibosProveedorController.AsignarRemesa(ARemesaProveedor.Recibos, ARemesaProveedor.ID, ARemesaProveedor.FECHA_REMESA, AIgnorarContabilidad, ASubCuenta); + RecibosProveedorController.AsignarRemesa(ARemesaProveedor.Recibos, ARemesaProveedor.ID, ARemesaProveedor.REFERENCIA, ARemesaProveedor.FECHA_REMESA, AIgnorarContabilidad, AIdSubCuenta); ARemesaProveedor.Recibos.DataTable.ApplyUpdates; //En este applyupdates tambien se realizarán todos los cambios acumulados sobre los recibos asociados (EliminarReciboProveedor/ ElegirRecibosProveedor) //Es necesario ya que no se refrescan bien los deltas y despues del applyupdates siguen @@ -527,7 +528,15 @@ begin if ARemesaProveedor.Recibos.DataTable.HasDelta then ARemesaProveedor.Recibos.DataTable.Refresh; -// ARemesaProveedor.ID_DATOS_BANCO := ASubCuenta; + bEnEdicion := (ARemesaProveedor.DataTable.State in dsEditModes); + if not bEnEdicion then + ARemesaProveedor.Edit; + + ARemesaProveedor.ID_DATOS_BANCO := AIdSubCuenta; + + if not bEnEdicion then + ARemesaProveedor.Post; + ARemesaProveedor.DataTable.ApplyUpdates; Result := True; diff --git a/Source/Modulos/Remesas de proveedor/RemesasProveedor_Group.groupproj b/Source/Modulos/Remesas de proveedor/RemesasProveedor_Group.groupproj index b013686..544cf4d 100644 --- a/Source/Modulos/Remesas de proveedor/RemesasProveedor_Group.groupproj +++ b/Source/Modulos/Remesas de proveedor/RemesasProveedor_Group.groupproj @@ -10,7 +10,12 @@ + + + + + @@ -131,14 +136,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Remesas de proveedor/Views/uViewRecibosRemesaProveedor.dfm b/Source/Modulos/Remesas de proveedor/Views/uViewRecibosRemesaProveedor.dfm index dd18a89..345b0b3 100644 --- a/Source/Modulos/Remesas de proveedor/Views/uViewRecibosRemesaProveedor.dfm +++ b/Source/Modulos/Remesas de proveedor/Views/uViewRecibosRemesaProveedor.dfm @@ -33,9 +33,9 @@ inherited frViewRecibosRemesaProveedor: TfrViewRecibosRemesaProveedor Value = 'PENDIENTE' end item - Description = 'Cobrado' + Description = 'Pagado' ImageIndex = 0 - Value = 'COBRADO' + Value = 'PAGADO' end item Description = 'Devuelto' diff --git a/Source/Modulos/Remesas de proveedor/Views/uViewRemesaProveedor.dfm b/Source/Modulos/Remesas de proveedor/Views/uViewRemesaProveedor.dfm index e1dbdbe..0307552 100644 --- a/Source/Modulos/Remesas de proveedor/Views/uViewRemesaProveedor.dfm +++ b/Source/Modulos/Remesas de proveedor/Views/uViewRemesaProveedor.dfm @@ -206,14 +206,6 @@ inherited frViewRemesaProveedor: TfrViewRemesaProveedor end end end - object cxDBComboBox1: TcxDBComboBox - Left = 97 - Top = 224 - DataBinding.DataField = 'ID_DATOS_BANCO' - DataBinding.DataSource = dsDataTable - TabOrder = 6 - Width = 121 - end object dxLayoutControlRemesaProveedorGroup_Root: TdxLayoutGroup ShowCaption = False Hidden = True @@ -283,11 +275,6 @@ inherited frViewRemesaProveedor: TfrViewRemesaProveedor LayoutDirection = ldHorizontal ShowBorder = False end - object dxLayoutControlRemesaProveedorItem5: TdxLayoutItem - Caption = 'cxDBComboBox1' - Control = cxDBComboBox1 - ControlOptions.ShowBorder = False - end end end object dsDataTable: TDADataSource diff --git a/Source/Modulos/Remesas de proveedor/Views/uViewRemesaProveedor.pas b/Source/Modulos/Remesas de proveedor/Views/uViewRemesaProveedor.pas index 862711d..67edadb 100644 --- a/Source/Modulos/Remesas de proveedor/Views/uViewRemesaProveedor.pas +++ b/Source/Modulos/Remesas de proveedor/Views/uViewRemesaProveedor.pas @@ -50,8 +50,6 @@ type dxLayoutControlRemesaProveedorItem2: TdxLayoutItem; frViewListaSubcuentas1: TfrViewListaSubcuentas; dxlcCuentaContable: TdxLayoutGroup; - cxDBComboBox1: TcxDBComboBox; - dxLayoutControlRemesaProveedorItem5: TdxLayoutItem; protected FController: IRemesasProveedorController; @@ -148,6 +146,8 @@ begin dsDataTable.DataTable := FRemesaProveedor.DataTable; dsDatosBanco.DataTable := AppFactuGES.EmpresaActiva.DatosBancarios.DataTable; dsDatosBanco.DataTable.Active := True; + + frViewListaSubcuentas1.IdSubCuenta := FRemesaProveedor.ID_DATOS_BANCO; end else begin dsDataTable.DataTable := NIL; diff --git a/Source/Modulos/Tarifas/Controller/Tarifas_controller.dcu b/Source/Modulos/Tarifas/Controller/Tarifas_controller.dcu index e470de5..302bada 100644 Binary files a/Source/Modulos/Tarifas/Controller/Tarifas_controller.dcu and b/Source/Modulos/Tarifas/Controller/Tarifas_controller.dcu differ diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index 3bfb409..34a3a59 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -153,10 +153,10 @@ uses schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas', schPedidosProveedorServer_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorServer_Intf.pas', uRptInventario_Server in '..\Modulos\Inventario\Reports\uRptInventario_Server.pas' {RptInventario: TDataModule}, - schContratosClienteClient_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteClient_Intf.pas', - schContratosClienteServer_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteServer_Intf.pas', schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas', - schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas'; + schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas', + schContratosClienteClient_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteClient_Intf.pas', + schContratosClienteServer_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteServer_Intf.pas'; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 961f913..16d9de0 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -28,7 +28,7 @@ Delphi.Personality - FalseTrueFalseTrueFalse4160FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.1.6.0FactuGES (Servidor)4.1.6.0martes, 18 de octubre de 2022 10:32 + FalseTrueFalseTrueFalse4190FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.1.9.0FactuGES (Servidor)4.1.9.0lunes, 12 de diciembre de 2022 20:04 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.res b/Source/Servidor/FactuGES_Server.res index 9f29300..ad9b6e5 100644 Binary files a/Source/Servidor/FactuGES_Server.res and b/Source/Servidor/FactuGES_Server.res differ