diff --git a/Source/Informes/1/InfComisiones.fr3 b/Source/Informes/1/InfComisiones.fr3 index 4204bff..097c4ba 100644 --- a/Source/Informes/1/InfComisiones.fr3 +++ b/Source/Informes/1/InfComisiones.fr3 @@ -1,49 +1,51 @@ - + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - + + + + diff --git a/Source/Informes/1/InfComisionesDesglosado.fr3 b/Source/Informes/1/InfComisionesDesglosado.fr3 index a829c84..97cd997 100644 --- a/Source/Informes/1/InfComisionesDesglosado.fr3 +++ b/Source/Informes/1/InfComisionesDesglosado.fr3 @@ -1,55 +1,57 @@ - + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - + + + + diff --git a/Source/Informes/2/InfComisiones.fr3 b/Source/Informes/2/InfComisiones.fr3 index 9d4a951..b2ebb6f 100644 --- a/Source/Informes/2/InfComisiones.fr3 +++ b/Source/Informes/2/InfComisiones.fr3 @@ -1,5 +1,5 @@ - + @@ -44,7 +44,8 @@ - + + diff --git a/Source/Informes/2/InfComisionesDesglosado.fr3 b/Source/Informes/2/InfComisionesDesglosado.fr3 index 7ec3870..d46e9cd 100644 --- a/Source/Informes/2/InfComisionesDesglosado.fr3 +++ b/Source/Informes/2/InfComisionesDesglosado.fr3 @@ -1,5 +1,5 @@ - + @@ -50,7 +50,8 @@ - + + diff --git a/Source/Informes/4/InfAlbaranCliente.fr3 b/Source/Informes/4/InfAlbaranCliente.fr3 new file mode 100644 index 0000000..aecd5ce --- /dev/null +++ b/Source/Informes/4/InfAlbaranCliente.fr3 @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/4/InfAlbaranProveedor.fr3 b/Source/Informes/4/InfAlbaranProveedor.fr3 new file mode 100644 index 0000000..69cf3c6 --- /dev/null +++ b/Source/Informes/4/InfAlbaranProveedor.fr3 @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/4/InfPedidoCliente.fr3 b/Source/Informes/4/InfPedidoCliente.fr3 new file mode 100644 index 0000000..71a332a --- /dev/null +++ b/Source/Informes/4/InfPedidoCliente.fr3 @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/4/InfPedidoProveedor.fr3 b/Source/Informes/4/InfPedidoProveedor.fr3 new file mode 100644 index 0000000..ab6a21c --- /dev/null +++ b/Source/Informes/4/InfPedidoProveedor.fr3 @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Modulos/Comisiones/Views/uEditorComision.dfm b/Source/Modulos/Comisiones/Views/uEditorComision.dfm index 9b87cd2..ba714cc 100644 --- a/Source/Modulos/Comisiones/Views/uEditorComision.dfm +++ b/Source/Modulos/Comisiones/Views/uEditorComision.dfm @@ -208,15 +208,6 @@ inherited fEditorComision: TfEditorComision ExplicitWidth = 607 ExplicitHeight = 240 inherited cxGridView: TcxGridDBTableView - DataController.Summary.FooterSummaryItems = < - item - Kind = skSum - end - item - Format = ',0.00 '#8364';-,0.00 '#8364 - Kind = skSum - Column = frViewFacturasComision1.cxGridViewIMPORTE_COMISION - end> inherited cxGridViewID: TcxGridDBColumn IsCaptionAssigned = True end diff --git a/Source/Modulos/Comisiones/Views/uViewComision.pas b/Source/Modulos/Comisiones/Views/uViewComision.pas index 06d12b3..fd71354 100644 --- a/Source/Modulos/Comisiones/Views/uViewComision.pas +++ b/Source/Modulos/Comisiones/Views/uViewComision.pas @@ -81,7 +81,7 @@ end; procedure TfrViewComision.CustomViewShow(Sender: TObject); begin inherited; - FAgentes := FAgentesController.BuscarTodos; + FAgentes := FAgentesController.BuscarActivos; dsAgentes.DataTable := FAgentes.DataTable; dsAgentes.DataTable.Active := True; end; diff --git a/Source/Modulos/Comisiones/Views/uViewFacturasComision.dfm b/Source/Modulos/Comisiones/Views/uViewFacturasComision.dfm index 7a6946f..08fa16d 100644 --- a/Source/Modulos/Comisiones/Views/uViewFacturasComision.dfm +++ b/Source/Modulos/Comisiones/Views/uViewFacturasComision.dfm @@ -19,6 +19,11 @@ inherited frViewFacturasComision: TfrViewFacturasComision Format = ',0.00 '#8364';-,0.00 '#8364 Kind = skSum Column = cxGridViewIMPORTE_COMISION + end + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Kind = skSum + Column = cxGridViewIMPORTE_COMISIONABLE end> OptionsCustomize.ColumnMoving = True OptionsData.Appending = False @@ -90,6 +95,7 @@ inherited frViewFacturasComision: TfrViewFacturasComision DataBinding.FieldName = 'IMPORTE_COMISIONABLE' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify + FooterAlignmentHorz = taRightJustify HeaderAlignmentHorz = taRightJustify end object cxGridViewCOMISION: TcxGridDBColumn @@ -106,6 +112,7 @@ inherited frViewFacturasComision: TfrViewFacturasComision DataBinding.FieldName = 'IMPORTE_COMISION' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify + FooterAlignmentHorz = taRightJustify HeaderAlignmentHorz = taRightJustify end end diff --git a/Source/Modulos/Contactos/Controller/uAgentesController.pas b/Source/Modulos/Contactos/Controller/uAgentesController.pas index 38bc90b..0bb20bb 100644 --- a/Source/Modulos/Contactos/Controller/uAgentesController.pas +++ b/Source/Modulos/Contactos/Controller/uAgentesController.pas @@ -14,6 +14,7 @@ type function Eliminar(AAgente: IBizContacto; AllItems: Boolean = false): Boolean; overload; function DarListaAnosObjetivosAlbaranesAgente(ID_AGENTE: Integer): TStringList; function DarListaAnosObjetivosFacturasAgente(ID_AGENTE: Integer): TStringList; + function BuscarActivos: IBizContacto; end; TAgentesController = class(TContactosController, IAgentesController) @@ -27,6 +28,7 @@ type function Buscar(const ID: Integer): IBizContacto; override; function BuscarTodos: IBizContacto; override; + function BuscarActivos: IBizContacto; function Nuevo : IBizContacto; override; function Guardar(AContacto : IBizContacto): Boolean; override; procedure Ver(AContacto : IBizContacto); override; @@ -44,7 +46,7 @@ type implementation uses - Windows, SysUtils, Forms, cxControls, Controls, Dialogs, uDataModuleAgentes, uEditorRegistryUtils, + uDAInterfaces, Windows, SysUtils, Forms, cxControls, Controls, Dialogs, uDataModuleAgentes, uEditorRegistryUtils, uDataTableUtils, uDADataTable, DB, schContactosClient_Intf, uEditorGridBase, uIntegerListUtils, uIEditorElegirAgentes; @@ -56,6 +58,30 @@ begin FiltrarEmpresa(Result); end; +function TAgentesController.BuscarActivos: IBizContacto; +var + Condicion: TDAWhereExpression; +begin + ShowHourglassCursor; + try + Result := BuscarTodos; + + with Result.DataTable.DynamicWhere do + begin + // INACTIVOS + Condicion := NewBinaryExpression(NewField('', fld_AgentesFECHA_BAJA), NewNull(), dboEqual); + + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + + finally + HideHourglassCursor; + end; +end; + function TAgentesController.BuscarTodos: IBizContacto; begin Result := (FDataModule as IDataModuleAgentes).GetItems; diff --git a/Source/Modulos/Contactos/Views/Contactos_view.identcache b/Source/Modulos/Contactos/Views/Contactos_view.identcache index c4f1901..b4d707f 100644 Binary files a/Source/Modulos/Contactos/Views/Contactos_view.identcache and b/Source/Modulos/Contactos/Views/Contactos_view.identcache differ diff --git a/Source/Modulos/Contactos/Views/uEditorAgentes.dfm b/Source/Modulos/Contactos/Views/uEditorAgentes.dfm index 25db679..e851b85 100644 --- a/Source/Modulos/Contactos/Views/uEditorAgentes.dfm +++ b/Source/Modulos/Contactos/Views/uEditorAgentes.dfm @@ -57,7 +57,7 @@ inherited fEditorAgentes: TfEditorAgentes Width = 786 ExplicitWidth = 786 inherited tbxMain: TTBXToolbar - ExplicitWidth = 632 + ExplicitWidth = 775 inherited TBXItem2: TTBXItem ImageIndex = 22 Images = SmallImages diff --git a/Source/Modulos/Contactos/Views/uEditorClientes.dfm b/Source/Modulos/Contactos/Views/uEditorClientes.dfm index 15fd858..1145a76 100644 --- a/Source/Modulos/Contactos/Views/uEditorClientes.dfm +++ b/Source/Modulos/Contactos/Views/uEditorClientes.dfm @@ -138,12 +138,6 @@ inherited fEditorClientes: TfEditorClientes ExplicitWidth = 857 ExplicitHeight = 270 inherited cxGridView: TcxGridDBTableView - DataController.Summary.FooterSummaryItems = < - item - Format = '0 clientes' - Kind = skCount - Column = frViewClientes1.cxGridViewBLOQUEADO - end> end end inherited frViewFiltroBase1: TfrViewFiltroBase @@ -260,10 +254,6 @@ inherited fEditorClientes: TfEditorClientes Enabled = True Visible = True end - inherited actExportarExcel: TAction - Enabled = True - Visible = True - end object actDocumentosPresupuestos: TAction Category = 'Acciones' Caption = 'Presupuestos' diff --git a/Source/Modulos/Contactos/Views/uViewAgentes.dfm b/Source/Modulos/Contactos/Views/uViewAgentes.dfm index 54d1716..037c7d3 100644 --- a/Source/Modulos/Contactos/Views/uViewAgentes.dfm +++ b/Source/Modulos/Contactos/Views/uViewAgentes.dfm @@ -1,4 +1,5 @@ inherited frViewAgentes: TfrViewAgentes + OnShow = CustomViewShow inherited cxGrid: TcxGrid RootLevelOptions.DetailTabsPosition = dtpTop OnActiveTabChanged = cxGridActiveTabChanged diff --git a/Source/Modulos/Contactos/Views/uViewAgentes.pas b/Source/Modulos/Contactos/Views/uViewAgentes.pas index 5f2e4ea..40f8e9e 100644 --- a/Source/Modulos/Contactos/Views/uViewAgentes.pas +++ b/Source/Modulos/Contactos/Views/uViewAgentes.pas @@ -29,6 +29,7 @@ type procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); + procedure CustomViewShow(Sender: TObject); private //Filtros relativos a la vista procedure AnadirFiltroSituaciones; @@ -68,6 +69,12 @@ begin cxGrid.ActiveLevel.GridView := cxGridView; end; +procedure TfrViewAgentes.CustomViewShow(Sender: TObject); +begin + inherited; + cxGridLevel1.Active := True; +end; + procedure TfrViewAgentes.cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); begin diff --git a/Source/Modulos/Contactos/Views/uViewClienteDatosComerciales.pas b/Source/Modulos/Contactos/Views/uViewClienteDatosComerciales.pas index dfaeeb6..538896e 100644 --- a/Source/Modulos/Contactos/Views/uViewClienteDatosComerciales.pas +++ b/Source/Modulos/Contactos/Views/uViewClienteDatosComerciales.pas @@ -140,7 +140,7 @@ begin if Assigned(FContacto) then begin dsDatosComerciales.DataTable := FContacto.DataTable; - dsAgentes.DataTable := FAgentesController.BuscarTodos.DataTable; + dsAgentes.DataTable := FAgentesController.BuscarActivos.DataTable; dsAgentes.DataTable.Active := True; FFormasPago := FFormasPagoController.BuscarTodos; dsFormaPago.DataTable := FFormasPago.DataTable; diff --git a/Source/Modulos/Contactos/Views/uViewClientes.dfm b/Source/Modulos/Contactos/Views/uViewClientes.dfm index 26c23dc..9f7a4d6 100644 --- a/Source/Modulos/Contactos/Views/uViewClientes.dfm +++ b/Source/Modulos/Contactos/Views/uViewClientes.dfm @@ -9,12 +9,20 @@ inherited frViewClientes: TfrViewClientes ExplicitWidth = 793 ExplicitHeight = 321 inherited cxGridView: TcxGridDBTableView + DataController.Summary.DefaultGroupSummaryItems = < + item + Format = '0 clientes' + Kind = skCount + Position = spFooter + Column = cxGridViewREFERENCIA + end> DataController.Summary.FooterSummaryItems = < item Format = '0 clientes' Kind = skCount Column = cxGridViewREFERENCIA end> + OptionsView.GroupFooters = gfAlwaysVisible inherited cxGridViewICONO: TcxGridDBColumn OnGetCellHint = cxGridViewICONOGetCellHint end @@ -128,24 +136,24 @@ inherited frViewClientes: TfrViewClientes Width = 154 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 201 + Left = 214 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 201 + ExplicitLeft = 214 ExplicitWidth = 525 Width = 525 end inherited eLista: TcxComboBox - Left = 630 + Left = 675 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 630 - ExplicitWidth = 215 - Width = 215 + ExplicitLeft = 675 + ExplicitWidth = 140 + Width = 140 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel