Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -3861,7 +3861,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim Lote As String = If(TxtLoteSalida.Text = "", "", TxtLoteSalida.Text)
|
||||
Dim FechaCaducidad As Date = If(TxtCaducidadSalida.Text = "", MinFecha.ToShortDateString, TxtCaducidadSalida.Text).ToDate
|
||||
|
||||
If ObjInventario.GetExistenciasPS(DdlPSSalida.SelectedValue.ToEntero, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1, Lote:=lote, FechaCaducidad:=FechaCaducidad) >= TxtCantidadSalidaInv.Text.ToDouble Then
|
||||
If ObjInventario.GetExistenciasPS(DdlPSSalida.SelectedValue.ToEntero, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1, Lote:=Lote, FechaCaducidad:=FechaCaducidad) >= TxtCantidadSalidaInv.Text.ToDouble Then
|
||||
If Not DdlPSSalida.SelectedValue.ToEntero > 0 Then
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -98,9 +98,15 @@ Partial Class Inventarios_Default
|
||||
Private Sub CargaDatos(CvePS As Integer, Tipo As Integer)
|
||||
|
||||
If ValidarFiltrosSeleccionados() OrElse CvePS > 0 Then
|
||||
Dim RestringirAlmacenes As Integer = -1
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
RestringirAlmacenes = 1 'restringue los almacenes:Consignación,Productos Financieros Asignados,,roductos Financieros,Consumo Interno,Activo Fijo,Merma,Consignación de Contrato,Devolucion proveedor,
|
||||
End If
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios()
|
||||
If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
|
||||
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, ExcluyeTransitorios:=1, TopSelect:=100) Then
|
||||
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero,
|
||||
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100) Then
|
||||
Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
|
||||
@@ -187,6 +187,11 @@
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkRecibido" runat="server" CssClass="make-switchsd" data-size="small" Text=" " />
|
||||
</div>
|
||||
<div class="col-md-1 truncate v-center" style="text-align: right!important">Tipo Almacen:</div>
|
||||
<div class="col-md-2 v-center">
|
||||
<asp:DropDownList ID="DdlTipoAlmacen" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -74,7 +74,7 @@ Partial Class RepTraspasoAlmacen
|
||||
|
||||
'Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, DdlTipoAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjInventarios.DtResultados
|
||||
DtInventarios = ObjInventarios.DtResultados
|
||||
GvDatos.Columns(5).Visible = DtInventarios.MAX("Serie") <> ""
|
||||
@@ -119,6 +119,12 @@ Partial Class RepTraspasoAlmacen
|
||||
DdlAlmacenOrigen.SelectedValue = "-1"
|
||||
DdlAlmacenOrigen.DataBind()
|
||||
DdlAlmacenOrigen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
||||
|
||||
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")
|
||||
DdlTipoAlmacen.DataBind()
|
||||
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaAlmacenDestino()
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")
|
||||
|
||||
@@ -1722,12 +1722,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
@@ -1748,6 +1742,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim TextoError As String = ""
|
||||
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
||||
Dim CveMovimientoVirtualEntrada As Integer = 0
|
||||
Dim CveMovimientoSalidaTransitorio As Integer = 0
|
||||
Dim FolioVirtualEntrada As Integer = 0
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
@@ -1762,6 +1757,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
|
||||
'AGREGAMOS LA SALIDA
|
||||
CveMovimientoSalidaTransitorio = ObjInventario.AddMovimiento(CveAlmacenTransitorio, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero,
|
||||
CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/G12")
|
||||
|
||||
|
||||
Dim CvePrePoliza As Integer = -1
|
||||
Dim Concepto As String = TxtObservacionesRecepcion.Text
|
||||
If Concepto = "" Then Concepto = "Cancelación Traspaso"
|
||||
@@ -1797,11 +1799,21 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, GvRow.DataKey("CveUM").ToEntero, CvePS, PrecioUnitario, GvRow.DataKey("CveAF").ToEntero, -1, Serie:=GvRow.DataKey("Serie").ToString, Lote:=GvRow.DataKey("Lote"), FechaCaducidad:=GvRow.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, GvRow.DataKey("CveUM").ToEntero, CvePS, PrecioUnitario, -1, -1, Serie:=GvRow.DataKey("Serie").ToString, Lote:=GvRow.DataKey("Lote"), FechaCaducidad:=GvRow.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
Exit For
|
||||
End If
|
||||
'MOV, Alm, Transito
|
||||
If GvRow.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero > 0 Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, Cantidad, GvRow.DataKey("CveUM").ToString.ToEntero, CvePS, PrecioUnitario, CveSeccionAlmacen:=-3, Serie:=GvRow.DataKey("Serie").ToString, Lote:=GvRow.DataKey("Lote").ToString, FechaCaducidad:=GvRow.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=GvRow.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
CveMovimientoSalidaTransitorio = 0
|
||||
End If
|
||||
importe += Cantidad * PrecioUnitario
|
||||
End If
|
||||
End If
|
||||
@@ -1861,16 +1873,16 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
|
||||
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al cancelar el traspaso"
|
||||
End If
|
||||
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
' CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
|
||||
' ErrorMovInv = True
|
||||
' TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||
'End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
CveMovimientoAlmacen:=CveMovimientoSalidaTransitorio, ImporteMX:=ImporteDecimal, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user