Version 4.4.4 , privilegios de cajas y bancos y precio punto en contratos de cliente

git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@180 93f398dd-4eb6-7a46-baf6-13f46f578da2
This commit is contained in:
roberto 2023-04-25 16:40:44 +00:00
parent 12d3bc4835
commit d62bfb65a0
59 changed files with 1016 additions and 351 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -9,9 +9,11 @@ uses
const const
CTE_PERFIL_ADMINISTRADOR = 3; CTE_PERFIL_ADMINISTRADOR = 3;
CTE_PERFIL_GERENCIA = 2;
CTE_PERFIL_VENDEDOR_GRADEN = 7; CTE_PERFIL_VENDEDOR_GRADEN = 7;
CTE_PERFIL_VENDEDOR_MARBELLA = 9; CTE_PERFIL_VENDEDOR_MARBELLA = 9;
CTE_PERFIL_VENDEDOR_DONOSTI = 10; CTE_PERFIL_VENDEDOR_DONOSTI = 10;
CTE_PERFIL_VENDEDOR_GRADEN_UECKO = 6;
CTE_PERFIL_COMPRAS = 8; CTE_PERFIL_COMPRAS = 8;
CTE_PERFIL_USUARIO = 5; CTE_PERFIL_USUARIO = 5;

View File

@ -52,7 +52,12 @@
<Borland.Personality>Delphi.Personality</Borland.Personality> <Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType> <Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject> <BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">3</VersionInfo><VersionInfo Name="Release">3</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.3.3.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.3.3.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages> <BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">4</VersionInfo><VersionInfo Name="Release">4</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.4.4.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.4.4.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject> </Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>

Binary file not shown.

View File

@ -197,35 +197,49 @@ begin
//El usuario vendedor de graden solo podrá ver ventas (Graden-Vendedor(2)) //El usuario vendedor de graden solo podrá ver ventas (Graden-Vendedor(2))
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN) if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_MARBELLA) or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_MARBELLA)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_DONOSTI) then or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_DONOSTI)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN_UECKO) then
begin begin
Informes1.Enabled := False;
Informes1.Visible := False;
Contabilidad1.Enabled := False; Contabilidad1.Enabled := False;
Contabilidad1.Visible := False; Contabilidad1.Visible := False;
Compras1.Enabled := False; Compras1.Enabled := False;
Compras1.Visible := False; Compras1.Visible := False;
Logistica1.Enabled := False; Logistica1.Enabled := False;
Logistica1.Visible := False; Logistica1.Visible := False;
ConfigurarFactuGES1.Enabled := False;
ConfigurarFactuGES1.Visible := False;
end end
//El usuario normal de uecko solo no verá los bancos //El usuario normal de uecko solo no verá los bancos
else if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_USUARIO) then else if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_USUARIO) then
begin begin
Informes1.Enabled := False;
Informes1.Visible := False;
Contabilidad1.Enabled := False; Contabilidad1.Enabled := False;
Contabilidad1.Visible := False; Contabilidad1.Visible := False;
ConfigurarFactuGES1.Enabled := False;
ConfigurarFactuGES1.Visible := False;
end; end;
//El usuario COMPRAS //El usuario COMPRAS
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_COMPRAS) then if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_COMPRAS) then
begin begin
Informes1.Enabled := False;
Informes1.Visible := False;
Contabilidad1.Enabled := False; Contabilidad1.Enabled := False;
Contabilidad1.Visible := False; Contabilidad1.Visible := False;
Ventas1.Enabled := False; Ventas1.Enabled := False;
Ventas1.Visible := False; Ventas1.Visible := False;
ConfigurarFactuGES1.Enabled := False;
ConfigurarFactuGES1.Visible := False;
end;
//El usuario GERENCIA)
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_GERENCIA)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR) then
begin
Informes1.Enabled := True;
Informes1.Visible := True;
end
else
begin
Informes1.Enabled := False;
Informes1.Visible := False;
end; end;

View File

@ -58,34 +58,34 @@
<DelphiCompile Include="GUIBase.dpk"> <DelphiCompile Include="GUIBase.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\Modulos\Albaranes de cliente\Base.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\Base.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\ccpackD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\ccpackD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\cxDataD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\cxDataD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\cxEditorsD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\cxEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\cxExportD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\cxExportD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\cxLibraryD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\dbrtl.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\dxGDIPlusD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\dxLayoutControlD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxLayoutControlD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\dxPScxCommonD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxPScxCommonD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\dxPScxGrid6LnkD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\dxThemeD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\frx11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\frx11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\frxe11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\frxe11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\fs11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\fs11.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\JvAppFrmD11R.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\JvAppFrmD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\JvCtrlsD11R.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\JvGlobusD11R.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\JvGlobusD11R.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\PngComponentsD10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\PngComponentsD10.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\PNG_D10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\PNG_D10.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\rtl.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\tb2k_d10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\tb2k_d10.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\tbx_d10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\tbx_d10.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\vcl.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\vclactnband.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vclactnband.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\vcldb.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\vcljpg.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Albaranes de cliente\vclx.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
<DCCReference Include="uDialogBase.pas"> <DCCReference Include="uDialogBase.pas">
<Form>fDialogBase</Form> <Form>fDialogBase</Form>
</DCCReference> </DCCReference>

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -19,6 +19,7 @@
<Projects Include="..\Facturas de proveedor\Views\FacturasProveedor_view.dproj" /> <Projects Include="..\Facturas de proveedor\Views\FacturasProveedor_view.dproj" />
<Projects Include="..\Recibos de cliente\Controller\RecibosCliente_controller.dproj" /> <Projects Include="..\Recibos de cliente\Controller\RecibosCliente_controller.dproj" />
<Projects Include="..\Recibos de cliente\Model\RecibosCliente_model.dproj" /> <Projects Include="..\Recibos de cliente\Model\RecibosCliente_model.dproj" />
<Projects Include="..\Recibos de cliente\Views\RecibosCliente_view.dproj" />
<Projects Include="Controller\Contabilidad_controller.dproj" /> <Projects Include="Controller\Contabilidad_controller.dproj" />
<Projects Include="Data\Contabilidad_data.dproj" /> <Projects Include="Data\Contabilidad_data.dproj" />
<Projects Include="Model\Contabilidad_model.dproj" /> <Projects Include="Model\Contabilidad_model.dproj" />
@ -211,14 +212,23 @@
<Target Name="FacturasProveedor_controller:Make"> <Target Name="FacturasProveedor_controller:Make">
<MSBuild Projects="..\Facturas de proveedor\Controller\FacturasProveedor_controller.dproj" Targets="Make" /> <MSBuild Projects="..\Facturas de proveedor\Controller\FacturasProveedor_controller.dproj" Targets="Make" />
</Target> </Target>
<Target Name="RecibosCliente_view">
<MSBuild Projects="..\Recibos de cliente\Views\RecibosCliente_view.dproj" Targets="" />
</Target>
<Target Name="RecibosCliente_view:Clean">
<MSBuild Projects="..\Recibos de cliente\Views\RecibosCliente_view.dproj" Targets="Clean" />
</Target>
<Target Name="RecibosCliente_view:Make">
<MSBuild Projects="..\Recibos de cliente\Views\RecibosCliente_view.dproj" Targets="Make" />
</Target>
<Target Name="Build"> <Target Name="Build">
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_model;Contactos_controller;Contactos_view;Contabilidad_model;Contabilidad_data;Contabilidad_controller;Contabilidad_view;Contabilidad_plugin;FactuGES;FactuGES_Server;FacturasProveedor_view;FacturasCliente_view;Articulos_view;RecibosCliente_controller;RecibosCliente_model;FacturasCliente_controller;FacturasProveedor_controller" /> <CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_model;Contactos_controller;Contactos_view;Contabilidad_model;Contabilidad_data;Contabilidad_controller;Contabilidad_view;Contabilidad_plugin;FactuGES;FactuGES_Server;FacturasProveedor_view;FacturasCliente_view;Articulos_view;RecibosCliente_controller;RecibosCliente_model;FacturasCliente_controller;FacturasProveedor_controller;RecibosCliente_view" />
</Target> </Target>
<Target Name="Clean"> <Target Name="Clean">
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_model:Clean;Contactos_controller:Clean;Contactos_view:Clean;Contabilidad_model:Clean;Contabilidad_data:Clean;Contabilidad_controller:Clean;Contabilidad_view:Clean;Contabilidad_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;FacturasProveedor_view:Clean;FacturasCliente_view:Clean;Articulos_view:Clean;RecibosCliente_controller:Clean;RecibosCliente_model:Clean;FacturasCliente_controller:Clean;FacturasProveedor_controller:Clean" /> <CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_model:Clean;Contactos_controller:Clean;Contactos_view:Clean;Contabilidad_model:Clean;Contabilidad_data:Clean;Contabilidad_controller:Clean;Contabilidad_view:Clean;Contabilidad_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;FacturasProveedor_view:Clean;FacturasCliente_view:Clean;Articulos_view:Clean;RecibosCliente_controller:Clean;RecibosCliente_model:Clean;FacturasCliente_controller:Clean;FacturasProveedor_controller:Clean;RecibosCliente_view:Clean" />
</Target> </Target>
<Target Name="Make"> <Target Name="Make">
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_model:Make;Contactos_controller:Make;Contactos_view:Make;Contabilidad_model:Make;Contabilidad_data:Make;Contabilidad_controller:Make;Contabilidad_view:Make;Contabilidad_plugin:Make;FactuGES:Make;FactuGES_Server:Make;FacturasProveedor_view:Make;FacturasCliente_view:Make;Articulos_view:Make;RecibosCliente_controller:Make;RecibosCliente_model:Make;FacturasCliente_controller:Make;FacturasProveedor_controller:Make" /> <CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_model:Make;Contactos_controller:Make;Contactos_view:Make;Contabilidad_model:Make;Contabilidad_data:Make;Contabilidad_controller:Make;Contabilidad_view:Make;Contabilidad_plugin:Make;FactuGES:Make;FactuGES_Server:Make;FacturasProveedor_view:Make;FacturasCliente_view:Make;Articulos_view:Make;RecibosCliente_controller:Make;RecibosCliente_model:Make;FacturasCliente_controller:Make;FacturasProveedor_controller:Make;RecibosCliente_view:Make" />
</Target> </Target>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" /> <Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project> </Project>

View File

@ -22,6 +22,7 @@ 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 SetBancoPorDefecto(IdEjercicio: Integer; IdSubcuenta:Integer): Boolean;
function AnadirApuntesEntrada(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean; function AnadirApuntesEntrada(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
function AnadirApuntesSalida(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean; function AnadirApuntesSalida(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
end; end;
@ -59,6 +60,7 @@ 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 SetBancoPorDefecto(IdEjercicio: Integer; IdSubcuenta:Integer): Boolean;
function AnadirApuntesEntrada(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean; function AnadirApuntesEntrada(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
function AnadirApuntesSalida(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean; function AnadirApuntesSalida(AAsiento : IBizAsiento; const ADescripcion: String; const AImporte: Currency): Boolean;
end; end;
@ -471,6 +473,12 @@ begin
// //
end; end;
function TAsientosController.SetBancoPorDefecto(IdEjercicio,
IdSubcuenta: Integer): Boolean;
begin
FDataModule.SetBancoPorDefecto(IdEjercicio, IdSubcuenta);
end;
function TAsientosController.Guardar(AAsiento: IBizAsiento): Boolean; function TAsientosController.Guardar(AAsiento: IBizAsiento): Boolean;
begin begin
Result := False; Result := False;

View File

@ -82,6 +82,7 @@ type
function Nuevo : IBizSubCuenta; function Nuevo : IBizSubCuenta;
function BuscarTodos: IBizSubCuenta; function BuscarTodos: IBizSubCuenta;
function BuscarCajasBancos: IBizSubCuenta; function BuscarCajasBancos: IBizSubCuenta;
function BuscarCajasBancoPorDefecto: IBizSubCuenta;
function BuscarVentas: IBizSubCuenta; function BuscarVentas: IBizSubCuenta;
function BuscarCompras: IBizSubCuenta; function BuscarCompras: IBizSubCuenta;
function Buscar(ID: Integer): IBizSubCuenta; function Buscar(ID: Integer): IBizSubCuenta;
@ -100,6 +101,7 @@ type
function DarLista(Const TipoSubCuenta: TEnumTipoSubCuenta): TStringList; function DarLista(Const TipoSubCuenta: TEnumTipoSubCuenta): TStringList;
function Duplicar(ASubCuenta: IBizSubCuenta): IBizSubCuenta; function Duplicar(ASubCuenta: IBizSubCuenta): IBizSubCuenta;
end; end;
implementation implementation
@ -171,6 +173,52 @@ begin
end; end;
end; end;
function TSubCuentasController.BuscarCajasBancoPorDefecto: IBizSubCuenta;
var
Condicion: TDAWhereExpression;
Condicion1: TDAWhereExpression;
Condicion2: TDAWhereExpression;
Condicion3: TDAWhereExpression;
Condicion4: TDAWhereExpression;
begin
ShowHourglassCursor;
try
Result := BuscarTodos;
with Result.DataTable.DynamicWhere do
begin
// (REF_CUENTAS = 570 cajas)
Condicion1 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASCAJA, datInteger), dboEqual);
// (REF_CUENTAS = 572 bancos)
//CAMBIO DE PRIVILEGIOS BANCO
Condicion3 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASBANCO, datInteger), dboEqual);
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_GERENCIA) then
begin
Condicion2 := Condicion3;
end
else
begin
Condicion4 := NewBinaryExpression(NewField('', fld_SubCuentasPAGO_DEFECTO), NewConstant(1, datInteger), dboEqual);
Condicion2 := NewBinaryExpression(Condicion3, Condicion4, dboAnd);
end;
//Acoplamos cajas y bancos a cuento
Condicion := NewBinaryExpression(Condicion1, Condicion2, dboOr);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
finally
HideHourglassCursor;
end;
end;
function TSubCuentasController.BuscarCajasBancos: IBizSubCuenta; function TSubCuentasController.BuscarCajasBancos: IBizSubCuenta;
var var
Condicion: TDAWhereExpression; Condicion: TDAWhereExpression;
@ -186,9 +234,18 @@ begin
begin begin
// (REF_CUENTAS = 570 cajas) // (REF_CUENTAS = 570 cajas)
Condicion1 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASCAJA, datInteger), dboEqual); Condicion1 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASCAJA, datInteger), dboEqual);
// (REF_CUENTAS = 572 bancos) // (REF_CUENTAS = 572 bancos)
//CAMBIO DE PRIVILEGIOS BANCO
// Solo verán los bancos el perfil administrador y gerencia
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_GERENCIA) then
begin
Condicion2 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASBANCO, datInteger), dboEqual); Condicion2 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASBANCO, datInteger), dboEqual);
Condicion := NewBinaryExpression(Condicion1, Condicion2, dboOr); Condicion := NewBinaryExpression(Condicion1, Condicion2, dboOr);
end
else
Condicion := Condicion1;
if IsEmpty then if IsEmpty then
Expression := Condicion Expression := Condicion
@ -323,7 +380,9 @@ begin
case TipoSubCuenta of case TipoSubCuenta of
// tClientes, tProveedores, tCompras, tVentas, // tClientes, tProveedores, tCompras, tVentas,
tTodas : ASubCuentas := BuscarTodos; tTodas : ASubCuentas := BuscarTodos;
tCajas : ASubCuentas := BuscarCajasBancos; //CAMBIO DE PRIVILEGIOS BANCO
//El tipo enumerdado cajas no solo serán las cajas sino también el banco de pago por defecto
tCajas : ASubCuentas := BuscarCajasBancoPorDefecto;
tVentas : ASubCuentas := BuscarVentas; tVentas : ASubCuentas := BuscarVentas;
tCompras : ASubCuentas := BuscarCompras; tCompras : ASubCuentas := BuscarCompras;
end; end;

