Almacen de devolucion

This commit is contained in:
2020-03-28 14:43:46 -07:00
parent 980069d372
commit 62952ada0b
2 changed files with 5181 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