Ticket #392 -> Error en los apuntes contables al modificar el importe de un recibo de cliente pagado.

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@518 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
David Arranz 2010-06-17 17:15:14 +00:00
parent e089575aa1
commit 6049d4b233
7 changed files with 373 additions and 348 deletions

View File

@ -58,6 +58,7 @@ var
ACurrentConn : IDAConnection;
ACommand : IDASQLCommand;
begin
dmServer.EscribirLog('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Delete_Asiento_Pago');
ASchema := BusinessProcessor.Schema;
ACurrentConn := GetBusinessProcessorConnection(BusinessProcessor);
@ -65,13 +66,14 @@ begin
try
with ACommand do
begin
ParamByName('IdPago').Value := aChange.OldValueByName[fld_PagosClienteID];
ParamByName('Tipo').Value := 'c';
ParamByName('IdPago').AsInteger := aChange.OldValueByName[fld_PagosClienteID];
ParamByName('Tipo').AsString := 'c';
Execute;
end;
finally
ACommand := NIL;
end;
dmServer.EscribirLog('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Delete_Asiento_Pago');
end;
procedure TBizPagosClienteServer.Insert_Asiento_Pago(aChange: TDADeltaChange);
@ -80,6 +82,8 @@ var
ACurrentConn : IDAConnection;
ACommand : IDASQLCommand;
begin
dmServer.EscribirLog('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Insert_Asiento_Pago');
ASchema := BusinessProcessor.Schema;
ACurrentConn := GetBusinessProcessorConnection(BusinessProcessor);
@ -87,13 +91,14 @@ begin
try
with ACommand do
begin
ParamByName('IdPago').Value := aChange.NewValueByName[fld_PagosClienteID];
ParamByName('IdSubCuentaPago').Value := aChange.NewValueByName[fld_PagosClienteCUENTA];
ParamByName('IdPago').AsInteger := aChange.NewValueByName[fld_PagosClienteID];
ParamByName('IdSubCuentaPago').AsInteger := aChange.NewValueByName[fld_PagosClienteCUENTA];
Execute;
end;
finally
ACommand := NIL;
end;
dmServer.EscribirLog('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Insert_Asiento_Pago');
end;
procedure TBizPagosClienteServer.Update_Asiento_Pago(aChange: TDADeltaChange);
@ -102,6 +107,7 @@ var
ACurrentConn : IDAConnection;
ACommand : IDASQLCommand;
begin
dmServer.EscribirLog('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Update_Asiento_Pago');
ASchema := BusinessProcessor.Schema;
ACurrentConn := GetBusinessProcessorConnection(BusinessProcessor);
@ -109,13 +115,14 @@ begin
try
with ACommand do
begin
ParamByName('IdPago').Value := aChange.NewValueByName[fld_PagosClienteID];
ParamByName('IdSubCuentaPago').Value := aChange.NewValueByName[fld_PagosClienteCUENTA];
ParamByName('IdPago').AsInteger := aChange.NewValueByName[fld_PagosClienteID];
ParamByName('IdSubCuentaPago').AsInteger := aChange.NewValueByName[fld_PagosClienteCUENTA];
Execute;
end;
finally
ACommand := NIL;
end;
dmServer.EscribirLog('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Update_Asiento_Pago');
end;
initialization

View File

@ -6,8 +6,9 @@ object srvRecibosCliente: TsrvRecibosCliente
ServiceDataStreamer = Bin2DataStreamer
ExportedDataTables = <>
BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
BeforeExecuteCommand = DataAbstractServiceBeforeExecuteCommand
Height = 247
Width = 347
Width = 311
object schRecibosCliente: TDASchema
ConnectionManager = dmServer.ConnectionManager
DataDictionary = DADataDictionary
@ -916,11 +917,16 @@ object srvRecibosCliente: TsrvRecibosCliente
Params = <
item
Name = 'IdPago'
DataType = datInteger
Value = ''
ParamType = daptInput
end
item
Name = 'Tipo'
DataType = datString
Size = 1
Value = ''
ParamType = daptInput
end>
Statements = <
item
@ -928,8 +934,8 @@ object srvRecibosCliente: TsrvRecibosCliente
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
SQL = 'execute procedure proc_delete_asiento_pago :IdPago, :Tipo'#10
StatementType = stSQL
SQL = 'PROC_DELETE_ASIENTO_PAGO'
StatementType = stStoredProcedure
ColumnMappings = <>
end>
Name = 'Delete_AsientoPago'
@ -938,11 +944,15 @@ object srvRecibosCliente: TsrvRecibosCliente
Params = <
item
Name = 'IdPago'
DataType = datInteger
Value = ''
ParamType = daptInput
end
item
Name = 'IdSubCuentaPago'
DataType = datInteger
Value = ''
ParamType = daptInput
end>
Statements = <
item
@ -950,10 +960,8 @@ object srvRecibosCliente: TsrvRecibosCliente
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
SQL =
'execute procedure proc_new_asiento_pago_cli :IdPago, :IdSubCuent' +
'aPago'#10
StatementType = stSQL
SQL = 'PROC_NEW_ASIENTO_PAGO_CLI'
StatementType = stStoredProcedure
ColumnMappings = <>
end>
Name = 'Insert_AsientoPago'
@ -1389,6 +1397,20 @@ object srvRecibosCliente: TsrvRecibosCliente
RelationshipType = rtForeignKey
end>
UpdateRules = <
item
Name = 'Delete PagosCliente'
DoUpdate = False
DoInsert = False
DatasetName = 'PagosCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete RecibosCliente'
DoUpdate = False
DoInsert = False
DatasetName = 'RecibosCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Insert RecibosCliente'
DoUpdate = False
@ -1396,6 +1418,13 @@ object srvRecibosCliente: TsrvRecibosCliente
DatasetName = 'RecibosCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Update RecibosCliente'
DoInsert = False
DoDelete = False
DatasetName = 'RecibosCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Insert PagosCliente'
DoUpdate = False
@ -1403,33 +1432,12 @@ object srvRecibosCliente: TsrvRecibosCliente
DatasetName = 'PagosCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Update RecibosCliente'
DoInsert = False
DoDelete = False
DatasetName = 'RecibosCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Update PagosCliente'
DoInsert = False
DoDelete = False
DatasetName = 'PagosCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete PagosCliente'
DoUpdate = False
DoInsert = False
DatasetName = 'PagosCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete RecibosCliente'
DoUpdate = False
DoInsert = False
DatasetName = 'RecibosCliente'
FailureBehavior = fbRaiseException
end>
Version = 0
Left = 48
@ -1720,7 +1728,7 @@ object srvRecibosCliente: TsrvRecibosCliente
DeleteCommandName = 'Delete_PagosCliente'
UpdateCommandName = 'Update_PagosCliente'
ReferencedDataset = 'PagosCliente'
ProcessorOptions = [poPrepareCommands]
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 192
Top = 88

