This commit is contained in:
2020-02-19 18:20:30 -07:00
51 changed files with 6081 additions and 925 deletions

View File

@@ -67,6 +67,42 @@
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnConsultar">
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px;">
<div class="tools">
<asp:Button Text="Consultar" ID="BtnConsultar" CssClass="btn btn-primary" OnClick="BtnConsultar_Click" runat="server" />
</div>
<div class="titlefiltros caption ">
<div class="row" style="padding-top: 10px;">
<label class="col-md-1 truncate">Tipo Folio:</label>
<div class="col-md-2 ">
<%-- <asp:DropDownList ID="DdlSucursal" runat="server" CssClass="select2me" DataTextField="Sucursal" DataValueField="CveSucursal" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>--%>
<asp:DropDownList ID="DdlTipoFolio" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Value="general" >general</asp:ListItem>
<asp:ListItem Value="optima">optima</asp:ListItem>
<asp:ListItem Value="motobateria">motobateria</asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Estatus:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Activo" Value="1"></asp:ListItem>
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -77,12 +113,12 @@
</div> </div>
</div> </div>
<div class="row" style="margin:5px"> <div class="row" style="margin: 5px">
<asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False" <asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveFolioGarantia,FolioGarantia,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto" DataKeyNames="CveFolioGarantia,FolioGarantia,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto,tipoFolio,Limite"
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas" EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true" data-sort="true"
@@ -94,7 +130,16 @@
&nbsp;<asp:Literal ID="LblFolioGarantia" runat="server" Text='<%# Eval("FolioGarantia") %>'></asp:Literal> &nbsp;<asp:Literal ID="LblFolioGarantia" runat="server" Text='<%# Eval("FolioGarantia") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Folio">
<ItemTemplate>
&nbsp;<asp:Literal ID="LblTipoFolio" runat="server" Text='<%# Eval("tipoFolio") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Limite">
<ItemTemplate>
&nbsp;<asp:Literal ID="LblLimite" runat="server" Text='<%# Eval("Limite") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SubProyecto" ItemStyle-Width="150px"> <asp:TemplateField HeaderText="SubProyecto" ItemStyle-Width="150px">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Literal ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal> &nbsp;<asp:Literal ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
@@ -201,9 +246,9 @@
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label> <label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
<i></i> <i></i>
</div> </div>
<br /> <br />
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important"> <div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="200px" AutoPostBack="true"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="200px" AutoPostBack="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
@@ -216,10 +261,27 @@
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>&nbsp; <label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>&nbsp;
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" /> <asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<label for="<%= DdlTipoFolioModal.ClientID.ToString()%>">Tipo Folio:</label>&nbsp;
<asp:DropDownList ID="DdlTipoFolioModal" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<asp:ListItem Value="general" Selected ="True">general</asp:ListItem>
<asp:ListItem Value="optima">optima</asp:ListItem>
<asp:ListItem Value="motobateria">motobateria</asp:ListItem>
</asp:DropDownList>
<i></i>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtLimite" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvLimite" runat="server" ControlToValidate="TxtLimite" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<label for="<%= TxtLimite.ClientID.ToString()%>">Limite:</label>
<i></i>
</div>
<%-- <div class="form-group form-md-line-input input-iconright" style="width: 170px!important"> <%-- <div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
<asp:TextBox ID="TxtCargo" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox> <asp:TextBox ID="TxtCargo" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtCargo" runat="server" ControlToValidate="TxtCargo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cargo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTxtCargo" runat="server" ControlToValidate="TxtCargo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cargo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>

View File

@@ -38,7 +38,7 @@ Partial Class Acumuladores_CatFoliosGarantia
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CargaSubProyectos() CargaSubProyectos()
CargadatosGvFolioGarantia() CargadatosGvFolioGarantia(-1, "-1")
End If End If
End Sub End Sub
@@ -53,11 +53,11 @@ Partial Class Acumuladores_CatFoliosGarantia
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub End Sub
Private Sub CargadatosGvFolioGarantia() Private Sub CargadatosGvFolioGarantia(EstatusValor As Integer, tipoFolioValor As String)
Dim objAcum As New ClsAcumuladores Dim objAcum As New ClsAcumuladores
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa) Then If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor) Then
GvFolioGarantia.DataSource = objAcum.DtResultados GvFolioGarantia.DataSource = objAcum.DtResultados
Else Else
GvFolioGarantia.DataSource = Nothing GvFolioGarantia.DataSource = Nothing
@@ -116,7 +116,7 @@ Partial Class Acumuladores_CatFoliosGarantia
If Not Actualizar Then If Not Actualizar Then
If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero) Then If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero) Then
TxtFolioGarantia.Text = "" TxtFolioGarantia.Text = ""
ChkEstatus.Checked = True ChkEstatus.Checked = True
@@ -125,7 +125,7 @@ Partial Class Acumuladores_CatFoliosGarantia
'TxtCompra.Text = "" 'TxtCompra.Text = ""
'TxtPuntos.Text = "" 'TxtPuntos.Text = ""
CargadatosGvFolioGarantia() CargadatosGvFolioGarantia(-1, "-1")
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia") RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
UpGral.Update() UpGral.Update()
@@ -135,7 +135,8 @@ Partial Class Acumuladores_CatFoliosGarantia
Alert("Ocurrió un error al guardar el Folio de Garantía", TipoMensaje.MsgError) Alert("Ocurrió un error al guardar el Folio de Garantía", TipoMensaje.MsgError)
End If End If
Else Else
If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero) Then If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero,
DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero) Then
TxtFolioGarantia.Text = "" TxtFolioGarantia.Text = ""
ChkEstatus.Checked = True ChkEstatus.Checked = True
@@ -144,7 +145,7 @@ Partial Class Acumuladores_CatFoliosGarantia
'TxtCompra.Text = "" 'TxtCompra.Text = ""
'TxtPuntos.Text = "" 'TxtPuntos.Text = ""
CargadatosGvFolioGarantia() CargadatosGvFolioGarantia(-1, "-1")
UpModalFolioGarantia.Update() UpModalFolioGarantia.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia") RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
@@ -171,7 +172,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Dim CveCapacitador As Integer = GvRow.DataKey("CveFolioGarantia") Dim CveCapacitador As Integer = GvRow.DataKey("CveFolioGarantia")
If objAcum.FoliosGarantiaRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then If objAcum.FoliosGarantiaRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
CargadatosGvFolioGarantia() CargadatosGvFolioGarantia(-1, "-1")
Alert("Capacitador Eliminó Correctamente ", TipoMensaje.MsgInformacion) Alert("Capacitador Eliminó Correctamente ", TipoMensaje.MsgInformacion)
Else Else
@@ -180,7 +181,7 @@ Partial Class Acumuladores_CatFoliosGarantia
objAcum.Dispose() objAcum.Dispose()
CargadatosGvFolioGarantia() CargadatosGvFolioGarantia(-1, "-1")
CveFolioGarantia = -1 CveFolioGarantia = -1
@@ -198,6 +199,8 @@ Partial Class Acumuladores_CatFoliosGarantia
TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia") TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia")
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False) ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
TxtLimite.Text = GvRow.DataKey("Limite")
DdlTipoFolioModal.SelectedValue = GvRow.DataKey("tipoFolio")
'TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00") 'TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00")
'TxtBonificacion.Text = GvRow.DataKey("Bonificacion").ToDecimal.ToString("###,###,###.00") 'TxtBonificacion.Text = GvRow.DataKey("Bonificacion").ToDecimal.ToString("###,###,###.00")
'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00") 'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00")
@@ -221,6 +224,8 @@ Partial Class Acumuladores_CatFoliosGarantia
#End Region #End Region
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, DdlTipoFolio.SelectedValue)
End Sub
End Class End Class

View File

@@ -72,15 +72,77 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server"> <asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
<ContentTemplate> <ContentTemplate>
<asp:GridView runat="server" ID="GvDatos" data-sort="true" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos con los filtros seleccionados" ToolTip="Listado de Movimientos" DataKeyNames="Codigo,Codigo_Clientes,Total" CssClass="Widthall table table-striped table-hover ScrollAD" GridLines="None"> <asp:GridView runat="server" ID="GvDatos" data-sort="true" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos con los filtros seleccionados"
ToolTip="Listado de Movimientos" DataKeyNames="Codigo,Codigo_Clientes,Total,CveCliente,NombreComercial" CssClass="Widthall table table-striped table-hover ScrollAD" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Tipo" DataField="Codigo"/> <asp:BoundField HeaderText="Tipo" DataField="Codigo" />
<asp:BoundField HeaderText="Clientes/Grupos" DataField="Codigo_Clientes"/> <asp:BoundField HeaderText="Clientes/Grupos" DataField="Codigo_Clientes" />
<asp:BoundField HeaderText="Cantidad" DataField="Total" DataFormatString="{0:N0}"/> <asp:BoundField HeaderText="Cantidad" DataField="Total" DataFormatString="{0:N0}" />
<asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<asp:LinkButton ID="LnkCantidad" OnClick="CargarVentasGrupo" Text='<%# Eval("Total", "{0:N0}") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div id="ModalVentasAvance" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content" style="width: 700px;">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label Text="Ventas del agrupador" ID="LbTituloModalVentasAvance" runat="server" /></h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpVentasAvance" UpdateMode="Conditional">
<ContentTemplate>
<table>
<tr>
<td>Cliente: </td>
<td>
<asp:Label ID="LbCliente" Text="123" Font-Bold="true" runat="server" /></td>
</tr>
<tr>
<td>Tamaño: </td>
<td>
<asp:Label ID="LbTam" Text="123" Font-Bold="true" runat="server" /></td>
</tr>
</table>
<div style="overflow-y: auto; height: 400px;">
<asp:GridView ID="GvVentas" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
<Columns>
<asp:HyperLinkField HeaderText="Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:HyperLinkField HeaderText="Fecha" DataTextField="Fecha" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:HyperLinkField HeaderText="Sucursal" DataTextField="SubProyecto" Target="_blank" ItemStyle-Width="15%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:HyperLinkField HeaderText="Cantidad" DataTextField="Cantidad" Target="_blank" ItemStyle-Width="5%" ItemStyle-CssClass="Texto Derecha" DataTextFormatString="{0:###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:HyperLinkField HeaderText="Total" DataTextField="Total" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Derecha" DataTextFormatString="{0:###,###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
</Columns>
</asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -49,7 +49,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Dim Acum As New ClsAcumuladores Dim Acum As New ClsAcumuladores
If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar
DatosEntradasUsadosClientes = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") DatosEntradasUsadosClientes = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'")
End If End If
@@ -61,18 +61,11 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
'If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
' e.Row.CssClass = "SubTotales2" e.Row.CssClass = "SubTotales2"
'End If End If
If e.Row.DBCampo("TipoHeader").ToString = "1" Then
e.Row.CssClass = "Totales"
ElseIf e.Row.DBCampo("TipoHeader").ToString = "2" Then
e.Row.CssClass = "SubTotales"
ElseIf e.Row.DBCampo("TipoHeader").ToString = "3" Then
e.Row.CssClass = "SubTotales2"
End If
End If
End If
End Sub End Sub
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
@@ -96,4 +89,19 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
End Sub End Sub
Public Sub CargarVentasGrupo(sender As Object, e As EventArgs)
Dim tempLink As LinkButton = CType(sender, LinkButton)
Dim renglon As GridViewRow = CType(tempLink.NamingContainer, GridViewRow)
LbCliente.Text = renglon.DataKey("NombreComercial")
LbTam.Text = renglon.DataKey("Codigo")
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetUsadosClasificacionVentas(renglon.DataKey("CveCliente"), renglon.DataKey("Codigo"), TxtFechaI.Text, TxtFechaF.Text) Then
GvVentas.DataSource = ObjAcum.DtResultados
End If
ObjAcum.Dispose()
GvVentas.DataBind()
RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;")
End Sub
End Class End Class

View File

