cambios 17/02/2026
This commit is contained in:
58
GestionGrupoSanchoToro/Almacen/dxwRecogidaProductos.xaml
Normal file
58
GestionGrupoSanchoToro/Almacen/dxwRecogidaProductos.xaml
Normal file
@@ -0,0 +1,58 @@
|
||||
<dx:DXWindow x:Class="dxwRecogidaProductos"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" ShowInTaskbar="True"
|
||||
ShowIcon="False" Title="Seleccione y Pulse Aceptar" WindowStyle="ToolWindow" WindowState="Maximized" Topmost="True" WindowStartupLocation="CenterScreen" Width="1380" Height="700">
|
||||
<dx:DXWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</dx:DXWindow.Resources>
|
||||
<Grid x:Name="grid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="45" />
|
||||
</Grid.RowDefinitions>
|
||||
<tsWPF:tsGridControl x:Name="gc" SeleccionMultiple="True" >
|
||||
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tv" ShowCheckBoxSelectorColumn="True" ShowSearchPanelMode="Always" AllowEditing="False" ShowGroupPanel="False" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsGridColumn FieldName="Producto" Header="Producto" Width="400" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="idArticuloNavigation.CodigoArticulo" Header="Artículo" Width="70" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Cantidad" Header="Uds. Entregadas" IsSmart="True" Width="100" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="idAlbaranNavigation.NumeroAlbaran" Header="Nº Alb. Entrega" IsSmart="True" Width="110" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="idAlbaranNavigation.Fecha" Header="Fecha Entrega" IsSmart="True" Width="140" SoloLectura="True" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy HH:mm"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Observaciones" IsSmart="True" Width="250" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="idAlbaranNavigation.Obra" Header="Obra" Width="300" SoloLectura="True" />
|
||||
</tsWPF:tsGridControl>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="1" x:Name="btAceptar" Grid.Row="1" Width="100" IsDefault="True" Click="btAceptar_Click" TabIndex="0">Aceptar</Button>
|
||||
<Button Grid.Column="3" x:Name="btCancelar" Grid.Row="1" Width="100" IsCancel="True" Click="btCancelar_Click" TabIndex="1">Cancelar</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
85
GestionGrupoSanchoToro/Almacen/dxwRecogidaProductos.xaml.vb
Normal file
85
GestionGrupoSanchoToro/Almacen/dxwRecogidaProductos.xaml.vb
Normal file
@@ -0,0 +1,85 @@
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
|
||||
|
||||
Public Class dxwRecogidaProductos
|
||||
Private _LDetalleActual As Integer()
|
||||
Public LSeleccionados As List(Of detallesalbaranes)
|
||||
Private _idEntidad As Integer
|
||||
Private _bd As tscGrupoSanchoToro
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
LSeleccionados = gc.ElementosSeleccionados.Cast(Of detallesalbaranes).ToList
|
||||
Me.DialogResult = True
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Me.DialogResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub dxwRecogidaProductos_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Try
|
||||
Dim ld = _bd.detallesalbaranes.Include(Function(x) x.idAlbaranNavigation).Include(Function(x) x.idAlbaranRecogidaNavigation).Include(Function(x) x.idProductoNavigation) _
|
||||
.Where(Function(x) x.idAlbaranNavigation.idEntidad.HasValue AndAlso x.idAlbaranNavigation.idEntidad.Value = _idEntidad AndAlso x.FechaCancelacion.HasValue = False AndAlso x.EsVenta = False AndAlso (x.idAlbaranRecogida.HasValue = False OrElse _LDetalleActual.Contains(x.idDetalle))).ToList()
|
||||
Me.gc.ItemsSource = ld
|
||||
|
||||
'For i = 0 To ld.Count
|
||||
Dim i As Integer
|
||||
For Each d In ld
|
||||
If _LDetalleActual.Any(Function(x) x = d.idDetalle) Then
|
||||
Dim rowHandle As Integer = gc.GetRowHandleByListIndex(i)
|
||||
gc.SelectItem(rowHandle)
|
||||
End If
|
||||
i += 1
|
||||
Next
|
||||
|
||||
|
||||
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 m3alquileresEntities, Existentes As List(Of Integer?))
|
||||
Public Sub New(bd As tscGrupoSanchoToro, ListaDetalleActuales As Integer(), idCliente As Integer)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
Comun.EscalaVentana(Me, Me.grid.LayoutTransform)
|
||||
|
||||
'Me.Height = Math.Min(Comun.dwi.Height, Me.Height * UsuarioActual.Escala.Value)
|
||||
'Me.Width = Math.Min(Comun.dwi.Width, Me.Width * UsuarioActual.Escala.Value)
|
||||
'Dim scaler = TryCast(Me.grid.LayoutTransform, ScaleTransform)
|
||||
'If scaler Is Nothing Then
|
||||
' scaler = New ScaleTransform(1.0, 1.0)
|
||||
' Me.grid.LayoutTransform = scaler
|
||||
'End If
|
||||
'scaler.ScaleX = UsuarioActual.Escala.Value
|
||||
'scaler.ScaleY = UsuarioActual.Escala.Value
|
||||
'scaler.BeginAnimation(ScaleTransform.ScaleXProperty, Nothing)
|
||||
'scaler.BeginAnimation(ScaleTransform.ScaleYProperty, Nothing)
|
||||
|
||||
_LDetalleActual = ListaDetalleActuales
|
||||
_idEntidad = idCliente
|
||||
_bd = bd
|
||||
|
||||
' 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
|
||||
47
GestionGrupoSanchoToro/Almacen/dxwTipoAlbaran.xaml
Normal file
47
GestionGrupoSanchoToro/Almacen/dxwTipoAlbaran.xaml
Normal file
@@ -0,0 +1,47 @@
|
||||
<dx:DXWindow x:Class="dxwTipoAlbaran"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" ShowInTaskbar="True"
|
||||
ShowIcon="False" Title="Seleccione y Pulse Aceptar" WindowStyle="ToolWindow" WindowState="Normal" Topmost="True" WindowStartupLocation="CenterScreen" Width="400" Height="200">
|
||||
<dx:DXWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</dx:DXWindow.Resources>
|
||||
<Grid x:Name="grid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="45" />
|
||||
</Grid.RowDefinitions>
|
||||
<tsWPF:tsGridControl x:Name="gc" TabIndex="1" >
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tv" ShowSearchPanelMode="Never" AllowEditing="False" ShowGroupPanel="False" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="Descripcion" Header="Tipo Albarán" IsSmart="True" Width="350" />
|
||||
</tsWPF:tsGridControl>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="1" x:Name="btAceptar" Grid.Row="1" Width="100" IsDefault="True" Click="btAceptar_Click" TabIndex="2">Aceptar</Button>
|
||||
<Button Grid.Column="3" x:Name="btCancelar" Grid.Row="1" Width="100" IsCancel="True" Click="btCancelar_Click" TabIndex="3">Cancelar</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
59
GestionGrupoSanchoToro/Almacen/dxwTipoAlbaran.xaml.vb
Normal file
59
GestionGrupoSanchoToro/Almacen/dxwTipoAlbaran.xaml.vb
Normal file
@@ -0,0 +1,59 @@
|
||||
Imports System.Data.Entity
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
|
||||
Public Class dxwTipoAlbaran
|
||||
Friend Tipo As albaranes.TipoAlbaranEnum
|
||||
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
If gc.CurrentItem IsNot Nothing Then
|
||||
Tipo = DirectCast(gc.CurrentItem, albaranes.TipoAlbaranEnum)
|
||||
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
|
||||
gc.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum))
|
||||
Me.gc.View.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()
|
||||
|
||||
|
||||
' 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 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
|
||||
@@ -120,6 +120,8 @@ Public Class ucAlbaran
|
||||
_idAlbaran = Nothing
|
||||
ra.Fecha = DateOnly.FromDateTime(Today)
|
||||
ra.NumeroBultos = 1
|
||||
ra.idEmpresa = EmpresaActual.idEmpresa
|
||||
ra.Tipo = _Tipo
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
Else
|
||||
ra = bd.albaranes.First(Function(x) x.idAlbaran = _idAlbaran)
|
||||
@@ -182,8 +184,8 @@ Public Class ucAlbaran
|
||||
' Return "idAlbaranEntrega"
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public Sub New(Optional idAlbaran As Integer? = Nothing)
|
||||
Private _Tipo As TipoAlbaranEnum
|
||||
Public Sub New(Tipo As albaranes.TipoAlbaranEnum, Optional idAlbaran As Integer? = Nothing)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
@@ -584,7 +586,7 @@ Public Class ucAlbaran
|
||||
' bCancelar = Me.Guardar(Nothing, Nothing,, True, 5)
|
||||
' End If
|
||||
' If Not bCancelar Then
|
||||
' Dim dxnc = New dxwEnvioCorreo(ra.entidades.Email, ra.entidades.Email2, "", "Producciones Romian, S.L. - Adjunto le remitimos albarán de entrega nº " & ra.NumeroAlbaran, "Distinguidos Sres., " & vbCrLf & "Adjunto le remitimos albarán entrega nº " & ra.NumeroAlbaran, "AlbaranEntrega_" & ra.NumeroAlbaran.Replace("/", "-") & ".pdf")
|
||||
' Dim dxnc = New dxwEnvioCorreo(ra.entidades.Email, ra.entidades.Email2, "", "Producciones SanchoToro, S.L. - Adjunto le remitimos albarán de entrega nº " & ra.NumeroAlbaran, "Distinguidos Sres., " & vbCrLf & "Adjunto le remitimos albarán entrega nº " & ra.NumeroAlbaran, "AlbaranEntrega_" & ra.NumeroAlbaran.Replace("/", "-") & ".pdf")
|
||||
' If dxnc.ShowDialog Then
|
||||
' Dim cta = bd.cuentascorreo.First(Function(x) x.Codigo = "DEFECTO")
|
||||
' Dim bAlbaran = GeneraPdfAlbaran(bd, ra)
|
||||
@@ -742,22 +744,26 @@ Public Class ucAlbaran
|
||||
Else
|
||||
ra.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
Dim bdtmp = tscGrupoSanchoToro.NuevoContexto
|
||||
|
||||
Select Case Estado
|
||||
Case tsUtilidades.EstadosAplicacion.Nuevo
|
||||
For Each d In ra.detallesalbaranesidAlbaranNavigation
|
||||
d.idAlbaranNavigation = ra
|
||||
d.ActualizaProducto(bdtmp, 1)
|
||||
d.ActualizaProducto(bdtmp, ra.Tipo, 1, ra.idEmpresa)
|
||||
Next
|
||||
Case tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
Dim das = bdtmp.detallesalbaranes.Where(Function(x) x.idAlbaran = ra.idAlbaran).ToList
|
||||
For Each d In das
|
||||
d.ActualizaProducto(bdtmp, -1)
|
||||
If d.idAlbaranNavigation Is Nothing Then d.idAlbaranNavigation = ra
|
||||
d.ActualizaProducto(bdtmp, d.idAlbaranNavigation.Tipo, -1, d.idAlbaranNavigation.idEmpresa)
|
||||
If d.idAlbaranRecogida.HasValue Then d.ActualizaProducto(bdtmp, d.idAlbaranRecogidaNavigation.Tipo, -1, ra.idEmpresa)
|
||||
Next
|
||||
For Each d In ra.detallesalbaranesidAlbaranNavigation
|
||||
d.ActualizaProducto(bdtmp, 1)
|
||||
If d.idAlbaranNavigation Is Nothing Then d.idAlbaranNavigation = ra
|
||||
d.ActualizaProducto(bdtmp, d.idAlbaranNavigation.Tipo, 1, d.idAlbaranNavigation.idEmpresa)
|
||||
If d.idAlbaranRecogida.HasValue Then d.ActualizaProducto(bdtmp, d.idAlbaranRecogidaNavigation.Tipo, 1, d.idAlbaranRecogidaNavigation.idEmpresa)
|
||||
Next
|
||||
End Select
|
||||
bdtmp.GuardarCambios()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -765,8 +771,10 @@ Public Class ucAlbaran
|
||||
Dim bdtmp = tscGrupoSanchoToro.NuevoContexto
|
||||
Dim das = bdtmp.detallesalbaranes.Where(Function(x) x.idAlbaran = ra.idAlbaran).ToList
|
||||
For Each d In das
|
||||
d.ActualizaProducto(bdtmp, -1)
|
||||
d.ActualizaProducto(bdtmp, d.idAlbaranNavigation.Tipo, -1, d.idAlbaranNavigation.idEmpresa)
|
||||
If d.idAlbaranRecogida.HasValue Then d.ActualizaProducto(bdtmp, d.idAlbaranRecogidaNavigation.Tipo, -1, d.idAlbaranRecogidaNavigation.idEmpresa)
|
||||
Next
|
||||
bdtmp.SaveChanges()
|
||||
End Sub
|
||||
|
||||
Private Sub btIrAContrato_Click(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucAlbaranE"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucAlbaranR"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
@@ -30,8 +30,8 @@
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding NumeroAlbaran, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="100" NullText="« AUTOMÁTICO »" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Nº Pedido:">
|
||||
<dxe:ButtonEdit x:Name="beContrato" EditValue="{Binding NumeroPedido, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="12" DefaultButtonClick="beContrato_DefaultButtonClick">
|
||||
<tsWPF:tsLayoutItem Label="Nº Contrato:">
|
||||
<dxe:ButtonEdit x:Name="beContrato" EditValue="{Binding NumeroContrato, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="12" DefaultButtonClick="beContrato_DefaultButtonClick">
|
||||
<dxe:ButtonInfo GlyphKind="Search" x:Name="btIrAContrato" Click="btIrAContrato_Click" />
|
||||
<dxe:ButtonInfo GlyphKind="Cancel" x:Name="btQuitarContrato" Click="btQuitarContrato_Click" />
|
||||
</dxe:ButtonEdit>
|
||||
@@ -55,12 +55,12 @@
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Tipo:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbTipo" AutoComplete="True" DisplayMember="Descripcion" ValueMember="Valor" EditValue="{Binding Tipo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="4" AllowNullInput="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Cliente:">
|
||||
<tsWPF:tsLayoutItem Label="Cliente/Proveedor:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
@@ -96,6 +96,12 @@
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Usuario, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="100" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Almacén Destino:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbAlmacenDestino" AutoComplete="True" DisplayMember="Descripcion" ValueMember="idAlmacen" EditValue="{Binding idAlmacenDestino, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="4" AllowNullInput="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
@@ -305,78 +311,27 @@
|
||||
</dx:DXTabControl.View>
|
||||
<dx:DXTabItem Header="Productos">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcProductos" TabIndex="31">
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC CamposObligatorios="Cantidad,idProducto" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:tsGridControl x:Name="gcProductos" TabIndex="13">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvProductos" ShowGroupPanel="False" NewItemRowPosition="Bottom">
|
||||
<tsWPF:tsTableView x:Name="tvProductos" ShowGroupPanel="False" TabIndex="13" AllowSorting="False">
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
|
||||
<dxg:GridColumn FieldName="idProducto" Header="Producto" Width="400">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings x:Name="cbProducto" ValueMember="idProducto" DisplayMember="Descripcion" AllowDefaultButton="False" AutoComplete="True">
|
||||
<dxe:ComboBoxEditSettings.Buttons>
|
||||
<dxe:ButtonInfo x:Name="biBuscarProducto" GlyphKind="Search" IsDefaultButton="False" Click="BiBuscarProducto_Click" />
|
||||
</dxe:ComboBoxEditSettings.Buttons>
|
||||
</dxe:ComboBoxEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="idArticulo" Header="Artículo" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings x:Name="cbArticulo" ValueMember="idArticulo" DisplayMember="CodigoArticulo" AllowDefaultButton="False" AutoComplete="False">
|
||||
<dxe:ComboBoxEditSettings.Buttons>
|
||||
<dxe:ButtonInfo x:Name="biBuscarArticulo" GlyphKind="Search" IsDefaultButton="False" Click="BiBuscarArticulo_Click" />
|
||||
</dxe:ComboBoxEditSettings.Buttons>
|
||||
</dxe:ComboBoxEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Cantidad" Header="Cantidad" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="EsVenta" IsSmart="True" Width="100" x:Name="gcEsVenta">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False">
|
||||
</dxe:CheckEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Producto" Header="Producto" Width="400" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Articulo" Header="Artículo" Width="100" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Observaciones" Header="Observaciones" IsSmart="True" Width="380" />
|
||||
<tsWPF:tsGridColumn FieldName="idAlbaranRecogidaNavigation.NumeroAlbaran" Header="Nº Albaran Recogida" IsSmart="True" Width="130" CellTemplate="{DynamicResource VerDetalleTemplate}" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="id.Fecha" Header="Fecha Recogida" IsSmart="True" Width="140" SoloLectura="True">
|
||||
<tsWPF:tsGridColumn FieldName="idAlbaranNavigation.NumeroAlbaran" Header="Nº Albarán Entrega" IsSmart="True" Width="120" CellTemplate="{DynamicResource VerDetalleTemplate}" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="idAlbaranNavigation.Fecha" Header="Fecha Entrega" IsSmart="True" Width="140" SoloLectura="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="facturas.NumeroFactura" Header="Nº Última Fra." IsSmart="True" Width="100" CellTemplate="{DynamicResource VerDetalleTemplate}" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="facturas.FechaCalculoDias" Header="Fecha Último Cálculo" IsSmart="True" Width="150" SoloLectura="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="FechaCancelacion" Header="Fecha Cancelación" IsSmart="True" Width="150" SoloLectura="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="MotivoCancelacion" Header="Motivo Cancelación" IsSmart="True" Width="200" />
|
||||
<!--<dxg:GridColumn FieldName="PendienteFacturarHoy" Header="Pendiente Facturar Hoy" IsSmart="True" Width="160" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
|
||||
<tsWPF:tsGridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem FieldName="PendienteFacturarHoy" SummaryType="Sum" ShowInGroupColumnFooter="PendienteFacturarHoy" DisplayFormat=" {0:c2}"/>
|
||||
</tsWPF:tsGridControl.GroupSummary>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem FieldName="PendienteFacturarHoy" SummaryType="Sum" ShowInGroupColumnFooter="PendienteFacturarHoy" DisplayFormat=" {0:c2}"/>
|
||||
</tsWPF:tsGridControl.TotalSummary>-->
|
||||
<tsWPF:tsGridColumn FieldName="Cantidad" Header="Unidades Entregadas" IsSmart="True" Width="140" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="UnidadesRecogidasTmp" Header="Unidades Recogidas" IsSmart="True" Width="140" />
|
||||
<tsWPF:tsGridColumn FieldName="idAlbaranNavigation.Obra" Header="Obra" Width="500" SoloLectura="True" />
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
@@ -19,11 +19,11 @@ Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports System.Drawing
|
||||
Imports bdGrupoSanchoToro.db.albaranes
|
||||
|
||||
Public Class ucAlbaranE
|
||||
Public Class ucAlbaranR
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Friend _idAlbaran As Nullable(Of Integer)
|
||||
Private lProductos As List(Of productos)
|
||||
Private lArticulos As List(Of articulos)
|
||||
'Private lProductos As List(Of productos)
|
||||
'Private lArticulos As List(Of articulos)
|
||||
Friend idLog As Integer?
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ Public Class ucAlbaranE
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Try
|
||||
|
||||
lProductos = bd.productos.OrderBy(Function(x) x.Descripcion).ToList
|
||||
Dim lProductosAlb = ra.detallesalbaranesidAlbaranNavigation.Select(Function(x) x.idProducto).ToArray
|
||||
lProductos = lProductos.Where(Function(x) x.FechaBaja Is Nothing OrElse lProductosAlb.Contains(x.idProducto)).ToList
|
||||
cbProducto.ItemsSource = lProductos
|
||||
'lProductos = bd.productos.OrderBy(Function(x) x.Descripcion).ToList
|
||||
'Dim lProductosAlb = ra.detallesalbaranesidAlbaranNavigation.Select(Function(x) x.idProducto).ToArray
|
||||
'lProductos = lProductos.Where(Function(x) x.FechaBaja Is Nothing OrElse lProductosAlb.Contains(x.idProducto)).ToList
|
||||
'cbProducto.ItemsSource = lProductos
|
||||
|
||||
cbRazonSocial.ItemsSource = bd.entidades.Where(Function(X) X.FechaBaja.HasValue = False OrElse X.idEntidad = ra.idEntidad).ToList.Select(Function(x) New With {x.idEntidad, x.RazonSocial}).OrderBy(Function(x) x.RazonSocial).ToList
|
||||
|
||||
@@ -51,13 +51,8 @@ Public Class ucAlbaranE
|
||||
Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 1,
|
||||
.Descripcion = "GENERA ALBARÁN DE RECOGIDA Y FACTURA RÁPIDA (F10)"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 3,
|
||||
.Descripcion = "GENERA ALBARÁN DE RECOGIDA DE PRODUCTOS PENDIENTES (F11)"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 2,
|
||||
.Descripcion = "ENVIAR ALBARÁN POR CORREO ELECTRÓNICO (F12)"})
|
||||
.Descripcion = "AGREGA PRODUCTOS AL ALBARAN F9"})
|
||||
|
||||
Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
|
||||
@@ -118,6 +113,8 @@ Public Class ucAlbaranE
|
||||
_idAlbaran = Nothing
|
||||
ra.Fecha = DateOnly.FromDateTime(Today)
|
||||
ra.NumeroBultos = 1
|
||||
ra.idEmpresa = EmpresaActual.idEmpresa
|
||||
ra.Tipo = _Tipo
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
Else
|
||||
ra = bd.albaranes.First(Function(x) x.idAlbaran = _idAlbaran)
|
||||
@@ -127,9 +124,10 @@ Public Class ucAlbaranE
|
||||
If Me.cbTipo.ItemsSource Is Nothing Then
|
||||
cbTipo.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum))
|
||||
cbAlmacenOrigen.ItemsSource = Comun.ObtieneListaAlmacenes(bd)
|
||||
cbAlmacenDestino.ItemsSource = Comun.ObtieneListaAlmacenes(bd)
|
||||
End If
|
||||
'Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idAlbaran AndAlso x.Aplicacion = "albaranes").ToList
|
||||
gcProductos.ItemsSource = ra.detallesalbaranesidAlbaranNavigation
|
||||
gcProductos.ItemsSource = ra.detallesalbaranesidAlbaranRecogidaNavigation
|
||||
Me.DataContext = ra
|
||||
Return NuevoEstado
|
||||
Catch ex As Exception
|
||||
@@ -179,11 +177,12 @@ Public Class ucAlbaranE
|
||||
' Return "idAlbaranEntrega"
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public Sub New(Optional idAlbaran As Integer? = Nothing)
|
||||
Private _Tipo As albaranes.TipoAlbaranEnum
|
||||
Public Sub New(Tipo As albaranes.TipoAlbaranEnum, Optional idAlbaran As Integer? = Nothing)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
|
||||
_idAlbaran = idAlbaran
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
@@ -365,38 +364,19 @@ Public Class ucAlbaranE
|
||||
|
||||
Private Sub ap_EstadoCambiado(EstadoAnterior As tsUtilidades.EstadosAplicacion, EstadoNuevo As tsUtilidades.EstadosAplicacion) Handles Me.EstadoCambiado
|
||||
If idLog.HasValue Then EstableceSoloLectura()
|
||||
Select Case EstadoNuevo
|
||||
Case tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
If ra.Tipo = TipoAlbaranEnum.COMPRA Then
|
||||
gcEsVenta.ReadOnly = True
|
||||
Else
|
||||
gcEsVenta.ReadOnly = False
|
||||
End If
|
||||
End Select
|
||||
'Select Case EstadoNuevo
|
||||
' Case tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
' If ra.Tipo = TipoAlbaranEnum.COMPRA Then
|
||||
' gcEsVenta.ReadOnly = True
|
||||
' Else
|
||||
' gcEsVenta.ReadOnly = False
|
||||
' End If
|
||||
'End Select
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub BiBuscarProducto_Click(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
|
||||
If tvProductos.ActiveEditor Is Nothing Then
|
||||
Dispatcher.BeginInvoke(New Action(Sub() tvProductos.ShowEditor()), System.Windows.Threading.DispatcherPriority.Render)
|
||||
End If
|
||||
Dim dxw As New dxwProductos(lProductos)
|
||||
If dxw.ShowDialog Then
|
||||
Dim dea As detallesalbaranes = gcProductos.CurrentItem
|
||||
Dim prod = lProductos.First(Function(x) x.idProducto = dxw.idProducto)
|
||||
If tvProductos.ActiveEditor IsNot Nothing Then
|
||||
tvProductos.ActiveEditor.EditValue = prod.idProducto
|
||||
Else
|
||||
Debug.Write("no")
|
||||
End If
|
||||
tvProductos.PostEditor()
|
||||
tvProductos.CloseEditor()
|
||||
gcProductos.RefreshRow(tvProductos.FocusedRowHandle)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BiBuscarCliente_Click(sender As Object, e As RoutedEventArgs)
|
||||
'If Me.Estado = EstadosAplicacion.Nuevo Then
|
||||
Dim dxw As New dxwEntidades(bd, True, False)
|
||||
@@ -410,16 +390,6 @@ Public Class ucAlbaranE
|
||||
|
||||
|
||||
|
||||
Private Sub RellenaDatosProducto(dea As detallesalbaranes)
|
||||
If dea IsNot Nothing AndAlso dea.idProducto <> 0 Then
|
||||
Dim ae As albaranes = Me.DataContext
|
||||
Dim pr = lProductos.First(Function(x) x.idProducto = dea.idProducto)
|
||||
If dea.Cantidad = 0 Then dea.Cantidad = 1
|
||||
dea.EsVenta = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -537,6 +507,34 @@ Public Class ucAlbaranE
|
||||
End Sub
|
||||
|
||||
Private Sub ucAlbaranEntrega_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
|
||||
|
||||
Select Case idAccion
|
||||
Case 1 'AGREGA PRODUCTOS AL ALBARAN F9
|
||||
Dim ldet = ra.detallesalbaranesidAlbaranRecogidaNavigation
|
||||
Dim ld = ldet.Select(Function(x) x.idDetalle).ToArray
|
||||
If ra.idEntidad.HasValue Then
|
||||
Dim dxw As New dxwRecogidaProductos(bd, ld, ra.idEntidad)
|
||||
If dxw.ShowDialog Then
|
||||
For Each d In dxw.LSeleccionados
|
||||
If Not ldet.Any(Function(x) x.idDetalle = d.idDetalle) Then
|
||||
ldet.Add(d)
|
||||
End If
|
||||
Next
|
||||
Dim ldq = ldet.Except(dxw.LSeleccionados).ToList
|
||||
For Each d In ldq
|
||||
ldet.Remove(ldet.First(Function(x) x.idDetalle = d.idDetalle))
|
||||
Next
|
||||
'Me.gcProductos.ItemsSource = ldet.OrderBy(Function(x) x.idDetalleAlbaran).ToList
|
||||
' Me.gcProductos.ItemsSource = ldet.OrderBy(Function(x) x.idProductoNavigation.Descripcion).ThenBy(Function(x) x.idDetalle).ToList
|
||||
'ra.detallealbaranentrega.OrderBy(Function(x) x.productos.Descripcion).ThenBy(Function(x) x.idDetalleAlbaran).ToList
|
||||
gcProductos.RefreshData()
|
||||
End If
|
||||
Else
|
||||
DXMessageBox.Show("Antes seleccione el cliente", "Atención")
|
||||
End If
|
||||
End Select
|
||||
|
||||
'Select Case idAccion
|
||||
' Case 1 ' GENERA ALBARÁN DE RECOGIDA Y FACTURA RAPIDA
|
||||
' Try
|
||||
@@ -573,7 +571,7 @@ Public Class ucAlbaranE
|
||||
' bCancelar = Me.Guardar(Nothing, Nothing,, True, 5)
|
||||
' End If
|
||||
' If Not bCancelar Then
|
||||
' Dim dxnc = New dxwEnvioCorreo(ra.entidades.Email, ra.entidades.Email2, "", "Producciones Romian, S.L. - Adjunto le remitimos albarán de entrega nº " & ra.NumeroAlbaran, "Distinguidos Sres., " & vbCrLf & "Adjunto le remitimos albarán entrega nº " & ra.NumeroAlbaran, "AlbaranEntrega_" & ra.NumeroAlbaran.Replace("/", "-") & ".pdf")
|
||||
' Dim dxnc = New dxwEnvioCorreo(ra.entidades.Email, ra.entidades.Email2, "", "Producciones SanchoToro, S.L. - Adjunto le remitimos albarán de entrega nº " & ra.NumeroAlbaran, "Distinguidos Sres., " & vbCrLf & "Adjunto le remitimos albarán entrega nº " & ra.NumeroAlbaran, "AlbaranEntrega_" & ra.NumeroAlbaran.Replace("/", "-") & ".pdf")
|
||||
' If dxnc.ShowDialog Then
|
||||
' Dim cta = bd.cuentascorreo.First(Function(x) x.Codigo = "DEFECTO")
|
||||
' Dim bAlbaran = GeneraPdfAlbaran(bd, ra)
|
||||
@@ -633,42 +631,49 @@ Public Class ucAlbaranE
|
||||
|
||||
|
||||
|
||||
Private Sub ucAlbaranEntrega_CampoActualizado(sender As Object, e As DataTransferEventArgs) Handles Me.CampoActualizado
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
If Not pts Is Nothing Then
|
||||
'Private Sub ucAlbaranEntrega_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 "tipo"
|
||||
gcEsVenta.ReadOnly = False
|
||||
Select Case DirectCast(ra.Tipo, bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum)
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.COMPRA
|
||||
For Each d In ra.detallesalbaranesidAlbaranNavigation.Where(Function(x) x.EsVenta)
|
||||
d.EsVenta = False
|
||||
Next
|
||||
gcEsVenta.ReadOnly = True
|
||||
ra.idAlmacenOrigen = Nothing
|
||||
EstableceSoloLectura(cbAlmacenOrigen, True)
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.CAMBIO_ALMACEN
|
||||
EstableceSoloLectura(cbAlmacenOrigen, False)
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.SUBALQUILER
|
||||
ra.idAlmacenOrigen = Nothing
|
||||
EstableceSoloLectura(cbAlmacenOrigen, True)
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.DEVOLUCION_SUBALQUILER
|
||||
EstableceSoloLectura(cbAlmacenOrigen, False)
|
||||
ra.idAlmacenDestino = Nothing
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.ENTREGA
|
||||
EstableceSoloLectura(cbAlmacenOrigen, False)
|
||||
ra.idAlmacenDestino = Nothing
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.RECOGIDA
|
||||
ra.idAlmacenOrigen = Nothing
|
||||
EstableceSoloLectura(cbAlmacenOrigen, True)
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.REGULARIZACION_STOCK
|
||||
ra.idAlmacenOrigen = Nothing
|
||||
EstableceSoloLectura(cbAlmacenOrigen, True)
|
||||
End Select
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
' Select Case pts.NombreCampo.ToLower
|
||||
' Case "tipo"
|
||||
' gcEsVenta.ReadOnly = False
|
||||
' Select Case DirectCast(ra.Tipo, bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum)
|
||||
' Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.COMPRA
|
||||
' For Each d In ra.detallesalbaranesidAlbaranNavigation.Where(Function(x) x.EsVenta)
|
||||
' d.EsVenta = False
|
||||
' Next
|
||||
' gcEsVenta.ReadOnly = True
|
||||
' ra.idAlmacenOrigen = Nothing
|
||||
' EstableceSoloLectura(cbAlmacenOrigen, True)
|
||||
' EstableceSoloLectura(cbAlmacenDestino, False)
|
||||
' Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.CAMBIO_ALMACEN
|
||||
' EstableceSoloLectura(cbAlmacenOrigen, False)
|
||||
' EstableceSoloLectura(cbAlmacenDestino, False)
|
||||
' Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.SUBALQUILER
|
||||
' ra.idAlmacenOrigen = Nothing
|
||||
' EstableceSoloLectura(cbAlmacenOrigen, True)
|
||||
' EstableceSoloLectura(cbAlmacenDestino, False)
|
||||
' Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.DEVOLUCION_SUBALQUILER
|
||||
' EstableceSoloLectura(cbAlmacenOrigen, False)
|
||||
' ra.idAlmacenDestino = Nothing
|
||||
' EstableceSoloLectura(cbAlmacenDestino, True)
|
||||
' Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.ENTREGA
|
||||
' EstableceSoloLectura(cbAlmacenOrigen, False)
|
||||
' ra.idAlmacenDestino = Nothing
|
||||
' EstableceSoloLectura(cbAlmacenDestino, True)
|
||||
' Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.RECOGIDA
|
||||
' ra.idAlmacenOrigen = Nothing
|
||||
' EstableceSoloLectura(cbAlmacenOrigen, True)
|
||||
' EstableceSoloLectura(cbAlmacenDestino, False)
|
||||
' Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.REGULARIZACION_STOCK
|
||||
' ra.idAlmacenOrigen = Nothing
|
||||
' EstableceSoloLectura(cbAlmacenOrigen, True)
|
||||
' EstableceSoloLectura(cbAlmacenDestino, False)
|
||||
' End Select
|
||||
' End Select
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
|
||||
Private Sub hlVale_Click(sender As Object, e As RoutedEventArgs)
|
||||
@@ -699,20 +704,6 @@ Public Class ucAlbaranE
|
||||
Private Sub ucAlbaran_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
|
||||
Select Case DirectCast(ra.Tipo, bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum)
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.COMPRA
|
||||
For Each d In ra.detallesalbaranesidAlbaranNavigation.Where(Function(x) x.EsVenta)
|
||||
d.EsVenta = False
|
||||
Next
|
||||
If ra.idAlmacenDestino.HasValue = False Then hte.Add("ALMACENAR-ALMACEN_DESTINO_OBLIGATORIO", "El almacén destino es obligatorio")
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.CAMBIO_ALMACEN
|
||||
If ra.idAlmacenOrigen.HasValue = False Then hte.Add("ALMACENAR-ALMACEN_ORIGEN_OBLIGATORIO", "El almacén origen es obligatorio")
|
||||
If ra.idAlmacenDestino.HasValue = False Then hte.Add("ALMACENAR-ALMACEN_DESTINO_OBLIGATORIO", "El almacén destino es obligatorio")
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.SUBALQUILER
|
||||
If ra.idAlmacenDestino.HasValue = False Then hte.Add("ALMACENAR-ALMACEN_DESTINO_OBLIGATORIO", "El almacén destino es obligatorio")
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.DEVOLUCION_SUBALQUILER
|
||||
If ra.idAlmacenOrigen.HasValue = False Then hte.Add("ALMACENAR-ALMACEN_ORIGEN_OBLIGATORIO", "El almacén origen es obligatorio")
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.ENTREGA
|
||||
If ra.idAlmacenOrigen.HasValue = False Then hte.Add("ALMACENAR-ALMACEN_ORIGEN_OBLIGATORIO", "El almacén origen es obligatorio")
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.RECOGIDA
|
||||
If ra.idAlmacenDestino.HasValue = False Then hte.Add("ALMACENAR-ALMACEN_DESTINO_OBLIGATORIO", "El almacén destino es obligatorio")
|
||||
Case bdGrupoSanchoToro.db.albaranes.TipoAlbaranEnum.REGULARIZACION_STOCK
|
||||
@@ -723,32 +714,52 @@ Public Class ucAlbaranE
|
||||
Cancelar = True
|
||||
Else
|
||||
ra.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
Dim bdtmp = tscGrupoSanchoToro.NuevoContexto
|
||||
Dim lds As List(Of detallesalbaranes) = Me.gcProductos.ItemsSource
|
||||
Dim dad = lds.Where(Function(x) x.UnidadesRecogidasTmp < x.Cantidad).ToList
|
||||
For Each d In dad
|
||||
Dim nd As New detallesalbaranes
|
||||
With nd
|
||||
.Cantidad = d.Cantidad - d.UnidadesRecogidasTmp
|
||||
.idAlbaran = d.idAlbaran
|
||||
.idArticulo = d.idArticulo
|
||||
.idProducto = d.idProducto
|
||||
.idUltimaFactura = d.idUltimaFactura
|
||||
.Observaciones = d.Observaciones
|
||||
.EsVenta = False
|
||||
.idAlbaranRecogida = Nothing
|
||||
End With
|
||||
bd.detallesalbaranes.Add(nd)
|
||||
d.Cantidad = d.UnidadesRecogidasTmp
|
||||
Next
|
||||
|
||||
Dim bdtmp = tscGrupoSanchoToro.NuevoContexto
|
||||
Select Case Estado
|
||||
Case tsUtilidades.EstadosAplicacion.Nuevo
|
||||
For Each d In ra.detallesalbaranesidAlbaranNavigation
|
||||
d.idAlbaranNavigation = ra
|
||||
d.ActualizaProducto(bdtmp, 1)
|
||||
For Each d In ra.detallesalbaranesidAlbaranRecogidaNavigation
|
||||
d.idAlbaranRecogidaNavigation = ra
|
||||
d.ActualizaProducto(bdtmp, ra.Tipo, 1, ra.idEmpresa)
|
||||
Next
|
||||
Case tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
Dim das = bdtmp.detallesalbaranes.Where(Function(x) x.idAlbaran = ra.idAlbaran).ToList
|
||||
Dim das = bdtmp.detallesalbaranes.Where(Function(x) x.idAlbaranRecogida = ra.idAlbaran).ToList
|
||||
For Each d In das
|
||||
d.ActualizaProducto(bdtmp, -1)
|
||||
d.ActualizaProducto(bdtmp, d.idAlbaranRecogidaNavigation.Tipo, -1, d.idAlbaranRecogidaNavigation.idEmpresa)
|
||||
Next
|
||||
For Each d In ra.detallesalbaranesidAlbaranNavigation
|
||||
d.ActualizaProducto(bdtmp, 1)
|
||||
For Each d In ra.detallesalbaranesidAlbaranRecogidaNavigation
|
||||
If d.idAlbaranRecogidaNavigation Is Nothing Then d.idAlbaranRecogidaNavigation = ra
|
||||
d.ActualizaProducto(bdtmp, d.idAlbaranRecogidaNavigation.Tipo, 1, d.idAlbaranRecogidaNavigation.idEmpresa)
|
||||
Next
|
||||
End Select
|
||||
bdtmp.GuardarCambios()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ucAlbaran_AntesEliminar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, ByRef OmitirPreguntaContinuar As Boolean) Handles Me.AntesEliminar
|
||||
Dim bdtmp = tscGrupoSanchoToro.NuevoContexto
|
||||
Dim das = bdtmp.detallesalbaranes.Where(Function(x) x.idAlbaran = ra.idAlbaran).ToList
|
||||
Dim das = bdtmp.detallesalbaranes.Where(Function(x) x.idAlbaranRecogida = ra.idAlbaran).ToList
|
||||
For Each d In das
|
||||
d.ActualizaProducto(bdtmp, -1)
|
||||
d.ActualizaProducto(bdtmp, d.idAlbaranRecogidaNavigation.Tipo, -1, d.idAlbaranRecogidaNavigation.idEmpresa)
|
||||
Next
|
||||
bdtmp.SaveChanges()
|
||||
End Sub
|
||||
|
||||
Private Sub btIrAContrato_Click(sender As Object, e As RoutedEventArgs)
|
||||
@@ -763,46 +774,32 @@ Public Class ucAlbaranE
|
||||
ra.idPresupuestoNavigation = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub tvProductos_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles tvProductos.PreviewKeyDown
|
||||
If e.Key = Key.F6 Then
|
||||
'Private Sub BiBuscarArticulo_Click(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
If Not ra.detallesalbaranesidAlbaranNavigation.ToList.Any(Function(x) x.idAlbaranRecogida.HasValue OrElse (x.idUltimaFactura.HasValue AndAlso (x.idUltimaFacturaNavigation.FechaFactura > ra.Fecha))) Then
|
||||
Select Case gcProductos.CurrentColumn.FieldName.ToLower
|
||||
Case "idproducto"
|
||||
BiBuscarProducto_Click(Nothing, Nothing)
|
||||
Case "idarticulo"
|
||||
BiBuscarArticulo_Click(Nothing, Nothing)
|
||||
End Select
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BiBuscarArticulo_Click(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
Try
|
||||
If gcProductos.CurrentItem IsNot Nothing Then
|
||||
Dim dea As detallesalbaranes = gcProductos.CurrentItem
|
||||
If dea.idProducto > 0 Then
|
||||
If tvProductos.ActiveEditor Is Nothing Then
|
||||
Dispatcher.BeginInvoke(New Action(Sub() tvProductos.ShowEditor()), System.Windows.Threading.DispatcherPriority.Render)
|
||||
End If
|
||||
Dim dxw As New dxwArticulos(lArticulos, dea.idProducto)
|
||||
If dxw.ShowDialog Then
|
||||
Dim art = lArticulos.First(Function(x) x.idArticulo = dxw.idArticulo)
|
||||
dea.idArticulo = art.idArticulo
|
||||
dea.Cantidad = 1
|
||||
If tvProductos.ActiveEditor IsNot Nothing Then tvProductos.ActiveEditor.EditValue = art.idArticulo
|
||||
tvProductos.PostEditor()
|
||||
tvProductos.CloseEditor()
|
||||
gcProductos.RefreshRow(tvProductos.FocusedRowHandle)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
' Try
|
||||
' If gcProductos.CurrentItem IsNot Nothing Then
|
||||
' Dim dea As detallesalbaranes = gcProductos.CurrentItem
|
||||
' If dea.idProducto > 0 Then
|
||||
' If tvProductos.ActiveEditor Is Nothing Then
|
||||
' Dispatcher.BeginInvoke(New Action(Sub() tvProductos.ShowEditor()), System.Windows.Threading.DispatcherPriority.Render)
|
||||
' End If
|
||||
' Dim dxw As New dxwArticulos(lArticulos, dea.idProducto)
|
||||
' If dxw.ShowDialog Then
|
||||
' Dim art = lArticulos.First(Function(x) x.idArticulo = dxw.idArticulo)
|
||||
' dea.idArticulo = art.idArticulo
|
||||
' dea.Cantidad = 1
|
||||
' If tvProductos.ActiveEditor IsNot Nothing Then tvProductos.ActiveEditor.EditValue = art.idArticulo
|
||||
' tvProductos.PostEditor()
|
||||
' tvProductos.CloseEditor()
|
||||
' gcProductos.RefreshRow(tvProductos.FocusedRowHandle)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
' DXMessageBox.Show(ex.Message, "Error")
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -67,20 +67,20 @@
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="DescripcionEvento" Header="Evento" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="DescripcionObra" Header="Obra" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Usuario" Header="Usuario" Width="250" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="tv" ShowSearchPanelMode="Always" ShowGroupPanel="True" ShowTotalSummary="True">
|
||||
<dxg:TableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="[Tipo]==2" FieldName="{x:Null}">
|
||||
<dxg:Format Foreground="Green" />
|
||||
<dx:Format Foreground="Green" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="[Tipo]==3 OrElse [Tipo]==4" FieldName="{x:Null}">
|
||||
<dxg:Format Foreground="DarkOrange" />
|
||||
<dx:Format Foreground="DarkOrange" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="[Tipo]>99" FieldName="{x:Null}">
|
||||
<dxg:Format Foreground="Blue" />
|
||||
<dx:Format Foreground="Blue" />
|
||||
</dxg:FormatCondition>
|
||||
|
||||
</dxg:TableView.FormatConditions>
|
||||
|
||||
@@ -92,7 +92,15 @@ Public Class ucAlbaranes
|
||||
End Function
|
||||
|
||||
Private Sub Nuevo() Handles Me.BotonNuevoPulsado
|
||||
FuncionesDinamicas.AbrirAP(New ucAlbaran, OtrosParametros)
|
||||
Dim dxwta As New dxwTipoAlbaran
|
||||
If dxwta.ShowDialog Then
|
||||
If dxwta.Tipo = db.albaranes.TipoAlbaranEnum.RECOGIDA Or dxwta.Tipo = db.albaranes.TipoAlbaranEnum.DEVOLUCION_SUBALQUILER Then
|
||||
FuncionesDinamicas.AbrirAP(New ucAlbaranR(dxwta.Tipo), OtrosParametros)
|
||||
Else
|
||||
FuncionesDinamicas.AbrirAP(New ucAlbaran(dxwta.Tipo), OtrosParametros)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
@@ -104,7 +112,13 @@ Public Class ucAlbaranes
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "numeroalbaran"
|
||||
Dim id As Integer = ra.idAlbaran
|
||||
FuncionesDinamicas.AbrirAP(New ucAlbaran(id), OtrosParametros)
|
||||
Select Case DirectCast(ra.Tipo, albaranes.TipoAlbaranEnum)
|
||||
Case db.albaranes.TipoAlbaranEnum.RECOGIDA, db.albaranes.TipoAlbaranEnum.DEVOLUCION_SUBALQUILER
|
||||
FuncionesDinamicas.AbrirAP(New ucAlbaranR(ra.Tipo, id), OtrosParametros)
|
||||
Case Else
|
||||
FuncionesDinamicas.AbrirAP(New ucAlbaran(ra.Tipo, id), OtrosParametros)
|
||||
End Select
|
||||
|
||||
Case "razonsocial"
|
||||
Dim id As Integer = ra.idEntidad
|
||||
FuncionesDinamicas.AbrirAP(New ucEntidad(id), OtrosParametros)
|
||||
@@ -114,7 +128,7 @@ Public Class ucAlbaranes
|
||||
End Sub
|
||||
|
||||
Public Function ObtieneAlbaranes(TextoBusqueda As String, FechaInicio As DateOnly?, FechaFin As DateOnly?, Tipos As List(Of Integer)) As List(Of v_albaranesextendidos)
|
||||
Dim rs As IQueryable(Of v_albaranesextendidos)
|
||||
Dim rs As IQueryable(Of v_albaranesextendidos) = bd.v_albaranesextendidos.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
Dim la As New List(Of v_albaranesextendidos)
|
||||
Dim iNumExc As Integer = 0
|
||||
Do
|
||||
@@ -122,9 +136,9 @@ Public Class ucAlbaranes
|
||||
If TextoBusqueda <> "" Then
|
||||
Dim parametros(0) As Object
|
||||
Dim ExpresionBusqueda = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, Me._CamposBusquedaNumericos, Me._CamposBusquedaAlfabeticos, Nothing)
|
||||
rs = bd.v_albaranesextendidos.Where(ExpresionBusqueda)
|
||||
rs = rs.Where(ExpresionBusqueda)
|
||||
Else
|
||||
rs = bd.v_albaranesextendidos.AsQueryable
|
||||
rs = rs.AsQueryable
|
||||
End If
|
||||
|
||||
If FechaInicio.HasValue Then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
<tsWPFCore:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
@@ -7,10 +7,10 @@
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucProducto"
|
||||
xmlns:tsWPFCore="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucProducto"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<tsWPFCore:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
@@ -25,53 +25,77 @@
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
</tsWPFCore:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos Producto" x:Name="lgDetalle" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="1250" HorizontalAlignment="Left">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Orientation="Horizontal">
|
||||
<tsWPF:tsLayoutItem Label="Código:" Width="240">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="2" EditValue="{Binding Codigo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Descripción:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" Unico="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Descripcion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="3" x:Name="teNIF" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Tipo:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbTipo" ValueMember="Valor" DisplayMember="Descripcion" EditValue="{Binding Tipo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Baja:" Width="200">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaBaja, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="4" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup Header="Datos Producto" x:Name="lgDetalle" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch" ItemLabelsAlignment="Local" IsCollapsible="True">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup HorizontalAlignment="Left" Width="1280">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup >
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="240" ItemLabelsAlignment="Local">
|
||||
<tsWPFCore:tsLayoutItem Label="Nº Producto:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="99" EditValue="{Binding NumeroProductoTMP, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
<tsWPFCore:tsLayoutItem Label="Fecha Baja:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaBaja, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="4" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="380">
|
||||
<tsWPFCore:tsLayoutItem Label="Código:" >
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Unico="True" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="2" EditValue="{Binding Codigo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
<tsWPFCore:tsLayoutItem Label="Facturar como venta/servicio por defecto.:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:CheckEdit EditValue="{Binding FacturarComoVentaPorDefecto, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="9" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPFCore:tsLayoutItem Label="Descripción:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Obligatorio="True" Unico="True" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Descripcion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="3" x:Name="teNIF" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
<tsWPFCore:tsLayoutItem Label="Tipo:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbTipo" ValueMember="Valor" DisplayMember="Descripcion" EditValue="{Binding Tipo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" AutoComplete="True" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPFCore:tsLayoutItem Label="Observaciones:" >
|
||||
<dxe:TextEdit EditValue="{Binding Observaciones, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="10" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Observaciones:">
|
||||
<dxe:TextEdit EditValue="{Binding Observaciones, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="10" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<dxlc:LayoutGroup Header="Tarifas" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch" ItemLabelsAlignment="Local">
|
||||
<dxlc:LayoutGroup Width="400">
|
||||
<tsWPF:tsLayoutItem Label="Precio:">
|
||||
<dxlc:LayoutGroup Header="Precios" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch" ItemLabelsAlignment="Local">
|
||||
<dxlc:LayoutGroup Width="900">
|
||||
<tsWPFCore:tsLayoutItem Label="Precio Venta:">
|
||||
<dxe:TextEdit TabIndex="11" Mask="c4" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding PrecioVenta, Converter={StaticResource DoubleToDecimalConverter}, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Precio Costo:">
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
<tsWPFCore:tsLayoutItem Label="Precio Alquiler Mensual:">
|
||||
<dxe:TextEdit TabIndex="12" Mask="c4" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding PrecioAlquilerMensual, Converter={StaticResource DoubleToDecimalConverter}, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
<tsWPFCore:tsLayoutItem Label="Ultimo Precio Compra:">
|
||||
<dxe:TextEdit TabIndex="13" Mask="c4" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding UltimoPrecioCompra, Converter={StaticResource DoubleToDecimalConverter}, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
@@ -82,39 +106,285 @@
|
||||
</dx:DXTabControl.View>
|
||||
<dx:DXTabItem Header="Stocks">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Descglose por almacenes" View="GroupBox">
|
||||
<tsWPF:tsGridControl x:Name="gcStocksAlmacenes" NombreTablaBase="desgloseproductos" TabIndex="41">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="false" x:Name="tvStocksAlmacenes" IsDetailButtonVisibleBinding="{Binding Row.ContieneHijos}">
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxlc:LayoutGroup Header="Desglose por almacenes" View="GroupBox">
|
||||
<tsWPFCore:tsGridControl x:Name="gcStocksAlmacenes" NombreTablaBase="desgloseproductos" TabIndex="41">
|
||||
<tsWPFCore:tsGridControl.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsGridControl.PropiedadesTS>
|
||||
<tsWPFCore:tsGridControl.View>
|
||||
<tsWPFCore:tsTableView ShowGroupPanel="false" x:Name="tvStocksAlmacenes" IsDetailButtonVisibleBinding="{Binding Row.ContieneHijos}">
|
||||
</tsWPFCore:tsTableView>
|
||||
</tsWPFCore:tsGridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="Almacen" Header="Almacén" IsSmart="True" Width="450" SoloLectura="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="TipoAlmacen" Header="Tipo Almacén" IsSmart="True" Width="200" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Unidades" IsSmart="True" Width="100">
|
||||
<tsWPFCore:tsGridColumn FieldName="Almacen" Header="Almacén" IsSmart="True" Width="450" SoloLectura="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPFCore:tsGridColumn FieldName="TipoAlmacen" Header="Tipo Almacén" IsSmart="True" Width="200" SoloLectura="True" />
|
||||
<tsWPFCore:tsGridColumn FieldName="Unidades" IsSmart="True" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
|
||||
</dxg:GridControl.Columns>
|
||||
</tsWPF:tsGridControl>
|
||||
</tsWPFCore:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Unidades" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch" ItemLabelsAlignment="Local" IsCollapsible="True" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" ItemLabelsAlignment="Local">
|
||||
<dxlc:LayoutGroup Orientation="Horizontal" Width="1000" Height="120">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="250" HorizontalAlignment="Left">
|
||||
<tsWPFCore:tsLayoutItem Label="Uds. Iniciales/Fabricadas:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="14" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding UnidadesInicialesOFabricadas, Converter={StaticResource DoubleToDecimalConverter}, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
<tsWPFCore:tsLayoutItem Label="Unidades Desechadas:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="29" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding UnidadesDesechadas, Converter={StaticResource DoubleToDecimalConverter}, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
<tsWPFCore:tsLayoutItem Label="Total Unidades:" FontWeight="Bold">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="39" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding TotalUnidades, Converter={StaticResource DoubleToDecimalConverter}, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
<tsWPFCore:tsLayoutItem Label="Unidades Disponibles:" FontWeight="Bold">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="39" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding UnidadesDisponibles, Converter={StaticResource DoubleToDecimalConverter}, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="700">
|
||||
<dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="200">
|
||||
<tsWPFCore:tsLayoutItem Label="Unidades Compradas:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="19" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding UnidadesCompradas, Converter={StaticResource DoubleToDecimalConverter}, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
<tsWPFCore:tsLayoutItem Label="Unidades Vendidas:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="24" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding UnidadesVendidas, Converter={StaticResource DoubleToDecimalConverter}, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="250">
|
||||
<tsWPFCore:tsLayoutItem Label="Unidades Subarrendadas:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="24" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding UnidadesSubAlquiladas, Converter={StaticResource DoubleToDecimalConverter}, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
<tsWPFCore:tsLayoutItem Label="Unidades Alquiladas:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="29" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding UnidadesAlquiladas, Converter={StaticResource DoubleToDecimalConverter}, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" VerticalAlignment="Bottom" >
|
||||
|
||||
<tsWPFCore:tsLayoutItem Label="Unidades En Reparación:">
|
||||
<tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="29" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding UnidadesAveriadas, Converter={StaticResource DoubleToDecimalConverter}, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPFCore:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="LayoutGroup" Orientation="Vertical">
|
||||
<TextBlock Margin="5,2,0,0" Text="(Stock Inicial + Unidades Compradas + Unidades Subarrendadas - Unidades Desechadas - Unidades Vendidas)" FontWeight="Bold" Height="22"></TextBlock>
|
||||
<TextBlock Margin="5,0,0,0" Text="(Total Unidades - Unidades Alquiladas - Unidades En Reparacion)" FontWeight="Bold"></TextBlock>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Stocks Por Empresas">
|
||||
<tsWPFCore:tsGridControl x:Name="gcStocksEmpresas" TabIndex="41">
|
||||
<tsWPFCore:tsGridControl.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsGridControl.PropiedadesTS>
|
||||
<tsWPFCore:tsGridControl.View>
|
||||
<tsWPFCore:tsTableView ShowGroupPanel="false" x:Name="tvStocksEmpresas" >
|
||||
</tsWPFCore:tsTableView>
|
||||
</tsWPFCore:tsGridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPFCore:tsGridColumn FieldName="NombreEmpresa" Header="Empresa" IsSmart="True" Width="300" SoloLectura="True" />
|
||||
<tsWPFCore:tsGridColumn FieldName="TotalUnidades" IsSmart="True" Width="95">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesCompradas" IsSmart="True" Width="130">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesAlquiladas" IsSmart="True" Width="130">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesAveriadas" IsSmart="True" Width="130">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesVendidas" IsSmart="True" Width="130">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesSubAlquiladas" IsSmart="True" Width="150">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesDesechadas" IsSmart="True" Width="130">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesDisponibles" IsSmart="True" Width="130">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
</tsWPFCore:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Desglose de Material">
|
||||
<tsWPFCore:tsGridControl x:Name="gcDesglose" NombreTablaBase="desgloseproductos" TabIndex="41">
|
||||
<tsWPFCore:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPFCore:PropiedadesTSGC CamposUnicos="idProducto" />
|
||||
</tsWPFCore:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPFCore:tsGridControl.View>
|
||||
<tsWPFCore:tsTableView ShowGroupPanel="false" x:Name="tvdesglose" IsDetailButtonVisibleBinding="{Binding Row.ContieneHijos}">
|
||||
<dxg:TableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="[ContieneHijos]" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Blue" FontWeight="Bold" />
|
||||
</dxg:FormatCondition>
|
||||
</dxg:TableView.FormatConditions>
|
||||
</tsWPFCore:tsTableView>
|
||||
</tsWPFCore:tsGridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPFCore:tsGridColumn FieldName="productos1.idProducto" Header="Código" IsSmart="True" Width="90" SoloLectura="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPFCore:tsGridColumn FieldName="productos1.Descripcion" Header="Descripcion" IsSmart="True" Width="250" SoloLectura="True" />
|
||||
<tsWPFCore:tsGridColumn FieldName="Unidades" Header="Unidades" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesMinimas" Header="Unidades Mínimas" IsSmart="True" Width="140">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesMaximas" Header="Unidades Máximas" IsSmart="True" Width="140">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.DetailDescriptor>
|
||||
<dxg:TabViewDetailDescriptor>
|
||||
<dxg:TabViewDetailDescriptor.DetailDescriptors>
|
||||
<dxg:DataControlDetailDescriptor ItemsSourcePath="productos1.desgloseproductos">
|
||||
<dxg:DataControlDetailDescriptor.DataControl>
|
||||
<tsWPFCore:tsGridControl x:Name="gcDesgloseHijos">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="tvDesgloseHijos" DetailHeaderContent="Desglose Producto" ShowGroupPanel="False" RowStyle="{StaticResource RejillaAnidadaStyle}" IsDetailButtonVisibleBinding="{Binding Row.ContieneHijos}" />
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPFCore:tsGridColumn FieldName="productos1.idProducto" Header="Código" IsSmart="True" Width="90" SoloLectura="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPFCore:tsGridColumn FieldName="productos1.Descripcion" Header="Descripcion" IsSmart="True" Width="250" SoloLectura="True" />
|
||||
<tsWPFCore:tsGridColumn FieldName="Unidades" Header="Unidades" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesMinimas" Header="Unidades Mínimas" IsSmart="True" Width="140">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesMaximas" Header="Unidades Máximas" IsSmart="True" Width="140">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
|
||||
<!--<dx:DXTabItem Header="Albaranes en los que aparece">
|
||||
<tsWPF:tsGridControl x:Name="gcAlbaranes" TabIndex="43">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowSearchPanelMode="Always" ShowTotalSummary="True" x:Name="tvProductosAoV" ShowGroupFooters="True" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
|
||||
<dxg:GridControl.DetailDescriptor>
|
||||
<dxg:TabViewDetailDescriptor>
|
||||
<dxg:TabViewDetailDescriptor.DetailDescriptors>
|
||||
<dxg:DataControlDetailDescriptor ItemsSourcePath="productos1.desgloseproductos">
|
||||
<dxg:DataControlDetailDescriptor.DataControl>
|
||||
<tsWPFCore:tsGridControl x:Name="gcDesgloseNietos">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="tvDesgloseNietos" DetailHeaderContent="Desglose Producto" ShowGroupPanel="False" RowStyle="{StaticResource RejillaAnidadaNietaStyle}" IsDetailButtonVisibleBinding="{Binding Row.ContieneHijos}" />
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPFCore:tsGridColumn FieldName="productos1.idProducto" Header="Código" IsSmart="True" Width="90" SoloLectura="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPFCore:tsGridColumn FieldName="productos1.Descripcion" Header="Descripcion" IsSmart="True" Width="250" SoloLectura="True" />
|
||||
<tsWPFCore:tsGridColumn FieldName="Unidades" Header="Unidades" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesMinimas" Header="Unidades Mínimas" IsSmart="True" Width="140">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
<tsWPFCore:tsGridColumn FieldName="UnidadesMaximas" Header="Unidades Máximas" IsSmart="True" Width="140">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPFCore:tsGridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
</tsWPFCore:tsGridControl>
|
||||
</dxg:DataControlDetailDescriptor.DataControl>
|
||||
</dxg:DataControlDetailDescriptor>
|
||||
</dxg:TabViewDetailDescriptor.DetailDescriptors>
|
||||
</dxg:TabViewDetailDescriptor>
|
||||
</dxg:GridControl.DetailDescriptor>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tsWPFCore:tsGridControl>
|
||||
</dxg:DataControlDetailDescriptor.DataControl>
|
||||
</dxg:DataControlDetailDescriptor>
|
||||
</dxg:TabViewDetailDescriptor.DetailDescriptors>
|
||||
</dxg:TabViewDetailDescriptor>
|
||||
</dxg:GridControl.DetailDescriptor>
|
||||
</tsWPFCore:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
|
||||
|
||||
<dx:DXTabItem Header="Albaranes en los que aparece">
|
||||
<tsWPFCore:tsGridControl x:Name="gcAlbaranes" TabIndex="43">
|
||||
<tsWPFCore:tsGridControl.PropiedadesTS>
|
||||
<tsWPFCore:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPFCore:tsGridControl.PropiedadesTS>
|
||||
<tsWPFCore:tsGridControl.View>
|
||||
<tsWPFCore:tsTableView ShowSearchPanelMode="Always" ShowTotalSummary="True" x:Name="tvProductosAoV" ShowGroupFooters="True" />
|
||||
</tsWPFCore:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="NumeroAlbaran" Header="Nº Albarán" IsSmart="True" Width="120" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="albaranes.Fecha" Header="Fecha" IsSmart="True" Width="150">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
@@ -129,71 +399,18 @@
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Entidad" Header="Cliente/Proveedor" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="albaranes.DescripcionEvento" Header="Evento" Width="300" />
|
||||
<dxg:GridColumn FieldName="albaranes.DescripcionObra" Header="Obra" Width="300" />
|
||||
<dxg:GridColumn FieldName="EsVenta" IsSmart="True" Width="60">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False">
|
||||
</dxe:CheckEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
</tsWPF:tsGridControl>
|
||||
</tsWPFCore:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Facturas en las que aparece">
|
||||
<tsWPF:tsGridControl x:Name="gcFacturas" TabIndex="43">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowSearchPanelMode="Always" ShowTotalSummary="True" x:Name="tvFacturas" ShowGroupFooters="True" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="NumeroFactura" Header="Nº Factura" IsSmart="True" Width="120" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="idFacturaNavigation.Fecha" Header="Fecha" IsSmart="True" Width="150">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="AlmacenOrigen" Header="Almacén Origen" IsSmart="True" Width="300" />
|
||||
<dxg:GridColumn FieldName="AlmacenDestino" Header="Almacén Destino" IsSmart="True" Width="300" />
|
||||
<dxg:GridColumn FieldName="Cantidad" Header="Cantidad" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Entidad" Header="Cliente/Proveedor" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="albaranes.DescripcionEvento" Header="Evento" Width="300" />
|
||||
<dxg:GridColumn FieldName="EsVenta" IsSmart="True" Width="60">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False">
|
||||
</dxe:CheckEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Registro de cambios">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcLogs" TabIndex="45">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvLogs" ShowSearchPanelMode="Default" ShowGroupPanel="False" />
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="idLog" Header="Nº Cambio" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaHora" Header="Fecha Hora Cambio">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Usuario" Header="Usuario" Width="250" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="ip" Header="Dirección IP" IsSmart="True" Width="150" />
|
||||
</dxg:GridControl.Columns>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>-->
|
||||
</dx:DXTabControl>
|
||||
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
</tsWPFCore:tsUserControl>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports System.Collections
|
||||
Imports tsWPFCore
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports System.Collections
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro.db.productos
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
Imports tsWPFCore
|
||||
|
||||
Public Class ucProducto
|
||||
|
||||
@@ -20,31 +19,31 @@ Public Class ucProducto
|
||||
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(productos))
|
||||
If ra.idUsuarioCreador.HasValue Then ra.idUsuarioCreadorNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuarioCreador.Value)
|
||||
If ra.idUsuarioModificador.HasValue Then ra.idUsuarioModificadorNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuarioModificador.Value)
|
||||
If bd.logs.Any(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "ARTICULOS") Then
|
||||
Dim entspol = bd.logs.First(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "ARTICULOS")
|
||||
Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(entspol.Log, GetType(List(Of articulos)))
|
||||
For Each d In ld
|
||||
ra.articulos.Add(d)
|
||||
Next
|
||||
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
|
||||
'Try
|
||||
' Dim log = bd.logs.First(Function(x) x.idLog = idLog)
|
||||
' ra = tsUtilidades.Utilidades.DeserializarSinErrores(log.LogXML, GetType(productos))
|
||||
' If ra.idUsuarioCreador.HasValue Then ra.idUsuarioCreadorNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuarioCreador.Value)
|
||||
' If ra.idUsuarioModificador.HasValue Then ra.idUsuarioModificadorNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuarioModificador.Value)
|
||||
' If bd.logs.Any(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "ARTICULOS") Then
|
||||
' Dim entspol = bd.logs.First(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "ARTICULOS")
|
||||
' Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(entspol.LogXML, GetType(List(Of articulos)))
|
||||
' For Each d In ld
|
||||
' ra.articulos.Add(d)
|
||||
' Next
|
||||
' 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 Estado = tsUtilidades.EstadosAplicacion.Nuevo OrElse _idproducto Is Nothing OrElse FuerzaNuevo Then
|
||||
ra = New productos
|
||||
'ra.TotalUnidades = 0
|
||||
'ra.UnidadesVendidas = 0
|
||||
'ra.UnidadesAlquiladas = 0
|
||||
'ra.UnidadesAveriadas = 0
|
||||
'ra.UnidadesDesechadas = 0
|
||||
'ra.FacturarComoVentaPorDefecto = False
|
||||
ra.TotalUnidades = 0
|
||||
ra.UnidadesVendidas = 0
|
||||
ra.UnidadesAlquiladas = 0
|
||||
ra.UnidadesAveriadas = 0
|
||||
ra.UnidadesDesechadas = 0
|
||||
ra.FacturarComoVentaPorDefecto = False
|
||||
Me.DataContext = ra
|
||||
_idproducto = Nothing
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
@@ -53,14 +52,17 @@ Public Class ucProducto
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
End If
|
||||
End If
|
||||
' Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idProducto AndAlso x.Aplicacion = "PRODUCTOS").ToList
|
||||
|
||||
' Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idProducto AndAlso x.Aplicacion = "PRODUCTOS").ToList
|
||||
Me.gcDesglose.ItemsSource = ra.DesgloseMaterial
|
||||
'Me.gcServicios.ItemsSource = ra.DesgloseServicios
|
||||
If ra.Servicio Then
|
||||
If ra.Tipo <> TipoProductoEnum.SERVICIO Then
|
||||
Me.gcStocksAlmacenes.ItemsSource = ObtieneISAlmacenes()
|
||||
Me.gcStocksEmpresas.ItemsSource = ra.DesgloseUnidades
|
||||
Else
|
||||
Me.gcStocksAlmacenes.ItemsSource = Nothing
|
||||
Me.gcStocksEmpresas.ItemsSource = Nothing
|
||||
End If
|
||||
Me.gcAlbaranes.ItemsSource = bd.detallesalbaranes.Include(Function(x) x.idAlbaranNavigation.idEntidadNavigation).Where(Function(x) x.idProducto = ra.idProducto).OrderByDescending(Function(x) x.idAlbaranNavigation.Fecha).ToList
|
||||
Me.DataContext = ra
|
||||
|
||||
' gcArticulos.ItemsSource = ra.articulos
|
||||
@@ -165,7 +167,8 @@ Public Class ucProducto
|
||||
Try
|
||||
|
||||
Dim idprs = ra.articulos.Where(Function(x) x.idProveedor.HasValue).Select(Function(x) x.idProveedor.Value).ToArray
|
||||
Me.cbTipo.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.productos.TipoProductoEnum)).ToList
|
||||
Me.cbTipo.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.productos.TipoProductoEnum)) _
|
||||
.OrderBy(Function(x) x.Valor).ToList
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
@@ -201,11 +204,34 @@ Public Class ucProducto
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub ucProducto_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar
|
||||
Try
|
||||
_idproducto = ra.idProducto
|
||||
ra.RefrescaCamposTemporales()
|
||||
If RecalcularStocks Then
|
||||
RecalcularStocks = False
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Recalculando Stocks ...")
|
||||
Dim lp As New List(Of productos)
|
||||
lp.Add(ra)
|
||||
bdGrupoSanchoToro.db.productos.RecalculaStocks(bd, lp)
|
||||
DXSplashScreen.Close()
|
||||
End If
|
||||
RefrescaUC()
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ucProducto_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "productos1.idproducto"
|
||||
Dim dp As desgloseproductos = Celda.Row
|
||||
Dim id As Integer = dp.idProducto
|
||||
Dim uc As New ucProducto(id)
|
||||
FuncionesDinamicas.AbrirAP(uc, OtrosParametros)
|
||||
'Case "idlog"
|
||||
' Dim log As logs = gcLogs.CurrentItem
|
||||
' Dim id As Integer = log.idLog
|
||||
@@ -215,9 +241,9 @@ Public Class ucProducto
|
||||
Case "almacen"
|
||||
Dim st As stocks = Celda.Row
|
||||
FuncionesDinamicas.AbrirAP(New ucAlmacen(st.idAlmacen), OtrosParametros)
|
||||
'Case "numeroalbaran"
|
||||
' Dim al As detallesalbaranes = Celda.Row
|
||||
' FuncionesDinamicas.AbrirAP(New ucAlbaran(al.idAlbaran), OtrosParametros)
|
||||
Case "numeroalbaran"
|
||||
Dim al As detallesalbaranes = Celda.Row
|
||||
FuncionesDinamicas.AbrirAP(New ucAlbaran(al.idAlbaran), OtrosParametros)
|
||||
Case "entidad"
|
||||
Dim da As detallesalbaranes = Celda.Row
|
||||
If da.idAlbaranNavigation.idEntidad.HasValue Then FuncionesDinamicas.AbrirAP(New ucEntidad(da.idAlbaranNavigation.idEntidad.Value), OtrosParametros)
|
||||
@@ -237,46 +263,42 @@ Public Class ucProducto
|
||||
|
||||
|
||||
Private RecalcularStocks As Boolean
|
||||
'Private Sub ucProducto_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, EliminacionManual As Integer) Handles Me.AntesGuardar
|
||||
' '
|
||||
' ' Esto se hace para evitar error duplicate entry en el intercambio de numero de series
|
||||
' '
|
||||
' Try
|
||||
' Dim bdtmp = tscGrupoSanchoToro.NuevoContexto()
|
||||
' Dim arts = bdtmp.articulos.Where(Function(x) x.idProducto = ra.idProducto).ToList
|
||||
' For Each art In arts
|
||||
' If ra.articulos.Any(Function(x) x.idArticulo <> art.idArticulo AndAlso art.CodigoArticulo = x.CodigoArticulo) Then
|
||||
' art.CodigoArticulo = Nothing
|
||||
' End If
|
||||
' Next
|
||||
' 'If Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
' ' Dim raant = bdtmp.productos.First(Function(x) x.idProducto = ra.idProducto)
|
||||
' ' If (ra.Tipo = TipoProductoEnum.ELEMENTO_FINAL_TRIBUNA OrElse ra.Tipo = TipoProductoEnum.ELEMENTO_FINAL_CARPA OrElse ra.Tipo <= TipoProductoEnum.OTROS) AndAlso
|
||||
' ' Not (raant.Tipo = TipoProductoEnum.ELEMENTO_FINAL_TRIBUNA OrElse raant.Tipo = TipoProductoEnum.ELEMENTO_FINAL_CARPA OrElse raant.Tipo <= TipoProductoEnum.OTROS) Then
|
||||
' ' RecalcularStocks = True
|
||||
' ' Else
|
||||
' ' If Not (ra.Tipo = TipoProductoEnum.ELEMENTO_FINAL_TRIBUNA OrElse ra.Tipo = TipoProductoEnum.ELEMENTO_FINAL_CARPA OrElse ra.Tipo <= TipoProductoEnum.OTROS) AndAlso
|
||||
' ' (raant.Tipo = TipoProductoEnum.ELEMENTO_FINAL_TRIBUNA OrElse raant.Tipo = TipoProductoEnum.ELEMENTO_FINAL_CARPA OrElse raant.Tipo <= TipoProductoEnum.OTROS) Then
|
||||
' ' For i = ra.stocks.Count - 1 To 0
|
||||
' ' bd.stocks.Remove(ra.stocks(i))
|
||||
' ' Next
|
||||
' ' ra.TotalUnidades = 0
|
||||
' ' ra.UnidadesInicialesOFabricadas = 0
|
||||
' ' ra.UnidadesCompradas = 0
|
||||
' ' ra.UnidadesVendidas = 0
|
||||
' ' ra.UnidadesAlquiladas = 0
|
||||
' ' ra.UnidadesAveriadas = 0
|
||||
' ' ra.UnidadesDesechadas = 0
|
||||
' ' ra.UnidadesSubAlquiladas = 0
|
||||
' ' End If
|
||||
' ' End If
|
||||
' 'End If
|
||||
Private Sub ucProducto_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, EliminacionManual As Integer) Handles Me.AntesGuardar
|
||||
'
|
||||
' Esto se hace para evitar error duplicate entry en el intercambio de numero de series
|
||||
'
|
||||
Try
|
||||
Dim bdtmp = tscGrupoSanchoToro.NuevoContexto()
|
||||
Dim arts = bdtmp.articulos.Where(Function(x) x.idProducto = ra.idProducto).ToList
|
||||
For Each art In arts
|
||||
If ra.articulos.Any(Function(x) x.idArticulo <> art.idArticulo AndAlso art.CodigoArticulo = x.CodigoArticulo) Then
|
||||
art.CodigoArticulo = Nothing
|
||||
End If
|
||||
Next
|
||||
If Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
Dim raant = bdtmp.productos.First(Function(x) x.idProducto = ra.idProducto)
|
||||
If ra.Tipo <> TipoProductoEnum.SERVICIO Then
|
||||
RecalcularStocks = True
|
||||
Else
|
||||
For i = ra.stocks.Count - 1 To 0
|
||||
bd.stocks.Remove(ra.stocks(i))
|
||||
Next
|
||||
ra.TotalUnidades = 0
|
||||
ra.UnidadesInicialesOFabricadas = 0
|
||||
ra.UnidadesCompradas = 0
|
||||
ra.UnidadesVendidas = 0
|
||||
ra.UnidadesAlquiladas = 0
|
||||
ra.UnidadesAveriadas = 0
|
||||
ra.UnidadesDesechadas = 0
|
||||
ra.UnidadesSubAlquiladas = 0
|
||||
End If
|
||||
End If
|
||||
|
||||
' bdtmp.GuardarCambios()
|
||||
' Catch ex As Exception
|
||||
' Throw New Exception(ex.Message, ex)
|
||||
' End Try
|
||||
'End Sub
|
||||
bdtmp.GuardarCambios()
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ucProducto_EstadoCambiado(EstadoAnterior As tsUtilidades.EstadosAplicacion, EstadoNuevo As tsUtilidades.EstadosAplicacion) Handles Me.EstadoCambiado
|
||||
If idLog.HasValue Then
|
||||
@@ -288,22 +310,22 @@ Public Class ucProducto
|
||||
Private Sub ucProducto_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
'Select Case idAccion
|
||||
' Case 1 ' AÑADIR PRODUCTOS AL DESGLOSE
|
||||
|
||||
|
||||
' Dim prsact = ra.DesgloseMaterial.Select(Function(x) x.idProducto).ToList
|
||||
' Dim maxasc = ra.NivelMaximoAscendientes
|
||||
' Dim lproductos = bd.productos.ToList.Where(Function(x) (maxasc + x.NivelMaximoDescendientes) < 3 AndAlso ra.ContieneAscendiente(x.idProducto) = False AndAlso prsact.Contains(x.idProducto) = False).ToList
|
||||
' Dim dxw As New dxwProductos(lproductos)
|
||||
' If dxw.ShowDialog Then
|
||||
' Dim prod = lproductos.First(Function(x) x.idProducto = dxw.idProducto)
|
||||
' Dim nd As New desgloseproductos
|
||||
' With nd
|
||||
' .idProductoNavigation = prod
|
||||
' .Unidades = 1
|
||||
' .UnidadesMaximas = 1
|
||||
' .UnidadesMinimas = 1
|
||||
' End With
|
||||
' ra.desgloseproductosidProductoNavigation.Add(nd)
|
||||
' ra.RefrescaCamposTemporales()
|
||||
' End If
|
||||
'End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ucProducto_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, EliminacionManual As Integer) Handles Me.AntesGuardar
|
||||
ra.idEmpresa = EmpresaActual.idEmpresa
|
||||
Dim hte As New Hashtable
|
||||
ra.idEmpresa = EmpresaActual.idEmpresa
|
||||
Dim almexi = bd.productos.FirstOrDefault(Function(x) x.idProducto <> ra.idProducto AndAlso x.Descripcion = ra.Descripcion AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
If almexi IsNot Nothing Then
|
||||
hte.Add("ALMACENAR-PRODUCTO_DUPLIADO", "Producto Duplicado")
|
||||
End If
|
||||
If hte.Count > 0 Then
|
||||
MensajesError = hte
|
||||
Cancelar = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -60,14 +60,14 @@ Public Class ucProductos
|
||||
|
||||
Public Overrides Function EstableceDCPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
If Refrescar OrElse Background Then ObtieneproductosAsync(bd, Background)
|
||||
'If Me.ContenedorAplicacion.cbAcciones.ItemsSource Is Nothing Then
|
||||
' Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
' Acciones.Add(New Accion With {
|
||||
' .idAccion = 1,
|
||||
' .Descripcion = "CORREGIR STOCK"})
|
||||
' Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
' Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
'End If
|
||||
If Me.ContenedorAplicacion.cbAcciones.ItemsSource Is Nothing Then
|
||||
Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 1,
|
||||
.Descripcion = "CORREGIR STOCK"})
|
||||
Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
End If
|
||||
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
|
||||
@@ -128,7 +128,7 @@ Public Class ucProductos
|
||||
End Sub
|
||||
Public Function Obtieneproductos(TextoBusqueda As String, IncluirBajas As Boolean) As List(Of productos)
|
||||
|
||||
Dim iqPr = bd.productos.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
Dim iqPr = bd.productos.AsQueryable
|
||||
If IncluirBajas Then iqPr = iqPr.Where(Function(x) x.FechaBaja Is Nothing).OrderBy(Function(x) x.Descripcion)
|
||||
Dim rs As List(Of productos)
|
||||
Do
|
||||
@@ -187,6 +187,19 @@ Public Class ucProductos
|
||||
teBusqueda.SelectAll()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub ucProductos_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
Try
|
||||
Select Case idAccion
|
||||
Case 1 ' RECALCULA STOCKS DE TODOS LOS PRODUCTOS
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Recalculando stocks ...")
|
||||
Dim lp = bd.detallesalbaranes.Where(Function(x) x.idAlbaranRecogida.HasValue = False).Select(Function(x) x.idProductoNavigation).Distinct().ToList()
|
||||
bdGrupoSanchoToro.db.productos.RecalculaStocks(bd, lp)
|
||||
DXSplashScreen.Close()
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -124,7 +124,7 @@ Public Class ucFacturasEmitidas
|
||||
Dim iNumExc As Integer = 0
|
||||
Do
|
||||
Try
|
||||
rs = bd.facturas.Where(Function(x) x.idClienteNavigation.idEmpresa = EmpresaActual.idEmpresa).Include(Function(x) x.idSerieFacturaNavigation).Include(Function(x) x.movimientoscaja).Include(Function(x) x.idClienteNavigation).Include(Function(x) x.idEventoNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation).Include(Function(x) x.idUsuarioNavigation).AsQueryable
|
||||
rs = bd.facturas.Where(Function(x) x.idClienteNavigation.idEmpresa = EmpresaActual.idEmpresa).Include(Function(x) x.idSerieFacturaNavigation).Include(Function(x) x.movimientoscaja).Include(Function(x) x.idClienteNavigation).Include(Function(x) x.idObraNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation).Include(Function(x) x.idUsuarioNavigation).AsQueryable
|
||||
|
||||
If FechaInicio.HasValue Then
|
||||
rs = rs.Where(Function(x) x.FechaFactura >= FechaInicio.Value)
|
||||
|
||||
@@ -35,7 +35,7 @@ Public Class dxwInicio
|
||||
Comun.dg = Me.grupodoc
|
||||
tsWPFCore.Configuracion.ModoBusquedaAND = True
|
||||
tsWPFCore.Configuracion.ComportamientoValidacion = DevExpress.Xpf.Editors.Validation.InvalidValueBehavior.AllowLeaveEditor
|
||||
' tsWPFCore.Configuracion.ModoEventosContextoSavingChanges = ModoContextoSavingChangesEnum.SoloDespuesGuardar
|
||||
' tsWPFCore.Configuracion.ModoObrasContextoSavingChanges = ModoContextoSavingChangesEnum.SoloDespuesGuardar
|
||||
tsWPFCore.Configuracion.MostrarBotonCerrarEnPestaña = True
|
||||
bdGrupoSanchoToro.db.Utilidades.DirectorioLogs = "c:\m3soft\logs\"
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="eventos.Direccion" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="Obras.Direccion" />
|
||||
<dxg:GridSummaryItem FieldName="TotalBaseImponible" SummaryType="Sum" ShowInGroupColumnFooter="TotalBaseImponible" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalIVA" SummaryType="Sum" ShowInGroupColumnFooter="IVA" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
@@ -213,7 +213,7 @@
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.GroupSummary>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="eventos.Direccion" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="Obras.Direccion" />
|
||||
<dxg:GridSummaryItem FieldName="TotalBaseImponible" SummaryType="Sum" ShowInGroupColumnFooter="TotalBaseImponible" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalIVA" SummaryType="Sum" ShowInGroupColumnFooter="TotalIVA" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
|
||||
@@ -174,9 +174,9 @@
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="DireccionEvento" Header="Dirección Obra" Width="350" />
|
||||
<dxg:GridColumn FieldName="PoblacionEvento" Header="Población Obra" IsSmart="True" Width="300" />
|
||||
<dxg:GridColumn FieldName="ProvinciaEvento" Header="Provincia Obra" IsSmart="True" Width="150" />
|
||||
<dxg:GridColumn FieldName="DireccionObra" Header="Dirección Obra" Width="350" />
|
||||
<dxg:GridColumn FieldName="PoblacionObra" Header="Población Obra" IsSmart="True" Width="300" />
|
||||
<dxg:GridColumn FieldName="ProvinciaObra" Header="Provincia Obra" IsSmart="True" Width="150" />
|
||||
<dxg:GridColumn FieldName="TotalBaseImponible" IsSmart="True" Width="100" Header="Base Imponible">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
@@ -208,7 +208,7 @@
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<tsWPF:tsGridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="eventos.Direccion" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="Obras.Direccion" />
|
||||
<dxg:GridSummaryItem FieldName="TotalBaseImponible" SummaryType="Sum" ShowInGroupColumnFooter="TotalBaseImponible" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="IVA" SummaryType="Sum" ShowInGroupColumnFooter="IVA" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
@@ -216,7 +216,7 @@
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.GroupSummary>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="eventos.Direccion" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="Obras.Direccion" />
|
||||
<dxg:GridSummaryItem FieldName="TotalBaseImponible" SummaryType="Sum" ShowInGroupColumnFooter="TotalBaseImponible" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="IVA" SummaryType="Sum" ShowInGroupColumnFooter="IVA" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
@@ -268,7 +268,7 @@
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Obras">
|
||||
<tsWPF:tsGridControl x:Name="gcObras" NombreTablaBase="eventos" TabIndex="23">
|
||||
<tsWPF:tsGridControl x:Name="gcObras" NombreTablaBase="Obras" TabIndex="23">
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
|
||||
@@ -49,9 +49,9 @@ Public Class ucEntidad
|
||||
If ra.idUsuarioModificador.HasValue Then ra.idUsuarioModificadorNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuarioModificador.Value)
|
||||
If bd.logs.Any(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "OBRAS") Then
|
||||
Dim entspol = bd.logs.First(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "OBRAS")
|
||||
Dim ld = tsUtilidades.Utilidades.deserializarsinerrores(entspol.Log, GetType(List(Of eventos)))
|
||||
Dim ld = tsUtilidades.Utilidades.deserializarsinerrores(entspol.Log, GetType(List(Of obras)))
|
||||
For Each d In ld
|
||||
ra.eventos.Add(d)
|
||||
ra.Obras.Add(d)
|
||||
Next
|
||||
End If
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
@@ -72,7 +72,7 @@ Public Class ucEntidad
|
||||
End If
|
||||
End If
|
||||
|
||||
gcFacturasEmitidas.ItemsSource = bd.facturas.Include(Function(x) x.idEventoNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation).Include(Function(x) x.movimientoscaja).Where(Function(x) x.idCliente = ra.idEntidad).OrderByDescending(Function(x) x.FechaFactura).ThenByDescending(Function(x) x.NumeroFactura).ToList
|
||||
gcFacturasEmitidas.ItemsSource = bd.facturas.Include(Function(x) x.idObraNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation).Include(Function(x) x.movimientoscaja).Where(Function(x) x.idCliente = ra.idEntidad).OrderByDescending(Function(x) x.FechaFactura).ThenByDescending(Function(x) x.NumeroFactura).ToList
|
||||
gcFacturasRecibidas.ItemsSource = bd.facturasrecibidas.Where(Function(x) x.idProveedor = ra.idEntidad).OrderByDescending(Function(x) x.FechaFactura).ToList
|
||||
gcExpediente.ItemsSource = ra.expedientesentidades
|
||||
Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idEntidad AndAlso x.Aplicacion = "ENTIDADES" AndAlso x.idRelacionado Is Nothing).OrderByDescending(Function(x) x.idLog).ToList
|
||||
|
||||
Reference in New Issue
Block a user