-- Validacion de existencia en los conceptos de salida.
This commit is contained in:
@@ -5,6 +5,7 @@ Imports System.Data
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
|
Imports iText.Barcodes.Dmcode
|
||||||
|
|
||||||
Partial Class Inventarios_EntradasSalidas
|
Partial Class Inventarios_EntradasSalidas
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -2049,7 +2050,8 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
''VALIDA EXISTENCIAS
|
''VALIDA EXISTENCIAS
|
||||||
Dim Cont As Integer = 0
|
Dim Cont As Integer = 0
|
||||||
If DdlConcepto.SelectedValue.Contiene({"3", "11", "13", "21", "30", "31"}) Then
|
Dim tConceptoOrigen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", $"CveConcepto = {DdlConcepto.SelectedValue}").ToEntero
|
||||||
|
If tConceptoOrigen < 0 Then 'si es negativo el origen, indica salida de almacen
|
||||||
For Each Dr As DataRow In DtMovimientos.Rows
|
For Each Dr As DataRow In DtMovimientos.Rows
|
||||||
Dim FechaCaducidadVal As Date = If(Dr("AplicaCaducidad").ToString = "True", Dr("FechaCaducidad").ToString.ToDate, MinFecha)
|
Dim FechaCaducidadVal As Date = If(Dr("AplicaCaducidad").ToString = "True", Dr("FechaCaducidad").ToString.ToDate, MinFecha)
|
||||||
Dim FechaMovtoExistenciaStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("HH:mm")}"
|
Dim FechaMovtoExistenciaStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("HH:mm")}"
|
||||||
@@ -2137,6 +2139,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Dim CveConceptoContable As Integer = 260
|
Dim CveConceptoContable As Integer = 260
|
||||||
Dim CveClasificacion As Integer = -1
|
Dim CveClasificacion As Integer = -1
|
||||||
|
|
||||||
Select Case DdlConcepto.SelectedValue.ToEntero
|
Select Case DdlConcepto.SelectedValue.ToEntero
|
||||||
Case 2, 32
|
Case 2, 32
|
||||||
EsContabilizable = True
|
EsContabilizable = True
|
||||||
@@ -2188,7 +2191,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, tValorInventario, tValorInventario, CveConceptoContable, TxtObservaciones.Text.Trim, TxtObservaciones.Text.Trim, CveMovimientoAlmacen:=CveMovimiento, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, tValorInventario, tValorInventario, CveConceptoContable, TxtObservaciones.Text.Trim, TxtObservaciones.Text.Trim, CveMovimientoAlmacen:=CveMovimiento, CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, Contabilizable:=EsContabilizable) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -2401,7 +2404,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ObjInventario.RollBack() 'deshace lo insertado
|
ObjInventario.RollBack() 'deshace lo insertado
|
||||||
CveMovimiento = 0
|
CveMovimiento = 0
|
||||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||||
Alert("Ocurrió un error al registrar los movimientos", TipoMensaje.MsgError)
|
'Alert("Ocurrió un error al registrar los movimientos", TipoMensaje.MsgError)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user