faltaba un metodo en clsInventarios y en clientes se agrego un modal para el pagaré
This commit is contained in:
@@ -4899,6 +4899,29 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Public Function GetExistenciasMedRin(CvePS As Integer, CveEmpresa As Integer, CveRinTamaño As Integer, CveMedida As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Inv_ExistenciaMedRinGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveRinTamaño", SqlDbType.Int).Value = CveRinTamaño
|
||||||
|
.Add("@CveMedida", SqlDbType.Int).Value = CveMedida
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch Ex1 As SqlException
|
||||||
|
Me.OnError("Ocurrió un error al obtener las existencias.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener las existencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
#Region " IDisposable Support "
|
#Region " IDisposable Support "
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
|||||||
@@ -840,7 +840,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div id="DivTipoRetenciones" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
<div id="DivTipoRetenciones" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlTipoRetencion" ToolTip="Al establecer la retención de servicios, deberá especificarse el producto, como outsourcing para que se aplique la retención."
|
<asp:DropDownList ID="DdlTipoRetencion" ToolTip="Al establecer la retención de servicios, deberá especificarse el producto, como outsourcing para que se aplique la retención."
|
||||||
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoRetencion_SelectedIndexChanged" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true">
|
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoRetencion_SelectedIndexChanged" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true">
|
||||||
<asp:ListItem Selected="True" Text="Sin Retención" Value="0"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Sin Retención" Value="0"></asp:ListItem>
|
||||||
<asp:ListItem Text="Arrendamiento" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Arrendamiento" Value="1"></asp:ListItem>
|
||||||
@@ -848,7 +848,7 @@
|
|||||||
<asp:ListItem Text="Fletes" Value="3"></asp:ListItem>
|
<asp:ListItem Text="Fletes" Value="3"></asp:ListItem>
|
||||||
<asp:ListItem Text="Servicios" Value="4"></asp:ListItem>
|
<asp:ListItem Text="Servicios" Value="4"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlTipoRetencion.ClientID.ToString()%>" >Tipo de Retención de IVA:</label>
|
<label for="<%= DdlTipoRetencion.ClientID.ToString()%>">Tipo de Retención de IVA:</label>
|
||||||
<asp:RequiredFieldValidator ID="RFVTipoRetencion" runat="server" ControlToValidate="DdlTipoRetencion" CssClass="help-block" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Retención''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTipoRetencion" runat="server" ControlToValidate="DdlTipoRetencion" CssClass="help-block" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Retención''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -1075,8 +1075,8 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvCuentasContable" runat="server" DataKeyNames="ConceptoContable,NombreCuenta" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas en el Cliente" ToolTip="Listado de Historial de Ventas" CssClass="table table-striped table-advance table-hover" Style="text-align: center; min-width: 783px; width: 100%;" GridLines="None">
|
<asp:GridView ID="GvCuentasContable" runat="server" DataKeyNames="ConceptoContable,NombreCuenta" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas en el Cliente" ToolTip="Listado de Historial de Ventas" CssClass="table table-striped table-advance table-hover" Style="text-align: center; min-width: 783px; width: 100%;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Concepto Contable" DataField="ConceptoContable"/>
|
<asp:BoundField HeaderText="Concepto Contable" DataField="ConceptoContable" />
|
||||||
<asp:BoundField HeaderText="Nombre Cuenta" DataField="NombreCuenta"/>
|
<asp:BoundField HeaderText="Nombre Cuenta" DataField="NombreCuenta" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -4283,7 +4283,45 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="ModalDivPagare" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Información Aval para el Pagaré</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:UpdatePanel ID="UpModalPagare" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtAval" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TxtAval" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aval''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
|
<label for="TxtAval">Aval: </label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtDireccionAval" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" ControlToValidate="TxtDireccionAval" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
|
<label for="TxtDireccionAval">Dirección: </label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnAgregarPagare" Text="Enviar" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" ValidationGroup="GrpEnviarEmail" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="BtnAgregarPagare" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div id="ModalDivMail2" class="modal ADS fade" role="dialog">
|
<div id="ModalDivMail2" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
|||||||
@@ -479,6 +479,16 @@ Partial Class Clientes
|
|||||||
ViewState("BonificacionUsado") = value
|
ViewState("BonificacionUsado") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property linkDescargaPagare As String
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("linkDescargaPagare")), "", ViewState("linkDescargaPagare").ToString)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("linkDescargaPagare") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Documentacion"
|
#Region "Documentacion"
|
||||||
@@ -6887,11 +6897,16 @@ Partial Class Clientes
|
|||||||
Public Sub DownLoad_ClickDocumentacion(sender As Object, e As EventArgs)
|
Public Sub DownLoad_ClickDocumentacion(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||||
'Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto
|
linkDescargaPagare = AppDomain.CurrentDomain.BaseDirectory & String.Format("Empresas\{0}\DocElectronica\Clientes\{1}\{2}", UsuarioActual.CveEmpresa, CveCliente, Adjunto)
|
||||||
Dim linkDescarga As String = "C:\inetpub\wwwSIGGIT\Empresas\140\DocElectronica\Clientes\271110\Pagaré.docx"
|
TxtDireccionAval.Text = ""
|
||||||
|
TxtAval.Text = ""
|
||||||
|
RegistraScript("$('#ModalDivPagare').modal('show')")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ImprimirPagare(sender As Object, e As EventArgs) Handles BtnAgregarPagare.Click
|
||||||
Dim memoryStreamDoc As New System.IO.MemoryStream
|
Dim memoryStreamDoc As New System.IO.MemoryStream
|
||||||
Dim objGemBoxDocument As New clsGemBoxDocument(linkDescarga)
|
Dim objGemBoxDocument As New clsGemBoxDocument(linkDescargaPagare)
|
||||||
Dim Tags As New List(Of TagsDocumentos)
|
Dim Tags As New List(Of TagsDocumentos)
|
||||||
Dim ObjClientes As New ClsClientes
|
Dim ObjClientes As New ClsClientes
|
||||||
|
|
||||||
@@ -6920,22 +6935,32 @@ Partial Class Clientes
|
|||||||
Tags.Add(New TagsDocumentos("{Direccion}", direccion))
|
Tags.Add(New TagsDocumentos("{Direccion}", direccion))
|
||||||
Tags.Add(New TagsDocumentos("{Ciudad}", ciudad))
|
Tags.Add(New TagsDocumentos("{Ciudad}", ciudad))
|
||||||
Tags.Add(New TagsDocumentos("{Telefono}", Telefono))
|
Tags.Add(New TagsDocumentos("{Telefono}", Telefono))
|
||||||
Tags.Add(New TagsDocumentos("{RazonSocialAval}", UsuarioActual.Empresa.NombreCorto))
|
Tags.Add(New TagsDocumentos("{RazonSocialAval}", TxtAval.Text))
|
||||||
Tags.Add(New TagsDocumentos("{DireccionAval}", UsuarioActual.Empresa.Direccion))
|
Tags.Add(New TagsDocumentos("{DireccionAval}", TxtDireccionAval.Text))
|
||||||
Tags.Add(New TagsDocumentos("{CiudadAval}", UsuarioActual.Empresa.Ciudad))
|
Tags.Add(New TagsDocumentos("{CiudadAval}", UsuarioActual.Empresa.Ciudad))
|
||||||
Tags.Add(New TagsDocumentos("{TelefonoAval}", UsuarioActual.Empresa.Telefono))
|
Tags.Add(New TagsDocumentos("{TelefonoAval}", UsuarioActual.Empresa.Telefono))
|
||||||
|
|
||||||
|
If Not ObjClientes.AddClientePagare(CveCliente, UsuarioActual.CveEmpresa, TxtAval.Text, TxtDireccionAval.Text) Then
|
||||||
|
Alert("no se pudo registrar el pagare")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
'objGemBoxDocument.AgregarImagen(RutaLogo, 61.0, 53.0)
|
'objGemBoxDocument.AgregarImagen(RutaLogo, 61.0, 53.0)
|
||||||
|
RegistraScript("$('#ModalDivPagare').modal('hide')")
|
||||||
|
Alert("Pagaré registrado con exito")
|
||||||
|
|
||||||
objGemBoxDocument.SustituirTags(Tags)
|
objGemBoxDocument.SustituirTags(Tags)
|
||||||
objGemBoxDocument.GuardarStream()
|
objGemBoxDocument.GuardarStream()
|
||||||
Dim memoryStream As New System.IO.MemoryStream(objGemBoxDocument.GetBytesDocumento())
|
Dim memoryStream As New System.IO.MemoryStream(objGemBoxDocument.GetBytesDocumento())
|
||||||
objGemBoxDocument.Dispose()
|
objGemBoxDocument.Dispose()
|
||||||
|
ObjClientes.Dispose()
|
||||||
Response.Clear()
|
Response.Clear()
|
||||||
Response.ContentType = "application/text"
|
Response.ContentType = "application/text"
|
||||||
Response.AddHeader("content-disposition", "attachment;filename=pagare.docx")
|
Response.AddHeader("content-disposition", "attachment;filename=pagare.docx")
|
||||||
Response.Buffer = True
|
Response.Buffer = True
|
||||||
MemoryStream.WriteTo(Response.OutputStream)
|
memoryStream.WriteTo(Response.OutputStream)
|
||||||
Response.End()
|
Response.End()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosCliente.RowDataBound
|
Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosCliente.RowDataBound
|
||||||
|
|||||||
Reference in New Issue
Block a user