This commit is contained in:
2024-10-02 16:57:11 -07:00
7 changed files with 70 additions and 48 deletions

View File

@@ -8893,11 +8893,39 @@ Public Class ClsPaginas
If Pago.AplicaAcreditable Then
'si tiene iva y su proporcion
If Not ErrorMovtos AndAlso CompraActual.IVA <> 0 Then
ImporteMovimiento = (PorcentajePago * CompraActual.IVA).RoundSQL
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaIVA
'' condición para hacer registro del pago del % al 08, si la factura tiene de ambos IVAs
If CompraActual.PorcentajeIVA = 0.16 AndAlso (CompraActual.IVADeducible08 > 0 OrElse CompraActual.IVANoDeducible08 > 0) Then
ImporteMovimiento = (PorcentajePago * (CompraActual.IVADeducible08 + CompraActual.IVANoDeducible08)).RoundSQL
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
'IVA por acreditar
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, PorcentajeImpuesto:=0.08D, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=TCValuacionPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
If Not ErrorMovtos AndAlso CompraActual.IVADeducible08 > 0 Then
ImporteMovimiento = (PorcentajePago * CompraActual.IVADeducible08).RoundSQL
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento.RoundSQL * TCValuacionPago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoAcreditable, CompraActual.SerieFolio, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, PorcentajeImpuesto:=0.08D, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=TCValuacionPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
End If
If Not ErrorMovtos AndAlso CompraActual.IVANoDeducible08 > 0 Then
ImporteMovimiento = (PorcentajePago * CompraActual.IVANoDeducible08).RoundSQL
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
Dim tConceptoIVA As Integer = If(CompraActual.CompraNoDeducible = 1, 280, 380) '280. iva no deducible en su totalidad
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, tConceptoIVA, CompraActual.SerieFolio, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, PorcentajeImpuesto:=0.08D, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=TCValuacionPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
End If
CompraActual.IVADeducible -= CompraActual.IVADeducible08
CompraActual.IVANoDeducible -= CompraActual.IVANoDeducible08
End If
ImporteMovimiento = (PorcentajePago * (CompraActual.IVADeducible + CompraActual.IVANoDeducible)).RoundSQL
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaIVA
'IVA por acreditar
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, PorcentajeImpuesto:=CompraActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=TCValuacionPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
'IVA ACreditable
If Not ErrorMovtos AndAlso CompraActual.IVADeducible > 0 Then
ImporteMovimiento = (PorcentajePago * CompraActual.IVADeducible).RoundSQL
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
@@ -8912,6 +8940,8 @@ Public Class ClsPaginas
Dim tConceptoIVA As Integer = If(CompraActual.CompraNoDeducible = 1, 280, 380) '280. iva no deducible en su totalidad
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, tConceptoIVA, CompraActual.SerieFolio, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, PorcentajeImpuesto:=CompraActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=TCValuacionPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
End If
End If
'si tiene RET IVA y su proporcion
If Not ErrorMovtos AndAlso CompraActual.RetIVA > 0 Then
@@ -9104,6 +9134,8 @@ Public Class ClsPaginas
Public Property IVA As Decimal
Public Property IVADeducible As Decimal
Public Property IVANoDeducible As Decimal = 0
Public Property IVADeducible08 As Decimal
Public Property IVANoDeducible08 As Decimal = 0
Public Property IEPS As Decimal
Public Property RetIVA As Decimal
Public Property RetISR As Decimal

View File

@@ -364,7 +364,7 @@
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<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,NoDeducible"
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IVADeducible08,IVANoDeducible08,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">
<Columns>
<%-- 0 --%>

View File

@@ -792,6 +792,8 @@ Partial Class Bancos_ProveedoresAbonar
CompraActual.IVA = gvr.DataKey("IVA").ToDecimal
CompraActual.IVADeducible = gvr.DataKey("IVADeducible").ToDecimal
CompraActual.IVANoDeducible = gvr.DataKey("IVANoDeducible").ToDecimal
CompraActual.IVADeducible08 = gvr.DataKey("IVADeducible08").ToDecimal
CompraActual.IVANoDeducible08 = gvr.DataKey("IVANoDeducible08").ToDecimal
CompraActual.CompraNoDeducible = gvr.DataKey("NoDeducible").ToEntero
CompraActual.IEPS = gvr.DataKey("IEPS").ToDecimal
CompraActual.RetIVA = gvr.DataKey("RetIVA").ToDecimal

View File

