merge con el local

This commit is contained in:
Antonio Gonzalez
2019-12-11 11:26:14 -07:00
22 changed files with 550 additions and 369 deletions

View File

@@ -301,10 +301,11 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteDesarmado.SelectedValue.ToEntero).FiltroPrimeroValor("CveUM").ToEntero
CveVendedor = If(RowApartadosDesarmado.Visible, DdlVendedorDesarmado.SelectedValue.ToEntero, -1)
CveCliente = If(RowClienteDesarmado.Visible, DdlClienteDesarmado.SelectedValue.ToEntero, -1)
Dim FechaFin As String = TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd 23:59")
Dim ObjInventarios As New ClsInventarios
Dim Existencia = ObjInventarios.GetExistenciasPS(DdlPaqueteDesarmado.SelectedValue.ToEntero, CveUMTemp, UsuarioActual.CveEmpresa, DdlAlmacenDesarmado.SelectedValue.ToEntero, FechaMovto:=TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
Dim CostoPromedio = ObjInventarios.GetCostoPS(DdlPaqueteDesarmado.SelectedValue.ToEntero, TxtCantidadDesarmado.Text.ToDouble, DdlAlmacenDesarmado.SelectedValue.ToEntero, "-1", TxtFechaDesarmado.Text.ToDate)
Dim Existencia = ObjInventarios.GetExistenciasPS(DdlPaqueteDesarmado.SelectedValue.ToEntero, CveUMTemp, UsuarioActual.CveEmpresa, DdlAlmacenDesarmado.SelectedValue.ToEntero, FechaMovto:=FechaFin, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
Dim CostoPromedio = ObjInventarios.GetCostoPS(DdlPaqueteDesarmado.SelectedValue.ToEntero, TxtCantidadDesarmado.Text.ToDouble, DdlAlmacenDesarmado.SelectedValue.ToEntero, "-1", FechaFin.ToDate, CveTipoAlmacen:=-1)
ObjInventarios.Dispose()
If Existencia - TxtCantidadDesarmado.Text.ToDouble < 0 Then

View File

@@ -2261,10 +2261,38 @@ Partial Class Inventarios_RecepcionEntrega
End If
End If
'QUEMAR REMISIONES
If Not ErrorMovInv And EsDevolucionVenta = 1 And TipoDocto = "Ing" Then
Dim DtDevRem As New DataTable
'CARGA REMISIONES DE LA VENTA DEVUELTA
If ObjInventario.GetDevolucionRemisionesFacturadas(CveVentaSurtir) Then
DtDevRem = ObjInventario.DtResultados.FiltraParametros("CantidadAlmacen = 0")
Else
ErrorMovInv = True
End If
If Not ErrorMovInv Then
If DtDevRem.Rows.Count > 0 Then
For Each DrMovtos As DataRow In DtDevRem.FiltraParametros("", "CveRem", {"CveRem"}).Rows
If Not ObjInventario.ActualizarEsDevolucionVenta(DrMovtos("CveRem").ToString.ToEntero, 2) Then
TextoError = "Ocurrió un error al hacer la devolución hacia la remision. Por favor vuelva a intentar."
ErrorMovInv = True
Exit For
End If
Next
End If
Else
TextoError = "Ocurrió un error al hacer la devolucion a remisión. Por favor vuelva a intentar."
ErrorMovInv = True
End If
End If
'QUEMA DEVOLUCION | QUEMA = LA QUITA DE PENDIENTE POR RECIBIR (DEVOLVER)
If Not ErrorMovInv And EsDevolucionVenta = 1 Then
If Not ObjVentas.UpdateVentasDevolucionAlmacen(2, CveVentaSurtir) Then
TextoError = "Ocurrió un error al hacer la devolucion. Por favor vuelva a intentar."
TextoError = "Ocurrió un error al hacer la devolución. Por favor vuelva a intentar."
ErrorMovInv = True
End If
End If

View File

@@ -105,7 +105,7 @@
<label class="col-md-1 truncate" style="width: 110px">Movimiento:</label>
<div class="col-md-2">
<asp:RadioButtonList runat="server" ID="RBLOpcion" RepeatDirection="Horizontal" AutoPostBack="true" Font-Size="18pt">
<asp:ListItem Selected="True" Value="2">Entrada</asp:ListItem>
<asp:ListItem Selected="True" Value="42">Entrada</asp:ListItem>
<asp:ListItem Value="3">Salida</asp:ListItem>
</asp:RadioButtonList>
</div>

View File

@@ -1066,10 +1066,10 @@ Partial Class Inventarios_RecepcionUsados
For Each Dr As DataRow In DtMovimientos.Rows
If CveConcepto = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate)
Else
ImporteConcepto = Dr("PU").ToString.ToDouble
If CveConcepto = 42 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate)
Else
ImporteConcepto = Dr("PU").ToString.ToDouble
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
@@ -1083,10 +1083,10 @@ Partial Class Inventarios_RecepcionUsados
ErrorMovInv = True
Exit For
End If
'si es selectedvalue = 2, es entrada ,3 -salida
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 2, 1, 2)
'si es selectedvalue = 42, es entrada ,3 -salida
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 42, 1, 2)
If RBLOpcion.SelectedValue.ToEntero = 2 AndAlso EsDistribuidor Then
If RBLOpcion.SelectedValue.ToEntero = 42 AndAlso EsDistribuidor Then
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then