Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Owin.Security.Provider
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Inventarios_RecepcionAlmacen
|
||||
@@ -2568,6 +2570,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
End If
|
||||
|
||||
Dim CveProveedorCompra As Integer = -1
|
||||
Try
|
||||
'RECARGA TC CUANDO ES RECEPCION CON OC Y DOLARES
|
||||
If CveOCSurtir > 0 And CveMoneda <> 1 Then
|
||||
@@ -3346,6 +3349,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
'PREPOLIZA - SOLO CUANDO SEA RECEPCIÓN
|
||||
|
||||
If TipoMovimiento = 1 AndAlso Not ErrorMovInv Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
@@ -3372,6 +3376,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'Fecha = ObjCompras.DtResultados(0)("Fecha").ToString.ToDate
|
||||
Fecha = TxtFecha.Text.ToDate
|
||||
CveProveedor = ObjCompras.DtResultados(0)("CveProveedor").ToString.ToEntero
|
||||
CveProveedorCompra = CveProveedor
|
||||
ProveedorNombre = ObjCompras.DtResultados(0)("RazonSocial").ToString
|
||||
SerieFolio = $"Compra: {ObjCompras.DtResultados(0)("SerieFolio").ToString}"
|
||||
CveConceptoContableCosto = 205
|
||||
@@ -3663,6 +3668,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
RenombrarBitacoras()
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv And CveProveedorCompra > 0 And CveCompraSurtir > 0 Then
|
||||
If Not ActualizaFechaVencimientoCompra(CveCompraSurtir, CveProveedorCompra, ObjInventario.IniciaTransacSQL) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'FINAL
|
||||
If Not ErrorMovInv Then
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
@@ -3764,6 +3775,31 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Function ActualizaFechaVencimientoCompra(CveCompra As Integer, CveProveedor As Integer, TransaccionSql As SqlTransaction) As Boolean
|
||||
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
Dim objProveedores As New ClsCompProveedores(TransaccionSql)
|
||||
Dim objCompras As New ClsCompras(TransaccionSql)
|
||||
Dim CveTipoFechaVencimiento As Integer = 1
|
||||
|
||||
If objProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
CveTipoFechaVencimiento = objProveedores.CveTipoFechaVencimiento
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If CveTipoFechaVencimiento = 2 Then
|
||||
If Not objCompras.UpdateFechaVencimientoCompra(CveCompra, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Return If(ErrorProceso, False, True)
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub RenombrarBitacoras()
|
||||
Dim fechaActual As String = DateTime.Now.ToString("yyyyMMddHHmmss")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user