correcciones a carga centro de costo
This commit is contained in:
@@ -1948,7 +1948,7 @@ Partial Class Ventas
|
||||
CreaDTmpF()
|
||||
CreaDTDocumentosRelacionados()
|
||||
CargaDdlSubProyectos()
|
||||
CargaProyecto()
|
||||
'CargaProyecto()
|
||||
CargaSucursales()
|
||||
|
||||
CargaClasificaciones()
|
||||
@@ -4760,14 +4760,14 @@ Partial Class Ventas
|
||||
UpINV.Update()
|
||||
End Sub
|
||||
Private Sub CargaSubProyecto(Optional CveSubProyecto As Integer = -1)
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.SelectedValue = Nothing
|
||||
If DdlProyecto.SelectedValue.ToEntero() > 0 Then
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
|
||||
End If
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
|
||||
'DdlSubProyecto.Items.Clear()
|
||||
'DdlSubProyecto.SelectedValue = Nothing
|
||||
'If DdlProyecto.SelectedValue.ToEntero() > 0 Then
|
||||
' DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
' 'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
|
||||
'End If
|
||||
'DdlSubProyecto.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
|
||||
If CveSubProyecto > 0 Then DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
||||
End Sub
|
||||
|
||||
@@ -6153,23 +6153,23 @@ Partial Class Ventas
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString().ToDecimal)
|
||||
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
'ClienteRetIVA = 0.0D
|
||||
If ClienteRetIVA <= 0 Then
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(TmpDT.Rows(e.RowIndex)("EsOutSourcing").ToString()) Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
If ClienteRetIVA <= 0 Then
|
||||
If CBool(TmpDT.Rows(e.RowIndex)("EsOutSourcing").ToString()) Then
|
||||
ClienteRetIVA = 0.06D
|
||||
DdlTipoRetencion.SelectedValueExist("4")
|
||||
LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
DdlTipoRetencion.Visible = True
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
End If
|
||||
' LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
TmpDT.Rows(e.RowIndex)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero()
|
||||
TmpDT.Rows(e.RowIndex)("UM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedItem.Text
|
||||
TmpDT.Rows(e.RowIndex)("Cantidad") = Cantidad
|
||||
@@ -8582,9 +8582,9 @@ Partial Class Ventas
|
||||
End Select
|
||||
ObjFactura.ComplementoINE = INE
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
ObjFactura.CveTipoRetencion = DdlTipoRetencion.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
ObjFactura.CveTipoRetencion = DdlTipoRetencion.SelectedValue.ToEntero()
|
||||
|
||||
ObjFactura.NuevaFactura = Me.NuevaFactura
|
||||
End Sub
|
||||
|
||||
@@ -9506,10 +9506,8 @@ Partial Class Ventas
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim CveTipoRetencion As Integer = 0
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
CveTipoRetencion = factura.CveTipoRetencion
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'SI LA FACTURA ESTA PAGADA DEBE MARCAR LA DEVOLUCION POR SI SE QUIERE AMORTIZAR
|
||||
If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso factura.TipoDocto = "Dev" Then
|
||||
@@ -9531,7 +9529,7 @@ Partial Class Ventas
|
||||
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,
|
||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero) Then
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then
|
||||
@@ -15229,24 +15227,23 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
'ClienteRetIVA = 0.0D
|
||||
If ClienteRetIVA <= 0 Then
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(DrPS("EsOutSourcing").ToString()) Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
If ClienteRetIVA <= 0 Then
|
||||
If CBool(DrPS("EsOutSourcing").ToString()) Then
|
||||
ClienteRetIVA = 0.06D
|
||||
DdlTipoRetencion.SelectedValueExist("4")
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
End If
|
||||
|
||||
' LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
DdlTipoRetencion.Visible = True
|
||||
|
||||
|
||||
Row("IVA") = Row("PorcentajeIVA")
|
||||
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
|
||||
Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||
@@ -15283,6 +15280,7 @@ Partial Class Ventas
|
||||
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
|
||||
Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
|
||||
Row("CuentaPredial") = CuentaPredial
|
||||
Row("EsOutSourcing") = DrPS("EsOutSourcing")
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
||||
@@ -25861,8 +25859,8 @@ Partial Class Ventas
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If CveVenta <= 0 OrElse EsCreaApartirDe Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
|
||||
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
|
||||
For Each RowServicio As DataRow In TmpDT.Rows
|
||||
Dim tClienteRetIVA = ClienteRetIVA
|
||||
If tClienteRetIVA <= 0 Then
|
||||
@@ -25895,7 +25893,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
UpPS.Update()
|
||||
|
||||
Reference in New Issue
Block a user