This commit is contained in:
Antonio Gonzalez
2020-08-11 18:46:58 -07:00
9 changed files with 89 additions and 57 deletions

View File

@@ -943,7 +943,7 @@ Public Class ClsBancos
#Region "Complemento Pagos" #Region "Complemento Pagos"
Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsCancelacion As Boolean = False, Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean
If FechaTimbrado = MinFecha Then FechaTimbrado = DateTime.Now If FechaTimbrado = MinFecha Then FechaTimbrado = DateTime.Now
Dim Serie As String = "Pag" Dim Serie As String = "Pag"
@@ -954,11 +954,11 @@ Public Class ClsBancos
Dim dttpagos As DataTable = Nothing Dim dttpagos As DataTable = Nothing
Dim dr As Data.DataRow = Nothing Dim dr As Data.DataRow = Nothing
If GetComplementoPagosRep(-1, Now.AddYears(-2), Now, If(CvePrePoliza > 0, -1, CveIE), CveVenta, If(EsCancelacion OrElse EsRegeneracion, 2, 1), UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then If GetComplementoPagosRep(-1, Now.AddYears(-2), Now, If(CvePrePoliza > 0, -1, CveIE), CveVenta, If(EsRegeneracion, 2, 1), UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then
dr = DtResultados.FiltroPrimero("CveVenta IS NULL") dr = DtResultados.FiltroPrimero("CveVenta IS NULL")
dttpagos = DtResultados.FiltraParametros("CveVenta > 0") dttpagos = DtResultados.FiltraParametros("CveVenta > 0")
End If End If
If EsCancelacion Then Estatus = 2 'If EsCancelacion Then Estatus = 2
If EsRegeneracion Then Estatus = 3 If EsRegeneracion Then Estatus = 3
@@ -1044,9 +1044,9 @@ Public Class ClsBancos
End Select End Select
If EsCancelacion AndAlso (CFDIRelacionado = "-1" OrElse CFDIRelacionado = "") Then 'If EsCancelacion AndAlso (CFDIRelacionado = "-1" OrElse CFDIRelacionado = "") Then
Mensaje += " La cancelación debe de tener documento relacionado" ' Mensaje += " La cancelación debe de tener documento relacionado"
End If 'End If
If Not Mensaje.Length = 0 Then If Not Mensaje.Length = 0 Then
GuardaLog(Mensaje) GuardaLog(Mensaje)
@@ -1061,7 +1061,7 @@ Public Class ClsBancos
Timbre = Timbrado.PreparaTimbrePago(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal, Timbre = Timbrado.PreparaTimbrePago(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
RFCCliente, dr("NombreCliente").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago, RFCCliente, dr("NombreCliente").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago,
dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDouble, dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDouble,
UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDouble, dttpagos, CFDIRelacionado:=CFDIRelacionado, EsCancelacion:=EsCancelacion) UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDouble, dttpagos, CFDIRelacionado:=CFDIRelacionado, EsCancelacion:=False)
''PREPARA PARA CANCELACION POR SUSTITUCION DE COMPLEMENTO DE PAGO ''PREPARA PARA CANCELACION POR SUSTITUCION DE COMPLEMENTO DE PAGO
'If CFDIRelacionado <> "-1" And CFDIRelacionado <> "" Then 'If CFDIRelacionado <> "-1" And CFDIRelacionado <> "" Then

View File

@@ -1211,11 +1211,11 @@ Public Class ClsContabilidad
CveConceptoContable = dr("CveConceptoContable").ToString().ToEntero CveConceptoContable = dr("CveConceptoContable").ToString().ToEntero
Select Case CveConceptoContable Select Case CveConceptoContable
Case 6, 5, 17, 14, 19, 15, 16, 272, 275 Case 6, 5, 17, 14, 19, 15, 16, 272, 275, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316
SigReferencia = dr("CveCompra").ToString.ContaReferencia(TipoContaReferencia.Compra) SigReferencia = dr("CveCompra").ToString.ContaReferencia(TipoContaReferencia.Compra)
Case 2, 4, 1, 13, 61, 62, 63, 8, 9, 91, 251, 226 Case 2, 4, 1, 13, 61, 62, 63, 8, 9, 91, 251, 226, 291, 292, 293, 294, 295, 296
SigReferencia = dr("CveVenta").ToString.ContaReferencia(TipoContaReferencia.Venta) SigReferencia = dr("CveVenta").ToString.ContaReferencia(TipoContaReferencia.Venta)
Case 30, 66, 92 Case 30, 66, 92, 204
SigReferencia = dr("CveIE").ToString.ContaReferencia(TipoContaReferencia.Banco) SigReferencia = dr("CveIE").ToString.ContaReferencia(TipoContaReferencia.Banco)
End Select End Select

View File

@@ -2197,6 +2197,7 @@ Namespace Modelos
Dim ImporteAcumulado91 As Decimal = 0 Dim ImporteAcumulado91 As Decimal = 0
Dim CveUltimaVenta As Integer = 0 Dim CveUltimaVenta As Integer = 0
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = 0
If tipoCambio = 1 Then If tipoCambio = 1 Then
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
CveCuenta = ObjFactura.Cliente.CveCuentaClientes CveCuenta = ObjFactura.Cliente.CveCuentaClientes
@@ -2600,8 +2601,12 @@ Namespace Modelos
'CTACONTABLE 'CTACONTABLE
'IdCtaContable = IdCtaContAnticipos 'IdCtaContable = IdCtaContAnticipos
'CveCuenta = CveCuentaAnticipos 'CveCuenta = CveCuentaAnticipos
If tipoCambio = 1 Then
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
CveCuenta = ObjFactura.Cliente.CveCuentaClientes Else
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
End If
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta

View File

@@ -114,7 +114,7 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvD" runat="server" GridLines="None" <asp:GridView ID="GvD" runat="server" GridLines="None"
DataKeyNames="CobranzaCorreo,CveIE,CveVenta,CveEmpresa,FechaDocumento, PagoAbreviaturaSAT,Folio, ClaveFormaPagoSAT, NumCuenta,Importe, FolioFiscal,VentaSerie,VentaFolio,VentaAbreviaturaSAT, VentaImportePagado,MetodoPago,TipoCambio,NumParcialidad,ImpSaldoInsoluto,ImpSaldoAnterior,RFC,NombreCliente,PorcentajeIVA,PorcentajeIEPS,CuentaBeneficiario,SerieFolioPago,FolioFiscalComplemento" DataKeyNames="CobranzaCorreo,CveIE,CveVenta,CveEmpresa,FechaDocumento, PagoAbreviaturaSAT,Folio, ClaveFormaPagoSAT, NumCuenta,Importe, FolioFiscal,VentaSerie,VentaFolio,VentaAbreviaturaSAT, VentaImportePagado,MetodoPago,TipoCambio,NumParcialidad,ImpSaldoInsoluto,ImpSaldoAnterior,RFC,NombreCliente,PorcentajeIVA,PorcentajeIEPS,CuentaBeneficiario,SerieFolioPago,FolioFiscalComplemento,CveComplementoPago"
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros"> CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
<Columns> <Columns>
<asp:TemplateField HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">

View File

@@ -300,23 +300,72 @@ Partial Class Bancos_RepComplementoPago
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
Dim SerieFolioPago As String = Gvr.DataKey("SerieFolioPago").ToString Dim SerieFolioPago As String = Gvr.DataKey("SerieFolioPago").ToString
Dim CFDIRelacionado As String = Gvr.DataKey("FolioFiscalComplemento").ToString Dim FolioFiscalCancelar As String = Gvr.DataKey("FolioFiscalComplemento").ToString
Dim CveComplementoPagoCancelar As Integer = Gvr.DataKey("CveComplementoPago").ToEntero
Dim CvePACCancelacion As Integer = UsuarioActual.Empresa.CvePAC
Dim RFCReceptorCancelar As String = Gvr.DataKey("RFC").ToString
If CFDIRelacionado <> "" Then If FolioFiscalCancelar <> "" Then
Dim objBancos As New ClsBancos Dim ObjCancelacion As New Timbrado
Dim ObjBanco As New ClsBancos
If objBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, -1, CFDIRelacionado, True) Then If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
Alert($"Complemento {SerieFolioPago} cancelado correctamente.")
Else If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
Alert($"Se presento un error al cancelar el complementob {SerieFolioPago}.", TipoMensaje.MsgError)
Alert("El complemento se cancelo correctamente.")
End If End If
objBancos.Dispose() Else
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion) Then
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
Alert("El complemento se cancelo correctamente.")
End If
Else
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgError)
End If
End If
ObjBanco.Dispose()
'Dim objBancos As New ClsBancos
'If objBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, -1, CFDIRelacionado, True) Then
' Alert($"Complemento {SerieFolioPago} cancelado correctamente.")
'Else
' Alert($"Se presento un error al cancelar el complementob {SerieFolioPago}.", TipoMensaje.MsgError)
'End If
'objBancos.Dispose()
End If End If
End Sub End Sub
Function EstatusSATCancelado(FolioFiscal As String, RFCDe As String, RFCReceptor As String) As Boolean
Dim respuesta As Boolean = False
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, RFCDe, RFCReceptor, "0", True)
If Vigencia IsNot Nothing Then
If Vigencia.Estado.ToUpper = "CANCELADO" Then
respuesta = True
Else
respuesta = False
End If
Else
respuesta = False
End If
Return respuesta
End Function
Protected Sub LnkSendMail_Click(sender As Object, e As EventArgs) Protected Sub LnkSendMail_Click(sender As Object, e As EventArgs)
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
HdnSerieFolioPago.Value = gvRow.DataKey("SerieFolioPago").ToString HdnSerieFolioPago.Value = gvRow.DataKey("SerieFolioPago").ToString

