Cambio general para que al visualizar el editor se haga un ancho automático (en el formshow), ademas se cambia el editor de pagos en recibos de proveedor para que sea igual que el de recibos de cliente

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@172 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
roberto 2008-03-21 11:59:09 +00:00
parent 461102c1fe
commit 49bac5fcd9
35 changed files with 241 additions and 214 deletions

View File

@ -382,6 +382,8 @@ begin
Albaranes.DataTable.Active := True;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorAlbaranesCliente.GetController: IAlbaranesClienteController;

View File

@ -190,6 +190,8 @@ begin
Albaranes.DataTable.Active := True;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorAlbaranesProveedor.GetController: IAlbaranesProveedorController;

View File

@ -67,6 +67,8 @@ begin
Diario.DataTable.Active := True;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorDiario.GetDiario: IBizDiario;

View File

@ -66,6 +66,8 @@ begin
Contactos.DataTable.Active := True;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorContactos.GetContactos: IBizContacto;

View File

@ -211,6 +211,8 @@ begin
Facturas.DataTable.Active := True;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorFacturasCliente.GetController: IFacturasClienteController;
@ -378,4 +380,4 @@ begin
end;
end.

View File

@ -218,6 +218,8 @@ begin
Facturas.DataTable.Active := True;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorFacturasProveedor.GetController: IFacturasProveedorController;
@ -390,4 +392,4 @@ begin
end;
end.

View File

@ -147,6 +147,8 @@ begin
Inventario.DataTable.Active := True;
actContraer.Execute;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
procedure TfEditorInventario.actModificarExecute(Sender: TObject);
@ -371,4 +373,4 @@ end;
end.

View File

@ -194,6 +194,8 @@ begin
Pedidos.DataTable.Active := True;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorPedidosProveedor.GetController: IPedidosProveedorController;
@ -347,4 +349,4 @@ begin
end;
end.

View File

@ -265,6 +265,8 @@ begin
Presupuestos.DataTable.Active := True;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorPresupuestosCliente.GetController: IPresupuestosClienteController;

View File

@ -3,7 +3,7 @@ object fEditorFechaPago: TfEditorFechaPago
Top = 0
BorderStyle = bsDialog
Caption = 'Fecha del cobro / devoluci'#243'n'
ClientHeight = 213
ClientHeight = 184
ClientWidth = 535
Color = clWindow
Font.Charset = DEFAULT_CHARSET
@ -53,13 +53,14 @@ object fEditorFechaPago: TfEditorFechaPago
end
object Panel1: TPanel
Left = 0
Top = 172
Top = 143
Width = 535
Height = 41
Align = alBottom
TabOrder = 1
ExplicitTop = 172
object bAceptar: TButton
Left = 41
Left = 39
Top = 8
Width = 75
Height = 25
@ -68,7 +69,7 @@ object fEditorFechaPago: TfEditorFechaPago
TabOrder = 0
end
object bCancelar: TButton
Left = 122
Left = 120
Top = 8
Width = 75
Height = 25

View File

@ -58,8 +58,7 @@ begin
FechaPago := eFechaPago.Date;
end;
procedure TfEditorFechaPago.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
procedure TfEditorFechaPago.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
CanClose := True;

View File

@ -3,7 +3,7 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
ClientHeight = 561
ClientWidth = 645
ExplicitWidth = 653
ExplicitHeight = 588
ExplicitHeight = 595
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
@ -75,34 +75,6 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
Height = 312
ExplicitWidth = 645
ExplicitHeight = 312
inherited cxGridView: TcxGridDBTableView
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = ',0.00 '#8364';-,0.00 '#8364
Position = spFooter
Column = frViewRecibosCliente1.cxGridViewIMPORTE_TOTAL
end>
DataController.Summary.FooterSummaryItems = <
item
Format = ',0.00 '#8364';-,0.00 '#8364
Column = frViewRecibosCliente1.cxGridViewIMPORTE_TOTAL
end
item
Format = '0 recibos'
Kind = skCount
Column = frViewRecibosCliente1.cxGridViewREFERENCIA
end
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Column = frViewRecibosCliente1.cxGridViewIMPORTE
end
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Column = frViewRecibosCliente1.cxGridViewOTROS_GASTOS
end>
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 645
@ -112,17 +84,9 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
inherited dxLayoutControl1: TdxLayoutControl
Width = 645
ExplicitWidth = 645
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 298
ExplicitLeft = 298
Left = 301
ExplicitLeft = 301
ExplicitWidth = 244
Width = 244
end

