Generar prepolzias en negativo Ventas
This commit is contained in:
@@ -77,7 +77,8 @@ Partial Class PopUpAuxiliar
|
||||
|
||||
Private Sub CargaDatos()
|
||||
GVAuxiliar.Columns(10).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||
'GVAuxiliar.Columns(11).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||
'GVAuxiliar.Columns(11).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||
GVAuxiliar.Columns(12).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||
|
||||
Select Case Tipo
|
||||
Case "CxCClientes"
|
||||
@@ -102,6 +103,9 @@ Partial Class PopUpAuxiliar
|
||||
LtlTipo2.Text = "Folio de la Compra"
|
||||
LtlTipo3.Text = "Fecha de la Compra"
|
||||
End Select
|
||||
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
|
||||
@@ -158,7 +162,11 @@ Partial Class PopUpAuxiliar
|
||||
GVAuxiliar.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound
|
||||
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound
|
||||
|
||||
|
||||
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
@@ -171,6 +179,7 @@ Partial Class PopUpAuxiliar
|
||||
e.Row.Cells(6).Visible = False
|
||||
e.Row.Cells(7).Visible = False
|
||||
e.Row.Cells(8).Visible = False
|
||||
e.Row.Cells(12).Visible = False
|
||||
ElseIf e.Row.RowIndex = 1 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(95)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(180)
|
||||
@@ -350,5 +359,62 @@ Partial Class PopUpAuxiliar
|
||||
Alert("No se encontró información suficiente.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Property CvePrePolizaNegativa As Integer
|
||||
Get
|
||||
If ViewState("CvePrePolizaNegativa") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CvePrePolizaNegativa").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePrePolizaNegativa") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Sub AgregaPolizaNegativo(CvePrePoliza As Integer)
|
||||
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
Dim TieneError As Boolean = False
|
||||
ObjContabilidad.IniciaTransacSQL()
|
||||
|
||||
If ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate) Then
|
||||
Alert("Se agrego polzia negativa correctamente.")
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
ObjContabilidad.RollBack()
|
||||
Else
|
||||
ObjContabilidad.Commit()
|
||||
RegistraScript(" $('#DivCancelar').modal('hide'); ")
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
AgregaPolizaNegativo(CvePrePolizaNegativa)
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub imgCancelar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
CvePrePolizaNegativa = GvRow.DataKey("CvePrePoliza").ToString.ToEntero
|
||||
|
||||
RegistraScript(" $('#DivCancelar').modal('show'); ")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user