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

View File

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