Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -666,6 +666,16 @@ Partial Class Inventarios_RecepcionUsados
|
||||
TxtRemision.Text = ""
|
||||
DivRemision.Visible = False
|
||||
|
||||
If ObjFactura IsNot Nothing Then
|
||||
ObjFactura.Dispose()
|
||||
ObjFactura = Nothing
|
||||
End If
|
||||
|
||||
If ObjRemisionNC IsNot Nothing Then
|
||||
ObjRemisionNC.Dispose()
|
||||
ObjRemisionNC = Nothing
|
||||
End If
|
||||
|
||||
UpRegistroTipoCambio.Update()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
@@ -1021,16 +1031,17 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim GenerarRNC As Boolean = False
|
||||
'SI ES DISTRIBUIDOR Y NO VIENE DE REMISION, GENERA UNA REMISION DE NOTA DE CREDITO
|
||||
If EsDistribuidor AndAlso Me.CveRemisionRecibida <= 0 Then
|
||||
GenerarRNC = True
|
||||
Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero()
|
||||
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}").ToEntero
|
||||
|
||||
CreaRemisionNC(CveCliente, CveSubProyecto, 1)
|
||||
End If
|
||||
|
||||
If Me.ObjRemisionNC IsNot Nothing Then
|
||||
If GenerarRNC AndAlso Me.ObjRemisionNC IsNot Nothing Then
|
||||
Dim sb As New StringBuilder()
|
||||
sb.Append($"Se va a generar un documento de tipo 'Remisión de nota de crédito'.<br> ¿Esta seguro que desea guardar?:<br/>")
|
||||
|
||||
@@ -1115,13 +1126,13 @@ Partial Class Inventarios_RecepcionUsados
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate)
|
||||
Else
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True) Then
|
||||
Mensaje = "Error al actualizar el recibo de los usados"
|
||||
@@ -1143,34 +1154,34 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
|
||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
|
||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
|
||||
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
|
||||
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
|
||||
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
|
||||
'Limpia Valores cuando inserta de campos especiales
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlSubProyecto.SelectedValueExist("-1")
|
||||
End If
|
||||
|
||||
EnvioCorreo()
|
||||
|
||||
CargaPendientesRecibir()
|
||||
UPDatos.Update()
|
||||
|
||||
Else
|
||||
ObjInventario.RollBack() 'deshace lo insertado
|
||||
CveMovimiento = 0
|
||||
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
|
||||
'Limpia Valores cuando inserta de campos especiales
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlSubProyecto.SelectedValueExist("-1")
|
||||
End If
|
||||
|
||||
EnvioCorreo()
|
||||
|
||||
CargaPendientesRecibir()
|
||||
UPDatos.Update()
|
||||
|
||||
Else
|
||||
ObjInventario.RollBack() 'deshace lo insertado
|
||||
CveMovimiento = 0
|
||||
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjInventario.RollBack() 'deshace lo insertado
|
||||
CveMovimiento = 0
|
||||
@@ -2033,8 +2044,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Private Sub CreaRemisionNC(CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer)
|
||||
Me.ObjRemisionNC = New Modelos.Factura(UsuarioActual)
|
||||
|
||||
Dim Folio As String = ""
|
||||
Dim Serie As String = ""
|
||||
'Dim Folio As String = ""
|
||||
'Dim Serie As String = ""
|
||||
|
||||
'Dim ObjFolios As New ClsGralFolios()
|
||||
'If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then
|
||||
@@ -2647,7 +2658,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Protected Sub CargaTipoDefecto()
|
||||
DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlTipoDefecto.DataBind
|
||||
DdlTipoDefecto.DataBind()
|
||||
End Sub
|
||||
Private Sub CalculaPorcentajeAjuste()
|
||||
Try
|
||||
|
||||
@@ -176,6 +176,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ViewState("FolioBusqueda") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtCamiones As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtCamiones"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtCamiones") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -635,7 +643,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
'VALIDA TRANSITORIO
|
||||
If ChkTransitorio.Checked Then
|
||||
If TxtResponsable.Text.Trim = "" Then
|
||||
If TxtResponsable.Text.Trim = "" And Not UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
Alert("Debe seleccionar un responsable para el traspaso transitorio.", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
|
||||
@@ -648,6 +656,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlChofer.SelectedValue.ToEntero <= 0 And UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
Alert("Debe seleccionar un Chofer", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'VALIDA ALMACEN DISTINTA SUCURSAL DEBE SER TRANSITORIO
|
||||
@@ -2790,6 +2805,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
DdlUnidadCamion.DataSource = ObjInventarios.DtResultados
|
||||
DtCamiones = ObjInventarios.DtResultados
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
DdlUnidadCamion.Items.Insert(0, New ListItem("Otro", "-1"))
|
||||
@@ -2808,11 +2824,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Private Sub DdlUnidadCamion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlUnidadCamion.SelectedIndexChanged
|
||||
If DdlUnidadCamion.SelectedValue = "-1" Then
|
||||
divPlacaEspecificacion.Visible = True
|
||||
Else
|
||||
divPlacaEspecificacion.Visible = False
|
||||
'divPlacaEspecificacion.Visible = True
|
||||
TxtPlaca.Text = ""
|
||||
TxtEspecifUnidad.Text = ""
|
||||
Else
|
||||
'divPlacaEspecificacion.Visible = False
|
||||
TxtPlaca.Text = DtCamiones.FiltroPrimeroValor("Placa", String.Format("CveCamion = {0}", DdlUnidadCamion.SelectedValue))
|
||||
TxtEspecifUnidad.Text = DtCamiones.FiltroPrimeroValor("Especificacion", String.Format("CveCamion = {0}", DdlUnidadCamion.SelectedValue))
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user