Tab de almacen al aplicar NC
This commit is contained in:
10560
Compras/Compras.aspx
10560
Compras/Compras.aspx
File diff suppressed because it is too large
Load Diff
@@ -8291,6 +8291,16 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
|
||||||
|
If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
|
||||||
|
If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, CveCompra, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -18791,6 +18801,7 @@ Partial Class Compras_Compras
|
|||||||
HLAplicaNCFact.Visible = True
|
HLAplicaNCFact.Visible = True
|
||||||
LblTotalNC.Text = TxtTotal.Text.FormatoNumero
|
LblTotalNC.Text = TxtTotal.Text.FormatoNumero
|
||||||
CargaCuentasXPagar()
|
CargaCuentasXPagar()
|
||||||
|
TabModoNC_ActiveTabChanged(TabModoNC, EventArgs.Empty)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCuentasXPagar()
|
Private Sub CargaCuentasXPagar()
|
||||||
@@ -18924,6 +18935,9 @@ Partial Class Compras_Compras
|
|||||||
ChkNCInv.Visible = True
|
ChkNCInv.Visible = True
|
||||||
GVNCInv.DataSource = DtPendientesAlmacen
|
GVNCInv.DataSource = DtPendientesAlmacen
|
||||||
GVNCInv.DataBind()
|
GVNCInv.DataBind()
|
||||||
|
|
||||||
|
GVNCInvAlmacen.DataSource = DtPendientesAlmacen
|
||||||
|
GVNCInvAlmacen.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -18953,20 +18967,22 @@ Partial Class Compras_Compras
|
|||||||
SaldoAnticipo += gvr.FCTextBox("TxtAnticipo").Text.ToDouble
|
SaldoAnticipo += gvr.FCTextBox("TxtAnticipo").Text.ToDouble
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If SaldoAnticipo <= 0 Then
|
||||||
|
Alert("No hay movimientos seleccionados para aplicar", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If SaldoAnticipo <= 0 Then
|
|
||||||
Alert("No hay movimientos seleccionados para aplicar", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
LbNCInvSaldo.Text = SaldoAnticipo.FormatoNumero()
|
LbNCInvSaldo.Text = SaldoAnticipo.FormatoNumero()
|
||||||
|
LbNCInvSaldoAlmacen.Text = SaldoAnticipo.FormatoNumero()
|
||||||
|
|
||||||
If ChkNCInvNC.Checked Then
|
If ChkNCInvNC.Checked Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
If ObjInventarios.RecepcionAlmacenGet(-1, -1, UsuarioActual.CveEmpresa, CveProveedor) AndAlso ObjInventarios.DtResultados.FiltraParametros($"CveCompra IN ({CveCompras}) AND CantidadF > 0").Rows.Count > 0 Then
|
If ObjInventarios.RecepcionAlmacenGet(-1, -1, UsuarioActual.CveEmpresa, CveProveedor) AndAlso ObjInventarios.DtResultados.FiltraParametros($"CantidadF > 0").Rows.Count > 0 Then
|
||||||
DtPendientesAlmacen = ObjInventarios.DtResultados.FiltraParametros($"CveCompra IN ({CveCompras}) AND CantidadF > 0").Copy
|
DtPendientesAlmacen = ObjInventarios.DtResultados.FiltraParametros($"CantidadF > 0").Copy
|
||||||
End If
|
End If
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
End If
|
End If
|
||||||
@@ -18975,10 +18991,12 @@ Partial Class Compras_Compras
|
|||||||
If ChkNCInvNC.Checked Then
|
If ChkNCInvNC.Checked Then
|
||||||
GVNCInv.DataSource = DtPendientesAlmacen
|
GVNCInv.DataSource = DtPendientesAlmacen
|
||||||
GVNCInv.DataBind()
|
GVNCInv.DataBind()
|
||||||
UpNCInv.Update()
|
|
||||||
RegistraScript("$('#FacturaNC').modal('hide');", "FacturaNC")
|
GVNCInvAlmacen.DataSource = DtPendientesAlmacen
|
||||||
|
GVNCInvAlmacen.DataBind()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
RegistraScript("$('#ModalNCInv').modal('show');", "ModalNCInv")
|
|
||||||
Else
|
Else
|
||||||
If ChkNCInvNC.Checked Then
|
If ChkNCInvNC.Checked Then
|
||||||
Alert("Niguna de las facturas seleccionadas cuenta con productos pendientes de darles entrada.", TipoMensaje.MsgAdvertencia)
|
Alert("Niguna de las facturas seleccionadas cuenta con productos pendientes de darles entrada.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -18991,14 +19009,22 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
UpNCInv.Update()
|
UpNCInv.Update()
|
||||||
|
UpFacturaNC.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GVNCInv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVNCInv.RowDataBound
|
Protected Sub GVNCInv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVNCInv.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
'e.Row.FCCheckBox("cbInv").Attributes.Add("onclick", "FnCambiaInvNC(this);")
|
'e.Row.FCCheckBox("cbInv").Attributes.Add("onclick", "FnCambiaInvNC(this);")
|
||||||
e.Row.FCTextBox("TxtCantidadNCInv").Attributes.Add("onkeyup", $"ValidarCantidad(this,{e.Row.DBCampo("CantidadF")});FnCambiaInvNC(this);")
|
e.Row.FCTextBox("TxtCantidadNCInv").Attributes.Add("onkeyup", $"ValidarCantidad(this,{e.Row.DBCampo("CantidadF")});FnCambiaInvNC(this);")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub GVNCInvAlmacen_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVNCInvAlmacen.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
'e.Row.FCCheckBox("cbInv").Attributes.Add("onclick", "FnCambiaInvNC(this);")
|
||||||
|
e.Row.FCTextBox("TxtCantidadNCInv").Attributes.Add("onkeyup", $"ValidarCantidad(this,{e.Row.DBCampo("CantidadF")});FnCambiaInvNC(this);")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
Protected Sub BtnNCInv_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnNCInv_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
If ChkNCInvNC.Checked Then
|
If ChkNCInvNC.Checked Then
|
||||||
@@ -19056,6 +19082,34 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub BtnNCConfirmacion_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnNCConfirmacion_Click(sender As Object, e As EventArgs)
|
||||||
GuardaAnticipos(Nothing, Nothing)
|
GuardaAnticipos(Nothing, Nothing)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnNCInvAlmacen_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
'Dim ObjCompras As New ClsCompras
|
||||||
|
'Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL)
|
||||||
|
'Dim TieneError = False
|
||||||
|
|
||||||
|
'For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
|
||||||
|
' If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
|
||||||
|
' If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
|
||||||
|
' TieneError = True
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
'Next
|
||||||
|
|
||||||
|
'If Not TieneError Then
|
||||||
|
' Alert("Se guardo la devolución correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
' ObjCompras.Commit()
|
||||||
|
'Else
|
||||||
|
' Alert("Ocurrió un error al guardar la devolución", TipoMensaje.MsgError)
|
||||||
|
' ObjCompras.RollBack()
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'ObjCompras.Dispose()
|
||||||
|
RegistraScript("$('#FacturaNC').modal('hide');", "ModalNCInv")
|
||||||
|
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " INVENTARIO: MOVIMIENTOS DE LA COMPRA "
|
#Region " INVENTARIO: MOVIMIENTOS DE LA COMPRA "
|
||||||
@@ -20203,6 +20257,10 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub BtnFacturaNC_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnFacturaNC_Click(sender As Object, e As EventArgs)
|
||||||
If ChkNCInvNC.Checked Then
|
If ChkNCInvNC.Checked Then
|
||||||
CargaNCINV()
|
CargaNCINV()
|
||||||
|
|
||||||
|
TabModoNC.ActiveTabIndex = 1
|
||||||
|
TabModoNC_ActiveTabChanged(TabModoNC, EventArgs.Empty)
|
||||||
|
UpFacturaNC.Update()
|
||||||
Else
|
Else
|
||||||
RegistraScript("$('#FacturaNC').modal('hide');", "FacturaNC")
|
RegistraScript("$('#FacturaNC').modal('hide');", "FacturaNC")
|
||||||
End If
|
End If
|
||||||
@@ -20696,6 +20754,20 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub TabModoNC_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||||
|
Select Case TabModoNC.ActiveTabIndex
|
||||||
|
Case 0
|
||||||
|
BtnFacturaNC.Visible = True
|
||||||
|
BtnNCInvAlmacen.Visible = False
|
||||||
|
TabNCAlmacen.Enabled = False
|
||||||
|
Case 1
|
||||||
|
BtnFacturaNC.Visible = False
|
||||||
|
BtnNCInvAlmacen.Visible = True
|
||||||
|
TabNCAlmacen.Enabled = True
|
||||||
|
End Select
|
||||||
|
|
||||||
|
UpFooterFacturaNC.Update()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class MMensajeDevolucion
|
Public Class MMensajeDevolucion
|
||||||
|
|||||||
Reference in New Issue
Block a user