diff --git a/GestionGrupoSanchoToro/.editorconfig b/GestionGrupoSanchoToro/.editorconfig new file mode 100644 index 0000000..a75484c --- /dev/null +++ b/GestionGrupoSanchoToro/.editorconfig @@ -0,0 +1,131 @@ +[*.cs] + +# CS8981: El nombre de tipo solo contiene caracteres ASCII en minúsculas. Estos nombres pueden reservarse para el idioma. +dotnet_diagnostic.CS8981.severity = none + +[*.cs] +#### Estilos de nomenclatura #### + +# Reglas de nomenclatura + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# Especificaciones de símbolos + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +# Estilos de nomenclatura + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent +csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent +csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent +csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent +csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = true:silent +csharp_style_namespace_declarations = block_scoped:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_prefer_switch_expression = true:suggestion +csharp_style_prefer_pattern_matching = true:silent +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_prefer_not_pattern = true:suggestion +csharp_style_prefer_extended_property_pattern = true:suggestion + +[*.vb] +#### Estilos de nomenclatura #### + +# Reglas de nomenclatura + +dotnet_naming_rule.interface_should_be_empieza_por_i.severity = suggestion +dotnet_naming_rule.interface_should_be_empieza_por_i.symbols = interface +dotnet_naming_rule.interface_should_be_empieza_por_i.style = empieza_por_i + +dotnet_naming_rule.tipos_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.tipos_should_be_pascal_case.symbols = tipos +dotnet_naming_rule.tipos_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.miembros_que_no_son_un_campo_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.miembros_que_no_son_un_campo_should_be_pascal_case.symbols = miembros_que_no_son_un_campo +dotnet_naming_rule.miembros_que_no_son_un_campo_should_be_pascal_case.style = pascal_case + +# Especificaciones de símbolos + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.tipos.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.tipos.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected +dotnet_naming_symbols.tipos.required_modifiers = + +dotnet_naming_symbols.miembros_que_no_son_un_campo.applicable_kinds = property, event, method +dotnet_naming_symbols.miembros_que_no_son_un_campo.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected +dotnet_naming_symbols.miembros_que_no_son_un_campo.required_modifiers = + +# Estilos de nomenclatura + +dotnet_naming_style.empieza_por_i.required_prefix = I +dotnet_naming_style.empieza_por_i.required_suffix = +dotnet_naming_style.empieza_por_i.word_separator = +dotnet_naming_style.empieza_por_i.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +[*.{cs,vb}] +end_of_line = crlf +dotnet_style_allow_multiple_blank_lines_experimental = true:silent +dotnet_style_allow_statement_immediately_after_block_experimental = true:silent +dotnet_style_readonly_field = true:suggestion \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Application.xaml b/GestionGrupoSanchoToro/Application.xaml new file mode 100644 index 0000000..777d912 --- /dev/null +++ b/GestionGrupoSanchoToro/Application.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/GestionGrupoSanchoToro/Application.xaml.vb b/GestionGrupoSanchoToro/Application.xaml.vb new file mode 100644 index 0000000..34c53f8 --- /dev/null +++ b/GestionGrupoSanchoToro/Application.xaml.vb @@ -0,0 +1,25 @@ +Imports System.Configuration +Imports System.Globalization +Imports System.Threading +Imports System.Windows.Threading +Imports DevExpress.Xpf.Core + +Namespace GrupoSanchoToro + ''' + ''' Interaction logic for App.xaml + ''' + Partial Public Class App + Inherits Application + Private Sub OnAppStartup_UpdateThemeName(sender As Object, e As StartupEventArgs) + DevExpress.Xpf.Core.ApplicationThemeHelper.UpdateApplicationThemeName() + End Sub + + Private Sub App_DispatcherUnhandledException(sender As Object, e As DispatcherUnhandledExceptionEventArgs) Handles Me.DispatcherUnhandledException + MsgBox(e.Exception.Message) + End Sub + + Private Sub App_Startup(sender As Object, e As StartupEventArgs) Handles Me.Startup + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("es-ES") + End Sub + End Class +End Namespace diff --git a/GestionGrupoSanchoToro/AssemblyInfo.vb b/GestionGrupoSanchoToro/AssemblyInfo.vb new file mode 100644 index 0000000..6f1a7e6 --- /dev/null +++ b/GestionGrupoSanchoToro/AssemblyInfo.vb @@ -0,0 +1,11 @@ +Imports System.Windows + +'The ThemeInfo attribute describes where any theme specific AndAlso generic resource dictionaries can be found. +'1st parameter: where theme specific resource dictionaries are located +'(used if a resource is not found in the page, +' OrElse application resource dictionaries) + +'2nd parameter: where the generic resource dictionary is located +'(used if a resource is not found in the page, +'app, AndAlso any theme specific resource dictionaries) + diff --git a/GestionGrupoSanchoToro/Compras/ucFacturaRecibida.xaml b/GestionGrupoSanchoToro/Compras/ucFacturaRecibida.xaml new file mode 100644 index 0000000..1233141 --- /dev/null +++ b/GestionGrupoSanchoToro/Compras/ucFacturaRecibida.xaml @@ -0,0 +1,460 @@ + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Compras/ucFacturaRecibida.xaml.vb b/GestionGrupoSanchoToro/Compras/ucFacturaRecibida.xaml.vb new file mode 100644 index 0000000..0e559cb --- /dev/null +++ b/GestionGrupoSanchoToro/Compras/ucFacturaRecibida.xaml.vb @@ -0,0 +1,683 @@ +Imports DevExpress.Xpf.Editors +Imports DevExpress.Xpf.LayoutControl +Imports tsWPFCore +Imports System.ComponentModel +Imports System.Data +Imports DevExpress.Xpf.Editors.Validation +Imports DevExpress.Xpf.Editors.Helpers +Imports DevExpress.Xpf.Core +Imports tsWPFCore.modExtensiones +Imports System.Data.Common +Imports bdGrupoSanchoToro.db +Imports tsUtilidades.Datos +Imports DevExpress.Xpf.Bars +Imports DevExpress.Xpf.Grid +Imports System.Collections +Imports tsEFCore8.Extensiones +Imports bdGrupoSanchoToro.db.Utilidades + +Imports tsUtilidades.Enumeraciones +Imports tsUtilidades +Imports bdGrupoSanchoToro.db.productos +Imports System.IO +Imports Microsoft.Win32 +Imports tsUtilidades.Extensiones + +'TODO: Comprobar cuando se puede modificar una factura (o eliminar) +Public Class ucFacturaRecibida + Private bd As tscGrupoSanchoToro + Friend _idFactura As Nullable(Of Integer) + Private lProductos As List(Of productos) + Private ivas As List(Of enumeraciones) + Friend idLog As Integer? + Dim ra As facturasrecibidas + Public Overrides Sub Cargado() + Me.Tipo_ucControlBusqueda = GetType(ucFacturasRecibidas) + End Sub + + Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False) + Try + lProductos = bd.productos.OrderBy(Function(x) x.Descripcion).ToList + Dim lProductosFra = ra.detallesfacturasrecibidas.Select(Function(x) x.idProducto).ToArray + lProductos = lProductos.Where(Function(x) x.FechaBaja Is Nothing OrElse lProductosFra.Contains(x.idProducto)).ToList + cbProducto.ItemsSource = lProductos + + + 'For Each d In ra.detallesfacturasrecibidas + ' If Not ivas.Contains(d.PorcentajeIVA) Then ivas.Add(d.PorcentajeIVA) + 'Next + + cbIva.ItemsSource = ivas + cbTipoDocumento.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.documentosfacturasrecibidas.TipoDocumentoFacturaEnum)).OrderBy(Function(x) x.Descripcion) + cbCategoria.ItemsSource = bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "CATFR").OrderBy(Function(x) x.Descripcion).ToList + Dim plantillas As List(Of tsWPFCore.Plantilla) = Comun.ObtienePlantillas(bd, {"GRUPLA.FACREC"}, False) + Me.ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource = plantillas + If plantillas.Count > 0 Then + Me.ContenedorAplicacion.bePlantilla.EditValue = plantillas.First.idPlantilla + End If + Catch ex As Exception + Throw New Exception(ex.Message, ex) + End Try + End Sub + + + Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion + Dim NuevoEstado As tsUtilidades.EstadosAplicacion + + ivas = bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "PIVA").OrderBy(Function(x) x.ValorNumerico2).ToList + + If idLog.HasValue Then + Try + Dim log = bd.logs.First(Function(x) x.idLog = idLog) + ra = tsUtilidades.Utilidades.DeserializarSinErrores(log.Log, GetType(facturasrecibidas)) + If ra.idUsuario.HasValue Then ra.idUsuarioNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuario.Value) + Dim df = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "DETALLESFACTURASRECIBIDAS") + If df IsNot Nothing Then + Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(df.Log, GetType(List(Of detallesfacturasrecibidas))) + For Each d In ld + ra.detallesfacturasrecibidas.Add(d) + Next + End If + Dim mv = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "MOVIMIENTOSCAJA_FR") + If mv IsNot Nothing Then + Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(mv.Log, GetType(List(Of movimientoscaja))) + For Each d In ld + ra.movimientoscaja.Add(d) + Next + End If + Dim lent = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "ENTIDADES") + If lent IsNot Nothing Then + Dim ent = tsUtilidades.Utilidades.DeserializarSinErrores(lent.Log, GetType(entidades)) + ra.idProveedorNavigation = ent + lgDatosProveedor.DataContext = ra.idProveedorNavigation + End If + Dim lfic = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "FICHEROS") + If lfic IsNot Nothing Then + Dim fic = tsUtilidades.Utilidades.DeserializarSinErrores(lfic.Log, GetType(db.ficheros)) + ra.idFicheroNavigation = fic + End If + NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro + Catch EX As Exception + Throw New Exception("No ha sido posible mostrar el registro del cambio (id " & idLog.Value.ToString & ").", EX) + End Try + Else + If FuerzaNuevo OrElse _idFactura Is Nothing Then + ra = New facturasrecibidas + ra.FechaFactura = DateOnly.FromDateTime(Today) + _idFactura = Nothing + ra.FechaRegistro = DateOnly.FromDateTime(Today) + NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo + lgDatosProveedor.DataContext = ra.idProveedorNavigation + Else + ra = bd.facturasrecibidas.First(Function(x) x.idFactura = _idFactura) + NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro + lgDatosProveedor.DataContext = ra.idProveedorNavigation + End If + End If + cbIVA.ItemsSource = ivas + Dim lCajas = bd.cajas.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa).ToList.Where(Function(x) (x.FechaBaja.HasValue = False OrElse ra.movimientoscaja.Any(Function(y) y.idCaja = x.idCaja))).OrderBy(Function(x) x.Descripcion).ToList + Me.cbCaja.ItemsSource = lCajas + + + + + + cbRazonSocial.ItemsSource = bd.entidades.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso ((x.EsProveedor AndAlso x.FechaBaja.HasValue = False) OrElse x.idEntidad = ra.idProveedor)).ToList + gcDetalle.ItemsSource = ra.detallesfacturasrecibidas + gcRecibos.ItemsSource = ra.movimientoscaja + gcDocumentos.ItemsSource = ra.documentosfacturasrecibidas + Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idFactura AndAlso x.Aplicacion = "FACTURASRECIBIDAS").ToList + + 'Dim Acciones As New List(Of tsWPFCore.Accion) + 'Acciones.Add(New Accion With { + ' .idAccion = 1, + ' .Descripcion = "AGREGAR PRODUCTOS PENDIENTES DE FACTURAR"}) + 'Acciones.Add(New Accion With { + ' .idAccion = 2, + ' .Descripcion = "SALDAR FACTURA POR CAJA CONTADO"}) + 'Acciones.Add(New Accion With { + ' .idAccion = 3, + ' .Descripcion = "SALDAR FACTURA POR TPV"}) + 'Acciones.Add(New Accion With { + ' .idAccion = 4, + ' .Descripcion = "SALDAR FACTURA POR BANCO"}) + 'Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones + 'Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion + Me.DataContext = ra + Return NuevoEstado + End Function + + Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto + bd = tscGrupoSanchoToro.NuevoContexto + Return bd + End Function + + Public Overrides ReadOnly Property NombreTablaBase As String + Get + Return "facturasrecibidas" + End Get + End Property + + 'Public Overrides ReadOnly Property CampoIndice As String + ' Get + ' Return "idFactura" + ' End Get + 'End Property + Public Overrides ReadOnly Property idRegistroAplicacionActual As String + Get + If idLog.HasValue Then + Return "Gastos / Factura Proveedor R.C.:" & idLog.ToString + Else + If Me.Estado = tsUtilidades.EstadosAplicacion.Nuevo Then + Return "Gastos / Factura Proveedor.Nuevo" + Else + Return "Gastos / Factura Proveedor." & DirectCast(Me.DataContext, facturasrecibidas).idFactura.ToString + End If + End If + End Get + End Property + + Public Overrides ReadOnly Property DescripcionRegistro As String + Get + Return "Gastos / Factura Proveedor" + End Get + End Property + + Public Sub New(Optional idFactura As Integer? = Nothing) + + ' Llamada necesaria para el diseñador. + InitializeComponent() + _idFactura = idFactura + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + + End Sub + + + + + Public Overrides Sub EstableceTitulo() + If idLog.HasValue Then + Dim fr As facturasrecibidas = Me.DataContext + Me.docpanel.Caption = "R.C. Gastos / Factura de Proveedor " & fr.NumeroFactura + Me.docpanel.Tag = "R.C. Gastos / Factura Recibida." & fr.NumeroFactura + Else + If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then + Dim fr As facturasrecibidas = Me.DataContext + Me.docpanel.Caption = " Gastos / Factura de Proveedor " & fr.NumeroFactura + Me.docpanel.Tag = " Gastos / Factura Recibida." & fr.NumeroFactura + Else + Me.docpanel.Caption = " Gastos / Factura de Proveedor Nueva" + Me.docpanel.Tag = " Gastos / FacturaRecibida.Nuevo" + End If + End If + ' End If + 'End If + End Sub + + Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos + Dim pers = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario) + ' pers.Eliminar = False + Return pers + End Function + + + Private Sub ap_ValidarControl(sender As Object, e As ValidationEventArgs, ByRef ev As ErrorValidacion, ByRef ValorOriginalCambiado As Object) Handles Me.ValidarControl + Dim pts As PropiedadesTS = sender.parent.propiedadests + Try + If Not pts Is Nothing Then + Me.ErroresValidacion.EliminaError("validando-" & pts.NombreCampo) + Dim ra As facturasrecibidas = Me.DataContext + Select Case pts.NombreCampo.ToLower + Case "idproveedor_nulable" + Dim id As Integer = e.Value + Dim ent = bd.entidades.First(Function(x) x.idEntidad = id) + lgDatosProveedor.DataContext = ent + End Select + End If + Catch ex As Exception + Dim sCodigoError As String = "validando-" + If pts IsNot Nothing Then + sCodigoError &= pts.NombreCampo + End If + ev = New ErrorValidacion(sCodigoError, sender, ex.Message, ex, DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical) + e.IsValid = False + End Try + End Sub + + + Private Sub ap_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar + _idFactura = ra.idFactura + RefrescaUC() + ' Me.gcRecibos.ItemsSource = ra.movimientoscaja + ' Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idFactura AndAlso x.Aplicacion = "FACTURASRECIBIDAS").ToList + End Sub + + + Private Sub ap_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar + Dim ra As facturasrecibidas = Me.DataContext + Select Case Celda.Column.FieldName.ToLower + Case "idlog" + Dim log As logs = gcLogs.CurrentItem + Dim id As Integer = log.idLog + Dim uc As New ucFacturaRecibida + uc.idLog = log.idLog + FuncionesDinamicas.AbrirAP(uc, OtrosParametros) + End Select + 'Select Case Celda.Column.FieldName.ToLower + ' Case "numeroalbaranentrega" + ' Dim ra = DirectCast(Me.gcDetalle.CurrentItem, detallesfacturasrecibidas) + ' Dim id As Integer = ra.detallesalbaranes.idAlbaranEntrega + ' FuncionesDinamicas.AbrirAP(New ucAlbaranEntrega(id), OtrosParametros) + ' Case "numeroalbaranrecogida" + ' Dim ra = DirectCast(Me.gcDetalle.CurrentItem, detallesfacturasrecibidas) + ' Dim id As Integer = ra.detallesalbaranes.idAlbaranRecogida + ' FuncionesDinamicas.AbrirAP(New ucAlbaranRecogida(id), OtrosParametros) + 'End Select + End Sub + + + + + + + + Private Sub ap_EstadoCambiado(EstadoAnterior As tsUtilidades.EstadosAplicacion, EstadoNuevo As tsUtilidades.EstadosAplicacion) Handles Me.EstadoCambiado + Select Case EstadoNuevo + Case EstadosAplicacion.ModificandoRegistro + Dim ra As facturasrecibidas = Me.DataContext + + ' Dim ra As albaranesrecogida = Me.DataContext + ' If ra.detallesfacturasrecibidas.ToList.Any(Function(x) x.idAlbaranRecogida.HasValue OrElse (x.idUltimaFactura.HasValue AndAlso (x.facturasrecibidas.Fecha > ra.Fecha.Date))) Then me.EstableceSoloLectura() + End Select + If idLog.HasValue Then EstableceSoloLectura() + EstableceSoloLecturaCI() + End Sub + + + Private Sub BiBuscarProducto_Click(sender As Object, e As RoutedEventArgs) + 'Dim dxw As New dxwProductos(lProductos) + 'If dxw.ShowDialog Then + ' If gcDetalle.CurrentItem Is Nothing Then tvDetalle.AddNewRow() + ' Dim def As detallesfacturasrecibidas = gcDetalle.CurrentItem + ' Dim prod = lProductos.First(Function(x) x.idProducto = dxw.idProducto) + ' def.idProducto = prod.idProducto + ' RellenaDatosProducto(def) + ' tvDetalle.MoveNextCell() + ' gcDetalle.RefreshRow(tvDetalle.FocusedRowHandle) + 'End If + If tvDetalle.ActiveEditor Is Nothing Then + Dispatcher.BeginInvoke(New Action(Sub() tvDetalle.ShowEditor()), System.Windows.Threading.DispatcherPriority.Render) + End If + + Dim dxw As New dxwProductos(lProductos) + If dxw.ShowDialog Then + If gcDetalle.CurrentItem Is Nothing Then tvDetalle.AddNewRow() + Dim def As detallesfacturasrecibidas = gcDetalle.CurrentItem + Dim prod = lProductos.First(Function(x) x.idProducto = dxw.idProducto) + def.idProducto = prod.idProducto + If tvDetalle.ActiveEditor IsNot Nothing Then tvDetalle.ActiveEditor.EditValue = prod.idProducto + tvDetalle.PostEditor() + tvDetalle.CloseEditor() + gcDetalle.RefreshRow(tvDetalle.FocusedRowHandle) + End If + End Sub + + + + + + Private Sub ap_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, OpcionGuardado As Integer) Handles Me.AntesGuardar + + ra.idUsuario = idUsuario + Dim hte As New Hashtable + If ra.detallesfacturasrecibidas.Count = 0 Then + hte.Add("ALMACENAR-DETALLE_OBLIGATORIO", "Es obligatorio introducir al menos un artículo") + End If + If bd.facturasrecibidas.Any(Function(x) x.NumeroFactura = ra.NumeroFactura AndAlso x.idProveedor = ra.idProveedor AndAlso x.idFactura <> ra.idFactura) Then + hte.Add("ALMACENAR-YA-EXISTE-OTRA-FACTURA", "Ya existe esta factura del mismo cliente registrada") + End If + If ra.TotalFactura = 0 Then + hte.Add("ALMACENAR-IMPORTE_0", "El total de la factura no puede ser 0") + End If + If Math.Abs(ra.ImportePagado) > Math.Abs(ra.TotalFactura) Then + hte.Add("ALMACENAR-IMPORTE_PAGADO_SUPERIOR", "El importe pagado de los recibos no puede superar al total de la factura") + End If + + If hte.Count > 0 Then + MensajesError = hte + Cancelar = True + Else + For Each mv In ra.movimientoscaja + mv.Tipo = TipoMovimientoEnum.RECIBO_PROVEEDOR + If mv.idUsuario.HasValue = False Then mv.idUsuario = idUsuario + Next + For Each d In ra.documentosfacturasrecibidas + If d.idUsuario.HasValue = False Then d.idUsuario = idUsuario + Next + If ra.ImportePendiente = 0 Then + ra.FechaPago = DateOnly.FromDateTime(ra.movimientoscaja.OrderByDescending(Function(x) x.Fecha).First.Fecha) + Else + ra.FechaPago = Nothing + End If + If ra.PorcentajeIVA2.HasValue = False Then + ra.BaseImponible2 = Nothing + ra.CuotaIVA2 = Nothing + End If + If ra.PorcentajeIVA3.HasValue = False Then + ra.BaseImponible3 = Nothing + ra.CuotaIVA3 = Nothing + End If + End If + End Sub + + Private Sub tvDetalle_CellValueChanged(sender As Object, e As CellValueChangedEventArgs) Handles tvDetalle.CellValueChanged + Try + Dim def As detallesfacturasrecibidas = e.Row + Select Case e.Column.FieldName.ToLower + Case "idproducto" + RellenaDatosProducto(def) + 'Case "cantidad", "precio" + ' def.RefrescaImporte() + Case "idtipoiva" + Dim idTIVA = CInt(e.Value) + def.PorcentajeIVA = ivas.First(Function(x) x.idEnumeracion = idTIVA).ValorNumerico1 + End Select + Catch ex As Exception + + End Try + End Sub + Private Sub RellenaDatosProducto(dea As detallesfacturasrecibidas) + Dim ae As facturasrecibidas = Me.DataContext + Dim pr = lProductos.First(Function(x) x.idProducto = dea.idProducto) + dea.Precio = pr.UltimoPrecioCompra + If dea.Cantidad = 0 Then dea.Cantidad = 1 + 'dea.RefrescaImporte() + End Sub + + Private Sub BiBuscarProveedor_Click(sender As Object, e As RoutedEventArgs) + If Me.ContenedorAplicacion.btGuardar.IsEnabled Then + Dim dxw As New dxwEntidades(bd, False, True) + If dxw.ShowDialog Then + Dim ra As facturasrecibidas = Me.DataContext + Dim ent = bd.entidades.First(Function(x) x.idEntidad = dxw.Entidad.idEntidad) + ra.idProveedorNavigation = ent + ra.idProveedor_Nulable = ent.idEntidad + lgDatosProveedor.DataContext = ent + End If + End If + End Sub + + + + + + + + + Private Sub ap_ImprimirPlantilla(sender As Object, e As ItemClickEventArgs, idPlantilla As Integer) Handles Me.ImprimirPlantilla + Imprimir(idPlantilla, False, 1) + End Sub + Private Sub Imprimir(idPlantilla As Integer, ImpresoraDefecto As Boolean, Copias As Integer) + + Dim ds As List(Of facturasrecibidas) + Dim pl = bd.plantillas.AsNoTracking.Where(Function(x) x.idPlantilla = idPlantilla).Select(Function(x) New With {.Fichero = x.idFicheroNavigation.Fichero, .Tipo = x.idGrupoNavigation.Codigo}).FirstOrDefault + ds = New List(Of facturasrecibidas) + ds.Add(ra) + Informes.ImprimirPlantilla(bd, pl.Fichero, ds, ImpresoraDefecto, Copias) + + End Sub + + + 'Private Sub ap_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion + + + 'End Sub + + + Private Sub tvDetalle_RowUpdated(sender As Object, e As DevExpress.Xpf.Grid.RowEventArgs) Handles tvDetalle.RowUpdated + Call CalculaTotales() + End Sub + Sub CalculaTotales() + Dim ra As facturasrecibidas = Me.DataContext + Dim ivas(2) As Double? + For Each df In ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA.HasValue).ToList + For i = 0 To 3 + If i = 3 Then Throw New Exception("Demasiados tipos de iva en la misma factura.") + If ivas(i).HasValue = False OrElse ivas(i).Value = df.PorcentajeIVA Then + ivas(i) = df.PorcentajeIVA + Exit For + End If + Next + Next + ra.PorcentajeIVA1 = ivas(0) + ra.PorcentajeIVA2 = ivas(1) + ra.PorcentajeIVA3 = ivas(2) + ra.BaseImponibleExenta = ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA.HasValue = False).Sum(Function(x) x.Importe) + ra.BaseImponible1 = Nothing + ra.BaseImponible2 = Nothing + ra.BaseImponible3 = Nothing + If ivas(0).HasValue Then ra.BaseImponible1 = ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(0)).Sum(Function(x) x.Importe) + If ivas(1).HasValue Then ra.BaseImponible2 = ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(1)).Sum(Function(x) x.Importe) + If ivas(2).HasValue Then ra.BaseImponible3 = ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(2)).Sum(Function(x) x.Importe) + 'ra.BaseImponible2 = If(ivas(2).HasValue, ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA = ivas(1)).Sum(Function(x) x.Importe), 0) + 'ra.BaseImponible3 = If(ivas(2).HasValue, ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA = ivas(2)).Sum(Function(x) x.Importe), 0) + ra.TotalBaseImponible = Math.Round(ra.detallesfacturasrecibidas.Sum(Function(x) x.Importe), 2) + CalculaIRPF(ra) + CalculaCuotasIVA(ra) + CalculaTotalesFinales(ra) + End Sub + Public Sub CalculaIRPF(F As facturasrecibidas) + F.IRPF = Math.Round(F.TotalBaseImponible * F.PorcentajeIRPF / 100, 2, MidpointRounding.AwayFromZero) + End Sub + Public Sub CalculaCuotasIVA(F As facturasrecibidas) + F.CuotaIVA1 = Nothing + F.CuotaIVA2 = Nothing + F.CuotaIVA3 = Nothing + If F.PorcentajeIVA1.HasValue Then + F.CuotaIVA1 = Math.Round(F.BaseImponible1.Value * F.PorcentajeIVA1.Value / 100, 2, MidpointRounding.AwayFromZero) + End If + If F.PorcentajeIVA2.HasValue Then + F.CuotaIVA2 = Math.Round(F.BaseImponible2.Value * F.PorcentajeIVA2.Value / 100, 2, MidpointRounding.AwayFromZero) + End If + If F.PorcentajeIVA3.HasValue Then + F.CuotaIVA3 = Math.Round(F.BaseImponible3.Value * F.PorcentajeIVA3.Value / 100, 2, MidpointRounding.AwayFromZero) + End If + End Sub + Public Sub CalculaTotalesFinales(ra As facturasrecibidas) + ra.TotalIVA = If(ra.CuotaIVA1.HasValue, ra.CuotaIVA1.Value, 0) + If(ra.CuotaIVA2.HasValue, ra.CuotaIVA2.Value, 0) + If(ra.CuotaIVA3.HasValue, ra.CuotaIVA3.Value, 0) + ra.TotalFactura = Math.Round(ra.TotalBaseImponible + ra.TotalIVA - ra.IRPF, 2, MidpointRounding.AwayFromZero) + ra.ImportePagado = Math.Round(ra.movimientoscaja.Sum(Function(x) x.ImporteNegativo), 2, MidpointRounding.AwayFromZero) + + End Sub + Private Sub tvDetalle_ValidaFila(sender As Object, e As DevExpress.Xpf.Grid.GridRowValidationEventArgs) Handles tvDetalle.ValidateRow + 'Dim df As detallesfacturasrecibidas = e.Row + 'Dim htErrores = New Hashtable + 'If df.Cantidad = 0 Then + ' DXMessageBox.Show("La Cantidad no puede ser 0", "Error") + ' e.SetError("La Cantidad no puede ser 0") + ' e.IsValid = False + 'End If + Try + Dim htErrores = New Hashtable + ErroresValidacion.LimpiarErrores("TSGC-" & gcDetalle.PropiedadesTS.NumeroObjeto.ToString & ":" & e.RowHandle.ToString & ":") + Dim df As detallesfacturasrecibidas = e.Row + + If df.Cantidad = 0 Then + htErrores.Add("Cantidad0", "La Cantidad no puede ser 0") + End If + + If htErrores.Count > 0 Then + Me.AgregaErroresTSGC(gcDetalle, htErrores, e) + End If + Catch ex As Exception + FuncionesDinamicas.ErrorNoControladoAp(Me, ex) + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub + + Private Sub gcDetalle_DespuesEliminar(gc As tsGridControl) Handles gcDetalle.DespuesEliminar + CalculaTotales() + End Sub + + Private Sub tvRecibos_ValidaFila(sender As Object, e As GridRowValidationEventArgs) Handles tvRecibos.ValidateRow + 'Dim mv As movimientoscaja = e.Row + 'If mv.Importe = 0 Then + ' DXMessageBox.Show("El Importe no puede ser 0", "Error") + ' e.SetError("El Importe no puede ser 0") + ' e.IsValid = False + 'End If + Try + Dim htErrores = New Hashtable + ErroresValidacion.LimpiarErrores("TSGC-" & gcRecibos.PropiedadesTS.NumeroObjeto.ToString & ":" & e.RowHandle.ToString & ":") + Dim mv As movimientoscaja = e.Row + + If mv.Importe = 0 Then + htErrores.Add("Importe0", "El Importe no puede ser 0") + End If + If htErrores.Count > 0 Then + Me.AgregaErroresTSGC(gcRecibos, htErrores, e) + End If + Catch ex As Exception + FuncionesDinamicas.ErrorNoControladoAp(Me, ex) + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub + + Private Sub gcRecibos_DespuesEliminar(gc As tsGridControl) Handles gcRecibos.DespuesEliminar + CalculaTotales() + End Sub + + Private Sub tvRecibos_RowUpdated(sender As Object, e As RowEventArgs) Handles tvRecibos.RowUpdated + Dim ra As facturasrecibidas = Me.DataContext + CalculaTotalesFinales(ra) + End Sub + + Private Sub tvRecibos_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvRecibos.InitNewRow + gcRecibos.SetCellValue(e.RowHandle, "Fecha", Now) + gcRecibos.SetCellValue(e.RowHandle, "FechaCreacion", Now) + End Sub + + Private Sub ucFacturaRecibida_CampoActualizado(sender As Object, e As DataTransferEventArgs) Handles Me.CampoActualizado + Dim pts As PropiedadesTS = sender.parent.propiedadests + If Not pts Is Nothing Then + Dim ra As facturasrecibidas = Me.DataContext + Select Case pts.NombreCampo.ToLower + Case "porcentajeirpf" + CalculaIRPF(ra) + CalculaTotalesFinales(ra) + Case "cuotaiva1", "cuotaiva2", "cuotaiva3", "irpf" + CalculaTotalesFinales(ra) + Case "idproveedor_nulable" + ra.idProveedorNavigation = bd.entidades.First(Function(x) x.idEntidad = ra.idProveedor) + End Select + End If + End Sub + + Private Sub tvDetalle_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvDetalle.InitNewRow + gcDetalle.SetCellValue(e.RowHandle, "idTipoIVA", ivas.OrderByDescending(Function(x) x.ValorNumerico1).First.idEnumeracion) + End Sub + + + + Private Sub tvDetalle_PreviewKeyDown(sender As Object, e As Input.KeyEventArgs) Handles tvDetalle.PreviewKeyDown + If e.Key = Key.F6 Then + Select Case gcDetalle.CurrentColumn.FieldName.ToLower + Case "idproducto" + tvDetalle.ShowEditor() + BiBuscarProducto_Click(Nothing, Nothing) + End Select + End If + End Sub + + Private Sub cbRazonSocial_PreviewKeyDown(sender As Object, e As Input.KeyEventArgs) Handles cbRazonSocial.PreviewKeyDown + If e.Key = Key.F6 Then + BiBuscarProveedor_Click(Nothing, Nothing) + End If + End Sub + + Private Sub gcRecibos_AntesEliminar(gc As tsGridControl, ByRef Cancelar As Boolean) Handles gcRecibos.AntesEliminar + Dim da As movimientoscaja = gc.CurrentItem + If da.idMovimientoCierre.HasValue Then + DXMessageBox.Show("No se puede eliminar un pago ya que está cerrado") + Cancelar = True + End If + End Sub + + Private Sub tvDocumentos_ValidateRow(sender As Object, e As GridRowValidationEventArgs) Handles tvDocumentos.ValidateRow + Dim ges As documentosfacturasrecibidas = gcDocumentos.CurrentItem + If ges.idUsuario.HasValue = False Then + ges.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario + End If + End Sub + Private Sub VerDocumento(sender As System.Object, e As System.Windows.RoutedEventArgs) + Try + Dim exp As documentosfacturasrecibidas = gcDocumentos.CurrentItem + If exp IsNot Nothing AndAlso exp.idFicheroNavigation IsNot Nothing AndAlso exp.idFicheroNavigation.NombreFichero IsNot Nothing AndAlso exp.idFicheroNavigation.Fichero IsNot Nothing Then + Dim sftmp As String = tsUtilidades.Utilidades.ObtieneDirectorioAleatorio("GrupoSanchoToro") & "\" & exp.idFicheroNavigation.NombreFichero + tsUtilidades.Utilidades.ByteArrayAFichero(exp.idFicheroNavigation.Fichero, sftmp, True) + tsUtilidades.Sistema.EjecutaFichero(sftmp) + End If + Catch ex As Exception + End Try + End Sub + Private Sub Examinar(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btFichero.DefaultButtonClick + Try + If gcDocumentos.CurrentItem Is Nothing Then tvDocumentos.AddNewRow() + Dim exp As documentosfacturasrecibidas = gcDocumentos.CurrentItem + Dim ofd As New OpenFileDialog + If ofd.ShowDialog() Then + Dim fin As New FileInfo(ofd.FileName) + If fin.Length > 1024 * 1024 * 50 Then + DXMessageBox.Show("El fichero no puede ser mayor de 50 Mb", "Atención") + Else + Dim f() As Byte = IO.File.ReadAllBytes(ofd.FileName) + Dim idTipoDocumentoExp = bd.enumeraciones.First(Function(x) x.Codigo = "TIPFIC.EXPENT").idEnumeracion + If exp.idFicheroNavigation Is Nothing Then + Dim fi As New db.ficheros + exp.idFicheroNavigation = fi + End If + exp.idFicheroNavigation.NombreFichero = IO.Path.GetFileName(ofd.FileName) + exp.idFicheroNavigation.Fichero = f + exp.idFicheroNavigation.Fecha = Now + exp.idFicheroNavigation.Descripcion = exp.Descripcion.Acortar(80) + exp.idFicheroNavigation.idTipo = idTipoDocumentoExp + exp.Fecha = Now + Dim usu = bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario) + exp.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario + exp.idUsuarioNavigation = usu + tvDocumentos.MoveNextCell() + gcDocumentos.RefreshRow(tvDocumentos.FocusedRowHandle) + End If + End If + Catch ex As Exception + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub + + Private Sub tvDocumentos_PreviewKeyDown(sender As Object, e As KeyEventArgs) + If e.Key = Key.F6 AndAlso gcDocumentos.CurrentColumn.FieldName.ToLower = "ficheros.nombrefichero" Then + Examinar(Nothing, Nothing) + End If + End Sub + + Private Sub tvDocumentos_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvDocumentos.InitNewRow + gcDocumentos.SetCellValue(e.RowHandle, "Fecha", Now) + End Sub + + Private Sub teBI1_EditValueChanged(sender As Object, e As EditValueChangedEventArgs) Handles teBI1.EditValueChanged + EstableceSoloLectura(teCuotaIVA1, ra IsNot Nothing AndAlso ra.BaseImponible1.HasValue AndAlso ra.BaseImponible1.Value <> 0) + End Sub + Private Sub teBI2_EditValueChanged(sender As Object, e As EditValueChangedEventArgs) Handles teBI1.EditValueChanged + EstableceSoloLectura(teCuotaIVA2, ra IsNot Nothing AndAlso ra.BaseImponible2.HasValue AndAlso ra.BaseImponible2.Value <> 0) + End Sub + Private Sub teBI3_EditValueChanged(sender As Object, e As EditValueChangedEventArgs) Handles teBI1.EditValueChanged + EstableceSoloLectura(teCuotaIVA3, ra IsNot Nothing AndAlso ra.BaseImponible3.HasValue AndAlso ra.BaseImponible3.Value <> 0) + End Sub + Private Sub EstableceSoloLecturaCI() + EstableceSoloLectura(teCuotaIVA1, ra IsNot Nothing AndAlso ra.BaseImponible1.HasValue AndAlso ra.BaseImponible1.Value <> 0) + EstableceSoloLectura(teCuotaIVA2, ra IsNot Nothing AndAlso ra.BaseImponible2.HasValue AndAlso ra.BaseImponible2.Value <> 0) + EstableceSoloLectura(teCuotaIVA3, ra IsNot Nothing AndAlso ra.BaseImponible3.HasValue AndAlso ra.BaseImponible3.Value <> 0) + End Sub + +End Class + diff --git a/GestionGrupoSanchoToro/Compras/ucFacturasRecibidas.xaml b/GestionGrupoSanchoToro/Compras/ucFacturasRecibidas.xaml new file mode 100644 index 0000000..f526366 --- /dev/null +++ b/GestionGrupoSanchoToro/Compras/ucFacturasRecibidas.xaml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GestionGrupoSanchoToro/Informes/ucPlantillas.xaml.vb b/GestionGrupoSanchoToro/Informes/ucPlantillas.xaml.vb new file mode 100644 index 0000000..e445d94 --- /dev/null +++ b/GestionGrupoSanchoToro/Informes/ucPlantillas.xaml.vb @@ -0,0 +1,401 @@ +Imports bdGrupoSanchoToro.db +Imports System.Data.Entity +Imports DevExpress.Xpf.Core.ServerMode +Imports DevExpress.Xpf.Core +Imports DevExpress.XtraReports.UserDesigner +Imports DevExpress.XtraReports.UI +Imports System.IO +Imports DevExpress.Xpf.Grid +Imports DevExpress.Xpf.RichEdit +Imports DevExpress.Office.Services +Imports System.ComponentModel + +Imports tsWPFCore +Imports DevExpress.Xpf.Docking + + +Imports DevExpress.Xpf.Reports.UserDesigner +Imports DevExpress.Xpf.Reports.UserDesigner.Native +Imports System +Imports System.Collections.Generic +Imports System.Data +Imports System.Linq +Imports System.Text +Imports System.Windows +Imports System.Collections + +Imports bdGrupoSanchoToro.db.Utilidades +Imports bdGrupoSanchoToro.dbcontext + + +Public Class ucPlantillas + + + Private bd As bdGrupoSanchoToro.tscGrupoSanchoToro + Private PlantillaActual As plantillas + Private WithEvents bplas As BindingList(Of plantillas) + ' Private mdiController As XRDesignMdiController + + 'Public Overrides ReadOnly Property CampoIndice As String + ' Get + ' Return "" + ' End Get + 'End Property + + Public Overrides ReadOnly Property idRegistroAplicacionActual As String + Get + Return "Plantillas" + End Get + End Property + + Public Overrides ReadOnly Property DescripcionRegistro As String + Get + Return "Plantillas" + End Get + End Property + + Public Overrides ReadOnly Property NombreTablaBase As String + Get + Return "plantillas" + End Get + End Property + + + + Private Sub tvPlantillas_InitNewRow(sender As Object, e As DevExpress.Xpf.Grid.InitNewRowEventArgs) + ' e.Source = New plantillas + GC.SetCellValue(e.RowHandle, "Oculto", False) + gc.SetCellValue(e.RowHandle, "TipoListado", False) + gc.SetCellValue(e.RowHandle, "idEmpresa", EmpresaActual.idEmpresa) + 'e.Handled = True + End Sub + + + Private Sub btEditar_Click(sender As Object, e As RoutedEventArgs) + + Dim pl As plantillas + + If GC.View.FocusedRowHandle = DataControlBase.NewItemRowHandle Then + pl = GC.GetRow(DataControlBase.NewItemRowHandle) + GC.View.CommitEditing(True) + Else + GC.View.CommitEditing(True) + pl = Me.gc.GetFocusedRow + End If + + If pl.idGrupo <> 0 Then + EditarPlantilla(pl) + Else + DXMessageBox.Show("La columna Grupo de plantilla es obligatoria", "Atención", MessageBoxButton.OK, MessageBoxImage.Exclamation) + End If + End Sub + + + Private Sub EditarPlantilla(pl As bdGrupoSanchoToro.db.plantillas) + Try + If pl.idPlantilla > 0 Then + bd = tscGrupoSanchoToro.NuevoContexto + pl = bd.plantillas.First(Function(X) X.idPlantilla = pl.idPlantilla) + End If + PlantillaActual = pl + Select Case PlantillaActual.idGrupoNavigation.Codigo + 'Case "GRUPLA.CERTIFICADOS" + ' Dim tsEditor As tsWPFCore.dxwEditor + + ' If pl.idFichero.HasValue AndAlso pl.idFicheroNavigation.Fichero IsNot Nothing Then + ' ' tsEditor = New tsWPFCore.dxwEditor(New IO.MemoryStream(pl.idFicheroNavigation.Fichero), DevExpress.XtraRichEdit.DocumentFormat.OpenXml, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, AddressOf Guardar, AddressOf CargarDatosMailMergeCertificados) + ' Else + ' ' tsEditor = New tsWPFCore.dxwEditor(Nothing, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, AddressOf Guardar, AddressOf CargarDatosMailMergeCertificados) + ' End If + ' tsEditor.ShowDialog() + Case "GRUPLA.DOCX" + Dim tsEditor As tsWPFCore.dxwEditor + + If pl.idFichero.HasValue AndAlso pl.idFicheroNavigation.Fichero IsNot Nothing Then + tsEditor = New tsWPFCore.dxwEditor(New IO.MemoryStream(pl.idFicheroNavigation.Fichero), DevExpress.XtraRichEdit.DocumentFormat.OpenXml, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, AddressOf GuardarPlantilla) + Else + tsEditor = New tsWPFCore.dxwEditor(Nothing, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, AddressOf GuardarPlantilla) + End If + tsEditor.ShowDialog() + + Case "GRUPLA.ODT" + Dim tsEditor As tsWPFCore.dxwEditor + + If pl.idFichero.HasValue AndAlso pl.idFicheroNavigation.Fichero IsNot Nothing Then + tsEditor = New tsWPFCore.dxwEditor(New IO.MemoryStream(pl.idFicheroNavigation.Fichero), DevExpress.XtraRichEdit.DocumentFormat.OpenDocument, DevExpress.XtraRichEdit.DocumentFormat.OpenDocument, AddressOf GuardarPlantilla) + Else + tsEditor = New tsWPFCore.dxwEditor(Nothing, DevExpress.XtraRichEdit.DocumentFormat.OpenDocument, DevExpress.XtraRichEdit.DocumentFormat.OpenDocument, AddressOf GuardarPlantilla) + End If + tsEditor.ShowDialog() + Case Else + ' Dim fr = New InformesCOAS.xrFactura + Dim xr As New XtraReport + Try + If pl.idFichero.HasValue = False OrElse pl.idFicheroNavigation.Fichero Is Nothing Then + xr = New XtraReport + Else + xr.LoadLayoutFromXml(New MemoryStream(pl.idFicheroNavigation.Fichero)) + End If + Me.Guardar(Nothing, Nothing, True, False) + Dim vi As New tsWPFCore.ucDiseñadorInformes(xr, pl.idPlantilla, AddressOf GuardarWPF) + + Dim GrupoDocumentos = Me.GrupoDocumentos + Dim dc = tsWPFCore.Comun.dm.DockController + + Dim docpanel As DevExpress.Xpf.Docking.DocumentPanel + Dim d = (From p In GrupoDocumentos.Items Where p.Tag = "Plantilla." & pl.idPlantilla.ToString) + If d.Count > 0 Then + docpanel = d.First + Else + docpanel = New DevExpress.Xpf.Docking.DocumentPanel + docpanel.Caption = pl.Descripcion + docpanel.Content = vi + docpanel.ClosingBehavior = DevExpress.Xpf.Docking.ClosingBehavior.ImmediatelyRemove + docpanel.Tag = "Plantilla." & pl.idPlantilla.ToString + GrupoDocumentos.Items.Add(docpanel) + End If + dc.Activate(docpanel) + + + Catch ex As Exception + DXMessageBox.Show(ex.Message, "Error ucPlantillas.EditarPlantilla") + 'Comun.GeneraRegistroCorreoExcepcion(bd, ex, "ucPlantillas.EditarPlantilla") + Finally + 'xr.Dispose() + 'xr = Nothing + 'System.GC.Collect() + 'System.GC.WaitForFullGCComplete() + End Try + End Select + Catch ex As Exception + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub + + + + + + Private Sub GuardarPlantilla(ms As MemoryStream) + Me.Guardar(Nothing, Nothing, True, False) + + If PlantillaActual.idFichero.HasValue = False Then + Dim idTipoPlantilla = bd.enumeraciones.Where(Function(x) x.Codigo = "TIPFIC.PLANTILLA").First.idEnumeracion + PlantillaActual.idFicheroNavigation = New ficheros With {.idTipo = idTipoPlantilla} + End If + Dim sextension As String + Select Case PlantillaActual.idGrupoNavigation.Codigo + Case "GRUPLA.ODT" + sextension = ".odt" + Case "GRUPLA.XHTML" + sextension = ".xhtml" + 'Case "GRUPLA.NOMINASWORD" + ' sextension = ".odt" + Case "GRUPLA.DOCX" + sextension = ".docx" + Case Else + sextension = ".xml" + End Select + PlantillaActual.idFicheroNavigation.Fichero = ms.ToArray + PlantillaActual.idFicheroNavigation.Fecha = Now + PlantillaActual.idFicheroNavigation.Descripcion = PlantillaActual.Descripcion + PlantillaActual.idFicheroNavigation.NombreFichero = PlantillaActual.idPlantilla.ToString & sextension + bd.GuardarCambios() + + End Sub + + + + + Private Sub CopiarPlantilla(sender As Object, e As RoutedEventArgs) + Try + Dim ra As bdGrupoSanchoToro.db.plantillas = Me.gc.CurrentItem + Dim np As New plantillas + Dim i As Integer = 1 + Do + np.Descripcion = "Copia " & i.ToString & " " & ra.Descripcion + i += 1 + Loop Until Not bd.plantillas.ToList.Any(Function(x) x.Descripcion = np.Descripcion) + If ra.Codigo IsNot Nothing Then + i = 1 + Do + np.Codigo = ra.Codigo & "-" & i.ToString + i += 1 + Loop Until Not bd.plantillas.ToList.Any(Function(x) x.Codigo = np.Codigo) + End If + np.idGrupo = ra.idGrupo + np.Observaciones = ra.Observaciones + np.Oculta = ra.Oculta + np.TipoListado = ra.TipoListado + bd.plantillas.Add(np) + bd.GuardarCambios() + Dim idTipoPlantilla = bd.enumeraciones.Where(Function(x) x.Codigo = "TIPFIC.PLANTILLA").First.idEnumeracion + np.idFicheroNavigation = New ficheros With {.idTipo = idTipoPlantilla} + Dim sextension As String + Select Case ra.idGrupoNavigation.Codigo + Case "GRUPLA.XHTML" + sextension = ".xhtml" + Case "GRUPLA.ODT" + sextension = ".odt" + Case "GRUPLA.DOCX" + sextension = ".docx" + Case Else + sextension = ".xml" + End Select + np.idFicheroNavigation.Fichero = ra.idFicheroNavigation.Fichero + np.idFicheroNavigation.Fecha = Now + np.idFicheroNavigation.Descripcion = np.Descripcion + np.idFicheroNavigation.NombreFichero = np.idPlantilla.ToString & sextension + bd.GuardarCambios() + + EstableceDCPrincipal() + Catch ex As Exception + DXMessageBox.Show(ex.Message, "Error") + End Try + + End Sub + + Private Sub bplas_ListChanged(sender As Object, e As ListChangedEventArgs) Handles bplas.ListChanged + If e.ListChangedType = ListChangedType.ItemAdded Then + bd.plantillas.Add(DirectCast(bplas.Item(e.NewIndex), plantillas)) + End If + End Sub + + Private Sub gc_DespuesEliminar(gc As tsWPFCore.tsGridControl) Handles gc.DespuesEliminar + bplas.Remove(gc.CurrentItem) + Me.bd.GuardarCambios() + End Sub + + + + Private Sub tvPlantillas_ValidateRow(sender As Object, e As GridRowValidationEventArgs) Handles tvPlantillas.ValidateRow + Try + ErroresValidacion.EliminaError("DatosDuplicados") + Dim pl As plantillas + If tvPlantillas.FocusedRowHandle = DataControlBase.NewItemRowHandle Then + pl = gc.GetRow(DataControlBase.NewItemRowHandle) + Else + pl = gc.CurrentItem + End If + If pl.idPlantilla = 0 Then + If bplas.Where(Function(x) x.Descripcion = pl.Descripcion).Count > 1 OrElse bd.plantillas.Any(Function(x) x.Descripcion = pl.Descripcion) Then + e.IsValid = False + + ' Debug.WriteLine("bplas:" & bplas.Any(Function(x) x.Descripcion = pl.Descripcion).ToString) + ' Debug.WriteLine("bd:" & bd.plantillas.Any(Function(x) x.Descripcion = pl.Descripcion).ToString) + End If + If pl.Codigo IsNot Nothing AndAlso pl.Codigo <> "" Then + If bplas.Where(Function(x) x.Codigo = pl.Codigo).Count > 1 OrElse bd.plantillas.Any(Function(x) x.Codigo = pl.Codigo) Then + e.IsValid = False + End If + End If + Else + If bd.plantillas.Any(Function(x) x.idPlantilla <> pl.idPlantilla AndAlso (x.Descripcion = pl.Descripcion)) Then + e.IsValid = False + + End If + If pl.Codigo IsNot Nothing AndAlso pl.Codigo <> "" Then + If bplas.Where(Function(x) x.Codigo = pl.Codigo).Count > 1 OrElse bd.plantillas.Any(Function(x) x.idPlantilla <> pl.idPlantilla AndAlso x.Codigo = pl.Codigo) Then + e.IsValid = False + End If + End If + End If + If Not e.IsValid Then + e.SetError("Nombre de Plantilla o Codigo ya utilizado") + DXMessageBox.Show("Nombre de Plantilla o Codigo ya utilizado", "Error") + End If + bd.GuardarCambios() + Catch EX As Exception + e.SetError(EX.Message) + e.IsValid = False + DXMessageBox.Show(EX.Message, "Error") + End Try + End Sub + + + Public Shared Sub GuardarWPF(b() As Byte, idPlantilla As Integer) + Dim bd = tscGrupoSanchoToro.NuevoContexto() + Dim plantilla = bd.plantillas.First(Function(X) X.idPlantilla = idPlantilla) + + + bd.GuardarCambios() + If plantilla.idFichero.HasValue = False Then + Dim idTipoPlantilla = bd.enumeraciones.Where(Function(x) x.Codigo = "TIPFIC.PLANTILLA").First.idEnumeracion + plantilla.idFicheroNavigation = New ficheros With {.idTipo = idTipoPlantilla} + End If + Dim sextension As String + Select Case plantilla.idGrupoNavigation.Codigo + Case "GRUPLA.XHTML" + sextension = ".xhtml" + Case "GRUPLA.DOCX" + sextension = ".docx" + Case Else + sextension = ".xml" + End Select + plantilla.idFicheroNavigation.Fichero = b + plantilla.idFicheroNavigation.Fecha = Now + plantilla.idFicheroNavigation.Descripcion = plantilla.Descripcion + plantilla.idFicheroNavigation.NombreFichero = plantilla.idPlantilla.ToString & sextension + bd.GuardarCambios() + End Sub + + Public Overrides Function EstableceDCPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion + Try + Dim gptmp = (From e In bd.enumeraciones Select e Where e.idGrupoEnumeracionNavigation.Grupo = "GRUPLA").ToList + Dim gp As New List(Of bdGrupoSanchoToro.db.enumeraciones) + For Each g In gptmp + If Comun.ObtienePermisos(bd, g.Codigo, idUsuario).Impresion Then + gp.Add(g) + End If + Next + Me.cbGrupo.ItemsSource = gp + Me.cbPermiso.ItemsSource = bd.permisos.ToList + Dim plas = bd.plantillas.ToList.Where(Function(p) gp.Any(Function(x) x.Codigo = p.idGrupoNavigation.Codigo)).ToList + Me.gc.DataContext = bd + bplas = New BindingList(Of plantillas)(plas) + + Me.gc.ItemsSource = bplas + Return tsUtilidades.EstadosAplicacion.SinDatos + Catch ex As Exception + Throw New Exception(ex.Message, ex) + End Try + End Function + + Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False) + + End Sub + + Public Overrides Sub EstableceTitulo() + Me.docpanel.Caption = "Plantillas" + Me.docpanel.Tag = "Plantillas" + End Sub + + Public Overrides Sub Cargado() + Me.ContenedorAplicacion.btNuevo.IsVisible = False + Me.ContenedorAplicacion.siEstado.IsVisible = False + If bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario).idGrupoNavigation.Descripcion.ToLower = "administradores" Then + Me.gcPermiso.Visible = True + Me.gcCodigo.Visible = True + Me.gcEditar.VisibleIndex = Me.gc.Columns.Count + End If + Dim mi As New MenuItem() + mi.Header = "Copiar Plantilla" + AddHandler mi.Click, AddressOf CopiarPlantilla + Me.gc.ContextMenu.Items.Add(mi) + End Sub + + Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto + bd = tscGrupoSanchoToro.NuevoContexto() + Return bd + End Function + + + + Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos + Return Comun.ObtienePermisos(Me.bd, "AP.SUPERADMINISTRADORES", idUsuario) + End Function +End Class + + + + diff --git a/GestionGrupoSanchoToro/Informes/xrCierreCaja.Designer.vb b/GestionGrupoSanchoToro/Informes/xrCierreCaja.Designer.vb new file mode 100644 index 0000000..cd1508d --- /dev/null +++ b/GestionGrupoSanchoToro/Informes/xrCierreCaja.Designer.vb @@ -0,0 +1,627 @@ + _ +Partial Public Class xrCierreCaja + Inherits DevExpress.XtraReports.UI.XtraReport + + 'XtraReport overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + MyBase.Dispose(disposing) + End Sub + + 'Required by the Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Designer + 'It can be modified using the Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Dim ShapeRectangle1 As DevExpress.XtraPrinting.Shape.ShapeRectangle = New DevExpress.XtraPrinting.Shape.ShapeRectangle() + Dim ShapeRectangle2 As DevExpress.XtraPrinting.Shape.ShapeRectangle = New DevExpress.XtraPrinting.Shape.ShapeRectangle() + Me.TopMargin = New DevExpress.XtraReports.UI.TopMarginBand() + Me.XrPanel1 = New DevExpress.XtraReports.UI.XRPanel() + Me.XrLabel22 = New DevExpress.XtraReports.UI.XRLabel() + Me.BottomMargin = New DevExpress.XtraReports.UI.BottomMarginBand() + Me.Detail = New DevExpress.XtraReports.UI.DetailBand() + Me.XrLabel19 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel20 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel17 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel18 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel3 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel5 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel1 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel2 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel4 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel6 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel14 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel13 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrShape2 = New DevExpress.XtraReports.UI.XRShape() + Me.DetailReport = New DevExpress.XtraReports.UI.DetailReportBand() + Me.Detail1 = New DevExpress.XtraReports.UI.DetailBand() + Me.XrTable1 = New DevExpress.XtraReports.UI.XRTable() + Me.XrTableRow1 = New DevExpress.XtraReports.UI.XRTableRow() + Me.XrTableCell1 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell2 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell6 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell7 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell9 = New DevExpress.XtraReports.UI.XRTableCell() + Me.GroupHeader1 = New DevExpress.XtraReports.UI.GroupHeaderBand() + Me.XrTable2 = New DevExpress.XtraReports.UI.XRTable() + Me.XrTableRow2 = New DevExpress.XtraReports.UI.XRTableRow() + Me.XrTableCell3 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell4 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell11 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell12 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell14 = New DevExpress.XtraReports.UI.XRTableCell() + Me.GroupFooter1 = New DevExpress.XtraReports.UI.GroupFooterBand() + Me.XrLabel16 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel15 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel12 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel11 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel10 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel9 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel8 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel7 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrShape1 = New DevExpress.XtraReports.UI.XRShape() + Me.ObjectDataSource1 = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource(Me.components) + Me.Fecha = New DevExpress.XtraReports.Parameters.Parameter() + CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.ObjectDataSource1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me, System.ComponentModel.ISupportInitialize).BeginInit() + ' + 'TopMargin + ' + Me.TopMargin.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrPanel1}) + Me.TopMargin.Dpi = 254.0! + Me.TopMargin.HeightF = 138.7708! + Me.TopMargin.Name = "TopMargin" + ' + 'XrPanel1 + ' + Me.XrPanel1.Borders = DevExpress.XtraPrinting.BorderSide.None + Me.XrPanel1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel22}) + Me.XrPanel1.Dpi = 254.0! + Me.XrPanel1.LocationFloat = New DevExpress.Utils.PointFloat(67.24997!, 25.00001!) + Me.XrPanel1.Name = "XrPanel1" + Me.XrPanel1.SizeF = New System.Drawing.SizeF(963.0831!, 113.7708!) + Me.XrPanel1.StylePriority.UseBorders = False + ' + 'XrLabel22 + ' + Me.XrLabel22.Dpi = 254.0! + Me.XrLabel22.Font = New DevExpress.Drawing.DXFont("Arial", 12.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel22.LocationFloat = New DevExpress.Utils.PointFloat(25.40002!, 25.40002!) + Me.XrLabel22.Name = "XrLabel22" + Me.XrLabel22.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel22.SizeF = New System.Drawing.SizeF(444.5!, 58.42001!) + Me.XrLabel22.StylePriority.UseFont = False + Me.XrLabel22.StylePriority.UseTextAlignment = False + Me.XrLabel22.Text = "CIERRE DE CAJA" + Me.XrLabel22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter + ' + 'BottomMargin + ' + Me.BottomMargin.Dpi = 254.0! + Me.BottomMargin.HeightF = 50.0! + Me.BottomMargin.Name = "BottomMargin" + ' + 'Detail + ' + Me.Detail.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel19, Me.XrLabel20, Me.XrLabel17, Me.XrLabel18, Me.XrLabel3, Me.XrLabel5, Me.XrLabel1, Me.XrLabel2, Me.XrLabel4, Me.XrLabel6, Me.XrLabel14, Me.XrLabel13, Me.XrShape2}) + Me.Detail.Dpi = 254.0! + Me.Detail.HeightF = 238.6076! + Me.Detail.HierarchyPrintOptions.Indent = 50.8! + Me.Detail.Name = "Detail" + ' + 'XrLabel19 + ' + Me.XrLabel19.Dpi = 254.0! + Me.XrLabel19.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteCerrado]")}) + Me.XrLabel19.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel19.LocationFloat = New DevExpress.Utils.PointFloat(1704.458!, 131.6514!) + Me.XrLabel19.Name = "XrLabel19" + Me.XrLabel19.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel19.SizeF = New System.Drawing.SizeF(276.6497!, 58.42004!) + Me.XrLabel19.StylePriority.UseFont = False + Me.XrLabel19.StylePriority.UseTextAlignment = False + Me.XrLabel19.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft + Me.XrLabel19.TextFormatString = "{0:c2}" + ' + 'XrLabel20 + ' + Me.XrLabel20.Dpi = 254.0! + Me.XrLabel20.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel20.LocationFloat = New DevExpress.Utils.PointFloat(1356.514!, 131.6514!) + Me.XrLabel20.Name = "XrLabel20" + Me.XrLabel20.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel20.SizeF = New System.Drawing.SizeF(329.4233!, 58.42001!) + Me.XrLabel20.StylePriority.UseFont = False + Me.XrLabel20.Text = "Importe M. Cerrados:" + ' + 'XrLabel17 + ' + Me.XrLabel17.Dpi = 254.0! + Me.XrLabel17.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idCajaNavigation].[Descripcion]")}) + Me.XrLabel17.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel17.LocationFloat = New DevExpress.Utils.PointFloat(824.3406!, 52.91675!) + Me.XrLabel17.Name = "XrLabel17" + Me.XrLabel17.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel17.SizeF = New System.Drawing.SizeF(518.9336!, 58.42002!) + Me.XrLabel17.StylePriority.UseFont = False + Me.XrLabel17.Text = "[profesores.Nombre] [Profesores.Apellidos]" + ' + 'XrLabel18 + ' + Me.XrLabel18.Dpi = 254.0! + Me.XrLabel18.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel18.LocationFloat = New DevExpress.Utils.PointFloat(540.0046!, 52.91683!) + Me.XrLabel18.Name = "XrLabel18" + Me.XrLabel18.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel18.SizeF = New System.Drawing.SizeF(266.3013!, 58.41997!) + Me.XrLabel18.StylePriority.UseFont = False + Me.XrLabel18.Text = "Caja Cierre:" + ' + 'XrLabel3 + ' + Me.XrLabel3.Dpi = 254.0! + Me.XrLabel3.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idMovimiento]")}) + Me.XrLabel3.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel3.LocationFloat = New DevExpress.Utils.PointFloat(219.5094!, 52.91675!) + Me.XrLabel3.Name = "XrLabel3" + Me.XrLabel3.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel3.SizeF = New System.Drawing.SizeF(287.2332!, 58.42002!) + Me.XrLabel3.StylePriority.UseFont = False + Me.XrLabel3.Text = "[profesores.Nombre] [Profesores.Apellidos]" + ' + 'XrLabel5 + ' + Me.XrLabel5.Dpi = 254.0! + Me.XrLabel5.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel5.LocationFloat = New DevExpress.Utils.PointFloat(540.0046!, 131.6514!) + Me.XrLabel5.Name = "XrLabel5" + Me.XrLabel5.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel5.SizeF = New System.Drawing.SizeF(266.3012!, 58.41997!) + Me.XrLabel5.StylePriority.UseFont = False + Me.XrLabel5.Text = "Usuario que cierra:" + ' + 'XrLabel1 + ' + Me.XrLabel1.Dpi = 254.0! + Me.XrLabel1.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Fecha]")}) + Me.XrLabel1.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel1.LocationFloat = New DevExpress.Utils.PointFloat(219.5094!, 131.6514!) + Me.XrLabel1.Name = "XrLabel1" + Me.XrLabel1.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel1.SizeF = New System.Drawing.SizeF(287.2332!, 58.42004!) + Me.XrLabel1.StylePriority.UseFont = False + Me.XrLabel1.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel1.TextFormatString = "{0:dd/MM/yyyy}" + ' + 'XrLabel2 + ' + Me.XrLabel2.Dpi = 254.0! + Me.XrLabel2.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel2.LocationFloat = New DevExpress.Utils.PointFloat(29.55924!, 131.6515!) + Me.XrLabel2.Name = "XrLabel2" + Me.XrLabel2.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel2.SizeF = New System.Drawing.SizeF(189.9501!, 58.41997!) + Me.XrLabel2.StylePriority.UseFont = False + Me.XrLabel2.Text = "Fecha Cierre:" + ' + 'XrLabel4 + ' + Me.XrLabel4.Dpi = 254.0! + Me.XrLabel4.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idUsuarioNavigation].[Nombre]")}) + Me.XrLabel4.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel4.LocationFloat = New DevExpress.Utils.PointFloat(824.3407!, 131.6514!) + Me.XrLabel4.Name = "XrLabel4" + Me.XrLabel4.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel4.SizeF = New System.Drawing.SizeF(518.9335!, 58.42004!) + Me.XrLabel4.StylePriority.UseFont = False + Me.XrLabel4.Text = "[profesores.Nombre] [Profesores.Apellidos]" + ' + 'XrLabel6 + ' + Me.XrLabel6.Dpi = 254.0! + Me.XrLabel6.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel6.LocationFloat = New DevExpress.Utils.PointFloat(29.55924!, 52.91667!) + Me.XrLabel6.Name = "XrLabel6" + Me.XrLabel6.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel6.SizeF = New System.Drawing.SizeF(189.9501!, 58.41999!) + Me.XrLabel6.StylePriority.UseFont = False + Me.XrLabel6.Text = "Nº Cierre" + ' + 'XrLabel14 + ' + Me.XrLabel14.Dpi = 254.0! + Me.XrLabel14.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel14.LocationFloat = New DevExpress.Utils.PointFloat(1356.514!, 52.91675!) + Me.XrLabel14.Name = "XrLabel14" + Me.XrLabel14.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel14.SizeF = New System.Drawing.SizeF(252.316!, 58.41997!) + Me.XrLabel14.StylePriority.UseFont = False + Me.XrLabel14.Text = "Fecha Impresión:" + ' + 'XrLabel13 + ' + Me.XrLabel13.Dpi = 254.0! + Me.XrLabel13.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "?Fecha")}) + Me.XrLabel13.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel13.LocationFloat = New DevExpress.Utils.PointFloat(1619.414!, 52.91659!) + Me.XrLabel13.Name = "XrLabel13" + Me.XrLabel13.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel13.SizeF = New System.Drawing.SizeF(362.6234!, 58.42004!) + Me.XrLabel13.StylePriority.UseFont = False + Me.XrLabel13.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel13.TextFormatString = "{0:dd/MM/yyyy}" + ' + 'XrShape2 + ' + Me.XrShape2.Dpi = 254.0! + Me.XrShape2.FillColor = System.Drawing.Color.WhiteSmoke + Me.XrShape2.LocationFloat = New DevExpress.Utils.PointFloat(13.76757!, 25.00001!) + Me.XrShape2.Name = "XrShape2" + ShapeRectangle1.Fillet = 20 + Me.XrShape2.Shape = ShapeRectangle1 + Me.XrShape2.SizeF = New System.Drawing.SizeF(1986.233!, 199.8627!) + ' + 'DetailReport + ' + Me.DetailReport.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.Detail1, Me.GroupHeader1, Me.GroupFooter1}) + Me.DetailReport.DataMember = "MovimientosDelCierre" + Me.DetailReport.DataSource = Me.ObjectDataSource1 + Me.DetailReport.Dpi = 254.0! + Me.DetailReport.Level = 0 + Me.DetailReport.Name = "DetailReport" + ' + 'Detail1 + ' + Me.Detail1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrTable1}) + Me.Detail1.Dpi = 254.0! + Me.Detail1.HeightF = 47.28944! + Me.Detail1.HierarchyPrintOptions.Indent = 50.8! + Me.Detail1.Name = "Detail1" + Me.Detail1.SortFields.AddRange(New DevExpress.XtraReports.UI.GroupField() {New DevExpress.XtraReports.UI.GroupField("idMovimiento", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending)}) + ' + 'XrTable1 + ' + Me.XrTable1.Dpi = 254.0! + Me.XrTable1.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrTable1.LocationFloat = New DevExpress.Utils.PointFloat(13.76761!, 0!) + Me.XrTable1.Name = "XrTable1" + Me.XrTable1.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.XrTableRow1}) + Me.XrTable1.SizeF = New System.Drawing.SizeF(1961.232!, 47.28944!) + Me.XrTable1.StylePriority.UseFont = False + ' + 'XrTableRow1 + ' + Me.XrTableRow1.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell1, Me.XrTableCell2, Me.XrTableCell6, Me.XrTableCell7, Me.XrTableCell9}) + Me.XrTableRow1.Dpi = 254.0! + Me.XrTableRow1.Name = "XrTableRow1" + Me.XrTableRow1.Weight = 11.5R + ' + 'XrTableCell1 + ' + Me.XrTableCell1.Dpi = 254.0! + Me.XrTableCell1.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Descripcion]")}) + Me.XrTableCell1.Name = "XrTableCell1" + Me.XrTableCell1.StylePriority.UseFont = False + Me.XrTableCell1.Text = "XrTableCell1" + Me.XrTableCell1.Weight = 0.65133730026355985R + ' + 'XrTableCell2 + ' + Me.XrTableCell2.Dpi = 254.0! + Me.XrTableCell2.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Fecha]")}) + Me.XrTableCell2.Name = "XrTableCell2" + Me.XrTableCell2.Text = "XrTableCell2" + Me.XrTableCell2.TextFormatString = "{0:dd/MM/yyyy HH:mm}" + Me.XrTableCell2.Weight = 0.14856320511943927R + ' + 'XrTableCell6 + ' + Me.XrTableCell6.Dpi = 254.0! + Me.XrTableCell6.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idMovimiento]")}) + Me.XrTableCell6.Name = "XrTableCell6" + Me.XrTableCell6.Text = "XrTableCell6" + Me.XrTableCell6.Weight = 0.15225145388319286R + ' + 'XrTableCell7 + ' + Me.XrTableCell7.Dpi = 254.0! + Me.XrTableCell7.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Importe]")}) + Me.XrTableCell7.Name = "XrTableCell7" + Me.XrTableCell7.StylePriority.UseTextAlignment = False + Me.XrTableCell7.Text = "XrTableCell7" + Me.XrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight + Me.XrTableCell7.TextFormatString = "{0:c2}" + Me.XrTableCell7.Weight = 0.12158946848324614R + ' + 'XrTableCell9 + ' + Me.XrTableCell9.Dpi = 254.0! + Me.XrTableCell9.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idUsuarioNavigation].[Nombre]")}) + Me.XrTableCell9.Name = "XrTableCell9" + Me.XrTableCell9.StylePriority.UseTextAlignment = False + Me.XrTableCell9.Text = "XrTableCell9" + Me.XrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter + Me.XrTableCell9.Weight = 0.14983867201936621R + ' + 'GroupHeader1 + ' + Me.GroupHeader1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrTable2}) + Me.GroupHeader1.Dpi = 254.0! + Me.GroupHeader1.HeightF = 56.78311! + Me.GroupHeader1.Name = "GroupHeader1" + ' + 'XrTable2 + ' + Me.XrTable2.BackColor = System.Drawing.Color.Silver + Me.XrTable2.Dpi = 254.0! + Me.XrTable2.Font = New DevExpress.Drawing.DXFont("Segoe UI", 9.75!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTable2.ForeColor = System.Drawing.Color.Black + Me.XrTable2.LocationFloat = New DevExpress.Utils.PointFloat(13.76761!, 0!) + Me.XrTable2.Name = "XrTable2" + Me.XrTable2.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.XrTableRow2}) + Me.XrTable2.SizeF = New System.Drawing.SizeF(1961.232!, 47.28944!) + Me.XrTable2.StylePriority.UseBackColor = False + Me.XrTable2.StylePriority.UseFont = False + Me.XrTable2.StylePriority.UseForeColor = False + ' + 'XrTableRow2 + ' + Me.XrTableRow2.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell3, Me.XrTableCell4, Me.XrTableCell11, Me.XrTableCell12, Me.XrTableCell14}) + Me.XrTableRow2.Dpi = 254.0! + Me.XrTableRow2.Name = "XrTableRow2" + Me.XrTableRow2.Weight = 11.5R + ' + 'XrTableCell3 + ' + Me.XrTableCell3.Dpi = 254.0! + Me.XrTableCell3.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTableCell3.Name = "XrTableCell3" + Me.XrTableCell3.StylePriority.UseFont = False + Me.XrTableCell3.Text = "Descripción" + Me.XrTableCell3.Weight = 0.651216911310395R + ' + 'XrTableCell4 + ' + Me.XrTableCell4.Dpi = 254.0! + Me.XrTableCell4.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTableCell4.Name = "XrTableCell4" + Me.XrTableCell4.StylePriority.UseFont = False + Me.XrTableCell4.Text = "Fecha" + Me.XrTableCell4.Weight = 0.14853577036309198R + ' + 'XrTableCell11 + ' + Me.XrTableCell11.Dpi = 254.0! + Me.XrTableCell11.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTableCell11.Name = "XrTableCell11" + Me.XrTableCell11.StylePriority.UseFont = False + Me.XrTableCell11.Text = "Nº Movimiento" + Me.XrTableCell11.Weight = 0.15222340015547486R + ' + 'XrTableCell12 + ' + Me.XrTableCell12.Dpi = 254.0! + Me.XrTableCell12.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTableCell12.Name = "XrTableCell12" + Me.XrTableCell12.StylePriority.UseFont = False + Me.XrTableCell12.StylePriority.UseTextAlignment = False + Me.XrTableCell12.Text = "Importe" + Me.XrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight + Me.XrTableCell12.Weight = 0.10990615377483919R + ' + 'XrTableCell14 + ' + Me.XrTableCell14.Dpi = 254.0! + Me.XrTableCell14.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTableCell14.Name = "XrTableCell14" + Me.XrTableCell14.StylePriority.UseFont = False + Me.XrTableCell14.StylePriority.UseTextAlignment = False + Me.XrTableCell14.Text = "Usuario" + Me.XrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter + Me.XrTableCell14.Weight = 0.16147183210373589R + ' + 'GroupFooter1 + ' + Me.GroupFooter1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel16, Me.XrLabel15, Me.XrLabel12, Me.XrLabel11, Me.XrLabel10, Me.XrLabel9, Me.XrLabel8, Me.XrLabel7, Me.XrShape1}) + Me.GroupFooter1.Dpi = 254.0! + Me.GroupFooter1.HeightF = 238.7961! + Me.GroupFooter1.Name = "GroupFooter1" + ' + 'XrLabel16 + ' + Me.XrLabel16.Dpi = 254.0! + Me.XrLabel16.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[SaldoAntesCierre]")}) + Me.XrLabel16.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel16.LocationFloat = New DevExpress.Utils.PointFloat(430.3529!, 47.36097!) + Me.XrLabel16.Name = "XrLabel16" + Me.XrLabel16.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel16.SizeF = New System.Drawing.SizeF(274.0038!, 58.42003!) + Me.XrLabel16.StylePriority.UseFont = False + Me.XrLabel16.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel16.TextFormatString = "{0:c2}" + ' + 'XrLabel15 + ' + Me.XrLabel15.Dpi = 254.0! + Me.XrLabel15.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel15.LocationFloat = New DevExpress.Utils.PointFloat(55.95015!, 47.36121!) + Me.XrLabel15.Name = "XrLabel15" + Me.XrLabel15.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel15.SizeF = New System.Drawing.SizeF(353.2359!, 58.41998!) + Me.XrLabel15.StylePriority.UseFont = False + Me.XrLabel15.Text = "Saldo Cierre Anterior:" + ' + 'XrLabel12 + ' + Me.XrLabel12.Dpi = 254.0! + Me.XrLabel12.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[SaldoDespuesCierre]")}) + Me.XrLabel12.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel12.LocationFloat = New DevExpress.Utils.PointFloat(430.3529!, 139.5012!) + Me.XrLabel12.Name = "XrLabel12" + Me.XrLabel12.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel12.SizeF = New System.Drawing.SizeF(274.0038!, 58.42003!) + Me.XrLabel12.StylePriority.UseFont = False + Me.XrLabel12.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel12.TextFormatString = "{0:c2}" + ' + 'XrLabel11 + ' + Me.XrLabel11.Dpi = 254.0! + Me.XrLabel11.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel11.LocationFloat = New DevExpress.Utils.PointFloat(845.7034!, 47.36105!) + Me.XrLabel11.Name = "XrLabel11" + Me.XrLabel11.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel11.SizeF = New System.Drawing.SizeF(292.7596!, 58.41998!) + Me.XrLabel11.StylePriority.UseFont = False + Me.XrLabel11.Text = "Importe Entrada:" + ' + 'XrLabel10 + ' + Me.XrLabel10.Dpi = 254.0! + Me.XrLabel10.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteEntradasMovimientosCerrados]")}) + Me.XrLabel10.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel10.LocationFloat = New DevExpress.Utils.PointFloat(1154.338!, 47.36113!) + Me.XrLabel10.Name = "XrLabel10" + Me.XrLabel10.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel10.SizeF = New System.Drawing.SizeF(263.0427!, 58.42005!) + Me.XrLabel10.StylePriority.UseFont = False + Me.XrLabel10.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel10.TextFormatString = "{0:c2}" + ' + 'XrLabel9 + ' + Me.XrLabel9.Dpi = 254.0! + Me.XrLabel9.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel9.LocationFloat = New DevExpress.Utils.PointFloat(1445.093!, 47.36113!) + Me.XrLabel9.Name = "XrLabel9" + Me.XrLabel9.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel9.SizeF = New System.Drawing.SizeF(289.7356!, 58.41998!) + Me.XrLabel9.StylePriority.UseFont = False + Me.XrLabel9.Text = "Importe Salida:" + ' + 'XrLabel8 + ' + Me.XrLabel8.Dpi = 254.0! + Me.XrLabel8.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteSalidasMovimientosCerrados]")}) + Me.XrLabel8.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel8.LocationFloat = New DevExpress.Utils.PointFloat(1734.828!, 47.36105!) + Me.XrLabel8.Name = "XrLabel8" + Me.XrLabel8.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel8.SizeF = New System.Drawing.SizeF(240.1718!, 58.42003!) + Me.XrLabel8.StylePriority.UseFont = False + Me.XrLabel8.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel8.TextFormatString = "{0:c2}" + ' + 'XrLabel7 + ' + Me.XrLabel7.Dpi = 254.0! + Me.XrLabel7.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel7.LocationFloat = New DevExpress.Utils.PointFloat(55.95015!, 139.5012!) + Me.XrLabel7.Name = "XrLabel7" + Me.XrLabel7.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel7.SizeF = New System.Drawing.SizeF(353.2359!, 58.41998!) + Me.XrLabel7.StylePriority.UseFont = False + Me.XrLabel7.Text = "Saldo Caja Al Cierre:" + ' + 'XrShape1 + ' + Me.XrShape1.Dpi = 254.0! + Me.XrShape1.FillColor = System.Drawing.Color.WhiteSmoke + Me.XrShape1.LocationFloat = New DevExpress.Utils.PointFloat(13.76757!, 25.00001!) + Me.XrShape1.Name = "XrShape1" + ShapeRectangle2.Fillet = 20 + Me.XrShape1.Shape = ShapeRectangle2 + Me.XrShape1.SizeF = New System.Drawing.SizeF(1986.233!, 213.7961!) + ' + 'ObjectDataSource1 + ' + Me.ObjectDataSource1.DataSource = GetType(Global.bdGrupoSanchoToro.db.movimientoscaja) + Me.ObjectDataSource1.Name = "ObjectDataSource1" + ' + 'Fecha + ' + Me.Fecha.Description = "Parameter1" + Me.Fecha.Name = "Fecha" + Me.Fecha.Type = GetType(Integer) + Me.Fecha.ValueInfo = "0" + ' + 'xrCierreCaja + ' + Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.TopMargin, Me.BottomMargin, Me.Detail, Me.DetailReport}) + Me.ComponentStorage.AddRange(New System.ComponentModel.IComponent() {Me.ObjectDataSource1}) + Me.DataSource = Me.ObjectDataSource1 + Me.Dpi = 254.0! + Me.Font = New DevExpress.Drawing.DXFont("Arial", 9.75!) + Me.Margins = New DevExpress.Drawing.DXMargins(50.0!, 50.0!, 138.7708!, 50.0!) + Me.PageHeight = 2970 + Me.PageWidth = 2100 + Me.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4 + Me.Parameters.AddRange(New DevExpress.XtraReports.Parameters.Parameter() {Me.Fecha}) + Me.ReportUnit = DevExpress.XtraReports.UI.ReportUnit.TenthsOfAMillimeter + Me.SnapGridSize = 25.0! + Me.Version = "23.2" + CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.ObjectDataSource1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me, System.ComponentModel.ISupportInitialize).EndInit() + + End Sub + + Friend WithEvents TopMargin As DevExpress.XtraReports.UI.TopMarginBand + Friend WithEvents BottomMargin As DevExpress.XtraReports.UI.BottomMarginBand + Friend WithEvents Detail As DevExpress.XtraReports.UI.DetailBand + Friend WithEvents XrLabel3 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel5 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel1 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel2 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel4 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel6 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel14 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel13 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrShape2 As DevExpress.XtraReports.UI.XRShape + Friend WithEvents ObjectDataSource1 As DevExpress.DataAccess.ObjectBinding.ObjectDataSource + Friend WithEvents DetailReport As DevExpress.XtraReports.UI.DetailReportBand + Friend WithEvents Detail1 As DevExpress.XtraReports.UI.DetailBand + Friend WithEvents XrTable1 As DevExpress.XtraReports.UI.XRTable + Friend WithEvents XrTableRow1 As DevExpress.XtraReports.UI.XRTableRow + Friend WithEvents XrTableCell1 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell2 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell6 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell7 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell9 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents GroupHeader1 As DevExpress.XtraReports.UI.GroupHeaderBand + Friend WithEvents XrTable2 As DevExpress.XtraReports.UI.XRTable + Friend WithEvents XrTableRow2 As DevExpress.XtraReports.UI.XRTableRow + Friend WithEvents XrTableCell3 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell4 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell11 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell12 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell14 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents GroupFooter1 As DevExpress.XtraReports.UI.GroupFooterBand + Friend WithEvents XrLabel12 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel11 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel10 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel9 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel8 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel7 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrShape1 As DevExpress.XtraReports.UI.XRShape + Friend WithEvents XrLabel16 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel15 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel17 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel18 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents Fecha As DevExpress.XtraReports.Parameters.Parameter + Friend WithEvents XrPanel1 As DevExpress.XtraReports.UI.XRPanel + Friend WithEvents XrLabel22 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel19 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel20 As DevExpress.XtraReports.UI.XRLabel +End Class diff --git a/GestionGrupoSanchoToro/Informes/xrCierreCaja.Designer.vb.bak b/GestionGrupoSanchoToro/Informes/xrCierreCaja.Designer.vb.bak new file mode 100644 index 0000000..842428e --- /dev/null +++ b/GestionGrupoSanchoToro/Informes/xrCierreCaja.Designer.vb.bak @@ -0,0 +1,627 @@ + _ +Partial Public Class xrCierreCaja + Inherits DevExpress.XtraReports.UI.XtraReport + + 'XtraReport overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + MyBase.Dispose(disposing) + End Sub + + 'Required by the Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Designer + 'It can be modified using the Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Dim ShapeRectangle1 As DevExpress.XtraPrinting.Shape.ShapeRectangle = New DevExpress.XtraPrinting.Shape.ShapeRectangle() + Dim ShapeRectangle2 As DevExpress.XtraPrinting.Shape.ShapeRectangle = New DevExpress.XtraPrinting.Shape.ShapeRectangle() + Me.TopMargin = New DevExpress.XtraReports.UI.TopMarginBand() + Me.XrPanel1 = New DevExpress.XtraReports.UI.XRPanel() + Me.XrLabel22 = New DevExpress.XtraReports.UI.XRLabel() + Me.BottomMargin = New DevExpress.XtraReports.UI.BottomMarginBand() + Me.Detail = New DevExpress.XtraReports.UI.DetailBand() + Me.XrLabel19 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel20 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel17 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel18 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel3 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel5 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel1 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel2 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel4 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel6 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel14 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel13 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrShape2 = New DevExpress.XtraReports.UI.XRShape() + Me.DetailReport = New DevExpress.XtraReports.UI.DetailReportBand() + Me.Detail1 = New DevExpress.XtraReports.UI.DetailBand() + Me.XrTable1 = New DevExpress.XtraReports.UI.XRTable() + Me.XrTableRow1 = New DevExpress.XtraReports.UI.XRTableRow() + Me.XrTableCell1 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell2 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell6 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell7 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell9 = New DevExpress.XtraReports.UI.XRTableCell() + Me.GroupHeader1 = New DevExpress.XtraReports.UI.GroupHeaderBand() + Me.XrTable2 = New DevExpress.XtraReports.UI.XRTable() + Me.XrTableRow2 = New DevExpress.XtraReports.UI.XRTableRow() + Me.XrTableCell3 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell4 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell11 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell12 = New DevExpress.XtraReports.UI.XRTableCell() + Me.XrTableCell14 = New DevExpress.XtraReports.UI.XRTableCell() + Me.GroupFooter1 = New DevExpress.XtraReports.UI.GroupFooterBand() + Me.XrLabel16 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel15 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel12 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel11 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel10 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel9 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel8 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrLabel7 = New DevExpress.XtraReports.UI.XRLabel() + Me.XrShape1 = New DevExpress.XtraReports.UI.XRShape() + Me.ObjectDataSource1 = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource(Me.components) + Me.Fecha = New DevExpress.XtraReports.Parameters.Parameter() + CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.ObjectDataSource1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me, System.ComponentModel.ISupportInitialize).BeginInit() + ' + 'TopMargin + ' + Me.TopMargin.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrPanel1}) + Me.TopMargin.Dpi = 254.0! + Me.TopMargin.HeightF = 138.7708! + Me.TopMargin.Name = "TopMargin" + ' + 'XrPanel1 + ' + Me.XrPanel1.Borders = DevExpress.XtraPrinting.BorderSide.None + Me.XrPanel1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel22}) + Me.XrPanel1.Dpi = 254.0! + Me.XrPanel1.LocationFloat = New DevExpress.Utils.PointFloat(67.24997!, 25.00001!) + Me.XrPanel1.Name = "XrPanel1" + Me.XrPanel1.SizeF = New System.Drawing.SizeF(963.0831!, 113.7708!) + Me.XrPanel1.StylePriority.UseBorders = False + ' + 'XrLabel22 + ' + Me.XrLabel22.Dpi = 254.0! + Me.XrLabel22.Font = New DevExpress.Drawing.DXFont("Arial", 12.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel22.LocationFloat = New DevExpress.Utils.PointFloat(25.40002!, 25.40002!) + Me.XrLabel22.Name = "XrLabel22" + Me.XrLabel22.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel22.SizeF = New System.Drawing.SizeF(444.5!, 58.42001!) + Me.XrLabel22.StylePriority.UseFont = False + Me.XrLabel22.StylePriority.UseTextAlignment = False + Me.XrLabel22.Text = "CIERRE DE CAJA" + Me.XrLabel22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter + ' + 'BottomMargin + ' + Me.BottomMargin.Dpi = 254.0! + Me.BottomMargin.HeightF = 50.0! + Me.BottomMargin.Name = "BottomMargin" + ' + 'Detail + ' + Me.Detail.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel19, Me.XrLabel20, Me.XrLabel17, Me.XrLabel18, Me.XrLabel3, Me.XrLabel5, Me.XrLabel1, Me.XrLabel2, Me.XrLabel4, Me.XrLabel6, Me.XrLabel14, Me.XrLabel13, Me.XrShape2}) + Me.Detail.Dpi = 254.0! + Me.Detail.HeightF = 238.6076! + Me.Detail.HierarchyPrintOptions.Indent = 50.8! + Me.Detail.Name = "Detail" + ' + 'XrLabel19 + ' + Me.XrLabel19.Dpi = 254.0! + Me.XrLabel19.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteCerrado]")}) + Me.XrLabel19.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel19.LocationFloat = New DevExpress.Utils.PointFloat(1704.458!, 131.6514!) + Me.XrLabel19.Name = "XrLabel19" + Me.XrLabel19.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel19.SizeF = New System.Drawing.SizeF(276.6497!, 58.42004!) + Me.XrLabel19.StylePriority.UseFont = False + Me.XrLabel19.StylePriority.UseTextAlignment = False + Me.XrLabel19.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft + Me.XrLabel19.TextFormatString = "{0:c2}" + ' + 'XrLabel20 + ' + Me.XrLabel20.Dpi = 254.0! + Me.XrLabel20.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel20.LocationFloat = New DevExpress.Utils.PointFloat(1356.514!, 131.6514!) + Me.XrLabel20.Name = "XrLabel20" + Me.XrLabel20.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel20.SizeF = New System.Drawing.SizeF(329.4233!, 58.42001!) + Me.XrLabel20.StylePriority.UseFont = False + Me.XrLabel20.Text = "Importe M. Cerrados:" + ' + 'XrLabel17 + ' + Me.XrLabel17.Dpi = 254.0! + Me.XrLabel17.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[cajas].[Descripcion]")}) + Me.XrLabel17.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel17.LocationFloat = New DevExpress.Utils.PointFloat(824.3406!, 52.91675!) + Me.XrLabel17.Name = "XrLabel17" + Me.XrLabel17.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel17.SizeF = New System.Drawing.SizeF(518.9336!, 58.42002!) + Me.XrLabel17.StylePriority.UseFont = False + Me.XrLabel17.Text = "[profesores.Nombre] [Profesores.Apellidos]" + ' + 'XrLabel18 + ' + Me.XrLabel18.Dpi = 254.0! + Me.XrLabel18.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel18.LocationFloat = New DevExpress.Utils.PointFloat(540.0046!, 52.91683!) + Me.XrLabel18.Name = "XrLabel18" + Me.XrLabel18.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel18.SizeF = New System.Drawing.SizeF(266.3013!, 58.41997!) + Me.XrLabel18.StylePriority.UseFont = False + Me.XrLabel18.Text = "Caja Cierre:" + ' + 'XrLabel3 + ' + Me.XrLabel3.Dpi = 254.0! + Me.XrLabel3.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[cajas].[Descripcion]")}) + Me.XrLabel3.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel3.LocationFloat = New DevExpress.Utils.PointFloat(219.5094!, 52.91675!) + Me.XrLabel3.Name = "XrLabel3" + Me.XrLabel3.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel3.SizeF = New System.Drawing.SizeF(287.2332!, 58.42002!) + Me.XrLabel3.StylePriority.UseFont = False + Me.XrLabel3.Text = "[profesores.Nombre] [Profesores.Apellidos]" + ' + 'XrLabel5 + ' + Me.XrLabel5.Dpi = 254.0! + Me.XrLabel5.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel5.LocationFloat = New DevExpress.Utils.PointFloat(540.0046!, 131.6514!) + Me.XrLabel5.Name = "XrLabel5" + Me.XrLabel5.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel5.SizeF = New System.Drawing.SizeF(266.3012!, 58.41997!) + Me.XrLabel5.StylePriority.UseFont = False + Me.XrLabel5.Text = "Usuario que cierra:" + ' + 'XrLabel1 + ' + Me.XrLabel1.Dpi = 254.0! + Me.XrLabel1.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Fecha]")}) + Me.XrLabel1.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel1.LocationFloat = New DevExpress.Utils.PointFloat(219.5094!, 131.6514!) + Me.XrLabel1.Name = "XrLabel1" + Me.XrLabel1.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel1.SizeF = New System.Drawing.SizeF(287.2332!, 58.42004!) + Me.XrLabel1.StylePriority.UseFont = False + Me.XrLabel1.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel1.TextFormatString = "{0:dd/MM/yyyy}" + ' + 'XrLabel2 + ' + Me.XrLabel2.Dpi = 254.0! + Me.XrLabel2.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel2.LocationFloat = New DevExpress.Utils.PointFloat(29.55924!, 131.6515!) + Me.XrLabel2.Name = "XrLabel2" + Me.XrLabel2.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel2.SizeF = New System.Drawing.SizeF(189.9501!, 58.41997!) + Me.XrLabel2.StylePriority.UseFont = False + Me.XrLabel2.Text = "Fecha Cierre:" + ' + 'XrLabel4 + ' + Me.XrLabel4.Dpi = 254.0! + Me.XrLabel4.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[usuarios].[Nombre]")}) + Me.XrLabel4.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel4.LocationFloat = New DevExpress.Utils.PointFloat(824.3407!, 131.6514!) + Me.XrLabel4.Name = "XrLabel4" + Me.XrLabel4.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel4.SizeF = New System.Drawing.SizeF(518.9335!, 58.42004!) + Me.XrLabel4.StylePriority.UseFont = False + Me.XrLabel4.Text = "[profesores.Nombre] [Profesores.Apellidos]" + ' + 'XrLabel6 + ' + Me.XrLabel6.Dpi = 254.0! + Me.XrLabel6.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel6.LocationFloat = New DevExpress.Utils.PointFloat(29.55924!, 52.91667!) + Me.XrLabel6.Name = "XrLabel6" + Me.XrLabel6.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel6.SizeF = New System.Drawing.SizeF(189.9501!, 58.41999!) + Me.XrLabel6.StylePriority.UseFont = False + Me.XrLabel6.Text = "Nº Cierre" + ' + 'XrLabel14 + ' + Me.XrLabel14.Dpi = 254.0! + Me.XrLabel14.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel14.LocationFloat = New DevExpress.Utils.PointFloat(1356.514!, 52.91675!) + Me.XrLabel14.Name = "XrLabel14" + Me.XrLabel14.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel14.SizeF = New System.Drawing.SizeF(252.316!, 58.41997!) + Me.XrLabel14.StylePriority.UseFont = False + Me.XrLabel14.Text = "Fecha Impresión:" + ' + 'XrLabel13 + ' + Me.XrLabel13.Dpi = 254.0! + Me.XrLabel13.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "?Fecha")}) + Me.XrLabel13.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel13.LocationFloat = New DevExpress.Utils.PointFloat(1619.414!, 52.91659!) + Me.XrLabel13.Name = "XrLabel13" + Me.XrLabel13.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel13.SizeF = New System.Drawing.SizeF(362.6234!, 58.42004!) + Me.XrLabel13.StylePriority.UseFont = False + Me.XrLabel13.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel13.TextFormatString = "{0:dd/MM/yyyy}" + ' + 'XrShape2 + ' + Me.XrShape2.Dpi = 254.0! + Me.XrShape2.FillColor = System.Drawing.Color.WhiteSmoke + Me.XrShape2.LocationFloat = New DevExpress.Utils.PointFloat(13.76757!, 25.00001!) + Me.XrShape2.Name = "XrShape2" + ShapeRectangle1.Fillet = 20 + Me.XrShape2.Shape = ShapeRectangle1 + Me.XrShape2.SizeF = New System.Drawing.SizeF(1986.233!, 199.8627!) + ' + 'DetailReport + ' + Me.DetailReport.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.Detail1, Me.GroupHeader1, Me.GroupFooter1}) + Me.DetailReport.DataMember = "MovimientosDelCierre" + Me.DetailReport.DataSource = Me.ObjectDataSource1 + Me.DetailReport.Dpi = 254.0! + Me.DetailReport.Level = 0 + Me.DetailReport.Name = "DetailReport" + ' + 'Detail1 + ' + Me.Detail1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrTable1}) + Me.Detail1.Dpi = 254.0! + Me.Detail1.HeightF = 47.28944! + Me.Detail1.HierarchyPrintOptions.Indent = 50.8! + Me.Detail1.Name = "Detail1" + Me.Detail1.SortFields.AddRange(New DevExpress.XtraReports.UI.GroupField() {New DevExpress.XtraReports.UI.GroupField("idMovimiento", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending)}) + ' + 'XrTable1 + ' + Me.XrTable1.Dpi = 254.0! + Me.XrTable1.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrTable1.LocationFloat = New DevExpress.Utils.PointFloat(13.76761!, 0!) + Me.XrTable1.Name = "XrTable1" + Me.XrTable1.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.XrTableRow1}) + Me.XrTable1.SizeF = New System.Drawing.SizeF(1961.232!, 47.28944!) + Me.XrTable1.StylePriority.UseFont = False + ' + 'XrTableRow1 + ' + Me.XrTableRow1.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell1, Me.XrTableCell2, Me.XrTableCell6, Me.XrTableCell7, Me.XrTableCell9}) + Me.XrTableRow1.Dpi = 254.0! + Me.XrTableRow1.Name = "XrTableRow1" + Me.XrTableRow1.Weight = 11.5R + ' + 'XrTableCell1 + ' + Me.XrTableCell1.Dpi = 254.0! + Me.XrTableCell1.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Descripcion]")}) + Me.XrTableCell1.Name = "XrTableCell1" + Me.XrTableCell1.StylePriority.UseFont = False + Me.XrTableCell1.Text = "XrTableCell1" + Me.XrTableCell1.Weight = 0.65133730026355985R + ' + 'XrTableCell2 + ' + Me.XrTableCell2.Dpi = 254.0! + Me.XrTableCell2.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Fecha]")}) + Me.XrTableCell2.Name = "XrTableCell2" + Me.XrTableCell2.Text = "XrTableCell2" + Me.XrTableCell2.TextFormatString = "{0:dd/MM/yyyy HH:mm}" + Me.XrTableCell2.Weight = 0.14856320511943927R + ' + 'XrTableCell6 + ' + Me.XrTableCell6.Dpi = 254.0! + Me.XrTableCell6.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idMovimiento]")}) + Me.XrTableCell6.Name = "XrTableCell6" + Me.XrTableCell6.Text = "XrTableCell6" + Me.XrTableCell6.Weight = 0.15225145388319286R + ' + 'XrTableCell7 + ' + Me.XrTableCell7.Dpi = 254.0! + Me.XrTableCell7.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Importe]")}) + Me.XrTableCell7.Name = "XrTableCell7" + Me.XrTableCell7.StylePriority.UseTextAlignment = False + Me.XrTableCell7.Text = "XrTableCell7" + Me.XrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight + Me.XrTableCell7.TextFormatString = "{0:c2}" + Me.XrTableCell7.Weight = 0.12158946848324614R + ' + 'XrTableCell9 + ' + Me.XrTableCell9.Dpi = 254.0! + Me.XrTableCell9.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[usuarios].[Usuario]")}) + Me.XrTableCell9.Name = "XrTableCell9" + Me.XrTableCell9.StylePriority.UseTextAlignment = False + Me.XrTableCell9.Text = "XrTableCell9" + Me.XrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter + Me.XrTableCell9.Weight = 0.14983867201936621R + ' + 'GroupHeader1 + ' + Me.GroupHeader1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrTable2}) + Me.GroupHeader1.Dpi = 254.0! + Me.GroupHeader1.HeightF = 56.78311! + Me.GroupHeader1.Name = "GroupHeader1" + ' + 'XrTable2 + ' + Me.XrTable2.BackColor = System.Drawing.Color.Silver + Me.XrTable2.Dpi = 254.0! + Me.XrTable2.Font = New DevExpress.Drawing.DXFont("Segoe UI", 9.75!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTable2.ForeColor = System.Drawing.Color.Black + Me.XrTable2.LocationFloat = New DevExpress.Utils.PointFloat(13.76761!, 0!) + Me.XrTable2.Name = "XrTable2" + Me.XrTable2.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.XrTableRow2}) + Me.XrTable2.SizeF = New System.Drawing.SizeF(1961.232!, 47.28944!) + Me.XrTable2.StylePriority.UseBackColor = False + Me.XrTable2.StylePriority.UseFont = False + Me.XrTable2.StylePriority.UseForeColor = False + ' + 'XrTableRow2 + ' + Me.XrTableRow2.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell3, Me.XrTableCell4, Me.XrTableCell11, Me.XrTableCell12, Me.XrTableCell14}) + Me.XrTableRow2.Dpi = 254.0! + Me.XrTableRow2.Name = "XrTableRow2" + Me.XrTableRow2.Weight = 11.5R + ' + 'XrTableCell3 + ' + Me.XrTableCell3.Dpi = 254.0! + Me.XrTableCell3.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTableCell3.Name = "XrTableCell3" + Me.XrTableCell3.StylePriority.UseFont = False + Me.XrTableCell3.Text = "Descripción" + Me.XrTableCell3.Weight = 0.651216911310395R + ' + 'XrTableCell4 + ' + Me.XrTableCell4.Dpi = 254.0! + Me.XrTableCell4.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTableCell4.Name = "XrTableCell4" + Me.XrTableCell4.StylePriority.UseFont = False + Me.XrTableCell4.Text = "Fecha" + Me.XrTableCell4.Weight = 0.14853577036309199R + ' + 'XrTableCell11 + ' + Me.XrTableCell11.Dpi = 254.0! + Me.XrTableCell11.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTableCell11.Name = "XrTableCell11" + Me.XrTableCell11.StylePriority.UseFont = False + Me.XrTableCell11.Text = "Nº Movimiento" + Me.XrTableCell11.Weight = 0.15222340015547486R + ' + 'XrTableCell12 + ' + Me.XrTableCell12.Dpi = 254.0! + Me.XrTableCell12.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTableCell12.Name = "XrTableCell12" + Me.XrTableCell12.StylePriority.UseFont = False + Me.XrTableCell12.StylePriority.UseTextAlignment = False + Me.XrTableCell12.Text = "Importe" + Me.XrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight + Me.XrTableCell12.Weight = 0.10990615377483919R + ' + 'XrTableCell14 + ' + Me.XrTableCell14.Dpi = 254.0! + Me.XrTableCell14.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrTableCell14.Name = "XrTableCell14" + Me.XrTableCell14.StylePriority.UseFont = False + Me.XrTableCell14.StylePriority.UseTextAlignment = False + Me.XrTableCell14.Text = "Usuario" + Me.XrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter + Me.XrTableCell14.Weight = 0.16147183210373589R + ' + 'GroupFooter1 + ' + Me.GroupFooter1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel16, Me.XrLabel15, Me.XrLabel12, Me.XrLabel11, Me.XrLabel10, Me.XrLabel9, Me.XrLabel8, Me.XrLabel7, Me.XrShape1}) + Me.GroupFooter1.Dpi = 254.0! + Me.GroupFooter1.HeightF = 238.7961! + Me.GroupFooter1.Name = "GroupFooter1" + ' + 'XrLabel16 + ' + Me.XrLabel16.Dpi = 254.0! + Me.XrLabel16.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[SaldoAntesCierre]")}) + Me.XrLabel16.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel16.LocationFloat = New DevExpress.Utils.PointFloat(430.3529!, 47.36097!) + Me.XrLabel16.Name = "XrLabel16" + Me.XrLabel16.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel16.SizeF = New System.Drawing.SizeF(274.0038!, 58.42003!) + Me.XrLabel16.StylePriority.UseFont = False + Me.XrLabel16.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel16.TextFormatString = "{0:c2}" + ' + 'XrLabel15 + ' + Me.XrLabel15.Dpi = 254.0! + Me.XrLabel15.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel15.LocationFloat = New DevExpress.Utils.PointFloat(55.95015!, 47.36121!) + Me.XrLabel15.Name = "XrLabel15" + Me.XrLabel15.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel15.SizeF = New System.Drawing.SizeF(353.2359!, 58.41998!) + Me.XrLabel15.StylePriority.UseFont = False + Me.XrLabel15.Text = "Saldo Cierre Anterior:" + ' + 'XrLabel12 + ' + Me.XrLabel12.Dpi = 254.0! + Me.XrLabel12.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[SaldoDespuesCierre]")}) + Me.XrLabel12.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel12.LocationFloat = New DevExpress.Utils.PointFloat(430.3529!, 139.5012!) + Me.XrLabel12.Name = "XrLabel12" + Me.XrLabel12.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel12.SizeF = New System.Drawing.SizeF(274.0038!, 58.42003!) + Me.XrLabel12.StylePriority.UseFont = False + Me.XrLabel12.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel12.TextFormatString = "{0:c2}" + ' + 'XrLabel11 + ' + Me.XrLabel11.Dpi = 254.0! + Me.XrLabel11.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel11.LocationFloat = New DevExpress.Utils.PointFloat(845.7034!, 47.36105!) + Me.XrLabel11.Name = "XrLabel11" + Me.XrLabel11.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel11.SizeF = New System.Drawing.SizeF(292.7596!, 58.41998!) + Me.XrLabel11.StylePriority.UseFont = False + Me.XrLabel11.Text = "Importe Entrada:" + ' + 'XrLabel10 + ' + Me.XrLabel10.Dpi = 254.0! + Me.XrLabel10.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteEntradasMovimientosCerrados]")}) + Me.XrLabel10.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel10.LocationFloat = New DevExpress.Utils.PointFloat(1154.338!, 47.36113!) + Me.XrLabel10.Name = "XrLabel10" + Me.XrLabel10.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel10.SizeF = New System.Drawing.SizeF(263.0427!, 58.42005!) + Me.XrLabel10.StylePriority.UseFont = False + Me.XrLabel10.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel10.TextFormatString = "{0:c2}" + ' + 'XrLabel9 + ' + Me.XrLabel9.Dpi = 254.0! + Me.XrLabel9.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel9.LocationFloat = New DevExpress.Utils.PointFloat(1445.093!, 47.36113!) + Me.XrLabel9.Name = "XrLabel9" + Me.XrLabel9.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel9.SizeF = New System.Drawing.SizeF(289.7356!, 58.41998!) + Me.XrLabel9.StylePriority.UseFont = False + Me.XrLabel9.Text = "Importe Salida:" + ' + 'XrLabel8 + ' + Me.XrLabel8.Dpi = 254.0! + Me.XrLabel8.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteSalidasMovimientosCerrados]")}) + Me.XrLabel8.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!) + Me.XrLabel8.LocationFloat = New DevExpress.Utils.PointFloat(1734.828!, 47.36105!) + Me.XrLabel8.Name = "XrLabel8" + Me.XrLabel8.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel8.SizeF = New System.Drawing.SizeF(240.1718!, 58.42003!) + Me.XrLabel8.StylePriority.UseFont = False + Me.XrLabel8.Text = "[profesores.Nombre] [Profesores.Apellidos]" + Me.XrLabel8.TextFormatString = "{0:c2}" + ' + 'XrLabel7 + ' + Me.XrLabel7.Dpi = 254.0! + Me.XrLabel7.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold) + Me.XrLabel7.LocationFloat = New DevExpress.Utils.PointFloat(55.95015!, 139.5012!) + Me.XrLabel7.Name = "XrLabel7" + Me.XrLabel7.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!) + Me.XrLabel7.SizeF = New System.Drawing.SizeF(353.2359!, 58.41998!) + Me.XrLabel7.StylePriority.UseFont = False + Me.XrLabel7.Text = "Saldo Caja Al Cierre:" + ' + 'XrShape1 + ' + Me.XrShape1.Dpi = 254.0! + Me.XrShape1.FillColor = System.Drawing.Color.WhiteSmoke + Me.XrShape1.LocationFloat = New DevExpress.Utils.PointFloat(13.76757!, 25.00001!) + Me.XrShape1.Name = "XrShape1" + ShapeRectangle2.Fillet = 20 + Me.XrShape1.Shape = ShapeRectangle2 + Me.XrShape1.SizeF = New System.Drawing.SizeF(1986.233!, 213.7961!) + ' + 'ObjectDataSource1 + ' + Me.ObjectDataSource1.DataSource = GetType(bdGrupoSanchoToro.db.movimientoscaja) + Me.ObjectDataSource1.Name = "ObjectDataSource1" + ' + 'Fecha + ' + Me.Fecha.Description = "Parameter1" + Me.Fecha.Name = "Fecha" + Me.Fecha.Type = GetType(Integer) + Me.Fecha.ValueInfo = "0" + ' + 'xrCierreCaja + ' + Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.TopMargin, Me.BottomMargin, Me.Detail, Me.DetailReport}) + Me.ComponentStorage.AddRange(New System.ComponentModel.IComponent() {Me.ObjectDataSource1}) + Me.DataSource = Me.ObjectDataSource1 + Me.Dpi = 254.0! + Me.Font = New DevExpress.Drawing.DXFont("Arial", 9.75!) + Me.Margins = New DevExpress.Drawing.DXMargins(50, 50, 139, 50) + Me.PageHeight = 2970 + Me.PageWidth = 2100 + Me.PaperKind = System.Drawing.Printing.PaperKind.A4 + Me.Parameters.AddRange(New DevExpress.XtraReports.Parameters.Parameter() {Me.Fecha}) + Me.ReportUnit = DevExpress.XtraReports.UI.ReportUnit.TenthsOfAMillimeter + Me.SnapGridSize = 25.0! + Me.Version = "19.2" + CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.ObjectDataSource1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me, System.ComponentModel.ISupportInitialize).EndInit() + + End Sub + + Friend WithEvents TopMargin As DevExpress.XtraReports.UI.TopMarginBand + Friend WithEvents BottomMargin As DevExpress.XtraReports.UI.BottomMarginBand + Friend WithEvents Detail As DevExpress.XtraReports.UI.DetailBand + Friend WithEvents XrLabel3 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel5 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel1 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel2 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel4 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel6 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel14 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel13 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrShape2 As DevExpress.XtraReports.UI.XRShape + Friend WithEvents ObjectDataSource1 As DevExpress.DataAccess.ObjectBinding.ObjectDataSource + Friend WithEvents DetailReport As DevExpress.XtraReports.UI.DetailReportBand + Friend WithEvents Detail1 As DevExpress.XtraReports.UI.DetailBand + Friend WithEvents XrTable1 As DevExpress.XtraReports.UI.XRTable + Friend WithEvents XrTableRow1 As DevExpress.XtraReports.UI.XRTableRow + Friend WithEvents XrTableCell1 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell2 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell6 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell7 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell9 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents GroupHeader1 As DevExpress.XtraReports.UI.GroupHeaderBand + Friend WithEvents XrTable2 As DevExpress.XtraReports.UI.XRTable + Friend WithEvents XrTableRow2 As DevExpress.XtraReports.UI.XRTableRow + Friend WithEvents XrTableCell3 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell4 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell11 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell12 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents XrTableCell14 As DevExpress.XtraReports.UI.XRTableCell + Friend WithEvents GroupFooter1 As DevExpress.XtraReports.UI.GroupFooterBand + Friend WithEvents XrLabel12 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel11 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel10 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel9 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel8 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel7 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrShape1 As DevExpress.XtraReports.UI.XRShape + Friend WithEvents XrLabel16 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel15 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel17 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel18 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents Fecha As DevExpress.XtraReports.Parameters.Parameter + Friend WithEvents XrPanel1 As DevExpress.XtraReports.UI.XRPanel + Friend WithEvents XrLabel22 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel19 As DevExpress.XtraReports.UI.XRLabel + Friend WithEvents XrLabel20 As DevExpress.XtraReports.UI.XRLabel +End Class diff --git a/GestionGrupoSanchoToro/Informes/xrCierreCaja.resx b/GestionGrupoSanchoToro/Informes/xrCierreCaja.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/GestionGrupoSanchoToro/Informes/xrCierreCaja.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Informes/xrCierreCaja.vb b/GestionGrupoSanchoToro/Informes/xrCierreCaja.vb new file mode 100644 index 0000000..2daddf4 --- /dev/null +++ b/GestionGrupoSanchoToro/Informes/xrCierreCaja.vb @@ -0,0 +1,3 @@ +Public Class xrCierreCaja + +End Class \ No newline at end of file diff --git a/GestionGrupoSanchoToro/ListadosYProcesos.vb b/GestionGrupoSanchoToro/ListadosYProcesos.vb new file mode 100644 index 0000000..08808db --- /dev/null +++ b/GestionGrupoSanchoToro/ListadosYProcesos.vb @@ -0,0 +1,82 @@ +Imports System.Data.OleDb +Imports tsEFCore8.Extensiones +Imports DevExpress.Xpf.Core +Imports bdGrupoSanchoToro.db +Imports bdGrupoSanchoToro.db.productos +Imports DevExpress.Spreadsheet +Imports System.Text.RegularExpressions +Imports VeriFactu.Business +Partial Public Class ListadosYProcesos + + + Public Shared Function CierraCaja(idCaja As Integer, Optional ImprimirCierre As Boolean = False) As String + Dim bd = tscGrupoSanchoToro.NuevoContexto + Dim Caja = bd.cajas.First(Function(x) x.idCaja = idCaja) + Dim mac = Caja.movimientoscaja.Where(Function(x) x.idMovimientoCierre.HasValue = False) + 'Dim SaldoACerrar = mac.Sum(Function(x) x.Importe) + Dim mc = New movimientoscaja + With mc + .Tipo = TipoMovimientoEnum.CIERRE_CAJA + .Importe = 0 + .Observaciones = "Importe Movimientos Cerrados: " & Caja.SaldoPendienteCierre.ToString("0.##") & " €. Saldo en Caja: " & Caja.SaldoActual.ToString("0.##'") & "€." + .Fecha = Now + .FechaCreacion = Now + .idCaja = Caja.idCaja + .idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario + .DocumentoPago = "" + .SaldoAntesCierre = Caja.SaldoAlCierre + End With + bd.movimientoscaja.Add(mc) + Caja.SaldoAlCierre = Caja.SaldoActual + Caja.FechaCierre = Now + bd.GuardarCambios() + For Each m In mac + m.idMovimientoCierre = mc.idMovimiento + Next + bd.GuardarCambios() + If ImprimirCierre Then + Dim lm As New List(Of movimientoscaja) + lm.Add(mc) + Dim xr As New xrCierreCaja + Informes.ImprimeInforme(xr, False, 1, bd.AhoraMySql, lm) + End If + Return mc.Observaciones + End Function + + Friend Shared Sub Anadelogtxt(ByVal Mensaje As String, ByVal FicheroLog As String) + + Dim sw As IO.StreamWriter = Nothing + Try + Mensaje = Mensaje.Replace(vbCrLf, "---") + If IO.File.Exists(FicheroLog) Then + sw = IO.File.AppendText(FicheroLog) + Else + sw = IO.File.CreateText(FicheroLog) + End If + Mensaje = Now.ToString & "|" & "Ws: " & System.Diagnostics.Process.GetCurrentProcess.WorkingSet64.ToString.PadLeft(20) & + " PMS: " & System.Diagnostics.Process.GetCurrentProcess.PrivateMemorySize64.ToString.PadLeft(20) & "|" & Mensaje + + sw.WriteLine(Mensaje) + + Catch ex As Exception + + Finally + Try + sw.Close() + Catch + End Try + End Try + + End Sub + + 'Public Shared Sub PruebaVeriFactu() + ' Dim conf As New VeriFactu.Config.Settings() + ' Debug.WriteLine(conf.CertificatePath) + + ' Dim invoice = New Invoice("GITHUB-EJ-002", New DateTime(2024, 11, 4), "B72877814") + + + 'End Sub + + +End Class diff --git a/GestionGrupoSanchoToro/My Project/Application.myapp b/GestionGrupoSanchoToro/My Project/Application.myapp new file mode 100644 index 0000000..9aa7b50 --- /dev/null +++ b/GestionGrupoSanchoToro/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + true + dxwInicio + false + 0 + true + 0 + true + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/My Project/Resources.Designer.vb b/GestionGrupoSanchoToro/My Project/Resources.Designer.vb new file mode 100644 index 0000000..4ff8f55 --- /dev/null +++ b/GestionGrupoSanchoToro/My Project/Resources.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' Este código fue generado por una herramienta. +' Versión de runtime:4.0.30319.42000 +' +' Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +' se vuelve a generar el código. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'StronglyTypedResourceBuilder generó automáticamente esta clase + 'a través de una herramienta como ResGen o Visual Studio. + 'Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen + 'con la opción /str o recompile su proyecto de VS. + ''' + ''' Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("GrupoSanchoToro.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las + ''' búsquedas de recursos mediante esta clase de recurso fuertemente tipado. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + + ''' + ''' Busca un recurso adaptado de tipo System.Byte[]. + ''' + Friend ReadOnly Property STSur() As Byte() + Get + Dim obj As Object = ResourceManager.GetObject("STSur", resourceCulture) + Return CType(obj,Byte()) + End Get + End Property + End Module +End Namespace diff --git a/GestionGrupoSanchoToro/My Project/Resources.resx b/GestionGrupoSanchoToro/My Project/Resources.resx new file mode 100644 index 0000000..ef284dc --- /dev/null +++ b/GestionGrupoSanchoToro/My Project/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\STSur.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/My Project/Settings.Designer.vb b/GestionGrupoSanchoToro/My Project/Settings.Designer.vb new file mode 100644 index 0000000..e7aba1c --- /dev/null +++ b/GestionGrupoSanchoToro/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' Este código fue generado por una herramienta. +' Versión de runtime:4.0.30319.42000 +' +' Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +' se vuelve a generar el código. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "Funcionalidad para autoguardar My.Settings" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.GrupoSanchoToro.My.MySettings + Get + Return Global.GrupoSanchoToro.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/GestionGrupoSanchoToro/My Project/Settings.settings b/GestionGrupoSanchoToro/My Project/Settings.settings new file mode 100644 index 0000000..392df0a --- /dev/null +++ b/GestionGrupoSanchoToro/My Project/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/GestionGrupoSanchoToro/Properties/Licenses.licx b/GestionGrupoSanchoToro/Properties/Licenses.licx new file mode 100644 index 0000000..dca2f78 --- /dev/null +++ b/GestionGrupoSanchoToro/Properties/Licenses.licx @@ -0,0 +1 @@ +DevExpress.Xpf.RichEdit.RichEditControl, DevExpress.Xpf.RichEdit.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/GestionGrupoSanchoToro/Publicacion/Publicar.cmd b/GestionGrupoSanchoToro/Publicacion/Publicar.cmd new file mode 100644 index 0000000..8ee0a38 --- /dev/null +++ b/GestionGrupoSanchoToro/Publicacion/Publicar.cmd @@ -0,0 +1,5 @@ +"C:\Program Files\7-Zip\7z.exe" a -tzip -r "C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\GrupoSanchoToro.zip" "C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\bin\Debug\net8.0-windows7.0\*.*" +"C:\Program Files (x86)\winscp\WinSCP.com" /ini=null /log=c:\tmp\ftp.log /script=C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\winscpftp.txt +del "C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\GrupoSanchoToro.zip" +del "C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\null" +pause diff --git a/GestionGrupoSanchoToro/Publicacion/changelog.htm b/GestionGrupoSanchoToro/Publicacion/changelog.htm new file mode 100644 index 0000000..d9d2fae --- /dev/null +++ b/GestionGrupoSanchoToro/Publicacion/changelog.htm @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Cambios en las versiones:

