-
This commit is contained in:
@@ -3266,7 +3266,6 @@ Partial Class Compras_Compras
|
|||||||
If DdlRetIVAConcepto.SelectedValue.ToEntero > 0 Then
|
If DdlRetIVAConcepto.SelectedValue.ToEntero > 0 Then
|
||||||
DdlRetIVAConcepto.Enabled = True
|
DdlRetIVAConcepto.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlRetISRConcepto.SelectedValue.ToEntero > 0 Then
|
If DdlRetISRConcepto.SelectedValue.ToEntero > 0 Then
|
||||||
DdlRetISRConcepto.Enabled = True
|
DdlRetISRConcepto.Enabled = True
|
||||||
End If
|
End If
|
||||||
@@ -7792,8 +7791,8 @@ Partial Class Compras_Compras
|
|||||||
Alert("Ocurrió un Error al agregar el IVA.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un Error al agregar el IVA.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia)
|
||||||
ElseIf ErrorMovInv Then
|
ElseIf ErrorMovInv Then
|
||||||
Alert("Ocurrió un Error al agregar el Producto o Servicio al Inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un Error al agregar el Producto o Servicio al Inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia)
|
||||||
ElseIf TieneError Then
|
'ElseIf TieneError Then
|
||||||
Alert("El total de los IMPORTES del FINANCIAMIENTO debe ser mayor que 0 y menor o igual al total de la compra", TipoMensaje.MsgAdvertencia)
|
' Alert("El total de los IMPORTES del FINANCIAMIENTO debe ser mayor que 0 y menor o igual al total de la compra", TipoMensaje.MsgAdvertencia)
|
||||||
ElseIf ErrorAF Then
|
ElseIf ErrorAF Then
|
||||||
Alert("Error al actualizar la vinculacion del Activo Fijo", TipoMensaje.MsgAdvertencia)
|
Alert("Error al actualizar la vinculacion del Activo Fijo", TipoMensaje.MsgAdvertencia)
|
||||||
ElseIf ErrorAC Then
|
ElseIf ErrorAC Then
|
||||||
@@ -7953,7 +7952,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If CveEvaluacionProveedor > 0 Then
|
If CveEvaluacionProveedor > 0 Then
|
||||||
Msg.Append("<br/><br/>El proveedor tiene evaluaciones pendientes<br/>")
|
Msg.Append("<br/><br/>El proveedor tiene evaluaciones pendientes<br/>")
|
||||||
Msg.Append("¿Desea realizar una evaluacion al proveedor?")
|
Msg.Append("¿Desea realizar una evaluación al proveedor?")
|
||||||
Msg.AppendFormat($"</br><a class=""Texto"" target='_blank' href=""/Compras/EvaluacionProveedor.aspx?CveEvaluacionProveedor={CveEvaluacionProveedor}"">Evaluar Proveedor.</a>")
|
Msg.AppendFormat($"</br><a class=""Texto"" target='_blank' href=""/Compras/EvaluacionProveedor.aspx?CveEvaluacionProveedor={CveEvaluacionProveedor}"">Evaluar Proveedor.</a>")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -13909,7 +13908,7 @@ Partial Class Compras_Compras
|
|||||||
If realizadevolucion Then
|
If realizadevolucion Then
|
||||||
subtotaldevolucion = subtotaldevolucion.RoundSQL(2)
|
subtotaldevolucion = subtotaldevolucion.RoundSQL(2)
|
||||||
'si el subtotal es igual a la nc lo guardo si no marco error
|
'si el subtotal es igual a la nc lo guardo si no marco error
|
||||||
Dim tTolerancia As Decimal = 0
|
Dim tTolerancia As Decimal = 0.1D
|
||||||
Dim tAjustaUltimo As Boolean = True
|
Dim tAjustaUltimo As Boolean = True
|
||||||
If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then
|
||||||
tTolerancia = Math.Abs(TxtSubTotal2.Text.ToDecimal - subtotaldevolucion)
|
tTolerancia = Math.Abs(TxtSubTotal2.Text.ToDecimal - subtotaldevolucion)
|
||||||
@@ -13966,11 +13965,11 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Alert("El Total de la NC debe ser igual al total de la devolucion", TipoMensaje.MsgAdvertencia)
|
Alert("El Total de la NC debe ser igual al total de la devolución", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa, -1) Then
|
If Not ErrorMovInv AndAlso ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
|
||||||
For Each drow As DataRow In ObjInventario.DtResultados.Rows
|
For Each drow As DataRow In ObjInventario.DtResultados.Rows
|
||||||
TotalSumaPU = TotalSumaPU + drow("Total").ToString.ToDecimal
|
TotalSumaPU = TotalSumaPU + drow("Total").ToString.ToDecimal
|
||||||
@@ -14016,7 +14015,7 @@ Partial Class Compras_Compras
|
|||||||
Dim objcompras As New ClsCompras()
|
Dim objcompras As New ClsCompras()
|
||||||
If objcompras.GetCompraDetalleAlmacen(UsuarioActual.CveEmpresa, DDLDevolucion.SelectedValue.ToEntero) Then
|
If objcompras.GetCompraDetalleAlmacen(UsuarioActual.CveEmpresa, DDLDevolucion.SelectedValue.ToEntero) Then
|
||||||
GVDevolucion.DataSource = objcompras.DtResultados
|
GVDevolucion.DataSource = objcompras.DtResultados
|
||||||
FechaMovtoDev = objcompras.DtResultados.FiltroPrimeroValor("FechaMovto").ToDate.ToString("dd/MM/yyyy").ToDate
|
FechaMovtoDev = objcompras.DtResultados.FiltroPrimeroValor("FechaMovto").ToDate
|
||||||
End If
|
End If
|
||||||
objcompras.Dispose()
|
objcompras.Dispose()
|
||||||
GVDevolucion.DataBind()
|
GVDevolucion.DataBind()
|
||||||
@@ -14029,7 +14028,7 @@ Partial Class Compras_Compras
|
|||||||
DdlAlmacenDevolucion.SelectedValueExist(CveAlmacen)
|
DdlAlmacenDevolucion.SelectedValueExist(CveAlmacen)
|
||||||
UPDevolucion.Update()
|
UPDevolucion.Update()
|
||||||
|
|
||||||
If EsGrupoDiaz AndAlso FechaMovtoDev <> MinFecha AndAlso (FechaMovtoDev >= TxtFecha.Text.ToDate) Then
|
If FechaMovtoDev <> MinFecha AndAlso (FechaMovtoDev >= TxtFecha.Text.ToDate) Then
|
||||||
Alert("La fecha de la devolución se cambiará a una fecha posterior al ingreso.", TipoMensaje.ToastAdventencia)
|
Alert("La fecha de la devolución se cambiará a una fecha posterior al ingreso.", TipoMensaje.ToastAdventencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -14088,10 +14087,7 @@ Partial Class Compras_Compras
|
|||||||
Dim IEPSCompra As Decimal = TxtIEPS.Text.ToDecimal()
|
Dim IEPSCompra As Decimal = TxtIEPS.Text.ToDecimal()
|
||||||
Dim RetIVACompra As Decimal = TxtRetIVA.Text.ToDecimal()
|
Dim RetIVACompra As Decimal = TxtRetIVA.Text.ToDecimal()
|
||||||
Dim RetISRCompra As Decimal = TxtRetISR.Text.ToDecimal()
|
Dim RetISRCompra As Decimal = TxtRetISR.Text.ToDecimal()
|
||||||
Dim Acumulado As Decimal = 0
|
Dim AcumuladoDevolucion As Decimal = 0
|
||||||
|
|
||||||
'Dim TotalCalculable As Decimal = TotalCompra - IEPSCompra + RetIVACompra + RetISRCompra
|
|
||||||
|
|
||||||
Dim IVAPorcentajeCompra As Decimal = Math.Round((IVACompra / SubTotalCompra), 2)
|
Dim IVAPorcentajeCompra As Decimal = Math.Round((IVACompra / SubTotalCompra), 2)
|
||||||
Dim Contador As Integer = 0
|
Dim Contador As Integer = 0
|
||||||
Dim Consec As Integer = 0
|
Dim Consec As Integer = 0
|
||||||
@@ -14127,12 +14123,12 @@ Partial Class Compras_Compras
|
|||||||
Dim IVA As Decimal = IVAPorcentajeCompra 'Math.Round(Total * IVAPorcentajeCompra, 2)
|
Dim IVA As Decimal = IVAPorcentajeCompra 'Math.Round(Total * IVAPorcentajeCompra, 2)
|
||||||
Dim Descuento As Decimal = 0
|
Dim Descuento As Decimal = 0
|
||||||
|
|
||||||
Acumulado += (PU * Cantidad)
|
AcumuladoDevolucion += (PU * Cantidad)
|
||||||
Consec += 1
|
Consec += 1
|
||||||
|
|
||||||
If Consec = Contador AndAlso tAjusteUltimo Then 'SubTotalCompra < Acumulado Then
|
If Consec = Contador AndAlso tAjusteUltimo Then 'SubTotalCompra < AcumuladoDevolucion Then
|
||||||
'ajusta el valor
|
'ajusta el valor
|
||||||
Dim dif As Decimal = SubTotalCompra - Acumulado
|
Dim dif As Decimal = SubTotalCompra - AcumuladoDevolucion
|
||||||
If dif <> 0 Then
|
If dif <> 0 Then
|
||||||
PU = ((PU * Cantidad) + dif) / Cantidad
|
PU = ((PU * Cantidad) + dif) / Cantidad
|
||||||
Total = Cantidad * PU
|
Total = Cantidad * PU
|
||||||
@@ -14150,7 +14146,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
Dim PSRow As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSRNC).FiltroPrimero("")
|
Dim PSRow As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSRNC).FiltroPrimero("")
|
||||||
Dim PS As String = PSRow("PSCodigo").ToString
|
Dim PS As String = PSRow("PSCodigo").ToString
|
||||||
Dim tDif As Decimal = TxtSubTotal2.Text.ToDecimal - Total
|
Dim tDif As Decimal = TxtSubTotal2.Text.ToDecimal - AcumuladoDevolucion
|
||||||
DevolucionImporteOriginal = tDif
|
DevolucionImporteOriginal = tDif
|
||||||
|
|
||||||
AddPS(1, PSRow("CveUnidadMedida").ToString.ToEntero, PSRow("UnidadMedida").ToString,
|
AddPS(1, PSRow("CveUnidadMedida").ToString.ToEntero, PSRow("UnidadMedida").ToString,
|
||||||
|
|||||||
Reference in New Issue
Block a user