@@ -6246,6 +6246,19 @@ Partial Class Compras_Compras
Case 14 'IVA X Acreditar
importeMovimiento = CompraActual.IVA
Dim tMinPorcentajeIVA As Decimal = TmpDT.MIN("IVAPorcentaje").ToDecimal
'SI LA FACTURA TRAE 2 TIPOS DE IVA (8,16)
If PorcentajeIVA <> tMinPorcentajeIVA AndAlso tMinPorcentajeIVA > 0 Then
Dim tImporte As Decimal = TmpDT.SUM("IVA", "IVAPorcentaje = " & tMinPorcentajeIVA)
tImporte = (tImporte * tipoCambioActual * Multiplicador).RoundSQL
If tImporte <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, tImporte, tImporte, 14, Concepto, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, PorcentajeImpuesto:=tMinPorcentajeIVA, CveSubProyecto:=CveSubProyectoInsertar, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
End If
importeMovimiento -= tImporte
End If
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
PorcentajeImpuesto = PorcentajeIVA
@@ -6335,34 +6348,6 @@ Partial Class Compras_Compras
End If
End If
'Case 64 'Ganancia
' 'CveSubProyectoInsertar = CveSubProyecto
' If CveSubProyectoInsertar <= 0 Then
' ErrorPrepoliza = True
' Alert("Concepto ganancia cambiaria sin sub proyecto", TipoMensaje.MsgAdvertencia)
' End If
' If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
' If TipoCambioCompra > TCPago Then
' ConceptoContable = 64
' TipoMovimiento = True
' Else
' ConceptoContable = 65
' TipoMovimiento = False
' End If
' If TCPago <> TipoCambioCompra Then
' importeMovimiento = Math.Abs(TCPago - TipoCambioCompra) * importePagoProv
' importeMovimiento -= Math.Abs(TCPago - TipoCambioCompra) * importeIVAAcreditable
' importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetIVAAcreditable
' importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetISRAcreditable
' importeMN = importeMovimiento
' End If
' Else
' importeMovimiento = 0
' End If
Case 6 'Compra
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.Empresa.UsaInventarios
@@ -8708,6 +8693,10 @@ Partial Class Compras_Compras
Next
'If Not validaNumeroReembolso() Then
' Exit Sub
'End If
Dim ObjCompra As New ClsCompras
Dim ObjProveedores As New ClsCompProveedores(ObjCompra.IniciaTransacSQL())
Dim ObjInventario As New ClsInventarios(ObjCompra.IniciaTransacSQL)
@@ -9300,6 +9289,15 @@ Partial Class Compras_Compras
End Sub
Private Function validaNumeroReembolso() As Boolean
If NumeroReembolsoOriginal <> TxtNumeroReembolso.Text Then
End If
End Function
Private Sub MandaCorreoActualizacionDetalle()

View File

@@ -1603,9 +1603,8 @@ Partial Class Inventarios_EntradasSalidas
If RowPS Is Nothing Then Exit Sub
Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero()
Dim FechaCaducidadVal As Date = If(RowPS("AplicaCaducidad").ToString = "True", FechaCaducidad, MinFecha)
PS = RowPS("CodigoPS").ToString
If RowPS("AplicaSerie").ToString = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
'SI NO ES USADO O GARANTIA O SALIDA APOYO LOGISTICO
@@ -1631,8 +1630,6 @@ Partial Class Inventarios_EntradasSalidas
Serie = ""
End If
End If
'salida
If Valido AndAlso DdlConcepto.SelectedValue.Contiene({"3", "5", "7", "8", "11", "12", "13", "15", "16", "17", "20", "21", "30", "31"}) Then ' salida de almacen
@@ -1640,11 +1637,11 @@ Partial Class Inventarios_EntradasSalidas
' LbAgregar.ToolTip = Existencia.ToString
If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(Serie <> "", $" AND Serie = '{Serie}'", "")}") < 0 Then
If Existencia <= 0 Then
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
Alert("No hay existencia del producto: " & PS, TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
Valido = False
Else
Alert(String.Format("Solo hay en existencia: {0}", Existencia), TipoMensaje.MsgAdvertencia)
Alert(String.Format("Solo hay en existencia: {0} - {1}", Existencia, PS), TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
If Not UsuarioActual.TienePermisoProceso(114) Then
Cantidad = Existencia
@@ -1655,13 +1652,11 @@ Partial Class Inventarios_EntradasSalidas
End If
If IndexEspecidico >= 0 Then
Dim CveClasificacion As Integer
'Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
If RowPS IsNot Nothing Then CveClasificacion = RowPS("CveClasificacion").ToString.ToEntero
If Valido Then
DtMovimientos.Rows(IndexEspecidico)("Cantidad") = Cantidad
DtMovimientos.Rows(IndexEspecidico)("CveUM") = CveUM
DtMovimientos.Rows(IndexEspecidico)("UnidadMedida") = UM
@@ -5134,7 +5129,6 @@ Partial Class Inventarios_EntradasSalidas
Dim CvePS As Integer = 0
Dim CveUM As Integer = 0
Dim DataTemp As DataTable
NumRow = NumRow + 1
Dim CveSeccionAlmacen As Integer = -1

View File

@@ -997,7 +997,7 @@ Partial Class ProductosyServicios
hplImagen.Attributes.Add("href", String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Me.Imagen)))
End If
If UsuarioActual.CveRol = 1 Then DivImagen.Visible = True
DivImagen.Visible = True
upGaleria.Update()
RegistraScript("clickgaleria();", "CG")

View File

@@ -347,11 +347,6 @@ Partial Class Ventas_Promociones
'380 AplicaDomingo
'381 IncluyeImpuestos
End Sub
Private Sub CargaDTUltimoCosto()
@@ -530,7 +525,7 @@ Partial Class Ventas_Promociones
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
Dim tuc As Decimal = LblUltimoCosto.Text.ToDecimal
Dim tpu As Decimal = TxtPromocionConcepto.Text.ToDecimal
If (tpu - tuc) / tuc < UsuarioActual.Empresa.Funcionalidad(129).ToDecimal / 100 Then
If tuc <= 0 OrElse (tpu - tuc) / tuc < UsuarioActual.Empresa.Funcionalidad(129).ToDecimal / 100 Then
Alert("El producto está debajo de la utilidad permitida, la promoción requerirá autorización.", TipoMensaje.MsgAdvertencia.ToastAdventencia)
End If
End If
@@ -712,7 +707,8 @@ Partial Class Ventas_Promociones
End If
End If
Else
BloqueadoPromocionPorcentaje = True
End If
Next