+

+·         +12/12/2025 Modificaciones en la +versión 1.0.0.31

+

+o    +Corrección +problema multiempresa

+

+·         +18/111/2025 Modificaciones en la +versión 1.0.0.30

+

+o    +Corrección +problema multiempresa

+

+·         +08/10/2025 Modificaciones en la versión 1.0.0.29

+

+o    +Corrección +problema multiempresa

+

+·         +07/10/2025 Modificaciones en la versión 1.0.0.28

+

+o    +Corrección +problema duplicados

+

+·         +06/10/2025 Modificaciones en la versión 1.0.0.27

+

+o    +Corrección +aplicación de Clientes/Proveedores

+

+·         +03/10/2025 Modificaciones en la versión 1.0.0.25

+

+o    +Se incluye la empresa Hermanos Murga

+

+·         +15/07/2025 Modificaciones en la versión 1.0.0.24

+

+o    +Se corrige problema al en facturas emitidas.

+

+·         +30/05/2025 Modificaciones en la versión 1.0.0.23

+

+o    +Se añade campo de Observaciones en Impresión a la +pantalla de facturas emitidas.

+

+o    +Se corrige problema al imprimir.

+

+·         +04/04/2025 Modificaciones en la versión 1.0.0.22

+

+o    +Se corrige error de campo obligatorio producto en facturas +de venta.