View File

@ -30,6 +30,8 @@ type
procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject; var aConnectionName: string);
procedure DARemoteServiceBeforeGetDatasetData(const Dataset: IDADataset; const IncludeSchema: Boolean; const MaxRecords: Integer);
procedure DARemoteServiceCreate(Sender: TObject);
procedure DataAbstractServiceBeforeExecuteCommand(aSender: TObject;
const aCommand: IDASQLCommand);
private
protected
{ IsrvRecibosProveedor methods }
@ -79,6 +81,12 @@ begin
ConnectionName := dmServer.ConnectionName;
end;
procedure TsrvRecibosCliente.DataAbstractServiceBeforeExecuteCommand(
aSender: TObject; const aCommand: IDASQLCommand);
begin
aCommand.SQL
end;
function TsrvRecibosCliente.GenerateReport(const ListaID: TIntegerArray): Binary;
var
AReportGenerator : TRptRecibosCliente;

View File

@ -1439,6 +1439,20 @@ object srvRecibosProveedor: TsrvRecibosProveedor
RelationshipType = rtForeignKey
end>
UpdateRules = <
item
Name = 'Delete PagosProveedor'
DoUpdate = False
DoInsert = False
DatasetName = 'PagosProveedor'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete RecibosProveedor'
DoUpdate = False
DoInsert = False
DatasetName = 'RecibosProveedor'
FailureBehavior = fbRaiseException
end
item
Name = 'Insert RecibosProveedor'
DoUpdate = False
@ -1446,6 +1460,13 @@ object srvRecibosProveedor: TsrvRecibosProveedor
DatasetName = 'RecibosProveedor'
FailureBehavior = fbRaiseException
end
item
Name = 'Update RecibosProveedor'
DoInsert = False
DoDelete = False
DatasetName = 'RecibosProveedor'
FailureBehavior = fbRaiseException
end
item
Name = 'Insert PagosProveedor'
DoUpdate = False
@ -1453,33 +1474,12 @@ object srvRecibosProveedor: TsrvRecibosProveedor
DatasetName = 'PagosProveedor'
FailureBehavior = fbRaiseException
end
item
Name = 'Update RecibosProveedor'
DoInsert = False
DoDelete = False
DatasetName = 'RecibosProveedor'
FailureBehavior = fbRaiseException
end
item
Name = 'Update PagosProveedor'
DoInsert = False
DoDelete = False
DatasetName = 'PagosProveedor'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete PagosProveedor'
DoUpdate = False
DoInsert = False
DatasetName = 'PagosProveedor'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete RecibosProveedor'
DoUpdate = False
DoInsert = False
DatasetName = 'RecibosProveedor'
FailureBehavior = fbRaiseException
end>
Version = 0
Left = 48

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}</ProjectGuid>
@ -29,6 +29,8 @@
<Borland.ProjectType />
<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">2</VersionInfo><VersionInfo Name="MinorVer">4</VersionInfo><VersionInfo Name="Release">3</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">2.4.3.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES (Servidor)</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">2.4.3.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">domingo, 25 de abril de 2010 16:31</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>

View File

@ -16,7 +16,7 @@ BEGIN
VALUE "FileVersion", "2.4.3.0\0"
VALUE "ProductName", "FactuGES (Servidor)\0"
VALUE "ProductVersion", "2.4.3.0\0"
VALUE "CompileDate", "domingo, 25 de abril de 2010 18:02\0"
VALUE "CompileDate", "jueves, 17 de junio de 2010 13:21\0"
END
END
BLOCK "VarFileInfo"

View File

@ -30,7 +30,7 @@ object dmServer: TdmServer
DriverDirectory = '%SYSTEM%\'
AutoLoad = True
TraceActive = True
TraceFlags = [toPrepare, toExecute, toError, toStmt, toConnect, toTransact, toMisc]
TraceFlags = [toFetch, toError, toStmt, toConnect, toTransact, toService, toMisc, toParams]
OnTraceEvent = DriverManagerTraceEvent
Left = 136
Top = 80