View File

@@ -5714,7 +5714,7 @@ Partial Class Compras_Compras
importeMovimiento = importeMovimiento / TipoCambioCompra importeMovimiento = importeMovimiento / TipoCambioCompra
End If End If
importeMN = importeMovimiento * TipoCambioCompra * Multiplicador importeMN = importeMovimiento * TipoCambioCompra * Multiplicador
IdCtaContable = CtaProveedor IdCtaContable = If(CveTipoConcepto = 2, CtaProveedorAcreedores, CtaProveedor)
CveCuenta = CveCuentaProveedor CveCuenta = CveCuentaProveedor
@@ -5755,11 +5755,7 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString) CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'Conta SIG
If CveCuenta = 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
CveCuentaContabilizacion = 0
End If
End If End If
Next Next
@@ -6371,11 +6367,7 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString) CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'Conta SIG
If CveCuenta = 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
CveCuentaContabilizacion = 0
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
@@ -6817,7 +6809,7 @@ Partial Class Compras_Compras
If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 307 If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 307
If tipoCambioActual = 1 Then If tipoCambioActual = 1 Then
IdCtaContable = CtaProveedor IdCtaContable = If(CveTipoConcepto = 2, CtaProveedorAcreedores, CtaProveedor)
CveCuenta = CveCuentaProveedor CveCuenta = CveCuentaProveedor
Else Else
IdCtaContable = CtaProveedorComplementaria IdCtaContable = CtaProveedorComplementaria
@@ -6860,11 +6852,6 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'Conta SIG
If CveCuenta = 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
CveCuentaContabilizacion = 0
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
@@ -7120,11 +7107,6 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'Conta SIG
If CveCuenta = 0 Then
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
'AMORTIZACIÓN NC ESPECIAL COMPLEMENTARIA 'AMORTIZACIÓN NC ESPECIAL COMPLEMENTARIA
If ConceptoContableAnticipo.Contiene(60) And DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then If ConceptoContableAnticipo.Contiene(60) And DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
@@ -7457,11 +7439,7 @@ Partial Class Compras_Compras
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'COnta SIG
If CveCuenta = 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
CveCuentaContabilizacion = 0
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
@@ -16874,14 +16852,8 @@ Partial Class Compras_Compras
'VALIDA IMPORTES 'VALIDA IMPORTES
'VALIDA TOTAL CON LOS IMPORTES TOTALES 'VALIDA TOTAL CON LOS IMPORTES TOTALES
Dim TempSubTotal, TempDescuentos, TempIVA, TempSubTotal2, TempRetIVA, TempRetISR, TempTotal, DifTotales, TempIEPS As Double Dim TempSubTotal, TempDescuentos, TempIVA, TempSubTotal2, TempRetIVA, TempRetISR, TempTotal, DifTotales, TempIEPS As Double
'Dim TempPorcentajeRetIVA = LblRetIVA.Text.ToDouble / 100
'Dim TempPorcentajeRetISR = LblRetISR.Text.ToDouble / 100
Dim Amortizacion As Decimal = 0
If UsuarioActual.CveEmpresa = 119 Then
Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString
End If
Dim Amortizacion As Decimal = 0
Dim TieneAmortizacion As Boolean = False Dim TieneAmortizacion As Boolean = False
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
TieneAmortizacion = True TieneAmortizacion = True
@@ -16891,6 +16863,12 @@ Partial Class Compras_Compras
LblAmortizacion.Text = "0.00" LblAmortizacion.Text = "0.00"
End If End If
If UsuarioActual.CveEmpresa = 119 AndAlso TieneAmortizacion Then
Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString
End If
TempSubTotal = TxtSubTotal.Text.ToDouble TempSubTotal = TxtSubTotal.Text.ToDouble
SubTotalOriginal = TxtSubTotal.Text.ToDouble SubTotalOriginal = TxtSubTotal.Text.ToDouble
SubTotal2Original = TxtSubTotal2.Text.ToDouble SubTotal2Original = TxtSubTotal2.Text.ToDouble