View File

@ -14,12 +14,12 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Top = 104 Top = 104
end end
object rda_Contabilidad: TDARemoteDataAdapter object rda_Contabilidad: TDARemoteDataAdapter
DataStreamer = Bin2DataStreamer
GetSchemaCall.RemoteService = RORemoteService GetSchemaCall.RemoteService = RORemoteService
GetDataCall.RemoteService = RORemoteService GetDataCall.RemoteService = RORemoteService
UpdateDataCall.RemoteService = RORemoteService UpdateDataCall.RemoteService = RORemoteService
GetScriptsCall.RemoteService = RORemoteService GetScriptsCall.RemoteService = RORemoteService
RemoteService = RORemoteService RemoteService = RORemoteService
DataStreamer = Bin2DataStreamer
Left = 176 Left = 176
Top = 24 Top = 24
end end
@ -94,8 +94,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Params = <> Params = <>
StreamingOptions = [soDisableEventsWhileStreaming] StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contabilidad RemoteDataAdapter = rda_Contabilidad
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Balances' LogicalName = 'Balances'
IndexDefs = <> IndexDefs = <>
Left = 304 Left = 304
@ -135,8 +133,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Params = <> Params = <>
StreamingOptions = [soDisableEventsWhileStreaming] StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contabilidad RemoteDataAdapter = rda_Contabilidad
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'CuentasEspeciales' LogicalName = 'CuentasEspeciales'
IndexDefs = <> IndexDefs = <>
Left = 408 Left = 408
@ -202,8 +198,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Params = <> Params = <>
StreamingOptions = [soDisableEventsWhileStreaming] StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contabilidad RemoteDataAdapter = rda_Contabilidad
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Epigrafes' LogicalName = 'Epigrafes'
IndexDefs = <> IndexDefs = <>
Left = 232 Left = 232
@ -293,8 +287,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Params = <> Params = <>
StreamingOptions = [soDisableEventsWhileStreaming] StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contabilidad RemoteDataAdapter = rda_Contabilidad
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Cuentas' LogicalName = 'Cuentas'
IndexDefs = <> IndexDefs = <>
Left = 320 Left = 320
@ -386,12 +378,14 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
DataType = datCurrency DataType = datCurrency
DisplayLabel = 'SubCuentas_SALDO' DisplayLabel = 'SubCuentas_SALDO'
DictionaryEntry = 'SubCuentas_SALDO' DictionaryEntry = 'SubCuentas_SALDO'
end
item
Name = 'PAGO_DEFECTO'
DataType = datSmallInt
end> end>
Params = <> Params = <>
StreamingOptions = [soDisableEventsWhileStreaming] StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contabilidad RemoteDataAdapter = rda_Contabilidad
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'SubCuentas' LogicalName = 'SubCuentas'
IndexDefs = <> IndexDefs = <>
Left = 408 Left = 408
@ -481,8 +475,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
MasterSource = ds_Asientos MasterSource = ds_Asientos
MasterFields = 'ID' MasterFields = 'ID'
DetailFields = 'ID_ASIENTO' DetailFields = 'ID_ASIENTO'
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Apuntes' LogicalName = 'Apuntes'
IndexDefs = <> IndexDefs = <>
Left = 384 Left = 384
@ -535,8 +527,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Params = <> Params = <>
StreamingOptions = [soDisableEventsWhileStreaming] StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contabilidad RemoteDataAdapter = rda_Contabilidad
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Asientos' LogicalName = 'Asientos'
IndexDefs = <> IndexDefs = <>
Left = 232 Left = 232
@ -669,8 +659,6 @@ inherited DataModuleContabilidad: TDataModuleContabilidad
Params = <> Params = <>
StreamingOptions = [soDisableEventsWhileStreaming] StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contabilidad RemoteDataAdapter = rda_Contabilidad
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Diario' LogicalName = 'Diario'
IndexDefs = <> IndexDefs = <>
Left = 80 Left = 80

View File

@ -50,6 +50,7 @@ type
function GetBalanceItems: IBizBalance; function GetBalanceItems: IBizBalance;
procedure PuntearAsiento(IDAsiento: Integer); procedure PuntearAsiento(IDAsiento: Integer);
procedure PuntearSubCuenta(IDSubcuenta: Integer); procedure PuntearSubCuenta(IDSubcuenta: Integer);
procedure SetBancoPorDefecto(IdEjercicio: Integer; IdSubcuenta:Integer);
end; end;
implementation implementation
@ -246,6 +247,12 @@ begin
(RORemoteService as IsrvContabilidad).PuntearSubCuenta(IdSubCuenta); (RORemoteService as IsrvContabilidad).PuntearSubCuenta(IdSubCuenta);
end; end;
procedure TDataModuleContabilidad.SetBancoPorDefecto(IdEjercicio,
IdSubcuenta: Integer);
begin
(RORemoteService as IsrvContabilidad).SetBancoPorDefecto(IdEjercicio, IdSubCuenta);//
end;
function TDataModuleContabilidad._GetApuntes: IBizApunte; function TDataModuleContabilidad._GetApuntes: IBizApunte;
var var
AApuntes : TDAMemDataTable; AApuntes : TDAMemDataTable;

View File

@ -21,6 +21,7 @@ type
function GetAsientoItem(const ID : Integer): IBizAsiento; function GetAsientoItem(const ID : Integer): IBizAsiento;
procedure PuntearAsiento(IDAsiento: Integer); procedure PuntearAsiento(IDAsiento: Integer);
procedure PuntearSubCuenta(IDSubcuenta: Integer); procedure PuntearSubCuenta(IDSubcuenta: Integer);
procedure SetBancoPorDefecto(IdEjercicio: Integer; IdSubcuenta:Integer);
end; end;
implementation implementation

View File

