Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -336,7 +336,7 @@ Public Class ClsVentas
|
|||||||
Optional ObservacionesAlmacen As String = "", Optional CveSubProyecto As Integer = -1, Optional CveSubProyectoEjecucion As Integer = -1, Optional CveSubProyectoCobranza As Integer = -1,
|
Optional ObservacionesAlmacen As String = "", Optional CveSubProyecto As Integer = -1, Optional CveSubProyectoEjecucion As Integer = -1, Optional CveSubProyectoCobranza As Integer = -1,
|
||||||
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
|
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
|
||||||
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
||||||
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False) As Boolean
|
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_VentasAdd")
|
DataAdapter("PA_VentasAdd")
|
||||||
@@ -424,6 +424,7 @@ Public Class ClsVentas
|
|||||||
.Add("@AnticipoEspecial", SqlDbType.Bit).Value = AnticipoEspecial
|
.Add("@AnticipoEspecial", SqlDbType.Bit).Value = AnticipoEspecial
|
||||||
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
|
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
|
||||||
.Add("@EsAmortizacion", SqlDbType.Bit).Value = EsAmortizacion
|
.Add("@EsAmortizacion", SqlDbType.Bit).Value = EsAmortizacion
|
||||||
|
.Add("@CveTipoRetencion", SqlDbType.TinyInt).Value = CveTipoRetencion
|
||||||
|
|
||||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -2928,7 +2928,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Case 8 'Ret IVA por Trasladar
|
Case 8 'Ret IVA por Trasladar
|
||||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS
|
||||||
importeMovimiento = (ObjFactura.RetIVA * ValorMultiplicador)
|
importeMovimiento = (ObjFactura.RetIVA * ValorMultiplicador)
|
||||||
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||||
FechaMovimiento = ObjFactura.FechaPago
|
FechaMovimiento = ObjFactura.FechaPago
|
||||||
@@ -2958,6 +2958,26 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Case 313 'Ret Iva Servicios
|
||||||
|
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion = 4 Then 'SI TIENE RETENCION DE IVA DE SERVICIOS
|
||||||
|
importeMovimiento = ObjFactura.RetIVA * ValorMultiplicador
|
||||||
|
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||||
|
FechaMovimiento = ObjFactura.FechaPago
|
||||||
|
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||||
|
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
|
'OBTENER CUENTAS
|
||||||
|
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
|
'Conta ContPAQ
|
||||||
|
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
|
'Conta SIG
|
||||||
|
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
Case 9 'Ret ISR por Trasladar
|
Case 9 'Ret ISR por Trasladar
|
||||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
||||||
importeMovimiento = (ObjFactura.RetISR * ValorMultiplicador)
|
importeMovimiento = (ObjFactura.RetISR * ValorMultiplicador)
|
||||||
@@ -5744,6 +5764,8 @@ Namespace Modelos
|
|||||||
Public Property EsNCAmortizacion As Boolean
|
Public Property EsNCAmortizacion As Boolean
|
||||||
Public Property Kilometraje As Decimal
|
Public Property Kilometraje As Decimal
|
||||||
|
|
||||||
|
Public Property CveTipoRetencion As Integer
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -815,6 +815,8 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
For Each gvr As GridViewRow In GvCxC.Rows
|
For Each gvr As GridViewRow In GvCxC.Rows
|
||||||
If gvr.FCCheckBox("Chk").Checked Then
|
If gvr.FCCheckBox("Chk").Checked Then
|
||||||
|
|
||||||
|
Dim ObjFactura As New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
||||||
tipoCambioPago = 1
|
tipoCambioPago = 1
|
||||||
tipoCambioVenta = 1
|
tipoCambioVenta = 1
|
||||||
@@ -913,6 +915,9 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
Case 8 'Ret IVA x Trasladar
|
Case 8 'Ret IVA x Trasladar
|
||||||
If EsAnticipoEspecial Then Exit Select
|
If EsAnticipoEspecial Then Exit Select
|
||||||
|
If ObjFactura.CveTipoRetencion = 4 Then
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
@@ -956,6 +961,44 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Case 313 'Ret Iva Servicios
|
||||||
|
If EsAnticipoEspecial Then Exit Select
|
||||||
|
If ObjFactura.CveTipoRetencion = 4 Then
|
||||||
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
|
importeMX = ImporteMovimiento
|
||||||
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioVenta = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioVenta
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioVenta
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioVenta = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioVenta
|
||||||
|
End If
|
||||||
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
|
TipoCambioGeneral = tipoCambioVenta
|
||||||
|
CveSubProyectoContabilizar = CveSubProyecto
|
||||||
|
|
||||||
|
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
|
'OBTENER CUENTAS
|
||||||
|
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
|
'Conta ContPAQ
|
||||||
|
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
|
'Conta SIG
|
||||||
|
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
Case 9 'Ret ISR x Trasladar
|
Case 9 'Ret ISR x Trasladar
|
||||||
If EsAnticipoEspecial Then Exit Select
|
If EsAnticipoEspecial Then Exit Select
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
@@ -1037,6 +1080,9 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
Case 62 'Ret IVA Trasladado
|
Case 62 'Ret IVA Trasladado
|
||||||
If EsAnticipoEspecial Then Exit Select
|
If EsAnticipoEspecial Then Exit Select
|
||||||
|
If ObjFactura.CveTipoRetencion = 4 Then
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
@@ -1081,6 +1127,44 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Case 314 'Ret Iva Servicios Traslado
|
||||||
|
If EsAnticipoEspecial Then Exit Select
|
||||||
|
If ObjFactura.CveTipoRetencion = 4 Then
|
||||||
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
|
importeMX = ImporteMovimiento
|
||||||
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioVenta = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
|
importeMX = ImporteMovimiento * tipoCambioVenta
|
||||||
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioVenta = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||||
|
End If
|
||||||
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
|
|
||||||
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||||
|
CveSubProyectoContabilizar = CveSubProyecto
|
||||||
|
|
||||||
|
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
|
'OBTENER CUENTAS
|
||||||
|
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
|
'Conta ContPAQ
|
||||||
|
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
|
'Conta SIG
|
||||||
|
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Case 63 'Ret ISR Trasladado
|
Case 63 'Ret ISR Trasladado
|
||||||
If EsAnticipoEspecial Then Exit Select
|
If EsAnticipoEspecial Then Exit Select
|
||||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
@@ -1401,7 +1485,8 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
If gvr.FCCheckBox("ChkGenerarNC").Checked Then
|
If gvr.FCCheckBox("ChkGenerarNC").Checked Then
|
||||||
ListaFacturasGenerarNC.Add(New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa) With {.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()})
|
ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()
|
||||||
|
ListaFacturasGenerarNC.Add(ObjFactura)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -4389,6 +4389,8 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString)
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
UpEstatus.Update()
|
UpEstatus.Update()
|
||||||
@@ -4807,10 +4809,10 @@ Partial Class Ventas
|
|||||||
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
||||||
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
||||||
|
|
||||||
DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString)
|
|
||||||
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
|
|
||||||
|
|
||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
|
DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString)
|
||||||
|
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
|
||||||
|
|
||||||
ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
|
ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
|
||||||
If ObjCliente.RetieneIVAFletes Then
|
If ObjCliente.RetieneIVAFletes Then
|
||||||
TrRetIVA.Style.Add("display", "")
|
TrRetIVA.Style.Add("display", "")
|
||||||
@@ -4819,9 +4821,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ViewState("Vendedor") = ObjCliente.Vendedor
|
ViewState("Vendedor") = ObjCliente.Vendedor
|
||||||
ViewState("CtaContable") = ObjCliente.CuentaContable
|
ViewState("CtaContable") = ObjCliente.CuentaContable
|
||||||
ViewState("IdCtaContClientes") = ObjCliente.IdCtaContClientes
|
ViewState("IdCtaContClientes") = ObjCliente.IdCtaContClientes
|
||||||
@@ -6070,6 +6069,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
' LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||||
|
TrRetIVA.Style.Add("display", "")
|
||||||
DdlTipoRetencion.Visible = True
|
DdlTipoRetencion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -8409,6 +8409,9 @@ Partial Class Ventas
|
|||||||
End Select
|
End Select
|
||||||
ObjFactura.ComplementoINE = INE
|
ObjFactura.ComplementoINE = INE
|
||||||
End If
|
End If
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||||
|
ObjFactura.CveTipoRetencion = DdlTipoRetencion.SelectedValue.ToEntero()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CreaObjetosVentaDevolucion()
|
Private Sub CreaObjetosVentaDevolucion()
|
||||||
@@ -9317,6 +9320,10 @@ Partial Class Ventas
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CveTipoRetencion As Integer = -1
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||||
|
CveTipoRetencion = DdlTipoRetencion.SelectedValue.ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, If(CveEmpresaCRM > 0, LblEmpresaCRM.Text, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa)
|
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, If(CveEmpresaCRM > 0, LblEmpresaCRM.Text, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa)
|
||||||
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
||||||
@@ -9333,7 +9340,7 @@ Partial Class Ventas
|
|||||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
||||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion) Then
|
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=CveTipoRetencion) Then
|
||||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Else
|
Else
|
||||||
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Then
|
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Then
|
||||||
@@ -10581,7 +10588,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Case 8 'Ret IVA por Trasladar
|
Case 8 'Ret IVA por Trasladar
|
||||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
|
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS
|
||||||
importeMovimiento = ObjFactura.RetIVA * ValorMultiplicador
|
importeMovimiento = ObjFactura.RetIVA * ValorMultiplicador
|
||||||
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||||
FechaMovimiento = ObjFactura.FechaPago
|
FechaMovimiento = ObjFactura.FechaPago
|
||||||
@@ -10589,17 +10596,12 @@ Partial Class Ventas
|
|||||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
'CONTABILIDAD CONTPAQ
|
'CONTABILIDAD CONTPAQ
|
||||||
'SI LA RETENCION ES AL 6% DEBE USAR ESTA CUENTA
|
If IdCtaContRetIVA > 0 Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(580).ToEntero() > 0 AndAlso (DdlTipoRetencion.SelectedValue = "4") Then
|
IdCtaContable = IdCtaContRetIVA
|
||||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(580).ToEntero()
|
|
||||||
Else
|
Else
|
||||||
If IdCtaContRetIVA > 0 Then
|
If ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||||
IdCtaContable = IdCtaContRetIVA
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
Else
|
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||||
If ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
|
||||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -10616,6 +10618,25 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
Case 313 'Ret Iva Servicios
|
||||||
|
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion = 4 Then 'SI TIENE RETENCION DE IVA DE SERVICIOS
|
||||||
|
importeMovimiento = ObjFactura.RetIVA * ValorMultiplicador
|
||||||
|
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||||
|
FechaMovimiento = ObjFactura.FechaPago
|
||||||
|
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||||
|
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
|
'OBTENER CUENTAS
|
||||||
|
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
|
'Conta ContPAQ
|
||||||
|
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
|
'Conta SIG
|
||||||
|
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case 9 'Ret ISR por Trasladar
|
Case 9 'Ret ISR por Trasladar
|
||||||
@@ -14245,6 +14266,7 @@ Partial Class Ventas
|
|||||||
CargaGvComercioExterior()
|
CargaGvComercioExterior()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
UpPS.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -14497,6 +14519,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
' LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
' LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||||
|
TrRetIVA.Style.Add("display", "")
|
||||||
DdlTipoRetencion.Visible = True
|
DdlTipoRetencion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -17088,6 +17111,9 @@ Partial Class Ventas
|
|||||||
Else
|
Else
|
||||||
Alert("El producto no fue encontrado.", TipoMensaje.MsgAdvertencia)
|
Alert("El producto no fue encontrado.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
UpPS.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DdlMoneda_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMoneda.SelectedIndexChanged
|
Private Sub DdlMoneda_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMoneda.SelectedIndexChanged
|
||||||
CambiaMoneda()
|
CambiaMoneda()
|
||||||
|
|||||||
Reference in New Issue
Block a user