@@ -483,7 +483,7 @@ Public Class ClsAcumuladores
#Region " FOLIOS GARANTÍA " #Region " FOLIOS GARANTÍA "
Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1) As Boolean Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional TipoFolio As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -493,6 +493,7 @@ Public Class ClsAcumuladores
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
.Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio
End With End With
Try Try
@@ -507,7 +508,7 @@ Public Class ClsAcumuladores
Return Retorno Return Retorno
End Function End Function
Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoFolio As String, Limite As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -520,6 +521,8 @@ Public Class ClsAcumuladores
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@TipoFolio", SqlDbType.VarChar).Value = TipoFolio
.Add("@Limite", SqlDbType.Int).Value = Limite
End With End With
@@ -535,7 +538,7 @@ Public Class ClsAcumuladores
Return Retorno Return Retorno
End Function End Function
Public Function FoliosGarantiaUpdate(CveFolioGarantia As Integer, FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveSubProyecto As Integer) As Boolean Public Function FoliosGarantiaUpdate(CveFolioGarantia As Integer, FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveSubProyecto As Integer, TipoFolio As String, Limite As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -548,6 +551,8 @@ Public Class ClsAcumuladores
.Add("@Estatus", SqlDbType.Bit).Value = Estatus .Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@TipoFolio", SqlDbType.VarChar).Value = TipoFolio
.Add("@Limite", SqlDbType.Int).Value = Limite
End With End With
@@ -1034,6 +1039,29 @@ Public Class ClsAcumuladores
Return Retorno Return Retorno
End Function End Function
Public Function GetUsadosClasificacionVentas(CveCliente As Integer, Codigo As String, FechaInicio As String, FechaFin As String) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_Acum_UsadosClasificacionVentas")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al consultar los datos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region " IDisposable Support " #Region " IDisposable Support "

View File

@@ -3341,11 +3341,11 @@ Public Class ClsBancos
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region "PagosCajaChica" #Region "PagosCajaChica"
Public Function GetPagosCajaChica(FechaI As String, FechaF As String, CveEmpresa As Integer, CveCuenta As Integer) As Boolean Public Function GetPagosCajaChica(FechaI As String, FechaF As String, CveEmpresa As Integer, CveCuenta As Integer, Optional TipoPago As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_BancosCajaChicaPagosGet") DataAdapter("PA_BancosCajaChicaPagosGet")
@@ -3354,6 +3354,7 @@ Public Class ClsBancos
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@FechaF", SqlDbType.VarChar).Value = FechaF
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@TipoChequeEfectivo", SqlDbType.Int).Value = TipoPago
End With End With
Try Try
@@ -3364,10 +3365,10 @@ Public Class ClsBancos
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region "ACTIVOS FIJOS" #Region "ACTIVOS FIJOS"
Public Function GetActivosFijosCreditos(CveCredito As Integer, CveActivoFijo As Integer) As Boolean Public Function GetActivosFijosCreditos(CveCredito As Integer, CveActivoFijo As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False

View File

@@ -1549,6 +1549,364 @@ Public Class ClsCompProveedores
#End Region #End Region
#Region "TIPOS CONTRATOS"
Public Function GetTiposContratos(CveTipoContrato As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_CatTipoContratosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Estatus", SqlDbType.Int).Value = Estatus
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el los tipos de contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddTiposContratos(TipoContrato As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_CatTipoContratosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@TipoContrato", SqlDbType.VarChar).Value = TipoContrato
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar el tipo de contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateTiposContratos(CveTipoContrato As Integer, TipoContrato As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_CatTipoContratosUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
.Add("@TipoContrato", SqlDbType.VarChar).Value = TipoContrato
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el tipo de contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function RemoveTiposContratos(CveTipoContrato As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_CatTipoContratosRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el tipo de contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetTiposContratosDcumentos(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_CatTipoContratosDocumentosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el tipo de contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateTiposContratosDocumentos(CveTipoContrato As Integer, CveDocumentacion As Integer, Requerido As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_CatTipoContratosDocumentosUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
.Add("@CveDocumentacion", SqlDbType.Int).Value = CveDocumentacion
.Add("@Requerido", SqlDbType.Bit).Value = Requerido
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al Obtener los actualizar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddContrato(Contrato As String, CveTipoContrato As Integer, CveSubProyecto As Integer, CveProveedor As Integer, CveRepresentanteLegal As Integer, FechaInicio As Date, FechaFin As Date, Estatus As Boolean,
CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_ContratosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@Contrato", SqlDbType.VarChar).Value = Contrato
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al guardar el contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateContrato(CveContrato As Integer, Contrato As String, CveTipoContrato As Integer, CveSubProyecto As Integer, CveProveedor As Integer, CveRepresentanteLegal As Integer, FechaInicio As Date,
FechaFin As Date, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_ContratosUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@Contrato", SqlDbType.VarChar).Value = Contrato
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetContrato(CveContrato As Integer, CveSubProyecto As Integer, CveProveedor As Integer, CveTipoContrato As Integer, CveRepresentanteLegal As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_ContratosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
.Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al Obtener los contratos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function RemoveContrato(CveContrato As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_ContratosRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddRePresentanteLegal(RepresentanteLegal As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_CatRepresentanteLegalAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@RepresentanteLegal", SqlDbType.VarChar).Value = RepresentanteLegal
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar el representante.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateRePresentanteLegal(CveRepresentanteLegal As Integer, RepresentanteLegal As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_CatRepresentanteLegalUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
.Add("@RepresentanteLegal", SqlDbType.VarChar).Value = RepresentanteLegal
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el representante.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetRePresentanteLegal(CveRepresentanteLegal As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_CatRepresentanteLegalGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los representantes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function RemoveRePresentanteLegal(CveRepresentanteLegal As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Prov_SAT_CatRepresentanteLegalRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el representante.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
' IDisposable ' IDisposable
#Region " IDisposable Support " #Region " IDisposable Support "

View File

@@ -153,7 +153,7 @@ Public Class ClsEdocumentacion
Public Function DocumentacionAdd(Documentacion As String, DocumentacionFormato As String, CveDocumentacionTipo As Integer, Estatus As Integer, Orden As Integer, Requerido As Integer, Public Function DocumentacionAdd(Documentacion As String, DocumentacionFormato As String, CveDocumentacionTipo As Integer, Estatus As Integer, Orden As Integer, Requerido As Integer,
DiasLimite As Integer, AplicaDiasLimite As Boolean, AplicaFechaVencimiento As Boolean, CveEmpresa As Integer) As Boolean DiasLimite As Integer, AplicaDiasLimite As Boolean, AplicaFechaVencimiento As Boolean, CveEmpresa As Integer, Optional Periodicidad As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Edoc_DocumentacionAdd") DataAdapter("PA_Edoc_DocumentacionAdd")
@@ -169,6 +169,7 @@ Public Class ClsEdocumentacion
.Add("@DiasLimite", SqlDbType.Int).Value = DiasLimite .Add("@DiasLimite", SqlDbType.Int).Value = DiasLimite
.Add("@AplicaDiasLimite", SqlDbType.Bit).Value = AplicaDiasLimite .Add("@AplicaDiasLimite", SqlDbType.Bit).Value = AplicaDiasLimite
.Add("@AplicaFechaVencimiento", SqlDbType.Bit).Value = AplicaFechaVencimiento .Add("@AplicaFechaVencimiento", SqlDbType.Bit).Value = AplicaFechaVencimiento
.Add("@Periodicidad", SqlDbType.Int).Value = Periodicidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -187,7 +188,7 @@ Public Class ClsEdocumentacion
End Function End Function
Public Function DocumentacionUpdate(CveDocumentacion As Integer, Documentacion As String, DocumentacionFormato As String, CveDocumentacionTipo As Integer, Estatus As Integer, Orden As Integer, Requerido As Integer, DiasLimite As Integer, AplicaDiasLimite As Boolean, AplicaFechaVencimiento As Boolean, CveEmpresa As Integer) As Boolean Public Function DocumentacionUpdate(CveDocumentacion As Integer, Documentacion As String, DocumentacionFormato As String, CveDocumentacionTipo As Integer, Estatus As Integer, Orden As Integer, Requerido As Integer, DiasLimite As Integer, AplicaDiasLimite As Boolean, AplicaFechaVencimiento As Boolean, CveEmpresa As Integer, Optional Periodicidad As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Edoc_DocumentacionUpdate") DataAdapter("PA_Edoc_DocumentacionUpdate")
@@ -204,6 +205,7 @@ Public Class ClsEdocumentacion
.Add("@DiasLimite", SqlDbType.Int).Value = DiasLimite .Add("@DiasLimite", SqlDbType.Int).Value = DiasLimite
.Add("@AplicaDiasLimite", SqlDbType.Bit).Value = AplicaDiasLimite .Add("@AplicaDiasLimite", SqlDbType.Bit).Value = AplicaDiasLimite
.Add("@AplicaFechaVencimiento", SqlDbType.Bit).Value = AplicaFechaVencimiento .Add("@AplicaFechaVencimiento", SqlDbType.Bit).Value = AplicaFechaVencimiento
.Add("@Periodicidad", SqlDbType.Int).Value = Periodicidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
@@ -452,35 +454,61 @@ Public Class ClsEdocumentacion
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function DocumentacionElectronicaAuditoriaGet(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional Modulo As Integer = 3, Optional Estatus As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Edoc_DocumentacionElectronicaAuditoriaGet")
'Public Function DocumentacionGet(CveDocumentacionTipo As Integer, CveEmpresa As Integer) As Boolean With SqlAdapter.SelectCommand.Parameters
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Modulo", SqlDbType.Int).Value = Modulo
.Add("@Estatus", SqlDbType.Int).Value = Estatus
End With
' Dim Retorno As Boolean = False Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al consultar los registros de documentación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
' DataAdapter("PA_Edoc_DocumentacionGet") Return Retorno
End Function
' With SqlAdapter.SelectCommand.Parameters
' .Add("@CveDocumentacionTipo", SqlDbType.Int).Value = CveDocumentacionTipo
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
' End With 'Public Function DocumentacionGet(CveDocumentacionTipo As Integer, CveEmpresa As Integer) As Boolean
' Try ' Dim Retorno As Boolean = False
' SqlAdapter.Fill(Data)
' Retorno = True ' DataAdapter("PA_Edoc_DocumentacionGet")
' Catch ex As Exception
' OnError("Ocurrió un error al consultar la documentación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ' With SqlAdapter.SelectCommand.Parameters
' End Try ' .Add("@CveDocumentacionTipo", SqlDbType.Int).Value = CveDocumentacionTipo
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
' Return Retorno ' End With
' End Function
' Try
' SqlAdapter.Fill(Data)
' Retorno = True
' Catch ex As Exception
' OnError("Ocurrió un error al consultar la documentación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
' End Try
' Return Retorno
' End Function
#End Region #End Region
#Region " IDisposable Support " #Region " IDisposable Support "
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean) Protected Overridable Sub Dispose(ByVal disposing As Boolean)
If Not disposedValue Then If Not disposedValue Then
If disposing Then If disposing Then

View File

@@ -133,6 +133,26 @@ Public Class ClsGenerales
End With End With
End Sub End Sub
Public Function IEPSxEntidadFed(cveEstado As Int32, tasaIEPS As Decimal, fechaInicio As String, fechaFin As String, cveEmpresa As Int32, Agrupador As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_GralIepsPorEntidadFederativa", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEstado", SqlDbType.Int).Value = (cveEstado)
.Add("@TasaIEPS", SqlDbType.Decimal).Value = (tasaIEPS)
.Add("@FechaInicio", SqlDbType.VarChar).Value = (fechaInicio)
.Add("@FechaFin", SqlDbType.VarChar).Value = (fechaFin)
.Add("@Agrupador", SqlDbType.Int).Value = (Agrupador)
.Add("@CveEmpresa", SqlDbType.Int).Value = (cveEmpresa)
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el reporte de IEPS por entidad federativa.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function RepConciliacionSatDetalleGET(cveEmpresa As Int32, tipoDocto As String, fechaI As String, fechaF As String, RegistroEn As Integer) As Boolean Public Function RepConciliacionSatDetalleGET(cveEmpresa As Int32, tipoDocto As String, fechaI As String, fechaF As String, RegistroEn As Integer) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_RepConciliacionSatDetalleGET", CommandType.StoredProcedure) DataAdapter("PA_RepConciliacionSatDetalleGET", CommandType.StoredProcedure)
@@ -369,9 +389,12 @@ Public Class ClsGenerales
End Function End Function
Public Function GetGralPaqueteriasGuiasTipo() As Boolean Public Function GetGralPaqueteriasGuiasTipo(Optional CveEmpresa As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Gral_PaqueteriasGuiasTipoGet") DataAdapter("PA_Gral_PaqueteriasGuiasTipoGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
@@ -381,6 +404,54 @@ Public Class ClsGenerales
Return Retorno Return Retorno
End Function End Function
Public Function AddGralPaqueteriasGuiasTipo(PaqueteriaGuiaTipo As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_PaqueteriasGuiasTipoAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@PaqueteriaGuiaTipo", SqlDbType.VarChar).Value = PaqueteriaGuiaTipo
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar en el Catálogo de Paqueterias Guias Tipos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function RemoveGralPaqueteriasGuiasTipo(CvePaqueteriaGuiaTipo As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_PaqueteriasGuiasTipoDelete")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePaqueteriaGuiaTipo", SqlDbType.Int).Value = CvePaqueteriaGuiaTipo
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar en el Catálogo de Paqueterias Guias Tipos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateGralPaqueteriasGuiasTipo(CvePaqueteriaGuiaTipo As Integer, PaqueteriaGuiaTipo As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_PaqueteriasGuiasTipoUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePaqueteriaGuiaTipo", SqlDbType.Int).Value = CvePaqueteriaGuiaTipo
.Add("@PaqueteriaGuiaTipo", SqlDbType.VarChar).Value = PaqueteriaGuiaTipo
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar en el Catálogo de Paqueterias Guias Tipos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region #End Region
#Region "P L A N T I L L A S C O N T R A T O S" #Region "P L A N T I L L A S C O N T R A T O S"

View File

@@ -3517,6 +3517,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Inicio.aspx".ToUpper(), -1) PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
PaginaDict.Add("/reporteador.aspx".ToUpper(), -1) PaginaDict.Add("/reporteador.aspx".ToUpper(), -1)
PaginaDict.Add("/General/CATIEPSxEntidadFed.aspx".ToUpper(), 719)
PaginaDict.Add("/GPS/RepArrastre.aspx".ToUpper(), 718) PaginaDict.Add("/GPS/RepArrastre.aspx".ToUpper(), 718)
PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1)
PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716) PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716)
@@ -3956,6 +3957,10 @@ Public Class ClsPaginas
PaginaDict.Add("/Compras/RepPUESinPago.aspx".ToUpper(), 675) PaginaDict.Add("/Compras/RepPUESinPago.aspx".ToUpper(), 675)
PaginaDict.Add("/Compras/RepReqOCCompraInv.aspx".ToUpper(), 689) PaginaDict.Add("/Compras/RepReqOCCompraInv.aspx".ToUpper(), 689)
PaginaDict.Add("/Compras/RepComprasPrecios.aspx".ToUpper(), 690) PaginaDict.Add("/Compras/RepComprasPrecios.aspx".ToUpper(), 690)
PaginaDict.Add("/Compras/RepDocumentacionProveedor.aspx".ToUpper(), 1206)
PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753)
#End Region #End Region
'CONTABILIDAD 'CONTABILIDAD
@@ -4663,9 +4668,14 @@ Public Class ClsPaginas
'Portal Cliente/Proveedor 'Portal Cliente/Proveedor
PaginaDict.Add("/PortalCliente/PortalCliente.aspx".ToUpper(), 1101) PaginaDict.Add("/PortalCliente/PortalCliente.aspx".ToUpper(), 1101)
PaginaDict.Add("/PortalProveedor/PortalProveedor.aspx".ToUpper(), 1201) PaginaDict.Add("/PortalProveedor/PortalProveedor.aspx".ToUpper(), 1201)
'Portal PaginaDict.Add("/Edoc/CatDocumentos.aspx".ToUpper(), 1205)
PaginaDict.Add("/Edoc/CatTipoContratos.aspx".ToUpper(), 1207)
PaginaDict.Add("/Edoc/CatDocumentosContratos.aspx".ToUpper(), 1208)
PaginaDict.Add("/Edoc/Contratos.aspx".ToUpper(), 1209)
'Portal
PaginaDict.Add("/AIMMGM/ConsultaCliente.aspx".ToUpper(), -1) PaginaDict.Add("/AIMMGM/ConsultaCliente.aspx".ToUpper(), -1)
PaginaDict.Add("/Portal/ConsultaCliente.aspx".ToUpper(), -1) PaginaDict.Add("/Portal/ConsultaCliente.aspx".ToUpper(), -1)
PaginaDict.Add("/Proveedores/PortalProveedor.aspx".ToUpper(), -1) PaginaDict.Add("/Proveedores/PortalProveedor.aspx".ToUpper(), -1)
@@ -4682,6 +4692,7 @@ Public Class ClsPaginas
'Orden Produccion' 'Orden Produccion'
'RMA 'RMA
@@ -4865,12 +4876,23 @@ Public Class ClsPaginas
Case "S" : Retorno = 1203 Case "S" : Retorno = 1203
Case Else : Retorno = 1202 Case Else : Retorno = 1202
End Select End Select
End If
If Pagina.ToUpper() = ("/Ventas/Ventas.aspx").ToUpper() Then
Select Case Request("Op")
Case "Cot" : Retorno = 366
Case "Rem" : Retorno = 2018
Case Else : Retorno = 6
End Select
End If
If Pagina.ToUpper() = ("/Ventas/RepVentas.aspx").ToUpper() Then
Select Case Request("Op")
Case "Cot" : Retorno = 367
Case Else : Retorno = 9
End Select
End If End If
' End If
'PaginaDict = Nothing
Return Retorno Return Retorno
End Function End Function

View File

@@ -3914,14 +3914,14 @@ Public Class ClsVentas
#End Region #End Region
Public Function RepIngresos(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, TipoDocto As String, CveSubProyecto As Integer) As Boolean Public Function RepIngresos(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, TipoDocto As String, Cves_Subprotectos As String) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_Ventas_RepIngresos", CommandType.StoredProcedure) DataAdapter("PA_Ventas_RepIngresos", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@TipoDoc", SqlDbType.VarChar).Value = TipoDocto .Add("@TipoDoc", SqlDbType.VarChar).Value = TipoDocto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@Cves_Subprotectos", SqlDbType.VarChar).Value = Cves_Subprotectos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
Try Try

View File

@@ -449,7 +449,6 @@ Namespace Modelos
Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False) Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
If CveVenta > 0 AndAlso CveEmpresa > 0 Then If CveVenta > 0 AndAlso CveEmpresa > 0 Then
Me.DtAnticipos = New DataTable() Me.DtAnticipos = New DataTable()
Me.DtAntNCVinculadas = New DataTable()
Me.DtPagos = New DataTable() Me.DtPagos = New DataTable()
Me.DtRemisiones = New DataTable() Me.DtRemisiones = New DataTable()
Me.DtInventario = New DataTable() Me.DtInventario = New DataTable()
@@ -483,7 +482,7 @@ Namespace Modelos
If TipoDocto.Contiene("Ing", "Ant", "Rem") Then If TipoDocto.Contiene("Ing", "Ant", "Rem") Then
'carga as notas de credito vinculadas 'carga as notas de credito vinculadas
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
Me.DtAntNCVinculadas = ObjVentas.DtResultados.Copy() Me.DtAnticipos = ObjVentas.DtResultados.Copy()
End If End If
End If End If
@@ -493,7 +492,7 @@ Namespace Modelos
End If End If
If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
EsNCAmortizacion = True Me.EsNCAmortizacion = True
End If End If
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
@@ -2418,9 +2417,18 @@ Namespace Modelos
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta
Dim CveVenta As Integer = ObjFactura.CveVenta
Dim CveVentaAmortizacion As Integer = row2("CveVenta").ToString().ToEntero
'SI ES FACTURA EN 0 Y TIENE ANTICIPOS
If (ObjFactura.Total = 0 AndAlso UsuarioActual.CveEmpresa.Contiene(72) AndAlso ObjFactura.TipoDocto.Contiene("Ing")) AndAlso row2("TipoDocto").ToString() = "Ant" Then
CveVenta = row2("CveVenta").ToString().ToEntero
CveVentaAmortizacion = ObjFactura.CveVenta
End If
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1,
CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=row2("CveVenta").ToString().ToEntero, CveCliente:=ObjFactura.CveCliente, CveVenta:=CveVenta, CveVentaAmortizacion:=CveVentaAmortizacion, CveCliente:=ObjFactura.CveCliente,
CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
@@ -5213,8 +5221,7 @@ Namespace Modelos
Public Property DtDeduccion As Data.DataTable Public Property DtDeduccion As Data.DataTable
Public Property DtFirmas As Data.DataTable Public Property DtFirmas As Data.DataTable
Public Property DtDesgloseImpuestos As Data.DataTable Public Property DtDesgloseImpuestos As Data.DataTable
Public Property DtDocumentosRelacionados As Data.DataTable Public Property DtDocumentosRelacionados As Data.DataTable
Public Property DtAntNCVinculadas As Data.DataTable
Public Property DtNCVinculadas As Data.DataTable Public Property DtNCVinculadas As Data.DataTable
Public Property DtAnticipos As Data.DataTable Public Property DtAnticipos As Data.DataTable

View File

@@ -70,6 +70,15 @@
</div> </div>
<label class="col-md-1 truncate" style="width: 80px;">Tipo Pago:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoPago" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Value="-1" Text="Todos"></asp:ListItem>
<asp:ListItem Value="13" Text="Efectivo"></asp:ListItem>
<asp:ListItem Value="3" Text="Cheque"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
@@ -114,7 +123,8 @@
<asp:label runat="server">Importe seleccionado: $</asp:label><asp:label runat="server" ID="lblValorTotal">00.00</asp:label> <asp:label runat="server">Importe seleccionado: $</asp:label><asp:label runat="server" ID="lblValorTotal">00.00</asp:label>
</div> </div>
<br /> <br />
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe" CssClass="table detallerow table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None"> <div style="height:575px;overflow-x:scroll">
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>
@@ -141,6 +151,12 @@
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle> <ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Pago">
<ItemTemplate>
<asp:Literal ID="LtTipoPago" runat="server" ClientIDMode="Static" Text='<%# Eval("TipoPago")%>'></asp:Literal>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe"> <asp:TemplateField HeaderText="Importe">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtImporte" runat="server" ClientIDMode="Static" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Literal> <asp:Literal ID="LtImporte" runat="server" ClientIDMode="Static" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Literal>
@@ -152,6 +168,7 @@
<RowStyle Font-Size="Smaller" /> <RowStyle Font-Size="Smaller" />
<HeaderStyle CssClass="Titulos" /> <HeaderStyle CssClass="Titulos" />
</asp:GridView> </asp:GridView>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -41,7 +41,7 @@ Partial Class Bancos_DepositosCaja
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
ObjBancos.GetPagosCajaChica(FechaI, FechaF, UsuarioActual.CveEmpresa, DdlCajaChica.SelectedValue.ToEntero) ObjBancos.GetPagosCajaChica(FechaI, FechaF, UsuarioActual.CveEmpresa, DdlCajaChica.SelectedValue.ToEntero, DdlTipoPago.SelectedValue.ToEntero)
GvFacturas.DataSource = ObjBancos.DtResultados GvFacturas.DataSource = ObjBancos.DtResultados
ObjBancos.Dispose() ObjBancos.Dispose()

View File

@@ -720,7 +720,7 @@ Partial Class Bancos_ProveedoresAbonar
Valida.Verificar(gvr.DataKey("UUID"), gvr.DataKey("RFC"), UsuarioActual.Empresa.RFC, gvr.DataKey("Original").ToDecimal) Valida.Verificar(gvr.DataKey("UUID"), gvr.DataKey("RFC"), UsuarioActual.Empresa.RFC, gvr.DataKey("Original").ToDecimal)
If UsuarioActual.CveEmpresa < 2 Then If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa < 2 Then
Valida.EsValida = 1 Valida.EsValida = 1
End If End If

View File

@@ -0,0 +1,98 @@
<%@ Page Title="Compras - Catálogo de Paquetería" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPaqueteriasGuiasTipo.aspx.vb" Inherits="Comp_CatPaqueteriasGuiasTipo" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Catálogo de Paqueterías
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregar">
<ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="BtnAgregarPaqueteria" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar"></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePaqueteriaGuiaTipo,PaqueteriaGuiaTipo" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;width:100%" GridLines="None">
<Columns>
<asp:TemplateField HeaderText ="Paqueteria Guia Tipo">
<ItemTemplate>
<asp:Literal ID="LtlMotivoBaja" runat="server" Text='<%# Eval("PaqueteriaGuiaTipo", "&nbsp;{0}") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtMotivoBaja" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("PaqueteriaGuiaTipo") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVMotivoBaja" runat="server" ControlToValidate="TxtMotivoBaja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo de Baja''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCMotivoBaja" runat="server" HighlightCssClass="vco" TargetControlID="RFVMotivoBaja" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha">
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar">
<EditItemTemplate>
<center>
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
&nbsp;<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</center>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="imgE" OnClick="GvDatos_RowEditing" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
<div id="DivAgregarTiposD" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Motivos de baja</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPaqueteria" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TxtPaqueteria" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Paqueteria''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="MotivoTxt">Paqueteria Guía Tipo: </label>
<i></i>
</div>
</div>
<br />
<div class="modal-footer">
<asp:Button ID="BtnAgregarTiposDModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
<asp:Button ID="BtnEditarTiposDModal" runat="server" class="btn btn-success" Text="Confirmar" ValidationGroup="GrpTiposD" />
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,82 @@
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class Comp_CatPaqueteriasGuiasTipo
Inherits ClsPaginas
Private Property CvePaqueteriaGuiaTipo() As Integer 'Guardamos el ID de registro para saber cual registro Editar
Get
Return If(IsNothing(ViewState("CvePaqueteriaGuiaTipo")), -1, CInt(ViewState("CvePaqueteriaGuiaTipo")))
End Get
Set
ViewState("CvePaqueteriaGuiaTipo") = Value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDatos()
End If
End Sub
Public Sub CargaDatos()
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetGralPaqueteriasGuiasTipo(UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjGenerales.DtResultados
End If
ObjGenerales.Dispose()
GvDatos.DataBind()
End Sub
Protected Sub BtnAgregarPaqueteria_Click(sender As Object, e As EventArgs) Handles BtnAgregarPaqueteria.Click
BtnEditarTiposDModal.Visible = False
BtnAgregarTiposDModal.Visible = True
UpModalTiposD.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
End Sub
Protected Sub BtnAgregarTiposDModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarTiposDModal.Click
Dim ObjGeneral As New ClsGenerales
If ObjGeneral.AddGralPaqueteriasGuiasTipo(TxtPaqueteria.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
CargaDatos()
UpDatos.Update()
Alert("Agregado Correctamente")
End If
ObjGeneral.Dispose()
End Sub
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
Dim ObjGeneral As New ClsGenerales
If ObjGeneral.RemoveGralPaqueteriasGuiasTipo(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
CargaDatos()
UpDatos.Update()
Alert("Eliminado con exito")
End If
ObjGeneral.Dispose()
End Sub
Public Sub GvDatos_RowEditing(sender As Object, e As EventArgs)
BtnEditarTiposDModal.Visible = True
BtnAgregarTiposDModal.Visible = False
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
TxtPaqueteria.Text = GvRow.DataKey("PaqueteriaGuiaTipo")
CvePaqueteriaGuiaTipo = GvRow.DataKey("CvePaqueteriaGuiaTipo")
UpModalTiposD.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
End Sub
Protected Sub BtnEditarTiposDModal_Click(sender As Object, e As EventArgs) Handles BtnEditarTiposDModal.Click
Dim ObjGeneral As New ClsGenerales
If ObjGeneral.UpdateGralPaqueteriasGuiasTipo(CvePaqueteriaGuiaTipo, TxtPaqueteria.Text) Then
CargaDatos()
UpDatos.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
Alert("Actualizado con exito")
End If
ObjGeneral.Dispose()
End Sub
End Class

View File

@@ -7245,7 +7245,19 @@ Partial Class Compras_Compras
Next Next
importeMovimiento = 0 importeMovimiento = 0
End If End If
'Case 205
' If TxtTotal.Text.ToDecimal = 0 And DdlTipoComprobante.SelectedValue = "Fac" Then
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, Row("IdCtaContable").ToString.ToEntero, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=True) Then
' ErrorPrepoliza = True
' Exit For
' End If
' End If
End Select End Select
If ErrorPrepoliza Then If ErrorPrepoliza Then
@@ -10129,12 +10141,15 @@ Partial Class Compras_Compras
EmisorRFC = ValorXML(node, "RFC") EmisorRFC = ValorXML(node, "RFC")
'EmisorNombre = ValorXML(node, "nombre") 'EmisorNombre = ValorXML(node, "nombre")
End If End If
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Receptor", Prefijo), namespaces)
node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Receptor", Prefijo), namespaces)
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
ReceptorRFC = ValorXML(node, "RFC") ReceptorRFC = ValorXML(node, "RFC")
End If End If
If UsuarioActual.CveEmpresa.Contiene(119) Then If UsuarioActual.CveEmpresa.Contiene(119, 7) Then
node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces) node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
If ValorXML(node, "TipoRelacion").ToString.Contiene("04", "07") Then If ValorXML(node, "TipoRelacion").ToString.Contiene("04", "07") Then

View File

@@ -0,0 +1,371 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepDocumentacionProveedor.aspx.vb" Inherits="Proveedores_RepDocumentacionProveedor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte documentación
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<li style="text-align: left!important">
<asp:LinkButton runat="server" ID="LnkDescargarExcel" data-toggle="tooltip" data-placement="left" title="Agregar Familiares" Text="<i class='fa fa-file-excel-o'></i> Exportar a Excel"></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDescargarExcel" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
<div class="tools">
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption magindate">
<div class="row">
<div class="col-md-1 ">Proveedor:</div>
<div class="col-md-2 ">
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
</div>
<div class="col-md-1 truncate">Fecha Inicio</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="cvTxtFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ></asp:CompareValidator>
<%-- <asp:RequiredFieldValidator ID="rfvTxtFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo es requerido por la aplicación, por favor ingrese una fecha."></asp:RequiredFieldValidator>--%>
<ajax:ValidatorCalloutExtender ID="cvcTxtFechaI" runat="server" HighlightCssClass="vco" TargetControlID="cvTxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<%--<ajax:ValidatorCalloutExtender ID="rfvcTxtFechaI" runat="server" HighlightCssClass="vco" TargetControlID="rfvTxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div>
<div class="col-md-1 truncate">Fecha Fin</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<%-- <ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="cvImgFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ></asp:CompareValidator>
<%--<asp:RequiredFieldValidator ID="rfvImgFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo es requerido por la aplicación, por favor ingrese una fecha."></asp:RequiredFieldValidator>--%>
<ajax:ValidatorCalloutExtender ID="cvcImgFechaF" runat="server" HighlightCssClass="vco" TargetControlID="cvImgFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<%--<ajax:ValidatorCalloutExtender ID="rfvcImgFechaF" runat="server" HighlightCssClass="vco" TargetControlID="rfvImgFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div>
<div class="col-md-1 truncate">Estatus</div>
<div class="col-md-1">
<asp:DropDownList runat="server" ID="DdlEstatus" Width="150px" CssClass="select2me" >
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Pendiente</asp:ListItem>
<asp:ListItem Value="2">Entregado</asp:ListItem>
<asp:ListItem Value="3">Completado</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpGvDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row col-md-12" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
<input type="text" id="TxtBusquedaFam" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaFam','{0}')", GvDocumentos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaFam','{0}')", GvDocumentos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row">
<asp:UpdatePanel ID="UPGvDocumentos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-12">
<asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveProveedor,CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento,ContactoMail"
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="60px">
<ItemTemplate>
<asp:Literal ID="ImgRequired" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="SubProyecto">
<ItemTemplate>
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="Contrato">
<ItemTemplate>
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("Contrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100" HeaderText="Vencimiento" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlVencimiento" runat="server" Text='<%# Eval("Vencimiento", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="Nombre">
<ItemTemplate>
<asp:Literal ID="LtlNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="Documento">
<ItemTemplate>
<asp:Literal ID="LtlDocumentacion" runat="server" Text='<%# Eval("Documentacion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Estado" ItemStyle-Width="40px">
<ItemTemplate>
<%-- <asp:CheckBox ID="chkEstatus" runat="server" CssClass="make-switchsd" Enabled="false" ></asp:CheckBox>--%>
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("SCompleto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Observaciones" ItemStyle-Width="100">
<ItemTemplate>
<asp:TextBox ID="TxtObservaciones" Width="300" MaxLength="100" runat="server" Text='<%# Eval("Observacion") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Fecha limite" ItemStyle-Width="100" Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtFechaLimite" Width="100" onKeyPress="return false;" MaxLength="10" runat="server" Text='<%# Eval("FechaLimite") %>'></asp:TextBox>
<ajax:CalendarExtender runat="server" ID="Calendario6" TargetControlID="TxtFechaLimite" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI6" runat="server" ControlToValidate="TxtFechaLimite" Display="None" ErrorMessage="El campo <b>''Fecha limite''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpRL"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI6" runat="server" ControlToValidate="TxtFechaLimite" Display="None" ErrorMessage="El campo <b>''Fecha Limite''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRL"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI4" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI6" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI6" Width="350px"></ajax:ValidatorCalloutExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Vigencia" ItemStyle-Width="100" Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtFechaVigencia" Width="100" MaxLength="10" runat="server" Text='<%# Eval("FechaVigencia") %>'></asp:TextBox>
<ajax:CalendarExtender runat="server" ID="Calendario7" TargetControlID="TxtFechaVigencia" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="cvTxtFechaVigencia" runat="server" ControlToValidate="TxtFechaVigencia" Display="None" ErrorMessage="El campo <b>''Fecha Limite''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRL"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoCvFI5" runat="server" HighlightCssClass="vco" TargetControlID="cvTxtFechaVigencia" Width="350px"></ajax:ValidatorCalloutExtender>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
<ItemTemplate>
<asp:LinkButton ID="ImgUpload" runat="server" AlternateText="Editar" CausesValidation="False"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' title='Subir documento' ></i>" />
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderText="Cargar">
<ItemTemplate>
<asp:LinkButton ID="ImgUpload" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="UploadModal_ClickDocumentacion"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' title='Subir documento' ></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" HeaderText="Ver">
<ItemTemplate>
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" HeaderText="Rechazar">
<ItemTemplate>
<asp:LinkButton ID="ImgRechazar" runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-exclamation-triangle'></i>" Visible="false"
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si"
OnClick="ImgRechazar_Click" >
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" HeaderText="Aceptar">
<ItemTemplate>
<asp:LinkButton ID="ImgAceptar" runat="server" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" Visible="false"
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si"
OnClick="ImgAceptar_Click" >
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" HeaderText="Aprobar">
<ItemTemplate>
<asp:Literal ID="ImgAprobar" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="ModalUploadDoc" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalReferenciasVerificacion" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<asp:UpdatePanel ID="UpModalTitleUploadDocumento" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<h4 class="modal-title">
<asp:Literal ID="LtlModalUploadTitulo" runat="server"></asp:Literal></h4>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UPModalUploadDoc" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-12">
<asp:TextBox ID="TxtFileDocumentacion" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="btnUploadFileDoc" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script src="/Scripts/DataTables.js"></script>
<script>
<%-- $(document).ready(function () {
$('#<%= TxtFechaI.ClientID %>').mask('00/00/0000');
$('#<%= TxtFechaF.ClientID %>').mask('00/00/0000');
})
function OrdenarGvDocumentos() {
var Tam = TamañoVentana();
var Alto = Tam.height - 330;
if (Alto < 100) {
Alto = 100;
}
$('#<%=GvDocumentos.ClientID%>').DataTable({
retrieve: true,
scrollY: Alto + 'px',
scrollCollapse: true,
paging: false,
searching: false,
info: false,
ordering: true,
colReorder: {
"fixedColumnsLeft": 1
}
});
$('#GVDocumentos').parent().parent().children().first().css("position", "static");
}--%>
</script>
</asp:Content>

View File

@@ -0,0 +1,624 @@
Option Strict On
Imports System.Data
Imports System.IO
Imports Extensiones
Imports GemBox.Spreadsheet
Partial Class Proveedores_RepDocumentacionProveedor
Inherits ClsPaginas
Private Property DTDatos As DataTable
Get
If ViewState("DTDatos") Is Nothing Then
Return New DataTable
Else
Return DirectCast(ViewState("DTDatos"), DataTable)
End If
End Get
Set(value As DataTable)
ViewState("DTDatos") = value
End Set
End Property
Private Property DTHeaders As DataTable
Get
If ViewState("DTHeaders") Is Nothing Then
Return New DataTable
Else
Return DirectCast(ViewState("DTHeaders"), DataTable)
End If
End Get
Set(value As DataTable)
ViewState("DTHeaders") = value
End Set
End Property
#Region "UPLOAD"
Property CveDocumentacionElectronica As Integer
Get
If ViewState("CvePersonalClienteDocumentacion") Is Nothing Then
Return -1
Else
Return DirectCast(ViewState("CvePersonalClienteDocumentacion"), Integer)
End If
End Get
Set(value As Integer)
ViewState("CvePersonalClienteDocumentacion") = value
End Set
End Property
Property CveDocumentacion As Integer
Get
If ViewState("CveDocumentacion") Is Nothing Then
Return -1
Else
Return DirectCast(ViewState("CveDocumentacion"), Integer)
End If
End Get
Set(value As Integer)
ViewState("CveDocumentacion") = value
End Set
End Property
Property Documentacion As String
Get
If ViewState("Documentacion") Is Nothing Then
Return "-1"
Else
Return ViewState("Documentacion").ToString
End If
End Get
Set(value As String)
ViewState("Documentacion") = value
End Set
End Property
Property AdjuntoDocumentacion As String
Get
If ViewState("AdjuntoDocumentacion") Is Nothing Then
Return ""
Else
Return ViewState("AdjuntoDocumentacion").ToString
End If
End Get
Set(value As String)
ViewState("AdjuntoDocumentacion") = value
End Set
End Property
Property DiasVigencia As Integer
Get
If ViewState("DiasVigencia") Is Nothing Then
Return 0
Else
Return DirectCast(ViewState("DiasVigencia"), Integer)
End If
End Get
Set(value As Integer)
ViewState("DiasVigencia") = value
End Set
End Property
Property AplicaFechaVencimiento As Boolean
Get
If ViewState("AplicaFechaVencimiento") Is Nothing Then
Return True
Else
Return DirectCast(ViewState("AplicaFechaVencimiento"), Boolean)
End If
End Get
Set(value As Boolean)
ViewState("AplicaFechaVencimiento") = value
End Set
End Property
Private Property FechaVigencia As Date
Get
If ViewState("FechaVigencia") Is Nothing Then
Return Nothing
Else
Return ViewState("FechaVigencia").ToString.ToDate
End If
End Get
Set(value As Date)
ViewState("FechaVigencia") = value
End Set
End Property
Property Estatus As Integer
Get
If ViewState("Estatus") Is Nothing Then
Return 0
Else
Return DirectCast(ViewState("Estatus"), Integer)
End If
End Get
Set(value As Integer)
ViewState("Estatus") = value
End Set
End Property
Property ObservacionDocumentacion As String
Get
If ViewState("ObservacionDocumentacion") Is Nothing Then
Return ""
Else
Return ViewState("ObservacionDocumentacion").ToString
End If
End Get
Set(value As String)
ViewState("ObservacionDocumentacion") = value
End Set
End Property
Private Property FechaLimite As Date
Get
If ViewState("FechaLimite") Is Nothing Then
Return Date.Now.AddDays(15)
Else
Return ViewState("FechaLimite").ToString.ToDate
End If
End Get
Set(value As Date)
ViewState("FechaLimite") = value
End Set
End Property
Property CveProveedor As Integer
Get
If ViewState("CveProveedor") Is Nothing Then
Return 0
Else
Return DirectCast(ViewState("CveProveedor"), Integer)
End If
End Get
Set(value As Integer)
ViewState("CveProveedor") = value
End Set
End Property
#End Region
Private Sub Proveedores_RepDocumentacionProveedor_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaCombos()
'TxtFechaI.Text = Now.AddMonths(-3).ToString("dd/MM/yyyy")
'TxtFechaF.Text = Now.ToString("dd/MM/yyyy")
TxtFechaI.Text = ""
TxtFechaF.Text = ""
LnkDescargarExcel.Visible = False
End If
'ExportaExcel()
End Sub
Private Sub CargaCombos()
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Todos"
DdlProveedores.SelectedValue = "-1"
End Sub
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
CargaDocumentacion()
End Sub
Private Sub CargaDocumentacion()
Dim CveProveedor As Integer = -1
Dim FechaInicio As Date
Dim FechaFin As Date
If TxtFechaI.Text = "" Then
FechaInicio = MinFecha
Else
FechaInicio = TxtFechaI.Text.ToDate
End If
If TxtFechaF.Text = "" Then
FechaFin = MaxFecha
Else
FechaFin = TxtFechaF.Text.ToDate
End If
If DdlProveedores.txtValue.Value.ToEntero > 0 Then
CveProveedor = DdlProveedores.txtValue.Value.ToEntero
End If
Dim obEDoc As New ClsEdocumentacion
If obEDoc.DocumentacionElectronicaAuditoriaGet(CveProveedor, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, 3, DdlEstatus.SelectedValue.ToEntero) Then
GvDocumentos.DataSource = obEDoc.DtResultados
Else
GvDocumentos.DataSource = Nothing
End If
obEDoc.Dispose()
GvDocumentos.DataBind()
UPGvDocumentos.Update()
End Sub
Protected Sub GvDocumentos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
Dim txtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia")
Dim CveDocumentacionElectronica As Integer = e.Row.DataKey("CveDocumentacionElectronica").ToEntero
Dim ImgRechazar As LinkButton = e.Row.FCLinkButton("ImgRechazar")
Dim ImgAceptar As LinkButton = e.Row.FCLinkButton("ImgAceptar")
Dim requerido As Boolean = Boolean.Parse(e.Row.DBCampo("Requerido"))
'Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
'Dim RDBAcptar As RadioButton = e.Row.FCRadioButton("RDBAcptar")
'Dim RDBRechazar As RadioButton = e.Row.FCRadioButton("RDBRechazar")
Dim separado As Char() = ".".ToCharArray
Dim array() As String = Adjunto.Split(separado)
Dim extencion As String = ""
Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString.ToEntero
Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString = "1", True, False)
Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString = "1", True, False)
txtFechaLimite.Visible = If(AplicaDiasLimite, True, False)
txtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False)
If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
If DateTime.Today > e.Row.DBCampo("FechaVigencia").ToString.ToDateTime Then
txtFechaVigencia.ForeColor = Drawing.Color.Red
End If
End If
If array.Length > 0 Then
extencion = array(array.Length - 1)
End If
'If e.Row.DBCampo("Estatus").ToString.ToEntero = 3 Then
' RDBAcptar.Checked = True
'Else
' chkEstatus.Checked = False
'End If
txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy")
If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
End If
Dim scripMascara = "$('#" & txtFechaLimite.ClientID & "').mask('00/00/0000');$('#" & txtFechaVigencia.ClientID & "').mask('00/00/0000');"
RegistraScript(scripMascara, "scriptMascara")
If Adjunto.Trim.Length > 0 Then
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & e.Row.DataKey("CveProveedor") & "/" & Adjunto
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & e.Row.DataKey("CveProveedor") & "/" & Adjunto
If File.Exists(linkDescargaArchivo) Then
ImgDownLoad.Visible = True
If extencion.Length > 0 Then
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica & "." & extencion)
Else
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica)
End If
If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(2, 3) Then
ImgRechazar.Visible = True
End If
If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(2) Then
ImgAceptar.Visible = True
End If
'If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(3) Then
' chkEstatus.Checked = True
'End If
Else
ImgDownLoad.Visible = False
End If
Else
ImgDownLoad.Visible = False
End If
If requerido Then
ImgRequired.Text = " <a class='btn btn-circle btn-sm yelow' href='#' data-toggle='tooltip' title=' Requerido!' ><i class='fa fa-asterisk '></i></a>"
End If
'chkEstatus.Checked = ImgDownLoad.Visible
End If
End Sub
Protected Sub ImgRechazar_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim Obsebaciones As String = GvRow.FCTextBox("TxtObservaciones").Text
If Obsebaciones.Trim.Length = 0 Then
Alert("Debe de proporcionar una obserbación o motivo de rechazo.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Correo As String = GvRow.DataKey("ContactoMail")
Dim Documentacion As String = GvRow.DataKey("Documentacion")
Dim Obserbaciones As String = GvRow.FCTextBox("TxtObservaciones").Text
Dim Adjunto As String = GvRow.DataKey("Adjunto")
Dim CveProveedor As Integer = GvRow.DataKey("CveProveedor").ToEntero
Dim Archivo As String = UsuarioActual.Empresa.Ruta & $"Edoc\Proveedor\{CveProveedor}\{Adjunto}"
Dim objEdoc As New ClsEdocumentacion
Dim ErrorProceso As Boolean = False
objEdoc.IniciaTransacSQL()
If objEdoc.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero, GvRow.DataKey("CveDocumentacion").ToEntero, -1, -1, GvRow.DataKey("CveProveedor").ToEntero, 1,
If(Obsebaciones.Trim.Length > 0, Obsebaciones, GvRow.DataKey("Observacion")), "-1",
UsuarioActual.CveUsuario, GvRow.DataKey("FechaLimite").ToDate, GvRow.DataKey("FechaVigencia").ToDate) Then
Try
File.Delete(Archivo)
Catch ex As Exception
ErrorProceso = True
End Try
If Not ErrorProceso Then
Dim Cuerpo As String = $"<p>Por medio del presente correo se le notifica que el documento <b>{Documentacion}</b> &nbsp; ha sido rechazado por la siguiente causa: <b>{Obserbaciones}</b> &nbsp;por favor ingrese nuevamente al portal &nbsp;y agr&eacute;guelo nuevamente.&nbsp;</p>
<p>Atentamente:</p>
<p>Saludos.</p>"
If Not MandaCorreo(Correo, $"{ UsuarioActual.Empresa.Empresa } documento Rechazado", Cuerpo) Then
ErrorProceso = True
End If
Alert($"El documento {GvRow.DataKey("Documentacion") } fue rechazado.")
End If
Else
ErrorProceso = True
End If
If ErrorProceso Then
objEdoc.RollBack()
Else
objEdoc.Commit()
End If
objEdoc.Dispose()
CargaDocumentacion()
End Sub
Protected Sub ImgAceptar_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim objEdoc As New ClsEdocumentacion
If objEdoc.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero, GvRow.DataKey("CveDocumentacion").ToEntero, -1, -1, GvRow.DataKey("CveProveedor").ToEntero, 3,
"", "-1", UsuarioActual.CveUsuario, GvRow.DataKey("FechaLimite").ToDate, GvRow.DataKey("FechaVigencia").ToDate) Then
Alert("Dcumento Aceptado.")
End If
objEdoc.Dispose()
CargaDocumentacion()
End Sub
Private Function MandaCorreo(Para As String, Asunto As String, Body As String) As Boolean
Dim Respuesta As Boolean = False
Dim Mail As New ClsSisMail()
Para = If(Para IsNot Nothing, Para, "")
Asunto = If(Asunto IsNot Nothing, Asunto, "")
Body = If(Body IsNot Nothing, Body, "")
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
Respuesta = True
End If
Return Respuesta
End Function
Public Sub UploadModal_ClickDocumentacion(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
' Dim chkEstatus As CheckBox
CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero
CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString.ToEntero
Documentacion = GvRow.DataKey("Documentacion")
AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
CveProveedor = GvRow.DataKey("CveProveedor").ToEntero
'DiasVigencia = GvRow.DataKey("DiasVigencia").ToString.ToEntero
Dim x As String = GvRow.DataKey("AplicaFechaVencimiento")
If GvRow.DataKey("AplicaFechaVencimiento") = "1" Then AplicaFechaVencimiento = True Else AplicaFechaVencimiento = False
If GvRow.DataKey("Adjunto").ToString.Length > 0 Then
FechaVigencia = GvRow.DataKey("Adjunto").ToString.ToDate
Else
FechaVigencia = Nothing
End If
Estatus = GvRow.DataKey("Estatus").ToEntero
'If chkEstatus.Checked Then
' Estatus = 1
'Else
' Estatus = 0
'End If
ObservacionDocumentacion = GvRow.FCTextBox("TxtObservaciones").Text.Trim.ToUpper
FechaLimite = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate
AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
LtlModalUploadTitulo.Text = "Subir " & Documentacion
UpModalTitleUploadDocumento.Update()
RegistraScript("$('#ModalUploadDoc').modal({ backdrop: 'static', keyboard: false});")
End Sub
Protected Sub BtnUploadFileDoc_Click(sender As Object, e As EventArgs) Handles btnUploadFileDoc.Click
Dim FileExtension As String = "-1"
Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos
Dim Filename As String = ""
Dim ErrorProceso As Boolean = False
If AplicaFechaVencimiento And DiasVigencia > 0 Then
FechaVigencia = DateTime.Today.AddDays(DiasVigencia)
End If
For Each fileItem As Archivo In Filesgral
Try
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
Dim tempArray() As String
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
Dim TempCveDocumentacionElectronica As Integer = 0
Dim objEdoc As New ClsEdocumentacion
objEdoc.IniciaTransacSQL()
If CveDocumentacionElectronica = -1 Then
CveDocumentacionElectronica = objEdoc.DocumentacionElectronicaAdd(CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, "-1", UsuarioActual.CveUsuario, FechaLimite, FechaVigencia)
If CveDocumentacionElectronica > 0 Then
If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
ErrorProceso = True
End If
End If
Else
If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
ErrorProceso = True
End If
End If
If Not ErrorProceso = True Then
Dim rutaDestino As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & CveDocumentacionElectronica & "." & FileExtension
Dim rutaAdjuntoAnterior As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & AdjuntoDocumentacion
Try
If Not System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\") Then
System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\")
End If
If File.Exists(rutaAdjuntoAnterior) And AdjuntoDocumentacion.Trim.Length > 0 Then
File.Delete(rutaAdjuntoAnterior)
End If
If System.IO.File.Exists(rutaDestino) Then
System.IO.File.Delete(rutaDestino)
End If
System.IO.File.Move(fileItem.FileUrl, rutaDestino)
Catch ex As Exception
GuardaLog($"Error al gaurdar documento (moviendo archivo digital) --> Error{ ex.StackTrace}")
ErrorProceso = True
End Try
End If
If Not ErrorProceso Then
objEdoc.Commit()
Alert("Documento cargado correctamente")
Else
objEdoc.RollBack()
Alert("Error al cargar archivo", TipoMensaje.MsgError)
End If
objEdoc.Dispose()
CargaDocumentacion()
TxtFileDocumentacion.Text = ""
UPModalUploadDoc.Update()
Catch ex As Exception
OnError("Error al cargar archivo", ex)
End Try
Next
RegistraScript("$('#ModalUploadDoc').modal('hide')", "hidemodal3")
End Sub
End Class

353
Edoc/CatDocumentos.aspx Normal file
View File

@@ -0,0 +1,353 @@
<%@ Page Title="Catálogo de Documentos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatDocumentos.aspx.vb" Inherits="RH_CatDocumentos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
#C_GvDocumentos > tbody > tr:nth-child(2) > td:nth-child(1){
min-width:275px!important;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Catálogo de Documentos
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregar">
<ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="BtnAgregarDocumento" CssClass="" data-toggle="tooltip"
data-placement="left" title="Agregar Documento" Text="<i class='fa fa-plus'></i> Agregar Documento"></asp:LinkButton>
</li>
<%--<li>
<a data-toggle="modal" data-target="#DvTags" ><i class="fa fa-tags" ></i> Etiquetas</a>
</li>--%>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatosGral" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:UpdatePanel ID="UPBtnDocumentacionNext4" runat="server">
<ContentTemplate>
<div class="portlet smmallpadding light bordered" id="DIVDocumentacion" runat="server">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Documentación</span>
</div>
</div>
<div class="portlet-body form">
<asp:UpdatePanel ID="UPGvDocumentos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento,Periodicidad"
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Documento">
<ItemTemplate>
<asp:Literal ID="LtlDocumentacion" runat="server" Text='<%# Eval("Documentacion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="Formato">
<ItemTemplate>
<asp:Literal ID="LtlDocumentacionFormato" runat="server" Text='<%# Eval("DocumentacionFormato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Documentacion Tipo">
<ItemTemplate>
<asp:Literal ID="LtlDocumentacionTipo" runat="server" Text='<%# Eval("DocumentacionTipo") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Dias Limite">
<ItemTemplate>
<asp:Literal ID="LtlDocumentacionDiasLimite" runat="server" Text='<%# If(Eval("DiasLimite").ToString() = "" Or Eval("DiasLimite").ToString() = "0", "-", Eval("DiasLimite").ToString()) %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Periodicidad">
<ItemTemplate>
<asp:Literal ID="LtlPeriodicidad" runat="server" Text='<%# If(Eval("Periodicidad").ToString() = "" Or Eval("Periodicidad").ToString() = "0", "-", Eval("Periodicidad").ToString()) %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Aplica Limite">
<ItemTemplate>
<asp:Literal ID="LtlAplicaDiasLimite" runat="server" Text='<%# If(Eval("AplicaDiasLimite").ToString() = "1", "Si", "No") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Aplica Vencimiento">
<ItemTemplate>
<asp:Literal ID="LtlDocumentacionAplicaFechaVencimiento" runat="server" Text='<%# If(Eval("AplicaFechaVencimiento").ToString() = "1", "Si", "No") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Estatus">
<ItemTemplate>
<asp:Literal ID="LtlDocumentacionEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString() = "True", "Activo", "Inactivo") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Requerido">
<ItemTemplate>
<asp:Literal ID="LtlRequerido" runat="server" Text='<%# If(Eval("Requerido").ToString() = "True", "Requerido", "No requerido") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Orden" ItemStyle-Width="100">
<ItemTemplate>
<asp:Literal ID="LtlOrden" runat="server" Text='<%# Eval("Orden") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
<ItemTemplate>
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
<ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" ToolTip="Editar documento" CausesValidation="False" OnClick="Edit_ClickDocumentacion"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil' Tittle='Editar Documento' ></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
<ItemTemplate>
<asp:LinkButton ID="lnkEliminar" OnClick="Remove_ClickDocumentacion" runat="server" AlternateText="Editar" ToolTip="Eliminar" CausesValidation="False"
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash' title='Eliminar'></i>" Title="Eliminar Documento" data-toggle="confirmation" data-popout="true" data-original-title="¿Desea eliminar el documento?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<div class="row col-md-12 ">
<asp:LinkButton runat="server" Visible="false" CommandArgument="4" ID="BtnDocumentacionNext4" CssClass="btn btn-primary" data-toggle="tooltip" data-placement="left" ValidationGroup="GpoDocumentacion" Text="Guardar"></asp:LinkButton>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="BtnDocumentacionNext4" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>
<div id="divAgregarDocumentacion" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalDocumentacion" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<h4> <asp:Literal ID="LtlTituloModalDocumentacion" runat="server">Agregar Documento</asp:Literal></h4>
</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="Txtdocumentacion" CssClass="form-control" MaxLength="100" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvTxtdocumentacion" runat="server" ControlToValidate="Txtdocumentacion" ValidationGroup="GrpEscolaridad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Institución''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
<label for="<%= Txtdocumentacion.ClientID.ToString()%>">Documento:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlDocumentacionTipo" runat="server" Width="150" CssClass=" select2me form-control " DataValueField="CveDocumentacionTipo" DataTextField="DocumentacionTipo">
</asp:DropDownList>
<asp:RequiredFieldValidator InitialValue="-1" ID="rfvDdlDocumentacionTipo" ControlToValidate="DdlDocumentacionTipo" CssClass="help-block errorimput" ValidationGroup="GrpEscolaridad" runat="server" ErrorMessage="Seleccione una de las opciones"></asp:RequiredFieldValidator>
<label for="<%= DdlDocumentacionTipo.ClientID.ToString()%>">Tipo de documento:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtOrden" CssClass="form-control" onkeypress="validate(event)" MaxLength="3" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvTxtOrden" runat="server" ControlToValidate="TxtOrden" ValidationGroup="GrpEscolaridad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Institución''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender ID="filTxtOrden" runat="server" TargetControlID="TxtOrden" FilterType="Numbers" ValidChars="" />
<label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label>
</div>
<%-- <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDocumentacionFormato" CssClass="form-control" MaxLength="50" runat="server"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="filTxtDocumentacionFormato" runat="server" TargetControlID="TxtDocumentacionFormato" FilterType="Numbers, uppercaseLetters,LowercaseLetters,Custom" ValidChars="_" />
<label for="<%= TxtDocumentacionFormato.ClientID.ToString()%>">Nombre de Formato:</label>
</div>--%>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDiasLimite" CssClass="form-control" onkeypress="validate(event)" MaxLength="2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvTxtDiasLimite" runat="server" ControlToValidate="TxtDiasLimite" ValidationGroup="GrpEscolaridad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender ID="FilTxtDiasLimite" runat="server" TargetControlID="TxtDiasLimite" FilterType="Numbers" ValidChars="" />
<label for="<%= TxtOrden.ClientID.ToString()%>">Dias Limite:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPeriodicidad" CssClass="form-control" onkeypress="validate(event)" MaxLength="2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtPeriodicidad" runat="server" ControlToValidate="TxtPeriodicidad" ValidationGroup="GrpEscolaridad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender ID="FILTxtPeriodicidad" runat="server" TargetControlID="TxtPeriodicidad" FilterType="Numbers" ValidChars="" />
<label for="<%= TxtPeriodicidad.ClientID.ToString()%>">Periodicidad:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkAplicaDiasLimite" runat="server" Text ="Aplica Dias Limite" />
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkAplicaFechaVencimiento" runat="server" Text ="Aplica Fecha de Vencimiento" />
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="chkRequerido" runat="server" Text ="Requerido" />
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="chkEstatus" runat="server" Text ="Activo" />
</div>
<div class="form-group form-md-line-input input-iconright ">
<div class="row ">
<div class="col-md-12">
<asp:TextBox ID="TxtFileDocumentacion" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnAgregarDocumentoModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpEscolaridad" />
<button id="BtnCancelarEscolaridadModal4" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<div id="DvTags" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpEtiquetas" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<h4> <asp:Literal ID="Literal2" runat="server">Etiquetas</asp:Literal></h4>
</h4>
</div>
<div class="modal-body">
<table class="table table-hover">
<thead>
<tr>
<th>Etiqueta</th>
<th>Descripción</th>
</tr>
</thead>
<tbody>
<tr><td>{Nombres}</td><td>Nombre</td></tr>
<tr><td>{APaterno}</td><td>Apellido Paterno</td></tr>
<tr><td>{AMaterno}</td><td>Apellido Materno</td></tr>
<tr><td>{NombreCompleto}</td><td>Nombre Completo</td></tr>
<tr><td>{RFC}</td><td></td></tr>
<tr><td>{Estatura}</td> <td></td></tr>
<tr><td>{Peso}</td><td></td></tr>
<tr><td>{LugarNacimiento}</td><td>Lugar de nacimie</td></tr>
<tr><td>{Edad}</td><td></td></tr>
<tr><td>{NombreTelEmergencia}</td><td>Nombre y telefono al presentarse una emergencia</td></tr>
<tr><td>{TipoSangre}</td><td></td></tr>
<tr><td>{SubProyecto}</td><td>Se refiere a la sucursal o centro de costos</td></tr>
<tr><td>{EstadoCivil}</td><td></td></tr>
<tr><td>{Direccion}</td><td></td></tr>
<tr><td>{Vivienda}</td><td></td></tr>
<tr><td>{ViviendaDueno}</td><td></td></tr>
<tr><td>{CreditoInfonavit}</td><td></td></tr>
<tr><td>{RentaMensual}</td><td></td></tr>
<tr><td>{TransportePublico}</td><td></td></tr>
<tr><td>{TrabajadoAnteriormente}</td><td>La persona a trabajado enteriormente en la empresa</td></tr>
<tr><td>{TrabajadoAnteriormenteObservaciones}</td><td>Detalle de trabajo enterior en empresa</td></tr>
<tr><td>{ParientesEmpresa}</td><td>Se tienen parientes en la empresa</td></tr>
<tr><td>{AcusadoDelito}</td><td></td></tr>
<tr><td>{AcusadoDelitoObservaciones}</td><td></td></tr>
<tr><td>{Calle}</td><td></td></tr>
<tr><td>{Colonia}</td><td></td></tr>
<tr><td>{CP}</td><td></td></tr>
<tr><td>{Telefono}</td><td></td></tr>
<tr><td>{Celular}</td><td></td></tr>
<tr><td>{Correo}</td><td></td></tr>
<tr><td>{NumeroSS}</td><td></td></tr>
<tr><td>{Licencia}</td><td></td></tr>
<tr><td>{CartillaMilitar}</td><td></td></tr>
<tr><td>{CURP}</td><td></td></tr>
<tr><td>{CredencialElector}</td><td></td></tr>
<tr><td>{FechaIngreso}</td><td></td></tr>
<tr><td>{Puesto}</td><td></td></tr>
<tr><td>{FechaActual}</td><td></td></tr>
<tr><td>{FechaActualDF}</td><td></td></tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button id="btnCerrarEtiquetas" runat="server" type="button" class="btn btn-Default" data-dismiss="modal">Cerrar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
function validate(evt) {
var theEvent = evt || window.event;
var key = theEvent.keyCode || theEvent.which;
key = String.fromCharCode(key);
var regex = /[0-9]|\./;
if (!regex.test(key)) {
theEvent.returnValue = false;
if (theEvent.preventDefault) theEvent.preventDefault();
}
}
</script>
</asp:Content>

414
Edoc/CatDocumentos.aspx.vb Normal file
View File

@@ -0,0 +1,414 @@

Imports System.Data
Imports System.Linq
Imports Extensiones
Imports System.IO
Partial Class RH_CatDocumentos
Inherits ClsPaginas
Private Property DTDocumentacion As DataTable
Get
If ViewState("DTDocumentacion") Is Nothing Then
Return New DataTable
Else
Return DirectCast(ViewState("DTDocumentacion"), DataTable)
End If
End Get
Set(value As DataTable)
ViewState("DTDocumentacion") = value
End Set
End Property
Property Documentacion As String
Get
If ViewState("Documentacion") Is Nothing Then
Return "-1"
Else
Return ViewState("Documentacion").ToString
End If
End Get
Set(value As String)
ViewState("Documentacion") = value
End Set
End Property
Property CveDocumentacion As Integer
Get
If ViewState("CveDocumentacion") Is Nothing Then
Return -1
Else
Return DirectCast(ViewState("CveDocumentacion"), Integer)
End If
End Get
Set(value As Integer)
ViewState("CveDocumentacion") = value
End Set
End Property
Private Property DocumentacionTipo As String
Get
If ViewState("DocumentacionTipo") Is Nothing Then
Return ""
Else
Return ViewState("DocumentacionTipo").ToString
End If
End Get
Set(value As String)
End Set
End Property
Private Property CveDocumentacionTipo As Integer
Get
If ViewState("CveDocumentacionTipo") Is Nothing Then
Return -1
Else
Return DirectCast(ViewState("CveDocumentacionTipo"), Integer)
End If
End Get
Set(value As Integer)
ViewState("CveDocumentacionTipo") = value
End Set
End Property
Property ActualizarDocumentacion As Boolean
Get
If ViewState("ActualizarDocumentacion") Is Nothing Then
Return True
Else
Return DirectCast(ViewState("ActualizarDocumentacion"), Boolean)
End If
End Get
Set(value As Boolean)
ViewState("ActualizarDocumentacion") = value
End Set
End Property
Property Estatus As Boolean
Get
If ViewState("Estatus") Is Nothing Then
Return 0
Else
Return DirectCast(ViewState("Estatus"), Boolean)
End If
End Get
Set(value As Boolean)
ViewState("Estatus") = value
End Set
End Property
Property DocumentacionFormato As String
Get
If ViewState("DocumentacionFormato") Is Nothing Then
Return ""
Else
Return ViewState("DocumentacionFormato").ToString
End If
End Get
Set(value As String)
ViewState("DocumentacionFormato") = value
End Set
End Property
Property Requerido As Boolean
Get
If ViewState("Requerido") Is Nothing Then
Return True
Else
Return DirectCast(ViewState("Requerido"), Boolean)
End If
End Get
Set(value As Boolean)
ViewState("Requerido") = value
End Set
End Property
Property Orden As Integer
Get
If ViewState("Orden") Is Nothing Then
Return -1
Else
Return DirectCast(ViewState("Orden"), Integer)
End If
End Get
Set(value As Integer)
ViewState("Orden") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDocumentacion()
CargaComboDocumentacion()
End If
End Sub
#Region "D O C U M E N T A C I O N"
Protected Sub BtnAgregarDocumento_Click(sender As Object, e As EventArgs) Handles BtnAgregarDocumento.Click
ResetFormDocumentacion()
RegistraScript("$('#divAgregarDocumentacion').modal({ backdrop: 'static', keyboard: false});")
End Sub
Private Sub ResetFormDocumentacion()
Txtdocumentacion.Text = ""
TxtOrden.Text = ""
TxtPeriodicidad.Text = ""
TxtDiasLimite.Text = ""
BtnAgregarDocumentoModal.Text = "Agregar"
LtlTituloModalDocumentacion.Text = "Agregar documentación"
'TxtDocumentacionFormato.Text = ""
DdlDocumentacionTipo.SelectedIndex = 0
chkEstatus.Checked = True
chkRequerido.Checked = True
ActualizarDocumentacion = False
UpModalDocumentacion.Update()
End Sub
Private Sub CargaDocumentacion()
Dim objRH As New ClsEdocumentacion
If objRH.DocumentacionGet(-1, -1, -1, UsuarioActual.Empresa.CveEmpresa) Then
DTDocumentacion = objRH.DtResultados
GvDocumentos.DataSource = objRH.DtResultados
Else
DTDocumentacion = Nothing
GvDocumentos.DataSource = Nothing
End If
objRH.Dispose()
GvDocumentos.DataBind()
UPGvDocumentos.Update()
End Sub
Private Sub CargaComboDocumentacion()
Dim objDocumentacion As New ClsEdocumentacion
If objDocumentacion.DocumentacionTipoGet(UsuarioActual.CveEmpresa) Then
DdlDocumentacionTipo.DataSource = objDocumentacion.DtResultados
End If
objDocumentacion.Dispose()
DdlDocumentacionTipo.DataBind()
DdlDocumentacionTipo.Items.Insert(0, New ListItem("Seleccione un tipo", "-1"))
End Sub
Public Sub Edit_ClickDocumentacion(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
CveDocumentacion = GvRow.DataKey("CveDocumentacion")
Documentacion = GvRow.DataKey("Documentacion")
DocumentacionFormato = GvRow.DataKey("DocumentacionFormato")
CveDocumentacionTipo = GvRow.DataKey("CveDocumentacionTipo")
DocumentacionTipo = GvRow.DataKey("DocumentacionTipo")
Orden = GvRow.DataKey("Orden")
Estatus = GvRow.DataKey("Estatus")
Requerido = GvRow.DataKey("Requerido")
Txtdocumentacion.Text = Documentacion
TxtOrden.Text = Orden
TxtDiasLimite.Text = GvRow.DataKey("DiasLimite")
ChkAplicaDiasLimite.Checked = GvRow.DataKey("AplicaDiasLimite")
TxtPeriodicidad.Text = GvRow.DataKey("Periodicidad")
ChkAplicaFechaVencimiento.Checked = GvRow.DataKey("AplicaFechaVencimiento")
DdlDocumentacionTipo.SelectedValueExist(CveDocumentacionTipo)
chkEstatus.Checked = Estatus
chkRequerido.Checked = Requerido
LtlTituloModalDocumentacion.Text = "Actualizar Documento: " & Documentacion
BtnAgregarDocumentoModal.Text = "Actualizar"
UpModalDocumentacion.Update()
ActualizarDocumentacion = True
RegistraScript("$('#divAgregarDocumentacion').modal({ backdrop: 'static', keyboard: false});")
End Sub
Private Function GuardarArchivo(_CveDocumentacion As Integer) As String
Dim respuesta As String = ""
Dim FileExtension As String = "-1"
Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos
Dim Filename As String = ""
For Each fileItem As Archivo In Filesgral
Try
respuesta = fileItem.filenameO
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
Dim tempArray() As String
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
Dim rutaDestino As String = UsuarioActual.Empresa.Ruta & "Formatos\" & _CveDocumentacion & "_" & fileItem.filenameO
Dim docAnterior As String = UsuarioActual.Empresa.Ruta & "Formatos\" & _CveDocumentacion & "_" & DocumentacionFormato
If DocumentacionFormato.Trim.Length > 0 Then
If File.Exists(docAnterior) Then
File.Delete(docAnterior)
End If
End If
If Not Directory.Exists(UsuarioActual.Empresa.Ruta & "\Formatos") Then
Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "\Formatos")
End If
If System.IO.File.Exists(rutaDestino) Then
System.IO.File.Delete(rutaDestino)
End If
System.IO.File.Move(fileItem.FileUrl, rutaDestino)
Catch ex As Exception
OnError("Error al cargar archivo", ex)
End Try
TxtFileDocumentacion.Text = ""
UpModalDocumentacion.Update()
Next
Return respuesta
End Function
Public Sub Remove_ClickDocumentacion(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion")
Dim _documetacionFormato As String = GvRow.DataKey("DocumentacionFormato")
Dim objEdoc As New ClsEdocumentacion
If objEdoc.DocumentacionRemove(_CveDocumentacion, UsuarioActual.Empresa.CveEmpresa) Then
EliminarDocumentoDisco(_documetacionFormato)
Alert("Documento eliminado correctamente", TipoMensaje.MsgInformacion)
CargaDocumentacion()
End If
End Sub
Private Sub EliminarDocumentoDisco(documento As String)
Dim archivo As String = UsuarioActual.Empresa.Ruta & "Formatos\" & documento
If File.Exists(archivo) Then
File.Delete(archivo)
End If
End Sub
Protected Sub BtnAgregarDocumentoModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarDocumentoModal.Click
Dim objRH As New ClsEdocumentacion
Dim intCompleto As Integer = 0
Dim _estatus As Integer = 0
Dim _requerido As Integer = 0
Dim _formato As String = ""
If chkEstatus.Checked Then
_estatus = 1
End If
If chkRequerido.Checked Then
_requerido = 1
End If
If ActualizarDocumentacion Then
_formato = GuardarArchivo(CveDocumentacion)
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa,
TxtPeriodicidad.Text.ToEntero) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
Alert("Documento Actualizado correctamente.", TipoMensaje.MsgInformacion)
CargaDocumentacion()
End If
Else
If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa, TxtPeriodicidad.Text.ToEntero) Then
CveDocumentacion = objRH.DtResultados(0)(0).ToString.ToEntero
_formato = GuardarArchivo(CveDocumentacion)
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa,
TxtPeriodicidad.Text.ToEntero) Then
End If
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
Alert("Documento agregado correctamente.", TipoMensaje.MsgInformacion)
CargaDocumentacion()
End If
End If
ActualizarDocumentacion = False
End Sub
Protected Sub GvDocumentos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero
Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
Dim separado As Char() = {"."}
Dim array() As String = DocumetacionFormato.Split(separado)
Dim extencion As String = ""
If array.Length > 0 Then
extencion = array(array.Length - 1)
End If
If DocumetacionFormato.Trim.Length > 0 Then
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & _CveDocumentacion & "_" & DocumetacionFormato
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato
If File.Exists(linkDescargaArchivo) Then
ImgDownLoad.Visible = True
If extencion.Length > 0 Then
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar Formato'></i></a>", linkDescarga, DocumetacionFormato)
Else
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar Formato'></i></a>", linkDescarga, DocumetacionFormato)
End If
Else
ImgDownLoad.Visible = False
End If
Else
ImgDownLoad.Visible = False
End If
End If
End Sub
#End Region
End Class

View File

@@ -0,0 +1,113 @@
<%@ Page Title="Documentos Contratos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatDocumentosContratos.aspx.vb" Inherits="Edoc_CatDocumentosContratos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Documentos Contratos
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregar">
<%-- <ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar Tipo Contrato " Text="<i class='fa fa-plus'></i> Agregar Tipo Contrato"></asp:LinkButton>
</li>
</ContentTemplate>--%>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-8">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoContrato,CveDocumentacion" EmptyDataText="No se encontraron datos" Width="100%"
ToolTip="Listado de Genero" CssClass="table table-striped table-advance table-hover" GridLines="None" >
<Columns>
<asp:TemplateField HeaderText="Tipo Contrato">
<ItemTemplate>
<asp:Literal ID="LrlTipoContrato" runat="server" Text='<%# Eval("TipoContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Documento" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Literal ID="LtlDocumento" runat="server" Text='<%# Eval("Documentacion") %>' ></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Requerido" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox runat="server" ID="ChkRequerido" Checked= '<%# Eval("Requerido") %>' AutoPostBack="true" OnCheckedChanged="ChkRequerido_CheckedChanged" CssClass="md-checksd" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<div id="DivAgregarTiposContrato" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Tipo contrato</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtTipoSubcontrato" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtTipoSubcontrato" runat="server" ControlToValidate="TxtTipoSubcontrato" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Sub Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="GeneroTxt">Tipo Contrato:</label>
<i></i>
</div>
<br ID="saltoDeLinea" runat="server" />
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
<label for="ChkEstatus">Estatus:</label>&nbsp;
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
<i></i>
</div>
</div>
<br />
<div class="modal-footer">
<asp:Button ID="BtnAgregarTiposDModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
<button id="Button" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
function MuestraModal() {
$('#DivAgregarTiposContrato').modal('show')
}
</script>
</asp:Content>

View File

@@ -0,0 +1,52 @@
Option Strict On
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class Edoc_CatDocumentosContratos
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDatos()
End If
End Sub
Private Sub CargaDatos()
Dim ObjProv As New ClsCompProveedores
If ObjProv.GetTiposContratosDcumentos(UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjProv.DtResultados
Else
GvDatos.DataSource = Nothing
End If
ObjProv.Dispose()
GvDatos.DataBind()
End Sub
Protected Sub ChkRequerido_CheckedChanged(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, CheckBox).NamingContainer, GridViewRow)
Dim CveTipoContrato As Integer = GvRow.DataKey("CveTipoContrato").ToEntero
Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero
Dim ChkRequerido As CheckBox = GvRow.FCCheckBox("ChkRequerido")
Dim ObjProv As New ClsCompProveedores
ObjProv.UpdateTiposContratosDocumentos(CveTipoContrato, CveDocumentacion, ChkRequerido.Checked)
ObjProv.Dispose()
End Sub
End Class

122
Edoc/CatTipoContratos.aspx Normal file
View File

@@ -0,0 +1,122 @@
<%@ Page Title="Tipo De Contrato" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatTipoContratos.aspx.vb" Inherits="Edoc_CatTipoContrato" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Catálogo Tipos de Contrato
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregar">
<ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="BtnAgregarTipoContrato" data-toggle="tooltip" data-placement="left" title="Agregar Tipo Contrato " Text="<i class='fa fa-plus'></i> Agregar Tipo Contrato"></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-8">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoContrato,TipoContrato,Estatus" EmptyDataText="No se encontraron Tipos de contrato" Width="100%"
ToolTip="Listado de Genero" CssClass="table table-striped table-advance table-hover" GridLines="None" >
<Columns>
<asp:TemplateField HeaderText="Tipo Contrato">
<ItemTemplate>
<asp:Literal ID="LtlTipocontrato" runat="server" Text='<%# Eval("Tipocontrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Esatus" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlEsatusString" runat="server" Text='<%# Eval("EstatusString") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usuario" >
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton ID="LnkActualizar" runat="server" OnClick="LnkGvActualizar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ValidationGroup="GrpGV" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<div id="DivAgregarTiposContrato" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposContrato" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Tipo contrato</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtTipoContrato" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtTipoContrato" runat="server" ControlToValidate="TxtTipoContrato" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTipos"></asp:RequiredFieldValidator>
<label for="TxtTipoContrato">Tipo Contrato:</label>
<i></i>
</div>
<br ID="saltoDeLinea" runat="server" />
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
<label for="ChkEstatus">Estatus:</label>&nbsp;
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
<i></i>
</div>
</div>
<br />
<div class="modal-footer">
<asp:Button ID="BtnAgregarTiposDModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
<button id="Button" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
function MuestraModal() {
$('#DivAgregarTiposContrato').modal('show')
}
</script>
</asp:Content>

View File

@@ -0,0 +1,126 @@
Option Strict On
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class Edoc_CatTipoContrato
Inherits ClsPaginas
Protected Property CveTipoContrato As Integer
Get
If ViewState("CveTipoContrato") Is Nothing Then
Return -1
Else
Return ViewState("CveTipoContrato").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveTipoContrato") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDatos()
End If
End Sub
Private Sub CargaDatos()
Dim ObjProv As New ClsCompProveedores
If ObjProv.GetTiposContratos(-1, UsuarioActual.CveEmpresa, -1) Then
GvDatos.DataSource = ObjProv.DtResultados
Else
GvDatos.DataSource = Nothing
End If
ObjProv.Dispose()
GvDatos.DataBind()
UpDatos.Update()
End Sub
Protected Sub BtnAgregarMotivo_Click(sender As Object, e As EventArgs) Handles BtnAgregarTipoContrato.Click
CveTipoContrato = -1
TxtTipoContrato.Text = ""
ChkEstatus.Checked = True
UpModalTiposContrato.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposContrato"))
End Sub
Protected Sub LnkGvActualizar_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
CveTipoContrato = GvRow.DataKey("CveTipoContrato").ToEntero
TxtTipoContrato.Text = GvRow.DataKey("TipoContrato")
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus").ToString)
UpModalTiposContrato.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposContrato"))
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarTiposDModal.Click
Dim ObjProv As New ClsCompProveedores
Dim ErrorProceso As Boolean = False
If CveTipoContrato = -1 Then
If Not ObjProv.AddTiposContratos(TxtTipoContrato.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
ErrorProceso = True
End If
Else
If Not ObjProv.UpdateTiposContratos(CveTipoContrato, TxtTipoContrato.Text, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
ErrorProceso = True
End If
End If
If Not ErrorProceso Then
Alert($"Tipo Contrato { If(CveTipoContrato > 0, "Actualizado", "Agregado") } correctamente.")
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposContrato"))
CargaDatos()
End If
ObjProv.Dispose()
End Sub
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim ErrorProceso As Boolean = False
Dim CveTipoContratoEliminar As Integer = GvRow.DataKey("CveTipoContrato").ToEntero
Dim ObjProv As New ClsCompProveedores
If ObjProv.RemoveTiposContratos(CveTipoContratoEliminar, UsuarioActual.CveEmpresa) Then
Alert("Tipo Contrato eliminado correctamente")
Else
ErrorProceso = True
End If
If Not ErrorProceso Then
CargaDatos()
End If
ObjProv.Dispose()
End Sub
End Class

285
Edoc/Contratos.aspx Normal file
View File

@@ -0,0 +1,285 @@
<%@ Page Title="Contratos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Contratos.aspx.vb" Inherits="Proveedores_Contratos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Contratos
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregar">
<ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="BtnAgregarContratoModal" data-toggle="tooltip" data-placement="left" title="Agregar Contrato " Text="<i class='fa fa-plus'></i> Agregar Contrato"></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-12">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveContrato,Contrato,CveProveedor,NombreComercial,CveSubProyecto,CveTipoContrato,CveRepresentanteLegal,FechaInicio, FechaFin,Estatus" EmptyDataText="No se encontraron contratos" Width="100%"
ToolTip="Listado Contratos" CssClass="table table-striped table-advance table-hover" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Literal ID="LtlNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sub Proyecto">
<ItemTemplate>
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Contrato">
<ItemTemplate>
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("Contrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Contrato">
<ItemTemplate>
<asp:Literal ID="LtlTipocontrato" runat="server" Text='<%# Eval("Tipocontrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha I." ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFechaInicio" runat="server" Text='<%# Eval("FechaInicio", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha F." ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFechaFin" runat="server" Text='<%# Eval("FechaFin", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Representante">
<ItemTemplate>
<asp:Literal ID="LtlRepresentanteLegal" runat="server" Text='<%# Eval("RepresentanteLegal") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usuario">
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton ID="LnkActualizar" runat="server" OnClick="LnkGvActualizar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ValidationGroup="GrpGV" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<div id="DivAgregarContrato" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalContrato" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Contrato</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtContrato" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true" Width="500px" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtContrato" runat="server" ControlToValidate="TxtContrato" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardaContrato"></asp:RequiredFieldValidator>
<label for="TxtContrato" >Contrato:</label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright" style="width:500px!important">
<label for="DdlProveedores" >Proveedor:</label>
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="DdlTipoContrato">Tipo Contrato:</label> <br />
<asp:DropDownList ID="DdlTipoContrato" CssClass="form-control input-sm select2me" runat="server" DataTextField="TipoContrato" DataValueField="CveTipoContrato" Width="500px" AutoPostBack="True">
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlTipoContrato" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlTipoContrato" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardaContrato"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="DdlSubProyecto">Sub Proyecto:</label><br />
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="500px" AutoPostBack="True">
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyecto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardaContrato"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="DdlSubProyecto">Representante Legal:</label><br />
<asp:DropDownList ID="DDlRePresentanteLegal" CssClass="form-control input-sm select2me" runat="server" DataTextField="RepresentanteLegal" DataValueField="CveRepresentanteLegal" Width="500px" >
<asp:ListItem Selected="true" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDDlRePresentanteLegal" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DDlRePresentanteLegal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardaContrato"></asp:RequiredFieldValidator>
<i></i>
<asp:Button ID="BtnCatRepresentantes" OnClick="BtnCatRepresentantes_Click" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Clientes" Visible="true" style="vertical-align:bottom!important" />
</div>
<br />
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="col-md-2" for="<%= TxtFechaInicio.ClientID.ToString()%>">Fecha Inicio:</label>
<div class=" input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="margin-right: 10px!important">
<asp:TextBox ID="TxtFechaInicio" Style="margin-top: 10px" Width="100" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
<span class="input-group-btn " style="position: absolute; right: 41px; top: 0px;">
<asp:LinkButton ID="ImgCalendarTxtFechaInicio" class="btn default" Style="margin-top: 15px; margin-left: 6px" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:CalendarExtender runat="server" ID="CalendarTxtFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="ImgCalendarTxtFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<asp:RequiredFieldValidator ID="RfvtxtFechaInicio" runat="server" ControlToValidate="txtFechaInicio" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardaContrato" ></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="RfvctxtFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RfvtxtFechaInicio" Width="100px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="col-md-2" for="<%= TxtFechaFin.ClientID.ToString()%>">Fecha Fin:</label>
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
<asp:TextBox ID="TxtFechaFin" Width="100" Style="margin-top: 10px" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
<span class="input-group-btn " style="position: absolute; right: 41px; top: 0px;">
<asp:LinkButton ID="ImgCalendarTxtFechaFin" class="btn default" Style="margin-top: 15px; margin-left: 6px" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaFin" PopupButtonID="ImgCalendarTxtFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RfvTxtFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardaContrato" ></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CXRfvTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaFin" Width="100px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
<label for="ChkEstatus">Activo:</label>&nbsp;
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
<i></i>
</div>
</div>
<br />
<div class="modal-footer">
<asp:Button ID="BtnAgregarModalContrato" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardaContrato" />
<button id="Button" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<div id="DivAgregarContrato2" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalRepresentante" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="Literal1" runat="server">Representante Legal</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRepresentanteLegal" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtRepresentanteLegal" runat="server" ControlToValidate="TxtRepresentanteLegal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Representante''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardaRepresentante"></asp:RequiredFieldValidator>
<label for="TxtContrato">Representante:</label>
<i></i>
</div>
<br />
<asp:GridView ID="GvRepresentante" runat="server" AutoGenerateColumns="False" DataKeyNames="CveRepresentanteLegal" EmptyDataText="No se encontraron Representantes" Width="100%"
ToolTip="Listado de representantes" CssClass="table table-striped table-advance table-hover" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Representante" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Literal ID="LtlProveedor" runat="server" Text='<%# Eval("RepresentanteLegal") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvRepresentantesEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<br />
</div>
<div class="modal-footer">
<asp:Button ID="BtnAgregarRepresentante" OnClick="BtnAgregarRepresentante_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardaRepresentante" />
<button id="BtnCancelar" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
</script>
</asp:Content>

277
Edoc/Contratos.aspx.vb Normal file
View File

@@ -0,0 +1,277 @@
Option Strict On
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class Proveedores_Contratos
Inherits ClsPaginas
Protected Property CveContrato As Integer
Get
If ViewState("CveContrato") Is Nothing Then
Return -1
Else
Return ViewState("CveContrato").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveContrato") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDatos()
CargaCombos()
End If
End Sub
Private Sub CargaDatos()
Dim ObjProv As New ClsCompProveedores
If ObjProv.GetContrato(-1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjProv.DtResultados
Else
GvDatos.DataSource = Nothing
End If
ObjProv.Dispose()
GvDatos.DataBind()
UpDatos.Update()
End Sub
Private Sub CargaCombos()
'CargaProveedores
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Todos"
DdlProveedores.SelectedValue = "-1"
DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlTipoContrato.Items.Clear()
Dim ObjProveedor As New ClsCompProveedores
If ObjProveedor.GetTiposContratos(-1, UsuarioActual.CveEmpresa, 1) Then
DdlTipoContrato.DataSource = ObjProveedor.DtResultados
End If
ObjProveedor.Dispose()
DdlTipoContrato.DataBind()
DdlTipoContrato.Items.Insert(0, New ListItem("Seleccione", "-1"))
CargaRepresentantes()
End Sub
Protected Sub BtnAgregarContratoModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarContratoModal.Click
CveContrato = -1
ChkEstatus.Checked = True
TxtContrato.Text = ""
DdlProveedores.txtValue.Value = ""
DdlProveedores.txtText.Value = ""
DdlTipoContrato.SelectedValueExist("-1")
DdlSubProyecto.SelectedValueExist("-1")
DDlRePresentanteLegal.SelectedValueExist("-1")
TxtFechaInicio.Text = ""
TxtFechaFin.Text = ""
ChkEstatus.Checked = True
BtnAgregarModalContrato.Text = "Agregar"
UpModalContrato.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarContrato"))
End Sub
Protected Sub LnkGvActualizar_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
CveContrato = GvRow.DataKey("CveContrato").ToEntero
TxtContrato.Text = GvRow.DataKey("Contrato")
DdlProveedores.txtValue.Value = GvRow.DataKey("CveProveedor")
DdlProveedores.txtText.Value = GvRow.DataKey("NombreComercial")
DdlTipoContrato.SelectedValueExist(GvRow.DataKey("CveTipoContrato"))
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
DDlRePresentanteLegal.SelectedValueExist(GvRow.DataKey("CveRepresentanteLegal"))
TxtFechaInicio.Text = GvRow.DataKey("FechaInicio").ToString.ToDate().ToString("dd/MM/yyyy")
TxtFechaFin.Text = GvRow.DataKey("FechaFin").ToString.ToDate().ToString("dd/MM/yyyy")
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
BtnAgregarModalContrato.Text = "Actualizar"
UpModalContrato.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarContrato"))
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarModalContrato.Click
If DdlProveedores.txtValue.Value.ToEntero <= 0 Then
Alert("Debe seleccionar un proveedor", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim ObjProv As New ClsCompProveedores
ObjProv.IniciaTransacSQL()
Dim ErrorProceso As Boolean = False
If CveContrato = -1 Then
If Not ObjProv.AddContrato(TxtContrato.Text, DdlTipoContrato.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlProveedores.txtValue.Value.ToEntero, DDlRePresentanteLegal.SelectedValue.ToEntero,
TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
ErrorProceso = True
End If
Else
If Not ObjProv.UpdateContrato(CveContrato, TxtContrato.Text, DdlTipoContrato.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlProveedores.txtValue.Value.ToEntero, DDlRePresentanteLegal.SelectedValue.ToEntero,
TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
ErrorProceso = True
End If
End If
If Not ErrorProceso Then
ObjProv.Commit()
ObjProv.Dispose()
If CveContrato > 0 Then
Alert("Contrato Actualizado Correctamente.")
Else
Alert("Contrato Agregado Correctamente.")
End If
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarContrato"))
CargaDatos()
Else
ObjProv.RollBack()
ObjProv.Dispose()
End If
End Sub
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim ErrorProceso As Boolean = False
Dim CveTipoContratoEliminar As Integer = GvRow.DataKey("CveTipoContrato").ToEntero
Dim ObjProv As New ClsCompProveedores
If ObjProv.RemoveContrato(CveTipoContratoEliminar, UsuarioActual.CveEmpresa) Then
Alert("Tipo Contrato eliminado correctamente")
Else
ErrorProceso = True
End If
ObjProv.Dispose()
If Not ErrorProceso Then
CargaDatos()
End If
End Sub
Protected Sub BtnCatRepresentantes_Click(sender As Object, e As EventArgs)
TxtRepresentanteLegal.Text = ""
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAgregarContrato2"), "frm2")
UpModalRepresentante.Update()
End Sub
Protected Sub BtnAgregarRepresentante_Click(sender As Object, e As EventArgs)
Dim ObjProv As New ClsCompProveedores
If ObjProv.AddRePresentanteLegal(TxtRepresentanteLegal.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Alert("Se agrego representante correctamente.")
TxtRepresentanteLegal.Text = ""
End If
ObjProv.Dispose()
CargaRepresentantes()
End Sub
Private Sub CargaRepresentantes()
Dim ObjProv As New ClsCompProveedores
If ObjProv.GetRePresentanteLegal(-1, UsuarioActual.CveEmpresa) Then
GvRepresentante.DataSource = ObjProv.DtResultados
DDlRePresentanteLegal.DataSource = ObjProv.DtResultados
Else
GvRepresentante.DataSource = Nothing
End If
ObjProv.Dispose()
DDlRePresentanteLegal.Items.Clear()
DDlRePresentanteLegal.DataBind()
DDlRePresentanteLegal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
GvRepresentante.DataBind()
UpModalRepresentante.Update()
UpModalContrato.Update()
End Sub
Protected Sub LnkGvRepresentantesEliminar_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim CveRepresentanteLegal As Integer = GvRow.DataKey("CveRepresentanteLegal").ToEntero
Dim ObjProv As New ClsCompProveedores
If ObjProv.RemoveRePresentanteLegal(CveRepresentanteLegal, UsuarioActual.CveEmpresa) Then
Alert("Representante eliminado correctamente.")
End If
ObjProv.Dispose()
CargaRepresentantes()
End Sub
End Class

View File

@@ -1099,7 +1099,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!PS.Value &amp; " " &amp; Fields!Obs.Value</Value> <Value>=Fields!PS.Value &amp; System.Environment.NewLine &amp; IIF(Fields!Obs.Value &lt;&gt; "","Observaciones: ","") &amp; Fields!Obs.Value</Value>
<Style> <Style>
<FontFamily>calibri</FontFamily> <FontFamily>calibri</FontFamily>
<FontSize>8.75pt</FontSize> <FontSize>8.75pt</FontSize>
@@ -3150,7 +3150,7 @@
</Style> </Style>
</Textbox> </Textbox>
</ReportItems> </ReportItems>
<Height>20.5093cm</Height> <Height>20.50931cm</Height>
<Style /> <Style />
</Body> </Body>
<Width>21.16666cm</Width> <Width>21.16666cm</Width>

View File

@@ -46,6 +46,46 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCornerCell> </TablixCornerCell>
<TablixCornerCell>
<CellContents>
<Textbox Name="Textbox6">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Tipo Almacén</Value>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox6</rd:DefaultName>
<Style>
<Border>
<Color>DimGray</Color>
<Style>Solid</Style>
</Border>
<RightBorder>
<Style>None</Style>
</RightBorder>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>1pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
</TablixCornerRow> </TablixCornerRow>
</TablixCornerRows> </TablixCornerRows>
</TablixCorner> </TablixCorner>
@@ -57,9 +97,6 @@
<TablixColumn> <TablixColumn>
<Width>3.17009cm</Width> <Width>3.17009cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn>
<Width>6.13624cm</Width>
</TablixColumn>
</TablixColumns> </TablixColumns>
<TablixRows> <TablixRows>
<TablixRow> <TablixRow>
@@ -135,41 +172,6 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="TipoAlmacen">
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!TipoAlmacen.Value</Value>
<Style>
<FontSize>7.5pt</FontSize>
<Format>#,0.00;(#,0.00)</Format>
<Color>=IIF(Fields!Almacen.Value = "Total","White","Black")</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>TipoAlmacen</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!Almacen.Value="Total","#67809F","White")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>1pt</PaddingTop>
<PaddingBottom>1pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
</TablixRows> </TablixRows>
@@ -256,46 +258,6 @@
</CellContents> </CellContents>
</TablixHeader> </TablixHeader>
</TablixMember> </TablixMember>
<TablixMember>
<TablixHeader>
<Size>0.3751cm</Size>
<CellContents>
<Textbox Name="Textbox42">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Tipo Almacén</Value>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox42</rd:DefaultName>
<Style>
<Border>
<Color>DimGray</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>1pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
</TablixMembers> </TablixMembers>
</TablixColumnHierarchy> </TablixColumnHierarchy>
<TablixRowHierarchy> <TablixRowHierarchy>
@@ -344,6 +306,44 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixHeader> </TablixHeader>
<TablixMembers>
<TablixMember>
<TablixHeader>
<Size>6.13624cm</Size>
<CellContents>
<Textbox Name="TipoAlmacen1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!TipoAlmacen.Value</Value>
<Style>
<FontSize>7.5pt</FontSize>
<Color>=IIF(Fields!Almacen.Value = "Total","White","Black")</Color>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>TipoAlmacen1</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!Almacen.Value="Total","#67809F","White")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>1pt</PaddingTop>
<PaddingBottom>1pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
</TablixMembers>
</TablixMember> </TablixMember>
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
@@ -371,11 +371,13 @@
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Filtros</rd:DefaultName> <rd:DefaultName>Filtros</rd:DefaultName>
<Top>0.17638cm</Top> <Top>0.20788cm</Top>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>18.70841cm</Width> <Width>18.70841cm</Width>
<ZIndex>1</ZIndex> <ZIndex>1</ZIndex>
@@ -676,6 +678,7 @@
</Style> </Style>
</Textbox> </Textbox>
<Line Name="Line1"> <Line Name="Line1">
<Top>0cm</Top>
<Height>0cm</Height> <Height>0cm</Height>
<Width>19.26933cm</Width> <Width>19.26933cm</Width>
<ZIndex>5</ZIndex> <ZIndex>5</ZIndex>

View File

@@ -372,7 +372,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=IIf(Fields!PS.Value = "", "Folio: " &amp; Fields!FolioSalida.Value, Fields!Cantidad.Value)</Value> <Value>=IIf(Fields!PS.Value = "", IIf(Fields!FolioSalida.Value &gt; 0,"Folio: " &amp; Fields!FolioSalida.Value,"Total General"), Fields!Cantidad.Value)</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight> <FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight>
@@ -478,7 +478,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=IIf(Fields!PS.Value = "", "Almacén Origen: " &amp; Fields!Almacen.Value &amp; " Almacén Destino: " &amp; Fields!AlmacenDestino.Value &amp; " Responsable: " &amp; Fields!Recibio.Value, Fields!PS.Value)</Value> <Value>=IIf(Fields!PS.Value = "", IIf(Fields!FolioSalida.Value &gt; 0,"Almacén Origen: " &amp; Fields!Almacen.Value &amp; " Almacén Destino: " &amp; Fields!AlmacenDestino.Value &amp; " Responsable: " &amp; Fields!Recibio.Value,""), Fields!PS.Value)</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight> <FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight>
@@ -501,7 +501,6 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>

View File

@@ -490,6 +490,215 @@
</TablixCell> </TablixCell>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow>
<Height>0.44125cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox20">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Sum(Fields!Cantidad.Value)</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Format>#,0;(#,0)</Format>
<Language>es-MX</Language>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox20</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox21">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Total Productos</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox23">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox23</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox37">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox37</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox41">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox41</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox42">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00;(#,0.00)</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox42</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows> </TablixRows>
</TablixBody> </TablixBody>
<TablixColumnHierarchy> <TablixColumnHierarchy>
@@ -509,13 +718,19 @@
</TablixMember> </TablixMember>
<TablixMember> <TablixMember>
<Group Name="Details" /> <Group Name="Details" />
<TablixMembers>
<TablixMember />
</TablixMembers>
</TablixMember>
<TablixMember>
<KeepWithGroup>Before</KeepWithGroup>
</TablixMember> </TablixMember>
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<DataSetName>DsInventarios</DataSetName> <DataSetName>DsInventarios</DataSetName>
<Top>0.07056cm</Top> <Top>0.07056cm</Top>
<Left>0.00711cm</Left> <Left>0.00711cm</Left>
<Height>0.73434cm</Height> <Height>1.17559cm</Height>
<Width>19.56807cm</Width> <Width>19.56807cm</Width>
<Style> <Style>
<Border> <Border>
@@ -524,10 +739,10 @@
</Style> </Style>
</Tablix> </Tablix>
</ReportItems> </ReportItems>
<Height>0.42708in</Height> <Height>0.68252in</Height>
<Style /> <Style />
</Body> </Body>
<Width>7.70923in</Width> <Width>7.72259in</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>5.08094cm</Height> <Height>5.08094cm</Height>

View File

@@ -0,0 +1,129 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CATIEPSxEntidadFed.aspx.cs" Inherits="General_CATIEPSxEntidadFed" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.GVIEPSxEntidadFed tr td:nth-child(n+2) {
text-align: right;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
IEPS Por Entidad Federativa
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkPDF" OnClick="LnkPDF_Click" runat="server"><i class="fa fa-ad-pdf "></i> PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-ad-excel "></i> Excel</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 51px;">
<div class="tools">
<asp:Button ID="BtnIEPSFiltrar" OnClick="BtnIEPSFiltrar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1" style="padding-top: 13px;width: 5%;">Agrupador </label>
<div class="col-md-1" style="">
<asp:DropDownList ID="DdlAgrupador" runat="server"
CssClass="form-control select2me" Width="100%">
<asp:ListItem Value="1" Text="IEPS - Estado" Selected="True" ></asp:ListItem>
<asp:ListItem Value="2" Text="Estado - IEPS"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1" style="padding-top: 13px;width: 4.5%;">IEPS </label>
<div class="col-md-1" style="">
<asp:DropDownList ID="DdlIeps" runat="server"
CssClass="form-control select2me" Width="100%">
<asp:ListItem Value="-1" Text="Todos"></asp:ListItem>
<asp:ListItem Value=".06" Text="6.00%"></asp:ListItem>
<asp:ListItem Value=".07" Text="7.00%"></asp:ListItem>
<asp:ListItem Value=".09" Text="9.00%"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1" style="padding-top: 13px;width: 5%;">Estado</label>
<div class="col-md-2" style="">
<asp:DropDownList ID="DdlEstado" runat="server" DataTextField="ClaveSATEstadoNombreEstado" DataValueField="CveEstado" CssClass="form-control select2me" Width="100%">
</asp:DropDownList>
</div>
<div class="col-md-1 truncate" style="padding-top: 13px;">
Fecha Inicio
</div>
<div class="col-md-1" style="padding-top: 9px;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
<asp:TextBox ID="TxtIEPSfechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkIEPSfechaInicio" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEIEPSfechaInicio" runat="server" TargetControlID="TxtIEPSfechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEIEPSfechaInicio" TargetControlID="TxtIEPSfechaInicio" PopupButtonID="LnkIEPSfechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
</div>
<div class="col-md-1 truncate" style="padding-top: 13px;">
Fecha Fin
</div>
<div class="col-md-1" style="padding-top: 9px;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
<asp:TextBox ID="TxtIEPSfechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkIEPSfechaFin" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEIEPSfechaFin" runat="server" TargetControlID="TxtIEPSfechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEIEPSfechaFin" TargetControlID="TxtIEPSfechaFin" PopupButtonID="LnkIEPSfechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none">
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="upDatosIEPS" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVIEPSxEntidadFed" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD GVIEPSxEntidadFed" AutoGenerateColumns="False" Width="100%"
DataKeyNames="CveEstado,NombreEstado,PorcentajeIEPS,SubTotal,IEPS" OnRowDataBound="GVIEPSxEntidadFed_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="Nombre Estado">
<ItemTemplate>
<asp:Label ID="lblGrupo" runat="server" Text='<%# Eval("Grupo")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Porcentaje IEPS">
<ItemTemplate>
<asp:Label ID="lblporcentajeIEPS" runat="server" Text='<%# Eval("PorcentajeIEPS","{0:P2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sub Total">
<ItemTemplate>
<asp:Label ID="lblsubTotal" runat="server" Text='<%# Eval("SubTotal","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="IEPS">
<ItemTemplate>
<asp:Label ID="lbliEPS" runat="server" Text='<%# Eval("IEPS","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
using Microsoft.Reporting.WebForms;
using System.Data;
public partial class General_CATIEPSxEntidadFed : ClsPaginas
{
#region Propiedades
private int RAgrupador
{
get { return (ViewState["RAgrupador"] == null) ? 1 : Convert.ToInt32(ViewState["RAgrupador"]); }
set { ViewState["RAgrupador"] = value; }
}
private int RcveEstado
{
get { return (ViewState["RcveEstado"] == null) ? 0 : Convert.ToInt32(ViewState["RcveEstado"]); }
set { ViewState["RcveEstado"] = value; }
}
private decimal RtasaIEPS
{
get { return (ViewState["RtasaIEPS"] == null) ? 0 : Convert.ToDecimal(ViewState["RtasaIEPS"]); }
set { ViewState["RtasaIEPS"] = value; }
}
private string RfechaInicio
{
get { return (ViewState["RfechaInicio"] == null) ? "-1" : (ViewState["RfechaInicio"]).ToString(); }
set { ViewState["RfechaInicio"] = value; }
}
private string RfechaFin
{
get { return (ViewState["RfechaFin"] == null) ? "-1" : (ViewState["RfechaFin"]).ToString(); }
set { ViewState["RfechaFin"] = value; }
}
private DataTable DtIEPS{
get { return (ViewState["DtIEPS"] == null) ? null : (DataTable)(ViewState["DtIEPS"]); }
set { ViewState["DtIEPS"] = value; }
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DdlEstado.DataSource = get_GlobalDTEstado("Mex");
DdlEstado.DataBind();
DdlEstado.Items.Insert(0, new ListItem("Seleccione", "-1"));
RcveEstado = Request["cveEstado"] == null ? -1 : Request["cveEstado"].ToString().ToEntero();
RtasaIEPS = Request["tasaIEPS"] == null ? -1 : Request["tasaIEPS"].ToString().ToDecimal();
RfechaInicio = Request["fechaInicio"] == null ? string.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1)) : Request["fechaInicio"].ToString();
RfechaFin = Request["fechaFin"] == null ? string.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth()) : Request["fechaFin"].ToString();
DdlEstado.SelectedValueExist(RcveEstado.ToString());
DdlIeps.SelectedValueExist(RtasaIEPS.ToString());
TxtIEPSfechaInicio.Text = $"{RfechaInicio:dd/MM/yyyy}";
TxtIEPSfechaFin.Text = $"{RfechaFin:dd/MM/yyyy}";
RfechaInicio = RfechaInicio.ToDate().ToString("yyyy/MM/dd");
RfechaFin = RfechaFin.ToDate().ToString("yyyy/MM/dd");
CargaIEPSxEntidadFed();
}
}
protected void CargaIEPSxEntidadFed()
{
ClsGenerales ObjIEPS = new ClsGenerales();
ObjIEPS.IEPSxEntidadFed(RcveEstado, RtasaIEPS, RfechaInicio, RfechaFin, 119, RAgrupador);
GVIEPSxEntidadFed.DataSource = ObjIEPS.DtResultados;
DtIEPS = ObjIEPS.DtResultados;
ObjIEPS.Dispose();
GVIEPSxEntidadFed.DataBind();
upDatosIEPS.Update();
}
protected void GVIEPSxEntidadFed_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
int cveGrupo = e.Row.DBCampo("CveGrupo").ToEntero();
if (cveGrupo == 1)
{
e.Row.CssClass = "Titulos";
}
if (cveGrupo == 2)
{
e.Row.CssClass = "Totales";
}
}
}
protected void BtnIEPSFiltrar_Click(object sender, EventArgs e)
{
RAgrupador = DdlAgrupador.SelectedValue.ToEntero();
RcveEstado = DdlEstado.SelectedValue.ToEntero();
RtasaIEPS = DdlIeps.SelectedValue.ToDecimal();
RfechaInicio = TxtIEPSfechaInicio.Text.ToDate().ToString("yyyy/MM/dd");
RfechaFin = TxtIEPSfechaFin.Text.ToDate().ToString("yyyy/MM/dd");
CargaIEPSxEntidadFed();
}
protected void LnkExcel_Click(object sender, EventArgs e)
{
GVIEPSxEntidadFed.ExportToExcelx("IEPS porEntidad Federativa");
}
protected void LnkPDF_Click(object sender, EventArgs e)
{
List<ReportParameter> paramList = new List<ReportParameter>();
paramList.Add(new ReportParameter("Logo", String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)));
paramList.Add(new ReportParameter("FechaInicio", TxtIEPSfechaInicio.Text));
paramList.Add(new ReportParameter("FechaFin", TxtIEPSfechaFin.Text));
paramList.Add(new ReportParameter("Agrupador", DdlAgrupador.SelectedValue));
paramList.Add(new ReportParameter("Empresa", UsuarioActual.Empresa.Empresa));
paramList.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
paramList.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString("d/M/yyyy")));
ImprimirPDF("Empresas/Grales/Formatos/CatIepsEntidadFed.rdlc", DtIEPS, paramList,"IEPS por entidades federativa",RDSName:"DsInventarios");
}
}

View File

@@ -100,7 +100,8 @@ Catalogo Documentacion Tipo
<asp:DropDownList ID="DdlEdocmodulo" CssClass="form-control select2me" runat="server" Width="200px"> <asp:DropDownList ID="DdlEdocmodulo" CssClass="form-control select2me" runat="server" Width="200px">
<asp:ListItem Selected="True" Value="-1">Seleccione uno</asp:ListItem> <asp:ListItem Selected="True" Value="-1">Seleccione uno</asp:ListItem>
<asp:ListItem Value="1">Recursos Humanos</asp:ListItem> <asp:ListItem Value="1">Recursos Humanos</asp:ListItem>
<asp:ListItem Value="2">Clientes</asp:ListItem> <asp:ListItem Value="2">Clientes</asp:ListItem>
<asp:ListItem Value="3">Proveedor</asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvEdocmodulo" InitialValue="-1" runat="server" ControlToValidate="DdlEdocmodulo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modulo''</b> es necesario, por favor ingréselo." ValidationGroup="VGMEdoc"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvEdocmodulo" InitialValue="-1" runat="server" ControlToValidate="DdlEdocmodulo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modulo''</b> es necesario, por favor ingréselo." ValidationGroup="VGMEdoc"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoEdocmodulo" runat="server" HighlightCssClass="vco" TargetControlID="RfvEdocmodulo"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VcoEdocmodulo" runat="server" HighlightCssClass="vco" TargetControlID="RfvEdocmodulo"></ajax:ValidatorCalloutExtender>

View File

@@ -807,6 +807,8 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
End Sub End Sub
Private Sub CargaCompra(pCveCompra As Integer, pCveProveedor As Integer) Private Sub CargaCompra(pCveCompra As Integer, pCveProveedor As Integer)
CargaAlmacenes(-1)
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
Dim ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
@@ -838,16 +840,34 @@ Partial Class Inventarios_RecepcionAlmacen
CargaAlmacenes(-1, "21,2") CargaAlmacenes(-1, "21,2")
End If End If
RecibidaCompleta = False RecibidaCompleta = False
Dim CargaSoloUsados As Boolean = False
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim DtRecepcion As DataTable = Nothing
Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero()
Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero()
'SI LA COMPRA TIENE PRODUCTOS Y USADOS SOLO MOSTRAR LOS PRODUCTOS
If NumProductos > 0 AndAlso NumUsados > 0 Then
DtRecepcion = ObjInventario.DtResultados.FiltraParametros("EsUsado = False")
'SI LA COMPRA TIENE PUROS USADOS, MOSTRAR LOS USADOS Y CARGAR LOS ALMACENES
ElseIf NumProductos = 0 AndAlso NumUsados > 0 Then
CargaSoloUsados = True
DtRecepcion = ObjInventario.DtResultados.Copy()
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22")
Else
DtRecepcion = ObjInventario.DtResultados.Copy()
End If
DtDatosDetalle = Nothing DtDatosDetalle = Nothing
CreaDtDetalle() CreaDtDetalle()
DtDatosLoteDetalle = Nothing DtDatosLoteDetalle = Nothing
CreaDtLoteDetalle() CreaDtLoteDetalle()
CreaDTInv(ObjInventario.DtResultados) CreaDTInv(DtRecepcion)
BtnGuardar.Visible = True BtnGuardar.Visible = True
'cuando están todos los detalles de la compra, nos indica que se va a recibir la totalidad de la compra 'cuando están todos los detalles de la compra, nos indica que se va a recibir la totalidad de la compra
If ObjInventario.DtResultados.Rows.Count = ObjInventario.DtResultados.Rows(0)("NumDetalles").ToString.ToEntero Then If DtRecepcion.Rows.Count = DtRecepcion.Rows(0)("NumDetalles").ToString.ToEntero Then
RecibidaCompleta = True RecibidaCompleta = True
End If End If
@@ -869,8 +889,8 @@ Partial Class Inventarios_RecepcionAlmacen
LtAdvertencia.Text = "La mercancía tendra salida inmediata por ser entrega directa al cliente" LtAdvertencia.Text = "La mercancía tendra salida inmediata por ser entrega directa al cliente"
DivAdvertencia.Visible = True DivAdvertencia.Visible = True
EntregaDirecta = True EntregaDirecta = True
CveCliente = ObjInventario.DtResultados.Rows(0)("CveCliente").ToString.ToEntero CveCliente = DtRecepcion.Rows(0)("CveCliente").ToString.ToEntero
CveVendedor = ObjInventario.DtResultados.Rows(0)("CveVendedor").ToString.ToEntero CveVendedor = DtRecepcion.Rows(0)("CveVendedor").ToString.ToEntero
If DtInv.COUNT("EntregaDirecta") <> DtInv.Rows.Count Then If DtInv.COUNT("EntregaDirecta") <> DtInv.Rows.Count Then
@@ -884,7 +904,7 @@ Partial Class Inventarios_RecepcionAlmacen
Alert("No hay productos pendientes de surtir de esta compra. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Alert("No hay productos pendientes de surtir de esta compra. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Else Else
If ObjInventario.DtResultados.Rows(0)("CveVendedor").ToString.ToEntero > 0 And ObjInventario.DtResultados.Rows(0)("CveCliente").ToString.ToEntero > 0 Then If DtRecepcion.Rows(0)("CveVendedor").ToString.ToEntero > 0 And DtRecepcion.Rows(0)("CveCliente").ToString.ToEntero > 0 Then
If DtInv.SUM("EntregaDirecta") > 0 Then If DtInv.SUM("EntregaDirecta") > 0 Then
''ENTREGA DIRECTA ''ENTREGA DIRECTA
'LtAdvertencia.Text = "La mercancía tendra salida inmediata por ser entrega directa al cliente" 'LtAdvertencia.Text = "La mercancía tendra salida inmediata por ser entrega directa al cliente"
@@ -892,9 +912,9 @@ Partial Class Inventarios_RecepcionAlmacen
'EntregaDirecta = True 'EntregaDirecta = True
Else Else
'APARTADO 'APARTADO
'If UsuarioActual.CveUsuario.Contiene(100) Or (ObjInventario.DtResultados.Rows(0)("CveUsuarioOC").ToString.ToEntero = 1559 And ObjInventario.DtResultados.Rows(0)("FechaIngOC").ToString.ToDateTime > "2017-04-24 12:00".ToDateTime) Then 'If UsuarioActual.CveUsuario.Contiene(100) Or (DtRecepcion .Rows(0)("CveUsuarioOC").ToString.ToEntero = 1559 And DtRecepcion .Rows(0)("FechaIngOC").ToString.ToDateTime > "2017-04-24 12:00".ToDateTime) Then
If UsuarioActual.Empresa.Funcionalidad(148) = "1" Then If UsuarioActual.Empresa.Funcionalidad(148) = "1" Then
CveAlmacenApartado = ObjInventario.DtResultados.Rows(0)("CveAlmacenApartado").ToString.ToEntero CveAlmacenApartado = DtRecepcion.Rows(0)("CveAlmacenApartado").ToString.ToEntero
DivAdvertencia.Visible = True DivAdvertencia.Visible = True
Apartado = True Apartado = True
@@ -903,7 +923,11 @@ Partial Class Inventarios_RecepcionAlmacen
LtAdvertencia.Text = "No se puede recibir la mercancía por ser de apartados y no contar con un almacen de apartado." LtAdvertencia.Text = "No se puede recibir la mercancía por ser de apartados y no contar con un almacen de apartado."
Else Else
LtAdvertencia.Text = "La mercancía sera traspasada ha apartados" LtAdvertencia.Text = "La mercancía sera traspasada ha apartados"
CargaAlmacenes(ObjInventario.DtResultados.Rows(0)("CveSubProyecto").ToString.ToEntero) If CargaSoloUsados Then
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22")
Else
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero)
End If
End If End If
End If End If
'End If 'End If
@@ -912,19 +936,19 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
Dim CantidadFaltante As Double = ObjInventario.DtResultados.SUM("CantidadC", "CantidadF > 0") Dim CantidadFaltante As Double = DtRecepcion.SUM("CantidadC", "CantidadF > 0")
If UsuarioActual.Empresa.UsaAC AndAlso CantidadFaltante > 0 Then If UsuarioActual.Empresa.UsaAC AndAlso CantidadFaltante > 0 Then
PnlAC.Visible = True PnlAC.Visible = True
CargaAC() CargaAC()
LbTotalPorDevengar.Text = ObjInventario.DtResultados.SUM("Total", "CantidadF > 0").FormatoNumero LbTotalPorDevengar.Text = DtRecepcion.SUM("Total", "CantidadF > 0").FormatoNumero
End If End If
'Existencias 'Existencias
If TipoMovimiento = 2 Then If TipoMovimiento = 2 Then
If ObjInventario.ComprasDevolucionExistenciasGet(CveCompraSurtir) Then If ObjInventario.ComprasDevolucionExistenciasGet(CveCompraSurtir) Then
DtExistencias = ObjInventario.DtResultados DtExistencias = DtRecepcion
Else Else
Alert("No se pudieron cargar las existencias del movimiento de entrada, por lo cual no se podra hacer la devolución.", TipoMensaje.MsgError) Alert("No se pudieron cargar las existencias del movimiento de entrada, por lo cual no se podra hacer la devolución.", TipoMensaje.MsgError)
BtnGuardar.Enabled = False BtnGuardar.Enabled = False

View File

@@ -161,6 +161,11 @@
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink> <asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Almacén">
<ItemTemplate>
<asp:Label ID="LtlAlmacen" runat="server" Text='<%# Eval("TipoAlmacen")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Existencia" ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderText="Existencia" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LtlExist" runat="server" Text='<%# Eval("Existencia", "{0:#,###.##}")%>'></asp:Label> <asp:Label ID="LtlExist" runat="server" Text='<%# Eval("Existencia", "{0:#,###.##}")%>'></asp:Label>
@@ -171,11 +176,6 @@
<asp:Label ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:#,##0.00}")%>'></asp:Label> <asp:Label ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:#,##0.00}")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Almacén">
<ItemTemplate>
<asp:Label ID="LtlAlmacen" runat="server" Text='<%# Eval("TipoAlmacen")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>

View File

@@ -85,10 +85,10 @@ Partial Class Inventarios_RepAlmacen
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim StrFiltro As New StringBuilder Dim StrFiltro As New StringBuilder
If TxtFechaI.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Inicio </b>: {0}", TxtFechaI.Text.ToDate.ToShortDateString) If TxtFechaI.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Inicio </b>: {0}", TxtFechaI.Text.ToDate.ToShortDateString) Else StrFiltro.AppendFormat("&emsp;<b>Fecha Inicio </b>: Sin Considerar")
If TxtFechaF.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Fin </b>: {0}", TxtFechaF.Text.ToDate.ToShortDateString) If TxtFechaF.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Fin </b>: {0}", TxtFechaF.Text.ToDate.ToShortDateString) Else StrFiltro.AppendFormat("&emsp;<b>Fecha Fin </b>: Sin Considerar")
If DdlTipoAlmacen.GetSelectedText <> "" Then StrFiltro.AppendFormat("&emsp;<b>Tipo Almacen</b>: {0}", DdlTipoAlmacen.GetSelectedText) If DdlTipoAlmacen.GetSelectedText <> "" Then StrFiltro.AppendFormat("&emsp;<b>Tipo Almacen</b>: {0}", DdlTipoAlmacen.GetSelectedText) Else StrFiltro.AppendFormat("&emsp;<b>Tipo Almacen</b>: Todos")
If DdlModalidadFiltro.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Modalidad</b>: {0}", DdlModalidadFiltro.SelectedItem) If DdlModalidadFiltro.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Modalidad</b>: {0}", DdlModalidadFiltro.SelectedItem) Else StrFiltro.AppendFormat("&emsp;<b>Modalidad</b>: Todas")
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))

View File

@@ -100,13 +100,16 @@ Partial Class RepTraspasoAlmacen
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
'Cuando es titulo 'Cuando es titulo
If e.Row.DBCampo("PS").ToString.Trim = "" Then If e.Row.DBCampo("PS").ToString.Trim = "" And e.Row.DBCampo("FechaMovto") <> "" Then
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
e.Row.Cells(0).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida")) e.Row.Cells(0).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida"))
e.Row.Cells(1).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString) e.Row.Cells(1).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString)
e.Row.Cells(3).Text = String.Format("Almacen Origen: {0}&nbsp;&nbsp;&nbsp;&nbsp; Almacen Destino: {1} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Responsable: {2}", e.Row.DBCampo("Almacen"), e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio")) e.Row.Cells(3).Text = String.Format("Almacen Origen: {0}&nbsp;&nbsp;&nbsp;&nbsp; Almacen Destino: {1} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Responsable: {2}", e.Row.DBCampo("Almacen"), e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio"))
ElseIf e.Row.DBCampo("FechaMovto") = "" Then
e.Row.CssClass = "Totales"
e.Row.Cells(0).Text = "Total General"
End If End If
End If End If