View File

@ -168,7 +168,9 @@ begin
raise Exception.Create('No hay ningún objeto asignado');
FRecibosCliente.DataTable.Active := True;
ViewGrid.GotoFirst;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorRecibosCliente.GetController: IRecibosClienteController;

View File

@ -46,28 +46,33 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
object cxGridViewREFERENCIA: TcxGridDBColumn
Caption = 'Referencia'
DataBinding.FieldName = 'REFERENCIA'
BestFitMaxWidth = 60
Width = 64
end
object cxGridViewID_TIENDA: TcxGridDBColumn
DataBinding.FieldName = 'ID_TIENDA'
Visible = False
BestFitMaxWidth = 20
VisibleForCustomization = False
end
object cxGridViewTIENDA: TcxGridDBColumn
Caption = 'Tienda'
DataBinding.FieldName = 'TIENDA'
BestFitMaxWidth = 60
end
object cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn
Caption = 'Compensado'
DataBinding.FieldName = 'ID_RECIBO_COMPENSADO'
Visible = False
OnCustomDrawCell = cxGridViewID_RECIBO_COMPENSADOCustomDrawCell
BestFitMaxWidth = 20
VisibleForCustomization = False
end
object cxGridViewREFERENCIA_REC_COMPENSADO: TcxGridDBColumn
Caption = 'Ref. recibo compensado'
DataBinding.FieldName = 'REFERENCIA_REC_COMPENSADO'
Visible = False
BestFitMaxWidth = 70
VisibleForCustomization = False
end
object cxGridViewSITUACION: TcxGridDBColumn
@ -90,31 +95,37 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
ImageIndex = 1
Value = 'DEVUELTO'
end>
BestFitMaxWidth = 80
Width = 50
end
object cxGridViewFECHA_EMISION: TcxGridDBColumn
Caption = 'Fecha emisi'#243'n'
DataBinding.FieldName = 'FECHA_EMISION'
BestFitMaxWidth = 70
Width = 36
end
object cxGridViewFECHA_VENCIMIENTO: TcxGridDBColumn
Caption = 'Fecha vencimiento'
DataBinding.FieldName = 'FECHA_VENCIMIENTO'
BestFitMaxWidth = 70
Width = 40
end
object cxGridViewDESCRIPCION: TcxGridDBColumn
Caption = 'Descripci'#243'n'
DataBinding.FieldName = 'DESCRIPCION'
Visible = False
BestFitMaxWidth = 150
end
object cxGridViewNIF_CIF_CLIENTE: TcxGridDBColumn
Caption = 'NIF/CIF'
DataBinding.FieldName = 'NIF_CIF_CLIENTE'
Visible = False
BestFitMaxWidth = 70
end
object cxGridViewNOMBRE_CLIENTE: TcxGridDBColumn
Caption = 'Cliente'
DataBinding.FieldName = 'NOMBRE_CLIENTE'
BestFitMaxWidth = 150
Width = 51
end
object cxGridViewIMPORTE: TcxGridDBColumn
@ -122,6 +133,7 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
DataBinding.FieldName = 'IMPORTE'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
BestFitMaxWidth = 60
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
Width = 56
@ -131,6 +143,7 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
DataBinding.FieldName = 'OTROS_GASTOS'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
BestFitMaxWidth = 60
HeaderAlignmentHorz = taRightJustify
Width = 55
end
@ -139,6 +152,7 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
DataBinding.FieldName = 'IMPORTE_TOTAL'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
BestFitMaxWidth = 70
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
Width = 117
@ -146,6 +160,11 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
object cxGridViewREFERENCIA_REMESA: TcxGridDBColumn
Caption = 'Ref. remesa'
DataBinding.FieldName = 'REFERENCIA_REMESA'
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taRightJustify
BestFitMaxWidth = 70
GroupSummaryAlignment = taRightJustify
HeaderAlignmentHorz = taRightJustify
Width = 48
end
end

