Se adapta la pantalla de entradas/salidas en bancos para que no le salgan los apuntes del asiento y sea transparente a ellos
git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@16 93f398dd-4eb6-7a46-baf6-13f46f578da2
This commit is contained in:
parent
159358be95
commit
a01faff08f
65
Database/scripts/factuges_generadores_fabrica.sql
Normal file
65
Database/scripts/factuges_generadores_fabrica.sql
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/* Los que empiezan en 1.000.000.000 */
|
||||||
|
|
||||||
|
SET GENERATOR GEN_ALBARANES_CLI_DETALLES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_ALBARANES_CLI_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_ALBARANES_PRO_DETALLES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_ALBARANES_PRO_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_ALMACENES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_ARTICULOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_BALANCES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CATEGORIAS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CLIENTES_DTOS_PROV_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CLIENTES_GRUPOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CLIENTES_PROCEDENCIAS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_COMISIONES_LIQUID_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_COMISIONES_VENDEDORES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONFIGURACION_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONTACTOS_DATOS_BANCO_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONTACTOS_DIR_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONTACTOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONTACTOS_PERSONAL_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONTRATOS_CLI_DETALLE_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONTRATOS_CLI_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONT_APUNTES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONT_ASIENTOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONT_BALANCES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONT_CUENTAS_ESP_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONT_CUENTAS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONT_EJERCICIOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONT_EPIGRAFES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_CONT_SUBCUENTAS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_EJERCICIOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_EMPRESAS_CONTACTOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_EMPRESAS_DATOS_BANCO_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_EMPRESAS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_EMPRESAS_TIENDAS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_EMPRESAS_USUARIOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_FACTURAS_CLIENTE_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_FACTURAS_PROVEEDOR_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_FACTURAS_PROV_CONTRATOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_FACTURA_CLIENTE_DETALLES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_FACTURA_PROV_DETALLES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_FAMILIAS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_FORMAS_PAGO_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_FORMAS_PAGO_PLAZOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_INFORMES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_MOVIMIENTOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PAGOS_CLIENTE_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PAGOS_PROVEEDOR_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PEDIDOS_CLI_DETALLES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PEDIDOS_CLI_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PEDIDOS_PROV_DETALLES_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PEDIDOS_PROV_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PERMISOSEX_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PERMISOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PRESUPUESTOS_CLI_DETALLE_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PRESUPUESTOS_CLI_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_PROVEEDORES_GRUPOS_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_RECIBOS_CLIENTE_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_RECIBOS_PROVEEDOR_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_REMESAS_CLIENTE_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_REMESAS_PROVEEDOR_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_TIENDA_WEB_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_TIPOS_IVA_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_UNIDADES_MEDIDA_ID TO 2000000000;
|
||||||
|
SET GENERATOR GEN_USUARIOS_ID TO 2000000000;
|
||||||
@ -1,6 +1,5 @@
|
|||||||
/* Los que empiezan en 1.000.000.000 */
|
/* Los que empiezan en 1.000.000.000 */
|
||||||
|
|
||||||
SET GENERATOR GEN_AGENTES_COMISIONES_ID TO 1000000000;
|
|
||||||
SET GENERATOR GEN_ALBARANES_CLI_DETALLES_ID TO 1000000000;
|
SET GENERATOR GEN_ALBARANES_CLI_DETALLES_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_ALBARANES_CLI_ID TO 1000000000;
|
SET GENERATOR GEN_ALBARANES_CLI_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_ALBARANES_PRO_DETALLES_ID TO 1000000000;
|
SET GENERATOR GEN_ALBARANES_PRO_DETALLES_ID TO 1000000000;
|
||||||
@ -18,6 +17,9 @@ SET GENERATOR GEN_CONFIGURACION_ID TO 1000000000;
|
|||||||
SET GENERATOR GEN_CONTACTOS_DATOS_BANCO_ID TO 1000000000;
|
SET GENERATOR GEN_CONTACTOS_DATOS_BANCO_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_CONTACTOS_DIR_ID TO 1000000000;
|
SET GENERATOR GEN_CONTACTOS_DIR_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_CONTACTOS_ID TO 1000000000;
|
SET GENERATOR GEN_CONTACTOS_ID TO 1000000000;
|
||||||
|
SET GENERATOR GEN_CONTACTOS_PERSONAL_ID TO 1000000000;
|
||||||
|
SET GENERATOR GEN_CONTRATOS_CLI_DETALLE_ID TO 1000000000;
|
||||||
|
SET GENERATOR GEN_CONTRATOS_CLI_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_CONT_APUNTES_ID TO 1000000000;
|
SET GENERATOR GEN_CONT_APUNTES_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_CONT_ASIENTOS_ID TO 1000000000;
|
SET GENERATOR GEN_CONT_ASIENTOS_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_CONT_BALANCES_ID TO 1000000000;
|
SET GENERATOR GEN_CONT_BALANCES_ID TO 1000000000;
|
||||||
@ -34,6 +36,7 @@ SET GENERATOR GEN_EMPRESAS_TIENDAS_ID TO 1000000000;
|
|||||||
SET GENERATOR GEN_EMPRESAS_USUARIOS_ID TO 1000000000;
|
SET GENERATOR GEN_EMPRESAS_USUARIOS_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_FACTURAS_CLIENTE_ID TO 1000000000;
|
SET GENERATOR GEN_FACTURAS_CLIENTE_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_FACTURAS_PROVEEDOR_ID TO 1000000000;
|
SET GENERATOR GEN_FACTURAS_PROVEEDOR_ID TO 1000000000;
|
||||||
|
SET GENERATOR GEN_FACTURAS_PROV_CONTRATOS_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_FACTURA_CLIENTE_DETALLES_ID TO 1000000000;
|
SET GENERATOR GEN_FACTURA_CLIENTE_DETALLES_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_FACTURA_PROV_DETALLES_ID TO 1000000000;
|
SET GENERATOR GEN_FACTURA_PROV_DETALLES_ID TO 1000000000;
|
||||||
SET GENERATOR GEN_FAMILIAS_ID TO 1000000000;
|
SET GENERATOR GEN_FAMILIAS_ID TO 1000000000;
|
||||||
@ -58,34 +58,34 @@
|
|||||||
<DelphiCompile Include="GUIBase.dpk">
|
<DelphiCompile Include="GUIBase.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\Base.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\Base.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\ccpackD11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\ccpackD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\cxDataD11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\cxDataD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\cxEditorsD11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\cxEditorsD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\cxExportD11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\cxExportD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\cxLibraryD11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\cxLibraryD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\dbrtl.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\dbrtl.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\dxGDIPlusD11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\dxGDIPlusD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\dxLayoutControlD11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\dxLayoutControlD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\dxPScxCommonD11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\dxPScxCommonD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\dxPScxGrid6LnkD11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\dxPScxGrid6LnkD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\dxThemeD11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\dxThemeD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\frx11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\frx11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\frxe11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\frxe11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\fs11.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\fs11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\JvAppFrmD11R.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\JvAppFrmD11R.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\JvCtrlsD11R.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\JvCtrlsD11R.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\JvGlobusD11R.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\JvGlobusD11R.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\PngComponentsD10.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\PngComponentsD10.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\PNG_D10.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\PNG_D10.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\rtl.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\rtl.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\tb2k_d10.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\tb2k_d10.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\tbx_d10.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\tbx_d10.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\vcl.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\vcl.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\vclactnband.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\vclactnband.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\vcldb.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\vcldb.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\vcljpg.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\vcljpg.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Facturas de cliente\vclx.dcp" />
|
<DCCReference Include="..\Modulos\Contabilidad\vclx.dcp" />
|
||||||
<DCCReference Include="uDialogBase.pas">
|
<DCCReference Include="uDialogBase.pas">
|
||||||
<Form>fDialogBase</Form>
|
<Form>fDialogBase</Form>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
|
|||||||
Binary file not shown.
@ -22,6 +22,8 @@ type
|
|||||||
function Guardar(AAsiento : IBizAsiento): Boolean;
|
function Guardar(AAsiento : IBizAsiento): Boolean;
|
||||||
procedure DescartarCambios(AAsiento : IBizAsiento);
|
procedure DescartarCambios(AAsiento : IBizAsiento);
|
||||||
procedure Puntear(ADiario: IBizDiario);
|
procedure Puntear(ADiario: IBizDiario);
|
||||||
|
function AnadirApuntesEntrada(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
|
||||||
|
function AnadirApuntesSalida(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TAsientosController = class(TControllerBase, IAsientosController)
|
TAsientosController = class(TControllerBase, IAsientosController)
|
||||||
@ -57,6 +59,8 @@ type
|
|||||||
procedure Ver(AAsiento: IBizAsiento);
|
procedure Ver(AAsiento: IBizAsiento);
|
||||||
procedure Puntear(ADiario: IBizDiario);
|
procedure Puntear(ADiario: IBizDiario);
|
||||||
function CerrarCajaBanco(IdSubcuenta:Integer): Boolean;
|
function CerrarCajaBanco(IdSubcuenta:Integer): Boolean;
|
||||||
|
function AnadirApuntesEntrada(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
|
||||||
|
function AnadirApuntesSalida(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -66,7 +70,7 @@ uses
|
|||||||
uIEditorDiario, uIEditorExtractoMovimientos, uIEditorAsiento,
|
uIEditorDiario, uIEditorExtractoMovimientos, uIEditorAsiento,
|
||||||
uDataModuleContabilidad, uDAInterfaces, uDataTableUtils, uDialogUtils,
|
uDataModuleContabilidad, uDAInterfaces, uDataTableUtils, uDialogUtils,
|
||||||
uFactuGES_App, uBizEjercicios, uDateUtils, uROTypes, DateUtils, Controls, Windows,
|
uFactuGES_App, uBizEjercicios, uDateUtils, uROTypes, DateUtils, Controls, Windows,
|
||||||
uApuntesController;
|
uApuntesController, uBizSubCuentas, uSubCuentasController;
|
||||||
|
|
||||||
{ TAsientosController }
|
{ TAsientosController }
|
||||||
|
|
||||||
@ -93,6 +97,108 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TAsientosController.AnadirApuntesEntrada(AAsiento : IBizAsiento;
|
||||||
|
const ADescripcion: String; const AImporte: Currency): Boolean;
|
||||||
|
var
|
||||||
|
ASubCuenta : IBizSubCuenta;
|
||||||
|
AController : ISubCuentasController;
|
||||||
|
|
||||||
|
begin
|
||||||
|
//Validamos los datos a insertar
|
||||||
|
if ((Length(ADescripcion) = 0)
|
||||||
|
or (AImporte = 0)) then
|
||||||
|
raise Exception.Create('Debe introducir una descripción y un importe para poder realizar la entrada o salida.');
|
||||||
|
|
||||||
|
if Assigned(AAsiento) then
|
||||||
|
begin
|
||||||
|
if not AAsiento.Apuntes.DataTable.Editing then
|
||||||
|
AAsiento.Apuntes.DataTable.Edit;
|
||||||
|
|
||||||
|
//La cuenta de destino o origen ya viene rellena por defecto
|
||||||
|
AAsiento.Apuntes.CONCEPTO := ADescripcion;
|
||||||
|
AAsiento.Apuntes.DEBE := AImporte;
|
||||||
|
AAsiento.Apuntes.DataTable.FieldByName(fld_ApuntesHABER).Clear;
|
||||||
|
AAsiento.Apuntes.Post;
|
||||||
|
|
||||||
|
//Si ya tiene 2 apuntes es una modificación y solo tenemos que editar
|
||||||
|
//si por el contrario solo tiene uno añadimos el apunte de cuadre
|
||||||
|
if (AAsiento.Apuntes.DataTable.RecordCount = 2) then
|
||||||
|
begin
|
||||||
|
AAsiento.Apuntes.DataTable.Next;
|
||||||
|
AAsiento.Apuntes.DataTable.Edit
|
||||||
|
end
|
||||||
|
else
|
||||||
|
AAsiento.Apuntes.Append;
|
||||||
|
|
||||||
|
try
|
||||||
|
AController := TSubCuentasController.Create;
|
||||||
|
ASubCuenta := AController.BuscarVentas;
|
||||||
|
ASubCuenta.Open;
|
||||||
|
|
||||||
|
AAsiento.Apuntes.ID_SUBCUENTA := ASubCuenta.ID;
|
||||||
|
AAsiento.Apuntes.REF_SUBCUENTA := ASubCuenta.REF_SUBCUENTA;
|
||||||
|
AAsiento.Apuntes.SUBCUENTA := ASubCuenta.DESCRIPCION;
|
||||||
|
AAsiento.Apuntes.CONCEPTO := ADescripcion;
|
||||||
|
AAsiento.Apuntes.DataTable.FieldByName(fld_ApuntesDEBE).Clear;
|
||||||
|
AAsiento.Apuntes.HABER := AImporte;
|
||||||
|
AAsiento.Apuntes.Post;
|
||||||
|
finally
|
||||||
|
AController := Nil;
|
||||||
|
ASubCuenta := Nil;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TAsientosController.AnadirApuntesSalida(AAsiento: IBizAsiento;
|
||||||
|
const ADescripcion: String; const AImporte: Currency): Boolean;
|
||||||
|
var
|
||||||
|
ASubCuenta : IBizSubCuenta;
|
||||||
|
AController : ISubCuentasController;
|
||||||
|
|
||||||
|
begin
|
||||||
|
//Validamos los datos a insertar
|
||||||
|
if ((Length(ADescripcion) = 0)
|
||||||
|
or (AImporte = 0)) then
|
||||||
|
raise Exception.Create('Debe introducir una descripción y un importe para poder realizar la entrada o salida.');
|
||||||
|
|
||||||
|
if Assigned(AAsiento) then
|
||||||
|
begin
|
||||||
|
if not AAsiento.Apuntes.DataTable.Editing then
|
||||||
|
AAsiento.Apuntes.DataTable.Edit;
|
||||||
|
|
||||||
|
//La cuenta de destino o origen ya viene rellena por defecto
|
||||||
|
AAsiento.Apuntes.CONCEPTO := ADescripcion;
|
||||||
|
AAsiento.Apuntes.HABER := AImporte;
|
||||||
|
AAsiento.Apuntes.DataTable.FieldByName(fld_ApuntesDEBE).Clear;
|
||||||
|
AAsiento.Apuntes.Post;
|
||||||
|
|
||||||
|
//Si ya tiene 2 apuntes es una modificación y solo tenemos que editar
|
||||||
|
//si por el contrario solo tiene uno añadimos el apunte de cuadre
|
||||||
|
if (AAsiento.Apuntes.DataTable.RecordCount = 2) then
|
||||||
|
begin
|
||||||
|
AAsiento.Apuntes.DataTable.Next;
|
||||||
|
AAsiento.Apuntes.DataTable.Edit
|
||||||
|
end
|
||||||
|
else
|
||||||
|
AAsiento.Apuntes.Append;
|
||||||
|
try
|
||||||
|
AController := TSubCuentasController.Create;
|
||||||
|
ASubCuenta := AController.BuscarCompras;
|
||||||
|
ASubCuenta.Open;
|
||||||
|
AAsiento.Apuntes.ID_SUBCUENTA := ASubCuenta.ID;
|
||||||
|
AAsiento.Apuntes.REF_SUBCUENTA := ASubCuenta.REF_SUBCUENTA;
|
||||||
|
AAsiento.Apuntes.SUBCUENTA := ASubCuenta.DESCRIPCION;
|
||||||
|
AAsiento.Apuntes.CONCEPTO := ADescripcion;
|
||||||
|
AAsiento.Apuntes.DataTable.FieldByName(fld_ApuntesHABER).Clear;
|
||||||
|
AAsiento.Apuntes.DEBE := AImporte;
|
||||||
|
AAsiento.Apuntes.Post;
|
||||||
|
finally
|
||||||
|
AController := Nil;
|
||||||
|
ASubCuenta := Nil;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TAsientosController.AsignarDataModule;
|
procedure TAsientosController.AsignarDataModule;
|
||||||
begin
|
begin
|
||||||
FDataModule := TDataModuleContabilidad.Create(Nil);
|
FDataModule := TDataModuleContabilidad.Create(Nil);
|
||||||
|
|||||||
@ -17,8 +17,8 @@ const
|
|||||||
CTE_CUENTASPROVEEDOR = 400;
|
CTE_CUENTASPROVEEDOR = 400;
|
||||||
CTE_CUENTASCAJA = 570;
|
CTE_CUENTASCAJA = 570;
|
||||||
CTE_CUENTASBANCO = 572;
|
CTE_CUENTASBANCO = 572;
|
||||||
CTE_CUENTASVENTA = 7;
|
CTE_CUENTASVENTA = '7000000000'; //7;
|
||||||
CTE_CUENTASCOMPRA = 6;
|
CTE_CUENTASCOMPRA = '6000000000'; //6;
|
||||||
|
|
||||||
type
|
type
|
||||||
TEnumTipoSubCuenta = (tTodas, tClientes, tProveedores, tCompras, tVentas, tCajas);
|
TEnumTipoSubCuenta = (tTodas, tClientes, tProveedores, tCompras, tVentas, tCajas);
|
||||||
@ -27,6 +27,8 @@ type
|
|||||||
['{94E5F2B6-64C8-4331-B9CB-3ED730478529}']
|
['{94E5F2B6-64C8-4331-B9CB-3ED730478529}']
|
||||||
function BuscarTodos: IBizSubCuenta;
|
function BuscarTodos: IBizSubCuenta;
|
||||||
function Buscar(ID: Integer): IBizSubCuenta;
|
function Buscar(ID: Integer): IBizSubCuenta;
|
||||||
|
function BuscarVentas: IBizSubCuenta;
|
||||||
|
function BuscarCompras: IBizSubCuenta;
|
||||||
procedure VerTodos(ASubCuentas: IBizSubCuenta);
|
procedure VerTodos(ASubCuentas: IBizSubCuenta);
|
||||||
procedure Ver(ASubCuenta: IBizSubCuenta);
|
procedure Ver(ASubCuenta: IBizSubCuenta);
|
||||||
procedure Anadir(ASubCuenta : IBizSubCuenta);
|
procedure Anadir(ASubCuenta : IBizSubCuenta);
|
||||||
@ -46,7 +48,7 @@ type
|
|||||||
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||||
|
|
||||||
function DarLista(Const TipoSubCuenta: TEnumTipoSubCuenta): TStringList;
|
function DarLista(Const TipoSubCuenta: TEnumTipoSubCuenta): TStringList;
|
||||||
function Duplicar(ASubCuenta: IBizSubCuenta): IBizSubCuenta;
|
function Duplicar(ASubCuenta: IBizSubCuenta): IBizSubCuenta;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TSubCuentasController = class(TControllerBase, ISubCuentasController)
|
TSubCuentasController = class(TControllerBase, ISubCuentasController)
|
||||||
@ -211,7 +213,7 @@ begin
|
|||||||
with Result.DataTable.DynamicWhere do
|
with Result.DataTable.DynamicWhere do
|
||||||
begin
|
begin
|
||||||
// (REF_EPIGRAFE_PADRE = 6 compras)
|
// (REF_EPIGRAFE_PADRE = 6 compras)
|
||||||
Condicion := NewBinaryExpression(NewField('', fld_SubCuentasREF_EPIGRAFE_PADRE), NewConstant(CTE_CUENTASCOMPRA, datInteger), dboEqual);
|
Condicion := NewBinaryExpression(NewField('', fld_SubCuentasREF_SUBCUENTA), NewConstant(CTE_CUENTASCOMPRA, datString), dboEqual);
|
||||||
|
|
||||||
if IsEmpty then
|
if IsEmpty then
|
||||||
Expression := Condicion
|
Expression := Condicion
|
||||||
@ -289,7 +291,7 @@ begin
|
|||||||
with Result.DataTable.DynamicWhere do
|
with Result.DataTable.DynamicWhere do
|
||||||
begin
|
begin
|
||||||
// (REF_EPIGRAFE_PADRE = 7 ventas)
|
// (REF_EPIGRAFE_PADRE = 7 ventas)
|
||||||
Condicion := NewBinaryExpression(NewField('', fld_SubCuentasREF_EPIGRAFE_PADRE), NewConstant(CTE_CUENTASVENTA, datInteger), dboEqual);
|
Condicion := NewBinaryExpression(NewField('', fld_SubCuentasREF_SUBCUENTA), NewConstant(CTE_CUENTASVENTA, datString), dboEqual);
|
||||||
|
|
||||||
if IsEmpty then
|
if IsEmpty then
|
||||||
Expression := Condicion
|
Expression := Condicion
|
||||||
|
|||||||
@ -649,7 +649,9 @@ object PluginContabilidad: TPluginContabilidad
|
|||||||
object actSubCuentas: TAction
|
object actSubCuentas: TAction
|
||||||
Category = 'Contabilidad'
|
Category = 'Contabilidad'
|
||||||
Caption = 'Subcuentas'
|
Caption = 'Subcuentas'
|
||||||
|
Enabled = False
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
|
Visible = False
|
||||||
OnExecute = actSubCuentasExecute
|
OnExecute = actSubCuentasExecute
|
||||||
OnUpdate = actSubCuentasUpdate
|
OnUpdate = actSubCuentasUpdate
|
||||||
end
|
end
|
||||||
|
|||||||
@ -48,11 +48,11 @@
|
|||||||
<DelphiCompile Include="Contabilidad_view.dpk">
|
<DelphiCompile Include="Contabilidad_view.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="..\..\Recibos de cliente\ApplicationBase.dcp" />
|
<DCCReference Include="..\ApplicationBase.dcp" />
|
||||||
<DCCReference Include="..\..\Recibos de cliente\Base.dcp" />
|
<DCCReference Include="..\Base.dcp" />
|
||||||
<DCCReference Include="..\..\Recibos de cliente\Contabilidad_controller.dcp" />
|
<DCCReference Include="..\Contabilidad_controller.dcp" />
|
||||||
<DCCReference Include="..\..\Recibos de cliente\Contabilidad_model.dcp" />
|
<DCCReference Include="..\Contabilidad_model.dcp" />
|
||||||
<DCCReference Include="..\..\Recibos de cliente\GUIBase.dcp" />
|
<DCCReference Include="..\GUIBase.dcp" />
|
||||||
<DCCReference Include="uContabilidadViewRegister.pas">
|
<DCCReference Include="uContabilidadViewRegister.pas">
|
||||||
<Form>frViewEpigrafes</Form>
|
<Form>frViewEpigrafes</Form>
|
||||||
<DesignClass>TFrame</DesignClass>
|
<DesignClass>TFrame</DesignClass>
|
||||||
|
|||||||
Binary file not shown.
@ -4,20 +4,20 @@ inherited fEditorAsiento: TfEditorAsiento
|
|||||||
HorzScrollBar.Visible = False
|
HorzScrollBar.Visible = False
|
||||||
VertScrollBar.Visible = False
|
VertScrollBar.Visible = False
|
||||||
Caption = 'Ficha de asiento'
|
Caption = 'Ficha de asiento'
|
||||||
ClientHeight = 595
|
ClientHeight = 373
|
||||||
ClientWidth = 869
|
ClientWidth = 504
|
||||||
Scaled = False
|
Scaled = False
|
||||||
OnClose = CustomEditorClose
|
OnClose = CustomEditorClose
|
||||||
ExplicitWidth = 877
|
ExplicitWidth = 512
|
||||||
ExplicitHeight = 629
|
ExplicitHeight = 407
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||||
Width = 869
|
Width = 504
|
||||||
Caption = 'Asiento'
|
Caption = 'Asiento'
|
||||||
ExplicitWidth = 869
|
ExplicitWidth = 504
|
||||||
inherited Image1: TImage
|
inherited Image1: TImage
|
||||||
Left = 842
|
Left = 477
|
||||||
Picture.Data = {
|
Picture.Data = {
|
||||||
0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
|
0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
|
||||||
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
|
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
|
||||||
@ -44,8 +44,8 @@ inherited fEditorAsiento: TfEditorAsiento
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
Width = 869
|
Width = 504
|
||||||
ExplicitWidth = 869
|
ExplicitWidth = 504
|
||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
ExplicitWidth = 330
|
ExplicitWidth = 330
|
||||||
inherited TBXItem2: TTBXItem
|
inherited TBXItem2: TTBXItem
|
||||||
@ -63,7 +63,7 @@ inherited fEditorAsiento: TfEditorAsiento
|
|||||||
end
|
end
|
||||||
inherited tbxMenu: TTBXToolbar
|
inherited tbxMenu: TTBXToolbar
|
||||||
DockPos = 0
|
DockPos = 0
|
||||||
ExplicitWidth = 869
|
ExplicitWidth = 504
|
||||||
inherited TBXSubmenuItem4: TTBXSubmenuItem
|
inherited TBXSubmenuItem4: TTBXSubmenuItem
|
||||||
inherited TBXItem8: TTBXItem
|
inherited TBXItem8: TTBXItem
|
||||||
Visible = False
|
Visible = False
|
||||||
@ -97,30 +97,38 @@ inherited fEditorAsiento: TfEditorAsiento
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited StatusBar: TJvStatusBar
|
||||||
|
Top = 354
|
||||||
|
Width = 504
|
||||||
|
Panels = <
|
||||||
|
item
|
||||||
|
Width = 200
|
||||||
|
end>
|
||||||
|
ExplicitTop = 354
|
||||||
|
ExplicitWidth = 504
|
||||||
|
end
|
||||||
inherited pgPaginas: TPageControl
|
inherited pgPaginas: TPageControl
|
||||||
Width = 863
|
Width = 498
|
||||||
Height = 494
|
Height = 242
|
||||||
ExplicitLeft = 3
|
ExplicitWidth = 498
|
||||||
ExplicitTop = 79
|
ExplicitHeight = 242
|
||||||
ExplicitWidth = 863
|
|
||||||
ExplicitHeight = 494
|
|
||||||
inherited pagGeneral: TTabSheet
|
inherited pagGeneral: TTabSheet
|
||||||
ExplicitLeft = 4
|
ExplicitLeft = 4
|
||||||
ExplicitTop = 24
|
ExplicitTop = 24
|
||||||
ExplicitWidth = 855
|
ExplicitWidth = 490
|
||||||
ExplicitHeight = 466
|
ExplicitHeight = 214
|
||||||
object dxLayoutControl1: TdxLayoutControl
|
object dxLayoutControl1: TdxLayoutControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 855
|
Width = 490
|
||||||
Height = 466
|
Height = 214
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TabStop = False
|
TabStop = False
|
||||||
AutoContentSizes = [acsWidth, acsHeight]
|
AutoContentSizes = [acsWidth, acsHeight]
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
855
|
490
|
||||||
466)
|
214)
|
||||||
object edtOrden: TcxDBSpinEdit
|
object edtOrden: TcxDBSpinEdit
|
||||||
Left = 293
|
Left = 293
|
||||||
Top = 10
|
Top = 10
|
||||||
@ -205,6 +213,10 @@ inherited fEditorAsiento: TfEditorAsiento
|
|||||||
inherited Panel2: TPanel
|
inherited Panel2: TPanel
|
||||||
Left = 627
|
Left = 627
|
||||||
ExplicitLeft = 627
|
ExplicitLeft = 627
|
||||||
|
inherited eDescuadre: TcxCurrencyEdit
|
||||||
|
Top = 3
|
||||||
|
ExplicitTop = 3
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
@ -224,20 +236,6 @@ inherited fEditorAsiento: TfEditorAsiento
|
|||||||
end>
|
end>
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited ToolBar1: TToolBar
|
|
||||||
inherited ToolButton1: TToolButton
|
|
||||||
ExplicitWidth = 113
|
|
||||||
end
|
|
||||||
inherited ToolButton4: TToolButton
|
|
||||||
ExplicitWidth = 113
|
|
||||||
end
|
|
||||||
inherited ToolButton2: TToolButton
|
|
||||||
ExplicitWidth = 113
|
|
||||||
end
|
|
||||||
inherited ToolButton7: TToolButton
|
|
||||||
ExplicitWidth = 113
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
object dxLayoutControl1Group_Root: TdxLayoutGroup
|
object dxLayoutControl1Group_Root: TdxLayoutGroup
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
@ -276,31 +274,131 @@ inherited fEditorAsiento: TfEditorAsiento
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object EntradaSalida: TTabSheet
|
||||||
|
Caption = 'Entrada/Salida'
|
||||||
|
ImageIndex = 1
|
||||||
|
object dxLayoutControl2: TdxLayoutControl
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 490
|
||||||
|
Height = 214
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
TabStop = False
|
||||||
|
AutoContentSizes = [acsWidth, acsHeight]
|
||||||
|
DesignSize = (
|
||||||
|
490
|
||||||
|
214)
|
||||||
|
object edtFecha2: TcxDBDateEdit
|
||||||
|
Left = 73
|
||||||
|
Top = 10
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
DataBinding.DataField = 'FECHA_ASIENTO'
|
||||||
|
DataBinding.DataSource = dsDataTable
|
||||||
|
Properties.UseLeftAlignmentOnEditing = False
|
||||||
|
Style.BorderColor = clWindowFrame
|
||||||
|
Style.BorderStyle = ebs3D
|
||||||
|
Style.Color = clInfoBk
|
||||||
|
Style.HotTrack = False
|
||||||
|
Style.LookAndFeel.NativeStyle = True
|
||||||
|
Style.LookAndFeel.SkinName = ''
|
||||||
|
Style.Shadow = False
|
||||||
|
Style.ButtonStyle = bts3D
|
||||||
|
Style.ButtonTransparency = ebtNone
|
||||||
|
Style.PopupBorderStyle = epbsFrame3D
|
||||||
|
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||||
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
|
StyleFocused.LookAndFeel.NativeStyle = True
|
||||||
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
|
TabOrder = 0
|
||||||
|
Width = 200
|
||||||
|
end
|
||||||
|
object Tipo: TcxComboBox
|
||||||
|
Left = 358
|
||||||
|
Top = 10
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'Entrada'
|
||||||
|
'Salida')
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'Entrada'
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
object eDescripcion: TcxTextEdit
|
||||||
|
Left = 73
|
||||||
|
Top = 37
|
||||||
|
TabOrder = 2
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
object eImporte: TcxCurrencyEdit
|
||||||
|
Left = 73
|
||||||
|
Top = 64
|
||||||
|
Properties.AssignedValues.MinValue = True
|
||||||
|
Style.LookAndFeel.NativeStyle = True
|
||||||
|
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||||
|
StyleFocused.LookAndFeel.NativeStyle = True
|
||||||
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
|
TabOrder = 3
|
||||||
|
BiDiMode = bdLeftToRight
|
||||||
|
ParentBiDiMode = False
|
||||||
|
Width = 112
|
||||||
|
end
|
||||||
|
object dxLayoutGroup1: TdxLayoutGroup
|
||||||
|
ShowCaption = False
|
||||||
|
Hidden = True
|
||||||
|
ShowBorder = False
|
||||||
|
object dxLayoutControl2Group1: TdxLayoutGroup
|
||||||
|
ShowCaption = False
|
||||||
|
Hidden = True
|
||||||
|
LayoutDirection = ldHorizontal
|
||||||
|
ShowBorder = False
|
||||||
|
object dxLayoutControl2Item1: TdxLayoutItem
|
||||||
|
Caption = 'Fecha:'
|
||||||
|
Control = edtFecha2
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
|
object dxLayoutControl2Item2: TdxLayoutItem
|
||||||
|
Caption = 'Entrada/Salida:'
|
||||||
|
Control = Tipo
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object dxLayoutControl2Item3: TdxLayoutItem
|
||||||
|
Caption = 'Descripci'#243'n:'
|
||||||
|
Control = eDescripcion
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
|
object dxLayoutControl2Item4: TdxLayoutItem
|
||||||
|
Caption = 'Importe:'
|
||||||
|
Control = eImporte
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited StatusBar: TJvStatusBar
|
inherited PnlComentario: TPanel
|
||||||
Top = 576
|
Width = 504
|
||||||
Width = 869
|
ExplicitWidth = 504
|
||||||
Panels = <
|
inherited lbComentario: TLabel
|
||||||
item
|
Width = 494
|
||||||
Width = 200
|
Height = 25
|
||||||
end>
|
end
|
||||||
ExplicitTop = 576
|
|
||||||
ExplicitWidth = 869
|
|
||||||
end
|
end
|
||||||
inherited EditorActionList: TActionList
|
inherited EditorActionList: TActionList
|
||||||
Top = 128
|
Top = 128
|
||||||
end
|
end
|
||||||
inherited SmallImages: TPngImageList
|
|
||||||
Top = 112
|
|
||||||
end
|
|
||||||
inherited dsDataTable: TDADataSource [6]
|
inherited dsDataTable: TDADataSource [6]
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 168
|
Top = 168
|
||||||
end
|
end
|
||||||
inherited LargeImages: TPngImageList [7]
|
inherited LargeImages: TPngImageList
|
||||||
Top = 112
|
Top = 112
|
||||||
end
|
end
|
||||||
inherited JvFormStorage: TJvFormStorage [8]
|
inherited SmallImages: TPngImageList [9]
|
||||||
|
Top = 112
|
||||||
end
|
end
|
||||||
inherited StatusBarImages: TPngImageList
|
inherited StatusBarImages: TPngImageList
|
||||||
Left = 24
|
Left = 24
|
||||||
|
|||||||
@ -16,7 +16,7 @@ uses
|
|||||||
JvStatusBar, dxLayoutLookAndFeels, uDAInterfaces, uViewDetallesGenerico,
|
JvStatusBar, dxLayoutLookAndFeels, uDAInterfaces, uViewDetallesGenerico,
|
||||||
uViewApuntes, cxDropDownEdit, cxCalendar, cxDBEdit, dxLayoutControl,
|
uViewApuntes, cxDropDownEdit, cxCalendar, cxDBEdit, dxLayoutControl,
|
||||||
cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxSpinEdit, cxControls, DBCtrls,
|
cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxSpinEdit, cxControls, DBCtrls,
|
||||||
dxGDIPlusClasses;
|
dxGDIPlusClasses, cxGraphics, cxCurrencyEdit;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfEditorAsiento = class(TfEditorDBItem, IEditorAsiento)
|
TfEditorAsiento = class(TfEditorDBItem, IEditorAsiento)
|
||||||
@ -32,6 +32,18 @@ type
|
|||||||
dxLayoutControl1Group3: TdxLayoutGroup;
|
dxLayoutControl1Group3: TdxLayoutGroup;
|
||||||
dxLayoutControl1Item1: TdxLayoutItem;
|
dxLayoutControl1Item1: TdxLayoutItem;
|
||||||
frViewApuntes1: TfrViewApuntes;
|
frViewApuntes1: TfrViewApuntes;
|
||||||
|
EntradaSalida: TTabSheet;
|
||||||
|
dxLayoutControl2: TdxLayoutControl;
|
||||||
|
dxLayoutGroup1: TdxLayoutGroup;
|
||||||
|
dxLayoutControl2Item1: TdxLayoutItem;
|
||||||
|
edtFecha2: TcxDBDateEdit;
|
||||||
|
Tipo: TcxComboBox;
|
||||||
|
dxLayoutControl2Item2: TdxLayoutItem;
|
||||||
|
eDescripcion: TcxTextEdit;
|
||||||
|
dxLayoutControl2Item3: TdxLayoutItem;
|
||||||
|
dxLayoutControl2Group1: TdxLayoutGroup;
|
||||||
|
dxLayoutControl2Item4: TdxLayoutItem;
|
||||||
|
eImporte: TcxCurrencyEdit;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure dsDataTableDataChange(Sender: TObject; Field: TField);
|
procedure dsDataTableDataChange(Sender: TObject; Field: TField);
|
||||||
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
|
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
|
||||||
@ -68,7 +80,7 @@ implementation
|
|||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCustomEditor, uDataModuleBase, uFactuGES_App;
|
uCustomEditor, uDataModuleBase, uFactuGES_App, schContabilidadClient_Intf;
|
||||||
|
|
||||||
function ShowEditorAsiento (ABizObject : TDADataTableRules): TModalResult;
|
function ShowEditorAsiento (ABizObject : TDADataTableRules): TModalResult;
|
||||||
var
|
var
|
||||||
@ -106,6 +118,12 @@ end;
|
|||||||
procedure TfEditorAsiento.GuardarInterno;
|
procedure TfEditorAsiento.GuardarInterno;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
|
if Tipo.Text = 'Entrada' then
|
||||||
|
FController.AnadirApuntesEntrada(FAsiento, eDescripcion.Text, eImporte.Value)
|
||||||
|
else
|
||||||
|
FController.AnadirApuntesSalida(FAsiento, eDescripcion.Text, eImporte.Value);
|
||||||
|
|
||||||
FController.Guardar(FAsiento);
|
FController.Guardar(FAsiento);
|
||||||
Modified := False;
|
Modified := False;
|
||||||
end;
|
end;
|
||||||
@ -172,15 +190,31 @@ begin
|
|||||||
raise Exception.Create('No hay ningún asiento asignado');
|
raise Exception.Create('No hay ningún asiento asignado');
|
||||||
|
|
||||||
Asiento.DataTable.Active := True;
|
Asiento.DataTable.Active := True;
|
||||||
|
if not Asiento.EsNuevo then
|
||||||
|
begin
|
||||||
|
Asiento.Apuntes.First;
|
||||||
|
eDescripcion.Text := Asiento.Apuntes.CONCEPTO;
|
||||||
|
if Asiento.Apuntes.DataTable.FieldByName(fld_ApuntesDEBE).IsNull then
|
||||||
|
begin
|
||||||
|
Tipo.ItemIndex := 1;
|
||||||
|
eImporte.Value := Asiento.Apuntes.HABER;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Tipo.ItemIndex := 0;
|
||||||
|
eImporte.Value := Asiento.Apuntes.DEBE;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
//Al insertar el orden se asigna automaticamente en el servidor, luego se podrá modificar
|
//Al insertar el orden se asigna automaticamente en el servidor, luego se podrá modificar
|
||||||
if Asiento.EsNuevo then
|
{ if Asiento.EsNuevo then
|
||||||
lcOrden.Visible := False
|
lcOrden.Visible := False
|
||||||
else
|
else
|
||||||
lcOrden.Visible := True;
|
lcOrden.Visible := True;
|
||||||
|
}
|
||||||
|
|
||||||
//En el caso de tener apuntes el asiento nos posicionaremos siempre el la columna concepto del ultimo apunte
|
//En el caso de tener apuntes el asiento nos posicionaremos siempre el la columna concepto del ultimo apunte
|
||||||
frViewApuntes1.GotoLast;
|
// frViewApuntes1.GotoLast;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TfEditorAsiento.Destroy;
|
destructor TfEditorAsiento.Destroy;
|
||||||
@ -208,7 +242,7 @@ end;
|
|||||||
constructor TfEditorAsiento.Create(AOwner: TComponent);
|
constructor TfEditorAsiento.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
pgPaginas.ActivePageIndex := 0;
|
pgPaginas.ActivePageIndex := 1;
|
||||||
// AsignarVista;
|
// AsignarVista;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -2,11 +2,15 @@ inherited fEditorDiario: TfEditorDiario
|
|||||||
Left = 489
|
Left = 489
|
||||||
Top = 325
|
Top = 325
|
||||||
Caption = 'Libro de diario'
|
Caption = 'Libro de diario'
|
||||||
|
ClientWidth = 593
|
||||||
|
ExplicitWidth = 601
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||||
|
Width = 593
|
||||||
Caption = 'Libro de diario'
|
Caption = 'Libro de diario'
|
||||||
inherited Image1: TImage
|
inherited Image1: TImage
|
||||||
|
Left = 566
|
||||||
Picture.Data = {
|
Picture.Data = {
|
||||||
0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
|
0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
|
||||||
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
|
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
|
||||||
@ -31,8 +35,9 @@ inherited fEditorDiario: TfEditorDiario
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
|
Width = 593
|
||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 561
|
||||||
end
|
end
|
||||||
inherited tbxFiltro: TTBXToolbar
|
inherited tbxFiltro: TTBXToolbar
|
||||||
ExplicitWidth = 269
|
ExplicitWidth = 269
|
||||||
@ -43,6 +48,9 @@ inherited fEditorDiario: TfEditorDiario
|
|||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited tbxMenu: TTBXToolbar
|
||||||
|
ExplicitWidth = 593
|
||||||
|
end
|
||||||
inherited TBXTMain2: TTBXToolbar
|
inherited TBXTMain2: TTBXToolbar
|
||||||
Left = 275
|
Left = 275
|
||||||
DockPos = 275
|
DockPos = 275
|
||||||
@ -54,10 +62,13 @@ inherited fEditorDiario: TfEditorDiario
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited StatusBar: TJvStatusBar
|
||||||
|
Width = 593
|
||||||
|
end
|
||||||
inline frViewDiario1: TfrViewDiario [3]
|
inline frViewDiario1: TfrViewDiario [3]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 102
|
Top = 102
|
||||||
Width = 543
|
Width = 593
|
||||||
Height = 323
|
Height = 323
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
@ -72,7 +83,7 @@ inherited fEditorDiario: TfEditorDiario
|
|||||||
ExplicitWidth = 543
|
ExplicitWidth = 543
|
||||||
ExplicitHeight = 323
|
ExplicitHeight = 323
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Width = 543
|
Width = 593
|
||||||
Height = 195
|
Height = 195
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 543
|
||||||
ExplicitHeight = 195
|
ExplicitHeight = 195
|
||||||
@ -102,12 +113,12 @@ inherited fEditorDiario: TfEditorDiario
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||||
Width = 543
|
Width = 593
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 543
|
||||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 543
|
||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
Width = 543
|
Width = 593
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 543
|
||||||
inherited txtFiltroTodo: TcxTextEdit
|
inherited txtFiltroTodo: TcxTextEdit
|
||||||
Style.LookAndFeel.SkinName = ''
|
Style.LookAndFeel.SkinName = ''
|
||||||
@ -126,21 +137,21 @@ inherited fEditorDiario: TfEditorDiario
|
|||||||
Width = 121
|
Width = 121
|
||||||
end
|
end
|
||||||
inherited edtFechaFinFiltro: TcxDateEdit
|
inherited edtFechaFinFiltro: TcxDateEdit
|
||||||
Left = 337
|
Left = 367
|
||||||
Style.LookAndFeel.SkinName = ''
|
Style.LookAndFeel.SkinName = ''
|
||||||
StyleDisabled.LookAndFeel.SkinName = ''
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
StyleFocused.LookAndFeel.SkinName = ''
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitLeft = 337
|
ExplicitLeft = 367
|
||||||
ExplicitWidth = 121
|
ExplicitWidth = 121
|
||||||
Width = 121
|
Width = 121
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||||
Width = 543
|
Width = 593
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 543
|
||||||
inherited tbxBotones: TTBXToolbar
|
inherited tbxBotones: TTBXToolbar
|
||||||
Width = 533
|
Width = 583
|
||||||
ExplicitWidth = 533
|
ExplicitWidth = 533
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -151,10 +162,10 @@ inherited fEditorDiario: TfEditorDiario
|
|||||||
ExplicitTop = 297
|
ExplicitTop = 297
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 543
|
||||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||||
Width = 543
|
Width = 593
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 543
|
||||||
inherited TBXToolbar1: TTBXToolbar
|
inherited TBXToolbar1: TTBXToolbar
|
||||||
Width = 533
|
Width = 583
|
||||||
ExplicitWidth = 533
|
ExplicitWidth = 533
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -42,7 +42,7 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
|
|||||||
Width = 774
|
Width = 774
|
||||||
ExplicitWidth = 774
|
ExplicitWidth = 774
|
||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
ExplicitWidth = 704
|
ExplicitWidth = 561
|
||||||
end
|
end
|
||||||
inherited tbxFiltro: TTBXToolbar
|
inherited tbxFiltro: TTBXToolbar
|
||||||
inherited tbxEditFiltro: TTBXEditItem
|
inherited tbxEditFiltro: TTBXEditItem
|
||||||
@ -53,9 +53,11 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
|
|||||||
ExplicitWidth = 774
|
ExplicitWidth = 774
|
||||||
end
|
end
|
||||||
inherited TBXTMain2: TTBXToolbar
|
inherited TBXTMain2: TTBXToolbar
|
||||||
DockPos = 275
|
Left = 343
|
||||||
|
DockPos = 343
|
||||||
Visible = True
|
Visible = True
|
||||||
ExplicitWidth = 246
|
ExplicitLeft = 343
|
||||||
|
ExplicitWidth = 77
|
||||||
object TBXItem38: TTBXItem
|
object TBXItem38: TTBXItem
|
||||||
Action = actPuntear
|
Action = actPuntear
|
||||||
DisplayMode = nbdmImageAndText
|
DisplayMode = nbdmImageAndText
|
||||||
@ -221,7 +223,9 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
|
|||||||
end
|
end
|
||||||
object actPuntear: TAction
|
object actPuntear: TAction
|
||||||
Caption = 'Puntear/Despuntear asiento'
|
Caption = 'Puntear/Despuntear asiento'
|
||||||
|
Enabled = False
|
||||||
ImageIndex = 24
|
ImageIndex = 24
|
||||||
|
Visible = False
|
||||||
OnExecute = actPuntearExecute
|
OnExecute = actPuntearExecute
|
||||||
OnUpdate = actPuntearUpdate
|
OnUpdate = actPuntearUpdate
|
||||||
end
|
end
|
||||||
|
|||||||
@ -127,15 +127,27 @@ inherited frViewExtractoMovimientos: TfrViewExtractoMovimientos
|
|||||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
inherited txtFiltroTodo: TcxTextEdit
|
inherited txtFiltroTodo: TcxTextEdit
|
||||||
|
Style.LookAndFeel.SkinName = ''
|
||||||
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitWidth = 273
|
ExplicitWidth = 273
|
||||||
Width = 273
|
Width = 273
|
||||||
end
|
end
|
||||||
inherited edtFechaIniFiltro: TcxDateEdit
|
inherited edtFechaIniFiltro: TcxDateEdit
|
||||||
|
Style.LookAndFeel.SkinName = ''
|
||||||
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitWidth = 242
|
ExplicitWidth = 242
|
||||||
Width = 242
|
Width = 242
|
||||||
end
|
end
|
||||||
inherited edtFechaFinFiltro: TcxDateEdit
|
inherited edtFechaFinFiltro: TcxDateEdit
|
||||||
Left = 346
|
Left = 346
|
||||||
|
Style.LookAndFeel.SkinName = ''
|
||||||
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitLeft = 346
|
ExplicitLeft = 346
|
||||||
ExplicitWidth = 198
|
ExplicitWidth = 198
|
||||||
Width = 198
|
Width = 198
|
||||||
|
|||||||
@ -14,7 +14,8 @@ uses
|
|||||||
dxPSEdgePatterns, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk,
|
dxPSEdgePatterns, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk,
|
||||||
cxGridCustomPopupMenu, cxGridPopupMenu, uViewFiltroBase, TB2Item, TBX,
|
cxGridCustomPopupMenu, cxGridPopupMenu, uViewFiltroBase, TB2Item, TBX,
|
||||||
TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, uDAInterfaces, cxCalendar,
|
TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, uDAInterfaces, cxCalendar,
|
||||||
cxImageComboBox, cxTextEdit, cxCurrencyEdit, uBizSubCuentas, uAsientosController;
|
cxImageComboBox, cxTextEdit, cxCurrencyEdit, uBizSubCuentas, uAsientosController,
|
||||||
|
uCustomView, uViewBase;
|
||||||
|
|
||||||
type
|
type
|
||||||
IViewExtractoMovimientos = interface(IViewGrid)
|
IViewExtractoMovimientos = interface(IViewGrid)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user