Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -288,3 +288,5 @@ vwd.webinfo
|
||||
/A/a.aspx
|
||||
/A/a.aspx.vb
|
||||
/General/Report.rdlc
|
||||
/TmpPruebas.aspx
|
||||
/TmpPruebas.aspx.vb
|
||||
|
||||
255
AF/CatAF.aspx
255
AF/CatAF.aspx
@@ -54,6 +54,10 @@
|
||||
<i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<asp:LinkButton ID="LnkPersonalizar" OnClick="LnkPersonalizar_Click" runat="server"><i class="fa fa-pencil"></i>Personalizar Columnas</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
@@ -160,7 +164,7 @@
|
||||
<asp:TemplateField ItemStyle-Width="132px">
|
||||
<ItemStyle BorderStyle="None" />
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlCaracteristica" runat="server" Text='<%# Eval("Caracteristica","{0}:")%>' Width="65"></asp:Label>
|
||||
<asp:Label ID="LtlCaracteristica" runat="server" Text='<%# Eval("Caracteristica", "{0}:")%>' Width="65"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
@@ -190,86 +194,311 @@
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div>
|
||||
<td>Encontrados:</td>
|
||||
<td><b>
|
||||
<asp:Literal ID="LtlTotalRegistros" runat="server"></asp:Literal></b></td>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpGV" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se Encontró Activo Fijo Registrado" ToolTip="Listado de Activos Fijos" CssClass="table table-smallpadding Widthall" GridLines="None">
|
||||
<div>
|
||||
Encontrados:<b><asp:Literal ID="LtlTotalRegistros" runat="server"></asp:Literal></b>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se Encontró Activo Fijo Registrado" ToolTip="Listado de Activos Fijos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Código">
|
||||
|
||||
<%-- 0 --%>
|
||||
<asp:TemplateField HeaderText="Código" >
|
||||
<ItemStyle Width="70px" />
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="Hpl" runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CveActivoFijo", "/AF/AF.aspx?CveActivoFijo={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
|
||||
<%-- 1 --%>
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<ItemTemplate>
|
||||
<%--<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'></asp:Literal>--%>
|
||||
<asp:HyperLink ID="HplDescripcion" runat="server" Text='<%# Eval("Descripcion") %>' NavigateUrl='<%# Eval("CveActivoFijo", "/AF/AF.aspx?CveActivoFijo={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 2 --%>
|
||||
<asp:TemplateField HeaderText="Tipo Act. Fijo">
|
||||
<ItemStyle Width="125px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoActivoFijo" runat="server" Text='<%# Eval("TipoActivoFijo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 3 --%>
|
||||
<asp:TemplateField HeaderText="Sub Tipo Act. Fijo">
|
||||
<ItemStyle Width="125px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubTIpoActivoFijo" runat="server" Text='<%# Eval("SubTIpoActivoFijo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 4 --%>
|
||||
<asp:TemplateField HeaderText="Responsable">
|
||||
<ItemStyle Width="125px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlResponsable" runat="server" Text='<%# Eval("Responsable")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 5 --%>
|
||||
<asp:TemplateField HeaderText="No. Serie">
|
||||
<ItemStyle Width="50px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNoSerie" runat="server" Text='<%# Eval("NoSerie")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 6 --%>
|
||||
<asp:TemplateField HeaderText="Año" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemStyle Width="50px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAño" runat="server" Text='<%# Eval("Año")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 7 --%>
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemStyle Width="110px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 8 --%>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="50px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstadoActivoFijo" runat="server" Text='<%# Eval("EstadoActivoFijo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 9 --%>
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="75px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- 10 --%>
|
||||
<asp:TemplateField HeaderText="Grupo">
|
||||
<ItemStyle Width="75px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("Grupo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 11 --%>
|
||||
<asp:TemplateField HeaderText="Marca">
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMarcaActivoFijo" runat="server" Text='<%# Eval("MarcaActivoFijo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 12 --%>
|
||||
<asp:TemplateField HeaderText="Modelo">
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlModeloActivoFijo" runat="server" Text='<%# Eval("ModeloActivoFijo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 13 --%>
|
||||
<asp:TemplateField HeaderText="Nombre Cuenta">
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombreCuenta" runat="server" Text='<%# Eval("NombreCuenta")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 14 --%>
|
||||
<asp:TemplateField HeaderText="Valor Compra" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemStyle Width="75px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlValorCompra" runat="server" Text='<%# Eval("ValorCompra", "{0:C}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 15 --%>
|
||||
<asp:TemplateField HeaderText="Fecha Compra" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="75px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaCompra" runat="server" Text='<%# Eval("FechaCompra", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 16 --%>
|
||||
<asp:TemplateField HeaderText="Fecha Baja" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="75px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaBaja" runat="server" Text='<%# Eval("FechaBaja", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 17 --%>
|
||||
<asp:TemplateField HeaderText="Proyecto">
|
||||
<ItemStyle Width="110px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlProyecto" runat="server" Text='<%# Eval("Proyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 18 --%>
|
||||
<asp:TemplateField HeaderText="Nombre Cliente">
|
||||
<ItemStyle Width="125px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombreCliente" runat="server" Text='<%# Eval("NombreCliente")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 19 --%>
|
||||
<asp:TemplateField HeaderText="Observaciones">
|
||||
<ItemStyle Width="150px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlObservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content SucursalCobranza-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped nobordertop table-advance table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCodigo" runat="server" Text=" Codigo" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescripcion" runat="server" Text=" Descripcion" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTipoActivoFijo" runat="server" Text=" Tipo Activo Fijo" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTIpoActivoFijo" runat="server" Text=" Sub Tipo Activo Fijo" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkResponsable" runat="server" Text=" Responsable" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkNoSerie" runat="server" Text=" No Serie" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkAño" runat="server" Text=" Año" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubProyecto" runat="server" Text=" Sub Proyecto" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstadoActivoFijo" runat="server" Text=" Estado Activo Fijo" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaIng" runat="server" Text=" Fecha Ing" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkGrupo" runat="server" Text=" Grupo" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMarcaActivoFijo" runat="server" Text=" Marca Activo Fijo" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkModeloActivoFijo" runat="server" Text=" Modelo Activo Fijo" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkNombreCuenta" runat="server" Text=" Nombre Cuenta" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkValorCompra" runat="server" Text=" Valor Compra" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaCompra" runat="server" Text=" Fecha Compra" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaBaja" runat="server" Text=" Fecha Baja" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="CheckBox1" runat="server" Text=" No Serie" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="CheckBox2" runat="server" Text=" Estado Activo Fijo" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="CheckBox3" runat="server" Text=" Responsable" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkProyecto" runat="server" Text=" Proyecto" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="CheckBox4" runat="server" Text=" Sub Proyecto" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkNombreCliente" runat="server" Text=" Nombre Cliente" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkObservaciones" runat="server" Text=" Observaciones" /></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="text-align: left">
|
||||
<asp:CheckBox ID="ChkGuardarPersonalizacion" runat="server" Text=" Guarda Personalización" TextAlign="Right" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<%--<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>--%>
|
||||
<asp:Button ID="BtnPersonalizar" ClientIDMode="Static" CssClass="btn btn-success" runat="server" Text="Personalizar" class="btn btn-success" OnClick="BtnPersonalizar_Click" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<%-- <asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<%-- <script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var OrdenarGV = function () {
|
||||
@@ -282,5 +511,5 @@
|
||||
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>--%>
|
||||
</asp:Content>
|
||||
|
||||
264
AF/CatAF.aspx.vb
264
AF/CatAF.aspx.vb
@@ -32,6 +32,19 @@ Partial Class AF_CatAF
|
||||
ViewState("DTAFCaracteristicas") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
If ViewState("DtDatos") Is Nothing Then
|
||||
ViewState("DtDatos") = New DataTable
|
||||
End If
|
||||
Return DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -46,6 +59,9 @@ Partial Class AF_CatAF
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
CargaPersonalizacion()
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -278,7 +294,7 @@ Partial Class AF_CatAF
|
||||
GvDatos.DataSource = DtActivosFijos
|
||||
GvDatos.DataBind()
|
||||
|
||||
'LtlTotalRegistros.Text = DtActivosFijos.Rows.Count.ToString.FormatoNumero(0)
|
||||
LtlTotalRegistros.Text = DtActivosFijos.Rows.Count.ToString.FormatoNumero(0)
|
||||
|
||||
UpGV.Update()
|
||||
OrdenaDatos()
|
||||
@@ -492,5 +508,251 @@ Partial Class AF_CatAF
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " P E R S O N A L I Z A R C O L U M N A S "
|
||||
|
||||
Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
ChkGuardarPersonalizacion.Checked = False
|
||||
RegistraScript("$('#DivPersonalizar').modal('show')")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
If ChkGuardarPersonalizacion.Checked Then
|
||||
GuardaPersonalizacion()
|
||||
End If
|
||||
|
||||
Personaliza()
|
||||
CargaGvDatos()
|
||||
UpGV.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub GuardaPersonalizacion()
|
||||
|
||||
Dim objUsuario As New ClsSisUsuarios
|
||||
Dim ListPersonalizada As New List(Of String)
|
||||
|
||||
If ChkCodigo.Checked Then ListPersonalizada.Add("Codigo")
|
||||
|
||||
If ChkDescripcion.Checked Then ListPersonalizada.Add("Descripcion")
|
||||
|
||||
If ChkTipoActivoFijo.Checked Then ListPersonalizada.Add("TipoActivoFijo")
|
||||
|
||||
If ChkSubTIpoActivoFijo.Checked Then ListPersonalizada.Add("SubTIpoActivoFijo")
|
||||
|
||||
If ChkResponsable.Checked Then ListPersonalizada.Add("Responsable")
|
||||
|
||||
If ChkNoSerie.Checked Then ListPersonalizada.Add("NoSerie")
|
||||
|
||||
If ChkAño.Checked Then ListPersonalizada.Add("Año")
|
||||
|
||||
If ChkSubProyecto.Checked Then ListPersonalizada.Add("SubProyecto")
|
||||
|
||||
If ChkEstadoActivoFijo.Checked Then ListPersonalizada.Add("EstadoActivoFijo")
|
||||
|
||||
If ChkFechaIng.Checked Then ListPersonalizada.Add("FechaIng")
|
||||
|
||||
If ChkGrupo.Checked Then ListPersonalizada.Add("Grupo")
|
||||
|
||||
If ChkMarcaActivoFijo.Checked Then ListPersonalizada.Add("MarcaActivoFijo")
|
||||
|
||||
If ChkModeloActivoFijo.Checked Then ListPersonalizada.Add("ModeloActivoFijo")
|
||||
|
||||
If ChkNombreCuenta.Checked Then ListPersonalizada.Add("NombreCuenta")
|
||||
|
||||
If ChkValorCompra.Checked Then ListPersonalizada.Add("ValorCompra")
|
||||
|
||||
If ChkFechaCompra.Checked Then ListPersonalizada.Add("FechaCompra")
|
||||
|
||||
If ChkFechaBaja.Checked Then ListPersonalizada.Add("FechaBaja")
|
||||
|
||||
If ChkProyecto.Checked Then ListPersonalizada.Add("Proyecto")
|
||||
|
||||
'If ChkSubProyecto.Checked Then ListPersonalizada.Add("SubProyecto")
|
||||
|
||||
If ChkNombreCliente.Checked Then ListPersonalizada.Add("NombreCliente")
|
||||
|
||||
If ChkObservaciones.Checked Then ListPersonalizada.Add("Observaciones")
|
||||
|
||||
|
||||
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "CatAF.aspx", String.Join("|", ListPersonalizada)) Then
|
||||
'Alert("Personalizacion guardada")
|
||||
End If
|
||||
|
||||
objUsuario.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaPersonalizacion()
|
||||
|
||||
Dim strBasePersonalizacion As String = UsuarioActual.Personalizaciones("CatAF.aspx")
|
||||
|
||||
If strBasePersonalizacion.Trim.Length > 0 Then
|
||||
|
||||
ChkCodigo.Checked = False
|
||||
ChkDescripcion.Checked = False
|
||||
ChkTipoActivoFijo.Checked = False
|
||||
ChkSubTIpoActivoFijo.Checked = False
|
||||
ChkResponsable.Checked = False
|
||||
ChkNoSerie.Checked = False
|
||||
ChkAño.Checked = False
|
||||
ChkSubProyecto.Checked = False
|
||||
ChkEstadoActivoFijo.Checked = False
|
||||
ChkFechaIng.Checked = False
|
||||
ChkGrupo.Checked = False
|
||||
ChkMarcaActivoFijo.Checked = False
|
||||
ChkModeloActivoFijo.Checked = False
|
||||
ChkNombreCuenta.Checked = False
|
||||
ChkValorCompra.Checked = False
|
||||
ChkFechaCompra.Checked = False
|
||||
ChkFechaBaja.Checked = False
|
||||
'ChkNoSerie.Checked = False
|
||||
'ChkEstadoActivoFijo.Checked = False
|
||||
'ChkResponsable.Checked = False
|
||||
ChkProyecto.Checked = False
|
||||
'ChkSubProyecto.Checked = False
|
||||
ChkNombreCliente.Checked = False
|
||||
ChkObservaciones.Checked = False
|
||||
|
||||
Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c)
|
||||
|
||||
For Each personalizacion As String In Personalizaciones
|
||||
Select Case personalizacion
|
||||
Case "Codigo"
|
||||
ChkCodigo.Checked = True
|
||||
Exit Select
|
||||
Case "Descripcion"
|
||||
ChkDescripcion.Checked = True
|
||||
Exit Select
|
||||
Case "TipoActivoFijo"
|
||||
ChkTipoActivoFijo.Checked = True
|
||||
Exit Select
|
||||
Case "SubTIpoActivoFijo"
|
||||
ChkSubTIpoActivoFijo.Checked = True
|
||||
Exit Select
|
||||
Case "Responsable"
|
||||
ChkResponsable.Checked = True
|
||||
Exit Select
|
||||
Case "NoSerie"
|
||||
ChkNoSerie.Checked = True
|
||||
Exit Select
|
||||
Case "Año"
|
||||
ChkAño.Checked = True
|
||||
Exit Select
|
||||
Case "SubProyecto"
|
||||
ChkSubProyecto.Checked = True
|
||||
Exit Select
|
||||
Case "EstadoActivoFijo"
|
||||
ChkEstadoActivoFijo.Checked = True
|
||||
Exit Select
|
||||
Case "FechaIng"
|
||||
ChkFechaIng.Checked = True
|
||||
Exit Select
|
||||
Case "Grupo"
|
||||
ChkGrupo.Checked = True
|
||||
Exit Select
|
||||
Case "MarcaActivoFijo"
|
||||
ChkMarcaActivoFijo.Checked = True
|
||||
Exit Select
|
||||
Case "ModeloActivoFijo"
|
||||
ChkModeloActivoFijo.Checked = True
|
||||
Exit Select
|
||||
Case "NombreCuenta"
|
||||
ChkNombreCuenta.Checked = True
|
||||
Exit Select
|
||||
Case "ValorCompra"
|
||||
ChkValorCompra.Checked = True
|
||||
Exit Select
|
||||
Case "FechaCompra"
|
||||
ChkFechaCompra.Checked = True
|
||||
Exit Select
|
||||
Case "FechaBaja"
|
||||
ChkFechaBaja.Checked = True
|
||||
Exit Select
|
||||
Case "Proyecto"
|
||||
ChkProyecto.Checked = True
|
||||
Exit Select
|
||||
Case "NombreCliente"
|
||||
ChkNombreCliente.Checked = True
|
||||
Exit Select
|
||||
Case "Observaciones"
|
||||
ChkObservaciones.Checked = True
|
||||
Exit Select
|
||||
Case Else
|
||||
Exit Select
|
||||
End Select
|
||||
Next
|
||||
|
||||
Else
|
||||
PersonalizaDefault()
|
||||
End If
|
||||
|
||||
Personaliza()
|
||||
|
||||
UPPersonalizar.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub PersonalizaDefault()
|
||||
|
||||
ChkCodigo.Checked = True
|
||||
ChkDescripcion.Checked = True
|
||||
ChkTipoActivoFijo.Checked = True
|
||||
ChkSubTIpoActivoFijo.Checked = True
|
||||
ChkResponsable.Checked = True
|
||||
ChkNoSerie.Checked = True
|
||||
ChkAño.Checked = True
|
||||
ChkSubProyecto.Checked = True
|
||||
ChkEstadoActivoFijo.Checked = True
|
||||
ChkFechaIng.Checked = True
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Personaliza()
|
||||
|
||||
GvDatos.Columns(0).Visible = ChkCodigo.Checked
|
||||
GvDatos.Columns(1).Visible = ChkDescripcion.Checked
|
||||
GvDatos.Columns(2).Visible = ChkTipoActivoFijo.Checked
|
||||
GvDatos.Columns(3).Visible = ChkSubTIpoActivoFijo.Checked
|
||||
GvDatos.Columns(4).Visible = ChkResponsable.Checked
|
||||
GvDatos.Columns(5).Visible = ChkNoSerie.Checked
|
||||
GvDatos.Columns(6).Visible = ChkAño.Checked
|
||||
GvDatos.Columns(7).Visible = ChkSubProyecto.Checked
|
||||
GvDatos.Columns(8).Visible = ChkEstadoActivoFijo.Checked
|
||||
GvDatos.Columns(9).Visible = ChkFechaIng.Checked
|
||||
|
||||
GvDatos.Columns(10).Visible = ChkGrupo.Checked
|
||||
GvDatos.Columns(11).Visible = ChkMarcaActivoFijo.Checked
|
||||
GvDatos.Columns(12).Visible = ChkModeloActivoFijo.Checked
|
||||
GvDatos.Columns(13).Visible = ChkNombreCuenta.Checked
|
||||
GvDatos.Columns(14).Visible = ChkValorCompra.Checked
|
||||
GvDatos.Columns(15).Visible = ChkFechaCompra.Checked
|
||||
GvDatos.Columns(16).Visible = ChkFechaBaja.Checked
|
||||
'GvDatos.Columns(17).Visible = ChkNoSerie.Checked
|
||||
'GvDatos.Columns(18).Visible = ChkEstadoActivoFijo.Checked
|
||||
'GvDatos.Columns(19).Visible = ChkResponsable.Checked
|
||||
GvDatos.Columns(17).Visible = ChkProyecto.Checked
|
||||
'GvDatos.Columns(18).Visible = ChkSubProyecto.Checked
|
||||
GvDatos.Columns(18).Visible = ChkNombreCliente.Checked
|
||||
GvDatos.Columns(19).Visible = ChkObservaciones.Checked
|
||||
|
||||
|
||||
|
||||
'Personalizo = 1
|
||||
'If Personalizo = 1 Then
|
||||
' ImgExcelPersonalizado.Visible = True
|
||||
'Else
|
||||
' ImgExcelPersonalizado.Visible = False
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
@@ -2617,18 +2617,18 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Bitacora"
|
||||
Public Function GetHistorialBitacora(CveAcarreo As Integer, CveOrdenCompra As Integer, CveActivoFijo As Integer,
|
||||
CveOS As Integer, CvePS As Integer, CveCompra As Integer, CveIE As Integer,
|
||||
CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional CvePersonal As Integer = -1,
|
||||
Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveConceptoNomina As Integer = -1, Optional CvePromocion As Integer = -1,
|
||||
Optional CveAsistencia As Integer = -1, Optional CveAsistenciaDetalle As Integer = -1, Optional CveTipoBitacora As Integer = -1,
|
||||
Optional FechaInicio As String = "", Optional FechaFin As String = "", Optional Fecha As Date = MinFecha) As Boolean
|
||||
Optional FechaInicio As String = "", Optional FechaFin As String = "", Optional Fecha As Date = MinFecha, Optional CveContrato As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_HistorialBitacoraGet")
|
||||
|
||||
@@ -2648,6 +2648,7 @@ Public Class ClsGenerales
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@CveConceptoNomina", SqlDbType.Int).Value = CveConceptoNomina
|
||||
.Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
|
||||
|
||||
.Add("@CveAsistencia", SqlDbType.Int).Value = CveAsistencia
|
||||
@@ -2698,7 +2699,7 @@ Public Class ClsGenerales
|
||||
CveIE As Integer, Actual As String, Anterior As String, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, SeElimino As Integer, Descripcion As String, Tipo As String,
|
||||
Id_Clave As String, Optional IdPoliza As Integer = -1, Optional CvePromocion As Integer = -1, Optional CveUsuarioTabla As Integer = -1,
|
||||
Optional CvePersonal As Integer = -1, Optional Motivo As String = "", Optional Fecha As String = "1900/01/01") As Boolean
|
||||
Optional CvePersonal As Integer = -1, Optional Motivo As String = "", Optional Fecha As String = "1900/01/01", Optional CveContrato As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_HistorialBitacoraAdd")
|
||||
|
||||
@@ -2725,6 +2726,7 @@ Public Class ClsGenerales
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@Motivo", SqlDbType.VarChar).Value = Motivo
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
|
||||
|
||||
End With
|
||||
|
||||
@@ -1513,6 +1513,33 @@ Public Class ClsInventarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetInvExistenciasCapas(CvePS As Integer, FechaI As DateTime, FechaF As DateTime, CveEmpresa As Integer, Optional CvesAlmacenes As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_ExistenciasCapasGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||
.Add("@CvesAlmacenes", SqlDbType.VarChar).Value = CvesAlmacenes
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
Me.OnError("Ocurrió un error al obtener las existencias de los movimientos.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las existencias de los movimientos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
Public Function GetKardexAlmacen(CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ Public Class ClsOC
|
||||
Public Property CveOrdenCompra As Integer
|
||||
Public Property CveOrdenCompraDetalle As Integer
|
||||
Public Property Folio As Integer
|
||||
Public Property Serie As String = ""
|
||||
Public Property CveIEAnticipo As Integer
|
||||
Public Property CveProveedorAnticipo As Integer
|
||||
Public Property FolioIEAnticipo As Integer
|
||||
@@ -120,6 +121,8 @@ Public Class ClsOC
|
||||
Public Property Promocion As String
|
||||
Public Property CveProveedorContacto As Integer
|
||||
Public Property NumRemision As String
|
||||
Public Property PorcentajeProntoPago As Decimal = 0
|
||||
|
||||
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
@@ -606,6 +609,7 @@ Public Class ClsOC
|
||||
Dim dr As DataRow = Data.Rows(0)
|
||||
_CveOrdenCompra = dr("CveOrdenCompra").ToString.ToEntero
|
||||
_Folio = dr("Folio").ToString.ToEntero
|
||||
_Serie = dr("Serie").ToString
|
||||
_CveIEAnticipo = dr("CveIEAnticipo").ToString.ToEntero
|
||||
_FolioIEAnticipo = dr("FolioIEAnticipo").ToString.ToEntero
|
||||
_ImporteAnticipo = dr("ImporteAnticipo").ToString.ToDecimal
|
||||
@@ -688,6 +692,7 @@ Public Class ClsOC
|
||||
Promocion = IfNull(dr("Promocion"), "", dr("Promocion").ToString).ToString
|
||||
CveProveedorContacto = If(Not IsDBNull(dr("CveProveedorContacto")), dr("CveProveedorContacto").ToString.ToEntero, -1)
|
||||
NumRemision = dr("NumRemision").ToString
|
||||
PorcentajeProntoPago = dr("PorcentajeProntoPago").ToString.ToDecimal
|
||||
|
||||
Retorno = True
|
||||
ElseIf Data.Rows.Count > 0 Then
|
||||
@@ -708,7 +713,7 @@ Public Class ClsOC
|
||||
Optional PorcentajeIVA As Decimal = 0.16D, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1,
|
||||
Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1,
|
||||
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1",
|
||||
Optional CveColectiva As Integer = -1, Optional MetodoPago As Integer = -1, Optional CveSubProyectoEntrega As Integer = -1) As Boolean
|
||||
Optional CveColectiva As Integer = -1, Optional MetodoPago As Integer = -1, Optional CveSubProyectoEntrega As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraAdd")
|
||||
@@ -755,6 +760,7 @@ Public Class ClsOC
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito
|
||||
.Add("@CveSubProyectoEntrega", SqlDbType.Int).Value = CveSubProyectoEntrega ' 0 Contado, 1 Credito
|
||||
.Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago
|
||||
|
||||
.Add("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
@@ -919,7 +925,7 @@ Public Class ClsOC
|
||||
Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IDPoliza As Integer = -1, Optional FechaExpiracion As Date = Nothing, Optional FolioAdicional As String = "",
|
||||
Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1",
|
||||
Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16D, Optional NumRemision As String = "-1", Optional MetodoPago As Integer = -1,
|
||||
Optional CveSubProyectoEntrega As Integer = -1) As Boolean
|
||||
Optional CveSubProyectoEntrega As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraUpdate")
|
||||
@@ -956,6 +962,8 @@ Public Class ClsOC
|
||||
.Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision
|
||||
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito
|
||||
.Add("@CveSubProyectoEntrega", SqlDbType.Int).Value = CveSubProyectoEntrega
|
||||
.Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago
|
||||
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -7850,7 +7850,10 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("Proyecto", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
|
||||
End If
|
||||
params.Add(New ReportParameter("CentroCostos", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
|
||||
params.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("Folio", If(ObjOC.Serie.Length > 0, $"{ObjOC.Serie}-{ObjOC.Folio.ToString}", ObjOC.Folio.ToString)))
|
||||
|
||||
params.Add(New ReportParameter("ProveedorNombre", ObjOC.RazonSocial))
|
||||
params.Add(New ReportParameter("ProveedorLugar", ObjOC.LugarEntrega))
|
||||
params.Add(New ReportParameter("Estatus", ObjOC.Estatus))
|
||||
|
||||
@@ -97,18 +97,24 @@ Public Class ClsValidaCFDi
|
||||
oAcuse = wsConsultaCFDI.Consulta(String.Format("?re={0}&rr={1}&tt={2}&id={3}", LRFCEmisor, LRFCReceptor, Importe, LFolioFiscal.ToUpper))
|
||||
'oAcuse = wsConsultaCFDI.Consulta("?re=LESA6211234B2&rr=GCO890418M56&tt=0000001360.000000&id=0C8BAD9C-A8C6-4A48-8FF5-0687AC6F1581")
|
||||
'Alert(oAcuse.Estado)
|
||||
If oAcuse.Estado.ToLower = "vigente" Then
|
||||
EsValida = 1
|
||||
End If
|
||||
If oAcuse.Estado.ToLower = "cancelado" Then
|
||||
EsValida = 2
|
||||
End If
|
||||
|
||||
If oAcuse.ValidacionEFOS = "100" Then
|
||||
EnListaEFOS = True
|
||||
If oAcuse IsNot Nothing AndAlso oAcuse.Estado IsNot Nothing AndAlso oAcuse.ValidacionEFOS IsNot Nothing Then
|
||||
If oAcuse.Estado.ToLower = "vigente" Then
|
||||
EsValida = 1
|
||||
End If
|
||||
If oAcuse.Estado.ToLower = "cancelado" Then
|
||||
EsValida = 2
|
||||
End If
|
||||
|
||||
If oAcuse.ValidacionEFOS = "100" Then
|
||||
EnListaEFOS = True
|
||||
Else
|
||||
EnListaEFOS = False
|
||||
End If
|
||||
Else
|
||||
EnListaEFOS = False
|
||||
EsValida = 0
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgError = "Op1. No se pudo validar la vigencia ante el SAT "
|
||||
GuardaLog(String.Format("Op1. {0}", ex.Message))
|
||||
@@ -122,7 +128,7 @@ Public Class ClsValidaCFDi
|
||||
|
||||
Dim Vigencia As Timbrado.AcuseCancelacionSAT = Timbrado.VerificarVigenciaSAT(LFolioFiscal.ToUpper, LRFCEmisor.Replace("%26", "&"), LRFCReceptor.Replace("%26", "&"), Importe, True)
|
||||
|
||||
If Vigencia IsNot Nothing Then
|
||||
If Vigencia IsNot Nothing AndAlso Vigencia.Estado IsNot Nothing AndAlso Vigencia.EsCancelable IsNot Nothing AndAlso Vigencia.EstatusCancelacion IsNot Nothing Then
|
||||
If Not Vigencia.Estado.ToUpper().Contains("NO ENCONTRADO") AndAlso Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
||||
EsValida = 1
|
||||
End If
|
||||
|
||||
@@ -5221,7 +5221,7 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AutorizacionLimitesUpdate(CveAutorizacion As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer) As Boolean
|
||||
Public Function AutorizacionLimitesUpdate(CveAutorizacion As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuarioAutorizo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_AutorizacionLimitesUpdate", CommandType.StoredProcedure)
|
||||
@@ -5233,7 +5233,7 @@ Public Class ClsVentas
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||
|
||||
.Add("@CveUsuarioAutorizo", SqlDbType.Int).Value = CveUsuarioAutorizo
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -148,6 +148,7 @@ Public Class LogicNominas
|
||||
Dim totalDb As Decimal
|
||||
Dim subTotalDb As Decimal
|
||||
Dim CodigoPostal As String = ""
|
||||
Dim CLABEInterbancaria As String = ""
|
||||
|
||||
Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades)
|
||||
'Conexiones a la Base de Datos
|
||||
@@ -175,7 +176,7 @@ Public Class LogicNominas
|
||||
|
||||
ClaveBanco = drow("ClaveBanco").ToString()
|
||||
BancoNumCuenta = drow("BancoNumCuenta").ToString()
|
||||
|
||||
CLABEInterbancaria = drow("CLABE").ToString()
|
||||
'If TimbreIndemnizacion Then
|
||||
' cfdi.Timbrado = drow("SeTimbroFiniquitoVal").ToString().ToEntero() = 1
|
||||
' cfdi.IStimbreFiniquito = True
|
||||
@@ -495,8 +496,19 @@ Public Class LogicNominas
|
||||
cfdi.Nomina.Receptor.Puesto = Puesto
|
||||
cfdi.Nomina.Receptor.CodigoRiesgoPuesto = CveSATRiesgoPuesto.ToString()
|
||||
cfdi.Nomina.Receptor.PeriodicidadPago = PeriodicidadPago
|
||||
If Not IsNothing(CLABEInterbancaria) OrElse CLABEInterbancaria.Trim().Length > 16 Then
|
||||
cfdi.Nomina.Receptor.NumeroCuenta = CLABEInterbancaria
|
||||
Else
|
||||
cfdi.Nomina.Receptor.NumeroCuenta = BancoNumCuenta
|
||||
End If
|
||||
|
||||
|
||||
cfdi.Nomina.Receptor.CodigoBanco = ClaveBanco
|
||||
cfdi.Nomina.Receptor.NumeroCuenta = BancoNumCuenta
|
||||
If Not IsNothing(cfdi.Nomina.Receptor.NumeroCuenta) AndAlso
|
||||
cfdi.Nomina.Receptor.NumeroCuenta.Trim().Length > 17 Then
|
||||
cfdi.Nomina.Receptor.CodigoBanco = ""
|
||||
|
||||
End If
|
||||
cfdi.Nomina.Receptor.SDI = SDI
|
||||
cfdi.Nomina.Receptor.SBC = SalarioDiarioSS
|
||||
cfdi.Nomina.Receptor.Sindicalizado = If(Sindicalizado, "Sí", "No")
|
||||
|
||||
@@ -452,6 +452,7 @@ Namespace Modelos
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetVenta(CveVenta, CveEmpresa, VerificaAlmacen:=VerificaAlmacen) Then
|
||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
setValues(ObjVentas.DtResultados.Rows(0))
|
||||
SetMetodoPago()
|
||||
SetMoneda()
|
||||
@@ -466,26 +467,33 @@ Namespace Modelos
|
||||
Else
|
||||
Me.VentaDesglosaIEPS = True
|
||||
End If
|
||||
|
||||
SetTotales(ObjVentas.DtResultados, ObjVentas)
|
||||
|
||||
If CargaDTDetalle Then
|
||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
Me.DtDetalle = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
|
||||
If CargaDatosCliente Then SetCliente()
|
||||
|
||||
If CargaDatosRelacionados Then IniciaValoresVentas(EsCancelacion)
|
||||
|
||||
If String.IsNullOrEmpty(DirectorioServidor) Then DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
|
||||
|
||||
Me.DirectorioServidor = DirectorioServidor
|
||||
Timbre = New CFDITimbre
|
||||
End If
|
||||
Else
|
||||
Me.CveVenta = -1
|
||||
Me.CveEmpresa = -1
|
||||
Me.CveCliente = -1
|
||||
|
||||
ErrorList.Add("No se pudo cargar la información de la factura.")
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If CargaDatosCliente Then SetCliente()
|
||||
|
||||
If CargaDatosRelacionados Then IniciaValoresVentas(EsCancelacion)
|
||||
|
||||
If String.IsNullOrEmpty(DirectorioServidor) Then DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
|
||||
|
||||
Me.DirectorioServidor = DirectorioServidor
|
||||
Timbre = New CFDITimbre
|
||||
End Sub
|
||||
Private Sub SetTotales(dtVentas As DataTable, ObjVentas As ClsVentas)
|
||||
Dim TmpDTImpuestos As New DataTable
|
||||
@@ -6331,93 +6339,94 @@ Namespace Modelos
|
||||
For Each CveRemision As Integer In ListaRemisionesCancelar
|
||||
Dim ObjRemision As New Factura(UsuarioActual, CveRemision, UsuarioActual.CveEmpresa, VerificaAlmacen:=True)
|
||||
|
||||
If ObjRemision IsNot Nothing AndAlso ObjRemision.SaldoAlmacen <> 0 Then
|
||||
If ObjRemision IsNot Nothing AndAlso ObjRemision.CveVenta > 0 Then
|
||||
|
||||
Dim SaldoAlmacenExA As Decimal = 0
|
||||
Dim SaldoAlmacenUsados As Decimal = 0
|
||||
Dim DtSaldosAlmacenRemision As DataTable = Nothing
|
||||
'VERIFICA SI HACE FALTA DEVOLVER PRODUCTOS Y USADOS EN ESPECIFICO
|
||||
If Not ErrorCancelar Then
|
||||
If ObjInventario.GetSaldoVentaDetalleAlmacen(ObjRemision.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
DtSaldosAlmacenRemision = ObjInventario.DtResultados.Copy()
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cargar los saldos de devolución. Por favor vuelva a intentar."
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Dim DtDevRemision As DataTable = DtDevoluciones.FiltraParametros($"CveRemision={CveRemision}")
|
||||
|
||||
Dim DtDevMovs As DataTable = DtDevRemision.FiltraParametros("", DistinctColumns:={"CveMovimiento", "CveRemision", "CveAlmacen", "CveAlmacenDestino"})
|
||||
|
||||
For Each RowDevolucion As DataRow In DtDevMovs.Rows
|
||||
CveAlmacen = RowDevolucion("CveAlmacen").ToString().ToEntero()
|
||||
CveAlmacenDevolucion = RowDevolucion("CveAlmacenDestino").ToString().ToEntero()
|
||||
|
||||
If CveAlmacen > 0 AndAlso DtSaldosAlmacenRemision IsNot Nothing Then
|
||||
SaldoAlmacenExA = DtSaldosAlmacenRemision.SUMD("SaldoAlmacen", $"CveAlmacen = {CveAlmacen}")
|
||||
End If
|
||||
|
||||
If SaldoAlmacenExA <> 0 Then
|
||||
If Not CancelarMovimientosRemision(CveRemision, CveAlmacen, CveAlmacenDevolucion, DtDevRemision.FiltraParametros($"CveMovimiento={RowDevolucion("CveMovimiento")}"), ObjVentas, ObjInventario, ObjConta) Then
|
||||
If ObjRemision.SaldoAlmacen <> 0 Then
|
||||
Dim SaldoAlmacenExA As Decimal = 0
|
||||
Dim SaldoAlmacenUsados As Decimal = 0
|
||||
Dim DtSaldosAlmacenRemision As DataTable = Nothing
|
||||
'VERIFICA SI HACE FALTA DEVOLVER PRODUCTOS Y USADOS EN ESPECIFICO
|
||||
If Not ErrorCancelar Then
|
||||
If ObjInventario.GetSaldoVentaDetalleAlmacen(ObjRemision.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
DtSaldosAlmacenRemision = ObjInventario.DtResultados.Copy()
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cancelar los movimientos de la remisión."
|
||||
Exit For
|
||||
MensajeError = "Ocurrió un error al cargar los saldos de devolución. Por favor vuelva a intentar."
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'CANCELAR MOVIMIENTOS DE USADOS SI TIENE
|
||||
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
Dim CveAlmacenUsado As Integer = 0
|
||||
Dim CveMovimientoUsado As Integer = 0
|
||||
Dim DtDevRemision As DataTable = DtDevoluciones.FiltraParametros($"CveRemision={CveRemision}")
|
||||
|
||||
If ObjInventario.GetInv_Mov(ObjRemision.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
CveMovimientoUsado = ObjInventario.DtResultados.FiltroPrimeroValor("CveMovimiento", "CvePS IS NULL AND CveConcepto = 42").ToEntero()
|
||||
CveAlmacenUsado = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CvePS IS NULL AND CveConcepto = 42").ToEntero()
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cargar los datos de devolución de usado. Por favor vuelva a intentar."
|
||||
End If
|
||||
Dim DtDevMovs As DataTable = DtDevRemision.FiltraParametros("", DistinctColumns:={"CveMovimiento", "CveRemision", "CveAlmacen", "CveAlmacenDestino"})
|
||||
|
||||
If CveAlmacenUsado > 0 AndAlso DtSaldosAlmacenRemision IsNot Nothing Then
|
||||
SaldoAlmacenUsados = DtSaldosAlmacenRemision.SUMD("SaldoAlmacen", $"CveAlmacen = {CveAlmacenUsado}")
|
||||
End If
|
||||
For Each RowDevolucion As DataRow In DtDevMovs.Rows
|
||||
CveAlmacen = RowDevolucion("CveAlmacen").ToString().ToEntero()
|
||||
CveAlmacenDevolucion = RowDevolucion("CveAlmacenDestino").ToString().ToEntero()
|
||||
|
||||
If Not ErrorCancelar AndAlso CveMovimientoUsado > 0 AndAlso SaldoAlmacenUsados <> 0 Then
|
||||
If CancelarInventarioUsado(ObjRemision, CveAlmacenUsado, CveMovimientoUsado, ObjInventario, ObjConta, Contabilizable:=False) <= 0 Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cancelar los usados. Por favor vuelva a intentar."
|
||||
If CveAlmacen > 0 AndAlso DtSaldosAlmacenRemision IsNot Nothing Then
|
||||
SaldoAlmacenExA = DtSaldosAlmacenRemision.SUMD("SaldoAlmacen", $"CveAlmacen = {CveAlmacen}")
|
||||
End If
|
||||
|
||||
If SaldoAlmacenExA <> 0 Then
|
||||
If Not CancelarMovimientosRemision(CveRemision, CveAlmacen, CveAlmacenDevolucion, DtDevRemision.FiltraParametros($"CveMovimiento={RowDevolucion("CveMovimiento")}"), ObjVentas, ObjInventario, ObjConta) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cancelar los movimientos de la remisión."
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'CANCELAR MOVIMIENTOS DE USADOS SI TIENE
|
||||
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
Dim CveAlmacenUsado As Integer = 0
|
||||
Dim CveMovimientoUsado As Integer = 0
|
||||
|
||||
If ObjInventario.GetInv_Mov(ObjRemision.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
CveMovimientoUsado = ObjInventario.DtResultados.FiltroPrimeroValor("CveMovimiento", "CvePS IS NULL AND CveConcepto = 42").ToEntero()
|
||||
CveAlmacenUsado = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CvePS IS NULL AND CveConcepto = 42").ToEntero()
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cargar los datos de devolución de usado. Por favor vuelva a intentar."
|
||||
End If
|
||||
|
||||
If CveAlmacenUsado > 0 AndAlso DtSaldosAlmacenRemision IsNot Nothing Then
|
||||
SaldoAlmacenUsados = DtSaldosAlmacenRemision.SUMD("SaldoAlmacen", $"CveAlmacen = {CveAlmacenUsado}")
|
||||
End If
|
||||
|
||||
If Not ErrorCancelar AndAlso CveMovimientoUsado > 0 AndAlso SaldoAlmacenUsados <> 0 Then
|
||||
If CancelarInventarioUsado(ObjRemision, CveAlmacenUsado, CveMovimientoUsado, ObjInventario, ObjConta, Contabilizable:=False) <= 0 Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cancelar los usados. Por favor vuelva a intentar."
|
||||
End If
|
||||
End If
|
||||
|
||||
'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE
|
||||
If Not ErrorCancelar AndAlso Not GenerarMovimientoGarantia(15, "Salida Garantía", ClsPaginas.NowADS(), ObjRemision, ObjAcum, ObjInventario, ObjConta) Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
|
||||
'CANCELA LOS FOLIOS DE GARANTIA
|
||||
If Not ErrorCancelar AndAlso Not ObjAcum.UpdateGarantiaCancelacion(ObjRemision.CveVenta) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al actualizar la garantía"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
If DtDevRemision IsNot Nothing Then
|
||||
DtDevRemision.Dispose()
|
||||
End If
|
||||
|
||||
'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE
|
||||
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If Not GenerarMovimientoGarantia(15, "Salida Garantía", ClsPaginas.NowADS(), ObjRemision, ObjAcum, ObjInventario, ObjConta) Then
|
||||
ErrorCancelar = True
|
||||
If DtDevMovs IsNot Nothing Then
|
||||
DtDevMovs.Dispose()
|
||||
End If
|
||||
End If
|
||||
|
||||
'CANCELA LOS FOLIOS DE GARANTIA
|
||||
If Not ErrorCancelar Then
|
||||
If Not ObjAcum.UpdateGarantiaCancelacion(ObjRemision.CveVenta) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al actualizar la garantía"
|
||||
End If
|
||||
End If
|
||||
|
||||
If DtDevRemision IsNot Nothing Then
|
||||
DtDevRemision.Dispose()
|
||||
End If
|
||||
|
||||
If DtDevMovs IsNot Nothing Then
|
||||
DtDevMovs.Dispose()
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cargar los datos de la remisión. Por favor vuelva a intentar."
|
||||
End If
|
||||
|
||||
If ObjRemision IsNot Nothing Then
|
||||
|
||||
@@ -554,7 +554,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim cevent As CalendarEvent = New CalendarEvent()
|
||||
|
||||
cevent.id = dr("CveContrato").ToString.ToEntero
|
||||
cevent.title = dr("DescripcionContrato").ToString
|
||||
cevent.title = If(dr("CodigoAF").ToString.Trim.Length > 0, $"#{dr("CodigoAF").ToString}-{dr("DescripcionContrato").ToString}", $"-{dr("DescripcionContrato").ToString}")
|
||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
||||
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
|
||||
cevent.FechaFinal = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)
|
||||
|
||||
@@ -965,7 +965,7 @@ Partial Class Bancos_Creditos
|
||||
If CveCredito > 0 Then
|
||||
If ObjCredito.UpdateCreditos(CveCredito, DdlTipoCredito.SelectedValue.ToEntero, TxtReferencia.Text, TxtObservaciones.Text, -1, -1, -1, DdlTipoMoneda.SelectedValue.ToEntero, TxtFechaInicio.Text.ToString.ToDate, FechaVencimiento, TxtTasa.Text.Trim.ToDouble, TxtSobreTasa.Text.Trim.ToDouble, TxtIVA.Text.ToDouble / 100,
|
||||
TxtPlazo.Text.Trim.ToEntero, -1, TxtVehiculoValor.Text.ToString.ToDouble, TxtComisionValor.Text.ToString.ToDouble, TxtSeguroMensual.Text.ToString.ToDouble, TxtOtrosGastosValor.Text.ToString.ToDouble,
|
||||
DdlProveedores.SelectedValue.ToEntero, RBLClasificacionContable.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False),
|
||||
DdlProveedores.SelectedValue.ToEntero, RBLClasificacionContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False),
|
||||
CreditoAnticipo:=TxtVehiculoAnticipo.Text.ToDouble, ComisionAnticipo:=TxtComisionAnticipo.Text.ToDouble, SeguroAnticipo:=TxtSeguroAnticipo.Text.ToDouble, OtrosGastosAnticipo:=TxtOtrosGastosAnticipo.Text.ToDouble, FondoGarantia:=TxtFondoGarantia.Text.ToDouble, SeguroValor:=TxtSeguroValor.Text.ToDouble, TipoInteres:=ChkTipoInteres.Checked) Then
|
||||
|
||||
If RegeneraTablaAmortizacion Then
|
||||
|
||||
@@ -6423,10 +6423,21 @@ Partial Class Compras_Compras
|
||||
Dim CvePrePoliza2Almacen As Integer = ObjConta.AddPrePolizas("Compras/Registrar/Almacen", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, NowADS(), ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
|
||||
|
||||
If CvePrePoliza2Almacen > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza2Almacen, True, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 205, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then
|
||||
|
||||
Dim ImpPrepoliza As Decimal = 0D
|
||||
Dim ImpPrepolizaMN As Decimal = 0D
|
||||
|
||||
For Each gvRowInv As GridViewRow In GvInv.Rows
|
||||
Dim gvCantidad As Decimal = gvRowInv.FCTextBox("TbCantidad").Text.ToDecimal
|
||||
Dim gvPU As Decimal = gvRowInv.DataKey("PU").ToDecimal
|
||||
ImpPrepoliza = ImpPrepoliza + (gvCantidad * gvPU)
|
||||
Next
|
||||
ImpPrepolizaMN = ImpPrepoliza * tipoCambioActual * Multiplicador
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza2Almacen, True, ImpPrepolizaMN.RoundSQL(2), ImpPrepolizaMN.RoundSQL(2), 205, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza2Almacen, False, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 68, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza2Almacen, False, ImpPrepolizaMN.RoundSQL(2), ImpPrepolizaMN.RoundSQL(2), 68, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
@@ -13318,10 +13329,11 @@ Partial Class Compras_Compras
|
||||
dtt = dtt.FiltraParametros($"Fecha >= #{NowADS.AddMonths(-12).ToString("yyyy/MM/dd")}#")
|
||||
End If
|
||||
DDLDevolucion.DataSource = dtt
|
||||
DDLDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
End If
|
||||
objcompras.Dispose()
|
||||
DDLDevolucion.DataBind()
|
||||
DDLDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
UPDevolucion.Update()
|
||||
|
||||
End Sub
|
||||
@@ -14242,6 +14254,7 @@ Partial Class Compras_Compras
|
||||
HdnVCveOC.Value = ""
|
||||
HdnCveEstatusOC.Value = ""
|
||||
|
||||
Dim tmpPorcentajeProntoPago As Decimal = 0
|
||||
Dim OC As New ClsOC
|
||||
If PopUpOC Then
|
||||
Dim ArrayCveOC As String() = CvesOC.Split(New Char() {","c})
|
||||
@@ -14252,6 +14265,7 @@ Partial Class Compras_Compras
|
||||
HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString)
|
||||
EntregaDirecta += If(OC.DtResultados.Rows(0)("EntregaDirecta").ToString = "True", 1, 0)
|
||||
MetodoPagoOC = OC.DtResultados.Rows(0)("MetodoPagoOC").ToString.ToEntero
|
||||
tmpPorcentajeProntoPago = OC.DtResultados.Rows(0)("PorcentajeProntoPago").ToString.ToDecimal
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -14268,6 +14282,11 @@ Partial Class Compras_Compras
|
||||
HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString)
|
||||
EntregaDirecta += If(OC.DtResultados.Rows(0)("EntregaDirecta").ToString = "True", 1, 0)
|
||||
MetodoPagoOC = OC.DtResultados.Rows(0)("MetodoPagoOC").ToString.ToEntero
|
||||
|
||||
If tmpPorcentajeProntoPago = 0 Then
|
||||
tmpPorcentajeProntoPago = OC.DtResultados.Rows(0)("PorcentajeProntoPago").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -14281,6 +14300,11 @@ Partial Class Compras_Compras
|
||||
PopUpOC = False
|
||||
|
||||
|
||||
If tmpPorcentajeProntoPago > 0 Then
|
||||
PorcentajeProntoPago = tmpPorcentajeProntoPago
|
||||
End If
|
||||
|
||||
|
||||
If HdnVCveOC.Value <> "" Then
|
||||
If HdnCveEstatusOC.Value = "" Then
|
||||
Alert("No se tiene especificado el siguiente estatus de la Orden(es) de Compra. Por favor verifique los estatus y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -412,7 +412,7 @@ Partial Class Contratos_Presupuestos
|
||||
CveConceptoContableNom = CveAgrupador
|
||||
End If
|
||||
|
||||
If CveClasificacion > 0 Then
|
||||
If CveClasificacion > 0 Or CveConceptoContableNom > 0 Then
|
||||
If ImporteClasi > 0 Then
|
||||
TieneError = Not ObjCont.AddPresupuestosDetalle(CvePresupuestoNuevo, CveClasificacion, CveTipoGasto, ImporteClasi, ObsDetalle, CveConceptoContableNom:=CveConceptoContableNom)
|
||||
If TieneError Then
|
||||
|
||||
@@ -82,7 +82,9 @@ Partial Class Contratos_RepPresupuestosDetalle
|
||||
Private Sub CargaSubProyecto()
|
||||
DdlSubProyecto.Items.Clear()
|
||||
If DdlProyecto.SelectedValue.ToEntero > 0 Or UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, 1))
|
||||
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110),
|
||||
GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, 1),
|
||||
GlobalDTSubProyectos(UsuarioActual.CveEmpresa, -1, DdlProyecto.SelectedValue.ToEntero, 1))
|
||||
End If
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.DataBind()
|
||||
@@ -94,19 +96,21 @@ Partial Class Contratos_RepPresupuestosDetalle
|
||||
Dim CveProyecto = IfNull(Request("CveProyecto"), -1).ToString.ToEntero
|
||||
Dim CveSubProyecto = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero
|
||||
Dim CveTipoGasto = IfNull(Request("CveTipoGasto"), -1).ToString.ToEntero
|
||||
Dim Agrupador = IfNull(Request("Agrupador"), -1).ToString.ToEntero
|
||||
Dim Agrupador = IfNull(Request("Agrupador"), -1).ToString.ToEntero
|
||||
|
||||
Gpo = IfNull(Request("CveAgrupador"), -1).ToString.ToEntero
|
||||
|
||||
Dim Mensual = CBool(IfNull(Request("Mensual"), False))
|
||||
Dim EsProyecto = CBool(IfNull(Request("EsProyecto"), False))
|
||||
'If Agrupador = 1 Then Agrupador = 2 Else Agrupador = 1
|
||||
DdlAgrupador.SelectedValueExist(Agrupador)
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
|
||||
If DdlAgrupador.SelectedValue.ToEntero = 1 Then
|
||||
If DdlAgrupador.SelectedValue.ToEntero = 1 Then 'Clasificación
|
||||
DdlClasificacion.SelectedValueExist(Gpo)
|
||||
DdlProyecto.SelectedValueExist(CveProyecto)
|
||||
DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
||||
ElseIf DdlAgrupador.SelectedValue.ToEntero = 2 Then
|
||||
ElseIf DdlAgrupador.SelectedValue.ToEntero = 2 Then ' Centro costo
|
||||
If Not EsProyecto Then
|
||||
Dim Dr As DataRow = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, Gpo)(0)
|
||||
DdlProyecto.SelectedValueExist(Dr("CveProyecto"))
|
||||
@@ -121,6 +125,10 @@ Partial Class Contratos_RepPresupuestosDetalle
|
||||
TxtFiltrosFechaInicio.Text = FechaInicio
|
||||
TxtFiltrosFechaFin.Text = FechaFin
|
||||
ChkMensual.Checked = Mensual
|
||||
|
||||
If Agrupador = 1 Then Agrupador = 2 Else Agrupador = 1
|
||||
DdlAgrupador.SelectedValueExist(Agrupador)
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -121,30 +121,33 @@
|
||||
Kardex
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Conditional" >
|
||||
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight: bold;"></i>PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight: bold;"></i>Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSeries" Visible="false" runat="server"><i class="fa fa-list"></i> Series Disponibles</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkSeries" Visible="false" runat="server"><i class="fa fa-list"></i>Series Disponibles</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCaducidad" Visible="false" runat="server"><i class="fa fa-list"></i> Caducidad de producto</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkCaducidad" Visible="false" runat="server"><i class="fa fa-list"></i>Caducidad de producto</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink runat="server" ID="HlAyuda" NavigateUrl="/Documentacion/DocumentacionInventarios.aspx#Kardex"><i class="fa fa-question-circle"></i> Ayuda</asp:HyperLink>
|
||||
<asp:LinkButton ID="LnkExistenciasPorCapas" Visible="false" runat="server"><i class="fa fa-list"></i>Existecias por capas</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink runat="server" ID="HlAyuda" NavigateUrl="/Documentacion/DocumentacionInventarios.aspx#Kardex"><i class="fa fa-question-circle"></i>Ayuda</asp:HyperLink>
|
||||
<%--<div>
|
||||
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#Kardex"> </a>
|
||||
</div>--%>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgImprimir" />
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
<asp:PostBackTrigger ControlID="ImgImprimir" />
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
|
||||
</Triggers>
|
||||
|
||||
@@ -164,17 +167,17 @@
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row" style="padding-top: 10px; position: relative;">
|
||||
<asp:Label runat="server" ID="LblPS" CssClass="col-md-1 truncate" >Producto:</asp:Label>
|
||||
<asp:Label runat="server" ID="LblPS" CssClass="col-md-1 truncate">Producto:</asp:Label>
|
||||
<div class="col-md-2 " style="min-width: 250px; max-width: 300px;">
|
||||
<ADS:Dropdownlost ID="ddlProducto2" runat="server" AutoPostBack="False" DataTextField="PSCodigo" IncluyeTodos="false" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="ddlProducto2" runat="server" autopostback="False" DataTextField="PSCodigo" IncluyeTodos="false" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;" id="lblAlm" runat="server">Almacén:</label>
|
||||
<div class="col-md-2">
|
||||
<%--<asp:DropDownList ID="ddlAlmacen" runat="server" CssClass="select2me " Style="width: 175px !important;" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>--%>
|
||||
<asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
|
||||
<asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<label class="col-md-1" style="max-width: 85px;">Fecha Inicio:</label>
|
||||
<div class="col-md-1" style="min-width: 115px;">
|
||||
@@ -192,7 +195,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<label class="col-md-1 " style="max-width: 85px;">Fecha Fin:</label>
|
||||
<div class="col-md-1" style="min-width: 115px;">
|
||||
@@ -217,77 +220,81 @@
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Clasificación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;">Unidad Medida:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlUnidadMedida" runat="server" CssClass="select2me " Style="width: 200px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="cbEntrada" CssClass="md-checksd" runat="server" Text="Entrada" Checked="True" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="cbSalida" CssClass="md-checksd" runat="server" Text="Salida" Checked="True" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#ModalTiposAlmacen">Filtrar tipos almacén</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DivSerie" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;">Serie:</label>
|
||||
<div class="col-md-1 ">
|
||||
<asp:TextBox ID="TxtSerie" CssClass="form-control input-sm" runat="server" Width="90px" />
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Clasificación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;">Unidad Medida:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlUnidadMedida" runat="server" CssClass="select2me " Style="width: 200px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" visible="false" id="DVFiltroCodigo">
|
||||
<div class="col-md-1">Código Inicio:</div>
|
||||
<div class="col-md-2"><asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px"></asp:TextBox></div>
|
||||
<div class="col-md-1" style="max-width: 80px;">Código Fin:</div>
|
||||
<div class="col-md-2"><asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px"></asp:TextBox></div>
|
||||
<div class="col-md-1" style="max-width: 85px;">Marca</div>
|
||||
<div class="col-md-1" style="min-width: 150px;">
|
||||
<asp:DropDownList ID="DdlMarca" CssClass="form-control input-sm select2me" CssStyle="width: 100%;" Width="100%" runat="server" DataTextField="Marca" DataValueField="CveMarca" >
|
||||
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 85px;">Proveedor:</div>
|
||||
<div class="col-md-1" style="min-width: 150px;">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" runat="server" id="DVNavegar" >
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<asp:LinkButton runat="server" ID="LnkPSAntyerior" OnClick="LnkPSAntyerior_Click" CssClass="btn btn-primary">Anterior</asp:LinkButton>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="cbEntrada" CssClass="md-checksd" runat="server" Text="Entrada" Checked="True" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="cbSalida" CssClass="md-checksd" runat="server" Text="Salida" Checked="True" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#ModalTiposAlmacen">Filtrar tipos almacén</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DivSerie" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;">Serie:</label>
|
||||
<div class="col-md-1 ">
|
||||
<asp:TextBox ID="TxtSerie" CssClass="form-control input-sm" runat="server" Width="90px" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<asp:LinkButton runat="server" ID="LnkPSSiguiente" OnClick="LnkPSSiguiente_Click" CssClass="btn btn-primary">Siguiente</asp:LinkButton>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" visible="false" id="DVFiltroCodigo">
|
||||
<div class="col-md-1">Código Inicio:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 80px;">Código Fin:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 85px;">Marca</div>
|
||||
<div class="col-md-1" style="min-width: 150px;">
|
||||
<asp:DropDownList ID="DdlMarca" CssClass="form-control input-sm select2me" CssStyle="width: 100%;" Width="100%" runat="server" DataTextField="Marca" DataValueField="CveMarca">
|
||||
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 85px;">Proveedor:</div>
|
||||
<div class="col-md-1" style="min-width: 150px;">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" runat="server" id="DVNavegar">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<asp:LinkButton runat="server" ID="LnkPSAntyerior" OnClick="LnkPSAntyerior_Click" CssClass="btn btn-primary">Anterior</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<asp:LinkButton runat="server" ID="LnkPSSiguiente" OnClick="LnkPSSiguiente_Click" CssClass="btn btn-primary">Siguiente</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -424,7 +431,7 @@
|
||||
<asp:HyperLink runat="server" Target="_blank" ID="hlFolioD" Text='<%# Eval("FolioDocto")%>' CssClass="Texto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Folio Rel." Visible="false">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Folio Rel." Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" Target="_blank" ID="hlFolioDr" Text='<%# Eval("FolioRelacionEntrada")%>' NavigateUrl='<%# Eval("CveVentaRelacionada", "/Ventas/Ventas.aspx?CveVenta={0}")%>' CssClass="Texto" />
|
||||
</ItemTemplate>
|
||||
@@ -434,31 +441,31 @@
|
||||
<asp:Label ID="lbUm" runat="server" Text='<%# Eval("UnidadMedida")%>' data-toggle="tooltip" title='<%# Eval("CveUnidadMedida")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Sección" Visible="false">
|
||||
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Sección" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbSA" runat="server" Text='<%# Eval("SeccionAlmacen")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Serie" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbS" runat="server" Text='<%# Eval("Serie")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Lote" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbL" runat="server" Text='<%# Eval("Lote")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Center" HeaderText="F. Caducidad" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbFCad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}")%>' data-toggle="tooltip"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" HeaderText="Entrada">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbEntrada" runat="server"
|
||||
Text='<%# Eval("Entrada", "{0:###,###.####}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" HeaderText="Salida">
|
||||
<ItemTemplate>
|
||||
@@ -477,19 +484,19 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbImporte" runat="server"
|
||||
Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right" HeaderText="Existencias">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbExistencias" runat="server"
|
||||
Text='<%# Eval("Existencias", "{0:#,###.####}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbValor" runat="server"
|
||||
Text='<%# Eval("ValorInventario", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -545,7 +552,7 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div id="DivModalSerie" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpdatePanel1" UpdateMode="Conditional" RenderMode="Inline" style="width:50%">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpdatePanel1" UpdateMode="Conditional" RenderMode="Inline" style="width: 50%">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
@@ -553,22 +560,22 @@
|
||||
<asp:Literal ID="LtlSerieTitle" Text="Series Disponibles" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="width:100%">
|
||||
<div style="width:98%;margin-left:1.5%;margin-right:1.5%">
|
||||
<div class="row" style="width: 100%">
|
||||
<div style="width: 98%; margin-left: 1.5%; margin-right: 1.5%">
|
||||
<asp:UpdatePanel ID="UpGridSeries" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvSeries" Width="98%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None"
|
||||
DataKeyNames="CveEmpresa,CveAlmacen,Almacen,PS,CvePS,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Existencia,Valor">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Almacén" DataField="Almacen"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie"/>
|
||||
<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:#,###}"/>
|
||||
</Columns>
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvSeries" Width="98%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None"
|
||||
DataKeyNames="CveEmpresa,CveAlmacen,Almacen,PS,CvePS,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Existencia,Valor">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Almacén" DataField="Almacen" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" />
|
||||
<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:#,###}" />
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -581,7 +588,7 @@
|
||||
</div>
|
||||
|
||||
<div id="DivModalCaducidad" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpdatePanel2" UpdateMode="Conditional" RenderMode="Inline" style="width:50%">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpdatePanel2" UpdateMode="Conditional" RenderMode="Inline" style="width: 50%">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
@@ -589,28 +596,28 @@
|
||||
<asp:Literal ID="Literal1" Text="Producto con caducidad" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="width:100%">
|
||||
<div style="width:98%;margin-left:1.5%;margin-right:1.5%">
|
||||
<div class="row" style="width: 100%">
|
||||
<div style="width: 98%; margin-left: 1.5%; margin-right: 1.5%">
|
||||
<asp:UpdatePanel ID="UpProductoCaducidad" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div runat="server" id="DivImprimir" style="text-align:right" visible="false">
|
||||
<asp:HyperLink ID="ImprimirQR" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Imprimir QR</asp:HyperLink>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvProductoCaducidad" Width="98%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None"
|
||||
DataKeyNames="Almacen,Cantidad,FechaCaducidad,Lote">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Almacén" DataField="Almacen"/>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="125px"/>
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="125px"/>
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="100px"/>
|
||||
</Columns>
|
||||
<ContentTemplate>
|
||||
<div runat="server" id="DivImprimir" style="text-align: right" visible="false">
|
||||
<asp:HyperLink ID="ImprimirQR" runat="server"><i class="fa fa-file-pdf-o" style="font-weight: bold;"></i>Imprimir QR</asp:HyperLink>
|
||||
</div>
|
||||
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:GridView ID="GvProductoCaducidad" Width="98%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None"
|
||||
DataKeyNames="Almacen,Cantidad,FechaCaducidad,Lote">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Almacén" DataField="Almacen" />
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="125px" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="125px" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -622,6 +629,41 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DivModalExistenciasCapas" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpExistenciasCapas" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal2" Text="Movimientos de entrada" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:GridView ID="GvExistenciasCapas" Width="100%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="10%" HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="hlFolio" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveMovimiento", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}")%>' Target="_blank" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Folio" DataField="Folio" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaMovto" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Almacen" DataField="Almacen" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Entrada" DataField="Entrada" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Salida" DataField="Salida" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Disponible" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Security.Cryptography.Pkcs
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CGame
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Microsoft.VisualBasic
|
||||
Imports Telerik.Web.UI
|
||||
|
||||
Partial Class Inventarios_Kardex
|
||||
@@ -279,6 +281,10 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
LnkSeries.Visible = AuxAplicaSerie
|
||||
LnkCaducidad.Visible = AuxAplicaCad
|
||||
|
||||
If UsuarioActual.CveEmpresa = 172 Then
|
||||
LnkExistenciasPorCapas.Visible = True
|
||||
End If
|
||||
'CARGA INDICADORES
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
@@ -574,6 +580,30 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExistenciasPorCapas_OnClick(sender As Object, e As EventArgs) Handles LnkExistenciasPorCapas.Click
|
||||
|
||||
Dim FechaI As DateTime = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text.ToDateTime(), MinFecha)
|
||||
Dim FechaF As DateTime = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text.ToDateTime(), MaxFecha)
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
If ObjInv.GetInvExistenciasCapas(ddlProducto2.SelectedValue.ToEntero(), FechaI, FechaF, UsuarioActual.CveEmpresa, ddlAlmacen.GetSelectedValues()) Then
|
||||
GvExistenciasCapas.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
End Using
|
||||
|
||||
GvExistenciasCapas.DataBind()
|
||||
UpExistenciasCapas.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivModalExistenciasCapas"))
|
||||
End Sub
|
||||
|
||||
Protected Sub GvExistenciasCapas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvExistenciasCapas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CodigoPS").Contains("Total") Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -19,88 +19,88 @@
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="Pnl" runat="server" DefaultButton="BtnBuscar">
|
||||
|
||||
<table style="width: 750px;">
|
||||
<tr>
|
||||
<td class="Titulos" colspan="4">Filtros para búsqueda</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td class="text-right"><b>Producto/Servicio:</b></td>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<ADS:Dropdownlost ID="DDlPS" AutoPostBack="false" runat="server" IncluyeTodos="false" DataTextField="PSCodigo" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width:400px;"></ADS:Dropdownlost>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td>
|
||||
<asp:LinkButton runat="server" ID="LnkBsucarSerie" CssClass="Texto" Text="Buscar por Serie" OnClick="LnkBsucarSerie_Click" Visible="false"></asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivMed" visible="false">
|
||||
<td class="text-right">Medida: </td>
|
||||
<td>
|
||||
<asp:DropDownList runat="server" ID="DdlMedidas" CssClass="form-control input-sm select2me" Width="150px" DataTextField="Medida" DataValueField="CveMedida"></asp:DropDownList>
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x: hidden; width: 150px; height: 70px" runat="server" visible="False">
|
||||
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%#String.Concat(Eval("MedidaEquivalente"), " ", Eval("RinTamañoEquivalente")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivRin" visible="false">
|
||||
<td class="text-right">Rin: </td>
|
||||
<td>
|
||||
<asp:DropDownList runat="server" ID="DdlRin" CssClass="form-control input-sm select2me" Width="150px" DataTextField="RinTamaño" DataValueField="CveRinTamaño"></asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivCodigoSeriePS" visible="false">
|
||||
<td class="text-right"><b>C. Barras:</b></td>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
<asp:TextBox ID="TxtCodigoPS" ClientIDMode="Static" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr align="left" runat="server" id="DivSucursal" visible="false">
|
||||
<td class="text-right"><b>Sucursal:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlSubProyecto" AutoPostBack="True" runat="server" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="400px"></asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr align="left" runat="server" id="TrCompuesto" visible="false">
|
||||
<td class="text-right"><b>Compuesto:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCompuesto" runat="server" CssClass="form-control input-sm select2me" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center;">
|
||||
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" />
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="width: 750px;">
|
||||
<tr>
|
||||
<td class="Titulos" colspan="4">Filtros para búsqueda</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td class="text-right"><b>Producto/Servicio:</b></td>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<ADS:Dropdownlost ID="DDlPS" AutoPostBack="false" runat="server" IncluyeTodos="false" DataTextField="PSCodigo" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width:400px;"></ADS:Dropdownlost>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td>
|
||||
<asp:LinkButton runat="server" ID="LnkBsucarSerie" CssClass="Texto" Text="Buscar por Serie" OnClick="LnkBsucarSerie_Click" Visible="false"></asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivMed" visible="false">
|
||||
<td class="text-right">Medida: </td>
|
||||
<td>
|
||||
<asp:DropDownList runat="server" ID="DdlMedidas" CssClass="form-control input-sm select2me" Width="150px" DataTextField="Medida" DataValueField="CveMedida"></asp:DropDownList>
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x: hidden; width: 150px; height: 70px" runat="server" visible="False">
|
||||
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%#String.Concat(Eval("MedidaEquivalente"), " ", Eval("RinTamañoEquivalente")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivRin" visible="false">
|
||||
<td class="text-right">Rin: </td>
|
||||
<td>
|
||||
<asp:DropDownList runat="server" ID="DdlRin" CssClass="form-control input-sm select2me" Width="150px" DataTextField="RinTamaño" DataValueField="CveRinTamaño"></asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivCodigoSeriePS" visible="false">
|
||||
<td class="text-right"><b>C. Barras:</b></td>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
<asp:TextBox ID="TxtCodigoPS" ClientIDMode="Static" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr align="left" runat="server" id="DivSucursal" visible="false">
|
||||
<td class="text-right"><b>Sucursal:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlSubProyecto" AutoPostBack="True" runat="server" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="400px"></asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr align="left" runat="server" id="TrCompuesto" visible="false">
|
||||
<td class="text-right"><b>Compuesto:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCompuesto" runat="server" CssClass="form-control input-sm select2me" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center;">
|
||||
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" />
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -111,20 +111,14 @@
|
||||
<div class="row" style="max-width: 780px;">
|
||||
<div class="col-md-12">
|
||||
<asp:Literal ID="LtPs" Text="" runat="server">  </asp:Literal>
|
||||
|
||||
<asp:Literal ID="LtlIEPS" Text="IEPS:" runat="server" Visible="false">  </asp:Literal>
|
||||
|
||||
|
||||
<asp:Literal ID="LtlIEPSPorcentaje" Text="" runat="server" Visible="false">  </asp:Literal>
|
||||
|
||||
<asp:Literal ID="LtlIVA" Text="IVA:" runat="server" Visible="false">  </asp:Literal>
|
||||
|
||||
<asp:Literal ID="LtlIVAPorcentaje" Text="" runat="server" Visible="false">  </asp:Literal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="max-width: 780px;">
|
||||
<div class="col-md-12" style="display: flex; justify-content: flex-end">
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="text-right" style="text-align: right;" runat="server" id="DivListasPrecios2" visible="false">Lista: </td>
|
||||
|
||||
@@ -198,19 +198,15 @@ Partial Class Inventarios_Default
|
||||
objPS.Dispose()
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
If CBool(dr("AplicaIEPS")) Then
|
||||
LtlIEPS.Visible = True
|
||||
LtlIEPSPorcentaje.Visible = True
|
||||
LtlIEPSPorcentaje.Text = $"<b>% {(dr("IEPSPorcentaje").ToString.ToDouble * 100).FormatoNumero}</b>"
|
||||
LtlIEPSPorcentaje.Text = $"IEPS: <b>% {(dr("IEPSPorcentaje").ToString.ToDouble * 100).FormatoNumero}</b>"
|
||||
Else
|
||||
LtlIEPS.Visible = False
|
||||
LtlIEPSPorcentaje.Visible = False
|
||||
End If
|
||||
If dr("IVA").ToString = "-1" OrElse dr("IVA").ToString.ToDecimal > 0 Then
|
||||
LtlIVA.Visible = True
|
||||
LtlIVAPorcentaje.Visible = True
|
||||
LtlIVAPorcentaje.Text = $"<b>Si</b>"
|
||||
LtlIVAPorcentaje.Text = $"IVA: <b>Si</b>"
|
||||
Else
|
||||
LtlIVA.Visible = False
|
||||
LtlIVAPorcentaje.Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -89,6 +89,8 @@
|
||||
<asp:BoundField DataField="Folio" HeaderText="Folio" ItemStyle-Width="80px" />
|
||||
<asp:BoundField DataField="AlmacenOrigen" HeaderText="Origen" ItemStyle-Width="200px" />
|
||||
<asp:BoundField DataField="AlmacenDestino" HeaderText="Destino" ItemStyle-Width="200px" />
|
||||
<asp:BoundField DataField="Observaciones" HeaderText="Observaciones" />
|
||||
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" ItemStyle-Width="90px" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Nombre" HeaderText="Solicitante" />
|
||||
|
||||
@@ -163,6 +165,20 @@
|
||||
<asp:RequiredFieldValidator ID="RfvDdlAlmacenDestino" runat="server" InitialValue="-1" ControlToValidate="DdlAlmacenDestino" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacén Destino''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGeneraSolictud"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class=" form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control marginFixRow" runat="server" MaxLength="255" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtObservaciones.ClientID.ToString()%>">Observaciones:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<hr style="border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));" />
|
||||
<div class="row marginRowLeft">
|
||||
@@ -185,14 +201,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <div class="row">
|
||||
<div class="col-md-12" style="text-align:right!important">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Estatus = 3
|
||||
End If
|
||||
|
||||
Dim Folio As Integer = ObjInventarios.AddTrasladoSolicitud("", DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, Estatus, -1, NowADS, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EstatusAlmacen:=EstatusAlmacen)
|
||||
Dim Folio As Integer = ObjInventarios.AddTrasladoSolicitud(TxtObservaciones.text, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, Estatus, -1, NowADS, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EstatusAlmacen:=EstatusAlmacen)
|
||||
|
||||
If Folio > 0 Then
|
||||
CveTraspasoSolicitud = ObjInventarios.CveTraspasoSolicitud
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePeriodo, CveTipoPeriodo,CveSubTipoPeriodo, Ejercicio, Numero, FechaInicio,FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, Estatus, CveTurno"
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePeriodo, CveTipoPeriodo,CveSubTipoPeriodo, Ejercicio, Mes,Numero, FechaInicio,FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, Estatus, CveTurno"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvDatos" data-tableheader=".tableheader" EmptyDataText="No se encontraron Periodos Registrados"
|
||||
GridLines="None" data-rows="0" ShowHeader="false">
|
||||
<Columns>
|
||||
@@ -383,6 +383,12 @@
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtNumeroAdd" runat="server" CssClass=" form-control input-sm" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-xs-2" style="text-align: left;">
|
||||
Mes:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtMes" runat="server" CssClass=" form-control input-sm" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
|
||||
@@ -227,8 +227,8 @@ Partial Class Nomina_CatPeriodos
|
||||
RegistraScript("$('#divAddPeriodo').modal('show');")
|
||||
End Sub
|
||||
Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregar.Click
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
|
||||
Dim mensajeerror As String = ""
|
||||
Dim EsInicioMes As Boolean
|
||||
Dim EsFinMes As Boolean
|
||||
Dim EsInicioSS As Boolean
|
||||
@@ -237,72 +237,85 @@ Partial Class Nomina_CatPeriodos
|
||||
Dim EsFinAño As Boolean
|
||||
Dim FueCalculado As Boolean
|
||||
Dim Numero As Integer = TxtNumeroAdd.Text.Trim.ToEntero()
|
||||
Dim FechaInicio As Date = TxtFechaInicioAdd.Text.Trim.ToDate
|
||||
Dim FechaFin As Date = TxtFechaFinAdd.Text.Trim.ToDate
|
||||
Dim Mes As Integer = FechaFin.Month
|
||||
Dim FechaInicio As Date = TxtFechaInicioAdd.Text().Trim.ToDate()
|
||||
Dim FechaFin As Date = TxtFechaFinAdd.Text.Trim().ToDate()
|
||||
Dim Mes As Integer = TxtMes.Text.Trim().ToEntero()
|
||||
If Not ((FechaFin.Month = 12 And (Mes = 1)) OrElse (FechaFin.Month = 1 And (Mes = 12)) OrElse (Math.Abs(FechaFin.Month - Mes) <= 1)) OrElse
|
||||
Mes > 12 OrElse Mes < 1 Then
|
||||
TxtMes.Text = FechaFin.Month.ToString()
|
||||
mensajeerror = "El mes seleccionado para el periodo de nómina debe ser el mes actual, el mes anterior, o el mes siguiente a la fecha de finalización."
|
||||
End If
|
||||
Dim Ejercicio As Integer = FechaFin.Year
|
||||
Dim CveTipoPeriodo As Integer = DdlTipoPeriodoAdd.SelectedValue.ToEntero()
|
||||
Dim Estatus As Integer = DdlEstatusAdd.SelectedValue.ToEntero()
|
||||
Dim CvePeriodo As Integer = hdnCvePerido.Value.ToEntero()
|
||||
Dim CveSubTipoPeriodo As Integer = TxtCveSubTipoPeriodoAdd.Text.ToEntero()
|
||||
If CveSubTipoPeriodo <= 1 Then
|
||||
CveSubTipoPeriodo = 1
|
||||
End If
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
Select Case item.Value.ToEntero()
|
||||
Case 1
|
||||
If item.Selected Then EsInicioMes = True Else EsInicioMes = False
|
||||
Case 2
|
||||
If item.Selected Then EsFinMes = True Else EsFinMes = False
|
||||
Case 3
|
||||
If item.Selected Then EsInicioSS = True Else EsInicioSS = False
|
||||
Case 4
|
||||
If item.Selected Then EsFinSS = True Else EsFinSS = False
|
||||
Case 5
|
||||
If item.Selected Then EsInicioAño = True Else EsInicioAño = False
|
||||
Case 6
|
||||
If item.Selected Then EsFinAño = True Else EsFinAño = False
|
||||
Case 7
|
||||
If item.Selected Then FueCalculado = True Else FueCalculado = False
|
||||
End Select
|
||||
Next
|
||||
If Comando = "Agregar" Then
|
||||
If (mensajeerror = "") Then
|
||||
|
||||
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(), CveSubTipoPeriodo) Then
|
||||
Using ObjNom_Periodos As New ClsNominas
|
||||
|
||||
If CveSubTipoPeriodo <= 1 Then
|
||||
CveSubTipoPeriodo = 1
|
||||
End If
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
Select Case item.Value.ToEntero()
|
||||
Case 1
|
||||
If item.Selected Then EsInicioMes = True Else EsInicioMes = False
|
||||
Case 2
|
||||
If item.Selected Then EsFinMes = True Else EsFinMes = False
|
||||
Case 3
|
||||
If item.Selected Then EsInicioSS = True Else EsInicioSS = False
|
||||
Case 4
|
||||
If item.Selected Then EsFinSS = True Else EsFinSS = False
|
||||
Case 5
|
||||
If item.Selected Then EsInicioAño = True Else EsInicioAño = False
|
||||
Case 6
|
||||
If item.Selected Then EsFinAño = True Else EsFinAño = False
|
||||
Case 7
|
||||
If item.Selected Then FueCalculado = True Else FueCalculado = False
|
||||
End Select
|
||||
Next
|
||||
If Comando = "Agregar" Then
|
||||
|
||||
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(), CveSubTipoPeriodo) Then
|
||||
|
||||
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNominasPeriodos(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End If
|
||||
ElseIf Comando = "Actualizar" Then
|
||||
|
||||
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), CveSubTipoPeriodo) Then
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNominasPeriodos(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
|
||||
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNominasPeriodos(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End If
|
||||
ElseIf Comando = "Actualizar" Then
|
||||
|
||||
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa, DdlTurno.SelectedValue.ToEntero(), CveSubTipoPeriodo) Then
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNominasPeriodos(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
RegistraScript("$('#divAddPeriodo').modal('hide');")
|
||||
Else
|
||||
Alert(mensajeerror, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
RegistraScript("$('#divAddPeriodo').modal('hide');")
|
||||
|
||||
'ObjNom_Periodos.Dispose()
|
||||
End Sub
|
||||
|
||||
@@ -321,6 +334,7 @@ Partial Class Nomina_CatPeriodos
|
||||
TxtFechaFinAdd.Text = GvRow.DataKey("FechaFin").ToString()
|
||||
DdlEstatusAdd.SelectedValueExist(GvRow.DataKey("Estatus").ToString().ToEntero())
|
||||
hdnCvePerido.Value = GvRow.DataKey("CvePeriodo").ToString()
|
||||
TxtMes.Text = GvRow.DataKey("Mes").ToString()
|
||||
TxtCveSubTipoPeriodoAdd.Text = GvRow.DataKey("CveSubTipoPeriodo").ToString()
|
||||
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
@@ -351,6 +365,7 @@ Partial Class Nomina_CatPeriodos
|
||||
TxtNumeroAdd.Text = ""
|
||||
TxtFechaInicioAdd.Text = ""
|
||||
TxtFechaFinAdd.Text = ""
|
||||
TxtMes.Text = ""
|
||||
DdlEstatusAdd.SelectedValueExist(-1)
|
||||
DdlTurno.SelectedValueExist(-1)
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
|
||||
@@ -2533,13 +2533,13 @@
|
||||
OnRowDataBound="GVNominaPendiente_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Código">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Codigo")%>'> </asp:Label>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Empleado" ItemStyle-CssClass="text-left">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("NombreCompleto")%>'> </asp:Label>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" Text='<%# Eval("NombreCompleto") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Periodo" ItemStyle-CssClass="text-left">
|
||||
|
||||
@@ -3688,12 +3688,15 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//CvePeriodoSeleccionado
|
||||
//SRCvePersonal
|
||||
bool continuar = true;
|
||||
bool msgFin = true;
|
||||
if (SRCveConcepto > 0)
|
||||
{
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (continuar = onom.DeleteNom_NominasDetalles(SRCveConcepto, SRCvePersonal, CvePeriodoSeleccionado))
|
||||
{
|
||||
|
||||
msgFin = (onom.DtResultados.Rows.Count > 0 && onom.DtResultados.Rows[0]["AplicaFiniquito"].ToString().ToUpper().Contiene("1", "TRUE"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3706,7 +3709,15 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
UpGvConceptos.Update();
|
||||
|
||||
RegistraScript("$('#ModalUpConcepto').modal('hide');");
|
||||
Alert("el importe sera tomado del calculo y no del valor fijo");
|
||||
if(msgFin)
|
||||
{
|
||||
Alert("recuerda eliminar el finiquito del modulo de finiquito si deseas eliminar el valor, esto para poder activar al empleado!",TipoMensaje.ToastAdventencia);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("el importe sera tomado del calculo y no del valor fijo");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -6239,7 +6250,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Fecha Ingr:{0:dd/MM/yyyy}, S.D.:{1:N2}, S.D.I.:{2:N2}, S.B.C.:{3:N2} ", drow2["FechaIngreso"], drow2["SalarioDiario"], drow2["SalarioDiarioIntegrado"], drow2["SalarioDiarioIMSS"])); cell.Blocks.Add(paragraphh);
|
||||
paragraphh.ParagraphFormat.Style = styilo;
|
||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Días pagados:{0}, Retardos: {1}, Ausencias:{2},Incapacidad:{3},Vacaciones Disfrutadas:{4},Vacaciones Pagadas:{5} ", drow2["DiasLaborados"], drow2["DiasRetardos"], drow2["DiasFaltados"], drow2["DiasIncapacidad"], drow2["DiasVacaciones"], drow2["DiasVacacionesPorPagar"])); cell.Blocks.Add(paragraphh);
|
||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Días pagados:{0:N0}, Retardos: {1}, Ausencias:{2},Incapacidad:{3},Vacaciones Disfrutadas:{4},Vacaciones Pagadas:{5} ", drow2["DiasPago"], drow2["DiasRetardos"], drow2["DiasFaltados"], drow2["DiasIncapacidad"], drow2["DiasVacaciones"], drow2["DiasVacacionesPorPagar"])); cell.Blocks.Add(paragraphh);
|
||||
paragraphh.ParagraphFormat.Style = styilo;
|
||||
|
||||
row = new GemBox.Document.Tables.TableRow(document);
|
||||
|
||||
29
OC/OC.aspx
29
OC/OC.aspx
@@ -477,6 +477,31 @@
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="TrDescuentoEscalonado" runat="server" visible="false">
|
||||
<td><b>Descuento:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtDescuentoEscalonado" runat="server" Width="100px" Height="28px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuentoEscalonado" ValidChars="1234567890+" />
|
||||
<asp:Button runat="server" ID="BtnDescuenEscalonado" Text="Aplicar" CssClass="btn btn-primary" OnClick="BtnDescuenEscalonado_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="TrDescuentoProntoPago" runat="server" visible="false">
|
||||
<td><b>Descuento Pronto Pago:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtPorcentajeProntoPago" CssClass="form-control " runat="server" MaxLength="50" Width="100px" Height="28px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPorcentajeProntoPago" ValidChars="1234567890." />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="TrEdicionMasiva" runat="server" visible="false">
|
||||
<td><b>Edición Masiva:</b></td>
|
||||
<td>
|
||||
<asp:Button runat="server" ID="BtnEdicionMasiva" Text="Editar" CssClass="btn btn-primary" OnClick="BtnEdicionMasiva_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -944,6 +969,7 @@
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.######}")%>' Style="width: 100%"></asp:Label>
|
||||
<asp:TextBox ID="TxtEMCantEdit" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.######}")%>' Width="45px" Height="24px" Visible="false" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 1 --%>
|
||||
@@ -986,6 +1012,7 @@
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlObsPS" runat="server" Text='<%# Eval("Observacion")%>'></asp:Literal>
|
||||
<asp:TextBox ID="TxtEMObsPS" CssClass="txtobs" runat="server" Rows="2" Text='<%# Eval("Observacion") %>' TextMode="MultiLine" MaxLength="750" Style="" Visible="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtObsPS" CssClass="txtobs" runat="server" Rows="2" Text='<%# Eval("Observacion") %>' TextMode="MultiLine" MaxLength="750" Style=""></asp:TextBox>
|
||||
@@ -1041,6 +1068,7 @@
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ToolTip='<%# If(Not IsDBNull(Eval("Importe")) AndAlso CDbl(Eval("Importe").ToString) <> -1, Eval("Importe"), "")%>' ID="LtlImporte" runat="server" Text='<%# If(Not IsDBNull(Eval("Importe")) AndAlso CDbl(Eval("Importe").ToString) <> -1, Eval("Importe", "{0:#,##0.00####}"), "")%>'></asp:Label>
|
||||
<asp:TextBox ID="TxtEMImporteEdit" runat="server" CausesValidation="true" ClientIDMode="Static" MaxLength="12" Text='<%# If(Not IsDBNull(Eval("Importe")) AndAlso CDbl(Eval("Importe").ToString) <> -1, Eval("Importe", "{0:#,##0.00####}"), "")%>' ValidationGroup="grpEditar" Width="55px" Height="24px" Visible="false" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# If(Not IsDBNull(Eval("Importe")) AndAlso CDbl(Eval("Importe").ToString) <> -1, Eval("Importe", "{0:#,##0.00####}"), "")%>' Visible="false"></asp:Literal>
|
||||
@@ -1056,6 +1084,7 @@
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento", "{0:N2}")%>'></asp:Literal>
|
||||
<asp:TextBox ID="TxtEMDescuentoEdit" runat="server" onkeyup="ValidaDescuentoDetalle(this);" CausesValidation="true" MaxLength="12" Text='<%# Eval("Descuento", "{0:#,##0.00####}")%>' ValidationGroup="grpEditar" Width="55px" Height="24px" Visible="false" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtDescuentoEdit" runat="server" onkeyup="ValidaDescuentoDetalle(this);" CausesValidation="true" MaxLength="12" Text='<%# Eval("Descuento", "{0:#,##0.00####}")%>' ValidationGroup="grpEditar" Width="55px" Height="24px"></asp:TextBox>
|
||||
|
||||
343
OC/OC.aspx.vb
343
OC/OC.aspx.vb
@@ -6,6 +6,7 @@ Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Ajax.Utilities
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Partial Class OC_OC
|
||||
@@ -964,6 +965,12 @@ Partial Class OC_OC
|
||||
DdlSubProyectoGral.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
TrDescuentoEscalonado.Visible = True
|
||||
TrDescuentoProntoPago.Visible = True
|
||||
TrEdicionMasiva.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
MostrarUsuarioAsignado()
|
||||
@@ -1521,6 +1528,8 @@ Partial Class OC_OC
|
||||
TxtNumRemision.Text = objOC.NumRemision
|
||||
NumeroRemisionOriginal = objOC.NumRemision
|
||||
|
||||
TxtPorcentajeProntoPago.Text = (100 * objOC.PorcentajeProntoPago).ToString("###.00")
|
||||
|
||||
If Not IsNothing(objOC.Tipo) Then
|
||||
|
||||
Select Case objOC.Tipo.ToUpper
|
||||
@@ -2709,6 +2718,11 @@ Partial Class OC_OC
|
||||
Dim LugarEntrega As String = If(txtLugarEntrega.Text.Trim = "", "-1", txtLugarEntrega.Text.Trim)
|
||||
LugarEntrega = If(DivLugarEntrega1.Visible, LugarEntrega, If(TxtLugarEntregaDirecta.Visible, TxtLugarEntregaDirecta.Text.Trim, ""))
|
||||
|
||||
Dim PorcentajeProntoPago As Decimal = 0
|
||||
If TxtPorcentajeProntoPago.Text.ToDecimal > 0 Then
|
||||
PorcentajeProntoPago = TxtPorcentajeProntoPago.Text.ToDecimal / 100
|
||||
End If
|
||||
|
||||
'GUARDA'
|
||||
If EsNuevo Then
|
||||
|
||||
@@ -2753,7 +2767,7 @@ Partial Class OC_OC
|
||||
RequiereCotizacion:=ChkCotizacion.Checked, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal,
|
||||
RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim,
|
||||
IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text.Trim(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(),
|
||||
CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then
|
||||
CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
|
||||
CveOrdenCompraPadre = OC.CveOrdenCompra
|
||||
If CveOrdenCompraPadre > 0 Then
|
||||
@@ -2795,7 +2809,8 @@ Partial Class OC_OC
|
||||
RequiereCotizacion:=ChkCotizacion.Checked, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1),
|
||||
CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||
Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then
|
||||
Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero,
|
||||
PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
CveOrdenCompra = OC.CveOrdenCompra
|
||||
CveEstatus = CboE.SelectedValue.ToEntero
|
||||
|
||||
@@ -2978,7 +2993,8 @@ Partial Class OC_OC
|
||||
LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero,
|
||||
DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1),
|
||||
Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto,
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero,
|
||||
PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
If CveProveedorOriginal <> CveProveedor Then
|
||||
If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then
|
||||
TieneError = True
|
||||
@@ -3403,8 +3419,16 @@ Partial Class OC_OC
|
||||
' Exit Function
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
If TipoOS Then Return False
|
||||
|
||||
|
||||
Dim PorcentajeProntoPago As Decimal = 0
|
||||
If TxtPorcentajeProntoPago.Text.ToDecimal > 0 Then
|
||||
PorcentajeProntoPago = TxtPorcentajeProntoPago.Text.ToDecimal / 100
|
||||
End If
|
||||
|
||||
Dim CveCotizacion As Integer = 0
|
||||
Dim CveColectiva As Integer = 0
|
||||
Dim HuboError As Boolean = False
|
||||
@@ -3452,7 +3476,7 @@ Partial Class OC_OC
|
||||
PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal,
|
||||
CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(),
|
||||
CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then
|
||||
CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
|
||||
'CREA POLIZA POR CADA PROVEEDOR
|
||||
|
||||
@@ -3528,7 +3552,7 @@ Partial Class OC_OC
|
||||
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero(), CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||
Promocion:=Promocion, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then
|
||||
Promocion:=Promocion, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
|
||||
|
||||
'USA AC
|
||||
@@ -4243,8 +4267,8 @@ Partial Class OC_OC
|
||||
'End If
|
||||
End If
|
||||
|
||||
'Agarra el nuevo AF si se modifico o deja el pasado
|
||||
CveActivoFijo = If(gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero > 0, gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero, HdnEditCveActivoFijo.Value.ToEntero)
|
||||
'Agarra el nuevo AF si se modifico o deja el pasado
|
||||
CveActivoFijo = If(gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero > 0, gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero, HdnEditCveActivoFijo.Value.ToEntero)
|
||||
Codigo = If(gvr.FCHiddenField("HdnCodigoAF").Value <> "-1", gvr.FCHiddenField("HdnCodigoAF").Value, HdnEditCodigo.Value)
|
||||
|
||||
HdnEditCveActivoFijo.Value = ""
|
||||
@@ -9289,5 +9313,310 @@ Partial Class OC_OC
|
||||
UPPDetalle.Update()
|
||||
CargaFolios()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnDescuenEscalonado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim descuentoParts As String() = TxtDescuentoEscalonado.Text.Split("+"c)
|
||||
|
||||
|
||||
For Each dRow As DataRow In DtDetalle.Rows
|
||||
|
||||
Dim PU As Decimal = dRow("Importe").ToString.ToDecimal
|
||||
Dim Cantidad As Decimal = dRow("Cantidad").ToString.ToDecimal
|
||||
Dim IVAPorcentaje As Decimal = dRow("IVAPorcentaje").ToString.ToDecimal
|
||||
Dim IEPSPSPorcentaje As Decimal = dRow("IEPSPSPorcentaje").ToString.ToDecimal
|
||||
Dim IEPSPSIVAPorcentaje As Decimal = dRow("IEPSPSIVAPorcentaje").ToString.ToDecimal
|
||||
Dim RetIVAPorcentaje As Decimal = dRow("RetIVAPorcentaje").ToString.ToDecimal
|
||||
Dim RetISRPorcentaje As Decimal = dRow("RetISRPorcentaje").ToString.ToDecimal
|
||||
|
||||
Dim TotalTemp As Decimal = (PU * Cantidad)
|
||||
Dim Descuento As Decimal = 0
|
||||
|
||||
If descuentoParts.Length = 0 Then
|
||||
Descuento = 0
|
||||
Else
|
||||
|
||||
For i As Integer = 0 To descuentoParts.Length - 1
|
||||
Dim descuentoPart As Decimal = descuentoParts(i).Trim().ToDecimal
|
||||
If descuentoPart > 0 Then
|
||||
Descuento = Descuento + ((TotalTemp - Descuento) * (descuentoPart / 100))
|
||||
Else
|
||||
Continue For
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Dim Total As Decimal = If(PU > 0, (PU * Cantidad) - Descuento, 0)
|
||||
|
||||
dRow("Descuento") = Descuento
|
||||
|
||||
If dRow("Total").ToString.ToDecimal <> Total Then
|
||||
dRow("Total") = Total
|
||||
|
||||
dRow("IEPSPS") = Math.Round(IEPSPSPorcentaje * Total, 2)
|
||||
dRow("IEPSPSIVA") = Math.Round(IEPSPSIVAPorcentaje * Total, 2)
|
||||
|
||||
dRow("IVA") = Math.Round(IVAPorcentaje * Total, 2)
|
||||
|
||||
dRow("RetIVA") = (RetIVAPorcentaje * Total).RoundSQL(2)
|
||||
dRow("RetISR") = (RetISRPorcentaje * Total).RoundSQL(2)
|
||||
dRow("TipoDato") = 1
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Next
|
||||
|
||||
DtDetalle.AcceptChanges()
|
||||
|
||||
CalculaGenerales()
|
||||
|
||||
GvD.DataSource = DtDetalle
|
||||
GvD.DataBind()
|
||||
|
||||
UpIvas.Update()
|
||||
UPPDetalle.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnEdicionMasiva_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If BtnEdicionMasiva.Text = "Editar" Then
|
||||
BtnEdicionMasiva.Text = "Aplicar"
|
||||
|
||||
For Each GvRow As GridViewRow In GvD.Rows
|
||||
|
||||
GvRow.FCTextBox("TxtEMObsPS").Visible = True
|
||||
GvRow.FCTextBox("TxtEMCantEdit").Visible = True
|
||||
GvRow.FCTextBox("TxtEMDescuentoEdit").Visible = True
|
||||
GvRow.FCTextBox("TxtEMImporteEdit").Visible = True
|
||||
|
||||
GvRow.FCLabel("LtlCantidad").Visible = False
|
||||
GvRow.FCLiteral("LtlObsPS").Visible = False
|
||||
GvRow.FCLiteral("LtlDescuento").Visible = False
|
||||
GvRow.FCLabel("LtlImporte").Visible = False
|
||||
|
||||
|
||||
'observación, PU, descuento, cantidad
|
||||
Next
|
||||
|
||||
Else
|
||||
|
||||
GvD_RecalculaEdicionMasiva()
|
||||
|
||||
BtnEdicionMasiva.Text = "Editar"
|
||||
For Each GvRow As GridViewRow In GvD.Rows
|
||||
GvRow.FCTextBox("TxtEMObsPS").Visible = False
|
||||
GvRow.FCTextBox("TxtEMCantEdit").Visible = False
|
||||
GvRow.FCTextBox("TxtEMDescuentoEdit").Visible = False
|
||||
GvRow.FCTextBox("TxtEMImporteEdit").Visible = False
|
||||
|
||||
GvRow.FCLabel("LtlCantidad").Visible = True
|
||||
GvRow.FCLiteral("LtlObsPS").Visible = True
|
||||
GvRow.FCLiteral("LtlDescuento").Visible = True
|
||||
GvRow.FCLabel("LtlImporte").Visible = True
|
||||
Next
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
UPPDetalle.Update()
|
||||
uppEstatus.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub GvD_RecalculaEdicionMasiva()
|
||||
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
|
||||
Dim Cantidad, Importe, Descuento As Decimal
|
||||
Dim CveUnidad, CveClasificacion, CvePS, CveSubProyecto, CveProyecto, CveCultivoCuadroDetalle As Integer
|
||||
Dim Obs, UM, Clasificacion, PS, SubProyecto, Proyecto, Cuadro As String
|
||||
|
||||
|
||||
Cantidad = gvr.FCTextBox("TxtEMCantEdit").Text.Trim.ToDecimal
|
||||
Importe = gvr.FCTextBox("TxtEMImporteEdit").Text.Trim.ToDecimal
|
||||
Descuento = gvr.FCTextBox("TxtEMDescuentoEdit").Text.Trim.ToDecimal
|
||||
Obs = gvr.FCTextBox("TxtEMObsPS").Text.Trim
|
||||
|
||||
'SubProyecto, Cantidad, Importe, Descuento, CveOrdenCompra, CveUnidadMedida, CvePresupuestoEgreso, PS,CveClasificacion, CvePS, CveSubProyecto, CveActivoFijo, CodigoAF, TipoDato, Observacion,
|
||||
'CveOrdenCompraDetalle,CveCompra,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,CantidadNoEditable,CveCultivoCuadroDetalle
|
||||
|
||||
CveUnidad = gvr.DataKey("CveUnidadMedida").ToEntero
|
||||
UM = gvr.FCLiteral("LA").Text
|
||||
CveClasificacion = gvr.DataKey("CveClasificacion").ToEntero
|
||||
Clasificacion = gvr.FCLabel("LblClasificacion").Text
|
||||
|
||||
'SE TOMAN VALORES EN CASO DE QUE LA CvePS SEA DIFERENTE DE LA ANTERIOR
|
||||
Dim CvePSAnterior As Integer = gvr.DataKey("CvePS").ToEntero
|
||||
PS = gvr.DataKey("PS").ToString
|
||||
Dim RetISR As Decimal = gvr.DataKey("RetISRPorcentaje").ToDecimal
|
||||
Dim RetIVA As Decimal = gvr.DataKey("RetIVAPorcentaje").ToDecimal
|
||||
'Dim IvaPS = gvr.DataKey("IVAPorcentaje").ToDecimal
|
||||
Dim IEPSPS As Decimal = gvr.DataKey("IEPSPSPorcentaje").ToDecimal
|
||||
Dim IEPSPSIVA As Decimal = gvr.DataKey("IEPSPSIVAPorcentaje").ToDecimal
|
||||
Dim Total As Decimal = Importe * Cantidad - Descuento
|
||||
|
||||
|
||||
'VALORES DEL PS
|
||||
'CvePS = gvr.FCDropDownList("DdlPS").SelectedValue.ToEntero
|
||||
|
||||
'PS = gvr.FCDropDownList("DdlPS").SelectedItem.Text
|
||||
'Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
|
||||
'If DrPS Is Nothing Then
|
||||
' Alert("Ocurrió un error al cargar la información del producto para actualizar. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
'Dim IvaPS As Decimal = DrPS("IVA").ToString.ToDecimal
|
||||
'IEPSPS = DrPS("IEPSPorcentaje").ToString.ToDecimal
|
||||
'IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
|
||||
|
||||
'If DdlProveedores.SelectedValue.ToEntero > 0 Then
|
||||
' 'Si es Proveedor Extranjero el IVA es 0%
|
||||
' Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
' If drProv IsNot Nothing Then
|
||||
' If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr
|
||||
' RetISR = 0.0125D
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'If CvePS <> CvePSAnterior Or Not CveOrdenCompra > 0 Then
|
||||
' RetISR = DrPS("RetISR").ToString.ToDecimal
|
||||
' RetIVA = DrPS("RetIVA").ToString.ToDecimal
|
||||
' If Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2) = 0.08 Then
|
||||
' RetIVA = RetIVA / 2
|
||||
' End If
|
||||
' If IvaPS <> 0 Then IvaPS = -1
|
||||
'End If
|
||||
|
||||
'CveSubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedValue.ToEntero
|
||||
'SubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedItem.Text
|
||||
|
||||
'CveCultivoCuadroDetalle = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedValue.ToEntero
|
||||
'Cuadro = ""
|
||||
'If CveCultivoCuadroDetalle > 0 Then
|
||||
' Cuadro = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedItem.Text
|
||||
'End If
|
||||
|
||||
'If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||
' CveProyecto = -1
|
||||
' Proyecto = "Seleccione"
|
||||
'Else
|
||||
' CveProyecto = gvr.FCDropDownList("DdlProyectoEdit").SelectedValue.ToEntero
|
||||
' Proyecto = gvr.FCDropDownList("DdlProyectoEdit").SelectedItem.Text
|
||||
'End If
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
|
||||
' Dim ObjCon As New ClsContratos
|
||||
' Dim CvePresupuesto As Integer = 0
|
||||
' Dim Autorizado As Decimal = 0
|
||||
' Dim Ejercido As Decimal = 0
|
||||
' If ObjCon.GetPresupuestos(-1, "-1", CveSubProyecto, 2, -1, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjCon.DtResultados.Rows.Count > 0 Then
|
||||
' CvePresupuesto = ObjCon.DtResultados.Rows(0)("CvePresupuesto").ToString.ToEntero
|
||||
' If CvePresupuesto > 0 Then
|
||||
' If ObjCon.GetPresupuestosDetalle(CvePresupuesto, -1, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {CveClasificacion} And Importe > 0").Rows.Count > 0 Then
|
||||
' Autorizado = ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {CveClasificacion} And Importe > 0").Rows(0)("Importe").ToString.ToDecimal
|
||||
' End If
|
||||
' End If
|
||||
' If ObjCon.GetPresupuestosRep(CvePresupuesto, -1, 1, $"01/09/{NowADS().Year - 1}".ToDate, NowADS(), UsuarioActual.CveEmpresa, CveProyecto,
|
||||
' CveSubProyecto, UsuarioActual.CveUsuario, CveClasificacion) Then
|
||||
' If ObjCon.DtResultados.Rows.Count > 0 Then
|
||||
' Ejercido = ObjCon.DtResultados.Rows(0)("Ejercido").ToString.ToDecimal
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' ObjCon.Dispose()
|
||||
|
||||
' If CvePresupuesto > 0 And Autorizado > 0 Then
|
||||
' Dim Diferencia As Decimal = (Ejercido + Total) - Autorizado
|
||||
' If Diferencia > 0 Then
|
||||
' Alert($"No hay presupuesto disponible:<br/> - Subproyecto <b>{SubProyecto}</b> <br/> - Clasificación <b>{Clasificacion}</b> <br/> se excede por <b>{Diferencia.FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'Agarra el nuevo AF si se modifico o deja el pasado
|
||||
'CveActivoFijo = If(gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero > 0, gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero, HdnEditCveActivoFijo.Value.ToEntero)
|
||||
'Codigo = If(gvr.FCHiddenField("HdnCodigoAF").Value <> "-1", gvr.FCHiddenField("HdnCodigoAF").Value, HdnEditCodigo.Value)
|
||||
|
||||
'HdnEditCveActivoFijo.Value = ""
|
||||
'HdnEditCodigo.Value = ""
|
||||
|
||||
Dim dr As DataRow() = DtDetalle.Select("CveOrdenCompraDetalle = " & gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
|
||||
|
||||
dr(0)("Cantidad") = Cantidad
|
||||
'dr(0)("CveUnidadMedida") = CveUnidad
|
||||
'dr(0)("UM") = UM
|
||||
'dr(0)("CveClasificacion") = CveClasificacion
|
||||
'dr(0)("Clasificacion") = Clasificacion
|
||||
|
||||
'If isWithFamily() Then
|
||||
' dr(0)("CveSubFamilia") = CveClasificacion
|
||||
' dr(0)("SubFamilia") = Clasificacion
|
||||
'End If
|
||||
|
||||
'dr(0)("CvePS") = CvePS
|
||||
'dr(0)("PS") = PS
|
||||
dr(0)("Observacion") = Obs
|
||||
|
||||
'dr(0)("CveSubProyecto") = CveSubProyecto
|
||||
'dr(0)("SubProyecto") = SubProyecto
|
||||
'dr(0)("CveProyecto") = CveProyecto
|
||||
'dr(0)("Proyecto") = Proyecto
|
||||
dr(0)("Importe") = Importe
|
||||
dr(0)("Descuento") = Descuento
|
||||
dr(0)("Total") = Total
|
||||
dr(0)("IEPSPS") = IEPSPS * Total
|
||||
dr(0)("IEPSPSPorcentaje") = IEPSPS
|
||||
dr(0)("IEPSPSIVA") = IEPSPSIVA * Total
|
||||
dr(0)("IEPSPSIVAPorcentaje") = IEPSPSIVA
|
||||
|
||||
'If DdlIVA.SelectedValue.ToDecimal = 1 Then dr(0)("IVA") = 0 Else dr(0)("IVA") = IvaPS * Total
|
||||
'dr(0)("IVAPorcentaje") = If(IvaPS = -1, Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), 0)
|
||||
Dim TotalGravado As Decimal = Total
|
||||
If IEPSPSIVA > 0 Then TotalGravado = Total * (1 + IEPSPSIVA) 'grava para iva, el importe del IEPS
|
||||
dr(0)("IVA") = Math.Round(dr(0)("IVAPorcentaje").ToString.ToDecimal * TotalGravado, 2)
|
||||
|
||||
dr(0)("RetIVA") = (RetIVA * Total).RoundSQL(6)
|
||||
dr(0)("RetIVAPorcentaje") = RetIVA
|
||||
dr(0)("RetISR") = (RetISR * Total).RoundSQL(6)
|
||||
dr(0)("RetISRPorcentaje") = RetISR
|
||||
|
||||
|
||||
'dr(0)("CveActivoFijo") = CveActivoFijo
|
||||
'dr(0)("CodigoAF") = Codigo
|
||||
|
||||
'dr(0)("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle
|
||||
'dr(0)("Cuadro") = Cuadro
|
||||
|
||||
'si el tipodato viene de la BD, entonces sufrió una actualización
|
||||
If dr(0)("TipoDato").ToString.ToEntero = 2 Then dr(0)("TipoDato") = 1
|
||||
DtDetalle.AcceptChanges()
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
CargaDatosDetalles()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -145,12 +145,12 @@
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" ID="LblSubProyectoModal"></asp:Label>
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyecto" Width="100%" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" InitialValue="-1" ErrorMessage="Campo sub Proyecto requerido." Display="None"
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyecto" Width="100%" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" InitialValue="-1" ErrorMessage="Campo sub Proyecto requerido." Display="None"
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
|
||||
</div>
|
||||
@@ -396,9 +396,46 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="icon-pin"></i>
|
||||
<span class="caption-subject bold uppercase">Historial de Modificación</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:GridView ID="GvBitacora" runat="server" GridLines="None" Width="100%" CssClass="table table-striped table-advance table-hover Widthall ADSCroll mysmallbtn" CellSpacing="0" AutoGenerateColumns="False">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Descripcio n" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%-- Pre init --%>
|
||||
@@ -593,7 +630,7 @@
|
||||
<label class="col-md-4 bold">Observación</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox CssClass="form-control" runat="server" MaxLength="200"
|
||||
ID="TxtObservacion">Observacion</asp:TextBox>
|
||||
ID="TxtObservacion"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ Partial Class RepContratoDetalle
|
||||
CveViajePasajero = 0
|
||||
Session("FileExtension") = ""
|
||||
ArchivoUpdate = ""
|
||||
CargaGvBitacora()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -266,7 +267,7 @@ Partial Class RepContratoDetalle
|
||||
Response.Clear()
|
||||
Response.ClearHeaders()
|
||||
Response.ClearContent()
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" & LbFolio.Text & ".pdf")
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" & LbFolio.Text & $"{File.Extension}")
|
||||
Response.AddHeader("Content-Length", File.Length.ToString())
|
||||
'Response.ContentType = "text/plain"
|
||||
Response.ContentType = "application/octet-stream"
|
||||
@@ -298,7 +299,7 @@ Partial Class RepContratoDetalle
|
||||
Try
|
||||
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "",
|
||||
DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal,
|
||||
DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservacion.Text) Then
|
||||
DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservaciones.Text) Then
|
||||
Alert("Contrato actualizado correctamente")
|
||||
End If
|
||||
ObjContratos.Commit()
|
||||
@@ -606,6 +607,19 @@ Partial Class RepContratoDetalle
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Bitacora historial"
|
||||
Private Sub CargaGvBitacora()
|
||||
' COMENTADO POR IPP PARA SUBIR 5 ABRIL 2017
|
||||
If CveContrato > 0 Then
|
||||
Dim ObjGral As New ClsGenerales()
|
||||
If ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||
GvBitacora.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
End If
|
||||
GvBitacora.DataBind()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<label class="col-md-1 ">Tipo de Unidad</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoUnidad" data-text="Todos" AppendDataBoundItems="true"
|
||||
DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" CssClass="form-control ddlFiltros input-sm select2me Widthall" ClientIDMode="Static"
|
||||
DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" CssClass="form-control ddlFiltros input-sm select2me Widthall" ClientIDMode="Static"
|
||||
Style="width: 100%;" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
@@ -388,7 +388,7 @@
|
||||
<label class="col-md-4">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" Width="100%" TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
Rows="6"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -441,10 +441,19 @@
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlAF" DataValueField="CveActivoFijo"
|
||||
DataTextField="CodDesc" Class="form-control select2me"
|
||||
Width="100%" runat="server">
|
||||
Width="100%" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlAF_SelectedIndexChanged" >
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1" runat="server" id="DVMotivoCambioAF" visible="false">
|
||||
<label class="col-md-4">Motivo Cambio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtMotivoCambioUnidad" CssStyle=" form-control" runat="server" MaxLength="2000" Width="100%" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtMotivoCambioUnidad" runat="server" ControlToValidate="TxtMotivoCambioUnidad" ErrorMessage="Campo Motivo Cambio requerido." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvTxtMotivoCambioUnidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtMotivoCambioUnidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Chofer 1</label>
|
||||
@@ -533,6 +542,7 @@
|
||||
<asp:HiddenField runat="server" ID="HidCveVentaRemision" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidRemisionSaldo" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidCveAF" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidCveAFDes" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -811,7 +821,13 @@
|
||||
$('#HidRemisionSerieFolio').val(event.RemisionSerieFolio);
|
||||
$('#HidCveVentaRemision').val(event.CveVentaRemision);
|
||||
$('#HidRemisionSaldo').val(event.RemisionSaldo);
|
||||
$('#HidCveAF').val(event.CveActivoFijo);
|
||||
|
||||
if (event.CveActivoFijo > 0) {
|
||||
$('#HidCveAF').val(event.CveActivoFijo);
|
||||
} else {
|
||||
$('#HidCveAF').val('-1');
|
||||
}
|
||||
|
||||
|
||||
|
||||
<%-- $('#HidRemision').text(event.RemisionSerieFolio);
|
||||
@@ -978,8 +994,15 @@
|
||||
slotEventOverlap: false, // No permitir la superposición en vistas de agenda
|
||||
eventRender: function (event, element) {
|
||||
element.css({
|
||||
'margin-bottom': '1px', // Ajusta el valor según sea necesario
|
||||
'margin-left': '1px' // Ajusta el valor según sea necesario
|
||||
'margin-bottom': '1px',
|
||||
'margin-left': '1px',
|
||||
'white-space': 'normal', // Permitir el ajuste de texto
|
||||
'height': 'auto', // Ajustar la altura automáticamente
|
||||
'overflow': 'hidden' // Ocultar cualquier desbordamiento
|
||||
});
|
||||
element.find('.fc-title').css({
|
||||
'white-space': 'normal', // Asegurar que el texto se ajuste
|
||||
'line-height': '1.2em' // Ajustar la altura de línea para mejor legibilidad
|
||||
});
|
||||
},
|
||||
events: {
|
||||
|
||||
@@ -221,7 +221,7 @@ Partial Class RepContratosCalendario
|
||||
|
||||
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim NumChoferes As Integer = If(chkSegundoChofer.Checked, 2, 1)
|
||||
|
||||
If NumChoferes = 2 AndAlso DdlChofer2.SelectedValue.ToEntero <= 0 Then
|
||||
@@ -230,6 +230,7 @@ Partial Class RepContratosCalendario
|
||||
End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
Dim DTAgendadados As New DataTable
|
||||
If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, UsuarioActual.CveEmpresa, CveContrato) Then
|
||||
@@ -261,10 +262,30 @@ Partial Class RepContratosCalendario
|
||||
CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text.Trim, NumChoferes:=NumChoferes) Then
|
||||
RegistraScript("$('#ModalActualizar').modal('hide');")
|
||||
Alert("Actualizado Correctamente.")
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
If HidCveAF.Value.ToEntero <> DdlAF.SelectedValue.ToEntero Then
|
||||
Dim objGenerales = New ClsGenerales(ObjContratos.IniciaTransacSQL())
|
||||
|
||||
If Not objGenerales.AddHistorialBitacora(465, -1, -1, -1, -1, -1, -1, -1, DdlAF.SelectedItem.Text, HidCveAFDes.Value, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, TxtMotivoCambioUnidad.Text, "", "", CveContrato:=CveContrato) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
ObjContratos.RollBack()
|
||||
Else
|
||||
ObjContratos.Commit()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
UpTitulos.Update()
|
||||
CargaDatos()
|
||||
InicializaCalendar()
|
||||
@@ -299,6 +320,15 @@ Partial Class RepContratosCalendario
|
||||
|
||||
DdlAF.SelectedValueExist(GvRow.DataKey("CveAF"))
|
||||
|
||||
HidCveAF.Value = "-1"
|
||||
HidCveAFDes.Value = ""
|
||||
If GvRow.DataKey("CveAF").ToEntero > 0 Then
|
||||
HidCveAF.Value = GvRow.DataKey("CveAF").ToString
|
||||
HidCveAFDes.Value = DdlAF.SelectedItem.Text
|
||||
End If
|
||||
|
||||
TxtMotivoCambioUnidad.Text = ""
|
||||
DVMotivoCambioAF.Visible = False
|
||||
|
||||
|
||||
HypRemision.Text = GvRow.DataKey("RemisionSerieFolio")
|
||||
@@ -326,6 +356,9 @@ Partial Class RepContratosCalendario
|
||||
HidModClienteNombre.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, HidModCveCliente.Value.ToEntero).FiltroPrimeroValor("NombreComercial")
|
||||
End If
|
||||
|
||||
TxtMotivoCambioUnidad.Text = ""
|
||||
DVMotivoCambioAF.Visible = False
|
||||
|
||||
DdlClientes.SelectedText = HidModClienteNombre.Value
|
||||
DdlClientes.SelectedValue = HidModCveCliente.Value
|
||||
|
||||
@@ -347,9 +380,10 @@ Partial Class RepContratosCalendario
|
||||
End If
|
||||
|
||||
CargaAFDdl(HidCveTipoAF.Value.ToEntero)
|
||||
|
||||
DdlAF.SelectedValueExist(HidCveAF.Value)
|
||||
|
||||
|
||||
HidCveAFDes.Value = DdlAF.SelectedItem.Text
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
@@ -452,4 +486,16 @@ Partial Class RepContratosCalendario
|
||||
CargaCronograma(DdlTipoVista.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlAF_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DVMotivoCambioAF.Visible = False
|
||||
|
||||
If HidCveAF.Value.ToEntero > 0 AndAlso DdlAF.SelectedValue.ToEntero <> HidCveAF.Value.ToEntero Then
|
||||
DVMotivoCambioAF.Visible = True
|
||||
End If
|
||||
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -108,40 +108,39 @@
|
||||
EmptyDataText="No se encontraron autorizaciones" ToolTip=""
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tipo " ItemStyle-Width="5%">
|
||||
<asp:TemplateField HeaderText="Tipo " ItemStyle-Width="3%">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTipo" Text='<%# Eval("TipoDocumento") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="5%">
|
||||
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="3%">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTipoAuto" Text='<%# Eval("TipoAutorizacionTexto") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField DataTextField="NombreComercial" Target="_blank" HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-Width="15%" />
|
||||
<asp:BoundField DataField="Importe" ItemStyle-Width="15%" HeaderText="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="PorcentajeDescuento" ItemStyle-Width="10%" HeaderText="% Desc" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="10%" HeaderText="Limite Crédito" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Saldo" ItemStyle-Width="10%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="5%" HeaderText="D.Venc" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
||||
<asp:HyperLinkField DataTextField="FacturaAplicada" Target="_blank" HeaderText="Factura" DataNavigateUrlFields="CveVentaAplicada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Motivo" HeaderText="Motivo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<asp:HyperLinkField DataTextField="NombreComercial" Target="_blank" HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-Width="9%" />
|
||||
<%-- 30--%>
|
||||
<asp:BoundField DataField="Importe" ItemStyle-Width="7%" HeaderText="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="PorcentajeDescuento" ItemStyle-Width="5%" HeaderText="% Desc" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="7%" HeaderText="L.Créd" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Saldo" ItemStyle-Width="7%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="7%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="3%" HeaderText="D.Ven" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
||||
<asp:HyperLinkField DataTextField="FacturaAplicada" ItemStyle-Width="7%" Target="_blank" HeaderText="Factura" DataNavigateUrlFields="CveVentaAplicada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<%-- 45--%>
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Solicitó" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Motivo" HeaderText="Motivo" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" Text='<%# Eval("Estatus") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" HeaderText="Autorizar/Rechazar">
|
||||
<asp:BoundField DataField="UsuarioAutorizo" HeaderText="Autorizó" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7%" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea autorizar el limite?" data-btn-ok-label="si" ID="LnkAutorizar" OnClick="LnkAutorizar_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-check'></i>"></asp:LinkButton>
|
||||
<asp:LinkButton data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea rechazar el limite?" data-btn-ok-label="si" ID="LnkRechazar" OnClick="LnkRechazar_Click" CssClass="btn btn-circle btn-sm red" runat="server" Text="<i class='fa fa-times'></i>"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" Visible='<%# Eval("CveEstatus").ToString = "0" OrElse Eval("CveEstatus").ToString = "1" %>' runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el limite?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -263,7 +263,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
End If
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion) Then
|
||||
If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion, UsuarioActual.CveUsuario) Then
|
||||
Alert("El límite de crédito fue autorizado.")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -280,7 +280,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
Dim CveEstatusAutorizacion As Integer = 3
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion) Then
|
||||
If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion, UsuarioActual.CveUsuario) Then
|
||||
Alert("El límite de crédito fue rechazado.")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -356,7 +356,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
|
||||
'Oculta columnas en export sin afectar GridView en página
|
||||
Dim tcols As Integer = GvDatos.Columns.Count
|
||||
GvDatos.HeaderRow.Cells(tcols - 2).Visible = False 'Autorizar/Rechazar
|
||||
'GvDatos.HeaderRow.Cells(tcols - 2).Visible = False 'Autorizar/Rechazar
|
||||
GvDatos.HeaderRow.Cells(tcols - 1).Visible = False 'Eliminar
|
||||
|
||||
GvDatos.ExportToExcelGembox("CatAutorizacionLimites " & txtFechaI.Text.ToDate.ToString("dd-MM-yyyy") + " a " & fechaFin.ToDate.ToString("dd-MM-yyyy"), UsuarioActual, "Catálogo de autorizaciones de límite de crédito", DatosFiltros:=StrFiltro.ToString())
|
||||
|
||||
@@ -346,7 +346,8 @@
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" DataKeyNames="CveVenta,TipoDocumento,SerieFolio" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" DataKeyNames="CveVenta,TipoDocumento,SerieFolio" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<%-- 0--%>
|
||||
<asp:TemplateField HeaderText="Tipo Docto">
|
||||
|
||||
@@ -924,6 +924,7 @@
|
||||
<asp:HiddenField ID="HdnPagado" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr align="left">
|
||||
<td><b>Estatus:</b> </td>
|
||||
<td>
|
||||
@@ -933,6 +934,13 @@
|
||||
<a class="btn default" style="display: none;" data-toggle="modal" href="#Aceptar">Aceptada</a>
|
||||
<asp:ImageButton ID="ImgGuardaEstatus" runat="server" ClientIDMode="Static" ImageUrl="/Imagenes/accept.png" Style="display: none;" />--%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left" id="TrMotivoCancelacion" visible="false" runat="server" >
|
||||
<td style="vertical-align:top"><b>Mot. Canc.:</b> </td>
|
||||
<td>
|
||||
<asp:Label ID="LblMotivoCancelacion" runat="server"></asp:Label>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left" id="trContabilizada" runat="server" visible="False">
|
||||
<td><b>Contabilizada:</b></td>
|
||||
|
||||
@@ -5082,6 +5082,12 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If CveEstatus = 5 Then
|
||||
TrMotivoCancelacion.Visible = True
|
||||
LblMotivoCancelacion.Text = DbRowVenta("MotivoCancelacion").ToString()
|
||||
End If
|
||||
|
||||
If DbRowVenta("CveVentaRelacionada").ToString().ToEntero() > 0 Then
|
||||
TrRefacturadaa.Visible = True
|
||||
HplRefacturadaEn.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", DbRowVenta("CveVentaRelacionada"))
|
||||
@@ -10283,6 +10289,21 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'REASIGNAR LAS VARIABLES CUANDO HUBO EDICION POR JS O EN LA INTERFAZ
|
||||
If GvImpuestosLocales2.Rows.Count > 0 Then
|
||||
Dim ImpuestosLocales As Decimal = 0
|
||||
|
||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
ImpuestosLocales += gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal
|
||||
End If
|
||||
Next
|
||||
|
||||
If ImpuestosLocales > 0 Then
|
||||
CalculaTotalesVenta(RecalculaImpuestosLocales:=False, RecalcularTotalOriginal:=False)
|
||||
End If
|
||||
End If
|
||||
|
||||
CreaObjetosVenta(TipoDoctoViejo:=TipoDoctoViejo)
|
||||
|
||||
If ObjFactura Is Nothing OrElse (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then
|
||||
@@ -16597,19 +16618,19 @@ Partial Class Ventas
|
||||
|
||||
Select Case RowIL("TipoImpuesto").ToString()
|
||||
Case "1"
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, False, Importe, Importe * tipoCambio, 27, Concepto, Concepto, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, If(Factura.TipoDocto.Contiene("Egs"), True, False), Importe, Importe * tipoCambio, 27, Concepto, Concepto, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Case "3"
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, False, Importe, Importe * tipoCambio, 116, Concepto, Concepto, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, If(Factura.TipoDocto.Contiene("Egs"), True, False), Importe, Importe * tipoCambio, 116, Concepto, Concepto, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Case "4"
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, False, Importe, Importe * tipoCambio, 58, Concepto, Concepto, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, If(Factura.TipoDocto.Contiene("Egs"), True, False), Importe, Importe * tipoCambio, 58, Concepto, Concepto, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Case "5"
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, True, Importe, Importe * tipoCambio, 27, Concepto, Concepto, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, If(Factura.TipoDocto.Contiene("Egs"), False, True), Importe, Importe * tipoCambio, 27, Concepto, Concepto, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End Select
|
||||
@@ -16636,6 +16657,7 @@ Partial Class Ventas
|
||||
TipoDoctoVistaPrevia = "Ing"
|
||||
End If
|
||||
|
||||
CalculaTotalesVenta(RecalculaImpuestosLocales:=False, RecalcularTotalOriginal:=False)
|
||||
CreaObjetosVenta(True, TipoDoctoVistaPrevia:=TipoDoctoVistaPrevia)
|
||||
|
||||
If ObjFactura Is Nothing Or (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then
|
||||
@@ -29630,11 +29652,7 @@ Partial Class Ventas
|
||||
GvImpuestosLocales2.DataSource = ObjVentas.DtResultados
|
||||
GvImpuestosLocales2.DataBind()
|
||||
|
||||
If (NuevaFactura = 1) Then
|
||||
GvImpuestosLocales2.Enabled = True
|
||||
Else
|
||||
GvImpuestosLocales2.Enabled = False
|
||||
End If
|
||||
GvImpuestosLocales2.Enabled = True
|
||||
GvImpuestosLocales2.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user