diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 82fe0d488..6d7a6cc18 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -4526,9 +4526,9 @@ Partial Class Compras_Compras Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal() - If Not CveSubProyectoPrincipal > 0 Then - Alert("Falta asignar Proyecto a la compra", TipoMensaje.MsgAdvertencia) - End If + 'If Not CveSubProyectoPrincipal > 0 Then + ' Alert("Falta asignar Proyecto a la compra", TipoMensaje.MsgAdvertencia) + 'End If If Not ValidaVinculacionNotaFactura() Then Alert("Se requiere que la nota este aplicada a las facturas", TipoMensaje.MsgAdvertencia) @@ -4868,13 +4868,13 @@ Partial Class Compras_Compras For Each Row As DataRow In TmpDT.Rows 'VALIDACION DE CENTRO DE COSTO - If UsuarioActual.Empresa.RequiereCentroCostos AndAlso Row("CveSubProyecto").ToString.ToEntero <= 0 Then - RequiereCentroCosto = True - UM.Dispose() - PSS.Dispose() - Alert("Falta asignar Proyecto a la compra", TipoMensaje.MsgAdvertencia) - Exit Sub - End If + 'If UsuarioActual.Empresa.RequiereCentroCostos AndAlso Row("CveSubProyecto").ToString.ToEntero <= 0 Then + ' RequiereCentroCosto = True + ' UM.Dispose() + ' PSS.Dispose() + ' Alert("Falta asignar Proyecto a la compra", TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If 'REGISTRO LAS UNIDADES DE MEDIDA If Row("CveUM").ToString.ToEntero = 0 Then @@ -7967,11 +7967,19 @@ Partial Class Compras_Compras CvePreComprobacion = ObjConta.AddPrePolizas("Compras Comproba", 1, 0, 0, 1, TxtFecha.Text.ToDate, tConcepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If ObjCompras.AddComprobacion(DdlPersonalReembolso.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, TxtNumeroReembolso.Text.Trim, CvePreComprobacion, UsuarioActual.CveEmpresa) > 0 Then - + Alert("Apertura de nueva comprobación.", TipoMensaje.ToastInformacion) End If Else 'si ya existe, obtenemos la prepóliza CvePreComprobacion = ObjCompras.DtResultados.FiltroPrimeroValor("CvePrePoliza").ToEntero + If ObjCompras.DtResultados.FiltroPrimeroValor("FolioPoliza").ToEntero > 0 Then + TieneError = True + ErrorPrepoliza = True + Alert($"La Comprobación con folio '{TxtNumeroReembolso.Text.Trim}' está previamente contabilizada. No se puede asociar.", TipoMensaje.MsgError) + Else + Alert("Factura agregada a una comprobación ya creada.", TipoMensaje.ToastInformacion) + End If + End If ObjConta.PrePolizaUnificacion(CvePreComprobacion, CvePrePoliza) @@ -8074,8 +8082,8 @@ Partial Class Compras_Compras 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 + ' Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError) + End If End If @@ -8194,7 +8202,6 @@ Partial Class Compras_Compras End If Next - If DTSubProyectoPrincipal.Rows.Count > 0 Then DTSubProyectoPrincipal = DTSubProyectoPrincipal.FiltraParametros("", "Total DESC ") CveSubProyectoPrincioal = DTSubProyectoPrincipal.FiltroPrimeroValor("CveSubProyecto").ToEntero diff --git a/Inicio.aspx b/Inicio.aspx index 9cf4159cd..6f20e28c0 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -549,27 +549,75 @@
- + -
-
Opción:
-
- - - - - - - -
-
- - - - + +
+
+
+ + +
+
+
+ +
+ + + + + + + +
+
+ + + + +
+
+ Fecha. Inicio: +
+
+
+ + + + +
+ + + + + + +
+
+ Fecha. Fin: +
+
+
+ + + + +
+ + + + + + +
+
+
+
+
-
-
+ +
diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index 96ba681cf..b18897be0 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -142,7 +142,7 @@ Partial Class Inicio If UsuarioActual.TienePermisoProceso(343) Then MuestraPsProximosAVencer() If UsuarioActual.TienePermisoProceso(344) Then MuestraRSCOProximosAVencer() - If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso (UsuarioActual.CveUsuario = 3964 Or UsuarioActual.CveRol = 1639) Then 'AndAlso UsuarioActual.CveRol.Contiene(1577, 1639, 1573) Then + If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso (UsuarioActual.CveUsuario = 3964 OrElse UsuarioActual.CveRol = 1639) Then 'AndAlso UsuarioActual.CveRol.Contiene(1577, 1639, 1573) Then 'Dim Opcion As Integer = 1 'Dim CveVendedor As Integer = -1 'Dim CveUsuarioTecnico As Integer = -1 @@ -155,6 +155,8 @@ Partial Class Inicio ' Opcion = 2 'gerente ventas 'End If divsms1.Visible = True + txtFechaInicioSMS.Text = Now.FirstDayOfMonth.ToString + txtFechaFinSMS.Text = Now.LastDayOfMonth.ToString If UsuarioActual.CveUsuario = 3964 Then DdlSMSOpciones.SelectedValue = "2" DdlSMSVendedores.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveEstatus=1 ") @@ -1641,8 +1643,8 @@ Partial Class Inicio Dim Gral As New ClsVentas Dim ds As DataSet = Nothing - Dim FechaI As Date = Now.FirstDayOfMonth - Dim FechaF As Date = Now.LastDayOfMonth + Dim FechaI As Date = txtFechaInicioSMS.Text.ToDate ' Now.FirstDayOfMonth + Dim FechaF As Date = txtFechaFinSMS.Text.ToDate 'Now.LastDayOfMonth If Gral.GetSMSIndicadores(Opcion, FechaI, FechaF, UsuarioActual.CveUsuario, CveVendedor, CveGerenteVendedor, CveUsuarioTecnico, UsuarioActual.CveEmpresa) Then ds = Gral.DataSetResultados @@ -2576,4 +2578,8 @@ Partial Class Inicio Protected Sub DdlSMSTecnico_SelectedIndexChanged(sender As Object, e As EventArgs) CargaKPICirugias(DdlSMSOpciones.SelectedValue.ToEntero, -1, DdlSMSTecnico.SelectedValue.ToEntero) End Sub + + Protected Sub BtnSMSAplicarFecha_Click(sender As Object, e As EventArgs) + CargaSMSKPI() + End Sub End Class diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index f3935ceec..0a09cd780 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -821,14 +821,10 @@ Partial Class Ventas_ClientesAbonar 'comparativo. For Each gvr As GridViewRow In GvCxC.Rows If gvr.FCCheckBox("Chk").Checked Then - Dim CveMonedaVenta As Integer = gvr.DataKey("CveMoneda").ToEntero - If CveMonedaVenta = CveMonedaPago Then - ImporteAbonar += gvr.FCTextBox("TxtAbonar").Text.ToDecimal() - ElseIf CveMonedaVenta = 2 And CveMonedaPago = 1 Then - ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() * TxtTC.Text.ToDecimal) - ElseIf CveMonedaVenta = 1 And CveMonedaPago = 2 Then - ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() / TxtTC.Text.ToDecimal) - End If + TC = 1 + If tCveMonedaIE = 1 AndAlso gvr.DataKey("CveMoneda") = "2" Then TC = TxtTC.Text.ToDecimal + If tCveMonedaIE = 2 AndAlso gvr.DataKey("CveMoneda") = "1" Then TC = 1D / TxtTC.Text.ToDecimal + ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() * TC).RoundSQL(2) End If Next ImporteAbonar += TxtAnticipo.Text.ToDecimal() @@ -948,21 +944,8 @@ Partial Class Ventas_ClientesAbonar End If Else If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc - CveIE = DdlIngreso.SelectedValue.ToEntero - - If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then - CveMoneda = ObjIE.CveMoneda - Else - MsgError = "Error al obtener la moneda de ingreso por comprobar" - End If - - 'If CveMonedaPago = 2 And Not ChkPagarPesos.Checked Then CveMoneda = 2 - 'If ChkPagarDolares.Checked Then CveMoneda = 2 - 'If ChkPagarPesos.Checked Then CveMoneda = 1 - End If - End If If CveIE > 0 OrElse RblTipoPago.SelectedValue.Contiene("2", "3") Then @@ -988,10 +971,8 @@ Partial Class Ventas_ClientesAbonar Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) Dim TipoCambioFluctuacion As Decimal = 1 Dim FechaUltimaFluctuacion As Date = MinFecha - Dim tFecha As Date = TxtFechaDocumento.Text.ToDate Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha) - Dim ImportePrestamo As Decimal = 0 Dim TCPrestamo As Decimal = 0 @@ -1087,10 +1068,7 @@ Partial Class Ventas_ClientesAbonar End If 'Tipos de cambio If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos - Pago.TCPago = TxtTC.Text.ToDecimal - Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal - 'Pago.ImportePagoVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTC.Text.ToDecimal - 'ImportePagadoVenta = (ImportePagadoVenta / TxtTipoCambio.Text.ToDecimal).RoundSQL + Pago.ImportePago = (Pago.ImportePago * TxtTC.Text.ToDecimal).RoundSQL ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES Pago.TCPago = If(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal) ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES