This commit is contained in:
Antonio Gonzalez
2020-03-28 17:46:11 -07:00
3 changed files with 5194 additions and 5094 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -3030,6 +3030,12 @@ Partial Class Compras_Compras
ddlAlmacenAdd.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2,7,14,19)") 'solo muestra tipo material y herramientas
ddlAlmacenAdd.DataBind()
DdlAlmacenDevolucion.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2,7,14,19)") 'solo muestra tipo material y herramientas
DdlAlmacenDevolucion.DataBind()
DdlAlmacenDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
Protected Sub CargaFuncionariosEmpleados()
@@ -13767,13 +13773,13 @@ Partial Class Compras_Compras
Private Function guardardevolucion(ObjInventario As ClsInventarios, CveCompra As Integer, subtotal As Double, Fecha As Date) As Boolean
Dim ErrorMovInv As Boolean = False
Dim CveAlmacen As Integer
Dim CveAlmacen As Integer = DdlAlmacenDevolucion.SelectedValue.ToEntero()
Dim subtotaldevolucion As Double = 0
Dim realizadevolucion As Boolean = False
'Calculo los subtotales para comparar con la NC
Dim cantidad As Double = 0.0
For Each Dr As GridViewRow In GVDevolucion.Rows
CveAlmacen = Dr.DataKey("CveAlmacen").ToString.ToEntero
'CveAlmacen = Dr.DataKey("CveAlmacen").ToString.ToEntero
cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble
If cantidad > 0 Then
realizadevolucion = True
@@ -13823,12 +13829,24 @@ Partial Class Compras_Compras
Protected Sub DDLDevolucion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDLDevolucion.SelectedIndexChanged
If DdlTipoComprobante.SelectedValue.Contiene("DEV") Then
DivAlmacenDev.Visible = True
End If
Dim objcompras As New ClsCompras()
If objcompras.GetCompraDetallealmacen(DDLDevolucion.SelectedValue.ToEntero) Then
GVDevolucion.DataSource = objcompras.DtResultados
GVDevolucion.DataBind()
End If
objcompras.Dispose()
Dim CveAlmacen As Integer = -1
For Each GvRow As GridViewRow In GVDevolucion.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
CveAlmacen = GvRow.DataKey("CveAlmacen").ToString.ToEntero
End If
Next
DdlAlmacenDevolucion.SelectedValueExist(CveAlmacen)
UPDevolucion.Update()
End Sub
'Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
@@ -16056,6 +16074,9 @@ Partial Class Compras_Compras
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
paneldevolucion.Visible = True
Pnlalmaceninventarios.Visible = False
If DdlTipoComprobante.SelectedValue.Contiene("DEV") Then
DivAlmacenDev.Visible = True
End If
cargaddldevoluciones(CveProveedor, TxtSubTotal.Text.ToDouble)
InicializaAplicaNCFact()
DivReembolso.Visible = False
@@ -16063,6 +16084,9 @@ Partial Class Compras_Compras
UpPS.Update()
End If
End If
UPCondicionesPago.Update()
End Sub

View File

@@ -499,6 +499,11 @@ Partial Class Ventas
Return ViewState("CveVenta").ToString.ToEntero
End Get
End Property
Private ReadOnly Property CveSubProyectoVenta As Integer
Get
Return If(IsNothing(ViewState("CveSubProyectoVenta")), -1, ViewState("CveSubProyectoVenta").ToString.ToEntero)
End Get
End Property
Private Property CveVentaPadre As Integer
Get
Return If(IsNothing(ViewState("CveVentaPadre")), -1, ViewState("CveVentaPadre").ToString.ToEntero)
@@ -3561,6 +3566,7 @@ Partial Class Ventas
ObjUsados.Dispose()
End If
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString.ToEntero
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString.ToEntero
'CargaEncabezado
@@ -4432,6 +4438,8 @@ Partial Class Ventas
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString)
CargaPS(-1, DdlPS)
UpPS.Update()
UpContado.Update()
UpEstatus.Update()
@@ -5570,10 +5578,15 @@ Partial Class Ventas
Objeto.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
Else
If Me.CveVenta > 0 Then
DdlSubProyectoDatos.SelectedValueExist(CveSubProyectoVenta)
End If
Dim cvesubproyecto As String = DdlSubProyectoDatos.SelectedValue
If UsuarioActual.CveEmpresa = 141 Then
cvesubproyecto = "-1"
End If
Objeto.Attributes.Add("data-cvesubproyecto", cvesubproyecto)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")