View File

@ -9,6 +9,7 @@
<Projects Include="..\..\Cliente\FactuGES.dproj" />
<Projects Include="..\..\GUIBase\GUIBase.dproj" />
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
<Projects Include="..\Contabilidad\Views\Contabilidad_view.dproj" />
<Projects Include="..\Contactos\Views\Contactos_view.dproj" />
<Projects Include="..\Recibos de cliente\Controller\RecibosCliente_controller.dproj" />
<Projects Include="..\Recibos de cliente\Data\RecibosCliente_data.dproj" />
@ -151,14 +152,23 @@
<Target Name="RecibosCliente_controller:Make">
<MSBuild Projects="..\Recibos de cliente\Controller\RecibosCliente_controller.dproj" Targets="Make" />
</Target>
<Target Name="Contabilidad_view">
<MSBuild Projects="..\Contabilidad\Views\Contabilidad_view.dproj" Targets="" />
</Target>
<Target Name="Contabilidad_view:Clean">
<MSBuild Projects="..\Contabilidad\Views\Contabilidad_view.dproj" Targets="Clean" />
</Target>
<Target Name="Contabilidad_view:Make">
<MSBuild Projects="..\Contabilidad\Views\Contabilidad_view.dproj" Targets="Make" />
</Target>
<Target Name="Build">
<CallTarget Targets="Base;GUIBase;ApplicationBase;RecibosProveedor_model;RecibosProveedor_data;RecibosProveedor_controller;RecibosProveedor_view;RecibosProveedor_plugin;FactuGES;FactuGES_Server;RecibosCliente_data;RecibosCliente_view;Contactos_view;RecibosCliente_controller" />
<CallTarget Targets="Base;GUIBase;ApplicationBase;RecibosProveedor_model;RecibosProveedor_data;RecibosProveedor_controller;RecibosProveedor_view;RecibosProveedor_plugin;FactuGES;FactuGES_Server;RecibosCliente_data;RecibosCliente_view;Contactos_view;RecibosCliente_controller;Contabilidad_view" />
</Target>
<Target Name="Clean">
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;RecibosProveedor_model:Clean;RecibosProveedor_data:Clean;RecibosProveedor_controller:Clean;RecibosProveedor_view:Clean;RecibosProveedor_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;RecibosCliente_data:Clean;RecibosCliente_view:Clean;Contactos_view:Clean;RecibosCliente_controller:Clean" />
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;RecibosProveedor_model:Clean;RecibosProveedor_data:Clean;RecibosProveedor_controller:Clean;RecibosProveedor_view:Clean;RecibosProveedor_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;RecibosCliente_data:Clean;RecibosCliente_view:Clean;Contactos_view:Clean;RecibosCliente_controller:Clean;Contabilidad_view:Clean" />
</Target>
<Target Name="Make">
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;RecibosProveedor_model:Make;RecibosProveedor_data:Make;RecibosProveedor_controller:Make;RecibosProveedor_view:Make;RecibosProveedor_plugin:Make;FactuGES:Make;FactuGES_Server:Make;RecibosCliente_data:Make;RecibosCliente_view:Make;Contactos_view:Make;RecibosCliente_controller:Make" />
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;RecibosProveedor_model:Make;RecibosProveedor_data:Make;RecibosProveedor_controller:Make;RecibosProveedor_view:Make;RecibosProveedor_plugin:Make;FactuGES:Make;FactuGES_Server:Make;RecibosCliente_data:Make;RecibosCliente_view:Make;Contactos_view:Make;RecibosCliente_controller:Make;Contabilidad_view:Make" />
</Target>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project>

View File

