restar a ot. ingresos, los impuestos por acreditar, no se deben de poner en acreditables

This commit is contained in:
rrene
2019-11-15 12:48:20 -07:00
parent a4a6b7f187
commit ae8e4621d7
3 changed files with 20 additions and 17 deletions

View File

@@ -2737,11 +2737,6 @@ Partial Class Bancos_ProveedoresAbonar
End If
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, gr.DataKey("SerieFolio").ToString, 78, ConceptoPartida, Now, IdCtaContable:=UsuarioActual.Empresa.IdCuentaOtrosIngresos, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCPago), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveCuenta:=-1) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
If gr.DataKey("IVA").ToDecimal > 0 Then
@@ -2758,11 +2753,10 @@ Partial Class Bancos_ProveedoresAbonar
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, gr.DataKey("SerieFolio").ToString, 14, ConceptoPartida, Now, IdCtaContable:=IdCtaIVAXAcreditar, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IVA, IVA * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, gr.DataKey("SerieFolio").ToString, 19, ConceptoPartida, Now, IdCtaContable:=IdCtaIVAAcreditable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IVA, IVA * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
Saldo = Saldo - IVA
End If
If gr.DataKey("IEPS").ToDecimal > 0 Then
@@ -2771,13 +2765,19 @@ Partial Class Bancos_ProveedoresAbonar
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, gr.DataKey("SerieFolio").ToString, 25, ConceptoPartida, Now, IdCtaContable:=CtaProveedor, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IEPS, IEPS * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), CveCuenta:=CveCuenta) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, gr.DataKey("SerieFolio").ToString, 26, ConceptoPartida, Now, IdCtaContable:=CtaProveedor, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IEPS, IEPS * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), CveCuenta:=CveCuenta) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
Saldo = Saldo - IEPS
End If
' se manda al ot ingresos, los impuestos por acreditar
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, gr.DataKey("SerieFolio").ToString, 78, ConceptoPartida, Now, IdCtaContable:=UsuarioActual.Empresa.IdCuentaOtrosIngresos, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCPago), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveCuenta:=-1) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia

View File

@@ -258,7 +258,7 @@
<asp:UpdatePanel runat="server" ID="UpPorcentajeMarcas" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkPorcentajeMarcas" Visible="False" data-toggle="tooltip" data-placement="left" title="Modificar Precio de PS por Marca." runat="server" Text="<i class='fa fa-pencil'></i> Modificar Precio por Marca"></asp:LinkButton>
<asp:LinkButton ID="LnkPorcentajeMarcas" Visible="False" data-toggle="tooltip" data-placement="left" title="Condiciones Comerciales" runat="server" Text="<i class='fa fa-pencil'></i> Modificar Precio por Marca"></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -5133,7 +5133,10 @@ Partial Class PV
Private Sub CalculaMesesUso()
Dim FechaI As Date = TxtFechaAjuste.Text.ToDate.AddDays(1)
Dim FechaF As Date = Now
Dim FechaT As Date = String.Format("{0}/{1}/{2}", FechaI.Day, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual
Dim Dia As Integer = FechaI.Day
'validación adicional, para saber si el mes tiene 31 días y el actua es menor.
If FechaI.Day > Today.LastDayOfMonth.Day Then Dia = Today.LastDayOfMonth.Day
Dim FechaT As Date = String.Format("{0}/{1}/{2}", Dia, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual
Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo