mejoras
This commit is contained in:
@@ -186,11 +186,11 @@ Partial Class Bancos_PopIECompras
|
|||||||
ViewState("TipoTransaccion") = value
|
ViewState("TipoTransaccion") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property SaldoVenta As Double
|
Private Property SaldoVenta As Decimal
|
||||||
Get
|
Get
|
||||||
Return ViewState("SaldoVenta").ToString.ToDouble
|
Return ViewState("SaldoVenta").ToString.ToDecimal
|
||||||
End Get
|
End Get
|
||||||
Set(value As Double)
|
Set(value As Decimal)
|
||||||
ViewState("SaldoVenta") = value
|
ViewState("SaldoVenta") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -277,7 +277,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
<Serializable>
|
<Serializable>
|
||||||
Public Class Anticipos
|
Public Class Anticipos
|
||||||
Public Property CveIE As Integer
|
Public Property CveIE As Integer
|
||||||
Public Property Importe As Double
|
Public Property Importe As Decimal
|
||||||
Public Property CvePersonal As Integer
|
Public Property CvePersonal As Integer
|
||||||
End Class
|
End Class
|
||||||
<Serializable>
|
<Serializable>
|
||||||
@@ -677,10 +677,10 @@ Partial Class Bancos_PopIECompras
|
|||||||
RVImporte.Enabled = True
|
RVImporte.Enabled = True
|
||||||
|
|
||||||
RVImporte.Enabled = True
|
RVImporte.Enabled = True
|
||||||
RVImporte.MaximumValue = dr("Saldo").ToString.ToDouble.ToString.FormatoNumero
|
RVImporte.MaximumValue = dr("Saldo").ToString.ToDecimal.ToString.FormatoNumero
|
||||||
TxtImporte.Text = dr("Saldo").ToString.ToDouble.FormatoNumero
|
TxtImporte.Text = dr("Saldo").ToString.ToDecimal.FormatoNumero
|
||||||
|
|
||||||
SaldoVenta = dr("Saldo").ToString.ToDouble
|
SaldoVenta = dr("Saldo").ToString.ToDecimal
|
||||||
EsImportacion = CBool(dr("EsImportacion"))
|
EsImportacion = CBool(dr("EsImportacion"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -915,10 +915,10 @@ Partial Class Bancos_PopIECompras
|
|||||||
dr = DtAcreedores.FiltroPrimero(String.Format("CveProveedor = {0}", DdlAcreedor.SelectedValue))
|
dr = DtAcreedores.FiltroPrimero(String.Format("CveProveedor = {0}", DdlAcreedor.SelectedValue))
|
||||||
|
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
Dim tSaldo As Double = dr("Saldo").ToString.ToDouble
|
Dim tSaldo As Decimal = dr("Saldo").ToString.ToDecimal
|
||||||
|
|
||||||
'si el saldo es mayor de la compra poner el valor de la compra sino el valor del saldo
|
'si el saldo es mayor de la compra poner el valor de la compra sino el valor del saldo
|
||||||
TxtImporte.Text = If(tSaldo > TxtTotal.Text.ToDouble, TxtTotal.Text, tSaldo.ToString).FormatoNumero
|
TxtImporte.Text = If(tSaldo > TxtTotal.Text.ToDecimal, TxtTotal.Text, tSaldo.ToString).FormatoNumero
|
||||||
|
|
||||||
|
|
||||||
Dim ObjMov As New ClsMovimientos
|
Dim ObjMov As New ClsMovimientos
|
||||||
@@ -1086,7 +1086,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
'actualizo el monto maximo a pagar en el movimiento bancario
|
'actualizo el monto maximo a pagar en el movimiento bancario
|
||||||
Dim tSaldo As Double = DdlFuncionarioEmpleado.SelectedItem.Text.Split(CChar("-"))(1).ToDouble
|
Dim tSaldo As Decimal = DdlFuncionarioEmpleado.SelectedItem.Text.Split(CChar("-"))(1).ToDecimal
|
||||||
If tSaldo < MovimientoPagar.Saldo Then
|
If tSaldo < MovimientoPagar.Saldo Then
|
||||||
TxtImporte.Text = tSaldo.FormatoNumero()
|
TxtImporte.Text = tSaldo.FormatoNumero()
|
||||||
End If
|
End If
|
||||||
@@ -1149,7 +1149,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
GvDeudores.Columns(6).Visible = False
|
GvDeudores.Columns(6).Visible = False
|
||||||
|
|
||||||
RVImporte.Enabled = True
|
RVImporte.Enabled = True
|
||||||
RVImporte.MaximumValue = LtlSaldo.Text.ToDouble.ToString
|
RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||||
|
|
||||||
CVImporteDolares.Enabled = False
|
CVImporteDolares.Enabled = False
|
||||||
CVImportePesos.Enabled = False
|
CVImportePesos.Enabled = False
|
||||||
@@ -1160,7 +1160,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub CVImporteDolares_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
Protected Sub CVImporteDolares_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||||
If args.Value.ToString.Substring(0, args.Value.Length - 3).ToDouble <= LtlSaldo.Text.Substring(0, LtlSaldo.Text.Length - 3).ToDouble Then
|
If args.Value.ToString.Substring(0, args.Value.Length - 3).ToDecimal <= LtlSaldo.Text.Substring(0, LtlSaldo.Text.Length - 3).ToDecimal Then
|
||||||
args.IsValid = True
|
args.IsValid = True
|
||||||
Else
|
Else
|
||||||
args.IsValid = False
|
args.IsValid = False
|
||||||
@@ -1208,7 +1208,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
GvDeudores.Columns(6).Visible = False
|
GvDeudores.Columns(6).Visible = False
|
||||||
|
|
||||||
RVImporte.Enabled = True
|
RVImporte.Enabled = True
|
||||||
RVImporte.MaximumValue = LtlSaldo.Text.ToDouble.ToString
|
RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||||
|
|
||||||
CVImporteDolares.Enabled = False
|
CVImporteDolares.Enabled = False
|
||||||
CVImportePesos.Enabled = False
|
CVImportePesos.Enabled = False
|
||||||
@@ -1219,7 +1219,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub CVImportePesos_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
Protected Sub CVImportePesos_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||||
If args.Value.ToString.Substring(0, args.Value.Length - 3).ToDouble <= LtlSaldo.Text.Substring(0, LtlSaldo.Text.Length - 3).ToDouble Then
|
If args.Value.ToString.Substring(0, args.Value.Length - 3).ToDecimal <= LtlSaldo.Text.Substring(0, LtlSaldo.Text.Length - 3).ToDecimal Then
|
||||||
args.IsValid = True
|
args.IsValid = True
|
||||||
Else
|
Else
|
||||||
args.IsValid = False
|
args.IsValid = False
|
||||||
@@ -1251,10 +1251,10 @@ Partial Class Bancos_PopIECompras
|
|||||||
#Region "GV ROW DATA BOUND"
|
#Region "GV ROW DATA BOUND"
|
||||||
Private Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvIngresos.RowDataBound
|
Private Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvIngresos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
Dim total As Double
|
Dim total As Decimal
|
||||||
Dim saldo As Double
|
Dim saldo As Decimal
|
||||||
|
|
||||||
saldo = e.Row.DataKey("Saldo").ToDouble
|
saldo = e.Row.DataKey("Saldo").ToDecimal
|
||||||
total = SaldoVenta
|
total = SaldoVenta
|
||||||
|
|
||||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
||||||
@@ -1268,10 +1268,10 @@ Partial Class Bancos_PopIECompras
|
|||||||
|
|
||||||
Private Sub GvDeudores_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDeudores.RowDataBound
|
Private Sub GvDeudores_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDeudores.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
Dim total As Double
|
Dim total As Decimal
|
||||||
Dim saldo As Double
|
Dim saldo As Decimal
|
||||||
|
|
||||||
saldo = e.Row.DataKey("Saldo").ToDouble
|
saldo = e.Row.DataKey("Saldo").ToDecimal
|
||||||
total = SaldoVenta
|
total = SaldoVenta
|
||||||
|
|
||||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
||||||
@@ -1284,10 +1284,10 @@ Partial Class Bancos_PopIECompras
|
|||||||
|
|
||||||
Private Sub GvAcreedores_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAcreedores.RowDataBound
|
Private Sub GvAcreedores_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAcreedores.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
Dim total As Double
|
Dim total As Decimal
|
||||||
Dim saldo As Double
|
Dim saldo As Decimal
|
||||||
|
|
||||||
saldo = e.Row.DataKey("Saldo").ToDouble
|
saldo = e.Row.DataKey("Saldo").ToDecimal
|
||||||
total = SaldoVenta
|
total = SaldoVenta
|
||||||
|
|
||||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
||||||
@@ -1300,10 +1300,10 @@ Partial Class Bancos_PopIECompras
|
|||||||
|
|
||||||
Private Sub GvVentas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvVentas.RowDataBound
|
Private Sub GvVentas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvVentas.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
Dim total As Double
|
Dim total As Decimal
|
||||||
Dim saldo As Double
|
Dim saldo As Decimal
|
||||||
|
|
||||||
saldo = e.Row.DataKey("Saldo").ToDouble
|
saldo = e.Row.DataKey("Saldo").ToDecimal
|
||||||
total = SaldoVenta
|
total = SaldoVenta
|
||||||
|
|
||||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
||||||
@@ -1506,7 +1506,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
CveIE = -1
|
CveIE = -1
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If DdlOtrosPagos.SelectedValue = "2" AndAlso TxtComision.Text.ToDouble > 0 Then
|
If DdlOtrosPagos.SelectedValue = "2" AndAlso TxtComision.Text.ToDecimal > 0 Then
|
||||||
'Agrego el movimiento a Comisiones
|
'Agrego el movimiento a Comisiones
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtComision.Text.ToDecimal, TxtObservaciones.Text, 78, TxtObservaciones.Text, Fecha, 0, -1, CveIE, CveCompra, -1, -1, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1)) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtComision.Text.ToDecimal, TxtObservaciones.Text, 78, TxtObservaciones.Text, Fecha, 0, -1, CveIE, CveCompra, -1, -1, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1)) Then
|
||||||
MsgError = "Detalle"
|
MsgError = "Detalle"
|
||||||
@@ -2430,7 +2430,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible)
|
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible)
|
||||||
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimientoNoDeducible = Math.Round(ImporteMovimientoNoDeducible, 2)
|
ImporteMovimientoNoDeducible = ImporteMovimientoNoDeducible.RoundSQL
|
||||||
ImporteMXNoDeducible = ImporteMX.RoundSQL
|
ImporteMXNoDeducible = ImporteMX.RoundSQL
|
||||||
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
@@ -2454,8 +2454,8 @@ Partial Class Bancos_PopIECompras
|
|||||||
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
||||||
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimientoNoDeducible = Math.Round(ImporteMovimientoNoDeducible, 2)
|
ImporteMovimientoNoDeducible = ImporteMovimientoNoDeducible.RoundSQL
|
||||||
ImporteMXNoDeducible = Math.Round(ImporteMXNoDeducible, 2)
|
ImporteMXNoDeducible = ImporteMXNoDeducible.RoundSQL
|
||||||
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimientoNoDeducible.FormatoNumero(2)}"
|
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimientoNoDeducible.FormatoNumero(2)}"
|
||||||
@@ -2656,7 +2656,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible)
|
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible)
|
||||||
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimientoNoDeducible = Math.Round(ImporteMovimientoNoDeducible, 2)
|
ImporteMovimientoNoDeducible = ImporteMovimientoNoDeducible.RoundSQL
|
||||||
ImporteMXNoDeducible = ImporteMX.RoundSQL
|
ImporteMXNoDeducible = ImporteMX.RoundSQL
|
||||||
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
@@ -2680,8 +2680,8 @@ Partial Class Bancos_PopIECompras
|
|||||||
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
||||||
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimientoNoDeducible = Math.Round(ImporteMovimientoNoDeducible, 2)
|
ImporteMovimientoNoDeducible = ImporteMovimientoNoDeducible.RoundSQL
|
||||||
ImporteMXNoDeducible = Math.Round(ImporteMXNoDeducible, 2)
|
ImporteMXNoDeducible = ImporteMXNoDeducible.RoundSQL
|
||||||
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimientoNoDeducible.FormatoNumero(2)}"
|
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimientoNoDeducible.FormatoNumero(2)}"
|
||||||
@@ -3067,7 +3067,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
IdCtaContable = IdCtaContComplementariaCliente
|
IdCtaContable = IdCtaContComplementariaCliente
|
||||||
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
||||||
ImporteMX = ImporteMovimiento
|
ImporteMX = ImporteMovimiento
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, rw.DataKey("CveVenta").ToString.ToEntero, CveCompra, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioPago - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, rw.DataKey("CveVenta").ToString.ToEntero, CveCompra, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioPago - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1013,8 +1013,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompraValuacion
|
importeMX = ImporteMovimiento * tipoCambioCompraValuacion
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
TipoCambioGeneral = tipoCambioCompraValuacion
|
TipoCambioGeneral = tipoCambioCompraValuacion
|
||||||
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
||||||
'cuando son dolares, y tienen complementaria, se hace el registro
|
'cuando son dolares, y tienen complementaria, se hace el registro
|
||||||
@@ -1056,8 +1056,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
TipoCambioGeneral = tipoCambioCompra
|
TipoCambioGeneral = tipoCambioCompra
|
||||||
|
|
||||||
|
|
||||||
@@ -1094,8 +1094,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1130,8 +1130,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
TipoCambioGeneral = tipoCambioCompra
|
TipoCambioGeneral = tipoCambioCompra
|
||||||
|
|
||||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1167,8 +1167,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1203,8 +1203,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
TipoCambioGeneral = tipoCambioCompra
|
TipoCambioGeneral = tipoCambioCompra
|
||||||
|
|
||||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1240,8 +1240,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1276,8 +1276,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
TipoCambioGeneral = tipoCambioCompra
|
TipoCambioGeneral = tipoCambioCompra
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1312,8 +1312,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
@@ -1348,8 +1348,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2)
|
importeMX = importeMX.RoundSQL
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
@@ -1383,8 +1383,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2)
|
importeMX = importeMX.RoundSQL
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
@@ -1588,8 +1588,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
|
|
||||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
End If
|
End If
|
||||||
@@ -1643,7 +1643,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
importeMX = 0
|
importeMX = 0
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
ImporteMovimiento = gvr.DataKey("IVAPorPagarDeducible").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago
|
||||||
|
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
@@ -1657,8 +1657,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = importeMX.RoundSQL
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
End If
|
End If
|
||||||
@@ -1681,9 +1681,9 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||||
|
|
||||||
'se registra el iva no acreditable
|
'se registra el iva no acreditable
|
||||||
If gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal > 0 Then
|
If gvr.DataKey("IVANoDeducible").ToDecimal > 0 Then
|
||||||
|
|
||||||
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal * PorcentajePago
|
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, CveSubProyecto:=CveSubProyecto, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, CveSubProyecto:=CveSubProyecto, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
|||||||
Reference in New Issue
Block a user