diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb
index f53722f3c..d47cf410c 100644
--- a/AF/AF.aspx.vb
+++ b/AF/AF.aspx.vb
@@ -2052,7 +2052,7 @@ Partial Class AF_AF
Dim CveUMInv = GlobalDTPS(CveEmpresaActual, CvePS:=AFInvCvePS).FiltroPrimeroValor("CveUM").ToEntero
If CveUMInv > 0 Then
CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}")
- If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, SerieLote:=AFInvSerie) Then
+ If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie) Then
ErrorGuardar = True
End If
Else
@@ -3001,7 +3001,7 @@ Partial Class AF_AF
AFInvSerie = If(Inv_CveMetodoInventario = 5, TxtAFInvSerie.Text.Trim, "-1")
Dim ObjInventario As New ClsInventarios
- Dim Existencia = ObjInventario.GetExistenciasPS(DdlAFInvPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, FechaMovto:=Now.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=AFInvSerie)
+ Dim Existencia = ObjInventario.GetExistenciasPS(DdlAFInvPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, FechaMovto:=Now.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=AFInvSerie)
Dim Costo As Decimal = 0
If Inv_CveMetodoInventario = 5 Then
Costo = ObjInventario.GetCostoPSSerie(DdlAFInvPS.SelectedValue.ToEntero, AFInvSerie, DdlAFInvAlmacen.SelectedValue.ToEntero, CveEmpresaActual)
@@ -3585,7 +3585,7 @@ Partial Class AF_AF
End Sub
#End Region
Protected Sub DdlAFInvPS_SelectedIndexChanged(sender As Object, e As EventArgs)
- DivSerieLote.Visible = GlobalDTPS(UsuarioActual.CveEmpresa, DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero() = 5
+ DivSerie.Visible = CBool(GlobalDTPS(UsuarioActual.CveEmpresa, DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimeroValor("AplicaSerie"))
End Sub
Protected Sub BtnPDFCompras_Click(sender As Object, e As EventArgs)
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 024b4fe5f..7f1096c37 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -1089,43 +1089,44 @@ Public Class ClsContabilidad
End Function
+ Public Function ContabilizaDesContabilizaPrePoliza(CvePrePoliza As Integer, Contabilizar As Boolean, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Conta_PrePolizasContabilizarDescontabilizar")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
+ .Add("@Contabilizar", SqlDbType.Bit).Value = Contabilizar
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ _ContaFolio = SqlAdapter.SelectCommand.Parameters("@FolioPoliza").Value.ToString.ToEntero
+ Retorno = True
+ Catch ex As Exception
+ If ex.Message.Contains("50015;") Then
+ OnError("No se puede actualizar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ Else
+ OnError("Ocurrió un error al contabilizar las prepoliza detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
+ End Try
+ Return Retorno
+ End Function
+
Public Function ContabilizarPrePoliza(CvePrePoliza As Integer, CveUsuario As Integer, Empresa As Empresa, Optional Fecha As Date = MinFecha, Optional Concepto As String = "",
Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean
- 'Editado Por Charlie
Dim Retorno As Boolean = False
- 'No modificar esta seccion bajo ninguna circunstancia -- Empresa.CvePlataforma = 3 Or
- '*****************************************************
- If (CveUsuario.Contiene(100, 1425) And Empresa.CveEmpresa = 1) Then
- Retorno = ContabilizarPrePolizaSIG(CvePrePoliza, CveUsuario, Empresa, Fecha, Concepto)
- Return Retorno
- End If
- '*****************************************************
+ If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
- If Empresa.UsaArmonizacion Then
- DataAdapter("PA_Conta_ContabilizaPrepoliza")
- With SqlAdapter.SelectCommand.Parameters
- .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
- .Add("@CvePoliza", SqlDbType.Int).Direction = ParameterDirection.Output
- End With
+ ContabilizaDesContabilizaPrePoliza(CvePrePoliza, True, Empresa.CveEmpresa)
- Try
- SqlAdapter.Fill(Data)
- ContaIdPoliza = SqlAdapter.SelectCommand.Parameters("@CvePoliza").Value.ToString.ToEntero
- If ContaIdPoliza <> 0 Then
- Retorno = True
- End If
- Catch ex As Exception
- OnError("Ocurrió un error al obtener Movimientos Prepolizas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
- End Try
Else
If CvePrePoliza <= 0 Then Return False
Dim OcurrioError As Boolean = False
-
Dim ContaCompartida As Boolean = False
If ObjConta Is Nothing Then
@@ -1135,9 +1136,6 @@ Public Class ClsContabilidad
ContaCompartida = True
End If
-
-
-
Dim tIdPoliza As Integer
Dim CveTipoPoliza, FolioFijo, CvePlantillaPoliza As Integer
Dim Cargos As Decimal
@@ -1152,23 +1150,8 @@ Public Class ClsContabilidad
Dim ContabilizarCausacion As Boolean
Dim ContabilizarDIOT As Boolean
- 'Dim Periodo As Integer = -1
- 'Dim Ejercicio As Integer = -1
- 'Dim GuidPoliza As String = "-1"
-
- ' Dim FolioFiscal As String = ""
- ' Dim DatosCuentas As New DataTable
- ' Dim CveMoneda As Integer = 0
- ' Dim Total As Decimal = 0
-
-
-
Try
- 'If Empresa.Funcionalidad(522).ToString = "1" AndAlso ObjConta.GetCuentas(-1, "-1", -1) Then
- ' DatosCuentas = ObjConta.DtResultados
- 'End If
-
If GetEncabezadoPrePoliza(CvePrePoliza, Empresa.CveEmpresa) Then
CveTipoPoliza = Data.Rows(0)("CveTipoPoliza").ToString.ToEntero
Cargos = Data.Rows(0)("Cargos").ToString.ToDecimal
@@ -1255,30 +1238,6 @@ Public Class ClsContabilidad
Exit For
End If
- 'If Empresa.Funcionalidad(522).ToString = "1" Then
- ' GuidPoliza = ObjConta.DtResultados.Rows(0)("Guid").ToString
- ' Periodo = Data.Rows(0)("Fecha").ToString.ToDate.Month
- ' Ejercicio = Data.Rows(0)("Fecha").ToString.ToDate.Year
-
- ' Dim CodigoCuenta As String = ""
-
- ' If DatosCuentas.Rows.Count > 0 Then
- ' If DatosCuentas.FiltraParametros($"Id = {dr("IdCtaContable").ToString}").Rows.Count > 0 Then 'Filtra primero valorCambiar
- ' CodigoCuenta = DatosCuentas.FiltraParametros($"Id = {dr("IdCtaContable").ToString}").Rows(0)("Codigo").ToString
- ' If Not ObjConta.AddASocCFDIs(False, TipoPol, GuidPoliza, FolioFiscal, 0, CodigoCuenta, Empresa.BDContPAQi, -1, -1, ContaFolio) Then
- ' OcurrioError = True
- ' Exit For
- ' End If
- ' Else
- ' OcurrioError = True
- ' Exit For
- ' End If
- ' Else
- ' OcurrioError = True
- ' Exit For
- ' End If
- 'End If
-
Else
If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento,
@@ -1288,29 +1247,6 @@ Public Class ClsContabilidad
End If
- 'If Empresa.Funcionalidad(522).ToString = "1" Then
- ' GuidPoliza = ObjConta.DtResultados.Rows(0)("Guid").ToString
- ' Periodo = Data.Rows(0)("Fecha").ToString.ToDate.Month
- ' Ejercicio = Data.Rows(0)("Fecha").ToString.ToDate.Year
-
- ' Dim CodigoCuenta As String = ""
-
- ' If DatosCuentas.Rows.Count > 0 Then
- ' If DatosCuentas.FiltraParametros($"Codigo = {dr("IdCtaContable").ToString}").Rows.Count > 0 Then
- ' CodigoCuenta = DatosCuentas.FiltraParametros($"Codigo = {dr("IdCtaContable").ToString}").Rows(0)("Codigo").ToString
- ' If Not ObjConta.AddASocCFDIs(False, TipoPol, GuidPoliza, FolioFiscal, 0, CodigoCuenta, Empresa.BDContPAQi, -1, -1, ContaFolio) Then
- ' OcurrioError = True
- ' Exit For
- ' End If
- ' Else
- ' OcurrioError = True
- ' Exit For
- ' End If
- ' Else
- ' OcurrioError = True
- ' Exit For
- ' End If
- 'End If
End If
Else
@@ -1425,89 +1361,6 @@ Public Class ClsContabilidad
- 'If Empresa.Funcionalidad(522).ToString = "1" And Empresa.UsaContabilidad Then
-
- ' Dim CodigoPersona As String = ""
- ' Dim Bnefciciario As String = ""
-
- ' If ObjConta.GetPersona(RFC) Then
- ' CodigoPersona = ObjConta.DtResultados.FiltroPrimeroValor("CodigoPersona")
- ' Bnefciciario = ObjConta.DtResultados.FiltroPrimeroValor("Nombre")
- ' Else
-
- ' OcurrioError = True
- ' Mensaje.Append("Se presento un error al obtener los datos de la persona. ")
-
- ' End If
-
-
-
-
- ' If TipoPol = 1 Then 'Ingreso
- ' Dim IdDocumento As Integer = 0
- ' ' Dim UsuarioSistema As String = ""
- ' Dim IdCuentaCheques As Integer = 1
- ' Dim NatBancaria As Integer = 2
- ' Dim Naturaleza As Integer = 1
- ' Dim IdIngreso As Integer
-
- ' If ObjConta.AddIngreso(1, 34, 42, Ejercicio, Periodo, Fecha, Ejercicio, Periodo, CodigoPersona, Bnefciciario, IdCuentaCheques, NatBancaria, Naturaleza, CveMoneda, 2, 1, Total, "", 0, 0, "", 0,
- ' 0, Ejercicio, Periodo, TipoPol, ContaFolio.ToEntero, 0, 0, tIdPoliza, 11, 0, 0, 0, 0, UsuarioSistema, UsuarioSistema, 0, System.Guid.NewGuid().ToString().ToUpper, "", 0, MetodoPagoSAT) Then 'Actualizar Documento IdDocumento despues de Insertarlo
-
- ' If ObjConta.DtResultados.Rows.Count > 0 Then
- ' IdIngreso = ObjConta.DtResultados.Rows(0)("IdIngreso").ToString.ToEntero
-
- ' If Not ObjConta.AddDocumentoBancario(1, 0, 0, IdIngreso, 0, 0, Fecha, Fecha, 0, 0, IdCuentaCheques) Then
- ' OcurrioError = True
- ' Mensaje.Append("Se presento un error al guardar el el documento. ")
- ' End If
-
- ' Else
- ' OcurrioError = True
- ' Mensaje.Append("Se presento un error al guardar el Ingreso. ")
- ' End If
- ' Else
- ' OcurrioError = True
- ' Mensaje.Append("Se presento un error al guardar el Ingreso. ")
- ' End If
-
- ' ElseIf TipoPol = 2 Then 'Egreso
-
- ' Dim IdDocumento As Integer = 0
- ' ' Dim UsuarioSistema As String = ""
- ' Dim BancoDestino As String = ""
- ' Dim CuentaDestino As String = ""
- ' Dim IdCuentaCheques As Integer = 1
- ' Dim NatBancaria As Integer = 0
- ' Dim Naturaleza As Integer = 2
- ' Dim IdEgreso As Integer
-
- ' If ObjConta.AddEgreso(1, 36, 45, Ejercicio, Periodo, Fecha, Ejercicio, Periodo, CodigoPersona, Bnefciciario, IdCuentaCheques, NatBancaria, Naturaleza, CveMoneda, 2, 1, Total, "", 0, "", 0, 0, Ejercicio,
- ' Periodo, TipoPol, NumPoliza, 0, 0, ContaIdPoliza, tIdPoliza, IdDocumento, Ejercicio, Periodo, 0, 0, 0, 0, 0, 0, UsuarioSistema, UsuarioSistema, 0, System.Guid.NewGuid().ToString().ToUpper,
- ' CuentaDestino, BancoDestino, MetodoPagoSAT) Then
-
- ' If ObjConta.DtResultados.Rows.Count > 0 Then
- ' IdEgreso = ObjConta.DtResultados.Rows(0)("IdEgreso").ToString.ToEntero
-
- ' If Not ObjConta.AddDocumentoBancario(1, 0, IdEgreso, 0, 0, 0, Fecha, Fecha, 0, 0, IdCuentaCheques) Then
- ' OcurrioError = True
- ' Mensaje.Append("Se presento un error al guardar el el documento. ")
- ' End If
-
- ' Else
- ' OcurrioError = True
- ' Mensaje.Append("Se presento un error al guardar el Egreso. ")
- ' End If
- ' Else
- ' OcurrioError = True
- ' Mensaje.Append("Se presento un error al guardar el Egreso")
-
- ' End If 'Actualizar Documento IdDocumento despues de Insertarlo
-
- ' End If
-
- 'End If
-
If OcurrioError Then
If Not ContaCompartida Then ObjConta.RollBack()
Else
@@ -1539,215 +1392,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
- 'No modificar este metodo bajo ninguna circunstancia
- Public Function ContabilizarPrePolizaSIG(CvePrePoliza As Integer, CveUsuario As Integer, Empresa As Empresa, Optional Fecha As Date = MinFecha, Optional Concepto As String = "") As Boolean
-
- If CvePrePoliza <= 0 Then Return False
-
- Dim Retorno As Boolean = False
- Dim OcurrioError As Boolean = False
- Dim tCvePoliza As Integer
- Dim CveTipoPoliza, FolioFijo As Integer
- Dim Cargos As Decimal
- Dim Abonos As Decimal
- Dim NumPoliza As String = ""
- Dim CodigoNumeroPoliza As String = ""
- Dim TipoPoliza As String
-
- Dim ContaFolio As String = ""
- Dim ContabilizarCausacion As Boolean
- Dim ContabilizarDIOT As Boolean
-
- Dim ObjConta As New ClsContabilidad
- ObjConta.IniciaTransacSQL()
-
- Try
-
- If GetEncabezadoPrePoliza(CvePrePoliza, Empresa.CveEmpresa) Then
- CveTipoPoliza = Data.Rows(0)("CveTipoPoliza").ToString.ToEntero
- Cargos = Data.Rows(0)("Cargos").ToString.ToDecimal
- Abonos = Data.Rows(0)("Abonos").ToString.ToDecimal
- FolioFijo = Data.Rows(0)("FolioFijo").ToString.ToEntero
- TipoPoliza = Data.Rows(0)("TipoPoliza").ToString
- CodigoNumeroPoliza = Data.Rows(0)("CodigoNumeroPoliza").ToString
-
- 'tiene prioridad el concepto en parametro
- If Concepto = "" Then Concepto = Data.Rows(0)("Concepto").ToString
- If Fecha = MinFecha Then Fecha = Data.Rows(0)("Fecha").ToString.ToDate
-
- If FolioFijo > 0 Then
- CodigoNumeroPoliza = "CHQ"
- Else
- GetNumeroPoliza(CveTipoPoliza, TipoPoliza, Fecha, Empresa.CveEmpresa)
- FolioFijo = Data.Rows(0)("NumPoliza").ToString.ToEntero
- End If
-
- tCvePoliza = ObjConta.AddPoliza(CveTipoPoliza, FolioFijo, Fecha, Concepto, CveUsuario, Empresa.CveEmpresa, CvePrePoliza)
-
- If tCvePoliza > 0 AndAlso GetContabilizacionDiarioDetalle(CvePrePoliza) Then
- Dim tipoMovimiento As Boolean = False
- Dim CveConceptoContable As Integer
- Dim SigReferencia As String = ""
-
- For Each dr As DataRow In Data.Rows
-
- CveConceptoContable = dr("CveConceptoContable").ToString().ToEntero
-
- Select Case CveConceptoContable
- Case 6, 5, 17, 14, 19, 15, 16
- SigReferencia = dr("CveCompra").ToString.ContaReferencia(TipoContaReferencia.Compra)
- Case 2, 4, 1, 13, 61, 62, 63, 8, 9
- SigReferencia = dr("CveVenta").ToString.ContaReferencia(TipoContaReferencia.Venta)
- Case 30
- SigReferencia = dr("CveIE").ToString.ContaReferencia(TipoContaReferencia.Banco)
-
- End Select
-
- Select Case CveConceptoContable
- Case 19 ' IVA Acreditable
- ContabilizarDIOT = True
- Case 61 ' IVA Trasladado
- ContabilizarCausacion = True
- Case 30 ' Bancos
- If dr("Abono").ToString.ToDecimal > 0 Then ContabilizarDIOT = True
- If dr("Cargo").ToString.ToDecimal > 0 Then ContabilizarCausacion = True
- End Select
-
- tipoMovimiento = (dr("TipoMovto").ToString = "True")
-
- 'Si las cuentas contables estan en 0 no se debe contabilizar
- If dr("CveCuenta").ToString.ToEntero > 0 Then
-
- 'Si ImporteMN es mayor que 0 entonces la compra es en dolares y debemos ingresar la cantidad en pesos
- If dr("ImporteMN").ToString.ToDecimal <> 0 Then
- If Not ObjConta.AddPolizaDetalle(tCvePoliza, dr("CveCuenta").ToString.ToEntero, "", dr("CveSubProyecto").ToString.ToEntero, tipoMovimiento,
- dr("ImporteMN").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, Fecha, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal, CvePrePolizaDetalle:=dr("CvePrePolizaDetalle").ToString.ToEntero) Then
- OcurrioError = True
- Exit For
- End If
- Else
- If Not ObjConta.AddPolizaDetalle(tCvePoliza, dr("CveCuenta").ToString.ToEntero, "", dr("CveSubProyecto").ToString.ToEntero, tipoMovimiento,
- dr("Importe").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, Fecha, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal, CvePrePolizaDetalle:=dr("CvePrePolizaDetalle").ToString.ToEntero) Then
- OcurrioError = True
- Exit For
- End If
- End If
-
- Else
- OcurrioError = True
- Mensaje.Append(String.Format(" La cuenta contable {0} es invalida", dr("ConceptoContable")))
- Exit For
- End If
-
- Next
-
- 'Obtenemos los valores de la causacion y los agregamos
- 'If Not OcurrioError AndAlso ContabilizarCausacion Then
- ' If GetCausacionesValores(CvePrePoliza) AndAlso Data.Rows.Count > 0 Then
- ' Dim dr As DataRow = Data(0)
- ' If Not ObjConta.AddCausacionesIVA(tIdPoliza,
- ' dr("TotalTasa16").ToString.ToDecimal,
- ' dr("BaseTasa16").ToString.ToDecimal,
- ' dr("IvaTasa16").ToString.ToDecimal,
- ' 0,
- ' dr("ISRRetenido").ToString.ToDecimal,
- ' dr("IVARetenido").ToString.ToDecimal, False) Then
- ' OcurrioError = True
-
- ' End If
- ' End If
- 'End If
-
- 'Obtenemos los valores del DIOT y los agregamos
- 'If Not OcurrioError AndAlso ContabilizarDIOT Then
- ' If GetDIOTValores(CvePrePoliza) AndAlso Data.Rows.Count > 0 Then
- ' Dim IdProveedor As Integer
- ' Dim RFC, RazonSocial As String
-
- ' RFC = Data(0)("RFC").ToString
- ' RazonSocial = Data(0)("RazonSocial").ToString
- ' IdCtaContProveedores = Data(0)("IdCtaContProveedores").ToString.ToEntero
-
- ' If IdCtaContProveedores > 0 Then
-
- ' 'busco la clave del proveedor en la contabilidad por su cuenta contable
- ' If ObjConta.GetProveedores(IdCuentaContable:=IdCtaContProveedores) Then
- ' If ObjConta.DtResultados.Rows.Count > 0 Then
- ' Dim dr As DataRow = ObjConta.DtResultados.Rows(0) : IdProveedor = dr("Id").ToString.ToEntero
- ' End If
- ' End If
- ' Else
- ' 'busco la clave del proveedor en la contabilidad por su cuenta contable
- ' If ObjConta.GetProveedores(RFC:=RFC) Then
- ' If ObjConta.DtResultados.Rows.Count > 0 Then
- ' Dim dr As DataRow = ObjConta.DtResultados.Rows(0) : IdProveedor = dr("Id").ToString.ToEntero
- ' End If
- ' Else
- ' 'registro el proveedor generico
- ' Select Case Empresa.CveEmpresa
- ' Case 66 : IdProveedor = 12726
- ' Case Else : IdProveedor = 1
- ' End Select
- ' End If
-
- ' End If
-
-
- ' If IdProveedor <= 0 Then
- ' IdProveedor = ObjConta.AddProveedor(IdCtaContProveedores, RFC, RazonSocial, "")
- ' If IdProveedor <= 0 Then
- ' OcurrioError = True
- ' End If
- ' End If
-
- ' For Each dr As DataRow In Data.Rows
- ' If dr("Total").ToString.ToDecimal <> 0.00 Then
- ' If Not ObjConta.AddDevolucionesIVA(tIdPoliza, dr("CuentaBancos").ToString.ToEntero,
- ' IdProveedor,
- ' 16,
- ' dr("SubTotal").ToString.ToDecimal,
- ' dr("IvaAcreditable").ToString.ToDecimal,
- ' dr("IVARetenido").ToString.ToDecimal,
- ' dr("ISRRetenido").ToString.ToDecimal,
- ' Fecha,
- ' ContaFolio,
- ' dr("Serie").ToString.ToString,
- ' dr("Folio").ToString.StrToNum, "") Then
- ' OcurrioError = True
- ' Mensaje.Append("La Poliza o la Cuenta no son válidas")
- ' End If
-
-
- ' End If
-
- ' Next
-
- ' End If
- 'End If
-
- If Not OcurrioError Then
- Mensaje.Append(String.Format("{1} ", tCvePoliza, FolioFijo))
- ObjConta.Commit()
- Retorno = True
- _ContaIdPoliza = tCvePoliza
- End If
- End If
-
- Else
- OcurrioError = True
- End If
-
-
-
- Catch ex As Exception
- ObjConta.RollBack()
- OnError("Ocurrió un error al intentar contabilizar la PrePoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
- Retorno = False
- End Try
-
- ObjConta.Dispose()
- Return Retorno
- End Function
Public Function GetCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Boolean
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index d3694abd4..ffbec5e23 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -4840,13 +4840,14 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function GetProductosServiciosAlmacenSeccion(CvePS As Integer, CveAlmacen As Integer, CveAlmacenSeccion As Integer) As Boolean
+ Public Function GetProductosServiciosAlmacenSeccion(CvePS As Integer, CveAlmacen As Integer, CveSeccionAlmacen As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ProductosServiciosAlmacenSeccionGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
- .Add("@CveAlmacenSeccion", SqlDbType.Int).Value = CveAlmacenSeccion
+ .Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 79134e341..389d0dbed 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -14,6 +14,7 @@ Imports CrystalDecisions.Shared
Imports CrystalDecisions.ReportSource
Imports Stimulsoft.Report
Imports System.Xml
+Imports System.Web.Http.ValueProviders
'NOTA AD TEAM
@@ -1734,33 +1735,7 @@ Public Class ClsPaginas
Application("GlobalDTInvConceptos") = value
End Set
End Property
- Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If Application(AppNombre) Is Nothing Then
- Dim ObjInv As New ClsInventarios
- If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then Application(AppNombre) = ObjInv.DtResultados
- ObjInv.Dispose()
- End If
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
- If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTSeccionAlmacen = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTSeccionAlmacen = DirectCast(Application("GlobalDTSeccionAlmacen"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa)
- Application(AppNombre) = value
- End Set
- End Property
Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1) As DataTable
Get
@@ -1797,6 +1772,76 @@ Public Class ClsPaginas
Application("GlobalDTAlmacenUsuarios") = value
End Set
End Property
+
+ Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa)
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjInv As New ClsInventarios
+ If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then Application(AppNombre) = ObjInv.DtResultados
+ ObjInv.Dispose()
+ End If
+ If CveEmpresa <> -1 Then
+ Dim Str As New StringBuilder
+
+ If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
+ If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTSeccionAlmacen = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTSeccionAlmacen = DirectCast(Application("GlobalDTSeccionAlmacen"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa)
+ Application(AppNombre) = value
+ End Set
+ End Property
+
+ Property GlobalDTInvPSSeccionesAlmacen(CveEmpresa As Integer, CveAlmacen As Integer, CvePS As Integer) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTInvPSSeccionesAlmacen-{0}", CveEmpresa)
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjInv As New ClsInventarios
+ If ObjInv.GetProductosServiciosAlmacenSeccion(-1, -1, -1, CveEmpresa) Then Application(AppNombre) = ObjInv.DtResultados
+ ObjInv.Dispose()
+ End If
+ If CveEmpresa <> -1 Then
+ Dim Str As New StringBuilder
+
+ If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
+ If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
+ If CvePS > 0 Then Str.AppendFormat("AND CvePS = {0}", CvePS)
+
+ 'si el PS no tiene definido una seccion, toma las del Almacen
+ If DirectCast(Application(AppNombre), DataTable) IsNot Nothing Then
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTInvPSSeccionesAlmacen = Dv.ToTable
+ Dv.Dispose()
+ 'sino tiene datos registrados, toma los de almacen
+ If GlobalDTInvPSSeccionesAlmacen.Rows.Count = 0 Then
+ GlobalDTInvPSSeccionesAlmacen = GlobalDTSeccionAlmacen(CveEmpresa, CveAlmacen)
+ End If
+ Else
+ 'sino tiene datos registrados, toma los de almacen
+ GlobalDTInvPSSeccionesAlmacen = GlobalDTSeccionAlmacen(CveEmpresa, CveAlmacen)
+ End If
+
+ Else
+ GlobalDTInvPSSeccionesAlmacen = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTInvPSSeccionesAlmacen-{0}", CveEmpresa)
+ Application(AppNombre) = value
+ End Set
+ End Property
+
Property GlobalDTNom_Periodos() As DataTable
Get
GlobalDTNom_Periodos = DirectCast(Application("GlobalDTNom_Periodos"), DataTable)
diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb
index 6b4c01406..7a8561d47 100644
--- a/App_Code/ClsProductosServicios.vb
+++ b/App_Code/ClsProductosServicios.vb
@@ -65,6 +65,11 @@ Public Class ClsProductosServicios
Public Property AplicaIEPS As Boolean
Public Property IEPSGrabaIVA As Boolean
+ Public Property AplicaSerie As Boolean
+ Public Property AplicaLote As Boolean
+ Public Property AplicaCaducidad As Boolean
+ Public Property AplicaSeccion As Boolean
+
Public Property CveConceptoContable As Integer
'Nuevo R: 26/09/2017'
@@ -256,6 +261,11 @@ Public Class ClsProductosServicios
IEPSPorcentaje = Data.Rows(0)("IEPSPorcentaje").ToString.ToDouble
CveConceptoContable = Data.Rows(0)("CveConceptoContable").ToString.ToEntero
+ AplicaSerie = (Data.Rows(0)("AplicaSerie").ToString) = "True"
+ AplicaLote = (Data.Rows(0)("AplicaLote").ToString) = "True"
+ AplicaCaducidad = (Data.Rows(0)("AplicaCaducidad").ToString) = "True"
+ AplicaSeccion = (Data.Rows(0)("AplicaSeccion").ToString) = "True"
+
'Nuevo R: 26/09/2017'
Inventariable = Data.Rows(0)("Inventariable").ToString = "True"
@@ -614,8 +624,9 @@ Public Class ClsProductosServicios
Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1,
Optional CveFraccionArancelaria As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
- Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
- Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False) As Boolean
+ Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False,
+ Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False) As Boolean
+
Dim Retorno As Boolean = False
DataAdapter("PA_ProductosServiciosUpdate")
@@ -1792,7 +1803,7 @@ Public Class ClsProductosServicios
Public Function GetPSExistencias(CvePS As Integer, CvePrecioLista As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer,
CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
- Optional FechaMovto As String = "-1", Optional SerieLote As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
+ Optional FechaMovto As String = "-1", Optional Serie As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, Optional Lote As String = "-1", Optional Batch As String = "-1",
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -1808,7 +1819,7 @@ Public Class ClsProductosServicios
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
- .Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
+ .Add("@Serie", SqlDbType.VarChar).Value = Serie
.Add("@Lote", SqlDbType.VarChar).Value = Lote
.Add("@Batch", SqlDbType.VarChar).Value = Batch
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 5d07b8c90..efc1d2d3f 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -1209,7 +1209,7 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function UpdateVentaDetalleRemision(CveVenta As Integer, CvePS As Integer, Cantidad As Double, PU As Double, IEPS As Double, Observaciones As String, Optional CveUsuarioModifico As Integer = -1) As Boolean
+ Public Function UpdateVentaDetalleRemision(CveVenta As Integer, CvePS As Integer, Cantidad As Double, PU As Double, IEPS As Double, PorcentajeIEPS As Decimal, Observaciones As String, Optional CveUsuarioModifico As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasDetalleRemisionUpdate")
@@ -1219,6 +1219,7 @@ Public Class ClsVentas
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
.Add("@PU", SqlDbType.Float).Value = PU
.Add("@IEPS", SqlDbType.Float).Value = IEPS
+ .Add("@PorcentajeIEPS", SqlDbType.Float).Value = PorcentajeIEPS
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
End With
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index cda859572..d19de8eef 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -3369,7 +3369,7 @@ Namespace Modelos
CveUnidad = Dr("CveUM").ToString.ToEntero
Cantidad = Dr("Cantidad").ToString.ToDouble
- If Dr("CveTipoInvPS").ToString.ToEntero = 5 And Dr("SerieLote").ToString = "" Then
+ If Dr("CveTipoInvPS").ToString.ToEntero = 5 And Dr("Serie").ToString = "" Then
OcurrioError = True
ErrorList.Add("Se deben especificar las Series de los productos de almacén")
Exit For
@@ -3510,7 +3510,7 @@ Namespace Modelos
'Si no se ha terminado de surtir agregamos el movimiento
If Indice >= 0 Then
- ' rowSurtidos("Surtido").ToString.ToDouble < rowSurtidos("Cantidad").ToString.ToDouble AndAlso (dr("CantidadDisponible").ToString.ToDouble - rowSurtidos("Surtido").ToString.ToDouble > 0 Or dr("SerieLote").ToString <> "")
+ ' rowSurtidos("Surtido").ToString.ToDouble < rowSurtidos("Cantidad").ToString.ToDouble AndAlso (dr("CantidadDisponible").ToString.ToDouble - rowSurtidos("Surtido").ToString.ToDouble > 0 Or dr("Serie").ToString <> "")
If rowSurtidos("Surtido").ToString.ToDecimal < rowSurtidos("Cantidad").ToString.ToDecimal Then
Dim CantidadSurtida As Double = If(dr("CantidadDisponible").ToString.ToDecimal < rowSurtidos("Cantidad").ToString.ToDouble, dr("CantidadDisponible").ToString.ToDecimal, rowSurtidos("Cantidad").ToString.ToDecimal)
MovDTCuadrados.ImportRow(dr)
@@ -3653,7 +3653,7 @@ Namespace Modelos
Dim CveUnidad As Integer = MovDet("CveUM").ToString.ToEntero
Dim PU As Decimal = MovDet("PU").ToString.ToDecimal
Dim CveProducto As Integer = MovDet("CvePS").ToString.ToEntero
- Dim SerieLote As String = MovDet("SerieLote").ToString
+ Dim Serie As String = MovDet("Serie").ToString
Dim Consec As Integer = DtRemisiones.FiltroPrimeroValor("Consec", $"CveVentaDetalle = {MovDet("CveVentaDetalle").ToString}").ToEntero
'COMIENZA: VENTADETALLE
@@ -3672,7 +3672,7 @@ Namespace Modelos
Exit For
End If
- If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Lote:=SerieLote, CveVentaDetalle:=CveVentaDetalle) Then
+ If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Serie, CveVentaDetalle:=CveVentaDetalle) Then
ContadorMovtosDetalles += 1
Else
OcurrioError = True
@@ -4436,7 +4436,7 @@ Namespace Modelos
If CveMovimientoDevolucion > 0 Then
For Each Dr As DataRow In DtExistencias.FiltraParametros($"CveMovimiento = {RowMovimiento("CveMovimiento").ToString()}").Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
ErrorCancelar = True
MensajeError = "Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar."
Exit For
@@ -4936,7 +4936,7 @@ Namespace Modelos
End If
For Each Dr As DataRow In DtMovtosDev.FiltraParametros($"CveVentaDetalle = {DrRem("CveVentaDetalle").ToString.ToEntero}").Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=CveVentaDetalleRem, Lote:=Dr("Lote").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Serie:=Dr("Serie").ToString, CveVentaDetalle:=CveVentaDetalleRem, Lote:=Dr("Lote").ToString) Then
ErrorCancelar = True
Exit For
End If
@@ -5018,7 +5018,7 @@ Namespace Modelos
Exit For
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, DrRem("Cantidad").ToString.ToDecimal, DrRem("CveUM").ToString.ToEntero, DrRem("CvePS").ToString.ToEntero, DrRem("PU").ToString.ToDecimal, DrRem("CveActivoFijo").ToString.ToEntero, -1, DrRem("SerieLote").ToString, CveVentaDetalle:=CveVentaDetalleRem, Lote:=DrRem("Lote").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, DrRem("Cantidad").ToString.ToDecimal, DrRem("CveUM").ToString.ToEntero, DrRem("CvePS").ToString.ToEntero, DrRem("PU").ToString.ToDecimal, CveAF:=DrRem("CveActivoFijo").ToString.ToEntero, Serie:=DrRem("Serie").ToString, CveVentaDetalle:=CveVentaDetalleRem, Lote:=DrRem("Lote").ToString) Then
ErrorCancelar = True
Exit For
End If
@@ -5033,7 +5033,7 @@ Namespace Modelos
If Not ErrorCancelar Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaDevRem, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
ErrorCancelar = True
Exit For
End If
@@ -5088,7 +5088,7 @@ Namespace Modelos
Exit For
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
ErrorCancelar = True
Exit For
End If
@@ -5111,7 +5111,7 @@ Namespace Modelos
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
ErrorCancelar = True
Exit For
End If
diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx
index a98d3c130..461d85c62 100644
--- a/Ashx/SIGFacturacion.ashx
+++ b/Ashx/SIGFacturacion.ashx
@@ -542,7 +542,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
- TmpDT.Columns.Add("SerieLote", GetType(String))
+ TmpDT.Columns.Add("Serie", GetType(String))
TmpDT.Columns.Add("CuentaPredial", GetType(String))
TmpDT.Columns.Add("Obs", GetType(String))
TmpDT.Columns.Add("TiempoEntrega", GetType(String))
@@ -629,7 +629,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Private Function AgregarProductoServicio(ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, TmpDT As DataTable, Consec As Integer, Cantidad As Double, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
PU As Decimal, Descuento As Decimal, CveSubProyecto As Integer,
- Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
+ Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0,
@@ -682,7 +682,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Row("Proyecto") = DrSubProyecto("Proyecto").ToString()
Row("CveSubProyecto") = CveSubProyecto
Row("SubProyecto") = DrSubProyecto("SubProyecto").ToString()
- Row("SerieLote") = SerieLote
+ Row("Serie") = Serie
Row("TiempoEntrega") = TiempoEntrega
Row("Orden") = TmpDT.Rows.Count + 1
Row("Cantidad") = Cantidad
diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx
index 8ae61eb7e..ff6662eda 100644
--- a/Ashx/SIGWeb.ashx
+++ b/Ashx/SIGWeb.ashx
@@ -533,11 +533,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno)
-
+ DtPSRetorno.Dispose()
Else
context.Response.Write("[]")
End If
- DtPSRetorno.Dispose()
+
End If
Return retorno
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index beb0c14e3..7e142edeb 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -5049,7 +5049,7 @@ Partial Class Bancos_IE
Filtro = ""
End If
- If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) And ObjBancos.DtResultados.FiltraParametros(Filtro).Rows.Count > 0 Then
+ If CveIE > 0 AndAlso ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) AndAlso ObjBancos.DtResultados.FiltraParametros(Filtro).Rows.Count > 0 Then
Retorno = True
Else
Retorno = False
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb
index 6d65cb6d8..587e2dafd 100644
--- a/Bancos/PopIEVentas.aspx.vb
+++ b/Bancos/PopIEVentas.aspx.vb
@@ -1392,8 +1392,8 @@ Partial Class Bancos_PopIEVentas
End If
Dim MsgError As String = ""
- Dim CveConcepto As Integer = -1
- Dim CveConcepto2 As Integer = -1
+ Dim CveConceptoPrePoliza As Integer = -1
+ Dim CveConceptoPrePoliza2 As Integer = -1
Dim CvePersonal As Integer = -1
Dim Inserta As Boolean = True
Dim ImportePagado As Decimal = 0
@@ -1412,7 +1412,7 @@ Partial Class Bancos_PopIEVentas
Case "2" 'FyE
ImportePagado = TxtImporte.Text.Trim.ToDecimal
Fecha = TxtFechaDocumento.Text.Trim.ToDate
- CveConcepto = 29
+ CveConceptoPrePoliza = 29
CveIE = -1
TipoMovimiento = True
Dim stringPersonal As String = DdlFuncionarioEmpleado.SelectedItem.ToString
@@ -1421,8 +1421,8 @@ Partial Class Bancos_PopIEVentas
ImportePagado = TxtImporte.Text.Trim.ToDecimal
Case "4" 'Deudores Diversos
ImportePagado = TxtImporte.Text.Trim.ToDecimal
- CveConcepto = 17
- CveConcepto2 = 37
+ CveConceptoPrePoliza = 17
+ CveConceptoPrePoliza2 = 37
CveIE = -1
Case "5" 'Compras
ImportePagado = TxtImporte.Text.Trim.ToDecimal
@@ -1526,7 +1526,7 @@ Partial Class Bancos_PopIEVentas
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte)
If CveIE > 0 Then
If CveVenta > 0 Then
- CveConcepto = 2
+ CveConceptoPrePoliza = 2
End If
Else
MsgError = "Ocurrio un Error al registrarse el movimiento bancario."
@@ -1534,8 +1534,8 @@ Partial Class Bancos_PopIEVentas
End If
Case "3" 'Ingresos x Comprobar
If CveVenta > 0 Then
- CveConcepto = 2
- CveConcepto2 = 92
+ CveConceptoPrePoliza = 2
+ CveConceptoPrePoliza2 = 92
CveCliente = DdlIngreso.SelectedValue.ToEntero
CveIE = -1
ImportePagado = TxtImporte.Text.Trim.ToDecimal
@@ -1543,18 +1543,20 @@ Partial Class Bancos_PopIEVentas
Case "4" 'Deudores Diversos
If CveVenta > 0 Then
ImportePagado = TxtImporte.Text.Trim.ToDecimal
- CveConcepto = 2
- CveConcepto2 = 43
+ CveConceptoPrePoliza = 2
+ CveConceptoPrePoliza2 = 43
CveProveedor2 = DdlDeudor.SelectedValue.ToEntero
CveIE = -1
End If
Case "5" 'Compras
If CveVenta > 0 Then
ImportePagado = TxtImporte.Text.Trim.ToDecimal
- CveConcepto = 2
+ CveConceptoPrePoliza = 2
'CveConcepto2 = 43
CveIE = -1
End If
+ Case Else
+ MsgError = "No se ha especificada opcion."
End Select
@@ -1871,17 +1873,17 @@ Partial Class Bancos_PopIEVentas
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
+ ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * tipoCambioVenta
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
+ ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * tipoCambioVenta
End If
- ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
+ ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2)
TimpocambioGeneral = tipoCambioVenta
CveSubProyectoContabilizar = CveSubProyectoVenta
@@ -1907,17 +1909,17 @@ Partial Class Bancos_PopIEVentas
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
+ ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
+ ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
End If
- ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
+ ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2)
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
CveSubProyectoContabilizar = CveSubProyectoVenta
@@ -1942,17 +1944,17 @@ Partial Class Bancos_PopIEVentas
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = MovimientoPagar.IEPS * PorcentajePago
+ ImporteMovimiento = (MovimientoPagar.IEPS * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * tipoCambioVenta
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = (MovimientoPagar.IEPS * PorcentajePago)
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = (MovimientoPagar.IEPS * PorcentajePago)
+ ImporteMovimiento = (MovimientoPagar.IEPS * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * tipoCambioVenta
End If
- ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
+ ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2)
TimpocambioGeneral = tipoCambioVenta
CveSubProyectoContabilizar = CveSubProyectoVenta
@@ -1970,17 +1972,17 @@ Partial Class Bancos_PopIEVentas
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = (MovimientoPagar.IEPS * PorcentajePago)
+ ImporteMovimiento = (MovimientoPagar.IEPS * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = (MovimientoPagar.IEPS * PorcentajePago)
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = (MovimientoPagar.IEPS * PorcentajePago)
+ ImporteMovimiento = (MovimientoPagar.IEPS * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
End If
- ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
+ ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2)
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
CveSubProyectoContabilizar = CveSubProyectoVenta
@@ -1999,14 +2001,14 @@ Partial Class Bancos_PopIEVentas
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
+ ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
+ ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
@@ -2045,14 +2047,14 @@ Partial Class Bancos_PopIEVentas
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = (MovimientoPagar.RetISR * PorcentajePago)
+ ImporteMovimiento = (MovimientoPagar.RetISR * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = (MovimientoPagar.RetISR * PorcentajePago)
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
tipoCambioVenta = TipoCambioOriginal
- ImporteMovimiento = (MovimientoPagar.RetISR * PorcentajePago)
+ ImporteMovimiento = (MovimientoPagar.RetISR * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
@@ -2109,9 +2111,13 @@ Partial Class Bancos_PopIEVentas
If tImporteVenta <> tImportePago Then
If tImporteVenta < tImportePago Then
- CveConcepto = 64
+ ConceptoContable = 64
+ IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
+ TipoMovimiento = True
Else
- CveConcepto = 65
+ ConceptoContable = 65
+ IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
+ TipoMovimiento = False
End If
Diferencia = Math.Abs(tImporteVenta - tImportePago)
End If
@@ -2128,6 +2134,8 @@ Partial Class Bancos_PopIEVentas
Diferencia = Math.Round(Diferencia, 2)
End If
+ ImporteMovimiento = Math.Abs(Diferencia)
+ ImporteMX = ImporteMovimiento
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
@@ -3455,27 +3463,22 @@ Partial Class Bancos_PopIEVentas
ImporteMovimiento = 0
End Select
- If ImporteMovimiento <> 0 Then
+ If ImporteMovimiento <> 0 AndAlso MsgError = "" Then
'Conta ContPAQ
If IdCtaContable = 0 Then
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
- 'Conta SIG
- If CveCuenta = 0 Then
- CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
- CveCuentaContabilizacion = 0
- End If
-
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, CveCliente:=CveClienteOriginal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, CvePersonal:=CvePersonal, TipoCambio:=TimpocambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
+ Exit For
End If
End If
Next
- If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then
+ If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
MsgError = ObjMov.MensajePolizaDescuadre
End If
diff --git a/Bancos/ProductosServicios.aspx.vb b/Bancos/ProductosServicios.aspx.vb
deleted file mode 100644
index bf0e4c9d4..000000000
--- a/Bancos/ProductosServicios.aspx.vb
+++ /dev/null
@@ -1,840 +0,0 @@
-Option Explicit On
-Option Strict On
-
-Imports Extensiones
-Imports System.Data
-
-Partial Class ProductosyServicios
- Inherits ClsPaginas
-
-#Region " Propiedades "
- Private ReadOnly Property CvePS As Integer
- Get
- Return ViewState("CvePS").ToString.ToEntero
- End Get
- End Property
- Private Property Ret As String
- Get
- Return ViewState("Ret").ToString
- End Get
- Set(value As String)
- ViewState("Ret") = value
- End Set
- End Property
- Public Property dtPaqueteDetalles() As DataTable
- Get
- Return CType(ViewState("dtPaqueteDetalles"), DataTable)
- End Get
- Set(value As DataTable)
- ViewState("dtPaqueteDetalles") = value
- End Set
- End Property
- Public Property dtFamily() As DataTable
- Get
- Return CType(ViewState("dtFamily"), DataTable)
- End Get
- Set(value As DataTable)
- ViewState("dtFamily") = value
- End Set
- End Property
-#End Region
-
-
- Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
- If Not IsPostBack Then
- ViewState("OrdenO") = ""
- ViewState("OrdenC") = ""
- ViewState("DTProductosServiciosCaracteristicas") = Nothing
- ViewState("DTProductosServiciosCaracteristicasOpciones") = Nothing
- ViewState("CveSubFamilia") = "-1"
- Ret = "-1"
- 'CType(Me.Master, BaseMasterPage).EsPopup = True
- 'CType(Me.Master, BaseMasterPage).PopupWidth = 700
- 'RegistraScript("$get('tdContenido').style.height='350px'")
-
- CargaClasificaciones()
- CargaUnidadesMedida()
- CargarMetodosInv()
-
-
- If UsuarioActual.Empresa.UsaContabilidad Then
- CargaCuentasContables()
- End If
- If Request("CvePS") IsNot Nothing AndAlso IsNumeric(Request("CvePS")) AndAlso Request("CvePS").ToEntero > 0 Then
- ViewState("CvePS") = Request("CvePS")
- CargaDatos()
- 'Configuración de Modalidad Update
- BtnGuardar.Text = "Guardar Cambios"
-
- LoadCaracteristicas()
- CargarAlias()
- Else
- 'Configuración de Modalidad Insert
- ViewState("CvePS") = -1
- ChkEstado.Enabled = False
- ChkEstado.Checked = True
- LblFechaCaptura.Text = Now.ToShortDateString()
- LblUsuarioCapturo.Text = UsuarioActual.Usuario
- BtnEliminar.Visible = False
- End If
-
- If Request("Ret") IsNot Nothing AndAlso Request("Ret").ToString <> "" Then
- Ret = Request("Ret")
- End If
- CargaFamilia(ViewState("CveSubFamilia").ToString.ToEntero)
- CargaDefault()
- CargaSucursaless()
-
-
- If UsuarioActual.TienePermisoProceso(122) Then
- BtnEliminar.Visible = False
- BtnGuardar.Visible = False
- End If
- End If
- End Sub
-
-#Region "S U C U R S A L E S"
- Private Sub CargaSucursaless()
- 'Dim dtSuc As DataTable = GlobalDTSucursales().FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa.ToString)
- 'dtSuc.AcceptChanges()
-
- 'dtSuc.Columns.Add("Importe")
- 'dtSuc.Columns.Add("Activo")
-
- 'For Each row As DataRow In dtSuc.Rows
- ' row("Activo") = False
- 'Next
- 'dtSuc.AcceptChanges()
-
- 'If Not ViewState("CvePS") Is Nothing Then
- ' Dim ObjPS As New ClsProductosServicios
-
- ' If ObjPS.GetPSSucursales(CvePS) Then
- ' Dim dtSucP As DataTable = ObjPS.DtResultados
-
- ' For Each Row As DataRow In dtSucP.Rows
- ' Dim rowsToUpdate = dtSuc.AsEnumerable().Where(Function(r) r.Field(Of Integer)("CveSucursal") = Row("CveSucursal").ToString.ToEntero AndAlso r!CveSucursal.ToString.ToEntero > 0)
-
- ' For Each roww As DataRow In rowsToUpdate
- ' roww.SetField("Importe", Row("Importe"))
- ' roww.SetField("Activo", True)
- ' Next
-
- ' 'For Each drtt As DataRow In TmpDT.Select(String.Format("PS='{0}' AND CvePS=0", Row("PS")))
- ' ' drtt("CvePS") = tCve
- ' 'Next
-
-
- ' dtSuc.AcceptChanges()
- ' Next
- ' End If
-
- ' ObjPS.Dispose()
- 'End If
-
- 'gvSucursal.DataSource = dtSuc
- 'gvSucursal.DataBind()
-
- Dim ObjPS As New ClsProductosServicios
-
- If ObjPS.GetPSSucursales(CvePS, UsuarioActual.CveEmpresa) Then
- gvSucursal.DataSource = ObjPS.DtResultados
- gvSucursal.DataBind()
- End If
-
- ObjPS.Dispose()
- End Sub
-
- Protected Sub gvSucursal_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles gvSucursal.RowDataBound
- If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.RowIndex = 0 Then
- e.Row.Cells(0).Width = Unit.Pixel(50)
- e.Row.Cells(1).Width = Unit.Pixel(100)
- e.Row.Cells(2).Width = Unit.Pixel(100)
- End If
-
- ' If e.Row.FCCheckBox("chkSucursal").Checked = True Then e.Row.Cells(0).BackColor = Drawing.Color.Yellow
- End If
- End Sub
-#End Region
-
-#Region "C A R A C T E R I S T I C A S"
- Private Sub LoadCaracteristicas()
- ViewState("OrdenC") = ""
- CargaDatosC()
-
- CargaProductosServiciosCaracteristicas()
- CargaDatosO()
- End Sub
-
- Public Sub CargaDefault()
-
- Dim ObjCaracteristicas As New ClsGralProductosServiciosCaracteristicas
- If ObjCaracteristicas.GetProductosServiciosCaracteristicas() Then
- ViewState("DTProductosServiciosCaracteristicas") = ObjCaracteristicas.DtResultados.Clone
- End If
-
- If ObjCaracteristicas.GetProductosServiciosCaracteristicasOpciones() Then
- ViewState("DTProductosServiciosCaracteristicasOpciones") = ObjCaracteristicas.DtResultados.Clone
- End If
- ObjCaracteristicas.Dispose()
- End Sub
-
- Public Sub CargaDatosC()
- Dim ObjCaracteristicas As New ClsGralProductosServiciosCaracteristicas
- If ObjCaracteristicas.GetProductosServiciosCaracteristicas() Then
- ViewState("DTProductosServiciosCaracteristicas") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- GlobalDTProductosServiciosCaracteristicas(UsuarioActual.CveEmpresa) = ObjCaracteristicas.DtResultados
- Else
- Me.GvDatosCaracteristicas.DataSource = Nothing
- End If
-
- If ViewState("OrdenC").ToString() <> String.Empty Then
- CargaGrid(ViewState("OrdenC").ToString(), 0)
- Else
- CargaGrid("", 0)
- End If
- End Sub
-
- Public Sub CargaDatosO()
- Dim ObjOpciones As New ClsGralProductosServiciosCaracteristicas
- If ObjOpciones.GetProductosServiciosCaracteristicasOpciones() Then
- ViewState("DTProductosServiciosCaracteristicasOpciones") = ObjOpciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- GlobalDTProductosServiciosCaracteristicasOpciones(UsuarioActual.CveEmpresa) = ObjOpciones.DtResultados
- Else
- GvDatosOpciones.DataSource = Nothing
- End If
-
- If ViewState("OrdenO").ToString() <> String.Empty Then
- CargaGrid(ViewState("OrdenO").ToString(), 1)
- Else
- CargaGrid("", 1)
- End If
- End Sub
-
- Protected Sub LbAgregarC_Click(sender As Object, e As System.EventArgs) Handles LbAgregarC.Click
- Dim ObjCaracteristicas As New ClsGralProductosServiciosCaracteristicas
- If ObjCaracteristicas.AddProductosServiciosCaracteristicas(TxtCaracteristica.Text.Trim, CvePS, ChkEsOpcion.Checked, UsuarioActual.CveUsuario) Then
- TxtCaracteristica.Text = ""
- Alert("La nueva Característica de Producto o Servicio se guardó correctamente.", TipoMensaje.MsgInformacion)
- ViewState("DTProductosServiciosCaracteristicas") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- GlobalDTProductosServiciosCaracteristicas(UsuarioActual.CveEmpresa) = ObjCaracteristicas.DtResultados
-
- CambioProductosServiciosCaracteristicas()
- End If
- ObjCaracteristicas.Dispose()
- End Sub
-
- Protected Sub LbAgregarO_Click(sender As Object, e As System.EventArgs) Handles LbAgregarO.Click
- Dim ObjOpciones As New ClsGralProductosServiciosCaracteristicas
- If ObjOpciones.AddProductosServiciosCaracteristicasOpciones(TxtOpcion.Text.Trim, DdlCaracteristica.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
- TxtOpcion.Text = ""
- Alert("La nueva Opción para Característica de Producto o Servicio se guardó correctamente.", TipoMensaje.MsgInformacion)
- ViewState("DTProductosServiciosCaracteristicasOpciones") = ObjOpciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- GlobalDTProductosServiciosCaracteristicasOpciones(UsuarioActual.CveEmpresa) = ObjOpciones.DtResultados
-
- CambioProductosServiciosCaracteristicasOpciones()
- End If
- ObjOpciones.Dispose()
- End Sub
-
- Private Sub CargaProductosServiciosCaracteristicas()
- DdlCaracteristica.Items.Clear()
- DdlCaracteristica.DataSource = GlobalDTProductosServiciosCaracteristicas(UsuarioActual.CveEmpresa).FiltraParametros("EsOpcion = 'Sí' AND CvePS = " + CvePS.ToString)
- DdlCaracteristica.DataBind()
- End Sub
-
- Protected Sub DdlCaracteristica_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCaracteristica.SelectedIndexChanged
- If ViewState("OrdenO").ToString() <> String.Empty Then
- CargaGrid(ViewState("OrdenO").ToString(), 1)
- Else
- CargaGrid("", 1)
- End If
- End Sub
-
- Protected Sub CambioProductosServiciosCaracteristicas()
- CargaProductosServiciosCaracteristicas()
- UpTitulosC.Update()
- CargaDatosC()
- CambioProductosServiciosCaracteristicasOpciones()
- End Sub
-
- Protected Sub CambioProductosServiciosCaracteristicasOpciones()
- UpTitulosO.Update()
- CargaDatosO()
- End Sub
-#End Region
-
-#Region "G V C A R A C T E R I S T I C A S"
-
- Protected Sub GvDatosCaracteristicas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatosCaracteristicas.RowDataBound
- If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.RowIndex = 0 Then
- e.Row.Cells(0).Width = Unit.Pixel(150)
- e.Row.Cells(1).Width = Unit.Pixel(100)
- e.Row.Cells(2).Width = Unit.Pixel(100)
- e.Row.Cells(3).Width = Unit.Pixel(100)
- e.Row.Cells(4).Width = Unit.Pixel(50)
- e.Row.Cells(5).Width = Unit.Pixel(50)
- End If
- e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
-
- If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
- 'e.Row.FCDropDownList("DdlPSEdit").DataSource = ViewState("DTPS")
- 'e.Row.FCDropDownList("DdlPSEdit").DataBind()
- 'e.Row.FCDropDownList("DdlPSEdit").SelectedValue = e.Row.DBCampo("CvePS")
- End If
- End If
- End Sub
-
- Protected Sub GvDatosCaracteristicas_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatosCaracteristicas.RowDeleting
- Dim ObjCaracteristicas As New ClsGralProductosServiciosCaracteristicas
- If ObjCaracteristicas.RemoveProductosServiciosCaracteristica(GvDatosCaracteristicas.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
- GvDatosCaracteristicas.EditIndex = -1
- ViewState("DTProductosServiciosCaracteristicas") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- GlobalDTProductosServiciosCaracteristicas(UsuarioActual.CveEmpresa) = ObjCaracteristicas.DtResultados
- Alert("La Característica del Producto o Servicio se eliminó correctamente.", TipoMensaje.MsgInformacion)
-
- CambioProductosServiciosCaracteristicas()
- End If
-
- ObjCaracteristicas.Dispose()
- End Sub
-
- Protected Sub GvDatosCaracteristicas_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatosCaracteristicas.RowCancelingEdit
- GvDatosCaracteristicas.EditIndex = -1
- If ViewState("OrdenC").ToString() <> String.Empty Then
- CargaGrid(ViewState("OrdenC").ToString(), 0)
- Else
- CargaGrid("", 0)
- End If
- End Sub
-
- Protected Sub GvDatosCaracteristicas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatosCaracteristicas.RowUpdating
- Dim ObjCaracteristicas As New ClsGralProductosServiciosCaracteristicas
- Dim CveCaracteristica As Integer = GvDatosCaracteristicas.DataKeys(e.RowIndex).Value.ToString.ToEntero
-
- Dim Caracteristica As String = DirectCast(GvDatosCaracteristicas.Rows(e.RowIndex).FindControl("TxtCaracteristica"), TextBox).Text.Trim
- Dim EsOpcion As Boolean = GvDatosCaracteristicas.Rows(e.RowIndex).FCCheckBox("ChkEsOpcion").Checked
-
- If ObjCaracteristicas.UpdateProductosServiciosCaracteristica(Caracteristica, CvePS, EsOpcion, CveCaracteristica) Then
- GvDatosCaracteristicas.EditIndex = -1
- ViewState("DTProductosServiciosCaracteristicas") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- GlobalDTProductosServiciosCaracteristicas(UsuarioActual.CveEmpresa) = ObjCaracteristicas.DtResultados
- Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
-
- CambioProductosServiciosCaracteristicas()
- End If
-
- ObjCaracteristicas.Dispose()
- End Sub
-
- Protected Sub GvDatosCaracteristicas_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatosCaracteristicas.RowEditing
- GvDatosCaracteristicas.EditIndex = e.NewEditIndex
- If ViewState("OrdenC").ToString() <> String.Empty Then
- CargaGrid(ViewState("OrdenC").ToString(), 0)
- Else
- CargaGrid("", 0)
- End If
- End Sub
-#End Region
-
-#Region "G V O P C I O N E S"
- Protected Sub GvDatosOpciones_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatosOpciones.RowDataBound
- If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.RowIndex = 0 Then
- e.Row.Cells(0).Width = Unit.Pixel(150)
- e.Row.Cells(1).Width = Unit.Pixel(150)
- e.Row.Cells(2).Width = Unit.Pixel(100)
- e.Row.Cells(3).Width = Unit.Pixel(100)
- e.Row.Cells(4).Width = Unit.Pixel(50)
- e.Row.Cells(5).Width = Unit.Pixel(50)
- End If
- e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
-
- If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
- e.Row.FCDropDownList("DdlCaracteristicaEdit").DataSource = GlobalDTProductosServiciosCaracteristicas(UsuarioActual.CveEmpresa).FiltraParametros("CvePS = " + CvePS.ToString)
- e.Row.FCDropDownList("DdlCaracteristicaEdit").DataBind()
- e.Row.FCDropDownList("DdlCaracteristicaEdit").SelectedValue = e.Row.DBCampo("CvePS")
- End If
- End If
- End Sub
-
- Protected Sub GvDatosOpciones_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatosOpciones.RowDeleting
- Dim ObjOpciones As New ClsGralProductosServiciosCaracteristicas
- If ObjOpciones.RemoveProductosServiciosCaracteristicasOpciones(GvDatosOpciones.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
- GvDatosOpciones.EditIndex = -1
- ViewState("DTProductosServiciosCaracteristicasOpciones") = ObjOpciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- GlobalDTProductosServiciosCaracteristicasOpciones(UsuarioActual.CveEmpresa) = ObjOpciones.DtResultados
- Alert("La Opción para Caracteristica del Producto o Servicio se eliminó correctamente.", TipoMensaje.MsgInformacion)
-
- CambioProductosServiciosCaracteristicasOpciones()
- End If
-
- ObjOpciones.Dispose()
- End Sub
-
- Protected Sub GvDatosOpciones_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatosOpciones.RowCancelingEdit
- GvDatosOpciones.EditIndex = -1
- If ViewState("OrdenO").ToString() <> String.Empty Then
- CargaGrid(ViewState("OrdenO").ToString(), 1)
- Else
- CargaGrid("", 1)
- End If
- End Sub
-
- Protected Sub GvDatosOpciones_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatosOpciones.RowUpdating
- Dim ObjOpciones As New ClsGralProductosServiciosCaracteristicas
- Dim CveCaracteristica As Integer = DirectCast(GvDatosOpciones.Rows(e.RowIndex).FindControl("DdlCaracteristicaEdit"), DropDownList).SelectedValue.ToEntero
- Dim CveOpcion As Integer = GvDatosOpciones.DataKeys(e.RowIndex).Value.ToString.ToEntero
-
- Dim Opcion As String = DirectCast(GvDatosOpciones.Rows(e.RowIndex).FindControl("TxtOpcion"), TextBox).Text.Trim
-
- If ObjOpciones.UpdateProductosServiciosCaracteristicasOpciones(Opcion, CveCaracteristica, CveOpcion) Then
- GvDatosOpciones.EditIndex = -1
- ViewState("DTProductosServiciosCaracteristicasOpciones") = ObjOpciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- GlobalDTProductosServiciosCaracteristicasOpciones(UsuarioActual.CveEmpresa) = ObjOpciones.DtResultados
- Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
-
- CambioProductosServiciosCaracteristicasOpciones()
- End If
-
- ObjOpciones.Dispose()
- End Sub
-
- Protected Sub GvDatosOpciones_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatosOpciones.RowEditing
- GvDatosOpciones.EditIndex = e.NewEditIndex
- If ViewState("OrdenO").ToString() <> String.Empty Then
- CargaGrid(ViewState("OrdenO").ToString(), 1)
- Else
- CargaGrid("", 1)
- End If
- End Sub
-#End Region
-
-#Region "O R D E N A M I E N T O"
- Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
- Dim Orden As String = ""
- Dim Campo As String = ""
- Dim gvi As Integer = 0
- Dim Literal As Literal = Nothing
- Const OrdenInicial As String = ""
- Dim Arg(2) As String
-
- Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
- Campo = Arg(0)
- gvi = Arg(1).ToEntero
- Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
- Campo = Campo.Substring(0, Campo.Length - 1)
-
- If ViewState(String.Format("O{0}", Campo, gvi)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo, gvi)).ToString = String.Format("{0} DESC", Campo) Then
- ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
- Literal.Text = String.Format("")
- Else
- ViewState(String.Format("O{0}", Campo, gvi)) = String.Format("{0} DESC", Campo)
- Literal.Text = String.Format("")
- End If
- Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo, gvi)).ToString
- ViewState("Orden") = Orden
- CargaGrid(Orden, gvi)
- End Sub
-
- Private Sub CargaGrid(Orden As String, gvi As Integer)
- Dim Filtro As String = ""
- If gvi = 0 Then
- Filtro = "CvePS = " + CvePS.ToString
- If Orden <> String.Empty Then
- Dim DV As New DataView(CType(ViewState("DTProductosServiciosCaracteristicas"), DataTable), Filtro, Orden, DataViewRowState.CurrentRows)
- GvDatosCaracteristicas.DataSource = DV.ToTable()
- DV.Dispose()
- Else
- GvDatosCaracteristicas.DataSource = New DataView(GlobalDTProductosServiciosCaracteristicas(UsuarioActual.CveEmpresa), Filtro, "", DataViewRowState.CurrentRows)
- End If
- ViewState("OrdenC") = Orden
- GvDatosCaracteristicas.DataBind()
- UpDatosC.Update()
- ElseIf gvi = 1 Then
- If Not DdlCaracteristica.SelectedItem Is Nothing Then
- Filtro = "CvePSCaracteristica = " + DdlCaracteristica.SelectedItem.Value.ToString
- Else
- Filtro = "1 = 2"
- End If
-
- If Orden <> String.Empty Then
- Dim DV As New DataView(CType(ViewState("DTProductosServiciosCaracteristicasOpciones"), DataTable), Filtro, Orden, DataViewRowState.CurrentRows)
- GvDatosOpciones.DataSource = DV.ToTable()
- DV.Dispose()
- Else
- GvDatosOpciones.DataSource = New DataView(GlobalDTProductosServiciosCaracteristicasOpciones(UsuarioActual.CveEmpresa), Filtro, "", DataViewRowState.CurrentRows)
- End If
- ViewState("OrdenO") = Orden
- GvDatosOpciones.DataBind()
- UpDatosO.Update()
- End If
- End Sub
-#End Region
-
- Private Sub CargaClasificaciones()
- DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
- DdlClasificacion.DataBind()
- DdlClasificacion.Items.Insert(1, New ListItem("Sin Clasificacion", "0"))
- DdlClasificacion.SelectedValueExist("0")
-
- 'BLOQUEA DDL CLASIFICACION
- If UsuarioActual.Empresa.Funcionalidad(121) = "1" Then
- If Not UsuarioActual.TienePermisoProceso(147) Then
- DdlClasificacion.Enabled = False
- End If
- End If
-
- End Sub
-
- Private Sub CargarMetodosInv()
- 'Dim ps As New ClsProductosServicios
- 'ps.GetMetodosInv()
-
-
- 'ddlMetodos.DataSource = ps.DtResultados
- ' ps.Dispose()
- ddlMetodos.DataSource = GlobalDTInvMetodosInventario
- ddlMetodos.DataBind()
- ddlMetodos.Items.Insert(0, New ListItem("Seleccione", "-1"))
-
- End Sub
-
- Private Sub CargaUnidadesMedida()
- DdlUnidadMedida.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
- DdlUnidadMedida.DataBind()
- End Sub
-
- Private Sub CargaCuentasContables()
- 'Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa.ServerContPAQi, UsuarioActual.Empresa.BDContPAQi, UsuarioActual.Empresa.UsrContPAQi, UsuarioActual.Empresa.PwdContPAQi)
- 'If ObjContabilidad.GetCuentas(-1, "-1", -1) Then
- ' DdlCtaContableVentas.DataSource = ObjContabilidad.DtResultados
- ' DdlCtaContableCompras.DataSource = ObjContabilidad.DtResultados
- ' DdlCtaContableInventarios.DataSource = ObjContabilidad.DtResultados
- 'Else
- ' DdlCtaContableVentas.DataSource = Nothing
- ' DdlCtaContableCompras.DataSource = Nothing
- ' DdlCtaContableInventarios.DataSource = Nothing
- 'End If
- 'DdlCtaContableVentas.DataBind()
- 'DdlCtaContableCompras.DataBind()
- 'DdlCtaContableInventarios.DataBind()
- 'ObjContabilidad.Dispose()
- End Sub
-
-#Region "Familias"
- Protected Sub DdlFamilia_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlFamilia.SelectedIndexChanged
- CargaDdlSubFamilia()
- DdlSubFamilia.SelectedValue = "-1"
- End Sub
- Public Sub CargaFamilia(Optional CveSubFamilia As Integer = 0)
- dtFamily = GlobalDTSubFamilias(UsuarioActual.CveEmpresa)
- CargaDdlFamilia()
- If dtFamily.FiltraParametros(String.Format("CveClasificacion={0}", CveSubFamilia)).Rows.Count > 0 Then
- DdlFamilia.SelectedValue = dtFamily.FiltraParametros(String.Format("CveClasificacion={0}", CveSubFamilia)).Rows(0)("CveCategoria").ToString
- End If
- CargaDdlSubFamilia()
-
- If CveSubFamilia > 0 Then
- DdlSubFamilia.SelectedValue = CveSubFamilia.ToString
- End If
- End Sub
-
-
- Public Sub CargaDdlFamilia()
- ' Alert( GlobalDTFamilias(UsuarioActual.CveEmpresa).Rows.Count.ToString())
- DdlFamilia.DataSource = GlobalDTFamilias(UsuarioActual.CveEmpresa)
- DdlFamilia.DataBind()
- End Sub
- Public Sub CargaDdlSubFamilia()
- DdlSubFamilia.DataSource = dtFamily.FiltraParametros(String.Format("CveCategoria={0}", DdlFamilia.SelectedValue), "CveClasificacion")
- DdlSubFamilia.DataBind()
- DdlSubFamilia.Items.Insert(0, New ListItem("----", "-1"))
- End Sub
-#End Region
-
- Private Sub CargaDatos()
- Dim ObjProductosServicios As New ClsProductosServicios()
- If ObjProductosServicios.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then
- If ObjProductosServicios.DtResultados.Rows.Count > 0 Then
-
- 'SI NO TIENE VALOR Y NO TIENE EL PROCESO MUESTRA SIN CLASIFICACION
- If ObjProductosServicios.CveClasificacion.ToString.Equals("-1") And Not UsuarioActual.TienePermisoProceso(147) And UsuarioActual.Empresa.Funcionalidad(121) = "1" Then
- DdlClasificacion.SelectedValueExist("0")
- Else
- DdlClasificacion.SelectedValueExist(ObjProductosServicios.CveClasificacion.ToString)
- End If
-
- DdlUnidadMedida.SelectedValue = ObjProductosServicios.CveUnidadMedida.ToString
- DdlTipoPS.SelectedValue = ObjProductosServicios.CveTipoPS.ToString
- DdlCtaContableVentas.SelectedValue = ObjProductosServicios.IdCtaContVentas.ToString
- DdlCtaContableCompras.SelectedValue = ObjProductosServicios.IdCtaContCompras.ToString
- DdlCtaContableInventarios.SelectedValue = ObjProductosServicios.IdCtaContInventarios.ToString
- DdlAsientoContVentas.SelectedValue = ObjProductosServicios.AsientoContableVentas.ToString
- DdlAsientoContCompras.SelectedValue = ObjProductosServicios.AsientoContableCompras.ToString
- TxtCodigo.Text = ObjProductosServicios.Codigo
- TxtCodigo2.Text = ObjProductosServicios.Codigo2
- TxtCodigoBarras.Text = ObjProductosServicios.CodigoBarras
- TxtPS.Text = ObjProductosServicios.PS
- TxtPrecio.Text = ObjProductosServicios.Precio.ToString("F4") 'no usa N4, porque pone comma
- DdlIVA.SelectedValue = ObjProductosServicios.IVA.ToString
- TxtRetIVA.Text = (ObjProductosServicios.RetIVA * 100).ToString
- TxtMG.Text = ObjProductosServicios.MargenGanancia.ToString
- ChkEstado.Checked = ObjProductosServicios.Estado
- LblFechaCaptura.Text = ObjProductosServicios.Fecha.ToShortDateString
- LblUsuarioCapturo.Text = ObjProductosServicios.Usuario
- ChkAplicaParaConcepto.Checked = ObjProductosServicios.AplicaParaConcepto
- ChkAplicaParaVenta.Checked = ObjProductosServicios.AplicaParaVenta
- lbTitulo.Text = lbTitulo.Text & ObjProductosServicios.PS
- ddlMetodos.SelectedValue = ObjProductosServicios.CveMetodoInventario.ToString
-
- If ObjProductosServicios.CveMetodoInventario = 0 Then ddlMetodos.SelectedValue = UsuarioActual.Empresa.CveMetodoInventario.ToString
-
- ViewState("CveSubFamilia") = ObjProductosServicios.DtResultados.Rows(0)("CveSubFamilia")
- Else
- Alert("El Producto o Servicio Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
- BtnGuardar.Enabled = False
- End If
- End If
-
- If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
- ddlProducto.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros("CvePS <>" & CvePS, "PS")
- ddlProducto.DataBind()
- DdlProductows.Visible = False
- Else
- ddlProducto.Visible = False
- End If
- If ObjProductosServicios.GetPaqueteDetalle(CvePS) Then
- gvPaqueteDetalle.DataSource = ObjProductosServicios.DtResultados
- dtPaqueteDetalles = ObjProductosServicios.DtResultados
- gvPaqueteDetalle.DataBind()
- End If
- ddlUnidad.DataSource = GlobalDTUnidadesMedida()
- ddlUnidad.DataBind()
- ObjProductosServicios.Dispose()
- End Sub
-
- Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
- 'Dim CerrarVentana As String = "opener.location.reload();window.close();"
- 'If Request("Popup") IsNot Nothing Then CerrarVentana = "self.parent.tb_remove();self.parent.location.reload();window.close();"
-
-
- If (TxtCodigo.Text = TxtCodigo2.Text AndAlso TxtCodigo.Text <> "") Or
- (TxtCodigo2.Text = TxtCodigoBarras.Text AndAlso TxtCodigo2.Text <> "") Or (TxtCodigo.Text = TxtCodigoBarras.Text AndAlso TxtCodigo.Text <> "") Then
- Alert("Los codigos no pueden ser iguales. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- Return
- End If
-
- If DdlSubFamilia.SelectedValue = "-1" AndAlso UsuarioActual.TienePermisoProceso(138) Then
- Alert("Se debe especificar Familia y Subfamilia de Costos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- Exit Sub
- End If
-
-
- Dim ObjProductosServicios As New ClsProductosServicios()
- Dim EsPaquete As Integer = If(gvPaqueteDetalle.Rows.Count = 0, 0, 1)
- Dim CveMetodoInv As Integer = If(UsuarioActual.Empresa.UsaInventarios, ddlMetodos.SelectedValue.ToEntero, -1)
-
-
- If CvePS = -1 Then
- If ObjProductosServicios.AddPS(DdlClasificacion.SelectedValue.ToEntero, DdlSubFamilia.SelectedValue.ToEntero, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtCodigo2.Text.Trim, TxtCodigoBarras.Text.Trim, TxtPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), TxtMG.Text.Trim.ToDouble, DdlCtaContableVentas.SelectedValue.ToEntero, DdlCtaContableCompras.SelectedValue.ToEntero, DdlCtaContableInventarios.SelectedValue.ToEntero, DdlAsientoContVentas.SelectedValue.ToEntero, DdlAsientoContCompras.SelectedValue.ToEntero, ChkAplicaParaConcepto.Checked, ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False) > 0 Then
-
-
- 'Alert("El Producto o Servicio se guardó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/ProductosServicios.aspx?CvePS=" & ObjProductosServcios.CvePS.ToString & """;")
- Alert("El Producto o Servicio se guardó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/CatPS.aspx"";")
- Else
- Alert("Ocurrió un error al agregar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError)
- End If
- Else
- If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, DdlSubFamilia.SelectedValue.ToEntero, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtCodigo2.Text.Trim, TxtCodigoBarras.Text.Trim, TxtPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), TxtMG.Text.Trim.ToDouble, DdlCtaContableVentas.SelectedValue.ToEntero, DdlCtaContableCompras.SelectedValue.ToEntero, DdlCtaContableInventarios.SelectedValue.ToEntero, DdlAsientoContVentas.SelectedValue.ToEntero, DdlAsientoContCompras.SelectedValue.ToEntero, ChkAplicaParaConcepto.Checked, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero) Then
- 'CargaDatos()
- UpDatos.Update()
-
- Dim AccionJS = If(Ret = "Comp", "ircompras();", "document.location.href=""/Ventas/CatPS.aspx"";")
-
- Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, AccionJS)
- Else
- Alert("Ocurrió un error al actualizar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError)
- End If
- ObjProductosServicios.CvePS = CvePS
- End If
-
- If ObjProductosServicios.CvePS > 0 Then
- For i As Integer = 0 To gvSucursal.Rows.Count - 1
- If gvSucursal.Rows(i).FCCheckBox("chkSucursal").Checked = False Then
- ObjProductosServicios.RemovePSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).DataKey("CveSucursal").ToEntero)
- Else
- If gvSucursal.Rows(i).FCHiddenField("hdnEnBD").Value.ToEntero = 1 Then
- 'Actualizarlo
- ObjProductosServicios.UpdatePSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).DataKey("CveSucursal").ToEntero, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, UsuarioActual.CveUsuario)
- 'ObjProductosServicios.UpdatePSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).FCHiddenField("hdnCveSucursal").Value.ToEntero, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, UsuarioActual.CveUsuario)
- Else
- 'Insertarlo
- 'ObjProductosServicios.AddPSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).FCHiddenField("hdnCveSucursal").Value.ToEntero, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, UsuarioActual.CveUsuario)
- ObjProductosServicios.AddPSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).DataKey("CveSucursal").ToEntero, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, UsuarioActual.CveUsuario)
- End If
- End If
- Next
- End If
- ObjProductosServicios.Dispose()
-
- RecargaGlobal()
-
- End Sub
-
- Private Sub RecargaGlobal()
- Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
- Hilo.Start()
- End Sub
- Private Sub GeneraGlobalDT()
- Dim ObjPS As New ClsProductosServicios
-
- If (ObjPS.GetPS(-1, -1, -1)) Then
- GlobalDTProductosServicios(-1) = ObjPS.DtResultados
- End If
-
- If ObjPS.GetPSAlias(-1, -1) Then
- GlobalDTProductosServiciosAlias(-1) = ObjPS.DtResultados
- End If
-
- If ObjPS.GetPSEquivalencias(-1, -1) Then
- GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
- End If
-
- ObjPS.Dispose()
- End Sub
-
-
- Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
- 'Dim CerrarVentana As String = "opener.location.reload();window.close();"
- 'If Request("Popup") IsNot Nothing Then CerrarVentana = "self.parent.tb_remove();self.parent.location.reload();window.close();"
-
- Dim ObjProductosServcios As New ClsProductosServicios()
- If ObjProductosServcios.RemovePS(CvePS) Then
- RecargaGlobal()
- Alert("El Producto o Servicio se eliminó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/CatPS.aspx"";")
- Else
- Alert("Ocurrió un error al elimiar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError)
- End If
- ObjProductosServcios.Dispose()
- End Sub
-
- Protected Sub btguardar_Click(sender As Object, e As EventArgs) Handles btguardar.Click
- Dim ObjProductosServicios As New ClsProductosServicios
- If ObjProductosServicios.AddPaqueteDetalle(CvePS, HFProducto.Value.ToString.ToEntero,
- txtCantidad.Text.ToDouble,
- ddlTipo.SelectedValue.ToEntero,
- ddlUnidad.SelectedValue.ToEntero) Then
-
- If ObjProductosServicios.GetPaqueteDetalle(CvePS) Then
- gvPaqueteDetalle.EditIndex = -1
- gvPaqueteDetalle.DataSource = ObjProductosServicios.DtResultados
- gvPaqueteDetalle.DataBind()
- End If
- End If
- ObjProductosServicios.Dispose()
- End Sub
- Protected Sub HFProducto_ValueChanged(sender As Object, e As EventArgs) Handles HFProducto.ValueChanged
- ddlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(HFProducto.Value.ToEntero, -1)
- ddlUnidad.DataBind()
- End Sub
-
- Protected Sub gvPaqueteDetalle_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles gvPaqueteDetalle.RowDeleting
- Dim ObjProductosServicios As New ClsProductosServicios
- Dim tipo As Integer = 0
- If dtPaqueteDetalles.Rows.Item(e.RowIndex)("Tipo").ToString = "Paquete" Then
- tipo = 1
- Else
- tipo = 2
- End If
- If ObjProductosServicios.DeletePaqueteDetalle(dtPaqueteDetalles.Rows.Item(e.RowIndex)("CvePSPaquete").ToString.ToEntero,
- dtPaqueteDetalles.Rows.Item(e.RowIndex)("CvePS").ToString.ToEntero,
- dtPaqueteDetalles.Rows.Item(e.RowIndex)("Cantidad").ToString.ToDouble,
- tipo,
- dtPaqueteDetalles.Rows.Item(e.RowIndex)("CveUnidadMedida").ToString.ToEntero) Then
-
- If ObjProductosServicios.GetPaqueteDetalle(CvePS) Then
- gvPaqueteDetalle.EditIndex = -1
- gvPaqueteDetalle.DataSource = ObjProductosServicios.DtResultados
- dtPaqueteDetalles = ObjProductosServicios.DtResultados
- gvPaqueteDetalle.DataBind()
- End If
- End If
- ObjProductosServicios.Dispose()
- End Sub
-
- Protected Sub gvPaqueteDetalle_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles gvPaqueteDetalle.RowEditing
- gvPaqueteDetalle.EditIndex = e.NewEditIndex
- gvPaqueteDetalle.DataSource = dtPaqueteDetalles
- gvPaqueteDetalle.DataBind()
- End Sub
-
- Protected Sub gvPaqueteDetalle_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles gvPaqueteDetalle.RowCancelingEdit
- gvPaqueteDetalle.EditIndex = -1
- gvPaqueteDetalle.DataSource = dtPaqueteDetalles
- gvPaqueteDetalle.DataBind()
- End Sub
-
- Protected Sub gvPaqueteDetalle_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles gvPaqueteDetalle.RowUpdating
- Dim ObjProductosServicios As New ClsProductosServicios
- If ObjProductosServicios.UpdatePaqueteDetalle(CvePS,
- dtPaqueteDetalles.Rows.Item(e.RowIndex)("CvePS").ToString.ToEntero,
- DirectCast(gvPaqueteDetalle.Rows(e.RowIndex).FindControl("txtECantidad"), TextBox).Text.ToDouble,
- DirectCast(gvPaqueteDetalle.Rows(e.RowIndex).FindControl("ddlETipo"), DropDownList).SelectedValue.ToEntero,
- DirectCast(gvPaqueteDetalle.Rows(e.RowIndex).FindControl("ddlEUnidad"), DropDownList).SelectedValue.ToEntero) Then
- If ObjProductosServicios.GetPaqueteDetalle(CvePS) Then
- gvPaqueteDetalle.EditIndex = -1
- gvPaqueteDetalle.DataSource = ObjProductosServicios.DtResultados
- dtPaqueteDetalles = ObjProductosServicios.DtResultados
- gvPaqueteDetalle.DataBind()
- End If
- End If
- ObjProductosServicios.Dispose()
- End Sub
- Protected Sub gvEquivalencias_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles gvPaqueteDetalle.RowDataBound
- If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
- e.Row.FCDropDownList("ddlEUnidad").DataSource = GlobalDTUnidadesMedida()
- e.Row.FCDropDownList("ddlEUnidad").SelectedValue = e.Row.DBCampo("CveUnidadMedida")
- e.Row.FCDropDownList("ddlEUnidad").DataBind()
- End If
- End Sub
-
- Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
- Dim ObjAliasAdd As New ClsProductosServicios
- If ObjAliasAdd.AddPSAlias(TxtAlias.Text.ToString, CvePS) Then
- GlobalDTProductosServiciosAlias(-1) = ObjAliasAdd.DtResultados
- CargarAlias()
- UPGVAlias.Update()
-
- Alert("Alias " + TxtAlias.Text + " agregado.", TipoMensaje.MsgInformacion)
- TxtAlias.Text = ""
- End If
- ObjAliasAdd.Dispose()
- End Sub
-
- Protected Sub CargarAlias()
- Dim ObjAlias As New ClsProductosServicios
- ObjAlias.GetPSAlias(CvePS, UsuarioActual.CveEmpresa)
- GVAlias.DataSource = ObjAlias.DtResultados
- ObjAlias.Dispose()
- GVAlias.DataBind()
- End Sub
-
- Protected Sub GVAlias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GVAlias.RowDeleting
- Dim ObjAliasDelete As New ClsProductosServicios
- If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString) Then
- GlobalDTProductosServiciosAlias(-1) = ObjAliasDelete.DtResultados
- GVAlias.EditIndex = -1
- CargarAlias()
- UPGVAlias.Update()
-
- Alert("El Alias ha sido Eliminado", TipoMensaje.MsgInformacion)
- Else
- Alert("Error al Eliminar", TipoMensaje.MsgError)
- End If
- ObjAliasDelete.Dispose()
- End Sub
-
-End Class
diff --git a/CGame/OrdenProduccion.aspx.vb b/CGame/OrdenProduccion.aspx.vb
index 15c4bd98d..f3f5fe229 100644
--- a/CGame/OrdenProduccion.aspx.vb
+++ b/CGame/OrdenProduccion.aspx.vb
@@ -314,8 +314,11 @@ Partial Class CGame_OrdenProduccion
If ObjCGame.GetOrdenProduccionDetalle(CveOrdenProduccion, UsuarioActual.CveEmpresa) Then
DtDetalle = ObjCGame.DtResultados
GvOP.DataSource = DtDetalle
- Tipo = DtDetalle.Rows(0)("Tipo").ToString.ToEntero
- If Tipo = 2 Then GvLiquidacion.Columns(6).Visible = True : GvLiquidacion.Columns(7).Visible = True : DivPesoPagado.Visible = True : GvLiquidacionModal.Columns(2).Visible = True : RFVPesoPagado.Enabled = True
+ If DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0 Then
+ Tipo = DtDetalle.Rows(0)("Tipo").ToString.ToEntero
+ If Tipo = 2 Then GvLiquidacion.Columns(6).Visible = True : GvLiquidacion.Columns(7).Visible = True : DivPesoPagado.Visible = True : GvLiquidacionModal.Columns(2).Visible = True : RFVPesoPagado.Enabled = True
+ End If
+
End If
End Sub
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index 800a6922b..9ef3bda65 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -1201,8 +1201,8 @@
-
-
+
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 646faeb46..741df6d20 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -1624,7 +1624,7 @@ Partial Class Compras_Compras
- LtlTareaNueva.Text = String.Format(" Tarea", CveCompra)
+ LtlTareaNueva.Text = String.Format(" Tarea", CveCompra)
End If
@@ -1704,7 +1704,7 @@ Partial Class Compras_Compras
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
Dim XMLDoc As New XmlDocument
- Dim Archivo As String = String.Format("{0}\Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, dr("RFCDe"), dr("XML"))
+ Dim Archivo As String = String.Format("{0}Empresas\{1}\Compras\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, dr("RFCDe"), dr("XML"))
If IO.File.Exists(Archivo) Then
Dim Validada As Boolean = True
@@ -5811,7 +5811,11 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
-
+ 'Conta SIG
+ If CveCuenta = 0 Then
+ CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
+ CveCuentaContabilizacion = 0
+ End If
End If
Next
@@ -6389,7 +6393,7 @@ Partial Class Compras_Compras
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
- Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
+ Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
If RBLPago.SelectedValue.ToEntero = 4 Then
Exit Select 'Es credito el concepto 6 se agrega en CASE 17
@@ -6415,7 +6419,11 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
-
+ 'Conta SIG
+ If CveCuenta = 0 Then
+ CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
+ CveCuentaContabilizacion = 0
+ End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
@@ -6741,13 +6749,9 @@ Partial Class Compras_Compras
' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
End If
End If
- 'Conta ContPAQ
-
End If
- 'If IdCtaContable = 0 AndAlso DdlTipoComprobante.SelectedValue = "Fac" Then
- ' CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
- ' idCuentaContabilizacion = 0
- 'End If
+
+
'SEGMENTO DE NEGOCIO
@@ -6759,6 +6763,12 @@ Partial Class Compras_Compras
'AGREGA MOVIMIENTO
If importeMovimiento.RoundSQL <> 0 Then
+ 'Conta ContPAQ
+ ' If IdCtaContable = 0 Then
+ ' CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
+ ' idCuentaContabilizacion = 0
+ 'End If
+
Dim tcvecon As Integer = 6
Dim tidctacon As Integer = 6
@@ -6796,6 +6806,9 @@ Partial Class Compras_Compras
End If
+
+
+
End If
Next
@@ -6873,6 +6886,11 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
+ 'Conta SIG
+ If CveCuenta = 0 Then
+ CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CveCuentaContabilizacion = 0
+ End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
@@ -7128,6 +7146,11 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
+ 'Conta SIG
+ If CveCuenta = 0 Then
+ CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ idCuentaContabilizacion = 0
+ End If
'AMORTIZACIÓN NC ESPECIAL COMPLEMENTARIA
If ConceptoContableAnticipo.Contiene(60) And DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
@@ -7458,6 +7481,11 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
+ 'COnta SIG
+ If CveCuenta = 0 Then
+ CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CveCuentaContabilizacion = 0
+ End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
@@ -9098,6 +9126,11 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
+ 'Conta SIG
+ If CveCuenta = 0 Then
+ CuentasContablesInvalidasSIG.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CveCuentaContabilizacion = 0
+ End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
ErrorMovtosCxP = 1
@@ -10738,7 +10771,7 @@ Partial Class Compras_Compras
e.Row.FCDropDownList("DdlAC5").Items.Clear()
e.Row.FCDropDownList("DdlAC5").Visible = True
- e.Row.FCDropDownList("DdlAC5").DataSource = DtPresupuestos.FiltraParametros("NOT CodigoCOG like '1%'", DistinctColumns:={"CveClasificacion", "CodigoClasificacion"}, Orderby:="CodigoClasificacion") 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("Afectable = 1 ") 'DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveClasificacion", "CodigoClasificacion"}, Orderby:="CodigoClasificacion")
+ e.Row.FCDropDownList("DdlAC5").DataSource = DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveClasificacion", "CodigoClasificacion"}, Orderby:="CodigoClasificacion") 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("Afectable = 1 ") 'DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveClasificacion", "CodigoClasificacion"}, Orderby:="CodigoClasificacion")
e.Row.FCDropDownList("DdlAC5").DataBind()
e.Row.FCDropDownList("DdlAC5").SelectedValueExist(e.Row.DBCampo("CveClasificacionOG"))
@@ -12845,12 +12878,13 @@ Partial Class Compras_Compras
DdlACGeneral4.DataBind()
DdlACGeneral5.Items.Clear()
- DdlACGeneral5.DataSource = DtPresupuestos.FiltraParametros("NOT CodigoCOG like '1%'", DistinctColumns:={"CveClasificacion", "CodigoClasificacion"}, Orderby:="CodigoClasificacion")
- If UsuarioActual.CveEmpresa.Contiene(120) Then
- DdlACGeneral5.DataSource = DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveClasificacion", "CodigoClasificacion"}, Orderby:="CodigoClasificacion")
- Else
- DdlACGeneral5.DataSource = DtPresupuestos.FiltraParametros("NOT CodigoCOG like '1%'", DistinctColumns:={"CveClasificacion", "CodigoClasificacion"}, Orderby:="CodigoClasificacion")
- End If
+ DdlACGeneral5.DataSource = DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveClasificacion", "CodigoClasificacion"}, Orderby:="CodigoClasificacion")
+ 'RM 2020.05.19. se mostraran todas las partidas del presupuesto, no se limintan las 1%
+ 'If UsuarioActual.CveEmpresa.Contiene(120) Then
+ ' DdlACGeneral5.DataSource = DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveClasificacion", "CodigoClasificacion"}, Orderby:="CodigoClasificacion")
+ 'Else
+ ' DdlACGeneral5.DataSource = DtPresupuestos.FiltraParametros("NOT CodigoCOG like '1%'", DistinctColumns:={"CveClasificacion", "CodigoClasificacion"}, Orderby:="CodigoClasificacion")
+ 'End If
DdlACGeneral5.DataBind()
If CveCompra > 0 Then
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index ddb90e086..4ac3f5c5b 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -1820,7 +1820,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("NombreRecibio", Capturo.ToUpper))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
params.Add(New ReportParameter("LogoPath", logouri))
- If DtMovimientos.COUNT("SerieLote") > 0 Then
+ If DtMovimientos.COUNT("Serie") > 0 Then
params.Add(New ReportParameter("MostrarSerieLote", "1"))
Else
params.Add(New ReportParameter("MostrarSerieLote", "0"))
@@ -1904,7 +1904,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("NombreRecibio", Personal))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
params.Add(New ReportParameter("LogoPath", logouri))
- If DtMovimientos.COUNT("SerieLote") > 0 Then
+ If DtMovimientos.COUNT("Serie") > 0 Then
params.Add(New ReportParameter("MostrarSerieLote", "1"))
Else
params.Add(New ReportParameter("MostrarSerieLote", "0"))
diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx
index 00a9727eb..0c179b104 100644
--- a/Compras/Proveedores.aspx
+++ b/Compras/Proveedores.aspx
@@ -4021,9 +4021,9 @@
-
-
-
+
+
+
@@ -4065,7 +4065,7 @@
-
+
diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs
index 176f60830..d76955b06 100644
--- a/Contabilidad/RepIVA.aspx.cs
+++ b/Contabilidad/RepIVA.aspx.cs
@@ -194,8 +194,9 @@ public partial class Contabilidad_RepIVA : ClsPaginas
DataTable Dt = TT.ActiveTabIndex == 0 ? DtIVATrasladado.Copy() : DtIVAAcreditable.Copy();
string Formato = TT.ActiveTabIndex == 0 ? "RepIVA.rpt" : "RepIVAAcreditable.rpt";
para.Add(new CrystalParametro("Excel", Formato));
-
- ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath($"~/Empresas/Grales/Formatos/{Formato}"),Dt,para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
+ string Ruta = (ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}");
+ Ruta.GuardaLogAD();
+ ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt,para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
}
else
{
diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb
index 5785656ae..6d168533d 100644
--- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb
+++ b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb
@@ -473,7 +473,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("CveMoneda", DdlMoneda.SelectedValue))
params.Add(New ReportParameter("Cuenta", Cuenta))
- ImprimirPDF("Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
+ ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
End Sub
Protected Sub DdlTipoCuentas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoCuentas.SelectedIndexChanged
If DdlTipoCuentas.SelectedValue.ToEntero = -2 Then
diff --git a/Contratos/Contrato.aspx b/Contratos/Contrato.aspx
index c75733b7f..e28415dcf 100644
--- a/Contratos/Contrato.aspx
+++ b/Contratos/Contrato.aspx
@@ -1788,7 +1788,7 @@
-
+
@@ -1843,7 +1843,7 @@
-
+
@@ -1882,7 +1882,7 @@
-
+
diff --git a/Contratos/Contrato.vb b/Contratos/Contrato.vb
index 4adb7f0ae..546200e3f 100644
--- a/Contratos/Contrato.vb
+++ b/Contratos/Contrato.vb
@@ -2149,502 +2149,18 @@ Partial Class Contratos_Default
Else
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
End If
- End Sub
-
-
+ End Sub
+
+
#End Region
-
-
-
-
- 'VIEJO ALMACEN
- '#Region " MOVIMIENTOS ALMACEN "
- ' Private Sub CargaInventarios()
- ' If CveMovimiento > 0 Then
- ' Dim ObjInventarios As New ClsInventarios
-
-
- ' If ObjInventarios.GetMovimientos(CveMovimiento, 8, -1, UsuarioActual.CveEmpresa) Then
- ' TxtFechaAlmacen.Text = ObjInventarios.Fecha.ToShortDateString
- ' DdlAlmacen.SelectedValue = ObjInventarios.CveAlmacen.ToString
- ' TxtObservaciones.Text = ObjInventarios.Observaciones
-
- ' 'cargar también los movimentos detalle
- ' If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
- ' DtMovimientos = ObjInventarios.DtResultados.FiltraParametros("", "CveMovimientoDetalle")
-
- ' DtMovimientos.Columns.Add("EstatusExistencia")
- ' DtMovimientos.Columns("No").AutoIncrement = True
- ' DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
- ' DtMovimientos.Columns("No").AutoIncrementStep = 1
-
- ' Dim keys(1) As DataColumn
- ' keys(0) = DtMovimientos.Columns("No")
- ' DtMovimientos.PrimaryKey = keys
-
- ' CargaGvDatos()
-
- ' 'BLOQUEA
- ' TxtFechaAlmacen.Enabled = False
- ' ImgFechaAlmacen.Enabled = False
- ' DdlAlmacen.Enabled = False
- ' TxtObservaciones.Enabled = False
- ' LbAgregarAlmacen.Visible = False
- ' 'TxtCantidadAlmacen.Enabled = False
- ' 'DdlUnidad.Enabled = False
- ' DdlProducto2.Enabled = False
- ' DdlClasificacion.Enabled = False
- ' TxtnSerieLote.Enabled = False
- ' DivCodigoSeriePS.Visible = False
-
- ' Else
- ' Alert("Ocurrió un error al cargar la información de los Activos Fijos. Por favor vuelva a intentar.", TipoMensaje.MsgError)
- ' End If
-
- ' Else
- ' Alert("Ocurrió un error al cargar la información de los Activos Fijos. Por favor vuelva a intentar.", TipoMensaje.MsgError)
- ' End If
-
-
- ' ObjInventarios.Dispose()
- ' End If
- ' End Sub
-
- ' Private Sub InicializaAlmacen()
- ' CreaDTAlmacen()
- ' CargaPS()
- ' TxtFechaAlmacen.Text = Now.ToShortDateString
-
- ' 'DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- ' 'DdlAlmacen.DataBind()
- ' 'DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
-
- ' End Sub
-
- '#Region "CARGA DATOS"
- ' Protected Sub CreaDTAlmacen()
- ' Dim dt As New DataTable
-
- ' Dim column As DataColumn = New DataColumn("No")
- ' column.DataType = Type.GetType("System.Int32")
- ' With column
- ' .AutoIncrement = True
- ' .AutoIncrementSeed = 1
- ' .AutoIncrementStep = 1
- ' End With
-
- ' dt.Columns.Add(column)
-
-
- ' dt.Columns.Add("Cantidad", Type.GetType("System.Double"))
- ' dt.Columns.Add("CveUM", Type.GetType("System.Int32"))
- ' dt.Columns.Add("UnidadMedida")
- ' dt.Columns.Add("CvePS", Type.GetType("System.Int32"))
- ' dt.Columns.Add("PS")
- ' dt.Columns.Add("SerieLote")
-
-
- ' dt.Columns.Add("CveClasificacion", Type.GetType("System.Int32"))
- ' dt.Columns.Add("EstatusExistencia")
-
- ' DtMovimientos = dt
-
- ' CargaGvDatos()
-
- ' End Sub
-
- ' Private Sub CargaPS()
- ' DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
-
- ' If UsuarioActual.CveEmpresa = 66 Then
- ' DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
- ' End If
- ' If Not DdlProducto2.UsaWebService AndAlso CType(DdlProducto2.DataSource, DataTable) Is Nothing Then
- ' DdlProducto2.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros($"Inv_CveMetodoInventario = 5")
- ' DdlProducto2.DataBind()
- ' DdlProducto2.ddl.Items.Insert(0, New ListItem("----", "-1"))
- ' End If
-
- ' End Sub
- '#End Region
-
- '#Region "AGREGAR Y GUARDAR"
- ' Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles LBAgregar.Click
- ' BtnAgregarPS(1)
- ' End Sub
- ' Protected Sub BtnSerieAddNew_Click(sender As Object, e As EventArgs)
- ' BtnAgregarPS(1)
- ' End Sub
- ' Private Sub BtnAgregarPS(Cantidad As Double)
- ' Dim CveProducto As Integer = DdlProducto2.SelectedValue.ToEntero
-
- ' If CveProducto > 0 Then
- ' If TxtnSerieLote.Visible AndAlso TxtnSerieLote.Text = "" Then
- ' Alert("Serie-Lote es necesario", TipoMensaje.MsgAdvertencia)
- ' Exit Sub
- ' End If
-
- ' Dim Valido = ValidaExistencia(Cantidad, CveProducto, -1, TxtnSerieLote.Text) 'If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1")
-
- ' If Valido Then
- ' AgregarPS(Cantidad, CveProducto, -1, TxtnSerieLote.Text) 'If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1")
- ' End If
-
- ' End If
- ' End Sub
- ' Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "-1") As Boolean
- ' Dim Retorno = True
-
- ' Dim Inv As New ClsInventarios
- ' Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, TxtFechaAlmacen.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote)
- ' Inv.Dispose()
-
- ' If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(SerieLote <> "-1", $" AND SerieLote = '{SerieLote}'", "")}") < 0 Then
- ' If Existencia = 0 Then
- ' Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
- ' Else
- ' Alert(String.Format("Solo hay en existencia: {0}", Existencia), TipoMensaje.MsgAdvertencia)
- ' End If
- ' Retorno = False
- ' End If
-
- ' Return Retorno
- ' End Function
- ' Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "-1")
- ' If Cantidad <= 0 Then
- ' Alert("La cantidad debe ser mayor a cero (0). Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
- ' End If
-
- ' Dim CveClasificacion As Integer
-
- ' Dim DrPS As DataRow = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CvePS = {0}", CvePS))
- ' If DrPS IsNot Nothing Then CveClasificacion = DrPS("CveClasificacion").ToString.ToEntero
-
- ' Dim registro As DataRow = DtMovimientos.NewRow
- ' registro.Item("Cantidad") = Cantidad
- ' registro.Item("CveUM") = DrPS("CveUnidadMedida")
- ' registro.Item("UnidadMedida") = DrPS("UnidadMedida")
- ' registro.Item("CvePS") = CvePS
- ' registro.Item("PS") = DrPS("PS")
- ' registro.Item("SerieLote") = SerieLote
- ' registro.Item("CveClasificacion") = CveClasificacion
- ' registro.Item("EstatusExistencia") = "1"
-
- ' DtMovimientos.Rows.Add(registro)
-
- ' CargaGvDatos()
-
- ' LimpiaAgregar()
- ' End Sub
-
- ' Private Sub LimpiaAgregar()
- ' DdlClasificacion.SelectedValue = "-1"
- ' DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty)
- ' 'TxtCantidad.Text = ""
- ' TxtnSerieLote.Text = ""
- ' 'TxtnSerieLote.Visible = False
- ' End Sub
-
- ' Protected Function GuardarAlmacen(ObjInventarios As ClsInventarios) As Boolean
- ' Dim ErrorMovInv As Boolean = False
-
- ' 'NO HACE NADA YA QUE TIENE MOVIMIENTO REGISTRADO O NO TENGA DETALLES EN EL GV
- ' If CveMovimiento > 0 Or GvDatos.Rows.Count = 0 Then
- ' Return ErrorMovInv
- ' End If
-
-
- ' 'VALIDA ESTATUS EXISTENCIA
- ' For Each dr As DataRow In DtMovimientos.Rows
- ' If dr("EstatusExistencia").ToString = "-1" Then
- ' Alert("Tiene que rectificar los movimientos con error.", TipoMensaje.MsgError)
- ' Return True
- ' End If
- ' Next
-
- ' Dim CveMovimientoSalida = 0
- ' Dim CveMovimientoEntrada = 0
- ' Dim IDPoliza As Integer = 0
- ' Dim FolioSalida = 0
- ' Dim FolioEntrada = 0
- ' Dim AlmacenEntrada = -1
-
- ' Dim ErrorAC As Boolean = False
- ' Dim ErrorExistencia = False
-
- ' Dim TextoError = ""
- ' Dim TextoExistencia As StringBuilder = New StringBuilder
-
-
- ' 'VALIDA EXISTENCIA
- ' Dim Existencia As Double
- ' TextoExistencia.Append("Los siguiente productos se ajustaron por falta de exitencia: ")
- ' For Each dr As DataRow In DtMovimientos.Rows
- ' Existencia = ObjInventarios.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, TxtFechaAlmacen.Text.ToDate.ToString("yyyy/MM/dd 23:59"), If(dr("SerieLote").ToString = "", "-1", dr("SerieLote").ToString))
-
- ' Existencia -= DtMovimientos.SUM("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("SerieLote").ToString <> "-1", $" AND SerieLote = '{dr("SerieLote").ToString}'", "")}")
-
- ' If Existencia < 0 Then
- ' ErrorExistencia = True
- ' dr("EstatusExistencia") = "-1"
- ' dr("Cantidad") = Existencia
- ' TextoExistencia.AppendFormat("- #{0} {1} ", dr("No").ToString, dr("PS").ToString)
- ' End If
- ' Next
-
- ' 'REGISTRA LA SALIDA Y ENTRADA (TRASPASO)
- ' If Not ErrorExistencia Then
- ' Dim Fecha As Date = TxtFechaAlmacen.Text.ToDate
-
- ' 'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN
- ' CveMovimientoSalida = ObjInventarios.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveContrato:=CveContrato)
- ' FolioSalida = ObjInventarios.Folio
-
- ' If CveMovimientoSalida <= 0 Then
- ' TextoError = "No se pudo generar el movimiento de salida correctamente"
- ' ErrorMovInv = True
- ' Else
-
- ' For Each Dr As DataRow In DtMovimientos.Rows
- ' If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, -1, Dr("SerieLote").ToString) Then
- ' ErrorMovInv = True
- ' TextoError = "Ocurrió un error al guardar los movimientos de salida"
- ' Exit For
- ' End If
- ' Next
- ' End If
-
- ' 'AGREGAMOS LA ENTRADA
- ' If Not ErrorMovInv Then
- ' AlmacenEntrada = 89
-
- ' CveMovimientoEntrada = ObjInventarios.AddMovimiento(AlmacenEntrada, 9, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalida, CveContrato:=CveContrato)
- ' FolioEntrada = ObjInventarios.Folio
-
- ' If CveMovimientoEntrada <= 0 Then
- ' TextoError = "No se pudo generar el movimiento de entrada correctamente"
- ' ErrorMovInv = True
- ' Else
-
- ' If ObjInventarios.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
-
- ' For Each Dr As DataRow In ObjInventarios.DtResultados.Rows
- ' If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString) Then
- ' ErrorMovInv = True
- ' TextoError = "Ocurrió un error al guardar los movimientos de entrada"
- ' Exit For
- ' End If
- ' Next
-
- ' End If
-
- ' End If
- ' End If
-
-
- ' If Not ErrorMovInv Then
- ' Dim Mensaje As StringBuilder = New StringBuilder
-
- ' Mensaje.Append("Se realizó con éxito el traspaso.")
-
- ' Mensaje.AppendFormat(" Folio de Salida: {0}", FolioSalida, CveMovimientoSalida)
- ' Mensaje.AppendFormat(" Imprimir Reporte", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
-
- ' Mensaje.AppendFormat(" Folio de Entrada: {0}", FolioEntrada, CveMovimientoEntrada)
- ' Mensaje.AppendFormat(" Imprimir Reporte", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
-
- ' Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
-
- ' TxtResponsable.Text = ""
- ' TxtFechaAlmacen.Text = Now.ToShortDateString
- ' TxtObservaciones.Text = ""
- ' 'TxtCantidad.Text = ""
-
- ' DtMovimientos.Rows.Clear()
- ' CargaGvDatos()
- ' Else
- ' Alert(TextoError, TipoMensaje.MsgError)
- ' End If
-
- ' Else
- ' Alert(TextoExistencia.ToString, TipoMensaje.MsgError)
- ' ErrorMovInv = True
- ' End If
-
-
- ' 'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
- ' If ErrorExistencia Then
- ' CargaGvDatos()
- ' End If
-
- ' Return ErrorMovInv
-
- ' End Function
-
-
- '#End Region
-
- '#Region " AGREGA CON TXT | CODIGO - SERIE "
- ' Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
-
- ' If TxtCodigoPS.Text = "" Then
- ' Exit Sub
- ' End If
-
- ' TdSeriePS.Visible = False
-
- ' Dim DrPS = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text}'")
- ' If DrPS Is Nothing Then
- ' Alert($"No se ha encontrado un producto del Codigo ""{TxtCodigoPS.Text}"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
- ' TxtCodigoPS.Text = ""
- ' Exit Sub
- ' End If
-
- ' If DrPS("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
- ' TdSeriePS.Visible = True
- ' TxtSeriePS.Focus()
- ' CvePSSerieLote = DrPS("CvePS").ToString.ToEntero
- ' CveUMSerieLote = DrPS("CveUnidadMedida").ToString.ToEntero
- ' Exit Sub
- ' End If
-
- ' AgregarPS(1, DrPS("CvePS").ToString.ToEntero, DrPS("CveUnidadMedida").ToString.ToEntero)
-
- ' TxtCodigoPS.Text = ""
-
- ' End Sub
- ' Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
- ' If TxtSeriePS.Text.Trim = "" Then
- ' Exit Sub
- ' End If
-
- ' 'TxtCantidad.Text = "1"
-
- ' Dim Valido = ValidaExistencia(1, CvePSSerieLote, CveUMSerieLote, TxtSeriePS.Text.Trim)
-
- ' If Valido Then
- ' AgregarPS(1, CvePSSerieLote, CveUMSerieLote, TxtSeriePS.Text.Trim)
- ' Else
- ' TxtSeriePS.Text = ""
- ' TxtSeriePS.Focus()
- ' Exit Sub
- ' End If
-
- ' TdSeriePS.Visible = False
- ' TxtSeriePS.Text = ""
- ' TxtCodigoPS.Text = ""
- ' TxtCodigoPS.Focus()
-
- ' End Sub
- '#End Region
-
- '#Region "DDL CLASIFICACION"
- ' Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
- ' ChangeDdlProducto()
- ' End Sub
- ' Private Sub ChangeDdlProducto()
- ' If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
- ' Dim filtro As String = ""
- ' If Not (DdlClasificacion.SelectedValue = "-1") Then
-
- ' If isWhitFamily() Then
- ' filtro = String.Format("AND CveSubFamilia={0}", DdlClasificacion.SelectedValue)
- ' Else
- ' filtro = String.Format("AND CveClasificacion={0}", DdlClasificacion.SelectedValue)
- ' End If
- ' End If
- ' DdlProducto2.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros($"Inv_CveMetodoInventario = 5 {filtro}", "PS")
- ' DdlProducto2.DataBind()
- ' DdlProducto2.ddl.Items.Insert(0, New ListItem("----", "-1"))
- ' Else
- ' If isWhitFamily() Then
- ' DdlProducto2.ddlWS.Attributes.Add("data-idSubFamilia", DdlClasificacion.SelectedValue)
- ' Else
- ' DdlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.SelectedValue)
- ' End If
- ' End If
- ' End Sub
-
- ' Protected Sub DdlProducto_ValueChanged(sender As Object, e As EventArgs) Handles DdlProducto2.selectedindexchange
- ' ElProductoChange()
- ' End Sub
- ' Private Sub ElProductoChange()
- ' 'TxtnSerieLote.Visible = False
-
- ' 'If DdlProducto2.SelectedValue.ToEntero > 0 Then
- ' ' If GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS = {0} AND Inv_CveMetodoInventario = 5 ", DdlProducto2.SelectedValue), "PS").Rows.Count > 0 Then
- ' ' ThSerieLote.Visible = True
- ' ' TdSerieLote.Visible = True
- ' ' TxtnSerieLote.Visible = True
- ' ' GvDatos.Columns(2).Visible = True
- ' ' End If
- ' 'End If
-
- ' 'Dim objinv As New ClsInventarios
- ' 'If objinv.GetExistenciasProducto(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, Now) Then
- ' ' If objinv.DtResultados.Rows.Count = 0 Then
- ' ' Alert("No hay existencias de este producto", TipoMensaje.MsgAdvertencia)
- ' ' End If
- ' 'End If
-
- ' 'UpGral.Update()
-
- ' End Sub
- ' Private Function isWhitFamily() As Boolean
- ' Return (UsuarioActual.CveEmpresa = 66)
- ' End Function
- '#End Region
-
- '#Region "GV DATOS"
- ' Private Sub CargaGvDatos()
- ' 'TxtnSerieLote.Visible = False
- ' 'ThSerieLote.Visible = False
- ' 'TdSerieLote.Visible = False
- ' 'GvDatos.Columns(4).Visible = False
-
- ' GvDatos.DataSource = DtMovimientos
- ' GvDatos.DataBind()
- ' UpGral.Update()
- ' End Sub
- ' Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
- ' If e.Row.RowType = DataControlRowType.DataRow Then
-
- ' If CveMovimiento > 0 Then
- ' e.Row.FCLinkButton("lnkRemove").Visible = False
- ' End If
-
- ' If e.Row.DBCampo("EstatusExistencia").ToEntero < 0 Then
- ' e.Row.Cells(0).BackColor = Drawing.Color.Red
- ' End If
-
- ' If e.Row.DBCampo("SerieLote").ToString <> "-1" Then
- ' 'TxtnSerieLote.Visible = True
- ' 'ThSerieLote.Visible = True
- ' 'TdSerieLote.Visible = True
- ' 'GvDatos.Columns(2).Visible = True
- ' 'e.Row.Cells(2).Text = e.Row.DBCampo("SerieLote").ToString
- ' Else
- ' e.Row.Cells(2).Text = ""
- ' End If
-
- ' End If
- ' End Sub
- ' Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
- ' Dim DbRow As DataRow = Nothing
- ' DbRow = DtMovimientos.Rows(e.RowIndex)
-
- ' DtMovimientos.Rows.Remove(DbRow)
- ' CargaGvDatos()
- ' End Sub
- '#End Region
-
- '#End Region
-
-
-
-
-
-
+
+
+
+
+
+
+
+
End Class
diff --git a/GPS/FacturacionMasiva.aspx.vb b/GPS/FacturacionMasiva.aspx.vb
index 7cc898cab..5db90c87c 100644
--- a/GPS/FacturacionMasiva.aspx.vb
+++ b/GPS/FacturacionMasiva.aspx.vb
@@ -432,7 +432,7 @@ Partial Class Contratos_FacturacionMasiva
TmpDT.Columns.Add("PS", GetType(String))
TmpDT.Columns.Add("CodigoPS", GetType(String))
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
- TmpDT.Columns.Add("SerieLote", GetType(String))
+ TmpDT.Columns.Add("Serie", GetType(String))
TmpDT.Columns.Add("Obs", GetType(String))
TmpDT.Columns.Add("TiempoEntrega", GetType(String))
TmpDT.Columns.Add("PU", GetType(Double))
diff --git a/Inventarios/AjustesSeccionAlmacen.aspx b/Inventarios/AjustesSeccionAlmacen.aspx
index bc20d39e9..795fb5427 100644
--- a/Inventarios/AjustesSeccionAlmacen.aspx
+++ b/Inventarios/AjustesSeccionAlmacen.aspx
@@ -1,124 +1,124 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="AjustesSeccionAlmacen.aspx.vb" Inherits="Inventarios_AjustesSeccionAlmacen" %>
-
-
-
-
-
-
- Ajustes de Productos en Secciones de Almacen
-
-
-
-
-
-
-
diff --git a/Inventarios/Apartados.aspx.vb b/Inventarios/Apartados.aspx.vb
index 867255d9a..db73531dd 100644
--- a/Inventarios/Apartados.aspx.vb
+++ b/Inventarios/Apartados.aspx.vb
@@ -32,20 +32,20 @@ Partial Class Inventarios_Apartados
ViewState("CargadoDeMov") = value
End Set
End Property
- Private Property CvePSSerieLote As Integer
+ Private Property CvePSSerie As Integer
Get
- Return CType(ViewState("CvePSSerieLote"), Integer)
+ Return CType(ViewState("CvePSSerie"), Integer)
End Get
Set(value As Integer)
- ViewState("CvePSSerieLote") = value
+ ViewState("CvePSSerie") = value
End Set
End Property
- Private Property CveUMSerieLote As Integer
+ Private Property CveUMSerie As Integer
Get
- Return CType(ViewState("CveUMSerieLote"), Integer)
+ Return CType(ViewState("CveUMSerie"), Integer)
End Get
Set(value As Integer)
- ViewState("CveUMSerieLote") = value
+ ViewState("CveUMSerie") = value
End Set
End Property
Private Property CveCliente As Integer
@@ -64,14 +64,7 @@ Partial Class Inventarios_Apartados
ViewState("CveVendedor") = value
End Set
End Property
- Private Property DtSeccionAlmacen As DataTable
- Get
- Return CType(ViewState("DtSeccionAlmacen"), DataTable)
- End Get
- Set(value As DataTable)
- ViewState("DtSeccionAlmacen") = value
- End Set
- End Property
+
Private Property IndexSeccionAlmacen As Integer
Get
Return CType(ViewState("IndexSeccionAlmacen"), Integer)
@@ -147,7 +140,7 @@ Partial Class Inventarios_Apartados
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
- DdlSubProyecto.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
+ DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione ", "-1"))
DdlSubProyectoDesapartado.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyectoDesapartado.DataBind()
@@ -168,11 +161,16 @@ Partial Class Inventarios_Apartados
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then
DdlClientes.setEsWebService(True)
+ DdlClienteDesapartado.setEsWebService(True)
Else
DdlClientes.setEsWebService(False)
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlClientes.DataBind()
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
+ DdlClienteDesapartado.setEsWebService(False)
+ DdlClienteDesapartado.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
+ DdlClienteDesapartado.DataBind()
+ DdlClienteDesapartado.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End If
@@ -180,9 +178,9 @@ Partial Class Inventarios_Apartados
'DdlCliente.DataBind()
'DdlCliente.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
- DdlClienteDesapartado.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
- DdlClienteDesapartado.DataBind()
- DdlClienteDesapartado.Items.Insert(0, New ListItem(" Todos ", "-1"))
+ 'DdlClienteDesapartado.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
+ 'DdlClienteDesapartado.DataBind()
+ 'DdlClienteDesapartado.Items.Insert(0, New ListItem(" Todos ", "-1"))
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
DdlVendedor.DataBind()
@@ -230,7 +228,11 @@ Partial Class Inventarios_Apartados
dt.Columns.Add("CvePS", Type.GetType("System.Int32"))
dt.Columns.Add("CveAF", Type.GetType("System.Int32"))
dt.Columns.Add("PS")
- dt.Columns.Add("SerieLote")
+ dt.Columns.Add("CveSeccionAlmacen", Type.GetType("System.Int32"))
+ dt.Columns.Add("SeccionAlmacen")
+ dt.Columns.Add("Serie")
+ dt.Columns.Add("Lote")
+ dt.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
dt.Columns.Add("CveClasificacion", Type.GetType("System.Int32"))
dt.Columns.Add("EstatusExistencia")
@@ -262,17 +264,40 @@ Partial Class Inventarios_Apartados
ElProductoChange()
End Sub
Private Sub ElProductoChange()
- TxtnSerieLote.Visible = False
+ TxtnSerie.Visible = False
If DdlProducto2.SelectedValue.ToEntero > 0 Then
- If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltraParametros("Inv_CveMetodoInventario = 5 OR AplicaSerie = 1 ", "PSCodigo").Rows.Count > 0 Then
- ThSerieLote.Visible = True
- TdSerieLote.Visible = True
- TxtnSerieLote.Visible = True
- GvDatos.Columns(4).Visible = True
+ Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
+ If drP IsNot Nothing Then
+ If CBool(drP("AplicaSerie")) Then
+ ThSerie.Visible = True
+ TdSerie.Visible = True
+ TxtnSerie.Visible = True
+ GvDatos.Columns(4).Visible = True
+ End If
+ If CBool(drP("AplicaLote")) Then
+ ThLote.Visible = True
+ TdLote.Visible = True
+ GvDatos.Columns(5).Visible = True
+ End If
+ If CBool(drP("AplicaCaducidad")) Then
+ ThCaducidad.Visible = True
+ TdCaducidad.Visible = True
+ GvDatos.Columns(6).Visible = True
+ End If
+ If CBool(drP("AplicaSeccion")) Then
+ ThSeccion.Visible = True
+ TdSeccionAlmacen.Visible = True
+ DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero)
+ DdlSeccionAlmacen.DataBind()
+ GvDatos.Columns(7).Visible = True
+ End If
+
End If
+
End If
+
DdlUnidad.Items.Clear()
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
DdlUnidad.DataBind()
@@ -380,8 +405,8 @@ Partial Class Inventarios_Apartados
If DrPS("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
TdSeriePS.Visible = True
TxtSeriePS.Focus()
- CvePSSerieLote = DrPS("CvePS").ToString.ToEntero
- CveUMSerieLote = DrPS("CveUnidadMedida").ToString.ToEntero
+ CvePSSerie = DrPS("CvePS").ToString.ToEntero
+ CveUMSerie = DrPS("CveUnidadMedida").ToString.ToEntero
Exit Sub
End If
@@ -397,10 +422,10 @@ Partial Class Inventarios_Apartados
txtCantidad.Text = "1"
- Dim Valido = ValidaExistencia(1, CvePSSerieLote, CveUMSerieLote, TxtSeriePS.Text.Trim)
+ Dim Valido = ValidaExistencia(1, CvePSSerie, CveUMSerie, TxtSeriePS.Text.Trim)
If Valido Then
- AgregarPS(1, CvePSSerieLote, CveUMSerieLote, TxtSeriePS.Text.Trim)
+ AgregarPS(1, CvePSSerie, CveUMSerie, Serie:=TxtSeriePS.Text.Trim)
Else
TxtSeriePS.Text = ""
TxtSeriePS.Focus()
@@ -426,10 +451,10 @@ Partial Class Inventarios_Apartados
Dim FuncionalidadSinSerie = True
If CveProducto > 0 Then
- If TxtnSerieLote.Visible Then
+ If TxtnSerie.Visible Then
Cantidad = 1
- If TxtnSerieLote.Text = "" Then
- Alert("Serie-Lote es necesario", TipoMensaje.MsgAdvertencia)
+ If TxtnSerie.Text = "" Then
+ Alert("Serie es necesario", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
Exit Sub
End If
@@ -438,22 +463,23 @@ Partial Class Inventarios_Apartados
End If
End If
- Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1"))
+ Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, "-1"))
If Valido Then
- AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1"), FuncionalidadSinSerie)
+ AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Text <> "", TxtnSerie.Text, ""), Limpia:=FuncionalidadSinSerie)
End If
End If
End Sub
- Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "-1") As Boolean
+ Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Serie As String = "-1",
+ Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha, Optional CveSeccionAlmacen As Integer = -1) As Boolean
Dim Retorno = True
Dim Inv As New ClsInventarios
- Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=SerieLote)
+ Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad)
Inv.Dispose()
- If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(SerieLote <> "-1", $" AND SerieLote = '{SerieLote}'", "")}") < 0 Then
+ If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(Serie <> "-1", $" AND Serie = '{Serie}'", "")}") < 0 Then
If Existencia < 0 Then
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
@@ -466,7 +492,8 @@ Partial Class Inventarios_Apartados
Return Retorno
End Function
- Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "-1", Optional Limpia As Boolean = True)
+ Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer,
+ Optional CveSeccionAlmacen As Integer = -1, Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha, Optional Limpia As Boolean = True, Optional SeccionAlmacen As String = "")
If Cantidad <= 0 Then
Alert("La cantidad debe ser mayor a cero (0). Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
@@ -485,10 +512,14 @@ Partial Class Inventarios_Apartados
registro.Item("UnidadMedida") = DrUM("UnidadMedida")
registro.Item("CvePS") = CvePS
registro.Item("PS") = DrPS("PSCodigo")
- registro.Item("SerieLote") = SerieLote
+ registro.Item("Serie") = Serie
+ registro.Item("Lote") = Lote
+ registro.Item("FechaCaducidad") = FechaCaducidad
registro.Item("CveClasificacion") = CveClasificacion
registro.Item("CveAF") = -1
registro.Item("EstatusExistencia") = "1"
+ registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
+ registro.Item("SeccionAlmacen") = If(CveSeccionAlmacen > 0, SeccionAlmacen, "")
DtMovimientos.Rows.Add(registro)
RegistraScript("playsonidito('beep-07.wav')")
@@ -498,16 +529,16 @@ Partial Class Inventarios_Apartados
LimpiaAgregar()
Else
txtCantidad.Text = (txtCantidad.Text.ToDouble - 1.0).ToString
- TxtnSerieLote.Text = ""
- TxtnSerieLote.Focus()
+ TxtnSerie.Text = ""
+ TxtnSerie.Focus()
End If
End Sub
Private Sub LimpiaAgregar()
DdlClasificacion.SelectedValue = "-1"
DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty)
txtCantidad.Text = ""
- TxtnSerieLote.Text = ""
- TxtnSerieLote.Visible = False
+ TxtnSerie.Text = ""
+ TxtnSerie.Visible = False
txtCantidad.Focus()
If TxtCodigoPS.Visible Then
TxtCodigoPS.Focus()
@@ -517,12 +548,18 @@ Partial Class Inventarios_Apartados
#Region " GV DATOS "
Private Sub CargaGvDatos(Optional EscondeSerie As Boolean = True)
- If EscondeSerie Then
- TxtnSerieLote.Visible = False
- ThSerieLote.Visible = False
- TdSerieLote.Visible = False
- GvDatos.Columns(4).Visible = False
- End If
+ 'If EscondeSerie Then
+ ' TxtnSerie.Visible = False
+ ' ThSerie.Visible = False
+ ' TdSerie.Visible = False
+ ' GvDatos.Columns(4).Visible = False
+ 'End If
+
+ GvDatos.Columns(4).Visible = DtMovimientos.MAX("Serie").ToString <> ""
+ GvDatos.Columns(5).Visible = DtMovimientos.MAX("Lote").ToString <> ""
+ GvDatos.Columns(6).Visible = DtMovimientos.MAX("FechaCaducidad").ToString.ToDate > MinFecha
+ GvDatos.Columns(7).Visible = DtMovimientos.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
+
GvDatos.DataSource = DtMovimientos
GvDatos.DataBind()
@@ -541,20 +578,20 @@ Partial Class Inventarios_Apartados
e.Row.FCTextBox("TxtCantidad2").Attributes.Add("onblur", String.Format("ValidaCantidad(this,{0})", e.Row.DBCampo("Cantidad")))
End If
- If If(e.Row.DBCampo("SerieLote").ToString = "", "-1", e.Row.DBCampo("SerieLote").ToString) <> "-1" Then
- TxtnSerieLote.Visible = True
- ThSerieLote.Visible = True
- TdSerieLote.Visible = True
- GvDatos.Columns(4).Visible = True
- e.Row.Cells(4).Text = e.Row.DBCampo("SerieLote").ToString
- Else
- e.Row.Cells(4).Text = ""
- End If
+ 'If If(e.Row.DBCampo("Serie").ToString = "", "-1", e.Row.DBCampo("Serie").ToString) <> "-1" Then
+ ' TxtnSerie.Visible = True
+ ' ThSerie.Visible = True
+ ' TdSerie.Visible = True
+ ' GvDatos.Columns(4).Visible = True
+ ' e.Row.Cells(4).Text = e.Row.DBCampo("Serie").ToString
+ 'Else
+ ' e.Row.Cells(4).Text = ""
+ 'End If
- If DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {e.Row.RowIndex}").SUMD("CantidadSeccionAlmacen") > 0 Then
- e.Row.FCLinkButton("lnkRemove").Visible = False
- e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
- End If
+ 'If DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {e.Row.RowIndex}").SUMD("CantidadSeccionAlmacen") > 0 Then
+ ' e.Row.FCLinkButton("lnkRemove").Visible = False
+ ' e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
+ 'End If
End If
End Sub
@@ -593,12 +630,12 @@ Partial Class Inventarios_Apartados
Next
Dim TotalCantidad As Double = DtMovimientos.SUMD("Cantidad")
- If UsuarioActual.Empresa.Funcionalidad(563) = "1" Then
- If TotalCantidad <> DtSeccionAlmacen.FiltraParametros("TipoSeccionAlmacen = 1").SUMD("CantidadSeccionAlmacen") Then
- Alert("La seccion de almacen no ha sido agregada completamente.", TipoMensaje.MsgAdvertencia)
- Exit Sub
- End If
- End If
+ 'If UsuarioActual.Empresa.Funcionalidad(563) = "1" Then
+ ' If TotalCantidad <> DtSeccionAlmacen.FiltraParametros("TipoSeccionAlmacen = 1").SUMD("CantidadSeccionAlmacen") Then
+ ' Alert("La seccion de almacen no ha sido agregada completamente.", TipoMensaje.MsgAdvertencia)
+ ' Exit Sub
+ ' End If
+ 'End If
Dim ObjInventario As New ClsInventarios
@@ -610,8 +647,8 @@ Partial Class Inventarios_Apartados
If Not CargadoDeMov Then
For Each dr As DataRow In DtMovimientos.Rows
- Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=If(dr("SerieLote").ToString = "", "-1", dr("SerieLote").ToString))
- Existencia -= DtMovimientos.SUM("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("SerieLote").ToString <> "-1", $" AND SerieLote = '{dr("SerieLote").ToString}'", "")}")
+ Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=If(dr("Serie").ToString = "", "-1", dr("Serie").ToString))
+ Existencia -= DtMovimientos.SUM("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("Serie").ToString <> "-1", $" AND Serie = '{dr("Serie").ToString}'", "")}")
'DtMovimientos.SUM("Cantidad", String.Format("CvePS = {0}", dr("CvePS").ToString.ToEntero))
If Existencia < 0 Then
@@ -623,7 +660,7 @@ Partial Class Inventarios_Apartados
Next
Else
For Each gvr As GridViewRow In GvDatos.Rows
- Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=If(gvr.DataKey("SerieLote").ToString = "", "-1", gvr.DataKey("SerieLote").ToString))
+ Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToString.ToEntero, Serie:=If(gvr.DataKey("Serie").ToString = "", "-1", gvr.DataKey("Serie").ToString))
Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero
If Existencia < 0 Then
ErrorExistencia = True
@@ -666,7 +703,7 @@ Partial Class Inventarios_Apartados
ErrorMovInv = True
Else
For Each Dr As DataRow In DtMovimientos.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For
@@ -689,8 +726,12 @@ Partial Class Inventarios_Apartados
ErrorMovInv = True
Else
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
+ Dim CveSec As Integer = 0
+
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then
+ CveSec = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
+
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSec, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
Exit For
@@ -771,6 +812,13 @@ Partial Class Inventarios_Apartados
Protected Sub GvDatosDesapartado_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosDesapartado.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onblur", String.Format("ValidaCantidad(this,{0})", e.Row.DBCampo("Cantidad")))
+ If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero > 0 Then
+ e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
+ e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
+ e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
+ e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
+ End If
+
End If
End Sub
Protected Sub BtnVerificarExistenciasDesarmado_Click(sender As Object, e As EventArgs)
@@ -789,11 +837,15 @@ Partial Class Inventarios_Apartados
Dim DtTemp = GetExistenciasDT()
If DtTemp IsNot Nothing Then
+ GvDatosDesapartado.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
+ GvDatosDesapartado.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
+ GvDatosDesapartado.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
+ GvDatosDesapartado.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
+
GvDatosDesapartado.DataSource = DtTemp
GvDatosDesapartado.DataBind()
UpDatosDesapartado.Update()
- DtSeccionAlmacen.Rows.Clear()
End If
End Sub
@@ -856,12 +908,12 @@ Partial Class Inventarios_Apartados
End If
Next
- If UsuarioActual.Empresa.Funcionalidad(563) = "1" Then
- If TotalCantidad <> DtSeccionAlmacen.FiltraParametros("TipoSeccionAlmacen = 2").SUMD("CantidadSeccionAlmacen") Then
- Alert("La seccion de almacen no ha sido agregada completamente.", TipoMensaje.MsgAdvertencia)
- Exit Sub
- End If
- End If
+ 'If UsuarioActual.Empresa.Funcionalidad(563) = "1" Then
+ ' If TotalCantidad <> DtSeccionAlmacen.FiltraParametros("TipoSeccionAlmacen = 2").SUMD("CantidadSeccionAlmacen") Then
+ ' Alert("La seccion de almacen no ha sido agregada completamente.", TipoMensaje.MsgAdvertencia)
+ ' Exit Sub
+ ' End If
+ 'End If
'VALIDA SI HUBO CAMBIOS EN LA EXISTENCIA
Dim CantidadGV = GvDatosDesapartado.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("Cantidad").ToDouble)
@@ -889,6 +941,7 @@ Partial Class Inventarios_Apartados
Observaciones:=TxtObservacionesDesapartado.Text.Trim, Recibio:="", CveAlmacenDestino:=DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero,
CveCliente:=CveCliente, CveVendedor:=CveVendedor)
FolioSalida = ObjInventario.Folio
+ Dim Diccionario As New HybridDictionary
Dim Cont As Integer = 0
If CveMovimientoSalida <= 0 Then
ErrorMovInv = True
@@ -896,10 +949,12 @@ Partial Class Inventarios_Apartados
Else
For Each Gvr As GridViewRow In GvDatosDesapartado.Rows
If Gvr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("SerieLote").ToString, CveMovimientoDetalleEntrada:=Gvr.DataKey("CveMovimientoDetalle").ToString.ToEntero) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=Gvr.DataKey("Serie").ToString, Lote:=Gvr.DataKey("Lote").ToString, FechaCaducidad:=Gvr.DataKey("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Gvr.DataKey("CveMovimientoDetalle").ToString.ToEntero) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For
+ Else
+ Diccionario.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue)
End If
End If
Cont += 1
@@ -917,8 +972,11 @@ Partial Class Inventarios_Apartados
ErrorMovInv = True
Else
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
+ Dim i As Integer = 0
+
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then
+ Dim CveSeccionAlmacen As Integer = Diccionario(Dr("CveMovimientoDetalle").ToString.ToEntero).ToString.ToEntero
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
Exit For
@@ -955,6 +1013,12 @@ Partial Class Inventarios_Apartados
ObjInventario.Dispose()
End Sub
+
+ Private Sub DdlAlmacenDestinoDesapartado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacenDestinoDesapartado.SelectedIndexChanged
+
+ CargaExistencias()
+
+ End Sub
#End Region
#End Region
diff --git a/Inventarios/CatSeccionesAlmacenes.aspx.vb b/Inventarios/CatSeccionesAlmacenes.aspx.vb
index 15091d1ca..bf2e601a7 100644
--- a/Inventarios/CatSeccionesAlmacenes.aspx.vb
+++ b/Inventarios/CatSeccionesAlmacenes.aspx.vb
@@ -62,6 +62,8 @@ Partial Class Inventarios_CatSeccionesAlmacenes
Alert("La Seccion se guardó correctamente.", TipoMensaje.MsgInformacion)
ViewState("DTSeccionesAlmacenes") = ObjSeccion.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
+ ObjSeccion.GetSeccionesAlmacenes(UsuarioActual.CveEmpresa, -1)
+
GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) = ObjSeccion.DtResultados
If ViewState("Orden").ToString() <> String.Empty Then
@@ -107,6 +109,7 @@ Partial Class Inventarios_CatSeccionesAlmacenes
SeccionTxt.Text = ""
DdlAlmacen.SelectedIndex = 0
Alert("La Seccion se actualizo correctamente.", TipoMensaje.MsgInformacion)
+ ObjSeccion.GetSeccionesAlmacenes(UsuarioActual.CveEmpresa, -1)
ViewState("DTSeccionesAlmacenes") = ObjSeccion.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) = ObjSeccion.DtResultados
End If
diff --git a/Inventarios/ConsignacionesMaterial.aspx.vb b/Inventarios/ConsignacionesMaterial.aspx.vb
index 92caaee2d..77c1d9fe2 100644
--- a/Inventarios/ConsignacionesMaterial.aspx.vb
+++ b/Inventarios/ConsignacionesMaterial.aspx.vb
@@ -231,7 +231,7 @@ Partial Class Inventarios_ConsignacionesMaterial
End Sub
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacen.SelectedIndexChanged
- DdlSeccion.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
+ DdlSeccion.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
DdlSeccion.DataBind()
DdlSeccion.Items.Insert(0, New ListItem("Seleccione Sección.", "-1"))
UPEncabezado.Update()
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index 4d6fc54de..a0b2632f5 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -2148,27 +2148,27 @@ Partial Class Inventarios_EntradasSalidas
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
If DdlProducto2.SelectedValue.ToEntero > 0 Then
- Dim MetodoInventario As Integer = GlobalDTPS(UsuarioActual.CveEmpresa, DdlProducto2.SelectedValue.ToEntero).FiltroPrimeroValor("Inv_CveMetodoInventario", "").ToEntero ' ("Inv_CveMetodoInventario = 6", "PS")
- If MetodoInventario = 5 Then
+ Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
+ If dr IsNot Nothing Then
+ If CBool(dr("AplicaSerie")) Then
- 'LblSerieLote.Visible = True
- TxtnSerie.Visible = True
- divSerie.Visible = True
+ 'LblSerieLote.Visible = True
+ TxtnSerie.Visible = True
+ divSerie.Visible = True
- 'TrSerieLote.Visible = True
- 'TrSerieLote2.Visible = True
- GvM.Columns(9).Visible = True
+ 'TrSerieLote.Visible = True
+ 'TrSerieLote2.Visible = True
+
+ End If
+ If CBool(dr("AplicaLote")) Then
+ TxtnLote.Visible = True
+ divLote.Visible = True
+ 'TrLote.Visible = True
+ 'TrLote2.Visible = True
+
+ End If
End If
- If MetodoInventario = 6 Then
- TxtnLote.Visible = True
- divLote.Visible = True
- 'TrLote.Visible = True
- 'TrLote2.Visible = True
- GvM.Columns(10).Visible = True
- 'TrBatch2.Visible = True
- GvM.Columns(11).Visible = True
- End If
End If
DdlUnidad.Items.Clear()
@@ -2230,43 +2230,10 @@ Partial Class Inventarios_EntradasSalidas
End If
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
- If DtTemp.MAX("Serie").ToString <> "" Then
- 'LblSerie.Visible = True
- TxtnSerie.Visible = True
- 'TrSerieLote.Visible = True
- 'TrSerieLote2.Visible = True
- GvM.Columns(9).Visible = True
- End If
-
- If DtTemp.MAX("Lote").ToString <> "" Then
- TxtnLote.Visible = True
- 'TrLote.Visible = True
- 'TrLote2.Visible = True
- GvM.Columns(10).Visible = True
-
- 'TxtnBatch.Visible = True
- 'TrBatch.Visible = True
- 'TrBatch2.Visible = True
- 'GvM.Columns(11).Visible = True
- End If
- If DtTemp.MAX("FechaCaducidad").ToString <> "" Then
-
- GvM.Columns(11).Visible = True
-
- 'TxtnBatch.Visible = True
- 'TrBatch.Visible = True
- 'TrBatch2.Visible = True
- 'GvM.Columns(11).Visible = True
- End If
-
-
-
- If DtTemp.MAX("CveSeccionAlmacen").ToString <> "" Then
- 'TxtnBatch.Visible = True
- 'TrBatch.Visible = True
- 'TrBatch2.Visible = True
- GvM.Columns(12).Visible = True
- End If
+ GvM.Columns(9).Visible = DtTemp.MAX("Serie").ToString <> ""
+ GvM.Columns(10).Visible = DtTemp.MAX("Lote").ToString <> ""
+ GvM.Columns(11).Visible = DtTemp.MAX("FechaCaducidad").ToString <> ""
+ GvM.Columns(12).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString <> ""
End If
diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx
index 549d8088d..e38673a70 100644
--- a/Inventarios/EntregaAlmacen.aspx
+++ b/Inventarios/EntregaAlmacen.aspx
@@ -453,17 +453,18 @@
-
+
-
+
-
+
-
+
+
@@ -776,7 +777,7 @@
-
+
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index ef000a2d1..c092d7182 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -601,8 +601,8 @@ Partial Class Inventarios_EntregaAlmacen
If Not DtDatos.Columns.Contains("CveSeccion") Then
DtDatos.Columns.Add("CveSeccion", GetType(Integer))
End If
- If Not DtDatos.Columns.Contains("Caducidad") Then
- DtDatos.Columns.Add("Caducidad", GetType(Date))
+ If Not DtDatos.Columns.Contains("FechaCaducidad") Then
+ DtDatos.Columns.Add("FechaCaducidad", GetType(Date))
End If
If Not DtDatos.Columns.Contains("Seleccionado") Then
DtDatos.Columns.Add("Seleccionado", GetType(Boolean))
@@ -611,9 +611,6 @@ Partial Class Inventarios_EntregaAlmacen
DtDatos.Columns.Add("CantidadSeleccionada", GetType(Double))
End If
- For Each Dr As DataRow In DtDatos.Rows
- Dr("Caducidad") = Now
- Next
'TxtFecha.Text = If(EsDevolucionVenta = 1, Now.ToShortDateString, DtDatos.Rows(0)("Fecha").ToString)
End If
@@ -834,7 +831,7 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(e.Row.DBCampo("AplicaSeccion")) Then
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
- e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
+ e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
@@ -1001,7 +998,7 @@ Partial Class Inventarios_EntregaAlmacen
If DtSerie.Rows.Count > 0 Then
Dim Mensaje As New StringBuilder
- Mensaje.AppendFormat("Serie / Lote Recomendado: {0}", DtSerie.Rows(0)("Serie"))
+ Mensaje.AppendFormat("Serie Recomendado: {0}", DtSerie.Rows(0)("Serie"))
If AplicaCaducidad Then Mensaje.AppendFormat(", Caducicdad: {0}", DtSerie.Rows(0)("FechaCaducidad").ToString.ToDate.ToShortDateString)
LbSerieRecomendado.Text = Mensaje.ToString 'String.Format("Serie / Lote Recomendado: {0}, Caducicdad: {1}", ObjInventarios.DtResultados.Rows(0)("SerieLote"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString.ToDate.ToShortDateString)
Else
@@ -1318,10 +1315,10 @@ Partial Class Inventarios_EntregaAlmacen
Protected Sub GvLote_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvLote.RowDeleting
- Dim keySerieLote As String = e.Keys("Lote").ToString
+ Dim keyLote As String = e.Keys("Lote").ToString
Try
For Each dr As DataRow In DtDatosDetalleLote.Rows
- If dr("Lote").ToString = keySerieLote Then
+ If dr("Lote").ToString = keyLote Then
dr.Delete()
End If
Next
@@ -1592,7 +1589,7 @@ Partial Class Inventarios_EntregaAlmacen
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
DtDatos.Rows(Index)("CveSeccion") = gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero
- DtDatos.Rows(Index)("Caducidad") = gvr.FCTextBox("TxtCaducidad").Text.ToDate
+ DtDatos.Rows(Index)("FechaCaducidad") = gvr.FCTextBox("TxtCaducidad").Text.ToDate
DtDatos.Rows(Index)("Lote") = gvr.FCTextBox("TxtLote").Text
End If
Index += 1
@@ -1651,10 +1648,10 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(Dr("AplicaSerie")) Then
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows
- StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToShortDateString)
+ StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
Next
Else
- StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToShortDateString)
+ StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
End If
End If
Next
@@ -1705,7 +1702,7 @@ Partial Class Inventarios_EntregaAlmacen
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows
- If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr1("Serie").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr1("Serie").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
For Each Dr2 As DataRow In ObjInventario.DtResultados.FiltraParametros("CveAlmacen > 0 AND ExistenciaFinal > 0").Rows
'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO
@@ -1734,7 +1731,7 @@ Partial Class Inventarios_EntregaAlmacen
CantidadPendiente = 1
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un Error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
Exit For
@@ -1749,11 +1746,11 @@ Partial Class Inventarios_EntregaAlmacen
If ErrorMovInv Then Exit For
Next
- ElseIf Dr("Inv_CveMetodoInventario").ToString = "6" Then
+ ElseIf CBool(Dr("AplicaLote")) Then
DtDetalle = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows
- If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Dr1("Lote").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Dr1("Lote").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
CantidadSaldo = Dr("CantidadGV").ToString.ToDecimal
@@ -1784,7 +1781,7 @@ Partial Class Inventarios_EntregaAlmacen
CantidadPendiente = If(Dr1("Cantidad").ToString.ToDecimal > CantidadSaldo, CantidadSaldo, Dr1("Cantidad").ToString.ToDecimal)
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Lote:=Dr1("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Lote:=Dr1("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
Exit For
@@ -1802,7 +1799,7 @@ Partial Class Inventarios_EntregaAlmacen
Else
- If ObjInventario.GetExistenciasProducto(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If ObjInventario.GetExistenciasProducto(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
CantidadSaldo = Dr("CantidadGV").ToString.ToDecimal
@@ -1837,7 +1834,7 @@ Partial Class Inventarios_EntregaAlmacen
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0,
Serie:=Dr("Serie").ToString,
CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero,
- FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha),
+ FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha),
Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"),
CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
ErrorMovInv = True
@@ -1883,7 +1880,7 @@ Partial Class Inventarios_EntregaAlmacen
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
Exit For
@@ -1981,7 +1978,7 @@ Partial Class Inventarios_EntregaAlmacen
End If
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
Exit For
@@ -2011,7 +2008,7 @@ Partial Class Inventarios_EntregaAlmacen
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND Serie = '{Dr1("Serie").ToString}'").ToString.ToDecimal
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For
@@ -2020,10 +2017,10 @@ Partial Class Inventarios_EntregaAlmacen
ElseIf DtDetalleLote.Rows.Count > 0 Then
For Each Dr1 As DataRow In DtDetalleLote.Rows
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
- PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND SerieLote = '{Dr1("SerieLote").ToString}'").ToString.ToDecimal
+ PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND Serie = '{Dr1("Serie").ToString}'").ToString.ToDecimal
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For
@@ -2034,7 +2031,7 @@ Partial Class Inventarios_EntregaAlmacen
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero}").ToString.ToDecimal
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar.")
Exit For
@@ -2072,7 +2069,7 @@ Partial Class Inventarios_EntregaAlmacen
Else
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, EsInterno:=EsInterno, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero()) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, EsInterno:=EsInterno, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero()) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de entrada")
Exit For
@@ -2527,21 +2524,21 @@ Partial Class Inventarios_EntregaAlmacen
'VERIFICAR EXISTENCIA
Dim StrXML As New StringBuilder
+ Dim Lote As String = ""
+ Dim FechaCaducidad As Date
StrXML.Append("")
For Each Dr As DataRow In DtDatos.Rows
+ FechaCaducidad = If(CBool(Dr("AplicaCaducidad")) AndAlso Dr("FechaCaducidad").ToString <> "", Dr("FechaCaducidad").ToString.ToDate, MinFecha)
+ Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1")
+
If Dr("CantidadGV").ToString.ToDecimal > 0 Then
- If Dr("Inv_CveMetodoInventario").ToString = "5" Then
+ If CBool(Dr("AplicaSerie")) Then
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows
- StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, Dr1("Serie"))
- Next
- ElseIf Dr("Inv_CveMetodoInventario").ToString = "6" Then
- DtDetalle = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
- For Each Dr1 As DataRow In DtDetalle.Rows
- StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), DtDatosDetalleLote.SUM("Cantidad", $"Lote = '{Dr1("Lote").ToString}' "), Dr1("Lote"))
+ StrXML.AppendFormat("", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("YYYY/MM/DD"))
Next
Else
- StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), "-1")
+ StrXML.AppendFormat("", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("YYYY/MM/DD"))
End If
End If
Next
@@ -2581,7 +2578,7 @@ Partial Class Inventarios_EntregaAlmacen
For Each Dr As DataRow In DtDatos.Rows
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec")))
DtDetalleLote = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec")))
- If DtDetalle.Rows.Count > 0 Then 'SI FUE POR SERIELOTE
+ If DtDetalle.Rows.Count > 0 Then 'SI FUE POR SERIE
For Each Dr1 As DataRow In DtDetalle.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=-1, CveContratoDetalle:=Dr("CveContratoDetalle").ToString.ToEntero) Then
ErrorMovInv = True
@@ -2875,7 +2872,7 @@ Partial Class Inventarios_EntregaAlmacen
Row("CveSeccion") = GvDatos.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero
End If
If GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text <> "" Then
- Row("Caducidad") = GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text.ToDate
+ Row("FechaCaducidad") = GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text.ToDate
End If
index2 += 1
Next
@@ -2934,8 +2931,8 @@ Partial Class Inventarios_EntregaAlmacen
If Row("CveSeccion").ToString <> "" Then
GvDatos.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue = Row("CveSeccion").ToString
End If
- If Row("Caducidad").ToString <> "" Then
- GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text = Row("Caducidad").ToString.ToDate.ToShortDateString
+ If Row("FechaCaducidad").ToString <> "" Then
+ GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text = Row("FechaCaducidad").ToString.ToDate.ToShortDateString
End If
index2 += 1
Next
@@ -3022,7 +3019,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim Index = 1
For Each Dr As DataRow In DtDatosSugerencias.Rows
Dr("Consec") = Index
- 'Dr("Caducidad") = Now
+
Index += 1
Next
@@ -3032,7 +3029,7 @@ Partial Class Inventarios_EntregaAlmacen
GvSugerencias.Columns(2).Visible = DtDatosSugerencias.MAX("Seccion") <> ""
GvSugerencias.Columns(3).Visible = DtDatosSugerencias.MAX("Serie") <> ""
GvSugerencias.Columns(4).Visible = DtDatosSugerencias.MAX("Lote") <> ""
- GvSugerencias.Columns(5).Visible = DtDatosSugerencias.MAX("Caducidad") <> ""
+ GvSugerencias.Columns(5).Visible = DtDatosSugerencias.MAX("FechaCaducidad") <> ""
End If
diff --git a/Inventarios/KardexAlmacen.aspx.vb b/Inventarios/KardexAlmacen.aspx.vb
index e894daab8..70c9ebda8 100644
--- a/Inventarios/KardexAlmacen.aspx.vb
+++ b/Inventarios/KardexAlmacen.aspx.vb
@@ -13,7 +13,7 @@ Partial Class Inventarios_KardexAlmacen
ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
'If Not UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 13, 66) Then
- ' GvDatos.Columns(6).Visible = True ' SerieLote
+
' GvDatos.Columns(7).Visible = True ' FCaducidad
'End If
If IfNull(Request("CvePS"), "-1").ToString.ToEntero > 0 Then CargarKardex(Request("CvePS").ToString.ToEntero)
diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx b/Inventarios/PaquetesArmadoDesarmado.aspx
index fd7f4be1d..b6b4271e3 100644
--- a/Inventarios/PaquetesArmadoDesarmado.aspx
+++ b/Inventarios/PaquetesArmadoDesarmado.aspx
@@ -222,9 +222,9 @@
-
+
-
+
@@ -484,9 +484,9 @@
-
+
-
+
@@ -558,15 +558,15 @@
Serie/Lote:
-
-
-
+
+
+
-
+
diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
index 077c657b7..54ec0779b 100644
--- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb
+++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
@@ -470,13 +470,13 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
- If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
+ If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
MensajeError = String.Format("El Producto {0} con Serie: {1} no tiene existencia suficiente", Dr("PS"), Dr("Serie"))
TieneError = True
Exit For
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, SerieLote:=Dr("Serie").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, Serie:=Dr("Serie").ToString) Then
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
TieneError = True
Exit For
@@ -520,7 +520,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
Dim DtSeriesComponentes As New DataTable
For Each Gvr As GridViewRow In GvSeriesPaqueteArmado.Rows
'AGREGA MOVTO DETALLE DE LA ENTRADA DEL PAQUETE
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, -1, SerieLote:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, -1, Serie:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then
TieneError = True
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada"
Exit For
@@ -577,7 +577,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
If CveTipoPS = 5 Then
For Each Gvr As GridViewRow In GvSeriesPaqueteDesarmado.Rows
'AGREGA MOVTO DETALLE DE LA SALIDA DEL PAQUETE
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, -1, SerieLote:=Gvr.DataKey("Serie").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, -1, Serie:=Gvr.DataKey("Serie").ToString) Then
TieneError = True
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida"
Exit For
@@ -611,7 +611,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, -1, SerieLote:=Dr("Serie").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, -1, Serie:=Dr("Serie").ToString) Then
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada. Por favor vuelva a intentar."
TieneError = True
Exit For
@@ -805,11 +805,11 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
Dim VariableCampoSerie = ""
If TipoMovimiento = 1 Then
Dim ObjInventarios As New ClsInventarios
- If ObjInventarios.SerieLoteRecomendadoGet(CvePSSerieLote, UsuarioActual.CveEmpresa, If(TipoMovimiento = 1, CveAlmacenArmado, CveAlmacenDesarmado)) Then
+ If ObjInventarios.SerieRecomendadoGet(CvePSSerieLote, UsuarioActual.CveEmpresa, If(TipoMovimiento = 1, CveAlmacenArmado, CveAlmacenDesarmado)) Then
DtSerieLote = ObjInventarios.DtResultados
End If
ObjInventarios.Dispose()
- VariableCampoSerie = "SerieLote"
+ VariableCampoSerie = "Serie"
Else
DtSerieLote = If(DtExistenciasDesarmado IsNot Nothing, DtExistenciasDesarmado.Copy, Nothing)
VariableCampoSerie = "SeriePS"
@@ -835,12 +835,12 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
If DtSerieLote.Rows.Count > 0 Then
Dim Mensaje As New StringBuilder
Mensaje.AppendFormat("Serie / Lote Recomendado: {0}", DtSerieLote.Rows(0)(VariableCampoSerie))
- LbSerieLoteRecomendado.Text = Mensaje.ToString 'String.Format("Serie / Lote Recomendado: {0}, Caducicdad: {1}", ObjInventarios.DtResultados.Rows(0)("SerieLote"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString.ToDate.ToShortDateString)
+ LbSerieRecomendado.Text = Mensaje.ToString 'String.Format("Serie / Lote Recomendado: {0}, Caducicdad: {1}", ObjInventarios.DtResultados.Rows(0)("Serie"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString.ToDate.ToShortDateString)
Else
- LbSerieLoteRecomendado.Text = "No se encontro ningun Serie/Lote."
+ LbSerieRecomendado.Text = "No se encontro ningun Serie/Lote."
End If
Else
- LbSerieLoteRecomendado.Text = "No se encontro ningun Serie/Lote."
+ LbSerieRecomendado.Text = "No se encontro ningun Serie/Lote."
End If
If DtSerieLote IsNot Nothing Then DtSerieLote.Dispose()
UpSerie.Update()
@@ -848,17 +848,17 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
End Sub
Protected Sub BtnAgregarPS_Click(sender As Object, e As EventArgs)
- AgregaSerieLote(TxtSerieLote.Text.Trim, 1)
+ AgregaSerieLote(TxtSerie.Text.Trim, 1)
End Sub
- Private Sub AgregaSerieLote(SerieLote As String, Tipo As Integer)
+ Private Sub AgregaSerieLote(Serie As String, Tipo As Integer)
- If SerieLote.Trim = "" Then
+ If Serie.Trim = "" Then
Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
- Dim SeriesArreglo = SerieLote.Split(";"c)
+ Dim SeriesArreglo = Serie.Split(";"c)
'VALIDACION DE SERIES DUPLICADAS
Dim MensajeAlert As New StringBuilder
@@ -897,7 +897,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
'VERIFICA EXISTENCIAS
Dim Existencia = 0.0D
If TipoMovimiento = 1 Then
- Existencia = ObjInventarios.GetExistenciasPS(CvePSSerieLote, CveUMSerieLote, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=TxtFechaArmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
+ Existencia = ObjInventarios.GetExistenciasPS(CvePSSerieLote, CveUMSerieLote, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=TxtFechaArmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
Else
Existencia = If(DtExistenciasDesarmado Is Nothing, 0, DtExistenciasDesarmado.FiltraParametros($"CvePS={CvePSSerieLote} AND SeriePS='{Serie}'").Rows.Count.ToString.ToDecimal)
End If
@@ -931,7 +931,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
ObjInventarios.Dispose()
If Tipo = 1 Then
- TxtSerieLote.Text = ""
+ TxtSerie.Text = ""
End If
CargaSerie(2)
@@ -988,20 +988,20 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
End If
End Sub
Protected Sub BtnAgregarSerieDesarmado_Click(sender As Object, e As EventArgs)
- Dim SerieLote = TxtSerieDesarmado.Text.Trim
+ Dim Serie = TxtSerieDesarmado.Text.Trim
'VERIFICA EXISTENCIAS
Dim ObjInventarios As New ClsInventarios
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimeroValor("CveUM").ToEntero
- Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=LbFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=SerieLote, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
+ Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=LbFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
If Existencia < 1 Then
- Alert($"No hay existencia suficiente con la Serie definida ""{SerieLote}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
+ Alert($"No hay existencia suficiente con la Serie definida ""{Serie}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
Exit Sub
End If
- If ObjInventarios.GetPaqueteRelacionSeries(CvePaqueteDesarmado, SerieLote) Then
+ If ObjInventarios.GetPaqueteRelacionSeries(CvePaqueteDesarmado, Serie) Then
If DtExistenciasDesarmado Is Nothing Then
DtExistenciasDesarmado = ObjInventarios.DtResultados.Copy
Else
diff --git a/Inventarios/RecepcionAlmacen.aspx b/Inventarios/RecepcionAlmacen.aspx
index f4b956e66..9b96fab08 100644
--- a/Inventarios/RecepcionAlmacen.aspx
+++ b/Inventarios/RecepcionAlmacen.aspx
@@ -479,7 +479,7 @@
-
+
@@ -721,23 +721,12 @@
-
Serie/Lote:
+
Serie:
-
-
Fecha Caducidad:
-
-
-
-
-
-
-
-
-
-
+
@@ -748,8 +737,7 @@
-
-
+
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb
index 14eb25827..893e3be4c 100644
--- a/Inventarios/RecepcionAlmacen.aspx.vb
+++ b/Inventarios/RecepcionAlmacen.aspx.vb
@@ -436,7 +436,6 @@ Partial Class Inventarios_RecepcionAlmacen
DivRemision.Visible = True
End If
- TxtFechaCaducidad.Text = Now.ToShortDateString
TxtFechaPendientes.Text = Now.ToShortDateString
TipoCambio = -1
CreaDtDetalle()
@@ -1268,6 +1267,7 @@ Partial Class Inventarios_RecepcionAlmacen
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
+ e.Row.FCTextBox("TxtDividir").Visible = True
Else
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
@@ -1277,6 +1277,7 @@ Partial Class Inventarios_RecepcionAlmacen
e.Row.FCTextBox("TxtCaducidad").Visible = True
e.Row.FCLinkButton("LnkCaducidad").Visible = True
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
+ e.Row.FCTextBox("TxtDividir").Visible = True
Else
e.Row.FCTextBox("TxtCaducidad").Visible = False
e.Row.FCLinkButton("LnkCaducidad").Visible = False
@@ -1446,7 +1447,6 @@ Partial Class Inventarios_RecepcionAlmacen
LbProducto.Text = Argumentos(3)
LbCantidad.Text = Argumentos(4).FormatoNumero
- TxtFechaCaducidad.Text = Now.ToShortDateString()
CvePSSerie = Argumentos(0).ToEntero
CveUMSerie = Argumentos(1).ToEntero
@@ -1612,7 +1612,7 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If TipoMovimiento = 2 Then
- If DtExistencias.SUM("Existencia", $"SerieLote = {Serie}") = 0 Then
+ If DtExistencias.SUM("Existencia", $"Serie = {Serie}") = 0 Then
MensajeSinExistencias.Append($"Serie: {Serie}. ")
Continue For
End If
@@ -1638,7 +1638,6 @@ Partial Class Inventarios_RecepcionAlmacen
If Tipo = 1 Then
TxtSerie.Text = ""
- TxtFechaCaducidad.Text = Now.ToShortDateString
End If
CargaSerie(Tipo, True)
@@ -1752,10 +1751,10 @@ Partial Class Inventarios_RecepcionAlmacen
End Sub
Protected Sub BtnAddPSLote_Click(sender As Object, e As EventArgs)
- AgregaLote(TxtLote.Text.Trim, TxtFechaCaducidad.Text.ToDate, 1)
+ AgregaLote(TxtLote.Text.Trim, 1)
End Sub
- Private Sub AgregaLote(Lote As String, FechaCaducidad As Date, Tipo As Integer)
+ Private Sub AgregaLote(Lote As String, Tipo As Integer)
If Lote.Trim = "" Then
Alert("El campo Lote es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
@@ -1783,15 +1782,15 @@ Partial Class Inventarios_RecepcionAlmacen
'VERIFICA EXISTENCIAS
If TipoMovimiento > 1 Then
- Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Lote, FechaCaducidad:=FechaCaducidad)
+ Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Lote)
If Existencia < CantidadLote Then
- Alert($" El numero de Lote ""{Lote}"" y FechaCaducidad = '{FechaCaducidad}' proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
+ Alert($" El numero de Lote ""{Lote}"" proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
End If
If TipoMovimiento = 2 Then
- If Not DtExistencias.SUM("Existencia", $"Lote = '{Lote}' FechaCaducidad = '{FechaCaducidad}'") = 0 Then
- Alert($" El numero de Lote ""{Lote}"" y FechaCaducidad '{FechaCaducidad}' proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
+ If Not DtExistencias.SUM("Existencia", $"Lote = '{Lote}' ") = 0 Then
+ Alert($" El numero de Lote ""{Lote}"" proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
End If
End If
@@ -1804,8 +1803,8 @@ Partial Class Inventarios_RecepcionAlmacen
Row("CveUM") = CveUMSerie
Row("PU") = PUSerie
Row("Lote") = Lote
- Row("FechaCaducidad") = FechaCaducidad
- Row("FechaCaducidad") = If(IsDate(TxtFechaCaducidadLote.Text), TxtFechaCaducidadLote.Text, MinFecha.ToShortDateString)
+ 'Row("FechaCaducidad") = FechaCaducidad
+ 'Row("FechaCaducidad") = If(IsDate(TxtFechaCaducidadLote.Text), TxtFechaCaducidadLote.Text, MinFecha.ToShortDateString)
'Row("FechaCaducidad") = If(AplicaCaducidad, TxtFechaCaducidadLote.Text, MinFecha.ToShortDateString)
DtDatosLoteDetalle.Rows.Add(Row)
@@ -1813,8 +1812,6 @@ Partial Class Inventarios_RecepcionAlmacen
If Tipo = 1 Then
TxtLote.Text = ""
- TxtBatch.Text = ""
- TxtFechaCaducidad.Text = Now.ToShortDateString
End If
CargaLote(1, True)
@@ -2324,7 +2321,7 @@ Partial Class Inventarios_RecepcionAlmacen
If Not ErrorMovInv AndAlso Dt IsNot Nothing Then
For Each Dr As DataRow In Dt.FiltraParametros($"CveVenta={CveVenta}").Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
End If
@@ -2385,12 +2382,12 @@ Partial Class Inventarios_RecepcionAlmacen
Exit For
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
End If
@@ -2817,68 +2814,77 @@ Partial Class Inventarios_RecepcionAlmacen
End If
End If
+ Else
+ ErrorMovInv = True
+ MensajeError = "Error al obtener movimientos"
End If
'PREPOLIZA - NC
- If TipoMovimiento = 3 AndAlso ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
-
- Dim DtCostos As DataTable = Nothing
- DtCostos = ObjInventario.DtResultados
- Dim TotalCosto As Decimal = DtCostos.SUM("Total").ToDecimal
-
- Dim TotalNC As Decimal = 0
- Dim CveClasificacionDifCostoNC = -1
- Dim tTipoCambio As Decimal = 1
- If CveMoneda <> 1 Then tTipoCambio = TipoCambio.ToDecimal
-
- For Each gvr As GridViewRow In GvInv.Rows
- TotalNC += gvr.FCTextBox("TbCantidadF").Text.ToDecimal * gvr.DataKey("PU").ToDecimal * tTipoCambio
- CveClasificacionDifCostoNC = gvr.DataKey("CveClasificacion").ToEntero
- Next
- Dim IdCtaContableClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionDifCostoNC}").ToEntero
- Dim CveCuentaClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostosSIG", $"CveClasificacion = {CveClasificacionDifCostoNC}").ToEntero
-
- TotalCosto = Math.Round(TotalCosto, 2)
- TotalNC = Math.Round(TotalNC, 2)
- Dim DifCostoNC = Math.Round(TotalCosto - TotalNC, 2)
+ If TipoMovimiento = 3 Then
+ If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
- 'VARIABLES
- Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
- Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
- Dim Fecha As Date = TxtFecha.Text.ToDate
- Dim CveProveedor As Integer = -1
- Dim ProveedorNombre As String = ""
- Dim SerieFolio As String = ""
- Dim IdCtaContableNC = 0
- Dim CveConceptoContableNC = -1
- If DtCostos.Rows.Count > 0 Then
- If CveCompraSurtir > 0 Then
- If ObjCompras.GetCompras(CveCompraSurtir, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
- CveProveedor = ObjCompras.DtResultados(0)("CveProveedor").ToString.ToEntero
- ProveedorNombre = ObjCompras.DtResultados(0)("RazonSocial").ToString
- SerieFolio = $"NC: {ObjCompras.DtResultados(0)("SerieFolio").ToString}"
+ Dim DtCostos As DataTable = Nothing
+ DtCostos = ObjInventario.DtResultados
+ Dim TotalCosto As Decimal = DtCostos.SUM("Total").ToDecimal
- CveConceptoContableNC = 225
- If ObjConta.GetRetCuenta(CveConceptoContableNC, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
- IdCtaContableNC = ObjConta.DtResultados.FiltroPrimeroValor("IdCtaContable").ToEntero
+ Dim TotalNC As Decimal = 0
+ Dim CveClasificacionDifCostoNC = -1
+ Dim tTipoCambio As Decimal = 1
+ If CveMoneda <> 1 Then tTipoCambio = TipoCambio.ToDecimal
+
+ For Each gvr As GridViewRow In GvInv.Rows
+ TotalNC += gvr.FCTextBox("TbCantidadF").Text.ToDecimal * gvr.DataKey("PU").ToDecimal * tTipoCambio
+ CveClasificacionDifCostoNC = gvr.DataKey("CveClasificacion").ToEntero
+ Next
+ Dim IdCtaContableClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionDifCostoNC}").ToEntero
+ Dim CveCuentaClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostosSIG", $"CveClasificacion = {CveClasificacionDifCostoNC}").ToEntero
+
+ TotalCosto = Math.Round(TotalCosto, 2)
+ TotalNC = Math.Round(TotalNC, 2)
+ Dim DifCostoNC = Math.Round(TotalCosto - TotalNC, 2)
+
+
+ 'VARIABLES
+ Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
+ Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
+ Dim Fecha As Date = TxtFecha.Text.ToDate
+ Dim CveProveedor As Integer = -1
+ Dim ProveedorNombre As String = ""
+ Dim SerieFolio As String = ""
+ Dim IdCtaContableNC = 0
+ Dim CveConceptoContableNC = -1
+
+ If DtCostos.Rows.Count > 0 Then
+ If CveCompraSurtir > 0 Then
+ If ObjCompras.GetCompras(CveCompraSurtir, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
+ CveProveedor = ObjCompras.DtResultados(0)("CveProveedor").ToString.ToEntero
+ ProveedorNombre = ObjCompras.DtResultados(0)("RazonSocial").ToString
+ SerieFolio = $"NC: {ObjCompras.DtResultados(0)("SerieFolio").ToString}"
+
+ CveConceptoContableNC = 225
+ If ObjConta.GetRetCuenta(CveConceptoContableNC, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
+ IdCtaContableNC = ObjConta.DtResultados.FiltroPrimeroValor("IdCtaContable").ToEntero
+ End If
+
+ Else
+ ErrorMovInv = True
End If
-
- Else
- ErrorMovInv = True
End If
- End If
- If Not ErrorMovInv Then
- CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen-NC", 74, TotalCosto, TotalCosto, 1, Fecha, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- If CvePrePoliza > 0 Then
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalNC, SerieFolio, CveConceptoContableNC, SerieFolio, Fecha, IdCtaContableNC, -1, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalNC) Then
- If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto * -1, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto * -1, CveCuenta:=CveCuentaAlmacen) Then
- If DifCostoNC <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DifCostoNC * -1, SerieFolio, 69, SerieFolio, Fecha, IdCtaContableClasificacion, -1, CveClasificacion:=CveClasificacionDifCostoNC, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DifCostoNC * -1, CveCuenta:=CveCuentaClasificacion) Then
- ErrorMovInv = True
+ If Not ErrorMovInv Then
+ CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen-NC", 74, TotalCosto, TotalCosto, 1, Fecha, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ If CvePrePoliza > 0 Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalNC, SerieFolio, CveConceptoContableNC, SerieFolio, Fecha, IdCtaContableNC, -1, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalNC) Then
+ If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto * -1, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto * -1, CveCuenta:=CveCuentaAlmacen) Then
+ If DifCostoNC <> 0 Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DifCostoNC * -1, SerieFolio, 69, SerieFolio, Fecha, IdCtaContableClasificacion, -1, CveClasificacion:=CveClasificacionDifCostoNC, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DifCostoNC * -1, CveCuenta:=CveCuentaClasificacion) Then
+ ErrorMovInv = True
+ End If
End If
+ Else
+ ErrorMovInv = True
End If
Else
ErrorMovInv = True
@@ -2886,51 +2892,53 @@ Partial Class Inventarios_RecepcionAlmacen
Else
ErrorMovInv = True
End If
- Else
- ErrorMovInv = True
End If
- End If
- If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
- If ObjConta.ValorPolizaDescuadre > 0 Then
- GuardaLogAD($"Inventarios/RecepcionAlmacen-PPNC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
- ErrorMovInv = True
+ If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
+ If ObjConta.ValorPolizaDescuadre > 0 Then
+ GuardaLogAD($"Inventarios/RecepcionAlmacen-PPNC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
+ ErrorMovInv = True
+ End If
End If
- End If
- 'CONTABILIZAR - UNIFICAR Y SIMPLIFICAR CON PP DE LA COMPRA
- If Not ErrorMovInv Then
+ 'CONTABILIZAR - UNIFICAR Y SIMPLIFICAR CON PP DE LA COMPRA
+ If Not ErrorMovInv Then
- If CvePrePolizaCompra > 0 Then
- If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
- If Not ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaCompra) Then
- ErrorMovInv = True
- MensajeError = "Error al unificar los conceptos contables"
+ If CvePrePolizaCompra > 0 Then
+ If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
+ If Not ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaCompra) Then
+ ErrorMovInv = True
+ MensajeError = "Error al unificar los conceptos contables"
+ End If
End If
End If
- End If
- If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
- If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
- ErrorMovInv = True
- MensajeError = "Error al simplificar los conceptos contables"
+ If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
+ If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
+ ErrorMovInv = True
+ MensajeError = "Error al simplificar los conceptos contables"
+ End If
End If
- End If
- If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
- ObjContaContPAQ = New ClsContPAQi(UsuarioActual.Empresa)
- ObjContaContPAQ.IniciaTransacSQL()
- If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaContPAQ) Then
- MensajeContabilidad = $" Movimiento contabilizado en el folio: {ObjConta.ContaFolio} "
- Else
- ErrorMovInv = True
- MensajeError = "Error al contabilizar los conceptos contables"
+ If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
+ ObjContaContPAQ = New ClsContPAQi(UsuarioActual.Empresa)
+ ObjContaContPAQ.IniciaTransacSQL()
+ If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaContPAQ) Then
+ MensajeContabilidad = $" Movimiento contabilizado en el folio: {ObjConta.ContaFolio} "
+ Else
+ ErrorMovInv = True
+ MensajeError = "Error al contabilizar los conceptos contables"
+ End If
End If
+
End If
End If
+ Else
+ ErrorMovInv = True
+ MensajeError = "Error al obtener movimientos"
End If
End If
diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb
index fc562aaa7..e5b6eb401 100644
--- a/Inventarios/RecepcionUsados.aspx.vb
+++ b/Inventarios/RecepcionUsados.aspx.vb
@@ -458,7 +458,7 @@ Partial Class Inventarios_RecepcionUsados
dt.Columns.Add("CostoIndirecto", Type.GetType("System.Double"))
dt.Columns.Add("CodigoAF")
dt.Columns.Add("CveAF")
- dt.Columns.Add("SerieLote", Type.GetType("System.String"))
+ dt.Columns.Add("Serie", Type.GetType("System.String"))
dt.Columns.Add("Lote", Type.GetType("System.String"))
dt.Columns.Add("Observaciones")
@@ -860,9 +860,9 @@ Partial Class Inventarios_RecepcionUsados
#End Region
#Region " AGREGAR - GUARDAR "
- Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Double
+ Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Double
Dim Inv As New ClsInventarios
- Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), SerieLote:=SerieLote, Lote:=Lote, FechaCaducidad:=FechaCaducidad)
+ Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad)
Inv.Dispose()
Return Existencia
End Function
@@ -884,7 +884,7 @@ Partial Class Inventarios_RecepcionUsados
End If
AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedItem.Text, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble, PU,
- "", "-1", "-1", "-1", TxtObservacionesdetalle.Text, "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", HdnCveTamaño.Value.ToEntero)
+ "", "-1", "-1", "-1", TxtObservacionesdetalle.Text, "", -1, "", "", HdnCveTamaño.Value.ToEntero)
LimpiarAgregar()
txtCantidad.Text = ""
@@ -901,8 +901,8 @@ Partial Class Inventarios_RecepcionUsados
End Sub
- Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, SerieLote As String, CodigoAF As String, Codigo As String,
- CveAF As String, Observaciones As String, Lote As String, Batch As String, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Tamaño As String, CveTamaño As Integer)
+ Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, Serie As String, CodigoAF As String, Codigo As String,
+ CveAF As String, Observaciones As String, Lote As String, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Tamaño As String, CveTamaño As Integer)
'If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub
@@ -940,8 +940,8 @@ Partial Class Inventarios_RecepcionUsados
End If
'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS
- If SerieLote <> "" And (SerieLote.ToUpper = dr("Codigo").ToString.ToUpper Or SerieLote.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then
- Alert($"La serie indicada {SerieLote} coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
+ If Serie <> "" And (Serie.ToUpper = dr("Codigo").ToString.ToUpper Or Serie.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then
+ Alert($"La serie indicada {Serie} coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
@@ -964,7 +964,7 @@ Partial Class Inventarios_RecepcionUsados
registro.Item("CodigoAF") = CodigoAF
registro.Item("Codigo") = Codigo
registro.Item("CveAF") = CveAF
- registro.Item("SerieLote") = If(SerieLote <> "", SerieLote, "")
+ registro.Item("Serie") = If(Serie <> "", Serie, "")
registro.Item("Lote") = If(Lote <> "", Lote, "")
registro.Item("Observaciones") = Observaciones
@@ -1000,7 +1000,7 @@ Partial Class Inventarios_RecepcionUsados
DtMovimientos.Rows(IndexDTUsado)("CodigoAF") = CodigoAF
DtMovimientos.Rows(IndexDTUsado)("Codigo") = Codigo
DtMovimientos.Rows(IndexDTUsado)("CveAF") = CveAF
- DtMovimientos.Rows(IndexDTUsado)("SerieLote") = If(SerieLote <> "", SerieLote, "")
+ DtMovimientos.Rows(IndexDTUsado)("Serie") = If(Serie <> "", Serie, "")
DtMovimientos.Rows(IndexDTUsado)("Lote") = If(Lote <> "", Lote, "")
DtMovimientos.Rows(IndexDTUsado)("Observaciones") = Observaciones
@@ -1121,7 +1121,7 @@ Partial Class Inventarios_RecepcionUsados
ImporteConcepto = Dr("PU").ToString.ToDecimal
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, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Mensaje = "Error al guardar los movimientos"
ErrorMovInv = True
Exit For
@@ -1253,7 +1253,7 @@ Partial Class Inventarios_RecepcionUsados
End Sub
- Private Sub GuardaCodigoSerie(Cantidad As Double, CvePS As Integer, CveUM As Integer, CostoPromedio As Decimal, Optional SerieLote As String = "-1")
+ Private Sub GuardaCodigoSerie(Cantidad As Double, CvePS As Integer, CveUM As Integer, CostoPromedio As Decimal, Optional Serie As String = "-1")
Dim ObjInv As New ClsInventarios
If CveMovimiento <= 0 Then
@@ -1261,7 +1261,7 @@ Partial Class Inventarios_RecepcionUsados
-1, -1, -1, -1, Modulo:="RU/G")
End If
- ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, Serie:=SerieLote)
+ ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, Serie:=Serie)
ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
DtMovimientos = ObjInv.DtResultados.FiltraParametros("", "CveMovimientoDetalle DESC").AsEnumerable.Take(25).CopyToDataTable
ObjInv.Dispose()
@@ -1359,7 +1359,7 @@ Partial Class Inventarios_RecepcionUsados
'Dim TienePermisoImportes = UsuarioActual.TienePermisoProceso(201)
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
- If DtTemp.MAX("SerieLote").ToString <> "" Then
+ If DtTemp.MAX("Serie").ToString <> "" Then
End If
If DtTemp.MAX("Lote").ToString <> "" Then
@@ -1398,7 +1398,7 @@ Partial Class Inventarios_RecepcionUsados
Dim Precio As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDouble
Dim No As Integer = GvM.Rows(e.RowIndex).DataKey("No").ToEntero
- Dim serielote As String = GvM.Rows(e.RowIndex).FCTextBox("TxtSerieLote").Text.Replace(" ", String.Empty)
+ Dim serie As String = GvM.Rows(e.RowIndex).FCTextBox("TxtSerie").Text.Replace(" ", String.Empty)
Dim Observaciones As String = GvM.Rows(e.RowIndex).FCTextBox("TxtObservaciones").Text
Dim CveSeccionAlmacen As Integer = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero
Dim SeccionAlmacen As String = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedItem.Text
@@ -1408,7 +1408,7 @@ Partial Class Inventarios_RecepcionUsados
Drs(0)("PU") = Precio
Drs(0)("Total") = Drs(0)("Cantidad").ToString.ToDouble * Precio
Drs(0)("Estatus") = "U"
- Drs(0)("SerieLote") = serielote
+ Drs(0)("Serie") = serie
Drs(0)("Observaciones") = Observaciones
Drs(0)("CveSeccionAlmacen") = CveSeccionAlmacen
Drs(0)("SeccionAlmacen") = SeccionAlmacen
@@ -1999,7 +1999,7 @@ Partial Class Inventarios_RecepcionUsados
Dim Cantidad As Double = RowUsado("Cantidad").ToString().ToEntero()
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
- AddNew(CvePS, PS, CveUM, UM, Cantidad, PU, "", "-1", "-1", "-1", "", "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", CveTamaño)
+ AddNew(CvePS, PS, CveUM, UM, Cantidad, PU, "", "-1", "-1", "-1", "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", CveTamaño)
Next
End If
@@ -2150,7 +2150,7 @@ Partial Class Inventarios_RecepcionUsados
Private Function AddPSRNC(ByRef TmpDT As DataTable, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
PU As Decimal, Descuento As Decimal,
CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
- Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
+ Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False, Optional PorcentajeIVA As Decimal = 0D, Optional CveTamaño As Integer = 0) As Boolean
@@ -2176,7 +2176,7 @@ Partial Class Inventarios_RecepcionUsados
Row("Proyecto") = Proyecto
Row("CveSubProyecto") = CveSubProyecto
Row("SubProyecto") = SubProyecto
- Row("SerieLote") = SerieLote
+ Row("Serie") = Serie
Row("TiempoEntrega") = TiempoEntrega
Row("Orden") = TmpDT.Rows.Count + 1
Row("Cantidad") = Cantidad
@@ -2293,7 +2293,7 @@ Partial Class Inventarios_RecepcionUsados
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
- TmpDT.Columns.Add("SerieLote", GetType(String))
+ TmpDT.Columns.Add("Serie", GetType(String))
TmpDT.Columns.Add("CuentaPredial", GetType(String))
TmpDT.Columns.Add("Obs", GetType(String))
TmpDT.Columns.Add("TiempoEntrega", GetType(String))
@@ -2763,7 +2763,7 @@ Partial Class Inventarios_RecepcionUsados
drTamañoPS = ObjPS.DtResultados.FiltroPrimero("")
'CveTamaño = -1 'limpio esta variable para que no se registre dos veces en la clase Modelos
AddNew(drTamañoPS.Item("CvePS").ToString.ToEntero, drTamañoPS.Item("PSCodigo").ToString, drTamañoPS.Item("CveUM").ToString.ToEntero, drTamañoPS.Item("UnidadMedida").ToString, 1.0, Importe,
- "", "-1", "-1", "-1", "", "", "", -1, "", "", CveTamaño)
+ "", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño)
End If
Else
diff --git a/Inventarios/RepApartados.aspx b/Inventarios/RepApartados.aspx
index 57ed9337b..6cb599ee9 100644
--- a/Inventarios/RepApartados.aspx
+++ b/Inventarios/RepApartados.aspx
@@ -102,7 +102,7 @@
-
+
diff --git a/Inventarios/RepApartados2.aspx b/Inventarios/RepApartados2.aspx
index 4075ec211..aecae7b73 100644
--- a/Inventarios/RepApartados2.aspx
+++ b/Inventarios/RepApartados2.aspx
@@ -1,4 +1,4 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepApartados2.aspx.vb" Inherits="Inventarios_RepApartados" %>
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepApartados2.aspx.vb" Inherits="Inventarios_RepApartados2" %>
@@ -110,7 +110,7 @@
<%----%>
<%--
- --%>
+ %>
diff --git a/Inventarios/RepApartados2.aspx.vb b/Inventarios/RepApartados2.aspx.vb
index fc3e8cf14..7c991c56b 100644
--- a/Inventarios/RepApartados2.aspx.vb
+++ b/Inventarios/RepApartados2.aspx.vb
@@ -5,7 +5,7 @@ Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
-Partial Class Inventarios_RepApartados
+Partial Class Inventarios_RepApartados2
Inherits ClsPaginas
diff --git a/Inventarios/RepTraspasoAlmacen.aspx b/Inventarios/RepTraspasoAlmacen.aspx
index 2a68e5765..fb7c223f9 100644
--- a/Inventarios/RepTraspasoAlmacen.aspx
+++ b/Inventarios/RepTraspasoAlmacen.aspx
@@ -210,7 +210,7 @@
-
+
diff --git a/Inventarios/ReporteMaterial.aspx b/Inventarios/ReporteMaterial.aspx
index dec42c127..17906ae3a 100644
--- a/Inventarios/ReporteMaterial.aspx
+++ b/Inventarios/ReporteMaterial.aspx
@@ -91,7 +91,7 @@
-
+
@@ -117,7 +117,7 @@
Text='<%# Eval("Folio").ToString %>' />
-
+
diff --git a/Inventarios/ResguardoMaterial.aspx b/Inventarios/ResguardoMaterial.aspx
index b1085efd1..05c36bef0 100644
--- a/Inventarios/ResguardoMaterial.aspx
+++ b/Inventarios/ResguardoMaterial.aspx
@@ -208,7 +208,7 @@
Clasificación
Producto
U.M.
-
Serie - Lote
+
Serie - Lote
Observaciones
@@ -238,8 +238,8 @@
-
-
+
+
@@ -263,13 +263,13 @@
-
+
-
+
@@ -454,7 +454,7 @@
-
+
<%-- --%>
@@ -471,7 +471,7 @@
-
+
diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb
index 054faab06..aad0f3987 100644
--- a/Inventarios/ResguardoMaterial.aspx.vb
+++ b/Inventarios/ResguardoMaterial.aspx.vb
@@ -200,7 +200,7 @@ Partial Class Inventarios_ResguardoMaterial
dt.Columns.Add("PS")
dt.Columns.Add("Estatus")
dt.Columns.Add("Codigo")
- dt.Columns.Add("SerieLote")
+ dt.Columns.Add("Serie")
dt.Columns.Add("Observaciones")
dt.Columns.Add("CvePersonal", Type.GetType("System.Int32"))
dt.Columns.Add("Checado", Type.GetType("System.Boolean"))
@@ -347,12 +347,12 @@ Partial Class Inventarios_ResguardoMaterial
Private Sub VerificaProducto()
If DdlProducto2.SelectedValue.ToEntero > 0 Then
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltraParametros("Inv_CveMetodoInventario = 5", "PS").Rows.Count > 0 Then
- ThSerieLote.Visible = True
- TrSerieLote.Visible = True
- TxtnSerieLote.Visible = True
+ ThSerie.Visible = True
+ TrSerie.Visible = True
+ TxtnSerie.Visible = True
GvM.Columns(4).Visible = True
Else
- TxtnSerieLote.Visible = False
+ TxtnSerie.Visible = False
End If
End If
@@ -380,9 +380,9 @@ Partial Class Inventarios_ResguardoMaterial
#Region " EISTENCIAS "
- Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1") As Double
+ Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional Serie As String = "-1") As Double
Dim Inv As New ClsInventarios
- Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=SerieLote)
+ Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie)
Inv.Dispose()
Return Existencia
End Function
@@ -398,15 +398,15 @@ Partial Class Inventarios_ResguardoMaterial
Dim PSSelected As Integer = DdlProducto2.SelectedValue.ToEntero
If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgInformacion) : Exit Sub
If PSSelected > 0 Then
- If TxtnSerieLote.Visible Then
- If TxtnSerieLote.Text = "" Then
+ If TxtnSerie.Visible Then
+ If TxtnSerie.Text = "" Then
Alert("Serie-Lote es necesario", TipoMensaje.MsgAdvertencia)
Return
End If
End If
Dim Valido As Boolean = True
Dim cantidadd As Double = txtCantidad.Text.ToDouble
- Dim Existencia As Double = GetExistencias(PSSelected, DdlUnidad.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1").ToString)
+ Dim Existencia As Double = GetExistencias(PSSelected, DdlUnidad.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1").ToString)
If Existencia - txtCantidad.Text.ToDouble < 0 Then
If Existencia <= 0 Then
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
@@ -431,7 +431,7 @@ Partial Class Inventarios_ResguardoMaterial
registro.Item("CvePS") = PSSelected
registro.Item("PS") = DdlProducto2.SelectedText
registro.Item("Estatus") = ""
- registro.Item("SerieLote") = TxtnSerieLote.Text
+ registro.Item("Serie") = TxtnSerie.Text
registro.Item("Observaciones") = TxtObservacionesdetalle.Text
DtMovimientos.Rows.Add(registro)
CargaGvM()
@@ -453,14 +453,14 @@ Partial Class Inventarios_ResguardoMaterial
#Region " GvM "
Private Sub CargaGvM()
- ThSerieLote.Visible = False
- TrSerieLote.Visible = False
- TxtnSerieLote.Visible = False
+ ThSerie.Visible = False
+ TrSerie.Visible = False
+ TxtnSerie.Visible = False
GvM.Columns(4).Visible = False
For Each Dr As DataRow In DtMovimientos.Rows
- If Dr("SerieLote").ToString <> "" Then
- ThSerieLote.Visible = True
- TrSerieLote.Visible = True
+ If Dr("Serie").ToString <> "" Then
+ ThSerie.Visible = True
+ TrSerie.Visible = True
GvM.Columns(4).Visible = True
Exit For
End If
@@ -670,8 +670,8 @@ Partial Class Inventarios_ResguardoMaterial
Dim Existencia As Double
TextoExistencia.Append("Los siguiente productos se ajustaron por falta de exitencia: ")
For Each dr As DataRow In DtMovimientos.Rows
- Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=If(dr("SerieLote").ToString = "", "-1", dr("SerieLote").ToString))
- Existencia -= DtMovimientos.SUM("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("SerieLote").ToString <> "-1", $" AND SerieLote = '{dr("SerieLote").ToString}'", "")}")
+ Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), Serie:=If(dr("Serie").ToString = "", "-1", dr("Serie").ToString))
+ Existencia -= DtMovimientos.SUM("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("Serie").ToString <> "-1", $" AND Serie = '{dr("Serie").ToString}'", "")}")
If Existencia < 0 Then
ErrorExistencia = True
diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx
index 9804276ea..785ef1ff6 100644
--- a/Inventarios/TraspasoAlmacen.aspx
+++ b/Inventarios/TraspasoAlmacen.aspx
@@ -119,14 +119,14 @@
-
+
-
+
@@ -376,10 +376,11 @@
Producto
Observaciones
-
Serie - Lote
-
Lote
-
Batch
Sección Almacen
+
Serie
+
Lote
+
Caducidad
+
Comandos
@@ -414,17 +415,25 @@
-
+
+
+
+
+ Destino:
+
+
+
+
-
+
-
-
+
+
@@ -434,7 +443,7 @@
-
+
@@ -448,12 +457,12 @@
-
+
-
+
- s
+
@@ -631,7 +640,7 @@
-
+
<%--
@@ -651,10 +660,14 @@
-
+
+
+
- sss
+
+
+
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index 9c4c0a6e4..0d8762b4d 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -54,20 +54,20 @@ Partial Class Inventarios_TraspasoAlmacen
ViewState("CveUsuarioResponsable") = value
End Set
End Property
- Private Property CvePSSerieLote As Integer
+ Private Property CvePSSerie As Integer
Get
- Return CType(ViewState("CvePSSerieLote"), Integer)
+ Return CType(ViewState("CvePSSerie"), Integer)
End Get
Set(value As Integer)
- ViewState("CvePSSerieLote") = value
+ ViewState("CvePSSerie") = value
End Set
End Property
- Private Property CveUMSerieLote As Integer
+ Private Property CveUMSerie As Integer
Get
- Return CType(ViewState("CveUMSerieLote"), Integer)
+ Return CType(ViewState("CveUMSerie"), Integer)
End Get
Set(value As Integer)
- ViewState("CveUMSerieLote") = value
+ ViewState("CveUMSerie") = value
End Set
End Property
Private Property CargadoDeMov As Boolean
@@ -246,7 +246,11 @@ Partial Class Inventarios_TraspasoAlmacen
dt.Columns.Add("CveAF", Type.GetType("System.Int32"))
dt.Columns.Add("PS")
dt.Columns.Add("Observaciones")
- dt.Columns.Add("SerieLote")
+ dt.Columns.Add("CveSeccionAlmacen", Type.GetType("System.Int32"))
+ dt.Columns.Add("SeccionAlmacen")
+ dt.Columns.Add("CveSeccionAlmacenDestino", Type.GetType("System.Int32"))
+ dt.Columns.Add("SeccionAlmacenDestino")
+ dt.Columns.Add("Serie")
dt.Columns.Add("Lote")
dt.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
@@ -313,7 +317,7 @@ Partial Class Inventarios_TraspasoAlmacen
'End If
If Mov.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
- DtMovimientos = Mov.DtResultados.DefaultView.ToTable("Cantidad, CveUM, CvePS, CveAF, PS, SerieLote, CveClasificacion, EstatusExistencia")
+ DtMovimientos = Mov.DtResultados.DefaultView.ToTable("Cantidad, CveUM, CvePS, CveAF, PS, Serie, CveClasificacion, EstatusExistencia")
CargaGvDatos()
End If
@@ -454,19 +458,7 @@ Partial Class Inventarios_TraspasoAlmacen
End If
End Sub
- Protected Sub DdlAlmacenOrigen_SelectedIndexChanged(sender As Object, e As EventArgs)
- If UsuarioActual.Empresa.Funcionalidad(141) = "1" Then
- CargaExistenciasSucursal()
- End If
- End Sub
- Protected Sub DdlAlmacenDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
- If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}").ToString.ToEntero = 21 Then
- ChkTransitorio.Checked = False
- ChkTransitorio.Enabled = False
- Else
- ChkTransitorio.Enabled = True
- End If
- End Sub
+
Private Sub CargaExistenciasSucursal()
DdlProducto2.Attributes.Remove("Data-cvesubproyecto")
DdlProducto2.Attributes.Add("Data-cvesubproyecto", GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}"))
@@ -492,10 +484,10 @@ Partial Class Inventarios_TraspasoAlmacen
Dim FuncionalidadSinSerie = True
If CveProducto > 0 Then
- If TxtnSerieLote.Visible Then
+ If TxtnSerie.Visible Then
Cantidad = 1
- If TxtnSerieLote.Text = "" Then
- Alert("Serie-Lote es necesario", TipoMensaje.MsgAdvertencia)
+ If TxtnSerie.Text = "" Then
+ Alert("Serie es necesario", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
Exit Sub
End If
@@ -515,23 +507,33 @@ Partial Class Inventarios_TraspasoAlmacen
End If
End If
- Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, -1, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1"), If(TxtnLote.Visible, TxtnLote.Text, "-1"), MinFecha)
+ Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1"), If(TxtnLote.Visible, TxtnLote.Text, "-1"), If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha))
If Valido Then
- AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, ""), If(TxtnLote.Visible, TxtnLote.Text, ""), If(TxtnBatch.Visible, TxtnBatch.Text, ""), FuncionalidadSinSerie)
+ AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(TxtnLote.Visible, TxtnLote.Text, ""), FechaCaducidad:=If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha), CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie)
End If
End If
End Sub
- Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, CveSeccionAlmacen As Integer, SerieLote As String, Lote As String, Fechacaducidad As Date) As Boolean
+ Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, CveSeccionAlmacen As Integer, Serie As String, Lote As String, FechaCaducidad As Date) As Boolean
Dim Retorno = True
+ Dim ExistenciaEspecificada As Decimal
+ Dim CantidadEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(Serie <> "-1", $" AND Serie = '{Serie}'", "")}")
+
Dim Inv As New ClsInventarios
- Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=SerieLote, Lote:=Lote, FechaCaducidad:=Fechacaducidad, PendientePorSurtir:=1)
+ Dim Existencia As Decimal = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1)
+ 'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
+ 'las segunda consulta, que tenga existencia, ya con los parametros especificos
+ If FechaCaducidad > MinFecha OrElse Serie <> "" OrElse Lote <> "" Then
+ ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
+ Else
+ ExistenciaEspecificada = Existencia
+ End If
Inv.Dispose()
- If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(SerieLote <> "-1", $" AND SerieLote = '{SerieLote}'", "")}") < 0 Then
- If Existencia < 0 Then
+ If Existencia - Cantidad - CantidadEnGrid < 0 ORELSE ExistenciaEspecificada - Cantidad - CantidadEnGrid < 0 Then
+ If Existencia < 0 OrElse ExistenciaEspecificada < 0 Then
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
Else
@@ -543,7 +545,7 @@ Partial Class Inventarios_TraspasoAlmacen
Return Retorno
End Function
- Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional SerieLote As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha, Optional Limpia As Boolean = True)
+ Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional CveSeccionAlmacen As Integer = -1, Optional SeccionAlmacen As String = "", Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha, Optional Limpia As Boolean = True, Optional CveSeccionAlmacenDestino As Integer = -1)
If Cantidad <= 0 Then
Alert("La cantidad debe ser mayor a cero (0). Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
@@ -564,12 +566,15 @@ Partial Class Inventarios_TraspasoAlmacen
registro.Item("CvePS") = CvePS
registro.Item("PS") = DrPS("PSCodigo")
registro.Item("Observaciones") = Observaciones
- registro.Item("SerieLote") = SerieLote
+ registro.Item("Serie") = Serie
registro.Item("Lote") = Lote
- registro.Item("FechaCaducidad") = FechaCaducidad
+ If FechaCaducidad > MinFecha Then registro.Item("FechaCaducidad") = FechaCaducidad
registro.Item("CveClasificacion") = CveClasificacion
registro.Item("CveAF") = -1
registro.Item("EstatusExistencia") = "1"
+ registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
+ registro.Item("SeccionAlmacen") = SeccionAlmacen
+ registro.Item("CveSeccionAlmacenDestino") = CveSeccionAlmacenDestino
registro.Item("TotalImporte") = 0
registro.Item("PU") = 0
@@ -591,8 +596,8 @@ Partial Class Inventarios_TraspasoAlmacen
LimpiaAgregar()
Else
txtCantidad.Text = (txtCantidad.Text.ToDouble - 1.0).ToString
- TxtnSerieLote.Text = ""
- TxtnSerieLote.Focus()
+ TxtnSerie.Text = ""
+ TxtnSerie.Focus()
End If
End Sub
@@ -601,10 +606,10 @@ Partial Class Inventarios_TraspasoAlmacen
DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty)
txtCantidad.Text = ""
TxtnObservaciones.Text = ""
- TxtnSerieLote.Text = ""
- TxtnSerieLote.Visible = False
+ TxtnSerie.Text = ""
+ TxtnSerie.Visible = False
TxtnLote.Text = ""
- TxtnBatch.Text = ""
+ TxtnFechaCaducidad.Text = ""
txtCantidad.Focus()
If TxtCodigoPS.Visible Then
@@ -686,15 +691,33 @@ Partial Class Inventarios_TraspasoAlmacen
'VALIDA LA EXISTENCIA DEL ALMACEN DE ORIGEN
Dim ErrorExistencia = False
+ Dim Serie, Lote As String
+ Dim CveSeccionAlmacen As Integer
+ Dim FechaCaducidad As Date
+
Dim TextoExistencia As StringBuilder = New StringBuilder
Dim Existencia As Double
- TextoExistencia.Append("Los siguiente productos se ajustaron por falta de exitencia: ")
+ Dim CantidadenGrid As Decimal
+ TextoExistencia.Append("Los siguiente productos se ajustaron por falta de existencia: ")
If Not CargadoDeMov Then
For Each dr As DataRow In DtMovimientos.Rows
- Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=If(dr("SerieLote").ToString = "", "-1", dr("SerieLote").ToString), PendientePorSurtir:=1)
- Existencia -= DtMovimientos.SUM("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("SerieLote").ToString <> "-1", $" AND SerieLote = '{dr("SerieLote").ToString}'", "")}")
+ CveSeccionAlmacen = If(dr("CveSeccionAlmacen").ToString = "", -1, dr("CveSeccionAlmacen").ToString.ToEntero)
+ Serie = If(dr("Serie").ToString = "", "-1", dr("Serie").ToString)
+ Lote = If(dr("Lote").ToString = "", "-1", dr("Lote").ToString)
+ FechaCaducidad = If(dr("FechaCaducidad").ToString = "", MinFecha, dr("FechaCaducidad").ToString.ToDate)
+
+ Dim ExistenciaEspecificada As Decimal = 0
+ CantidadenGrid = DtMovimientos.SUMD("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("Serie").ToString <> "-1", $" AND Serie = '{dr("Serie").ToString}'", "")}")
+ Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
+ Existencia -= CantidadenGrid
'DtMovimientos.SUM("Cantidad", String.Format("CvePS = {0}", dr("CvePS").ToString.ToEntero))
+ 'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
+ 'las segunda consulta, que tenga existencia, ya con los parametros especificos
+ If FechaCaducidad > MinFecha OrElse (Lote <> "-1" AndAlso Lote <> "") Then
+ ExistenciaEspecificada = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
+ Existencia = ExistenciaEspecificada - CantidadenGrid
+ End If
If Existencia < 0 Then
ErrorExistencia = True
@@ -709,7 +732,12 @@ Partial Class Inventarios_TraspasoAlmacen
Next
Else
For Each gvr As GridViewRow In GvDatos.Rows
- Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=If(gvr.DataKey("SerieLote").ToString = "", "-1", gvr.DataKey("SerieLote").ToString), PendientePorSurtir:=1)
+ CveSeccionAlmacen = If(gvr.DataKey("CveSeccionAlmacen") = "", -1, gvr.DataKey("CveSeccionAlmacen").ToEntero)
+ Serie = If(gvr.DataKey("Serie") = "", "-1", gvr.DataKey("Serie"))
+ Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
+ FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
+
+ Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero
If Existencia < 0 Then
ErrorExistencia = True
@@ -772,7 +800,7 @@ Partial Class Inventarios_TraspasoAlmacen
Else
Dim Cont As Integer = 0
For Each Dr As DataRow In DtMovimientos.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For
@@ -827,7 +855,7 @@ Partial Class Inventarios_TraspasoAlmacen
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim Cont As Integer = 0
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacenDestino").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Observaciones:=Dr("Observaciones").ToString) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
Exit For
@@ -1004,7 +1032,7 @@ Partial Class Inventarios_TraspasoAlmacen
Else
For Each Dr As DataRow In DtMovimientos.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For
@@ -1123,30 +1151,39 @@ Partial Class Inventarios_TraspasoAlmacen
ElProductoChange()
End Sub
Private Sub ElProductoChange()
- TxtnSerieLote.Visible = False
+ TxtnSerie.Visible = False
TxtnLote.Visible = False
- TxtnBatch.Visible = False
-
- EscondeColumnasGVM(DtMovimientos)
+ TxtnFechaCaducidad.Visible = False
If DdlProducto2.SelectedValue.ToEntero > 0 Then
- If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltraParametros("Inv_CveMetodoInventario = 5 ", "PS").Rows.Count > 0 Then
- ThSerieLote.Visible = True
- TdSerieLote.Visible = True
- TxtnSerieLote.Visible = True
- GvDatos.Columns(5).Visible = True
- End If
- If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltraParametros("Inv_CveMetodoInventario = 6", "PS").Rows.Count > 0 Then
- TxtnLote.Visible = True
- ThLote.Visible = True
- TdLote.Visible = True
- GvDatos.Columns(6).Visible = True
+ Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("", "PS")
+ If drP IsNot Nothing Then
+
+ ThSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
+ TdSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
+ DdlSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
+ 'GvDatos.Columns(5).Visible = CBool(drP("AplicaSeccion"))
+
+
+ ThSerie.Visible = CBool(drP("AplicaSerie"))
+ TdSerie.Visible = CBool(drP("AplicaSerie"))
+ TxtnSerie.Visible = CBool(drP("AplicaSerie"))
+ 'GvDatos.Columns(6).Visible = CBool(drP("AplicaSerie"))
+
+
+ TxtnLote.Visible = CBool(drP("AplicaLote"))
+ ThLote.Visible = CBool(drP("AplicaLote"))
+ TdLote.Visible = CBool(drP("AplicaLote"))
+ 'GvDatos.Columns(7).Visible = CBool(drP("AplicaLote"))
+
+
+ TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
+ ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
+ TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
+ 'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad"))
- TxtnBatch.Visible = True
- ThBatch.Visible = True
- TdBatch.Visible = True
- GvDatos.Columns(7).Visible = True
End If
+
End If
DdlUnidad.Items.Clear()
@@ -1190,44 +1227,54 @@ Partial Class Inventarios_TraspasoAlmacen
End Sub
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
- TxtnSerieLote.Visible = False
- ThSerieLote.Visible = False
- TdSerieLote.Visible = False
- GvDatos.Columns(5).Visible = False
- TxtnLote.Visible = False
- ThLote.Visible = False
- TdLote.Visible = False
- GvDatos.Columns(6).Visible = False
+ GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
+ GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
+ GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
+ GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
- TxtnBatch.Visible = False
- ThBatch.Visible = False
- TdBatch.Visible = False
- GvDatos.Columns(7).Visible = False
+ ''TxtnSerie.Visible = False
+ ''ThSerie.Visible = False
+ ''TdSerie.Visible = False
+ 'GvDatos.Columns(5).Visible = False
- If DtTemp.MAX("SerieLote").ToString <> "" Then
- TxtnSerieLote.Visible = True
- ThSerieLote.Visible = True
- TdSerieLote.Visible = True
- GvDatos.Columns(5).Visible = True
- End If
- If DtTemp.MAX("Lote").ToString <> "" Then
- TxtnLote.Visible = True
- ThLote.Visible = True
- TdLote.Visible = True
- GvDatos.Columns(6).Visible = True
+ 'TxtnLote.Visible = False
+ 'ThLote.Visible = False
+ 'TdLote.Visible = False
+ 'GvDatos.Columns(6).Visible = False
+
+ 'TxtnFechaCaducidad.Visible = False
+ 'ThFechaCaducidad.Visible = False
+ 'TdFechaCaducidad.Visible = False
+ 'GvDatos.Columns(7).Visible = False
+
+
+ 'If DtTemp.MAX("Serie").ToString <> "" Then
+ ' TxtnSerie.Visible = True
+ ' ThSerie.Visible = True
+ ' TdSerie.Visible = True
+ ' GvDatos.Columns(5).Visible = True
+ 'End If
+ 'If DtTemp.MAX("Lote").ToString <> "" Then
+ ' TxtnLote.Visible = True
+ ' ThLote.Visible = True
+ ' TdLote.Visible = True
+ ' GvDatos.Columns(6).Visible = True
+ 'End If
+ 'If DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha Then
+ ' TxtnFechaCaducidad.Visible = True
+ ' ThFechaCaducidad.Visible = True
+ ' TdFechaCaducidad.Visible = True
+ ' GvDatos.Columns(7).Visible = True
+
+ 'End If
- TxtnBatch.Visible = True
- ThBatch.Visible = True
- TdBatch.Visible = True
- GvDatos.Columns(7).Visible = True
- End If
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.DBCampo("EstatusExistencia").ToEntero < 0 Then
+ If e.Row.DBCampo("EstatusExistencia").ToEntero <0 Then
e.Row.Cells(0).BackColor = Drawing.Color.Red
End If
@@ -1237,12 +1284,12 @@ Partial Class Inventarios_TraspasoAlmacen
e.Row.FCTextBox("TxtCantidad2").Attributes.Add("onblur", String.Format("ValidaCantidad(this,{0})", e.Row.DBCampo("Cantidad")))
End If
- 'If If(e.Row.DBCampo("SerieLote").ToString = "", "-1", e.Row.DBCampo("SerieLote").ToString) <> "-1" Then
- ' TxtnSerieLote.Visible = True
- ' ThSerieLote.Visible = True
- ' TdSerieLote.Visible = True
+ 'If If(e.Row.DBCampo("Serie").ToString = "", "-1", e.Row.DBCampo("Serie").ToString) <> "-1" Then
+ ' TxtnSerie.Visible = True
+ ' ThSerie.Visible = True
+ ' TdSerie.Visible = True
' GvDatos.Columns(4).Visible = True
- ' e.Row.Cells(4).Text = e.Row.DBCampo("SerieLote").ToString
+ ' e.Row.Cells(4).Text = e.Row.DBCampo("Serie").ToString
'Else
' e.Row.Cells(4).Text = ""
'End If
@@ -1301,12 +1348,12 @@ Partial Class Inventarios_TraspasoAlmacen
' Dim CveClasificacion = dr.FCDropDownList("DdlClasificacion").SelectedValue.ToEntero
' Dim CvePS = dr.FCDropDownList("DdlProducto").SelectedValue.ToEntero
' Dim No = dr.DataKey("No").ToEntero
- ' Dim SerieLote As String = dr.FCTextBox("TxtSerieLote").Text
+ ' Dim Serie As String = dr.FCTextBox("TxtSerie").Text
' 'VALIDA EXISTENCIA
' Dim Valido = True
' Dim Inv As New ClsInventarios
- ' Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, -1, TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), If(SerieLote = "", "-1", SerieLote))
+ ' Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, -1, TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), If(Serie = "", "-1", Serie))
' Inv.Dispose()
' If Existencia - txtCantidad.Text.ToDouble < 0 Then
@@ -1396,6 +1443,11 @@ Partial Class Inventarios_TraspasoAlmacen
If Dtt IsNot Nothing Then
GvDatosRecepcion.DataSource = Dtt
GvDatosRecepcion.DataBind()
+
+ GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("Serie") <> ""
+ GvDatosRecepcion.Columns(7).Visible = Dtt.MAX("Lote") <> ""
+ GvDatosRecepcion.Columns(8).Visible = Dtt.MAX("FechaCaducidad") <> ""
+ GvDatosRecepcion.Columns(9).Visible = Dtt.MAX("Serie") <> ""
'Dt.Dispose()
End If
@@ -1444,6 +1496,12 @@ Partial Class Inventarios_TraspasoAlmacen
Else
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", String.Format("ValidaCantidad(this,{0});", e.Row.DBCampo("Cantidad")))
+ If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenRecepcion.SelectedValue.ToEntero > 0 Then
+ e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
+ e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenRecepcion.SelectedValue.ToEntero)
+ e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
+ e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
+ End If
End If
'FUNCIONALIDAD PISTOLA DE CODIGOS
@@ -1515,7 +1573,7 @@ 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, SerieLote:=GvRow.DataKey("SerieLote").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, GvRow.DataKey("CveAF").ToEntero, -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
@@ -1692,7 +1750,7 @@ Partial Class Inventarios_TraspasoAlmacen
Exit For
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("PU").ToString.ToDecimal, gvr.DataKey("CveAF").ToString.ToEntero, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada, SerieLote:=gvr.DataKey("SerieLote").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("PU").ToString.ToDecimal, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For
@@ -1787,7 +1845,7 @@ Partial Class Inventarios_TraspasoAlmacen
' CostoIndirecto = ((Dr("Total").ToString.ToDouble * GastoIndirectoTotal) / Importe) / Dr("Cantidad").ToString.ToDouble
' End If
- ' If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CostoIndirecto:=CostoIndirecto) Then
+ ' If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("Serie").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CostoIndirecto:=CostoIndirecto) Then
' ErrorMovInv = True
' TextoError = "Ocurrió un error al guardar los movimientos de entrada"
' Exit For
@@ -1910,8 +1968,8 @@ Partial Class Inventarios_TraspasoAlmacen
If DrPS("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
TdSeriePS.Visible = True
TxtSeriePS.Focus()
- CvePSSerieLote = DrPS("CvePS").ToString.ToEntero
- CveUMSerieLote = DrPS("CveUnidadMedida").ToString.ToEntero
+ CvePSSerie = DrPS("CvePS").ToString.ToEntero
+ CveUMSerie = DrPS("CveUnidadMedida").ToString.ToEntero
Exit Sub
End If
@@ -1927,10 +1985,10 @@ Partial Class Inventarios_TraspasoAlmacen
txtCantidad.Text = "1"
- Dim Valido = ValidaExistencia(1, CvePSSerieLote, CveUMSerieLote, -1, TxtSeriePS.Text.Trim, "-1", MinFecha)
+ Dim Valido = ValidaExistencia(1, CvePSSerie, CveUMSerie, -1, TxtSeriePS.Text.Trim, "-1", MinFecha)
If Valido Then
- AgregarPS(1, CvePSSerieLote, CveUMSerieLote, TxtSeriePS.Text.Trim)
+ AgregarPS(1, CvePSSerie, CveUMSerie, TxtSeriePS.Text.Trim)
Else
TxtSeriePS.Text = ""
TxtSeriePS.Focus()
@@ -1960,7 +2018,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim TxtCantidad = GvDatosRecepcion.Rows(Gvr.RowIndex).FCTextBox("TxtCantidad")
If Gvr.DataKey("Cantidad").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
- If Gvr.DataKey("AplicaSerieLote") = "True" Then
+ If Gvr.DataKey("AplicaSerie") = "True" Then
TdSeriePSRecepcion.Visible = True
TxtSeriePSRecepcion.Focus()
Exit Sub
@@ -1996,7 +2054,7 @@ Partial Class Inventarios_TraspasoAlmacen
End If
For Each Gvr As GridViewRow In GvDatosRecepcion.Rows
- If Gvr.DataKey("CodigoBarras") = TxtCodigoPSRecepcion.Text.Trim And Gvr.DataKey("SerieLote") = TxtSeriePSRecepcion.Text.Trim Then
+ If Gvr.DataKey("CodigoBarras") = TxtCodigoPSRecepcion.Text.Trim And Gvr.DataKey("Serie") = TxtSeriePSRecepcion.Text.Trim Then
Dim TxtCantidad = GvDatosRecepcion.Rows(Gvr.RowIndex).FCTextBox("TxtCantidad")
If Gvr.DataKey("Cantidad").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
@@ -2489,7 +2547,7 @@ Partial Class Inventarios_TraspasoAlmacen
DtExcel.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
DtExcel.Columns.Add(New DataColumn("Codigo", GetType(String)))
DtExcel.Columns.Add(New DataColumn("Producto", GetType(String)))
- DtExcel.Columns.Add(New DataColumn("SerieLote", GetType(String)))
+ DtExcel.Columns.Add(New DataColumn("Serie", GetType(String)))
DtExcel.Columns.Add(New DataColumn("Observaciones", GetType(String)))
DtExcel.TableName = "Traspaso"
@@ -2544,8 +2602,8 @@ Partial Class Inventarios_TraspasoAlmacen
Alert("El nombre de la tercera columna debe ser 'Producto'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
- If Not dt.Columns(3).ColumnName = "SerieLote" Then
- Alert("El nombre de la cuarta columna debe ser 'SerieLote'. Favor de corregirlo", TipoMensaje.MsgError)
+ If Not dt.Columns(3).ColumnName = "Serie" Then
+ Alert("El nombre de la cuarta columna debe ser 'Serie'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
If Not dt.Columns(4).ColumnName = "Observaciones" Then
@@ -2557,7 +2615,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim ProductosNoCargados As New StringBuilder()
Dim RowsCargados As Integer = 0
Dim RowsNoCargados As Integer = 0
- Dim NoPSConSerieLote As Integer = 0
+ Dim NoPSConSerie As Integer = 0
Try
Dim DtPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa)
For Each RowExcel As DataRow In dt.Rows
@@ -2570,7 +2628,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim CveUnidadMedida As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
- Dim SerieLote As String = RowExcel("SerieLote").ToString()
+ Dim Serie As String = RowExcel("Serie").ToString()
Dim Observaciones As String = RowExcel("Observaciones").ToString()
Dim FechaCaducidad As Date = MinFecha
Dim Lote As String = "-1"
@@ -2581,14 +2639,14 @@ Partial Class Inventarios_TraspasoAlmacen
Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero()
- If CveMetodoInventario = 5 And (String.IsNullOrEmpty(SerieLote.Trim()) OrElse SerieLote = "-1") Then
+ If CveMetodoInventario = 5 And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
Valido = False
- Alert($"El producto '{RowPS("PS")}' requiere 'SerieLote'", TipoMensaje.MsgAdvertencia)
+ Alert($"El producto '{RowPS("PS")}' requiere 'Serie'", TipoMensaje.MsgAdvertencia)
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
End If
- If CveMetodoInventario = 5 AndAlso Not String.IsNullOrEmpty(SerieLote.Trim()) Then
- NoPSConSerieLote = NoPSConSerieLote + 1
+ If CveMetodoInventario = 5 AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then
+ NoPSConSerie = NoPSConSerie + 1
End If
If Valido AndAlso (Cantidad > 0 AndAlso RowPS("VentaMinima").ToString.ToDecimal > 0) Then
@@ -2599,11 +2657,11 @@ Partial Class Inventarios_TraspasoAlmacen
End If
If Valido Then
- Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, -1, If(Not String.IsNullOrEmpty(SerieLote), SerieLote, "-1"), Lote, FechaCaducidad)
+ Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, -1, If(Not String.IsNullOrEmpty(Serie), Serie, "-1"), Lote, FechaCaducidad)
End If
If Valido Then
- AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, If(Not String.IsNullOrEmpty(SerieLote), SerieLote, ""), "", "", False)
+ AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Limpia:=False)
RowsCargados = RowsCargados + 1
Else
RowsNoCargados = RowsNoCargados + 1
@@ -2620,10 +2678,10 @@ Partial Class Inventarios_TraspasoAlmacen
OnError("Ocurrió un error al cargar los productos." & ProductosNoCargados.ToString(), ex)
Finally
- If NoPSConSerieLote > 0 Then
- ThSerieLote.Visible = True
- TdSerieLote.Visible = True
- TxtnSerieLote.Visible = True
+ If NoPSConSerie > 0 Then
+ ThSerie.Visible = True
+ TdSerie.Visible = True
+ TxtnSerie.Visible = True
GvDatos.Columns(5).Visible = True
End If
@@ -2726,4 +2784,32 @@ Partial Class Inventarios_TraspasoAlmacen
TxtEspecifUnidad.Text = DtCamiones.FiltroPrimeroValor("Especificacion", String.Format("CveCamion = {0}", DdlUnidadCamion.SelectedValue))
End If
End Sub
+
+ Protected Sub DdlAlmacenOrigen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacenOrigen.SelectedIndexChanged
+ If UsuarioActual.Empresa.Funcionalidad(141) = "1" Then
+ CargaExistenciasSucursal()
+ End If
+ If DdlAlmacenOrigen.SelectedValue.ToEntero > 0 Then
+ DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero)
+ DdlSeccionAlmacen.DataBind()
+ DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ UpDatos.Update()
+ End If
+ End Sub
+
+ Protected Sub DdlAlmacenDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacenDestino.SelectedIndexChanged
+
+ If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}").ToString.ToEntero = 21 Then
+ ChkTransitorio.Checked = False
+ ChkTransitorio.Enabled = False
+ Else
+ ChkTransitorio.Enabled = True
+ End If
+ If DdlAlmacenDestino.SelectedValue.ToEntero > 0 Then
+ DdlSeccionAlmacenDestino.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero)
+ DdlSeccionAlmacenDestino.DataBind()
+ DdlSeccionAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ UpDatos.Update()
+ End If
+ End Sub
End Class
diff --git a/Nomina/ConceptoNominaB.aspx b/Nomina/ConceptoNominaB.aspx
index 16363b350..117bde23a 100644
--- a/Nomina/ConceptoNominaB.aspx
+++ b/Nomina/ConceptoNominaB.aspx
@@ -1,4 +1,4 @@
-<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ConceptoNominaB.aspx.cs" Inherits="Nomina_CatConceptob" %>
+<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ConceptoNominaB.aspx.cs" Inherits="Nomina_CatConceptoB" %>
diff --git a/OC/OC.aspx b/OC/OC.aspx
index 03f515e71..340dca446 100644
--- a/OC/OC.aspx
+++ b/OC/OC.aspx
@@ -274,7 +274,7 @@
@@ -7231,7 +7231,8 @@
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
$get("HdnTipoDescuento").value = "3";
- var Total = ToDouble($get('TxtSubTotal').value);
+ //si es con.nc,es.el.total
+ var Total = ToDouble($get(TipoAnticipo == 2? 'TxtTotal':'TxtSubTotal').value);
var SaldoCompra = parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
if (ToDouble($get('HdnCveVenta').value) == 0) SaldoCompra = Total;
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 90f52ef9b..d1d61a0b7 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -1311,36 +1311,36 @@ Partial Class Ventas
ViewState("DtContratosSerieDetalle") = value
End Set
End Property
- Private Property CvePSSerieLote As Integer
+ Private Property CvePSSerie As Integer
Get
- Return CType(ViewState("CvePSSerieLote"), Integer)
+ Return CType(ViewState("CvePSSerie"), Integer)
End Get
Set(value As Integer)
- ViewState("CvePSSerieLote") = value
+ ViewState("CvePSSerie") = value
End Set
End Property
- Private Property CveUMSerieLote As Integer
+ Private Property CveUMSerie As Integer
Get
- Return CType(ViewState("CveUMSerieLote"), Integer)
+ Return CType(ViewState("CveUMSerie"), Integer)
End Get
Set(value As Integer)
- ViewState("CveUMSerieLote") = value
+ ViewState("CveUMSerie") = value
End Set
End Property
- Private Property CveConsecSerieLote As Integer
+ Private Property CveConsecSerie As Integer
Get
- Return CType(ViewState("CveConsecSerieLote"), Integer)
+ Return CType(ViewState("CveConsecSerie"), Integer)
End Get
Set(value As Integer)
- ViewState("CveConsecSerieLote") = value
+ ViewState("CveConsecSerie") = value
End Set
End Property
- Private Property LimitaCantidadSerieLote As Integer
+ Private Property LimitaCantidadSerie As Integer
Get
- Return CType(ViewState("LimitaCantidadSerieLote"), Integer)
+ Return CType(ViewState("LimitaCantidadSerie"), Integer)
End Get
Set(value As Integer)
- ViewState("LimitaCantidadSerieLote") = value
+ ViewState("LimitaCantidadSerie") = value
End Set
End Property
@@ -2591,7 +2591,7 @@ Partial Class Ventas
TrPedido.Visible = False
' TrKilometrajeTxt.Visible = True
End If
- LtlTareaNueva.Text = String.Format(" Tarea", CveVenta)
+ LtlTareaNueva.Text = String.Format(" Tarea", CveVenta)
End If
@@ -3379,17 +3379,17 @@ Partial Class Ventas
'Si es contrato flexible le damos una cantidad alta de lo contrario lo maximo es lo estipulado en el contrato
If e.Row.DataKey("LimitarCantidad").ToString() = "True" Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Or e.Row.DataKey("ModalidadDetalle").ToString() = "1" Then
e.Row.FCRangeValidator("RVCant").MaximumValue = CantidadDisponible
- LimitaCantidadSerieLote = 1
+ LimitaCantidadSerie = 1
Else
e.Row.FCRangeValidator("RVCant").MaximumValue = "10000000"
- LimitaCantidadSerieLote = 0
+ LimitaCantidadSerie = 0
End If
'CONSIGNACION DE VENTA
If CveAlmacenExistenciasContrato > 0 And e.Row.DBCampo("Inv_CveMetodoInventario").ToString().ToEntero() = 5 Then
GvContratoDetalles.Columns(8).Visible = True
e.Row.FCButton("BtnSerieConsignacion").Visible = True
- e.Row.FCButton("BtnSerieConsignacion").CommandArgument = $"{e.Row.DBCampo("CveContratoDetalle")}°{e.Row.DBCampo("CvePS")}°{e.Row.DBCampo("CveUM")}°{e.Row.DBCampo("CodigoPS")}°{e.Row.DBCampo("Cantidad")}°{LimitaCantidadSerieLote}"
+ e.Row.FCButton("BtnSerieConsignacion").CommandArgument = $"{e.Row.DBCampo("CveContratoDetalle")}°{e.Row.DBCampo("CvePS")}°{e.Row.DBCampo("CveUM")}°{e.Row.DBCampo("CodigoPS")}°{e.Row.DBCampo("Cantidad")}°{LimitaCantidadSerie}"
e.Row.FCTextBox("TxtCant").Enabled = False
End If
@@ -7760,6 +7760,19 @@ Partial Class Ventas
'GENERO LOS DATOS DE LA NC
Dim tmpcon As DataTable = TmpDT.Clone
tmpcon.Clear()
+ Dim DtImpuestos As New DataTable
+ DtImpuestos.Columns.Add("ImportePU", GetType(Decimal))
+ DtImpuestos.Columns.Add("ImporteTotal", GetType(Decimal))
+ DtImpuestos.Columns.Add("PorcentajeIVA", GetType(Decimal))
+ DtImpuestos.Columns.Add("ImporteIVA", GetType(Decimal))
+ DtImpuestos.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
+ DtImpuestos.Columns.Add("ImporteRetIVA", GetType(Decimal))
+ DtImpuestos.Columns.Add("PorcentajeRetISR", GetType(Decimal))
+ DtImpuestos.Columns.Add("ImporteRetISR", GetType(Decimal))
+ DtImpuestos.Columns.Add("PorcentajeIEPS", GetType(Decimal))
+ DtImpuestos.Columns.Add("ImporteIEPS", GetType(Decimal))
+ DtImpuestos.Columns.Add("CveSubProyecto", GetType(Integer))
+ DtImpuestos.AcceptChanges()
Dim drpss As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlNCPSAnt.SelectedValue.ToEntero()).FiltroPrimero("")
@@ -7768,51 +7781,71 @@ Partial Class Ventas
Dim CveVentaP As Integer = 0
For Each gvrt As GridViewRow In GVAnticipos.Rows
If gvrt.FCCheckBox(String.Format("Chk{0}", gvrt.RowIndex)).Checked Then
+
+
Dim CveSub As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto").ToEntero()
Dim dr As DataRow = tmpcon.NewRow
Dim Cantidad As Decimal = 1
- Dim PU As Decimal = gvrt.FCTextBox(String.Format("TxtAnticipo{0}", gvrt.RowIndex)).Text.ToDecimal
- Dim TotalCalculableImpuestos As Decimal = (Cantidad * (PU))
- dr("CvePS") = drpss("CvePS")
- dr("PS") = drpss("PS")
- dr("OBS") = drpss("PS")
- dr("PU") = PU
- dr("Cantidad") = Cantidad
- dr("CveUM") = drpss("CveUnidadMedida")
- dr("SATClaveProdServ") = "84111506"
- dr("SATClaveUM") = "ACT"
- dr("Consec") = ii
- If drpss("IVA").ToString() = "-1" Then
- dr("PorcentajeIVA") = PorcentajeIVA ' GlobalDTSubProyectos(-1,cves DrPS("IVA")
- Else
- dr("PorcentajeIVA") = drpss("IVA")
- End If
+ Dim tTipoAmortizacion As Integer = If(DdlTipoAmortizacionAnticipo.SelectedValue = "2", 1, 2)
- dr("IVA") = dr("PorcentajeIVA")
- dr("ImporteIVA") = Math.Round(dr("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
- dr("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
- dr("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales)
- dr("PorcentajeRetIVA") = ClienteRetIVA
- dr("PorcentajeRetISR") = ClienteRetISR
- If UsuarioActual.Empresa.Funcionalidad(343) = "1" Then
- dr("PorcentajeIEPS") = drpss("IEPSPorcentaje")
- dr("ImporteIEPS") = Math.Round(drpss("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
- Else
- dr("PorcentajeIEPS") = 0 ' DrPS("IEPSPorcentaje")
- dr("ImporteIEPS") = 0 'Math.Round(DrPS("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
- End If
- dr("IEPS") = dr("ImporteIEPS")
- dr("Descuento") = Math.Round(0, NumeroDecimales)
- dr("TipoDescuento") = HdnTipoDescuento.Value
- dr("Total") = (Cantidad * PU)
- dr("CveClasificacion") = drpss("CveClasificacion")
- dr("CveSubProyecto") = CveSub
- dr("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales)
- CveVentaP = gvrt.DataKey("CveVenta").ToEntero()
- tmpcon.Rows.Add(dr)
- ii += 1
+ DtImpuestos = CargaDtImpuestosNC(gvrt.DataKey("CveVenta").ToString().ToEntero(), gvrt.FCTextBox(String.Format("TxtAnticipo{0}", gvrt.RowIndex)).Text.ToDecimal, AplicaImpuestosLocales:=True, NCDescuento:=False, NivelTotal:=tTipoAmortizacion)
+
+ Dim query = From ddr In DtImpuestos
+ Group By PorcentajeIVA = ddr("PorcentajeIVA").ToString().ToDecimal,
+ PorcentajeRetIVA = ddr("PorcentajeRetIVA").ToString().ToDecimal,
+ PorcentajeRetISR = ddr("PorcentajeRetISR").ToString().ToDecimal,
+ PorcentajeIEPS = ddr("PorcentajeIEPS").ToString().ToDecimal
+ Into x = Group
+ Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString().ToDecimal),
+ ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal),
+ ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString().ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString().ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
+ ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
+ ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
+ ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString().ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
+ PorcentajeIVA = PorcentajeIVA,
+ PorcentajeRetIVA = PorcentajeRetIVA,
+ PorcentajeRetISR = PorcentajeRetISR,
+ PorcentajeIEPS = PorcentajeIEPS
+
+ DtImpuestos = query.QueryToDataTable(False)
+ For Each Drr As DataRow In DtImpuestos.Rows
+
+ dr("CvePS") = drpss("CvePS")
+ dr("PS") = drpss("PS")
+ dr("OBS") = drpss("PS")
+ dr("PU") = Drr("ImportePU").ToString().ToDecimal
+ dr("Cantidad") = Cantidad
+ dr("CveUM") = drpss("CveUnidadMedida")
+ dr("SATClaveProdServ") = "84111506"
+ dr("SATClaveUM") = "ACT"
+ dr("Consec") = ii
+
+ dr("PorcentajeIVA") = dr("PorcentajeIVA").ToString().ToDecimal
+
+ dr("IVA") = Drr("PorcentajeIVA")
+ dr("ImporteIVA") = Drr("ImporteIVA").ToString().ToDecimal
+ dr("ImporteRetIVA") = Drr("ImporteRetIVA").ToString().ToDecimal
+ dr("ImporteRetISR") = Drr("ImporteRetISR").ToString().ToDecimal
+ dr("PorcentajeRetIVA") = Drr("PorcentajeRetIVA").ToString().ToDecimal
+ dr("PorcentajeRetISR") = Drr("PorcentajeRetISR").ToString().ToDecimal
+
+ dr("PorcentajeIEPS") = Drr("PorcentajeIEPS").ToString().ToDecimal
+ dr("ImporteIEPS") = Drr("ImporteIEPS").ToString().ToDecimal
+
+
+ dr("IEPS") = Drr("ImporteIEPS").ToString().ToDecimal
+ dr("Descuento") = Math.Round(0, NumeroDecimales)
+ dr("TipoDescuento") = HdnTipoDescuento.Value
+ dr("Total") = Drr("ImporteTotal").ToString().ToDecimal
+ dr("CveClasificacion") = drpss("CveClasificacion")
+ dr("CveSubProyecto") = CveSub
+ dr("TotalImporte") = Drr("ImporteTotal").ToString().ToDecimal
+ CveVentaP = gvrt.DataKey("CveVenta").ToEntero()
+ tmpcon.Rows.Add(dr)
+ ii += 1
+ Next
End If
Next
@@ -10104,71 +10137,81 @@ Partial Class Ventas
If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
CveIEAnticipo = row2.DataKey("CveIE").ToString().ToEntero()
importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
+ Dim ImporteAnticipo As Decimal = importeMovimiento
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
+ If DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then ImporteAnticipo = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal * row2.DataKey("SubTotalAnticipo").ToDecimal
+
IdCtaContable = IdCtaContAnticipos
CveCuenta = CveCuentaAnticipos
CveSubProyectoContabilizar = CveSubProyectoVenta
If importeMovimiento <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimiento, Referencia, 11, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteAnticipo, Referencia, 11, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=ImporteAnticipo * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
Else
ViewState("SeGuardoPrePoliza") = True
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, Referencia, 2, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=importeMovimiento, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, CveIE:=CveIEAnticipo, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
- ErrorPrepoliza = True
- Exit For
- End If
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, Referencia, 2, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=importeMovimiento, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, CveIE:=CveIEAnticipo, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
+ ErrorPrepoliza = True
+ Exit For
+ End If
'se hace acreditamiento de impuestos
'IVA X TRASLADAR
- Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIVA").ToDecimal
- '' si se esta aplicando NC por amortizaion, se trasladan impuestos
- If EsNCAmortizacion Then
- Dim IngresoIVA As Decimal = TxtIVA.Text.ToDecimal
- Dim IngresoIEPS As Decimal = TxtIEPS.Text.ToDecimal
- Dim IngresoTotal As Decimal = TxtTotal.Text.ToDecimal
+ Dim EsAnticipoEspecial As Boolean = False
- If IngresoIVA > 0 Then
+ If UsuarioActual.CveEmpresa.Contiene(1, 119) Then EsAnticipoEspecial = True
+ If EsAnticipoEspecial Then
+ Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIVA").ToDecimal
+ '' si se esta aplicando NC por amortizaion, se trasladan impuestos
+ If EsNCAmortizacion Then
+ Dim IngresoIVA As Decimal = TxtIVA.Text.ToDecimal
+ Dim IngresoIEPS As Decimal = TxtIEPS.Text.ToDecimal
+ Dim IngresoTotal As Decimal = TxtTotal.Text.ToDecimal
- IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
- Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * IngresoIVA) / IngresoTotal, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIVA) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
- ErrorPrepoliza = True
- Exit For
- End If
- 'IVA PAGADO
- IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
- Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * IngresoIVA) / IngresoTotal, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIVA) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
- ErrorPrepoliza = True
- Exit For
- End If
- End If
+ If IngresoIVA > 0 Then
-
- If IngresoIEPS > 0 Then
- 'IEPS X TRASLADAR
- Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
- If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
- ErrorPrepoliza = True
- Exit For
+ IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
+ Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * IngresoIVA) / IngresoTotal, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIVA) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
+ ErrorPrepoliza = True
+ Exit For
+ End If
+ 'IVA PAGADO
+ IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
+ Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * IngresoIVA) / IngresoTotal, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIVA) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
+ ErrorPrepoliza = True
+ Exit For
+ End If
End If
- 'IEPS PAGADO
- Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
- If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
- ErrorPrepoliza = True
- Exit For
+
+ If IngresoIEPS > 0 Then
+ 'IEPS X TRASLADAR
+ Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
+ If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
+ ErrorPrepoliza = True
+ Exit For
+ End If
+
+ 'IEPS PAGADO
+ Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
+ If IngresoIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * IngresoIEPS) / IngresoTotal, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=((importeMovimiento * IngresoIEPS) / IngresoTotal) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
+ ErrorPrepoliza = True
+ Exit For
+ End If
End If
End If
End If
- End If
- End If
+
+ End If
+ End If
+
+ End If
End If
- End If
Next
End If
@@ -11217,7 +11260,7 @@ Partial Class Ventas
CveUnidad = Dr("CveUM").ToString().ToEntero()
Cantidad = Dr("Cantidad").ToString().ToDouble
- If Dr("CveTipoInvPS").ToString().ToEntero() = 5 And Dr("SerieLote").ToString() = "" Then
+ If Dr("CveTipoInvPS").ToString().ToEntero() = 5 And Dr("Serie").ToString() = "" Then
OcurrioError = True
ErrorList.Add("Se deben especificar las Series de los productos de almacén")
Exit For
@@ -11257,7 +11300,7 @@ Partial Class Ventas
End If
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=Dr("SerieLote").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
OcurrioError = True
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario. ")
Exit For
@@ -12018,7 +12061,12 @@ Partial Class Ventas
saldo = e.Row.DataKey("Saldo").ToString().ToDecimal
If CveVenta <= 0 Then
- saldo = e.Row.DataKey("SaldoSubTotal").ToString().ToDecimal
+ If DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then 'cuando es por NC, debe de tomar el total de su saldo respectivo
+ saldo = e.Row.DataKey("SaldoConImpuestos").ToString().ToDecimal
+ Else
+ saldo = e.Row.DataKey("SaldoSubTotal").ToString().ToDecimal
+ End If
+
e.Row.FCLiteral("LtlAnticipos").Text = saldo.FormatoNumero
End If
@@ -13262,7 +13310,7 @@ Partial Class Ventas
Protected Function CancelarMovimientoInventario(ByRef ObjInventario As ClsInventarios, ByRef ObjConta As ClsContabilidad, CveVentaNueva As Integer, CveVentaVieja As Integer) As Boolean
'SI YA ESTA QUEMADA DE ALMACEN LA VENTA, NO SE CANCELAN LOS MOVIMIENTOS DE INVENTARIO
- If ObjInventario.GetEstatusVentaPorSurir(CveVentaVieja) Then
+ If ObjInventario.GetEstatusVentaPorSurtir(CveVentaVieja) Then
If ObjInventario.EsDevolucionVenta = 2 Then
Return True
End If
@@ -13301,12 +13349,15 @@ Partial Class Ventas
Dim CveUnidad As Integer = MovDet("CveUM").ToString().ToEntero()
Dim PU As Decimal = MovDet("PU").ToString().ToDecimal
Dim CveProducto As Integer = MovDet("CvePS").ToString().ToEntero()
- Dim SerieLote As String = MovDet("SerieLote").ToString()
+ Dim Serie As String = MovDet("Serie").ToString()
+ Dim Lote As String = MovDet("Lote").ToString()
+ Dim FechaCaducidad As Date = MovDet("FechaCaducidad").ToString().ToDate
+
Dim CveVentaDetalle = MovDet("CveVentaDetalle").ToString().ToEntero()
'Entrada
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventarioEntrada, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=SerieLote, CveVentaDetalle:=CveVentaDetalle) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventarioEntrada, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveVentaDetalle:=CveVentaDetalle) Then
OcurrioError = True
Exit For
End If
@@ -13314,7 +13365,7 @@ Partial Class Ventas
'Salida
CveVentaDetalle = ObjInventario.VentaDetallePadreGet(CveVentaDetalle).ToString().ToEntero()
If CveVentaDetalle > 0 Then
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventarioSalida, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=SerieLote, CveVentaDetalle:=CveVentaDetalle) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventarioSalida, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveVentaDetalle:=CveVentaDetalle) Then
OcurrioError = True
Exit For
End If
@@ -14598,7 +14649,7 @@ Partial Class Ventas
AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text,
CvePS, "", TxtObsPS.Text.Trim, PU, ObjDescuento.ImporteDescuento,
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
- SerieLote:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle)
+ Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle)
CalculaUsados()
@@ -14728,7 +14779,7 @@ Partial Class Ventas
Private Function AgregarProductoServicio(Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
PU As Decimal, Descuento As Decimal,
CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
- Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
+ Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0,
@@ -14767,7 +14818,7 @@ Partial Class Ventas
Row("Proyecto") = Proyecto
Row("CveSubProyecto") = CveSubProyecto
Row("SubProyecto") = SubProyecto
- Row("SerieLote") = SerieLote
+ Row("Serie") = Serie
Row("TiempoEntrega") = TiempoEntrega
Row("Orden") = TmpDT.Rows.Count + 1
Row("Cantidad") = Cantidad
@@ -15043,7 +15094,7 @@ Partial Class Ventas
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
- TmpDT.Columns.Add("SerieLote", GetType(String))
+ TmpDT.Columns.Add("Serie", GetType(String))
TmpDT.Columns.Add("CuentaPredial", GetType(String))
TmpDT.Columns.Add("Obs", GetType(String))
TmpDT.Columns.Add("TiempoEntrega", GetType(String))
@@ -16158,7 +16209,7 @@ Partial Class Ventas
'Si no se ha terminado de surtir agregamos el movimiento
If Indice >= 0 Then
- ' rowSurtidos("Surtido").ToString().ToDouble < rowSurtidos("Cantidad").ToString().ToDouble AndAlso (dr("CantidadDisponible").ToString().ToDouble - rowSurtidos("Surtido").ToString().ToDouble > 0 Or dr("SerieLote").ToString() <> "")
+ ' rowSurtidos("Surtido").ToString().ToDouble < rowSurtidos("Cantidad").ToString().ToDouble AndAlso (dr("CantidadDisponible").ToString().ToDouble - rowSurtidos("Surtido").ToString().ToDouble > 0 Or dr("Serie").ToString() <> "")
If rowSurtidos("Surtido").ToString().ToDecimal < rowSurtidos("Cantidad").ToString().ToDecimal Then
Dim CantidadSurtida As Double = If(dr("CantidadDisponible").ToString().ToDecimal < rowSurtidos("Cantidad").ToString().ToDouble, dr("CantidadDisponible").ToString().ToDecimal, rowSurtidos("Cantidad").ToString().ToDecimal)
MovDTCuadrados.ImportRow(dr)
@@ -16241,7 +16292,10 @@ Partial Class Ventas
Dim CveUnidad As Integer = MovDet("CveUM").ToString().ToEntero()
Dim PU As Decimal = MovDet("PU").ToString().ToDecimal
Dim CveProducto As Integer = MovDet("CvePS").ToString().ToEntero()
- Dim SerieLote As String = MovDet("SerieLote").ToString()
+ Dim Serie As String = MovDet("Serie").ToString()
+ Dim Lote As String = MovDet("Lote").ToString()
+ Dim FechaCaducidad As Date = MovDet("FechaCaducidad").ToString.ToDate
+ Dim CveSeccionAlmacen As Integer = MovDet("CveSeccionAlmacen").ToString.ToEntero
Dim Consec As Integer = DtRemisionesTmpDT.FiltroPrimeroValor("Consec", $"CveVentaDetalle = {MovDet("CveVentaDetalle").ToString()}").ToEntero()
'COMIENZA: VENTADETALLE
@@ -16267,7 +16321,7 @@ Partial Class Ventas
CveMovimientoDetalleEntrada = MovDet("CveMovimientoDetalle").ToString().ToEntero()
End If
- If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=SerieLote, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
+ If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, CveSeccionAlmacen:=CVeSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
ContadorMovtosDetalles += 1
Else
OcurrioError = True
@@ -17230,7 +17284,7 @@ Partial Class Ventas
For Each Row As DataRow In TmpDT.Rows
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString().ToEntero()
If CveVentaDetalle > 0 Then
- If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString().ToEntero(), Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("PU").ToString().ToDecimal(), Row("ImporteIEPS").ToString().ToDecimal(), Row("Obs").ToString(), UsuarioActual.CveUsuario) Then
+ If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString().ToEntero(), Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("PU").ToString().ToDecimal(), Row("ImporteIEPS").ToString().ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("Obs").ToString(), UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If
@@ -17382,7 +17436,7 @@ Partial Class Ventas
Dim DrProducto As DataRow = Nothing
If TxtCantidad.Text.Trim.ToDouble <= 0 Then TxtCantidad.Text = "1"
- Dim SerieLote As String = ""
+ Dim SerieL As String = ""
Dim CodigoBarras As String = ""
Dim CvePS As Integer
@@ -17391,10 +17445,10 @@ Partial Class Ventas
'BUSCA POR SERIE E IGNORA CODIGO DE BARRAS (LIMPIA)
If TxtCodigoSerie.Text.Trim <> "" Then
- SerieLote = TxtCodigoSerie.Text.Trim().ToUpper()
+ Dim Serie As String = TxtCodigoSerie.Text.Trim().ToUpper()
Dim Objinventarios As New ClsInventarios
- Dim Existencia = Objinventarios.GetExistenciasPS(-1, -1, UsuarioActual.CveEmpresa, -1, SerieLote:=SerieLote, ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero())
- Dim ExistenciaActual = DtInv.SUM("Cantidad", String.Format("SerieLote = '{0}'", SerieLote))
+ Dim Existencia = Objinventarios.GetExistenciasPS(-1, -1, UsuarioActual.CveEmpresa, -1, Serie:=Serie, ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero())
+ Dim ExistenciaActual = DtInv.SUM("Cantidad", String.Format("Serie = '{0}'", Serie))
CvePS = Objinventarios.CvePS
Objinventarios.Dispose()
@@ -17405,11 +17459,11 @@ Partial Class Ventas
HdnCvePS.Value = CvePS.ToString()
TxtCantidad.Text = "1"
Else
- Alert($"No se encontró un producto con la serie: {SerieLote}. Por favor verifique y vuelva a intentar ", TipoMensaje.MsgAdvertencia)
+ Alert($"No se encontró un producto con la serie: {Serie}. Por favor verifique y vuelva a intentar ", TipoMensaje.MsgAdvertencia)
End If
End If
Else
- Alert(String.Format("No hay existencia suficiente del producto con la Serie: {0}. Por favor rectifique y vuelva a intentar", SerieLote), TipoMensaje.MsgAdvertencia)
+ Alert(String.Format("No hay existencia suficiente del producto con la Serie: {0}. Por favor rectifique y vuelva a intentar", Serie), TipoMensaje.MsgAdvertencia)
TxtCodigoSerie.Focus()
RegistraScript($"$('#{TxtCodigoSerie.ClientID}').select();")
Exit Sub
@@ -17422,7 +17476,7 @@ Partial Class Ventas
CodigoBarras = TxtCodigoBarras.Text.Trim()
DrProducto = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}'")
If DrProducto IsNot Nothing Then
- If DrProducto("Inv_CveMetodoInventario").ToString() = "5" Then 'si es serielote
+ If DrProducto("Inv_CveMetodoInventario").ToString() = "5" Then 'si es serie
TxtCodigoSerie.Focus()
Exit Sub
Else
@@ -17432,7 +17486,7 @@ Partial Class Ventas
Else
TxtCodigoBarras.Focus()
RegistraScript($"$('#{TxtCodigoBarras.ClientID}').select();")
- Alert($"No se encontró un producto con el código de barras: {SerieLote}. Por favor verifique y vuelva a intentar ", TipoMensaje.MsgAdvertencia)
+ Alert($"No se encontró un producto con el código de barras: {Serie}. Por favor verifique y vuelva a intentar ", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
@@ -17501,7 +17555,7 @@ Partial Class Ventas
'AddPS(TxtCantidad.Text.Trim.ToDouble, DrProducto("CveUM").ToString().ToEntero(), DrProducto("UnidadMedida").ToString(), DrProducto("CveClasificacion").ToString().ToEntero(), DrProducto("Clasificacion").ToString(),
' DrProducto("CvePS").ToString().ToEntero(), DrProducto("PS").ToString(), TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, HdnIVAPS.Value.ToDouble, 0, 0,
' -1, -1, True, DrProducto("Codigo").ToString(), DdlProyecto.SelectedValue.ToEntero(),
- ' DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text, DrProducto("CveTipoPS").ToString().ToEntero(), DrProducto("Inv_CveMetodoInventario").ToString().ToEntero(), SerieLote:=SerieLote, CodigoPS:=DrProducto("PSCodigo").ToString())
+ ' DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text, DrProducto("CveTipoPS").ToString().ToEntero(), DrProducto("Inv_CveMetodoInventario").ToString().ToEntero(), Serie:=Serie, CodigoPS:=DrProducto("PSCodigo").ToString())
LimpiaAgregar()
End If
@@ -18013,17 +18067,17 @@ Partial Class Ventas
Dim Index = Row.RowIndex
Dim ObjInventarios As New ClsInventarios
Dim Existencia = ObjInventarios.GetExistenciasPSSerie(Row.FCTextBox("TxtSerie").Text.ToString(), ddlAlmacen.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)
- Dim ExistenciaActual = DtInv.SUM("Cantidad", String.Format("SerieLote = '{0}'", Row.FCTextBox("TxtSerie").Text.ToString()))
+ Dim ExistenciaActual = DtInv.SUM("Cantidad", String.Format("Serie = '{0}'", Row.FCTextBox("TxtSerie").Text.ToString()))
'Valida Existencia
If Existencia - ExistenciaActual <= 0 Then
Alert(String.Format("No hay existencia suficiente del producto con la Serie: {0}. Por favor rectifique y vuelva a intentar", Row.FCTextBox("TxtSerie").Text.ToString()), TipoMensaje.MsgAdvertencia)
Row.FCTextBox("TxtSerie").Text = ""
Row.FCHiddenField("HdnSerie").Value = ""
- TmpDT.Rows(Index)("SerieLote") = ""
+ TmpDT.Rows(Index)("Serie") = ""
Else
Row.FCHiddenField("HdnSerie").Value = Row.FCTextBox("TxtSerie").Text
- TmpDT.Rows(Index)("SerieLote") = Row.FCTextBox("TxtSerie").Text
+ TmpDT.Rows(Index)("Serie") = Row.FCTextBox("TxtSerie").Text
End If
TmpDT.AcceptChanges()
@@ -18049,8 +18103,8 @@ Partial Class Ventas
'SIN EXISTENCIA
If Gvr.FCTextBox("TxtSerie").Visible = True And Gvr.FCTextBox("TxtSerie").Text.Trim <> "" Then
- Existencia = ObjInventarios.GetExistenciasPS(-1, -1, UsuarioActual.CveEmpresa, ddlAlmacen.SelectedValue.ToEntero(), SerieLote:=Gvr.FCTextBox("TxtSerie").Text.ToString(), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
- ExistenciaActual = DtInv.SUM("Cantidad", String.Format("SerieLote = '{0}'", Gvr.FCTextBox("TxtSerie").Text.Trim))
+ Existencia = ObjInventarios.GetExistenciasPS(-1, -1, UsuarioActual.CveEmpresa, ddlAlmacen.SelectedValue.ToEntero(), Serie:=Gvr.FCTextBox("TxtSerie").Text.ToString(), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
+ ExistenciaActual = DtInv.SUM("Cantidad", String.Format("Serie = '{0}'", Gvr.FCTextBox("TxtSerie").Text.Trim))
'Valida Existencia
If Existencia - ExistenciaActual < 0 Then
@@ -18248,13 +18302,13 @@ Partial Class Ventas
DtTemporal.Columns.Add("Lote", Type.GetType("System.String"))
End If
- If Not DtTemporal.Columns.Contains("Batch") Then
- DtTemporal.Columns.Add("Batch", Type.GetType("System.String"))
+ If Not DtTemporal.Columns.Contains("FechaCaducidad") Then
+ DtTemporal.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
End If
- GvInv.Columns(4).Visible = DtTemporal.MAX("SerieLote", "SerieLote <> ''") <> "" Or CveVenta <= 0
+ GvInv.Columns(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" Or CveVenta <= 0
GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
- GvInv.Columns(6).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
+ GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad").ToDate > MinFecha
GvInv.DataSource = DtTemporal
GvInv.DataBind()
@@ -19926,7 +19980,7 @@ Partial Class Ventas
End If
For Each dr As DataRow In ObjInventarios.DtResultados.FiltraParametros($"ExistenciaPedido > 0 {Filtro}").Rows
AgregarProductoServicio(dr("Cantidad").ToString().ToDecimal, dr("CveUM").ToString().ToEntero(), dr("UnidadMedida").ToString(), dr("CveClasificacion").ToString().ToEntero(), dr("Clasificacion").ToString(),
- dr("CvePS").ToString().ToEntero(), dr("PS").ToString(), dr("SerieLote").ToString(), dr("PU").ToString().ToDecimal, 0.0D,
+ dr("CvePS").ToString().ToEntero(), dr("PS").ToString(), dr("Serie").ToString(), dr("PU").ToString().ToDecimal, 0.0D,
dr("CveProyecto").ToString().ToEntero(), dr("Proyecto").ToString(), dr("CveSubProyecto").ToString().ToEntero(), dr("SubProyecto").ToString(),
CveMovimientoDetallePedido:=dr("CveMovimientoDetalle").ToString().ToEntero())
Next
@@ -20432,12 +20486,12 @@ Partial Class Ventas
If Dr("CveTipoInvPS").ToString().ToEntero() = 5 Then
For Each Dr2 As DataRow In DtContratosSerieDetalle.FiltraParametros($"ConsecId = {Dr("CveContratoDetalle")}").Rows
- Existencia = ObjInventario.GetExistenciasPS(CveProducto, CveUnidad, factura.CveEmpresa, CveAlmacenExistenciasContrato, SerieLote:=Dr2("Serie").ToString(), FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), ExcluyeAdelantado:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
+ Existencia = ObjInventario.GetExistenciasPS(CveProducto, CveUnidad, factura.CveEmpresa, CveAlmacenExistenciasContrato, Serie:=Dr2("Serie").ToString(), FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), ExcluyeAdelantado:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
If Existencia < 1 Then
Return False
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, SerieLote:=Dr2("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, Serie:=Dr2("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
Return False
End If
Next
@@ -20462,7 +20516,7 @@ Partial Class Ventas
If CveMovimientoEntradaGeneral > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, Dr("CveAF").ToString().ToEntero(), Dr("CveSeccionAlmacen").ToString().ToEntero(), Dr("SerieLote").ToString(), Lote:=Dr("Lote").ToString(), Batch:=Dr("Batch").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
Return False
End If
Next
@@ -20476,7 +20530,7 @@ Partial Class Ventas
If CveMovimientoEntradaGeneral > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, Dr("CveAF").ToString().ToEntero(), Dr("CveSeccionAlmacen").ToString().ToEntero(), Dr("SerieLote").ToString(), Lote:=Dr("Lote").ToString(), Batch:=Dr("Batch").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
Return False
End If
Next
@@ -20510,12 +20564,12 @@ Partial Class Ventas
Protected Sub BtnSerieConsignacion_Click(sender As Object, e As EventArgs)
Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c)
- CveConsecSerieLote = Argumentos(0).ToEntero()
- CvePSSerieLote = Argumentos(1).ToEntero()
- CveUMSerieLote = Argumentos(2).ToEntero()
+ CveConsecSerie = Argumentos(0).ToEntero()
+ CvePSSerie = Argumentos(1).ToEntero()
+ CveUMSerie = Argumentos(2).ToEntero()
LbProducto.Text = Argumentos(3)
LbCantidad.Text = If(Argumentos(4).ToDecimal < 0.0D, 0, Argumentos(4).ToDecimal).FormatoNumero
- LimitaCantidadSerieLote = Argumentos(5).ToEntero()
+ LimitaCantidadSerie = Argumentos(5).ToEntero()
CargaSerie()
End Sub
@@ -20524,11 +20578,11 @@ Partial Class Ventas
Private Sub CargaSerie(Optional CerrarCompletado As Boolean = False)
RegistraScript("$('#DivSerieConsignacion').modal();", "ModalLote")
- GvSerie.DataSource = DtContratosSerieDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerieLote), "Consec DESC")
+ GvSerie.DataSource = DtContratosSerieDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
GvSerie.DataBind()
lblSerieTotal.Text = GvSerie.Rows.Count.ToString()
'VALIDA QUE SIGA AGREGANDO
- If DtContratosSerieDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerieLote)).Rows.Count = LbCantidad.Text.ToEntero() And LimitaCantidadSerieLote = 1 Then
+ If DtContratosSerieDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count = LbCantidad.Text.ToEntero() And LimitaCantidadSerie = 1 Then
BtnAgregarPS.Enabled = False
If CerrarCompletado Then
RegistraScript("$('#DivSerieConsignacion').modal('hide');")
@@ -20538,22 +20592,21 @@ Partial Class Ventas
End If
UpSerieConsignacion.Update()
- TxtSerieLote.Text = ""
- TxtSerieLote.Focus()
+ TxtSerie.Text = ""
+ TxtSerie.Focus()
End Sub
Protected Sub BtnAgregarPS_Click(sender As Object, e As EventArgs)
- AgregaSerieLote(TxtSerieLote.Text.Replace(" ", String.Empty))
+ AgregaSerie(TxtSerie.Text.Replace(" ", String.Empty))
End Sub
- Private Sub AgregaSerieLote(SerieLote As String)
- 'SerieLote = SerieLote.Trim.Replace(" ", " ")
+ Private Sub AgregaSerie(Serie As String)
- If SerieLote.Trim = "" Then
+ If Serie.Trim = "" Then
Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
- Dim SeriesArreglo = SerieLote.Trim.Split(";"c)
+ Dim SeriesArreglo = Serie.Trim.Split(";"c)
'VALIDACION DE SERIES DUPLICADAS
Dim MensajeAlert As New StringBuilder
@@ -20562,13 +20615,13 @@ Partial Class Ventas
DtSeriesNuevas.Columns.Add("Serie", GetType(String))
'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS
- ' Dim dr As DataRow = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CvePS = {0}", CvePSSerieLote), "PS")
- Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePSSerieLote).FiltroPrimero("", "PS")
+ ' Dim dr As DataRow = GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CvePS = {0}", CvePSSerie), "PS")
+ Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePSSerie).FiltroPrimero("", "PS")
For Each SerieRow In SeriesArreglo
SerieRow = SerieRow.ToUpper
- DtDuplicado = DtContratosSerieDetalle.FiltraParametros($"ConsecId = {CveConsecSerieLote} AND Serie = '{SerieRow}'")
+ DtDuplicado = DtContratosSerieDetalle.FiltraParametros($"ConsecId = {CveConsecSerie} AND Serie = '{SerieRow}'")
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
MensajeAlert.Append($" El numero de Serie ""{SerieRow}"" proporcionado ya se encuentra ingresado.")
Continue For
@@ -20606,29 +20659,29 @@ Partial Class Ventas
Dim Row = DtContratosSerieDetalle.NewRow
Index = Index + 1
- If Index > LbCantidad.Text.ToEntero() And LimitaCantidadSerieLote = 1 Then
+ If Index > LbCantidad.Text.ToEntero() And LimitaCantidadSerie = 1 Then
MensajeSinExistencias.Append($"Serie: {SerieRow} - En esta serie ocurrió un error por favor de comunicarse con soporte tecnico.. ")
Continue For
End If
'VERIFICA EXISTENCIAS
- Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerieLote, CveUMSerieLote, UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=SerieRow)
+ Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=SerieRow)
If Existencia < 1 Then
MensajeSinExistencias.Append($"Serie: {SerieRow}. ")
Continue For
End If
- Row("ConsecId") = CveConsecSerieLote
+ Row("ConsecId") = CveConsecSerie
Row("Consec") = DtContratosSerieDetalle.Rows.Count + 1
- Row("CvePS") = CvePSSerieLote
- Row("CveUM") = CveUMSerieLote
+ Row("CvePS") = CvePSSerie
+ Row("CveUM") = CveUMSerie
Row("Serie") = SerieRow
DtContratosSerieDetalle.Rows.Add(Row)
Next
ObjInventarios.Dispose()
- TxtSerieLote.Text = ""
+ TxtSerie.Text = ""
CargaCantidadSerieGV()
@@ -20645,9 +20698,9 @@ Partial Class Ventas
Protected Sub GvSerie_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvSerie.RowDeleting
Try
- Dim keySerieLote As String = e.Keys("Serie").ToString()
+ Dim keySerie As String = e.Keys("Serie").ToString()
For Each dr As DataRow In DtContratosSerieDetalle.Rows
- If dr("Serie").ToString() = keySerieLote Then
+ If dr("Serie").ToString() = keySerie Then
dr.Delete()
End If
Next
@@ -20662,7 +20715,7 @@ Partial Class Ventas
Private Sub CargaCantidadSerieGV()
'MODIFICA CANTIDAD DEL GV CONTRATOS
For Each Gvr As GridViewRow In GvContratoDetalles.Rows
- If Gvr.DataKey("CvePS").ToEntero() = CvePSSerieLote Then
+ If Gvr.DataKey("CvePS").ToEntero() = CvePSSerie Then
Dim Contador = DtContratosSerieDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("CveContratoDetalle"))).Rows.Count
Gvr.FCTextBox("TxtCant").Text = Contador.ToString()
UPEstimaciones.Update()
@@ -21966,13 +22019,13 @@ Partial Class Ventas
If AplicaNCMasiva Then
If NCDescuento Then
For Each RNC In ListaNCDesc
- DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales), True, MissingSchemaAction.Ignore)
+ DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
Next
Else
For Each Gvr As GridViewRow In GvCxC.Rows
If Gvr.FCCheckBox("ChkCxC").Checked Then
- DtImpuestos.Merge(CargaDtImpuestosNC(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales), True, MissingSchemaAction.Ignore)
+ DtImpuestos.Merge(CargaDtImpuestosNC(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
'CARGA FACTURA A LA CUAL SE APLICA LA NC
AcumuladoNC += Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal
CargaNCDT(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal)
@@ -21980,7 +22033,7 @@ Partial Class Ventas
Next
End If
Else
- DtImpuestos = CargaDtImpuestosNC(CveVenta, TxtNCImporte.Text.Trim.ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales)
+ DtImpuestos = CargaDtImpuestosNC(CveVenta, TxtNCImporte.Text.Trim.ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero())
If EsNCAmortizacion Then
If DtAnticipoAmortizacion Is Nothing Then
@@ -21999,7 +22052,7 @@ Partial Class Ventas
End If
Else
For Each RNC In ListaRemisionesNC
- DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales), True, MissingSchemaAction.Ignore)
+ DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
Next
End If
@@ -22116,12 +22169,13 @@ Partial Class Ventas
End Sub
- Private Function CargaDtImpuestosNC(CveVentaNC As Integer, Importe As Decimal, Optional NCDescuento As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True) As DataTable
+ Private Function CargaDtImpuestosNC(CveVentaNC As Integer, Importe As Decimal, Optional NCDescuento As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional NivelTotal As Integer = 1) As DataTable
Dim Total As Decimal = 0, SubTotal As Decimal = 0, Saldo As Decimal = 0
Dim TmpDT As DataTable = Nothing
Dim TmpDTImpuestos As DataTable = Nothing
+
Dim ObjVentas As New ClsVentas
If ObjVentas.GetVentaImpuestosLocales(CveVentaNC) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
@@ -22157,7 +22211,7 @@ Partial Class Ventas
DtImpuestosLocal.Columns.Add("ImporteRetISR", GetType(Decimal))
DtImpuestosLocal.Columns.Add("ImporteIEPS", GetType(Decimal))
- Dim ImporteReferencia As Decimal = If(DdlNCNivelImporte.SelectedValue.ToEntero() = 1, Total, SubTotal)
+ Dim ImporteReferencia As Decimal = If(NivelTotal = 1, Total, SubTotal)
Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100
Dim FiltroStr As String = ""
Dim importePuTemp As Decimal = 0
@@ -22216,7 +22270,7 @@ Partial Class Ventas
CveClasificacion As Integer, Clasificacion As String, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
Obs As String, Cantidad As Double, PU As Double, PorcentajeIVA As Double, ImporteIVA As Double, PorcentajeRetIVA As Double, ImporteRetIVA As Double,
PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double,
- Total As Double, SerieLote As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String,
+ Total As Double, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String,
SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer,
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, Optional CveTamaño As Integer = -1)
@@ -22262,7 +22316,7 @@ Partial Class Ventas
Row("TotalImporte") = Math.Round(Total, NumeroDecimales)
- Row("SerieLote") = SerieLote
+ Row("Serie") = Serie
Row("TiempoEntrega") = TiempoEntrega
Row("CvePresupuestoIngreso") = CvePresupuestoIngreso
Row("EntregaDirecta") = EntregaDirecta
@@ -23110,8 +23164,14 @@ Partial Class Ventas
End If
- If DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then DivConceptoNC.Visible = True Else DivConceptoNC.Visible = False
+ If DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then
+ 'debo de cambiar la columna que se tomaria como total, por si tiene impuestos, la NC estaria abarcandolos
+ DivConceptoNC.Visible = True
+ Else
+ DivConceptoNC.Visible = False
+ End If
+ CargaAnticipos(CveCliente)
DdlTipoRelacionAnticipo.SelectedValueExist("7")
Else
DivConceptoNC.Visible = False
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer.dll
deleted file mode 100644
index ed8847d2a..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_cs.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_cs.dll
deleted file mode 100644
index a4cff58d8..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_cs.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_da.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_da.dll
deleted file mode 100644
index 71be1136d..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_da.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_de.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_de.dll
deleted file mode 100644
index bbe50b676..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_de.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_en.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_en.dll
deleted file mode 100644
index 3d3e0789b..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_en.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_es.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_es.dll
deleted file mode 100644
index 25e227f27..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_es.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_fi.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_fi.dll
deleted file mode 100644
index 5248e4b7d..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_fi.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_fr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_fr.dll
deleted file mode 100644
index bd4977ece..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_fr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_hu.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_hu.dll
deleted file mode 100644
index 03f5a0476..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_hu.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_it.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_it.dll
deleted file mode 100644
index 808b29005..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_it.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_ja.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_ja.dll
deleted file mode 100644
index c4813d477..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_ja.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_ko.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_ko.dll
deleted file mode 100644
index dc3bf8a51..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_ko.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_nb.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_nb.dll
deleted file mode 100644
index 0fc725142..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_nb.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_nl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_nl.dll
deleted file mode 100644
index a5b926033..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_nl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_pl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_pl.dll
deleted file mode 100644
index 3ef2eca31..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_pl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_pt.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_pt.dll
deleted file mode 100644
index 69eadb69c..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_pt.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_ru.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_ru.dll
deleted file mode 100644
index a2b4a6de2..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_ru.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_sk.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_sk.dll
deleted file mode 100644
index d4c45fc6e..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_sk.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_sv.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_sv.dll
deleted file mode 100644
index 3a4704e5f..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_sv.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_th.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_th.dll
deleted file mode 100644
index 55fc06217..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_th.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_tr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_tr.dll
deleted file mode 100644
index 7e0223845..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_tr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_zh_CN.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_zh_CN.dll
deleted file mode 100644
index 1fda32854..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_zh_CN.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_zh_TW.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_zh_TW.dll
deleted file mode 100644
index 93502d09a..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/CRViewer_res_zh_TW.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/LCIDTable.xml b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/LCIDTable.xml
deleted file mode 100644
index 16550e3a9..000000000
--- a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/LCIDTable.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl.dll
deleted file mode 100644
index a39436c85..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_cs.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_cs.dll
deleted file mode 100644
index 153485056..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_cs.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_da.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_da.dll
deleted file mode 100644
index 67dbb0b65..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_da.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_de.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_de.dll
deleted file mode 100644
index 60e8920c9..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_de.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_en.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_en.dll
deleted file mode 100644
index 03184d472..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_en.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_es.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_es.dll
deleted file mode 100644
index 12f06a622..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_es.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_fi.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_fi.dll
deleted file mode 100644
index 0b7a79c4b..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_fi.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_fr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_fr.dll
deleted file mode 100644
index c79744981..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_fr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_hu.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_hu.dll
deleted file mode 100644
index 4f29662f6..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_hu.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_it.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_it.dll
deleted file mode 100644
index ea73fae3c..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_it.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_ja.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_ja.dll
deleted file mode 100644
index 4925e1d52..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_ja.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_ko.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_ko.dll
deleted file mode 100644
index 36df11530..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_ko.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_nb.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_nb.dll
deleted file mode 100644
index a7978f12d..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_nb.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_nl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_nl.dll
deleted file mode 100644
index b15af453e..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_nl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_pl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_pl.dll
deleted file mode 100644
index 5070a70a1..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_pl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_pt.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_pt.dll
deleted file mode 100644
index 7137e4ba2..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_pt.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_ru.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_ru.dll
deleted file mode 100644
index aac1009f5..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_ru.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_sk.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_sk.dll
deleted file mode 100644
index 716703993..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_sk.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_sv.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_sv.dll
deleted file mode 100644
index 3d12a32c4..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_sv.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_th.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_th.dll
deleted file mode 100644
index 0f1ea7ec4..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_th.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_tr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_tr.dll
deleted file mode 100644
index e2f68b1f6..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_tr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_zh_CN.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_zh_CN.dll
deleted file mode 100644
index 267d2eb65..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_zh_CN.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_zh_TW.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_zh_TW.dll
deleted file mode 100644
index fc7a2aed8..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/PrintControl_res_zh_TW.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/XERCES27_LICENSE.txt b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/XERCES27_LICENSE.txt
deleted file mode 100644
index d64569567..000000000
--- a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/XERCES27_LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/crviewer.dep b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/crviewer.dep
deleted file mode 100644
index 2b05d2796..000000000
--- a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/crviewer.dep
+++ /dev/null
@@ -1,42 +0,0 @@
-; ------------------------------------------------------------------------------
-; Dependency file for setup wizards.
-
-
-[Version]
-Version=12.0.0.88
-; ------------------------------------------------------------------------------
-; Dependencies for CRViewer.DLL
-
-
-[CRViewer.DLL]
-Dest=$(CommonFiles)\Business Objects\4.0\crystalreportviewers120\ActiveXControls
-Register=$(DLLSelfRegister)
-Version=12.0.0.88
-Uses1=CRAXDRT.DLL
-Uses2=COMCAT.DLL
-Uses3=OLEPRO32.DLL
-Uses4=gdiplus.dll
-Uses5=usp10.dll
-Uses6=
-
-[gdiplus.dll]
-Dest=$(CommonFiles)\Business Objects\4.0\bin
-Uses1=
-
-[usp10.dll]
-Dest=$(WinSysPath)
-Uses1=
-
-[COMCAT.DLL]
-Dest=$(WinSysPathSysFile)
-Register=$(DLLSelfRegister)
-Uses1=
-
-[OLEPRO32.DLL]
-Dest=$(WinSysPath)
-Uses1=
-
-[CRAXDRT.DLL]
-Dest=$(CommonFiles)\Business Objects\4.0\bin
-Register=$(dllSelfRegister)
-Uses1=
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg.dll
deleted file mode 100644
index 8a35cc74c..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_cs.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_cs.dll
deleted file mode 100644
index 78bb1329f..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_cs.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_da.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_da.dll
deleted file mode 100644
index 9b152bf2f..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_da.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_de.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_de.dll
deleted file mode 100644
index 6ef4485ca..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_de.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_en.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_en.dll
deleted file mode 100644
index b74030d86..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_en.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_es.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_es.dll
deleted file mode 100644
index 64e69777c..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_es.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_fi.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_fi.dll
deleted file mode 100644
index cf81dd0ac..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_fi.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_fr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_fr.dll
deleted file mode 100644
index 40b779e11..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_fr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_hu.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_hu.dll
deleted file mode 100644
index d49f64bf0..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_hu.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_it.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_it.dll
deleted file mode 100644
index 6f7fd3a5d..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_it.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_ja.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_ja.dll
deleted file mode 100644
index 3e64dc9df..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_ja.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_ko.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_ko.dll
deleted file mode 100644
index 2e554ede2..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_ko.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_nb.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_nb.dll
deleted file mode 100644
index f4699c359..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_nb.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_nl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_nl.dll
deleted file mode 100644
index 79ee9c850..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_nl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_pl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_pl.dll
deleted file mode 100644
index 588014949..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_pl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_pt.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_pt.dll
deleted file mode 100644
index 459be4349..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_pt.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_ru.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_ru.dll
deleted file mode 100644
index 73b112d81..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_ru.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_sk.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_sk.dll
deleted file mode 100644
index 9e9e23647..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_sk.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_sv.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_sv.dll
deleted file mode 100644
index c9506e2c8..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_sv.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_th.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_th.dll
deleted file mode 100644
index afd9ea235..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_th.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_tr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_tr.dll
deleted file mode 100644
index 4b7cbc3fb..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_tr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_zh_CN.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_zh_CN.dll
deleted file mode 100644
index 9001cf74f..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_zh_CN.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_zh_TW.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_zh_TW.dll
deleted file mode 100644
index 4a1d4e098..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/csprintdlg_res_zh_TW.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/pvlocale-1-0.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/pvlocale-1-0.dll
deleted file mode 100644
index 41e13ef3f..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/pvlocale-1-0.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp.dll
deleted file mode 100644
index 3e30360df..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_cs.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_cs.dll
deleted file mode 100644
index b4e0e2432..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_cs.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_da.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_da.dll
deleted file mode 100644
index c7401bec2..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_da.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_de.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_de.dll
deleted file mode 100644
index cf795bd31..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_de.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_en.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_en.dll
deleted file mode 100644
index c96458834..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_en.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_es.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_es.dll
deleted file mode 100644
index 9edd111a2..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_es.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_fi.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_fi.dll
deleted file mode 100644
index 81fb5e852..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_fi.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_fr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_fr.dll
deleted file mode 100644
index cfde7a2e7..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_fr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_hu.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_hu.dll
deleted file mode 100644
index a378b28bf..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_hu.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_it.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_it.dll
deleted file mode 100644
index 943073782..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_it.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_ja.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_ja.dll
deleted file mode 100644
index 3d2ad5905..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_ja.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_ko.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_ko.dll
deleted file mode 100644
index 2448fc273..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_ko.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_nb.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_nb.dll
deleted file mode 100644
index fc2525f98..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_nb.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_nl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_nl.dll
deleted file mode 100644
index 9ab882fe5..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_nl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_pl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_pl.dll
deleted file mode 100644
index 6ab382180..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_pl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_pt.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_pt.dll
deleted file mode 100644
index d2bad4afc..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_pt.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_ru.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_ru.dll
deleted file mode 100644
index 2341779a5..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_ru.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_sk.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_sk.dll
deleted file mode 100644
index f54d5b11f..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_sk.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_sv.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_sv.dll
deleted file mode 100644
index 49306b19c..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_sv.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_th.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_th.dll
deleted file mode 100644
index e2a51c342..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_th.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_tr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_tr.dll
deleted file mode 100644
index d3c90709a..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_tr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_zh_CN.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_zh_CN.dll
deleted file mode 100644
index 34aeb9baf..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_zh_CN.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_zh_TW.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_zh_TW.dll
deleted file mode 100644
index ed917adff..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/sviewhlp_res_zh_TW.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs.dll
deleted file mode 100644
index f97763ce8..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_cs.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_cs.dll
deleted file mode 100644
index 7b59fda90..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_cs.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_da.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_da.dll
deleted file mode 100644
index 8d20c9027..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_da.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_de.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_de.dll
deleted file mode 100644
index e1bd271b4..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_de.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_en.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_en.dll
deleted file mode 100644
index 9965b3898..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_en.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_es.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_es.dll
deleted file mode 100644
index 3cc6b8e48..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_es.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_fi.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_fi.dll
deleted file mode 100644
index a2bc49e0c..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_fi.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_fr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_fr.dll
deleted file mode 100644
index 8eb8f8d05..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_fr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_hu.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_hu.dll
deleted file mode 100644
index 2e8afa865..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_hu.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_it.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_it.dll
deleted file mode 100644
index def7d93ba..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_it.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_ja.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_ja.dll
deleted file mode 100644
index b000b9221..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_ja.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_ko.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_ko.dll
deleted file mode 100644
index fd87a3531..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_ko.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_nb.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_nb.dll
deleted file mode 100644
index 333dcabb7..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_nb.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_nl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_nl.dll
deleted file mode 100644
index 356d33c12..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_nl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_pl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_pl.dll
deleted file mode 100644
index 7c6234429..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_pl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_pt.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_pt.dll
deleted file mode 100644
index 47b5aad2f..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_pt.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_ru.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_ru.dll
deleted file mode 100644
index 6d33586d2..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_ru.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_sk.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_sk.dll
deleted file mode 100644
index ed89cd7ea..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_sk.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_sv.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_sv.dll
deleted file mode 100644
index 0b1d9e350..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_sv.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_th.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_th.dll
deleted file mode 100644
index eb06122ec..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_th.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_tr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_tr.dll
deleted file mode 100644
index 44ee7159a..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_tr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_zh_CN.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_zh_CN.dll
deleted file mode 100644
index ecbda8ae8..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_zh_CN.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_zh_TW.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_zh_TW.dll
deleted file mode 100644
index df671983e..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/swebrs_res_zh_TW.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl.dll
deleted file mode 100644
index c0c4dc884..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_cs.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_cs.dll
deleted file mode 100644
index a829874df..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_cs.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_da.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_da.dll
deleted file mode 100644
index df5c8b2ed..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_da.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_de.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_de.dll
deleted file mode 100644
index 59c93a0cd..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_de.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_en.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_en.dll
deleted file mode 100644
index 2c8c545d4..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_en.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_es.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_es.dll
deleted file mode 100644
index 4aaf49702..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_es.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_fi.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_fi.dll
deleted file mode 100644
index e861b40b0..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_fi.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_fr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_fr.dll
deleted file mode 100644
index dc739dfe6..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_fr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_hu.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_hu.dll
deleted file mode 100644
index 6090f8bb0..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_hu.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_it.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_it.dll
deleted file mode 100644
index b3a54f4dd..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_it.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_ja.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_ja.dll
deleted file mode 100644
index b91938258..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_ja.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_ko.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_ko.dll
deleted file mode 100644
index 653e894d8..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_ko.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_nb.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_nb.dll
deleted file mode 100644
index eea8e180b..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_nb.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_nl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_nl.dll
deleted file mode 100644
index 06a02473c..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_nl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_pl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_pl.dll
deleted file mode 100644
index 00a18426f..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_pl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_pt.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_pt.dll
deleted file mode 100644
index 1bcc00419..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_pt.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_ru.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_ru.dll
deleted file mode 100644
index 3032ebdfc..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_ru.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_sk.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_sk.dll
deleted file mode 100644
index 6181d8883..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_sk.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_sv.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_sv.dll
deleted file mode 100644
index 487a25eca..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_sv.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_th.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_th.dll
deleted file mode 100644
index c13e2ea71..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_th.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_tr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_tr.dll
deleted file mode 100644
index 3edf50b84..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_tr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_zh_CN.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_zh_CN.dll
deleted file mode 100644
index 58def180f..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_zh_CN.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_zh_TW.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_zh_TW.dll
deleted file mode 100644
index 4ccc56307..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/PrintControl_res_zh_TW.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/XERCES27_LICENSE.txt b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/XERCES27_LICENSE.txt
deleted file mode 100644
index d64569567..000000000
--- a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/XERCES27_LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg.dll
deleted file mode 100644
index 9c151391c..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_cs.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_cs.dll
deleted file mode 100644
index de1e92310..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_cs.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_da.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_da.dll
deleted file mode 100644
index 3e3810920..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_da.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_de.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_de.dll
deleted file mode 100644
index f03d46317..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_de.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_en.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_en.dll
deleted file mode 100644
index 9077cbad7..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_en.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_es.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_es.dll
deleted file mode 100644
index 157d36a74..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_es.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_fi.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_fi.dll
deleted file mode 100644
index 38622de62..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_fi.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_fr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_fr.dll
deleted file mode 100644
index fdce10738..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_fr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_hu.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_hu.dll
deleted file mode 100644
index f2104ed10..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_hu.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_it.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_it.dll
deleted file mode 100644
index 7482484a4..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_it.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_ja.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_ja.dll
deleted file mode 100644
index 664517b09..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_ja.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_ko.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_ko.dll
deleted file mode 100644
index 19846bbd8..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_ko.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_nb.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_nb.dll
deleted file mode 100644
index fa520922e..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_nb.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_nl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_nl.dll
deleted file mode 100644
index 09911d906..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_nl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_pl.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_pl.dll
deleted file mode 100644
index 93008e092..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_pl.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_pt.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_pt.dll
deleted file mode 100644
index df3790ef1..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_pt.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_ru.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_ru.dll
deleted file mode 100644
index da268ac2a..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_ru.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_sk.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_sk.dll
deleted file mode 100644
index 5cd4ea740..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_sk.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_sv.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_sv.dll
deleted file mode 100644
index f35b40bdc..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_sv.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_th.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_th.dll
deleted file mode 100644
index 9d6807bc2..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_th.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_tr.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_tr.dll
deleted file mode 100644
index c60b356ea..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_tr.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_zh_CN.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_zh_CN.dll
deleted file mode 100644
index 2dedb7c0b..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_zh_CN.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_zh_TW.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_zh_TW.dll
deleted file mode 100644
index bae6570f9..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/csprintdlg_res_zh_TW.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/pvlocale-1-0.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/pvlocale-1-0.dll
deleted file mode 100644
index 3c8fe2416..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/pvlocale-1-0.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/xerces-c_2_7.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/xerces-c_2_7.dll
deleted file mode 100644
index 9a81d47f1..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/win64_x64/xerces-c_2_7.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/xerces-c_2_7.dll b/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/xerces-c_2_7.dll
deleted file mode 100644
index bde06c300..000000000
Binary files a/aspnet_client/system_web/4_6_79/crystalreportviewers/ActiveXControls/xerces-c_2_7.dll and /dev/null differ
diff --git a/aspnet_client/system_web/4_6_79/crystalreportviewers/allInOne.js b/aspnet_client/system_web/4_6_79/crystalreportviewers/allInOne.js
deleted file mode 100644
index 6f8cadda4..000000000
--- a/aspnet_client/system_web/4_6_79/crystalreportviewers/allInOne.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/***
-
-MochiKit.Base 1.4
-
-See for documentation, downloads, license, etc.
-
-(c) 2005 Bob Ippolito. All rights Reserved.
-
-***/
-if(typeof (dojo)!="undefined"){dojo.provide("MochiKit.Base")}if(typeof (MochiKit)=="undefined"){MochiKit={}}if(typeof (MochiKit.Base)=="undefined"){MochiKit.Base={}}MochiKit.Base.VERSION="1.4";MochiKit.Base.NAME="MochiKit.Base";MochiKit.Base.update=function(B,D){if(B===null){B={}}for(var C=1;CC){A=C}}G=[];for(E=0;E=0;H--){G=[E[H].apply(this,G)]}return G[0]}},bind:function(E,C){if(typeof (E)=="string"){E=C[E]}var D=E.im_func;var G=E.im_preargs;var B=E.im_self;var A=MochiKit.Base;if(typeof (E)=="function"&&typeof (E.apply)=="undefined"){E=A._wrapDumbFunction(E)}if(typeof (D)!="function"){D=E}if(typeof (C)!="undefined"){B=C}if(typeof (G)=="undefined"){G=[]}else{G=G.slice()}A.extend(G,arguments,2);var F=function(){var I=arguments;var J=arguments.callee;if(J.im_preargs.length>0){I=A.concat(J.im_preargs,I)}var H=J.im_self;if(!H){H=this}return J.im_func.apply(H,I)};F.im_self=B;F.im_func=D;F.im_preargs=G;return F},bindMethods:function(B){var D=MochiKit.Base.bind;for(var A in B){var C=B[A];if(typeof (C)=="function"){B[A]=D(C,B)}}},registerComparator:function(C,B,A,D){MochiKit.Base.comparatorRegistry.register(C,B,A,D)},_primitives:{"boolean":true,string:true,number:true},compare:function(F,B){if(F==B){return 0}var E=(typeof (F)=="undefined"||F===null);var G=(typeof (B)=="undefined"||B===null);if(E&&G){return 0}else{if(E){return -1}else{if(G){return 1}}}var A=MochiKit.Base;var D=A._primitives;if(!(typeof (F) in D&&typeof (B) in D)){try{return A.comparatorRegistry.match(F,B)}catch(H){if(H!=A.NotFound){throw H}}}if(FB){return 1}}var C=A.repr;throw new TypeError(C(F)+" and "+C(B)+" can not be compared")},compareDateLike:function(B,A){return MochiKit.Base.compare(B.getTime(),A.getTime())},compareArrayLike:function(B,A){var F=MochiKit.Base.compare;var E=B.length;var G=0;if(E>A.length){G=1;E=A.length}else{if(E=0;C--){D+=F[C]}}else{D+=F}}if(E<=0){throw new TypeError("mean() requires at least one argument")}return D/E},median:function(){var B=MochiKit.Base.flattenArguments(arguments);if(B.length===0){throw new TypeError("median() requires at least one argument")}B.sort(compare);if(B.length%2==0){var A=B.length/2;return(B[A]+B[A-1])/2}else{return B[(B.length-1)/2]}},findValue:function(A,E,F,B){if(typeof (B)=="undefined"||B===null){B=A.length}if(typeof (F)=="undefined"||F===null){F=0}var D=MochiKit.Base.compare;for(var C=F;C0))){var G=MochiKit.DOM.formContents(H);H=G[0];I=G[1]}else{if(arguments.length==1){var A=H;H=[];I=[];for(var B in A){var J=A[B];if(typeof (J)!="function"){H.push(B);I.push(J)}}}}var E=[];var F=Math.min(H.length,I.length);var C=MochiKit.Base.urlEncode;for(var D=0;D1){A=MochiKit.Base.partial.apply(null,arguments)}return this.addCallbacks(A,A)},addCallback:function(A){if(arguments.length>1){A=MochiKit.Base.partial.apply(null,arguments)}return this.addCallbacks(A,null)},addErrback:function(A){if(arguments.length>1){A=MochiKit.Base.partial.apply(null,arguments)}return this.addCallbacks(null,A)},addCallbacks:function(A,B){if(this.chained){throw new Error("Chained Deferreds can not be re-used")}this.chain.push([A,B]);if(this.fired>=0){this._fire()}return this},_fire:function(){var D=this.chain;var G=this.fired;var C=this.results[G];var B=this;var A=null;while(D.length>0&&this.paused===0){var H=D.shift();var F=H[G];if(F===null){continue}try{C=F(C);G=((C instanceof Error)?1:0);if(C instanceof MochiKit.Async.Deferred){A=function(I){B._resback(I);B.paused--;if((B.paused===0)&&(B.fired>=0)){B._fire()}};this.paused++}}catch(E){G=1;if(!(E instanceof Error)){E=new MochiKit.Async.GenericError(E)}C=E}}this.fired=G;this.results[G]=C;if(A&&this.paused){C.addBoth(A);C.chained=true}}};MochiKit.Base.update(MochiKit.Async,{evalJSONRequest:function(){return eval("("+arguments[0].responseText+")")},succeed:function(A){var B=new MochiKit.Async.Deferred();B.callback.apply(B,arguments);return B},fail:function(A){var B=new MochiKit.Async.Deferred();B.errback.apply(B,arguments);return B},getXMLHttpRequest:function(){var A=arguments.callee;if(!A.XMLHttpRequest){var E=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.4.0")},function(){throw new MochiKit.Async.BrowserComplianceError("Browser does not support XMLHttpRequest")}];for(var B=0;B1){var B=MochiKit.Base;var A=B.queryString.apply(null,B.extend(null,arguments,1));if(A){D+="?"+A}}E.open("GET",D,true);return C.sendXMLHttpRequest(E)},loadJSONDoc:function(B){var A=MochiKit.Async;var C=A.doSimpleXMLHttpRequest.apply(A,arguments);C=C.addCallback(A.evalJSONRequest);return C},wait:function(E,C){var D=new MochiKit.Async.Deferred();var A=MochiKit.Base;if(typeof (C)!="undefined"){D.addCallback(function(){return C})}var B=setTimeout(A.bind("callback",D),Math.floor(E*1000));D.canceller=function(){try{clearTimeout(B)}catch(F){}};return D},callLater:function(D,B){var A=MochiKit.Base;var C=A.partial.apply(A,A.extend(null,arguments,1));return MochiKit.Async.wait(D).addCallback(function(E){return C()})}});MochiKit.Async.DeferredLock=function(){this.waiting=[];this.locked=false;this.id=this._nextId()};MochiKit.Async.DeferredLock.prototype={__class__:MochiKit.Async.DeferredLock,acquire:function(){d=new MochiKit.Async.Deferred();if(this.locked){this.waiting.push(d)}else{this.locked=true;d.callback(this)}return d},release:function(){if(!this.locked){throw TypeError("Tried to release an unlocked DeferredLock")}this.locked=false;if(this.waiting.length>0){this.locked=true;this.waiting.shift().callback(this)}},_nextId:MochiKit.Base.counter(),repr:function(){var A;if(this.locked){A="locked, "+this.waiting.length+" waiting"}else{A="unlocked"}return"DeferredLock("+this.id+", "+A+")"},toString:MochiKit.Base.forwardCall("repr")};MochiKit.Async.DeferredList=function(G,F,B,D,I){MochiKit.Async.Deferred.apply(this,[I]);this.list=G;var A=[];this.resultList=A;this.finishedCount=0;this.fireOnOneCallback=F;this.fireOnOneErrback=B;this.consumeErrors=D;var C=MochiKit.Base.bind(this._cbDeferred,this);for(var E=0;E=0){var H=K.options[K.selectedIndex];E.push(F);C.push((H.value)?H.value:H.text);return null}E.push(F);C.push("");return null}else{var J=K.options;if(!J.length){E.push(F);C.push("");return null}for(var G=0;G0){return D}if(typeof (D)=="number"||typeof (D)=="boolean"){D=D.toString()}if(typeof (D)=="string"){return L._document.createTextNode(D)}if(typeof (D.__dom__)=="function"){D=D.__dom__(M);continue}if(typeof (D.dom)=="function"){D=D.dom(M);continue}if(typeof (D)=="function"){D=D.apply(M,[M]);continue}if(I){var F=null;try{F=J(D)}catch(H){}if(F){return A(C,F,B(M))}}try{D=K.match(D,M);continue}catch(H){if(H!=G){throw H}}return L._document.createTextNode(D.toString())}return undefined},setNodeAttribute:function(B,A,C){var E={};E[A]=C;try{return MochiKit.DOM.updateNodeAttributes(B,E)}catch(D){}return null},getNodeAttribute:function(D,A){var C=MochiKit.DOM;var B=C.attributeArray.renames[A];D=C.getElement(D);try{if(B){return D[B]}return D.getAttribute(A)}catch(E){}return null},updateNodeAttributes:function(B,F){var C=B;var I=MochiKit.DOM;if(typeof (B)=="string"){C=I.getElement(B)}if(F){var H=MochiKit.Base.updatetree;if(I.attributeArray.compliant){for(var D in F){var G=F[D];if(typeof (G)=="object"&&typeof (C[D])=="object"){H(C[D],G)}else{if(D.substring(0,2)=="on"){if(typeof (G)=="string"){G=new Function(G)}C[D]=G}else{C.setAttribute(D,G)}}}}else{var E=I.attributeArray.renames;for(D in F){G=F[D];var A=E[D];if(D=="style"&&typeof (G)=="string"){C.style.cssText=G}else{if(typeof (A)=="string"){C[A]=G}else{if(typeof (C[D])=="object"&&typeof (G)=="object"){H(C[D],G)}else{if(D.substring(0,2)=="on"){if(typeof (G)=="string"){G=new Function(G)}C[D]=G}else{C.setAttribute(D,G)}}}}}}}return C},appendChildNodes:function(C){var B=C;var A=MochiKit.DOM;if(typeof (C)=="string"){B=A.getElement(C)}var D=[A.coerceToDOM(MochiKit.Base.extend(null,arguments,1),B)];var E=MochiKit.Base.concat;while(D.length){var F=D.shift();if(typeof (F)=="undefined"||F===null){}else{if(typeof (F.nodeType)=="number"){B.appendChild(F)}else{D=E(F,D)}}}return B},replaceChildNodes:function(C){var B=C;var A=MochiKit.DOM;if(typeof (C)=="string"){B=A.getElement(C);arguments[0]=B}var D;while((D=B.firstChild)){B.removeChild(D)}if(arguments.length<2){return B}else{return A.appendChildNodes.apply(this,arguments)}},createDOM:function(E,D){var G;var B=MochiKit.DOM;var A=MochiKit.Base;if(typeof (D)=="string"||typeof (D)=="number"){var C=A.extend([E,null],arguments,1);return arguments.callee.apply(this,C)}if(typeof (E)=="string"){if(D&&!B.attributeArray.compliant){var F="";if("name" in D){F+=' name="'+B.escapeHTML(D.name)+'"'}if(E=="input"&&"type" in D){F+=' type="'+B.escapeHTML(D.type)+'"'}if(F){E="<"+E+F+">"}}G=B._document.createElement(E)}else{G=E}if(D){B.updateNodeAttributes(G,D)}if(arguments.length<=2){return G}else{var C=A.extend([G],arguments,2);return B.appendChildNodes.apply(this,C)}},createDOMFunc:function(){var A=MochiKit.Base;return A.partial.apply(this,A.extend([MochiKit.DOM.createDOM],arguments))},removeElement:function(A){var B=MochiKit.DOM.getElement(A);B.parentNode.removeChild(B);return B},swapDOM:function(B,D){var A=MochiKit.DOM;B=A.getElement(B);var C=B.parentNode;if(D){D=A.getElement(D);C.replaceChild(D,B)}else{C.removeChild(B)}return D},getElement:function(B){var A=MochiKit.DOM;if(arguments.length==1){return((typeof (B)=="string")?A._document.getElementById(B):B)}else{return MochiKit.Base.map(A.getElement,arguments)}},getElementsByTagAndClassName:function(E,H,I){var J=MochiKit.DOM;if(typeof (E)=="undefined"||E===null){E="*"}if(typeof (I)=="undefined"||I===null){I=J._document}I=J.getElement(I);var D=(I.getElementsByTagName(E)||J._document.all);if(typeof (H)=="undefined"||H===null){return MochiKit.Base.extend(null,D)}var B=[];for(var G=0;G/g,">")},toHTML:function(A){return MochiKit.DOM.emitHTML(A).join("")},emitHTML:function(C,F){if(typeof (F)=="undefined"||F===null){F=[]}var H=[C];var M=MochiKit.DOM;var L=M.escapeHTML;var A=M.attributeArray;while(H.length){C=H.pop();if(typeof (C)=="string"){F.push(C)}else{if(C.nodeType==1){F.push("<"+C.nodeName.toLowerCase());var D=[];var I=A(C);for(var E=0;E");H.push(""+C.nodeName.toLowerCase()+">");var G=C.childNodes;for(E=G.length-1;E>=0;E--){H.push(G[E])}}else{F.push("/>")}}else{if(C.nodeType==3){F.push(L(C.nodeValue))}}}}return F},scrapeText:function(B,A){var C=[];(function(F){var G=F.childNodes;if(G){for(var E=0;E0){var B=D.filter;A=function(L){return B(A.ignoreAttrFilter,L.attributes)};A.ignoreAttr={};var K=J.attributes;var E=A.ignoreAttr;for(var G=0;G1){var A=MochiKit.DOM.getElement(arguments[0]);var K=arguments[1];var F=arguments[2];var C=arguments[3];for(var E=H.length-1;E>=0;E--){var B=H[E];if(B[0]===A&&B[1]===K&&B[4]===F&&B[5]===C){J._disconnect(B);H.splice(E,1);return true}}}else{var I=D.findIdentical(H,G);if(I>=0){J._disconnect(G);H.splice(I,1);return true}}return false},disconnectAll:function(A,J){A=MochiKit.DOM.getElement(A);var B=MochiKit.Base;var C=B.flattenArguments(B.extend(null,arguments,1));var H=MochiKit.Signal;var G=H._disconnect;var F=H._observers;if(C.length===0){for(var E=F.length-1;E>=0;E--){var D=F[E];if(D[0]===A){G(D);F.splice(E,1)}}}else{var I={};for(var E=0;E=0;E--){var D=F[E];if(D[0]===A&&D[1] in I){G(D);F.splice(E,1)}}}},signal:function(G,F){var E=MochiKit.Signal._observers;G=MochiKit.DOM.getElement(G);var A=MochiKit.Base.extend(null,arguments,2);var H=[];for(var B=0;B1){var D=new Error("Multiple errors thrown in handling 'sig', see errors property");D.errors=H;throw D}}}});MochiKit.Signal.EXPORT_OK=[];MochiKit.Signal.EXPORT=["connect","disconnect","signal","disconnectAll"];MochiKit.Signal.__new__=function(C){var A=MochiKit.Base;this._document=document;this._window=C;try{this.connect(window,"onunload",this._unloadCache)}catch(B){}this.EXPORT_TAGS={":common":this.EXPORT,":all":A.concat(this.EXPORT,this.EXPORT_OK)};A.nameFunctions(this)};MochiKit.Signal.__new__(this);if(MochiKit.__export__){connect=MochiKit.Signal.connect;disconnect=MochiKit.Signal.disconnect;disconnectAll=MochiKit.Signal.disconnectAll;signal=MochiKit.Signal.signal}MochiKit.Base._exportSymbols(this,MochiKit.Signal);MochiKit.Base.update(MochiKit.Base,{isIE:function(){return/MSIE/.test(navigator.userAgent)},isGecko:function(){return/Gecko/.test(navigator.userAgent)},isKHTML:function(){return/Konqueror|Safari|KHTML/.test(navigator.userAgent)},isSafari:function(){return/AppleWebKit'/.test(navigator.appVersion)},isOpera:function(){return/Opera/.test(navigator.userAgent)}});MochiKit.Base.update(MochiKit.DOM,{getStyle:function(B,C){B=MochiKit.DOM.getElement(B);var D=B.style[MochiKit.Base.camelize(C)];if(!D){if(document.defaultView&&document.defaultView.getComputedStyle){var A=document.defaultView.getComputedStyle(B,null);D=A?A.getPropertyValue(C):null}else{if(B.currentStyle){D=B.currentStyle[MochiKit.Base.camelize(C)]}}}if(MochiKit.Base.isOpera()&&(MochiKit.Base.find(["left","top","right","bottom"],C))){if(MochiKit.DOM.getStyle(B,"position")=="static"){D="auto"}}return D=="auto"?null:D},setStyle:function(B,C){B=MochiKit.DOM.getElement(B);for(var A in C){B.style[MochiKit.Base.camelize(A)]=C[A]}},getOpacity:function(B){var A;if(A=MochiKit.DOM.getStyle(B,"opacity")){return parseFloat(A)}if(A=(MochiKit.DOM.getStyle(B,"filter")||"").match(/alpha\(opacity=(.*)\)/)){if(A[1]){return parseFloat(A[1])/100}}return 1},getInlineOpacity:function(A){return MochiKit.DOM.getElement(A).style.opacity||""},setOpacity:function(A,C){A=MochiKit.DOM.getElement(A);if(C==1){var B=A.style.cssText;if(MochiKit.Base.isIE()){B=B.replace(/filter: ?alpha\([^\)]*\);?/gi,"")}A.style.cssText=B.replace(/opacity: ?\d\.?\d*/gi,"")}else{if(C<0.00001){C=0}MochiKit.DOM.setStyle(A,{opacity:C});if(MochiKit.Base.isIE()){MochiKit.DOM.setStyle(A,{filter:MochiKit.DOM.getStyle(A,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+C*100+")"})}}},isVisible:function(A){return MochiKit.DOM.getElement(A).style.display!="none"},makeClipping:function(A){A=MochiKit.DOM.getElement(A);if(A._overflow){return }A._overflow=A.style.overflow;if((MochiKit.DOM.getStyle(A,"overflow")||"visible")!="hidden"){A.style.overflow="hidden"}},undoClipping:function(A){A=MochiKit.DOM.getElement(A);if(!A._overflow){return }A.style.overflow=A._overflow;A._overflow=undefined},makePositioned:function(A){A=MochiKit.DOM.getElement(A);var B=MochiKit.DOM.getStyle(A,"position");if((B=="static"||!B)&&!A._madePositioned){A._madePositioned=true;A.style.position="relative";if(MochiKit.Base.isOpera()){A.style.top=0;A.style.left=0}}},undoPositioned:function(A){A=MochiKit.DOM.getElement(A);if(A._madePositioned){A._madePositioned=undefined;A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""}},getFirstElementByTagAndClassName:function(D,G,H){var I=MochiKit.DOM;if(typeof (D)=="undefined"||D===null){D="*"}if(typeof (H)=="undefined"||H===null){H=I._document}H=I.getElement(H);var C=(H.getElementsByTagName(D)||I._document.all);if(typeof (G)=="undefined"||G===null){return MochiKit.Base.extend(null,C)}for(var F=0;F=this.offset.y&&C=this.offset.x&&A=this.offset.y&&this.ycomp=this.offset.x&&this.xcomp0){return B}}return null},fromBackground:function(B){var A=MochiKit.Color.Color;return A.fromComputedStyle(B,"backgroundColor","background-color")||A.whiteColor()},fromText:function(B){var A=MochiKit.Color.Color;return A.fromComputedStyle(B,"color","color")||A.blackColor()},namedColors:function(){return MochiKit.Base.clone(MochiKit.Color.Color._namedColors)}});MochiKit.Base.update(MochiKit.Color,{__new__:function(){var A=MochiKit.Base;A.nameFunctions(this);this.EXPORT_TAGS={":common":this.EXPORT,":all":A.concat(this.EXPORT,this.EXPORT_OK)}}});MochiKit.Color.EXPORT=["Color"];MochiKit.Color.EXPORT_OK=["clampColorComponent","rgbToHSL","hslToRGB","rgbToHSV","hsvToRGB","toColorPart"];MochiKit.Color.__new__();MochiKit.Base._exportSymbols(this,MochiKit.Color);if(typeof (dojo)!="undefined"){dojo.provide("MochiKit.Iter");dojo.require("MochiKit.Base")}if(typeof (JSAN)!="undefined"){JSAN.use("MochiKit.Base",[])}try{if(typeof (MochiKit.Base)=="undefined"){throw""}}catch(e){throw"MochiKit.Iter depends on MochiKit.Base!"}if(typeof (MochiKit.Iter)=="undefined"){MochiKit.Iter={}}MochiKit.Iter.NAME="MochiKit.Iter";MochiKit.Iter.VERSION="1.4";MochiKit.Base.update(MochiKit.Iter,{__repr__:function(){return"["+this.NAME+" "+this.VERSION+"]"},toString:function(){return this.__repr__()},registerIteratorFactory:function(B,A,D,C){MochiKit.Iter.iteratorRegistry.register(B,A,D,C)},iter:function(D,C){var B=MochiKit.Iter;if(arguments.length==2){return B.takewhile(function(F){return F!=C},D)}if(typeof (D.next)=="function"){return D}else{if(typeof (D.iter)=="function"){return D.iter()}}try{return B.iteratorRegistry.match(D)}catch(E){var A=MochiKit.Base;if(E==A.NotFound){E=new TypeError(typeof (D)+": "+A.repr(D)+" is not iterable")}throw E}},repeat:function(B,C){var A=MochiKit.Base;if(typeof (C)=="undefined"){return{repr:function(){return"repeat("+A.repr(B)+")"},toString:A.forwardCall("repr"),next:function(){return B}}}return{repr:function(){return"repeat("+A.repr(B)+", "+C+")"},toString:A.forwardCall("repr"),next:function(){if(C<=0){throw MochiKit.Iter.StopIteration}C-=1;return B}}},next:function(A){return A.next()},ifilter:function(C,B){var A=MochiKit.Base;B=MochiKit.Iter.iter(B);if(C===null){C=A.operator.truth}return{repr:function(){return"ifilter(...)"},toString:A.forwardCall("repr"),next:function(){while(true){var D=B.next();if(C(D)){return D}}return undefined}}},ifilterfalse:function(C,B){var A=MochiKit.Base;B=MochiKit.Iter.iter(B);if(C===null){C=A.operator.truth}return{repr:function(){return"ifilterfalse(...)"},toString:A.forwardCall("repr"),next:function(){while(true){var D=B.next();if(!C(D)){return D}}return undefined}}},imap:function(C,H,F){var A=MochiKit.Base;var D=MochiKit.Iter;var B=A.map(D.iter,A.extend(null,arguments,1));var G=A.map;var E=D.next;return{repr:function(){return"imap(...)"},toString:A.forwardCall("repr"),next:function(){return C.apply(this,G(E,B))}}},list:function(C){var A=MochiKit.Base;if(typeof (C.slice)=="function"){return C.slice()}else{if(A.isArrayLike(C)){return A.concat(C)}}var B=MochiKit.Iter;C=B.iter(C);var E=[];try{while(true){E.push(C.next())}}catch(D){if(D!=B.StopIteration){throw D}return E}return undefined},forEach:function(E,D,B){var A=MochiKit.Base;if(arguments.length>2){D=A.bind(D,B)}if(A.isArrayLike(E)){try{for(var C=0;C=B.length){throw MochiKit.Iter.StopIteration}return B[A++]}}},hasIterateNext:function(A){return(A&&typeof (A.iterateNext)=="function")},iterateNextIter:function(A){return{repr:function(){return"iterateNextIter(...)"},toString:MochiKit.Base.forwardCall("repr"),next:function(){var B=A.iterateNext();if(B===null||B===undefined){throw MochiKit.Iter.StopIteration}return B}}}});MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter",];MochiKit.Iter.EXPORT=["StopIteration","registerIteratorFactory","iter","count","cycle","repeat","next","izip","ifilter","ifilterfalse","islice","imap","applymap","chain","takewhile","dropwhile","tee","list","reduce","range","sum","exhaust","forEach","every","sorted","reversed","some","iextend","groupby","groupby_as_array"];MochiKit.Iter.__new__=function(){var A=MochiKit.Base;if(typeof (StopIteration)!="undefined"){this.StopIteration=StopIteration}else{this.StopIteration=new A.NamedError("StopIteration")}this.iteratorRegistry=new A.AdapterRegistry();this.registerIteratorFactory("arrayLike",A.isArrayLike,this.arrayLikeIter);this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter);this.EXPORT_TAGS={":common":this.EXPORT,":all":A.concat(this.EXPORT,this.EXPORT_OK)};A.nameFunctions(this)};MochiKit.Iter.__new__();if(MochiKit.__export__){reduce=MochiKit.Iter.reduce}MochiKit.Base._exportSymbols(this,MochiKit.Iter);if(typeof (dojo)!="undefined"){dojo.provide("MochiKit.Visual");dojo.require("MochiKit.Base");dojo.require("MochiKit.DOM");dojo.require("MochiKit.Style");dojo.require("MochiKit.Color");dojo.require("MochiKit.Iter")}if(typeof (JSAN)!="undefined"){JSAN.use("MochiKit.Base",[]);JSAN.use("MochiKit.DOM",[]);JSAN.use("MochiKit.Style",[]);JSAN.use("MochiKit.Color",[]);JSAN.use("MochiKit.Iter",[])}try{if(typeof (MochiKit.Base)==="undefined"||typeof (MochiKit.DOM)==="undefined"||typeof (MochiKit.Style)==="undefined"||typeof (MochiKit.Color)==="undefined"||typeof (MochiKit.Iter)==="undefined"){throw""}}catch(e){throw"MochiKit.Visual depends on MochiKit.Base, MochiKit.DOM, MochiKit.Style, MochiKit.Color and MochiKit.Iter!"}if(typeof (MochiKit.Visual)=="undefined"){MochiKit.Visual={}}MochiKit.Visual.NAME="MochiKit.Visual";MochiKit.Visual.VERSION="1.4";MochiKit.Visual.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};MochiKit.Visual.toString=function(){return this.__repr__()};MochiKit.Visual.forceRerendering=function(A){try{A=MochiKit.DOM.getElement(A);var C=document.createTextNode(" ");A.appendChild(C);A.removeChild(C)}catch(B){}};MochiKit.Visual.PAIRS={slide:["slideDown","slideUp"],blind:["blindDown","blindUp"],appear:["appear","fade"],size:["grow","shrink"]};MochiKit.Visual.Transitions={};MochiKit.Visual.Transitions.linear=function(A){return A};MochiKit.Visual.Transitions.sinoidal=function(A){return(-Math.cos(A*Math.PI)/2)+0.5};MochiKit.Visual.Transitions.reverse=function(A){return 1-A};MochiKit.Visual.Transitions.flicker=function(A){return((-Math.cos(A*Math.PI)/4)+0.75)+Math.random()/4};MochiKit.Visual.Transitions.wobble=function(A){return(-Math.cos(A*Math.PI*(9*A))/2)+0.5};MochiKit.Visual.Transitions.pulse=function(A){return(Math.floor(A*10)%2==0?(A*10-Math.floor(A*10)):1-(A*10-Math.floor(A*10)))};MochiKit.Visual.Transitions.none=function(A){return 0};MochiKit.Visual.Transitions.full=function(A){return 1};MochiKit.Visual.ScopedQueue=function(){this.__init__()};MochiKit.Base.update(MochiKit.Visual.ScopedQueue.prototype,{__init__:function(){this.effects=[];this.interval=null},add:function(D){var E=new Date().getTime();var A=(typeof (D.options.queue)=="string")?D.options.queue:D.options.queue.position;var B=MochiKit.Iter.forEach;switch(A){case"front":B(this.effects,function(F){if(F.state=="idle"){F.startOn+=D.finishOn;F.finishOn+=D.finishOn}});break;case"end":var C;B(this.effects,function(G){var F=G.finishOn;if(F>=(C||F)){C=F}});E=C||E;break}D.startOn+=E;D.finishOn+=E;if(!D.options.queue.limit||this.effects.length=this.startOn){if(C>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");this.finish();this.event("afterFinish");return }var B=(C-this.startOn)/(this.finishOn-this.startOn);var A=Math.round(B*this.options.fps*this.options.duration);if(A>this.currentFrame){this.render(B);this.currentFrame=A}}},render:function(A){if(this.state=="idle"){this.state="running";this.event("beforeSetup");this.setup();this.event("afterSetup")}if(this.state=="running"){if(this.options.transition){A=this.options.transition(A)}A*=(this.options.to-this.options.from);A+=this.options.from;this.event("beforeUpdate");this.update(A);this.event("afterUpdate")}},cancel:function(){if(!this.options.sync){MochiKit.Visual.Queues.get(typeof (this.options.queue)=="string"?"global":this.options.queue.scope).remove(this)}this.state="finished"},setup:function(){},finish:function(){},update:function(A){},event:function(A){if(this.options[A+"Internal"]){this.options[A+"Internal"](this)}if(this.options[A]){this.options[A](this)}},repr:function(){return"["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]"}};MochiKit.Visual.Opacity=function(B,A){this.__init__(B,A)};MochiKit.Visual.Opacity.prototype=new MochiKit.Visual.Base();MochiKit.Base.update(MochiKit.Visual.Opacity.prototype,{__init__:function(C,B){var A=MochiKit.Base;var D=MochiKit.DOM;this.element=D.getElement(C);if(A.isIE()&&(!this.element.currentStyle.hasLayout)){D.setStyle(this.element,{zoom:1})}B=A.update({from:D.getOpacity(this.element)||0,to:1},B||{});this.start(B)},update:function(A){MochiKit.DOM.setOpacity(this.element,A)}});MochiKit.Visual.Move=function(B,A){this.__init__(B,A)};MochiKit.Visual.Move.prototype=new MochiKit.Visual.Base();MochiKit.Base.update(MochiKit.Visual.Move.prototype,{__init__:function(B,A){this.element=MochiKit.DOM.getElement(B);A=MochiKit.Base.update({x:0,y:0,mode:"relative"},A||{});this.start(A)},setup:function(){var D=MochiKit.DOM;D.makePositioned(this.element);var B=this.element.style;var C=B.visibility;var A=B.display;if(A=="none"){B.visibility="hidden";B.display=""}this.originalLeft=parseFloat(D.getStyle(this.element,"left")||"0");this.originalTop=parseFloat(D.getStyle(this.element,"top")||"0");if(this.options.mode=="absolute"){this.options.x-=this.originalLeft;this.options.y-=this.originalTop}if(A=="none"){B.visibility=C;B.display=A}},update:function(A){MochiKit.DOM.setStyle(this.element,{left:Math.round(this.options.x*A+this.originalLeft)+"px",top:Math.round(this.options.y*A+this.originalTop)+"px"})}});MochiKit.Visual.Scale=function(B,C,A){this.__init__(B,C,A)};MochiKit.Visual.Scale.prototype=new MochiKit.Visual.Base();MochiKit.Base.update(MochiKit.Visual.Scale.prototype,{__init__:function(B,C,A){this.element=MochiKit.DOM.getElement(B);A=MochiKit.Base.update({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:C},A||{});this.start(A)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=MochiKit.DOM.getStyle(this.element,"position");var B=MochiKit.Iter.forEach;var A=MochiKit.Base.bind;this.originalStyle={};B(["top","left","width","height","fontSize"],A(function(D){this.originalStyle[D]=this.element.style[D]},this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var C=MochiKit.DOM.getStyle(this.element,"font-size")||"100%";B(["em","px","%"],A(function(D){if(C.indexOf(D)>0){this.fontSize=parseFloat(C);this.fontSizeType=D}},this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}else{if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}else{this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}}},update:function(A){var B=(this.options.scaleFrom/100)+(this.factor*A);if(this.options.scaleContent&&this.fontSize){MochiKit.DOM.setStyle(this.element,{fontSize:this.fontSize*B+this.fontSizeType})}this.setDimensions(this.dims[0]*B,this.dims[1]*B)},finish:function(){if(this.restoreAfterFinish){MochiKit.DOM.setStyle(this.element,this.originalStyle)}},setDimensions:function(A,D){var E={};if(this.options.scaleX){E.width=Math.round(D)+"px"}if(this.options.scaleY){E.height=Math.round(A)+"px"}if(this.options.scaleFromCenter){var C=(A-this.dims[0])/2;var B=(D-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){E.top=this.originalTop-C+"px"}if(this.options.scaleX){E.left=this.originalLeft-B+"px"}}else{if(this.options.scaleY){E.top=-C+"px"}if(this.options.scaleX){E.left=-B+"px"}}}MochiKit.DOM.setStyle(this.element,E)}});MochiKit.Visual.fade=function(C,B){var D=MochiKit.DOM;var A=D.getInlineOpacity(C);B=MochiKit.Base.update({from:D.getOpacity(C)||1,to:0,afterFinishInternal:function(E){if(E.options.to!==0){return }MochiKit.Style.hideElement(E.element);D.setStyle(E.element,{opacity:A})}},B||{});return new MochiKit.Visual.Opacity(C,B)};MochiKit.Visual.appear=function(C,B){var D=MochiKit.DOM;var A=MochiKit.Visual;B=MochiKit.Base.update({from:(D.getStyle(C,"display")=="none"?0:D.getOpacity(C)||0),to:1,afterFinishInternal:function(E){A.forceRerendering(E.element)},beforeSetupInternal:function(E){D.setOpacity(E.element,E.options.from);MochiKit.Style.showElement(E.element)}},B||{});return new A.Opacity(C,B)};MochiKit.Visual.blindUp=function(B,A){var C=MochiKit.DOM;B=C.getElement(B);C.makeClipping(B);A=MochiKit.Base.update({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(D){MochiKit.Style.hideElement(D.element);C.undoClipping(D.element)}},A||{});return new MochiKit.Visual.Scale(B,0,A)};MochiKit.Visual.blindDown=function(C,B){var D=MochiKit.DOM;C=D.getElement(C);var A=MochiKit.Style.getElementDimensions(C);B=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:A.h,originalWidth:A.w},restoreAfterFinish:true,afterSetupInternal:function(E){D.makeClipping(E.element);D.setStyle(E.element,{height:"0px"});MochiKit.Style.showElement(E.element)},afterFinishInternal:function(E){D.undoClipping(E.element)}},B||{});return new MochiKit.Visual.Scale(C,100,B)};MochiKit.Visual.Color=MochiKit.Color.Color;MochiKit.Visual.getElementsComputedStyle=MochiKit.DOM.computedStyle;MochiKit.Visual.__new__=function(){var A=MochiKit.Base;A.nameFunctions(this);this.EXPORT_TAGS={":common":this.EXPORT,":all":A.concat(this.EXPORT,this.EXPORT_OK)}};MochiKit.Visual.EXPORT=["roundElement","roundClass","tagifyText","multiple","toggle","Base","Parallel","Opacity","Move","Scale","Highlight","ScrollTo","fade","appear","puff","blindUp","blindDown","switchOff","dropOut","shake","slideDown","slideUp","squish","grow","shrink","pulsate","fold"];MochiKit.Visual.EXPORT_OK=["PAIRS"];MochiKit.Visual.__new__();MochiKit.Base._exportSymbols(this,MochiKit.Visual);var log4javascript;(function(){function D(){return function(){}}function G(J,I){for(var H in I){J[H]=I[H]}}var E=D();var C=D();G(C.prototype,{addAppender:E,removeAppender:E,removeAllAppenders:E,log:E,setLevel:E,getLevel:E,trace:E,debug:E,info:E,warn:E,error:E,fatal:E});var A=function(){return new C()};log4javascript={isStub:true,version:"dummy",logLog:{setQuietMode:E,setAlertAllErrors:E,debug:E,warn:E,error:E},addErrorListener:E,removeErrorListener:E,setEnabled:E,setShowStackTraces:E,isEnabled:E,evalInScope:E,getLogger:A,getDefaultLogger:A,getNullLogger:A,Level:D(),LoggingEvent:D(),Layout:D(),Appender:D()};log4javascript.LoggingEvent.prototype={getThrowableStrRep:E};log4javascript.Level.prototype={toString:E,equals:E,isGreaterOrEqual:E};var F=new log4javascript.Level();G(log4javascript.Level,{ALL:F,TRACE:F,DEBUG:F,INFO:F,WARN:F,ERROR:F,FATAL:F,OFF:F});log4javascript.Layout.prototype={defaults:{},format:E,ignoresThrowable:E,getContentType:E,allowBatching:E,getDataValues:E,setKeys:E,setCustomField:E,hasCustomFields:E};log4javascript.SimpleLayout=D();log4javascript.SimpleLayout.prototype=new log4javascript.Layout();log4javascript.XmlLayout=D();log4javascript.XmlLayout.prototype=new log4javascript.Layout();log4javascript.XmlLayout.prototype.escapeCdata=E;log4javascript.JsonLayout=D();log4javascript.JsonLayout.prototype=new log4javascript.Layout();G(log4javascript.JsonLayout.prototype,{setReadable:E,isReadable:E});log4javascript.HttpPostDataLayout=D();log4javascript.HttpPostDataLayout.prototype=new log4javascript.Layout();log4javascript.PatternLayout=D();log4javascript.PatternLayout.prototype=new log4javascript.Layout();log4javascript.NullLayout=D();log4javascript.NullLayout.prototype=new log4javascript.Layout();log4javascript.Appender=D();log4javascript.Appender.prototype={layout:new log4javascript.PatternLayout(),threshold:log4javascript.Level.ALL,doAppend:E,append:E,setLayout:E,getLayout:E,setThreshold:E,getThreshold:E,toString:E};log4javascript.AlertAppender=D();log4javascript.AlertAppender.prototype=new log4javascript.Appender();log4javascript.ArrayAppender=D();log4javascript.ArrayAppender.prototype=new log4javascript.Appender();log4javascript.AjaxAppender=D();log4javascript.AjaxAppender.prototype=new log4javascript.Appender();G(log4javascript.AjaxAppender.prototype,{isTimed:E,setTimed:E,getTimerInterval:E,setTimerInterval:E,isWaitForResponse:E,setWaitForResponse:E,getBatchSize:E,setBatchSize:E,setRequestSuccessCallback:E,setFailCallback:E,sendAll:E,defaults:{requestSuccessCallback:null,failCallback:null}});function B(){}B.prototype=new log4javascript.Appender();G(B.prototype,{create:E,isNewestMessageAtTop:E,setNewestMessageAtTop:E,isScrollToLatestMessage:E,setScrollToLatestMessage:E,getWidth:E,setWidth:E,getHeight:E,setHeight:E,getMaxMessages:E,setMaxMessages:E});log4javascript.InPageAppender=D();log4javascript.InPageAppender.prototype=new B();G(log4javascript.InPageAppender.prototype,{isInitiallyMinimized:E,setInitiallyMinimized:E,hide:E,show:E,isVisible:E,close:E,defaults:{layout:new log4javascript.PatternLayout(),maxMessages:null}});log4javascript.InlineAppender=log4javascript.InPageAppender;log4javascript.PopUpAppender=D();log4javascript.PopUpAppender.prototype=new B();G(log4javascript.PopUpAppender.prototype,{isUseOldPopUp:E,setUseOldPopUp:E,isComplainAboutPopUpBlocking:E,setComplainAboutPopUpBlocking:E,isFocusPopUp:E,setFocusPopUp:E,isReopenWhenClosed:E,setReopenWhenClosed:E,close:E,defaults:{layout:new log4javascript.PatternLayout(),maxMessages:null}});log4javascript.BrowserConsoleAppender=D();log4javascript.BrowserConsoleAppender.prototype=new log4javascript.Appender()})();var log4javascript_dummy=log4javascript;if(typeof bobj=="undefined"){bobj={}}if(typeof bobj.external=="undefined"){bobj.external={}}if(typeof bobj.external.date=="undefined"){bobj.external.date={}}bobj.external.date.MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");bobj.external.date.DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");bobj.external.date.LZ=function(A){return(A<0||A>9?"":"0")+A};bobj.external.date.isDate=function(C,B){var A=bobj.external.date.getDateFromFormat(C,B);if(!A){return false}return true};bobj.external.date.compareDates=function(E,F,C,D){var B=bobj.external.date.getDateFromFormat(E,F);var A=bobj.external.date.getDateFromFormat(C,D);if(!B||!A){return -1}else{if(B.getTime()>A.getTime()){return 1}}return 0};bobj.external.date.formatDate=function(f,a){a=a+"";var J="";var T=0;var e="";var D="";var I=f.getFullYear()+"";var F=f.getMonth()+1;var b=f.getDate();var N=f.getDay();var L=f.getHours();var V=f.getMinutes();var P=f.getSeconds();var R,S,B,Q,g,C,Z,Y,W,O,n,L,l,G,A,X;var U=new Object();while(I.length<4){I="0"+I}U.y=""+I;U.yyyy=I;U.yy=I.substring(2,4);U.Y=U.y;U.YY=U.yy;U.YYYY=U.yyyy;U.M=F;U.MM=bobj.external.date.LZ(F);U.MMM=bobj.external.date.MONTH_NAMES[F-1];U.NNN=bobj.external.date.MONTH_NAMES[F+11];U.d=b;U.dd=bobj.external.date.LZ(b);U.D=U.d;U.DD=U.dd;U.E=bobj.external.date.DAY_NAMES[N+7];U.EE=bobj.external.date.DAY_NAMES[N];U.H=L;U.HH=bobj.external.date.LZ(L);if(L==0){U.h=12}else{if(L>12){U.h=L-12}else{U.h=L}}U.hh=bobj.external.date.LZ(U.h);if(L>11){U.K=L-12}else{U.K=L}U.k=L+1;U.KK=bobj.external.date.LZ(U.K);U.kk=bobj.external.date.LZ(U.k);if(L>11){U.a="PM"}else{U.a="AM"}U.m=V;U.mm=bobj.external.date.LZ(V);U.s=P;U.ss=bobj.external.date.LZ(P);while(T=E;A--){var B=F.substring(D,D+A);if(B.length70){G=1900+(G-0)}else{G=2000+(G-0)}}}else{if(D=="MMM"||D=="NNN"){Q=0;for(var L=0;L11)){Q=L+1;if(Q>12){Q-=12}S+=B.length;break}}}if((Q<1)||(Q>12)){return null}}else{if(D=="EE"||D=="E"){for(var L=0;L12)){return null}S+=Q.length}else{if(D=="dd"||D=="DD"||D=="d"||D=="D"){P=bobj.external.date._getInt(T,S,D.length,2);if(P==null||(P<1)||(P>31)){return null}S+=P.length}else{if(D=="hh"||D=="h"){A=bobj.external.date._getInt(T,S,D.length,2);if(A==null||(A<1)||(A>12)){return null}S+=A.length}else{if(D=="HH"||D=="H"){A=bobj.external.date._getInt(T,S,D.length,2);if(A==null||(A<0)||(A>23)){return null}S+=A.length}else{if(D=="KK"||D=="K"){A=bobj.external.date._getInt(T,S,D.length,2);if(A==null||(A<0)||(A>11)){return null}S+=A.length}else{if(D=="kk"||D=="k"){A=bobj.external.date._getInt(T,S,D.length,2);if(A==null||(A<1)||(A>24)){return null}S+=A.length;A--}else{if(D=="mm"||D=="m"){N=bobj.external.date._getInt(T,S,D.length,2);if(N==null||(N<0)||(N>59)){return null}S+=N.length}else{if(D=="ss"||D=="s"){K=bobj.external.date._getInt(T,S,D.length,2);if(K==null||(K<0)||(K>59)){return null}S+=K.length}else{if(D=="a"){if(T.substring(S,S+2).toLowerCase()=="am"){H="AM"}else{if(T.substring(S,S+2).toLowerCase()=="pm"){H="PM"}else{return null}}S+=2}else{if(T.substring(S,S+D.length)!=D){return null}else{S+=D.length}}}}}}}}}}}}}}if(S!=T.length){return null}if(Q==2){if(((G%4==0)&&(G%100!=0))||(G%400==0)){if(P>29){return null}}else{if(P>28){return null}}}if((Q==4)||(Q==6)||(Q==9)||(Q==11)){if(P>30){return null}}if(A!==null){if(A<12&&H=="PM"){A=A-0+12}else{if(A>11&&H=="AM"){A-=12}}}var C=new Date(G,Q-1,P,A,N,K);C.setFullYear(G);return C};_userAgent=navigator.userAgent?navigator.userAgent.toLowerCase():null;_ie=(document.all!=null)?true:false;_dom=(document.getElementById!=null)?true:false;_isQuirksMode=(document.compatMode!="CSS1Compat");_dtd4=!_ie||(document.compatMode!="BackCompat");_show="visible";_hide="hidden";_hand=_ie?"hand":"pointer";_appVer=navigator.appVersion.toLowerCase();_webKit=(_userAgent.indexOf("safari")>=0)||(_userAgent.indexOf("applewebkit")>=0);_mac=(_appVer.indexOf("macintosh")>=0)||(_appVer.indexOf("macos")>=0);_opera=(_userAgent.indexOf("opera")!=-1);_userAgent=navigator.userAgent?navigator.userAgent.toLowerCase():null;_ctrl=0;_shift=1;_alt=2;var docMode=document.documentMode;var _ie6Up=(docMode>=6);var _ie8Up=(docMode>=8);var _ie10Up=(docMode>=10);var _ie11Up=(docMode>=11);_moz=_dom&&!_ie&&!_ie11Up;_saf=_moz&&(_userAgent.indexOf("safari")>=0);_small=(screen.height<=600);_curDoc=document;_curWin=self;_tooltipWin=self;_tooltipDx=0;_tooltipDy=0;_codeWinName="_CW";_leftBtn=(_ie||_saf)?1:0;_preloadArr=new Array;_widgets=new Array;_resizeW=_ie6Up?"col-resize":"E-resize";_resizeH=_ie6Up?"row-resize":"S-resize";_ddData=new Array;_dontNeedEncoding=null;_thex=null;_defaultButtonWidth=60;function initDom(D,C,E,B,A){_skin=D;_lang=E;_style=C;if(B){_curWin=B;_curDoc=B.document}_tooltipWin=_curWin;if(A){_codeWinName="_CW"+A}_curWin[_codeWinName]=self}function styleSheet(){includeCSS("style")}function isLayerDisplayed(A){var B=A?A.style:null;if(B){if(B.display=="none"||B.visibility=="hidden"){return false}else{var C=A.parentNode;if(C!=null){return isLayerDisplayed(C)}else{return true}}}else{return true}}function safeSetFocus(A){if(A&&A.focus&&isLayerDisplayed(A)){A.focus()}}function newWidget(B){var A=new Object;A.id=B;A.layer=null;A.css=null;A.getHTML=Widget_getHTML;A.beginHTML=Widget_getHTML;A.endHTML=Widget_getHTML;A.write=Widget_write;A.begin=Widget_begin;A.end=Widget_end;A.init=Widget_init;A.move=Widget_move;A.resize=Widget_resize;A.setBgColor=Widget_setBgColor;A.show=Widget_show;A.getWidth=Widget_getWidth;A.getHeight=Widget_getHeight;A.setHTML=Widget_setHTML;A.setDisabled=Widget_setDisabled;A.focus=Widget_focus;A.setDisplay=Widget_setDisplay;A.isDisplayed=Widget_isDisplayed;A.appendHTML=Widget_appendHTML;A.setTooltip=Widget_setTooltip;A.initialized=Widget_initialized;A.widx=_widgets.length;_widgets[A.widx]=A;return A}function new_Widget(A){return newWidget(A.id)}function getEvent(B,A){if(_ie&&(B==null)){B=A?A.event:_curWin.event}return B}function Widget_param(C,B,A){var D=C?C[B]:null;return D==null?A:D}function Widget_appendHTML(){append(_curDoc.body,this.getHTML())}function Widget_getHTML(){return""}function Widget_write(A){_curDoc.write(this.getHTML(A))}function Widget_begin(){_curDoc.write(this.beginHTML())}function Widget_end(){_curDoc.write(this.endHTML())}function Widget_init(){var A=this;A.layer=getLayer(A.id);A.css=A.layer.style;A.layer._widget=A.widx;if(A.initialHTML){A.setHTML(A.initialHTML)}}function Widget_move(A,C){var B=this.css;if(A!=null){if(_moz){B.left=""+A+"px"}else{B.pixelLeft=A}}if(C!=null){if(_moz){B.top=""+C+"px"}else{B.pixelTop=C}}}function Widget_focus(){safeSetFocus(this.layer)}function Widget_setBgColor(A){this.css.backgroundColor=A}function Widget_show(A){this.css.visibility=A?_show:_hide}function Widget_getWidth(){return this.layer.offsetWidth}function Widget_getHeight(){return this.layer.offsetHeight}function Widget_setHTML(A){var B=this;if(B.layer){B.layer.innerHTML=A}else{B.initialHTML=A}}function Widget_setDisplay(A){if(this.css){this.css.display=A?"":"none"}}function Widget_isDisplayed(){if(this.css.display=="none"){return false}else{return true}}function Widget_setDisabled(A){if(this.layer){this.layer.disabled=A}}function Widget_resize(A,B){if(A!=null){this.css.width=""+(Math.max(0,A))+"px"}if(B!=null){this.css.height=""+(Math.max(0,B))+"px"}}function Widget_setTooltip(A){this.layer.title=A}function Widget_initialized(){return this.layer!=null}function newGrabberWidget(A,D,G,F,H,E,C,B,I){o=newWidget(A);o.resizeCB=D;o.x=G;o.y=F;o.w=H;o.h=E;o.dx=0;o.dy=0;o.min=null;o.max=null;o.isHori=C;o.preloaded=new Image;o.preloaded.src=_skin+"../resizepattern.gif";o.buttonCB=B;o.allowGrab=true;o.collapsed=false;o.isFromButton=false;o.showGrab=GrabberWidget_showGrab;o.setCollapsed=GrabberWidget_setCollapsed;o.tooltipButton=I;o.getHTML=GrabberWidget_getHTML;o.enableGrab=GrabberWidget_enableGrab;o.setMinMax=GrabberWidget_setMinMax;if(window._allGrabbers==null){window._allGrabbers=new Array}o.index=_allGrabbers.length;_allGrabbers[o.index]=o;o.buttonLyr=null;o.setButtonImage=GrabberWidget_setButtonImage;o.getImgOffset=GrabberWidget_getImgOffset;return o}function GrabberWidget_setCollapsed(B,A){this.collapsed=B;this.setButtonImage(false,A)}function GrabberWidget_getImgOffset(A){var B=this;if(B.isHori){B.dx=(B.collapsed?12:0)+(A?6:0);B.dy=0}else{B.dy=(B.collapsed?12:0)+(A?6:0);B.dx=0}}function GrabberWidget_setButtonImage(A,B){var C=this;C.getImgOffset(A);C.tooltipButton=B;if(C.layer){if(C.buttonLyr==null){C.buttonLyr=getLayer("grabImg_"+C.id)}if(C.buttonLyr){changeSimpleOffset(C.buttonLyr,C.dx,C.dy,null,B)}}}function GrabberWidget_enableGrab(A){var B=this;B.allowGrab=A;if(B.css){B.css.cursor=B.allowGrab?(B.isHori?_resizeW:_resizeH):"default"}}function GrabberWidget_getHTML(){var B=this;var A=B.isHori?_resizeW:_resizeH;var D='onselectstart="return false" ondragstart="return false" onmousedown="'+_codeWinName+".GrabberWidget_down(event,'"+B.index+"',this);return false;\"";var C=_ie?(''):('');return getBGIframe("grabIframe_"+B.id)+C+'