View File

@@ -24,7 +24,7 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSeccionClasificacion,CveAlmacen,CveClasificacion,CveClasificacionDetalle,CveMarca,CveSeccionAlmacen,Almacen,Clasificacion,ClasificacionDetalle,Marca,SeccionAlmacen" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSeccionClasificacion,CveAlmacen,CveClasificacion,CveClasificacionDetalle,CveMarca,CveSeccionAlmacen,Almacen,Clasificacion,ClasificacionDetalle,Marca,SeccionAlmacen"
EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" EmptyDataText="No se encontraron registros" ToolTip="" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%"
GridLines="None"> GridLines="None">
<Columns> <Columns>
<asp:BoundField DataField="Almacen" HeaderText="Almacén" /> <asp:BoundField DataField="Almacen" HeaderText="Almacén" />

View File

@@ -779,7 +779,7 @@ Partial Class Inventarios_EntradasSalidas
'Carga Cliente y ClienteSucursal 'Carga Cliente y ClienteSucursal
If Mov.CveCliente > 0 Then If Mov.CveCliente > 0 Then
If DdlClientes.Items.FindByValue(Mov.CveCliente.ToString()) Is Nothing Then If DdlClientes.Items.FindByValue(Mov.CveCliente.ToString()) Is Nothing Then
Dim dr As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=Mov.CveCliente).FiltroPrimero("") Dim dr As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=Mov.CveCliente, Estatus:=-1).FiltroPrimero("")
If dr IsNot Nothing Then If dr IsNot Nothing Then
DdlClientes.Items.Insert(0, New ListItem(dr("NombreComercial").ToString, dr("CveCliente").ToString)) DdlClientes.Items.Insert(0, New ListItem(dr("NombreComercial").ToString, dr("CveCliente").ToString))
End If End If

View File

@@ -71,7 +71,7 @@
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
Reporte de Compras / Notas Sin Entrada Reporte de Compras Sin Entrada-Ventas Sin Salida
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">