diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 074d0f918..d59d39850 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7875,8 +7875,8 @@ Public Class ClsPaginas End If 'concepto pago - Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia) If Pago.TipoPago = "A" AndAlso Not ErrorMovtos Then ' A N T I C I P O + Concepto = String.Format("{0} Ant:{1}", VentaActual.ClienteNombre, Pago.Referencia) Dim Ret As New ConceptosRetenciones 'Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1) If Pago.CveMonedaPago > 1 Then @@ -7890,6 +7890,7 @@ Public Class ClsPaginas End If End If If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O + Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia) Dim Ret As New ConceptosRetenciones Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 2) If Pago.CveMonedaPago > 1 Then @@ -7903,6 +7904,7 @@ Public Class ClsPaginas End If End If If Pago.TipoPago = "I" AndAlso Not ErrorMovtos Then ' I N G R E S O S X C O M P R O B A R + Concepto = String.Format("{0} IxC:{1}", VentaActual.ClienteNombre, Pago.Referencia) Dim Ret As New ConceptosRetenciones If VentaActual.UsuarioActual.Empresa.TipoContabilidad = 2 Then 'If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero @@ -7969,6 +7971,7 @@ Public Class ClsPaginas End If If Diferencia <> 0 Then + Concepto = String.Format("{0} Ref:{1}", VentaActual.ClienteNombre, Pago.Referencia) If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Diferencia, Diferencia, ConceptoContable, Concepto, Concepto, IdCtaContable, CveVenta:=VentaActual.CveVenta, CveSubProyecto:=VentaActual.CveSubProyecto, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE) Then ErrorMovtos = True End If diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 72d33c057..d944e15da 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -2610,15 +2610,19 @@ Partial Class Bancos_IE 'Cuando es Egreso sin factura, se registra una compra tipo anticipo If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "EGSCREDITO" Then - CveConceptoCompra = 48 'Anticipo Acreedores + CveConceptoCompra = 10 'Anticipo Acreedores CveConceptoContable = 30 'Bancos CveCreditoDetalle = DdlCreditoDetalle.SelectedValue.ToEntero Dim Estatus As Integer = 2 - If HdnCveTipoCredito.Value = "1" Then + Dim tesCrediproveedor As Boolean = False + 'falta especificar que deterina esta consideración en SIG + If HdnCveTipoCredito.Value = "1" AndAlso tesCrediproveedor Then Estatus = 103 'cuando es crediproveedores es, pago a documentos por pagar CveConceptoCompra = 57 End If + + ObjIE.UpdateCreditosDetalle(Estatus, CveCreditoDetalle) If HdnImporteCredito.Value.ToDouble > 0 AndAlso TxtImporte.Text.ToDouble > HdnImporteCredito.Value.ToDouble Then diff --git a/Bancos/PolizaCheque.aspx b/Bancos/PolizaCheque.aspx index 4155275f8..02274a49d 100644 --- a/Bancos/PolizaCheque.aspx +++ b/Bancos/PolizaCheque.aspx @@ -16,7 +16,7 @@
-
+
@@ -151,7 +151,7 @@
-
+
diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index 886eae4bd..a571d5eac 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -187,9 +187,9 @@ Partial Class Bancos_PolizaCheque DdlPlantilla.Items.Add(New ListItem("Pago Nomina", "36")) DdlPlantilla.SelectedValue = "36" DdlPlantilla.Enabled = False - End If - - + End If + + DdlProveedores.txtText.Value = "Seleccione" DdlProveedores.txtValue.Value = "-1" DdlProveedores.setEsWebService(True) @@ -199,12 +199,12 @@ Partial Class Bancos_PolizaCheque End If - End Sub - - - Private Sub CargaPlantillas(TipoPlantilla As Integer) - - + End Sub + + + Private Sub CargaPlantillas(TipoPlantilla As Integer) + + DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla) DdlPlantilla.DataBind() @@ -214,9 +214,8 @@ Partial Class Bancos_PolizaCheque Private Sub CargaCuenta() DdlCuenta.Items.Clear() - Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) - - 'cuando es layout + Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) + 'cuando es layout If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1)) dt = dt.FiltraParametros("UsaLayout = 1") @@ -228,10 +227,7 @@ Partial Class Bancos_PolizaCheque dt = dt.FiltraParametros("UsaLayoutGrupos = 1") End If - - - - DdlCuenta.DataSource = dt + DdlCuenta.DataSource = dt 'GlobalDTBancosCuentas(UsuarioActual.CveUsuario) DdlCuenta.DataBind() DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1")) @@ -241,16 +237,15 @@ Partial Class Bancos_PolizaCheque Private Sub CargaTipoTransaccion(TipoPlantilla As Integer) DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros(String.Format("Tipo = '{0}' ", If(TipoPlantilla = 0, "Egs", "Ing"))) DdlTipoTransaccion.DataBind() - End Sub - - - Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged + End Sub + + Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged CargaCuenta() End Sub Private Sub CargaFolio() - If HdnTipoTransaccion.Value = "" Then CargaHdnTipoTransaccion() + If HdnTipoTransaccion.Value = "" Then CargaHdnTipoTransaccion() If DdlTipoTransaccion.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(505) <> "1" Then If UsuarioActual.CveEmpresa = 119 AndAlso IfNull(Request("Tipo"), "") = "Ing" Then Dim ObjFolios As New ClsGralFolios @@ -268,8 +263,8 @@ Partial Class Bancos_PolizaCheque Banco.Dispose() TxtFolio.Text = Folio.ToString End If - End If - + End If + Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue)) If dr IsNot Nothing Then @@ -390,58 +385,57 @@ Partial Class Bancos_PolizaCheque CodigoCuenta = "" NombreCuenta = "" - If UsuarioActual.Empresa.UsaContabilidad Then - If UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso drt("CveCuenta").ToString.ToEntero > 0 Then - Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", drt("CveCuenta").ToString)) + If UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso drt("CveCuenta").ToString.ToEntero > 0 Then + Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", drt("CveCuenta").ToString)) + + If drr IsNot Nothing Then + CveCuenta = drt("CveCuenta").ToString.ToEntero + CodigoCuenta = drr("CuentaFormato").ToString() + NombreCuenta = drr("Nombre").ToString() + + End If + EsComodin = 0 + End If + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables + Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString)) If drr IsNot Nothing Then - CveCuenta = drt("CveCuenta").ToString.ToEntero + IdCuenta = drt("IdCtaContable").ToString.ToEntero CodigoCuenta = drr("CuentaFormato").ToString() NombreCuenta = drr("Nombre").ToString() End If EsComodin = 0 - End If - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables - Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString)) + + ElseIf drt("CveConcepto").ToString = "30" Then + 'saco la clave de la cuenta bancaria seleccionada + If DdlCuenta.SelectedValue.ToEntero > 0 And drt("CveConcepto").ToString = "30" Then 'DtCuentasContables + Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero))) If drr IsNot Nothing Then - IdCuenta = drt("IdCtaContable").ToString.ToEntero + IdCuenta = drr("Id").ToString.ToEntero CodigoCuenta = drr("CuentaFormato").ToString() NombreCuenta = drr("Nombre").ToString() - + EsComodin = 1 End If - EsComodin = 0 - - - ElseIf drt("CveConcepto").ToString = "30" Then - 'saco la clave de la cuenta bancaria seleccionada - If DdlCuenta.SelectedValue.ToEntero > 0 And drt("CveConcepto").ToString = "30" Then 'DtCuentasContables - Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero))) - If drr IsNot Nothing Then - IdCuenta = drr("Id").ToString.ToEntero - CodigoCuenta = drr("CuentaFormato").ToString() - NombreCuenta = drr("Nombre").ToString() - EsComodin = 1 - End If - End If - ElseIf drt("CveConcepto").ToString.ToEntero = 135 And IdCtaFondoGarantia > 0 Then - - Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCtaFondoGarantia)) - - IdCuenta = IdCtaFondoGarantia - CodigoCuenta = drr("CuentaFormato").ToString() - NombreCuenta = drr("Nombre").ToString() - - - EsComodin = 0 End If + ElseIf drt("CveConcepto").ToString.ToEntero = 135 And IdCtaFondoGarantia > 0 Then + + Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCtaFondoGarantia)) + + IdCuenta = IdCtaFondoGarantia + CodigoCuenta = drr("CuentaFormato").ToString() + NombreCuenta = drr("Nombre").ToString() + + + EsComodin = 0 End If End If + Dim dr As DataRow = DtMovimientos.NewRow dr("IdCuenta") = IdCuenta dr("CveCuenta") = CveCuenta @@ -740,7 +734,7 @@ Partial Class Bancos_PolizaCheque If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowIndex = 0 Then e.Row.Cells(0).Width = Unit.Pixel(110) - e.Row.Cells(1).Width = Unit.Pixel(200) + e.Row.Cells(1).Width = Unit.Pixel(200) e.Row.Cells(2).Width = Unit.Pixel(120) e.Row.Cells(3).Width = Unit.Pixel(303) e.Row.Cells(4).Width = Unit.Pixel(72) @@ -835,13 +829,13 @@ Partial Class Bancos_PolizaCheque Dim ObjIE As New ClsBancos() Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL) - Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL) + Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL) Dim IDPoliza As Integer = 0 Dim CveIE As Integer Dim MsgError As String = "" - Dim idCuentaContabilizacion As Long = 1 - - + Dim idCuentaContabilizacion As Long = 1 + + If MsgError = "" Then @@ -896,10 +890,10 @@ Partial Class Bancos_PolizaCheque If Not CvePersonalSeleccionado > 0 Then CvePersonalSeleccionado = gvr.DataKey("CvePersonal").ToEntero - End If - - If Importe <> 0 Then - + End If + + If Importe <> 0 Then + If MsgError = "" Then @@ -944,8 +938,8 @@ Partial Class Bancos_PolizaCheque If CvePeriodo > 0 Then If Not ObjNom.UpdatePagoNomina(CvePeriodo, CveIE, CvePrePoliza, UsuarioActual.CveEmpresa) Then MsgError = "No se pudo actualizar el periodo de la nómina" - End If - + End If + End If Else @@ -962,7 +956,7 @@ Partial Class Bancos_PolizaCheque If MsgError = "" Then If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then - If ObjMov.ValorPolizaDescuadre > 0 Then + If ObjMov.ValorPolizaDescuadre > 0 Then GuardaLogAD($"PolizaCheque/Guardar Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") End If Else @@ -985,8 +979,8 @@ Partial Class Bancos_PolizaCheque If MsgError = "" Then - ObjIE.Commit() - + ObjIE.Commit() + If filemove <> "" Then filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If @@ -1013,29 +1007,29 @@ Partial Class Bancos_PolizaCheque Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "window.location.reload();") Else Alert(MsgError.ToString, TipoMensaje.MsgError) - ObjIE.RollBack() + ObjIE.RollBack() End If Else - Alert("Debe de llevar un importe", TipoMensaje.MsgAdvertencia) + Alert("Debe de llevar un importe", TipoMensaje.MsgAdvertencia) - End If + End If End If ObjIE.Dispose() ObjMov.Dispose() - ObjNom.Dispose() + ObjNom.Dispose() Else Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia) End If - End Sub - - + End Sub + + Protected Sub GvMov_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvMov.RowDeleting Dim idMov As Integer = GvMov.DataKeys(e.RowIndex).Value.ToString.ToEntero @@ -1090,10 +1084,10 @@ Partial Class Bancos_PolizaCheque Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs) TxtPagueseA.Text = DdlPersonal.SelectedItem.Text UPPDocumento.Update() - End Sub - - - + End Sub + + + Protected Sub DdlProveedores_selectedindexchange(sender As Object, e As EventArgs) TxtPagueseA.Text = DdlProveedores.txtText.Value UPPDocumento.Update() diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index 412f0db79..ea7236cd2 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -369,7 +369,7 @@ diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 7dd4fa5af..152534d86 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -687,18 +687,15 @@ Partial Class Bancos_ProveedoresAbonar Validada = False If Valida.EsValida = 2 Then 'Cancelada - 'estatus inventario, no surtida If gvr.DataKey("EstatusInventario") = "1" Then MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} , relacione su factura nueva para descontar saldo
", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion")) Else MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} con movimientos de almacen, relacione su factura nueva para descontar saldo
", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion")) End If - Else MsgValidadas.AppendFormat("Factura No se pudo Validar: {0} - {1}
", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion")) End If - End If End If End If @@ -767,7 +764,6 @@ Partial Class Bancos_ProveedoresAbonar Dim FolioFijo As Integer = 0 Dim TipoCambio As Decimal = 0 - 'cheque If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa.Contiene(13, 83) Then FolioFijo = TxtFolio.Text.ToEntero @@ -799,7 +795,6 @@ Partial Class Bancos_ProveedoresAbonar If Not ObjGrales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(DdlCuentaDeposito.SelectedValue.ToEntero, -1, -1, "-1", TxtReferenciaCIE.Text.Trim, TxtConceptoCIE.Text.Trim) Then MsgError = "Error al actualziar Cuanta Referencia y Concepto Deposito." End If - End If End If @@ -834,6 +829,8 @@ Partial Class Bancos_ProveedoresAbonar CompraActual.Total = gvr.DataKey("Total").ToDecimal CompraActual.IVA = gvr.DataKey("IVA").ToDecimal CompraActual.IVADeducible = gvr.DataKey("IVADeducible").ToDecimal + CompraActual.IVANoDeducible = gvr.DataKey("IVANoDeducible").ToDecimal + CompraActual.CompraNoDeducible = gvr.DataKey("NoDeducible").ToEntero CompraActual.IEPS = gvr.DataKey("IEPS").ToDecimal CompraActual.RetIVA = gvr.DataKey("RetIVA").ToDecimal CompraActual.RetISR = gvr.DataKey("RetISR").ToDecimal @@ -843,15 +840,15 @@ Partial Class Bancos_ProveedoresAbonar CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "1" CompraActual.UsuarioActual = UsuarioActual CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero + CompraActual.IdCtaContableProv = If(CompraActual.CveMoneda >= 2, IdCtaProveedorExtranjera, CtaProveedor) CompraActual.IdCtaContableProvComplementaria = IdCtaContComplementaria - 'Importe de pago Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - 'Tipos de cambio If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos - Pago.TCPago = TxtTC.Text.ToDecimal + Pago.TCPago = 1 ' TxtTC.Text.ToDecimal + Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal).RoundSQL ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES Pago.TCPago = TxtTCDolaresDolares.Text.ToDecimal ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES @@ -1107,7 +1104,7 @@ Partial Class Bancos_ProveedoresAbonar If IDPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then Msg.AppendFormat(" Póliza
", IDPoliza) If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros - Msg.AppendFormat("

Ver Póliza   ", CvePrePoliza) + Msg.AppendFormat("Ver Póliza   ", CvePrePoliza) End If Dim Mensaje As String = String.Format("El Documento se generó correctamente.

{0} ", Msg.ToString) @@ -1516,7 +1513,6 @@ Partial Class Bancos_ProveedoresAbonar #Region " NOTIFICACION PAGO " - Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean) Try @@ -1555,263 +1551,8 @@ Partial Class Bancos_ProveedoresAbonar GuardaLog("Error al enviar notificación de pago ProveedoresAbonar --> " & ex.StackTrace.ToString) End Try - - End Sub - - - 'Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String) - - ' If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then - - ' Dim Body As String = GeneraCorreo(CveIE) - ' Dim Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto - - ' Dim File As Byte() = Nothing - ' If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then - ' File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre) - ' End If - - ' Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File)) - ' Hilo.Start() - ' End If - - 'End Sub - - 'Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte()) - ' 'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String)) - - ' Dim Mail As New ClsSisMail() - ' Para = If(Para IsNot Nothing, Para, "") - ' Asunto = If(Asunto IsNot Nothing, Asunto, "") - ' Body = If(Body IsNot Nothing, Body, "") - - ' Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail) - ' If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then - ' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante}) - ' End If - - ' If File IsNot Nothing Then - ' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"}) - ' End If - - ' If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then - ' Dim objIE As New ClsBancos - ' objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE) - ' objIE.Dispose() - ' End If - 'End Sub - - 'Private Function GeneraCorreo(CveIE As Integer) As String - ' Dim strBody As New StringBuilder - ' Dim objIE As New ClsBancos - - ' If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" {0}", UsuarioActual.Empresa.Empresa) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", UsuarioActual.Empresa.Direccion) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", UsuarioActual.Empresa.Colonia) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", UsuarioActual.Empresa.RFC) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
{0}
Col. {0}
{0}, {1}, C.P.{2}
RFC {0}
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("


") - - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - - ' If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - ' End If - - ' If objIE.CveTipoTransaccion = 2 Then ' cuando es transf - ' strBody.Append(" ") - ' strBody.Append(" ") - ' strBody.Append(" ") - ' End If - - ' strBody.Append(" ") - ' strBody.AppendFormat(" ") - ' strBody.Append(" ") - ' strBody.Append("
Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.
Notificación de transferencia de pago realizada.
 
") - ' strBody.AppendFormat("
") - ' strBody.Append("
") - - - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" Beneficiario:{0} ", objIE.PagueseA) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.TipoTransaccion) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.Banco) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.NumCuenta) - ' strBody.AppendFormat(" ") - ' If objIE.CuentaDepositado.ToString <> "" Then - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.CuentaDepositado) - ' strBody.AppendFormat(" ") - ' End If - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.FechaDocumento.ToString("dd/MM/yyyy")) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.Importe.FormatoNumero, objIE.Moneda) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", objIE.Observaciones) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
Movimiento:{0}
Banco:{0}
Cuenta:{0}
Cuenta Destino:{0}
Fecha:{0}
Importe:$ {0} {1}
Observaciones:{0}
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - - - ' 'MOVIMIENTOS CHEQUE - ' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then - ' Dim Textov33 As String = "" - ' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then - ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" - ' End If - - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat(" Documentos abonados o pagados
{0}
", Textov33) - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - - - ' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ", dr("Fecha").ToString.ToDate.ToShortDateString()) - ' strBody.AppendFormat(" ", dr("SerieFolio").ToString) - ' strBody.AppendFormat(" ", dr("Importe").ToString.FormatoNumero) - ' strBody.AppendFormat(" ", dr("FolioFiscal")) - ' strBody.AppendFormat(" ", dr("ImporteNC").ToString.FormatoNumero) - ' strBody.AppendFormat(" ") - ' Next - - - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat(" ") - ' strBody.AppendFormat("
FechaFacturaImporte ($)Folio FiscalNC Aplicadas
{0}{0}$ {0}{0}{0}
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' strBody.AppendFormat("
") - ' End If - - ' strBody.Append("
Favor de no responder a este correo.
") - - ' strBody.Append("") - ' End If - - ' objIE.Dispose() - ' Return strBody.ToString - 'End Function - #End Region #Region "SALDAR CUENTAS" @@ -1950,31 +1691,17 @@ Partial Class Bancos_ProveedoresAbonar End If Next - - If MsgError.Trim.Length = 0 AndAlso CvePrePoliza > 0 Then - If MsgError = "" AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then + If MsgError = "" AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, 5, UsuarioActual) Then If ObjConta.ValorPolizaDescuadre > 0 Then MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - Else - If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then - - If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - ' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion) - Else - 'Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) - MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico" - End If - - End If End If End If End If - If MsgError = "" Then ObjConta.Commit() CargaDatos(CveMoneda) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index c56273731..8ff5dbd78 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -1,8 +1,6 @@ <%@ Page Title="Compras - Registro de Facturas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" ValidateRequest="false" CodeFile="Compras.aspx.vb" Inherits="Compras_Compras" EnableEventValidation="false" %> - - - + @@ -284,9 +282,7 @@
- - - + @@ -322,12 +318,7 @@
Fecha Factura:
- - - - - - +
Descripción:
@@ -348,18 +339,7 @@
-
- - - - <%--
- Tipo Gasto: -
- - - -
-
--%> +
@@ -1141,7 +1121,7 @@
- +
@@ -4572,9 +4552,9 @@
- + -
+
@@ -4586,14 +4566,7 @@
-   $ - - - - - - - +   $
@@ -4603,13 +4576,8 @@
- - - - -
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 05a4556a7..cbeea38ae 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -11,6 +11,7 @@ Imports Newtonsoft.Json Imports Extensiones Imports MoreLinq + Partial Class Compras_Compras Inherits ClsPaginas @@ -1070,7 +1071,7 @@ Partial Class Compras_Compras If ViewState("TotalOriginal") Is Nothing Then Return 0 Else - Return ViewState("TotalOriginal").ToString.Todecimal + Return ViewState("TotalOriginal").ToString.ToDecimal End If End Get Set(value As Decimal) @@ -2083,7 +2084,6 @@ Partial Class Compras_Compras End If - SubTotal2 = SubTotalReal - Descuentos If Descuentos > 0 Then @@ -2127,10 +2127,8 @@ Partial Class Compras_Compras HFDiferenciaCompra.Value = TxtTotal.Text - - LblRetIVA.Text = (If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" - LblRetISR.Text = (If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3) - + 'LblRetIVA.Text = TmpDT.MAX("PorcentajeRetIVA").ToString '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" + 'LblRetISR.Text = TmpDT.MAX("PorcentajeRetISR").ToString '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3) 'ASIGNA VALORES ORIGINALES PARA GUARDAR AsignaValoresOriginales(SubTotal, SubTotal2, IVA, RetencionIVA, RetencionISR, Total) @@ -2256,12 +2254,8 @@ Partial Class Compras_Compras DdlRetIVAConcepto.Items.Add(New ListItem("Resico", "5")) DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6")) End If - End If - End If - - UpPS.Update() End Sub @@ -2432,13 +2426,12 @@ Partial Class Compras_Compras HdnCompraSaldo.Value = TotalTemp.ToString CompraSaldo = TotalTemp - LblRetIVA.Text = (If(Subtotal2Temp > 0, (RetIVATemp / Subtotal2Temp), 0) * 100).FormatoNumero(3) + "%" - LblRetISR.Text = (If(Subtotal2Temp > 0, (RetISRTemp / Subtotal2Temp), 0) * 100).FormatoNumero(3) + LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(3), "") + LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(3), "") 'ASIGNA VALORES ORIGINALES PARA GUARDAR AsignaValoresOriginales(SubtotalTemp, Subtotal2Temp, IVATemp, RetIVATemp, RetISRTemp, Total) - End Sub ''' @@ -2643,8 +2636,8 @@ Partial Class Compras_Compras LblUsuarioCaptura.Text = dr("Usuario").ToString LitFechCaptura.Text = dr("FechaIng").ToString.ToDate.ToShortDateString LitFechCaptura.ToolTip = dr("FechaIng").ToString - LblRetIVA.Text = Math.Round((dr("RetIVA").ToString.ToDouble / TxtSubTotal2.Text.ToDouble) * 100, 4).FormatoNumero(3) + "%" - LblRetISR.Text = Math.Round((dr("RetISR").ToString.ToDouble / TxtSubTotal2.Text.ToDouble) * 100, 4).FormatoNumero(3) + LblRetIVA.Text = If(dr("RetIVA").ToString.ToDecimal > 0, TmpDT.MAX("RetIVAPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(3) '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" + LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(3) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3) If dr("TipoFactura").ToString <> "CFDi" Then LblTipoFact.Text = dr("TipoFactura").ToString : divTipoFactura.Visible = True ViewState("CveFactura") = dr("CveFactura").ToString.ToEntero ViewState("IdPoliza") = dr("IdPoliza").ToString.ToEntero @@ -16307,9 +16300,8 @@ Partial Class Compras_Compras UpAnticipos.Update() End If - - LblRetIVA.Text = (If(SubTotal2 > 0, (RetIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" - LblRetISR.Text = (If(SubTotal2 > 0, (RetISR / SubTotal2), 0) * 100).FormatoNumero(3) + LblRetIVA.Text = TmpDT.MAX("RetIVAPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" + LblRetISR.Text = TmpDT.MAX("RetISRPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3) 'IMPORTES DE RESTRICCION TxtDocumentoImporteFE.Text = Total.ToString.FormatoNumero(2) @@ -19625,34 +19617,22 @@ Partial Class Compras_Compras #Region "ES NO DEDUCIBLE" Protected Sub ChkEsNoDeducible_CheckedChanged1(sender As Object, e As EventArgs) + AplicarNoDeducible() + End Sub + + Private Sub AplicarNoDeducible() If ChkEsNoDeducible.Checked Then EsNoDeducible = True dvNoDeducible.Visible = True GvPS.Columns(11).Visible = True - UpEsNoDeduciblePS.Visible = True + DivEsNoDeducible.Visible = True Else EsNoDeducible = False dvNoDeducible.Visible = False GvPS.Columns(11).Visible = False - UpEsNoDeduciblePS.Visible = False + DivEsNoDeducible.Visible = False End If - 'DivEsNoDeducible.Visible = False - 'For Each Dr As DataRow In TmpDT.Rows - ' Dim Total As Double = Dr("IVA").ToString.ToDouble - (Dr("RetIVA").ToString.ToDouble + Dr("RetISR").ToString.ToDouble) + Dr("IEPSPS").ToString.ToDouble + Dr("IEPSPSIVA").ToString.ToDouble - ' Dr("Total") = Dr("Total").ToString.ToDouble + Total - ' Dr("PU") = Dr("Total").ToString.ToDouble / Dr("Cantidad").ToString.ToDouble - ' Dr("IVA") = 0 - ' Dr("IVAPorcentaje") = 0 - ' Dr("RetIVA") = 0 - ' Dr("RetIVAPorcentaje") = 0 - ' Dr("RetISR") = 0 - ' Dr("RetISRPorcentaje") = 0 - ' Dr("IEPSPS") = 0 - ' Dr("IEPSPSPorcentaje") = 0 - ' Dr("IEPSPSIVA") = 0 - ' Dr("IEPSPSIVAPorcentaje") = 0 - 'Next - 'TmpDT.AcceptChanges() + AddPS2(EsNoDeducible:=EsNoDeducible) UpPS.Update() End Sub @@ -20312,8 +20292,6 @@ Partial Class Compras_Compras Protected Sub BtnModalEliminarCompra_Click(sender As Object, e As EventArgs) - - Dim ObjAC As ClsContPAQi = Nothing Dim Comp As New ClsCompras() Dim ObjEventos As New ClsOIEventos(Comp.IniciaTransacSQL()) @@ -20346,8 +20324,6 @@ Partial Class Compras_Compras End If End If - - Try If ObjInventarios.GetInv_ComprasMov(CveCompra, UsuarioActual.CveEmpresa) Then Dim DTInventarios As DataTable = ObjInventarios.DtResultados @@ -20421,9 +20397,6 @@ Partial Class Compras_Compras End If - - - If Not ErrorCompra Then If Not Comp.DeleteCompra(CveCompra, False) Then ErrorCompra = True @@ -20446,17 +20419,14 @@ Partial Class Compras_Compras ObjConta.Dispose() End Sub - - - #End Region -#Region "PRORATEAR DEDUCIBLE" +#Region "PRORATEAR 8.5%" + Private Sub Proratear85Deducible() - Private Sub ProratearDeducible() - - ChkEsNoDeducible_CheckedChanged1(Nothing, Nothing) + ChkEsNoDeducible.Checked = True + AplicarNoDeducible() Dim Consec As Integer = 1 @@ -20483,7 +20453,6 @@ Partial Class Compras_Compras Next TmpDT.AcceptChanges() - Dim psCvePs As Integer = 700562 Dim rowPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, psCvePs).Rows(0) @@ -20496,7 +20465,6 @@ Partial Class Compras_Compras For Each drIva As DataRow In DT_IVAS.Rows Dim nRowAgrupado As DataRow = DT_Agrupado.NewRow - Dim drIVAPorcentaje As Decimal = drIva("IVAPorcentaje").ToString.ToDecimal Dim drRetIVAPorcentaje As Decimal = drIva("RetIVAPorcentaje").ToString.ToDecimal Dim drRetISRPorcentaje As Decimal = drIva("RetISRPorcentaje").ToString.ToDecimal @@ -20589,13 +20557,13 @@ Partial Class Compras_Compras TmpDT = DTProtateo BtnProrateoDeducible.Visible = False - + UpParametros.Update() AddPS2(True) End Sub Private Sub BtnProrateoDeducible_Click(sender As Object, e As EventArgs) Handles BtnProrateoDeducible.Click - ProratearDeducible() + Proratear85Deducible() End Sub #End Region @@ -20604,8 +20572,6 @@ Partial Class Compras_Compras End Class - - Public Class MMensajeDevolucion Public Property CveMovimiento As Integer Public Property TieneError As Boolean diff --git a/Compras/ReembolsosComprobaciones.aspx b/Compras/ReembolsosComprobaciones.aspx index 855f4c6e4..2aeabc214 100644 --- a/Compras/ReembolsosComprobaciones.aspx +++ b/Compras/ReembolsosComprobaciones.aspx @@ -320,7 +320,7 @@ + DataKeyNames="CveCompra,FechaCompra,CveProveedor,CveMoneda,Proveedor,SerieFolio,SubTotal,IVA,RetIVA,RetISR,IEPS,Total,TipoCambio,IdCtaContProveedores,IdCtaContAcreedor,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto,IVAPorPagar,NoDeducible"> diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 0cbbb003f..95a0f5c77 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -709,6 +709,7 @@ Partial Class Compras_ReembolsosComprobaciones CompraActual.PorcentajeIVA = gvr.DataKey("IVAPorcentaje").ToDecimal CompraActual.UsuarioActual = UsuarioActual CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero + CompraActual.CompraNoDeducible = gvr.DataKey("NoDeducible").ToEntero CompraActual.IdCtaContableProv = IdCtaProveedor ImportePagar = gvr.FCTextBox("TxtAbonar").Text.ToDecimal diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 3ba7985ce..90208a628 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -2978,7 +2978,7 @@ Partial Class ContabilidadC_RegPrePolizaS End If End If If CveIE > 0 AndAlso gvr.DataKey("CveConceptoContable").ToEntero = 30 Then - MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) + MensajeAlert.AppendFormat("
Folio Bancario: {1}", CveIE, FolioIE) End If Next