diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 139002853..286840260 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2607,7 +2607,8 @@ Public Class ClsInventarios #Region "I N V E N T A R I O - F I S I C O - D E T A L L E" - Public Function UpdateInventarioFisicoDetalles(CveInventarioFisicoDetalle As Integer, CvePS As Integer, CveUM As Integer, Cantidad As Double) As Boolean + Public Function UpdateInventarioFisicoDetalles(CveInventarioFisicoDetalle As Integer, CvePS As Integer, CveUM As Integer, Cantidad As Double, Optional Serie As String = "-1", + Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoDetalleUpdate") @@ -2617,6 +2618,9 @@ Public Class ClsInventarios .Add("@CveUM", SqlDbType.Int).Value = CveUM .Add("@Cantidad", SqlDbType.Money).Value = Cantidad .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@Serie", SqlDbType.VarChar).Value = Serie + .Add("@Lote", SqlDbType.NVarChar).Value = Lote + .Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad End With Try diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 1b4e83ad2..699a08d12 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1263,14 +1263,14 @@ Partial Class Compras_Compras Dim ObjPersonal As New ClsRH ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) DdlPersonal.DataSource = ObjPersonal.DtResultados - + If UsuarioActual.CveEmpresa = 119 Then DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados Else DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1") End If - - + + ObjPersonal.Dispose() DdlPersonal.DataBind() DdlPersonalReembolso.DataBind() @@ -4359,7 +4359,7 @@ Partial Class Compras_Compras If Not AjustaCombustibles() Then Exit Sub End If - Exit Sub + '------------------TERMINA VALIDACIONES------------------ @@ -8434,18 +8434,17 @@ Partial Class Compras_Compras Msg.Append("¿Desea realizar una evaluacion al proveedor?") Msg.AppendFormat($"
Evaluar Proveedor.") End If + + BtnGuardar.Enabled = False + UpFacturar.Update() + + Alert(Msg.ToString, TipoMensaje.MsgInformacion, MsgAccionAceptar) Else ObjCompras.RollBack() If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError) End If - BtnGuardar.Enabled = False - UpFacturar.Update() - - Alert(Msg.ToString, TipoMensaje.MsgInformacion, MsgAccionAceptar) - - End If Else @@ -8570,21 +8569,21 @@ Partial Class Compras_Compras If Math.Abs(DiferenciaIVas) > 0.01D Then Respuesta = False - 'If IVADetalles > 0 Then + If IVADetalles > 0 Then - ' For Each dRow As DataRow In TmpDT.Rows - ' If dRow("IVA").ToString.ToDecimal > 0 Then - ' dRow("IVA") = dRow("IVA").ToString.ToDecimal + DiferenciaIVas - ' TmpDT.AcceptChanges() - ' Respuesta = True - ' Exit For - ' End If - ' Next + For Each dRow As DataRow In TmpDT.Rows + If dRow("IVA").ToString.ToDecimal > 0 Then + dRow("IVA") = dRow("IVA").ToString.ToDecimal + DiferenciaIVas + TmpDT.AcceptChanges() + Respuesta = True + Exit For + End If + Next - 'Else - ' Alert("Los productos especificados en el lisado no tienen asigando impuesto IVA, favor de realizar la correción en el producto que aplique el impúesto.", TipoMensaje.MsgAdvertencia) - ' Respuesta = False - 'End If + Else + Alert("Los productos especificados en el lisado no tienen asigando impuesto IVA, favor de realizar la correción en el producto que aplique el impúesto.", TipoMensaje.MsgAdvertencia) + Respuesta = False + End If Else Respuesta = True End If @@ -12604,52 +12603,7 @@ Partial Class Compras_Compras End Sub #End Region -#Region "C O N T R A T O S" - 'Protected Sub ImgBtnBuscarContrato_Click(sender As Object, e As ImageClickEventArgs) Handles ImgBtnBuscarContrato.Click - ' If CveProveedor <= 0 Then - ' Alert("Debe de Seleccionar un proveedor") - ' Exit Sub - ' End If - ' RegistraScript(String.Format("AbrirVentana('/Contratos/PopUpBuscarContrato.aspx?V=VCCOMP',730,300,'N');")) - 'End Sub - - 'Protected Sub CargaVContrato(sender As Object, e As EventArgs) - ' CargaVContrato2(HdnVCveContrato.Value) - 'End Sub - - 'Protected Sub CargaVContrato2(CveContrato As String) - ' If TxtContrato.Text <> "" Then - ' Dim ObjContratos As New ClsContratos - ' Dim DTContratosTemp As DataTable = Nothing - - ' GvContratos1.DataSource = TmpDT - ' GvContratos1.DataBind() - ' UPGVContratos1.Update() - - ' Dim ArrayCveContratos As String() = HdnVCveContrato.Value.Split(New Char() {","c}) - ' For i As Integer = 1 To ArrayCveContratos.Count - ' If ObjContratos.GetContratosDetalle(ArrayCveContratos(i - 1).ToEntero) Then - ' If IsNothing(DTContratosTemp) Then - ' DTContratosTemp = ObjContratos.DtResultados.Copy - ' Else - ' DTContratosTemp.Merge(ObjContratos.DtResultados) - ' End If - ' Else - ' Alert("Ocurrio un ERROR al cargar el Contrato") - ' DTContratosTemp.Rows.Clear() - ' Exit For - ' End If - ' Next - - ' GvContratos2.DataSource = DTContratosTemp - ' GvContratos2.DataBind() - ' UPGVContratos2.Update() - - ' ObjContratos.Dispose() - ' End If - 'End Sub -#End Region #Region "TAB ALMACEN - INVENTARIOS ISRAEL PIÑA - 5 FEBRERO 2015" @@ -18149,7 +18103,7 @@ Partial Class Compras_Compras Dim ObjContratos As New ClsContratos Dim TieneError As Boolean = False Dim Mensaje As String = "" - Dim dttemp As DataTable = GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString)) + Dim dttemp As DataTable = Nothing ' GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString)) If dttemp IsNot Nothing AndAlso dttemp.Rows.Count > 0 Then Dim drContrato As DataRow = dttemp.Rows(0) If ObjContratos.GetContratosDetalle(drContrato("CveContrato").ToString.ToEntero) Then @@ -18166,19 +18120,19 @@ Partial Class Compras_Compras TieneError = True End If Else - Mensaje = "Este producto no pertence al contrato seleccionado" + Mensaje = "Este producto no pertenece al contrato seleccionado." TieneError = True End If Else - Mensaje = "Error al consultar el contrato" + Mensaje = "Error al consultar el contrato." End If End If Else - Mensaje = "Este producto no pertence al contrato seleccionado" + Mensaje = "Este producto no pertenece al contrato seleccionado." TieneError = True End If Else - Mensaje = "Error al consultar el contrato" + Mensaje = "Error al consultar el contrato." End If End If diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 4b94f49f8..cc01a4d23 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1358,6 +1358,7 @@ Partial Class PopUpVerFactura CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero() If CveConcepto.Contiene(2, 3, 26, 27, 40, 41) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual") + CveMovimientoRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero CveConceptoMovtoRelacionado = 37 ElseIf CveConcepto.Contiene(36, 37) Then FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado") diff --git a/Contratos/ContratoObra.aspx b/Contratos/ContratoObra.aspx index dcf14eb01..62d582d06 100644 --- a/Contratos/ContratoObra.aspx +++ b/Contratos/ContratoObra.aspx @@ -365,55 +365,47 @@
- -
- - - -
- - + + +
+ +
+
+
- - - - +