View File

@@ -1511,6 +1511,7 @@ Partial Class Inventarios_TraspasoAlmacen
End If End If
Dim ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
ObjInventario.IniciaTransacSQL() ObjInventario.IniciaTransacSQL()
Dim CveMovimientoEntrada As Integer = 0 Dim CveMovimientoEntrada As Integer = 0
Dim Folio = 0 Dim Folio = 0
@@ -1518,31 +1519,58 @@ Partial Class Inventarios_TraspasoAlmacen
Dim TextoError = "" Dim TextoError = ""
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
CveMovimientoEntrada = ObjInventario.AddMovimiento(GvDatosRecepcion.Rows(0).DataKey("CveAlmacenDestino").ToEntero, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoEntrada = ObjInventario.AddMovimiento(GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
Observaciones:=TxtObservacionesRecepcion.Text.Trim, Recibio:=TxtRecibio.Text, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenDestino").ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G") Observaciones:=TxtObservacionesRecepcion.Text.Trim, Recibio:=TxtRecibio.Text, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero,
CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G")
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservacionesRecepcion.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza <= 0 Then
TextoError = "No se pudo generar la Poliza para la cancelacion"
ErrorMovInv = True
End If
Folio = ObjInventario.Folio Folio = ObjInventario.Folio
If CveMovimientoEntrada <= 0 Then If CveMovimientoEntrada <= 0 And Not ErrorMovInv Then
TextoError = "No se pudo generar el movimiento de entrada correctamente" TextoError = "No se pudo generar el movimiento de entrada correctamente"
ErrorMovInv = True ErrorMovInv = True
Else Else
Dim CveMovimientoDetalleSalida As Integer = 0 Dim CveMovimientoDetalleSalida As Integer = 0
Dim importe As Double = 0
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows
CveMovimientoDetalleSalida = Dr("CveMovimientoDetalle").ToString.ToEntero CveMovimientoDetalleSalida = Dr("CveMovimientoDetalle").ToString.ToEntero
Dim Cantidad As Double = Dr("Cantidad").ToString.ToDouble
Dim PrecioUnitario As Double = Dr("PU").ToString.ToDouble
If CveMovimientoDetalleSalida <= 0 Then If CveMovimientoDetalleSalida <= 0 Then
ErrorMovInv = True ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida" TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For Exit For
End If End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PrecioUnitario, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then
ErrorMovInv = True ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de entrada" TextoError = "Ocurrió un error al guardar los movimientos de entrada"
Exit For Exit For
End If End If
importe += Cantidad * PrecioUnitario
Next Next
End If End If
If Not ErrorMovInv Then
Dim ImporteDecimal As Decimal = importe.ToDecimal
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
ErrorMovInv = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
ErrorMovInv = True
End If
End If
End If End If
If Not ErrorMovInv Then If Not ErrorMovInv Then
@@ -1565,8 +1593,10 @@ Partial Class Inventarios_TraspasoAlmacen
UPDatosAlmacen.Update() UPDatosAlmacen.Update()
Else Else
ObjInventario.RollBack() ObjInventario.RollBack()
ObjConta.RollBack()
Alert(TextoError, TipoMensaje.MsgError) Alert(TextoError, TipoMensaje.MsgError)
End If End If
ObjConta.Dispose()
ObjInventario.Dispose() ObjInventario.Dispose()
CargaRecepcion() CargaRecepcion()
End Sub End Sub

View File

@@ -83,8 +83,8 @@ Partial Class CatSubProyectos
Private Sub RecargaGlobal() Private Sub RecargaGlobal()
Dim ObjSubProyectos As New ClsSubProyectos Dim ObjSubProyectos As New ClsSubProyectos
If ObjSubProyectos.GetSubProyectos() Then If ObjSubProyectos.GetSubProyectos(UsuarioActual.CveEmpresa) Then
GlobalDTSubProyectos(-1) = ObjSubProyectos.DtResultados GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = ObjSubProyectos.DtResultados
End If End If
ObjSubProyectos.Dispose() ObjSubProyectos.Dispose()
End Sub End Sub
@@ -400,6 +400,7 @@ Partial Class CatSubProyectos
RecargaGlobal() RecargaGlobal()
Else Else
ObjSubproyectos.RollBack() ObjSubproyectos.RollBack()
RecargaGlobal()
End If End If
'se regeneran los subproyectos 'se regeneran los subproyectos

View File

@@ -798,10 +798,190 @@
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
<%---2020/02/06 - Auditoria--%>
<ajax:TabPanel ID="TabAuditoria" runat="server" HeaderText="<i class='fa fa-search'></i> Auditoría" Visible="True">
<ContentTemplate>
<asp:UpdatePanel ID="UpTabAuditoria" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<asp:UpdatePanel ID="UPGvDocumentos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-12">
<asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="60px">
<ItemTemplate>
<asp:Literal ID="ImgRequired" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="SubProyecto">
<ItemTemplate>
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="Contrato">
<ItemTemplate>
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("Contrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100" HeaderText="Vencimiento" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlVencimiento" runat="server" Text='<%# Eval("Vencimiento", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="Documento">
<ItemTemplate>
<asp:Literal ID="LtlDocumentacion" runat="server" Text='<%# Eval("Documentacion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Estado" ItemStyle-Width="40px">
<ItemTemplate>
<%--<asp:CheckBox ID="chkEstatus" runat="server" CssClass="make-switchsd" Enabled="false"></asp:CheckBox>--%>
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("SCompleto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Observaciones" ItemStyle-Width="100">
<ItemTemplate>
<asp:TextBox ID="TxtObservaciones" Width="300" MaxLength="100" runat="server" Text='<%# Eval("Observacion") %>' onkeypress="return false;" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Fecha limite" ItemStyle-Width="100" Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtFechaLimite" Width="100" onKeyPress="return false;" MaxLength="10" runat="server" Text='<%# Eval("FechaLimite") %>'></asp:TextBox>
<ajax:CalendarExtender runat="server" ID="Calendario6" TargetControlID="TxtFechaLimite" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI6" runat="server" ControlToValidate="TxtFechaLimite" Display="None" ErrorMessage="El campo <b>''Fecha limite''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpRL"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI6" runat="server" ControlToValidate="TxtFechaLimite" Display="None" ErrorMessage="El campo <b>''Fecha Limite''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRL"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI4" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI6" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI6" Width="350px"></ajax:ValidatorCalloutExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Vigencia" ItemStyle-Width="100" Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtFechaVigencia" Width="100" MaxLength="10" runat="server" Text='<%# Eval("FechaVigencia") %>'></asp:TextBox>
<ajax:CalendarExtender runat="server" ID="Calendario7" TargetControlID="TxtFechaVigencia" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="cvTxtFechaVigencia" runat="server" ControlToValidate="TxtFechaVigencia" Display="None" ErrorMessage="El campo <b>''Fecha Limite''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRL"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoCvFI5" runat="server" HighlightCssClass="vco" TargetControlID="cvTxtFechaVigencia" Width="350px"></ajax:ValidatorCalloutExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderText="Cargar">
<ItemTemplate>
<asp:LinkButton ID="ImgUpload" runat="server" OnClick="UploadModal_ClickDocumentacion" AlternateText="Editar" CausesValidation="False"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' title='Subir documento' ></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" HeaderText="Ver">
<ItemTemplate>
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField ControlStyle-CssClass="template" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="275" HeaderText="CveDocumentacionElectronica">
<ItemTemplate>
<asp:Literal ID="LtlCveDocumentacionElectronica" runat="server" Text='<%# Eval("CveDocumentacionElectronica") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>--%>
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
<ItemTemplate>
<asp:LinkButton ID="ImgE" OnClick="Update_ClickDocumentacion" runat="server" AlternateText="Editar" ToolTip="Aplicar Cambios" CausesValidation="False"
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-check' title='Aplicar Cambios'></i>" />
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer> </ajax:TabContainer>
<div id="ModalUploadDoc" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalReferenciasVerificacion" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<asp:UpdatePanel ID="UpModalTitleUploadDocumento" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<h4 class="modal-title">
<asp:Literal ID="LtlModalUploadTitulo" runat="server"></asp:Literal></h4>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UPModalUploadDoc" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-12">
<asp:TextBox ID="TxtFileDocumentacion" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="btnUploadFileDoc" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
@@ -853,6 +1033,16 @@
}); });
}); });
function RestrictSpace() {
if (event.keyCode == 32) {
event.returnValue = false;
return false;
}
}
</script> </script>
e
</asp:Content> </asp:Content>

