-- cambios en secciones, en base su clasificacion del PS

This commit is contained in:
rrene
2020-07-31 16:53:08 -07:00
parent ded346da9b
commit 339d23a9e1
6 changed files with 155 additions and 108 deletions

View File

@@ -15,6 +15,7 @@ Imports CrystalDecisions.ReportSource
Imports Stimulsoft.Report Imports Stimulsoft.Report
Imports System.Xml Imports System.Xml
Imports System.Web.Http.ValueProviders Imports System.Web.Http.ValueProviders
Imports ADServerControl
'NOTA AD TEAM 'NOTA AD TEAM
@@ -8117,5 +8118,21 @@ Public Class ClsPaginas
If AplicaTodos <> "" Then DdlSubProyecto.Items.Insert(0, New ListItem(AplicaTodos, "-1")) If AplicaTodos <> "" Then DdlSubProyecto.Items.Insert(0, New ListItem(AplicaTodos, "-1"))
End If End If
End Sub End Sub
Public Sub CargaSeccionesAlmacen(ByRef DdlSeccionAlmacen As DropDownList, CveAlmacen As Integer, CvePS As Integer, CveEmpresa As Integer, Optional IncluyeSeleccione As Boolean = False)
DdlSeccionAlmacen.Items.Clear()
DdlSeccionAlmacen.ClearSelection()
Dim dtsec As DataTable = GlobalDTInvPSSeccionesAlmacen(CveEmpresa, CveAlmacen, CvePS)
DdlSeccionAlmacen.DataSource = dtsec
DdlSeccionAlmacen.DataBind()
If dtsec.Rows.Count = 1 Then
DdlSeccionAlmacen.SelectedIndex = 0
DdlSeccionAlmacen.Enabled = False
Else 'si es mayor a uno que por default seleccione el primero, que seria el predeterminado
DdlSeccionAlmacen.SelectedValueExist(dtsec.FiltroPrimeroValor("CveSeccionAlmacen", "Predeterminado = 1"))
If IncluyeSeleccione Then DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
dtsec.Dispose()
End Sub
End Class End Class

View File

@@ -80,7 +80,7 @@
<asp:TemplateField ItemStyle-Width="7%"> <asp:TemplateField ItemStyle-Width="7%">
<ItemTemplate> <ItemTemplate>
<%--<asp:Literal ID="LtlExistencia" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>'></asp:Literal>--%> <%--<asp:Literal ID="LtlExistencia" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>'></asp:Literal>--%>
<asp:TextBox ID="TxtCantidad" runat="server" Enabled="false" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>' Width="100%" /> <asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>' Width="100%" />
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator> <asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -91,7 +91,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Nueva Seccion" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Nueva Seccion" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:DropDownList ID="DDlS" runat="server" Width="150px" DataValueField="CveSeccion" DataTextField="Seccion" class="select2me"></asp:DropDownList> <asp:DropDownList ID="DDlS" runat="server" Width="150px" DataValueField="CveSeccionAlmacen" DataTextField="SeccionAlmacen" class="select2me"></asp:DropDownList>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>

View File

@@ -46,9 +46,10 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
CargaSeccionesAlmacen(e.Row.FCDropDownList("DDlS"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero) 'e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
e.Row.FCDropDownList("DDlS").DataBind() 'e.Row.FCDropDownList("DDlS").DataBind()
Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal
e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0 e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0
@@ -132,9 +133,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
'actualizamos el PS, para que tenga el aplica seccion 'actualizamos el PS, para que tenga el aplica seccion
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True) ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then 'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
ErrorMovInv = True ' ErrorMovInv = True
End If 'End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True ErrorMovInv = True
@@ -381,9 +382,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
'ACTUALIZAMOS EL PS, PARA QUE TENGA EL APLICA SECCION 'ACTUALIZAMOS EL PS, PARA QUE TENGA EL APLICA SECCION
ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True) ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True)
If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then 'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
ErrorMovInv = True ' ErrorMovInv = True
End If 'End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True ErrorMovInv = True
@@ -459,11 +460,11 @@ Partial Class Inventarios_AjustesSeccionAlmacen
End Sub End Sub
Protected Sub Chk_Click(sender As Object, e As EventArgs) Protected Sub Chk_Click(sender As Object, e As EventArgs)
Dim row As GridViewRow = (CType((CType(sender, CheckBox)).NamingContainer, GridViewRow)) 'Dim row As GridViewRow = (CType((CType(sender, CheckBox)).NamingContainer, GridViewRow))
Dim ExistenciaBackup As Integer = row.DataKey("Existencia").ToEntero() 'Dim ExistenciaBackup As Integer = row.DataKey("Existencia").ToEntero()
row.FCTextBox("TxtCantidad").Enabled = Not row.FCTextBox("TxtCantidad").Enabled 'row.FCTextBox("TxtCantidad").Enabled = Not row.FCTextBox("TxtCantidad").Enabled
If Not row.FCTextBox("TxtCantidad").Enabled Then 'If Not row.FCTextBox("TxtCantidad").Enabled Then
row.FCTextBox("TxtCantidad").Text = ExistenciaBackup ' row.FCTextBox("TxtCantidad").Text = ExistenciaBackup
End If 'End If
End Sub End Sub
End Class End Class

