Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
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
|
||||
|
||||
@@ -5651,8 +5651,8 @@ Partial Class Ventas
|
||||
DdlCuentasTerminal.Items.Clear()
|
||||
DdlCuentaTerminalModal.Items.Clear()
|
||||
|
||||
DdlCuentasTerminal.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTipoCuenta = 1", "", {"CveCuenta", "NumCuentaMoneda"})
|
||||
DdlCuentaTerminalModal.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTipoCuenta = 1", "", {"CveCuenta", "NumCuentaMoneda"})
|
||||
DdlCuentasTerminal.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTipoCuenta = 1", "", {"CveCuenta", "NumCuentaMoneda"})
|
||||
DdlCuentaTerminalModal.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTipoCuenta = 1", "", {"CveCuenta", "NumCuentaMoneda"})
|
||||
|
||||
DdlCuentasTerminal.DataBind()
|
||||
DdlCuentaTerminalModal.DataBind()
|
||||
@@ -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
|
||||
@@ -11206,13 +11204,13 @@ Partial Class Ventas
|
||||
Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIVA").ToDecimal
|
||||
|
||||
|
||||
If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows.Count = 1 Then
|
||||
IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContable").ToString().ToEntero()
|
||||
If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then
|
||||
IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString().ToEntero()
|
||||
' CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContableSIG").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
CuentasContablesInvalidas.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("NumCuentaMoneda").ToString().ToEntero())
|
||||
CuentasContablesInvalidas.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("NumCuentaMoneda").ToString().ToEntero())
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
@@ -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
|
||||
@@ -18048,7 +18046,7 @@ Partial Class Ventas
|
||||
DdlCuentaCheque.Items.Clear()
|
||||
DdlCuentaTransferencia.Items.Clear()
|
||||
|
||||
Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
|
||||
Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
@@ -18076,13 +18074,13 @@ Partial Class Ventas
|
||||
Case 1
|
||||
DivContadoOtrosCuenta.Attributes.Add("class", "col-md-3")
|
||||
DivMesesSinIntereses2.Visible = True
|
||||
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
Exit Select
|
||||
Case 2
|
||||
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
Exit Select
|
||||
Case 3
|
||||
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||
Exit Select
|
||||
Case -1
|
||||
DdlCuentaOtrosContado.DataSource = Nothing
|
||||
@@ -25878,8 +25876,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
|
||||
@@ -25912,7 +25910,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
UpPS.Update()
|
||||
|
||||
Reference in New Issue
Block a user