+

+·         +13/03/2025 Modificaciones en la versión 1.0.0.21

+

+o    +Se permite eliminar facturas recibidas.

+

+·         +12/03/2025 Modificaciones en la versión 1.0.0.20

+

+o    +Corrección aplicación de facturas Emitidas en redondeos

+

+·         +12/02/2025 Modificaciones en la versión 1.0.0.18

+

+o    +Corrección aplicación de IRPF en facturas Emitidas

+

+o    +Se adjunta en los correos para la asesoría la factura +escaneada (tanto en recibidas como emitidas)

+

+·         +07/02/2025 Modificaciones en la versión 1.0.0.17

+

+o    +Se Añade campo en series de factura para indicar que el +IRPF se calcula después de IVA

+

+o    +Se permite eliminar facturas de clientes si son del tipo +“Emitidas por el Cliente”

+

+·         +24/01/2025 Modificaciones en la versión 1.0.0.16

+

+o    +Correcciones varias

+

+·         +07/01/2025 Modificaciones en la versión 1.0.0.15

+

+o    +Correcciones varias

+

+·         +14/11/2024 Modificaciones en la versión 1.0.0.14

+

+o    +Correcciones varias

+

+·         +12/11/2024 Modificaciones en la versión 1.0.0.13

+

+o    +Correcciones varias

+

+·         +11/11/2024 Modificaciones en la versión 1.0.0.12

+

+o    +Correcciones varias

+

+·         +04/12/2024 Modificaciones en la versión 1.0.0.11

+

+o    +Correcciones varias

+

+·         +02/12/2024 Modificaciones en la versión 1.0.0.10

+

+o    +Correcciones varias

+

+·         +29/11/2024 Modificaciones en la versión 1.0.0.9

+

+o    +Correcciones varias

+

+·         +27/11/2024 Modificaciones en la versión 1.0.0.8

+

+o    +Correcciones varias

+

+·         +25/11/2024 Modificaciones en la versión 1.0.0.7

+

+o    +Corrección en campos obligatorios en facturas recibidas

+

+o    +Corrección en aplicación de Conciliaciones Bancarias

+

+·         +21/11/2024 Modificaciones en la versión 1.0.0.6

+

+o    +Correcciones varias

+

+·         +21/11/2024 Modificaciones en la versión 1.0.0.6

+

+o    +Correcciones varias

+

+·         +17/11/2024 Modificaciones en la versión 1.0.0.5

+

+o    +Se añade Tipo de IVA Exento.

+

+·         +16/11/2024 Modificaciones en la versión 1.0.0.4

+

1.      +Correcciones en fechas de facturas emitidas y recibidas.