File diff suppressed because it is too large Load Diff

View File

@@ -2918,7 +2918,7 @@
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:CustomValidator id="CVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" ClientValidationFunction="ValidarCodigoInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" /> <asp:CustomValidator id="CVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" ClientValidationFunction="ValidarCodigoInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
<asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator> <%-- <asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>--%>
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%> <%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%> <%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodInspeccion.ClientID.ToString()%>">Cod. Inspección:</label> <label for="<%= TxtCodInspeccion.ClientID.ToString()%>">Cod. Inspección:</label>
@@ -3019,7 +3019,8 @@
//SI ES MOTOBATERIA //SI ES MOTOBATERIA
if (CveClasificacion = "20517") { if (CveClasificacion = "20517") {
regex = "[*]|" regex = "[1X]|"
//regex = "[*]|"
//SI ES OPTIMA //SI ES OPTIMA
} else if (CveClasificacion = "20511") { } else if (CveClasificacion = "20511") {
regex = "[1X]|" regex = "[1X]|"
@@ -3064,15 +3065,25 @@
let clasificaciones = ["20517", "20511"] let clasificaciones = ["20517", "20511"]
//SI ES MOTOBATERIA //SI ES MOTOBATERIA
if (clasificaciones.includes(CveClasificacion)) { if (CveClasificacion = "20517") {
var re = new RegExp("^[*]|[A-L][0-9][1-9A-Z][A-HJ-M]$"); var re = new RegExp("^[X]|[x]|[A-L][0-9][1-9A-Z][A-HJ-M]$");
arguments.IsValid = re.test(parseInt(arguments.Value)); arguments.IsValid = re.test(arguments.Value);
return; return;
} else { } else {
var re = new RegExp("^[A-L][0-9][1-9A-Z][A-HJ-M]$"); var re = new RegExp("^[A-L][0-9][1-9A-Z][A-HJ-M]$");
arguments.IsValid = re.test(arguments.Value); arguments.IsValid = re.test(arguments.Value);
return; return;
} }
//if (clasificaciones.includes(CveClasificacion)) {
// //var re = new RegExp("^[*]|[A-L][0-9][1-9A-Z][A-HJ-M]$");
// var re = new RegExp("^[X]|[A-L][0-9][1-9A-Z][A-HJ-M]$");
// arguments.IsValid = re.test(parseInt(arguments.Value));
// return;
//} else {
// var re = new RegExp("^[A-L][0-9][1-9A-Z][A-HJ-M]$");
// arguments.IsValid = re.test(arguments.Value);
// return;
//}
} }
function CalculaMesesUso() { function CalculaMesesUso() {

View File

@@ -1579,161 +1579,165 @@ Partial Class PV
End Sub End Sub
Private Sub CargaCliente(CveCliente As Integer, Optional Estatus As Integer = 1) Private Sub CargaCliente(CveCliente As Integer, Optional Estatus As Integer = 1)
Dim ObjCliente As New ClsClientes() Dim ObjCliente As New ClsClientes()
Try
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
TxtCodigo.Text = ObjCliente.Codigo
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus, TipoCliente:=-1) Then LblCliente.Text = String.Format("<a Class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente={0}"">{1}</a>", CveCliente, ObjCliente.Nombre)
If ObjCliente.DtResultados.Rows.Count > 0 Then ViewState("NombreCliente") = ObjCliente.Nombre
TxtCodigo.Text = ObjCliente.Codigo LtlCliente.Text = ObjCliente.Nombre
ChkEnviarFactura.Checked = ObjCliente.EnviarFactura
LblCliente.Text = String.Format("<a Class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente={0}"">{1}</a>", CveCliente, ObjCliente.Nombre) ViewState("Mail") = If(DdlTipoComprobante.SelectedValue = "Cot", ObjCliente.MailCotizacion, ObjCliente.Mail)
ViewState("NombreCliente") = ObjCliente.Nombre ViewState("MailCC") = ObjCliente.NotificarA
LtlCliente.Text = ObjCliente.Nombre LblDireccion.Text = ObjCliente.Direccion
ChkEnviarFactura.Checked = ObjCliente.EnviarFactura LblColonia.Text = ObjCliente.Colonia
ViewState("Mail") = If(DdlTipoComprobante.SelectedValue = "Cot", ObjCliente.MailCotizacion, ObjCliente.Mail) LblCiudad.Text = ObjCliente.Ciudad
ViewState("MailCC") = ObjCliente.NotificarA LblEstado.Text = ObjCliente.Estado
LblDireccion.Text = ObjCliente.Direccion LblCP.Text = ObjCliente.CP
LblColonia.Text = ObjCliente.Colonia LblRFC.Text = ObjCliente.RFC
LblCiudad.Text = ObjCliente.Ciudad LblTelefono.Text = ObjCliente.Telefono
LblEstado.Text = ObjCliente.Estado LblRetIVA.Text = ObjCliente.RetIVA.ToString.FormatoNumero(5)
LblCP.Text = ObjCliente.CP LblRetISR.Text = ObjCliente.RetISR.ToString.FormatoNumero(5)
LblRFC.Text = ObjCliente.RFC ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
LblTelefono.Text = ObjCliente.Telefono ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
LblRetIVA.Text = ObjCliente.RetIVA.ToString.FormatoNumero(5) ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
LblRetISR.Text = ObjCliente.RetISR.ToString.FormatoNumero(5) If ObjCliente.RetieneIVAFletes Then
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100 TrRetIVA.Style.Add("display", "")
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100 UsuarioActual.Empresa.MostrarRetIVA = True
ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
If ObjCliente.RetieneIVAFletes Then
TrRetIVA.Style.Add("display", "")
UsuarioActual.Empresa.MostrarRetIVA = True
End If
ViewState("Vendedor") = ObjCliente.Vendedor
ViewState("CtaContable") = ObjCliente.CuentaContable
ViewState("IdCtaContClientes") = ObjCliente.IdCtaContClientes
ViewState("IdCtaContMonedaExtranjera") = ObjCliente.IdCtaContMonedaExtranjera
ViewState("IdCtaContComplementaria") = ObjCliente.IdCtaContComplementaria
ViewState("IdCtaContAnticipos") = ObjCliente.IdCtaContAnticipos
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
ViewState("CodCliente") = ObjCliente.Codigo
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
TrEsDistribuidor.Visible = True
LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}")
Else
TrEsDistribuidor.Visible = False
End If
ViewState("CliNoExt") = ObjCliente.NoExt
ViewState("CliNoInt") = ObjCliente.NoInt
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
ViewState("CliPais") = ObjCliente.Pais
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
EnviarCorreoCliente = ObjCliente.EnviarFactura
ChkEnviarFactura.Visible = True
ChkEnviarFactura.Checked = EnviarCorreoCliente
LblEnviarMail.Visible = True
Dim dr As DataRow = Nothing
dr = GlobalDTSubProyectos(-1).FiltroPrimero("Estatus = 'Activo' AND CveEmpresa = " & UsuarioActual.CveEmpresa)
If dr IsNot Nothing Then
ViewState("MatCalle") = dr("Calle")
ViewState("MatNoExt") = dr("NoExt")
ViewState("MatNoInt") = dr("NoInt")
ViewState("MatColonia") = dr("Colonia")
ViewState("MatLocalidad") = dr("Localidad")
ViewState("MatMunicipio") = dr("Municipio")
ViewState("MatEstado") = dr("Estado")
ViewState("MatPais") = dr("Pais")
ViewState("MatCP") = dr("CP")
End If
If CveVenta <= 0 Then
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString)
'DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString)
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
End If
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
If ObjCliente.DtResultados(0)("CveVendedor").ToString.ToEntero > 0 Then
DdlVendedor.SelectedValueExist(ObjCliente.DtResultados(0)("CveVendedor").ToString.ToEntero)
End If
If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
DdlVendedor.Enabled = False
End If
EstatusCliente = ObjCliente.Estatus
If Not EstatusCliente Then
BtnEmitirImprimir.Enabled = False
Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia)
Else
BtnEmitirImprimir.Enabled = True
End If
UpFacturar.Update()
If UsuarioActual.Empresa.UsaInventarios Then
RblTipo.Items.Remove(RblTipo.Items.FindByValue("1"))
RblTipo.Items.Remove(RblTipo.Items.FindByValue("2"))
End If
UpnTools.Update()
If Not CveVenta > 0 Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
If UsuarioActual.TienePermisoProceso(152) Then
DdlSubProyectoDatos.SelectedValueExist(UsuarioActual.CveSubProyecto)
DdlSubProyectoDatos.Enabled = False
Else
DdlSubProyectoDatos.SelectedValueExist(ObjCliente.CveSubProyecto)
End If
'RECARGA LOS VALORES DE LA SUCURSAL
CambiaSucursal()
UpParametros.Update()
End If End If
End If
If ObjCliente.GetSucursales(CveCliente) Then ViewState("Vendedor") = ObjCliente.Vendedor
DdlSucursalCliente.DataSource = ObjCliente.DtResultados ViewState("CtaContable") = ObjCliente.CuentaContable
If ObjCliente.DtResultados.Rows.Count > 0 Then ViewState("IdCtaContClientes") = ObjCliente.IdCtaContClientes
trsucursalciente.Visible = True ViewState("IdCtaContMonedaExtranjera") = ObjCliente.IdCtaContMonedaExtranjera
ViewState("IdCtaContComplementaria") = ObjCliente.IdCtaContComplementaria
ViewState("IdCtaContAnticipos") = ObjCliente.IdCtaContAnticipos
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
ViewState("CodCliente") = ObjCliente.Codigo
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
TrEsDistribuidor.Visible = True
If Not String.IsNullOrEmpty(ObjCliente.Vendedor) Then
LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}")
End If
Else
TrEsDistribuidor.Visible = False
End If
ViewState("CliNoExt") = ObjCliente.NoExt
ViewState("CliNoInt") = ObjCliente.NoInt
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
ViewState("CliPais") = ObjCliente.Pais
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
EnviarCorreoCliente = ObjCliente.EnviarFactura
ChkEnviarFactura.Visible = True
ChkEnviarFactura.Checked = EnviarCorreoCliente
LblEnviarMail.Visible = True
Dim dr As DataRow = Nothing
dr = GlobalDTSubProyectos(-1).FiltroPrimero("Estatus = 'Activo' AND CveEmpresa = " & UsuarioActual.CveEmpresa)
If dr IsNot Nothing Then
ViewState("MatCalle") = dr("Calle")
ViewState("MatNoExt") = dr("NoExt")
ViewState("MatNoInt") = dr("NoInt")
ViewState("MatColonia") = dr("Colonia")
ViewState("MatLocalidad") = dr("Localidad")
ViewState("MatMunicipio") = dr("Municipio")
ViewState("MatEstado") = dr("Estado")
ViewState("MatPais") = dr("Pais")
ViewState("MatCP") = dr("CP")
End If
If CveVenta <= 0 Then
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString)
'DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString)
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
End If
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
If ObjCliente.DtResultados(0)("CveVendedor").ToString.ToEntero > 0 Then
DdlVendedor.SelectedValueExist(ObjCliente.DtResultados(0)("CveVendedor").ToString.ToEntero)
End If
If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
DdlVendedor.Enabled = False
End If
EstatusCliente = ObjCliente.Estatus
If Not EstatusCliente Then
BtnEmitirImprimir.Enabled = False
Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia)
Else
BtnEmitirImprimir.Enabled = True
End If
UpFacturar.Update()
If UsuarioActual.Empresa.UsaInventarios Then
RblTipo.Items.Remove(RblTipo.Items.FindByValue("1"))
RblTipo.Items.Remove(RblTipo.Items.FindByValue("2"))
End If
UpnTools.Update()
If Not CveVenta > 0 Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
If UsuarioActual.TienePermisoProceso(152) Then
DdlSubProyectoDatos.SelectedValueExist(UsuarioActual.CveSubProyecto)
DdlSubProyectoDatos.Enabled = False
Else
DdlSubProyectoDatos.SelectedValueExist(ObjCliente.CveSubProyecto)
End If
'RECARGA LOS VALORES DE LA SUCURSAL
CambiaSucursal()
UpParametros.Update()
End If
End If
If ObjCliente.GetSucursales(CveCliente) Then
DdlSucursalCliente.DataSource = ObjCliente.DtResultados
If ObjCliente.DtResultados.Rows.Count > 0 Then
trsucursalciente.Visible = True
Else
trsucursalciente.Visible = False
End If
Else Else
trsucursalciente.Visible = False trsucursalciente.Visible = False
DdlSucursalCliente.DataSource = Nothing
End If End If
DdlSucursalCliente.DataBind()
LbAgregar.Enabled = True
UpEstatus.Update()
UpPS.Update()
UpParametros.Update()
UPCondicionesPago.Update()
UpComplementos.Update()
CargarAlmacenes()
CargaFacturasAjuste()
Else Else
trsucursalciente.Visible = False Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgError)
DdlSucursalCliente.DataSource = Nothing
End If End If
DdlSucursalCliente.DataBind()
LbAgregar.Enabled = True
UpEstatus.Update()
UpPS.Update()
UpParametros.Update()
UPCondicionesPago.Update()
UpComplementos.Update()
CargarAlmacenes()
CargaFacturasAjuste()
Else
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgError)
End If End If
End If Catch ex As Exception
OnError("Ocurrió un error al asignar el cliente", ex)
End Try
ObjCliente.Dispose() ObjCliente.Dispose()
UPCondicionesPago.Update() UPCondicionesPago.Update()
End Sub End Sub
@@ -2879,6 +2883,15 @@ Partial Class PV
End If End If
End If End If
'Descuento por clasificación
If drPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
Dim clasificacionesDescuentos As New Dictionary(Of Integer, Double) From {
{20516, 0.23}, 'Descuento para lubricantes LTH
{20515, 0.24} 'Descuento para filtros LTH
}
TxtDescuento.Text = (PrecioSugerido * clasificacionesDescuentos(drPS("CveClasificacion").ToString.ToEntero)).ToString("F2")
End If
If ChkAjuste.Checked Then If ChkAjuste.Checked Then
CalculaMesesUso() CalculaMesesUso()
UpAjuste.Update() UpAjuste.Update()
@@ -5086,7 +5099,7 @@ Partial Class PV
Dim ObjGral As New ClsGenerales Dim ObjGral As New ClsGenerales
If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then
e.Row.FCDropDownList("DdlBCIUsado").DataSource = ObjGral.DtResultados e.Row.FCDropDownList("DdlBCIUsado").DataSource = ObjGral.DtResultados.FiltraParametros(String.Format("CveTamaño = {0}", e.Row.DataKey("CveTamaño")))
End If End If
'DdlBCIUsado.Items.Insert(0, New ListItem("Seleccione", "-1")) 'DdlBCIUsado.Items.Insert(0, New ListItem("Seleccione", "-1"))
'DdlBCIUsado.SelectedValueExist(-1) 'DdlBCIUsado.SelectedValueExist(-1)
@@ -5500,7 +5513,14 @@ Partial Class PV
Dim ObjAcumuladores As New ClsAcumuladores Dim ObjAcumuladores As New ClsAcumuladores
If ObjAcumuladores.GetNuevoConsecutivoFolio(DdlFolioGarantia.SelectedValue.ToEntero) Then If ObjAcumuladores.GetNuevoConsecutivoFolio(DdlFolioGarantia.SelectedValue.ToEntero) Then
Dim resultado As Integer = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo").ToEntero Dim resultado As Integer = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo").ToEntero
TxtConsecutivoAjuste.Text = resultado.ToString If ObjAcumuladores.FoliosGarantiaGet(DdlFolioGarantia.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
Dim Limite As Integer = If(ObjAcumuladores.DtResultados.FiltroPrimeroValor("Limite") IsNot Nothing, ObjAcumuladores.DtResultados.FiltroPrimeroValor("Limite").ToEntero, 0) 'ObjAcumuladores.DtResultados.FiltroPrimeroValor("Limite").ToEntero
If resultado < Limite Or Limite = 0 Then
TxtConsecutivoAjuste.Text = resultado.ToString
Else
Alert("limite de folios alcanzado")
End If
End If
UpAjuste.Update() UpAjuste.Update()
End If End If
ObjAcumuladores.Dispose() ObjAcumuladores.Dispose()

View File

@@ -107,19 +107,23 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="Importe Venta" DataField="ImporteVenta" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Importe Venta" DataField="ImporteVenta" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
<%--<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left" />--%>
<asp:BoundField HeaderText="Nivel" DataField="Nivel" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField HeaderText="Nivel" DataField="Nivel" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" />
<%--<asp:BoundField HeaderText="Tipo Comision" DataField="TipoComisionTexto" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />--%>
<asp:BoundField HeaderText="Comisión %" DataField="Comision" DataFormatString="{0:###,###,##0.00}%" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Comisión %" DataField="Comision" DataFormatString="{0:###,###,##0.00}%" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Utilidad" DataField="Importe" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Utilidad" DataField="UtilidadVenta" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Ajuste" DataField="ImporteAjuste" Visible="false" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Ajuste" DataField="ImporteAjuste" Visible="false" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
<%--<asp:BoundField HeaderText="Importe Venta" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Utilidad" DataField="Utilidad" DataFormatString="{0:N2}" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />--%>
<asp:BoundField HeaderText="Comisión $" DataField="ComisionGanancia" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Comisión $" DataField="ComisionGanancia" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Importe Cobrado" DataField="Cobrado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Importe Cobrado" DataField="Cobrado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Comisión Cobrada $" DataField="ComisionCobrada" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="% Cobro" DataField="PorcentajePagado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Pendiente x Cobrar" DataField="Pendiente" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Pendiente x Cobrar" DataField="ImportePorCobrar" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total al Dia" DataField="PendienteXDia" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Pago" DataField="Pago" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Importe Venta Acumulado" DataField="ImporteVentaAcumulado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Comisión Acumulada $" DataField="ComisionGananciaAcumulada" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="% Cobro Acumulado" DataField="PorcentajePagadoAcumulado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Importe Cobrado Acumulado" DataField="CobradoAcumulado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Pago Acumulado" DataField="PagoAcumulado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
<%--<asp:BoundField HeaderText="Importe Pago" DataField="ImportePagoAcumulado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:BoundField HeaderText="Pendiente Pago" DataField="PendientePago" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>

View File

@@ -1,182 +1,214 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIngresos.aspx.vb" Inherits="Ventas_RepIngresos" %> <%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIngresos.aspx.vb" Inherits="Ventas_RepIngresos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
/*.GVRepIngresos tr > td a { .btnopaco {
display: block; background-color: rgba(0,0,0,0.2);
} color: #FFF;
}
.GVRepIngresos tr > td:nth-child(n+2) a {
text-align: right; .btnopaco:hover {
} background-color: rgba(0,0,0,0.4);
color: #FFF;
font-weight: bold;
.form-group.form-md-line-input.form-md-floating-label .form-control ~ label { }
color: #fff;
} .select2 .select2-selection__rendered {
line-height: 1;
.form-group.form-md-line-input.form-md-floating-label .form-control ~ label { color: #111;
top: 0; }
}
.select2 .select2-selection--multiple {
.form-group.form-md-line-input.form-md-floating-label .form-control[value=""] ~ label, box-sizing: border-box;
.form-group.form-md-line-input.form-md-floating-label .form-control:not([value]) ~ label { cursor: pointer;
top: 25px; display: block;
} min-height: 20px;
user-select: none;
.form-group.form-md-line-input.form-md-floating-label select.form-control ~ span ~ label, .form-group.form-md-line-input.form-md-floating-label select.form-control ~ label, -webkit-user-select: none;
.form-group.form-md-line-input.form-md-floating-label .Dropdownlost.form-control ~ span ~ label, .form-group.form-md-line-input.form-md-floating-label .Dropdownlost.form-control ~ label { }
top: 0 !important;
} .select2-container--default .select2-selection--multiple .select2-selection__choice {
margin-top: 10px;
.form-group.form-md-line-input .form-control { }
color: #fff;
} .select2-selection__rendered {
.lbltitle { margin-top: 0px;
padding-top: 6px; height: 25px;
}*/ }
</style>
</asp:Content> .select2-selection {
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> margin-top: 0px;
Reporte de Ingresos height: 31px;
</asp:Content> }
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content> .select2-container--default.select2-container--focus .select2-selection--multiple {
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> border: none;
<asp:UpdatePanel runat="server" ID="UpAgregar"> outline: 0;
<ContentTemplate> }
<li>
<asp:LinkButton ID="LnkPDF" OnClick="LnkPDF_Click" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton> #chartdiv {
</li> width: 100%;
<li> height: 500px;
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton> }
</li> </style>
</ContentTemplate> </asp:Content>
<Triggers> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
<asp:PostBackTrigger ControlID="LnkPDF" /> Reporte de Ingresos
<asp:PostBackTrigger ControlID="LnkExcel" /> </asp:Content>
</Triggers> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:UpdatePanel> </asp:Content>
</asp:Content> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server"> <asp:UpdatePanel runat="server" ID="UpAgregar">
</asp:Content> <ContentTemplate>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server"> <li>
<asp:UpdatePanel ID="upDatosRepI" runat="server" UpdateMode="Conditional"> <asp:LinkButton ID="LnkPDF" OnClick="LnkPDF_Click" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
<ContentTemplate> </li>
<li>
<div class="portlet solid grey-cascade portlet-filter"> <asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
<div class="portlet-title portlet-filterT portletfiltrostitlee"> </li>
<div class="tools"> </ContentTemplate>
<asp:Button ID="LnkFiltrar" OnClick="LnkFiltrar_Click" runat="server" CausesValidation="true" CssClass=" btn btn-primary " Text="Consultar" ValidationGroup="GrpFiltrar"></asp:Button> <Triggers>
<asp:PostBackTrigger ControlID="LnkPDF" />
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a> <asp:PostBackTrigger ControlID="LnkExcel" />
</Triggers>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" /> </asp:UpdatePanel>
</div> </asp:Content>
<div class="titlefiltros caption "> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
<div class="row "> </asp:Content>
<div class="col-md-1 lbltitle"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:Label runat="server" Text="Fecha Inicio" AssociatedControlID="TxtFechaInicio"></asp:Label> <asp:UpdatePanel ID="upDatosRepI" runat="server" UpdateMode="Conditional">
</div> <ContentTemplate>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;"> <div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<asp:TextBox ID="TxtFechaInicio" Width="80" CssClass="form-control" runat="server"></asp:TextBox> <div class="portlet-title portlet-filterT smalltitle">
<span class="input-group-btn "> <div class="tools">
<asp:LinkButton ID="LnkFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:Button ID="LnkFiltrar" OnClick="LnkFiltrar_Click" runat="server" CausesValidation="true" CssClass=" btn btn-primary " Text="Consultar" ValidationGroup="GrpFiltrar"></asp:Button>
</span>
</div> <a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<ajax:MaskedEditExtender ID="MEEFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="LnkFechaInicio" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender> <asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div> </div>
<div class="col-md-1 lbltitle"> <div class="titlefiltros caption ">
<asp:Label runat="server" Text="Fecha Fin" AssociatedControlID="TxtFechaFin"></asp:Label> <div class="row " style="height: 32px;">
</div> <div class="col-md-1 lbltitle">
<div class="col-md-1"> <asp:Label runat="server" Text="Fecha Inicio" AssociatedControlID="TxtFechaInicio"></asp:Label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;"> </div>
<asp:TextBox ID="TxtFechaFin" Width="80" CssClass="form-control" runat="server"></asp:TextBox> <div class="col-md-1">
<span class="input-group-btn "> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:TextBox ID="TxtFechaInicio" Width="80" CssClass="form-control" runat="server"></asp:TextBox>
</span> <span class="input-group-btn ">
</div> <asp:LinkButton ID="LnkFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> </span>
<ajax:CalendarExtender runat="server" ID="CEEFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="LnkFechaFin" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender> </div>
</div> <ajax:MaskedEditExtender ID="MEEFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<div class="col-md-1 lbltitle"> <ajax:CalendarExtender runat="server" ID="CEEFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="LnkFechaInicio" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:Label runat="server" Text="Tipo" AssociatedControlID="DdlTipoDocto"></asp:Label> </div>
</div> <div class="col-md-1 lbltitle">
<div class="col-md-1"> <asp:Label runat="server" Text="Fecha Fin" AssociatedControlID="TxtFechaFin"></asp:Label>
<asp:DropDownList ID="DdlTipoDocto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%"> </div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaFin" Width="80" CssClass="form-control" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="LnkFechaFin" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
</div>
<div class="col-md-1 lbltitle">
<asp:Label runat="server" Text="Tipo" AssociatedControlID="DdlTipoDocto"></asp:Label>
</div>
<div class="col-md-2">
<asp:ListBox ID="DdlTipoDocto" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
<asp:ListItem Value="Dev" Text="Devolución"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Egresos"></asp:ListItem>
<asp:ListItem Value="Ing" Text="Ingresos"></asp:ListItem>
</asp:ListBox>
<%-- <asp:DropDownList ID="DdlTipoDocto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
<asp:ListItem Value="Dev" Text="Devolución"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Egresos"></asp:ListItem>
<asp:ListItem Value="Ing" Text="Ingresos"></asp:ListItem>
</asp:DropDownList>--%>
</div>
<div class="col-md-1 lbltitle ">
<asp:Label runat="server" Text="Sub Proyecto" AssociatedControlID="DdlSubProyecto"></asp:Label>
</div>
<div class="col-md-2">
<%-- <asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem> </asp:DropDownList>--%>
<asp:ListItem Value="Dev" Text="Devolución"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Egresos"></asp:ListItem>
<asp:ListItem Value="Ing" Text="Ingresos"></asp:ListItem> <asp:ListBox ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
</asp:DropDownList>
</div> </div>
<div class="col-md-1 lbltitle "> </div>
<asp:Label runat="server" Text="Sub Proyecto" AssociatedControlID="DdlSubProyecto"></asp:Label> </div>
</div> </div>
<div class="col-md-2"> </div>
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> <asp:GridView ID="GVRepIngresos" runat="server" GridLines="None" CssClass="table table-hover table-striped GVRepIngresos ScrollAD Widthall" AutoGenerateColumns="False"
</div> DataKeyNames="Importe,Descuento,Amortizacion,IVA,IEPS,ImpuestoLocal,Total">
</div> <Columns>
</div> <asp:TemplateField HeaderText="Titulo">
</div> <ItemTemplate>
</div> <asp:HyperLink runat="server" Text='<%# Eval("ConceptoContable")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:GridView ID="GVRepIngresos" runat="server" GridLines="None" CssClass="table table-hover table-striped GVRepIngresos ScrollAD Widthall" AutoGenerateColumns="False" <asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
DataKeyNames="Importe,Descuento,Amortizacion,IVA,IEPS,ImpuestoLocal,Total"> <ItemTemplate>
<Columns> <asp:HyperLink runat="server" Text='<%# Eval("Importe", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
<asp:TemplateField HeaderText="Titulo"> </ItemTemplate>
<ItemTemplate> </asp:TemplateField>
<asp:HyperLink runat="server" Text='<%# Eval("ConceptoContable")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> <asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right">
</ItemTemplate> <ItemTemplate>
</asp:TemplateField> <asp:HyperLink runat="server" Text='<%# Eval("Descuento", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right"> </ItemTemplate>
<ItemTemplate> </asp:TemplateField>
<asp:HyperLink runat="server" Text='<%# Eval("Importe", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> <asp:TemplateField HeaderText="Amortización" ItemStyle-HorizontalAlign="Right">
</ItemTemplate> <ItemTemplate>
</asp:TemplateField> <asp:HyperLink runat="server" Text='<%# Eval("Amortizacion", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
<asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right"> </ItemTemplate>
<ItemTemplate> </asp:TemplateField>
<asp:HyperLink runat="server" Text='<%# Eval("Descuento", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> <asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
</ItemTemplate> <ItemTemplate>
</asp:TemplateField> <asp:HyperLink runat="server" Text='<%# Eval("IVA", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
<asp:TemplateField HeaderText="Amortización" ItemStyle-HorizontalAlign="Right"> </ItemTemplate>
<ItemTemplate> </asp:TemplateField>
<asp:HyperLink runat="server" Text='<%# Eval("Amortizacion", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> <asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
</ItemTemplate> <ItemTemplate>
</asp:TemplateField> <asp:HyperLink runat="server" Text='<%# Eval("IEPS", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right"> </ItemTemplate>
<ItemTemplate> </asp:TemplateField>
<asp:HyperLink runat="server" Text='<%# Eval("IVA", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> <asp:TemplateField HeaderText="Impuesto Local" ItemStyle-HorizontalAlign="Right">
</ItemTemplate> <ItemTemplate>
</asp:TemplateField> <asp:HyperLink runat="server" Text='<%# Eval("ImpuestoLocal", "${0:N2}")%>' NavigateUrl='<%# Eval("CveConceptoContable", String.Format("/Ventas/RepIngresosDetalle.aspx?GTipoDocto={{0}}{0}", Filtros))%>'> </asp:HyperLink>
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right"> </ItemTemplate>
<ItemTemplate> </asp:TemplateField>
<asp:HyperLink runat="server" Text='<%# Eval("IEPS", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> <asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
</ItemTemplate> <ItemTemplate>
</asp:TemplateField> <asp:HyperLink runat="server" Text='<%# Eval("Total", "${0:N2}")%>' NavigateUrl='<%# Eval("CveConceptoContable", String.Format("/Ventas/RepIngresosDetalle.aspx?GTipoDocto={{0}}{0}", Filtros))%>'> </asp:HyperLink>
<asp:TemplateField HeaderText="Impuesto Local" ItemStyle-HorizontalAlign="Right"> </ItemTemplate>
<ItemTemplate> </asp:TemplateField>
<asp:HyperLink runat="server" Text='<%# Eval("ImpuestoLocal", "${0:N2}")%>' NavigateUrl='<%# Eval("CveConceptoContable", String.Format("/Ventas/RepIngresosDetalle.aspx?GTipoDocto={{0}}{0}", Filtros))%>'> </asp:HyperLink> </Columns>
</ItemTemplate> </asp:GridView>
</asp:TemplateField> </ContentTemplate>
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right"> </asp:UpdatePanel>
<ItemTemplate> </asp:Content>
<asp:HyperLink runat="server" Text='<%# Eval("Total", "${0:N2}")%>' NavigateUrl='<%# Eval("CveConceptoContable", String.Format("/Ventas/RepIngresosDetalle.aspx?GTipoDocto={{0}}{0}", Filtros))%>'> </asp:HyperLink> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</ItemTemplate> </asp:Content>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -83,8 +83,14 @@ Partial Class Ventas_RepIngresos
End Sub End Sub
Protected Sub CargaRepIngresos(Optional tipoReporte As Integer = -1) Protected Sub CargaRepIngresos(Optional tipoReporte As Integer = -1)
Dim ObjRepI As New ClsVentas() Dim ObjRepI As New ClsVentas()
ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TipoDoc, DdlSubProyecto.SelectedValue.ToEntero)
Dim Cves_Subprotectos As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
Dim TiposDoc As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TiposDoc, Cves_Subprotectos)
GVRepIngresos.DataSource = ObjRepI.DtResultados GVRepIngresos.DataSource = ObjRepI.DtResultados
DtDatos = ObjRepI.DtResultados DtDatos = ObjRepI.DtResultados
ObjRepI.Dispose() ObjRepI.Dispose()

View File

@@ -352,6 +352,9 @@
<li> <li>
<asp:LinkButton runat="server" ID="LnkImprimirFormatoCicovisa" Visible="false" OnClick="LnkImprimirFormatoCicovisa_Click">Imprimir Formato Cicovisa</asp:LinkButton> <asp:LinkButton runat="server" ID="LnkImprimirFormatoCicovisa" Visible="false" OnClick="LnkImprimirFormatoCicovisa_Click">Imprimir Formato Cicovisa</asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton runat="server" ID="LnkImprimirFormatoTelcel" Visible="false" OnClick="LnkImprimirFormatoTelcel_Click">Imprimir Formato Radio Movil DIPSA</asp:LinkButton>
</li>
<li> <li>
<asp:LinkButton runat="server" ID="LnkEnviarPolizaVirtual" Visible="false" OnClick="LnkEnviarPolizaVirtual_Click">Enviar Póliza Virtual</asp:LinkButton> <asp:LinkButton runat="server" ID="LnkEnviarPolizaVirtual" Visible="false" OnClick="LnkEnviarPolizaVirtual_Click">Enviar Póliza Virtual</asp:LinkButton>
</li> </li>
@@ -364,6 +367,7 @@
<asp:PostBackTrigger ControlID="BtnContabilizar" /> <asp:PostBackTrigger ControlID="BtnContabilizar" />
<asp:PostBackTrigger ControlID="BtnContabilizar" /> <asp:PostBackTrigger ControlID="BtnContabilizar" />
<asp:PostBackTrigger ControlID="LnkImprimirFormatoCicovisa" /> <asp:PostBackTrigger ControlID="LnkImprimirFormatoCicovisa" />
<asp:PostBackTrigger ControlID="LnkImprimirFormatoTelcel" />
<%-- <asp:PostBackTrigger ControlID="LnkDescargarFacturaPrueba" />--%> <%-- <asp:PostBackTrigger ControlID="LnkDescargarFacturaPrueba" />--%>
<%-- <asp:PostBackTrigger ControlID="LbDescargarExcel" />--%> <%-- <asp:PostBackTrigger ControlID="LbDescargarExcel" />--%>
</Triggers> </Triggers>
@@ -6515,14 +6519,26 @@
} }
function LimitaSaldoRNCChk(TxtImporte, Saldo) { function LimitaSaldoRNCChk(TxtImporte, Saldo) {
var Importe = 0; var Importe = 0;
if (TxtImporte.value != '') {
Importe = parseFloat(TxtImporte.value); if (TxtImporte.value.includes('.')) {
return;
}
if (TxtImporte.value.includes(',')) {
return;
} }
if (Importe > Saldo) { var regex = new RegExp("^[-+]?[0-9]+\.[0-9]+$");
TxtImporte.value = FormatoNumero(Saldo, 2);
} else { if (regex.test(TxtImporte.value)) {
TxtImporte.value = FormatoNumero(Importe, 2);; if (TxtImporte.value != '') {
Importe = parseFloat(TxtImporte.value);
}
if (Importe > Saldo) {
TxtImporte.value = FormatoNumero(Saldo, 2);
} else {
TxtImporte.value = FormatoNumero(Importe, 2);;
}
} }
} }