@ -29,7 +29,8 @@ requires
RecibosProveedor_controller,
RecibosProveedor_model,
JvGlobusD11R,
Contactos_view;
Contactos_view,
Contabilidad_view;
contains
uEditorRecibosProveedor in 'uEditorRecibosProveedor.pas' {fEditorRecibosProveedor: TfEditorRecibosCliente},

View File

@ -46,6 +46,7 @@
<DelphiCompile Include="RecibosProveedor_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\Lib\Contabilidad_view.dcp" />
<DCCReference Include="..\..\Lib\Contactos_view.dcp" />
<DCCReference Include="..\..\Lib\GUIBase.dcp" />
<DCCReference Include="..\..\Lib\JvGlobusD11R.dcp" />

View File

@ -3,8 +3,8 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
Top = 0
BorderStyle = bsDialog
Caption = 'Fecha del cobro / devoluci'#243'n'
ClientHeight = 289
ClientWidth = 409
ClientHeight = 193
ClientWidth = 510
Color = clWindow
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -13,34 +13,32 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnClose = FormClose
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnShow = FormShow
DesignSize = (
409
289)
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 21
Top = 16
Width = 246
Height = 26
Left = 38
Top = 8
Width = 362
Height = 13
Caption =
'Introduzca la fecha en la que se ha hecho efectivo '#13#10'el cobro o ' +
'la devoluci'#243'n:'
'Introduzca la fecha en la que se ha hecho efectivo el cobro o la' +
' devoluci'#243'n:'
end
object Label2: TLabel
Left = 38
Top = 67
Width = 33
Left = 39
Top = 43
Width = 80
Height = 13
Alignment = taRightJustify
Caption = 'Fecha:'
Caption = 'Fecha del cobro:'
FocusControl = eFechaPago
end
object eFechaPago: TcxDateEdit
Left = 77
Top = 64
Left = 125
Top = 40
Properties.OnChange = eFechaPagoPropertiesChange
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
@ -55,25 +53,24 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
end
object Panel1: TPanel
Left = 0
Top = 248
Width = 409
Top = 152
Width = 510
Height = 41
Align = alBottom
TabOrder = 1
ExplicitTop = 126
ExplicitWidth = 283
ExplicitTop = 248
ExplicitWidth = 409
object bAceptar: TButton
Left = 119
Left = 38
Top = 8
Width = 75
Height = 25
Caption = 'Aceptar'
ModalResult = 1
TabOrder = 0
OnClick = bAceptarClick
end
object bCancelar: TButton
Left = 200
Left = 119
Top = 8
Width = 75
Height = 25
@ -82,81 +79,30 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
TabOrder = 1
end
end
object eContabilizar: TcxCheckBox
Left = 38
Top = 120
Caption = 'Ignorar en contabiliad'
Properties.ValueChecked = 1
Properties.ValueUnchecked = 0
Properties.OnChange = eContabilizarPropertiesChange
inline frViewListaSubcuentas1: TfrViewListaSubcuentas
Left = 30
Top = 80
Width = 453
Height = 69
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 2
Width = 203
end
object eRefSubCuenta: TcxTextEdit
Left = 39
Top = 147
Anchors = [akLeft, akTop, akRight]
AutoSize = False
Properties.ReadOnly = True
Properties.ValidateOnEnter = True
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Color = 14745599
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 3
Height = 21
Width = 215
end
object eSubCuenta: TcxTextEdit
Left = 38
Top = 174
Anchors = [akLeft, akTop, akRight]
AutoSize = False
Properties.ReadOnly = True
Properties.ValidateOnEnter = True
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Color = 14745599
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 4
Height = 21
Width = 297
end
object eIDSubcuenta: TcxTextEdit
Left = 38
Top = 201
Anchors = [akLeft, akTop, akRight]
AutoSize = False
Properties.ReadOnly = True
Properties.ValidateOnEnter = True
Properties.OnChange = eIDSubcuentaPropertiesChange
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Color = 14745599
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 5
Height = 21
Width = 43
end
object BitBtn3: TBitBtn
Left = 260
Top = 143
Width = 75
Height = 25
Caption = 'Elegir subcuenta'
TabOrder = 6
OnClick = BitBtn3Click
ReadOnly = False
ExplicitLeft = 30
ExplicitTop = 80
inherited dxLayoutControl1: TdxLayoutControl
inherited cbSubCuentas: TcxComboBox
ExplicitWidth = 376
Width = 376
end
inherited eContabilizar: TcxCheckBox
ExplicitWidth = 203
Width = 203
end
end
end
end

View File

@ -6,7 +6,8 @@ uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
cxDropDownEdit, cxCalendar, ExtCtrls, uEditorBasico, uIEditorFechaPagoProveedor,
uSubCuentasController, Buttons, cxCheckBox;
uSubCuentasController, Buttons, cxCheckBox, uCustomView, uViewBase,
uViewListaSubCuentas;
type
TfEditorFechaPagoProveedor = class(TfEditorBasico, IEditorFechaPagoProveedor)
@ -16,22 +17,13 @@ type
bCancelar: TButton;
Label2: TLabel;
Panel1: TPanel;
eContabilizar: TcxCheckBox;
eRefSubCuenta: TcxTextEdit;
eSubCuenta: TcxTextEdit;
eIDSubcuenta: TcxTextEdit;
BitBtn3: TBitBtn;
frViewListaSubcuentas1: TfrViewListaSubcuentas;
procedure FormShow(Sender: TObject);
procedure eFechaPagoPropertiesChange(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure eContabilizarPropertiesChange(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure eIDSubcuentaPropertiesChange(Sender: TObject);
procedure bAceptarClick(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure FormCreate(Sender: TObject);
private
FController : ISubcuentasController;
FIdSubCuenta : Integer;
FIgnorarContabilidad : Integer;
FFechaPago : TDateTime;
function GetFechaPago: TDateTime;
procedure SetFechaPago(const Value: TDateTime);
@ -44,42 +36,18 @@ type
property FechaPago: TDateTime Read GetFechaPago write SetFechaPago;
property IgnorarContabilidad: Integer Read GetIgnorarContabilidad write SetIgnorarContabilidad;
property IdSubCuenta: Integer Read GetIdSubCuenta write SetIdSubCuenta;
constructor Create(AOwner: TComponent); override;
procedure DeshabilitarContabilidad;
procedure DeshabilitarContabilidad;
end;
implementation
{$R *.dfm}
{$INCLUDE ..\..\..\FactuGES.inc}
uses uBizSubCuentas;
uses uDialogUtils;
procedure TfEditorFechaPagoProveedor.bAceptarClick(Sender: TObject);
procedure TfEditorFechaPagoProveedor.DeshabilitarContabilidad;
begin
if (not eContabilizar.Checked)
and (eIdSubcuenta.Text = '') then
raise Exception.Create ('Es necesario que elija la SubCuenta donde se realizará el pago');
end;
procedure TfEditorFechaPagoProveedor.BitBtn3Click(Sender: TObject);
var
ASubCuenta: IBizSubcuenta;
begin
ASubCuenta := FController.ElegirSubCuenta(FController.BuscarTodos,'sssss', False);
eIDSubcuenta.Text := IntToStr(ASubcuenta.ID);
eRefSubCuenta.Text := ASubcuenta.REF_SUBCUENTA;
eSubCuenta.Text := ASubcuenta.DESCRIPCION;
ASubCuenta := Nil;
end;
constructor TfEditorFechaPagoProveedor.Create(AOwner: TComponent);
begin
inherited;
FController := TSubcuentasController.Create;
end;
procedure TfEditorFechaPagoProveedor.eContabilizarPropertiesChange(Sender: TObject);
begin
FIgnorarContabilidad := eContabilizar.EditValue;
frViewListaSubCuentas1.eContabilizar.Enabled := False;
end;
procedure TfEditorFechaPagoProveedor.eFechaPagoPropertiesChange(Sender: TObject);
@ -87,21 +55,43 @@ begin
FechaPago := eFechaPago.Date;
end;
procedure TfEditorFechaPagoProveedor.eIDSubcuentaPropertiesChange(Sender: TObject);
procedure TfEditorFechaPagoProveedor.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
if not VarIsNull(eIDSubCuenta.EditValue) then
FIDSubCuenta := eIDSubCuenta.EditValue;
CanClose := True;
if Self.ModalResult = mrOk then
begin
if (length(eFechaPago.EditValue) = 0) then
begin
CanClose := False;
ShowWarningMessage('Debe establecer la fecha del pago');
end;
if ((IgnorarContabilidad = 0) and (IdSubCuenta < 1)) then
begin
CanClose := False;
ShowWarningMessage('Debe establecer la caja o banco donde se realiza el pago');
end
end;
end;
procedure TfEditorFechaPagoProveedor.FormClose(Sender: TObject; var Action: TCloseAction);
procedure TfEditorFechaPagoProveedor.FormCreate(Sender: TObject);
begin
FController := Nil;
{$IFDEF CONTABILIDAD}
frViewListaSubCuentas1.TipoSubCuenta := tCajas;
{$ENDIF}
end;
procedure TfEditorFechaPagoProveedor.FormShow(Sender: TObject);
begin
if (length(eFechaPago.Text) = 0) then
eFechaPago.Date := Date;
{$IFDEF CONTABILIDAD}
frViewListaSubCuentas1.Visible := true;
{$ELSE}
frViewListaSubCuentas1.Visible := false;
{$ENDIF}
end;
function TfEditorFechaPagoProveedor.GetFechaPago: TDateTime;
@ -111,31 +101,29 @@ end;
function TfEditorFechaPagoProveedor.GetIdSubCuenta: Integer;
begin
Result := eIDSubCuenta.EditValue; //FIdSubCuenta;
Result := frViewListaSubCuentas1.IdSubCuenta;
end;
function TfEditorFechaPagoProveedor.GetIgnorarContabilidad: Integer;
begin
Result := FIgnorarContabilidad;
Result := frViewListaSubCuentas1.eContabilizar.EditValue;
end;
procedure TfEditorFechaPagoProveedor.SetFechaPago(const Value: TDateTime);
begin
FFechaPago := Value;
eFechaPago.EditValue := FFechaPago;
end;
procedure TfEditorFechaPagoProveedor.SetIdSubCuenta(const Value: Integer);
begin
FIdSubCuenta := Value;
frViewListaSubCuentas1.ElegirSubCuenta(Value);
end;
procedure TfEditorFechaPagoProveedor.SetIgnorarContabilidad(const Value: Integer);
begin
FIgnorarContabilidad := Value;
eContabilizar.EditValue := FIgnorarContabilidad;
//frViewListaSubCuentas1.eContabilizar.EditValue := Value;
// frViewListaSubCuentas1.Refrescar;
frViewListaSubCuentas1.eContabilizar.EditValue := Value;
frViewListaSubCuentas1.Refrescar;
end;
end.

View File

@ -84,6 +84,18 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
DesignSize = (
677
350)
inherited eReferencia: TcxDBTextEdit
ExplicitWidth = 50
Width = 50
end
inherited eSituacion: TcxDBTextEdit
ExplicitWidth = 216
Width = 216
end
inherited edtFechaVencimiento: TcxDBDateEdit
ExplicitWidth = 216
Width = 216
end
inherited memObservaciones: TcxDBMemo
ExplicitWidth = 274
Width = 274
@ -91,19 +103,27 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
inherited eFechaEmision: TcxDBTextEdit
Left = 481
ExplicitLeft = 481
ExplicitWidth = 20
Width = 20
end
inherited eFormaPago: TcxDBTextEdit
Left = 481
ExplicitLeft = 481
ExplicitWidth = 42
Width = 42
end
inherited eImporteTotal: TcxDBCurrencyEdit
Left = 481
Style.IsFontAssigned = True
ExplicitLeft = 481
ExplicitWidth = 182
Width = 182
end
inherited eNombreCliente: TcxDBTextEdit
Left = 481
ExplicitLeft = 481
ExplicitWidth = 171
Width = 171
end
inherited eNifCif: TcxDBTextEdit
Left = 481
@ -114,10 +134,14 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
inherited eEntidad: TcxDBTextEdit
Left = 481
ExplicitLeft = 481
ExplicitWidth = 90
Width = 90
end
inherited eSucursal: TcxDBTextEdit
Left = 556
ExplicitLeft = 556
ExplicitWidth = 75
Width = 75
end
inherited eDC: TcxDBTextEdit
Left = 605
@ -126,6 +150,12 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
inherited eCuenta: TcxDBTextEdit
Left = 481
ExplicitLeft = 481
ExplicitWidth = 83
Width = 83
end
inherited eRemesa: TcxDBTextEdit
ExplicitWidth = 113
Width = 113
end
inherited edtFechaEmision: TcxDBDateEdit
ExplicitWidth = 97
@ -138,13 +168,42 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
inherited rReferenciaFacturaProv: TcxDBTextEdit
Left = 481
ExplicitLeft = 481
ExplicitWidth = 157
Width = 157
end
inherited rRefReciboCompensado: TcxDBTextEdit
ExplicitWidth = 216
Width = 216
end
inherited frViewProveedorRecibo: TfrViewDatosYSeleccionProveedor
Left = 384
Top = 299
Width = 350
ExplicitLeft = 384
ExplicitTop = 299
ExplicitWidth = 350
inherited dxLayoutControl1: TdxLayoutControl
Width = 350
inherited edtlNombre: TcxDBTextEdit
ExplicitWidth = 276
Width = 276
end
inherited edtNIFCIF: TcxDBTextEdit
ExplicitWidth = 562
Width = 562
end
inherited edtCalle: TcxDBTextEdit
ExplicitWidth = 562
Width = 562
end
inherited edtPoblacion: TcxDBTextEdit
ExplicitWidth = 177
Width = 177
end
inherited edtProvincia: TcxDBTextEdit
ExplicitWidth = 327
Width = 327
end
inherited edtCodigoPostal: TcxDBTextEdit
Left = 203
ExplicitLeft = 203
@ -155,6 +214,21 @@ inherited fEditorReciboProveedor: TfEditorReciboProveedor
end
end
end
inherited frViewTienda1: TfrViewTienda
Width = 451
ExplicitWidth = 451
inherited dxLayoutControl1: TdxLayoutControl
Width = 451
inherited cbTienda: TcxComboBox
ExplicitWidth = 376
Width = 376
end
end
end
inherited eDescripcion: TcxDBTextEdit
ExplicitWidth = 407
Width = 407
end
end
end
end

View File

@ -153,7 +153,7 @@ begin
begin
//En el caso de que el proveedor del recibo no tenga aignada subcuenta contable el pago no podrá contabilizar
if (Recibo.Cliente.SubCuentas.ID < 1) then
if (Recibo.Proveedor.SubCuentas.ID < 1) then
begin
IgnorarContabilidad := 1;
DeshabilitarContabilidad;

View File

@ -82,6 +82,8 @@ begin
RemesasCliente.DataTable.Active := True;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorRemesasCliente.GetRemesasCliente: IBizRemesaCliente;
@ -304,4 +306,4 @@ end;
end.

View File

@ -82,6 +82,8 @@ begin
RemesasProveedor.DataTable.Active := True;
ViewGrid.GotoFirst;
//Para que coja el ancho automático
actAnchoAuto.Execute;
end;
function TfEditorRemesasProveedor.GetRemesasProveedor: IBizRemesaProveedor;
@ -305,4 +307,4 @@ end;
end.

Binary file not shown.

View File

@ -14,7 +14,7 @@ BEGIN
BEGIN
VALUE "FileVersion", "1.0.0.0\0"
VALUE "ProductVersion", "1.0.0.0\0"
VALUE "CompileDate", "viernes, 14 de marzo de 2008 12:40\0"
VALUE "CompileDate", "viernes, 21 de marzo de 2008 12:17\0"
END
END
BLOCK "VarFileInfo"