This commit is contained in:
Oscar Irigoyen
2023-05-29 18:53:17 -07:00
11 changed files with 130 additions and 467 deletions

View File

@@ -7875,8 +7875,8 @@ Public Class ClsPaginas
End If End If
'concepto pago '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 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 Ret As New ConceptosRetenciones
'Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1) 'Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1)
If Pago.CveMonedaPago > 1 Then If Pago.CveMonedaPago > 1 Then
@@ -7890,6 +7890,7 @@ Public Class ClsPaginas
End If End If
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 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 Ret As New ConceptosRetenciones
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 2) Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 2)
If Pago.CveMonedaPago > 1 Then If Pago.CveMonedaPago > 1 Then
@@ -7903,6 +7904,7 @@ Public Class ClsPaginas
End If End If
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 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 Dim Ret As New ConceptosRetenciones
If VentaActual.UsuarioActual.Empresa.TipoContabilidad = 2 Then 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 '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 End If
If Diferencia <> 0 Then 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 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 ErrorMovtos = True
End If End If

View File

@@ -2610,15 +2610,19 @@ Partial Class Bancos_IE
'Cuando es Egreso sin factura, se registra una compra tipo anticipo 'Cuando es Egreso sin factura, se registra una compra tipo anticipo
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "EGSCREDITO" Then If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "EGSCREDITO" Then
CveConceptoCompra = 48 'Anticipo Acreedores CveConceptoCompra = 10 'Anticipo Acreedores
CveConceptoContable = 30 'Bancos CveConceptoContable = 30 'Bancos
CveCreditoDetalle = DdlCreditoDetalle.SelectedValue.ToEntero CveCreditoDetalle = DdlCreditoDetalle.SelectedValue.ToEntero
Dim Estatus As Integer = 2 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 Estatus = 103
'cuando es crediproveedores es, pago a documentos por pagar 'cuando es crediproveedores es, pago a documentos por pagar
CveConceptoCompra = 57 CveConceptoCompra = 57
End If End If
ObjIE.UpdateCreditosDetalle(Estatus, CveCreditoDetalle) ObjIE.UpdateCreditosDetalle(Estatus, CveCreditoDetalle)
If HdnImporteCredito.Value.ToDouble > 0 AndAlso TxtImporte.Text.ToDouble > HdnImporteCredito.Value.ToDouble Then If HdnImporteCredito.Value.ToDouble > 0 AndAlso TxtImporte.Text.ToDouble > HdnImporteCredito.Value.ToDouble Then

View File

@@ -16,7 +16,7 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-7">
<asp:UpdatePanel ID="UPPDocumento" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPPDocumento" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="chequesie"> <div class="chequesie">
@@ -151,7 +151,7 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div class="col-md-6"> <div class="col-md-5">
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server">
<ContentTemplate> <ContentTemplate>
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox> <asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>

View File

@@ -215,7 +215,6 @@ Partial Class Bancos_PolizaCheque
DdlCuenta.Items.Clear() DdlCuenta.Items.Clear()
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
'cuando es layout 'cuando es layout
If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1)) dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
@@ -228,10 +227,7 @@ Partial Class Bancos_PolizaCheque
dt = dt.FiltraParametros("UsaLayoutGrupos = 1") dt = dt.FiltraParametros("UsaLayoutGrupos = 1")
End If End If
DdlCuenta.DataSource = dt 'GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
DdlCuenta.DataSource = dt
DdlCuenta.DataBind() DdlCuenta.DataBind()
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -243,7 +239,6 @@ Partial Class Bancos_PolizaCheque
DdlTipoTransaccion.DataBind() DdlTipoTransaccion.DataBind()
End Sub End Sub
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
CargaCuenta() CargaCuenta()
@@ -390,58 +385,57 @@ Partial Class Bancos_PolizaCheque
CodigoCuenta = "" CodigoCuenta = ""
NombreCuenta = "" NombreCuenta = ""
If UsuarioActual.Empresa.UsaContabilidad Then If UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso drt("CveCuenta").ToString.ToEntero > 0 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))
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 If drr IsNot Nothing Then
CveCuenta = drt("CveCuenta").ToString.ToEntero IdCuenta = drt("IdCtaContable").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString() CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString() NombreCuenta = drr("Nombre").ToString()
End If End If
EsComodin = 0 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 If drr IsNot Nothing Then
IdCuenta = drt("IdCtaContable").ToString.ToEntero IdCuenta = drr("Id").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString() CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString() NombreCuenta = drr("Nombre").ToString()
EsComodin = 1
End If 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 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
End If End If
Dim dr As DataRow = DtMovimientos.NewRow Dim dr As DataRow = DtMovimientos.NewRow
dr("IdCuenta") = IdCuenta dr("IdCuenta") = IdCuenta
dr("CveCuenta") = CveCuenta dr("CveCuenta") = CveCuenta