+

+·         +11/11/2024 Modificaciones en la versión 1.0.0.3

+

1.      +Correcciones en productos.

+ + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Publicacion/changelog_archivos/colorschememapping.xml b/GestionGrupoSanchoToro/Publicacion/changelog_archivos/colorschememapping.xml new file mode 100644 index 0000000..6a0069c --- /dev/null +++ b/GestionGrupoSanchoToro/Publicacion/changelog_archivos/colorschememapping.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Publicacion/changelog_archivos/filelist.xml b/GestionGrupoSanchoToro/Publicacion/changelog_archivos/filelist.xml new file mode 100644 index 0000000..1be7d89 --- /dev/null +++ b/GestionGrupoSanchoToro/Publicacion/changelog_archivos/filelist.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Publicacion/changelog_archivos/themedata.thmx b/GestionGrupoSanchoToro/Publicacion/changelog_archivos/themedata.thmx new file mode 100644 index 0000000..345edcf Binary files /dev/null and b/GestionGrupoSanchoToro/Publicacion/changelog_archivos/themedata.thmx differ diff --git a/GestionGrupoSanchoToro/Publicacion/m3Factu.xml b/GestionGrupoSanchoToro/Publicacion/m3Factu.xml new file mode 100644 index 0000000..cae1422 --- /dev/null +++ b/GestionGrupoSanchoToro/Publicacion/m3Factu.xml @@ -0,0 +1,6 @@ + +1.0.0.31 +https://www.english-skills.net/GrupoSanchoToro/GrupoSanchoToro.zip +https://www.english-skills.net/GrupoSanchoToro/changelog.htm +true + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Publicacion/winscpftp.txt b/GestionGrupoSanchoToro/Publicacion/winscpftp.txt new file mode 100644 index 0000000..fbddfc1 --- /dev/null +++ b/GestionGrupoSanchoToro/Publicacion/winscpftp.txt @@ -0,0 +1,5 @@ +open ftp://manuel:tsl4net.Ts87@192.168.200.1:993/ -explicittls -certificate=* +put C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\GrupoSanchoToro.zip /inetpub/wwwroot/GrupoSanchoToro/ +put C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\GrupoSanchoToro.xml /inetpub/wwwroot/GrupoSanchoToro/ +put C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\changelog.htm /inetpub/wwwroot/GrupoSanchoToro/ +exit \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Resources/LogoTcsColor.png b/GestionGrupoSanchoToro/Resources/LogoTcsColor.png new file mode 100644 index 0000000..a755104 Binary files /dev/null and b/GestionGrupoSanchoToro/Resources/LogoTcsColor.png differ diff --git a/GestionGrupoSanchoToro/Resources/STSur.jpg b/GestionGrupoSanchoToro/Resources/STSur.jpg new file mode 100644 index 0000000..6a174cf Binary files /dev/null and b/GestionGrupoSanchoToro/Resources/STSur.jpg differ diff --git a/GestionGrupoSanchoToro/Resources/stsur.ico b/GestionGrupoSanchoToro/Resources/stsur.ico new file mode 100644 index 0000000..7f91425 Binary files /dev/null and b/GestionGrupoSanchoToro/Resources/stsur.ico differ diff --git a/GestionGrupoSanchoToro/Resources/stsur_simple_icon_32x32.png b/GestionGrupoSanchoToro/Resources/stsur_simple_icon_32x32.png new file mode 100644 index 0000000..6615853 Binary files /dev/null and b/GestionGrupoSanchoToro/Resources/stsur_simple_icon_32x32.png differ diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoCodigoPostal.xaml b/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoCodigoPostal.xaml new file mode 100644 index 0000000..cef8c39 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoCodigoPostal.xaml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoCodigoPostal.xaml.vb b/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoCodigoPostal.xaml.vb new file mode 100644 index 0000000..8d12693 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoCodigoPostal.xaml.vb @@ -0,0 +1,71 @@ + +Imports System.Data.Entity +Imports DevExpress.Xpf.Core.ServerMode +Imports DevExpress.Mvvm +Imports DevExpress.Xpf.Grid +Imports tsWPFCore +Imports tsEFCore8.Extensiones +Imports DevExpress.Xpf.Core + +Imports bdGrupoSanchoToro.db.Utilidades +Imports bdGrupoSanchoToro + +Public Class dxwAgregarNuevoCodigoPostal + + ' Private _alumno As alumnos + Friend _CodigoPostal As String + Private _bd As tscGrupoSanchoToro + + Private Sub dxwAgregarNuevoCodigoPostal_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded + Me.teCodigoPostal.EditValue = _CodigoPostal + Dim sCodigoProvincia As String = _CodigoPostal.Substring(0, 2) + Me.teProvincia.EditValue = _bd.provincias.First(Function(x) x.CodigoProvincia = sCodigoProvincia).Nombre + Me.cbMunicipio.ItemsSource = _bd.municipios.Where(Function(x) x.CodigoProvincia = sCodigoProvincia).OrderBy(Function(x) x.Nombre).ToList + Me.cbMunicipio.Focus() + End Sub + + Public Sub New(CodigoPostal As String, bd As tscGrupoSanchoToro) + _CodigoPostal = CodigoPostal + _bd = bd + ' Llamada necesaria para el diseñador. + InitializeComponent() + Comun.EscalaVentana(Me, Me.grid.LayoutTransform) + + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + + End Sub + + + Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs) + Me.DialogResult = False + Me.Close() + End Sub + + Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs) + Try + If cbMunicipio.EditValue Is Nothing Then + DXMessageBox.Show("El municipio es obligatorio") + Else + Dim _CodigoMunicipio As String = "" + If cbMunicipio.EditValue IsNot Nothing Then _CodigoMunicipio = cbMunicipio.EditValue + Dim sDescripcionAdicional As String = "" + If teDescripcionAdicional.EditValue IsNot Nothing Then sDescripcionAdicional = teDescripcionAdicional.EditValue + Dim ncp As New bdGrupoSanchoToro.db.codigospostales + With ncp + .CodigoMunicipio = _CodigoMunicipio + .CodigoPostal = _CodigoPostal + .DescripcionAdicional = sDescripcionAdicional + End With + _bd.codigospostales.Add(ncp) + _bd.GuardarCambios() + Me.DialogResult = True + Me.Close() + End If + Catch ex As Exception + Comun.GeneraRegistroCorreoExcepcion(Nothing, ex, "dxwAgregarNuevoCodigoPostal.btAceptar_Click") + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub +End Class + + diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoMunicipio.xaml b/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoMunicipio.xaml new file mode 100644 index 0000000..67125f9 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoMunicipio.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoMunicipio.xaml.vb b/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoMunicipio.xaml.vb new file mode 100644 index 0000000..4ee7e80 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwAgregarNuevoMunicipio.xaml.vb @@ -0,0 +1,82 @@ + +Imports System.Data.Entity +Imports DevExpress.Xpf.Core.ServerMode +Imports DevExpress.Mvvm +Imports DevExpress.Xpf.Grid +Imports tsWPFCore +Imports tsEFCore8.Extensiones +Imports DevExpress.Xpf.Core +Imports DevExpress.XtraReports.UI +Imports System.IO +Imports DevExpress.Xpf.Printing +Imports Microsoft.Win32 +Imports System.Data.Objects +Imports System.Data.Objects.DataClasses +Imports DevExpress.Xpf.Editors +Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro +Imports bdGrupoSanchoToro + +Public Class dxwAgregarNuevoMunicipio + ' Private _alumno As alumnos + Friend _CodigoPostal As String + Friend _CodigoMunicipio As String + Private bd As tscGrupoSanchoToro + + Private Sub dxwAgregarNuevoCodigoPostal_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded + Me.teCodigoPostal.Focus() + End Sub + + Public Sub New(CodigoPostal As String) + ' Llamada necesaria para el diseñador. + InitializeComponent() + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + bd = tscGrupoSanchoToro.NuevoContexto + _CodigoPostal = CodigoPostal + teCodigoPostal.EditValue = CodigoPostal + End Sub + + + Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs) + Me.DialogResult = False + Me.Close() + End Sub + + Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs) + Try + If teMunicipio.EditValue IsNot Nothing AndAlso teCodigoPostal.EditValue IsNot Nothing Then + _CodigoPostal = teCodigoPostal.EditValue + If _CodigoPostal.Length <> 5 Then Throw New Exception("El código postal es erróneo") + Dim codpro = _CodigoPostal.Substring(0, 2) + Dim provincia = bd.provincias.FirstOrDefault(Function(x) x.CodigoProvincia = codpro) + If provincia Is Nothing Then Throw New Exception("El código postal no pertenece a ninguna provincia") + Dim mun As String = teMunicipio.EditValue + If mun.NothingAVacio = "" Then Throw New Exception("El municipio es obligatorio") + _CodigoMunicipio = bdGrupoSanchoToro.db.municipios.ObtieneCodigoMunicipioMasCoincidente(bd, _CodigoPostal, mun) + Me.DialogResult = True + Me.Close() + Else + DXMessageBox.Show("El codigo postal y el municipio son obligatorios", "Atención") + End If + Catch ex As Exception + FuncionesDinamicas.ErrorNoControladoAp("dxwagregarnuevomunicipio_aceptar_click", ex) + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub + + Private Sub teCodigoPostal_EditValueChanged(sender As Object, e As EditValueChangedEventArgs) Handles teCodigoPostal.EditValueChanged + Dim codpos As String = teCodigoPostal.EditValue + If codpos IsNot Nothing AndAlso codpos.Length = 5 Then + Dim codpro = codpos.Substring(0, 2) + Dim provincia = bd.provincias.FirstOrDefault(Function(x) x.CodigoProvincia = codpro) + If provincia IsNot Nothing Then + cbProvincia.EditValue = provincia.Nombre + Else + cbProvincia.EditValue = "" + End If + Else + cbProvincia.EditValue = "" + End If + End Sub +End Class + + diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwArticulos.xaml b/GestionGrupoSanchoToro/VentanasEmergentes/dxwArticulos.xaml new file mode 100644 index 0000000..3e2b440 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwArticulos.xaml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwArticulos.xaml.vb b/GestionGrupoSanchoToro/VentanasEmergentes/dxwArticulos.xaml.vb new file mode 100644 index 0000000..dcd4e89 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwArticulos.xaml.vb @@ -0,0 +1,60 @@ +Imports System.Data.Entity +Imports bdGrupoSanchoToro.db +Imports DevExpress.Xpf.Core +Imports bdGrupoSanchoToro.db.Utilidades + +Public Class dxwArticulos + Private _idProducto As Integer + Private _LArticulos As List(Of articulos) + Friend idArticulo As Integer + + Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs) + If gcArticulos.CurrentItem IsNot Nothing Then + Dim art = DirectCast(gcArticulos.CurrentItem, articulos) + idArticulo = art.idarticulo + Me.DialogResult = True + Me.Close() + End If + End Sub + + Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs) + Me.DialogResult = False + Me.Close() + End Sub + + Private Sub dxwproductos_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded + Try + + Me.gcArticulos.ItemsSource = _LArticulos.Where(Function(x) x.idProducto = _idProducto).OrderBy(Function(x) x.CodigoArticulo).ToList + Me.gcArticulos.View.SearchControl.Focus() + Catch ex As Exception + DXMessageBox.Show(ex.Message, "Error") + Finally + If DXSplashScreen.IsActive Then DXSplashScreen.Close() + End Try + End Sub + + 'Public Sub New(bd As m3academiaEntities, Existentes As List(Of Integer?)) + Public Sub New(lArticulos As List(Of articulos), idProducto As Integer) + + ' Llamada necesaria para el diseñador. + InitializeComponent() + Comun.EscalaVentana(Me, Me.grid.LayoutTransform) + + _LArticulos = lArticulos + _idProducto = idProducto + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + + End Sub + + + Private Sub dxw_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles Me.PreviewKeyDown + If e.Key = Key.Enter Then + btAceptar_Click(Nothing, Nothing) + End If + End Sub + + Private Sub tv_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs) Handles tvArticulos.MouseDoubleClick + btAceptar_Click(Nothing, Nothing) + End Sub +End Class diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwCodigosPostales.xaml b/GestionGrupoSanchoToro/VentanasEmergentes/dxwCodigosPostales.xaml new file mode 100644 index 0000000..290a756 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwCodigosPostales.xaml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwCodigosPostales.xaml.vb b/GestionGrupoSanchoToro/VentanasEmergentes/dxwCodigosPostales.xaml.vb new file mode 100644 index 0000000..0d89c8a --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwCodigosPostales.xaml.vb @@ -0,0 +1,69 @@ +Imports bdGrupoSanchoToro.db +Imports DevExpress.Xpf.Core +Imports bdGrupoSanchoToro.db.Utilidades +Imports bdGrupoSanchoToro +Imports System.Linq.Dynamic.Core +Imports Microsoft.EntityFrameworkCore + +Public Class dxwCodigosPostales + Friend CodigoMunicipio As String + Friend CodigoPostal As String + Private _CodigoPostal As String + Friend _bd As tscGrupoSanchoToro + + Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs) + If gc.CurrentItem IsNot Nothing Then + Dim cp = DirectCast(gc.CurrentItem, codigospostales) + CodigoMunicipio = cp.CodigoMunicipio + CodigoPostal = cp.CodigoPostal + Me.DialogResult = True + Me.Close() + End If + End Sub + + Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs) + Me.DialogResult = False + Me.Close() + End Sub + + Private Sub dxwCodigosPostales_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded + Try + + If _CodigoPostal <> "" Then + Me.gc.ItemsSource = _bd.codigospostales.Include(Function(x) x.CodigoMunicipioNavigation.CodigoProvinciaNavigation).Where(Function(x) x.CodigoPostal = _CodigoPostal).OrderBy(Function(x) x.CodigoMunicipioNavigation.Nombre).ToList + Else + Me.gc.ItemsSource = _bd.codigospostales.Include(Function(x) x.CodigoMunicipioNavigation.CodigoProvinciaNavigation).OrderBy(Function(x) x.CodigoMunicipioNavigation.Nombre).ToList + End If + Me.gc.View.SearchControl.Focus() + Catch ex As Exception + DXMessageBox.Show(ex.Message, "Error") + Finally + If DXSplashScreen.IsActive Then DXSplashScreen.Close() + End Try + End Sub + + 'Public Sub New(bd As m3academiaEntities, Existentes As List(Of Integer?)) + Public Sub New(bd As tscGrupoSanchoToro, CodigoPostal As String) + + ' Llamada necesaria para el diseñador. + InitializeComponent() + Comun.EscalaVentana(Me, Me.grid.LayoutTransform) + _CodigoPostal = CodigoPostal + _bd = bd + ' _existentes = Existentes + + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + + End Sub + + + Private Sub dxw_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles Me.PreviewKeyDown + If e.Key = Key.Enter Then + btAceptar_Click(Nothing, Nothing) + End If + End Sub + + Private Sub tv_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs) Handles tv.MouseDoubleClick + btAceptar_Click(Nothing, Nothing) + End Sub +End Class diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwEntidades.xaml b/GestionGrupoSanchoToro/VentanasEmergentes/dxwEntidades.xaml new file mode 100644 index 0000000..c718769 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwEntidades.xaml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwEntidades.xaml.vb b/GestionGrupoSanchoToro/VentanasEmergentes/dxwEntidades.xaml.vb new file mode 100644 index 0000000..c4f32d2 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwEntidades.xaml.vb @@ -0,0 +1,70 @@ +Imports System.Data.Entity +Imports bdGrupoSanchoToro.db +Imports DevExpress.Xpf.Core +Imports bdGrupoSanchoToro.db.Utilidades +Imports bdGrupoSanchoToro + +Public Class dxwEntidades + Friend Entidad As entidades + Friend _bd As tscGrupoSanchoToro + Private _EsCliente As Boolean + Private _EsProveedor As Boolean + + + Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs) + If gc.CurrentItem IsNot Nothing Then + Dim ent = DirectCast(gc.CurrentItem, entidades) + Entidad = ent + Me.DialogResult = True + Me.Close() + End If + End Sub + + Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs) + Me.DialogResult = False + Me.Close() + End Sub + + Private Sub dxwEntidades_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded + Try + + Dim ients = _bd.entidades.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso x.FechaBaja Is Nothing).Include(Function(x) x.CodigoMunicipioNavigation.CodigoProvinciaNavigation).AsQueryable + ients = ients.Where(Function(x) (x.EsCliente AndAlso _EsCliente) OrElse (x.EsProveedor AndAlso _EsProveedor)) + Me.gc.ItemsSource = ients.OrderBy(Function(x) x.RazonSocial).ToList + Me.gc.View.SearchControl.Focus() + Catch ex As Exception + DXMessageBox.Show(ex.Message, "Error") + Finally + If DXSplashScreen.IsActive Then DXSplashScreen.Close() + End Try + End Sub + + 'Public Sub New(bd As m3academiaEntities, Existentes As List(Of Integer?)) + Public Sub New(bd As tscGrupoSanchoToro, EsCliente As Boolean, EsProveedor As Boolean) + + ' Llamada necesaria para el diseñador. + InitializeComponent() + + Comun.EscalaVentana(Me, Me.grid.LayoutTransform) + + + _EsCliente = EsCliente + _EsProveedor = EsProveedor + _bd = bd + ' _existentes = Existentes + + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + + End Sub + + + Private Sub dxw_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles Me.PreviewKeyDown + If e.Key = Key.Enter Then + btAceptar_Click(Nothing, Nothing) + End If + End Sub + + Private Sub tv_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs) Handles tv.MouseDoubleClick + btAceptar_Click(Nothing, Nothing) + End Sub +End Class diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwEnvioCorreo.xaml b/GestionGrupoSanchoToro/VentanasEmergentes/dxwEnvioCorreo.xaml new file mode 100644 index 0000000..ade47a8 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwEnvioCorreo.xaml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwEnvioCorreo.xaml.vb b/GestionGrupoSanchoToro/VentanasEmergentes/dxwEnvioCorreo.xaml.vb new file mode 100644 index 0000000..28d3b04 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwEnvioCorreo.xaml.vb @@ -0,0 +1,82 @@ + +Imports System.Data.Entity +Imports DevExpress.Xpf.Core.ServerMode +Imports DevExpress.Mvvm +Imports DevExpress.Xpf.Grid +Imports tsWPFCore +Imports tsEFCore8.Extensiones +Imports DevExpress.Xpf.Core +Imports DevExpress.XtraReports.UI +Imports System.IO +Imports DevExpress.Xpf.Printing +Imports Microsoft.Win32 +Imports System.Data.Objects +Imports System.Data.Objects.DataClasses +Imports bdGrupoSanchoToro.db.Utilidades +Public Class dxwEnvioCorreo + + + Friend _Destinatarios As String + Friend _CC As String + Friend _BCC As String + Friend _Asunto As String + Friend _Cuerpo As String + Friend _Adjunto As String + + + Private Sub dxw_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded + + teDestinatario.Text = _Destinatarios + teCuerpo.Text = _Cuerpo + teAdjunto.Text = _Adjunto + teCopia.Text = _CC + teCopiaOculta.Text = _BCC + teAsunto.Text = _Asunto + teDestinatario.Focus() + End Sub + + Public Sub New(Destinatarios As String, CC As String, BCC As String, Asunto As String, Cuerpo As String, Adjunto As String) + _Destinatarios = Destinatarios + _CC = CC + _BCC = BCC + _Asunto = Asunto + _Cuerpo = Cuerpo + _Adjunto = Adjunto + + ' Llamada necesaria para el diseñador. + InitializeComponent() + Comun.EscalaVentana(Me, Me.grid.LayoutTransform) + + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + + End Sub + + + Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs) + Me.DialogResult = False + Me.Close() + End Sub + + Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs) + Try + If teDestinatario.Text.Trim.ToLower.EsEmailValido AndAlso teAsunto.Text.Trim <> "" Then + _Destinatarios = teDestinatario.Text.Trim.ToLower + _Cuerpo = teCuerpo.Text + _Adjunto = teAdjunto.Text + _CC = teCopia.Text + _BCC = teCopiaOculta.Text + _Asunto = teAsunto.Text + + Me.DialogResult = True + Me.Close() + Else + DXMessageBox.Show("El asunto y el destinatario son campos obligatorios") + End If + Catch ex As Exception + Comun.GeneraRegistroCorreoExcepcion(Nothing, ex, "dxwAgregarNuevoCodigoPostal.btAceptar_Click") + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub +End Class + + diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwIVA.xaml b/GestionGrupoSanchoToro/VentanasEmergentes/dxwIVA.xaml new file mode 100644 index 0000000..147f922 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwIVA.xaml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwIdentificacion.xaml b/GestionGrupoSanchoToro/VentanasEmergentes/dxwIdentificacion.xaml new file mode 100644 index 0000000..652f77a --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwIdentificacion.xaml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwPoblaciones.xaml.vb b/GestionGrupoSanchoToro/VentanasEmergentes/dxwPoblaciones.xaml.vb new file mode 100644 index 0000000..2f7bb16 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwPoblaciones.xaml.vb @@ -0,0 +1,63 @@ +Imports bdGrupoSanchoToro.db +Imports DevExpress.Xpf.Core +Imports bdGrupoSanchoToro.db.Utilidades +Imports bdGrupoSanchoToro +Imports Microsoft.EntityFrameworkCore + +Public Class dxwPoblaciones + Friend CodigoMunicipio As String + ' Friend CodigoPostal As String + ' Private _CodigoPostal As String + Friend _bd As tscGrupoSanchoToro + + Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs) + If gc.CurrentItem IsNot Nothing Then + CodigoMunicipio = DirectCast(gc.CurrentItem, municipios).CodigoMunicipio + Me.DialogResult = True + Me.Close() + End If + End Sub + + Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs) + Me.DialogResult = False + Me.Close() + End Sub + + Private Sub dxwPoblaciones_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded + Try + + Me.gc.ItemsSource = _bd.municipios.Include(Function(x) x.CodigoProvinciaNavigation).OrderBy(Function(x) x.Nombre).ToList + Me.gc.View.SearchControl.Focus() + Catch ex As Exception + If DXSplashScreen.IsActive Then DXSplashScreen.Close() + DXMessageBox.Show(ex.Message, "Error") + Finally + If DXSplashScreen.IsActive Then DXSplashScreen.Close() + End Try + End Sub + + 'Public Sub New(bd As m3academiaEntities, Existentes As List(Of Integer?)) + Public Sub New(bd As tscGrupoSanchoToro) + + ' Llamada necesaria para el diseñador. + InitializeComponent() + Comun.EscalaVentana(Me, Me.grid.LayoutTransform) + + _bd = bd + ' _existentes = Existentes + + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + + End Sub + + + Private Sub dxw_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles Me.PreviewKeyDown + If e.Key = Key.Enter Then + btAceptar_Click(Nothing, Nothing) + End If + End Sub + + Private Sub tv_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs) Handles tv.MouseDoubleClick + btAceptar_Click(Nothing, Nothing) + End Sub +End Class diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwProductos.xaml b/GestionGrupoSanchoToro/VentanasEmergentes/dxwProductos.xaml new file mode 100644 index 0000000..1a05350 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwProductos.xaml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/VentanasEmergentes/dxwProductos.xaml.vb b/GestionGrupoSanchoToro/VentanasEmergentes/dxwProductos.xaml.vb new file mode 100644 index 0000000..a86bd13 --- /dev/null +++ b/GestionGrupoSanchoToro/VentanasEmergentes/dxwProductos.xaml.vb @@ -0,0 +1,64 @@ +Imports System.Data.Entity +Imports bdGrupoSanchoToro.db +Imports DevExpress.Xpf.Core +Imports bdGrupoSanchoToro.db.Utilidades +Imports bdGrupoSanchoToro + +Public Class dxwProductos + Friend idProducto As Integer + Friend _bd As tscGrupoSanchoToro + Private _Lproductos As List(Of productos) + + Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs) + If gc.CurrentItem IsNot Nothing Then + Dim pro = DirectCast(gc.CurrentItem, productos) + idProducto = pro.idProducto + Me.DialogResult = True + Me.Close() + End If + End Sub + + Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs) + Me.DialogResult = False + Me.Close() + End Sub + + Private Sub dxwproductos_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded + Try + + Me.gc.ItemsSource = _Lproductos.ToList + Me.gc.View.SearchControl.Focus() + Catch ex As Exception + DXMessageBox.Show(ex.Message, "Error") + Finally + If DXSplashScreen.IsActive Then DXSplashScreen.Close() + End Try + End Sub + + 'Public Sub New(bd As m3academiaEntities, Existentes As List(Of Integer?)) + Public Sub New(lProductos As List(Of productos), Optional OcultarStock As Boolean = False) + + ' Llamada necesaria para el diseñador. + InitializeComponent() + If OcultarStock Then + gcStock.Visible = False + gcUnidadesAlquiladas.Visible = False + End If + Comun.EscalaVentana(Me, Me.grid.LayoutTransform) + + _Lproductos = lProductos + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + + End Sub + + + Private Sub dxw_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles Me.PreviewKeyDown + If e.Key = Key.Enter Then + btAceptar_Click(Nothing, Nothing) + End If + End Sub + + Private Sub tv_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs) Handles tvProductos.MouseDoubleClick + btAceptar_Click(Nothing, Nothing) + End Sub +End Class diff --git a/GestionGrupoSanchoToro/Ventas/ucFacturaEmitida.xaml b/GestionGrupoSanchoToro/Ventas/ucFacturaEmitida.xaml new file mode 100644 index 0000000..ec3ef36 --- /dev/null +++ b/GestionGrupoSanchoToro/Ventas/ucFacturaEmitida.xaml @@ -0,0 +1,879 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GestionGrupoSanchoToro/Ventas/ucFacturaEmitida.xaml.vb b/GestionGrupoSanchoToro/Ventas/ucFacturaEmitida.xaml.vb new file mode 100644 index 0000000..3cade7a --- /dev/null +++ b/GestionGrupoSanchoToro/Ventas/ucFacturaEmitida.xaml.vb @@ -0,0 +1,839 @@ +Imports DevExpress.Xpf.Editors +Imports DevExpress.Xpf.LayoutControl +Imports tsWPFCore +Imports System.ComponentModel +Imports System.Data +Imports DevExpress.Xpf.Editors.Validation +Imports DevExpress.Xpf.Editors.Helpers +Imports DevExpress.Xpf.Core +Imports tsWPFCore.modExtensiones +Imports System.Data.Common +Imports bdGrupoSanchoToro.db +Imports tsUtilidades.Datos +Imports DevExpress.Xpf.Bars +Imports DevExpress.Xpf.Grid +Imports System.Collections +Imports tsEFCore8.Extensiones +Imports bdGrupoSanchoToro.db.Utilidades +Imports tsUtilidades.Enumeraciones +Imports tsUtilidades +Imports bdGrupoSanchoToro.db.productos +Imports System.Windows.Threading +Imports System.IO +Imports Microsoft.Win32 + +'TODO: Comprobar cuando se puede modificar una factura (o eliminar) +Public Class ucFacturaEmitida + Private bd As tscGrupoSanchoToro + Friend _idFactura As Nullable(Of Integer) + Private lProductos As List(Of productos) + Private ivas As List(Of enumeraciones) + Friend idLog As Integer? + Dim ra As facturas + Public Overrides Sub Cargado() + Me.Tipo_ucControlBusqueda = GetType(ucFacturasEmitidas) + End Sub + + Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False) + Try + lProductos = bd.productos.OrderBy(Function(x) x.Descripcion).ToList + Dim lProductosFra = ra.detallesfacturas.Select(Function(x) x.idProducto).ToArray + lProductos = lProductos.Where(Function(x) x.FechaBaja Is Nothing OrElse lProductosFra.Contains(x.idProducto)).ToList + cbProducto.ItemsSource = lProductos + Dim cjs = bd.cajas.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso x.FechaBaja.HasValue = False).OrderBy(Function(x) x.Descripcion).ToList + Dim lCajas = cjs + Dim ids = ra.movimientoscaja.Select(Function(x) x.idCaja).ToList + Me.cbCaja.ItemsSource = lCajas.Where(Function(x) x.FechaBaja.HasValue = False OrElse ids.Contains(x.idCaja)).ToList + cbTipoDocumento.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.documentosfacturas.TipoDocumentoFacturaEnum)).OrderBy(Function(x) x.Descripcion) + Dim plantillas As List(Of tsWPFCore.Plantilla) = Comun.ObtienePlantillas(bd, {"GRUPLA.FACEMI"}, False) + Me.ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource = plantillas + If plantillas.Count > 0 Then + Me.ContenedorAplicacion.bePlantilla.EditValue = plantillas.First.idPlantilla + End If + Catch ex As Exception + Throw New Exception(ex.Message, ex) + End Try + End Sub + + + Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion + Dim NuevoEstado As tsUtilidades.EstadosAplicacion + + If idLog.HasValue Then + Try + Dim log = bd.logs.First(Function(x) x.idLog = idLog) + ra = tsUtilidades.Utilidades.DeserializarSinErrores(log.Log, GetType(facturas)) + If ra.idUsuario.HasValue Then ra.idUsuarioNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuario.Value) + Dim df = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "DETALLESFACTURAS") + If df IsNot Nothing Then + Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(df.Log, GetType(List(Of detallesfacturas))) + For Each d In ld + ra.detallesfacturas.Add(d) + Next + End If + Dim mv = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "MOVIMIENTOSCAJA_FR") + If mv IsNot Nothing Then + Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(mv.Log, GetType(List(Of movimientoscaja))) + For Each d In ld + ra.movimientoscaja.Add(d) + Next + End If + Dim lent = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "ENTIDADES") + If lent IsNot Nothing Then + Dim ent = tsUtilidades.Utilidades.DeserializarSinErrores(lent.Log, GetType(entidades)) + ra.idClienteNavigation = ent + End If + NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro + Catch EX As Exception + Throw New Exception("No ha sido posible mostrar el registro del cambio (id " & idLog.Value.ToString & ").", EX) + End Try + Else + If FuerzaNuevo OrElse _idFactura Is Nothing Then + ra = New facturas + ra.FechaFactura = DateOnly.FromDateTime(Today) + _idFactura = Nothing + ra.FechaEmision = Now + NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo + ivas = bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "PIVA" AndAlso x.FechaBaja Is Nothing).ToList + + Else + ra = bd.facturas.First(Function(x) x.idFactura = _idFactura) + Dim tiv = ra.detallesfacturas.Select(Function(x) x.idTipoIVA).GroupBy(Function(x) x).Select(Function(x) x.FirstOrDefault).ToList + ivas = bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "PIVA" AndAlso (x.FechaBaja Is Nothing OrElse tiv.Contains(x.idEnumeracion))).ToList + NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro + End If + End If + cbRazonSocial.ItemsSource = bd.entidades.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso (x.EsCliente AndAlso x.FechaBaja.HasValue = False) OrElse x.idEntidad = ra.idCliente).ToList + cbSerie.ItemsSource = bd.seriesfacturas.Where(Function(x) x.FechaBaja.HasValue = False AndAlso x.idEmpresa = EmpresaActual.idEmpresa).ToList + cbIva.ItemsSource = ivas + gcDetalle.ItemsSource = ra.detallesfacturas + gcRecibos.ItemsSource = ra.movimientoscaja + gcDocumentos.ItemsSource = ra.documentosfacturas + Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idFactura AndAlso x.Aplicacion = "facturas").ToList + Me.DataContext = ra + Return NuevoEstado + End Function + + + + Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto + bd = tscGrupoSanchoToro.NuevoContexto(,,, True, "FACTURAS") + Return bd + End Function + + Public Overrides ReadOnly Property NombreTablaBase As String + Get + Return "facturas" + End Get + End Property + + 'Public Overrides ReadOnly Property CampoIndice As String + ' Get + ' Return "idFactura" + ' End Get + 'End Property + Public Overrides ReadOnly Property idRegistroAplicacionActual As String + Get + If idLog.HasValue Then + Return "Factura Cliente R.C.:" & idLog.ToString + Else + If Me.Estado = tsUtilidades.EstadosAplicacion.Nuevo Then + Return "Factura Cliente.Nuevo" + Else + Return "Factura Cliente." & DirectCast(Me.DataContext, facturas).idFactura.ToString + End If + End If + End Get + End Property + + Public Overrides ReadOnly Property DescripcionRegistro As String + Get + Return "Factura Cliente" + End Get + End Property + + Public Sub New(Optional idFactura As Integer? = Nothing) + + ' Llamada necesaria para el diseñador. + InitializeComponent() + _idFactura = idFactura + + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + + End Sub + + + + + Public Overrides Sub EstableceTitulo() + If idLog.HasValue Then + Dim fr As facturas = Me.DataContext + Me.docpanel.Caption = "R.C. Factura de Cliente " & fr.NumeroFactura + Me.docpanel.Tag = "R.C. Factura Emitida." & fr.NumeroFactura + Else + If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then + Dim fr As facturas = Me.DataContext + Me.docpanel.Caption = "Factura de Cliente " & fr.NumeroFactura + Me.docpanel.Tag = "Factura Emitida." & fr.NumeroFactura + Else + Me.docpanel.Caption = "Factura de Cliente Nueva" + Me.docpanel.Tag = "FacturaEmitida.Nuevo" + End If + End If + ' End If + 'End If + End Sub + + Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos + Dim pers = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario) + ' pers.Eliminar = False + Return pers + End Function + + + Private Sub ap_ValidarControl(sender As Object, e As ValidationEventArgs, ByRef ev As ErrorValidacion, ByRef ValorOriginalCambiado As Object) Handles Me.ValidarControl + Dim pts As PropiedadesTS = sender.parent.propiedadests + Try + If Not pts Is Nothing Then + Me.ErroresValidacion.EliminaError("validando-" & pts.NombreCampo) + + Select Case pts.NombreCampo.ToLower + Case "idseriefactura_nulable" + Dim Serie = CInt(e.Value) + Dim sf = bd.seriesfacturas.First(Function(x) x.idSerieFactura = Serie) + Dim Tipo As bdGrupoSanchoToro.db.seriesfacturas.TipoSerieFacturaEnum = sf.Tipo + If Tipo = seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then + ra.NumeroFactura = sf.Serie & "/" + Else + ra.NumeroFactura = Nothing + End If + Dim lc As New List(Of tsLayoutItem)({liNumeroFactura}) + If Tipo <> seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then + EstableceSoloLectura(lc, True) + Else + EstableceSoloLectura(lc, False) + End If + Case "idcliente_nulable" + Dim id As Integer = e.Value + Dim ent = bd.entidades.First(Function(x) x.idEntidad = id) + ra.RazonSocial = ent.RazonSocial + ra.Direccion = ent.Direccion + ra.CodigoMunicipio = ent.CodigoMunicipio + ra.CodigoPostal = ent.CodigoPostal + ra.NIF = ent.NIF + ra.CodigoMunicipioNavigation = ent.CodigoMunicipioNavigation + Case "numerofactura" + Dim sf = bd.seriesfacturas.First(Function(x) x.idSerieFactura = ra.idSerieFactura) + Dim Tipo As bdGrupoSanchoToro.db.seriesfacturas.TipoSerieFacturaEnum = sf.Tipo + If Tipo = seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then + Dim nf As String = e.Value + Dim nff = sf.Serie & "/" + Dim numeracion As String = nf + If numeracion.StartsWith(sf.Serie & "/") Then numeracion = nf.Split("/", 2)(1).Trim + If numeracion.Length > sf.NumeroDigitos Then + Throw New Exception("La numeración de la factura excede los dígitos permitidos") + Else + numeracion = numeracion.PadLeft(sf.NumeroDigitos, "0") + End If + nff &= numeracion + If nff <> nf Then + ValorOriginalCambiado = nff + ra.NumeroFactura = nff + End If + End If + End Select + End If + Catch ex As Exception + Dim sCodigoError As String = "validando-" + If pts IsNot Nothing Then + sCodigoError &= pts.NombreCampo + End If + ev = New ErrorValidacion(sCodigoError, sender, ex.Message, ex, DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical) + e.IsValid = False + End Try + End Sub + + + Private Sub ap_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar + _idFactura = ra.idFactura + Me.gcRecibos.ItemsSource = ra.movimientoscaja + Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idFactura AndAlso x.Aplicacion = "FACTURAS").ToList + End Sub + + + Private Sub ap_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar + + Select Case Celda.Column.FieldName.ToLower + Case "idlog" + Dim log As logs = gcLogs.CurrentItem + Dim id As Integer = log.idLog + Dim uc As New ucFacturaEmitida + uc.idLog = log.idLog + FuncionesDinamicas.AbrirAP(uc, OtrosParametros) + Case "numerorecibotmp" + Dim fa As facturas = Me.DataContext + Dim rec As movimientoscaja = Celda.RowData.Row + If rec IsNot Nothing Then + Dim lr As New List(Of movimientoscaja) + Dim Continuar As Boolean + If Me.ContenedorAplicacion.btGuardar.IsEnabled Then + Me.tvRecibos.CommitEditing() + If Not Guardar(Nothing, Nothing,,, 9) Then + If rec.Fecha = Date.MinValue Then + rec.Fecha = AhoraMySql(bd) + rec.FechaCreacion = rec.Fecha + End If + Continuar = True + Else + Continuar = False + End If + Else + Continuar = True + End If + If Continuar Then + lr.Add(rec) + Dim cp As String = "RECIBO" + Dim pl = bd.plantillas.AsNoTracking.Where(Function(x) x.Codigo = cp).Select(Function(x) New With {.Fichero = x.idFicheroNavigation.Fichero, .Tipo = x.idGrupoNavigation.Codigo}).FirstOrDefault + Informes.ImprimirPlantilla(bd, pl.Fichero, lr, False, 1) + End If + End If + End Select + 'Select Case Celda.Column.FieldName.ToLower + ' Case "numeroalbaranentrega" + ' Dim ra = DirectCast(Me.gcDetalle.CurrentItem, detallesfacturas) + ' Dim id As Integer = ra.detallesalbaranes.idAlbaranEntrega + ' FuncionesDinamicas.AbrirAP(New ucAlbaranEntrega(id), OtrosParametros) + ' Case "numeroalbaranrecogida" + ' Dim ra = DirectCast(Me.gcDetalle.CurrentItem, detallesfacturas) + ' Dim id As Integer = ra.detallesalbaranes.idAlbaranRecogida + ' FuncionesDinamicas.AbrirAP(New ucAlbaranRecogida(id), OtrosParametros) + 'End Select + End Sub + + + + + + + + Private Sub ap_EstadoCambiado(EstadoAnterior As tsUtilidades.EstadosAplicacion, EstadoNuevo As tsUtilidades.EstadosAplicacion) Handles Me.EstadoCambiado + Dim lc As New List(Of tsLayoutItem)({liNumeroFactura}) + + Select Case EstadoNuevo + Case EstadosAplicacion.ModificandoRegistro + If DirectCast(ra.idSerieFacturaNavigation.Tipo, db.seriesfacturas.TipoSerieFacturaEnum) <> seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then + EstableceSoloLectura(lc, True) + End If + Case EstadosAplicacion.Nuevo + EstableceSoloLectura(lc, True) + End Select + If idLog.HasValue Then EstableceSoloLectura() + End Sub + + + Private Sub BiBuscarProducto_Click(sender As Object, e As RoutedEventArgs) + 'Dim dxw As New dxwProductos(lProductos) + 'If dxw.ShowDialog Then + ' If gcDetalle.CurrentItem Is Nothing Then tvDetalle.AddNewRow() + ' Dim def As detallesfacturas = gcDetalle.CurrentItem + ' Dim prod = lProductos.First(Function(x) x.idProducto = dxw.idProducto) + ' def.idProducto = prod.idProducto + ' RellenaDatosProducto(def) + ' tvDetalle.MoveNextCell() + ' gcDetalle.RefreshRow(tvDetalle.FocusedRowHandle) + 'End If + If tvDetalle.ActiveEditor Is Nothing Then + Dispatcher.BeginInvoke(New Action(Sub() tvDetalle.ShowEditor()), System.Windows.Threading.DispatcherPriority.Render) + End If + + Dim dxw As New dxwProductos(lProductos) + If dxw.ShowDialog Then + If gcDetalle.CurrentItem Is Nothing Then tvDetalle.AddNewRow() + Dim def As detallesfacturas = gcDetalle.CurrentItem + Dim prod = lProductos.First(Function(x) x.idProducto = dxw.idProducto) + def.idProducto = prod.idProducto + If tvDetalle.ActiveEditor IsNot Nothing Then tvDetalle.ActiveEditor.EditValue = prod.idProducto + tvDetalle.PostEditor() + tvDetalle.CloseEditor() + gcDetalle.RefreshRow(tvDetalle.FocusedRowHandle) + End If + End Sub + + + + + + Private Sub ap_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, OpcionGuardado As Integer) Handles Me.AntesGuardar + + ra.idUsuario = idUsuario + Dim hte As New Hashtable + If ra.detallesfacturas.Count = 0 Then + hte.Add("ALMACENAR-DETALLE_OBLIGATORIO", "Es obligatorio introducir al menos un artículo") + End If + If ra.TotalFactura = 0 Then + hte.Add("ALMACENAR-IMPORTE_0", "El total de la factura no puede ser 0") + End If + + Dim sf = bd.seriesfacturas.First(Function(x) x.idSerieFactura = ra.idSerieFactura) + ra.idSerieFacturaNavigation = sf + If DirectCast(ra.idSerieFacturaNavigation.Tipo, db.seriesfacturas.TipoSerieFacturaEnum) = seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then + If ra.NumeroFactura.Trim.NothingAVacio = "" Then + hte.Add("ALMACENAR-NUMERO_FACTURA_OBLIGATORIO", "El nº de factura es obligatorio.") + End If + End If + If bd.facturas.Any(Function(x) x.NumeroFactura = ra.NumeroFactura AndAlso x.idCliente = ra.idCliente AndAlso x.idFactura <> ra.idFactura) Then + hte.Add("ALMACENAR-YA_EXISTE_OTRA_FACTURA", "Ya existe esta factura del mismo cliente registrada") + End If + If Math.Abs(ra.ImportePagado) > Math.Abs(ra.TotalFactura) Then + hte.Add("ALMACENAR-IMPORTE_PAGADO_SUPERIOR", "El importe pagado de los recibos no puede superar al total de la factura") + End If + If DirectCast(ra.idSerieFacturaNavigation.Tipo, db.seriesfacturas.TipoSerieFacturaEnum) <> seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then + If Estado = EstadosAplicacion.Nuevo Then + Dim Año = ra.FechaFactura.Year + If bd.facturas.Any(Function(x) x.idSerieFactura = ra.idSerieFactura AndAlso x.FechaFactura > ra.FechaFactura AndAlso x.FechaFactura.Year = Año) Then + hte.Add("ALMACENAR_YA_EXISTE_OTRA_FACTURA", "Existen facturas con fecha posterior a la actual") + End If + Else + Dim serie = ra.NumeroFactura.Split("/")(0) + Dim Numero = ra.NumeroFactura.Split("/")(1) + Dim ant = serie & "/" & (Integer.Parse(Numero) - 1).ToString.PadLeft(ra.idSerieFacturaNavigation.NumeroDigitos, "0") + Dim pos = serie & "/" & (Integer.Parse(Numero) + 1).ToString.PadLeft(ra.idSerieFacturaNavigation.NumeroDigitos, "0") + Dim fa = bd.facturas.FirstOrDefault(Function(x) x.NumeroFactura = ant And x.idSerieFactura = ra.idSerieFactura) + Dim fp = bd.facturas.FirstOrDefault(Function(x) x.NumeroFactura = pos And x.idSerieFactura = ra.idSerieFactura) + If (fa IsNot Nothing AndAlso fa.FechaFactura > ra.FechaFactura) OrElse (fp IsNot Nothing AndAlso fp.FechaFactura < ra.FechaFactura) Then + hte.Add("ALMACENAR_YA_EXISTE_OTRA_FACTURA", "Las fechas de facturas deben seguir el orden de la numeración") + End If + End If + End If + If hte.Count > 0 Then + MensajesError = hte + Cancelar = True + Else + Dim dfrtf = ra.detallesfacturas.Where(Function(x) x.DetalleRTFModificado).ToList + For Each d In dfrtf + If d.idDetalle = 0 Then + If d.DetalleRTF.Length > 0 Then + Dim f As New bdGrupoSanchoToro.db.ficheros + With f + .Descripcion = "Más descripción f.r." + .Fichero = d.DetalleRTF + .Fecha = Now + End With + d.idDetalleRTFNavigation = f + End If + Else + If d.idDetalleRTF Is Nothing Then + d.idDetalleRTFNavigation = New db.ficheros + End If + With d.idDetalleRTFNavigation + .Fichero = d.DetalleRTF + .Fecha = Now + End With + End If + Next + + If ra.NumeroFactura.NothingAVacio = "" Then ra.EstableceNumeroFactura(bd) + For Each mv In ra.movimientoscaja + mv.Tipo = TipoMovimientoEnum.RECIBO_CLIENTE + If mv.idUsuario.HasValue = False Then mv.idUsuario = idUsuario + Next + For Each r In ra.movimientoscaja.ToList.Where(Function(x) x.NumeroRecibo.NothingAVacio = "") + r.idFacturaNavigation = ra + r.EstableceNumeroRecibo() + Next + For Each d In ra.documentosfacturas + If d.idUsuario.HasValue = False Then d.idUsuario = idUsuario + Next + If ra.ImportePendiente = 0 Then + ra.FechaPago = DateOnly.FromDateTime(ra.movimientoscaja.OrderByDescending(Function(x) x.Fecha).First.Fecha) + Else + ra.FechaPago = Nothing + End If + If ra.PorcentajeIVA2.HasValue = False Then + ra.BaseImponible2 = Nothing + ra.CuotaIVA2 = Nothing + End If + If ra.PorcentajeIVA2.HasValue = False Then + ra.BaseImponible3 = Nothing + ra.CuotaIVA3 = Nothing + End If + End If + End Sub + + Private Sub tvDetalle_CellValueChanged(sender As Object, e As CellValueChangedEventArgs) Handles tvDetalle.CellValueChanged + Dim def As detallesfacturas = e.Row + Select Case e.Column.FieldName.ToLower + Case "idproducto" + RellenaDatosProducto(def) + Case "idtipoiva" + Dim idTIVA = CInt(e.Value) + def.PorcentajeIVA = ivas.First(Function(x) x.idEnumeracion = idTIVA).ValorNumerico1 + End Select + 'tvDetalle.CommitEditing() + 'gcDetalle.CurrentItem = e.Row + + End Sub + Private Sub RellenaDatosProducto(dea As detallesfacturas) + Dim ae As facturas = Me.DataContext + Dim pr = lProductos.First(Function(x) x.idProducto = dea.idProducto) + dea.Precio = pr.UltimoPrecioCompra + If dea.Cantidad = 0 Then dea.Cantidad = 1 + ' dea.RefrescaImporte() + End Sub + + Private Sub BiBuscarCliente_Click(sender As Object, e As RoutedEventArgs) + If Me.ContenedorAplicacion.btGuardar.IsEnabled Then + Dim dxw As New dxwEntidades(bd, True, False) + If dxw.ShowDialog Then + Dim ent = bd.entidades.First(Function(x) x.idEntidad = dxw.Entidad.idEntidad) + ra.idClienteNavigation = ent + ra.idCliente_Nulable = ent.idEntidad + ra.RazonSocial = ent.RazonSocial + ra.CodigoPostal = ent.CodigoPostal + ra.CodigoMunicipio = ent.CodigoMunicipio + ra.Direccion = ent.Direccion + ra.Observaciones = "" + ra.NIF = ent.NIF + ' ra.RefrescaExtensiones() + End If + End If + End Sub + + + + + + + + + Private Sub ap_ImprimirPlantilla(sender As Object, e As ItemClickEventArgs, idPlantilla As Integer) Handles Me.ImprimirPlantilla + Imprimir(idPlantilla, False, 1) + End Sub + Private Sub Imprimir(idPlantilla As Integer, ImpresoraDefecto As Boolean, Copias As Integer) + + Dim ds As List(Of facturas) + Dim pl = bd.plantillas.AsNoTracking.Where(Function(x) x.idPlantilla = idPlantilla).Select(Function(x) New With {.Fichero = x.idFicheroNavigation.Fichero, .Tipo = x.idGrupoNavigation.Codigo}).FirstOrDefault + ds = New List(Of facturas) + ds.Add(ra) + Informes.ImprimirPlantilla(bd, pl.Fichero, ds, ImpresoraDefecto, Copias) + + End Sub + + + 'Private Sub ap_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion + + + 'End Sub + + + Private Sub tvDetalle_RowUpdated(sender As Object, e As DevExpress.Xpf.Grid.RowEventArgs) Handles tvDetalle.RowUpdated + If e.RowHandle = GridControl.NewItemRowHandle Then + Dispatcher.BeginInvoke(New Action(Function() + e.Source.Grid.CurrentItem = e.Row + e.Source.ShowEditor() + End Function), DispatcherPriority.Render) + End If + Call CalculaTotales() + End Sub + Sub CalculaTotales() + + Dim ivas(2) As Double? + For Each df In ra.detallesfacturas + For i = 0 To 3 + If i = 3 Then Throw New Exception("Demasiados tipos de iva en la misma factura.") + If ivas(i).HasValue = False OrElse ivas(i).Value = df.PorcentajeIVA Then + ivas(i) = df.PorcentajeIVA + Exit For + End If + Next + Next + ra.PorcentajeIVA1 = ivas(0) + ra.PorcentajeIVA2 = ivas(1) + ra.PorcentajeIVA3 = ivas(2) + ra.BaseImponibleExenta = ra.detallesfacturas.Where(Function(x) x.PorcentajeIVA.HasValue = False).Sum(Function(x) x.Importe) + ra.BaseImponible1 = Nothing + ra.BaseImponible2 = Nothing + ra.BaseImponible3 = Nothing + If ivas(0).HasValue Then ra.BaseImponible1 = ra.detallesfacturas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(0)).Sum(Function(x) x.Importe) + If ivas(1).HasValue Then ra.BaseImponible2 = ra.detallesfacturas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(1)).Sum(Function(x) x.Importe) + If ivas(2).HasValue Then ra.BaseImponible3 = ra.detallesfacturas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(2)).Sum(Function(x) x.Importe) + ra.TotalBaseImponible = Math.Round(ra.detallesfacturas.Sum(Function(x) x.Importe), 2) + CalculaCuotasIVA(ra) + CalculaIRPF(ra) + CalculaTotalesFinales(ra) + End Sub + Public Sub CalculaIRPF(F As facturas) + If F.idSerieFacturaNavigation Is Nothing Then + DXMessageBox.Show("Primero debe definir la serie de la factura", "Atención") + Else + If F.idSerieFacturaNavigation.IRPFDespuesDeIVA Then + F.IRPF = Math.Round((F.TotalBaseImponible + F.TotalIVA) * F.PorcentajeIRPF / 100, 2, MidpointRounding.AwayFromZero) + Else + F.IRPF = Math.Round(F.TotalBaseImponible * F.PorcentajeIRPF / 100, 2, MidpointRounding.AwayFromZero) + End If + End If + End Sub + Public Sub CalculaCuotasIVA(F As facturas) + F.CuotaIVA1 = Nothing + F.CuotaIVA2 = Nothing + F.CuotaIVA3 = Nothing + If F.PorcentajeIVA1.HasValue Then + F.CuotaIVA1 = Math.Round(F.BaseImponible1.Value * F.PorcentajeIVA1.Value / 100, 2, MidpointRounding.AwayFromZero) + End If + If F.PorcentajeIVA2.HasValue Then + F.CuotaIVA2 = Math.Round(F.BaseImponible2.Value * F.PorcentajeIVA2.Value / 100, 2, MidpointRounding.AwayFromZero) + End If + If F.PorcentajeIVA3.HasValue Then + F.CuotaIVA3 = Math.Round(F.BaseImponible3.Value * F.PorcentajeIVA3.Value / 100, 2, MidpointRounding.AwayFromZero) + End If + End Sub + Public Sub CalculaTotalesFinales(ra As facturas) + ra.TotalIVA = Math.Round(If(ra.CuotaIVA1.HasValue, ra.CuotaIVA1.Value, 0) + If(ra.CuotaIVA2.HasValue, ra.CuotaIVA2.Value, 0) + If(ra.CuotaIVA3.HasValue, ra.CuotaIVA3.Value, 0), 2, MidpointRounding.AwayFromZero) + ra.TotalFactura = Math.Round(ra.TotalBaseImponible + ra.TotalIVA - ra.IRPF, 2, MidpointRounding.AwayFromZero) + ra.ImportePagado = Math.Round(ra.movimientoscaja.Sum(Function(x) x.Importe), 2, MidpointRounding.AwayFromZero) + ' ra.RefrescaExtensiones() + End Sub + Private Sub tvDetalle_ValidaFila(sender As Object, e As DevExpress.Xpf.Grid.GridRowValidationEventArgs) Handles tvDetalle.ValidateRow + 'Dim df As detallesfacturas = e.Row + 'Dim htErrores = New Hashtable + 'If df.Cantidad = 0 Then + ' DXMessageBox.Show("La Cantidad no puede ser 0", "Error") + ' e.SetError("La Cantidad no puede ser 0") + ' e.IsValid = False + 'End If + Try + Dim htErrores = New Hashtable + ErroresValidacion.LimpiarErrores("TSGC-" & gcDetalle.PropiedadesTS.NumeroObjeto.ToString & ":" & e.RowHandle.ToString & ":") + Dim df As detallesfacturas = e.Row + + If df.Cantidad = 0 Then + htErrores.Add("Cantidad0", "La Cantidad no puede ser 0") + End If + + If htErrores.Count > 0 Then + Me.AgregaErroresTSGC(gcDetalle, htErrores, e) + End If + Catch ex As Exception + FuncionesDinamicas.ErrorNoControladoAp(Me, ex) + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub + + Private Sub gcDetalle_DespuesEliminar(gc As tsGridControl) Handles gcDetalle.DespuesEliminar + CalculaTotales() + End Sub + + Private Sub tvRecibos_ValidaFila(sender As Object, e As GridRowValidationEventArgs) Handles tvRecibos.ValidateRow + 'Dim mv As movimientoscaja = e.Row + 'If mv.Importe = 0 Then + ' DXMessageBox.Show("El Importe no puede ser 0", "Error") + ' e.SetError("El Importe no puede ser 0") + ' e.IsValid = False + 'End If + Try + Dim htErrores = New Hashtable + ErroresValidacion.LimpiarErrores("TSGC-" & gcRecibos.PropiedadesTS.NumeroObjeto.ToString & ":" & e.RowHandle.ToString & ":") + Dim mv As movimientoscaja = e.Row + + If mv.Importe = 0 Then + htErrores.Add("Importe0", "El Importe no puede ser 0") + End If + If htErrores.Count > 0 Then + Me.AgregaErroresTSGC(gcRecibos, htErrores, e) + End If + Catch ex As Exception + FuncionesDinamicas.ErrorNoControladoAp(Me, ex) + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub + + Private Sub gcRecibos_DespuesEliminar(gc As tsGridControl) Handles gcRecibos.DespuesEliminar + CalculaTotales() + End Sub + + Private Sub tvRecibos_RowUpdated(sender As Object, e As RowEventArgs) Handles tvRecibos.RowUpdated + + CalculaTotalesFinales(ra) + End Sub + + Private Sub tvRecibos_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvRecibos.InitNewRow + gcRecibos.SetCellValue(e.RowHandle, "Fecha", Now) + gcRecibos.SetCellValue(e.RowHandle, "FechaCreacion", Now) + End Sub + + Private Sub ucFacturaEmitida_CampoActualizado(sender As Object, e As DataTransferEventArgs) Handles Me.CampoActualizado + Dim pts As PropiedadesTS = sender.parent.propiedadests + If Not pts Is Nothing Then + Select Case pts.NombreCampo.ToLower + Case "porcentajeirpf" + CalculaIRPF(ra) + CalculaTotalesFinales(ra) + Case "cuotaiva1", "cuotaiva2", "cuotaiva3", "irpf" + CalculaTotalesFinales(ra) + Case "idcliente_nulable" + ra.idClienteNavigation = bd.entidades.First(Function(x) x.idEntidad = ra.idCliente) + Case "idseriefactura_nulable" + If ra.idSerieFactura_Nulable.HasValue Then + Dim sf = bd.seriesfacturas.First(Function(x) x.idSerieFactura = ra.idSerieFactura_Nulable) + ra.idSerieFacturaNavigation = sf + End If + End Select + End If + End Sub + + Private Sub tvDetalle_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvDetalle.InitNewRow + gcDetalle.SetCellValue(e.RowHandle, "idTipoIVA", ivas.OrderByDescending(Function(x) x.ValorNumerico2).First.idEnumeracion) + Dispatcher.BeginInvoke(New Action(Function() + Dim view = TryCast(sender, TableView) + view.CommitEditing() + End Function)) + End Sub + + Private Sub tvDetalle_PreviewKeyDown(sender As Object, e As Input.KeyEventArgs) Handles tvDetalle.PreviewKeyDown + If e.Key = Key.F6 Then + Select Case gcDetalle.CurrentColumn.FieldName.ToLower + Case "idproducto" + tvDetalle.ShowEditor() + BiBuscarProducto_Click(Nothing, Nothing) + End Select + End If + End Sub + + Private Sub cbRazonSocial_PreviewKeyDown(sender As Object, e As Input.KeyEventArgs) Handles cbRazonSocial.PreviewKeyDown + If e.Key = Key.F6 Then + BiBuscarCliente_Click(Nothing, Nothing) + End If + End Sub + + Private Sub gcRecibos_AntesEliminar(gc As tsGridControl, ByRef Cancelar As Boolean) Handles gcRecibos.AntesEliminar + Dim da As movimientoscaja = gc.CurrentItem + If da.idMovimientoCierre.HasValue Then + DXMessageBox.Show("No se puede eliminar un pago ya que está cerrado") + Cancelar = True + End If + End Sub + + Private Sub tvRecibos_ShowingEditor(sender As Object, e As ShowingEditorEventArgs) Handles tvRecibos.ShowingEditor + 'If e.RowHandle <> DataControlBase.NewItemRowHandle Then + ' Dim rec As movimientoscaja = gcRecibos.GetRow(e.RowHandle) + ' If e.Column.FieldName.ToLower = "importe" OrElse e.Column.FieldName.ToLower = "idcaja" OrElse e.Column.FieldName.ToLower = "fecha" Then + ' If rec.idMovimientoCierre.HasValue OrElse rec.FechaSupervision.HasValue Then + ' e.Cancel = True + ' e.Handled = True + ' End If + ' End If + 'End If + End Sub + + Private Cargando As Boolean + Private Sub gcDetalle_SelectedItemChanged(sender As Object, e As SelectedItemChangedEventArgs) Handles gcDetalle.SelectedItemChanged + Try + + Dim df As detallesfacturas = gcDetalle.CurrentItem + If df IsNot Nothing Then + recEditor.LoadDocument(df.DetalleRTF) + recEditor.IsEnabled = True + Else + recEditor.CreateNewDocument() + recEditor.IsEnabled = False + End If + Catch ex As Exception + Debug.WriteLine(ex.Message) + 'Throw New Exception(ex.Message, ex) + End Try + End Sub + + Private Sub recEditor_ContentChanged(sender As Object, e As EventArgs) Handles recEditor.ContentChanged + Try + If Cargando Then + Cargando = False + Else + Dim df As detallesfacturas = gcDetalle.CurrentItem + If df IsNot Nothing AndAlso tvDetalle.FocusedRowHandle >= 0 Then + Dim doc = recEditor.Document + If doc.GetText(doc.Range).Trim = "" Then + df.DetalleRTF = Nothing + Else + df.DetalleRTF = recEditor.SaveDocument(DevExpress.XtraRichEdit.DocumentFormat.Rtf) + End If + df.DetalleRTFModificado = True + End If + End If + Catch ex As Exception + Debug.WriteLine(ex.Message) + End Try + End Sub + + Private Sub recEditor_DocumentLoaded(sender As Object, e As EventArgs) Handles recEditor.DocumentLoaded + Cargando = True + End Sub + + Private Sub tvDocumentos_ValidateRow(sender As Object, e As GridRowValidationEventArgs) Handles tvDocumentos.ValidateRow + Dim ges As documentosfacturas = gcDocumentos.CurrentItem + If ges.idUsuario.HasValue = False Then + ges.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario + End If + End Sub + Private Sub VerDocumento(sender As System.Object, e As System.Windows.RoutedEventArgs) + Try + Dim exp As documentosfacturas = gcDocumentos.CurrentItem + If exp IsNot Nothing AndAlso exp.idFicheroNavigation IsNot Nothing AndAlso exp.idFicheroNavigation.NombreFichero IsNot Nothing AndAlso exp.idFicheroNavigation.Fichero IsNot Nothing Then + Dim sftmp As String = tsUtilidades.Utilidades.ObtieneDirectorioAleatorio("GrupoSanchoToro") & "\" & exp.idFicheroNavigation.NombreFichero + tsUtilidades.Utilidades.ByteArrayAFichero(exp.idFicheroNavigation.Fichero, sftmp, True) + tsUtilidades.Sistema.EjecutaFichero(sftmp) + End If + Catch ex As Exception + End Try + End Sub + Private Sub Examinar(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btFichero.DefaultButtonClick + Try + If gcDocumentos.CurrentItem Is Nothing Then tvDocumentos.AddNewRow() + Dim exp As documentosfacturas = gcDocumentos.CurrentItem + Dim ofd As New OpenFileDialog + If ofd.ShowDialog() Then + Dim fin As New FileInfo(ofd.FileName) + If fin.Length > 1024 * 1024 * 50 Then + DXMessageBox.Show("El fichero no puede ser mayor de 50 Mb", "Atención") + Else + Dim f() As Byte = IO.File.ReadAllBytes(ofd.FileName) + Dim idTipoDocumentoExp = bd.enumeraciones.First(Function(x) x.Codigo = "TIPFIC.EXPENT").idEnumeracion + If exp.idFicheroNavigation Is Nothing Then + Dim fi As New db.ficheros + exp.idFicheroNavigation = fi + End If + exp.idFicheroNavigation.NombreFichero = IO.Path.GetFileName(ofd.FileName) + exp.idFicheroNavigation.Fichero = f + exp.idFicheroNavigation.Fecha = Now + exp.idFicheroNavigation.Descripcion = exp.Descripcion.Acortar(80) + exp.idFicheroNavigation.idTipo = idTipoDocumentoExp + exp.Fecha = Now + Dim usu = bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario) + exp.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario + exp.idUsuarioNavigation = usu + tvDocumentos.MoveNextCell() + gcDocumentos.RefreshRow(tvDocumentos.FocusedRowHandle) + End If + End If + Catch ex As Exception + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub + + Private Sub tvDocumentos_PreviewKeyDown(sender As Object, e As KeyEventArgs) + If e.Key = Key.F6 AndAlso gcDocumentos.CurrentColumn.FieldName.ToLower = "ficheros.nombrefichero" Then + Examinar(Nothing, Nothing) + End If + End Sub + + Private Sub tvDocumentos_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvDocumentos.InitNewRow + gcDocumentos.SetCellValue(e.RowHandle, "Fecha", Now) + End Sub + + Private Sub ucFacturaEmitida_AntesEliminar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, ByRef OmitirPreguntaContinuar As Boolean) Handles Me.AntesEliminar + If ra.idSerieFacturaNavigation.Tipo <> seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then + DXMessageBox.Show("Las facturas que no son emitidas por los clientes no se pueden eliminar", "Atención") + Cancelar = True + End If + End Sub +End Class + diff --git a/GestionGrupoSanchoToro/Ventas/ucFacturasEmitidas.xaml b/GestionGrupoSanchoToro/Ventas/ucFacturasEmitidas.xaml new file mode 100644 index 0000000..63ed9c0 --- /dev/null +++ b/GestionGrupoSanchoToro/Ventas/ucFacturasEmitidas.xaml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GestionGrupoSanchoToro/ucProcesos.xaml.vb b/GestionGrupoSanchoToro/ucProcesos.xaml.vb new file mode 100644 index 0000000..3b6f5b0 --- /dev/null +++ b/GestionGrupoSanchoToro/ucProcesos.xaml.vb @@ -0,0 +1,179 @@ +Imports tsWPFCore +Imports bdGrupoSanchoToro.db +Imports System.CodeDom.Compiler +Imports DevExpress.Xpf.Core +Imports System.Reflection +Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro +Imports bdGrupoSanchoToro.db.Utilidades + + +Public Class ucProcesos + + + Private bd As tscGrupoSanchoToro + + + + Public Overrides Sub Cargado() + + End Sub + + + Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion + gcProcesos.ItemsSource = bd.procesos.ToList + Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice + + End Function + + Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False) + + End Sub + + Public Overrides Sub EstableceTitulo() + Me.docpanel.Caption = "Procesos" + + End Sub + + Public Overrides ReadOnly Property idRegistroAplicacionActual As String + Get + Return "Procesos" + End Get + End Property + + Public Overrides ReadOnly Property NombreTablaBase As String + Get + Return "procesos" + End Get + End Property + + Public Overrides ReadOnly Property DescripcionRegistro As String + Get + Return "Procesos" + End Get + End Property + + Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto + bd = tscGrupoSanchoToro.NuevoContexto() + Return bd + End Function + + + + Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos + Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario) + End Function + + Private Sub btEjecutar_Click(sender As Object, e As RoutedEventArgs) + + Try + Dim dwi As dxwInicio = CType(Window.GetWindow(Me), dxwInicio) + Dim pr As bdGrupoSanchoToro.db.procesos = CType(Me.gcProcesos.CurrentItem, procesos) + + If pr.Accion <> "" Then + + Dim stipo As String = tsUtilidades.Utilidades.Ttagi(pr.Accion, "CLASE") + Dim tipo As Type + If stipo <> "" Then + Dim sEnsamblado As String = tsUtilidades.Utilidades.Ttagi(pr.Accion, "ENS") + If sEnsamblado <> "" Then + Dim dm As AppDomain = AppDomain.CurrentDomain + Dim b() As Byte = IO.File.ReadAllBytes(sEnsamblado) + tipo = dm.Load(b).GetType(stipo, False, True) + Try + tipo.GetMethod(tsUtilidades.Utilidades.Ttagi(pr.Accion, "SUB")).Invoke(Nothing, Nothing) + tipo = Nothing + Catch ex As Exception + + End Try + Else + tipo = tsUtilidades.Utilidades.FindType(stipo) + End If + Dim sSub As String = tsUtilidades.Utilidades.Ttagi(pr.Accion, "SUB") + Dim sPar As String = tsUtilidades.Utilidades.Ttagi(pr.Accion, "PAR") + + If tipo.GetMethod(sSub).GetParameters.Count = 0 Then + tipo.GetMethod(sSub).Invoke(Nothing, Nothing) + Else + If sPar = "" Then + ' tipo.GetMethod(sSub).Invoke(Nothing, {dwi, Comun.dcfg, Comun.dcn, bdGrupoSanchoToro.db.Utilidades.dsc, pr.Accion}) + tipo.GetMethod(sSub).Invoke(Nothing, {dwi, pr.Accion}) + Else + 'tipo.GetMethod(sSub).Invoke(Nothing, {sPar, dwi, Comun.dcfg, Comun.dcn, bdGrupoSanchoToro.db.Utilidades.dsc, pr.Accion}) + tipo.GetMethod(sSub).Invoke(Nothing, {sPar, dwi, pr.Accion}) + End If + End If + End If + Else + + + Dim oCProvider As New VBCodeProvider + Dim oCompiler As CodeDomProvider = oCProvider + Dim oCParam As New CompilerParameters + oCParam.GenerateInMemory = True + ' oCParam.CompilerOptions = [String].Format("/lib:""{0}""", IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "Reference Assemblies\Microsoft\Framework\v4.0")) + [String].Format(" /lib:""{0}""", IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "Reference Assemblies\Microsoft\Framework\v4.5")) + + + ' Dim a As Assembly = Assembly.GetExecutingAssembly + + 'For Each ra In a.GetReferencedAssemblies + ' oCParam.ReferencedAssemblies.Add(ra.Name) + 'Next + oCParam.ReferencedAssemblies.AddRange(AppDomain.CurrentDomain.GetAssemblies.Where(Function(x) x.IsDynamic = False).Select(Function(x) x.Location).ToArray) + + + + 'oCParam.ReferencedAssemblies.Add("System.dll") + 'oCParam.ReferencedAssemblies.Add("System.Data.dll") + 'oCParam.ReferencedAssemblies.Add("Microsoft.VisualBasic.dll") + 'oCParam.ReferencedAssemblies.Add("PresentationFramework.dll") + 'oCParam.ReferencedAssemblies.Add("GestionParlamento.exe") + + 'Creamos un objeto CompilerResult que obtendrá los resultados de la compilación + Dim oCResult As CompilerResults + + Dim sRutina As String = System.Text.Encoding.UTF8.GetString(pr.idFicheroNavigation.Fichero) + oCResult = oCompiler.CompileAssemblyFromSource(oCParam, sRutina) + + 'Comprobamos que no existan errores de compilación. + Dim oCError As CompilerError + Dim sErrores As String = "" + If oCResult.Errors.Count > 0 Then + 'Si existen errores los mostramos. + 'Si bien, podriamos implementar un mejor método para visualizar + 'los errores de compilación, este nos servirá por los momentos. + For Each oCError In oCResult.Errors + sErrores &= oCError.ErrorText.ToString & " --- " + 'MsgBox(oCError.ErrorText.ToString) + Next + Throw New Exception(sErrores) + Else + 'Como el ensamblado se generó en memoria, debemos obtener + 'una referencia al ensamblado generado, para esto usamos + 'la propiedad CompiledAssembly + Dim oEnsamblado As System.Reflection.Assembly + oEnsamblado = oCResult.CompiledAssembly + Dim oClass As Type = oEnsamblado.GetType("RutinasTecnosis") + oClass.GetMethod("Ejecutar").Invoke(Nothing, Nothing) + End If + + End If + Catch ex As Exception + DXMessageBox.Show(ex.Message, "Error") + End Try + End Sub + + Private Sub Nuevo(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs) + FuncionesDinamicas.AbrirAP(New ucProceso, OtrosParametros) + End Sub + + Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar + Dim P = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRADOR", idUsuario) + If P.Consultar Then + Dim id As Integer = DirectCast(Me.gcProcesos.CurrentItem, procesos).idProceso + FuncionesDinamicas.AbrirAP(New ucProceso(id), OtrosParametros) + Else + btEjecutar_Click(Nothing, Nothing) + End If + End Sub + +End Class diff --git a/GestionGrupoSanchoToro/ucSerieFactura.xaml b/GestionGrupoSanchoToro/ucSerieFactura.xaml new file mode 100644 index 0000000..6c2f765 --- /dev/null +++ b/GestionGrupoSanchoToro/ucSerieFactura.xaml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GestionGrupoSanchoToro/ucSerieFactura.xaml.vb b/GestionGrupoSanchoToro/ucSerieFactura.xaml.vb new file mode 100644 index 0000000..da41a28 --- /dev/null +++ b/GestionGrupoSanchoToro/ucSerieFactura.xaml.vb @@ -0,0 +1,132 @@ +Imports tsWPFCore +Imports bdGrupoSanchoToro.db +Imports System.Collections + +Imports bdGrupoSanchoToro.db.Utilidades +Imports DevExpress.Xpf.Bars + +Public Class ucSerieFactura + + + Private bd As tscGrupoSanchoToro + + Dim _idSerie As Integer? + + + + Public Overrides Sub Cargado() + Me.Tipo_ucControlBusqueda = GetType(ucSeriesFacturas) + + End Sub + + Dim ra As seriesfacturas + Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion + Dim NuevoEstado As tsUtilidades.EstadosAplicacion + + If FuerzaNuevo OrElse _idSerie Is Nothing Then + ra = New seriesfacturas + ra.idEmpresa = EmpresaActual.idEmpresa + Me.DataContext = ra + _idSerie = Nothing + NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo + Else + ra = bd.seriesfacturas.First(Function(x) x.idSerieFactura = _idSerie.Value) + NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro + End If + Me.DataContext = ra + Return NuevoEstado + End Function + + Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False) + cbTipo.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.seriesfacturas.TipoSerieFacturaEnum)).OrderBy(Function(x) x.Descripcion) + End Sub + + Public Overrides Sub EstableceTitulo() + If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then + Me.docpanel.Caption = "Serie " & ra.Serie + Me.docpanel.Tag = "Serie." & ra.Serie.ToString + Else + Me.docpanel.Caption = "Serie nueva" + Me.docpanel.Tag = "Serie.Nuevo" + End If + End Sub + + Public Overrides ReadOnly Property idRegistroAplicacionActual As String + Get + If Estado = tsUtilidades.EstadosAplicacion.Nuevo Then + Return "Serie.Nuevo" + Else + Return "Serie." & ra.Serie.ToString + End If + End Get + End Property + + Public Overrides ReadOnly Property NombreTablaBase As String + Get + Return "seriesfacturas" + End Get + End Property + + Public Overrides ReadOnly Property DescripcionRegistro As String + Get + Return "Serie" + End Get + End Property + + Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto + bd = tscGrupoSanchoToro.NuevoContexto() + Return bd + End Function + + + + Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos + Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario) + End Function + + + + + + Public Sub New(Optional idSerie As Integer? = Nothing) + + ' Llamada necesaria para el diseñador. + InitializeComponent() + _idSerie = idSerie + + ' Agregue cualquier inicialización después de la llamada a InitializeComponent(). + + End Sub + + Private Sub ucSerie_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, EliminacionManual As Integer) Handles Me.AntesGuardar + Dim hte As New Hashtable + If Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then + If bd.seriesfacturas.Any(Function(x) x.idSerieFactura <> ra.idSerieFactura AndAlso x.idEmpresa = EmpresaActual.idEmpresa AndAlso x.Serie = ra.Serie) Then + hte.Add("ALMACENAR-SERIE_YA_EXISTENTE", "Ya existe esa serie de factura.") + End If + If ra.NumeroDigitos > 18 Or ra.NumeroDigitos < 4 Then + hte.Add("ALMACENAR-NUMERO_DIGITOS_INVÁLIDOS", "Los nº de dígitos deben estar entre 4 y 18") + End If + End If + If hte.Count > 0 Then + MensajesError = hte + Cancelar = True + End If + End Sub + + Private Sub ucSerie_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar + Dim fi As seriesfacturas = Me.DataContext + _idSerie = fi.idSerieFactura + End Sub + + Private Sub ucSerieFactura_AntesEliminar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, ByRef OmitirPreguntaContinuar As Boolean) Handles Me.AntesEliminar + Dim hte As New Hashtable + If bd.facturas.Any(Function(x) x.idSerieFactura = ra.idSerieFactura) Then + hte.Add("ALMACENAR-SERIE_CON_FACTURAS", "No se puede eliminar una serie si ya tiene facturas.") + End If + If hte.Count > 0 Then + MensajesError = hte + Cancelar = True + End If + End Sub +End Class diff --git a/GestionGrupoSanchoToro/ucSeriesFacturas.xaml b/GestionGrupoSanchoToro/ucSeriesFacturas.xaml new file mode 100644 index 0000000..f50fce1 --- /dev/null +++ b/GestionGrupoSanchoToro/ucSeriesFacturas.xaml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GestionGrupoSanchoToro/ucSeriesFacturas.xaml.vb b/GestionGrupoSanchoToro/ucSeriesFacturas.xaml.vb new file mode 100644 index 0000000..099b16d --- /dev/null +++ b/GestionGrupoSanchoToro/ucSeriesFacturas.xaml.vb @@ -0,0 +1,69 @@ +Imports bdGrupoSanchoToro.db.Utilidades +Imports DevExpress.Xpf.Grid +Public Class ucSeriesFacturas + Private bd As tscGrupoSanchoToro + Public Overrides Sub Cargado() + + End Sub + Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion + If cbIncluirBajas.IsChecked Then + gcSeries.ItemsSource = bd.seriesfacturas.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa).OrderBy(Function(x) x.idSerieFactura).ToList + Else + gcSeries.ItemsSource = bd.seriesfacturas.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso x.FechaBaja Is Nothing).OrderBy(Function(x) x.idSerieFactura).ToList + End If + + Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice + End Function + + Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False) + + End Sub + + Public Overrides Sub EstableceTitulo() + Me.docpanel.Caption = "Series de Facturas" + + End Sub + + Public Overrides ReadOnly Property idRegistroAplicacionActual As String + Get + Return "SeriesFacturas" + End Get + End Property + + Public Overrides ReadOnly Property NombreTablaBase As String + Get + Return "seriesfacturas" + End Get + End Property + + Public Overrides ReadOnly Property DescripcionRegistro As String + Get + Return "Serie de Factura" + End Get + End Property + + Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto + bd = tscGrupoSanchoToro.NuevoContexto() + Return bd + End Function + + + + Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos + Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario) + End Function + + Private Sub cbIncluirBajas_EditValueChanged(sender As Object, e As DevExpress.Xpf.Editors.EditValueChangedEventArgs) + EstablecedcPrincipal() + End Sub + + Private Sub ucSeriesFacturas_BotonNuevoPulsado() Handles Me.BotonNuevoPulsado + FuncionesDinamicas.AbrirAP(New ucSerieFactura(), Me.OtrosParametros) + + End Sub + + Private Sub ucSeriesFacturas_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar + Dim sf As db.seriesfacturas = gcSeries.CurrentItem + FuncionesDinamicas.AbrirAP(New ucSerieFactura(sf.idSerieFactura), Me.OtrosParametros) + End Sub +End Class diff --git a/GestionGrupoSanchoToro/ucTraspasoCaja.xaml b/GestionGrupoSanchoToro/ucTraspasoCaja.xaml new file mode 100644 index 0000000..d4c706c --- /dev/null +++ b/GestionGrupoSanchoToro/ucTraspasoCaja.xaml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +