Contabilidad: repaso general.

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@122 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
David Arranz 2008-01-28 08:43:23 +00:00
parent 4c3bd0ace2
commit 67d73e3347
20 changed files with 136 additions and 57 deletions

View File

@ -67,9 +67,9 @@ uses
{ TEjerciciosController }
procedure TEjerciciosController.Anadir(AEjercicio: IBizEjercicio);
var
{var
FechaInicio: TDate;
FechaFin: TDate;
FechaFin: TDate;}
begin
AEjercicio.Insert;

View File

@ -4,25 +4,26 @@ inherited fEditorEjercicio: TfEditorEjercicio
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
Caption = 'Ficha de ejercicio'
ClientWidth = 632
ClientHeight = 445
ClientWidth = 519
Scaled = False
OnClose = CustomEditorClose
ExplicitWidth = 640
ExplicitHeight = 488
ExplicitWidth = 527
ExplicitHeight = 479
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 632
Width = 519
Caption = 'Ejercicio'
ExplicitWidth = 632
inherited Image1: TImage
Left = 605
Left = 492
Picture.Data = {
0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000
80E8000075300000EA6000003A98000017709CBA513C00000009704859730000
17110000171101CA26F33F0000039D49444154484BB595E74F53511887F59F71
17100000171001186111DB0000039D49444154484BB595E74F53511887F59F71
1B8C030529200E90216AD4B8138D35C6204222124511344241D1526A8A68A150
C152A00296320A15A93840246C51145434804C2943FDF0B3EFD17BD32B72EB07
6DF24B9B9EE479CEFB9E3517C09CFFFA210197DF4521218DA0FCE9FF2B61F390
@ -56,7 +57,7 @@ inherited fEditorEjercicio: TfEditorEjercicio
end
end
inherited TBXDock: TTBXDock
Width = 632
Width = 519
ExplicitWidth = 632
inherited tbxMain: TTBXToolbar
ExplicitWidth = 330
@ -75,7 +76,7 @@ inherited fEditorEjercicio: TfEditorEjercicio
end
inherited tbxMenu: TTBXToolbar
DockPos = 0
ExplicitWidth = 632
ExplicitWidth = 519
inherited TBXSubmenuItem4: TTBXSubmenuItem
inherited TBXItem8: TTBXItem
Visible = False
@ -110,7 +111,8 @@ inherited fEditorEjercicio: TfEditorEjercicio
end
end
inherited pgPaginas: TPageControl
Width = 626
Width = 513
Height = 344
ExplicitLeft = 3
ExplicitTop = 79
ExplicitWidth = 626
@ -123,11 +125,13 @@ inherited fEditorEjercicio: TfEditorEjercicio
end
end
inherited StatusBar: TJvStatusBar
Width = 632
Top = 426
Width = 519
Panels = <
item
Width = 200
end>
ExplicitTop = 426
ExplicitWidth = 632
end
inherited EditorActionList: TActionList
@ -145,6 +149,10 @@ inherited fEditorEjercicio: TfEditorEjercicio
end
inherited JvFormStorage: TJvFormStorage [8]
end
inherited StatusBarImages: TPngImageList
Left = 64
Top = 144
end
object dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList
Left = 320
Top = 248

View File

@ -56,7 +56,7 @@ implementation
{$R *.dfm}
uses
uCustomEditor, uDataModuleEjercicios, uDataModuleBase;
uCustomEditor, uDataModuleEjercicios, uDataModuleBase, uDialogUtils;
function ShowEditorEjercicio (ABizObject : TDADataTableRules): TModalResult;
var
@ -218,7 +218,7 @@ end;
procedure TfEditorEjercicio.EliminarInterno;
begin
if (Application.MessageBox('¿Desea borrar este Ejercicio?, se borrará todo el PGC asociado', 'Atención', MB_YESNO) = IDYES) then
if (ShowConfirmMessage('Eliminar un ejercicio', '¿Desea borrar este ejercicio?' + #10#13 + 'Tenga en cuenta que se eliminará también todo el plan general contable asociado al ejercicio.') = IDYES) then
begin
inherited;
if not FController.Eliminar(FEjercicio) then

View File

@ -2,7 +2,6 @@ inherited fEditorEjercicios: TfEditorEjercicios
Left = 489
Top = 325
Caption = 'Lista de ejercicios'
ExplicitHeight = 471
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
@ -13,7 +12,7 @@ inherited fEditorEjercicios: TfEditorEjercicios
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000
80E8000075300000EA6000003A98000017709CBA513C00000009704859730000
17110000171101CA26F33F0000039D49444154484BB595E74F53511887F59F71
17100000171001186111DB0000039D49444154484BB595E74F53511887F59F71
1B8C030529200E90216AD4B8138D35C6204222124511344241D1526A8A68A150
C152A00296320A15A93840246C51145434804C2943FDF0B3EFD17BD32B72EB07
6DF24B9B9EE479CEFB9E3517C09CFFFA210197DF4521218DA0FCE9FF2B61F390

View File

@ -57,8 +57,8 @@ inherited frViewEjercicio: TfrViewEjercicio
Width = 158
end
object edtFechaFin: TcxDBDateEdit
Left = 86
Top = 109
Left = 287
Top = 82
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'FECHA_FIN'
DataBinding.DataSource = DADataSource
@ -79,7 +79,7 @@ inherited frViewEjercicio: TfrViewEjercicio
end
object cbSituacion: TcxDBImageComboBox
Left = 86
Top = 136
Top = 109
DataBinding.DataField = 'ESTADO'
DataBinding.DataSource = DADataSource
Properties.Items = <
@ -92,16 +92,23 @@ inherited frViewEjercicio: TfrViewEjercicio
Description = 'CERRADO'
Value = 'CERRADO'
end>
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 4
Width = 158
Width = 121
end
object cxDBCheckBox2: TcxDBCheckBox
Left = 22
Left = 86
Top = 28
Caption = 'Activo'
DataBinding.DataField = 'ACTIVO'
DataBinding.DataSource = DADataSource
Properties.Alignment = taRightJustify
Properties.Alignment = taLeftJustify
Properties.ImmediatePost = True
Properties.NullStyle = nssUnchecked
Properties.ValueChecked = 1
@ -118,7 +125,7 @@ inherited frViewEjercicio: TfrViewEjercicio
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
Width = 100
Width = 51
end
object dxLayoutControlEjercicioGroup_Root: TdxLayoutGroup
ShowCaption = False
@ -131,7 +138,7 @@ inherited frViewEjercicio: TfrViewEjercicio
Caption = 'Datos del ejercicio'
object dxLayoutControlEjercicioItem4: TdxLayoutItem
AutoAligns = [aaVertical]
ShowCaption = False
Caption = 'Activo:'
Control = cxDBCheckBox2
ControlOptions.ShowBorder = False
end
@ -140,15 +147,25 @@ inherited frViewEjercicio: TfrViewEjercicio
Control = eNombre
ControlOptions.ShowBorder = False
end
object dxLayoutControlEjercicioItem1: TdxLayoutItem
Caption = 'Fecha inicio:'
Control = edtFechaIni
ControlOptions.ShowBorder = False
end
object dxLayoutControlEjercicioItem2: TdxLayoutItem
Caption = 'Fecha fin:'
Control = edtFechaFin
ControlOptions.ShowBorder = False
object dxLayoutControlEjercicioGroup2: TdxLayoutGroup
ShowCaption = False
Hidden = True
LayoutDirection = ldHorizontal
ShowBorder = False
object dxLayoutControlEjercicioItem1: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Fecha inicio:'
Control = edtFechaIni
ControlOptions.ShowBorder = False
end
object dxLayoutControlEjercicioItem2: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Fecha fin:'
Control = edtFechaFin
ControlOptions.ShowBorder = False
end
end
object dxLayoutControlEjercicioItem5: TdxLayoutItem
Caption = 'Situaci'#243'n:'

View File

@ -33,6 +33,7 @@ type
cbSituacion: TcxDBImageComboBox;
dxLayoutControlEjercicioItem4: TdxLayoutItem;
cxDBCheckBox2: TcxDBCheckBox;
dxLayoutControlEjercicioGroup2: TdxLayoutGroup;
protected
FEjercicio: IBizEjercicio;
function GetEjercicio: IBizEjercicio;

View File

@ -316,6 +316,9 @@ begin
if AApunte.DataTable.Active then
AApunte.DataTable.Active := False;
if not Assigned(AppFactuGES.EjercicioActivo) then
raise Exception.Create('No se ha definido ningún ejercicio activo');
// Filtrar los Apuntes por la empresa activa
with AApunte.DataTable.DynamicWhere do
begin

View File

@ -211,6 +211,9 @@ begin
if ADiario.DataTable.Active then
ADiario.DataTable.Active := False;
if not Assigned(AppFactuGES.EjercicioActivo) then
raise Exception.Create('No se ha definido ningún ejercicio activo');
// Filtrar los asientos por la empresa activa
with ADiario.DataTable.DynamicWhere do
begin

View File

@ -376,6 +376,9 @@ begin
if ACuenta.DataTable.Active then
ACuenta.DataTable.Active := False;
if not Assigned(AppFactuGES.EjercicioActivo) then
raise Exception.Create('No se ha definido ningún ejercicio activo');
// Filtrar los Cuentas actuales por ejercicio activo
with ACuenta.DataTable.DynamicWhere do
begin

View File

@ -299,6 +299,9 @@ begin
if AEpigrafe.DataTable.Active then
AEpigrafe.DataTable.Active := False;
if not Assigned(AppFactuGES.EjercicioActivo) then
raise Exception.Create('No se ha definido ningún ejercicio activo');
// Filtrar los epigrafes actuales por ejercicio activo
with AEpigrafe.DataTable.DynamicWhere do
begin

View File

@ -433,6 +433,9 @@ begin
if ASubCuenta.DataTable.Active then
ASubCuenta.DataTable.Active := False;
if not Assigned(AppFactuGES.EjercicioActivo) then
raise Exception.Create('No se ha definido ningún ejercicio activo');
// Filtrar los SubCuentas actuales por SubCuenta activo
with ASubCuenta.DataTable.DynamicWhere do
begin

View File

@ -588,36 +588,42 @@ object PluginContabilidad: TPluginContabilidad
Caption = 'Epigrafes'
ImageIndex = 3
OnExecute = actEpigrafesExecute
OnUpdate = actEpigrafesUpdate
end
object actBalances: TAction
Category = 'Contabilidad'
Caption = 'Balances'
ImageIndex = 5
OnExecute = actBalancesExecute
OnUpdate = actBalancesUpdate
end
object actCuentasEspeciales: TAction
Category = 'Contabilidad'
Caption = 'Cuentas especiales'
ImageIndex = 6
OnExecute = actCuentasEspecialesExecute
OnUpdate = actCuentasEspecialesUpdate
end
object actCuentas: TAction
Category = 'Contabilidad'
Caption = 'Cuentas'
ImageIndex = 2
OnExecute = actCuentasExecute
OnUpdate = actCuentasUpdate
end
object actSubCuentas: TAction
Category = 'Contabilidad'
Caption = 'Subcuentas'
ImageIndex = 1
OnExecute = actSubCuentasExecute
OnUpdate = actSubCuentasUpdate
end
object actDiario: TAction
Category = 'Contabilidad'
Caption = 'Libro de diario'
ImageIndex = 0
OnExecute = actDiarioExecute
OnUpdate = actDiarioUpdate
end
end
object MainMenu: TMainMenu

View File

@ -8,7 +8,7 @@ uses
type
IMCContabilidad = interface(IInterface)
['{255E8D6B-282A-48CC-9807-E49C7D31FD2D}']
['{A88ED1C0-8E93-4721-9B8B-7268F13155B3}']
end;
TPluginContabilidad = class(TModuleController, IMCContabilidad)
@ -38,6 +38,12 @@ type
procedure actCuentasExecute(Sender: TObject);
procedure actSubCuentasExecute(Sender: TObject);
procedure actDiarioExecute(Sender: TObject);
procedure actCuentasUpdate(Sender: TObject);
procedure actEpigrafesUpdate(Sender: TObject);
procedure actBalancesUpdate(Sender: TObject);
procedure actCuentasEspecialesUpdate(Sender: TObject);
procedure actSubCuentasUpdate(Sender: TObject);
procedure actDiarioUpdate(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@ -48,7 +54,7 @@ implementation
{$R *.dfm}
uses
Forms, Dialogs, SysUtils,
Forms, Dialogs, SysUtils, uFactuGES_App,
uEpigrafesController, uBalancesController, uCuentasEspecialesController,
uCuentasController, uSubCuentasController, uAsientosController,
uBizEpigrafes, uBizBalances, uBizCuentasEspeciales, uBizCuentas, uBizSubCuentas,
@ -73,6 +79,11 @@ begin
AAsientosController.VerDiario(ADiario);
end;
procedure TPluginContabilidad.actDiarioUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := Assigned(AppFactuGES.EjercicioActivo);
end;
procedure TPluginContabilidad.actBalancesExecute(Sender: TObject);
var
ABalancesController : IBalancesController;
@ -83,6 +94,11 @@ begin
ABalancesController.VerTodos(ABalances);
end;
procedure TPluginContabilidad.actBalancesUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := Assigned(AppFactuGES.EjercicioActivo);
end;
procedure TPluginContabilidad.actCuentasEspecialesExecute(Sender: TObject);
var
ACuentasEspecialesController : ICuentasEspecialesController;
@ -93,6 +109,11 @@ begin
ACuentasEspecialesController.VerTodos(ACuentasEspeciales);
end;
procedure TPluginContabilidad.actCuentasEspecialesUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := Assigned(AppFactuGES.EjercicioActivo);
end;
procedure TPluginContabilidad.actCuentasExecute(Sender: TObject);
var
ACuentasController : ICuentasController;
@ -103,6 +124,11 @@ begin
ACuentasController.VerTodos(ACuentas);
end;
procedure TPluginContabilidad.actCuentasUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := Assigned(AppFactuGES.EjercicioActivo);
end;
procedure TPluginContabilidad.actEpigrafesExecute(Sender: TObject);
var
AEpigrafesController : IEpigrafesController;
@ -113,6 +139,11 @@ begin
AEpigrafesController.VerTodos(AEpigrafes);
end;
procedure TPluginContabilidad.actEpigrafesUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := Assigned(AppFactuGES.EjercicioActivo);
end;
procedure TPluginContabilidad.actSubCuentasExecute(Sender: TObject);
var
ASubCuentasController : ISubCuentasController;
@ -123,6 +154,11 @@ begin
ASubCuentasController.VerTodos(ASubCuentas);
end;
procedure TPluginContabilidad.actSubCuentasUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := Assigned(AppFactuGES.EjercicioActivo);
end;
constructor TPluginContabilidad.Create(AOwner: TComponent);
begin
inherited;

View File

@ -8,7 +8,6 @@ inherited fEditorApunte: TfEditorApunte
Scaled = False
OnClose = CustomEditorClose
ExplicitWidth = 640
ExplicitHeight = 488
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
@ -96,13 +95,12 @@ inherited fEditorApunte: TfEditorApunte
end
end
inherited pgPaginas: TPageControl
Width = 632
ExplicitWidth = 632
Width = 626
ExplicitWidth = 626
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 624
ExplicitHeight = 338
ExplicitWidth = 618
end
end
inherited StatusBar: TJvStatusBar

View File

@ -105,7 +105,7 @@ begin
if Assigned(Apunte) then
begin
if Apunte.EsNuevo then
FTitulo := 'Nueva Apunte - ' + AppFactuGES.EjercicioActivo.NOMBRE
FTitulo := 'Nuevo apunte - ' + AppFactuGES.EjercicioActivo.NOMBRE
else
FTitulo := 'Apunte' + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE; // + ' - ' + Apunte.DESCRIPCION;
end;
@ -145,7 +145,7 @@ begin
// raise Exception.Create('No hay ninguna vista asignada');
if not Assigned(Apunte) then
raise Exception.Create('No hay ningún almacén asignado');
raise Exception.Create('No hay ningún apunte asignado');
Apunte.DataTable.Active := True;
end;
@ -199,7 +199,7 @@ end;
procedure TfEditorApunte.EliminarInterno;
begin
if (Application.MessageBox('¿Desea borrar esta Apunte?', 'Atención', MB_YESNO) = IDYES) then
if (Application.MessageBox('¿Desea borrar este apunte?', 'Atención', MB_YESNO) = IDYES) then
begin
inherited;
if not FController.Eliminar(FApunte) then

View File

@ -9,13 +9,13 @@ inherited fEditorAsiento: TfEditorAsiento
Scaled = False
OnClose = CustomEditorClose
ExplicitWidth = 858
ExplicitHeight = 524
ExplicitHeight = 531
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 850
Caption = 'Asiento'
ExplicitWidth = 906
ExplicitWidth = 850
inherited Image1: TImage
Left = 823
Picture.Data = {
@ -44,7 +44,7 @@ inherited fEditorAsiento: TfEditorAsiento
end
inherited TBXDock: TTBXDock
Width = 850
ExplicitWidth = 906
ExplicitWidth = 850
inherited tbxMain: TTBXToolbar
ExplicitWidth = 330
inherited TBXItem2: TTBXItem
@ -101,12 +101,12 @@ inherited fEditorAsiento: TfEditorAsiento
Height = 396
ExplicitLeft = 3
ExplicitTop = 79
ExplicitWidth = 900
ExplicitWidth = 844
ExplicitHeight = 396
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 892
ExplicitWidth = 836
ExplicitHeight = 368
object dxLayoutControl1: TdxLayoutControl
Left = 0
@ -116,7 +116,6 @@ inherited fEditorAsiento: TfEditorAsiento
Align = alClient
TabOrder = 0
AutoContentSizes = [acsWidth, acsHeight]
ExplicitWidth = 892
DesignSize = (
836
368)
@ -267,7 +266,7 @@ inherited fEditorAsiento: TfEditorAsiento
Width = 200
end>
ExplicitTop = 478
ExplicitWidth = 906
ExplicitWidth = 850
end
inherited EditorActionList: TActionList
Top = 128

View File

@ -117,7 +117,7 @@ begin
if Assigned(Asiento) then
begin
if Asiento.EsNuevo then
FTitulo := 'Nueva Asiento - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE
FTitulo := 'Nuevo asiento - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE
else
FTitulo := 'Asiento' + ' ' + IntToStr(Asiento.ORDEN) + ' - ' + AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + AppFactuGES.EjercicioActivo.NOMBRE;
end;
@ -169,7 +169,7 @@ begin
// raise Exception.Create('No hay ninguna vista asignada');
if not Assigned(Asiento) then
raise Exception.Create('No hay ningún almacén asignado');
raise Exception.Create('No hay ningún asiento asignado');
Asiento.DataTable.Active := True;
@ -227,7 +227,7 @@ end;
procedure TfEditorAsiento.EliminarInterno;
begin
if (Application.MessageBox('¿Desea borrar esta Asiento?', 'Atención', MB_YESNO) = IDYES) then
if (Application.MessageBox('¿Desea borrar este asiento?', 'Atención', MB_YESNO) = IDYES) then
begin
inherited;
if not FController.Eliminar(FAsiento) then

View File

@ -183,9 +183,9 @@ begin
FBalance.DataTable.Active := True;
if FBalance.EsNuevo then
Self.Caption := 'Nueva forma de pago'
Self.Caption := 'Nuevo balance'
else
Self.Caption := 'Modificar forma de pago';
Self.Caption := 'Modificar balance';
end;
end.

View File

@ -22,7 +22,7 @@ inherited fEditorCuenta: TfEditorCuenta
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000
80E8000075300000EA6000003A98000017709CBA513C00000009704859730000
17110000171101CA26F33F000005EB49444154484B7D95794C944718C607AD52
17100000171001186111DB000005EB49444154484B7D95794C944718C607AD52
235A696BEFA6F58A36D578D4261EAD500FB4D1F84763EA5D44CBE146D1DA2AAB
B11E600139BC0A220B729F4582A260917317B15010644158907B414096BD2F8E
DDA7331F0B858ADDCD2FB3DF3B9BE779E79DF9DEB10A0BFA8D3FD566C2390232