Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2628,6 +2628,10 @@ Partial Class Ventas
|
||||
'DdlEstatus.Enabled = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
LnkAgregarCliente.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
CargaEstatusFactura(Opcion)
|
||||
|
||||
@@ -5637,7 +5641,7 @@ Partial Class Ventas
|
||||
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
||||
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
If CveVenta <= 0 OrElse EsCreaApartirDe Then
|
||||
DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString())
|
||||
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
|
||||
|
||||
@@ -7694,13 +7698,7 @@ Partial Class Ventas
|
||||
Dim CveProducto As Integer
|
||||
Dim Existencia As Double
|
||||
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero()
|
||||
For Each dr As DataRow In TmpDT.Rows
|
||||
|
||||
'SI ES SERVICIO NO VALIDA
|
||||
'GlobalDTProductosServicios
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dr("CvePS").ToString().ToEntero()).FiltroPrimeroValor("CveTipoPS").ToString().ToEntero() = 1 Then
|
||||
Continue For
|
||||
End If
|
||||
For Each dr As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows
|
||||
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||
'VALIDA EXISTENCIA
|
||||
@@ -18968,6 +18966,12 @@ Partial Class Ventas
|
||||
' rowSurtidos("Surtido").ToString().ToDouble < rowSurtidos("Cantidad").ToString().ToDouble AndAlso (dr("CantidadDisponible").ToString().ToDouble - rowSurtidos("Surtido").ToString().ToDouble > 0 Or dr("Serie").ToString() <> "")
|
||||
If rowSurtidos("Surtido").ToString().ToDecimal < rowSurtidos("Cantidad").ToString().ToDecimal Then
|
||||
Dim CantidadSurtida As Double = If(dr("CantidadDisponible").ToString().ToDecimal < rowSurtidos("Cantidad").ToString().ToDouble, dr("CantidadDisponible").ToString().ToDecimal, rowSurtidos("Cantidad").ToString().ToDecimal)
|
||||
|
||||
'SI LA CANTIDAD SURTIDA SUPERA LO REQUERIDO, TOMA SOLO LO NECESARIO PARA COMPLETAR
|
||||
If (rowSurtidos("Surtido").ToString().ToDecimal + CantidadSurtida) > rowSurtidos("Cantidad").ToString().ToDecimal Then
|
||||
CantidadSurtida = (rowSurtidos("Cantidad").ToString().ToDecimal - rowSurtidos("Surtido").ToString().ToDecimal)
|
||||
End If
|
||||
|
||||
MovDTCuadrados.ImportRow(dr)
|
||||
MovDTCuadrados(MovDTCuadrados.Rows.Count - 1)("Cantidad") = CantidadSurtida
|
||||
DtRemConceptosSurtidos(Indice)("Surtido") = rowSurtidos("Surtido").ToString().ToDecimal + CantidadSurtida
|
||||
@@ -26915,7 +26919,7 @@ Partial Class Ventas
|
||||
|
||||
For Each Dr As DataRow In DtImpuestosLocal.Rows
|
||||
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("CveSubProyecto"))
|
||||
Dim importePuTemp As Decimal = (Porcentaje * (TmpDT.SUMD("Total", FiltroStr) - TmpDT.SUMD("Descuento", FiltroStr)))
|
||||
Dim importePuTemp As Decimal = (Porcentaje * (TmpDT.SUMD("TotalImporte", FiltroStr) - TmpDT.SUMD("Descuento", FiltroStr)))
|
||||
|
||||
If Not AplicaImpuestosLocales Then
|
||||
importePuTemp = importePuTemp - TotalImpuestosLocalesVentaOriginal
|
||||
@@ -29769,7 +29773,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
'DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
|
||||
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
|
||||
|
||||
TrVistaPrevia.Visible = True
|
||||
TxtFechaVencimientoCotizacion.Text = Now.ToShortDateString
|
||||
@@ -31160,6 +31164,8 @@ Partial Class Ventas
|
||||
tClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
|
||||
tClienteRetIVA = 0.06D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("0") Then
|
||||
tClienteRetIVA = 0.00D
|
||||
End If
|
||||
ViewState("ClienteRetIVA") = tClienteRetIVA
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user