From 9adc4f23569659b730b9d65b27566684278481a1 Mon Sep 17 00:00:00 2001 From: roberto Date: Thu, 13 Jan 2011 18:44:59 +0000 Subject: [PATCH] Errores #511: Error al crear una liquidaciones de comisiones desde cero git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES2/trunk@109 b2cfbe5a-eba1-4a0c-8b32-7feea0a119f2 --- .../Controller/uComisionesController.pas | 10 +- .../Comisiones/Model/uBizComisiones.pas | 2 +- .../Comisiones/Views/Comisiones_view.dproj | 106 +++++++++--------- .../Comisiones/Views/uEditorComision.dfm | 17 +-- .../Comisiones/Views/uEditorComision.pas | 24 ++-- .../Comisiones/Views/uEditorComisiones.pas | 1 + 6 files changed, 79 insertions(+), 81 deletions(-) diff --git a/Source/Modulos/Comisiones/Controller/uComisionesController.pas b/Source/Modulos/Comisiones/Controller/uComisionesController.pas index e03544e..1137e49 100644 --- a/Source/Modulos/Comisiones/Controller/uComisionesController.pas +++ b/Source/Modulos/Comisiones/Controller/uComisionesController.pas @@ -94,7 +94,7 @@ end; procedure TComisionesController.AsignarID(AComision: IBizComisiones; const IDNuevo: Integer); begin - if not Assigned(AComision) then +{ if not Assigned(AComision) then raise Exception.Create ('Comision no asignado'); AsignarIDDetalles(AComision.Facturas, IDNuevo, AComision.EsNuevo); @@ -105,11 +105,12 @@ begin AComision.ID := IDNuevo; AComision.Post; end; +} end; procedure TComisionesController.AsignarIDDetalles(AFacturasComision: IBizFacturasComision; IDComision: Integer; AEsNuevo: Boolean); begin - with AFacturasComision do +{ with AFacturasComision do begin DataTable.DisableControls; try @@ -141,7 +142,7 @@ begin total de las tuplas de detalle. } - if AEsNuevo then + { if AEsNuevo then begin while RecordCount > 0 do begin @@ -170,6 +171,7 @@ begin DataTable.EnableControls; end; end; +} end; procedure TComisionesController.AsignarImporteTotal(AComision: IBizComisiones; const ImporteTotal: Variant); @@ -504,6 +506,8 @@ begin ShowHourglassCursor; try AComision.DataTable.ApplyUpdates; + AComision.Facturas.DataTable.ApplyUpdates; + AComision.Facturas.DataTable.Refresh; //Si todo ha ido bien, asignamos la comision a las facturas asociadas //Como no están declarados como maestro-detalles debemos hacer el applyupdates nosotros // RecibosClienteController.AsignarRemesa(ARemesaCliente.Recibos, NuevoID); diff --git a/Source/Modulos/Comisiones/Model/uBizComisiones.pas b/Source/Modulos/Comisiones/Model/uBizComisiones.pas index ae38f40..c08306b 100644 --- a/Source/Modulos/Comisiones/Model/uBizComisiones.pas +++ b/Source/Modulos/Comisiones/Model/uBizComisiones.pas @@ -90,7 +90,7 @@ end; procedure TBizComisiones.OnNewRecord(Sender: TDADataTable); begin inherited; - ID := GetRecNo; // -1, -2, -3... +// ID := GetRecNo; // -1, -2, -3... IniciarValoresComisionLiquidacionNuevo; end; diff --git a/Source/Modulos/Comisiones/Views/Comisiones_view.dproj b/Source/Modulos/Comisiones/Views/Comisiones_view.dproj index 67910f7..4cf93c2 100644 --- a/Source/Modulos/Comisiones/Views/Comisiones_view.dproj +++ b/Source/Modulos/Comisiones/Views/Comisiones_view.dproj @@ -38,52 +38,58 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fEditorComision
@@ -94,7 +100,7 @@ TfEditorComisiones
-
fEditorComisionesRepor
+
fEditorComisionesReport
TfEditorComisiones
@@ -109,12 +115,6 @@
frViewFacturasComision
TFrame
- - - - - -