-- merge ClsInventarios
This commit is contained in:
@@ -362,7 +362,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("") ' Estado = -1
|
||||
|
||||
If DrPS IsNot Nothing AndAlso ValidaPSSAT(DrPS) Then
|
||||
If DrPS IsNot Nothing AndAlso ValidaPSSAT(DrPS, TxtPesoKg.Text.ToDecimal) Then
|
||||
|
||||
'codigo temporal
|
||||
Dim tLote As String
|
||||
@@ -1553,11 +1553,11 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
|
||||
|
||||
Function ValidaPSSAT(DrPS As DataRow) As Boolean
|
||||
Function ValidaPSSAT(DrPS As DataRow, PesoKg As Decimal) As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim CveSATPS As Integer = DrPS("CveSATPS").ToString.ToEntero
|
||||
Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
||||
'Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
||||
Dim SATClaveUnidadMedida As String = DrPS("SATClaveUnidadMedida").ToString.Trim
|
||||
|
||||
If CveSATPS > 0 And PesoKg > 0 And SATClaveUnidadMedida.Length > 0 Then
|
||||
|
||||
@@ -1266,7 +1266,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim TieneError = False
|
||||
|
||||
Dim ObjConta As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC) Then
|
||||
ObjConta = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjConta.IniciaTransacSQL()
|
||||
End If
|
||||
@@ -1803,7 +1803,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Case 30
|
||||
CveConceptoContable = 181
|
||||
TipoMovtoOtro = False
|
||||
tCveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
||||
If DdlSubProyecto.Visible = True AndAlso DdlSubProyecto.SelectedValue.ToEntero > 0 Then tCveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
||||
If UsuarioActual.Empresa.Funcionalidad(342).ToEntero > 0 Then
|
||||
IdCtaContableOtro = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
@@ -3350,9 +3350,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlAlmacen.DataBind()
|
||||
Dim dttA As DataTable = Nothing
|
||||
dttA = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 14)
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
dttA.Merge(GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1))
|
||||
End If
|
||||
dttA.Merge(GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1))
|
||||
|
||||
DdlAlmacen.DataSource = dttA 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
' DdlAlmacen.SelectedValue = "-1"
|
||||
@@ -4469,6 +4468,15 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim RetornoVirtual As MMovimientoVirtual = Nothing
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
RetornoVirtual = GenerarMovimientoVirtual(CveMovimiento, ObjInventario)
|
||||
End If
|
||||
|
||||
If RetornoVirtual IsNot Nothing Then
|
||||
ErrorMovInv = RetornoVirtual.TieneError
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
|
||||
|
||||
Reference in New Issue
Block a user