@ -3,26 +3,26 @@ unit schContabilidadClient_Intf;
interface interface
uses uses
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; Classes, DB, schBase_Intf, SysUtils, uROClasses, uDAInterfaces, uDADataTable, FmtBCD, uROXMLIntf;
const const
{ Data table rules ids { Data table rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_DarIDCuenta = '{F934D7F5-F193-4794-AAD1-9A1B91BB3318}'; RID_DarIDCuenta = '{8492A1A5-245D-457F-B55A-CB89947BF7BA}';
RID_DarCodigoContableTienda = '{F27822D7-98D8-4C30-8823-DA2AEDDBB5E1}'; RID_DarCodigoContableTienda = '{7D7A2894-0FD8-46F6-9B62-81368ABC8D97}';
RID_DarMaxRefSubCuentaProv = '{D256227B-16B9-49D5-9A88-72FFC0C0C154}'; RID_DarMaxRefSubCuentaProv = '{64DEE93E-4CCB-4DB4-953A-63C5111E89D6}';
RID_ExisteSubCuenta = '{47F6A8CA-B5CD-418D-9DC9-3C43BC8D3C1D}'; RID_ExisteSubCuenta = '{B3C34D3B-41D1-43A4-B2EC-F8B6FC8972A3}';
RID_Diario = '{06B76C35-D095-4736-9147-448CBB1ED101}'; RID_Diario = '{2953C6BA-9DE8-49BC-97A6-D0BADD0D0DD3}';
RID_Apuntes = '{4DC74A57-EEB3-46D8-A3CE-948530C296F2}'; RID_Apuntes = '{41EFA0A1-22C5-4763-B430-C9AE95F3CD30}';
RID_Asientos = '{12A769DB-89F4-498B-B4D4-ED1477100E3B}'; RID_Asientos = '{4C8F895E-51F2-4E30-B196-444B9B4255B9}';
RID_SubCuentas = '{9E6B8CF8-F8CC-494A-A776-A0B3CD401846}'; RID_SubCuentas = '{C2B465DF-A102-4939-B319-7C28CD99FC1C}';
RID_Cuentas = '{5879B695-7BF0-44ED-BEF9-BB9F6F5A6CE1}'; RID_Cuentas = '{4B75B967-DD82-4E4B-A3CF-AF14C4A0826C}';
RID_CuentasEspeciales = '{60F17DA4-B7D1-4689-8994-B210A1A1D78B}'; RID_CuentasEspeciales = '{DE89104B-CCD9-473C-9D43-C71D94E8E232}';
RID_Epigrafes = '{32D84D4F-995D-4D29-91AB-357C17AFBF10}'; RID_Epigrafes = '{335041B7-5A99-4612-8B7C-F3B047FE3206}';
RID_Balances = '{BC6355C4-5817-40DA-9D6E-ED71FBB2B9DC}'; RID_Balances = '{C21EDF09-0B5A-4CD5-A47B-B8B8CC56B67B}';
RID_DarMaxRefSubCuentaCli = '{81CD72F3-982E-4411-90D2-0C04347D6785}'; RID_DarMaxRefSubCuentaCli = '{8EFA62D0-F993-41E9-A82E-BEFE7BAFD016}';
RID_DarNumOrdenAsiento = '{4D041128-19E0-4F71-B6C2-0657CFA24C9B}'; RID_DarNumOrdenAsiento = '{F5D98E57-C87B-4EC6-A9C4-47A900156284}';
{ Data table names } { Data table names }
nme_DarIDCuenta = 'DarIDCuenta'; nme_DarIDCuenta = 'DarIDCuenta';
@ -160,6 +160,7 @@ const
fld_SubCuentasDEBE = 'DEBE'; fld_SubCuentasDEBE = 'DEBE';
fld_SubCuentasHABER = 'HABER'; fld_SubCuentasHABER = 'HABER';
fld_SubCuentasSALDO = 'SALDO'; fld_SubCuentasSALDO = 'SALDO';
fld_SubCuentasPAGO_DEFECTO = 'PAGO_DEFECTO';
{ SubCuentas field indexes } { SubCuentas field indexes }
idx_SubCuentasID = 0; idx_SubCuentasID = 0;
@ -175,6 +176,7 @@ const
idx_SubCuentasDEBE = 10; idx_SubCuentasDEBE = 10;
idx_SubCuentasHABER = 11; idx_SubCuentasHABER = 11;
idx_SubCuentasSALDO = 12; idx_SubCuentasSALDO = 12;
idx_SubCuentasPAGO_DEFECTO = 13;
{ Cuentas fields } { Cuentas fields }
fld_CuentasID = 'ID'; fld_CuentasID = 'ID';
@ -267,7 +269,7 @@ const
type type
{ IDarIDCuenta } { IDarIDCuenta }
IDarIDCuenta = interface(IDAStronglyTypedDataTable) IDarIDCuenta = interface(IDAStronglyTypedDataTable)
['{D8F2113C-47E1-4D5F-84B1-55356AC09BEC}'] ['{9706C6AC-9B7C-486C-A2B1-E9D129995F22}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -302,7 +304,7 @@ type
{ IDarCodigoContableTienda } { IDarCodigoContableTienda }
IDarCodigoContableTienda = interface(IDAStronglyTypedDataTable) IDarCodigoContableTienda = interface(IDAStronglyTypedDataTable)
['{727DD029-68E9-4D58-9243-EBB2C9F1CBF4}'] ['{17E2D76F-1C7A-46C5-A176-0EA3C3F1EEC6}']
{ Property getters and setters } { Property getters and setters }
function GetCODIGO_CONTABLEValue: String; function GetCODIGO_CONTABLEValue: String;
procedure SetCODIGO_CONTABLEValue(const aValue: String); procedure SetCODIGO_CONTABLEValue(const aValue: String);
@ -337,7 +339,7 @@ type
{ IDarMaxRefSubCuentaProv } { IDarMaxRefSubCuentaProv }
IDarMaxRefSubCuentaProv = interface(IDAStronglyTypedDataTable) IDarMaxRefSubCuentaProv = interface(IDAStronglyTypedDataTable)
['{3254BD1F-1143-411F-A64A-04EDA953DAFA}'] ['{73E2CF4F-12E0-47B6-83AA-32BFDA6F03EC}']
{ Property getters and setters } { Property getters and setters }
function GetMAXValue: Integer; function GetMAXValue: Integer;
procedure SetMAXValue(const aValue: Integer); procedure SetMAXValue(const aValue: Integer);
@ -372,7 +374,7 @@ type
{ IExisteSubCuenta } { IExisteSubCuenta }
IExisteSubCuenta = interface(IDAStronglyTypedDataTable) IExisteSubCuenta = interface(IDAStronglyTypedDataTable)
['{4D4EBC68-3266-448B-8BA7-B804B42AD5CC}'] ['{88E97D86-14DE-43D9-83EF-4EC72DDEF370}']
{ Property getters and setters } { Property getters and setters }
function GetCOUNTValue: Integer; function GetCOUNTValue: Integer;
procedure SetCOUNTValue(const aValue: Integer); procedure SetCOUNTValue(const aValue: Integer);
@ -407,7 +409,7 @@ type
{ IDiario } { IDiario }
IDiario = interface(IDAStronglyTypedDataTable) IDiario = interface(IDAStronglyTypedDataTable)
['{BD3DC12E-83B7-43CD-93AC-AF94EA64BADA}'] ['{D3BE22EE-52FA-4E6B-996C-E2481F56D97E}']
{ Property getters and setters } { Property getters and setters }
function GetID_APUNTEValue: Integer; function GetID_APUNTEValue: Integer;
procedure SetID_APUNTEValue(const aValue: Integer); procedure SetID_APUNTEValue(const aValue: Integer);
@ -646,7 +648,7 @@ type
{ IApuntes } { IApuntes }
IApuntes = interface(IDAStronglyTypedDataTable) IApuntes = interface(IDAStronglyTypedDataTable)
['{5B4D39B8-C07D-408F-9C38-D0C2E3A29D63}'] ['{9E895E7F-9B40-4A3E-AED5-CDB66CBD1A7B}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -801,7 +803,7 @@ type
{ IAsientos } { IAsientos }
IAsientos = interface(IDAStronglyTypedDataTable) IAsientos = interface(IDAStronglyTypedDataTable)
['{5BB77EBB-4C65-459C-867C-D464CC6EED2C}'] ['{D0BB061F-1956-4280-8C3B-528402E04472}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -896,7 +898,7 @@ type
{ ISubCuentas } { ISubCuentas }
ISubCuentas = interface(IDAStronglyTypedDataTable) ISubCuentas = interface(IDAStronglyTypedDataTable)
['{8132788A-2FBC-4B3C-AF23-78CB019CC123}'] ['{BCFEB11E-60CF-497E-B48C-FE90A1C734D4}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -950,6 +952,10 @@ type
procedure SetSALDOValue(const aValue: Currency); procedure SetSALDOValue(const aValue: Currency);
function GetSALDOIsNull: Boolean; function GetSALDOIsNull: Boolean;
procedure SetSALDOIsNull(const aValue: Boolean); procedure SetSALDOIsNull(const aValue: Boolean);
function GetPAGO_DEFECTOValue: SmallInt;
procedure SetPAGO_DEFECTOValue(const aValue: SmallInt);
function GetPAGO_DEFECTOIsNull: Boolean;
procedure SetPAGO_DEFECTOIsNull(const aValue: Boolean);
{ Properties } { Properties }
@ -979,6 +985,8 @@ type
property HABERIsNull: Boolean read GetHABERIsNull write SetHABERIsNull; property HABERIsNull: Boolean read GetHABERIsNull write SetHABERIsNull;
property SALDO: Currency read GetSALDOValue write SetSALDOValue; property SALDO: Currency read GetSALDOValue write SetSALDOValue;
property SALDOIsNull: Boolean read GetSALDOIsNull write SetSALDOIsNull; property SALDOIsNull: Boolean read GetSALDOIsNull write SetSALDOIsNull;
property PAGO_DEFECTO: SmallInt read GetPAGO_DEFECTOValue write SetPAGO_DEFECTOValue;
property PAGO_DEFECTOIsNull: Boolean read GetPAGO_DEFECTOIsNull write SetPAGO_DEFECTOIsNull;
end; end;
{ TSubCuentasDataTableRules } { TSubCuentasDataTableRules }
@ -1038,6 +1046,10 @@ type
procedure SetSALDOValue(const aValue: Currency); virtual; procedure SetSALDOValue(const aValue: Currency); virtual;
function GetSALDOIsNull: Boolean; virtual; function GetSALDOIsNull: Boolean; virtual;
procedure SetSALDOIsNull(const aValue: Boolean); virtual; procedure SetSALDOIsNull(const aValue: Boolean); virtual;
function GetPAGO_DEFECTOValue: SmallInt; virtual;
procedure SetPAGO_DEFECTOValue(const aValue: SmallInt); virtual;
function GetPAGO_DEFECTOIsNull: Boolean; virtual;
procedure SetPAGO_DEFECTOIsNull(const aValue: Boolean); virtual;
{ Properties } { Properties }
property ID: Integer read GetIDValue write SetIDValue; property ID: Integer read GetIDValue write SetIDValue;
@ -1066,6 +1078,8 @@ type
property HABERIsNull: Boolean read GetHABERIsNull write SetHABERIsNull; property HABERIsNull: Boolean read GetHABERIsNull write SetHABERIsNull;
property SALDO: Currency read GetSALDOValue write SetSALDOValue; property SALDO: Currency read GetSALDOValue write SetSALDOValue;
property SALDOIsNull: Boolean read GetSALDOIsNull write SetSALDOIsNull; property SALDOIsNull: Boolean read GetSALDOIsNull write SetSALDOIsNull;
property PAGO_DEFECTO: SmallInt read GetPAGO_DEFECTOValue write SetPAGO_DEFECTOValue;
property PAGO_DEFECTOIsNull: Boolean read GetPAGO_DEFECTOIsNull write SetPAGO_DEFECTOIsNull;
public public
constructor Create(aDataTable: TDADataTable); override; constructor Create(aDataTable: TDADataTable); override;
@ -1075,7 +1089,7 @@ type
{ ICuentas } { ICuentas }
ICuentas = interface(IDAStronglyTypedDataTable) ICuentas = interface(IDAStronglyTypedDataTable)
['{7F0EFEE7-C324-4072-944B-EA6AAB09E1D8}'] ['{F273CF92-1F65-47FF-A5D5-EF66B9A16A8E}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1230,7 +1244,7 @@ type
{ ICuentasEspeciales } { ICuentasEspeciales }
ICuentasEspeciales = interface(IDAStronglyTypedDataTable) ICuentasEspeciales = interface(IDAStronglyTypedDataTable)
['{0608870B-F3BF-4E54-8F6E-D79A17A0292A}'] ['{4FCC648A-C2CE-4E90-A4DB-9883611FE323}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1289,7 +1303,7 @@ type
{ IEpigrafes } { IEpigrafes }
IEpigrafes = interface(IDAStronglyTypedDataTable) IEpigrafes = interface(IDAStronglyTypedDataTable)
['{5BEFF5E7-CDB1-458C-A946-B266ADAF9D4F}'] ['{5EB087F4-484C-441A-8BF2-3428817F50C2}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1396,7 +1410,7 @@ type
{ IBalances } { IBalances }
IBalances = interface(IDAStronglyTypedDataTable) IBalances = interface(IDAStronglyTypedDataTable)
['{8A08D3CD-8465-488A-82CA-8FD407A879D4}'] ['{BD9545CB-B755-4DD4-BB82-8C875413082E}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1527,7 +1541,7 @@ type
{ IDarMaxRefSubCuentaCli } { IDarMaxRefSubCuentaCli }
IDarMaxRefSubCuentaCli = interface(IDAStronglyTypedDataTable) IDarMaxRefSubCuentaCli = interface(IDAStronglyTypedDataTable)
['{E6EBFE1B-9E59-4330-AE68-1179534FFCB6}'] ['{682F8D4B-0C25-4ACA-9AB4-6B3DCBC47697}']
{ Property getters and setters } { Property getters and setters }
function GetMAXValue: Integer; function GetMAXValue: Integer;
procedure SetMAXValue(const aValue: Integer); procedure SetMAXValue(const aValue: Integer);
@ -1562,7 +1576,7 @@ type
{ IDarNumOrdenAsiento } { IDarNumOrdenAsiento }
IDarNumOrdenAsiento = interface(IDAStronglyTypedDataTable) IDarNumOrdenAsiento = interface(IDAStronglyTypedDataTable)
['{3F826764-3157-4308-ABF7-B7986744C5DB}'] ['{5134368D-B211-4739-A816-7F19EDDBB270}']
{ Property getters and setters } { Property getters and setters }
function GetNUM_ORDENValue: Int64; function GetNUM_ORDENValue: Int64;
procedure SetNUM_ORDENValue(const aValue: Int64); procedure SetNUM_ORDENValue(const aValue: Int64);
@ -2786,6 +2800,27 @@ begin
DataTable.Fields[idx_SubCuentasSALDO].AsVariant := Null; DataTable.Fields[idx_SubCuentasSALDO].AsVariant := Null;
end; end;
function TSubCuentasDataTableRules.GetPAGO_DEFECTOValue: SmallInt;
begin
result := DataTable.Fields[idx_SubCuentasPAGO_DEFECTO].AsSmallInt;
end;
procedure TSubCuentasDataTableRules.SetPAGO_DEFECTOValue(const aValue: SmallInt);
begin
DataTable.Fields[idx_SubCuentasPAGO_DEFECTO].AsSmallInt := aValue;
end;
function TSubCuentasDataTableRules.GetPAGO_DEFECTOIsNull: boolean;
begin
result := DataTable.Fields[idx_SubCuentasPAGO_DEFECTO].IsNull;
end;
procedure TSubCuentasDataTableRules.SetPAGO_DEFECTOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_SubCuentasPAGO_DEFECTO].AsVariant := Null;
end;
{ TCuentasDataTableRules } { TCuentasDataTableRules }
constructor TCuentasDataTableRules.Create(aDataTable: TDADataTable); constructor TCuentasDataTableRules.Create(aDataTable: TDADataTable);

View File

@ -9,25 +9,25 @@ const
{ Delta rules ids { Delta rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_DarIDCuentaDelta = '{58945EDF-4ED1-4342-99B8-01D0D903616F}'; RID_DarIDCuentaDelta = '{813D0F24-BD91-4A16-ADBA-113A8C2B8D61}';
RID_DarCodigoContableTiendaDelta = '{322E6489-6BDE-488B-BE05-7FDB19C736EA}'; RID_DarCodigoContableTiendaDelta = '{58180C3F-C095-499E-B185-99F1C94E9ACF}';
RID_DarMaxRefSubCuentaProvDelta = '{6ED5AE39-4CF7-4DED-925D-0258FED22CDB}'; RID_DarMaxRefSubCuentaProvDelta = '{595CA759-45EB-4AE9-A7A0-90FDC69B0741}';
RID_ExisteSubCuentaDelta = '{108BDCF7-7E2F-4FC0-AB42-1F0AD8DAABC3}'; RID_ExisteSubCuentaDelta = '{E7DA9638-4D6E-44FD-A404-D11D5B51CEFF}';
RID_DiarioDelta = '{5C4E0A25-EB00-4230-9BB5-BC542F95FDE0}'; RID_DiarioDelta = '{04E60CCD-7B25-4DE4-9FA3-54BBE6D98D2B}';
RID_ApuntesDelta = '{19DF1F3D-4101-4A62-9EC0-2923B730CEEE}'; RID_ApuntesDelta = '{A33ED1A6-8A3A-474E-9B1B-D314798CBD69}';
RID_AsientosDelta = '{5CECCDE5-83BF-452A-9B0C-0350DD4E0B85}'; RID_AsientosDelta = '{18934ABC-DFE0-4652-B466-02E8D0BE336C}';
RID_SubCuentasDelta = '{E791546D-F5C7-4ABB-B84C-CCB5E210C1A8}'; RID_SubCuentasDelta = '{0C131B69-786E-4B4D-8FB9-A2934694E0B1}';
RID_CuentasDelta = '{23452BF5-9E60-4A25-9460-8B3214862F46}'; RID_CuentasDelta = '{7408E329-22F0-43A6-B924-C4C6851DA0BE}';
RID_CuentasEspecialesDelta = '{62F08124-2141-40B6-B5BA-894708D593D8}'; RID_CuentasEspecialesDelta = '{18C65E5F-13CD-4D65-A354-D102C4A43668}';
RID_EpigrafesDelta = '{4582AF11-7E29-4C37-A6CF-6AFCD3B5E117}'; RID_EpigrafesDelta = '{53D47862-2AFB-4DB7-9E04-D2D1A9D1AAB8}';
RID_BalancesDelta = '{51C1653A-406B-4D36-AA7D-009675E81772}'; RID_BalancesDelta = '{E800915F-88C1-43A5-9724-DA608A1EE6AA}';
RID_DarMaxRefSubCuentaCliDelta = '{1F2CE410-A9E2-4057-B438-7895EF8DEF2C}'; RID_DarMaxRefSubCuentaCliDelta = '{57648685-98AB-4732-AC91-0A5BB832A200}';
RID_DarNumOrdenAsientoDelta = '{16EEB9C7-F7B4-44A6-BE0B-C9BFB5C60E8A}'; RID_DarNumOrdenAsientoDelta = '{5B61F0CD-8126-4F9A-9675-2980676EBFF6}';
type type
{ IDarIDCuentaDelta } { IDarIDCuentaDelta }
IDarIDCuentaDelta = interface(IDarIDCuenta) IDarIDCuentaDelta = interface(IDarIDCuenta)
['{58945EDF-4ED1-4342-99B8-01D0D903616F}'] ['{813D0F24-BD91-4A16-ADBA-113A8C2B8D61}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
@ -61,7 +61,7 @@ type
{ IDarCodigoContableTiendaDelta } { IDarCodigoContableTiendaDelta }
IDarCodigoContableTiendaDelta = interface(IDarCodigoContableTienda) IDarCodigoContableTiendaDelta = interface(IDarCodigoContableTienda)
['{322E6489-6BDE-488B-BE05-7FDB19C736EA}'] ['{58180C3F-C095-499E-B185-99F1C94E9ACF}']
{ Property getters and setters } { Property getters and setters }
function GetOldCODIGO_CONTABLEValue : String; function GetOldCODIGO_CONTABLEValue : String;
@ -95,7 +95,7 @@ type
{ IDarMaxRefSubCuentaProvDelta } { IDarMaxRefSubCuentaProvDelta }
IDarMaxRefSubCuentaProvDelta = interface(IDarMaxRefSubCuentaProv) IDarMaxRefSubCuentaProvDelta = interface(IDarMaxRefSubCuentaProv)
['{6ED5AE39-4CF7-4DED-925D-0258FED22CDB}'] ['{595CA759-45EB-4AE9-A7A0-90FDC69B0741}']
{ Property getters and setters } { Property getters and setters }
function GetOldMAXValue : Integer; function GetOldMAXValue : Integer;
@ -129,7 +129,7 @@ type
{ IExisteSubCuentaDelta } { IExisteSubCuentaDelta }
IExisteSubCuentaDelta = interface(IExisteSubCuenta) IExisteSubCuentaDelta = interface(IExisteSubCuenta)
['{108BDCF7-7E2F-4FC0-AB42-1F0AD8DAABC3}'] ['{E7DA9638-4D6E-44FD-A404-D11D5B51CEFF}']
{ Property getters and setters } { Property getters and setters }
function GetOldCOUNTValue : Integer; function GetOldCOUNTValue : Integer;
@ -163,7 +163,7 @@ type
{ IDiarioDelta } { IDiarioDelta }
IDiarioDelta = interface(IDiario) IDiarioDelta = interface(IDiario)
['{5C4E0A25-EB00-4230-9BB5-BC542F95FDE0}'] ['{04E60CCD-7B25-4DE4-9FA3-54BBE6D98D2B}']
{ Property getters and setters } { Property getters and setters }
function GetOldID_APUNTEValue : Integer; function GetOldID_APUNTEValue : Integer;
function GetOldID_ASIENTOValue : Integer; function GetOldID_ASIENTOValue : Integer;
@ -401,7 +401,7 @@ type
{ IApuntesDelta } { IApuntesDelta }
IApuntesDelta = interface(IApuntes) IApuntesDelta = interface(IApuntes)
['{19DF1F3D-4101-4A62-9EC0-2923B730CEEE}'] ['{A33ED1A6-8A3A-474E-9B1B-D314798CBD69}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_ASIENTOValue : Integer; function GetOldID_ASIENTOValue : Integer;
@ -555,7 +555,7 @@ type
{ IAsientosDelta } { IAsientosDelta }
IAsientosDelta = interface(IAsientos) IAsientosDelta = interface(IAsientos)
['{5CECCDE5-83BF-452A-9B0C-0350DD4E0B85}'] ['{18934ABC-DFE0-4652-B466-02E8D0BE336C}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldFECHA_ASIENTOValue : DateTime; function GetOldFECHA_ASIENTOValue : DateTime;
@ -649,7 +649,7 @@ type
{ ISubCuentasDelta } { ISubCuentasDelta }
ISubCuentasDelta = interface(ISubCuentas) ISubCuentasDelta = interface(ISubCuentas)
['{E791546D-F5C7-4ABB-B84C-CCB5E210C1A8}'] ['{0C131B69-786E-4B4D-8FB9-A2934694E0B1}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREF_SUBCUENTAValue : String; function GetOldREF_SUBCUENTAValue : String;
@ -664,6 +664,7 @@ type
function GetOldDEBEValue : Currency; function GetOldDEBEValue : Currency;
function GetOldHABERValue : Currency; function GetOldHABERValue : Currency;
function GetOldSALDOValue : Currency; function GetOldSALDOValue : Currency;
function GetOldPAGO_DEFECTOValue : SmallInt;
{ Properties } { Properties }
property OldID : Integer read GetOldIDValue; property OldID : Integer read GetOldIDValue;
@ -679,6 +680,7 @@ type
property OldDEBE : Currency read GetOldDEBEValue; property OldDEBE : Currency read GetOldDEBEValue;
property OldHABER : Currency read GetOldHABERValue; property OldHABER : Currency read GetOldHABERValue;
property OldSALDO : Currency read GetOldSALDOValue; property OldSALDO : Currency read GetOldSALDOValue;
property OldPAGO_DEFECTO : SmallInt read GetOldPAGO_DEFECTOValue;
end; end;
{ TSubCuentasBusinessProcessorRules } { TSubCuentasBusinessProcessorRules }
@ -764,6 +766,12 @@ type
function GetOldSALDOIsNull: Boolean; virtual; function GetOldSALDOIsNull: Boolean; virtual;
procedure SetSALDOValue(const aValue: Currency); virtual; procedure SetSALDOValue(const aValue: Currency); virtual;
procedure SetSALDOIsNull(const aValue: Boolean); virtual; procedure SetSALDOIsNull(const aValue: Boolean); virtual;
function GetPAGO_DEFECTOValue: SmallInt; virtual;
function GetPAGO_DEFECTOIsNull: Boolean; virtual;
function GetOldPAGO_DEFECTOValue: SmallInt; virtual;
function GetOldPAGO_DEFECTOIsNull: Boolean; virtual;
procedure SetPAGO_DEFECTOValue(const aValue: SmallInt); virtual;
procedure SetPAGO_DEFECTOIsNull(const aValue: Boolean); virtual;
{ Properties } { Properties }
property ID : Integer read GetIDValue write SetIDValue; property ID : Integer read GetIDValue write SetIDValue;
@ -818,6 +826,10 @@ type
property SALDOIsNull : Boolean read GetSALDOIsNull write SetSALDOIsNull; property SALDOIsNull : Boolean read GetSALDOIsNull write SetSALDOIsNull;
property OldSALDO : Currency read GetOldSALDOValue; property OldSALDO : Currency read GetOldSALDOValue;
property OldSALDOIsNull : Boolean read GetOldSALDOIsNull; property OldSALDOIsNull : Boolean read GetOldSALDOIsNull;
property PAGO_DEFECTO : SmallInt read GetPAGO_DEFECTOValue write SetPAGO_DEFECTOValue;
property PAGO_DEFECTOIsNull : Boolean read GetPAGO_DEFECTOIsNull write SetPAGO_DEFECTOIsNull;
property OldPAGO_DEFECTO : SmallInt read GetOldPAGO_DEFECTOValue;
property OldPAGO_DEFECTOIsNull : Boolean read GetOldPAGO_DEFECTOIsNull;
public public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override; constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@ -827,7 +839,7 @@ type
{ ICuentasDelta } { ICuentasDelta }
ICuentasDelta = interface(ICuentas) ICuentasDelta = interface(ICuentas)
['{23452BF5-9E60-4A25-9460-8B3214862F46}'] ['{7408E329-22F0-43A6-B924-C4C6851DA0BE}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREF_CUENTAValue : String; function GetOldREF_CUENTAValue : String;
@ -981,7 +993,7 @@ type
{ ICuentasEspecialesDelta } { ICuentasEspecialesDelta }
ICuentasEspecialesDelta = interface(ICuentasEspeciales) ICuentasEspecialesDelta = interface(ICuentasEspeciales)
['{62F08124-2141-40B6-B5BA-894708D593D8}'] ['{18C65E5F-13CD-4D65-A354-D102C4A43668}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREFERENCIAValue : String; function GetOldREFERENCIAValue : String;
@ -1039,7 +1051,7 @@ type
{ IEpigrafesDelta } { IEpigrafesDelta }
IEpigrafesDelta = interface(IEpigrafes) IEpigrafesDelta = interface(IEpigrafes)
['{4582AF11-7E29-4C37-A6CF-6AFCD3B5E117}'] ['{53D47862-2AFB-4DB7-9E04-D2D1A9D1AAB8}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREF_EPIGRAFEValue : String; function GetOldREF_EPIGRAFEValue : String;
@ -1145,7 +1157,7 @@ type
{ IBalancesDelta } { IBalancesDelta }
IBalancesDelta = interface(IBalances) IBalancesDelta = interface(IBalances)
['{51C1653A-406B-4D36-AA7D-009675E81772}'] ['{E800915F-88C1-43A5-9724-DA608A1EE6AA}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREF_BALANCEValue : String; function GetOldREF_BALANCEValue : String;
@ -1275,7 +1287,7 @@ type
{ IDarMaxRefSubCuentaCliDelta } { IDarMaxRefSubCuentaCliDelta }
IDarMaxRefSubCuentaCliDelta = interface(IDarMaxRefSubCuentaCli) IDarMaxRefSubCuentaCliDelta = interface(IDarMaxRefSubCuentaCli)
['{1F2CE410-A9E2-4057-B438-7895EF8DEF2C}'] ['{57648685-98AB-4732-AC91-0A5BB832A200}']
{ Property getters and setters } { Property getters and setters }
function GetOldMAXValue : Integer; function GetOldMAXValue : Integer;
@ -1309,7 +1321,7 @@ type
{ IDarNumOrdenAsientoDelta } { IDarNumOrdenAsientoDelta }
IDarNumOrdenAsientoDelta = interface(IDarNumOrdenAsiento) IDarNumOrdenAsientoDelta = interface(IDarNumOrdenAsiento)
['{16EEB9C7-F7B4-44A6-BE0B-C9BFB5C60E8A}'] ['{5B61F0CD-8126-4F9A-9675-2980676EBFF6}']
{ Property getters and setters } { Property getters and setters }
function GetOldNUM_ORDENValue : Int64; function GetOldNUM_ORDENValue : Int64;
@ -3053,6 +3065,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_SubCuentasSALDO] := Null; BusinessProcessor.CurrentChange.NewValueByName[fld_SubCuentasSALDO] := Null;
end; end;
function TSubCuentasBusinessProcessorRules.GetPAGO_DEFECTOValue: SmallInt;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_SubCuentasPAGO_DEFECTO];
end;
function TSubCuentasBusinessProcessorRules.GetPAGO_DEFECTOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_SubCuentasPAGO_DEFECTO]);
end;
function TSubCuentasBusinessProcessorRules.GetOldPAGO_DEFECTOValue: SmallInt;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_SubCuentasPAGO_DEFECTO];
end;
function TSubCuentasBusinessProcessorRules.GetOldPAGO_DEFECTOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_SubCuentasPAGO_DEFECTO]);
end;
procedure TSubCuentasBusinessProcessorRules.SetPAGO_DEFECTOValue(const aValue: SmallInt);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_SubCuentasPAGO_DEFECTO] := aValue;
end;
procedure TSubCuentasBusinessProcessorRules.SetPAGO_DEFECTOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_SubCuentasPAGO_DEFECTO] := Null;
end;
{ TCuentasBusinessProcessorRules } { TCuentasBusinessProcessorRules }
constructor TCuentasBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); constructor TCuentasBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);

View File

@ -987,6 +987,10 @@ object srvContabilidad: TsrvContabilidad
item item
DatasetField = 'REF_EPIGRAFE_PADRE' DatasetField = 'REF_EPIGRAFE_PADRE'
TableField = 'REF_EPIGRAFE_PADRE' TableField = 'REF_EPIGRAFE_PADRE'
end
item
DatasetField = 'PAGO_DEFECTO'
TableField = 'PAGO_DEFECTO'
end> end>
end> end>
Name = 'SubCuentas' Name = 'SubCuentas'
@ -1059,6 +1063,10 @@ object srvContabilidad: TsrvContabilidad
Name = 'SALDO' Name = 'SALDO'
DataType = datCurrency DataType = datCurrency
DictionaryEntry = 'SubCuentas_SALDO' DictionaryEntry = 'SubCuentas_SALDO'
end
item
Name = 'PAGO_DEFECTO'
DataType = datSmallInt
end> end>
end end
item item
@ -1480,6 +1488,29 @@ object srvContabilidad: TsrvContabilidad
JoinDataTables = <> JoinDataTables = <>
UnionDataTables = <> UnionDataTables = <>
Commands = < Commands = <
item
Params = <
item
Name = 'id_ejercicio'
Value = ''
end
item
Name = 'id_subcuenta'
Value = ''
end>
Statements = <
item
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
SQL =
'execute procedure PROC_BANCO_PAGO_DEFECTO :id_ejercicio, :id_sub' +
'cuenta'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'SetBancoPorDefecto'
end
item item
Params = < Params = <
item item

View File

@ -47,6 +47,7 @@ type
function DarNumOrdenAsiento : Integer; function DarNumOrdenAsiento : Integer;
procedure PuntearAsiento(const ID_ASIENTO: Integer); procedure PuntearAsiento(const ID_ASIENTO: Integer);
procedure PuntearSubCuenta(const ID_SUBCUENTA: Integer); procedure PuntearSubCuenta(const ID_SUBCUENTA: Integer);
procedure SetBancoPorDefecto(const ID_EJERCICIO: Integer; const ID_SUBCUENTA: Integer);
end; end;
implementation implementation
@ -320,6 +321,32 @@ begin
end; end;
end; end;
procedure TsrvContabilidad.SetBancoPorDefecto(const ID_EJERCICIO, ID_SUBCUENTA: Integer);
var
AConn : IDAConnection;
dsCommand: IDASQLCommand;
begin
AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
try
try
dsCommand := schContabilidad.NewCommand(AConn, 'SetBancoPorDefecto');
with dsCommand do
begin
ParamByName('ID_EJERCICIO').AsInteger := ID_EJERCICIO;
ParamByName('ID_SUBCUENTA').AsInteger := ID_SUBCUENTA;
end;
dsCommand.Execute;
AConn.CommitTransaction;
except
RaiseError('Error al establecer el banco por defecto');
AConn.RollbackTransaction;
end;
finally
dsCommand := NIL;
end;
end;
function TsrvContabilidad.TieneCuentaAsociada(const ID_CONTACTO: Integer; const ID_EMPRESA: Integer): Boolean; function TsrvContabilidad.TieneCuentaAsociada(const ID_CONTACTO: Integer; const ID_EMPRESA: Integer): Boolean;
var var
AConn : IDAConnection; AConn : IDAConnection;

View File

@ -48,11 +48,11 @@
<DelphiCompile Include="Contabilidad_view.dpk"> <DelphiCompile Include="Contabilidad_view.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\..\..\Servidor\ApplicationBase.dcp" /> <DCCReference Include="..\ApplicationBase.dcp" />
<DCCReference Include="..\..\..\Servidor\Base.dcp" /> <DCCReference Include="..\Base.dcp" />
<DCCReference Include="..\..\..\Servidor\Contabilidad_controller.dcp" /> <DCCReference Include="..\Contabilidad_controller.dcp" />
<DCCReference Include="..\..\..\Servidor\Contabilidad_model.dcp" /> <DCCReference Include="..\Contabilidad_model.dcp" />
<DCCReference Include="..\..\..\Servidor\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>

View File

@ -5,7 +5,7 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
ClientHeight = 497 ClientHeight = 497
ClientWidth = 774 ClientWidth = 774
ExplicitWidth = 782 ExplicitWidth = 782
ExplicitHeight = 531 ExplicitHeight = 535
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
@ -42,7 +42,7 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
Width = 774 Width = 774
ExplicitWidth = 774 ExplicitWidth = 774
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 561 ExplicitWidth = 632
end end
inherited tbxFiltro: TTBXToolbar inherited tbxFiltro: TTBXToolbar
inherited tbxEditFiltro: TTBXEditItem inherited tbxEditFiltro: TTBXEditItem
@ -53,11 +53,11 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
ExplicitWidth = 774 ExplicitWidth = 774
end end
inherited TBXTMain2: TTBXToolbar inherited TBXTMain2: TTBXToolbar
Left = 343 Left = 287
DockPos = 343 DockPos = 287
Visible = True Visible = True
ExplicitLeft = 343 ExplicitLeft = 287
ExplicitWidth = 77 ExplicitWidth = 285
object TBXItem38: TTBXItem object TBXItem38: TTBXItem
Action = actPuntear Action = actPuntear
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText
@ -66,6 +66,13 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
end end
object TBXItem39: TTBXItem object TBXItem39: TTBXItem
Action = actCerrarCaja Action = actCerrarCaja
DisplayMode = nbdmImageAndText
end
object TBXSeparatorItem18: TTBXSeparatorItem
end
object TBXItem40: TTBXItem
Action = actSetBancoDePago
DisplayMode = nbdmImageAndText
end end
end end
end end
@ -77,9 +84,9 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
end end
inline frViewExtractoMovimientos1: TfrViewExtractoMovimientos [3] inline frViewExtractoMovimientos1: TfrViewExtractoMovimientos [3]
Left = 0 Left = 0
Top = 102 Top = 106
Width = 774 Width = 774
Height = 376 Height = 372
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -89,14 +96,14 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
ParentFont = False ParentFont = False
TabOrder = 3 TabOrder = 3
ReadOnly = False ReadOnly = False
ExplicitTop = 102 ExplicitTop = 106
ExplicitWidth = 774 ExplicitWidth = 774
ExplicitHeight = 376 ExplicitHeight = 372
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 774 Width = 774
Height = 248 Height = 244
ExplicitWidth = 774 ExplicitWidth = 774
ExplicitHeight = 248 ExplicitHeight = 244
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.Summary.DefaultGroupSummaryItems = < DataController.Summary.DefaultGroupSummaryItems = <
item item
@ -134,9 +141,12 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
inherited cxGridViewID_ASIENTO: TcxGridDBColumn inherited cxGridViewID_ASIENTO: TcxGridDBColumn
IsCaptionAssigned = True IsCaptionAssigned = True
end end
inherited cxGridViewFECHA_ASIENTO: TcxGridDBColumn
SortIndex = 1
end
inherited cxGridViewORDEN: TcxGridDBColumn inherited cxGridViewORDEN: TcxGridDBColumn
Visible = False Visible = False
SortIndex = -1 SortIndex = 0
end end
inherited cxGridViewREF_SUBCUENTA: TcxGridDBColumn inherited cxGridViewREF_SUBCUENTA: TcxGridDBColumn
Visible = False Visible = False
@ -189,6 +199,16 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
ExplicitWidth = 197 ExplicitWidth = 197
Width = 197 Width = 197
end end
inherited txtFiltroTodo2: TcxTextEdit
Left = 544
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 544
ExplicitWidth = 223
Width = 223
end
end end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 774 Width = 774
@ -201,8 +221,8 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
end end
end end
inherited pnlAgrupaciones: TTBXDockablePanel inherited pnlAgrupaciones: TTBXDockablePanel
Top = 350 Top = 346
ExplicitTop = 350 ExplicitTop = 346
ExplicitWidth = 774 ExplicitWidth = 774
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 774 Width = 774
@ -252,8 +272,14 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
end end
object actCerrarCaja: TAction object actCerrarCaja: TAction
Caption = 'Cerrar caja' Caption = 'Cerrar caja'
ImageIndex = 25
OnExecute = actCerrarCajaExecute OnExecute = actCerrarCajaExecute
end end
object actSetBancoDePago: TAction
Caption = 'Establecer banco de pago'
ImageIndex = 24
OnExecute = actSetBancoDePagoExecute
end
end end
inherited SmallImages: TPngImageList [5] inherited SmallImages: TPngImageList [5]
PngImages = < PngImages = <
@ -821,6 +847,28 @@ inherited fEditorExtractoMovimientos: TfEditorExtractoMovimientos
49454E44AE426082} 49454E44AE426082}
Name = 'PngImage24' Name = 'PngImage24'
Background = clWindow Background = clWindow
end
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
610000000970485973000017120000171201679FD252000001C64944415478DA
63FCFFFF3F03258091620340C49ADD17B19A12E2AACF884F0E64392343C0F2FF
6BB2B518825DF43014ADDD7309ABB8BE4B1AC3255E2786FFEB2318F11A005278
71CF2CE20D48DEF013AE688A271383857736C389AD531972B6FF838BCF0D60C7
EF823F7FFF317CFBF19BE1F7EFBF0C4E21050CFBD64C60E0E26465E064674571
C1CECA60868FBB3733E0744183C537069F9872862D4B3A191A4E70A1B8E04E43
29C38F3B371874966C46B8C0DF51076CF3B7EF3F19BE03E99F7FFE3284A7D430
AC9CD3C2C0CDC1CAC0C5C10E76C9FD9460867FC0D0D7FD1A8DEA05574B7586C2
DD8880CA567BCD9098D7C4307F521DC3D45BA260B18239407F333333C47ED5C0
0C036B0305B0CD5FBEFF62F8FAED17380C722A3A18A67454307073B13170B467
31FCB87E89417ECF3570D8601860A4210DD7AC787A03C3E3CE3A06C539EB182E
B2CB31C8ED98C5F06EDE640689A57B181855B5C16183614053C714B8F377C519
333C28CB60E0D0D06110296966789212C82050D8C810B6FB095C0D8A01D892EA
0D89CD0C1FD62F6360161064609690653012ACC450033100077871E1E2FF07EE
FA60B6D0CC0D0C6A0101186AC179015F6EBC921DFF9FDD2D8841D5DF1FA74500
CD58EC9D16DF11E60000000049454E44AE426082}
Name = 'PngImage25'
Background = clWindow
end> end>
Bitmap = {} Bitmap = {}
end end

View File

@ -22,6 +22,9 @@ type
actCerrarCaja: TAction; actCerrarCaja: TAction;
TBXItem39: TTBXItem; TBXItem39: TTBXItem;
TBXSeparatorItem17: TTBXSeparatorItem; TBXSeparatorItem17: TTBXSeparatorItem;
actSetBancoDePago: TAction;
TBXItem40: TTBXItem;
TBXSeparatorItem18: TTBXSeparatorItem;
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure actModificarUpdate(Sender: TObject); procedure actModificarUpdate(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject); procedure actEliminarUpdate(Sender: TObject);
@ -29,6 +32,7 @@ type
procedure actPuntearUpdate(Sender: TObject); procedure actPuntearUpdate(Sender: TObject);
procedure actNuevoUpdate(Sender: TObject); procedure actNuevoUpdate(Sender: TObject);
procedure actCerrarCajaExecute(Sender: TObject); procedure actCerrarCajaExecute(Sender: TObject);
procedure actSetBancoDePagoExecute(Sender: TObject);
private private
FDiario: IBizDiario; FDiario: IBizDiario;
@ -59,7 +63,7 @@ type
implementation implementation
uses uses
uFactuGES_App, uBizEjercicios, uBizApuntes; uFactuGES_App, uBizEjercicios, uBizApuntes, uSubCuentasController;
{$R *.dfm} {$R *.dfm}
@ -76,6 +80,19 @@ begin
if not Assigned(Diario) then if not Assigned(Diario) then
raise Exception.Create('No hay ningún Diario asignado'); raise Exception.Create('No hay ningún Diario asignado');
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_GERENCIA) then
begin
actSetBancoDePago.Enabled := True;
actSetBancoDePago.Visible := True;
end
else
begin
actSetBancoDePago.Enabled := False;
actSetBancoDePago.Visible := False;
end;
//Para que coja el ancho automático //Para que coja el ancho automático
actAnchoAuto.Execute; actAnchoAuto.Execute;
end; end;
@ -177,6 +194,22 @@ begin
(Sender as TAction).Enabled := (AppFactuGES.EjercicioActivo.ESTADO = CTE_ABIERTO); (Sender as TAction).Enabled := (AppFactuGES.EjercicioActivo.ESTADO = CTE_ABIERTO);
end; end;
procedure TfEditorExtractoMovimientos.actSetBancoDePagoExecute(Sender: TObject);
begin
inherited;
if (frViewExtractoMovimientos1.SubCuentas.Locate('ID', frViewExtractoMovimientos1.cxGrid.ActiveLevel.Tag,[])) then
begin
if (frViewExtractoMovimientos1.SubCuentas.REF_CUENTA = inttostr(CTE_CUENTASCAJA)) then
showmessage('No es posible poner una caja como cuenta de pago para transferencias por defecto')
else
begin
FController.SetBancoPorDefecto(frViewExtractoMovimientos1.SubCuentas.ID_EJERCICIO, frViewExtractoMovimientos1.SubCuentas.ID);
frViewExtractoMovimientos1.RefrescarSubcuentas(frViewExtractoMovimientos1.SubCuentas.ID);
end;
end;
end;
procedure TfEditorExtractoMovimientos.actCerrarCajaExecute(Sender: TObject); procedure TfEditorExtractoMovimientos.actCerrarCajaExecute(Sender: TObject);
begin begin
inherited; inherited;

View File

@ -2,8 +2,6 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
Left = 489 Left = 489
Top = 325 Top = 325
Caption = 'Lista de epigrafes' Caption = 'Lista de epigrafes'
ExplicitWidth = 320
ExplicitHeight = 240
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
@ -67,8 +65,11 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
end end
end end
inherited TBXDock: TTBXDock inherited TBXDock: TTBXDock
inherited tbxMain: TTBXToolbar
ExplicitWidth = 451
end
inherited tbxFiltro: TTBXToolbar inherited tbxFiltro: TTBXToolbar
ExplicitWidth = 269 ExplicitWidth = 201
inherited tbxEditFiltro: TTBXEditItem inherited tbxEditFiltro: TTBXEditItem
EditOptions = [tboUseEditWhenVertical] EditOptions = [tboUseEditWhenVertical]
end end
@ -84,9 +85,9 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
end end
inline frViewSubCuentas1: TfrViewSubCuentas [3] inline frViewSubCuentas1: TfrViewSubCuentas [3]
Left = 0 Left = 0
Top = 102 Top = 106
Width = 543 Width = 543
Height = 323 Height = 319
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -96,14 +97,14 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
ParentFont = False ParentFont = False
TabOrder = 3 TabOrder = 3
ReadOnly = False ReadOnly = False
ExplicitTop = 102 ExplicitTop = 106
ExplicitWidth = 543 ExplicitWidth = 543
ExplicitHeight = 323 ExplicitHeight = 319
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 543 Width = 543
Height = 195 Height = 191
ExplicitWidth = 543 ExplicitWidth = 543
ExplicitHeight = 195 ExplicitHeight = 191
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = < DataController.Summary.FooterSummaryItems = <
item item
@ -150,6 +151,16 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
ExplicitWidth = 121 ExplicitWidth = 121
Width = 121 Width = 121
end end
inherited txtFiltroTodo2: TcxTextEdit
Left = 323
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 323
ExplicitWidth = 250
Width = 250
end
end end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543 Width = 543
@ -162,8 +173,8 @@ inherited fEditorSubCuentas: TfEditorSubCuentas
end end
end end
inherited pnlAgrupaciones: TTBXDockablePanel inherited pnlAgrupaciones: TTBXDockablePanel
Top = 297 Top = 293
ExplicitTop = 297 ExplicitTop = 293
ExplicitWidth = 543 ExplicitWidth = 543
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 543 Width = 543

View File

@ -120,6 +120,11 @@ inherited frViewExtractoMovimientos: TfrViewExtractoMovimientos
object cxGridViewSaldo: TcxGridDBColumn object cxGridViewSaldo: TcxGridDBColumn
Caption = 'Saldo' Caption = 'Saldo'
DataBinding.FieldName = 'SALDO' DataBinding.FieldName = 'SALDO'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
FooterAlignmentHorz = taRightJustify
GroupSummaryAlignment = taRightJustify
HeaderAlignmentHorz = taRightJustify
end end
end end
end end
@ -152,11 +157,18 @@ inherited frViewExtractoMovimientos: TfrViewExtractoMovimientos
ExplicitWidth = 198 ExplicitWidth = 198
Width = 198 Width = 198
end end
inherited txtFiltroTodo2: TcxTextEdit
Left = 329
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 329
ExplicitWidth = 250
Width = 250
end end
end end
end end
inherited pnlAgrupaciones: TTBXDockablePanel
ExplicitWidth = 554
end end
inherited dxComponentPrinter: TdxComponentPrinter inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink inherited dxComponentPrinterLink: TdxGridReportLink

View File

@ -81,6 +81,7 @@ type
public public
procedure AnadirOtrosFiltros; override; procedure AnadirOtrosFiltros; override;
procedure RefrescarSubcuentas(ID: Integer);
property OnExtractoChange: TNotifyEvent read GetExtractoChange write SetExtractoChange; property OnExtractoChange: TNotifyEvent read GetExtractoChange write SetExtractoChange;
property Diario: IBizDiario read GetDiario write SetDiario; property Diario: IBizDiario read GetDiario write SetDiario;
property SubCuentas: IBizSubCuenta read GetSubCuentas write SetSubCuentas; property SubCuentas: IBizSubCuenta read GetSubCuentas write SetSubCuentas;
@ -118,6 +119,26 @@ begin
Result := FSubCuentas; Result := FSubCuentas;
end; end;
procedure TfrViewExtractoMovimientos.RefrescarSubcuentas(ID: Integer);
var
i: integer;
NumberOfLevels: integer;
begin
cxGridView.BeginUpdate;
NumberOfLevels := cxGrid.Levels.Count - 1;
for i := NumberOfLevels downto 0 do
begin
if (FSubCuentas.DataTable.Locate('ID', cxGrid.Levels.Items[i].Tag,[])) then
begin
cxGrid.Levels.Items[i].Caption := FSubCuentas.DESCRIPCION;
if (FSubCuentas.ID = ID) then
cxGrid.Levels.Items[i].Caption := cxGrid.Levels.Items[i].Caption + ' - (****Pago clientes****)';
end;
end;
cxGridView.EndUpdate;
end;
procedure TfrViewExtractoMovimientos.SetController(const Value: IAsientosController); procedure TfrViewExtractoMovimientos.SetController(const Value: IAsientosController);
begin begin
FController := Value; FController := Value;
@ -153,7 +174,15 @@ begin
begin begin
if not FSubCuentas.DataTable.Active then if not FSubCuentas.DataTable.Active then
FSubCuentas.DataTable.Active := True; FSubCuentas.DataTable.Active := True;
{
cxGridView.BeginUpdate;
NumberOfLevels := cxGrid.Levels.Count - 1;
for i := NumberOfLevels downto 0 do
begin
cxGrid.Levels.Items[i].free;
end;
cxGridView.EndUpdate;
}
if FSubCuentas.RecordCount > 0 then if FSubCuentas.RecordCount > 0 then
begin begin
with FSubCuentas.DataTable do with FSubCuentas.DataTable do
@ -169,6 +198,9 @@ begin
else Nivel := cxGrid.Levels.Add; else Nivel := cxGrid.Levels.Add;
Nivel.Caption := FSubCuentas.DESCRIPCION; Nivel.Caption := FSubCuentas.DESCRIPCION;
if (FSubCuentas.PAGO_DEFECTO = 1) then
Nivel.Caption := Nivel.Caption + ' - (****Pago clientes****)';
Nivel.Tag := FSubCuentas.ID; Nivel.Tag := FSubCuentas.ID;
Next; Next;
auxb := False; auxb := False;
@ -178,6 +210,7 @@ begin
end end
else cxGrid.RootLevelOptions.DetailTabsPosition := dtpNone; else cxGrid.RootLevelOptions.DetailTabsPosition := dtpNone;
// FAsientos.Intervalo := frListaIntervalos.Intervalo; // FAsientos.Intervalo := frListaIntervalos.Intervalo;
end; end;
end; end;

View File

@ -82,6 +82,12 @@ inherited frViewSubCuentas: TfrViewSubCuentas
ExplicitWidth = 121 ExplicitWidth = 121
Width = 121 Width = 121
end end
inherited txtFiltroTodo2: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
end end
end end
end end

View File

@ -14,7 +14,7 @@ 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; cxImageComboBox, cxTextEdit, cxCurrencyEdit, uCustomView, uViewBase;
type type
IViewSubCuentas = interface(IViewGrid) IViewSubCuentas = interface(IViewGrid)

View File

@ -357,7 +357,8 @@ begin
///////////////////7 ///////////////////7
/// El contrato no tiene precio punto en el documento porque se genera a partir de varios presupuestos y pueden tener precio punto diferente /// 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; /// SE cambia a peticion, estableciendo siempre el recalculo en base al precio punto de la ficha del cliente
AContrato.PRECIO_PUNTO := APrecioPuntoNuevoContrato;
DetallesController.RecalcularPrecioPuntoDetalles(APrecioPuntoNuevoContrato, AContrato.Detalles); DetallesController.RecalcularPrecioPuntoDetalles(APrecioPuntoNuevoContrato, AContrato.Detalles);
if not bEnEdicion then if not bEnEdicion then
@ -568,6 +569,8 @@ begin
end; end;
// Guardo el conrato que acabo de generar o editar // Guardo el conrato que acabo de generar o editar
// Antes recalculo los detalles con el precio punto adquirido de la ficha del cliente
Self.DetallesController.RecalcularPrecioPuntoDetalles(AContratoActual.PRECIO_PUNTO, AContratoActual.Detalles);
AContratoActual.CalcularImporteTotal; AContratoActual.CalcularImporteTotal;
Self.Guardar(AContratoActual); Self.Guardar(AContratoActual);
// Asocio el contrato con el presupuesto // Asocio el contrato con el presupuesto
@ -835,6 +838,7 @@ begin
// ID_FACTURAIsNull := True; // ID_FACTURAIsNull := True;
REFERENCIA := ''; REFERENCIA := '';
SITUACION := SITUACION_CONTRATO_PENDIENTE; SITUACION := SITUACION_CONTRATO_PENDIENTE;
//EL PRECIO PUNTO SIEMPRE SERA ESTABLECIDO POR LA FICHA DEL CLIENTE
// PRECIO_PUNTO := AppFactuGES.EmpresaActiva.PRECIO_PUNTO; // PRECIO_PUNTO := AppFactuGES.EmpresaActiva.PRECIO_PUNTO;
end; end;
Result.Post; Result.Post;
@ -1512,6 +1516,7 @@ begin
AContratoFabrica.ID_FORMA_PAGO := AContratoFabrica.Cliente.ID_FORMA_PAGO; AContratoFabrica.ID_FORMA_PAGO := AContratoFabrica.Cliente.ID_FORMA_PAGO;
AContratoFabrica.ID_TIPO_IVA := AContratoFabrica.Cliente.ID_TIPO_IVA; AContratoFabrica.ID_TIPO_IVA := AContratoFabrica.Cliente.ID_TIPO_IVA;
AContratoFabrica.PRECIO_PUNTO := AContratoFabrica.Cliente.PRECIO_PUNTO;
DetallesController.PrecioPunto := AContratoFabrica.Cliente.PRECIO_PUNTO; DetallesController.PrecioPunto := AContratoFabrica.Cliente.PRECIO_PUNTO;
DetallesController.ActualizarDetalles(AContratoFabrica.Detalles, AContratoFabrica.Cliente); DetallesController.ActualizarDetalles(AContratoFabrica.Detalles, AContratoFabrica.Cliente);

View File

@ -267,10 +267,7 @@ begin
OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_CONTRATOS, AppFactuGES.EmpresaActiva.ID)); OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_CONTRATOS, AppFactuGES.EmpresaActiva.ID));
ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA; ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA;
PRECIO_PUNTO := AppFactuGES.EmpresaActiva.PRECIO_PUNTO;
// 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 := AppFactuGES.EmpresaActiva.PRECIO_PUNTO;
FECHA_CONTRATO := DateOf(Date); FECHA_CONTRATO := DateOf(Date);
ID_DIRECCION_ENVIO := 0; ID_DIRECCION_ENVIO := 0;
@ -390,9 +387,7 @@ begin
// Se establece un descuento especial general a petición de angelica // Se establece un descuento especial general a petición de angelica
DESCUENTO := FCliente.DESCUENTO; DESCUENTO := FCliente.DESCUENTO;
// Se establece precio de punto por cliente a petición de Ruben // 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, PRECIO_PUNTO := FCliente.PRECIO_PUNTO;
// a no ser que quieran establecer una politica de gestion.
// PRECIO_PUNTO := FCliente.PRECIO_PUNTO;
end; end;
DataTable.Post; //Muy importante ya que es necesario hacer un post de la cabecera antes de añadir detalles DataTable.Post; //Muy importante ya que es necesario hacer un post de la cabecera antes de añadir detalles

View File

@ -3,19 +3,19 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
Top = 147 Top = 147
Caption = 'Nuevo contrato de cliente' Caption = 'Nuevo contrato de cliente'
ClientHeight = 649 ClientHeight = 649
ClientWidth = 1104 ClientWidth = 1334
OnClose = CustomEditorClose OnClose = CustomEditorClose
ExplicitWidth = 1112 ExplicitWidth = 1342
ExplicitHeight = 687 ExplicitHeight = 687
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 1104 Width = 1334
Caption = 'Nuevo contrato de cliente' Caption = 'Nuevo contrato de cliente'
ExplicitTop = 52 ExplicitTop = 52
ExplicitWidth = 1104 ExplicitWidth = 1104
inherited Image1: TImage inherited Image1: TImage
Left = 1077 Left = 1307
Picture.Data = { Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
0000180806000000E0773DF80000000970485973000017120000171201679FD2 0000180806000000E0773DF80000000970485973000017120000171201679FD2
@ -127,7 +127,7 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
end end
end end
inherited TBXDock: TTBXDock inherited TBXDock: TTBXDock
Width = 1104 Width = 1334
ExplicitWidth = 1104 ExplicitWidth = 1104
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 551 ExplicitWidth = 551
@ -148,7 +148,7 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
end end
end end
inherited tbxMenu: TTBXToolbar inherited tbxMenu: TTBXToolbar
ExplicitWidth = 1104 ExplicitWidth = 1334
object TBXSubmenuItem2: TTBXSubmenuItem [4] object TBXSubmenuItem2: TTBXSubmenuItem [4]
Caption = 'A&cciones' Caption = 'A&cciones'
object TBXItem34: TTBXItem object TBXItem34: TTBXItem
@ -164,7 +164,7 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
end end
inherited StatusBar: TJvStatusBar inherited StatusBar: TJvStatusBar
Top = 630 Top = 630
Width = 1104 Width = 1334
Panels = < Panels = <
item item
Width = 200 Width = 200
@ -173,8 +173,9 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
ExplicitWidth = 1104 ExplicitWidth = 1104
end end
inherited pgPaginas: TPageControl inherited pgPaginas: TPageControl
Width = 1098 Width = 1328
Height = 321 Height = 321
ActivePage = pagContenido
TabOrder = 1 TabOrder = 1
OnChanging = pgPaginasChanging OnChanging = pgPaginasChanging
ExplicitTop = 112 ExplicitTop = 112
@ -189,10 +190,11 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
object pagContenido: TTabSheet object pagContenido: TTabSheet
Caption = 'Contenido' Caption = 'Contenido'
ImageIndex = 1 ImageIndex = 1
ExplicitWidth = 1090
inline frViewDetallesContratoCliente1: TfrViewDetallesContratoCliente inline frViewDetallesContratoCliente1: TfrViewDetallesContratoCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1090 Width = 1320
Height = 293 Height = 293
Align = alClient Align = alClient
BiDiMode = bdLeftToRight BiDiMode = bdLeftToRight
@ -208,7 +210,7 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
ExplicitWidth = 1090 ExplicitWidth = 1090
ExplicitHeight = 293 ExplicitHeight = 293
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 1090 Width = 1320
Height = 24 Height = 24
ExplicitWidth = 1090 ExplicitWidth = 1090
ExplicitHeight = 24 ExplicitHeight = 24
@ -292,9 +294,8 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Top = 50 Top = 50
Width = 1090 Width = 1320
Height = 243 Height = 243
ExplicitTop = 50
ExplicitWidth = 1090 ExplicitWidth = 1090
ExplicitHeight = 243 ExplicitHeight = 243
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
@ -305,23 +306,30 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Top = 24 Top = 24
Width = 1090 Width = 1320
ExplicitTop = 24 ExplicitTop = 24
ExplicitWidth = 1090 ExplicitWidth = 1090
inherited TBXToolbar1: TTBXToolbar inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 753 Left = 2
inherited TBXLabelItem1: TTBXLabelItem AutoResize = False
Visible = False DockPos = 2
end ExplicitLeft = 2
ExplicitWidth = 831
end end
inherited edtPrecioPunto: TcxDBCurrencyEdit inherited edtPrecioPunto: TcxDBCurrencyEdit
Left = 838
Top = 3
DataBinding.DataSource = dsDataTable DataBinding.DataSource = dsDataTable
Enabled = False
Style.IsFontAssigned = True Style.IsFontAssigned = True
Visible = False ExplicitLeft = 838
ExplicitTop = 3
end end
inherited bRecalcularPrecioPunto: TButton inherited bRecalcularPrecioPunto: TButton
Left = 924
Top = 3
Action = actRecalcularPrecioPunto Action = actRecalcularPrecioPunto
ExplicitLeft = 924
ExplicitTop = 3
end end
end end
inherited cxLookupComboBox1: TcxLookupComboBox inherited cxLookupComboBox1: TcxLookupComboBox
@ -338,10 +346,11 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
object pagInicidencias: TTabSheet object pagInicidencias: TTabSheet
Caption = 'Incidencias' Caption = 'Incidencias'
ImageIndex = 2 ImageIndex = 2
ExplicitWidth = 1090
inline frViewIncidenciasCli: TfrViewIncidencias inline frViewIncidenciasCli: TfrViewIncidencias
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1090 Width = 1320
Height = 293 Height = 293
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -355,14 +364,14 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
ExplicitWidth = 1090 ExplicitWidth = 1090
ExplicitHeight = 293 ExplicitHeight = 293
inherited pnlSup: TPanel inherited pnlSup: TPanel
Width = 1090 Width = 1320
ExplicitWidth = 1090 ExplicitWidth = 1090
inherited eIncidenciaActiva: TcxDBCheckBox inherited eIncidenciaActiva: TcxDBCheckBox
ExplicitHeight = 21 ExplicitHeight = 21
end end
end end
inherited GroupBox1: TGroupBox inherited GroupBox1: TGroupBox
Width = 1090 Width = 1320
Height = 265 Height = 265
ExplicitWidth = 1090 ExplicitWidth = 1090
ExplicitHeight = 265 ExplicitHeight = 265
@ -370,7 +379,7 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
ExplicitWidth = 1086 ExplicitWidth = 1086
ExplicitHeight = 248 ExplicitHeight = 248
Height = 248 Height = 248
Width = 1086 Width = 1316
end end
end end
end end
@ -378,10 +387,11 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
object pagDocumentos: TTabSheet object pagDocumentos: TTabSheet
Caption = 'Documentos' Caption = 'Documentos'
ImageIndex = 5 ImageIndex = 5
ExplicitWidth = 1090
inline frViewDocumentosContratoCliente1: TfrViewDocumentosContratoCliente inline frViewDocumentosContratoCliente1: TfrViewDocumentosContratoCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1090 Width = 1320
Height = 293 Height = 293
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -395,11 +405,11 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
ExplicitWidth = 1090 ExplicitWidth = 1090
ExplicitHeight = 293 ExplicitHeight = 293
inherited TBXDock: TTBXDock inherited TBXDock: TTBXDock
Width = 1090 Width = 1320
ExplicitWidth = 1090 ExplicitWidth = 1090
end end
inherited ListView1: TListView inherited ListView1: TListView
Width = 1090 Width = 1320
Height = 267 Height = 267
ExplicitTop = 26 ExplicitTop = 26
ExplicitWidth = 1090 ExplicitWidth = 1090
@ -413,18 +423,18 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
end end
end end
inherited PnlComentario: TPanel inherited PnlComentario: TPanel
Width = 1104 Width = 1334
ExplicitTop = 79 ExplicitTop = 79
ExplicitWidth = 1104 ExplicitWidth = 1104
inherited lbComentario: TLabel inherited lbComentario: TLabel
Width = 1094 Width = 1324
Height = 25 Height = 25
end end
end end
inline frViewTotales1: TfrViewTotales [5] inline frViewTotales1: TfrViewTotales [5]
Left = 0 Left = 0
Top = 436 Top = 436
Width = 1104 Width = 1334
Height = 194 Height = 194
Align = alBottom Align = alBottom
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -439,18 +449,18 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
ExplicitWidth = 1104 ExplicitWidth = 1104
ExplicitHeight = 194 ExplicitHeight = 194
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 1104 Width = 1334
ExplicitWidth = 1104 ExplicitWidth = 1104
inherited Bevel3: TBevel inherited Bevel3: TBevel
Left = 515 Left = 619
Height = 122 Height = 122
ExplicitLeft = 515 ExplicitLeft = 619
ExplicitHeight = 122 ExplicitHeight = 122
end end
inherited Bevel4: TBevel inherited Bevel4: TBevel
Left = 627 Left = 731
Width = 210 Width = 210
ExplicitLeft = 627 ExplicitLeft = 731
ExplicitWidth = 210 ExplicitWidth = 210
end end
inherited Bevel2: TBevel inherited Bevel2: TBevel
@ -458,9 +468,9 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
ExplicitWidth = 333 ExplicitWidth = 333
end end
inherited Bevel1: TBevel inherited Bevel1: TBevel
Left = 534 Left = 638
Width = 332 Width = 332
ExplicitLeft = 534 ExplicitLeft = 638
ExplicitWidth = 332 ExplicitWidth = 332
end end
inherited ImporteDto: TcxDBCurrencyEdit inherited ImporteDto: TcxDBCurrencyEdit
@ -469,16 +479,16 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
Width = 93 Width = 93
end end
inherited ImporteIVA: TcxDBCurrencyEdit inherited ImporteIVA: TcxDBCurrencyEdit
Left = 698 Left = 802
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 698 ExplicitLeft = 802
ExplicitWidth = 137 ExplicitWidth = 137
Width = 137 Width = 137
end end
inherited ImporteTotal: TcxDBCurrencyEdit inherited ImporteTotal: TcxDBCurrencyEdit
Left = 628 Left = 732
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 628 ExplicitLeft = 732
ExplicitWidth = 137 ExplicitWidth = 137
Width = 137 Width = 137
end end
@ -486,38 +496,38 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
Style.IsFontAssigned = True Style.IsFontAssigned = True
end end
inherited edtIVA: TcxDBSpinEdit inherited edtIVA: TcxDBSpinEdit
Left = 627 Left = 731
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 627 ExplicitLeft = 731
end end
inherited ImporteBase: TcxDBCurrencyEdit inherited ImporteBase: TcxDBCurrencyEdit
Left = 627 Left = 731
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 627 ExplicitLeft = 731
ExplicitWidth = 92 ExplicitWidth = 92
Width = 92 Width = 92
end end
inherited edtRE: TcxDBSpinEdit inherited edtRE: TcxDBSpinEdit
Left = 627 Left = 731
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 627 ExplicitLeft = 731
end end
inherited edtIRPF: TcxDBSpinEdit inherited edtIRPF: TcxDBSpinEdit
Left = 627 Left = 731
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 627 ExplicitLeft = 731
end end
inherited ImporteRE: TcxDBCurrencyEdit inherited ImporteRE: TcxDBCurrencyEdit
Left = 698 Left = 802
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 698 ExplicitLeft = 802
ExplicitWidth = 56 ExplicitWidth = 56
Width = 56 Width = 56
end end
inherited ImporteIRPF: TcxDBCurrencyEdit inherited ImporteIRPF: TcxDBCurrencyEdit
Left = 698 Left = 802
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 698 ExplicitLeft = 802
ExplicitWidth = 56 ExplicitWidth = 56
Width = 56 Width = 56
end end
@ -538,23 +548,23 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
Width = 81 Width = 81
end end
inherited bTiposIVA: TButton inherited bTiposIVA: TButton
Left = 367 Left = 471
OnClick = frViewTotales1bTiposIVAClick OnClick = frViewTotales1bTiposIVAClick
ExplicitLeft = 367 ExplicitLeft = 471
end end
inherited cbRecargoEquivalencia: TcxDBCheckBox inherited cbRecargoEquivalencia: TcxDBCheckBox
ExplicitWidth = 219 ExplicitWidth = 219
Width = 219 Width = 219
end end
inherited edtRetencion: TcxDBSpinEdit inherited edtRetencion: TcxDBSpinEdit
Left = 627 Left = 731
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 627 ExplicitLeft = 731
end end
inherited edtImporteRetencion: TcxDBCurrencyEdit inherited edtImporteRetencion: TcxDBCurrencyEdit
Left = 698 Left = 802
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 698 ExplicitLeft = 802
ExplicitWidth = 342 ExplicitWidth = 342
Width = 342 Width = 342
end end
@ -1939,8 +1949,6 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
object actRecalcularPrecioPunto: TAction object actRecalcularPrecioPunto: TAction
Category = 'Acciones' Category = 'Acciones'
Caption = 'Recalcular precio punto' Caption = 'Recalcular precio punto'
Enabled = False
Visible = False
OnExecute = actRecalcularPrecioPuntoExecute OnExecute = actRecalcularPrecioPuntoExecute
end end
end end

View File

@ -53,7 +53,11 @@ type
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure OnRecargoEquivalenciaPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; procedure OnRecargoEquivalenciaPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean); var Error: Boolean);
procedure actRecalcularPrecioPuntoExecute(Sender: TObject); //Importante en este punto se deben de quitar los eventos que puedan afectar a la tabla una vez se cierre el editor. procedure actRecalcularPrecioPuntoExecute(Sender: TObject);
procedure OnPrecioPuntoPropertiesEditValueChanged(Sender: TObject);
procedure onPrecioPuntoPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean);
private private
//procedure RecalcularPortePorUnidad; //procedure RecalcularPortePorUnidad;
@ -79,6 +83,7 @@ type
procedure ImprimirInterno; override; procedure ImprimirInterno; override;
procedure GuardarInterno; override; procedure GuardarInterno; override;
procedure EliminarInterno; override; procedure EliminarInterno; override;
procedure RefrescarInterno; override;
property ViewContrato: IViewContratoCliente read GetViewContrato write SetViewContrato; property ViewContrato: IViewContratoCliente read GetViewContrato write SetViewContrato;
@ -181,6 +186,11 @@ end;
procedure TfEditorContratoCliente.CustomEditorClose(Sender: TObject; procedure TfEditorContratoCliente.CustomEditorClose(Sender: TObject;
var Action: TCloseAction); var Action: TCloseAction);
begin begin
//PRECIO_PUNTO EVENTOS
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnValidate := Nil;
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnEditValueChanged := Nil;
inherited; inherited;
//GESTION_DOCUMENTOS //GESTION_DOCUMENTOS
//Este método eliminará el directorio temporal si se ha creado //Este método eliminará el directorio temporal si se ha creado
@ -200,6 +210,10 @@ end;
procedure TfEditorContratoCliente.EliminarInterno; procedure TfEditorContratoCliente.EliminarInterno;
begin begin
//PRECIO_PUNTO EVENTOS
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnValidate := Nil;
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnEditValueChanged := Nil;
if (ShowConfirmMessage('¿Desea borrar este Contrato de cliente?', '') = IDYES) then if (ShowConfirmMessage('¿Desea borrar este Contrato de cliente?', '') = IDYES) then
begin begin
FController.Eliminar(FContrato); FController.Eliminar(FContrato);
@ -219,6 +233,10 @@ begin
frViewTotales1.cbRecargoEquivalencia.Properties.OnValidate := OnRecargoEquivalenciaPropertiesValidate; frViewTotales1.cbRecargoEquivalencia.Properties.OnValidate := OnRecargoEquivalenciaPropertiesValidate;
//PRECIO_PUNTO EVENTOS
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnValidate := onPrecioPuntoPropertiesValidate;
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnEditValueChanged := OnPrecioPuntoPropertiesEditValueChanged;
pgPaginas.ActivePage := pagGeneral; pgPaginas.ActivePage := pagGeneral;
Contrato.DataTable.Active := True; Contrato.DataTable.Active := True;
end; end;
@ -284,6 +302,10 @@ procedure TfEditorContratoCliente.GuardarInterno;
var var
bEsNuevo : Boolean; bEsNuevo : Boolean;
begin begin
//PRECIO_PUNTO EVENTOS
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnValidate := Nil;
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnEditValueChanged := Nil;
inherited; inherited;
ShowHourglassCursor; ShowHourglassCursor;
@ -304,6 +326,10 @@ begin
ShowInfoMessage('El Contrato se ha dado de alta con el código ' + FContrato.REFERENCIA); ShowInfoMessage('El Contrato se ha dado de alta con el código ' + FContrato.REFERENCIA);
Modified := False; Modified := False;
//PRECIO_PUNTO EVENTOS
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnValidate := onPrecioPuntoPropertiesValidate;
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnEditValueChanged := OnPrecioPuntoPropertiesEditValueChanged;
end; end;
procedure TfEditorContratoCliente.ImprimirInterno; procedure TfEditorContratoCliente.ImprimirInterno;
@ -343,7 +369,7 @@ begin
FController.ActualizarFormaDePago(FContrato, FContrato.Cliente.ID_FORMA_PAGO); FController.ActualizarFormaDePago(FContrato, FContrato.Cliente.ID_FORMA_PAGO);
if (not APrimerCliente) and (FContrato.Detalles.RecordCount > 0) then begin if (not APrimerCliente) and (FContrato.Detalles.RecordCount > 0) then begin
if (ShowConfirmMessage('Actualizar precio punto del presupuesto y descuentos', if (ShowConfirmMessage('Actualizar precio punto del contrato y descuentos',
'¿Desea actualizar el precio punto y los descuentos con los de la ficha del nuevo cliente seleccionado?' + #10#13 + '¿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 'Sólo se cambiarán las líneas que tengan cantidades.') = IDYES) then
begin begin
@ -358,6 +384,23 @@ begin
end; end;
end; end;
procedure TfEditorContratoCliente.OnPrecioPuntoPropertiesEditValueChanged(
Sender: TObject);
begin
if not FContrato.EsNuevo then
actRecalcularPrecioPunto.Execute;
end;
procedure TfEditorContratoCliente.onPrecioPuntoPropertiesValidate(
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean);
begin
inherited;
if (ShowConfirmMessage('Va ha cambiar el precio punto, 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?') = IDNO) then
DisplayValue := frViewDetallesContratoCliente1.edtPrecioPunto.Value;
end;
procedure TfEditorContratoCliente.OnRecargoEquivalenciaPropertiesValidate( procedure TfEditorContratoCliente.OnRecargoEquivalenciaPropertiesValidate(
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean); var Error: Boolean);
@ -460,6 +503,19 @@ begin
Result := inherited PuedoImprimir and (not Contrato.Cliente.IDIsNull); Result := inherited PuedoImprimir and (not Contrato.Cliente.IDIsNull);
end; end;
procedure TfEditorContratoCliente.RefrescarInterno;
begin
//PRECIO_PUNTO EVENTOS
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnValidate := Nil;
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnEditValueChanged := Nil;
inherited;
//PRECIO_PUNTO EVENTOS
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnValidate := onPrecioPuntoPropertiesValidate;
frViewDetallesContratoCliente1.edtPrecioPunto.Properties.OnEditValueChanged := OnPrecioPuntoPropertiesEditValueChanged;
end;
procedure TfEditorContratoCliente.SetContrato(const Value: IBizContratoCliente); procedure TfEditorContratoCliente.SetContrato(const Value: IBizContratoCliente);
begin begin
FContrato := Value; FContrato := Value;
@ -482,7 +538,7 @@ begin
FViewContrato.Contrato := FContrato; FViewContrato.Contrato := FContrato;
frViewDetallesContratoCliente1.Detalles := FContrato.Detalles; frViewDetallesContratoCliente1.Detalles := FContrato.Detalles;
frViewDetallesContratoCliente1.Contrato := FContrato; //Para poder sacar los descuento del articulos segun el cliente seleccionado frViewDetallesContratoCliente1.Contrato := FContrato; //Para poder sacar los descuento del articulos segun el cliente seleccionado
Controller.DetallesController.PrecioPunto := FContrato.Cliente.PRECIO_PUNTO; Controller.DetallesController.PrecioPunto := FContrato.PRECIO_PUNTO;
//GESTION_DOCUMENTOS //GESTION_DOCUMENTOS
frViewDocumentosContratoCliente1.Contrato := FContrato; frViewDocumentosContratoCliente1.Contrato := FContrato;

View File

@ -630,7 +630,7 @@ begin
end end
end end
else begin else begin
if (Application.MessageBox('¿Desea borrar el presupuesto seleccionado?', 'Atención', MB_YESNO) = IDYES) then if (Application.MessageBox('¿Desea borrar el contrato seleccionado?', 'Atención', MB_YESNO) = IDYES) then
AContratos := Contratos; AContratos := Contratos;
end; end;

View File

@ -1,5 +1,89 @@
inherited frViewDetallesContratoCliente: TfrViewDetallesContratoCliente inherited frViewDetallesContratoCliente: TfrViewDetallesContratoCliente
Width = 1045
Height = 532
inherited ToolBar1: TToolBar
Width = 1045
Height = 24
inherited ToolButton4: TToolButton
Wrap = False
end
inherited ToolButton14: TToolButton
Left = 334
Top = 0
ExplicitLeft = 334
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
Left = 368
Top = 0
ExplicitLeft = 368
ExplicitTop = 0
end
inherited FontSize: TEdit
Left = 513
Top = 0
ExplicitLeft = 513
ExplicitTop = 0
end
inherited UpDown1: TUpDown
Left = 555
Top = 0
ExplicitLeft = 555
ExplicitTop = 0
end
inherited ToolButton13: TToolButton
Left = 572
Top = 0
ExplicitLeft = 572
ExplicitTop = 0
end
inherited ToolButton6: TToolButton
Left = 580
Top = 0
ExplicitLeft = 580
ExplicitTop = 0
end
inherited ToolButton7: TToolButton
Left = 614
Top = 0
ExplicitLeft = 614
ExplicitTop = 0
end
inherited ToolButton8: TToolButton
Left = 648
Top = 0
ExplicitLeft = 648
ExplicitTop = 0
end
inherited ToolButton12: TToolButton
Left = 682
Top = 0
ExplicitLeft = 682
ExplicitTop = 0
end
inherited ToolButton9: TToolButton
Left = 690
Top = 0
ExplicitLeft = 690
ExplicitTop = 0
end
inherited ToolButton10: TToolButton
Left = 724
Top = 0
ExplicitLeft = 724
ExplicitTop = 0
end
inherited ToolButton11: TToolButton
Left = 758
Top = 0
ExplicitLeft = 758
ExplicitTop = 0
end
end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Top = 50
Width = 1045
Height = 482
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
inherited cxGridViewID_ARTICULO: TcxGridDBColumn inherited cxGridViewID_ARTICULO: TcxGridDBColumn
Width = 57 Width = 57
@ -67,7 +151,10 @@ inherited frViewDetallesContratoCliente: TfrViewDetallesContratoCliente
end end
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Top = 24
Width = 1045
inherited TBXToolbar1: TTBXToolbar inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 831
object TBXSubmenuItem1: TTBXSubmenuItem [0] object TBXSubmenuItem1: TTBXSubmenuItem [0]
Caption = 'A'#241'adir cap'#237'tulo' Caption = 'A'#241'adir cap'#237'tulo'
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText

View File

@ -123,7 +123,7 @@ implementation
{$R *.dfm} {$R *.dfm}
uses uControllerDetallesBase, uDetallesContratoClienteController, schContratosClienteClient_Intf, uses uControllerDetallesBase, uDetallesContratoClienteController, schContratosClienteClient_Intf,
uDetallesPresupuestoClienteController, uDetallesPresupuestoClienteController, cxGridExportLink,
uCalculosUtils; uCalculosUtils;
{ TfrViewDetallesContratoProveedor } { TfrViewDetallesContratoProveedor }

View File

@ -10,6 +10,7 @@ inherited frViewElegirArticulosPedidosProveedor: TfrViewElegirArticulosPedidosPr
ExplicitWidth = 565 ExplicitWidth = 565
ExplicitHeight = 279 ExplicitHeight = 279
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'RecID'
inherited cxGridViewPRECIO_COSTE: TcxGridDBColumn inherited cxGridViewPRECIO_COSTE: TcxGridDBColumn
Caption = 'Precio material' Caption = 'Precio material'
Properties.DecimalPlaces = 4 Properties.DecimalPlaces = 4
@ -46,6 +47,11 @@ inherited frViewElegirArticulosPedidosProveedor: TfrViewElegirArticulosPedidosPr
Visible = False Visible = False
VisibleForCustomization = False VisibleForCustomization = False
end end
object cxGridViewRECID: TcxGridDBColumn
DataBinding.FieldName = 'RecID'
Visible = False
VisibleForCustomization = False
end
end end
inherited cxGridLevel1: TcxGridLevel inherited cxGridLevel1: TcxGridLevel
Visible = False Visible = False
@ -89,12 +95,14 @@ inherited frViewElegirArticulosPedidosProveedor: TfrViewElegirArticulosPedidosPr
Width = 205 Width = 205
end end
inherited txtFiltroTodo2: TcxTextEdit inherited txtFiltroTodo2: TcxTextEdit
Left = 283 Left = 336
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 = 283 ExplicitLeft = 336
ExplicitWidth = 250
Width = 250
end end
end end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel

View File

@ -178,6 +178,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
inherited pgPaginas: TPageControl inherited pgPaginas: TPageControl
Width = 1030 Width = 1030
Height = 588 Height = 588
ActivePage = pagContenido
TabOrder = 1 TabOrder = 1
OnChanging = pgPaginasChanging OnChanging = pgPaginasChanging
ExplicitTop = 112 ExplicitTop = 112
@ -457,7 +458,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Top = 50 Top = 50
Width = 1022 Width = 1022
Height = 510 Height = 510
ExplicitTop = 50
ExplicitWidth = 1022 ExplicitWidth = 1022
ExplicitHeight = 510 ExplicitHeight = 510
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
@ -475,8 +475,12 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitWidth = 839 ExplicitWidth = 839
end end
inherited edtPrecioPunto: TcxDBCurrencyEdit inherited edtPrecioPunto: TcxDBCurrencyEdit
Left = 845
Top = 6
DataBinding.DataSource = frViewPresupuestoCliente1.DADataSource DataBinding.DataSource = frViewPresupuestoCliente1.DADataSource
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 845
ExplicitTop = 6
end end
inherited bRecalcularPrecioPunto: TButton inherited bRecalcularPrecioPunto: TButton
Action = actRecalcularPrecioPunto Action = actRecalcularPrecioPunto
@ -514,7 +518,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitHeight = 560 ExplicitHeight = 560
inherited pnlSup: TPanel inherited pnlSup: TPanel
Width = 1022 Width = 1022
ExplicitWidth = 989 ExplicitWidth = 1022
inherited eIncidenciaActiva: TcxDBCheckBox inherited eIncidenciaActiva: TcxDBCheckBox
ExplicitHeight = 21 ExplicitHeight = 21
end end
@ -560,8 +564,8 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Width = 1022 Width = 1022
Height = 534 Height = 534
ExplicitTop = 26 ExplicitTop = 26
ExplicitWidth = 989 ExplicitWidth = 1022
ExplicitHeight = 260 ExplicitHeight = 534
end end
inherited EditorActionList: TActionList inherited EditorActionList: TActionList
Left = 8 Left = 8
@ -601,30 +605,32 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
LookAndFeel = dxLayoutOfficeLookAndFeel1 LookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitWidth = 1036 ExplicitWidth = 1036
inherited Bevel3: TBevel inherited Bevel3: TBevel
Left = 475 Left = 484
Top = 57 Top = 57
ExplicitLeft = 475 Height = 122
ExplicitLeft = 484
ExplicitTop = 57 ExplicitTop = 57
ExplicitHeight = 122
end end
inherited Bevel4: TBevel inherited Bevel4: TBevel
Left = 587 Left = 596
Top = 88 Top = 88
Width = 342 Width = 342
ExplicitLeft = 587 ExplicitLeft = 596
ExplicitTop = 88 ExplicitTop = 88
ExplicitWidth = 342 ExplicitWidth = 342
end end
inherited Bevel2: TBevel inherited Bevel2: TBevel
Top = 242 Top = 216
Width = 333 Width = 333
ExplicitTop = 242 ExplicitTop = 216
ExplicitWidth = 333 ExplicitWidth = 333
end end
inherited Bevel1: TBevel inherited Bevel1: TBevel
Left = 494 Left = 503
Top = 216 Top = 216
Width = 332 Width = 332
ExplicitLeft = 494 ExplicitLeft = 503
ExplicitTop = 216 ExplicitTop = 216
ExplicitWidth = 332 ExplicitWidth = 332
end end
@ -636,19 +642,19 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Width = 93 Width = 93
end end
inherited ImporteIVA: TcxDBCurrencyEdit inherited ImporteIVA: TcxDBCurrencyEdit
Left = 658 Left = 667
Top = 108 Top = 108
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 658 ExplicitLeft = 667
ExplicitTop = 108 ExplicitTop = 108
ExplicitWidth = 137 ExplicitWidth = 137
Width = 137 Width = 137
end end
inherited ImporteTotal: TcxDBCurrencyEdit inherited ImporteTotal: TcxDBCurrencyEdit
Left = 588 Left = 597
Top = 189 Top = 189
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 588 ExplicitLeft = 597
ExplicitTop = 189 ExplicitTop = 189
ExplicitWidth = 137 ExplicitWidth = 137
Width = 137 Width = 137
@ -659,49 +665,49 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitTop = 84 ExplicitTop = 84
end end
inherited edtIVA: TcxDBSpinEdit inherited edtIVA: TcxDBSpinEdit
Left = 587 Left = 596
Top = 108 Top = 108
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 587 ExplicitLeft = 596
ExplicitTop = 108 ExplicitTop = 108
end end
inherited ImporteBase: TcxDBCurrencyEdit inherited ImporteBase: TcxDBCurrencyEdit
Left = 587 Left = 596
Top = 57 Top = 57
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 587 ExplicitLeft = 596
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 92 ExplicitWidth = 92
Width = 92 Width = 92
end end
inherited edtRE: TcxDBSpinEdit inherited edtRE: TcxDBSpinEdit
Left = 587 Left = 596
Top = 162 Top = 162
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 587 ExplicitLeft = 596
ExplicitTop = 162 ExplicitTop = 162
end end
inherited edtIRPF: TcxDBSpinEdit inherited edtIRPF: TcxDBSpinEdit
Left = 587 Left = 596
Top = 135 Top = 135
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 587 ExplicitLeft = 596
ExplicitTop = 135 ExplicitTop = 135
end end
inherited ImporteRE: TcxDBCurrencyEdit inherited ImporteRE: TcxDBCurrencyEdit
Left = 658 Left = 667
Top = 162 Top = 162
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 658 ExplicitLeft = 667
ExplicitTop = 162 ExplicitTop = 162
ExplicitWidth = 56 ExplicitWidth = 56
Width = 56 Width = 56
end end
inherited ImporteIRPF: TcxDBCurrencyEdit inherited ImporteIRPF: TcxDBCurrencyEdit
Left = 658 Left = 667
Top = 135 Top = 135
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 658 ExplicitLeft = 667
ExplicitTop = 135 ExplicitTop = 135
ExplicitWidth = 56 ExplicitWidth = 56
Width = 56 Width = 56
@ -736,10 +742,10 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Width = 81 Width = 81
end end
inherited bTiposIVA: TButton inherited bTiposIVA: TButton
Left = 327 Left = 336
Top = 138 Top = 138
OnClick = frViewTotales1bTiposIVAClick OnClick = frViewTotales1bTiposIVAClick
ExplicitLeft = 327 ExplicitLeft = 336
ExplicitTop = 138 ExplicitTop = 138
end end
inherited cbRecargoEquivalencia: TcxDBCheckBox inherited cbRecargoEquivalencia: TcxDBCheckBox
@ -749,28 +755,28 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Width = 219 Width = 219
end end
inherited edtRetencion: TcxDBSpinEdit inherited edtRetencion: TcxDBSpinEdit
Left = 587 Left = 596
Top = 231 Top = 231
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 587 ExplicitLeft = 596
ExplicitTop = 231 ExplicitTop = 231
end end
inherited edtImporteRetencion: TcxDBCurrencyEdit inherited edtImporteRetencion: TcxDBCurrencyEdit
Left = 658 Left = 667
Top = 231 Top = 231
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitLeft = 658 ExplicitLeft = 667
ExplicitTop = 231 ExplicitTop = 231
ExplicitWidth = 342 ExplicitWidth = 342
Width = 342 Width = 342
end end
inherited edtFechaRetencion: TcxDBDateEdit inherited edtFechaRetencion: TcxDBDateEdit
Top = 257 Top = 231
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 257 ExplicitTop = 231
ExplicitWidth = 333 ExplicitWidth = 333
Width = 333 Width = 333
end end

View File

@ -62,8 +62,6 @@ type
private private
procedure RecalcularPortePorUnidad; procedure RecalcularPortePorUnidad;
procedure frViewDetallesPresupuestoCliente1edtPrecioPuntoPropertiesEditValueChanged(
Sender: TObject);
protected protected
FPresupuesto: IBizPresupuestoCliente; FPresupuesto: IBizPresupuestoCliente;
@ -230,13 +228,6 @@ begin
Presupuesto.DataTable.Active := True; Presupuesto.DataTable.Active := True;
end; end;
procedure TfEditorPresupuestoCliente.frViewDetallesPresupuestoCliente1edtPrecioPuntoPropertiesEditValueChanged(
Sender: TObject);
begin
inherited;
end;
procedure TfEditorPresupuestoCliente.onPrecioPuntoPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; procedure TfEditorPresupuestoCliente.onPrecioPuntoPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean); var Error: Boolean);
begin begin

View File

@ -1,5 +1,89 @@
inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
Width = 1124
Height = 455
inherited ToolBar1: TToolBar
Width = 1124
Height = 24
inherited ToolButton4: TToolButton
Wrap = False
end
inherited ToolButton14: TToolButton
Left = 334
Top = 0
ExplicitLeft = 334
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
Left = 368
Top = 0
ExplicitLeft = 368
ExplicitTop = 0
end
inherited FontSize: TEdit
Left = 513
Top = 0
ExplicitLeft = 513
ExplicitTop = 0
end
inherited UpDown1: TUpDown
Left = 555
Top = 0
ExplicitLeft = 555
ExplicitTop = 0
end
inherited ToolButton13: TToolButton
Left = 572
Top = 0
ExplicitLeft = 572
ExplicitTop = 0
end
inherited ToolButton6: TToolButton
Left = 580
Top = 0
ExplicitLeft = 580
ExplicitTop = 0
end
inherited ToolButton7: TToolButton
Left = 614
Top = 0
ExplicitLeft = 614
ExplicitTop = 0
end
inherited ToolButton8: TToolButton
Left = 648
Top = 0
ExplicitLeft = 648
ExplicitTop = 0
end
inherited ToolButton12: TToolButton
Left = 682
Top = 0
ExplicitLeft = 682
ExplicitTop = 0
end
inherited ToolButton9: TToolButton
Left = 690
Top = 0
ExplicitLeft = 690
ExplicitTop = 0
end
inherited ToolButton10: TToolButton
Left = 724
Top = 0
ExplicitLeft = 724
ExplicitTop = 0
end
inherited ToolButton11: TToolButton
Left = 758
Top = 0
ExplicitLeft = 758
ExplicitTop = 0
end
end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Top = 50
Width = 1124
Height = 405
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
inherited cxGridViewID: TcxGridDBColumn inherited cxGridViewID: TcxGridDBColumn
VisibleForCustomization = False VisibleForCustomization = False
@ -78,8 +162,11 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
end end
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Top = 24
Width = 1124
inherited TBXToolbar1: TTBXToolbar inherited TBXToolbar1: TTBXToolbar
DockPos = 0 DockPos = 0
ExplicitWidth = 839
object TBXSubmenuItem1: TTBXSubmenuItem [0] object TBXSubmenuItem1: TTBXSubmenuItem [0]
Caption = 'A'#241'adir cap'#237'tulo' Caption = 'A'#241'adir cap'#237'tulo'
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText

View File

@ -584,6 +584,14 @@
</Parameter> </Parameter>
</Parameters> </Parameters>
</Operation> </Operation>
<Operation Name="SetBancoPorDefecto" UID="{9302499C-2042-49B3-849F-80B1592DC83B}">
<Parameters>
<Parameter Name="ID_EJERCICIO" DataType="Integer" Flag="In" >
</Parameter>
<Parameter Name="ID_SUBCUENTA" DataType="Integer" Flag="In" >
</Parameter>
</Parameters>
</Operation>
</Operations> </Operations>
</Interface> </Interface>
</Interfaces> </Interfaces>

View File

@ -705,6 +705,7 @@ type
function DarNumOrdenAsiento: Integer; function DarNumOrdenAsiento: Integer;
procedure PuntearAsiento(const ID_ASIENTO: Integer); procedure PuntearAsiento(const ID_ASIENTO: Integer);
procedure PuntearSubcuenta(const ID_SUBCUENTA: Integer); procedure PuntearSubcuenta(const ID_SUBCUENTA: Integer);
procedure SetBancoPorDefecto(const ID_EJERCICIO: Integer; const ID_SUBCUENTA: Integer);
end; end;
{ CosrvContabilidad } { CosrvContabilidad }
@ -723,6 +724,7 @@ type
function DarNumOrdenAsiento: Integer; function DarNumOrdenAsiento: Integer;
procedure PuntearAsiento(const ID_ASIENTO: Integer); procedure PuntearAsiento(const ID_ASIENTO: Integer);
procedure PuntearSubcuenta(const ID_SUBCUENTA: Integer); procedure PuntearSubcuenta(const ID_SUBCUENTA: Integer);
procedure SetBancoPorDefecto(const ID_EJERCICIO: Integer; const ID_SUBCUENTA: Integer);
end; end;
{ IsrvUnidadesMedida } { IsrvUnidadesMedida }
@ -2408,6 +2410,22 @@ begin
end end
end; end;
procedure TsrvContabilidad_Proxy.SetBancoPorDefecto(const ID_EJERCICIO: Integer; const ID_SUBCUENTA: Integer);
begin
try
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'SetBancoPorDefecto');
__Message.Write('ID_EJERCICIO', TypeInfo(Integer), ID_EJERCICIO, []);
__Message.Write('ID_SUBCUENTA', TypeInfo(Integer), ID_SUBCUENTA, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
{ CosrvUnidadesMedida } { CosrvUnidadesMedida }
class function CosrvUnidadesMedida.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvUnidadesMedida; class function CosrvUnidadesMedida.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvUnidadesMedida;

View File

@ -257,6 +257,7 @@ type
procedure Invoke_DarNumOrdenAsiento(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_DarNumOrdenAsiento(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_PuntearAsiento(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_PuntearAsiento(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_PuntearSubcuenta(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_PuntearSubcuenta(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_SetBancoPorDefecto(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end; end;
TsrvUnidadesMedida_Invoker = class(TDataAbstractService_Invoker) TsrvUnidadesMedida_Invoker = class(TDataAbstractService_Invoker)
@ -1579,6 +1580,28 @@ begin
end; end;
end; end;
procedure TsrvContabilidad_Invoker.Invoke_SetBancoPorDefecto(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ procedure SetBancoPorDefecto(const ID_EJERCICIO: Integer; const ID_SUBCUENTA: Integer); }
var
ID_EJERCICIO: Integer;
ID_SUBCUENTA: Integer;
begin
try
__Message.Read('ID_EJERCICIO', TypeInfo(Integer), ID_EJERCICIO, []);
__Message.Read('ID_SUBCUENTA', TypeInfo(Integer), ID_SUBCUENTA, []);
(__Instance as IsrvContabilidad).SetBancoPorDefecto(ID_EJERCICIO, ID_SUBCUENTA);
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContabilidad', 'SetBancoPorDefectoResponse');
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
__oResponseOptions := [roNoResponse];
finally
end;
end;
{ TsrvUnidadesMedida_Invoker } { TsrvUnidadesMedida_Invoker }
constructor TsrvUnidadesMedida_Invoker.Create; constructor TsrvUnidadesMedida_Invoker.Create;

Binary file not shown.

View File

@ -100,8 +100,6 @@ uses
srvGestorInformes_Impl in '..\Modulos\Gestor de informes\Servidor\srvGestorInformes_Impl.pas' {srvGestorInformes: TDataAbstractService}, srvGestorInformes_Impl in '..\Modulos\Gestor de informes\Servidor\srvGestorInformes_Impl.pas' {srvGestorInformes: TDataAbstractService},
uRptFacturasProveedor_Server in '..\Modulos\Facturas de proveedor\Reports\uRptFacturasProveedor_Server.pas' {RptFacturasProveedor: TDataModule}, uRptFacturasProveedor_Server in '..\Modulos\Facturas de proveedor\Reports\uRptFacturasProveedor_Server.pas' {RptFacturasProveedor: TDataModule},
uRptRecibosProveedor_Server in '..\Modulos\Recibos de proveedor\Reports\uRptRecibosProveedor_Server.pas' {RptRecibosProveedor: TDataModule}, uRptRecibosProveedor_Server in '..\Modulos\Recibos de proveedor\Reports\uRptRecibosProveedor_Server.pas' {RptRecibosProveedor: TDataModule},
schContabilidadClient_Intf in '..\Modulos\Contabilidad\Model\schContabilidadClient_Intf.pas',
schContabilidadServer_Intf in '..\Modulos\Contabilidad\Model\schContabilidadServer_Intf.pas',
schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas', schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas',
schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas', schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas',
srvContratosCliente_Impl in '..\Modulos\Contratos de cliente\Servidor\srvContratosCliente_Impl.pas' {srvContratosCliente: TDataAbstractService}, srvContratosCliente_Impl in '..\Modulos\Contratos de cliente\Servidor\srvContratosCliente_Impl.pas' {srvContratosCliente: TDataAbstractService},
@ -161,7 +159,9 @@ uses
schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas',
schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas', schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas', schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas'; schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
schContabilidadClient_Intf in '..\Modulos\Contabilidad\Model\schContabilidadClient_Intf.pas',
schContabilidadServer_Intf in '..\Modulos\Contabilidad\Model\schContabilidadServer_Intf.pas';
{$R *.res} {$R *.res}
{$R ..\Servicios\RODLFile.res} {$R ..\Servicios\RODLFile.res}

View File

@ -28,7 +28,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality> <Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType/> <Borland.ProjectType/>
<BorlandProject> <BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">3</VersionInfo><VersionInfo Name="Release">3</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.3.3.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES (Servidor)</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.3.3.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">miércoles, 08 de febrero de 2023 16:16</VersionInfoKeys></VersionInfoKeys><Excluded_Packages> <BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">4</VersionInfo><VersionInfo Name="Release">4</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.4.4.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES (Servidor)</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.4.4.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">miércoles, 19 de abril de 2023 17:22</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject> </Excluded_Packages><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions> </ProjectExtensions>

Binary file not shown.