View File

@@ -369,7 +369,7 @@
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes" <asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Total,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio,TipoCambioOriginal, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal,EsImportacion" DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Total,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio,TipoCambioOriginal, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal,EsImportacion,NoDeducible"
Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None"> Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>

View File

@@ -687,18 +687,15 @@ Partial Class Bancos_ProveedoresAbonar
Validada = False Validada = False
If Valida.EsValida = 2 Then 'Cancelada If Valida.EsValida = 2 Then 'Cancelada
'estatus inventario, no surtida 'estatus inventario, no surtida
If gvr.DataKey("EstatusInventario") = "1" Then If gvr.DataKey("EstatusInventario") = "1" Then
MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} , relacione su factura nueva para descontar saldo<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion")) MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} , relacione su factura nueva para descontar saldo<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
Else Else
MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} con movimientos de almacen, relacione su factura nueva para descontar saldo<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion")) MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} con movimientos de almacen, relacione su factura nueva para descontar saldo<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
End If End If
Else Else
MsgValidadas.AppendFormat("Factura No se pudo Validar: {0} - {1}<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion")) MsgValidadas.AppendFormat("Factura No se pudo Validar: {0} - {1}<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
End If End If
End If End If
End If End If
End If End If
@@ -767,7 +764,6 @@ Partial Class Bancos_ProveedoresAbonar
Dim FolioFijo As Integer = 0 Dim FolioFijo As Integer = 0
Dim TipoCambio As Decimal = 0 Dim TipoCambio As Decimal = 0
'cheque 'cheque
If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa.Contiene(13, 83) Then FolioFijo = TxtFolio.Text.ToEntero 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 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." MsgError = "Error al actualziar Cuanta Referencia y Concepto Deposito."
End If End If
End If End If
End If End If
@@ -834,6 +829,8 @@ Partial Class Bancos_ProveedoresAbonar
CompraActual.Total = gvr.DataKey("Total").ToDecimal CompraActual.Total = gvr.DataKey("Total").ToDecimal
CompraActual.IVA = gvr.DataKey("IVA").ToDecimal CompraActual.IVA = gvr.DataKey("IVA").ToDecimal
CompraActual.IVADeducible = gvr.DataKey("IVADeducible").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.IEPS = gvr.DataKey("IEPS").ToDecimal
CompraActual.RetIVA = gvr.DataKey("RetIVA").ToDecimal CompraActual.RetIVA = gvr.DataKey("RetIVA").ToDecimal
CompraActual.RetISR = gvr.DataKey("RetISR").ToDecimal CompraActual.RetISR = gvr.DataKey("RetISR").ToDecimal
@@ -843,15 +840,15 @@ Partial Class Bancos_ProveedoresAbonar
CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "1" CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "1"
CompraActual.UsuarioActual = UsuarioActual CompraActual.UsuarioActual = UsuarioActual
CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
CompraActual.IdCtaContableProv = If(CompraActual.CveMoneda >= 2, IdCtaProveedorExtranjera, CtaProveedor) CompraActual.IdCtaContableProv = If(CompraActual.CveMoneda >= 2, IdCtaProveedorExtranjera, CtaProveedor)
CompraActual.IdCtaContableProvComplementaria = IdCtaContComplementaria CompraActual.IdCtaContableProvComplementaria = IdCtaContComplementaria
'Importe de pago 'Importe de pago
Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
'Tipos de cambio '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 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 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 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 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(" <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Póliza</a><br/> ", IDPoliza) If IDPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then Msg.AppendFormat(" <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Póliza</a><br/> ", IDPoliza)
If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>&nbsp;&nbsp; ", CvePrePoliza) Msg.AppendFormat("<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>&nbsp;&nbsp; ", CvePrePoliza)
End If End If
Dim Mensaje As String = String.Format("El Documento se generó correctamente.<br /><br /> {0} ", Msg.ToString) Dim Mensaje As String = String.Format("El Documento se generó correctamente.<br /><br /> {0} ", Msg.ToString)
@@ -1516,7 +1513,6 @@ Partial Class Bancos_ProveedoresAbonar
#Region " NOTIFICACION PAGO " #Region " NOTIFICACION PAGO "
Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean) Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
Try Try
@@ -1555,263 +1551,8 @@ Partial Class Bancos_ProveedoresAbonar
GuardaLog("Error al enviar notificación de pago ProveedoresAbonar --> " & ex.StackTrace.ToString) GuardaLog("Error al enviar notificación de pago ProveedoresAbonar --> " & ex.StackTrace.ToString)
End Try End Try
End Sub 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("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
' strBody.Append("<head> ")
' strBody.Append(" <style type=""text/css""> ")
' strBody.Append(" body ")
' strBody.Append(" { ")
' strBody.Append(" margin:0px; ")
' strBody.Append(" padding:0px 0px 0px 0px; ")
' strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
' strBody.Append(" font-size: 10px; ")
' strBody.Append(" background-color:#F0F0F0; ")
' strBody.Append(" } ")
' strBody.Append(" a.Texto ")
' strBody.Append(" { ")
' strBody.Append(" font-size:11px; ")
' strBody.Append(" background-color:#F7F6F3; ")
' strBody.Append(" text-decoration:none; ")
' strBody.Append(" font-weight:bold; ")
' strBody.Append(" } ")
' strBody.Append(" .Texto ")
' strBody.Append(" { ")
' strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
' strBody.Append(" } ")
' strBody.Append(" .TextoAlterno ")
' strBody.Append(" { ")
' strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
' strBody.Append(" vertical-align:middle; height:20px;")
' strBody.Append(" } ")
' strBody.Append(" .BarraIdentidad ")
' strBody.Append(" { ")
' strBody.Append(" color:#FFFFFF; ")
' strBody.Append(" background:#F0F0F0; ")
' strBody.Append(" font-weight:bold; ")
' strBody.Append(" font-size:19px; ")
' strBody.Append(" font-style:oblique; ")
' strBody.Append(" } ")
' strBody.Append(" .Titulos ")
' strBody.Append(" { ")
' strBody.Append(" background-color: Gray;")
' strBody.Append(" color:White; ")
' strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
' strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
' strBody.Append(" text-decoration:none; ")
' strBody.Append(" } ")
' strBody.Append(" .Verde {color: #00CC00;} ")
' strBody.Append(" .Negro {color: #000000;} ")
' strBody.Append(" .Rojo {color: #FF0000;} ")
' strBody.Append(" </style> ")
' strBody.Append("</head> ")
' strBody.Append("<body> ")
' strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
' strBody.AppendFormat(" <fieldset>")
' strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
' strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </table>")
' strBody.AppendFormat(" </fieldset>")
' strBody.AppendFormat("</div><br/><br/>")
' strBody.AppendFormat("<div style='width: 600px'>")
' strBody.AppendFormat(" <fieldset>")
' strBody.AppendFormat(" <legend><b> </b></legend>")
' strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
' If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
' strBody.Append(" <tr style=""height: 22px""> ")
' strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
' strBody.Append(" </tr> ")
' End If
' If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
' strBody.Append(" <tr style=""height: 22px""> ")
' strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
' strBody.Append(" </tr> ")
' End If
' strBody.Append(" <tr style=""height: 22px""> ")
' strBody.AppendFormat(" <td>&nbsp;</td> ")
' strBody.Append(" </tr> ")
' strBody.Append(" </table> ")
' strBody.AppendFormat(" </fieldset>")
' strBody.Append(" </div> ")
' strBody.AppendFormat("<div style='width: 600px'>")
' strBody.AppendFormat(" <table style='width:100%'>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td style='vertical-align: top'>")
' strBody.AppendFormat(" <fieldset>")
' strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
' strBody.AppendFormat(" <table width='100%'>")
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
' strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
' strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Movimiento:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Banco:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Cuenta:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
' strBody.AppendFormat(" </tr>")
' If objIE.CuentaDepositado.ToString <> "" Then
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Cuenta Destino:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
' strBody.AppendFormat(" </tr>")
' End If
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Fecha:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Importe:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Observaciones:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td colspan='2'>")
' strBody.AppendFormat(" <hr />")
' strBody.AppendFormat(" </td>")
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </table>")
' strBody.AppendFormat(" </fieldset>")
' strBody.AppendFormat(" </td>")
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </table>")
' strBody.AppendFormat("</div>")
' '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("<div style='width: 1000px'>")
' strBody.AppendFormat(" <table style='width:1000px'>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td style='vertical-align: top'>")
' strBody.AppendFormat(" <fieldset>")
' strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
' strBody.AppendFormat(" <table width='1000px'>")
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
' strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>")
' strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>")
' strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>")
' strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
' strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>")
' strBody.AppendFormat(" </tr>")
' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
' strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
' strBody.AppendFormat(" </tr>")
' Next
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td colspan='5'>")
' strBody.AppendFormat(" <hr />")
' strBody.AppendFormat(" </td>")
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </table>")
' strBody.AppendFormat(" </fieldset>")
' strBody.AppendFormat(" </td>")
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </table>")
' strBody.AppendFormat("</div>")
' End If
' strBody.Append(" <div> Favor de no responder a este correo. </div> ")
' strBody.Append("</body></html>")
' End If
' objIE.Dispose()
' Return strBody.ToString
'End Function
#End Region #End Region
#Region "SALDAR CUENTAS" #Region "SALDAR CUENTAS"
@@ -1950,31 +1691,17 @@ Partial Class Bancos_ProveedoresAbonar
End If End If
Next Next
If MsgError.Trim.Length = 0 AndAlso CvePrePoliza > 0 Then 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 If ObjConta.ValorPolizaDescuadre > 0 Then
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") 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 End If
End If End If
If MsgError = "" Then If MsgError = "" Then
ObjConta.Commit() ObjConta.Commit()
CargaDatos(CveMoneda) CargaDatos(CveMoneda)

View File

@@ -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" %> <%@ Page Title="Compras - Registro de Facturas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" ValidateRequest="false" CodeFile="Compras.aspx.vb" Inherits="Compras_Compras" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UppAddAcciones" runat="server"> <asp:UpdatePanel ID="UppAddAcciones" runat="server">
<ContentTemplate> <ContentTemplate>
@@ -285,8 +283,6 @@
</div> </div>
<div class="row"> <div class="row">
<table> <table>
<tr> <tr>
<td align="Center" style="width: 100px">Fecha Factura:</td> <td align="Center" style="width: 100px">Fecha Factura:</td>
@@ -323,11 +319,6 @@
</tr> </tr>
</table> </table>
<div class="form-group whitoutcol" style="width: 280px;"> <div class="form-group whitoutcol" style="width: 280px;">
<span class="whitoutcol linewhitsize comprasdfleft">Descripción: </span> <span class="whitoutcol linewhitsize comprasdfleft">Descripción: </span>
<div class="whitoutcol whitoutcol comprasdfleftvar"> <div class="whitoutcol whitoutcol comprasdfleftvar">
@@ -349,17 +340,6 @@
<asp:CheckBox ID="ChkEsNoDeducible" runat="server" OnCheckedChanged="ChkEsNoDeducible_CheckedChanged1" AutoPostBack="true" /> <asp:CheckBox ID="ChkEsNoDeducible" runat="server" OnCheckedChanged="ChkEsNoDeducible_CheckedChanged1" AutoPostBack="true" />
</div> </div>
</div> </div>
<%-- <div class="form-group whitoutcol" style="width: 320px;">
<span class="whitoutcol linewhitsize comprasdfleft">Tipo Gasto: </span>
<div class="whitoutcol whitoutcol comprasdfleftvar">
<asp:DropDownList ID="DdlTipoGasto" runat="server" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>--%>
</div> </div>
</div> </div>
</div> </div>
@@ -1141,7 +1121,7 @@
<div class="col-md-6 "> <div class="col-md-6 ">
<asp:Button runat="server" ID="btnProrateo" Visible="false" Text="Prorratear" CommandArgument="Compras" CssClass="btn btn-success" /> <asp:Button runat="server" ID="btnProrateo" Visible="false" Text="Prorratear" CommandArgument="Compras" CssClass="btn btn-success" />
<asp:Button runat="server" ID="btnProrateo2" Visible="false" Text="Prorratear Nomina" CommandArgument="Nomina" CssClass="btn btn-success" /> <asp:Button runat="server" ID="btnProrateo2" Visible="false" Text="Prorratear Nomina" CommandArgument="Nomina" CssClass="btn btn-success" />
<asp:Button runat="server" ID="BtnProrateoDeducible" Visible="true" Text="Prorratear 8.5%" CommandArgument="Prorratear Deducible" CssClass="btn btn-success" /> <asp:Button runat="server" ID="BtnProrateoDeducible" Visible="false" Text="Prorratear 8.5%" CommandArgument="Prorratear Deducible" CssClass="btn btn-success" />
</div> </div>
</div> </div>
@@ -4572,9 +4552,9 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<br /> <br />
<asp:UpdatePanel ID="UpEsNoDeduciblePS" runat="server" UpdateMode="Conditional" Visible="false"> <asp:UpdatePanel ID="UpEsNoDeduciblePS" runat="server" UpdateMode="Conditional" >
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row" runat="server" id="divNoDeducibleModal" visible="false">
<div class="col-md-6"> <div class="col-md-6">
<label>¿Es No Deducible? </label> <label>¿Es No Deducible? </label>
<asp:CheckBox ID="ChkEsNoDeduciblePS" runat="server" /> <asp:CheckBox ID="ChkEsNoDeduciblePS" runat="server" />
@@ -4587,13 +4567,6 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<asp:Label ID="Label11" runat="server" Text="Total:"></asp:Label>&nbsp&nbsp$ <asp:Label ID="Label11" runat="server" Text="Total:"></asp:Label>&nbsp&nbsp$
<asp:Label ID="LblTotalPS" ClientIDMode="Static" runat="server" Text="0.00"></asp:Label> <asp:Label ID="LblTotalPS" ClientIDMode="Static" runat="server" Text="0.00"></asp:Label>
</div> </div>
@@ -4603,13 +4576,8 @@
</div> </div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</div> </div>

View File

@@ -11,6 +11,7 @@ Imports Newtonsoft.Json
Imports Extensiones Imports Extensiones
Imports MoreLinq Imports MoreLinq
Partial Class Compras_Compras Partial Class Compras_Compras
Inherits ClsPaginas Inherits ClsPaginas
@@ -1070,7 +1071,7 @@ Partial Class Compras_Compras
If ViewState("TotalOriginal") Is Nothing Then If ViewState("TotalOriginal") Is Nothing Then
Return 0 Return 0
Else Else
Return ViewState("TotalOriginal").ToString.Todecimal Return ViewState("TotalOriginal").ToString.ToDecimal
End If End If
End Get End Get
Set(value As Decimal) Set(value As Decimal)
@@ -2083,7 +2084,6 @@ Partial Class Compras_Compras
End If End If
SubTotal2 = SubTotalReal - Descuentos SubTotal2 = SubTotalReal - Descuentos
If Descuentos > 0 Then If Descuentos > 0 Then
@@ -2127,10 +2127,8 @@ Partial Class Compras_Compras
HFDiferenciaCompra.Value = TxtTotal.Text HFDiferenciaCompra.Value = TxtTotal.Text
'LblRetIVA.Text = TmpDT.MAX("PorcentajeRetIVA").ToString '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
LblRetIVA.Text = (If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" 'LblRetISR.Text = TmpDT.MAX("PorcentajeRetISR").ToString '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
LblRetISR.Text = (If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
'ASIGNA VALORES ORIGINALES PARA GUARDAR 'ASIGNA VALORES ORIGINALES PARA GUARDAR
AsignaValoresOriginales(SubTotal, SubTotal2, IVA, RetencionIVA, RetencionISR, Total) 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("Resico", "5"))
DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6")) DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6"))
End If End If
End If End If
End If End If
UpPS.Update() UpPS.Update()
End Sub End Sub
@@ -2432,13 +2426,12 @@ Partial Class Compras_Compras
HdnCompraSaldo.Value = TotalTemp.ToString HdnCompraSaldo.Value = TotalTemp.ToString
CompraSaldo = TotalTemp CompraSaldo = TotalTemp
LblRetIVA.Text = (If(Subtotal2Temp > 0, (RetIVATemp / Subtotal2Temp), 0) * 100).FormatoNumero(3) + "%" LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(3), "")
LblRetISR.Text = (If(Subtotal2Temp > 0, (RetISRTemp / Subtotal2Temp), 0) * 100).FormatoNumero(3) LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(3), "")
'ASIGNA VALORES ORIGINALES PARA GUARDAR 'ASIGNA VALORES ORIGINALES PARA GUARDAR
AsignaValoresOriginales(SubtotalTemp, Subtotal2Temp, IVATemp, RetIVATemp, RetISRTemp, Total) AsignaValoresOriginales(SubtotalTemp, Subtotal2Temp, IVATemp, RetIVATemp, RetISRTemp, Total)
End Sub End Sub
''' <summary> ''' <summary>
@@ -2643,8 +2636,8 @@ Partial Class Compras_Compras
LblUsuarioCaptura.Text = dr("Usuario").ToString LblUsuarioCaptura.Text = dr("Usuario").ToString
LitFechCaptura.Text = dr("FechaIng").ToString.ToDate.ToShortDateString LitFechCaptura.Text = dr("FechaIng").ToString.ToDate.ToShortDateString
LitFechCaptura.ToolTip = dr("FechaIng").ToString LitFechCaptura.ToolTip = dr("FechaIng").ToString
LblRetIVA.Text = Math.Round((dr("RetIVA").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 = Math.Round((dr("RetISR").ToString.ToDouble / TxtSubTotal2.Text.ToDouble) * 100, 4).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 If dr("TipoFactura").ToString <> "CFDi" Then LblTipoFact.Text = dr("TipoFactura").ToString : divTipoFactura.Visible = True
ViewState("CveFactura") = dr("CveFactura").ToString.ToEntero ViewState("CveFactura") = dr("CveFactura").ToString.ToEntero
ViewState("IdPoliza") = dr("IdPoliza").ToString.ToEntero ViewState("IdPoliza") = dr("IdPoliza").ToString.ToEntero
@@ -16307,9 +16300,8 @@ Partial Class Compras_Compras
UpAnticipos.Update() UpAnticipos.Update()
End If End If
LblRetIVA.Text = TmpDT.MAX("RetIVAPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
LblRetIVA.Text = (If(SubTotal2 > 0, (RetIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" LblRetISR.Text = TmpDT.MAX("RetISRPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
LblRetISR.Text = (If(SubTotal2 > 0, (RetISR / SubTotal2), 0) * 100).FormatoNumero(3)
'IMPORTES DE RESTRICCION 'IMPORTES DE RESTRICCION
TxtDocumentoImporteFE.Text = Total.ToString.FormatoNumero(2) TxtDocumentoImporteFE.Text = Total.ToString.FormatoNumero(2)
@@ -19625,34 +19617,22 @@ Partial Class Compras_Compras
#Region "ES NO DEDUCIBLE" #Region "ES NO DEDUCIBLE"
Protected Sub ChkEsNoDeducible_CheckedChanged1(sender As Object, e As EventArgs) Protected Sub ChkEsNoDeducible_CheckedChanged1(sender As Object, e As EventArgs)
AplicarNoDeducible()
End Sub
Private Sub AplicarNoDeducible()
If ChkEsNoDeducible.Checked Then If ChkEsNoDeducible.Checked Then
EsNoDeducible = True EsNoDeducible = True
dvNoDeducible.Visible = True dvNoDeducible.Visible = True
GvPS.Columns(11).Visible = True GvPS.Columns(11).Visible = True
UpEsNoDeduciblePS.Visible = True DivEsNoDeducible.Visible = True
Else Else
EsNoDeducible = False EsNoDeducible = False
dvNoDeducible.Visible = False dvNoDeducible.Visible = False
GvPS.Columns(11).Visible = False GvPS.Columns(11).Visible = False
UpEsNoDeduciblePS.Visible = False DivEsNoDeducible.Visible = False
End If 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) AddPS2(EsNoDeducible:=EsNoDeducible)
UpPS.Update() UpPS.Update()
End Sub End Sub
@@ -20312,8 +20292,6 @@ Partial Class Compras_Compras
Protected Sub BtnModalEliminarCompra_Click(sender As Object, e As EventArgs) Protected Sub BtnModalEliminarCompra_Click(sender As Object, e As EventArgs)
Dim ObjAC As ClsContPAQi = Nothing Dim ObjAC As ClsContPAQi = Nothing
Dim Comp As New ClsCompras() Dim Comp As New ClsCompras()
Dim ObjEventos As New ClsOIEventos(Comp.IniciaTransacSQL()) Dim ObjEventos As New ClsOIEventos(Comp.IniciaTransacSQL())
@@ -20346,8 +20324,6 @@ Partial Class Compras_Compras
End If End If
End If End If
Try Try
If ObjInventarios.GetInv_ComprasMov(CveCompra, UsuarioActual.CveEmpresa) Then If ObjInventarios.GetInv_ComprasMov(CveCompra, UsuarioActual.CveEmpresa) Then
Dim DTInventarios As DataTable = ObjInventarios.DtResultados Dim DTInventarios As DataTable = ObjInventarios.DtResultados
@@ -20421,9 +20397,6 @@ Partial Class Compras_Compras
End If End If
If Not ErrorCompra Then If Not ErrorCompra Then
If Not Comp.DeleteCompra(CveCompra, False) Then If Not Comp.DeleteCompra(CveCompra, False) Then
ErrorCompra = True ErrorCompra = True
@@ -20446,17 +20419,14 @@ Partial Class Compras_Compras
ObjConta.Dispose() ObjConta.Dispose()
End Sub End Sub
#End Region #End Region
#Region "PRORATEAR DEDUCIBLE" #Region "PRORATEAR 8.5%"
Private Sub Proratear85Deducible()
Private Sub ProratearDeducible() ChkEsNoDeducible.Checked = True
AplicarNoDeducible()
ChkEsNoDeducible_CheckedChanged1(Nothing, Nothing)
Dim Consec As Integer = 1 Dim Consec As Integer = 1
@@ -20483,7 +20453,6 @@ Partial Class Compras_Compras
Next Next
TmpDT.AcceptChanges() TmpDT.AcceptChanges()
Dim psCvePs As Integer = 700562 Dim psCvePs As Integer = 700562
Dim rowPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, psCvePs).Rows(0) 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 For Each drIva As DataRow In DT_IVAS.Rows
Dim nRowAgrupado As DataRow = DT_Agrupado.NewRow Dim nRowAgrupado As DataRow = DT_Agrupado.NewRow
Dim drIVAPorcentaje As Decimal = drIva("IVAPorcentaje").ToString.ToDecimal Dim drIVAPorcentaje As Decimal = drIva("IVAPorcentaje").ToString.ToDecimal
Dim drRetIVAPorcentaje As Decimal = drIva("RetIVAPorcentaje").ToString.ToDecimal Dim drRetIVAPorcentaje As Decimal = drIva("RetIVAPorcentaje").ToString.ToDecimal
Dim drRetISRPorcentaje As Decimal = drIva("RetISRPorcentaje").ToString.ToDecimal Dim drRetISRPorcentaje As Decimal = drIva("RetISRPorcentaje").ToString.ToDecimal
@@ -20589,13 +20557,13 @@ Partial Class Compras_Compras
TmpDT = DTProtateo TmpDT = DTProtateo
BtnProrateoDeducible.Visible = False BtnProrateoDeducible.Visible = False
UpParametros.Update()
AddPS2(True) AddPS2(True)
End Sub End Sub
Private Sub BtnProrateoDeducible_Click(sender As Object, e As EventArgs) Handles BtnProrateoDeducible.Click Private Sub BtnProrateoDeducible_Click(sender As Object, e As EventArgs) Handles BtnProrateoDeducible.Click
ProratearDeducible() Proratear85Deducible()
End Sub End Sub
#End Region #End Region
@@ -20604,8 +20572,6 @@ Partial Class Compras_Compras
End Class End Class
Public Class MMensajeDevolucion Public Class MMensajeDevolucion
Public Property CveMovimiento As Integer Public Property CveMovimiento As Integer
Public Property TieneError As Boolean Public Property TieneError As Boolean

View File

@@ -320,7 +320,7 @@
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" /> <asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes" <asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes"
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"> 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">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>

View File

@@ -709,6 +709,7 @@ Partial Class Compras_ReembolsosComprobaciones
CompraActual.PorcentajeIVA = gvr.DataKey("IVAPorcentaje").ToDecimal CompraActual.PorcentajeIVA = gvr.DataKey("IVAPorcentaje").ToDecimal
CompraActual.UsuarioActual = UsuarioActual CompraActual.UsuarioActual = UsuarioActual
CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
CompraActual.CompraNoDeducible = gvr.DataKey("NoDeducible").ToEntero
CompraActual.IdCtaContableProv = IdCtaProveedor CompraActual.IdCtaContableProv = IdCtaProveedor
ImportePagar = gvr.FCTextBox("TxtAbonar").Text.ToDecimal ImportePagar = gvr.FCTextBox("TxtAbonar").Text.ToDecimal

View File

@@ -2978,7 +2978,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
End If End If
If CveIE > 0 AndAlso gvr.DataKey("CveConceptoContable").ToEntero = 30 Then If CveIE > 0 AndAlso gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE) MensajeAlert.AppendFormat("<br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
End If End If
Next Next