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
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE CONT_ASIENTOS (
|
||||
ID TIPO_ID NOT NULL,
|
||||
FECHA_ASIENTO DATE,
|
||||
@ -4073,8 +4072,8 @@ begin
|
||||
RECIBOS_CLIENTE.IMPORTE, CONT_SUBCUENTAS.ID, CONT_SUBCUENTAS.ID_EJERCICIO
|
||||
FROM PAGOS_CLIENTE
|
||||
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 CONT_SUBCUENTAS ON (CONT_SUBCUENTAS.ID_CONTACTO = FACTURAS_CLIENTE.ID_CLIENTE)
|
||||
/* 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 = RECIBOS_CLIENTE.ID_CLIENTE)
|
||||
WHERE PAGOS_CLIENTE.ID = :IDPAGO INTO :IGNORARCONTABILIDAD, :REFERENCIARECIBO,
|
||||
:FECHAPAGO, :TIPOPAGO, :IMPORTE, :IDSUBCUENTA, :IDEJERCICIO;
|
||||
|
||||
@ -4408,3 +4407,12 @@ end
|
||||
|
||||
|
||||
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">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</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="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">
|
||||
<Form>fConfigurarConexion</Form>
|
||||
<DesignClass>TForm</DesignClass>
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
||||
<Projects Include="..\Articulos\Views\Articulos_view.dproj" />
|
||||
<Projects Include="..\Contactos\Controller\Contactos_controller.dproj" />
|
||||
<Projects Include="..\Contactos\Model\Contactos_model.dproj" />
|
||||
<Projects Include="..\Contactos\Views\Contactos_view.dproj" />
|
||||
<Projects Include="..\Facturas de cliente\Views\FacturasCliente_view.dproj" />
|
||||
<Projects Include="..\Facturas de proveedor\Views\FacturasProveedor_view.dproj" />
|
||||
@ -53,6 +54,15 @@
|
||||
<Target Name="ApplicationBase:Make">
|
||||
<MSBuild Projects="..\..\ApplicationBase\ApplicationBase.dproj" Targets="Make" />
|
||||
</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">
|
||||
<MSBuild Projects="..\Contactos\Controller\Contactos_controller.dproj" Targets="" />
|
||||
</Target>
|
||||
@ -162,13 +172,13 @@
|
||||
<MSBuild Projects="..\Articulos\Views\Articulos_view.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<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 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 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>
|
||||
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
||||
</Project>
|
||||
@ -10,11 +10,13 @@ uses
|
||||
const
|
||||
// (REF_CUENTA = 430 SOLO CUENTAS DE CLIENTES)
|
||||
// (REF_CUENTA = 400 SOLO CUENTAS DE PROVEEDORES)
|
||||
// (REF_CUENTA = 570 SOLO CUENTAS DE CLIENTES)
|
||||
// (REF_CUENTA = 400 SOLO CUENTAS DE PROVEEDORES)
|
||||
// (REF_CUENTA = 570 SOLO CUENTAS DE CAJA)
|
||||
// (REF_CUENTA = 572 SOLO CUENTAS DE BANCO)
|
||||
|
||||
CTE_CUENTASCLIENTE = '430';
|
||||
CTE_CUENTASPROVEEDOR = '400';
|
||||
CTE_CUENTASCLIENTE = 430;
|
||||
CTE_CUENTASPROVEEDOR = 400;
|
||||
CTE_CUENTASCAJA = 570;
|
||||
CTE_CUENTASBANCO = 572;
|
||||
|
||||
type
|
||||
ISubCuentasController = interface(IObservador)
|
||||
@ -35,15 +37,18 @@ type
|
||||
function ElegirSubCuenta(ASubCuentas : IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
|
||||
procedure ElegirCuenta(ASubCuenta: IBizSubCuenta);
|
||||
|
||||
procedure ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
procedure ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||
procedure VerSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
|
||||
function DarListaCajasBancos: TStringList;
|
||||
end;
|
||||
|
||||
TSubCuentasController = class(TObservador, ISubCuentasController)
|
||||
private
|
||||
function BuscarCuentas(TipoCuenta: String): IBizSubCuenta;
|
||||
function BuscarCuentas(const REF_CUENTA: Integer): IBizSubCuenta;
|
||||
function BuscarCuentasLibres(TipoCuenta: Integer): IBizSubCuenta;
|
||||
procedure AsignarSubCuentaAContacto(ASubCuenta: IBizSubCuenta; ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
|
||||
protected
|
||||
@ -66,6 +71,7 @@ type
|
||||
procedure Anadir(ASubCuenta : IBizSubCuenta);
|
||||
function Nuevo : IBizSubCuenta;
|
||||
function BuscarTodos: IBizSubCuenta;
|
||||
function BuscarCajasBancos: IBizSubCuenta;
|
||||
function Buscar(ID: Integer): IBizSubCuenta;
|
||||
procedure VerTodos(ASubCuentas: IBizSubCuenta);
|
||||
procedure Ver(ASubCuenta: IBizSubCuenta);
|
||||
@ -76,10 +82,12 @@ type
|
||||
function ElegirSubCuenta(ASubCuentas : IBizSubCuenta; AMensaje: String; AMultiSelect: Boolean): IBizSubCuenta;
|
||||
procedure ElegirCuenta(ASubCuenta: IBizSubCuenta);
|
||||
|
||||
procedure ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
procedure ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||
procedure VerSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
procedure AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||
procedure EliminarSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto);
|
||||
|
||||
function DarListaCajasBancos: TStringList;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -98,7 +106,7 @@ begin
|
||||
ASubCuenta.Insert;
|
||||
end;
|
||||
|
||||
procedure TSubCuentasController.AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
procedure TSubCuentasController.AnadirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||
var
|
||||
ASubCuenta: IBizSubCuenta;
|
||||
begin
|
||||
@ -150,10 +158,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSubCuentasController.BuscarCuentas(TipoCuenta: String): IBizSubCuenta;
|
||||
function TSubCuentasController.BuscarCajasBancos: IBizSubCuenta;
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
Condicion1: TDAWhereExpression;
|
||||
Condicion2: TDAWhereExpression;
|
||||
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
@ -161,16 +171,63 @@ begin
|
||||
|
||||
with Result.DataTable.DynamicWhere do
|
||||
begin
|
||||
// (REF_CUENTA = 430/400) (SOLO CUENTAS DE CLIENTES, PROVEEDORES QUE ESTEN SIN ASIGNAR)
|
||||
Condicion1 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(TipoCuenta, datString), dboEqual);
|
||||
Condicion2 := NewBinaryExpression(NewField('', fld_SubCuentasID_CONTACTO), NewNull(), dboEqual);
|
||||
// (REF_CUENTAS = 570 cajas)
|
||||
Condicion1 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASCAJA, datInteger), dboEqual);
|
||||
// (REF_CUENTAS = 572 bancos)
|
||||
Condicion2 := NewBinaryExpression(NewField('', fld_SubCuentasREF_CUENTA), NewConstant(CTE_CUENTASBANCO, datInteger), dboEqual);
|
||||
Condicion := NewBinaryExpression(Condicion1, Condicion2, dboOr);
|
||||
|
||||
if IsEmpty then
|
||||
Expression := Condicion1
|
||||
Expression := Condicion
|
||||
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;
|
||||
|
||||
finally
|
||||
@ -195,6 +252,31 @@ begin
|
||||
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
|
||||
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;
|
||||
var
|
||||
ASubCuentas: IBizSubCuenta;
|
||||
@ -376,11 +458,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSubCuentasController.ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: String);
|
||||
procedure TSubCuentasController.ElegirSubCuentaContacto(ASubCuentaContacto: IBizSubCuentasContacto; TipoCuenta: Integer);
|
||||
var
|
||||
ASubCuenta: IBizSubCuenta;
|
||||
begin
|
||||
ASubCuenta := BuscarCuentas(TipoCuenta);
|
||||
ASubCuenta := BuscarCuentasLibres(TipoCuenta);
|
||||
|
||||
if (TipoCuenta = CTE_CUENTASCLIENTE) then
|
||||
ASubCuenta := ElegirSubCuenta(ASubCuenta, 'El cliente debe tener una subcuenta asociada', False)
|
||||
else
|
||||
|
||||
@ -338,6 +338,41 @@ object srvContabilidad: TsrvContabilidad
|
||||
DataDictionary = DataDictionary
|
||||
Diagrams = Diagrams
|
||||
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
|
||||
Params = <
|
||||
item
|
||||
|
||||
@ -10,7 +10,7 @@ unit srvContabilidad_Impl;
|
||||
interface
|
||||
|
||||
uses
|
||||
{vcl:} Classes, SysUtils,
|
||||
{vcl:} Classes, SysUtils,
|
||||
{RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
|
||||
{Ancestor Implementation:} DataAbstractService_Impl,
|
||||
{Used RODLs:} DataAbstract4_Intf,
|
||||
@ -41,9 +41,8 @@ type
|
||||
|
||||
public
|
||||
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 AnadirSubCuentaProveedor(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; const PROVEEDOR: String): Boolean;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -59,7 +58,7 @@ begin
|
||||
end;
|
||||
|
||||
{ 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
|
||||
AConn : IDAConnection;
|
||||
dsData: IDADataset;
|
||||
@ -69,7 +68,7 @@ var
|
||||
NumCuenta: Integer;
|
||||
RefTienda: String;
|
||||
NumTienda: Integer;
|
||||
|
||||
IDCuenta: Integer;
|
||||
|
||||
begin
|
||||
Result := False;
|
||||
@ -101,6 +100,15 @@ begin
|
||||
RefTienda := format('%.2d', [NumTienda]);
|
||||
RefSubCuenta := IntToStr(REFERENCIA_CLIENTES) + RefTienda + RefSubCuenta;
|
||||
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;
|
||||
|
||||
except
|
||||
@ -111,16 +119,14 @@ begin
|
||||
dsData := NIL;
|
||||
end;
|
||||
|
||||
// AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
|
||||
|
||||
try
|
||||
try
|
||||
dsCommand := schContabilidad.NewCommand(AConn, 'AnadirSubCuenta');
|
||||
with dsCommand do
|
||||
begin
|
||||
ParamByName('REFERENCIA').AsString := RefSubCuenta;
|
||||
ParamByName('DESCRIPCION').AsString := 'Cuenta de Clieeeeeeeeeeeeeeeeeeeeeeente';
|
||||
ParamByName('ID_CUENTA').AsInteger := 1;
|
||||
ParamByName('DESCRIPCION').AsString := 'Cuenta de cliente ' + CLIENTE;
|
||||
ParamByName('ID_CUENTA').AsInteger := IDCuenta;
|
||||
ParamByName('ID_EJERCICIO').AsInteger := darEjercicioActivo(ID_EMPRESA);
|
||||
ParamByName('ID_CONTACTO').AsInteger := ID_CONTACTO;
|
||||
end;
|
||||
@ -136,9 +142,88 @@ begin
|
||||
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
|
||||
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;
|
||||
|
||||
function TsrvContabilidad.darEjercicioActivo(const ID_EMPRESA: Integer): Integer;
|
||||
|
||||
@ -29,7 +29,23 @@ requires
|
||||
GUIBase,
|
||||
ApplicationBase,
|
||||
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
|
||||
uEditorBalance in 'uEditorBalance.pas' {fEditorBalance: TfEditorBalances},
|
||||
@ -61,6 +77,7 @@ contains
|
||||
uViewApuntes in 'uViewApuntes.pas' {frViewApuntes: TFrame},
|
||||
uEditorAsiento in 'uEditorAsiento.pas' {fEditorAsiento: 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.
|
||||
|
||||
@ -48,10 +48,23 @@
|
||||
<DelphiCompile Include="Contabilidad_view.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\ApplicationBase.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Contabilidad_controller.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Contabilidad_model.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
|
||||
<DCCReference Include="adortl.dcp" />
|
||||
<DCCReference Include="ApplicationBase.dcp" />
|
||||
<DCCReference Include="Contabilidad_controller.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">
|
||||
<Form>frViewEpigrafes</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
@ -140,6 +153,10 @@
|
||||
<Form>frViewBalances</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uViewCajasBancos.pas">
|
||||
<Form>frViewApunte</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uViewCuenta.pas">
|
||||
<Form>frViewCuenta</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
@ -172,6 +189,9 @@
|
||||
<Form>frViewSubCuentas</Form>
|
||||
<DesignClass>TFrame</DesignClass>
|
||||
</DCCReference>
|
||||
<DCCReference Include="vcl.dcp" />
|
||||
<DCCReference Include="vcldb.dcp" />
|
||||
<DCCReference Include="vcljpg.dcp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<!-- 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 BuscarTodosTiendaWeb: IBizCliente;
|
||||
function Nuevo : IBizContacto; override;
|
||||
function Guardar(AContacto : IBizContacto): Boolean; override;
|
||||
procedure Ver(AContacto : IBizContacto); override;
|
||||
procedure VerTodos(AContactos: IBizContacto); override;
|
||||
function ElegirContacto(AContactos : IBizContacto;
|
||||
@ -207,6 +208,12 @@ begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TClientesController.Guardar(AContacto: IBizContacto): Boolean;
|
||||
begin
|
||||
Result := inherited Guardar(AContacto);
|
||||
(AContacto as IBizCliente).SubCuentas.DataTable.Refresh;
|
||||
end;
|
||||
|
||||
function TClientesController.Nuevo: IBizContacto;
|
||||
var
|
||||
AContacto : IBizCliente;
|
||||
|
||||
@ -42,7 +42,7 @@ type
|
||||
|
||||
procedure Eliminar(const ID : Integer); 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;
|
||||
function Existe(const ID: Integer) : Boolean; virtual;
|
||||
procedure Anadir(AContacto : IBizContacto); virtual;
|
||||
|
||||
@ -30,6 +30,7 @@ type
|
||||
function BuscarTodos: IBizContacto; override;
|
||||
function BuscarTodosTiendaWeb: IBizProveedor;
|
||||
function Nuevo : IBizContacto; override;
|
||||
function Guardar(AContacto : IBizContacto): Boolean; override;
|
||||
procedure Ver(AContacto : IBizContacto); override;
|
||||
procedure VerTodos(AContactos: IBizContacto); override;
|
||||
function ElegirContacto(AContactos : IBizContacto;
|
||||
@ -198,6 +199,12 @@ begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TProveedoresController.Guardar(AContacto: IBizContacto): Boolean;
|
||||
begin
|
||||
Result := inherited Guardar(AContacto);
|
||||
(AContacto as IBizProveedor).SubCuentas.DataTable.Refresh;
|
||||
end;
|
||||
|
||||
function TProveedoresController.Nuevo: IBizContacto;
|
||||
var
|
||||
AContacto : IBizProveedor;
|
||||
@ -289,10 +296,6 @@ begin
|
||||
begin
|
||||
if (SubCuentas.DataTable.State in dsEditModes) then
|
||||
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;
|
||||
|
||||
@ -53,9 +53,11 @@ var
|
||||
ASchema : TDASchema;
|
||||
ACurrentConn : IDAConnection;
|
||||
ACommand : IDASQLCommand;
|
||||
|
||||
idCliente: integer;
|
||||
idTienda: integer;
|
||||
idEmpresa: integer;
|
||||
NombreComercial: string;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
@ -91,11 +93,12 @@ begin
|
||||
begin
|
||||
with TsrvContabilidad.Create(NIL) do
|
||||
try
|
||||
idCliente := aChange.NewValueByName[fld_ClientesID];
|
||||
idTienda := aChange.NewValueByName[fld_ClientesID_TIENDA];
|
||||
idEmpresa := aChange.NewValueByName[fld_ClientesID_EMPRESA];
|
||||
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);
|
||||
AnadirSubCuentaCliente(idCliente, idTienda, idEmpresa, NombreComercial);
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
@ -112,6 +115,12 @@ var
|
||||
ASchema : TDASchema;
|
||||
ACurrentConn : IDAConnection;
|
||||
ACommand : IDASQLCommand;
|
||||
|
||||
idCliente: integer;
|
||||
idTienda: integer;
|
||||
idEmpresa: integer;
|
||||
NombreComercial: string;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -140,6 +149,25 @@ begin
|
||||
ParamByName('PROCEDENCIA_CLIENTE').Value := aChange.NewValueByName[fld_ClientesPROCEDENCIA_CLIENTE];
|
||||
Execute;
|
||||
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
|
||||
ACommand := NIL;
|
||||
end;
|
||||
|
||||
@ -646,7 +646,7 @@ begin
|
||||
BLOQUEADO := 0;
|
||||
RECARGO_EQUIVALENCIA := CLIENTE_RECARGO_EQUIVALENCIA;
|
||||
REGIMEN_IVA := CLIENTE_REGIMEN_IVA;
|
||||
IGNORAR_CONTABILIDAD := 1;
|
||||
IGNORAR_CONTABILIDAD := 0;
|
||||
end;
|
||||
|
||||
{ TBizProveedor }
|
||||
@ -696,7 +696,7 @@ begin
|
||||
inherited;
|
||||
ID_CATEGORIA := CATEGORIA_PROVEEDOR;
|
||||
REGIMEN_IVA := PROVEEDOR_REGIMEN_IVA;
|
||||
IGNORAR_CONTABILIDAD := 1;
|
||||
IGNORAR_CONTABILIDAD := 0;
|
||||
end;
|
||||
|
||||
constructor TBizProveedor.Create(aDataTable: TDADataTable);
|
||||
|
||||
@ -20,7 +20,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
uDataModuleServer, uDAClasses,
|
||||
uDataModuleServer, uDAClasses, srvContabilidad_Impl,
|
||||
schContactosClient_Intf, uBusinessUtils;
|
||||
|
||||
{ TBizProveedorServer }
|
||||
@ -53,6 +53,12 @@ var
|
||||
ASchema : TDASchema;
|
||||
ACurrentConn : IDAConnection;
|
||||
ACommand : IDASQLCommand;
|
||||
|
||||
idProveedor: integer;
|
||||
idTienda: integer;
|
||||
idEmpresa: integer;
|
||||
Nombre: string;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -77,6 +83,23 @@ begin
|
||||
ParamByName('IGNORAR_CONTABILIDAD').Value := aChange.NewValueByName[fld_ProveedoresIGNORAR_CONTABILIDAD];
|
||||
Execute;
|
||||
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
|
||||
ACommand := NIL;
|
||||
end;
|
||||
@ -88,6 +111,12 @@ var
|
||||
ASchema : TDASchema;
|
||||
ACurrentConn : IDAConnection;
|
||||
ACommand : IDASQLCommand;
|
||||
|
||||
idProveedor: integer;
|
||||
idTienda: integer;
|
||||
idEmpresa: integer;
|
||||
Nombre: string;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -113,6 +142,25 @@ begin
|
||||
ParamByName('IGNORAR_CONTABILIDAD').Value := aChange.NewValueByName[fld_ProveedoresIGNORAR_CONTABILIDAD];
|
||||
Execute;
|
||||
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
|
||||
ACommand := NIL;
|
||||
end;
|
||||
|
||||
@ -42,7 +42,7 @@ type
|
||||
property PagosController: IPagosClienteController read GetPagosController write SetPagosController;
|
||||
|
||||
procedure Anadir(ARecibosCliente : IBizRecibosCliente);
|
||||
function Eliminar(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||
function Eliminar(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false): Boolean;
|
||||
|
||||
function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''): Boolean;
|
||||
procedure ModificarPago(ARecibosCliente : IBizRecibosCliente);
|
||||
@ -77,6 +77,8 @@ type
|
||||
function ElegirRecibosCompensados(ARecibo : IBizRecibosCliente): Boolean;
|
||||
procedure QuitarReciboCompensado(ARecibo : IBizRecibosCliente);
|
||||
|
||||
function EsEliminable(ARecibo : IBizRecibosCliente): Boolean;
|
||||
|
||||
procedure Preview(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
||||
procedure Print(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
||||
end;
|
||||
@ -115,7 +117,7 @@ type
|
||||
procedure Anadir(ARecibosCliente : IBizRecibosCliente);
|
||||
function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''): Boolean;
|
||||
procedure ModificarPago(ARecibosCliente : IBizRecibosCliente);
|
||||
function Eliminar(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||
function Eliminar(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false): Boolean;
|
||||
function EliminarPago(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||
function EliminarTodo(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||
function Guardar(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||
@ -144,6 +146,8 @@ type
|
||||
|
||||
procedure SetSituacionCobrados(ARecibos : IBizRecibosCliente; WithDeltas: Boolean=False);
|
||||
|
||||
function EsEliminable(ARecibo : IBizRecibosCliente): Boolean;
|
||||
|
||||
procedure Preview(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
||||
procedure Print(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
||||
end;
|
||||
@ -618,22 +622,58 @@ begin
|
||||
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
|
||||
Result := False;
|
||||
bEliminado := False;
|
||||
|
||||
if not Assigned(ARecibosCliente) then
|
||||
raise Exception.Create ('IBizRecibosCliente no asignado');
|
||||
raise Exception.Create ('ARecibosCliente no asignado');
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
if not ARecibosCliente.DataTable.Active then
|
||||
ARecibosCliente.DataTable.Active := True;
|
||||
|
||||
if (ARecibosCliente.State in dsEditModes) then
|
||||
ARecibosCliente.Cancel;
|
||||
|
||||
ARecibosCliente.Delete;
|
||||
ARecibosCliente.DataTable.ApplyUpdates;
|
||||
HideHourglassCursor;
|
||||
Result := True;
|
||||
//Siempre eliminaremos el seleccionado
|
||||
if EsEliminable(ARecibosCliente) then
|
||||
begin
|
||||
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
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
@ -656,6 +696,14 @@ begin
|
||||
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);
|
||||
begin
|
||||
AReciboCliente._Cliente := (FClienteController.Buscar(AReciboCliente.ID_Cliente) as IBizCliente);
|
||||
|
||||
@ -8,6 +8,9 @@ uses
|
||||
|
||||
const
|
||||
BIZ_SERVER_PAGOS_CLIENTE = 'Server.PagosCliente';
|
||||
CTE_PAGO = 'Pago';
|
||||
CTE_DEVOLUCION = 'Devolución';
|
||||
|
||||
|
||||
type
|
||||
TBizPagosClienteServer = class(TPagosClienteBusinessProcessorRules)
|
||||
@ -62,7 +65,10 @@ begin
|
||||
with ACommand do
|
||||
begin
|
||||
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;
|
||||
end;
|
||||
finally
|
||||
|
||||
@ -41,7 +41,7 @@ type
|
||||
IBizRecibosCliente = interface(IRecibosCliente)
|
||||
['{93758493-260C-450D-9018-E5339C2E09B2}']
|
||||
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
|
||||
procedure SetCliente(AValue : IBizCliente);
|
||||
@ -103,7 +103,7 @@ type
|
||||
|
||||
procedure IniciarValoresIBizRecibosClienteNuevo;
|
||||
function EsNuevo : Boolean;
|
||||
function ConFactura : Boolean;
|
||||
function SinFactura : Boolean;
|
||||
|
||||
constructor Create(aDataTable: TDADataTable); override;
|
||||
destructor Destroy; override;
|
||||
@ -201,7 +201,7 @@ begin
|
||||
FCliente := AValue;
|
||||
end;
|
||||
|
||||
function TBizRecibosCliente.ConFactura: Boolean;
|
||||
function TBizRecibosCliente.SinFactura: Boolean;
|
||||
begin
|
||||
Result := ID_FACTURAIsNull;
|
||||
end;
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
||||
<Projects Include="..\Articulos\Views\Articulos_view.dproj" />
|
||||
<Projects Include="..\Contabilidad\Controller\Contabilidad_controller.dproj" />
|
||||
<Projects Include="..\Contabilidad\Views\Contabilidad_view.dproj" />
|
||||
<Projects Include="..\Contactos\Views\Contactos_view.dproj" />
|
||||
<Projects Include="..\Facturas de cliente\Views\FacturasCliente_view.dproj" />
|
||||
<Projects Include="Controller\RecibosCliente_controller.dproj" />
|
||||
@ -124,15 +125,6 @@
|
||||
<Target Name="FactuGES_Server:Make">
|
||||
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
|
||||
</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">
|
||||
<MSBuild Projects="..\Facturas de cliente\Views\FacturasCliente_view.dproj" Targets="" />
|
||||
</Target>
|
||||
@ -151,14 +143,32 @@
|
||||
<Target Name="Articulos_view:Make">
|
||||
<MSBuild Projects="..\Articulos\Views\Articulos_view.dproj" Targets="Make" />
|
||||
</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">
|
||||
<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 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 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>
|
||||
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
||||
</Project>
|
||||
@ -29,7 +29,8 @@ requires
|
||||
RecibosCliente_model,
|
||||
RecibosCliente_controller,
|
||||
JvGlobusD11R,
|
||||
Contactos_view;
|
||||
Contactos_view,
|
||||
Contabilidad_view;
|
||||
|
||||
contains
|
||||
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>
|
||||
<ProjectGuid>{74e7da8d-38a8-404c-b92c-c3a913b30982}</ProjectGuid>
|
||||
<MainSource>RecibosCliente_view.dpk</MainSource>
|
||||
@ -46,6 +47,7 @@
|
||||
<DelphiCompile Include="RecibosCliente_view.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\Lib\Contabilidad_view.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Contactos_view.dcp" />
|
||||
<DCCReference Include="..\..\Lib\GUIBase.dcp" />
|
||||
<DCCReference Include="..\..\Lib\JvGlobusD11R.dcp" />
|
||||
|
||||
Binary file not shown.
@ -3,8 +3,8 @@ object fEditorFechaPago: TfEditorFechaPago
|
||||
Top = 0
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Fecha del cobro / devoluci'#243'n'
|
||||
ClientHeight = 295
|
||||
ClientWidth = 383
|
||||
ClientHeight = 213
|
||||
ClientWidth = 535
|
||||
Color = clWindow
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -13,25 +13,21 @@ object fEditorFechaPago: TfEditorFechaPago
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
DesignSize = (
|
||||
383
|
||||
295)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object Label1: TLabel
|
||||
Left = 21
|
||||
Top = 16
|
||||
Width = 246
|
||||
Height = 26
|
||||
Left = 39
|
||||
Top = 15
|
||||
Width = 362
|
||||
Height = 13
|
||||
Caption =
|
||||
'Introduzca la fecha en la que se ha hecho efectivo '#13#10'el cobro o ' +
|
||||
'la devoluci'#243'n:'
|
||||
'Introduzca la fecha en la que se ha hecho efectivo el cobro o la' +
|
||||
' devoluci'#243'n:'
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 39
|
||||
Top = 67
|
||||
Top = 50
|
||||
Width = 77
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
@ -40,7 +36,7 @@ object fEditorFechaPago: TfEditorFechaPago
|
||||
end
|
||||
object eFechaPago: TcxDateEdit
|
||||
Left = 122
|
||||
Top = 64
|
||||
Top = 47
|
||||
Properties.OnChange = eFechaPagoPropertiesChange
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
@ -55,8 +51,8 @@ object fEditorFechaPago: TfEditorFechaPago
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 254
|
||||
Width = 383
|
||||
Top = 172
|
||||
Width = 535
|
||||
Height = 41
|
||||
Align = alBottom
|
||||
TabOrder = 1
|
||||
@ -80,81 +76,31 @@ object fEditorFechaPago: TfEditorFechaPago
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object eContabilizar: TcxCheckBox
|
||||
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
|
||||
inline frViewCajasBancos1: TfrViewCajasBancos
|
||||
Left = 39
|
||||
Top = 147
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
AutoSize = False
|
||||
Properties.ReadOnly = True
|
||||
Properties.ValidateOnEnter = True
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.Color = 14745599
|
||||
Style.HotTrack = False
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 3
|
||||
Height = 21
|
||||
Width = 215
|
||||
end
|
||||
object eSubCuenta: TcxTextEdit
|
||||
Left = 38
|
||||
Top = 174
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
AutoSize = False
|
||||
Properties.ReadOnly = True
|
||||
Properties.ValidateOnEnter = True
|
||||
Style.BorderColor = clWindowFrame
|
||||
Style.BorderStyle = ebs3D
|
||||
Style.Color = 14745599
|
||||
Style.HotTrack = False
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||
StyleFocused.LookAndFeel.NativeStyle = True
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 4
|
||||
Height = 21
|
||||
Width = 297
|
||||
end
|
||||
object 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
|
||||
Top = 83
|
||||
Width = 453
|
||||
Height = 76
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
ReadOnly = False
|
||||
ExplicitLeft = 39
|
||||
ExplicitTop = 83
|
||||
ExplicitHeight = 76
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
inherited cbCajasBancos: TcxComboBox
|
||||
ExplicitWidth = 376
|
||||
Width = 376
|
||||
end
|
||||
inherited eContabilizar: TcxCheckBox
|
||||
ExplicitWidth = 203
|
||||
Width = 203
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -6,7 +6,8 @@ uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
|
||||
cxDropDownEdit, cxCalendar, ExtCtrls, uEditorBasico, uIEditorFechaPago,
|
||||
cxCheckBox, uSubCuentasController, Buttons, cxDBEdit;
|
||||
cxCheckBox, uSubCuentasController, Buttons, cxDBEdit, cxGraphics, uCustomView,
|
||||
uViewBase, uViewCajasBancos;
|
||||
|
||||
type
|
||||
TfEditorFechaPago = class(TfEditorBasico, IEditorFechaPago)
|
||||
@ -16,22 +17,12 @@ type
|
||||
bCancelar: TButton;
|
||||
Label2: TLabel;
|
||||
Panel1: TPanel;
|
||||
eContabilizar: TcxCheckBox;
|
||||
eRefSubCuenta: TcxTextEdit;
|
||||
eSubCuenta: TcxTextEdit;
|
||||
BitBtn3: TBitBtn;
|
||||
eIDSubcuenta: TcxTextEdit;
|
||||
frViewCajasBancos1: TfrViewCajasBancos;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure eFechaPagoPropertiesChange(Sender: TObject);
|
||||
procedure eContabilizarPropertiesChange(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure BitBtn3Click(Sender: TObject);
|
||||
procedure eIDSubcuentaPropertiesChange(Sender: TObject);
|
||||
procedure bAceptarClick(Sender: TObject);
|
||||
private
|
||||
FController : ISubcuentasController;
|
||||
FIdSubCuenta : Integer;
|
||||
FIgnorarContabilidad : Integer;
|
||||
FFechaPago : TDateTime;
|
||||
function GetFechaPago: TDateTime;
|
||||
procedure SetFechaPago(const Value: TDateTime);
|
||||
@ -44,7 +35,6 @@ type
|
||||
property FechaPago: TDateTime Read GetFechaPago write SetFechaPago;
|
||||
property IgnorarContabilidad: Integer Read GetIgnorarContabilidad write SetIgnorarContabilidad;
|
||||
property IdSubCuenta: Integer Read GetIdSubCuenta write SetIdSubCuenta;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -54,35 +44,24 @@ implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
uses uBizSubCuentas;
|
||||
//uses uBizSubCuentas;
|
||||
|
||||
procedure TfEditorFechaPago.bAceptarClick(Sender: TObject);
|
||||
begin
|
||||
if (not eContabilizar.Checked)
|
||||
and (eIdSubcuenta.Text = '') then
|
||||
raise Exception.Create ('Es necesario que elija la SubCuenta donde se realizará el pago');
|
||||
// if (not eContabilizar.Checked)
|
||||
// and (eIdSubcuenta.Text = '') then
|
||||
// raise Exception.Create ('Es necesario que elija la SubCuenta donde se realizará el pago');
|
||||
end;
|
||||
|
||||
procedure TfEditorFechaPago.BitBtn3Click(Sender: TObject);
|
||||
var
|
||||
ASubCuenta: IBizSubcuenta;
|
||||
//var
|
||||
// ASubCuenta: IBizSubcuenta;
|
||||
begin
|
||||
ASubCuenta := FController.ElegirSubCuenta(FController.BuscarTodos,'sssss', False);
|
||||
eIDSubcuenta.Text := IntToStr(ASubcuenta.ID);
|
||||
eRefSubCuenta.Text := ASubcuenta.REF_SUBCUENTA;
|
||||
eSubCuenta.Text := ASubcuenta.DESCRIPCION;
|
||||
ASubCuenta := Nil;
|
||||
end;
|
||||
|
||||
constructor TfEditorFechaPago.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FController := TSubcuentasController.Create;
|
||||
end;
|
||||
|
||||
procedure TfEditorFechaPago.eContabilizarPropertiesChange(Sender: TObject);
|
||||
begin
|
||||
FIgnorarContabilidad := eContabilizar.EditValue;
|
||||
// ASubCuenta := FController.ElegirSubCuenta(FController.BuscarTodos,'sssss', False);
|
||||
// eIDSubcuenta.Text := IntToStr(ASubcuenta.ID);
|
||||
// eRefSubCuenta.Text := ASubcuenta.REF_SUBCUENTA;
|
||||
// eSubCuenta.Text := ASubcuenta.DESCRIPCION;
|
||||
// ASubCuenta := Nil;
|
||||
end;
|
||||
|
||||
procedure TfEditorFechaPago.eFechaPagoPropertiesChange(Sender: TObject);
|
||||
@ -90,22 +69,10 @@ begin
|
||||
FechaPago := eFechaPago.Date;
|
||||
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);
|
||||
begin
|
||||
if (length(eFechaPago.Text) = 0) then
|
||||
eFechaPago.Date := Date;
|
||||
// FController.
|
||||
end;
|
||||
|
||||
function TfEditorFechaPago.GetFechaPago: TDateTime;
|
||||
@ -115,12 +82,12 @@ end;
|
||||
|
||||
function TfEditorFechaPago.GetIdSubCuenta: Integer;
|
||||
begin
|
||||
Result := eIDSubCuenta.EditValue; //FIdSubCuenta;
|
||||
Result := frViewCajasBancos1.IdSubCuenta;
|
||||
end;
|
||||
|
||||
function TfEditorFechaPago.GetIgnorarContabilidad: Integer;
|
||||
begin
|
||||
Result := FIgnorarContabilidad;
|
||||
Result := frViewCajasBancos1.eContabilizar.EditValue;
|
||||
end;
|
||||
|
||||
procedure TfEditorFechaPago.SetFechaPago(const Value: TDateTime);
|
||||
@ -131,13 +98,12 @@ end;
|
||||
|
||||
procedure TfEditorFechaPago.SetIdSubCuenta(const Value: Integer);
|
||||
begin
|
||||
FIdSubCuenta := Value;
|
||||
frViewCajasBancos1.ElegirCajaBanco(Value);
|
||||
end;
|
||||
|
||||
procedure TfEditorFechaPago.SetIgnorarContabilidad(const Value: Integer);
|
||||
begin
|
||||
FIgnorarContabilidad := Value;
|
||||
eContabilizar.EditValue := FIgnorarContabilidad;
|
||||
frViewCajasBancos1.eContabilizar.EditValue := Value;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -51,6 +51,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
||||
inherited pgPaginas: TPageControl
|
||||
Width = 685
|
||||
Height = 329
|
||||
OnChanging = pgPaginasChanging
|
||||
ExplicitLeft = 3
|
||||
ExplicitTop = 79
|
||||
ExplicitWidth = 685
|
||||
@ -295,6 +296,18 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
||||
inherited ToolBar1: TToolBar
|
||||
Width = 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
|
||||
ExplicitWidth = 98
|
||||
end
|
||||
|
||||
@ -41,6 +41,7 @@ type
|
||||
procedure frViewReciboCliImportes1eImportePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure frViewRecibosCompensados1cxGridViewDataControllerSummaryAfterSummary(ASender: TcxDataSummary);
|
||||
procedure frViewPagosCliente1actAnadirUpdate(Sender: TObject);
|
||||
procedure pgPaginasChanging(Sender: TObject; var AllowChange: Boolean);
|
||||
|
||||
private
|
||||
FController : IRecibosClienteController;
|
||||
@ -72,7 +73,7 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses schRecibosClienteClient_Intf, uEditorFechaPago, uEditorBase, uFactuGES_App;
|
||||
uses uDialogUtils, schRecibosClienteClient_Intf, uEditorFechaPago, uEditorBase, uFactuGES_App;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
@ -289,6 +290,17 @@ begin
|
||||
FRecibo.Cliente := frViewReciboCliente1.frViewClienteRecibo.Cliente;
|
||||
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);
|
||||
var
|
||||
FTitulo : String;
|
||||
@ -337,6 +349,9 @@ begin
|
||||
frViewPagosCliente1.Pagos := Recibo.Pagos;
|
||||
frViewRecibosCliCompensados1.ReciboCliente := FRecibo;
|
||||
|
||||
if FRecibo.EsNuevo and FRecibo.SinFactura then
|
||||
FRecibo.FECHA_VENCIMIENTO := Date;
|
||||
|
||||
if (FRecibo.SITUACION = CTE_COBRADO) then
|
||||
DeshabilitarRecibo
|
||||
else
|
||||
|
||||
@ -41,7 +41,7 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
|
||||
Width = 645
|
||||
ExplicitWidth = 645
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 498
|
||||
ExplicitWidth = 561
|
||||
end
|
||||
inherited tbxMenu: TTBXToolbar
|
||||
ExplicitWidth = 645
|
||||
@ -176,10 +176,6 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
|
||||
inherited actNuevo: TAction
|
||||
ImageIndex = 22
|
||||
end
|
||||
inherited actEliminar: TAction
|
||||
Enabled = False
|
||||
Visible = False
|
||||
end
|
||||
inherited actPrevisualizar: TAction
|
||||
Visible = True
|
||||
end
|
||||
|
||||
@ -45,6 +45,7 @@ type
|
||||
JsPrevisualizarDialog: TJSDialog;
|
||||
JsImprimirDialog: TJSDialog;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actEliminarUpdate(Sender: TObject);
|
||||
private
|
||||
FRecibosCliente: IBizRecibosCliente;
|
||||
FController : IRecibosClienteController;
|
||||
@ -81,6 +82,13 @@ uses
|
||||
{
|
||||
*************************** 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);
|
||||
begin
|
||||
inherited;
|
||||
@ -101,9 +109,52 @@ begin
|
||||
end;
|
||||
|
||||
procedure TfEditorRecibosCliente.EliminarInterno;
|
||||
var
|
||||
ARecibos: IBizRecibosCliente;
|
||||
AllItems: Boolean;
|
||||
begin
|
||||
//
|
||||
//No se pueden eliminar recibos
|
||||
ARecibos := Nil;
|
||||
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;
|
||||
|
||||
procedure TfEditorRecibosCliente.FormShow(Sender: TObject);
|
||||
|
||||
@ -128,7 +128,7 @@ begin
|
||||
if Assigned(FRecibo) then
|
||||
begin
|
||||
DADataSource.DataTable := FRecibo.DataTable;
|
||||
if FRecibo.ConFactura then
|
||||
if FRecibo.SinFactura then
|
||||
begin
|
||||
dxLayoutControlFactura.Visible := false;
|
||||
dxLayoutControlCliente.Visible := false;
|
||||
|
||||
@ -58,6 +58,7 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
|
||||
object cxGridViewREFERENCIA_REC_COMPENSADO: TcxGridDBColumn
|
||||
Caption = 'Ref. recibo compensado'
|
||||
DataBinding.FieldName = 'REFERENCIA_REC_COMPENSADO'
|
||||
Visible = False
|
||||
VisibleForCustomization = False
|
||||
end
|
||||
object cxGridViewSITUACION: TcxGridDBColumn
|
||||
@ -160,17 +161,9 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
Width = 531
|
||||
ExplicitWidth = 531
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
ExplicitWidth = 273
|
||||
Width = 273
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 229
|
||||
ExplicitLeft = 229
|
||||
Left = 287
|
||||
ExplicitLeft = 287
|
||||
ExplicitWidth = 287
|
||||
Width = 287
|
||||
end
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
<Projects Include="..\..\Cliente\FactuGES.dproj" />
|
||||
<Projects Include="..\..\GUIBase\GUIBase.dproj" />
|
||||
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
||||
<Projects Include="..\Recibos de cliente\Controller\RecibosCliente_controller.dproj" />
|
||||
<Projects Include="Controller\RemesasCliente_controller.dproj" />
|
||||
<Projects Include="Data\RemesasCliente_data.dproj" />
|
||||
<Projects Include="Model\RemesasCliente_model.dproj" />
|
||||
@ -111,14 +112,23 @@
|
||||
<Target Name="FactuGES_Server:Make">
|
||||
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
|
||||
</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">
|
||||
<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 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 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>
|
||||
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
||||
</Project>
|
||||
@ -405,6 +405,8 @@
|
||||
</Parameter>
|
||||
<Parameter Name="ID_EMPRESA" DataType="Integer" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="CLIENTE" DataType="String" Flag="In" >
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
<Operation Name="AnadirSubCuentaProveedor" UID="{E2D673BB-FA95-456D-805D-EB75C9361C54}">
|
||||
@ -417,6 +419,8 @@
|
||||
</Parameter>
|
||||
<Parameter Name="ID_EMPRESA" DataType="Integer" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="PROVEEDOR" DataType="String" Flag="In" >
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
</Operations>
|
||||
|
||||
@ -616,8 +616,8 @@ type
|
||||
IsrvContabilidad = interface(IDataAbstractService)
|
||||
['{04CDF2E1-EFC2-4247-AA4F-09BE782C73FA}']
|
||||
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 AnadirSubCuentaProveedor(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; const PROVEEDOR: String): Boolean;
|
||||
end;
|
||||
|
||||
{ CosrvContabilidad }
|
||||
@ -631,8 +631,8 @@ type
|
||||
function __GetInterfaceName:string; override;
|
||||
|
||||
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 AnadirSubCuentaProveedor(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; const PROVEEDOR: String): Boolean;
|
||||
end;
|
||||
|
||||
{ IsrvUnidadesMedida }
|
||||
@ -1646,13 +1646,14 @@ begin
|
||||
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
|
||||
try
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'AnadirSubCuentaCliente');
|
||||
__Message.Write('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
||||
__Message.Write('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
||||
__Message.Write('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
||||
__Message.Write('CLIENTE', TypeInfo(String), CLIENTE, []);
|
||||
__Message.Finalize;
|
||||
|
||||
__TransportChannel.Dispatch(__Message);
|
||||
@ -1664,13 +1665,14 @@ begin
|
||||
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
|
||||
try
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'AnadirSubCuentaProveedor');
|
||||
__Message.Write('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
||||
__Message.Write('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
||||
__Message.Write('ID_EMPRESA', TypeInfo(Integer), ID_EMPRESA, []);
|
||||
__Message.Write('PROVEEDOR', TypeInfo(String), PROVEEDOR, []);
|
||||
__Message.Finalize;
|
||||
|
||||
__TransportChannel.Dispatch(__Message);
|
||||
|
||||
@ -804,19 +804,21 @@ begin
|
||||
end;
|
||||
|
||||
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
|
||||
ID_CONTACTO: Integer;
|
||||
ID_TIENDA: Integer;
|
||||
ID_EMPRESA: Integer;
|
||||
CLIENTE: String;
|
||||
lResult: Boolean;
|
||||
begin
|
||||
try
|
||||
__Message.Read('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
||||
__Message.Read('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
||||
__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.Write('Result', TypeInfo(Boolean), lResult, []);
|
||||
@ -828,19 +830,21 @@ begin
|
||||
end;
|
||||
|
||||
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
|
||||
ID_CONTACTO: Integer;
|
||||
ID_TIENDA: Integer;
|
||||
ID_EMPRESA: Integer;
|
||||
PROVEEDOR: String;
|
||||
lResult: Boolean;
|
||||
begin
|
||||
try
|
||||
__Message.Read('ID_CONTACTO', TypeInfo(Integer), ID_CONTACTO, []);
|
||||
__Message.Read('ID_TIENDA', TypeInfo(Integer), ID_TIENDA, []);
|
||||
__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.Write('Result', TypeInfo(Boolean), lResult, []);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -30,18 +30,6 @@
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
</ProjectExtensions>
|
||||
|
||||
@ -14,7 +14,7 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "FileVersion", "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
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user