Generacion automatica de subcuenta en proveedores y repaso de generacion automática de asientos en recibos de cliente
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@163 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
1c076ed547
commit
f29fdb104a
@ -632,7 +632,6 @@ CREATE TABLE CONT_APUNTES (
|
|||||||
HABER TIPO_IMPORTE
|
HABER TIPO_IMPORTE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE CONT_ASIENTOS (
|
CREATE TABLE CONT_ASIENTOS (
|
||||||
ID TIPO_ID NOT NULL,
|
ID TIPO_ID NOT NULL,
|
||||||
FECHA_ASIENTO DATE,
|
FECHA_ASIENTO DATE,
|
||||||
@ -4073,8 +4072,8 @@ begin
|
|||||||
RECIBOS_CLIENTE.IMPORTE, CONT_SUBCUENTAS.ID, CONT_SUBCUENTAS.ID_EJERCICIO
|
RECIBOS_CLIENTE.IMPORTE, CONT_SUBCUENTAS.ID, CONT_SUBCUENTAS.ID_EJERCICIO
|
||||||
FROM PAGOS_CLIENTE
|
FROM PAGOS_CLIENTE
|
||||||
LEFT JOIN RECIBOS_CLIENTE ON (RECIBOS_CLIENTE.ID = PAGOS_CLIENTE.ID_RECIBO)
|
LEFT JOIN RECIBOS_CLIENTE ON (RECIBOS_CLIENTE.ID = PAGOS_CLIENTE.ID_RECIBO)
|
||||||
LEFT JOIN FACTURAS_CLIENTE ON (FACTURAS_CLIENTE.ID = RECIBOS_CLIENTE.ID_FACTURA)
|
/* LEFT JOIN FACTURAS_CLIENTE ON (FACTURAS_CLIENTE.ID = RECIBOS_CLIENTE.ID_FACTURA) (ya no esta atado a las facturas)*/
|
||||||
LEFT JOIN CONT_SUBCUENTAS ON (CONT_SUBCUENTAS.ID_CONTACTO = FACTURAS_CLIENTE.ID_CLIENTE)
|
LEFT JOIN CONT_SUBCUENTAS ON (CONT_SUBCUENTAS.ID_CONTACTO = RECIBOS_CLIENTE.ID_CLIENTE)
|
||||||
WHERE PAGOS_CLIENTE.ID = :IDPAGO INTO :IGNORARCONTABILIDAD, :REFERENCIARECIBO,
|
WHERE PAGOS_CLIENTE.ID = :IDPAGO INTO :IGNORARCONTABILIDAD, :REFERENCIARECIBO,
|
||||||
:FECHAPAGO, :TIPOPAGO, :IMPORTE, :IDSUBCUENTA, :IDEJERCICIO;
|
:FECHAPAGO, :TIPOPAGO, :IMPORTE, :IDSUBCUENTA, :IDEJERCICIO;
|
||||||
|
|
||||||
@ -4408,3 +4407,12 @@ end
|
|||||||
|
|
||||||
|
|
||||||
SET TERM ; ^
|
SET TERM ; ^
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Fields descriptions */
|
||||||
|
|
||||||
|
COMMENT ON COLUMN CONT_ASIENTOS.TIPO IS
|
||||||
|
'Tipo de asiento
|
||||||
|
''c'' cobro
|
||||||
|
''p'' pago';
|
||||||
|
|||||||
@ -58,48 +58,48 @@
|
|||||||
<DelphiCompile Include="Base.dpk">
|
<DelphiCompile Include="Base.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\adortl.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\cxIntl6D11.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\cxIntlPrintSys3D11.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\DataAbstract_Core_D11.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\dbrtl.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\dclIndyCore.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\designide.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\dsnap.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\GUISDK_D11.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\IndyCore.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\IndyProtocols.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\IndySystem.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\Jcl.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JclVcl.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JSDialog100.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JvCmpD11R.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JvCoreD11R.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JvCtrlsD11R.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JvDlgsD11R.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JvMMD11R.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JvNetD11R.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JvPageCompsD11R.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JvStdCtrlsD11R.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\JvSystemD11R.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\pckMD5.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\pckUCDataConnector.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\pckUserControl_RT.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\PluginSDK_D10R.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\PngComponentsD10.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\PNG_D10.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\RemObjects_Core_D11.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\rtl.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\TB2k_D10.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\tbx_d10.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\vcl.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\vclactnband.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\vcldb.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\vcljpg.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\VclSmp.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\vclx.dcp" />
|
||||||
|
<DCCReference Include="..\Modulos\Remesas de cliente\xmlrtl.dcp" />
|
||||||
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
|
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\adortl.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxIntl6D11.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\cxIntlPrintSys3D11.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\DataAbstract_Core_D11.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\dclIndyCore.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\designide.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\dsnap.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\GUISDK_D11.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\IndyCore.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\IndyProtocols.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\IndySystem.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\Jcl.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JclVcl.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JSDialog100.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvCmpD11R.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvCoreD11R.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvDlgsD11R.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvMMD11R.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvNetD11R.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvPageCompsD11R.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvStdCtrlsD11R.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\JvSystemD11R.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\pckMD5.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\pckUCDataConnector.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\pckUserControl_RT.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\PluginSDK_D10R.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\PngComponentsD10.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\PNG_D10.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Core_D11.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\TB2k_D10.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\tbx_d10.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\vclactnband.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\VclSmp.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
|
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\xmlrtl.dcp" />
|
|
||||||
<DCCReference Include="Conexion\uConfigurarConexion.pas">
|
<DCCReference Include="Conexion\uConfigurarConexion.pas">
|
||||||
<Form>fConfigurarConexion</Form>
|
<Form>fConfigurarConexion</Form>
|
||||||
<DesignClass>TForm</DesignClass>
|
<DesignClass>TForm</DesignClass>
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
||||||
<Projects Include="..\Articulos\Views\Articulos_view.dproj" />
|
<Projects Include="..\Articulos\Views\Articulos_view.dproj" />
|
||||||
<Projects Include="..\Contactos\Controller\Contactos_controller.dproj" />
|
<Projects Include="..\Contactos\Controller\Contactos_controller.dproj" />
|
||||||
|
<Projects Include="..\Contactos\Model\Contactos_model.dproj" />
|
||||||
<Projects Include="..\Contactos\Views\Contactos_view.dproj" />
|
<Projects Include="..\Contactos\Views\Contactos_view.dproj" />
|
||||||
<Projects Include="..\Facturas de cliente\Views\FacturasCliente_view.dproj" />
|
<Projects Include="..\Facturas de cliente\Views\FacturasCliente_view.dproj" />
|
||||||
<Projects Include="..\Facturas de proveedor\Views\FacturasProveedor_view.dproj" />
|
<Projects Include="..\Facturas de proveedor\Views\FacturasProveedor_view.dproj" />
|
||||||
@ -53,6 +54,15 @@
|
|||||||
<Target Name="ApplicationBase:Make">
|
<Target Name="ApplicationBase:Make">
|
||||||
<MSBuild Projects="..\..\ApplicationBase\ApplicationBase.dproj" Targets="Make" />
|
<MSBuild Projects="..\..\ApplicationBase\ApplicationBase.dproj" Targets="Make" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<Target Name="Contactos_model">
|
||||||
|
<MSBuild Projects="..\Contactos\Model\Contactos_model.dproj" Targets="" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="Contactos_model:Clean">
|
||||||
|
<MSBuild Projects="..\Contactos\Model\Contactos_model.dproj" Targets="Clean" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="Contactos_model:Make">
|
||||||
|
<MSBuild Projects="..\Contactos\Model\Contactos_model.dproj" Targets="Make" />
|
||||||
|
</Target>
|
||||||
<Target Name="Contactos_controller">
|
<Target Name="Contactos_controller">
|
||||||
<MSBuild Projects="..\Contactos\Controller\Contactos_controller.dproj" Targets="" />
|
<MSBuild Projects="..\Contactos\Controller\Contactos_controller.dproj" Targets="" />
|
||||||
</Target>
|
</Target>
|
||||||
@ -162,13 +172,13 @@
|
|||||||
<MSBuild Projects="..\Articulos\Views\Articulos_view.dproj" Targets="Make" />
|
<MSBuild Projects="..\Articulos\Views\Articulos_view.dproj" Targets="Make" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Build">
|
<Target Name="Build">
|
||||||
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_controller;Contactos_view;Contabilidad_model;Contabilidad_data;Contabilidad_controller;Contabilidad_view;Contabilidad_plugin;FactuGES;FactuGES_Server;FacturasProveedor_view;FacturasCliente_view;Articulos_view" />
|
<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" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Clean">
|
<Target Name="Clean">
|
||||||
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase: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" />
|
<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" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Make">
|
<Target Name="Make">
|
||||||
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase: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" />
|
<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" />
|
||||||
</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>
|
||||||
@ -10,11 +10,13 @@ uses
|
|||||||
const
|
const
|
||||||
// (REF_CUENTA = 430 SOLO CUENTAS DE CLIENTES)
|
// (REF_CUENTA = 430 SOLO CUENTAS DE CLIENTES)
|
||||||
// (REF_CUENTA = 400 SOLO CUENTAS DE PROVEEDORES)
|
// (REF_CUENTA = 400 SOLO CUENTAS DE PROVEEDORES)
|
||||||
// (REF_CUENTA = 570 SOLO CUENTAS DE CLIENTES)
|
// (REF_CUENTA = 570 SOLO CUENTAS DE CAJA)
|
||||||
// (REF_CUENTA = 400 SOLO CUENTAS DE PROVEEDORES)
|
// (REF_CUENTA = 572 SOLO CUENTAS DE BANCO)
|
||||||
|
|
||||||
CTE_CUENTASCLIENTE = '430';
|
CTE_CUENTASCLIENTE = 430;
|
||||||
CTE_CUENTASPROVEEDOR = '400';
|
CTE_CUENTASPROVEEDOR = 400;
|
||||||
|
CTE_CUENTASCAJA = 570;
|
||||||
|
CTE_CUENTASBANCO = 572;
|
||||||
|
|
||||||
type
|
type
|
||||||
ISubCuentasController = interface(IObservador)
|
ISubCuentasController = interface(IObservador)
|
||||||
@ -35,15 +37,18 @@ type
|
|||||||
function ElegirSubCuenta(ASubCuentas : IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
|
function ElegirSubCuenta(ASubCuentas : IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
|
||||||
procedure ElegirCuenta(ASubCuenta: IBizSubCuenta);
|
procedure ElegirCuenta(ASubCuenta: IBizSubCuenta);
|
||||||
|
|
||||||
procedure ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
procedure ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||||
procedure VerSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
procedure VerSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||||
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||||
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||||
|
|
||||||
|
function DarListaCajasBancos: TStringList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TSubCuentasController = class(TObservador, ISubCuentasController)
|
TSubCuentasController = class(TObservador, ISubCuentasController)
|
||||||
private
|
private
|
||||||
function BuscarCuentas(TipoCuenta: String): IBizSubCuenta;
|
function BuscarCuentas(const REF_CUENTA: Integer): IBizSubCuenta;
|
||||||
|
function BuscarCuentasLibres(TipoCuenta: Integer): IBizSubCuenta;
|
||||||
procedure AsignarSubCuentaAContacto(ASubCuenta: IBizSubCuenta; ASubCuentaContacto: IBizSubCuentasContacto);
|
procedure AsignarSubCuentaAContacto(ASubCuenta: IBizSubCuenta; ASubCuentaContacto: IBizSubCuentasContacto);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
@ -66,6 +71,7 @@ type
|
|||||||
procedure Anadir(ASubCuenta : IBizSubCuenta);
|
procedure Anadir(ASubCuenta : IBizSubCuenta);
|
||||||
function Nuevo : IBizSubCuenta;
|
function Nuevo : IBizSubCuenta;
|
||||||
function BuscarTodos: IBizSubCuenta;
|
function BuscarTodos: IBizSubCuenta;
|
||||||
|
function BuscarCajasBancos: IBizSubCuenta;
|
||||||
function Buscar(ID: Integer): IBizSubCuenta;
|
function Buscar(ID: Integer): IBizSubCuenta;
|
||||||
procedure VerTodos(ASubCuentas: IBizSubCuenta);
|
procedure VerTodos(ASubCuentas: IBizSubCuenta);
|
||||||
procedure Ver(ASubCuenta: IBizSubCuenta);
|
procedure Ver(ASubCuenta: IBizSubCuenta);
|
||||||
@ -76,10 +82,12 @@ type
|
|||||||
function ElegirSubCuenta(ASubCuentas : IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
|
function ElegirSubCuenta(ASubCuentas : IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
|
||||||
procedure ElegirCuenta(ASubCuenta: IBizSubCuenta);
|
procedure ElegirCuenta(ASubCuenta: IBizSubCuenta);
|
||||||
|
|
||||||
procedure ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
procedure ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||||
procedure VerSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
procedure VerSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||||
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||||
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||||
|
|
||||||
|
function DarListaCajasBancos: TStringList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -98,7 +106,7 @@ begin
|
|||||||
ASubCuenta.Insert;
|
ASubCuenta.Insert;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSubCuentasController.AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
procedure TSubCuentasController.AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||||
var
|
var
|
||||||
ASubCuenta: IBizSubCuenta;
|
ASubCuenta: IBizSubCuenta;
|
||||||
begin
|
begin
|
||||||
@ -150,10 +158,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSubCuentasController.BuscarCuentas(TipoCuenta: String): IBizSubCuenta;
|
function TSubCuentasController.BuscarCajasBancos: IBizSubCuenta;
|
||||||
var
|
var
|
||||||
|
Condicion: TDAWhereExpression;
|
||||||
Condicion1: TDAWhereExpression;
|
Condicion1: TDAWhereExpression;
|
||||||
Condicion2: TDAWhereExpression;
|
Condicion2: TDAWhereExpression;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
@ -161,16 +171,63 @@ begin
|
|||||||
|
|
||||||
with Result.DataTable.DynamicWhere do
|
with Result.DataTable.DynamicWhere do
|
||||||
begin
|
begin
|
||||||
// (REF_CUENTA = 430/400) (SOLO CUENTAS DE CLIENTES, PROVEEDORES QUE ESTEN SIN ASIGNAR)
|
// (REF_CUENTAS = 570 cajas)
|
||||||
Condicion1 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(TipoCuenta, datString), dboEqual);
|
Condicion1 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASCAJA, datInteger), dboEqual);
|
||||||
Condicion2 := NewBinaryExpression(NewField('', fld_SubCuentasID_CONTACTO), NewNull(), dboEqual);
|
// (REF_CUENTAS = 572 bancos)
|
||||||
|
Condicion2 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASBANCO, datInteger), dboEqual);
|
||||||
|
Condicion := NewBinaryExpression(Condicion1, Condicion2, dboOr);
|
||||||
|
|
||||||
if IsEmpty then
|
if IsEmpty then
|
||||||
Expression := Condicion1
|
Expression := Condicion
|
||||||
else
|
else
|
||||||
Expression := NewBinaryExpression(Expression, Condicion1, dboAnd);
|
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||||
|
end;
|
||||||
|
|
||||||
Expression := NewBinaryExpression(Expression, Condicion2, dboAnd);
|
finally
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TSubCuentasController.BuscarCuentas(const REF_CUENTA: Integer): IBizSubCuenta;
|
||||||
|
var
|
||||||
|
Condicion: TDAWhereExpression;
|
||||||
|
begin
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
Result := BuscarTodos;
|
||||||
|
|
||||||
|
with Result.DataTable.DynamicWhere do
|
||||||
|
begin
|
||||||
|
// (REF_CUENTA = 430 CLIENTES/400 PROVEEDORES/570 CAJAS/572 BANCOS)
|
||||||
|
Condicion := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(REF_CUENTA, datInteger), dboEqual);
|
||||||
|
|
||||||
|
if IsEmpty then
|
||||||
|
Expression := Condicion
|
||||||
|
else
|
||||||
|
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||||
|
end;
|
||||||
|
|
||||||
|
finally
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TSubCuentasController.BuscarCuentasLibres(TipoCuenta: Integer): IBizSubCuenta;
|
||||||
|
var
|
||||||
|
Condicion: TDAWhereExpression;
|
||||||
|
begin
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
Result := BuscarCuentas(TipoCuenta);
|
||||||
|
|
||||||
|
with Result.DataTable.DynamicWhere do
|
||||||
|
begin
|
||||||
|
Condicion := NewBinaryExpression(NewField('', fld_SubCuentasID_CONTACTO), NewNull(), dboEqual);
|
||||||
|
|
||||||
|
if IsEmpty then
|
||||||
|
Expression := Condicion
|
||||||
|
else
|
||||||
|
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
@ -195,6 +252,31 @@ begin
|
|||||||
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
|
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TSubCuentasController.DarListaCajasBancos: TStringList;
|
||||||
|
var
|
||||||
|
ACajasBancos: IBizSubCuenta;
|
||||||
|
i : integer;
|
||||||
|
begin
|
||||||
|
|
||||||
|
ACajasBancos := BuscarCajasBancos;
|
||||||
|
ACajasBancos.DataTable.Active := True;
|
||||||
|
|
||||||
|
Result := TStringList.Create;
|
||||||
|
try
|
||||||
|
with Result do
|
||||||
|
begin
|
||||||
|
ACajasBancos.DataTable.First;
|
||||||
|
while not ACajasBancos.DataTable.EOF do
|
||||||
|
begin
|
||||||
|
Add(Format('%s=%d', [ACajasBancos.DESCRIPCION, ACajasBancos.ID]));
|
||||||
|
ACajasBancos.DataTable.Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ACajasBancos := NIL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TSubCuentasController.DarListaSubCuentas: TStringList;
|
function TSubCuentasController.DarListaSubCuentas: TStringList;
|
||||||
var
|
var
|
||||||
ASubCuentas: IBizSubCuenta;
|
ASubCuentas: IBizSubCuenta;
|
||||||
@ -376,11 +458,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSubCuentasController.ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
procedure TSubCuentasController.ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||||
var
|
var
|
||||||
ASubCuenta: IBizSubCuenta;
|
ASubCuenta: IBizSubCuenta;
|
||||||
begin
|
begin
|
||||||
ASubCuenta := BuscarCuentas(TipoCuenta);
|
ASubCuenta := BuscarCuentasLibres(TipoCuenta);
|
||||||
|
|
||||||
if (TipoCuenta = CTE_CUENTASCLIENTE) then
|
if (TipoCuenta = CTE_CUENTASCLIENTE) then
|
||||||
ASubCuenta := ElegirSubCuenta(ASubCuenta, 'El cliente debe tener una subcuenta asociada', False)
|
ASubCuenta := ElegirSubCuenta(ASubCuenta, 'El cliente debe tener una subcuenta asociada', False)
|
||||||
else
|
else
|
||||||
|
|||||||
@ -338,6 +338,41 @@ object srvContabilidad: TsrvContabilidad
|
|||||||
DataDictionary = DataDictionary
|
DataDictionary = DataDictionary
|
||||||
Diagrams = Diagrams
|
Diagrams = Diagrams
|
||||||
Datasets = <
|
Datasets = <
|
||||||
|
item
|
||||||
|
Params = <
|
||||||
|
item
|
||||||
|
Name = 'REFERENCIA'
|
||||||
|
Value = ''
|
||||||
|
ParamType = daptInput
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'ID_EJERCICIO'
|
||||||
|
Value = ''
|
||||||
|
ParamType = daptInput
|
||||||
|
end>
|
||||||
|
Statements = <
|
||||||
|
item
|
||||||
|
Connection = 'IBX'
|
||||||
|
ConnectionType = 'Interbase'
|
||||||
|
Default = True
|
||||||
|
Name = 'IBX'
|
||||||
|
SQL =
|
||||||
|
'select ID'#10'from cont_cuentas'#10'where ref_cuenta = :REFERENCIA'#10'and i' +
|
||||||
|
'd_ejercicio = :ID_EJERCICIO'#10#10#10
|
||||||
|
StatementType = stSQL
|
||||||
|
ColumnMappings = <
|
||||||
|
item
|
||||||
|
DatasetField = 'ID'
|
||||||
|
TableField = 'ID'
|
||||||
|
end>
|
||||||
|
end>
|
||||||
|
Name = 'DarIDCuenta'
|
||||||
|
Fields = <
|
||||||
|
item
|
||||||
|
Name = 'ID'
|
||||||
|
DataType = datInteger
|
||||||
|
end>
|
||||||
|
end
|
||||||
item
|
item
|
||||||
Params = <
|
Params = <
|
||||||
item
|
item
|
||||||
|
|||||||
@ -10,7 +10,7 @@ unit srvContabilidad_Impl;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{vcl:} Classes, SysUtils,
|
{vcl:} Classes, SysUtils,
|
||||||
{RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
|
{RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
|
||||||
{Ancestor Implementation:} DataAbstractService_Impl,
|
{Ancestor Implementation:} DataAbstractService_Impl,
|
||||||
{Used RODLs:} DataAbstract4_Intf,
|
{Used RODLs:} DataAbstract4_Intf,
|
||||||
@ -41,9 +41,8 @@ type
|
|||||||
|
|
||||||
public
|
public
|
||||||
function TieneCuentaAsociada(const ID_CONTACTO: Integer; const ID_EMPRESA: Integer): Boolean;
|
function TieneCuentaAsociada(const ID_CONTACTO: Integer; const ID_EMPRESA: Integer): Boolean;
|
||||||
function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean;
|
function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const CLIENTE: String): Boolean;
|
||||||
function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean;
|
function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const PROVEEDOR: String): Boolean;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -59,7 +58,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ srvContabilidad }
|
{ srvContabilidad }
|
||||||
function TsrvContabilidad.AnadirSubCuentaCliente(const ID_CONTACTO, ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean;
|
function TsrvContabilidad.AnadirSubCuentaCliente(const ID_CONTACTO, ID_TIENDA: Integer; const ID_EMPRESA: Integer; const CLIENTE: String): Boolean;
|
||||||
var
|
var
|
||||||
AConn : IDAConnection;
|
AConn : IDAConnection;
|
||||||
dsData: IDADataset;
|
dsData: IDADataset;
|
||||||
@ -69,7 +68,7 @@ var
|
|||||||
NumCuenta: Integer;
|
NumCuenta: Integer;
|
||||||
RefTienda: String;
|
RefTienda: String;
|
||||||
NumTienda: Integer;
|
NumTienda: Integer;
|
||||||
|
IDCuenta: Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
@ -101,6 +100,15 @@ begin
|
|||||||
RefTienda := format('%.2d', [NumTienda]);
|
RefTienda := format('%.2d', [NumTienda]);
|
||||||
RefSubCuenta := IntToStr(REFERENCIA_CLIENTES) + RefTienda + RefSubCuenta;
|
RefSubCuenta := IntToStr(REFERENCIA_CLIENTES) + RefTienda + RefSubCuenta;
|
||||||
dsData := NIL;
|
dsData := NIL;
|
||||||
|
|
||||||
|
dsData := schContabilidad.NewDataset(AConn, 'DarIDCuenta', ['ID_EJERCICIO', 'REFERENCIA'], [darEjercicioActivo(ID_EMPRESA), REFERENCIA_CLIENTES]);
|
||||||
|
dsData.Active := True;
|
||||||
|
|
||||||
|
if VarIsNull(dsData.FieldValues[0]) then
|
||||||
|
IDCuenta := 0
|
||||||
|
else
|
||||||
|
IDCuenta := dsData.FieldValues[0];
|
||||||
|
|
||||||
AConn.CommitTransaction;
|
AConn.CommitTransaction;
|
||||||
|
|
||||||
except
|
except
|
||||||
@ -111,16 +119,14 @@ begin
|
|||||||
dsData := NIL;
|
dsData := NIL;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
try
|
try
|
||||||
dsCommand := schContabilidad.NewCommand(AConn, 'AnadirSubCuenta');
|
dsCommand := schContabilidad.NewCommand(AConn, 'AnadirSubCuenta');
|
||||||
with dsCommand do
|
with dsCommand do
|
||||||
begin
|
begin
|
||||||
ParamByName('REFERENCIA').AsString := RefSubCuenta;
|
ParamByName('REFERENCIA').AsString := RefSubCuenta;
|
||||||
ParamByName('DESCRIPCION').AsString := 'Cuenta de Clieeeeeeeeeeeeeeeeeeeeeeente';
|
ParamByName('DESCRIPCION').AsString := 'Cuenta de cliente ' + CLIENTE;
|
||||||
ParamByName('ID_CUENTA').AsInteger := 1;
|
ParamByName('ID_CUENTA').AsInteger := IDCuenta;
|
||||||
ParamByName('ID_EJERCICIO').AsInteger := darEjercicioActivo(ID_EMPRESA);
|
ParamByName('ID_EJERCICIO').AsInteger := darEjercicioActivo(ID_EMPRESA);
|
||||||
ParamByName('ID_CONTACTO').AsInteger := ID_CONTACTO;
|
ParamByName('ID_CONTACTO').AsInteger := ID_CONTACTO;
|
||||||
end;
|
end;
|
||||||
@ -136,9 +142,88 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TsrvContabilidad.AnadirSubCuentaProveedor(const ID_CONTACTO, ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean;
|
function TsrvContabilidad.AnadirSubCuentaProveedor(const ID_CONTACTO, ID_TIENDA: Integer; const ID_EMPRESA: Integer; const PROVEEDOR: String): Boolean;
|
||||||
|
var
|
||||||
|
AConn : IDAConnection;
|
||||||
|
dsData: IDADataset;
|
||||||
|
dsCommand: IDASQLCommand;
|
||||||
|
|
||||||
|
RefSubCuenta: String;
|
||||||
|
NumCuenta: Integer;
|
||||||
|
RefTienda: String;
|
||||||
|
NumTienda: Integer;
|
||||||
|
IDCuenta: Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := False;
|
||||||
|
|
||||||
|
AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
|
||||||
|
|
||||||
|
try
|
||||||
|
try
|
||||||
|
dsData := schContabilidad.NewDataset(AConn, 'DarMaxRefSubCuenta', ['ID_EJERCICIO', 'REF_CUENTA'], [darEjercicioActivo(ID_EMPRESA), REFERENCIA_PROVEEDORES]);
|
||||||
|
dsData.Active := True;
|
||||||
|
|
||||||
|
if VarIsNull(dsData.FieldValues[0]) then
|
||||||
|
NumCuenta := 0
|
||||||
|
else
|
||||||
|
NumCuenta := dsData.FieldValues[0];
|
||||||
|
|
||||||
|
Inc(NumCuenta);
|
||||||
|
RefSubCuenta := format('%.5d', [NumCuenta]);
|
||||||
|
dsData := NIL;
|
||||||
|
|
||||||
|
dsData := schContabilidad.NewDataset(AConn, 'DarCodigoContableTienda', ['ID_EMPRESA', 'ID_TIENDA'], [ID_EMPRESA, ID_TIENDA]);
|
||||||
|
dsData.Active := True;
|
||||||
|
|
||||||
|
if VarIsNull(dsData.FieldValues[0]) then
|
||||||
|
NumTienda := 0
|
||||||
|
else
|
||||||
|
NumTienda := dsData.FieldValues[0];
|
||||||
|
|
||||||
|
RefTienda := format('%.2d', [NumTienda]);
|
||||||
|
RefSubCuenta := IntToStr(REFERENCIA_PROVEEDORES) + RefTienda + RefSubCuenta;
|
||||||
|
dsData := NIL;
|
||||||
|
|
||||||
|
dsData := schContabilidad.NewDataset(AConn, 'DarIDCuenta', ['ID_EJERCICIO', 'REFERENCIA'], [darEjercicioActivo(ID_EMPRESA), REFERENCIA_PROVEEDORES]);
|
||||||
|
dsData.Active := True;
|
||||||
|
|
||||||
|
if VarIsNull(dsData.FieldValues[0]) then
|
||||||
|
IDCuenta := 0
|
||||||
|
else
|
||||||
|
IDCuenta := dsData.FieldValues[0];
|
||||||
|
|
||||||
|
AConn.CommitTransaction;
|
||||||
|
|
||||||
|
except
|
||||||
|
RaiseError('Error al buscar nueva referencia para la subcuenta');
|
||||||
|
AConn.RollbackTransaction;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
dsData := NIL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
try
|
||||||
|
dsCommand := schContabilidad.NewCommand(AConn, 'AnadirSubCuenta');
|
||||||
|
with dsCommand do
|
||||||
|
begin
|
||||||
|
ParamByName('REFERENCIA').AsString := RefSubCuenta;
|
||||||
|
ParamByName('DESCRIPCION').AsString := 'Cuenta de proveedor ' + PROVEEDOR;
|
||||||
|
ParamByName('ID_CUENTA').AsInteger := IDCuenta;
|
||||||
|
ParamByName('ID_EJERCICIO').AsInteger := darEjercicioActivo(ID_EMPRESA);
|
||||||
|
ParamByName('ID_CONTACTO').AsInteger := ID_CONTACTO;
|
||||||
|
end;
|
||||||
|
dsCommand.Execute;
|
||||||
|
AConn.CommitTransaction;
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
RaiseError('Error al crear la nueva subcuenta en tablas');
|
||||||
|
AConn.RollbackTransaction;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
dsCommand := NIL;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TsrvContabilidad.darEjercicioActivo(const ID_EMPRESA: Integer): Integer;
|
function TsrvContabilidad.darEjercicioActivo(const ID_EMPRESA: Integer): Integer;
|
||||||
|
|||||||
@ -29,7 +29,23 @@ requires
|
|||||||
GUIBase,
|
GUIBase,
|
||||||
ApplicationBase,
|
ApplicationBase,
|
||||||
Contabilidad_model,
|
Contabilidad_model,
|
||||||
Contabilidad_controller;
|
Contabilidad_controller,
|
||||||
|
vcl,
|
||||||
|
rtl,
|
||||||
|
dbrtl,
|
||||||
|
DataAbstract_Core_D11,
|
||||||
|
vcldb,
|
||||||
|
dsnap,
|
||||||
|
adortl,
|
||||||
|
RemObjects_Core_D11,
|
||||||
|
cxLibraryD11,
|
||||||
|
dxThemeD11,
|
||||||
|
dxGDIPlusD11,
|
||||||
|
cxEditorsD11,
|
||||||
|
cxDataD11,
|
||||||
|
vcljpg,
|
||||||
|
dxLayoutControlD11,
|
||||||
|
dxComnD11;
|
||||||
|
|
||||||
contains
|
contains
|
||||||
uEditorBalance in 'uEditorBalance.pas' {fEditorBalance: TfEditorBalances},
|
uEditorBalance in 'uEditorBalance.pas' {fEditorBalance: TfEditorBalances},
|
||||||
@ -61,6 +77,7 @@ contains
|
|||||||
uViewApuntes in 'uViewApuntes.pas' {frViewApuntes: TFrame},
|
uViewApuntes in 'uViewApuntes.pas' {frViewApuntes: TFrame},
|
||||||
uEditorAsiento in 'uEditorAsiento.pas' {fEditorAsiento: TfEditorEjercicios},
|
uEditorAsiento in 'uEditorAsiento.pas' {fEditorAsiento: TfEditorEjercicios},
|
||||||
uEditorApunte in 'uEditorApunte.pas' {fEditorApunte: TfEditorEjercicios},
|
uEditorApunte in 'uEditorApunte.pas' {fEditorApunte: TfEditorEjercicios},
|
||||||
uEditorElegirSubCuentas in 'uEditorElegirSubCuentas.pas' {fEditorElegirSubCuentas: TfEditorEjercicios};
|
uEditorElegirSubCuentas in 'uEditorElegirSubCuentas.pas' {fEditorElegirSubCuentas: TfEditorEjercicios},
|
||||||
|
uViewCajasBancos in 'uViewCajasBancos.pas' {frViewCajasBancos: TFrame};
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -48,10 +48,23 @@
|
|||||||
<DelphiCompile Include="Contabilidad_view.dpk">
|
<DelphiCompile Include="Contabilidad_view.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\ApplicationBase.dcp" />
|
<DCCReference Include="adortl.dcp" />
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\Contabilidad_controller.dcp" />
|
<DCCReference Include="ApplicationBase.dcp" />
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\Contabilidad_model.dcp" />
|
<DCCReference Include="Contabilidad_controller.dcp" />
|
||||||
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
|
<DCCReference Include="Contabilidad_model.dcp" />
|
||||||
|
<DCCReference Include="cxDataD11.dcp" />
|
||||||
|
<DCCReference Include="cxEditorsD11.dcp" />
|
||||||
|
<DCCReference Include="cxLibraryD11.dcp" />
|
||||||
|
<DCCReference Include="DataAbstract_Core_D11.dcp" />
|
||||||
|
<DCCReference Include="dbrtl.dcp" />
|
||||||
|
<DCCReference Include="dsnap.dcp" />
|
||||||
|
<DCCReference Include="dxComnD11.dcp" />
|
||||||
|
<DCCReference Include="dxGDIPlusD11.dcp" />
|
||||||
|
<DCCReference Include="dxLayoutControlD11.dcp" />
|
||||||
|
<DCCReference Include="dxThemeD11.dcp" />
|
||||||
|
<DCCReference Include="GUIBase.dcp" />
|
||||||
|
<DCCReference Include="RemObjects_Core_D11.dcp" />
|
||||||
|
<DCCReference Include="rtl.dcp" />
|
||||||
<DCCReference Include="uContabilidadViewRegister.pas">
|
<DCCReference Include="uContabilidadViewRegister.pas">
|
||||||
<Form>frViewEpigrafes</Form>
|
<Form>frViewEpigrafes</Form>
|
||||||
<DesignClass>TFrame</DesignClass>
|
<DesignClass>TFrame</DesignClass>
|
||||||
@ -140,6 +153,10 @@
|
|||||||
<Form>frViewBalances</Form>
|
<Form>frViewBalances</Form>
|
||||||
<DesignClass>TFrame</DesignClass>
|
<DesignClass>TFrame</DesignClass>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
|
<DCCReference Include="uViewCajasBancos.pas">
|
||||||
|
<Form>frViewApunte</Form>
|
||||||
|
<DesignClass>TFrame</DesignClass>
|
||||||
|
</DCCReference>
|
||||||
<DCCReference Include="uViewCuenta.pas">
|
<DCCReference Include="uViewCuenta.pas">
|
||||||
<Form>frViewCuenta</Form>
|
<Form>frViewCuenta</Form>
|
||||||
<DesignClass>TFrame</DesignClass>
|
<DesignClass>TFrame</DesignClass>
|
||||||
@ -172,6 +189,9 @@
|
|||||||
<Form>frViewSubCuentas</Form>
|
<Form>frViewSubCuentas</Form>
|
||||||
<DesignClass>TFrame</DesignClass>
|
<DesignClass>TFrame</DesignClass>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
|
<DCCReference Include="vcl.dcp" />
|
||||||
|
<DCCReference Include="vcldb.dcp" />
|
||||||
|
<DCCReference Include="vcljpg.dcp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
<!-- EurekaLog First Line
|
<!-- EurekaLog First Line
|
||||||
|
|||||||
73
Source/Modulos/Contabilidad/Views/uViewCajasBancos.dfm
Normal file
73
Source/Modulos/Contabilidad/Views/uViewCajasBancos.dfm
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
inherited frViewCajasBancos: TfrViewCajasBancos
|
||||||
|
Width = 453
|
||||||
|
Height = 69
|
||||||
|
OnCreate = CustomViewCreate
|
||||||
|
OnDestroy = CustomViewDestroy
|
||||||
|
ExplicitWidth = 453
|
||||||
|
ExplicitHeight = 69
|
||||||
|
object dxLayoutControl1: TdxLayoutControl
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 453
|
||||||
|
Height = 73
|
||||||
|
Margins.Left = 0
|
||||||
|
Margins.Top = 0
|
||||||
|
Margins.Right = 0
|
||||||
|
Margins.Bottom = 0
|
||||||
|
Align = alTop
|
||||||
|
ParentBackground = True
|
||||||
|
TabOrder = 0
|
||||||
|
AutoContentSizes = [acsWidth, acsHeight]
|
||||||
|
DesignSize = (
|
||||||
|
453
|
||||||
|
73)
|
||||||
|
object cbCajasBancos: TcxComboBox
|
||||||
|
Left = 80
|
||||||
|
Top = 37
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.OnValidate = cbCajaBancoPropertiesValidate
|
||||||
|
Style.BorderColor = clWindowFrame
|
||||||
|
Style.BorderStyle = ebs3D
|
||||||
|
Style.HotTrack = False
|
||||||
|
Style.LookAndFeel.Kind = lfStandard
|
||||||
|
Style.LookAndFeel.NativeStyle = True
|
||||||
|
Style.ButtonStyle = bts3D
|
||||||
|
Style.PopupBorderStyle = epbsFrame3D
|
||||||
|
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||||
|
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||||
|
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||||
|
StyleFocused.LookAndFeel.NativeStyle = True
|
||||||
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
|
TabOrder = 1
|
||||||
|
Width = 376
|
||||||
|
end
|
||||||
|
object eContabilizar: TcxCheckBox
|
||||||
|
Left = 10
|
||||||
|
Top = 10
|
||||||
|
Caption = 'Ignorar en contabiliad'
|
||||||
|
Properties.ValueChecked = 1
|
||||||
|
Properties.ValueUnchecked = 0
|
||||||
|
Properties.OnEditValueChanged = eContabilizarPropertiesEditValueChanged
|
||||||
|
TabOrder = 0
|
||||||
|
Width = 203
|
||||||
|
end
|
||||||
|
object dxLayoutControl1Group_Root: TdxLayoutGroup
|
||||||
|
ShowCaption = False
|
||||||
|
Hidden = True
|
||||||
|
ShowBorder = False
|
||||||
|
object dxLayoutControl1Item2: TdxLayoutItem
|
||||||
|
ShowCaption = False
|
||||||
|
Control = eContabilizar
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
|
object dxLayoutControl1Item1: TdxLayoutItem
|
||||||
|
Caption = 'Caja / Banco:'
|
||||||
|
Control = cbCajasBancos
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
114
Source/Modulos/Contabilidad/Views/uViewCajasBancos.pas
Normal file
114
Source/Modulos/Contabilidad/Views/uViewCajasBancos.pas
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
unit uViewCajasBancos;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, uViewBase, ExtCtrls, StdCtrls, DB, uDADataTable, cxGraphics,
|
||||||
|
dxLayoutControl, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit,
|
||||||
|
cxControls, cxCheckBox;
|
||||||
|
|
||||||
|
type
|
||||||
|
IViewCajasBancos = interface(IViewBase)
|
||||||
|
['{5266EE90-D715-462A-9720-FF0D4078A496}']
|
||||||
|
end;
|
||||||
|
|
||||||
|
TfrViewCajasBancos = class(TfrViewBase, IViewCajasBancos)
|
||||||
|
cbCajasBancos: TcxComboBox;
|
||||||
|
dxLayoutControl1Group_Root: TdxLayoutGroup;
|
||||||
|
dxLayoutControl1: TdxLayoutControl;
|
||||||
|
dxLayoutControl1Item1: TdxLayoutItem;
|
||||||
|
dxLayoutControl1Item2: TdxLayoutItem;
|
||||||
|
eContabilizar: TcxCheckBox;
|
||||||
|
procedure CustomViewCreate(Sender: TObject);
|
||||||
|
procedure CustomViewDestroy(Sender: TObject);
|
||||||
|
procedure cbCajaBancoPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||||
|
procedure eContabilizarPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
FIdSubCuenta : Integer;
|
||||||
|
FListaCajasBancos : TStringList;
|
||||||
|
function getIDCajaBanco: Integer;
|
||||||
|
public
|
||||||
|
property IdSubCuenta: Integer read getIDCajaBanco;
|
||||||
|
procedure ElegirCajaBanco(const AIdSubCuenta : Integer);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
uses
|
||||||
|
uFactuGES_App, uSubCuentasController;
|
||||||
|
|
||||||
|
procedure TfrViewCajasBancos.cbCajaBancoPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
FIdSubCuenta := StrToInt(FListaCajasBancos.Values[DisplayValue]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrViewCajasBancos.CustomViewCreate(Sender: TObject);
|
||||||
|
var
|
||||||
|
i : integer;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
with TSubCuentasController.create do
|
||||||
|
begin
|
||||||
|
FListaCajasBancos := DarListaCajasBancos;
|
||||||
|
with cbCajasBancos.Properties.Items do
|
||||||
|
begin
|
||||||
|
BeginUpdate;
|
||||||
|
try
|
||||||
|
Clear;
|
||||||
|
for i := 0 to FListaCajasBancos.Count - 1 do
|
||||||
|
Add(FListaCajasBancos.Names[i]);
|
||||||
|
finally
|
||||||
|
EndUpdate;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewCajasBancos.CustomViewDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
FreeAndNIL(FListaCajasBancos);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewCajasBancos.eContabilizarPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
if not eContabilizar.Checked then
|
||||||
|
begin
|
||||||
|
cbCajasBancos.ItemIndex := 0;
|
||||||
|
cbCajasBancos.Enabled := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
cbCajasBancos.ItemIndex := -1;
|
||||||
|
cbCajasBancos.Enabled := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewCajasBancos.ElegirCajaBanco(const AIdSubCuenta: Integer);
|
||||||
|
var
|
||||||
|
i : integer;
|
||||||
|
begin
|
||||||
|
for i := 0 to FListaCajasBancos.Count-1 do
|
||||||
|
begin
|
||||||
|
if FListaCajasBancos.ValueFromIndex[i] = IntToStr(AIdSubCuenta) then
|
||||||
|
begin
|
||||||
|
cbCajasBancos.Text := FListaCajasBancos.Names[i];
|
||||||
|
Break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrViewCajasBancos.getIDCajaBanco: Integer;
|
||||||
|
begin
|
||||||
|
Result := FIdSubCuenta;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
@ -34,6 +34,7 @@ type
|
|||||||
function BuscarTodos: IBizContacto; override;
|
function BuscarTodos: IBizContacto; override;
|
||||||
function BuscarTodosTiendaWeb: IBizCliente;
|
function BuscarTodosTiendaWeb: IBizCliente;
|
||||||
function Nuevo : IBizContacto; override;
|
function Nuevo : IBizContacto; override;
|
||||||
|
function Guardar(AContacto : IBizContacto): Boolean; override;
|
||||||
procedure Ver(AContacto : IBizContacto); override;
|
procedure Ver(AContacto : IBizContacto); override;
|
||||||
procedure VerTodos(AContactos: IBizContacto); override;
|
procedure VerTodos(AContactos: IBizContacto); override;
|
||||||
function ElegirContacto(AContactos : IBizContacto;
|
function ElegirContacto(AContactos : IBizContacto;
|
||||||
@ -207,6 +208,12 @@ begin
|
|||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TClientesController.Guardar(AContacto: IBizContacto): Boolean;
|
||||||
|
begin
|
||||||
|
Result := inherited Guardar(AContacto);
|
||||||
|
(AContacto as IBizCliente).SubCuentas.DataTable.Refresh;
|
||||||
|
end;
|
||||||
|
|
||||||
function TClientesController.Nuevo: IBizContacto;
|
function TClientesController.Nuevo: IBizContacto;
|
||||||
var
|
var
|
||||||
AContacto : IBizCliente;
|
AContacto : IBizCliente;
|
||||||
|
|||||||
@ -42,7 +42,7 @@ type
|
|||||||
|
|
||||||
procedure Eliminar(const ID : Integer); overload; virtual;
|
procedure Eliminar(const ID : Integer); overload; virtual;
|
||||||
function Eliminar(AContacto : IBizContacto): Boolean; overload; virtual;
|
function Eliminar(AContacto : IBizContacto): Boolean; overload; virtual;
|
||||||
function Guardar(AContacto : IBizContacto): Boolean;
|
function Guardar(AContacto : IBizContacto): Boolean; virtual;
|
||||||
procedure DescartarCambios(AContacto : IBizContacto); virtual;
|
procedure DescartarCambios(AContacto : IBizContacto); virtual;
|
||||||
function Existe(const ID: Integer) : Boolean; virtual;
|
function Existe(const ID: Integer) : Boolean; virtual;
|
||||||
procedure Anadir(AContacto : IBizContacto); virtual;
|
procedure Anadir(AContacto : IBizContacto); virtual;
|
||||||
|
|||||||
@ -30,6 +30,7 @@ type
|
|||||||
function BuscarTodos: IBizContacto; override;
|
function BuscarTodos: IBizContacto; override;
|
||||||
function BuscarTodosTiendaWeb: IBizProveedor;
|
function BuscarTodosTiendaWeb: IBizProveedor;
|
||||||
function Nuevo : IBizContacto; override;
|
function Nuevo : IBizContacto; override;
|
||||||
|
function Guardar(AContacto : IBizContacto): Boolean; override;
|
||||||
procedure Ver(AContacto : IBizContacto); override;
|
procedure Ver(AContacto : IBizContacto); override;
|
||||||
procedure VerTodos(AContactos: IBizContacto); override;
|
procedure VerTodos(AContactos: IBizContacto); override;
|
||||||
function ElegirContacto(AContactos : IBizContacto;
|
function ElegirContacto(AContactos : IBizContacto;
|
||||||
@ -198,6 +199,12 @@ begin
|
|||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TProveedoresController.Guardar(AContacto: IBizContacto): Boolean;
|
||||||
|
begin
|
||||||
|
Result := inherited Guardar(AContacto);
|
||||||
|
(AContacto as IBizProveedor).SubCuentas.DataTable.Refresh;
|
||||||
|
end;
|
||||||
|
|
||||||
function TProveedoresController.Nuevo: IBizContacto;
|
function TProveedoresController.Nuevo: IBizContacto;
|
||||||
var
|
var
|
||||||
AContacto : IBizProveedor;
|
AContacto : IBizProveedor;
|
||||||
@ -289,10 +296,6 @@ begin
|
|||||||
begin
|
begin
|
||||||
if (SubCuentas.DataTable.State in dsEditModes) then
|
if (SubCuentas.DataTable.State in dsEditModes) then
|
||||||
SubCuentas.DataTable.Post;
|
SubCuentas.DataTable.Post;
|
||||||
|
|
||||||
if (IGNORAR_CONTABILIDAD = 0)
|
|
||||||
and (SubCuentas.DataTable.RecordCount = 0) then
|
|
||||||
raise Exception.Create('El proveedor debe tener asociada una subcuenta contable');
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -53,9 +53,11 @@ var
|
|||||||
ASchema : TDASchema;
|
ASchema : TDASchema;
|
||||||
ACurrentConn : IDAConnection;
|
ACurrentConn : IDAConnection;
|
||||||
ACommand : IDASQLCommand;
|
ACommand : IDASQLCommand;
|
||||||
|
|
||||||
idCliente: integer;
|
idCliente: integer;
|
||||||
idTienda: integer;
|
idTienda: integer;
|
||||||
idEmpresa: integer;
|
idEmpresa: integer;
|
||||||
|
NombreComercial: string;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
@ -91,11 +93,12 @@ begin
|
|||||||
begin
|
begin
|
||||||
with TsrvContabilidad.Create(NIL) do
|
with TsrvContabilidad.Create(NIL) do
|
||||||
try
|
try
|
||||||
idCliente := aChange.NewValueByName[fld_ClientesID];
|
IdCliente := aChange.NewValueByName[fld_ClientesID];
|
||||||
idTienda := aChange.NewValueByName[fld_ClientesID_TIENDA];
|
IdTienda := aChange.NewValueByName[fld_ClientesID_TIENDA];
|
||||||
idEmpresa := aChange.NewValueByName[fld_ClientesID_EMPRESA];
|
IdEmpresa := aChange.NewValueByName[fld_ClientesID_EMPRESA];
|
||||||
|
NombreComercial := aChange.NewValueByName[fld_ClientesNOMBRE_COMERCIAL];
|
||||||
if not TieneCuentaAsociada(idCliente, idEmpresa) then
|
if not TieneCuentaAsociada(idCliente, idEmpresa) then
|
||||||
AnadirSubCuentaCliente(idCliente, idTienda, idEmpresa);
|
AnadirSubCuentaCliente(idCliente, idTienda, idEmpresa, NombreComercial);
|
||||||
finally
|
finally
|
||||||
Free;
|
Free;
|
||||||
end;
|
end;
|
||||||
@ -112,6 +115,12 @@ var
|
|||||||
ASchema : TDASchema;
|
ASchema : TDASchema;
|
||||||
ACurrentConn : IDAConnection;
|
ACurrentConn : IDAConnection;
|
||||||
ACommand : IDASQLCommand;
|
ACommand : IDASQLCommand;
|
||||||
|
|
||||||
|
idCliente: integer;
|
||||||
|
idTienda: integer;
|
||||||
|
idEmpresa: integer;
|
||||||
|
NombreComercial: string;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
@ -140,6 +149,25 @@ begin
|
|||||||
ParamByName('PROCEDENCIA_CLIENTE').Value := aChange.NewValueByName[fld_ClientesPROCEDENCIA_CLIENTE];
|
ParamByName('PROCEDENCIA_CLIENTE').Value := aChange.NewValueByName[fld_ClientesPROCEDENCIA_CLIENTE];
|
||||||
Execute;
|
Execute;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//REPASAR en el caso de que se modifique el contacto sera todo manual
|
||||||
|
//En caso de no ignorar contabilidad se deberá dar de alta una cuenta para el cliente si el usuario no la ha asignado
|
||||||
|
{ if (aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] = 0) then
|
||||||
|
begin
|
||||||
|
with TsrvContabilidad.Create(NIL) do
|
||||||
|
try
|
||||||
|
IdCliente := aChange.NewValueByName[fld_ClientesID];
|
||||||
|
IdTienda := aChange.NewValueByName[fld_ClientesID_TIENDA];
|
||||||
|
IdEmpresa := aChange.NewValueByName[fld_ClientesID_EMPRESA];
|
||||||
|
NombreComercial := aChange.NewValueByName[fld_ClientesNOMBRE_COMERCIAL];
|
||||||
|
if not TieneCuentaAsociada(idCliente, idEmpresa) then
|
||||||
|
AnadirSubCuentaCliente(idCliente, idTienda, idEmpresa, NombreComercial);
|
||||||
|
finally
|
||||||
|
Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
|
||||||
finally
|
finally
|
||||||
ACommand := NIL;
|
ACommand := NIL;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -646,7 +646,7 @@ begin
|
|||||||
BLOQUEADO := 0;
|
BLOQUEADO := 0;
|
||||||
RECARGO_EQUIVALENCIA := CLIENTE_RECARGO_EQUIVALENCIA;
|
RECARGO_EQUIVALENCIA := CLIENTE_RECARGO_EQUIVALENCIA;
|
||||||
REGIMEN_IVA := CLIENTE_REGIMEN_IVA;
|
REGIMEN_IVA := CLIENTE_REGIMEN_IVA;
|
||||||
IGNORAR_CONTABILIDAD := 1;
|
IGNORAR_CONTABILIDAD := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TBizProveedor }
|
{ TBizProveedor }
|
||||||
@ -696,7 +696,7 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
ID_CATEGORIA := CATEGORIA_PROVEEDOR;
|
ID_CATEGORIA := CATEGORIA_PROVEEDOR;
|
||||||
REGIMEN_IVA := PROVEEDOR_REGIMEN_IVA;
|
REGIMEN_IVA := PROVEEDOR_REGIMEN_IVA;
|
||||||
IGNORAR_CONTABILIDAD := 1;
|
IGNORAR_CONTABILIDAD := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TBizProveedor.Create(aDataTable: TDADataTable);
|
constructor TBizProveedor.Create(aDataTable: TDADataTable);
|
||||||
|
|||||||
@ -20,7 +20,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uDataModuleServer, uDAClasses,
|
uDataModuleServer, uDAClasses, srvContabilidad_Impl,
|
||||||
schContactosClient_Intf, uBusinessUtils;
|
schContactosClient_Intf, uBusinessUtils;
|
||||||
|
|
||||||
{ TBizProveedorServer }
|
{ TBizProveedorServer }
|
||||||
@ -53,6 +53,12 @@ var
|
|||||||
ASchema : TDASchema;
|
ASchema : TDASchema;
|
||||||
ACurrentConn : IDAConnection;
|
ACurrentConn : IDAConnection;
|
||||||
ACommand : IDASQLCommand;
|
ACommand : IDASQLCommand;
|
||||||
|
|
||||||
|
idProveedor: integer;
|
||||||
|
idTienda: integer;
|
||||||
|
idEmpresa: integer;
|
||||||
|
Nombre: string;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
@ -77,6 +83,23 @@ begin
|
|||||||
ParamByName('IGNORAR_CONTABILIDAD').Value := aChange.NewValueByName[fld_ProveedoresIGNORAR_CONTABILIDAD];
|
ParamByName('IGNORAR_CONTABILIDAD').Value := aChange.NewValueByName[fld_ProveedoresIGNORAR_CONTABILIDAD];
|
||||||
Execute;
|
Execute;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//En caso de no ignorar contabilidad se deberá dar de alta una cuenta para el cliente si el usuario no la ha asignado
|
||||||
|
if (aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] = 0) then
|
||||||
|
begin
|
||||||
|
with TsrvContabilidad.Create(NIL) do
|
||||||
|
try
|
||||||
|
IdProveedor := aChange.NewValueByName[fld_ProveedoresID];
|
||||||
|
IdTienda := aChange.NewValueByName[fld_ProveedoresID_TIENDA];
|
||||||
|
IdEmpresa := aChange.NewValueByName[fld_ProveedoresID_EMPRESA];
|
||||||
|
Nombre := aChange.NewValueByName[fld_ProveedoresNOMBRE];
|
||||||
|
if not TieneCuentaAsociada(IdProveedor, IdEmpresa) then
|
||||||
|
AnadirSubCuentaProveedor(IdProveedor, IdTienda, IdEmpresa, Nombre);
|
||||||
|
finally
|
||||||
|
Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
ACommand := NIL;
|
ACommand := NIL;
|
||||||
end;
|
end;
|
||||||
@ -88,6 +111,12 @@ var
|
|||||||
ASchema : TDASchema;
|
ASchema : TDASchema;
|
||||||
ACurrentConn : IDAConnection;
|
ACurrentConn : IDAConnection;
|
||||||
ACommand : IDASQLCommand;
|
ACommand : IDASQLCommand;
|
||||||
|
|
||||||
|
idProveedor: integer;
|
||||||
|
idTienda: integer;
|
||||||
|
idEmpresa: integer;
|
||||||
|
Nombre: string;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
@ -113,6 +142,25 @@ begin
|
|||||||
ParamByName('IGNORAR_CONTABILIDAD').Value := aChange.NewValueByName[fld_ProveedoresIGNORAR_CONTABILIDAD];
|
ParamByName('IGNORAR_CONTABILIDAD').Value := aChange.NewValueByName[fld_ProveedoresIGNORAR_CONTABILIDAD];
|
||||||
Execute;
|
Execute;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//REPASAR en el caso de que se modifique el contacto sera todo manual
|
||||||
|
//En caso de no ignorar contabilidad se deberá dar de alta una cuenta para el cliente si el usuario no la ha asignado
|
||||||
|
{ if (aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] = 0) then
|
||||||
|
begin
|
||||||
|
with TsrvContabilidad.Create(NIL) do
|
||||||
|
try
|
||||||
|
IdProveedor := aChange.NewValueByName[fld_ProveedoresID];
|
||||||
|
IdTienda := aChange.NewValueByName[fld_ProveedoresID_TIENDA];
|
||||||
|
IdEmpresa := aChange.NewValueByName[fld_ProveedoresID_EMPRESA];
|
||||||
|
Nombre := aChange.NewValueByName[fld_ProveedoresNOMBRE];
|
||||||
|
if not TieneCuentaAsociada(IdProveedor, IdEmpresa) then
|
||||||
|
AnadirSubCuentaProveedor(IdProveedor, IdTienda, IdEmpresa, Nombre);
|
||||||
|
finally
|
||||||
|
Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
|
||||||
finally
|
finally
|
||||||
ACommand := NIL;
|
ACommand := NIL;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -42,7 +42,7 @@ type
|
|||||||
property PagosController: IPagosClienteController read GetPagosController write SetPagosController;
|
property PagosController: IPagosClienteController read GetPagosController write SetPagosController;
|
||||||
|
|
||||||
procedure Anadir(ARecibosCliente : IBizRecibosCliente);
|
procedure Anadir(ARecibosCliente : IBizRecibosCliente);
|
||||||
function Eliminar(ARecibosCliente : IBizRecibosCliente): Boolean;
|
function Eliminar(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false): Boolean;
|
||||||
|
|
||||||
function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''): Boolean;
|
function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''): Boolean;
|
||||||
procedure ModificarPago(ARecibosCliente : IBizRecibosCliente);
|
procedure ModificarPago(ARecibosCliente : IBizRecibosCliente);
|
||||||
@ -77,6 +77,8 @@ type
|
|||||||
function ElegirRecibosCompensados(ARecibo : IBizRecibosCliente): Boolean;
|
function ElegirRecibosCompensados(ARecibo : IBizRecibosCliente): Boolean;
|
||||||
procedure QuitarReciboCompensado(ARecibo : IBizRecibosCliente);
|
procedure QuitarReciboCompensado(ARecibo : IBizRecibosCliente);
|
||||||
|
|
||||||
|
function EsEliminable(ARecibo : IBizRecibosCliente): Boolean;
|
||||||
|
|
||||||
procedure Preview(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
procedure Preview(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
||||||
procedure Print(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
procedure Print(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
||||||
end;
|
end;
|
||||||
@ -115,7 +117,7 @@ type
|
|||||||
procedure Anadir(ARecibosCliente : IBizRecibosCliente);
|
procedure Anadir(ARecibosCliente : IBizRecibosCliente);
|
||||||
function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''): Boolean;
|
function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''): Boolean;
|
||||||
procedure ModificarPago(ARecibosCliente : IBizRecibosCliente);
|
procedure ModificarPago(ARecibosCliente : IBizRecibosCliente);
|
||||||
function Eliminar(ARecibosCliente : IBizRecibosCliente): Boolean;
|
function Eliminar(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false): Boolean;
|
||||||
function EliminarPago(ARecibosCliente : IBizRecibosCliente): Boolean;
|
function EliminarPago(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||||
function EliminarTodo(ARecibosCliente : IBizRecibosCliente): Boolean;
|
function EliminarTodo(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||||
function Guardar(ARecibosCliente : IBizRecibosCliente): Boolean;
|
function Guardar(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||||
@ -144,6 +146,8 @@ type
|
|||||||
|
|
||||||
procedure SetSituacionCobrados(ARecibos : IBizRecibosCliente; WithDeltas: Boolean=False);
|
procedure SetSituacionCobrados(ARecibos : IBizRecibosCliente; WithDeltas: Boolean=False);
|
||||||
|
|
||||||
|
function EsEliminable(ARecibo : IBizRecibosCliente): Boolean;
|
||||||
|
|
||||||
procedure Preview(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
procedure Preview(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
||||||
procedure Print(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
procedure Print(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
||||||
end;
|
end;
|
||||||
@ -618,22 +622,58 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRecibosClienteController.Eliminar(ARecibosCliente: IBizRecibosCliente): Boolean;
|
function TRecibosClienteController.Eliminar(ARecibosCliente: IBizRecibosCliente; AllItems: Boolean = false): Boolean;
|
||||||
|
//En el caso de eliminar almenos un elemento del conjunto se devuelve true
|
||||||
|
var
|
||||||
|
bEliminado: Boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
bEliminado := False;
|
||||||
|
|
||||||
if not Assigned(ARecibosCliente) then
|
if not Assigned(ARecibosCliente) then
|
||||||
raise Exception.Create ('IBizRecibosCliente no asignado');
|
raise Exception.Create ('ARecibosCliente no asignado');
|
||||||
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
|
if not ARecibosCliente.DataTable.Active then
|
||||||
|
ARecibosCliente.DataTable.Active := True;
|
||||||
|
|
||||||
if (ARecibosCliente.State in dsEditModes) then
|
if (ARecibosCliente.State in dsEditModes) then
|
||||||
ARecibosCliente.Cancel;
|
ARecibosCliente.Cancel;
|
||||||
|
|
||||||
ARecibosCliente.Delete;
|
//Siempre eliminaremos el seleccionado
|
||||||
ARecibosCliente.DataTable.ApplyUpdates;
|
if EsEliminable(ARecibosCliente) then
|
||||||
HideHourglassCursor;
|
begin
|
||||||
Result := True;
|
ARecibosCliente.Delete;
|
||||||
|
bEliminado := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
//En el caso de querer eliminar todos los items del objeto ARecibosCliente
|
||||||
|
if AllItems then
|
||||||
|
begin
|
||||||
|
with ARecibosCliente.DataTable do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not EOF do
|
||||||
|
begin
|
||||||
|
if EsEliminable(ARecibosCliente) then
|
||||||
|
begin
|
||||||
|
ARecibosCliente.Delete;
|
||||||
|
bEliminado := True
|
||||||
|
end
|
||||||
|
else Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if bEliminado then
|
||||||
|
begin
|
||||||
|
ARecibosCliente.DataTable.ApplyUpdates;
|
||||||
|
Result := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := False;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
HideHourglassCursor;
|
HideHourglassCursor;
|
||||||
end;
|
end;
|
||||||
@ -656,6 +696,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TRecibosClienteController.EsEliminable(ARecibo: IBizRecibosCliente): Boolean;
|
||||||
|
begin
|
||||||
|
if not Assigned(ARecibo) then
|
||||||
|
raise Exception.Create ('Recibo no asignado: EsEliminable');
|
||||||
|
|
||||||
|
Result := (ARecibo.SITUACION = CTE_PENDIENTE) AND (ARecibo.ID_FACTURA < 1);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TRecibosClienteController.RecuperarCliente(AReciboCliente: IBizRecibosCliente);
|
procedure TRecibosClienteController.RecuperarCliente(AReciboCliente: IBizRecibosCliente);
|
||||||
begin
|
begin
|
||||||
AReciboCliente._Cliente := (FClienteController.Buscar(AReciboCliente.ID_Cliente) as IBizCliente);
|
AReciboCliente._Cliente := (FClienteController.Buscar(AReciboCliente.ID_Cliente) as IBizCliente);
|
||||||
|
|||||||
@ -8,6 +8,9 @@ uses
|
|||||||
|
|
||||||
const
|
const
|
||||||
BIZ_SERVER_PAGOS_CLIENTE = 'Server.PagosCliente';
|
BIZ_SERVER_PAGOS_CLIENTE = 'Server.PagosCliente';
|
||||||
|
CTE_PAGO = 'Pago';
|
||||||
|
CTE_DEVOLUCION = 'Devolución';
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TBizPagosClienteServer = class(TPagosClienteBusinessProcessorRules)
|
TBizPagosClienteServer = class(TPagosClienteBusinessProcessorRules)
|
||||||
@ -62,7 +65,10 @@ begin
|
|||||||
with ACommand do
|
with ACommand do
|
||||||
begin
|
begin
|
||||||
ParamByName('IdPago').Value := aChange.OldValueByName[fld_PagosClienteID];
|
ParamByName('IdPago').Value := aChange.OldValueByName[fld_PagosClienteID];
|
||||||
ParamByName('Tipo').Value := 'p';
|
if (aChange.OldValueByName[fld_PagosClienteTIPO] = CTE_PAGO) then
|
||||||
|
ParamByName('Tipo').Value := 'c'
|
||||||
|
else
|
||||||
|
ParamByName('Tipo').Value := 'p';
|
||||||
Execute;
|
Execute;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
|||||||
@ -41,7 +41,7 @@ type
|
|||||||
IBizRecibosCliente = interface(IRecibosCliente)
|
IBizRecibosCliente = interface(IRecibosCliente)
|
||||||
['{93758493-260C-450D-9018-E5339C2E09B2}']
|
['{93758493-260C-450D-9018-E5339C2E09B2}']
|
||||||
function EsNuevo : Boolean;
|
function EsNuevo : Boolean;
|
||||||
function ConFactura : Boolean;
|
function SinFactura : Boolean;
|
||||||
|
|
||||||
// En Acana se puede cambiar el cliente por que un recibo puede corresponder o no a una factura
|
// En Acana se puede cambiar el cliente por que un recibo puede corresponder o no a una factura
|
||||||
procedure SetCliente(AValue : IBizCliente);
|
procedure SetCliente(AValue : IBizCliente);
|
||||||
@ -103,7 +103,7 @@ type
|
|||||||
|
|
||||||
procedure IniciarValoresIBizRecibosClienteNuevo;
|
procedure IniciarValoresIBizRecibosClienteNuevo;
|
||||||
function EsNuevo : Boolean;
|
function EsNuevo : Boolean;
|
||||||
function ConFactura : Boolean;
|
function SinFactura : Boolean;
|
||||||
|
|
||||||
constructor Create(aDataTable: TDADataTable); override;
|
constructor Create(aDataTable: TDADataTable); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -201,7 +201,7 @@ begin
|
|||||||
FCliente := AValue;
|
FCliente := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBizRecibosCliente.ConFactura: Boolean;
|
function TBizRecibosCliente.SinFactura: Boolean;
|
||||||
begin
|
begin
|
||||||
Result := ID_FACTURAIsNull;
|
Result := ID_FACTURAIsNull;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
||||||
<Projects Include="..\Articulos\Views\Articulos_view.dproj" />
|
<Projects Include="..\Articulos\Views\Articulos_view.dproj" />
|
||||||
<Projects Include="..\Contabilidad\Controller\Contabilidad_controller.dproj" />
|
<Projects Include="..\Contabilidad\Controller\Contabilidad_controller.dproj" />
|
||||||
|
<Projects Include="..\Contabilidad\Views\Contabilidad_view.dproj" />
|
||||||
<Projects Include="..\Contactos\Views\Contactos_view.dproj" />
|
<Projects Include="..\Contactos\Views\Contactos_view.dproj" />
|
||||||
<Projects Include="..\Facturas de cliente\Views\FacturasCliente_view.dproj" />
|
<Projects Include="..\Facturas de cliente\Views\FacturasCliente_view.dproj" />
|
||||||
<Projects Include="Controller\RecibosCliente_controller.dproj" />
|
<Projects Include="Controller\RecibosCliente_controller.dproj" />
|
||||||
@ -124,15 +125,6 @@
|
|||||||
<Target Name="FactuGES_Server:Make">
|
<Target Name="FactuGES_Server:Make">
|
||||||
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
|
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Contabilidad_controller">
|
|
||||||
<MSBuild Projects="..\Contabilidad\Controller\Contabilidad_controller.dproj" Targets="" />
|
|
||||||
</Target>
|
|
||||||
<Target Name="Contabilidad_controller:Clean">
|
|
||||||
<MSBuild Projects="..\Contabilidad\Controller\Contabilidad_controller.dproj" Targets="Clean" />
|
|
||||||
</Target>
|
|
||||||
<Target Name="Contabilidad_controller:Make">
|
|
||||||
<MSBuild Projects="..\Contabilidad\Controller\Contabilidad_controller.dproj" Targets="Make" />
|
|
||||||
</Target>
|
|
||||||
<Target Name="FacturasCliente_view">
|
<Target Name="FacturasCliente_view">
|
||||||
<MSBuild Projects="..\Facturas de cliente\Views\FacturasCliente_view.dproj" Targets="" />
|
<MSBuild Projects="..\Facturas de cliente\Views\FacturasCliente_view.dproj" Targets="" />
|
||||||
</Target>
|
</Target>
|
||||||
@ -151,14 +143,32 @@
|
|||||||
<Target Name="Articulos_view:Make">
|
<Target Name="Articulos_view:Make">
|
||||||
<MSBuild Projects="..\Articulos\Views\Articulos_view.dproj" Targets="Make" />
|
<MSBuild Projects="..\Articulos\Views\Articulos_view.dproj" Targets="Make" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<Target Name="Contabilidad_controller">
|
||||||
|
<MSBuild Projects="..\Contabilidad\Controller\Contabilidad_controller.dproj" Targets="" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="Contabilidad_controller:Clean">
|
||||||
|
<MSBuild Projects="..\Contabilidad\Controller\Contabilidad_controller.dproj" Targets="Clean" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="Contabilidad_controller:Make">
|
||||||
|
<MSBuild Projects="..\Contabilidad\Controller\Contabilidad_controller.dproj" Targets="Make" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="Contabilidad_view">
|
||||||
|
<MSBuild Projects="..\Contabilidad\Views\Contabilidad_view.dproj" Targets="" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="Contabilidad_view:Clean">
|
||||||
|
<MSBuild Projects="..\Contabilidad\Views\Contabilidad_view.dproj" Targets="Clean" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="Contabilidad_view:Make">
|
||||||
|
<MSBuild Projects="..\Contabilidad\Views\Contabilidad_view.dproj" Targets="Make" />
|
||||||
|
</Target>
|
||||||
<Target Name="Build">
|
<Target Name="Build">
|
||||||
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;RecibosCliente_model;RecibosCliente_data;RecibosCliente_controller;RecibosCliente_view;RecibosCliente_plugin;FactuGES;FactuGES_Server;Contabilidad_controller;FacturasCliente_view;Articulos_view" />
|
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;RecibosCliente_model;RecibosCliente_data;RecibosCliente_controller;RecibosCliente_view;RecibosCliente_plugin;FactuGES;FactuGES_Server;FacturasCliente_view;Articulos_view;Contabilidad_controller;Contabilidad_view" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Clean">
|
<Target Name="Clean">
|
||||||
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;RecibosCliente_model:Clean;RecibosCliente_data:Clean;RecibosCliente_controller:Clean;RecibosCliente_view:Clean;RecibosCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;Contabilidad_controller:Clean;FacturasCliente_view:Clean;Articulos_view:Clean" />
|
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;RecibosCliente_model:Clean;RecibosCliente_data:Clean;RecibosCliente_controller:Clean;RecibosCliente_view:Clean;RecibosCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;FacturasCliente_view:Clean;Articulos_view:Clean;Contabilidad_controller:Clean;Contabilidad_view:Clean" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Make">
|
<Target Name="Make">
|
||||||
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;RecibosCliente_model:Make;RecibosCliente_data:Make;RecibosCliente_controller:Make;RecibosCliente_view:Make;RecibosCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make;Contabilidad_controller:Make;FacturasCliente_view:Make;Articulos_view:Make" />
|
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;RecibosCliente_model:Make;RecibosCliente_data:Make;RecibosCliente_controller:Make;RecibosCliente_view:Make;RecibosCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make;FacturasCliente_view:Make;Articulos_view:Make;Contabilidad_controller:Make;Contabilidad_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>
|
||||||
@ -29,7 +29,8 @@ requires
|
|||||||
RecibosCliente_model,
|
RecibosCliente_model,
|
||||||
RecibosCliente_controller,
|
RecibosCliente_controller,
|
||||||
JvGlobusD11R,
|
JvGlobusD11R,
|
||||||
Contactos_view;
|
Contactos_view,
|
||||||
|
Contabilidad_view;
|
||||||
|
|
||||||
contains
|
contains
|
||||||
uRecibosClienteViewRegister in 'uRecibosClienteViewRegister.pas',
|
uRecibosClienteViewRegister in 'uRecibosClienteViewRegister.pas',
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{74e7da8d-38a8-404c-b92c-c3a913b30982}</ProjectGuid>
|
<ProjectGuid>{74e7da8d-38a8-404c-b92c-c3a913b30982}</ProjectGuid>
|
||||||
<MainSource>RecibosCliente_view.dpk</MainSource>
|
<MainSource>RecibosCliente_view.dpk</MainSource>
|
||||||
@ -46,6 +47,7 @@
|
|||||||
<DelphiCompile Include="RecibosCliente_view.dpk">
|
<DelphiCompile Include="RecibosCliente_view.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
|
<DCCReference Include="..\..\Lib\Contabilidad_view.dcp" />
|
||||||
<DCCReference Include="..\..\Lib\Contactos_view.dcp" />
|
<DCCReference Include="..\..\Lib\Contactos_view.dcp" />
|
||||||
<DCCReference Include="..\..\Lib\GUIBase.dcp" />
|
<DCCReference Include="..\..\Lib\GUIBase.dcp" />
|
||||||
<DCCReference Include="..\..\Lib\JvGlobusD11R.dcp" />
|
<DCCReference Include="..\..\Lib\JvGlobusD11R.dcp" />
|
||||||
|
|||||||
Binary file not shown.
@ -3,8 +3,8 @@ object fEditorFechaPago: TfEditorFechaPago
|
|||||||
Top = 0
|
Top = 0
|
||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'Fecha del cobro / devoluci'#243'n'
|
Caption = 'Fecha del cobro / devoluci'#243'n'
|
||||||
ClientHeight = 295
|
ClientHeight = 213
|
||||||
ClientWidth = 383
|
ClientWidth = 535
|
||||||
Color = clWindow
|
Color = clWindow
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -13,25 +13,21 @@ object fEditorFechaPago: TfEditorFechaPago
|
|||||||
Font.Style = []
|
Font.Style = []
|
||||||
OldCreateOrder = False
|
OldCreateOrder = False
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
OnClose = FormClose
|
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
DesignSize = (
|
|
||||||
383
|
|
||||||
295)
|
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 21
|
Left = 39
|
||||||
Top = 16
|
Top = 15
|
||||||
Width = 246
|
Width = 362
|
||||||
Height = 26
|
Height = 13
|
||||||
Caption =
|
Caption =
|
||||||
'Introduzca la fecha en la que se ha hecho efectivo '#13#10'el cobro o ' +
|
'Introduzca la fecha en la que se ha hecho efectivo el cobro o la' +
|
||||||
'la devoluci'#243'n:'
|
' devoluci'#243'n:'
|
||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 39
|
Left = 39
|
||||||
Top = 67
|
Top = 50
|
||||||
Width = 77
|
Width = 77
|
||||||
Height = 13
|
Height = 13
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
@ -40,7 +36,7 @@ object fEditorFechaPago: TfEditorFechaPago
|
|||||||
end
|
end
|
||||||
object eFechaPago: TcxDateEdit
|
object eFechaPago: TcxDateEdit
|
||||||
Left = 122
|
Left = 122
|
||||||
Top = 64
|
Top = 47
|
||||||
Properties.OnChange = eFechaPagoPropertiesChange
|
Properties.OnChange = eFechaPagoPropertiesChange
|
||||||
Style.LookAndFeel.Kind = lfStandard
|
Style.LookAndFeel.Kind = lfStandard
|
||||||
Style.LookAndFeel.NativeStyle = True
|
Style.LookAndFeel.NativeStyle = True
|
||||||
@ -55,8 +51,8 @@ object fEditorFechaPago: TfEditorFechaPago
|
|||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 254
|
Top = 172
|
||||||
Width = 383
|
Width = 535
|
||||||
Height = 41
|
Height = 41
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -80,81 +76,31 @@ object fEditorFechaPago: TfEditorFechaPago
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object eContabilizar: TcxCheckBox
|
inline frViewCajasBancos1: TfrViewCajasBancos
|
||||||
Left = 38
|
|
||||||
Top = 120
|
|
||||||
Caption = 'Ignorar en contabiliad'
|
|
||||||
Properties.ValueChecked = 1
|
|
||||||
Properties.ValueUnchecked = 0
|
|
||||||
Properties.OnChange = eContabilizarPropertiesChange
|
|
||||||
TabOrder = 2
|
|
||||||
Width = 203
|
|
||||||
end
|
|
||||||
object eRefSubCuenta: TcxTextEdit
|
|
||||||
Left = 39
|
Left = 39
|
||||||
Top = 147
|
Top = 83
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Width = 453
|
||||||
AutoSize = False
|
Height = 76
|
||||||
Properties.ReadOnly = True
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Properties.ValidateOnEnter = True
|
Font.Color = clWindowText
|
||||||
Style.BorderColor = clWindowFrame
|
Font.Height = -11
|
||||||
Style.BorderStyle = ebs3D
|
Font.Name = 'Tahoma'
|
||||||
Style.Color = 14745599
|
Font.Style = []
|
||||||
Style.HotTrack = False
|
ParentFont = False
|
||||||
Style.LookAndFeel.NativeStyle = True
|
TabOrder = 2
|
||||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
ReadOnly = False
|
||||||
StyleFocused.LookAndFeel.NativeStyle = True
|
ExplicitLeft = 39
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
ExplicitTop = 83
|
||||||
TabOrder = 3
|
ExplicitHeight = 76
|
||||||
Height = 21
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
Width = 215
|
inherited cbCajasBancos: TcxComboBox
|
||||||
end
|
ExplicitWidth = 376
|
||||||
object eSubCuenta: TcxTextEdit
|
Width = 376
|
||||||
Left = 38
|
end
|
||||||
Top = 174
|
inherited eContabilizar: TcxCheckBox
|
||||||
Anchors = [akLeft, akTop, akRight]
|
ExplicitWidth = 203
|
||||||
AutoSize = False
|
Width = 203
|
||||||
Properties.ReadOnly = True
|
end
|
||||||
Properties.ValidateOnEnter = True
|
end
|
||||||
Style.BorderColor = clWindowFrame
|
|
||||||
Style.BorderStyle = ebs3D
|
|
||||||
Style.Color = 14745599
|
|
||||||
Style.HotTrack = False
|
|
||||||
Style.LookAndFeel.NativeStyle = True
|
|
||||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
|
||||||
StyleFocused.LookAndFeel.NativeStyle = True
|
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
|
||||||
TabOrder = 4
|
|
||||||
Height = 21
|
|
||||||
Width = 297
|
|
||||||
end
|
|
||||||
object BitBtn3: TBitBtn
|
|
||||||
Left = 260
|
|
||||||
Top = 143
|
|
||||||
Width = 75
|
|
||||||
Height = 25
|
|
||||||
Caption = 'Elegir subcuenta'
|
|
||||||
TabOrder = 5
|
|
||||||
OnClick = BitBtn3Click
|
|
||||||
end
|
|
||||||
object eIDSubcuenta: TcxTextEdit
|
|
||||||
Left = 38
|
|
||||||
Top = 201
|
|
||||||
Anchors = [akLeft, akTop, akRight]
|
|
||||||
AutoSize = False
|
|
||||||
Properties.ReadOnly = True
|
|
||||||
Properties.ValidateOnEnter = True
|
|
||||||
Properties.OnChange = eIDSubcuentaPropertiesChange
|
|
||||||
Style.BorderColor = clWindowFrame
|
|
||||||
Style.BorderStyle = ebs3D
|
|
||||||
Style.Color = 14745599
|
|
||||||
Style.HotTrack = False
|
|
||||||
Style.LookAndFeel.NativeStyle = True
|
|
||||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
|
||||||
StyleFocused.LookAndFeel.NativeStyle = True
|
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
|
||||||
TabOrder = 6
|
|
||||||
Height = 21
|
|
||||||
Width = 43
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -6,7 +6,8 @@ uses
|
|||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, StdCtrls, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
|
Dialogs, StdCtrls, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
|
||||||
cxDropDownEdit, cxCalendar, ExtCtrls, uEditorBasico, uIEditorFechaPago,
|
cxDropDownEdit, cxCalendar, ExtCtrls, uEditorBasico, uIEditorFechaPago,
|
||||||
cxCheckBox, uSubCuentasController, Buttons, cxDBEdit;
|
cxCheckBox, uSubCuentasController, Buttons, cxDBEdit, cxGraphics, uCustomView,
|
||||||
|
uViewBase, uViewCajasBancos;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfEditorFechaPago = class(TfEditorBasico, IEditorFechaPago)
|
TfEditorFechaPago = class(TfEditorBasico, IEditorFechaPago)
|
||||||
@ -16,22 +17,12 @@ type
|
|||||||
bCancelar: TButton;
|
bCancelar: TButton;
|
||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
eContabilizar: TcxCheckBox;
|
frViewCajasBancos1: TfrViewCajasBancos;
|
||||||
eRefSubCuenta: TcxTextEdit;
|
|
||||||
eSubCuenta: TcxTextEdit;
|
|
||||||
BitBtn3: TBitBtn;
|
|
||||||
eIDSubcuenta: TcxTextEdit;
|
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure eFechaPagoPropertiesChange(Sender: TObject);
|
procedure eFechaPagoPropertiesChange(Sender: TObject);
|
||||||
procedure eContabilizarPropertiesChange(Sender: TObject);
|
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
||||||
procedure BitBtn3Click(Sender: TObject);
|
procedure BitBtn3Click(Sender: TObject);
|
||||||
procedure eIDSubcuentaPropertiesChange(Sender: TObject);
|
|
||||||
procedure bAceptarClick(Sender: TObject);
|
procedure bAceptarClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
FController : ISubcuentasController;
|
|
||||||
FIdSubCuenta : Integer;
|
|
||||||
FIgnorarContabilidad : Integer;
|
|
||||||
FFechaPago : TDateTime;
|
FFechaPago : TDateTime;
|
||||||
function GetFechaPago: TDateTime;
|
function GetFechaPago: TDateTime;
|
||||||
procedure SetFechaPago(const Value: TDateTime);
|
procedure SetFechaPago(const Value: TDateTime);
|
||||||
@ -44,7 +35,6 @@ type
|
|||||||
property FechaPago: TDateTime Read GetFechaPago write SetFechaPago;
|
property FechaPago: TDateTime Read GetFechaPago write SetFechaPago;
|
||||||
property IgnorarContabilidad: Integer Read GetIgnorarContabilidad write SetIgnorarContabilidad;
|
property IgnorarContabilidad: Integer Read GetIgnorarContabilidad write SetIgnorarContabilidad;
|
||||||
property IdSubCuenta: Integer Read GetIdSubCuenta write SetIdSubCuenta;
|
property IdSubCuenta: Integer Read GetIdSubCuenta write SetIdSubCuenta;
|
||||||
constructor Create(AOwner: TComponent); override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -54,35 +44,24 @@ implementation
|
|||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
uses uBizSubCuentas;
|
//uses uBizSubCuentas;
|
||||||
|
|
||||||
procedure TfEditorFechaPago.bAceptarClick(Sender: TObject);
|
procedure TfEditorFechaPago.bAceptarClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if (not eContabilizar.Checked)
|
// if (not eContabilizar.Checked)
|
||||||
and (eIdSubcuenta.Text = '') then
|
// and (eIdSubcuenta.Text = '') then
|
||||||
raise Exception.Create ('Es necesario que elija la SubCuenta donde se realizará el pago');
|
// raise Exception.Create ('Es necesario que elija la SubCuenta donde se realizará el pago');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorFechaPago.BitBtn3Click(Sender: TObject);
|
procedure TfEditorFechaPago.BitBtn3Click(Sender: TObject);
|
||||||
var
|
//var
|
||||||
ASubCuenta: IBizSubcuenta;
|
// ASubCuenta: IBizSubcuenta;
|
||||||
begin
|
begin
|
||||||
ASubCuenta := FController.ElegirSubCuenta(FController.BuscarTodos,'sssss', False);
|
// ASubCuenta := FController.ElegirSubCuenta(FController.BuscarTodos,'sssss', False);
|
||||||
eIDSubcuenta.Text := IntToStr(ASubcuenta.ID);
|
// eIDSubcuenta.Text := IntToStr(ASubcuenta.ID);
|
||||||
eRefSubCuenta.Text := ASubcuenta.REF_SUBCUENTA;
|
// eRefSubCuenta.Text := ASubcuenta.REF_SUBCUENTA;
|
||||||
eSubCuenta.Text := ASubcuenta.DESCRIPCION;
|
// eSubCuenta.Text := ASubcuenta.DESCRIPCION;
|
||||||
ASubCuenta := Nil;
|
// ASubCuenta := Nil;
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TfEditorFechaPago.Create(AOwner: TComponent);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
FController := TSubcuentasController.Create;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfEditorFechaPago.eContabilizarPropertiesChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
FIgnorarContabilidad := eContabilizar.EditValue;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorFechaPago.eFechaPagoPropertiesChange(Sender: TObject);
|
procedure TfEditorFechaPago.eFechaPagoPropertiesChange(Sender: TObject);
|
||||||
@ -90,22 +69,10 @@ begin
|
|||||||
FechaPago := eFechaPago.Date;
|
FechaPago := eFechaPago.Date;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorFechaPago.eIDSubcuentaPropertiesChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if not VarIsNull(eIDSubCuenta.EditValue) then
|
|
||||||
FIDSubCuenta := eIDSubCuenta.EditValue;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfEditorFechaPago.FormClose(Sender: TObject; var Action: TCloseAction);
|
|
||||||
begin
|
|
||||||
FController := Nil;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfEditorFechaPago.FormShow(Sender: TObject);
|
procedure TfEditorFechaPago.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if (length(eFechaPago.Text) = 0) then
|
if (length(eFechaPago.Text) = 0) then
|
||||||
eFechaPago.Date := Date;
|
eFechaPago.Date := Date;
|
||||||
// FController.
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TfEditorFechaPago.GetFechaPago: TDateTime;
|
function TfEditorFechaPago.GetFechaPago: TDateTime;
|
||||||
@ -115,12 +82,12 @@ end;
|
|||||||
|
|
||||||
function TfEditorFechaPago.GetIdSubCuenta: Integer;
|
function TfEditorFechaPago.GetIdSubCuenta: Integer;
|
||||||
begin
|
begin
|
||||||
Result := eIDSubCuenta.EditValue; //FIdSubCuenta;
|
Result := frViewCajasBancos1.IdSubCuenta;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TfEditorFechaPago.GetIgnorarContabilidad: Integer;
|
function TfEditorFechaPago.GetIgnorarContabilidad: Integer;
|
||||||
begin
|
begin
|
||||||
Result := FIgnorarContabilidad;
|
Result := frViewCajasBancos1.eContabilizar.EditValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorFechaPago.SetFechaPago(const Value: TDateTime);
|
procedure TfEditorFechaPago.SetFechaPago(const Value: TDateTime);
|
||||||
@ -131,13 +98,12 @@ end;
|
|||||||
|
|
||||||
procedure TfEditorFechaPago.SetIdSubCuenta(const Value: Integer);
|
procedure TfEditorFechaPago.SetIdSubCuenta(const Value: Integer);
|
||||||
begin
|
begin
|
||||||
FIdSubCuenta := Value;
|
frViewCajasBancos1.ElegirCajaBanco(Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorFechaPago.SetIgnorarContabilidad(const Value: Integer);
|
procedure TfEditorFechaPago.SetIgnorarContabilidad(const Value: Integer);
|
||||||
begin
|
begin
|
||||||
FIgnorarContabilidad := Value;
|
frViewCajasBancos1.eContabilizar.EditValue := Value;
|
||||||
eContabilizar.EditValue := FIgnorarContabilidad;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -51,6 +51,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
|||||||
inherited pgPaginas: TPageControl
|
inherited pgPaginas: TPageControl
|
||||||
Width = 685
|
Width = 685
|
||||||
Height = 329
|
Height = 329
|
||||||
|
OnChanging = pgPaginasChanging
|
||||||
ExplicitLeft = 3
|
ExplicitLeft = 3
|
||||||
ExplicitTop = 79
|
ExplicitTop = 79
|
||||||
ExplicitWidth = 685
|
ExplicitWidth = 685
|
||||||
@ -295,6 +296,18 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
|||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Width = 677
|
Width = 677
|
||||||
ExplicitWidth = 677
|
ExplicitWidth = 677
|
||||||
|
inherited ToolButton1: TToolButton
|
||||||
|
ExplicitWidth = 113
|
||||||
|
end
|
||||||
|
inherited ToolButton4: TToolButton
|
||||||
|
ExplicitWidth = 113
|
||||||
|
end
|
||||||
|
inherited ToolButton2: TToolButton
|
||||||
|
ExplicitWidth = 113
|
||||||
|
end
|
||||||
|
inherited ToolButton7: TToolButton
|
||||||
|
ExplicitWidth = 113
|
||||||
|
end
|
||||||
inherited ToolButton3: TToolButton
|
inherited ToolButton3: TToolButton
|
||||||
ExplicitWidth = 98
|
ExplicitWidth = 98
|
||||||
end
|
end
|
||||||
|
|||||||
@ -41,6 +41,7 @@ type
|
|||||||
procedure frViewReciboCliImportes1eImportePropertiesEditValueChanged(Sender: TObject);
|
procedure frViewReciboCliImportes1eImportePropertiesEditValueChanged(Sender: TObject);
|
||||||
procedure frViewRecibosCompensados1cxGridViewDataControllerSummaryAfterSummary(ASender: TcxDataSummary);
|
procedure frViewRecibosCompensados1cxGridViewDataControllerSummaryAfterSummary(ASender: TcxDataSummary);
|
||||||
procedure frViewPagosCliente1actAnadirUpdate(Sender: TObject);
|
procedure frViewPagosCliente1actAnadirUpdate(Sender: TObject);
|
||||||
|
procedure pgPaginasChanging(Sender: TObject; var AllowChange: Boolean);
|
||||||
|
|
||||||
private
|
private
|
||||||
FController : IRecibosClienteController;
|
FController : IRecibosClienteController;
|
||||||
@ -72,7 +73,7 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses schRecibosClienteClient_Intf, uEditorFechaPago, uEditorBase, uFactuGES_App;
|
uses uDialogUtils, schRecibosClienteClient_Intf, uEditorFechaPago, uEditorBase, uFactuGES_App;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
@ -289,6 +290,17 @@ begin
|
|||||||
FRecibo.Cliente := frViewReciboCliente1.frViewClienteRecibo.Cliente;
|
FRecibo.Cliente := frViewReciboCliente1.frViewClienteRecibo.Cliente;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorReciboCliente.pgPaginasChanging(Sender: TObject;
|
||||||
|
var AllowChange: Boolean);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
if (not Assigned(FRecibo)) or (FRecibo.ID_CLIENTE = 0) then
|
||||||
|
begin
|
||||||
|
ShowWarningMessage('Antes de introducir los pagos debe elegir un cliente para este recibo');
|
||||||
|
AllowChange := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfEditorReciboCliente.PonerTitulos(const ATitulo: string);
|
procedure TfEditorReciboCliente.PonerTitulos(const ATitulo: string);
|
||||||
var
|
var
|
||||||
FTitulo : String;
|
FTitulo : String;
|
||||||
@ -337,6 +349,9 @@ begin
|
|||||||
frViewPagosCliente1.Pagos := Recibo.Pagos;
|
frViewPagosCliente1.Pagos := Recibo.Pagos;
|
||||||
frViewRecibosCliCompensados1.ReciboCliente := FRecibo;
|
frViewRecibosCliCompensados1.ReciboCliente := FRecibo;
|
||||||
|
|
||||||
|
if FRecibo.EsNuevo and FRecibo.SinFactura then
|
||||||
|
FRecibo.FECHA_VENCIMIENTO := Date;
|
||||||
|
|
||||||
if (FRecibo.SITUACION = CTE_COBRADO) then
|
if (FRecibo.SITUACION = CTE_COBRADO) then
|
||||||
DeshabilitarRecibo
|
DeshabilitarRecibo
|
||||||
else
|
else
|
||||||
|
|||||||
@ -41,7 +41,7 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
|
|||||||
Width = 645
|
Width = 645
|
||||||
ExplicitWidth = 645
|
ExplicitWidth = 645
|
||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
ExplicitWidth = 498
|
ExplicitWidth = 561
|
||||||
end
|
end
|
||||||
inherited tbxMenu: TTBXToolbar
|
inherited tbxMenu: TTBXToolbar
|
||||||
ExplicitWidth = 645
|
ExplicitWidth = 645
|
||||||
@ -176,10 +176,6 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
|
|||||||
inherited actNuevo: TAction
|
inherited actNuevo: TAction
|
||||||
ImageIndex = 22
|
ImageIndex = 22
|
||||||
end
|
end
|
||||||
inherited actEliminar: TAction
|
|
||||||
Enabled = False
|
|
||||||
Visible = False
|
|
||||||
end
|
|
||||||
inherited actPrevisualizar: TAction
|
inherited actPrevisualizar: TAction
|
||||||
Visible = True
|
Visible = True
|
||||||
end
|
end
|
||||||
|
|||||||
@ -45,6 +45,7 @@ type
|
|||||||
JsPrevisualizarDialog: TJSDialog;
|
JsPrevisualizarDialog: TJSDialog;
|
||||||
JsImprimirDialog: TJSDialog;
|
JsImprimirDialog: TJSDialog;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure actEliminarUpdate(Sender: TObject);
|
||||||
private
|
private
|
||||||
FRecibosCliente: IBizRecibosCliente;
|
FRecibosCliente: IBizRecibosCliente;
|
||||||
FController : IRecibosClienteController;
|
FController : IRecibosClienteController;
|
||||||
@ -81,6 +82,13 @@ uses
|
|||||||
{
|
{
|
||||||
*************************** TfEditorRecibosCliente ***************************
|
*************************** TfEditorRecibosCliente ***************************
|
||||||
}
|
}
|
||||||
|
procedure TfEditorRecibosCliente.actEliminarUpdate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
if (Sender as TAction).Enabled then
|
||||||
|
(Sender as TAction).Enabled := (FRecibosCliente.SITUACION = CTE_PENDIENTE) AND (FRecibosCliente.ID_FACTURA < 1);
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TfEditorRecibosCliente.Create(AOwner: TComponent);
|
constructor TfEditorRecibosCliente.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
@ -101,9 +109,52 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorRecibosCliente.EliminarInterno;
|
procedure TfEditorRecibosCliente.EliminarInterno;
|
||||||
|
var
|
||||||
|
ARecibos: IBizRecibosCliente;
|
||||||
|
AllItems: Boolean;
|
||||||
begin
|
begin
|
||||||
//
|
ARecibos := Nil;
|
||||||
//No se pueden eliminar recibos
|
AllItems := False;
|
||||||
|
|
||||||
|
if MultiSelect and Assigned(ViewGrid) then
|
||||||
|
AllItems := (ViewGrid.NumSeleccionados > 1);
|
||||||
|
|
||||||
|
if AllItems then
|
||||||
|
begin
|
||||||
|
if (Application.MessageBox('¿Desea borrar los recibos de cliente seleccionados?', 'Atención', MB_YESNO) = IDYES) then
|
||||||
|
begin
|
||||||
|
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (RecibosCliente as ISeleccionable).SelectedRecords);
|
||||||
|
ARecibos := (Controller as IRecibosClienteController).ExtraerSeleccionados(RecibosCliente) as IBizRecibosCliente;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
if (Application.MessageBox('¿Desea borrar el recibo de cliente seleccionado?', 'Atención', MB_YESNO) = IDYES) then
|
||||||
|
ARecibos := RecibosCliente;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Assigned(ARecibos) then
|
||||||
|
begin
|
||||||
|
FController.Eliminar(ARecibos, AllItems);
|
||||||
|
if AllItems then
|
||||||
|
begin
|
||||||
|
if (ARecibos.DataTable.RecordCount > 0) then
|
||||||
|
begin
|
||||||
|
with ARecibos.DataTable do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not EOF do
|
||||||
|
begin
|
||||||
|
// JsListaPresupuestosNoEliminados.Content.Add('Ref. Presupuesto: ' + APresupuestos.REFERENCIA + ' ' + APresupuestos.NOMBRE);
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
// JsListaRecibosNoEliminados.Execute;
|
||||||
|
end;
|
||||||
|
actRefrescar.Execute;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ViewGrid.GotoFirst;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorRecibosCliente.FormShow(Sender: TObject);
|
procedure TfEditorRecibosCliente.FormShow(Sender: TObject);
|
||||||
|
|||||||
@ -128,7 +128,7 @@ begin
|
|||||||
if Assigned(FRecibo) then
|
if Assigned(FRecibo) then
|
||||||
begin
|
begin
|
||||||
DADataSource.DataTable := FRecibo.DataTable;
|
DADataSource.DataTable := FRecibo.DataTable;
|
||||||
if FRecibo.ConFactura then
|
if FRecibo.SinFactura then
|
||||||
begin
|
begin
|
||||||
dxLayoutControlFactura.Visible := false;
|
dxLayoutControlFactura.Visible := false;
|
||||||
dxLayoutControlCliente.Visible := false;
|
dxLayoutControlCliente.Visible := false;
|
||||||
|
|||||||
@ -58,6 +58,7 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
|
|||||||
object cxGridViewREFERENCIA_REC_COMPENSADO: TcxGridDBColumn
|
object cxGridViewREFERENCIA_REC_COMPENSADO: TcxGridDBColumn
|
||||||
Caption = 'Ref. recibo compensado'
|
Caption = 'Ref. recibo compensado'
|
||||||
DataBinding.FieldName = 'REFERENCIA_REC_COMPENSADO'
|
DataBinding.FieldName = 'REFERENCIA_REC_COMPENSADO'
|
||||||
|
Visible = False
|
||||||
VisibleForCustomization = False
|
VisibleForCustomization = False
|
||||||
end
|
end
|
||||||
object cxGridViewSITUACION: TcxGridDBColumn
|
object cxGridViewSITUACION: TcxGridDBColumn
|
||||||
@ -160,17 +161,9 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
|
|||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
Width = 531
|
Width = 531
|
||||||
ExplicitWidth = 531
|
ExplicitWidth = 531
|
||||||
inherited txtFiltroTodo: TcxTextEdit
|
|
||||||
ExplicitWidth = 273
|
|
||||||
Width = 273
|
|
||||||
end
|
|
||||||
inherited edtFechaIniFiltro: TcxDateEdit
|
|
||||||
ExplicitWidth = 121
|
|
||||||
Width = 121
|
|
||||||
end
|
|
||||||
inherited edtFechaFinFiltro: TcxDateEdit
|
inherited edtFechaFinFiltro: TcxDateEdit
|
||||||
Left = 229
|
Left = 287
|
||||||
ExplicitLeft = 229
|
ExplicitLeft = 287
|
||||||
ExplicitWidth = 287
|
ExplicitWidth = 287
|
||||||
Width = 287
|
Width = 287
|
||||||
end
|
end
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
<Projects Include="..\..\Cliente\FactuGES.dproj" />
|
<Projects Include="..\..\Cliente\FactuGES.dproj" />
|
||||||
<Projects Include="..\..\GUIBase\GUIBase.dproj" />
|
<Projects Include="..\..\GUIBase\GUIBase.dproj" />
|
||||||
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
||||||
|
<Projects Include="..\Recibos de cliente\Controller\RecibosCliente_controller.dproj" />
|
||||||
<Projects Include="Controller\RemesasCliente_controller.dproj" />
|
<Projects Include="Controller\RemesasCliente_controller.dproj" />
|
||||||
<Projects Include="Data\RemesasCliente_data.dproj" />
|
<Projects Include="Data\RemesasCliente_data.dproj" />
|
||||||
<Projects Include="Model\RemesasCliente_model.dproj" />
|
<Projects Include="Model\RemesasCliente_model.dproj" />
|
||||||
@ -111,14 +112,23 @@
|
|||||||
<Target Name="FactuGES_Server:Make">
|
<Target Name="FactuGES_Server:Make">
|
||||||
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
|
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<Target Name="RecibosCliente_controller">
|
||||||
|
<MSBuild Projects="..\Recibos de cliente\Controller\RecibosCliente_controller.dproj" Targets="" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="RecibosCliente_controller:Clean">
|
||||||
|
<MSBuild Projects="..\Recibos de cliente\Controller\RecibosCliente_controller.dproj" Targets="Clean" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="RecibosCliente_controller:Make">
|
||||||
|
<MSBuild Projects="..\Recibos de cliente\Controller\RecibosCliente_controller.dproj" Targets="Make" />
|
||||||
|
</Target>
|
||||||
<Target Name="Build">
|
<Target Name="Build">
|
||||||
<CallTarget Targets="Base;GUIBase;ApplicationBase;RemesasCliente_model;RemesasCliente_data;RemesasCliente_controller;RemesasCliente_view;RemesasCliente_plugin;FactuGES;FactuGES_Server" />
|
<CallTarget Targets="Base;GUIBase;ApplicationBase;RemesasCliente_model;RemesasCliente_data;RemesasCliente_controller;RemesasCliente_view;RemesasCliente_plugin;FactuGES;FactuGES_Server;RecibosCliente_controller" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Clean">
|
<Target Name="Clean">
|
||||||
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;RemesasCliente_model:Clean;RemesasCliente_data:Clean;RemesasCliente_controller:Clean;RemesasCliente_view:Clean;RemesasCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean" />
|
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;RemesasCliente_model:Clean;RemesasCliente_data:Clean;RemesasCliente_controller:Clean;RemesasCliente_view:Clean;RemesasCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;RecibosCliente_controller:Clean" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Make">
|
<Target Name="Make">
|
||||||
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;RemesasCliente_model:Make;RemesasCliente_data:Make;RemesasCliente_controller:Make;RemesasCliente_view:Make;RemesasCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make" />
|
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;RemesasCliente_model:Make;RemesasCliente_data:Make;RemesasCliente_controller:Make;RemesasCliente_view:Make;RemesasCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make;RecibosCliente_controller: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>
|
||||||
@ -405,6 +405,8 @@
|
|||||||
</Parameter>
|
</Parameter>
|
||||||
<Parameter Name="ID_EMPRESA" DataType="Integer" Flag="In" >
|
<Parameter Name="ID_EMPRESA" DataType="Integer" Flag="In" >
|
||||||
</Parameter>
|
</Parameter>
|
||||||
|
<Parameter Name="CLIENTE" DataType="String" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
</Operation>
|
</Operation>
|
||||||
<Operation Name="AnadirSubCuentaProveedor" UID="{E2D673BB-FA95-456D-805D-EB75C9361C54}">
|
<Operation Name="AnadirSubCuentaProveedor" UID="{E2D673BB-FA95-456D-805D-EB75C9361C54}">
|
||||||
@ -417,6 +419,8 @@
|
|||||||
</Parameter>
|
</Parameter>
|
||||||
<Parameter Name="ID_EMPRESA" DataType="Integer" Flag="In" >
|
<Parameter Name="ID_EMPRESA" DataType="Integer" Flag="In" >
|
||||||
</Parameter>
|
</Parameter>
|
||||||
|
<Parameter Name="PROVEEDOR" DataType="String" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
</Operation>
|
</Operation>
|
||||||
</Operations>
|
</Operations>
|
||||||
|
|||||||
@ -616,8 +616,8 @@ type
|
|||||||
IsrvContabilidad = interface(IDataAbstractService)
|
IsrvContabilidad = interface(IDataAbstractService)
|
||||||
['{04CDF2E1-EFC2-4247-AA4F-09BE782C73FA}']
|
['{04CDF2E1-EFC2-4247-AA4F-09BE782C73FA}']
|
||||||
function TieneCuentaAsociada(const ID_CONTACTO: Integer; const ID_EMPRESA: Integer): Boolean;
|
function TieneCuentaAsociada(const ID_CONTACTO: Integer; const ID_EMPRESA: Integer): Boolean;
|
||||||
function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean;
|
function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const CLIENTE: String): Boolean;
|
||||||
function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean;
|
function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const PROVEEDOR: String): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ CosrvContabilidad }
|
{ CosrvContabilidad }
|
||||||
@ -631,8 +631,8 @@ type
|
|||||||
function __GetInterfaceName:string; override;
|
function __GetInterfaceName:string; override;
|
||||||
|
|
||||||
function TieneCuentaAsociada(const ID_CONTACTO: Integer; const ID_EMPRESA: Integer): Boolean;
|
function TieneCuentaAsociada(const ID_CONTACTO: Integer; const ID_EMPRESA: Integer): Boolean;
|
||||||
function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean;
|
function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const CLIENTE: String): Boolean;
|
||||||
function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean;
|
function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const PROVEEDOR: String): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ IsrvUnidadesMedida }
|
{ IsrvUnidadesMedida }
|
||||||
@ -1646,13 +1646,14 @@ begin
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TsrvContabilidad_Proxy.AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean;
|
function TsrvContabilidad_Proxy.AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const CLIENTE: String): Boolean;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'AnadirSubCuentaCliente');
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'AnadirSubCuentaCliente');
|
||||||
__Message.Write('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
__Message.Write('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
||||||
__Message.Write('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
__Message.Write('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
||||||
__Message.Write('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
__Message.Write('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
||||||
|
__Message.Write('CLIENTE', TypeInfo(String), CLIENTE, []);
|
||||||
__Message.Finalize;
|
__Message.Finalize;
|
||||||
|
|
||||||
__TransportChannel.Dispatch(__Message);
|
__TransportChannel.Dispatch(__Message);
|
||||||
@ -1664,13 +1665,14 @@ begin
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TsrvContabilidad_Proxy.AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean;
|
function TsrvContabilidad_Proxy.AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const PROVEEDOR: String): Boolean;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'AnadirSubCuentaProveedor');
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'AnadirSubCuentaProveedor');
|
||||||
__Message.Write('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
__Message.Write('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
||||||
__Message.Write('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
__Message.Write('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
||||||
__Message.Write('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
__Message.Write('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
||||||
|
__Message.Write('PROVEEDOR', TypeInfo(String), PROVEEDOR, []);
|
||||||
__Message.Finalize;
|
__Message.Finalize;
|
||||||
|
|
||||||
__TransportChannel.Dispatch(__Message);
|
__TransportChannel.Dispatch(__Message);
|
||||||
|
|||||||
@ -804,19 +804,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TsrvContabilidad_Invoker.Invoke_AnadirSubCuentaCliente(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure TsrvContabilidad_Invoker.Invoke_AnadirSubCuentaCliente(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
{ function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean; }
|
{ function AnadirSubCuentaCliente(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const CLIENTE: String): Boolean; }
|
||||||
var
|
var
|
||||||
ID_CONTACTO: Integer;
|
ID_CONTACTO: Integer;
|
||||||
ID_TIENDA: Integer;
|
ID_TIENDA: Integer;
|
||||||
ID_EMPRESA: Integer;
|
ID_EMPRESA: Integer;
|
||||||
|
CLIENTE: String;
|
||||||
lResult: Boolean;
|
lResult: Boolean;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
__Message.Read('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
__Message.Read('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
||||||
__Message.Read('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
__Message.Read('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
||||||
__Message.Read('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
__Message.Read('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
||||||
|
__Message.Read('CLIENTE', TypeInfo(String), CLIENTE, []);
|
||||||
|
|
||||||
lResult := (__Instance as IsrvContabilidad).AnadirSubCuentaCliente(ID_CONTACTO, ID_TIENDA, ID_EMPRESA);
|
lResult := (__Instance as IsrvContabilidad).AnadirSubCuentaCliente(ID_CONTACTO, ID_TIENDA, ID_EMPRESA, CLIENTE);
|
||||||
|
|
||||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContabilidad', 'AnadirSubCuentaClienteResponse');
|
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContabilidad', 'AnadirSubCuentaClienteResponse');
|
||||||
__Message.Write('Result', TypeInfo(Boolean), lResult, []);
|
__Message.Write('Result', TypeInfo(Boolean), lResult, []);
|
||||||
@ -828,19 +830,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TsrvContabilidad_Invoker.Invoke_AnadirSubCuentaProveedor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure TsrvContabilidad_Invoker.Invoke_AnadirSubCuentaProveedor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
{ function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer): Boolean; }
|
{ function AnadirSubCuentaProveedor(const ID_CONTACTO: Integer; const ID_TIENDA: Integer; const ID_EMPRESA: Integer; const PROVEEDOR: String): Boolean; }
|
||||||
var
|
var
|
||||||
ID_CONTACTO: Integer;
|
ID_CONTACTO: Integer;
|
||||||
ID_TIENDA: Integer;
|
ID_TIENDA: Integer;
|
||||||
ID_EMPRESA: Integer;
|
ID_EMPRESA: Integer;
|
||||||
|
PROVEEDOR: String;
|
||||||
lResult: Boolean;
|
lResult: Boolean;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
__Message.Read('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
__Message.Read('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
||||||
__Message.Read('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
__Message.Read('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
||||||
__Message.Read('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
__Message.Read('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
||||||
|
__Message.Read('PROVEEDOR', TypeInfo(String), PROVEEDOR, []);
|
||||||
|
|
||||||
lResult := (__Instance as IsrvContabilidad).AnadirSubCuentaProveedor(ID_CONTACTO, ID_TIENDA, ID_EMPRESA);
|
lResult := (__Instance as IsrvContabilidad).AnadirSubCuentaProveedor(ID_CONTACTO, ID_TIENDA, ID_EMPRESA, PROVEEDOR);
|
||||||
|
|
||||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContabilidad', 'AnadirSubCuentaProveedorResponse');
|
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContabilidad', 'AnadirSubCuentaProveedorResponse');
|
||||||
__Message.Write('Result', TypeInfo(Boolean), lResult, []);
|
__Message.Write('Result', TypeInfo(Boolean), lResult, []);
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -30,18 +30,6 @@
|
|||||||
<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">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</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"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">3.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">lunes, 19 de noviembre de 2007 18:58</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">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</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"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">3.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">lunes, 19 de noviembre de 2007 18:58</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages>
|
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</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>
|
||||||
|
|||||||
@ -14,7 +14,7 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileVersion", "1.0.0.0\0"
|
VALUE "FileVersion", "1.0.0.0\0"
|
||||||
VALUE "ProductVersion", "1.0.0.0\0"
|
VALUE "ProductVersion", "1.0.0.0\0"
|
||||||
VALUE "CompileDate", "miércoles, 27 de febrero de 2008 12:36\0"
|
VALUE "CompileDate", "jueves, 28 de febrero de 2008 17:38\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user