Merge branch 'master' of http://jperez@adsistemasof.sytes.net:8383/SIG.git
This commit is contained in:
@@ -840,7 +840,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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">
|
||||
<asp:ListItem Selected="True" Text="Sin Retención" Value="0"></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="Servicios" Value="4"></asp:ListItem>
|
||||
</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>
|
||||
<i></i>
|
||||
</div>
|
||||
@@ -1075,8 +1075,8 @@
|
||||
<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">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Concepto Contable" DataField="ConceptoContable"/>
|
||||
<asp:BoundField HeaderText="Nombre Cuenta" DataField="NombreCuenta"/>
|
||||
<asp:BoundField HeaderText="Concepto Contable" DataField="ConceptoContable" />
|
||||
<asp:BoundField HeaderText="Nombre Cuenta" DataField="NombreCuenta" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -4283,7 +4283,45 @@
|
||||
</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 class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
@@ -478,9 +478,19 @@ Partial Class Clientes
|
||||
Set(value As Boolean)
|
||||
ViewState("BonificacionUsado") = value
|
||||
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
|
||||
|
||||
|
||||
#Region "Documentacion"
|
||||
Private Property DTDocumentacion As DataTable
|
||||
Get
|
||||
@@ -6887,11 +6897,16 @@ Partial Class Clientes
|
||||
Public Sub DownLoad_ClickDocumentacion(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||
'Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto
|
||||
Dim linkDescarga As String = "C:\inetpub\wwwSIGGIT\Empresas\140\DocElectronica\Clientes\271110\Pagaré.docx"
|
||||
linkDescargaPagare = AppDomain.CurrentDomain.BaseDirectory & String.Format("Empresas\{0}\DocElectronica\Clientes\{1}\{2}", UsuarioActual.CveEmpresa, CveCliente, Adjunto)
|
||||
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 objGemBoxDocument As New clsGemBoxDocument(linkDescarga)
|
||||
Dim objGemBoxDocument As New clsGemBoxDocument(linkDescargaPagare)
|
||||
Dim Tags As New List(Of TagsDocumentos)
|
||||
Dim ObjClientes As New ClsClientes
|
||||
|
||||
@@ -6920,22 +6935,32 @@ Partial Class Clientes
|
||||
Tags.Add(New TagsDocumentos("{Direccion}", direccion))
|
||||
Tags.Add(New TagsDocumentos("{Ciudad}", ciudad))
|
||||
Tags.Add(New TagsDocumentos("{Telefono}", Telefono))
|
||||
Tags.Add(New TagsDocumentos("{RazonSocialAval}", UsuarioActual.Empresa.NombreCorto))
|
||||
Tags.Add(New TagsDocumentos("{DireccionAval}", UsuarioActual.Empresa.Direccion))
|
||||
Tags.Add(New TagsDocumentos("{RazonSocialAval}", TxtAval.Text))
|
||||
Tags.Add(New TagsDocumentos("{DireccionAval}", TxtDireccionAval.Text))
|
||||
Tags.Add(New TagsDocumentos("{CiudadAval}", UsuarioActual.Empresa.Ciudad))
|
||||
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)
|
||||
RegistraScript("$('#ModalDivPagare').modal('hide')")
|
||||
Alert("Pagaré registrado con exito")
|
||||
|
||||
objGemBoxDocument.SustituirTags(Tags)
|
||||
objGemBoxDocument.GuardarStream()
|
||||
Dim memoryStream As New System.IO.MemoryStream(objGemBoxDocument.GetBytesDocumento())
|
||||
objGemBoxDocument.Dispose()
|
||||
ObjClientes.Dispose()
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/text"
|
||||
Response.AddHeader("content-disposition", "attachment;filename=pagare.docx")
|
||||
Response.Buffer = True
|
||||
MemoryStream.WriteTo(Response.OutputStream)
|
||||
memoryStream.WriteTo(Response.OutputStream)
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosCliente.RowDataBound
|
||||
|
||||
@@ -82,6 +82,7 @@ Partial Class Ventas_Promociones
|
||||
'CARGA SUBPROYECTOS
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedor.DataBind()
|
||||
@@ -353,7 +354,7 @@ Partial Class Ventas_Promociones
|
||||
|
||||
RegistraScript("$('#DivAgregar').modal('show')")
|
||||
CveConsecutivo = e.CommandArgument.ToString.ToEntero
|
||||
DdlRin.SelectedValue = Gvr.DataKey("CveRinTamaño")
|
||||
DdlRin.SelectedValueExist(Gvr.DataKey("CveRinTamaño"))
|
||||
DdlClasificacion.SelectedValue = Gvr.DataKey("CveClasificacion")
|
||||
ChangeDdlProducto()
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||
|
||||
@@ -14303,6 +14303,7 @@ Partial Class Ventas
|
||||
Dim CantMinima As Integer = 0
|
||||
Dim CveMarcaPS As Integer = 0
|
||||
Dim CveClasifPS As Integer = 0
|
||||
Dim CveRinTamañoPS As Integer = 0
|
||||
Dim CvePromocionDetalle As Integer = 0
|
||||
Dim ObjDescuento As New Descuentos
|
||||
|
||||
@@ -14311,6 +14312,7 @@ Partial Class Ventas
|
||||
|
||||
CveMarcaPS = DrPS("CveMarca").ToString.ToEntero
|
||||
CveClasifPS = DrPS("CveClasificacion").ToString.ToEntero
|
||||
CveRinTamañoPS = DrPS("CveRinTamaño").ToString.ToEntero
|
||||
|
||||
If CveClasifPS = 20636 Then
|
||||
ValidaCondicionesComerciales = False
|
||||
@@ -14320,7 +14322,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = DtPromociones.FiltroPrimero(String.Format("CvePS = {0} AND (CveSubProyecto = {1} OR CveSubProyecto IS NULL)", CvePS, DdlSubProyectoDatos.SelectedValue))
|
||||
Dim dr As DataRow = DtPromociones.FiltroPrimero(String.Format("CvePS = {0} AND (CveSubProyecto = {1} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {2} OR CveRinTamaño IS NULL)", CvePS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS))
|
||||
If dr IsNot Nothing Then
|
||||
TipoPromo = dr("TipoPromocion").ToString.ToEntero
|
||||
TotalPromocion = dr("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal
|
||||
@@ -14329,13 +14331,18 @@ Partial Class Ventas
|
||||
CvePromocionDetalle = dr("CvePromocionDetalle").ToString.ToEntero
|
||||
Else
|
||||
'verifica marca, si tiene asignada la promocion
|
||||
Dim drC As DataRow = DtPromociones.FiltroPrimero(String.Format("CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL)", CveClasifPS, CveMarcaPS))
|
||||
Dim drC As DataRow = DtPromociones.FiltroPrimero(String.Format("CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL) AND (CveSubProyecto = {2} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {2} OR CveRinTamaño IS NULL)", CveClasifPS, CveMarcaPS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS))
|
||||
|
||||
If drC IsNot Nothing Then
|
||||
Dim Cant As Integer = 1
|
||||
TipoPromo = drC("TipoPromocion").ToString.ToEntero
|
||||
TotalPromocion = drC("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal
|
||||
PromocionPorcentaje = drC("Promocion").ToString.ToDecimal
|
||||
CantMinima = drC("CantidadMinima").ToString.ToEntero
|
||||
If CantMinima > 0 Then
|
||||
Cant = Math.Floor(TxtCantidad.Text.ToDecimal / CantMinima).ToEntero
|
||||
|
||||
End If
|
||||
TotalPromocion = Math.Round(drC("PUPromocion").ToString.ToDecimal * Cant / (1 + PorcentajeIVA), 6)
|
||||
PromocionPorcentaje = drC("Promocion").ToString.ToDecimal
|
||||
CvePromocionDetalle = drC("CvePromocionDetalle").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
@@ -14818,7 +14825,7 @@ Partial Class Ventas
|
||||
End If
|
||||
PU = Math.Round(PU, 6)
|
||||
DrPoliza("PU") = PU
|
||||
TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString.ToDecimal * (PU)) - Descuento
|
||||
TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString.ToDecimal * (PU))
|
||||
|
||||
If DrPSAdicional("IVA").ToString.Contiene("-1", "") Then
|
||||
DrPoliza("PorcentajeIVA") = PorcentajeIVA
|
||||
@@ -14834,7 +14841,7 @@ Partial Class Ventas
|
||||
DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje")
|
||||
DrPoliza("ImporteIEPS") = Math.Round(DrPSAdicional("IEPSPorcentaje").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
DrPoliza("IEPS") = DrPoliza("ImporteIEPS")
|
||||
DrPoliza("Descuento") = Math.Round(Descuento, NumeroDecimales)
|
||||
DrPoliza("Descuento") = Descuento
|
||||
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
|
||||
DrPoliza("Total") = (DrPoliza("Cantidad").ToString.ToDecimal * PU)
|
||||
DrPoliza("TotalImporte") = Math.Round(DrPoliza("Cantidad").ToString.ToDecimal * PU, NumeroDecimales)
|
||||
|
||||
Reference in New Issue
Block a user