View File

@@ -2187,10 +2187,12 @@ Partial Class Inventarios_EntradasSalidas
End If End If
If CBool(dr("AplicaSeccion")) Then If CBool(dr("AplicaSeccion")) Then
divSeccionAlmacen.Visible = True divSeccionAlmacen.Visible = True
DdlSeccionAlmacen.Items.Clear() 'DdlSeccionAlmacen.Items.Clear()
DdlSeccionAlmacen.ClearSelection() 'DdlSeccionAlmacen.ClearSelection()
DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero) 'DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero)
DdlSeccionAlmacen.DataBind() 'DdlSeccionAlmacen.DataBind()
CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
End If End If
If CBool(dr("AplicaCaducidad")) Then If CBool(dr("AplicaCaducidad")) Then
divCaducidad.Visible = True divCaducidad.Visible = True

View File

@@ -7,6 +7,7 @@ Imports System.IO
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports Stimulsoft.Base.Indicator
Partial Class Inventarios_EntregaAlmacen Partial Class Inventarios_EntregaAlmacen
Inherits ClsPaginas Inherits ClsPaginas
@@ -886,13 +887,14 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(e.Row.DBCampo("AplicaSeccion")) Then If CBool(e.Row.DBCampo("AplicaSeccion")) Then
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
If DdlAlmacen.SelectedValue.ToEntero > 0 Then If DdlAlmacen.SelectedValue.ToEntero > 0 Then
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero) CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa, True)
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt 'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind() 'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
If dtt.Rows.Count > 1 Then 'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) 'If dtt.Rows.Count > 1 Then
End If ' e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
dtt.Dispose() 'End If
'dtt.Dispose()
End If End If
Else Else
@@ -2009,6 +2011,7 @@ Partial Class Inventarios_EntregaAlmacen
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows For Each Dr1 As DataRow In DtDetalle.Rows
If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr1("Serie").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr1("Serie").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
Dim CveSeccionAlmacen As Integer = 0
For Each Dr2 As DataRow In ObjInventario.DtResultados.FiltraParametros("CveAlmacen > 0 AND ExistenciaFinal > 0").Rows For Each Dr2 As DataRow In ObjInventario.DtResultados.FiltraParametros("CveAlmacen > 0 AND ExistenciaFinal > 0").Rows
'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO 'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO
@@ -2038,8 +2041,14 @@ Partial Class Inventarios_EntregaAlmacen
CantidadPendiente = 1 CantidadPendiente = 1
If CBool(Dr("AplicaSeccion")) Then
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr2("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr2("CveAlmacen"), Dr("CvePS"), CveSeccionAlmacen)
Else
CveSeccionAlmacen = -1
End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
ErrorMovInv = True ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un Error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") TextoError.AppendFormat("Ocurrió un Error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
Exit For Exit For
@@ -2469,7 +2478,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim CveMovimientoSalidaApartado = -1 Dim CveMovimientoSalidaApartado = -1
Dim CveAlmacenApartado = -1 Dim CveAlmacenApartado = -1
Dim CveAlmacenOrigen = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero) Dim CveAlmacenOrigen = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero)
Dim CveSeccionAlmacen As Integer = 0
For Each Dr As DataRow In DtTempApartados.Rows For Each Dr As DataRow In DtTempApartados.Rows
If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString.ToEntero Then If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString.ToEntero Then
@@ -2492,8 +2501,13 @@ Partial Class Inventarios_EntregaAlmacen
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados") TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
Exit For Exit For
End If End If
If CBool(Dr("AplicaSeccion")) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenOrigen, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", CveAlmacenOrigen, Dr("CvePS"), CveSeccionAlmacen)
Else
CveSeccionAlmacen = -1
End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
ErrorMovInv = True ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados") TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
Exit For Exit For
@@ -2521,7 +2535,14 @@ Partial Class Inventarios_EntregaAlmacen
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then If CBool(Dr("AplicaSeccion")) Then
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS"), CveSeccionAlmacen)
Else
CveSeccionAlmacen = -1
End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
ErrorMovInv = True ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
Exit For Exit For
@@ -3212,71 +3233,75 @@ Partial Class Inventarios_EntregaAlmacen
tCvecliente = dr("CveCliente").ToString.ToEntero tCvecliente = dr("CveCliente").ToString.ToEntero
Dim drC As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=tCvecliente).FiltroPrimero("") Dim drC As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=tCvecliente).FiltroPrimero("")
Destinatario += String.Format(";{0};{1}", drC("CorreoEntregaCompras"), drC("CorreoEntregaAlmacen")) If drC IsNot Nothing Then
Dim ClienteNombre As String = dr("ClienteNombre").ToString() Destinatario += String.Format(";{0};{1}", drC("CorreoEntregaCompras"), drC("CorreoEntregaAlmacen"))
Dim FolioVenta As String = dr("SerieFolio").ToString()
Dim Pedido As String = dr("PedidoContrato").ToString()
Dim OrdenCompra As String = dr("OrdenCompra").ToString()
Dim CveVenta As Integer = dr("CveVenta").ToString().ToEntero()
Dim TipoDocto As String = dr("TipoDocto").ToString()
Dim dtDetalle As New DataTable Dim ClienteNombre As String = dr("ClienteNombre").ToString()
If ObjVentas.GetVentaDetalle(CveVenta) Then Dim FolioVenta As String = dr("SerieFolio").ToString()
dtDetalle = ObjVentas.DtResultados Dim Pedido As String = dr("PedidoContrato").ToString()
Dim OrdenCompra As String = dr("OrdenCompra").ToString()
Dim CveVenta As Integer = dr("CveVenta").ToString().ToEntero()
Dim TipoDocto As String = dr("TipoDocto").ToString()
Dim dtDetalle As New DataTable
If ObjVentas.GetVentaDetalle(CveVenta) Then
dtDetalle = ObjVentas.DtResultados
End If
Dim DetalleTable As String = ""
For Each dRow As DataRow In dtDetalle.Rows
Dim detalle As String = String.Format("<tr><td style='width:25%'>{0}</td><td style='width:25%'>{1}</td><td style='width:50%'>{2}</td></tr>", dRow("Codigo"), dRow("Cantidad"), dRow("PS"))
DetalleTable += detalle
Next
strBody.Append("<html>")
strBody.Append("<head>")
strBody.Append("<meta charset='UTF-8'>")
strBody.Append("</head>")
strBody.Append(" <body style='width:800px'>")
strBody.Append("<div>")
strBody.Append($"<img src='http://sig.adssistemas.mx/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>")
strBody.Append("</div>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
strBody.Append($" Apreciable {ClienteNombre}, le confirmamos los")
strBody.Append(" productos surtidos y entregados en mostrador conforme a la")
strBody.Append($" {TipoDocto}:")
strBody.Append(" </p>")
strBody.Append($" <p style='width:100%;text-align:center;font-family:Segoe UI Semibold;font-size:12pt'>{FolioVenta} - Pedido {Pedido} - Orden de Compra {OrdenCompra}</P>")
strBody.Append(" <div style='width:100%;text-align:center'>")
strBody.Append(" <table style='width:100%;font-family:Segoe UI Semibold;font-size:12pt'>")
strBody.Append(DetalleTable)
strBody.Append(" ")
strBody.Append(" </table>")
strBody.Append(" </div>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
strBody.Append(" Se entregaron los productos conforme a las especificaciones de su pedido y verificamos que no se presentara alguno de los siguientes inconvenientes:")
strBody.Append(" </p>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
strBody.Append(" • Empaque violado.<br/>")
strBody.Append("• Daño físico en la caja.<br/>")
strBody.Append("• Producto incompleto o distinto al solicitado.<br/>")
strBody.Append("• Alguna otra situación que se considere que compromete la integridad de la mercancía.<br/>")
strBody.Append("")
strBody.Append(" </p>")
strBody.Append(" <br/>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
strBody.Append($" Aceptando a entera satisfacción a las {Today.Hour}:{Today.Minute} hrs del {Today.ToString}")
strBody.Append(" </p>")
strBody.Append(" <br/>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
strBody.Append(" Gracias por su compra <br/>")
'strBody.Append(" Compuproveedores")
strBody.Append(" </p>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%;text-align:center'>")
strBody.Append(" Sigue disfrutando de nuestros productos y servicios<br/>")
'strBody.Append(" <a href='https://www.compuproveedoresti.com/'>www.compuproveedores.com</a>")
strBody.Append("")
strBody.Append(" </p>")
strBody.Append(" </body>")
strBody.Append("</html>")
End If End If
Dim DetalleTable As String = ""
For Each dRow As DataRow In dtDetalle.Rows
Dim detalle As String = String.Format("<tr><td style='width:25%'>{0}</td><td style='width:25%'>{1}</td><td style='width:50%'>{2}</td></tr>", dRow("Codigo"), dRow("Cantidad"), dRow("PS"))
DetalleTable += detalle
Next
strBody.Append("<html>")
strBody.Append("<head>")
strBody.Append("<meta charset='UTF-8'>")
strBody.Append("</head>")
strBody.Append(" <body style='width:800px'>")
strBody.Append("<div>")
strBody.Append($"<img src='http://sig.adssistemas.mx/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>")
strBody.Append("</div>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
strBody.Append($" Apreciable {ClienteNombre}, le confirmamos los")
strBody.Append(" productos surtidos y entregados en mostrador conforme a la")
strBody.Append($" {TipoDocto}:")
strBody.Append(" </p>")
strBody.Append($" <p style='width:100%;text-align:center;font-family:Segoe UI Semibold;font-size:12pt'>{FolioVenta} - Pedido {Pedido} - Orden de Compra {OrdenCompra}</P>")
strBody.Append(" <div style='width:100%;text-align:center'>")
strBody.Append(" <table style='width:100%;font-family:Segoe UI Semibold;font-size:12pt'>")
strBody.Append(DetalleTable)
strBody.Append(" ")
strBody.Append(" </table>")
strBody.Append(" </div>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
strBody.Append(" Se entregaron los productos conforme a las especificaciones de su pedido y verificamos que no se presentara alguno de los siguientes inconvenientes:")
strBody.Append(" </p>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
strBody.Append(" • Empaque violado.<br/>")
strBody.Append("• Daño físico en la caja.<br/>")
strBody.Append("• Producto incompleto o distinto al solicitado.<br/>")
strBody.Append("• Alguna otra situación que se considere que compromete la integridad de la mercancía.<br/>")
strBody.Append("")
strBody.Append(" </p>")
strBody.Append(" <br/>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
strBody.Append($" Aceptando a entera satisfacción a las {Today.Hour}:{Today.Minute} hrs del {Today.ToString}")
strBody.Append(" </p>")
strBody.Append(" <br/>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
strBody.Append(" Gracias por su compra <br/>")
'strBody.Append(" Compuproveedores")
strBody.Append(" </p>")
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%;text-align:center'>")
strBody.Append(" Sigue disfrutando de nuestros productos y servicios<br/>")
'strBody.Append(" <a href='https://www.compuproveedoresti.com/'>www.compuproveedores.com</a>")
strBody.Append("")
strBody.Append(" </p>")
strBody.Append(" </body>")
strBody.Append("</html>")
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()

View File

@@ -1267,21 +1267,23 @@ Partial Class Inventarios_RecepcionAlmacen
If CBool(e.Row.DBCampo("AplicaSeccion")) Then If CBool(e.Row.DBCampo("AplicaSeccion")) Then
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
If DdlAlmacen.SelectedValue.ToEntero > 0 Then If DdlAlmacen.SelectedValue.ToEntero > 0 Then
Dim dtsec As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtsec
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
If dtsec.Rows.Count = 1 Then
e.Row.FCDropDownList("DdlSeccionAlmacen").SelectedIndex = 0
e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
Else 'si es mayor a uno que por default seleccione el primero, que seria el predeterminado
e.Row.FCDropDownList("DdlSeccionAlmacen").SelectedValueExist(dtsec.FiltroPrimeroValor("CveSeccionAlmacen", "Predeterminado = 1"))
End If
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa, True)
'Dim dtsec As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtsec
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
'If dtsec.Rows.Count = 1 Then
' e.Row.FCDropDownList("DdlSeccionAlmacen").SelectedIndex = 0
' e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
'Else 'si es mayor a uno que por default seleccione el primero, que seria el predeterminado
' e.Row.FCDropDownList("DdlSeccionAlmacen").SelectedValueExist(dtsec.FiltroPrimeroValor("CveSeccionAlmacen", "Predeterminado = 1"))
'End If
dtsec.Dispose() 'e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
e.Row.FCTextBox("TxtDividir").Visible = True 'dtsec.Dispose()
End If
e.Row.FCTextBox("TxtDividir").Visible = True
Else Else
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False