View File

@@ -2056,6 +2056,10 @@ Partial Class Ventas
If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 And DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 And DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
LnkImprimirFormatoCicovisa.Visible = True LnkImprimirFormatoCicovisa.Visible = True
End If End If
'HABILITA IMPRESION DE FORMATO TELCEL
If UsuarioActual.CveEmpresa = 72 And CveCliente = 70869 And DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
LnkImprimirFormatoTelcel.Visible = True
End If
If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
DivDevAlm.Visible = True DivDevAlm.Visible = True
@@ -5820,9 +5824,9 @@ Partial Class Ventas
Dim objPS As New ClsProductosServicios Dim objPS As New ClsProductosServicios
If objPS.GetPSSucursalesALL(CvePS, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero) Then If objPS.GetPSSucursalesALL(CvePS, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero) Then
PrecioMinimo = objPS.DtResultados.FiltroPrimeroValor("PrecioMinimo", "").ToDecimal PrecioMinimo = objPS.DtResultados.FiltroPrimeroValor("PrecioMinimo", "").ToDecimal
'If PrecioMinimo > 0 Then If PrecioMinimo > 0 Then
' Costo = PrecioMinimo Costo = PrecioMinimo
'End If End If
End If End If
objPS.Dispose() objPS.Dispose()
@@ -6771,19 +6775,25 @@ Partial Class Ventas
TieneAnticipo = True TieneAnticipo = True
CveAnticipoPadre = row2.DataKey("CveVenta").ToEntero CveAnticipoPadre = row2.DataKey("CveVenta").ToEntero
ObjFactura.CveVentaRelacion = CveAnticipoPadre 'relaciona al anticipo
CveAnticipo = CveAnticipoPadre CveAnticipo = CveAnticipoPadre
ObjFactura.ImporteRelacion = row2.FCTextBox($"TxtAnticipo{actualindex}").Text.ToDecimal 'CUANDO ES REFACTURACION DEBE RELACIONAR CON LA FACTURA REFACTURADA
FolioFiscalRelacionado = row2.DataKey("FolioFiscal") If NuevaFactura <> 1 Then
ObjFactura.CveVentaPadre = row2.DataKey("CveVenta").ToEntero ObjFactura.CveVentaRelacion = CveAnticipoPadre 'relaciona al anticipo
ObjFactura.ImporteRelacion = row2.FCTextBox($"TxtAnticipo{actualindex}").Text.ToDecimal
FolioFiscalRelacionado = row2.DataKey("FolioFiscal")
ObjFactura.CveVentaPadre = row2.DataKey("CveVenta").ToEntero
Else
ObjFactura.CveVentaRelacion = CveDevolucion
End If
End If End If
actualindex = actualindex + 1 actualindex = actualindex + 1
Next Next
End If End If
Dim EsNCAmortizacion As Boolean = False Dim EsNCAmortizacion As Boolean = False
If DdlTipoComprobante.SelectedValue = "Egs" AndAlso ChkAplicaNCAnticipo.Checked Then If ObjFactura.TipoDocto = "Egs" AndAlso ChkAplicaNCAnticipo.Checked Then
EsNCAmortizacion = True EsNCAmortizacion = True
End If End If
@@ -6847,7 +6857,14 @@ Partial Class Ventas
' cambiar la condicion para saber si hay seleccionado ' cambiar la condicion para saber si hay seleccionado
If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse NCDescuento Then If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse NCDescuento Then
Try Try
CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveAnticipoPadre, NCDescuento:=NCDescuento) Dim CveVentaRelacionada As Integer = -1
If NuevaFactura = 1 Then
CveVentaRelacionada = ObjFactura.CveVenta
Else
CveVentaRelacionada = CveAnticipoPadre
End If
CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento)
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, Nothing, If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, Nothing,
Nothing, NCDescuento:=NCDescuento) Then Nothing, NCDescuento:=NCDescuento) Then
Obj2.Add(ObjFacturaDevolucion) Obj2.Add(ObjFacturaDevolucion)
@@ -6873,7 +6890,7 @@ Partial Class Ventas
If ErrorList.Count = 0 Then If ErrorList.Count = 0 Then
If ObjFactura.CveVenta > 0 And CveAlmacenExistenciasContrato > 0 And DdlTipoComprobante.SelectedValue = "Ing" Then If ObjFactura.CveVenta > 0 And CveAlmacenExistenciasContrato > 0 And DdlTipoComprobante.SelectedValue = "Ing" Then
If Not RegistraAlmacenConsignacionVenta(ObjInventario, ObjFactura) Then If Not RegistraAlmacenConsignacionVenta(ObjInventario, ObjConta, ObjFactura, ObjContPaq) Then
ErrorList.Add("Ocurrió un error al registrar los movimientos de almacén del contrato de consignación") ErrorList.Add("Ocurrió un error al registrar los movimientos de almacén del contrato de consignación")
End If End If
End If End If
@@ -7431,8 +7448,8 @@ Partial Class Ventas
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
If gvr.RowType = DataControlRowType.DataRow Then If gvr.RowType = DataControlRowType.DataRow Then
Dim Orden As Integer = 80 Dim Orden As Integer = 80
If gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble > 0 Then If gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal > 0 Then
DR("ImpuestoLocal") = gvr.DataKey("ImpuestoLocal").ToString : DR("Importe") = gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble : DR("Orden") = Orden : DR("Porcentaje") = gvr.DataKey("Porcentaje").ToString : DR("TipoImpuesto") = gvr.DataKey("TipoImpuesto").ToString : DR("IdCtaContable") = gvr.DataKey("IdCtaContable").ToString.ToEntero : TmpDTImpuestos.Rows.Add(DR) DR("ImpuestoLocal") = gvr.DataKey("ImpuestoLocal").ToString : DR("Importe") = gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal.RoundSQL(2) : DR("Orden") = Orden : DR("Porcentaje") = gvr.DataKey("Porcentaje").ToString : DR("TipoImpuesto") = gvr.DataKey("TipoImpuesto").ToString : DR("IdCtaContable") = gvr.DataKey("IdCtaContable").ToString.ToEntero : TmpDTImpuestos.Rows.Add(DR)
DR = TmpDTImpuestos.NewRow() DR = TmpDTImpuestos.NewRow()
Orden = Orden + 1 Orden = Orden + 1
End If End If
@@ -7524,13 +7541,16 @@ Partial Class Ventas
End If End If
End If End If
If DtVentasNC Is Nothing Then InicializaDTVentasNC() 'SI NO ES REFACTURACION
Dim Drt = DtVentasNC.NewRow If NuevaFactura <> 1 Then
Drt("CveVenta") = ObjFactura.CveVenta If DtVentasNC Is Nothing Then InicializaDTVentasNC()
Drt("Importe") = 0 Dim Drt = DtVentasNC.NewRow
Drt("FolioFiscal") = ObjFactura.FolioFiscal Drt("CveVenta") = ObjFactura.CveVenta
DtVentasNC.Rows.Add(Drt) Drt("Importe") = 0
DtVentasNC.AcceptChanges() Drt("FolioFiscal") = ObjFactura.FolioFiscal
DtVentasNC.Rows.Add(Drt)
DtVentasNC.AcceptChanges()
End If
End Sub End Sub
@@ -7648,7 +7668,14 @@ Partial Class Ventas
factura.RetIVA = TotalRetIVA factura.RetIVA = TotalRetIVA
factura.RetISR = TotalRetISR factura.RetISR = TotalRetISR
factura.Total = Total factura.Total = Total
factura.CveVentaPadre = CveVentaP
'SI ES REFACTURACION DEBE RELACIONAR CON LA VENTA NUEVA
If NuevaFactura = 1 Then
factura.CveVentaPadre = ObjFactura.CveVenta
Else
factura.CveVentaPadre = CveVentaP
End If
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
DtVentasNC.Rows(0)("Importe") = Total DtVentasNC.Rows(0)("Importe") = Total
@@ -8243,7 +8270,12 @@ Partial Class Ventas
For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 1").Rows For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 1").Rows
If DrImpuestosLocales("Importe").ToString.ToDecimal > 0 Then If DrImpuestosLocales("Importe").ToString.ToDecimal > 0 Then
Dim ret As New CFDIRetencionesLocales With {.TasaRetencion = DrImpuestosLocales("Porcentaje").ToString.ToDecimal, .ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString, .Importe = DrImpuestosLocales("Importe").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1))} Dim ret As New CFDIRetencionesLocales With
{
.TasaRetencion = DrImpuestosLocales("Porcentaje").ToString.ToDecimal,
.ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString,
.Importe = DrImpuestosLocales("Importe").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1)).RoundSQL(2)
}
ObjFactura.Timbre.RetencionesLocales.Add(ret) ObjFactura.Timbre.RetencionesLocales.Add(ret)
End If End If
Next Next
@@ -11501,8 +11533,8 @@ Partial Class Ventas
HdnTieneAnticiposVinculados.Value = "0" HdnTieneAnticiposVinculados.Value = "0"
Dim ObjMovtos As New ClsMovimientos() Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, DdlMoneda.SelectedValue.ToEntero) Then If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then
GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, "AND Tipo = 'Ant'", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}") GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
If ObjMovtos.DtResultados.SUM("Saldo", "Saldo > 0 AND SaldoSubtotal > 0 AND Tipo = 'Ant'") > 0 Then If ObjMovtos.DtResultados.SUM("Saldo", "Saldo > 0 AND SaldoSubtotal > 0 AND Tipo = 'Ant'") > 0 Then
HdnTieneAnticipos.Value = "1" HdnTieneAnticipos.Value = "1"
End If End If
@@ -14597,6 +14629,7 @@ Partial Class Ventas
TmpDT.Columns.Add("CveConcepto", GetType(Integer)) TmpDT.Columns.Add("CveConcepto", GetType(Integer))
TmpDT.Columns.Add("EsOutSourcing", GetType(Boolean)) TmpDT.Columns.Add("EsOutSourcing", GetType(Boolean))
TmpDT.Columns.Add("EsUsado", GetType(Boolean))
End Sub End Sub
Private Sub CreaDTmpC() Private Sub CreaDTmpC()
@@ -15684,7 +15717,8 @@ Partial Class Ventas
Return Not OcurrioError Return Not OcurrioError
End Function End Function
Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False) As Integer Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False,
Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False, Optional ObjContPaq As ClsContPAQi = Nothing) As Integer
Dim OcurrioError As Boolean = False Dim OcurrioError As Boolean = False
Dim ContadorMovtosDetalles = 0 Dim ContadorMovtosDetalles = 0
@@ -15753,6 +15787,7 @@ Partial Class Ventas
'Agregamos las PrePolizas 'Agregamos las PrePolizas
If Not OcurrioError Then If Not OcurrioError Then
If MovimientoPrePoliza AndAlso CveMovimientoInventario > 0 Then If MovimientoPrePoliza AndAlso CveMovimientoInventario > 0 Then
'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen)
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim DtCostos = ObjInventario.DtResultados.Copy Dim DtCostos = ObjInventario.DtResultados.Copy
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}) Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
@@ -15820,6 +15855,99 @@ Partial Class Ventas
'Return Not OcurrioError 'Return Not OcurrioError
End Function End Function
Private Function GeneraPrePolizaMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, ByRef ObjConta As ClsContabilidad, ByRef ObjContPaq As ClsContPAQi, ObjFactura As Modelos.Factura, CvePrePoliza As Integer, CveMovimientoInventario As Integer, CveAlmacen As Integer) As Boolean
Dim OcurrioError As Boolean = False
Dim GenerarPrePolizaNueva As Boolean = False
Try
Dim DtCostos As DataTable = Nothing
Dim DtCostosDistinct As DataTable = Nothing
Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
Dim ValorInventario As Decimal = 0D
Dim TotalCostoAcumulado As Decimal = 0D
Dim Cont As Integer = 1
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
DtCostos = ObjInventario.DtResultados.Copy
DtCostosDistinct = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
Else
OcurrioError = True
End If
If OcurrioError Then
Return Not OcurrioError
End If
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
If CvePrePoliza <= 0 Then
GenerarPrePolizaNueva = True
CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GeneraMovimientoAlmacen", ObjFactura.CvePlantillaPoliza, TotalCosto, TotalCosto, ObjFactura.CveMoneda, ObjFactura.Fecha, If(CveEmpresaCRM > 0, LblEmpresaCRM.Text, ObjFactura.Cliente.Nombre), ObjFactura.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza <= 0 Then
OcurrioError = True
Return Not OcurrioError
End If
End If
For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
TotalCostoAcumulado += ValorInventario
'cuando es el último movimiento y hay diferencias en los importes
If Cont = DtCostosDistinct.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
End If
Try
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
OcurrioError = True
Exit For
End If
'End If
Catch ex As Exception
OcurrioError = True
Alert("Error inesperado (15147). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
End Try
Cont += 1
Next
If Not OcurrioError Then
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
OcurrioError = True
End If
End If
If GenerarPrePolizaNueva Then
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Rem", "RNC", "Cot", "Ped", "Pd2", "PA", "Egs", "Dev") Then
AutoConta = False
End If
If AutoConta Then
If idCuentaContabilizacion > 0 Then
If Not ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
Alert("Ocurrio un Error al contabilizar la prepoliza de almacen, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
End If
Else
Alert(String.Format("Falta asignación de las siguientes cuentas contables: {0}", CuentasContablesInvalidas), TipoMensaje.MsgAdvertencia)
End If
End If
End If
Catch ex As Exception
OnError("Ocurrió un error al generar la prepoliza del movimiento de almacen", ex)
OcurrioError = True
End Try
Return Not OcurrioError
End Function
Private Function GenerarMovimientoAlmacenVirtual(CveRemision As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura) As Boolean Private Function GenerarMovimientoAlmacenVirtual(CveRemision As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura) As Boolean
Dim OcurrioError As Boolean = False Dim OcurrioError As Boolean = False
@@ -18411,8 +18539,8 @@ Partial Class Ventas
'Else 'Else
'End If 'End If
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs", "RNC") Then If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs", "RNC") Then
Dim sb As New StringBuilder() Dim sb As New StringBuilder()
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>") sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
@@ -18425,10 +18553,11 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
If Not String.IsNullOrEmpty(FolioFiscal) Then If UsuarioActual.Empresa.FacturaProduccion AndAlso Not String.IsNullOrEmpty(FolioFiscal) Then
Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia) Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
sb.Append("<b>No encontrado</b> <br/>") sb.Append("<b>No encontrado</b> <br/>")
Else Else
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable) sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
@@ -19633,7 +19762,7 @@ Partial Class Ventas
#End Region #End Region
#Region " CONTRATO DE CONSIGNACION DE VENTA - SURTIDO DE ALMACÉN " #Region " CONTRATO DE CONSIGNACION DE VENTA - SURTIDO DE ALMACÉN "
Function RegistraAlmacenConsignacionVenta(ByRef ObjInventario As ClsInventarios, factura As Modelos.Factura) As Boolean Function RegistraAlmacenConsignacionVenta(ByRef ObjInventario As ClsInventarios, ByRef ObjConta As ClsContabilidad, factura As Modelos.Factura, ObjContPaq As ClsContPAQi) As Boolean
If Not (UsuarioActual.Empresa.UsaInventarios AndAlso CveAlmacenExistenciasContrato > 0) Then If Not (UsuarioActual.Empresa.UsaInventarios AndAlso CveAlmacenExistenciasContrato > 0) Then
Return True Return True
End If End If
@@ -19710,6 +19839,11 @@ Partial Class Ventas
End If End If
Next Next
End If End If
'GENERAR PREPOLIZA
If Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoEntradaGeneral, CveAlmacenOrigenContrato) Then
Return False
End If
Else Else
Return False Return False
End If End If
@@ -21332,8 +21466,8 @@ Partial Class Ventas
For Each Dr As DataRow In DtImpuestosLocal.Rows For Each Dr As DataRow In DtImpuestosLocal.Rows
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("CveSubProyecto")) FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("CveSubProyecto"))
importePuTemp = (Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr) - TmpDT.SUM("Descuento", FiltroStr))).ToDecimal importePuTemp = (Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr).ToDecimal() - TmpDT.SUM("Descuento", FiltroStr).ToDecimal()))
Dr("ImporteTotal") = importePuTemp.RoundSQL() Dr("ImporteTotal") = importePuTemp.RoundSQL(2)
Dr("ImporteIEPS") = (importePuTemp * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2) Dr("ImporteIEPS") = (importePuTemp * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
@@ -21346,7 +21480,7 @@ Partial Class Ventas
'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2) 'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2)
'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2) 'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2)
'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2) 'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2)
Dr("ImportePU") = Dr("ImporteTotal").ToString.ToDecimal.RoundSQL(2) '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal) Dr("ImportePU") = importePuTemp.RoundSQL(6) 'Dr("ImporteTotal").ToString.ToDecimal.RoundSQL(2) '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal)
Next Next
@@ -21636,7 +21770,7 @@ Partial Class Ventas
Dim AplicaPUEditado As Boolean = UsuarioActual.TienePermisoProceso(253) Dim AplicaPUEditado As Boolean = UsuarioActual.TienePermisoProceso(253)
Dim DtUsados As DataTable = TmpDT.FiltraParametros("CveClasificacion = 20519") Dim DtUsados As DataTable = TmpDT.FiltraParametros("EsUsado = True")
TmpDT.Clear() TmpDT.Clear()
For Each Gv As GridViewRow In GvAplicaDevolucion.Rows For Each Gv As GridViewRow In GvAplicaDevolucion.Rows
@@ -22102,6 +22236,47 @@ Partial Class Ventas
ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString)) ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString))
End If End If
End Sub End Sub
Protected Sub LnkImprimirFormatoTelcel_Click(sender As Object, e As EventArgs)
Dim ObjVentas As New ClsVentas
Dim ObjInventario As New ClsInventarios
Dim SerieFolio As String = ""
Dim PedidoContrato As String = ""
Dim EnvioContacto As String = ""
Dim EnvioDireccion As String = ""
Dim Guia As String = ""
If ObjInventario.GetPaqueteriaGuia(-1, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
Guia = ObjInventario.DtResultados.Rows(0)("Guia").ToString
End If
End If
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
SerieFolio = ObjVentas.DtResultados.Rows(0)("SerieFolio").ToString
PedidoContrato = ObjVentas.DtResultados.Rows(0)("PedidoContrato").ToString
EnvioContacto = ObjVentas.DtResultados.Rows(0)("EnvioContacto").ToString
EnvioDireccion = $"{ObjVentas.DtResultados.Rows(0)("EnvioDireccion").ToString}, NO. EXT: {ObjVentas.DtResultados.Rows(0)("EnvioNoExt").ToString}, COLONIA: {ObjVentas.DtResultados.Rows(0)("EnvioColonia").ToString}, CP: {ObjVentas.DtResultados.Rows(0)("EnvioCP").ToString}"
End If
End If
Dim Dt As DataTable = Nothing
If ObjVentas.GetVentaDetalle(CveVenta) Then
Dt = ObjVentas.DtResultados
End If
ObjVentas.Dispose()
ObjInventario.Dispose()
If Dt.Rows.Count > 0 Then
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("EnvioContacto", EnvioContacto))
params.Add(New ReportParameter("SerieFolio", SerieFolio))
params.Add(New ReportParameter("PedidoContrato", PedidoContrato))
params.Add(New ReportParameter("EnvioDireccion", EnvioDireccion))
params.Add(New ReportParameter("Guia", Guia))
ImprimirPDF("Empresas/Grales/Formatos/Telcel.rdlc", Dt, params, String.Format("Formato RADIO MOVIL DIPSA S.A DE C.V. -{0}", Now.ToDateTime.ToShortDateString))
End If
End Sub
#End Region #End Region
#Region "REQUIERE OC" #Region "REQUIERE OC"
@@ -23958,9 +24133,11 @@ Partial Class Ventas
Else Else
Row("PorcentajeIVA") = DrPS("IVA") Row("PorcentajeIVA") = DrPS("IVA")
End If End If
Dim TotalCalculableImpuestos = (Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble) - Row("Descuento").ToString.ToDouble Dim TotalCalculableImpuestos As Decimal = (Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal) - Row("Descuento").ToString.ToDecimal
Dim TotalCalculableImpuestosIVA As Decimal = TotalCalculableImpuestos * (1 + Row("PorcentajeIEPS").ToString.ToDecimal)
Row("IVA") = Row("PorcentajeIVA").ToString.ToDouble Row("IVA") = Row("PorcentajeIVA").ToString.ToDouble
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDouble * TotalCalculableImpuestos, NumeroDecimales) Row("ImporteIVA") = (Row("PorcentajeIVA").ToString.ToDouble * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
End If End If
Else Else
Row("IVA") = 0 Row("IVA") = 0

View File

@@ -1,18 +1,24 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- <!--
Visual Studio global web project settings. Visual Studio global web project settings.
--> -->
<VisualWebDeveloper> <VisualWebDeveloper>
<StartupServices> <StartupServices>
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
</StartupServices>
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
</StartupServices>
</VisualWebDeveloper> </VisualWebDeveloper>